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
Returns the value of the 'End Solution' containment reference. If the meaning of the 'End Solution' reference isn't clear, there really should be more of a description here...
SolutionRef getEndSolution();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public WorldCoordinate getEnd() {\r\n\t\treturn this.end;\r\n\t}", "public Coordinate getEnd( )\n\t{\n\t\treturn endLocation;\n\t}", "public Location getEndLocation() {\n return gameLocations.get(GameLocation.END);\n }", "public Position getEndPosition() {\n return endPosition;\n }", "public Element getEndExpression() {\n\t\treturn endExpression;\n\t}", "public Point getEndPosition()\r\n\t{\r\n\t\treturn endPosition;\r\n\t}", "public int getEnd() {\n if (Span_Type.featOkTst && ((Span_Type)jcasType).casFeat_End == null)\n jcasType.jcas.throwFeatMissing(\"End\", \"Span\");\n return jcasType.ll_cas.ll_getIntValue(addr, ((Span_Type)jcasType).casFeatCode_End);}", "public Vector2 getEndLoc( ) { return endLoc; }", "net.opengis.gml.x32.TimePositionType getEndPosition();", "public int getEndIndex() {\n return this.endIndex;\n }", "org.hl7.fhir.Integer getEnd();", "private Point getEnd() {\n if (goal == null) {\n if (target == null) {\n return null;\n }\n return target.getPosition();\n } else {\n return goal;\n }\n }", "public Vector3f getEndPosition()\n {\n return endPosition;\n }", "public int getEndIdx() {\n return this.endIdx;\n }", "public double getEnd() {\n return end;\n }", "public Temporal getEndRecurrence() { return endRecurrence; }", "public Point end() {\r\n return this.end;\r\n }", "public int getEndNum() {\r\n return this.endNum;\r\n }", "public int getEndNode(){\n\t\treturn endNode;\n\t}", "public int getEnd() {\n return this.end;\n }", "public Block getEnd () {\n\t\treturn end;\n\t}", "public Object getSolution() {\n\t\treturn solution;\n\t}", "@Nullable\n public DpProp getEnd() {\n if (mImpl.hasEnd()) {\n return DpProp.fromProto(mImpl.getEnd());\n } else {\n return null;\n }\n }", "public double getEnd();", "public String getEnd(){\n\t\treturn end;\n\t}", "public int getEnd() {\n\t\treturn end;\n\t}", "public int getEnd() {\r\n\t\treturn end;\r\n\t}", "@objid (\"a401b5aa-a324-4104-b9f3-8aa6e8adc133\")\n CommunicationNode getEnd();", "public int getEnd() {\r\n return end;\r\n }", "public int getEnd()\n {\n return end;\n }", "public int getEnd() {\n return end;\n }", "public String getEndNode()\r\n\t{\r\n\t\treturn endNode;\r\n\t}", "public int getEndy(){\n\t\treturn endy;\n\t}", "Node getEndNode() {\n return end;\n }", "public String getEnd() {\n return end;\n }", "public String getEndStr() {\r\n return endStr;\r\n }", "org.mojolang.mojo.lang.Position getEndPosition();", "public String getSolution() {\n\t\treturn solution;\n\t}", "public Label getEndLabel() {\n\treturn endLabel;\n }", "public Point getEndPosition() {\n return this.movementComposer.getTargetPosition();\n }", "public Integer getEndSoc() {\n return endSoc;\n }", "@Override\n\tpublic SourceCodeLocation getScopeEnd() {\n\t\treturn endLocation;\n\t}", "public int getEndPosition() {\n return endPosition_;\n }", "public int getEndPosition() {\n return endPosition_;\n }", "public Date get_end() {\n\t\treturn this.end;\n\t}", "public int getEndIndex() {\r\n\t\treturn endIndex;\r\n\t}", "public boolean getEnd()\n\t{\n\t\treturn getBooleanIOValue(\"End\", true);\n\t}", "@Override\n SubwayStation getEndLocation() {\n return this.endLocation;\n }", "public boolean getEnd(){\n\t\treturn this.isEnd;\n\t}", "public GeoPoint getEnd(){\n return end;\n }", "public int getCurrentSolution() {\n return currentSolution;\n }", "public String getEnd() {\n\t\t\t\t\n\t\t\t\t\tString vS = \"NONE\";\n\t\t\t\t\tSystem.out.println(vS + \" l \" + length);\n\t\t\t\t\tif (length != 0) vS = tail.getPrev().getValue();\n\t\t\t\t\tSystem.out.println(vS + \" l2 \" + length);\n\t\t\t\treturn vS;\n\t\t\t\t}", "String getDefiningEnd();", "public EndBehavior getEndBehavior() {\n return f_endBehavior;\n }", "@Override\n\tpublic Solution getSolution() {\t\n\t\treturn solution;\n\t}", "public long getComplementary_end() {\n return complementary_end;\n }", "Integer getEndDay();", "public java.lang.String getEndDay() {\r\n return localEndDay;\r\n }", "MinmaxEntity getEnd();", "public Chamber getEnd() {\n return end;\n }", "public LocalEnd LocalEnd()\n\t{\n\t\t//return new LocalEnd(self);\n\t\treturn new LocalEnd();\n\t}", "public int getEndStation() {\n\t\treturn endStation;\n\t}", "public boolean getEnd() {\n return end_;\n }", "public String getEndHint() {\n\t\treturn config.getString(QuestConfigurationField.ENDHINT.getKey(), (String) QuestConfigurationField.ENDHINT.getDefault());\n\t}", "public Room getEndRoom() {\n return endRoom;\n }", "public DateTime getEnd() {\r\n return new DateTime(getEndMillis(), getChronology());\r\n }", "SolutionRef getCurrentSolution();", "public Vertex getEnd()\n\t{\n\t\treturn end.copy();\n\t}", "public boolean getEnd() {\n return end_;\n }", "public int getEndx(){\n\t\treturn endx;\n\t}", "public Date getEnd() throws ServiceLocalException {\n\t\treturn (Date) this.getPropertyBag().getObjectFromPropertyDefinition(\n\t\t\t\tAppointmentSchema.End);\n\t}", "public Date getDtEnd() {\r\n return dtEnd;\r\n }", "public Type removeEnd(){\n Type value = null;\n if( !this.isEmpty() ){\n value = this.end.value;\n if(this.start == this.end){\n this.start = this.end = null;\n }else{\n this.end = this.end.prev;\n this.end.next = null;\n }\n }\n this.size--;\n return value;\n }", "public double getEndY() {\n\treturn v2.getY();\n }", "SolutionRef getStartSolution();", "public double getEndY()\n {\n return endycoord; \n }", "public Integer getEndMark() {\n return endMark;\n }", "public int restrictionEnd() {\n return mRestriction == null ? -1 : mRestriction.getEnd();\n }", "public int getEndLineNumber() {\n return this.endLine;\n }", "public int getEnd() {\n switch(getType()) {\n case Insertion:\n case SNP:\n case InterDup:\n case TandemDup:\n case TransDup:\n return pos;\n default:\n return pos + maxLen() - 1;\n }\n }", "public String getEndDayKey() {\n return endDayKey;\n }", "public Boolean safeEnd()\n\t{\n\t\treturn safeEnd;\n\t}", "public java.util.Date getEndDateTime() {\n return this.endDateTime;\n }", "public SlidingPuzzle<T> end() {\n\t\tcheckForStarted();\n\t\tthis.started = Boolean.FALSE;\n\t\tthis.board = null;\n\t\tthis.goal = null;\n\t\tthis.queue = null;\n\t\tthis.closed = null;\n\t\treturn this;\n\t}", "public double getEndLon() {\n\t\treturn endLon;\n\t}", "WeekdaySpec getEnd();", "public int getEndVertex() {\n\t\treturn endVertex;\n\t}", "public TimeZoneDefinition getEndTimeZone() throws ServiceLocalException {\n\t\treturn (TimeZoneDefinition) this.getPropertyBag()\n\t\t\t\t.getObjectFromPropertyDefinition(AppointmentSchema.EndTimeZone);\n\t}", "String getEnd();", "public final native DateTime getRecurrenceExpansionEnd() /*-{\n return this.getRecurrenceExpansionEnd();\n }-*/;", "public M csseFinishEnd(Object end){this.put(\"csseFinishEnd\", end);return this;}", "public synchronized boolean getEnd(){\n\treturn end;\n }", "public byte getEndSquare (){\r\n\t\treturn end_sq;\r\n\t}", "@Override\n\tpublic String getSolution() {\n\t\t// COMPLETE THIS\n\t\tString sol = solutions.first();\n\t\treturn sol;\n\t}", "@Override\n public int getEnd() {\n return feature.getEnd();\n }", "double getStaEnd();", "public AreaRendererEndType getEndType() {\n\t\treturn this.endType;\n\t}", "public LocalDate getEndDate () {\n\t\treturn DateUtils.toLocalDate(this.end);\n\t}", "public LocalTime getEnd() {\n\treturn end;\n }", "private SourcePosition getTreeEndLocation() {\n return lastSourcePosition;\n }" ]
[ "0.64572734", "0.6187837", "0.6138676", "0.6088046", "0.6035411", "0.6024177", "0.6011181", "0.5975541", "0.5967959", "0.59530675", "0.5943708", "0.5929297", "0.59250784", "0.5920917", "0.59188175", "0.58423555", "0.5841855", "0.5824659", "0.58129954", "0.5811146", "0.58105123", "0.5805326", "0.5801767", "0.57998466", "0.5794472", "0.577762", "0.57722175", "0.5763815", "0.57637966", "0.57384145", "0.57371193", "0.5735795", "0.57217234", "0.5720423", "0.57167345", "0.56827414", "0.56814295", "0.5680837", "0.5653603", "0.5652826", "0.5647738", "0.5622472", "0.5600474", "0.5589733", "0.55796814", "0.55783343", "0.5569957", "0.5565191", "0.5563881", "0.5560667", "0.5529622", "0.5528869", "0.5513857", "0.5511969", "0.5510422", "0.5500796", "0.5498", "0.54880816", "0.5484524", "0.547609", "0.54696184", "0.54605967", "0.54605186", "0.54579866", "0.54493684", "0.5433313", "0.5432255", "0.5428119", "0.54142404", "0.5409005", "0.5396304", "0.5384922", "0.53804445", "0.53705424", "0.5352565", "0.5344709", "0.53442204", "0.5342102", "0.533842", "0.5335544", "0.5331752", "0.53142214", "0.5311759", "0.53091997", "0.5309093", "0.53063416", "0.5304648", "0.52977276", "0.5297358", "0.5296726", "0.5296631", "0.5289323", "0.5283756", "0.52836746", "0.528105", "0.5272375", "0.5269402", "0.5267006", "0.5265336", "0.52445924" ]
0.8028988
0
Returns the value of the 'Previous Change' reference. If the meaning of the 'Previous Change' reference isn't clear, there really should be more of a description here...
SolutionChange getPreviousChange();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getPreviousValue() {\n return this.previousValue;\n }", "public node getPrevious() {\n\t\t\treturn previous;\n\t\t}", "public DSAGraphNode<E> getPrevious()\n {\n return previous;\n }", "public Version getPrev(){\n\t\treturn prev;\n\t}", "public MyNode<? super E> getPrevious()\n\t{\n\t\treturn this.previous;\n\t}", "public Node getPrevious() {\n return previous;\n }", "public int getPrevious() {\n\t\treturn this.previous;\n\t}", "public ExtremeEntry previous() {\n\n\t\tsetLastReturned(getLastReturned().getPrevious());\n//\t\tnextIndex--;\n\t\tcheckForComodification();\n\t\treturn getLastReturned();\n\t}", "@Override\n public E getPrevious() {\n if (isCurrent() && prev != null) { return prev.getData(); }\n else { throw new IllegalStateException(\"There is no previous element.\"); }\n }", "@NotNull\n @JsonProperty(\"previousValue\")\n public String getPreviousValue();", "public ListElement getPrevious()\n\t {\n\t return this.previous;\n\t }", "@Override\r\n\tpublic String prev() {\n\t\tString pre;\r\n\r\n\t\tpre = p.getPrev();\r\n\r\n\t\tif (pre != null) {\r\n\t\t\tthisPrevious = true;\r\n\t\t\tinput(pre);\r\n\t\t}\r\n\t\treturn pre;\r\n\t}", "public DependencyElement previous() {\n\t\treturn prev;\n\t}", "public AStarNode getPrevious() {\n return previous;\n }", "public E previousStep() {\r\n\t\tthis.current = this.values[Math.max(this.current.ordinal() - 1, 0)];\r\n\t\treturn this.current;\r\n\t}", "public State getPreviousState()\r\n\t{\r\n\t\treturn previousState;\r\n\t}", "String getPrevious();", "public DoublyLinkedNode<E> getPrevious() {\n return prevNode;\n }", "public T previous()\n {\n // TODO: implement this method\n return null;\n }", "public Index previous() {\n return Index.valueOf(value - 1);\n }", "public\tString\tgetPreviousSignature() {\n\t\t\treturn\tthis.prevSignature;\n\t\t}", "@Override\r\n public int previousIndex() {\r\n if (previous == null) {\r\n return -1;\r\n }\r\n return previousIndex;\r\n }", "public String getPrevHashValue() {\n return prevHashValue;\n }", "private Token previous() {\n return tokens.get(current-1);\n }", "public DoubleNode<T> getPrevious()\n {\n\n return previous;\n }", "public Node getPrev()\r\n\t{\r\n\t\treturn prev;\r\n\t}", "public Node getPrev()\n {\n return this.prev;\n }", "public String getLastChange() {\n return lastChange;\n }", "@Basic\n\tpublic String getPrevMove() {\n\t\treturn prev_move;\n\t}", "public Node getPrev() {\n return prev;\n }", "public Node<T> previous() {\r\n return previous;\r\n }", "public String getPreviousToken() {\n return previousToken;\n }", "@Override\r\n\t\tpublic E previous() {\n\t\t\tcaret = caret.prev();\r\n\t\t\tif (caret == null)\r\n\t\t\t\tthrow new NoSuchElementException();\r\n\t\t\tnextIndex--;\r\n\t\t\treturn caret.n.data[caret.idx];\r\n\t\t}", "public Token getPreviousToken() {\n return previousToken;\n }", "public Node<S> getPrev() { return prev; }", "public Color getPrevColor(){\n\t\treturn prevColor;\n\t}", "public Position2D getPreviousPosition()\n {\n return previousPosition;\n }", "public Node<T> getPrev() {\n\t\treturn prev;\n\t}", "public int getPrevNode() {\n\t\treturn this.previousNode;\n\t}", "public Object getPrev() {\n\t\tif (current != null) {\n\t\t\tcurrent = current.prev;\n\t\t} else {\n\t\t\tcurrent = start;\n\t\t}\n\t\treturn current == null ? null : current.item; //Ha nincs még start, akkor null adjon vissza\n\t}", "public Vertex getPrevious(){\n return previous;\n }", "public Vertex getPrev() {\n return prev;\n }", "public T prev() {\n cursor = ((Entry<T>) cursor).prev;\n ready = true;\n return cursor.element;\n }", "Object previous();", "public ListElement<T> getPrev()\n\t{\n\t\treturn prev;\n\t}", "public DNode getPrev() { return prev; }", "public Layer getPrevLayer() {\r\n\t\treturn this.prevLayer;\r\n\t}", "public int previousIndex() {\r\n \treturn index - 1; \r\n }", "public IEvent getPreviousEvent();", "public PlayerPosition getPrevious() {\n\n\t\tswitch (this) {\n\t\t\tcase BOTTOM:\n\t\t\t\treturn RIGHT;\n\t\t\tcase LEFT:\n\t\t\t\treturn BOTTOM;\n\t\t\tcase TOP:\n\t\t\t\treturn LEFT;\n\t\t\tcase RIGHT:\n\t\t\t\treturn TOP;\n\t\t\tdefault:\n\t\t\t\t// must not happen\n\t\t\t\treturn null;\n\t\t}\n\t}", "public AbstractPathElement<V, E> getPrevPathElement()\r\n/* */ {\r\n/* 188 */ return this.prevPathElement;\r\n/* */ }", "public String getPrevCommandString() {\n if (this.history.size() == 0) {\n return \"\";\n }\n\n if (this.currIndex <= 0) {\n return this.history.get(0);\n }\n\n this.currIndex -= 1;\n return this.history.get(this.currIndex);\n }", "public Node<T> getPrevNode() {\n\t\treturn prevNode;\n\t}", "public SlideNode getPrev() {\n\t\treturn prev;\n\t}", "public Node getPrev() {\n return null;\n }", "public E previous() {\r\n current--;\r\n return elem[current];\r\n }", "public void previous();", "public DockableState getPreviousState() {\n\t\treturn previousState;\n\t}", "public String getOldValue() {\n return this.oldValue;\n }", "public int previousIndex()\n {\n // TODO: implement this method\n return -1;\n }", "public E previous(){\n\t\t\tE e = tail.element;\n\t\t\tcurrent = current.next;\n\t\t\treturn e;\n\t\t}", "public List getPrevList() {\n\t\treturn prevList;\n\t}", "@Field(0) \n\tpublic Pointer<uvc_processing_unit > prev() {\n\t\treturn this.io.getPointerField(this, 0);\n\t}", "private String getPreviousRevision(final Project project) {\n List<Measure> measures = getPreviousMeasures(project, CoreMetrics.SCM_REVISION, CoreMetrics.SCM_LAST_COMMIT_DATE);\n if (measures.size()==2) {\n for (Measure measure : measures) {\n if (measure.getMetric().equals(CoreMetrics.SCM_REVISION)) {\n return measure.getData();\n }\n }\n }\n return null;\n }", "public void setPreviousValue(final String previousValue);", "@Override\n public E previous() throws NoSuchElementException\n { \n if(hasPrevious() == false)\n {\n throw new NoSuchElementException();\n }\n idx = idx - 1;\n Node theNode = getNth(idx);\n left = left.prev;\n right = left;\n canRemove = false;\n forward = false;\n return theNode.getElement(); \n }", "public Long getChangeNum() {\n return changeNum;\n }", "@Override\n\t\tpublic int previousIndex() {\n\t\t\treturn 0;\n\t\t}", "public OraRevision prevRevision() throws SQLException {\n\t\tloadFromDB();\n\t\tPreparedStatement stmt = dbc.prepareStatement(\n\t\t\t\t\"SELECT rev_id FROM revision WHERE rev_id < ? AND rev_page = ? \" +\n\t\t\t\t\"ORDER BY rev_id DESC\");\n\t\tstmt.setFetchSize(1);\n\t\tstmt.setInt(1, rev_id);\n\t\tstmt.setInt(2, rev_page);\n\t\tstmt.execute();\n\t\tResultSet rs = stmt.getResultSet();\n\t\t\n\t\tOraRevision r = null;\n\t\tif (rs.next())\n\t\t\tr = new OraRevision(dbc, rs.getInt(1));\n\t\trs.close();\n\t\tstmt.close();\n\t\treturn r;\n\t}", "public T previous() {\r\n\t\t// aktu == null ist dann, wenn aktu einen schritt zuvor first war;\r\n\t\tif (aktu == null) {\r\n\t\t\treturn null;\r\n\t\t} else if (first.equals(aktu)) {\r\n\t\t\t// wir sind am Ende, deswegen setzen wir aktu auf null (für die\r\n\t\t\t// Abfrage oberhalb) und geben den ersten Wert zurück;\r\n\t\t\taktu = null;\r\n\t\t\treturn (T) first.getData();\r\n\t\t} else if (first.equals(aktu.getPrevious())) {\r\n\t\t\t// überprüft, ob der Knoten vor dem aktuellen der letzte ist, dass\r\n\t\t\t// hat den Grund, dass beim letzten die Methode .getPrevios eine\r\n\t\t\t// NullPointerException wirft;\r\n\t\t\taktu = first;\r\n\t\t\treturn (T) first.getNext().getData();\r\n\t\t} else {\r\n\t\t\t// das ist der Standardfall solange der nicht beim vorletzten Knoten\r\n\t\t\t// angekommen ist.\r\n\t\t\taktu = aktu.getPrevious();\r\n\t\t\treturn (T) aktu.getNext().getData();\r\n\t\t}\r\n\r\n\t}", "public E getPrevious() {\n\t\tif (!super.isEmpty()) {\n\t\t\tif (index <= 0)\n\t\t\t\tindex = this.size();\n\t\t\treturn this.get(--index);\n\t\t}\n\t\treturn null;\n\t}", "private void parsePreviousChangeVersion(final String line, final CVSChangeLogSet.File file, final CVSChangeLog change,\n final Map<String, String> branches, final List<CVSChangeLog> changes,\n final Map<String, CvsFile> files, final CvsRepositoryLocation location,\n final EnvVars envVars) {\n if (!line.startsWith(\"revision\")) {\n throw new IllegalStateException(\"Unexpected line from CVS log: \" + line);\n }\n\n final String revision = line.substring(9);\n file.setPrevrevision(revision);\n\n saveChange(file, change, branches, changes, files, location, envVars);\n\n file.setRevision(revision);\n }", "@javax.annotation.Nullable\n public String getChange() {\n return change;\n }", "@ActionTrigger(action=\"KEY-PRVREC\", function=KeyFunction.PREVIOUS_RECORD)\n\t\tpublic void spriden_PreviousRecord()\n\t\t{\n\t\t\t\n\t\t\t\tpreviousRecord();\n\t\t\t\t// \n\t\t\t\t\n\t\t\t\ttry { \n\t\t\t\t\tMessageServices.setMessageLevel(OracleMessagesLevel.decodeMessageLevel(5));\n\t\t\t\t// \n\t\t\t\tnextBlock();\n\t\t\t\tnextBlock();\n\t\t\t\texecuteQuery();\n\t\t\t\tnextBlock();\n\t\t\t\texecuteQuery();\n\t\t\t\tnextBlock();\n\t\t\t\texecuteQuery();\n\t\t\t\tpreviousBlock();\n\t\t\t\tpreviousBlock();\n\t\t\t\tpreviousBlock();\n\t\t\t\tpreviousBlock();\n\t\t\t\t// \n\t\t\t\t\n\t\t\t\t} finally {\n\t\t\t\t\t\t\t\n\t\t\t\t\tMessageServices.setMessageLevel(OracleMessagesLevel.decodeMessageLevel(0));\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t}", "Message getPreviousMessage();", "public static Previous getPreviousWindow() {\n\t\treturn previousWindow;\n\t}", "public K prev();", "public void setPrev(Level previous) {\n\t\tthis.prev = previous;\n\t}", "public Content getNavLinkPrevious() {\n Content li;\n if (prev != null) {\n Content prevLink = getLink(new LinkInfoImpl(configuration,\n LinkInfoImpl.Kind.CLASS, prev)\n .label(prevclassLabel).strong(true));\n li = HtmlTree.LI(prevLink);\n }\n else\n li = HtmlTree.LI(prevclassLabel);\n return li;\n }", "public void setPrevious(DSAGraphNode<E> inPrevious)\n {\n previous = inPrevious;\n }", "public void previous() {\n if (highlight.getMatchCount() > 0) {\n Point point = highlight.getPreviousMatch(cursor.getY(), cursor.getX());\n if (point != null) {\n cursor.moveTo(point);\n }\n return;\n }\n Point point = file.getPreviousModifiedPoint(cursor.getY(), cursor.getX());\n if (point != null) {\n cursor.moveTo(point);\n }\n }", "public long getStateChange() {\n return stateChange_;\n }", "Optional<Node<UnderlyingData>> prevNode(Node<UnderlyingData> node);", "public int previous()\n {\n if (m_source_.getIndex() <= 0 && m_isForwards_) {\n // if iterator is new or reset, we can immediate perform backwards\n // iteration even when the offset is not right.\n m_source_.setToLimit();\n updateInternalState();\n }\n m_isForwards_ = false;\n if (m_CEBufferSize_ > 0) {\n if (m_CEBufferOffset_ > 0) {\n return m_CEBuffer_[-- m_CEBufferOffset_];\n }\n m_CEBufferSize_ = 0;\n m_CEBufferOffset_ = 0;\n }\n\n int result = NULLORDER;\n char ch = 0;\n do {\n int ch_int = previousChar();\n if (ch_int == UCharacterIterator.DONE) {\n return NULLORDER;\n }\n ch = (char)ch_int;\n if (m_collator_.m_isHiragana4_) {\n m_isCodePointHiragana_ = (ch >= 0x3040 && ch <= 0x309f);\n }\n if (m_collator_.isContractionEnd(ch) && !isBackwardsStart()) {\n result = previousSpecial(m_collator_, CE_CONTRACTION_, ch);\n }\n else {\n if (ch <= 0xFF) {\n result = m_collator_.m_trie_.getLatin1LinearValue(ch);\n }\n else {\n result = m_collator_.m_trie_.getLeadValue(ch);\n }\n if (RuleBasedCollator.isSpecial(result)) {\n result = previousSpecial(m_collator_, result, ch);\n }\n if (result == CE_NOT_FOUND_) {\n if (!isBackwardsStart()\n && m_collator_.isContractionEnd(ch)) {\n result = CE_CONTRACTION_;\n }\n else {\n if(RuleBasedCollator.UCA_ != null) {\n result = RuleBasedCollator.UCA_.m_trie_.getLeadValue(ch);\n }\n }\n\n if (RuleBasedCollator.isSpecial(result)) {\n if(RuleBasedCollator.UCA_ != null) { \n result = previousSpecial(RuleBasedCollator.UCA_, result, ch);\n }\n }\n }\n }\n } while (result == IGNORABLE && ch >= 0xAC00 && ch <= 0xD7AF);\n if(result == CE_NOT_FOUND_) {\n result = previousImplicit(ch);\n }\n return result;\n }", "int getPrev(int node_index) {\n\t\treturn m_list_nodes.getField(node_index, 1);\n\t}", "protected JButton getPrevious()\n {\n return previous;\n }", "public void prev();", "public E getPrevEdge()\r\n/* */ {\r\n/* 178 */ return (E)this.prevEdge;\r\n/* */ }", "public void Prev();", "public static Result prev() {\r\n\t\tMap<String, String> requestData = Form.form().bindFromRequest().data();\r\n\t\tString idCurrentNode = requestData.get(RequestParams.CURRENT_NODE);\r\n\t\tString formName = ChangeOrderForm.NAME;\r\n\t\tString username = CMSSession.getEmployeeName();\r\n\r\n\t\tDecision previousDecision = CMSGuidedFormFill.getPreviousDecision(\r\n\t\t\t\tformName, username, idCurrentNode);\r\n\r\n\t\treturn ok(backdrop.render(previousDecision));\r\n\t}", "public long getStateChange() {\n return stateChange_;\n }", "@Override\r\n\t\tpublic Node getPreviousSibling()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "public int getOldValue() {\n\t\treturn oldValue;\n\t}", "public int getOldValue() {\n\t\treturn oldValue;\n\t}", "public int getOlddeltaT() {\n return olddeltaT;\n }", "String getPrevMoves() {\n return this.prevMoves;\n }", "@Override\n\tpublic Node getPreviousSibling() {\n\t\treturn null;\n\t}", "public int previousIndex() {\r\n throw new UnsupportedOperationException();\r\n }", "public Chord getPreviousChordInVoice ()\r\n {\r\n return voice.getPreviousChord(this);\r\n }", "public void previous()\n {\n if (size != 0)\n {\n current = current.previous();\n }\n\n }" ]
[ "0.72527045", "0.72460455", "0.7238196", "0.7143039", "0.7137728", "0.7108407", "0.7098053", "0.70894724", "0.70752305", "0.70556056", "0.702243", "0.7020894", "0.7015079", "0.7011506", "0.7002117", "0.698204", "0.6972803", "0.69440585", "0.69188786", "0.6907862", "0.68575", "0.68424875", "0.68155944", "0.678495", "0.67811394", "0.6772975", "0.6769062", "0.6763538", "0.66827136", "0.66650677", "0.6646519", "0.66352594", "0.6629626", "0.6625799", "0.6604692", "0.65953624", "0.6578164", "0.6557592", "0.65561265", "0.65556383", "0.65498996", "0.6536323", "0.6527922", "0.6522139", "0.6522076", "0.65152615", "0.651449", "0.6513117", "0.6501909", "0.64818865", "0.64712656", "0.6470678", "0.64706004", "0.64643204", "0.64582866", "0.6456907", "0.64408404", "0.64095646", "0.64035916", "0.63889855", "0.63707817", "0.633061", "0.6327286", "0.6306496", "0.62815326", "0.6279754", "0.626887", "0.626552", "0.6245581", "0.6201275", "0.6193817", "0.6181863", "0.61818564", "0.61597216", "0.61569726", "0.61549836", "0.61326736", "0.6105178", "0.60944617", "0.6092833", "0.60910964", "0.60899675", "0.6087452", "0.6077713", "0.60764", "0.6071719", "0.60714185", "0.6069596", "0.60483205", "0.60452306", "0.6045025", "0.60397214", "0.60383594", "0.60383594", "0.60358256", "0.6032975", "0.6029727", "0.6028177", "0.6023885", "0.60217226" ]
0.79821455
0
Returns the value of the 'Current Solution' containment reference. If the meaning of the 'Current Solution' reference isn't clear, there really should be more of a description here...
SolutionRef getCurrentSolution();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getCurrentSolution() {\n return currentSolution;\n }", "public Object getSolution() {\n\t\treturn solution;\n\t}", "public de.engehausen.crazygolf.model.Element getCurrent() {\r\n\t\treturn current;\r\n\t}", "public String getSolution() {\n\t\treturn solution;\n\t}", "@Override\n\tpublic Solution getSolution() {\t\n\t\treturn solution;\n\t}", "public Node getCurrent() {\n return current;\n }", "public String getCurrent()\n {\n return current.toString();\n }", "public Integer getCurrent() {\n return this.current;\n }", "public final TrajectoryInfo getSolution() { \n\t\treturn solution; \n\t}", "public Integer getCurrentValue() {\n return currentValue;\n }", "public Integer getCurrentValue() {\n return currentValue;\n }", "@Override\n\tpublic String getSolution() {\n\t\t// COMPLETE THIS\n\t\tString sol = solutions.first();\n\t\treturn sol;\n\t}", "public String valueInCurrentSlot() {\n return this.innerProperties() == null ? null : this.innerProperties().valueInCurrentSlot();\n }", "public int getCurrentValue() {\n\t\treturn this.currentValue;\n\t}", "public Coordinate getCurrent( )\n\t{\n\t\treturn currentLocation;\n\t}", "public Object getCurrentObject()\r\n\t{\r\n\t\tif (newState != null)\r\n\t\t{\r\n\t\t\t// Not applied yet\r\n\t\t\treturn newState.unmodifiedObject;\r\n\t\t}\r\n\r\n\t\treturn propertyBrowser.getObject();\r\n\t}", "public static Version current() {\r\n\t\treturn current;\r\n\t}", "public PartialSolution getParent() {\n return _parent;\n }", "SolutionRef getStartSolution();", "public BigInteger getCurrentValue()\r\n { \t\r\n \tlog.debug(\"counter: \" + currentValue.intValue() );\r\n return this.currentValue;\r\n }", "public Question getCurrentQuestion() {\n\t\treturn currentQuestion;\n\t}", "public ProjectModel getCurrentProject() {\n if (projects.size() > 0) {\n return projects.get(0);\n }\n else return null;\n }", "public int getCurrentNode() {\n\t\treturn currentNode;\n\t}", "public Slide getCurrentSlide() {\n\t\treturn getSlide(currentSlideNumber);\n\t}", "public Frame currentFrame() {\n\t\treturn current;\n\t}", "public JFrame getCurrentFrame() {\n\t\treturn currentFrame;\n\t}", "public Prompt getCurrent() {\n\t\t\treturn current;\n\t\t}", "public long getCurrent() {\n return current;\n }", "public IPrivateTestCompView.IContextElement currentContextElement() {\r\n return (IPrivateTestCompView.IContextElement) getCurrentElement();\r\n }", "public float getCurrentValue() {\n return currentValue;\n }", "public String getCurrentItem() {\n\t\treturn currentItem;\n\t}", "public Integer getIscurrent() {\n return iscurrent;\n }", "public Integer getSolutionId() {\n return solutionId;\n }", "public MavenProject getCurrentProject()\n {\n return currentProject;\n }", "public TetrisPiece getCurrentPiece() {\n\t\treturn currentPiece;\n\t}", "public ContentObject getCurrent(\n )\n {\n if(index < 0 || index >= objects.size())\n return null;\n\n return objects.get(index);\n }", "public T getCurrent(){\r\n if(curr != null){\r\n return curr.data;\r\n }\r\n return null;\r\n }", "public LabData getCurrentData(){\n return labDataCurrent;\n }", "public final Object getCurrent()\n\t{\n\t\treturn getCapture();\n\t}", "public Item current() {\n return curr;\n }", "@Override\r\n\t/**\r\n\t * getCurrentData() returns the data of the current node in the tree\r\n\t * @return String data of the current node or null if the current node is null\r\n\t */\r\n\tpublic String getCurrentData() {\n\t\treturn current.getData();\r\n\t}", "public final Object evaluateCurrent() {\n RolapCalculation maxSolveMember;\n switch (calculationCount) {\n case 0:\n final Object o = cellReader.get(this);\n if (o == Util.nullValue) {\n return null;\n }\n return o;\n\n case 1:\n maxSolveMember = calculations[0];\n break;\n\n default:\n switch (root.solveOrderMode) {\n case ABSOLUTE:\n maxSolveMember = getAbsoluteMaxSolveOrder();\n break;\n case SCOPED:\n maxSolveMember = getScopedMaxSolveOrder();\n break;\n default:\n throw Util.unexpected(root.solveOrderMode);\n }\n }\n final int savepoint = savepoint();\n maxSolveMember.setContextIn(this);\n final Calc calc = maxSolveMember.getCompiledExpression(root);\n final Object o;\n try {\n o = calc.evaluate(this);\n } finally {\n restore(savepoint);\n }\n if (o == Util.nullValue) {\n return null;\n }\n return o;\n }", "public ImPoint getCurrentLoc() {\n\treturn curPoint; // REMOVE this line -- dummy code to get it to compile\n }", "SolutionRef getEndSolution();", "public IVirtualBookRef currentVirtualBook() {\n\t\tif (currentElement >= 0 && currentElement < size()) {\n\t\t\treturn get(currentElement);\n\t\t}\n\t\treturn null;\n\t}", "public String getCurrent() {\n\t\t\tString result=\"\";\n\t\t\treturn result ;\n\t\t}", "public int getCurrentIdx() {\n\t\treturn currentIdx;\n\t}", "public Vector3d getCurrentPosition() {\r\n return currentPosition;\r\n }", "public int currentindex() {\n\t\treturn currentElement;\n\t}", "public FlexoProject getProject() {\n \t\treturn findCurrentProject();\n \t}", "public SubsetDefinition getCurrentSubsetDefinitionRef() {\n SubsetDefinition subsetDefinition = getSubsetDefinitionRef(CURRENT_SUBSET_DEFINITION);\n if (subsetDefinition == null) {\n subsetDefinition = new SubsetDefinition();\n subsetDefinition.setId(CURRENT_SUBSET_DEFINITION);\n\n addSubsetDefinitionRef(subsetDefinition);\n }\n\n if (logger.isDebugEnabled()) {\n logger.debug(\"getCurrentSubsetDefinitionRef {}\", subsetDefinition);\n }\n return subsetDefinition;\n }", "public Solution getSolfromCurr(AState curr) {\n if(curr==null)\n return null;\n Solution sol = new Solution();\n while (curr != null) {\n sol.insertToSolution(curr);\n curr = curr.getCameFrom();\n }\n return sol;\n }", "public Form getCurrentForm() {\n return currentForm;\n }", "String getCurrentValue();", "public String getCurrentPanel() {\n return this.currentPanel;\n }", "public Position getCurrentPosition() {\n return this.currentPosition;\n }", "public int getCurrentPos() {\n return currentPos;\n }", "public TaskSolution getSolution(){\n return new TaskSolution(this.moveStack);\n }", "public double getCurrent( )\r\n {\r\n\t double element = 0; \r\n\t if(isCurrent() != true){// Student will replace this return statement with their own code:\r\n\t throw new IllegalStateException (\"no current element, getCurrent may not be called\");\r\n\t }\r\n\t else\r\n\t \t element = element + (cursor.getData()) ;\r\n\t return element; \r\n }", "public Integer getCurrentTarget()\n\t{\n\t\treturn _currentTarget;\n\t}", "public int getCurrentIdx() {\n\t\treturn this.currentIdx;\n\t}", "public float getCurrentDimValue() {\n\t\treturn currentDimValue;\n\t}", "@javax.annotation.Nullable\n @ApiModelProperty(example = \"7\", value = \"Current position of the call in the queue.\")\n @JsonProperty(JSON_PROPERTY_CURRENT_POSITION)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public Integer getCurrentPosition() {\n return currentPosition;\n }", "public String valueInTargetSlot() {\n return this.innerProperties() == null ? null : this.innerProperties().valueInTargetSlot();\n }", "public double getCurrentValue()\r\n\t{\r\n\t\tcurrentValue=(2*border+24)/2;\r\n\t\treturn currentValue;\r\n\t}", "default boolean equalsCurrent() {\n return getName().equalsIgnoreCase(current().getName());\n }", "public Question getCurrentQuestion() {\n Question question = null;\n for (Question q : questions) {\n if (q.getSequence() == sequence) {\n question = q;\n break;\n }\n }\n return question;\n }", "public String getLocatorCurrent() {\n\t\treturn null;\r\n\t}", "int getCurrentIdx() {\n return currentIdx;\n }", "public native final Node frameCurrentTarget() /*-{\n\t\treturn this.frameCurrentTarget;\n\t}-*/;", "public String getHelpingSolutionTypeValue()\n/* */ {\n/* 31 */ return this.helpingSolutionTypeValue;\n/* */ }", "public Clue getCurrentClue() {\n\t\treturn _currentClue;\n\t}", "public ArrayList<GridPoint> getSolutionRepresentation() {\n\t\treturn this.solutionRepresentation;\n\t}", "public Position getCurrentPosition(){return this.currentPosition;}", "public Iterable<Board> solution() {\n if (isSolvable)\n return solutionTree;\n else\n return null;\n }", "public GuiSettings getCurrentGuiSetting() {\n return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(), (int) primaryStage.getX(),\n (int) primaryStage.getY());\n }", "public Game getCurrentGame()\r\n {\r\n return currentGame;\r\n }", "public String getCurrent_word(){\n\t\treturn current_word;\n\t}", "public Object currValue();", "GuiSettings getCurrentGuiSetting() {\n return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),\n (int) primaryStage.getX(), (int) primaryStage.getY());\n }", "@Override\n public E getCurrent() {\n if (isCurrent()) { return cursor.getData(); }\n else { throw new IllegalStateException(\"There is no current element.\"); }\n }", "public String getThePanel() {\r\n\t\treturn secretIt.currentS().puzzle();\r\n\t}", "public int getCurrentPosition() {\n\t\treturn currentPosition;\n\t}", "private int currentPosition() {\n return robot.leftBack.getCurrentPosition();\n }", "public SchedulerInterface getCurrent() {\n return current;\n }", "public Location getCurrentLocation()\n\t{\n\t\treturn currentLocation;\n\t}", "public Document getCurrentDocument() {\n\t\tif(currentDocument.size()>0) {\n\t\t\t\n\t\t\tif (index != -1) {\n\t\t\t\treturn currentDocument.get(index);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Workspace getParentWorkspace() {\n\t\treturn this.parentWorkspace;\n\t}", "public Class<?> currentClass() {\n\t\treturn JetArgument.getCurrent().getElementClass();\n\t}", "ProjectRepresentation getWorkingProject();", "public World getCurrentWorld() {\n\t\tassert levelIndex >= 0 && levelIndex < levels.size();\n\t\treturn levels.get(levelIndex);\n\t}", "public EntityAndArguments getCurrentEntityAndArguments() {\r\n\t\t\tif (this.evaluationList == null) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\treturn this.evaluationList.get(this.currentEvaluationIndex);\r\n\t\t}", "public double getCurrent( )\n {\n // Implemented by student.\n }", "public Vec4 getReferencePoint()\n {\n return this.currentData.getReferencePoint();\n }", "public CurrentStimulus getCurrentStimulus() {\n return currentStimulus;\n }", "public int getCurrentX() {\n return currentX;\n }", "@Override\n\tpublic Solution localSearch() {\n\t\treturn this;\n\t}", "@Override\r\n\t\tpublic boolean isCurrent()\r\n\t\t{\n\t\t\treturn true;\r\n\t\t}", "public Question getQuestion()\n {\n return currentQuestion;\n }", "public int getCurrent(){\r\n\t\treturn dialogToDisplay;\r\n\t}" ]
[ "0.7493993", "0.674965", "0.66234064", "0.6526161", "0.64104617", "0.63397163", "0.63368005", "0.6303205", "0.630289", "0.62697816", "0.62697816", "0.6251068", "0.6243818", "0.60905033", "0.60797244", "0.60610455", "0.60381585", "0.59664804", "0.5950861", "0.5937665", "0.5913133", "0.58898187", "0.5857382", "0.5855422", "0.58513546", "0.58251643", "0.58140534", "0.5813147", "0.5807299", "0.5769048", "0.5751482", "0.574517", "0.5742954", "0.5733335", "0.57212234", "0.5707367", "0.5702096", "0.56941044", "0.5690146", "0.5671709", "0.5664601", "0.5657249", "0.563824", "0.56341136", "0.5629502", "0.5621885", "0.5618941", "0.5615255", "0.5608753", "0.5579051", "0.556857", "0.5554947", "0.5548128", "0.5542396", "0.55423146", "0.55374855", "0.5537062", "0.5536799", "0.5534932", "0.55320287", "0.55256224", "0.55190563", "0.55137813", "0.55018294", "0.54840827", "0.54820305", "0.547457", "0.54646873", "0.54587364", "0.54559827", "0.54513264", "0.54451966", "0.5439521", "0.5436748", "0.5436654", "0.5429059", "0.5425597", "0.54186565", "0.54183227", "0.5406684", "0.54053175", "0.5402473", "0.5386112", "0.5384111", "0.53811944", "0.53622603", "0.53515506", "0.5348159", "0.5340066", "0.53327054", "0.5323755", "0.531776", "0.5316294", "0.53045964", "0.5304026", "0.5301003", "0.5297152", "0.52943635", "0.5291201", "0.5280344" ]
0.75093836
0
Returns the value of the 'Keep Solutions' attribute. If the meaning of the 'Keep Solutions' attribute isn't clear, there really should be more of a description here...
boolean isKeepSolutions();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getSolution() {\n\t\treturn solution;\n\t}", "public Object getSolution() {\n\t\treturn solution;\n\t}", "@Override\n public double solutionWeight(){\n return solutionweight;\n }", "@Override\n\tpublic String getSolution() {\n\t\t// COMPLETE THIS\n\t\tString sol = solutions.first();\n\t\treturn sol;\n\t}", "public String getHelpingSolutionTypeValue()\n/* */ {\n/* 31 */ return this.helpingSolutionTypeValue;\n/* */ }", "public final TrajectoryInfo getSolution() { \n\t\treturn solution; \n\t}", "public SolutionType getBestSolution();", "public SASolution getNeighborSolution();", "public Map<String, Double> getOriginalSolutionWeightedFitness() {\r\n\t\treturn this.originalSolutionWeightedFitness;\r\n\t}", "public int getCurrentSolution() {\n return currentSolution;\n }", "public boolean trueSolution() {\n this.tanSolve();\n return this.solution;\n }", "public K getGoalK(){\r\n\t\treturn insideSemiringWeightsTable.get(hg.goalNode);\t\r\n\t}", "public String getNecessary() {\n return necessary;\n }", "public double getIntersectRoadwayPI()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(INTERSECTROADWAYPI$22);\r\n if (target == null)\r\n {\r\n return 0.0;\r\n }\r\n return target.getDoubleValue();\r\n }\r\n }", "@Override\n\tpublic Solution getSolution() {\t\n\t\treturn solution;\n\t}", "public Integer getSolutionId() {\n return solutionId;\n }", "public static String solution() {\r\n\t\treturn \"73162890\";\r\n\t}", "public double getSensitivity() {\n\t\treturn sensitivity;\n\t}", "public int getSolutionLength() {\n\t\treturn this.solutionLength;\n\t}", "public double getBestSolutionEvaluation();", "public Map<String, Double> getOriginalSolutionFitness() {\r\n\t\treturn this.originalSolutionFitness;\r\n\t}", "public double returnsConstraint()\n\t{\n\t\treturn _returnsConstraint;\n\t}", "public Alternatives getSolverAlternatives_0_0() { return cSolverAlternatives_0_0; }", "public SATSolverElements getSATSolverAccess() {\n\t\treturn pSATSolver;\n\t}", "public double checkModel() {\n\treturn (Weights[2] * Unigram.checkModel() + \n\t\tWeights[1] * Bigram.checkModel() +\n\t\tWeights[0] * Trigram.checkModel());\n }", "@Override\n\tpublic String toString() {\n\t\treturn solution + \" [\" + CONF_FORMATTER.format(confidence) + \"%]\";\n\t}", "public double se() {\n\t\tint n = this.getAttCount();\n\t\tif (n == 0)\n\t\t\treturn Constants.UNUSED;\n\t\telse\n\t\t\treturn Math.sqrt(var() / n);\n\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getWorkitemsCheckedOut() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(WORKITEMSCHECKEDOUT_PROP.get());\n }", "public java.lang.Short getSkipNotMatch() {\r\n return skipNotMatch;\r\n }", "private double getSol(){\n return this.sol;\n }", "@Override\npublic boolean restrictNeighborhood(Solution solution)\n{\n\n\tSolver solver = solution.getSolver();\n\tint nbTotalVars = solver.getNbIntVars() - 1;\n\n\tint n = nbTotalVars - nbRelaxedVars;\n\tboolean b = false;\n\tIntVar var;\n\tselected.clear();\n\twhile (n > 0) {\n\t\tint index = random.nextInt(nbTotalVars);\n\t\tvar = solver.getIntVarQuick(index);\n\t\tif (var != solver.getObjective() && !selected.contains(index)) {\n\t\t\tif (solution.getIntValue(index) != Solution.NULL) {\n\t\t\t\tsolver.LOGGER.info(\"fix \" + var);\n\t\t\t\tsolver.post(solver.eq(var, solution.getIntValue(index)));\n\t\t\t\tb = true;\n\t\t\t}\n\t\t\tselected.add(index);\n\t\t\tn--;\n\t\t}\n\t}\n\treturn b;\n}", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getWorkitemsCheckedOut() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(WORKITEMSCHECKEDOUT_PROP.get());\n }", "public double getCenaSmestaja() {\n return cenaSmestaja;\n }", "@Override\n\tpublic SortedSet<String> getSolutions() {\n\t\t// COMPLETE THIS\n\n\t\treturn solutions;\n\n\t}", "public Boolean getSoft() {\n return soft;\n }", "public String getSkyCondition() {\n\t\treturn skyCondition;\n\t}", "public boolean isHasSolution() {\n return hasSolution;\n }", "protected double calculateSolutionValue(int[] solution){\n return tspProblem.calculateSolutionValue(solution);\n }", "public Assignment getSolverAssignment_0() { return cSolverAssignment_0; }", "public boolean isKeepGoingMode() {\n return this.keepGoingMode;\n }", "public double getSolutionX3() {\n this.polySolve();\n if (this.degree < 3) {\n return 0010;\n } else {\n if (this.real) {\n return this.x3;\n } else {\n return 0010;\n }\n }\n }", "public int getWorth() { return 1; }", "public float getDry() {\r\n\t\treturn dry;\r\n\t}", "@Override\n\tpublic double getBestTargetValue() {\n\t\treturn 0;\n\t}", "public boolean strictMatches() { return strict_matches_cbmi.isSelected(); }", "public boolean hasJamSelesai() {\n return fieldSetFlags()[3];\n }", "public Set<Card> getSolution() {\n return card.getSolution();\n }", "public double getObjectiveValue() {\n\t\treturn 0;\r\n\t}", "public java.lang.String getStudent_anyConfuse() {\n\t\treturn _primarySchoolStudent.getStudent_anyConfuse();\n\t}", "public boolean getKeepChangedValues();", "public Boolean getBestflag() {\n return bestflag;\n }", "@Override\n\tpublic double getFinalBestTargetValue() {\n\t\treturn 0;\n\t}", "SolutionRef getCurrentSolution();", "public JSONObject getKeep(){return kd;}", "String getSpareFlag();", "double getSolutionCost();", "public double calculateCostExclusive() {\n\t\tdouble accumulatedCost = 0;\n\t\tfor(int i = 0; i < solutionLength - 1; i++) {\n\t\t\taccumulatedCost += calculateEuclideanDistance(solutionRepresentation.get(i), solutionRepresentation.get(i + 1));\n\t\t}\n\t\t\n\t\treturn accumulatedCost;\n\t}", "public Long getThresh() {\n\t\treturn thresh;\n\t}", "public boolean optimal() {\n\t\treturn optimal;\n\t}", "@NoProxy\n @NoWrap\n @NoDump\n public boolean getSignificantChange() {\n return significantChange;\n }", "public boolean isRelevant() {\n return isRelevant;\n }", "public List<String> getSolutionKeys() {\n return solutionRefs;\n }", "public boolean isFalseProductLine(HlclProgram model) {\r\n\r\n\t\tSolverSolution configuration = new SolverSolution();\r\n\t\tint count = 0;\r\n\t\tsolver.setHLCLProgram(model);\r\n\t\tsolver.solve(new SolverSolution(), new ConfigurationOptionsDTO());\r\n\t\twhile (count <= 2) {\r\n\t\t\tconfiguration = solver.getSolution();\r\n\t\t\tif (configuration != null) {\r\n\t\t\t\t// System.out.println(configuration);\r\n\t\t\t\tcount++;\r\n\t\t\t} else\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tif (count >= 2) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t}", "public List<String> getSolutionTrace() {\n\t\treturn trace;\n\t}", "public int getSolutionCost(){\r\n if (this.path_solution.size()==0)\r\n return 0;\r\n return this.path_solution.get(this.path_solution.size()-1).getCost();\r\n }", "public double getSigProp(){\n\t\tdouble s=0, n=0;\n\t\tfor(ControlledExperiment rep : replicates){\n\t\t\ts+=rep.getSigCount();\n\t\t\tn+=rep.getNoiseCount();\n\t\t}return(s/(s+n));\n\t}", "@Override\n\tpublic double getTargetValueInCurrentBest() {\n\t\treturn 0;\n\t}", "public boolean isSolved(){ return getRemainingValues() == 0; }", "public double getTiempoDijkstraSencillo()\n {\n return tiempoDijkstraSencillo;\n }", "public Integer getCorrectflag() {\n return correctflag;\n }", "public String getFixedCondition() {\n return _fixedCondition;\n }", "public String getWorkingCondition() {\r\n return workingCondition;\r\n }", "public static double getCheckingInterest() {\n\t\treturn CHECKING_INTEREST;\n\t}", "public long getSIdim() {\n\t\treturn(mksa);\n\t}", "boolean isNewSolution();", "public static long getKeepalives() {\n return keepalives;\n }", "public BigDecimal getSMART_OPTION3() {\r\n return SMART_OPTION3;\r\n }", "public BigDecimal getSMART_OPTION3() {\r\n return SMART_OPTION3;\r\n }", "public double getX3AddSolution() {\n this.polyAddSolve();\n return this.x3add;\n }", "public double getTrueAnamoly() {\n return trueAnamoly;\n }", "public String getIfstay() {\n return ifstay;\n }", "public java.lang.Boolean getVar155() {\n return var155;\n }", "public java.lang.Boolean getVar155() {\n return var155;\n }", "public boolean[][] getGraphVal(GraphVar g) {\n if (empty) {\n throw new UnsupportedOperationException(\"Empty solution. No solution found\");\n }\n return graphmap.get(g);\n }", "public double getTotalSimSukarela() {\n return this.totalSimSukarela;\n }", "public boolean getUsageWeighted() {\n return usageWeighted; \n }", "public BigDecimal getEXCLUDE_PROFIT_AMOUNT() {\r\n return EXCLUDE_PROFIT_AMOUNT;\r\n }", "public String getIsresearch() {\r\n\t\treturn isresearch;\r\n\t}", "public long getBestSolutionTime();", "public List getDonts() {\n\t\tif (donts == null) {\n\t\t\tdonts = getFormattedPractices(\"/metadataFieldInfo/field/bestPractices/donts\");\n\t\t}\n\t\treturn donts;\n\t}", "public boolean hasVar84() {\n return fieldSetFlags()[85];\n }", "public BigDecimal getOPTION3_SMART_DEFAULT() {\r\n return OPTION3_SMART_DEFAULT;\r\n }", "public BigDecimal getOPTION3_SMART_DEFAULT() {\r\n return OPTION3_SMART_DEFAULT;\r\n }", "public double getMisc() {\r\n return misc;\r\n }", "public Integer getIsSuccessInSolving()\n/* */ {\n/* 207 */ return this.isSuccessInSolving;\n/* */ }", "public abstract OptimisationSolution getBestSolution();", "public boolean realSolution() {\n this.polySolve();\n return this.real;\n }", "public double getWeightChangeGoal() {\n return weightChangeGoal;\n }", "public String getToolisuse() {\r\n return toolisuse;\r\n }", "public java.lang.Long getJamSelesai() {\n return jam_selesai;\n }" ]
[ "0.5879232", "0.5535241", "0.52964586", "0.5276063", "0.525767", "0.524313", "0.51987785", "0.5188961", "0.51845723", "0.5141304", "0.5131211", "0.5094022", "0.5049063", "0.50268996", "0.5020589", "0.5011795", "0.49745703", "0.49595144", "0.49169198", "0.49163342", "0.4870086", "0.4825241", "0.48087302", "0.48025942", "0.47998968", "0.47661656", "0.47623342", "0.47566628", "0.4739207", "0.4739033", "0.47333747", "0.4730554", "0.4722411", "0.47179767", "0.47173995", "0.47117952", "0.46968687", "0.46961293", "0.46852085", "0.465966", "0.46557683", "0.4654773", "0.4652742", "0.46463835", "0.4645872", "0.46395248", "0.46322536", "0.4628305", "0.4626632", "0.46238914", "0.46203822", "0.4616138", "0.46134835", "0.46047172", "0.46030134", "0.46012554", "0.45969832", "0.4589308", "0.45865324", "0.45741922", "0.45734736", "0.457213", "0.4569113", "0.45655188", "0.45650592", "0.45584506", "0.45475242", "0.45439696", "0.45426348", "0.4537098", "0.45355734", "0.45341837", "0.45338857", "0.45315278", "0.45306608", "0.4530428", "0.4530317", "0.4530317", "0.4520115", "0.4518714", "0.45170075", "0.45066643", "0.45063612", "0.4502948", "0.4499448", "0.44979012", "0.44956732", "0.44948092", "0.4492563", "0.44846356", "0.4484174", "0.4483176", "0.4483176", "0.44775227", "0.44765884", "0.4476242", "0.44746593", "0.447289", "0.4469011", "0.446827" ]
0.60577166
0
Returns the value of the 'New Solution' attribute. If the meaning of the 'New Solution' attribute isn't clear, there really should be more of a description here...
boolean isNewSolution();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getSolution() {\n\t\treturn solution;\n\t}", "public int getCurrentSolution() {\n return currentSolution;\n }", "SolutionRef getCurrentSolution();", "public String getHelpingSolutionTypeValue()\n/* */ {\n/* 31 */ return this.helpingSolutionTypeValue;\n/* */ }", "public Object getSolution() {\n\t\treturn solution;\n\t}", "public Integer getIsNew() {\n return isNew;\n }", "@Override\n\tpublic Solution getSolution() {\t\n\t\treturn solution;\n\t}", "public Integer getSolutionId() {\n return solutionId;\n }", "@Override\n\tpublic String getSolution() {\n\t\treturn \"Ajouter des composants au circuit\";\n\t}", "public boolean getCheckNew() {\n return getBoolean(\"check-new\", false);\n }", "@Override\n\tpublic String getSolution() {\n\t\t// COMPLETE THIS\n\t\tString sol = solutions.first();\n\t\treturn sol;\n\t}", "public String getHelpingSolutionTypeName()\n/* */ {\n/* 55 */ return this.helpingSolutionTypeName;\n/* */ }", "public Integer getCompIsnew() {\n return compIsnew;\n }", "public String getSeasonNew() {\n return (String) getAttributeInternal(SEASONNEW);\n }", "public String getBpoNew() {\n return (String) getAttributeInternal(BPONEW);\n }", "public static String solution() {\r\n\t\treturn \"73162890\";\r\n\t}", "public final TrajectoryInfo getSolution() { \n\t\treturn solution; \n\t}", "public java.lang.String getNewValues_description(){\n return localNewValues_description;\n }", "@Override\n public String getIsNew() {\n return \"0\";\n }", "public Boolean getIsNew() {\n return isNew;\n }", "@Override\n public double solutionWeight(){\n return solutionweight;\n }", "SolutionChange getPreviousChange();", "public String getSolveMethod() {\n return solveMethod;\n }", "public String getWashNew() {\n return (String) getAttributeInternal(WASHNEW);\n }", "public String getNewRuleContent() {\n return this.newRuleContent;\n }", "public java.lang.String getNewProperty_description(){\n return localNewProperty_description;\n }", "public SolutionType getBestSolution();", "public Integer getIsSuccessInSolving()\n/* */ {\n/* 207 */ return this.isSuccessInSolving;\n/* */ }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "public String getNewValue() {\n return this.newValue;\n }", "public String getSolvingMethodType()\n/* */ {\n/* 183 */ return this.solvingMethodType;\n/* */ }", "public String getNse_Idea() {\n\t\treturn nse_Idea;\n\t}", "public IProject getNewProject() {\r\n\t\treturn newProject;\r\n\t}", "public String getColorNew() {\n return (String) getAttributeInternal(COLORNEW);\n }", "public String getSureNewCnt() {\n return sureNewCnt;\n }", "public String getNewState() {\n\t\treturn this.newState;\n\t}", "public String getLatestConstraint() {\n return latest;\n }", "public java.lang.String getNewVersion() {\n java.lang.Object ref = newVersion_;\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 newVersion_ = s;\n return s;\n }\n }", "public java.lang.String getNewVersion() {\n java.lang.Object ref = newVersion_;\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 newVersion_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\n public final Boolean getIsNew() {\n return this.manufacture.getIsNew();\n }", "public int getNewValues_descriptionType(){\n return localNewValues_descriptionType;\n }", "public Solution() {\r\n\t\tsolutionStatus = \"Not successful.\";\r\n\t\tinputInterpretation = \"Not received.\";\r\n\t\tclassification = \"Not received.\";\r\n\t\tsolution = \"Not received.\";\r\n\t\terror = \"ERROR Occured.\";\r\n\t\tinputInterpretImgURL = \"\";\r\n\t\tsolutionImgURL = \"\";\r\n\t\tsolutionGraphURL = \"\";\r\n\t\tsolutionImg = null;\r\n\t\tsolutionGraphImg = null;\r\n\t}", "public int getNewValue() {\n\t\treturn newValue;\n\t}", "public int getNewValue() {\n\t\treturn newValue;\n\t}", "public Assignment getSolverAssignment_0() { return cSolverAssignment_0; }", "public int getSolutionLength() {\n\t\treturn this.solutionLength;\n\t}", "public int getNewProperty_descriptionType(){\n return localNewProperty_descriptionType;\n }", "public void setCompIsnew(Integer compIsnew) {\n this.compIsnew = compIsnew;\n }", "public double getWeightChangeGoal() {\n return weightChangeGoal;\n }", "public Integer newValue(){\n\t\treturn 0;\r\n\t}", "SolutionRef getStartSolution();", "@Override\n\tpublic String toString() {\n\t\treturn solution + \" [\" + CONF_FORMATTER.format(confidence) + \"%]\";\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn \"new\";\n\t}", "public String getCurrentTarget() {\r\n\t\treturn dbVersion.getTarget();\r\n\t}", "StrCommand getFeatureNew();", "public boolean isItNew() {\n\t\treturn false;\n\t}", "@Override\n\tpublic String getProblem() {\n\t\treturn \"Le circuit est vide\";\n\t}", "public boolean isNewEvaluationTime() {\r\n\t\treturn newEvaluationTime;\r\n\t}", "public Map<String, Double> getOriginalSolutionFitness() {\r\n\t\treturn this.originalSolutionFitness;\r\n\t}", "public String getVarimaxOption(){\n if(this. varimaxOption){\n return \"normal varimax option\";\n }\n else{\n return \"raw varimax option\";\n }\n }", "public boolean getNewSudoku(){\r\n\t\treturn newSudoku;\r\n\t}", "@Override\n\tpublic String getSolverExe() {\n\t\treturn model.getSolverExe();\n\t}", "public BigDecimal getAMOUNT_NEW() {\r\n return AMOUNT_NEW;\r\n }", "public String getWorkingCondition() {\r\n return workingCondition;\r\n }", "public String get(int index) {\n\n return solutionVector[index];\n }", "NFRSoftgoal createNFRSoftgoal();", "public int getSolutionCost(){\r\n if (this.path_solution.size()==0)\r\n return 0;\r\n return this.path_solution.get(this.path_solution.size()-1).getCost();\r\n }", "public TaskSolution getSolution(){\n return new TaskSolution(this.moveStack);\n }", "public void setIsNew(Integer isNew) {\n this.isNew = isNew;\n }", "public static int getAlterOutcome() {\r\n return alterOutcome;\r\n }", "protected double calculateSolutionValue(int[] solution){\n return tspProblem.calculateSolutionValue(solution);\n }", "public boolean isNew() {\n return _isNew;\n }", "public void setHelpingSolutionTypeValue(String helpingSolutionTypeValue)\n/* */ {\n/* 43 */ this.helpingSolutionTypeValue = helpingSolutionTypeValue;\n/* */ }", "public boolean isHasSolution() {\n return hasSolution;\n }", "public String getLabWork() {\r\n\t\treturn labWork;\r\n\t}", "SolutionRef getEndSolution();", "@Test\n public void testGetSolutionString() {\n System.out.println(\"getSolutionString\");\n VM instance = null;\n String expResult = \"\";\n String result = instance.getSolutionString();\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 }", "private Solution setSolution(ResultSet resultSet) throws SQLException {\n Solution s = new Solution();\n s.setId(resultSet.getInt(\"id\"));\n s.setCreated(resultSet.getString(\"created\"));\n s.setUpdated(resultSet.getString(\"updated\"));\n s.setDescription(resultSet.getString(\"description\"));\n s.setExercise_id(resultSet.getInt(\"exercise_id\"));\n s.setUser_id(resultSet.getInt(\"users_id\"));\n return s;\n }", "public int getProblemNumber() {\n return problemNumber;\n }", "public void setHelpingSolutionTypeName(String helpingSolutionTypeName)\n/* */ {\n/* 67 */ this.helpingSolutionTypeName = helpingSolutionTypeName;\n/* */ }", "public static int getNewY() {\n\t\treturn newY;\n\t}", "pb4server.UseSoliderAddAskReq getUseSoliderAddAskReq();", "public Solution(String solution) {\n\t\tthis(solution, \"unspecified\");\n\t}", "public NlsString getConstraint() {\n\tString syntax = getPnlEditor().getText();\n\n\tif ((syntax != null) && (syntax.length() > 0)) {\n\t\t// replace current value\n\t\tif (((ConstraintExpression)constraint.getBody()).getSyntax() == null) {\n\t\t\treturn new ch.ehi.basics.types.NlsString(syntax);\n\t\t} else {\n\t\t\treturn new ch.ehi.basics.types.NlsString(((ConstraintExpression)constraint.getBody()).getSyntax(), syntax);\n\t\t}\n\t} else {\n\t\treturn null;\n\t}\n}", "public String getStyleNew() {\n return (String) getAttributeInternal(STYLENEW);\n }", "public String getNewName()\n {\n return this.newName;\n }", "double getSolutionCost();", "@SuppressWarnings(\"restriction\")\n\tpublic boolean getNewValue() {\n\t\treturn invokeWithoutInvocationException(boolean.class, \"getNewValue\");\n\t}", "ValuationMethod getValuationMethod();", "public java.lang.String getOldValues_description(){\n return localOldValues_description;\n }", "public Map<String, Double> getOriginalSolutionWeightedFitness() {\r\n\t\treturn this.originalSolutionWeightedFitness;\r\n\t}", "public void setItNew(boolean itNew) {\n\t\t\n\t}", "public String getNewName() {\n return instance.getNewName();\n }", "@Override\n public Class<SolutionRecord> getRecordType() {\n return SolutionRecord.class;\n }", "public boolean isGameNew() {\n\t\treturn isGameNew;\n\t}", "public SolverDescription getSolverDescription() {\n\t\treturn fieldSolverDescription;\n\t}", "public String getVersionConstraint() {\n return version;\n }", "public int getOldValues_descriptionType(){\n return localOldValues_descriptionType;\n }", "public TaskState getNewTaskState(){\n\n TaskState newState = new TaskState();\n\n newState.graph = new DescGraph();\n newState.moveStack = new Stack<>();\n newState.hasSolution = false;\n newState.isNew = true;\n\n newState.moveStack.push(\n new HorseMove(newState.graph.getFirst())\n );\n\n return newState;\n\n }", "public S6Solution createNewSolution(S6Fragment n,S6Transform.Memo m)\n{\n double newscore = for_source.getScore() + scoreRandom();\n\n return new SolutionBase(base_node,current_node,n,transform_set,m,for_source,newscore);\n}" ]
[ "0.62106013", "0.59068996", "0.5747895", "0.57342714", "0.563367", "0.56222683", "0.5584531", "0.55774385", "0.5498902", "0.5485271", "0.5460819", "0.5459954", "0.54453844", "0.5377779", "0.53733176", "0.5371895", "0.5367857", "0.5283888", "0.5201238", "0.51768154", "0.5134977", "0.5119306", "0.5101986", "0.5093613", "0.50835717", "0.5076786", "0.5070935", "0.5068887", "0.50533795", "0.5044115", "0.5023909", "0.5003936", "0.49949503", "0.49740636", "0.49640137", "0.4952242", "0.4947202", "0.4930178", "0.49225885", "0.49220085", "0.49199376", "0.4918135", "0.49136984", "0.49136984", "0.49117643", "0.49045357", "0.486587", "0.48611534", "0.48569524", "0.4810421", "0.4772624", "0.47713736", "0.476113", "0.4758276", "0.47522658", "0.4741357", "0.47406715", "0.47324812", "0.47319955", "0.472105", "0.47147575", "0.47138467", "0.47007024", "0.46970764", "0.46965677", "0.46905115", "0.4689181", "0.46860522", "0.4683258", "0.46789953", "0.4678307", "0.46772298", "0.46764794", "0.4669364", "0.4663228", "0.46495643", "0.46475887", "0.46355373", "0.46354797", "0.46351805", "0.46296105", "0.46280167", "0.46243998", "0.46205145", "0.46144754", "0.46109307", "0.46084347", "0.4606726", "0.46057793", "0.45982787", "0.45892265", "0.45871592", "0.4575397", "0.45745873", "0.4574132", "0.45733222", "0.45701972", "0.45684963", "0.45648396", "0.45633265" ]
0.62725216
0
Returns the value of the 'Super Change' reference. If the meaning of the 'Super Change' reference isn't clear, there really should be more of a description here...
SolutionChange getSuperChange();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getSuper()\n {\n ensureLoaded();\n return (m_clzSuper == null ? (String) null : m_clzSuper.getValue());\n }", "public Double getChange();", "public abstract Value getReferenceValue();", "@javax.annotation.Nullable\n public String getChange() {\n return change;\n }", "public String getSubDiff() {\n this.subDif();\n return this.subdiff;\n }", "public java.lang.String getSuperCUGCodeProp()\n\t{\n\t\treturn superCUGCodeProp;\n\t}", "@Override\r\n\tpublic Ref getRef() {\n\t\treturn ref;\r\n\t}", "public java.lang.String getChangeOperation() {\r\n return changeOperation;\r\n }", "public Long getChangeNum() {\n return changeNum;\n }", "public int getChangeType() {\r\n return changeType;\r\n }", "public AgendaItem propChanger(PropChange change) {\n\treturn myHCrum.propChanger(change);\n/*\nudanax-top.st:9590:OrglRoot methodsFor: 'backfollow'!\n{AgendaItem} propChanger: change {PropChange}\n\t\"NOTE: The AgendaItem returned is not yet scheduled. Doing so is up to my caller.\"\n\t^myHCrum propChanger: change!\n*/\n}", "public java.lang.String getSuperCUGNameProp()\n\t{\n\t\treturn superCUGNameProp;\n\t}", "public double getxChange() {\n\t\treturn xChange;\n\t}", "public double getChange() \n\t{\n\t\treturn purchase.getPayment().getChange();\n\t}", "public ChangeDate getChangeDate() {\n return changeDate;\n }", "public ChangeDate getChangeDate() {\n return changeDate;\n }", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "java.lang.String getRef();", "public String getRef() {\n return ref;\n }", "public Double getChange(int in);", "public abstract double getReference();", "public abstract double getReference();", "public PriceChangeEdit getPriceChange()\n\t{\n\t\treturn priceChange;\n\t}", "public String getRef(){\r\n\t\treturn this.getAttribute(\"ref\").getValue();\r\n\t}", "public String getSuperEntityURI() {\r\n\t\treturn superEntityURI;\r\n\t}", "public java.lang.String getReference() {\n return reference;\n }", "@java.lang.Override\n public int getSuperEffectiveChargeAttacksUsed() {\n return superEffectiveChargeAttacksUsed_;\n }", "@java.lang.Override\n public int getSuperEffectiveChargeAttacksUsed() {\n return superEffectiveChargeAttacksUsed_;\n }", "public String getSupSelfSettle() {\n return supSelfSettle;\n }", "public String getReference() {\n return reference;\n }", "AttributeRaiseType getValueChange();", "public String getREFERENCE() {\r\n return REFERENCE;\r\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getReference1() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(REFERENCE1_PROP.get());\n }", "public String getOriginalReference() {\n return originalReference;\n }", "public ClassConstant getSuperClassConstant()\n {\n ensureLoaded();\n return m_clzSuper;\n }", "public Object getOldValue()\n {\n return oldValue;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getReference1() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(REFERENCE1_PROP.get());\n }", "public String getReference();", "public String getReference();", "public String getSub() {\n return sub;\n }", "public final String getReference() {\n return reference;\n }", "public void setSuperCUGCodeProp(java.lang.String superCUGCodeProp)\n\t{\n\t\tthis.superCUGCodeProp = superCUGCodeProp;\n\t}", "@Override\n\tpublic java.lang.String getChangePrice() {\n\t\treturn _lineaGastoCategoria.getChangePrice();\n\t}", "@NoProxy\n @NoWrap\n @NoDump\n public boolean getSignificantChange() {\n return significantChange;\n }", "public final long getChangeDateTime() {\n \treturn m_changeDate;\n }", "public String getReference() {\n return reference;\n }", "public String getReference() {\n return reference;\n }", "public String getReference() {\n return reference;\n }", "protected PropertyChangeSupport getPropertyChange() {\r\n\t\tif (propertyChange == null) {\r\n\t\t\tpropertyChange = new PropertyChangeSupport(this);\r\n\t\t}\r\n\t\t;\r\n\t\treturn propertyChange;\r\n\t}", "public void setSuper(String sSuper)\n {\n ensureLoaded();\n m_clzSuper = (sSuper == null ? (ClassConstant) null : new ClassConstant(sSuper));\n setModified(true);\n }", "public int getChanged () {\n int d = getDiff () * 2;\n int s = getSize () * 2;\n\n for (int i = 0; i < references.length; i++) {\n if (references[i] != null) {\n d += references[i].getDiff ();\n s += references[i].getSize ();\n }\n }\n \n // own cluster change is twice as much important than \n // those referenced\n int ret = d * 100 / s;\n if (ret == 0 && d > 0) {\n ret = 1;\n }\n return ret;\n }", "ChangeSet getChangeSet();", "public Object getNewValue()\n {\n return newValue;\n }", "@Override\n public String getReferenceInfo()\n {\n return \"\";\n }", "public java.lang.String getReference1() {\n return reference1;\n }", "protected java.beans.PropertyChangeSupport getPropertyChange() {\n\t\tif (propertyChange == null) {\n\t\t\tpropertyChange = new java.beans.PropertyChangeSupport(this);\n\t\t};\n\t\treturn propertyChange;\n\t}", "public long getStateChange() {\n return stateChange_;\n }", "public List<TypeReference> getSuperList() {\n\t\treturn superList;\n\t}", "public String getSuperClass() {\n\t\treturn superField.getText();\n\t}", "protected java.beans.PropertyChangeSupport getPropertyChange() {\r\n\tif (propertyChange == null) {\r\n\t\tpropertyChange = new java.beans.PropertyChangeSupport(this);\r\n\t};\r\n\treturn propertyChange;\r\n}", "public boolean getSuperscript() {\r\n return Superscript;\r\n }", "protected abstract String getRefName();", "public double getPercentChange() {\n return percentChange;\n }", "public Change() {\n // Required for WebServices to work. Comment added to please Sonar.\n }", "String getReference();", "String getReference();", "public String toString()\r\n {\n return super.getValue()+\" C\";\r\n }", "public java.lang.String getReference2() {\n return reference2;\n }", "public String getDif()\n {\n return difficult;\n }", "public int getChange() {\n\t\treturn player.getDay(0).calculateChangeFactor();\n\t\t\n\t}", "@Override\n\tpublic BigDecimal getSuperficie() {\n\t\treturn model.getSuperficie();\n\t}", "public java.lang.String getReference_Doc() {\r\n return reference_Doc;\r\n }", "public String getChangeAction()\r\n\t{\r\n\t\treturn changeAction;\r\n\t}", "public I getChangeInfo(int startSeqNum);", "SolutionChange getPreviousChange();", "public int getSuper(TypeReference type) {\n if (type == null) {\n throw new IllegalArgumentException(\"The argument type may not be null\");\n }\n\n int ssa;\n currentScope--;\n assert(currentScope >= 0 );\n ssa = getCurrent(type);\n currentScope++;\n return ssa;\n }", "public long getStateChange() {\n return stateChange_;\n }", "@Override\n \tpublic String getSource() {\n \t\tif (super.source != refSource) {\n \t\t\tif (refSource == null) {\n \t\t\t\trefSource = super.source;\n \t\t\t} else {\n \t\t\t\tsuper.source = refSource;\n \t\t\t}\n \t\t}\n \t\treturn refSource;\n \t}", "public String superToString() {\n\t\treturn super.toString();\n\t}", "public double getGregorianChange() {\n\t\treturn this.jdCO;\n\t}", "public String getLastChange() {\n return lastChange;\n }", "public String getRefType() {\n return refType;\n }", "public void setSuperCUGNameProp(java.lang.String superCUGNameProp)\n\t{\n\t\tthis.superCUGNameProp = superCUGNameProp;\n\t}", "public interface Change\n{\n String getDate();\n\n int getRevision();\n\n String getCommitLog();\n\n String getCommitter();\n}", "ElementChange getElementChange();", "public GHFrom getRef() {\n return ref;\n }", "public TreeNode getSuperRoot() {\n\t\treturn superRoot;\n\t}", "public String getSeRef() {\n return seRef;\n }", "public Company getChg() {return chgEntity;}", "int getVar() {\n\n return super.var; //Line n3. refer to its immediate parents variable of var\n }", "protected String getReplaceReferenceApplyToString(BioPortalReferenceData bpRefData, EntityData oldValue) {\n return UIUtil.getAppliedToTransactionString(\"Replaced reference for \" + getEntity().getBrowserText() +\n \" New reference: \" + bpRefData.getPreferredName() + \", code: \" + bpRefData.getConceptId(),\n getEntity().getName());\n }", "public void relationParentChanged(RelationInstance ri, int signal)\r\n\t{\n\r\n\t\tm_flags |= REFILL_FLAG;\r\n\t}", "@NotNull\n @JsonProperty(\"change\")\n public String getChange();", "@NotNull\n @JsonProperty(\"change\")\n public String getChange();", "@NotNull\n @JsonProperty(\"change\")\n public String getChange();", "@Override\n\t\tpublic void onChange(boolean selfChange) {\n\t\t\tsuper.onChange(selfChange);\n\t\t}", "public String getChangedflag() {\n return (String) getAttributeInternal(CHANGEDFLAG);\n }", "public String mo10346a() {\n return \"DeepLink.ChangeID\";\n }", "public Type getSuper() {\n\t\treturn superClass;\n\t}", "public String getSuperClass(){\n\t\treturn targetClass.superName;\n\t}" ]
[ "0.61467564", "0.61090994", "0.6002596", "0.59968483", "0.5966304", "0.5920382", "0.5891366", "0.5873704", "0.57500637", "0.57408845", "0.5722984", "0.56913865", "0.5650318", "0.5629618", "0.5588438", "0.5588438", "0.5575297", "0.5570999", "0.5555925", "0.5528744", "0.55107594", "0.55107594", "0.5504194", "0.5467651", "0.54660195", "0.5438133", "0.53670096", "0.53575885", "0.5357408", "0.535731", "0.53485", "0.53446424", "0.5344377", "0.53381747", "0.5332794", "0.53311586", "0.5328415", "0.5325894", "0.5325894", "0.53257567", "0.5323891", "0.5313644", "0.5308649", "0.53009254", "0.5289894", "0.528902", "0.528902", "0.528902", "0.52863413", "0.52855134", "0.52821225", "0.5274655", "0.52744585", "0.5274414", "0.5273801", "0.5271512", "0.5269961", "0.526253", "0.526249", "0.5260309", "0.52592313", "0.52584726", "0.5250182", "0.5243723", "0.5223882", "0.5223882", "0.5210809", "0.5209589", "0.5204711", "0.52029866", "0.5202946", "0.520219", "0.5198582", "0.5197559", "0.51974237", "0.5194659", "0.51830703", "0.51830405", "0.5178566", "0.5176206", "0.5169471", "0.5166899", "0.514161", "0.5123191", "0.511805", "0.511184", "0.51092595", "0.5103256", "0.50950634", "0.5091391", "0.50891", "0.50888413", "0.508436", "0.508436", "0.508436", "0.5068598", "0.5058973", "0.50580454", "0.505763", "0.50509715" ]
0.74620056
0
we don't get headers by default
@Test public void testHeaders() { AbstractMessage msg = new SimpleBasicMessage("my msg"); assertNotNull(msg.getHeaders()); assertTrue(msg.getHeaders().isEmpty()); // the headers are copied internally Map<String, String> headers = new HashMap<String, String>(); msg.setHeaders(headers); assertNotNull(msg.getHeaders()); assertTrue(msg.getHeaders().isEmpty()); assertNotSame(headers, msg.getHeaders()); // we can't change the headers via the map returned by the getter try { msg.getHeaders().put("not-allowed", "not-allowed"); assert false : "Should not have been allowed to modify the returned map"; } catch (UnsupportedOperationException expected) { // expected } // show that the setter completely replaces the old headers assertEquals(0, msg.getHeaders().size()); headers.put("one", "111"); headers.put("two", "222"); msg.setHeaders(headers); assertEquals(2, msg.getHeaders().size()); assertEquals("111", msg.getHeaders().get("one")); assertEquals("222", msg.getHeaders().get("two")); headers.clear(); assertEquals("Clearing our map should not have affected the msg internal map", 2, msg.getHeaders().size()); headers.put("foo", "bar"); msg.setHeaders(headers); assertEquals(1, msg.getHeaders().size()); assertEquals("bar", msg.getHeaders().get("foo")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Headers getHeaders();", "RequestHeaders headers();", "default boolean hasHeader() {\n return true;\n }", "public abstract HttpHeaders headers();", "String getResponseHeader();", "Map<String, String> getHeaders();", "Map<String, List<String>> getHeaders();", "public Header[] getRequestHeaders();", "public interface HttpResponseHeaders {\n\n /**\n * Http status code\n */\n int statusCode();\n\n /**\n * all commons headers(exclude request line)\n */\n List<Header> headers();\n}", "private Map<String, String> getDefaultAdditionalHeader() {\n Map<String, String> additionalHeader = new HashMap<>();\n additionalHeader.put(\"accept-encoding \", \"gzip, deflate, sdch\");\n additionalHeader.put(\"Referer\", referer);\n additionalHeader.put(\"Upgrade-Insecure-Requests\", \"1\");\n return additionalHeader;\n }", "public ListIterator getHeaders()\n { return headers.listIterator(); }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n return httpClientRequest.getHeaders();\n }", "@Test\n\tprivate void get_all_headers() {\n\t\tRestAssured.baseURI = \"https://reqres.in\";\n\t\tRequestSpecification httpRequest = RestAssured.given();\n\t\tResponse response = httpRequest.request(Method.GET, \"/api/users?page=2\");\n\t\tHeaders headers = response.getHeaders();\n\t\tfor (Header header : headers) {\n\t\t\tSystem.out.println(header.getName() + \" \\t : \" + header.getValue());\n\t\t}\n\t}", "@Override\n\tpublic Collection<String> getHeaders(String name) {\n\t\treturn null;\n\t}", "@Override\n\t\tpublic String getHeader(String name) {\n\t\t\treturn null;\n\t\t}", "default boolean visitHeader() {\n\t\treturn true;\n\t}", "Map<String, String> getRequestHeaders();", "@Override\n public StreamHeader getHeader() throws Exception {\n return header;\n }", "private HttpHeaders getHeaders() {\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));\n\t\treturn headers;\n\t}", "protected Map<String, String> getRequiredResponseHeaders()\n {\n if (requiredHttpHeaders != null)\n {\n return requiredHttpHeaders;\n }\n if (scimHttpClient.getScimClientConfig().getExpectedHttpResponseHeaders() != null)\n {\n return scimHttpClient.getScimClientConfig().getExpectedHttpResponseHeaders();\n }\n Map<String, String> requiredHttpHeaders = new HashMap<>();\n requiredHttpHeaders.put(HttpHeader.CONTENT_TYPE_HEADER, HttpHeader.SCIM_CONTENT_TYPE);\n return requiredHttpHeaders;\n }", "public String[] getParticularResponseHeaders() {\n return null;\n }", "@Override public Map<String, String> getHeaders() {\n return Collections.unmodifiableMap(headers);\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headers = new HashMap<>();\n headers.put(\"User-Agent\", \"MyTestApp\");\n return headers;\n }", "public HttpHeaders getHeaders()\r\n/* 63: */ {\r\n/* 64: 93 */ if (this.headers == null)\r\n/* 65: */ {\r\n/* 66: 94 */ this.headers = new HttpHeaders();\r\n/* 67: */ Enumeration headerValues;\r\n/* 68: 95 */ for (Enumeration headerNames = this.servletRequest.getHeaderNames(); headerNames.hasMoreElements(); \r\n/* 69: 98 */ headerValues.hasMoreElements())\r\n/* 70: */ {\r\n/* 71: 96 */ String headerName = (String)headerNames.nextElement();\r\n/* 72: 97 */ headerValues = this.servletRequest.getHeaders(headerName);\r\n/* 73: 98 */ continue;\r\n/* 74: 99 */ String headerValue = (String)headerValues.nextElement();\r\n/* 75:100 */ this.headers.add(headerName, headerValue);\r\n/* 76: */ }\r\n/* 77: */ }\r\n/* 78:104 */ return this.headers;\r\n/* 79: */ }", "@Override\n public String getHeader(String name) {\n if (name.equalsIgnoreCase(\"Authorization\")) {\n return getAuthorizationHeader();\n } else {\n return super.getHeader(name);\n }\n }", "void doHead(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n return (mHeaders != null && mHeaders.size() > 3) ? mHeaders : NetworkUtils.this.getHeaders();\n }", "@Override\n public Enumeration<String> getHeaders(String name) {\n if (name.equalsIgnoreCase(\"Authorization\")) {\n return Collections.enumeration(Arrays.asList(getHeader(name)));\n } else {\n return super.getHeaders(name);\n }\n }", "@Override\n\tpublic Collection<String> getHeaderNames() {\n\t\treturn null;\n\t}", "@Test\n public void getWitheaders(){\n with().accept(ContentType.JSON)\n .when().get(\"http://34.223.219.142:1212/ords/hr/countries/US\")\n .then().statusCode(200);\n }", "private Header[] requestHeadMaker() {\n\t\tHeader[] header = {\n\t\t\t\tnew BasicHeader(\"User-Agent\", \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36\")\n\t\t\t\t//new BasicHeader(HttpHeaders.USER_AGENT, \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36\")\n\t\t\t, new BasicHeader(\"Accpet-Language\", \"ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7,ja;q=0.6\")\n\t\t\t, new BasicHeader(\"Accept-Charset\", \"application/x-www-form-urlencoded; charset=UTF-8\")\n\t\t\t, new BasicHeader(\"Origin\", \"https://developer.riotgames.com\")\n\t\t\t, //new BasicHeader(\"X-Riot-Token\", riotApiKey)\n\t\t};\n\t\treturn header;\n\t}", "HttpRequest(){\n HttpHeader.getInstance().loadHeaderList(\"src/main/resources/headerList.txt\");\n }", "public void testResponseHeaders() {\n\t\tResponse response = get(\"http://jsonplaceholder.typicode.com/photos\");\n\t\t\n\t\t//to get a single header\n\t\tString headerCFRAY = response.getHeader(\"CF-Ray\");\n\t\tSystem.out.println(\">>>>>>Header: \"+headerCFRAY);\n\t\t\n\t\tSystem.out.println(\"\");\n\t\t\n\t\t//to get all header\n\t\tHeaders headers = response.getHeaders();\n\t\tfor(Header h: headers) {\n\t\t\tSystem.out.println(h.getName()+\":\"+h.getValue());\n\t\t}\n\t}", "public Headers getHeaders() {\n if (headers == null) {\n headers = new DefaultHeaders();\n }\n return headers;\n }", "@Test(priority=5)\r\n\tpublic void validateHeader()\r\n\t{\r\n\t\tgiven()\r\n\t\t.get(\"https://reqres.in/api/users/2\")\r\n\t\t.then() \r\n\t \t.header(\"Content-Type\", containsString(\"application/json\")); \r\n\t\t//application/json; charset=utf-8 \r\n\t}", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n return authenticator.getVolleyHttpHeaders();\n }", "@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"content-type\", \"application/json\");\n params.put(\"cache-control\", \"no-cache\");\n\n return params;\n }", "@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"content-type\", \"application/json\");\n params.put(\"cache-control\", \"no-cache\");\n\n return params;\n }", "protected ResponseHeader getHeader() {\n return this.header;\n }", "@Override\n public Map<String, String> getHeaders() {\n HashMap<String, String> headers = new HashMap<>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }", "@Override\n public Map<String, String> getHeaders() {\n HashMap<String, String> headers = new HashMap<>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }", "@Override\n public Map<String, String> getHeaders() {\n HashMap<String, String> headers = new HashMap<>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }", "public HttpResponseHeaders getHeaders() {\n return mHeaders;\n }", "@Test\n\tpublic void verifyHeader() {\n\t\t\tHeaders head = response.getHeaders();\n\t\t\tAssert.assertEquals(head.getValues(\"Content-Type\").toString(), \"[application/json; charset=utf-8]\");\n\t\t}", "public Map<String, List<String>> getHeaders(){\n if (this.mResponseHeaders == null){\n this.mResponseHeaders = mConnection.getHeaderFields();\n }\n return this.mResponseHeaders;\n }", "@Override\r\n\tpublic Set<QName> getHeaders() {\r\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic Set<QName> getHeaders() {\r\n\t\treturn null;\r\n\t}", "public List<String> getHeaders() {\n try {\n return load().getHeaderNames();\n } catch (IOException ex) {\n Logger.getLogger(IntelligentSystem.class.getName()).log(Level.SEVERE, null, ex);\n }\n return Collections.EMPTY_LIST;\n }", "public HashMap<String, String> getHeader() {\n HashMap<String, String> header = new HashMap<String, String>();\n//\t\theader.put(\"Content-Type\", pref.getString(\"application/json\", \"application/json\"));\n /*header.put(\"authId\", pref.getString(KEY_USER_ID, KEY_USER_ID));\n header.put(\"authToken\", pref.getString(KEY_AUTH_TOKEN, KEY_AUTH_TOKEN));*/\n\n\n header.put(\"authId\", pref.getString(KEY_USER_ID, \"1\"));\n header.put(\"authToken\", pref.getString(KEY_AUTH_TOKEN, \"s4nbp5FibJpfEY9q\"));\n\n return header;\n }", "@Test\n public void testGetHeaders_whenServletRequestNoContainsHeaders() {\n\n MockHttpServletRequest request = new MockHttpServletRequest();\n Map<String, List<String>> expResult = new HashMap<>();\n\n HeadersService instance = new HeadersService();\n Map<String, List<String>> result = instance.getHeaders(request);\n assertEquals(expResult, result);\n }", "List<Header> headers();", "private void mimicSunRequestHeaders() {\n if (!isHeaderSet(method.getRequestHeader(\"Accept\"))) {\n setRequestProperty(\"Accept\", acceptHeader);\n }\n if (!isHeaderSet(method.getRequestHeader(\"Connection\"))) {\n setRequestProperty(\"Connection\", \"keep-alive\");\n }\n }", "@Override\n\t\tpublic Enumeration getHeaders(String name) {\n\t\t\treturn null;\n\t\t}", "private HashMap<String, String> getHeaders() {\n mHeaders = new HashMap<>();\n // set user'token if user token is not set\n if ((this.mToken == null || this.mToken.isEmpty()) && mProfile != null)\n this.mToken = mProfile.getToken();\n\n if (this.mToken != null && !this.mToken.isEmpty()) {\n mHeaders.put(\"Authorization\", \"Token \" + this.mToken);\n Log.e(\"TOKEN\", mToken);\n }\n\n mHeaders.put(\"Content-Type\", \"application/form-data\");\n mHeaders.put(\"Accept\", \"application/json\");\n return mHeaders;\n }", "public Vector<YANG_Header> getHeaders() {\n\t\treturn headers;\n\t}", "@Override\n\t\t\tpublic Map<String, String> getHeaders() throws AuthFailureError {\n\t\t\t\tHashMap<String, String> headers = new HashMap<String, String>();\n\t\t\t\theaders.put(\"Content-Type\", \"application/json;charset=UTF-8\");\n\t\t\t\treturn headers;\n\t\t\t}", "public MultiMap getHeaders() {\n return headers;\n }", "com.didiyun.base.v1.Header getHeader();", "@Override\n\tpublic Map<String, String> getHeader() {\n\t\treturn this.header;\n\t}", "private HeaderUtil() {}", "@Override\n public Collection<String> getRestHeaders() {\n return Arrays.asList(KerberosRealm.AUTHENTICATION_HEADER, KrbConstants.WWW_AUTHENTICATE );\n }", "public String getHeader();", "public Map<String, String> headers() {\n return this.header.headers();\n }", "private boolean inspectHeader() throws UrlCacheException {\n\n\t\tif(header.contains(\"HTTP/1.1 2\")){\n\t\t\treturn true;\n\t\t}\n\t\telse if(header.contains(\"HTTP/1.1 304\"))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tthrow new UrlCacheException();\n\t\t\n\t}", "public VersionedMap getHeaders ()\n {\n return headers;\n }", "public Map getHeaders() {\r\n if (headers == null) {\r\n headers = new HashMap();\r\n }\r\n\r\n return headers;\r\n }", "public Set<String> getHeaderNames() {\n return headers.keySet();\n }", "@Override\n public boolean containsHeader(String arg0) {\n return false;\n }", "public String getResponseHeader(String key)\n\t{\n\t\treturn this.responseHeader.getOrDefault(key, \"\");\n\t}", "public boolean hasReqHeaders() {\n return fieldSetFlags()[5];\n }", "private HttpHeaders getHeaders(String contentType) {\n HttpHeaders httpHeaders = new HttpHeaders();\n httpHeaders.set(WebConstants.CONTENT_TYPE, WebConstants.TEXT_PLAIN_UTF8);\n return httpHeaders;\n }", "public Header[] getRequestHeaders() {\n return getRequestHeaderGroup().getAllHeaders();\n }", "@Override\n public Enumeration<String> getHeaderNames() {\n List<String> names = new ArrayList<String>();\n names.addAll(Collections.list(super.getHeaderNames()));\n names.add(\"Authorization\");\n return Collections.enumeration(names);\n }", "public Enumeration getAllHeaders() throws MessagingException {\n/* 451 */ if (this.headers == null)\n/* 452 */ loadHeaders(); \n/* 453 */ return this.headers.getAllHeaders();\n/* */ }", "@Override\n public String getHeaderField(String name) {\n return jarUrlConnection.getHeaderField(name);\n }", "static Headers readHeaders(InputStream in) throws IOException {\n\t\tHeaders headers = new Headers();\n\t\tString line;\n\t\twhile (!(line = readLine(in, false)).isEmpty()) {\n\t\t\tString[] parts = line.split(\":\", 2);\n\t\t\tif (parts.length != 2) {\n\t\t\t\tthrow new WebException(StatusCode.BAD_REQUEST, \"invalid request header: \" + line);\n\t\t\t}\n\t\t\theaders.add(parts[0], parts[1].trim());\n\t\t}\n\t\treturn headers;\n\t}", "abstract boolean ignoreContentLength();", "@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\", \"application/json\"); // header format wysłanej wiadomości - JSON\n params.put(\"Accept\", \"application/json\"); // header format otrzymanej wiadomości -JSON\n params.put(\"Consumer\", C.HEDDER_CUSTOMER); // header Consumer\n params.put(\"Authorization\", C.HEDDER_BEARER + shar.getString(C.KEY_FOR_SHAR_TOKEN, \"\")); // header Authorization\n return params;\n }", "@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\", \"application/json\"); // header format wysłanej wiadomości - JSON\n params.put(\"Accept\", \"application/json\"); // header format otrzymanej wiadomości -JSON\n params.put(\"Consumer\", C.HEDDER_CUSTOMER); // header Consumer\n params.put(\"Authorization\", C.HEDDER_BEARER + shar.getString(C.KEY_FOR_SHAR_TOKEN, \"\")); // header Authorization\n return params;\n }", "boolean hasHeader();", "java.lang.String getHeader();", "public static Header[] getAllResponseHeaders(URL url) throws Exception {\n HttpClient httpClient = new DefaultHttpClient();\n HttpHead httpHead = new HttpHead(url.toString());\n HttpResponse response = httpClient.execute(httpHead);\n return response.getAllHeaders();\n }", "private Thing headers(String methodName, Thing[] args, Evaller evaller,\n\t\t\tFramelike frame, Syntax src) throws FisherException {\n\t\tcheckNumberOfArgs(0, 1, methodName, args, evaller, frame, src);\n\t\tif(args.length == 0)\n\t\t\treturn http.getHeaders();\n\t\telse{\n\t\t\t// FIXME: how much checking of args?\n\t\t\tcheckArg(args[0], RecordTh.class, null);\n\t\t\treturn http.setHeaders((RecordTh)args[0]);\n\t\t\t}\n\t}", "public abstract String header();", "@Override\n\tprotected void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doOptions(req, resp);\n\t\tH5Utils.setHeaders(resp);\n\t}", "@Override\n\tprotected void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doOptions(req, resp);\n\t\tH5Utils.setHeaders(resp);\n\t}", "public String getRequestHeader(String key)\n\t{\n\t\treturn this.requestHeader.getOrDefault(key, \"\");\n\t}", "protected static HttpHeaders getJsonHeaders(){ \n HttpHeaders headers = new HttpHeaders();\n headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));\n headers.setContentType(MediaType.APPLICATION_JSON);\n return headers;\n }", "private HttpHeaders getHttpHeaders()\r\n\t{\n HttpHeaders lHttpHeaders = new HttpHeaders();\r\n lHttpHeaders.setContentType(MediaType.APPLICATION_JSON);\r\n lHttpHeaders.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON));\r\n // set basic authorization with api key and its value\r\n lHttpHeaders.setBasicAuth( PaymentConstant.API_KEY_ID, PaymentConstant.API_KEY_PASSWORD );\r\n return lHttpHeaders;\r\n\t}", "@Override\n protected com.squareup.okhttp.Request.Builder universal_header(com.squareup.okhttp.Request.Builder chain) {\n chain.addHeader(\"Accept\", \"*/*\");\n chain.addHeader(\"Accept-Language\", \"zh-TW,zh;q=0.8,en-US;q=0.6,en;q=0.4,zh-CN;q=0.2\");\n chain.addHeader(\"Content-Type\", \"text/html; charset=utf-8\");\n chain.addHeader(\"User-Agent\", \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36\");\n return super.universal_header(chain);\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError\n {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError\n {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }", "@Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json\");\n return headers;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json\");\n return headers;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json\");\n return headers;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json\");\n return headers;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json\");\n return headers;\n }", "protected void addDynamicHeaders() {\n }", "@Test\n public void testNoIfModifiedSinceHeader() throws Exception\n {\n HttpAction<HttpGet> first = get(\"/test.txt\");\n assertEquals(200, first.getResponse().getStatusLine().getStatusCode());\n assertEquals(\"SOMETHING\", first.getResponseContent());\n }", "public void flushHeader() {\r\n\t\t//resetBuffer();\r\n\t\tif (sc_status == 0) {\r\n\t\t\tsetStatus(200);\r\n\t\t}\r\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"EEE, dd MMM yyyy HH:mm:ss z\", Locale.US);\r\n\t\tdateFormat.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\r\n StringBuffer headerVal = new StringBuffer();\r\n headerVal.append(request.getProtocol() + \" \" + sc_status + \" \" + HttpResponse.getStatusMessage(sc_status) + \"\\r\\n\");\r\n// System.out.println(\"1st line:\" + headerVal.toString());\r\n headerVal.append(\"Date: \" + dateFormat.format(new Date()) + \"\\r\\n\");\r\n for (String headerName : headersMap.keySet()) {\r\n headerVal.append(headerName + \": \" + headersMap.get(headerName).get(0) + \"\\r\\n\");\r\n }\r\n //System.out.println(\"IF request.hasSession? \" + request.hasSession());\r\n if (request.hasSession() && request.getSession().isNew()) {\r\n \tServletEngine.deleteInvalidatedSession();\r\n \tHttpServletSessionM sessionM = (HttpServletSessionM) request.getSession(false);\r\n \tCookie sessionCookie = new Cookie(\"sessionId\", sessionM.getId());\r\n \t\r\n \t//HttpSession calExpireTime = request.getSession(false);\r\n \tint maxAge = (int) ((sessionM.getLastAccessedTime() - new Date().getTime())/1000 + sessionM.getMaxInactiveInterval());\r\n \t//maxAge = maxAge/1000;\r\n \tsessionCookie.setMaxAge(maxAge*60);\r\n// \tif (!sessionM.isValid()) {\r\n// \t\tSystem.out.println(\"Here the session is invaid\");\r\n// \t\tsessionCookie.setMaxAge(0);\r\n// \t}\r\n \theaderVal.append(\"Set-Cookie: \").append(getCookieInfo(sessionCookie)).append(\"\\r\\n\");\r\n }\r\n if (cookies.size() > 0) {\r\n \tfor (Cookie cur : cookies) {\r\n \t\theaderVal.append(\"Set-Cookie: \").append(getCookieInfo(cur)).append(\"\\r\\n\");\r\n \t}\r\n }\r\n \r\n headerVal.append(\"Content-Length: \" + buffer.getContentLength() + \"\\r\\n\");\r\n //System.out.println(\"buffer.getContentLength:\" + buffer.getContentLength());\r\n headerVal.append(\"Content-Type: \" + contentType + \"\\r\\n\");\r\n headerVal.append(\"Content-Encoding: \" + encoding + \"\\r\\n\");\r\n headerVal.append(\"Connection: close\\r\\n\\r\\n\");\r\n //System.out.println(headerVal.toString());\r\n try {\r\n\t\t\tout.write(headerVal.toString().getBytes());\r\n\t\t\tout.flush();\r\n\t\t\tisCommitted = true;\r\n\t\t\t//System.out.println(\"flushed \");\r\n\t\t} catch (IOException e) {\r\n\t\t\tLogRecorder.addErrorMessage(e, \"cannot write or flush\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}" ]
[ "0.77503145", "0.73040724", "0.71964777", "0.71259236", "0.6910975", "0.6831426", "0.6650055", "0.6564367", "0.6549091", "0.6530811", "0.6516173", "0.65118057", "0.6489585", "0.64760184", "0.646634", "0.6464429", "0.6446093", "0.64436424", "0.644208", "0.643863", "0.64296395", "0.6427828", "0.6321788", "0.6306637", "0.6289279", "0.6286711", "0.6264771", "0.62635756", "0.6249843", "0.6233234", "0.62322307", "0.6230437", "0.6227548", "0.622626", "0.62184", "0.62014616", "0.61979765", "0.61979765", "0.61875063", "0.6181059", "0.6181059", "0.6181059", "0.6147688", "0.61472124", "0.6146386", "0.6144347", "0.6144347", "0.6142593", "0.6121198", "0.6107763", "0.61067945", "0.61054015", "0.6096605", "0.6065067", "0.6058558", "0.6044521", "0.6038652", "0.60372233", "0.6013091", "0.60097975", "0.59998196", "0.599052", "0.5986948", "0.5984003", "0.5983596", "0.5949516", "0.5949404", "0.59482425", "0.59433633", "0.5930609", "0.5924945", "0.5914334", "0.5912905", "0.5905533", "0.5904147", "0.5893784", "0.587809", "0.5877473", "0.5877473", "0.58714974", "0.58668673", "0.58641016", "0.5853855", "0.58538496", "0.58533347", "0.58533347", "0.5850118", "0.58458", "0.58408636", "0.58406186", "0.58369577", "0.58369577", "0.58343804", "0.58332324", "0.58332324", "0.58332324", "0.58332324", "0.58332324", "0.5825798", "0.5825631", "0.58239" ]
0.0
-1
tests a minimal basic record with no details
@Test public void simpleConversion() { SimpleBasicMessage arec = new SimpleBasicMessage("my msg"); String json = arec.toJSON(); System.out.println(json); assertNotNull("missing JSON", json); SimpleBasicMessage arec2 = AbstractMessage.fromJSON(json, SimpleBasicMessage.class); assertNotNull("JSON conversion failed", arec2); assertNotSame(arec, arec2); assertEquals(arec.getMessage(), arec2.getMessage()); assertEquals(arec.getDetails(), arec2.getDetails()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void recordTypeTest() {\n // TODO: test recordType\n }", "@Test\r\n\tpublic void testGetRecords() {\r\n\t\tAssert.assertNull(oic.getRecords(\"a\"));\r\n\r\n\t\tList<ObstetricsInit> list;\r\n\t\ttry {\r\n\t\t\tlist = oiData.getRecords(1);\r\n\t\t\tAssert.assertEquals(list, oic.getRecords(\"1\"));\r\n\t\t} catch (DBException e) {\r\n\t\t\tAssert.fail(e.getMessage());\r\n\t\t}\r\n\t\t\r\n\t\t//TODO: Maybe test sorting\r\n\t}", "@org.junit.Test\n\tpublic void test() {\n\t\tassertEquals(\"\", crud.read());\n\t}", "public RecordRecord() {\n\t\tsuper(org.jooq.examples.cubrid.demodb.tables.Record.RECORD);\n\t}", "@Override\n\tpublic void test00500Add_Validate_ExistingRecord() throws Exception\n\t{\n\t}", "@Test\n\tpublic void checkIfThereIsRecords() {\n\n\t\tfinal HandlingRecords handlingRecords = new HandlingRecords(entityManagerFactory.createEntityManager());\n\n\t\t// there should be a least 3 because of the import of data.\n\t\tfinal List<Record> sampleOfEntities = handlingRecords.findASampleOfEntities(3);\n\n\t\tassertTrue(sampleOfEntities != null && sampleOfEntities.size() == 3);\n\n\t}", "@Test\r\n public void testCreate() {\r\n ActivityRecord record = setActivityRecord();\r\n recordDao.create(record);\r\n assertNotNull(record.getId());\r\n }", "@Test\n public void testAddRecord() throws Exception {\n // Save pat1\n pat1.save();\n\n // pat1 should start with no records\n assert (pat1.getHealthRecords().length == 0);\n\n // Add one health record\n HealthRecordController.getInstance().addRecord(pat1.getPatientID(), new Date(), 1, 1, 1, 1);\n assert (pat1.getHealthRecords().length == 1);\n\n // Add another health record\n HealthRecordController.getInstance().addRecord(pat1.getPatientID(), new Date(), 2, 2, 2, 2);\n assert (pat1.getHealthRecords().length == 2);\n\n // Delete them both\n HealthRecord[] hrs = HealthRecordController.getInstance().getRecordsForPatient(pat1.getPatientID());\n for (HealthRecord hr : hrs) {\n hr.delete();\n }\n\n // Now this patient should have no HealthRecords\n assert (pat1.getHealthRecords().length == 0);\n }", "@Test\n void getNoteByIdSuccess() {\n Note retrievedNote = (Note) noteDao.getById(1);\n assertEquals(1, retrievedNote.getId());\n assertEquals(\"Amari Rodgers\", retrievedNote.getProspect());\n }", "@Test\r\n\tvoid testImportSingleRowShouldReturnFalseIfUnsuccessful() {\r\n\t\tRecordParser parser = new RecordParser();\r\n\t\tassertFalse(parser.importSingleRecord(\"This is a row of bad data. There's too much and nothing useful!\"));\r\n\t}", "@Test\n\tpublic void testNoData() {\n\t\tvar supplierId = \"1\";\n\t\tvar resp = summaryRepo.findById(supplierId);\n\t\tassertFalse(resp.isPresent());\n\t}", "@Test\r\n\tpublic void testAddObstetricsRecord() {\r\n\t\t\r\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyy-MM-dd\");\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\tc.add(Calendar.MONTH, -1);\r\n\t\tString lmp = dateFormat.format(c.getTime());\t\r\n\t\t\r\n\t\toic.setLmp(lmp);\r\n\t\t\r\n\t\toic.setMultiplicity(\"1\");\r\n\t\tAssert.assertTrue(oic.getMultiplicity().equals(\"1\"));\r\n\t\toic.addObstetricsRecord();\r\n\t\t//LMP wasn't cleared, therefore it errored\r\n\t\tAssert.assertTrue(oic.getLmp().equals(lmp));\r\n\t\t\r\n\t\toic.setWeightGain(\"1\");\r\n\t\tAssert.assertTrue(oic.getWeightGain().equals(\"1\"));\r\n\t\toic.addObstetricsRecord();\r\n\t\t//LMP wasn't cleared, therefore it errored\r\n\t\tAssert.assertTrue(oic.getLmp().equals(lmp));\r\n\t\t\r\n\t\toic.setNumHoursInLabor(\"1\");\r\n\t\tAssert.assertTrue(oic.getNumHoursInLabor().equals(\"1\"));\r\n\t\toic.addObstetricsRecord();\r\n\t\t//LMP wasn't cleared, therefore it errored\r\n\t\tAssert.assertTrue(oic.getLmp().equals(lmp));\r\n\t\t\r\n\t\toic.setNumWeeksPregnant(\"39\");\r\n\t\tAssert.assertTrue(oic.getNumWeeksPregnant().equals(\"39\"));\r\n\t\toic.addObstetricsRecord();\r\n\t\t//LMP wasn't cleared, therefore it errored\r\n\t\tAssert.assertTrue(oic.getLmp().equals(lmp));\r\n\t\t\r\n\t\toic.setYearOfConception(\"2005\");\r\n\t\tAssert.assertTrue(oic.getYearOfConception().equals(\"2005\"));\r\n\t\toic.addObstetricsRecord();\r\n\t\t//LMP wasn't cleared, therefore it errored\r\n\t\tAssert.assertTrue(oic.getLmp().equals(lmp));\r\n\t\t\r\n\t\toic.setDeliveryType(\"Vaginal Delivery\");\t\t\r\n\t\toic.addPregnancyRecord();\r\n\t\t\r\n\t\toic.setYearOfConception(null);\r\n\t\toic.setNumWeeksPregnant(null);\r\n\t\toic.setNumHoursInLabor(null);\r\n\t\toic.setWeightGain(null);\r\n\t\toic.setMultiplicity(null);\r\n\t\toic.setLmp(\"\");\r\n\t\toic.addObstetricsRecord();\r\n\t\tAssert.assertTrue(oic.getLmp().equals(\"\"));\r\n\t\t\r\n\t\toic.setLmp(null);\r\n\t\toic.addObstetricsRecord();\r\n\t\tAssert.assertTrue(oic.getLmp() == null);\r\n\t\t\r\n\t\toic.setLmp(\"a\");\r\n\t\toic.addObstetricsRecord();\r\n\t\tAssert.assertTrue(oic.getLmp().equals(\"a\"));\r\n\t\t\r\n\t\toic.setLmp(lmp);\r\n\t\toic.addObstetricsRecord();\r\n\t\tAssert.assertTrue(oic.getLmp().equals(\"\"));\r\n\t}", "@Test\r\n\tvoid testImportSingleRecordShouldCreateAPersonAndReturnTrue() {\r\n\t\tRecordParser parser = new RecordParser();\r\n\t\tassertTrue(parser.importSingleRecord(\"Cruise | Tom | Male | Green | 1962-07-03\"));\r\n\t\tassertEquals(1, parser.getPeople().size());\r\n\t}", "public UsertestRecord() {\n super(Usertest.USERTEST);\n }", "@Test\n public void testCreateAndReadPositive() throws Exception{\n Item item = new Item();\n item.setName(\"item\");\n item.setType(ItemTypes.ALCOHOLIC_BEVERAGE);\n itemDao.create(item);\n Assert.assertNotNull(itemDao.read(item.getName()));\n }", "@Test\n\tpublic void testFetchResult_with_proper_data() {\n\t}", "@Test\n public void getAllRecordsTest() {\n FileMetaData fileMetaData = new FileMetaData();\n fileMetaData.setAuthorName(\"Puneet\");\n fileMetaData.setFileName(\"resum2\");\n fileMetaData.setDescription(\"Attached resume to test upload\");\n fileMetaData.setUploadTimeStamp(DateUtil.getCurrentDate());\n fileMetaDataRepository.saveAndFlush(fileMetaData);\n fileMetaData = new FileMetaData();\n fileMetaData.setAuthorName(\"Puneet1\");\n fileMetaData.setFileName(\"resume3\");\n fileMetaData.setDescription(\"Attached resume to test upload1\");\n fileMetaData.setUploadTimeStamp(DateUtil.getCurrentDate());\n fileMetaDataRepository.saveAndFlush(fileMetaData);\n List<FileMetaData> fileMetaDataList = fileMetaDataRepository.findAll();\n Assert.assertNotNull(fileMetaDataList);\n //Assert.assertEquals(2, fileMetaDataList.size());\n }", "public abstract boolean record();", "@Test\n\tpublic void testRecordSelect() throws Exception {\n\t\tfinal String module = \"-------------- MODULE Testing ----------------\\n\"\n\t\t\t\t+ \"ASSUME [a |-> 1, b |-> TRUE].a = 1 \\n\"\n\t\t\t\t+ \"=================================\";\n\n\t\tfinal String expected = \"MACHINE Testing\\n\"\n\t\t\t\t+ \"PROPERTIES rec(a : 1, b : TRUE)'a = 1\\n\"\n\t\t\t\t+ \"END\";\n\t\tcompare(expected, module);\n\t}", "public PersonRecord() {}", "public TestSmallBenchmarkObjectRecord() {\n\t\tsuper(org.sfm.jooq.beans.tables.TestSmallBenchmarkObject.TEST_SMALL_BENCHMARK_OBJECT);\n\t}", "@Test\r\n\tpublic void testAddPregnancyRecord() {\r\n\t\t\r\n\t\toic.addPregnancyRecord();\r\n\t\tAssert.assertTrue(oic.getDisplayedPregnancies().isEmpty());\r\n\t\t\r\n\t\toic.setMultiplicity(\"2\");\r\n\t\toic.addPregnancyRecord();\r\n\t\tAssert.assertTrue(oic.getDisplayedPregnancies().isEmpty());\r\n\t\t\r\n\t\toic.setWeightGain(\"12.5\");\r\n\t\toic.addPregnancyRecord();\r\n\t\tAssert.assertTrue(oic.getDisplayedPregnancies().isEmpty());\r\n\t\t\r\n\t\toic.setNumHoursInLabor(\"-1\");\r\n\t\toic.addPregnancyRecord();\r\n\t\tAssert.assertTrue(oic.getDisplayedPregnancies().isEmpty());\r\n\t\t\r\n\t\toic.setNumWeeksPregnant(\"39\");\r\n\t\toic.addPregnancyRecord();\r\n\t\tAssert.assertTrue(oic.getDisplayedPregnancies().isEmpty());\r\n\t\t\r\n\t\t\r\n\t\toic.setYearOfConception(\"a\");\r\n\t\toic.addPregnancyRecord();\r\n\t\tAssert.assertTrue(oic.getDisplayedPregnancies().isEmpty());\r\n\t\t\r\n\t\toic.setYearOfConception(\"2005\");\r\n\t\toic.setDeliveryType(\"Vaginal Delivery\");\r\n\t\tAssert.assertTrue(oic.getDeliveryType().equals(\"Vaginal Delivery\"));\r\n\t\tAssert.assertTrue(oic.getDisplayedPregnancies().isEmpty());\t\t\r\n\t\t\r\n\t\toic.setYearOfConception(\"101\");\r\n\t\tAssert.assertTrue(oic.getDisplayedPregnancies().isEmpty());\r\n\t\t\r\n\t\toic.setYearOfConception(\"2005\");\r\n\t\toic.setNumHoursInLabor(\"3\");\r\n\t\toic.addPregnancyRecord();\r\n\t\tAssert.assertFalse(oic.getDisplayedPregnancies().isEmpty());\r\n\t}", "private void TestBasic() {\n\n\t\tPartTimeEmployee e = new PartTimeEmployee(1, \"One\", 40, 8.75);\n\t\tString result = new String();\n\t\t\n\t\tresult = \" Constructor :\\n\"\n\t\t\t+ String.format(\" %s\\n\", \"PartTimeEmployee(1, \\\"One\\\", 40, 8.75)\")\n\t\t\t+ String.format(\" toString() :\\n\")\t\t\n\t\t\t+ String.format(\" %s\\n\", e)\n\t\t\t+ String.format(\" Attributes :\\n\")\t\n\t\t\t+ String.format(\" %-12s : %s\\n\", \"id\", e.getID())\n\t\t\t+ String.format(\" %-12s : %s\\n\", \"name\", e.getName())\n\t\t\t+ String.format(\" %-12s : %s\\n\", \"hours\", e.getHours())\n\t\t\t+ String.format(\" %-12s : %s\\n\", \"rate\", e.getRate())\n\t\t\t+ String.format(\" Calculated attributes:\\n\")\t\n\t\t\t+ String.format(\" %-12s : %,.2f\\n\", \"salary\", e.calculateSalary());\n\t\tout.print(result);\n\t}", "public void testAuditDetail_Accuracy() {\r\n assertNotNull(\"The AuditDetail instance should be created.\", auditDetail);\r\n }", "@Test\n\tpublic void findOneTest1() {\n\t\tLinija line = linijaService.findOne(1L);\n\t\t\n\t\tassertNotEquals(null, line);\n\t}", "public void testGetId_Default_Accuracy() {\r\n assertEquals(\"The id value should be got properly.\", -1, auditDetail.getId());\r\n }", "@Test\n\tpublic void givenCreateItem_whenValidRecord_ThenSuccess() {\n\t\tHashMap<String, Object> newRecord = getRecordHashMap(20, \"Steak\", \"Meats\", 15.5f);\n\n\t\t// create a new record and extract the ID from the response\n\t\tInteger newId = given().\n\t\t\tcontentType(ContentType.JSON).\n\t\t\tbody(newRecord).\n\t\twhen().\n\t\t\tpost(\"/\").\n\t\tthen().\n\t\t\tstatusCode(HttpStatus.CREATED.value()).\n\t\t\tcontentType(ContentType.JSON).\n\t\t\textract().\n\t\t\tpath(\"id\");\n\n\t\tnewRecord = setRecordId(newRecord, newId);\n\n\t\t// verify that the new record is created\n\t\tHashMap<String, Object> actual = given().\n\t\t\tpathParam(\"id\", newId).\n\t\twhen().\n\t\t\tget(\"/{id}\").\n\t\tthen().\n\t\t\tstatusCode(HttpStatus.OK.value()).\n\t\t\tcontentType(ContentType.JSON).\n\t\t\textract().path(\"$\");\n\n\t\tassertThat(newRecord).isEqualTo(actual);\n\n\t}", "@Test\n public void findSample_whenNoFieldsAreSelected_sampleReturnedWithAllFields() {\n MolecularSampleDto molecularSampleDto = molecularSampleRepository.findOne(\n testMolecularSample.getUuid(),\n new QuerySpec(MolecularSampleDto.class)\n );\n \n assertNotNull(molecularSampleDto);\n assertEquals(testMolecularSample.getUuid(), molecularSampleDto.getUuid());\n assertEquals(TEST_MOLECULAR_SAMPLE_NAME, molecularSampleDto.getName());\n assertEquals(TEST_MATERIAL_SAMPLE_UUID.toString(), molecularSampleDto.getMaterialSample().getId());\n assertEquals(TEST_MOLECULAR_SAMPLE_SAMPLE_TYPE, molecularSampleDto.getSampleType());\n }", "public void testFields()\n {\n TestUtils.testNoAddedFields(getTestedClass(), null);\n }", "@Test(expectedExceptions = DataAccessException.class)\r\n public void testCreateWithNull() {\r\n recordDao.create(null);\r\n }", "@Test\n public void testViewRawMaterialWithSelectType1() throws Exception {\n System.out.println(\"viewRawMaterialWithSelectType\");\n Long factoryId = 1L;\n Collection<FactoryRawMaterialEntity> result = PurchaseOrderManagementModule.viewRawMaterialWithSelectType(factoryId);\n assertFalse(result.isEmpty());\n }", "@Test\r\n public void testRetrieve() {\r\n\r\n PaymentDetailPojo expResult = instance.save(paymentDetail1);\r\n assertEquals(expResult, instance.retrieve(paymentDetail1));\r\n }", "@Test(timeout = 4000)\n public void test004() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String string0 = SQLUtil.renderValue(defaultDBTable0);\n assertNull(string0);\n }", "public void testInterpretingBasicExample1()\n {\n try {\n SalesFile t = new SalesFile(\"samples/data/in/base.dat\", AppConfig.fieldDelimiter);\n t.read();\n assertEquals(t.getTotalSalesman(), 2);\n assertEquals(t.getTotalCustomers(), 2);\n assertEquals(t.getMostExpensiveSaleId(), \"10\");\n assertEquals(t.getWorstSalesman(), \"Renato\");\n } catch(RecordInvalidTokenException ex) {\n assertTrue(\"This file is well formed, but something is wrong!\", false);\n } catch(FileNotFoundException e) {\n assertTrue(\"File must exist to complete the test!\", false);\n } catch(IOException e) {\n assertTrue(\"IO exception!\", false);\n }\n }", "@Test void testZeroFields() {\n final List<RexLiteral> row = ImmutableList.of();\n final Function<RelBuilder, RelNode> relFn =\n b -> b.values(ImmutableList.of(row, row),\n b.getTypeFactory().builder().build())\n .build();\n fixture().withRel(relFn)\n .returnsRows(\"[]\", \"[]\");\n }", "@Test\n public void empty_diagnostic_info_should_not_be_null_when_read_from_db() {\n //given that an app has an \"empty\" diagnostic is saved to database\n String uuid = UUID.randomUUID().toString();\n ApplicationInfo info = ApplicationInfo.builder().uuid(uuid).build();\n assertThat(info.getDiagnosticInfo(), is(notNullValue()));\n applicationRepository.save(info);\n\n //when we retrieve it from db\n ApplicationInfo retrievedInfo = applicationRepository.findOne(uuid);\n\n //then the empty diagnosticInfo is not null\n assertThat(retrievedInfo.getDiagnosticInfo(), is(notNullValue()));\n }", "@Test\n\tpublic void testRecord() throws Exception {\n\t\tfinal String module = \"-------------- MODULE Testing ----------------\\n\"\n\t\t\t\t+ \"CONSTANTS k \\n\"\n\t\t\t\t+ \"ASSUME k = [a |-> 1, b |-> TRUE] \\n\"\n\t\t\t\t+ \"=================================\";\n\n\t\tfinal String expected = \"MACHINE Testing\\n\"\n\t\t\t\t+ \"CONSTANTS k\\n\"\n\t\t\t\t+ \"PROPERTIES k : struct(a:INTEGER, b:BOOL) & k = rec(a : 1, b : TRUE) \\n\"\n\t\t\t\t+ \"END\";\n\t\tcompare(expected, module);\n\t}", "public TesttabRecord() {\n\t\tsuper(org.jooq.h2.generated.tables.Testtab.TESTTAB);\n\t}", "public void testOneTable() {\n\n String\tsql\t= \"SELECT AD_Table_ID, TableName FROM AD_Table WHERE IsActive='Y'\";\n AccessSqlParser\tfixture\t= new AccessSqlParser(sql);\n\n assertEquals(\"AccessSqlParser[AD_Table|0]\", fixture.toString());\n }", "@Test\n public void getAllMedicalRecords() {\n List<MedicalRecord> records = service.getAllMedicalRecords();\n\n //Assert\n assertEquals(2, records.size());\n }", "@Test\n\tpublic void test() {\n\t\ttry {\n\t\t\t/**\n\t\t\t * Create a couple of patient and visulaize the attributes\n\t\t\t */\n\t\t\tPatient myPatient = new Patient();\n\t\t\tSystem.out.println(\t\"Patient name:\" + myPatient.getName() + \"\\n\" +\n\t\t\t\t\t\"Patient surname:\" + myPatient.getSurname() + \"\\n\" +\n\t\t\t\t\t\"Patient insurance:\" + myPatient.getInsuranceType() + \"\\n\" +\n\t\t\t\t\t\"Severity level:\" + myPatient.getSeverityLevel().getLevel() + \"\\n\");\n\t\t\t\n\t\t\tPatient mrJackson = new Patient(\"Robert\", \"Jackson\", \"gold\", new SeverityLevel(3));\n\t\t\tSystem.out.println(\t\"Patient name:\" + mrJackson.getName() + \"\\n\" +\n\t\t\t\t\t\"Patient surname:\" + mrJackson.getSurname() + \"\\n\" +\n\t\t\t\t\t\"Patient insurance:\" + mrJackson.getInsuranceType() + \"\\n\" +\n\t\t\t\t\t\"Severity level:\" + mrJackson.getSeverityLevel().getLevel() + \"\\n\");\n\t\t\t/**\n\t\t\t * Verify the system safety in the case where invalid paramenters are passed\n\t\t\t */\n\t\t\ttry {\n\t\t\t\tPatient mrNo = new Patient(\"Robert\", \"Jackson\", \"asdf\", new SeverityLevel(3));\n\t\t\t\tSystem.out.println(\t\"Patient name:\" + mrNo.getName() + \"\\n\" +\n\t\t\t\t\t\t\"Patient surname:\" + mrNo.getSurname() + \"\\n\" +\n\t\t\t\t\t\t\"Patient insurance:\" + mrNo.getInsuranceType() + \"\\n\" +\n\t\t\t\t\t\t\"Severity level:\" + mrNo.getSeverityLevel().getLevel() + \"\\n\");\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Could not create mrNo becaouse an exeption occured\");\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tPatient mrNo = new Patient(\"Robert\", \"Jackson\", \"gold\", new SeverityLevel(7));\n\t\t\t\tSystem.out.println(\t\"Patient name:\" + mrNo.getName() + \"\\n\" +\n\t\t\t\t\t\t\"Patient surname:\" + mrNo.getSurname() + \"\\n\" +\n\t\t\t\t\t\t\"Patient insurance:\" + mrNo.getInsuranceType() + \"\\n\" +\n\t\t\t\t\t\t\"Severity level:\" + mrNo.getSeverityLevel().getLevel() + \"\\n\");\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Could not create mrNo because an exeption occured\");\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Exeptions raised\");\n\t\t\tfail(\"Exeptions raised\");\n\t\t}\n\t\t\n\t\t/**\n\t\t * test update method adding an arrival and a registration event\n\t\t */\n\t\t//TODO;\n\t\t/**\n\t\t * test get arrival time method\n\t\t */\n\t\t\n\t}", "@Test\r\n void testCreate() {\r\n assertNotNull(model);\r\n }", "@Test\r\n\tpublic void createAndRetrieveStudent() {\n\t\tStudent duke = Student.find.where().eq(\"studentId\", 1).findUnique();\r\n\r\n\t\t// Check whether inMemoryDatabase() works\r\n\t\t// If not, more than 2 row might be found\r\n\t\tint totalRow = Student.find.findRowCount();\r\n\t\torg.junit.Assert.assertEquals(2, totalRow);\r\n\r\n\t\torg.junit.Assert.assertNotNull(duke);\r\n\t\torg.junit.Assert.assertEquals(1, duke.studentId.longValue());\r\n\t}", "@Test\n void getByIdSuccess() {\n //Get User\n GenericDao<User> userDao = new GenericDao(User.class);\n User user = userDao.getById(2);\n\n //Create Test Car\n Car testCar = new Car(1,user,\"2016\",\"Jeep\",\"Wrangler\",\"1C4BJWFG2GL133333\");\n\n //Ignore Create/Update times\n testCar.setCreateTime(null);\n testCar.setUpdateTime(null);\n\n //Get Existing Car\n Car retrievedCar = carDao.getById(1);\n assertNotNull(retrievedCar);\n\n //Compare Cars\n assertEquals(testCar,retrievedCar);\n }", "public WERecordDataModel()\n\t{\n\t\tsuper();\n\t\tsetEqFileName(RECORD_NAME);\n\t\tinitMessages();\n\t}", "public static void main(String[] args)\n\t{\n\t\tRecordDefinition recordDef = new RecordDefinition();\n\n\t\trecordDef.addFieldDefinition(000, Long.TYPE, \"Time\");\n\t\trecordDef.addFieldDefinition(001, Double.TYPE, \"Velocity\");\n\t\trecordDef.addFieldDefinition(002, Double.TYPE, \"Altitude\");\n\t\trecordDef.addFieldDefinition(003, Double.TYPE, \"Pressure\");\n\t\trecordDef.addFieldDefinition(004, Double.TYPE, \"Temperature\");\n\t\trecordDef.addFieldDefinition(005, Double.TYPE, \"Attitude\");\n\n\n\t\tRecord record = new Record(recordDef);\n\t\t//Should have all fields and no values\n\t\tSystem.out.println(record);\n\t\t\n\t\trecord.setValueByCode(0,1);\n\t\trecord.setValueByCode(1,1);\n\t\trecord.setValueByCode(2,1);\n\t\trecord.setValueByCode(3,1);\n\t\trecord.setValueByCode(4,1);\n\t\trecord.setValueByCode(5,1);\n\t\t\n\t\t//Should have all fields the fields set now\n\t\tSystem.out.println(record);\n\n\t}", "@Test(expectedExceptions = DataAccessException.class)\r\n public void testCreateNullUser() {\r\n ActivityRecord record = new ActivityRecord();\r\n record.setActivity(sportActivity);\r\n record.setDistance(5);\r\n record.setTime(Long.MIN_VALUE);\r\n record.setUser(null);\r\n\r\n recordDao.create(record);\r\n }", "@Test(alwaysRun = true, priority = 4)\n public void test005createUserWithEmptyFieldsTest() {\n close();\n login();\n //create user with all empty fields\n createUser(\"\", new HashMap<String, String>());\n\n //check if error message appears after user saving\n getFeedbackPanel().find(byText(\"No name in new object\"));\n }", "@Test\n public void testViewRawMaterialWithSelectType2() throws Exception {\n System.out.println(\"viewRawMaterialWithSelectType\");\n Long factoryId = 1L;\n Collection<FactoryRawMaterialEntity> result = PurchaseOrderManagementModule.viewRawMaterialWithSelectType(factoryId);\n assertFalse(result.isEmpty());\n }", "@Test(priority = 8)\n\tpublic void recordNotFound() throws JsonProcessingException {\n\n\t}", "@Test\n public void constructorSetsEmptyExtra()\n {\n //act\n ProductInfo actual = new ProductInfo();\n\n //assert\n assertEquals(\"\", Deencapsulation.getField(actual, \"extra\"));\n }", "@Test\r\n\tpublic void test001_RegularConstructor() {\r\n\t\tCustomer c = new Customer( cEric_id, cEric_name, cEric_contact );\r\n\t\tassertNotNull( c.getId() );\t\t\t\t\t// assert that id is not null\r\n\t\tassertEquals( c.getId(), cEric_id );\t\t// assert that cEric_id is returned\r\n\t\tassertSame( c.getId(), cEric_id );\t\t\t// assert that same (\"==\") id is returned\r\n\t\tassertEquals( c.getFirstName(), \"\" );\t\t// \"name\" is assigned to lastName, firstName: \"\"\r\n\t\tassertEquals( c.getLastName(), \"Eric Schulz-Mueller\" );\r\n\t\tassertEquals( c.getLastName(), cEric_name );\t// better to use constant;\r\n\t\tassertEquals( c.getContact(), cEric_contact );\r\n\t}", "public ObjectRecord() {\n\t\tsuper(org.jooq.test.hsqldb.generatedclasses.tables.Object.OBJECT);\n\t}", "public void testIsPersisted_Default_Accuracy() {\r\n assertEquals(\"The persisted value should be got properly.\", false, auditDetail.isPersisted());\r\n }", "@Test(timeout = 4000)\n public void test090() throws Throwable {\n String string0 = SQLUtil.typeAndName((DBObject) null);\n assertNull(string0);\n }", "int insert(Basicinfo record);", "int insert(TestEntity record);", "public void testProductionRecord() {\n // test constructor used when creating production records from user interface\n Integer numProduced = 3; // this will come from the combobox in the UI\n\n for (int productionRunProduct = 0; productionRunProduct < numProduced; productionRunProduct++) {\n ProductionRecord pr = new ProductionRecord(0);\n System.out.println(pr.toString());\n }\n\n ProductionRecord pr = new ProductionRecord(0, 3, \"1\", new Date(System.currentTimeMillis()));\n\n textLog.setText(textLog.getText() + pr.toString());\n textLog.setText(textLog.getText() + \"\\n\" + pr.getProductionNumber());\n textLog.setText(textLog.getText() + \"\\n\" + pr.getProductID());\n textLog.setText(textLog.getText() + \"\\n\" + pr.getSerialnumber());\n textLog.setText(textLog.getText() + \"\\n\" + pr.getDateProduced());\n\n }", "@Test\n void getByIdSuccess() {\n User retrievedUser = (User) dao.getById(1);\n //User retrievedUser = dao.getById(1);\n assertEquals(\"Dave\", retrievedUser.getFirstName());\n assertEquals(\"Queiser\", retrievedUser.getLastName());\n }", "@Test\n\tpublic void testSingleItemRecordsNotLopped() \n\t{\n\t\tString id = \"oneLC999\";\n\t\tassertLCVol1NotLopped(id);\n\t\tassertNoLoppedLC(id);\n\t \n\t id = \"oneDewey999\";\n\t\tsolrFldMapTest.assertSolrFldValue(testFilePath, id, fldName, deweyVol1Shelfkey);\n\n\t id = \"oneAlphanumBox\";\n\t String callnum = \"M1522 BOX 1\";\n\t String shelfkey = CallNumUtils.getShelfKey(callnum, CallNumberType.OTHER, id).toLowerCase();\n\t\tsolrFldMapTest.assertSolrFldValue(testFilePath, id, fldName, shelfkey);\n\t}", "@Test\n public void testBasicQuery() {\n final QueryCriteria qc = QueryCriteria.create();\n QueryGenerator generator = QueryGenerator.generator(FakeEntity.class, qc, \"a\");\n Assert.assertEquals(BAD_QUERY_GENERATED, \"\", generator.generate());\n Assert.assertEquals(BAD_QUERY_PARAMTERS, 0, generator.getParameterKeys().size());\n }", "@Test\n\tpublic void emptyTRDbTest() {\n\t\tDBI dbi = TEST_ENVIRONMENT.getDbi();\n\t\tTradeRequestDao tradeRequestDao = dbi.onDemand(TradeRequestDao.class);\n\t\tint expected = 0;\n\t\tint actual = tradeRequestDao.getAll().size();\n\t\tAssert.assertEquals(\"User table should be empty to start\", expected, actual);\n\t}", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n String string0 = SQLUtil.typeAndName((DBObject) null);\n assertNull(string0);\n }", "@Test\r\n public void testRetrieveNull() {\r\n\r\n assertNull(instance.retrieve(paymentDetail1));\r\n }", "@Test\n\tpublic void testGetTable() throws SQLException\n\t{\n\t\tnew Nail(\"asdf\",5,5,5.0,20);\n\t\tResultSet rs = DatabaseGateway.getTable(\"Nail\");\n\t\tif(rs.next())\n\t\t{\n\t\t\tassertEquals(rs.getInt(\"id\"),1);\n\t\t\tassertEquals(rs.getInt(\"ManufacturerID\"),5);\n\t\t\tassertEquals(rs.getInt(\"Price\"),5);\n\t\t\tassertEquals(rs.getString(\"UPC\"),\"asdf\");\n\t\t\tassertTrue(rs.getDouble(\"Length\") == 5.0);\n\t\t\tassertEquals(rs.getInt(\"NumberInBox\"), 20);\n\t\t}\n\t}", "@Test\n /* testUpdateRecord\n * testing update exist record in Save.Json\n * */\n public void testUpdateRecord() {\n testAddRecord();\n\n score = 300;\n level = 3;\n name = \"test1\";\n\n saveReader.updateRecord(indexOfReturned, \"name\", name);\n assertEquals(\"True : name field updated successfully\", name, saveReader.LoadsList.get(indexOfReturned).name);\n\n saveReader.updateRecord(indexOfReturned, \"score\", score);\n assertEquals(\"True : score field updated successfully\", score, saveReader.LoadsList.get(indexOfReturned).score);\n\n saveReader.updateRecord(indexOfReturned, \"level\", level);\n assertEquals(\"True : level field updated successfully\", level, saveReader.LoadsList.get(indexOfReturned).level);\n }", "@Test\r\n public void testInsert() {\r\n assertTrue(false);\r\n }", "@Test(timeout = 4000)\n public void test123() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n MockPrintWriter mockPrintWriter0 = new MockPrintWriter(\"Illegal column type format: \");\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n SQLUtil.renderCreateTable(defaultDBTable0, false, nameSpec0, mockPrintWriter0);\n assertNull(defaultDBTable0.getDoc());\n }", "public void handleParsedRecord(CovariateTabParser.SampleRecord record) {\n\t\t\tif (numOfParsedRecords == 0) { // First record in file.\n\t\t\t\tAssert.assertEquals(\"A0001\", record.getIDNum());\n\t\t\t\tAssert.assertEquals(\"48\", record.getAge());\n\t\t\t\tAssert.assertEquals(\"M\", record.getGender());\n\t\t\t\tAssert.assertEquals(\"B\", record.getRace());\n\t\t\t\tAssert.assertEquals(\"70\", record.getHeight());\n\t\t\t\tAssert.assertEquals(\"152\", record.getWeight());\n\t\t\t\tAssert.assertEquals(\"21.81\", record.getBMI());\n\t\t\t\tAssert.assertEquals(\"11\", record.getCYP2C9());\n\t\t\t\tAssert.assertEquals(\"NN\", record.getC2C9());\n\t\t\t\tAssert.assertEquals(\"CT\", record.getVKOR());\n\t\t\t\tAssert.assertEquals(\"1\", record.getrfCHF());\n\t\t\t\tAssert.assertEquals(\"0\", record.getrfDM());\n\t\t\t\tAssert.assertEquals(\"0\", record.getStatin());\n\t\t\t\tAssert.assertEquals(\"5.048701308\", record.getAvgMaint());\n\t\t\t\tAssert.assertEquals(\"5.048701308\", record.getAvg1Maint());\n\t\t\t\tAssert.assertEquals(\"1.333333333\", record.getAvgOfK());\n\t\t\t\tAssert.assertEquals(\"1\", record.getalcohol());\n\t\t\t\tAssert.assertEquals(\"1\", record.getsmoke());\n\t\t\t\tAssert.assertEquals(\"0\", record.getamiod());\n\t\t\t\tAssert.assertEquals(\"anormal\", record.getCKD());\n\t\t\t\tAssert.assertEquals(\"0\", record.getCKD1());\n\t\t\t\tAssert.assertEquals(\"1.619131043\", record.getlogdose());\n\t\t\t\tAssert.assertEquals(\"2.246931532\", record.getsqdose());\n\t\t\t}\n\t\t\telse if (numOfParsedRecords == 1) { // Next record in file.\n\t\t\t\tAssert.assertEquals(\"A0171\", record.getIDNum());\n\t\t\t\tAssert.assertEquals(\"79\", record.getAge());\n\t\t\t\tAssert.assertEquals(\"F\", record.getGender());\n\t\t\t\tAssert.assertEquals(\"B\", record.getRace());\n\t\t\t\tAssert.assertEquals(\"69\", record.getHeight());\n\t\t\t\tAssert.assertEquals(\"130\", record.getWeight());\n\t\t\t\tAssert.assertEquals(\"19.2\", record.getBMI());\n\t\t\t\tAssert.assertEquals(\"11\", record.getCYP2C9());\n\t\t\t\tAssert.assertEquals(\"NN\", record.getC2C9());\n\t\t\t\tAssert.assertEquals(\"CC\", record.getVKOR());\n\t\t\t\tAssert.assertEquals(\"0\", record.getrfCHF());\n\t\t\t\tAssert.assertEquals(\"0\", record.getrfDM());\n\t\t\t\tAssert.assertEquals(\"0\", record.getStatin());\n\t\t\t\tAssert.assertEquals(\"6.090656632\", record.getAvgMaint());\n\t\t\t\tAssert.assertEquals(\"6.090656632\", record.getAvg1Maint());\n\t\t\t\tAssert.assertEquals(\"1.87804878\", record.getAvgOfK());\n\t\t\t\tAssert.assertEquals(\"0\", record.getalcohol());\n\t\t\t\tAssert.assertEquals(\"0\", record.getsmoke());\n\t\t\t\tAssert.assertEquals(\"0\", record.getamiod());\n\t\t\t\tAssert.assertEquals(\"anormal\", record.getCKD());\n\t\t\t\tAssert.assertEquals(\"0\", record.getCKD1());\n\t\t\t\tAssert.assertEquals(\"1.806755897\", record.getlogdose());\n\t\t\t\tAssert.assertEquals(\"2.467925573\", record.getsqdose());\n\t\t\t}\n\t\t\telse if (numOfParsedRecords == 2) { // Last record in file.\n\t\t\t\tAssert.assertEquals(\"B0036\", record.getIDNum());\n\t\t\t\tAssert.assertEquals(\"78\", record.getAge());\n\t\t\t\tAssert.assertEquals(\"F\", record.getGender());\n\t\t\t\tAssert.assertEquals(\"B\", record.getRace());\n\t\t\t\tAssert.assertEquals(\"0\", record.getHeight());\n\t\t\t\tAssert.assertEquals(\"0\", record.getWeight());\n\t\t\t\tAssert.assertEquals(\"0\", record.getBMI());\n\t\t\t\tAssert.assertNull(record.getCYP2C9());\n\t\t\t\tAssert.assertNull(record.getC2C9());\n\t\t\t\tAssert.assertNull(record.getVKOR());\n\t\t\t\tAssert.assertEquals(\"0\", record.getrfCHF());\n\t\t\t\tAssert.assertEquals(\"0\", record.getrfDM());\n\t\t\t\tAssert.assertEquals(\"0\", record.getStatin());\n\t\t\t\tAssert.assertNull(record.getAvgMaint());\n\t\t\t\tAssert.assertNull(record.getAvg1Maint());\n\t\t\t\tAssert.assertEquals(\"0\", record.getAvgOfK());\n\t\t\t\tAssert.assertEquals(\"0\", record.getalcohol());\n\t\t\t\tAssert.assertEquals(\"0\", record.getsmoke());\n\t\t\t\tAssert.assertEquals(\"0\", record.getamiod());\n\t\t\t\tAssert.assertEquals(\"moderat\", record.getCKD());\n\t\t\t\tAssert.assertEquals(\"1\", record.getCKD1());\n\t\t\t\tAssert.assertNull(record.getlogdose());\n\t\t\t\tAssert.assertNull(record.getsqdose());\n\t\t\t}\n\t\t\t// Increment total number of handled records.\n\t\t\tnumOfParsedRecords++;\n\t\t}", "DataHRecordData() {}", "public void testMatchCRUD() {\n assertFalse(dbHelper.mMatchTable.hasData());\n\n // Create\n\n // Read\n\n // Update\n\n // Delete\n dbHelper.mMatchTable.deleteAll();\n assertFalse(dbHelper.mMatchTable.hasData());\n }", "@Test\n\tpublic void testCreateRow() throws SQLException\n\t{\n\t\tString insertStatement = \"INSERT INTO Nail (\" + \n\t\t\t\t\"id, UPC, ManufacturerID, Price,Length, NumberInBox\" +\n\t\t\t\t\") VALUES (1,'asdf',5,5,5.0,20)\";\n\t\tDatabaseGateway.createRow(insertStatement);\n\t\t\n\t\tResultSet rs = DatabaseGateway.getObjectByID(\"Nail\", 1);\n\t\tif(rs.next())\n\t\t{\n\t\t\tassertEquals(rs.getInt(\"id\"),1);\n\t\t\tassertEquals(rs.getInt(\"ManufacturerID\"),5);\n\t\t\tassertEquals(rs.getInt(\"Price\"),5);\n\t\t\tassertEquals(rs.getString(\"UPC\"),\"asdf\");\n\t\t\tassertTrue(rs.getDouble(\"Length\") == 5.0);\n\t\t\tassertEquals(rs.getInt(\"NumberInBox\"), 20);\n\t\t}\n\t}", "@Test\n public void create1Test1() throws SQLException {\n manager = new TableServizioManager(mockDb);\n manager.create1(false,false,false,false,false,false,false);\n Servizio servizio = manager.retriveById(5);\n assertNotNull(servizio,\"Should return true if create Servizio\");\n }", "@Test\n\n\tpublic void Cases_26538_execute() throws Exception {\n\t\tVoodooUtils.voodoo.log.info(\"Running \" + testName + \"...\");\n\n\t\t// Verify fields show special chars in name and description fields\n\t\tmyCase.navToRecord();\n\t\tsugar().cases.recordView.getDetailField(\"name\").assertElementContains(casesRecord.get(\"name\"), true);\n\t\tsugar().cases.recordView.getDetailField(\"description\").assertElementContains(casesRecord.get(\"description\"), true);\n\n\t\tVoodooUtils.voodoo.log.info(testName + \" complete.\");\n\t}", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n SimpleResultSet simpleResultSet0 = new SimpleResultSet();\n Object object0 = DBUtil.parseAndSimplifyResultSet(simpleResultSet0);\n assertNotNull(object0);\n }", "@Override\n public Class<ZTest1Record> getRecordType() {\n return ZTest1Record.class;\n }", "@Test\n public void testClaimMedicalRecordNo() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setMedicalRecordNo,\n RdaFissClaim::getMedicalRecordNo,\n RdaFissClaim.Fields.medicalRecordNo,\n 17);\n }", "@Test\n\t// @Disabled\n\tvoid testViewCustomerbyId() {\n\t\tCustomer customer = new Customer(1, \"jen\", \"cru\", \"951771122\", \"tom@gmail.com\");\n\t\tMockito.when(custRep.findById(1)).thenReturn(Optional.of(customer));\n\t\tCustomer persistedCust = custService.viewCustomerbyId(1);\n\t\tassertEquals(\"jen\", persistedCust.getFirstName());\n\t}", "@Test\n public void newInstanceHasNoPrimaryKey() {\n TdPicture model = new TdPicture();\n assertFalse(model.isIdSet());\n }", "public ActHiDetailRecord() {\n super(ActHiDetail.ACT_HI_DETAIL);\n }", "@Test\n public void dontReturnInsertRowWithoutObserver() throws Exception {\n\n // Arrange\n Note note = new Note(TestUtil.TEST_NOTE_1);\n\n // Act\n noteViewModel.setNote(note);\n\n // Assert\n verify(localRepository, never()).insertNote(any(Note.class));\n }", "@Test\n public void constructorTest(){\n String retrievedName = doggy.getName();\n Date retrievedBirthDate = doggy.getBirthDate();\n Integer retrievedId = doggy.getId();\n\n // Then (we expect the given data, to match the retrieved data)\n Assert.assertEquals(givenName, retrievedName);\n Assert.assertEquals(givenBirthDate, retrievedBirthDate);\n Assert.assertEquals(givenId, retrievedId);\n }", "@org.junit.Test\r\n public void testCreate() {\r\n System.out.println(\"create\");\r\n ContactRequest Crequest = new ContactRequest(\"DN Verma\",\"dnvv@gmail.com\",\"9006745345\",\"faizabad\");\r\n ContactDao instance = new ContactDao();\r\n List<ContactResponse> expResult = new ArrayList<ContactResponse>();;\r\n List<ContactResponse> result = instance.create(Crequest);\r\n expResult=instance.getSingleContact(\"dnvv@gmail.com\");\r\n String s=\"Duplicate entry 'dnvv@gmail.com' for key 1\";\r\n if(!result.get(0).getMessage().equals(s))\r\n {\r\n assertEquals(expResult.get(0).getName(), result.get(0).getName());\r\n assertEquals(expResult.get(0).getEmail(), result.get(0).getEmail());\r\n assertEquals(expResult.get(0).getCity(), result.get(0).getCity());\r\n assertEquals(expResult.get(0).getContact(), result.get(0).getContact());\r\n }\r\n }", "public StudentRecord() {}", "@Test\n public void shouldLoadFilledModel() throws Exception {\n final Map<String, Object> modelData = createFilledModel();\n // Some static data is changed at this moment, so need to reset the extractors list\n ReportColumnsExtractorHelper.reset();\n\n // WHEN asking the view to render the model contents\n underTest.renderMergedOutputModel(modelData, mock(HttpServletRequest.class), response);\n\n // THEN the resulting CSV contains the expected data\n verify(writer).write(\"\\\"Header\\\",\\\"Header NG\\\",\\\"H\\\",\\\"Header\\\"\\n\");\n verify(writer).write(\"\\\"str\\\",\\\"\\\",\\\"2\\\",\\\"\\\"\\n\");\n verify(writer).flush();\n }", "@Test\n public void selectById(){\n User user=iUserDao.selectById(\"158271202\");\n System.out.println(user.toString());\n }", "@Test(timeout = 4000)\n public void test092() throws Throwable {\n String string0 = SQLUtil.typeAndName((DBObject) null);\n assertNull(string0);\n }", "@Test\r\n\tvoid testImportPersonShouldReturnTrue() {\r\n\t\tRecordParser parser = new RecordParser();\r\n\t\tPerson person = new Person(\"Cruise | Tom | Male | Green | 1962-07-03\");\r\n\t\tassertTrue(parser.importPerson(person));\r\n\t}", "@Test\n void getByIdSuccess() {\n logger.info(\"running getByID test\");\n User retrievedUser = (User)genericDao.getById(2);\n\n assertEquals(\"BigAl\", retrievedUser.getUserName());\n assertEquals(\"Albert\", retrievedUser.getFirstName());\n assertEquals(2, retrievedUser.getId());\n assertEquals(\"Einstein\", retrievedUser.getLastName());\n assertEquals(\"11223\", retrievedUser.getZipCode());\n assertEquals(LocalDate.of(1879,3,14), retrievedUser.getBirthDate());\n\n }", "public void testAll() {\r\n // Test dao.add\r\n ExtraPart part = new ExtraPart();\r\n part.setAttachPoint(new Coordinate(\"312,94\"));\r\n part.setImage(new ImageInfo(\"images/parts/extrapart1.png\",320,240));\r\n\r\n assertEquals(-1, part.getId());\r\n assertTrue(dao.add(part));\r\n assertTrue(part.getId() >= 0);\r\n\r\n // Test dao.getAll\r\n ArrayList<ExtraPart> parts = dao.getAll();\r\n assertEquals(1, parts.size());\r\n ExtraPart copy = parts.iterator().next();\r\n assertEquals(part.getId(), copy.getId());\r\n assertEquals(part.getAttachPoint(), copy.getAttachPoint());\r\n assertEquals(part.getImage(), copy.getImage());\r\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n String string0 = SQLUtil.typeAndName((DBObject) null);\n assertNull(string0);\n }", "@Test\r\n public void testFindActivityRecordByUser() {\r\n ActivityRecord rec1 = setActivityRecord();\r\n rec1.setBurnedCalories(20);\r\n recordDao.create(rec1);\r\n assertNotNull(recordDao.findActivityRecord(rec1.getId()));\r\n\r\n ActivityRecord rec2 = setActivityRecord();\r\n rec2.setBurnedCalories(40);\r\n recordDao.create(rec2);\r\n assertNotNull(recordDao.findActivityRecord(rec2.getId()));\r\n\r\n List<ActivityRecord> records = recordDao.findRecordsByUser(user);\r\n assertTrue(!records.isEmpty());\r\n assertTrue(records.contains(rec1));\r\n assertTrue(records.contains(rec2));\r\n }", "public void testImportNonEmptyDB() throws Exception {\n URL testXMLFileURL = getClass().getResource(\"prox2db-testdb.xml\");\n new ImportProx2XMLApp(testXMLFileURL.getFile());\n\n // check the resulting database\n verifyObjects(new String[]{\"0\", \"1\", \"2\", \"3\", \"4\"});\n verifyLinks(new String[][]{\n {\"0\", \"1\", \"2\"},\n {\"1\", \"0\", \"3\"},\n {\"2\", \"1\", \"3\"},\n {\"3\", \"1\", \"2\"},\n {\"4\", \"3\", \"4\"}});\n verifyAttribute(\"name\", \"O\", \"VARCHAR\", new String[][]{\n {\"3\", \"Matthew Cornell\"},\n {\"2\", \"David Jensen\"},\n {\"4\", \"our place (an already existing obj)\"}});\n verifyAttribute(\"obj-type\", \"O\", \"VARCHAR\", new String[][]{\n {\"3\", \"person\"},\n {\"2\", \"person\"},\n {\"1\", \"research group\"}});\n verifyAttribute(\"office-num\", \"O\", \"INTEGER\", new String[][]{\n {\"3\", \"218\"},\n {\"2\", \"238\"}});\n verifyAttribute(\"double-test\", \"O\", \"DOUBLE\", new String[][]{\n {\"3\", \"3\"},\n {\"2\", \"2.1000000000000001\"}}); // NB: values match those in file and take into account double precision math changes in Monet version 4.3.14\n verifyAttribute(\"date-test\", \"O\", \"DATE\", new String[][]{\n {\"3\", \"2003-08-25\"},\n {\"2\", \"1962-10-22\"}});\n verifyAttribute(\"link-test\", \"L\", \"VARCHAR\", new String[][]{\n {\"3\", \"this looks like an object ref: _[xx],_but it isn_t because it_s inside a link attribute\"}});\n verifyAttribute(\"link-type\", \"L\", \"VARCHAR\", new String[][]{\n {\"2\", \"member\"},\n {\"3\", \"member\"},\n {\"4\", \"lives-at\"}});\n verifyAttribute(\"nickname\", \"O\", \"VARCHAR\", new String[][]{\n {\"1\", \"kdl\"},\n {\"2\", \"dj\"},\n {\"3\", \"me\"},\n {\"4\", \"home\"}});\n verifyAttribute(\"sa.implied\", \"L\", \"INTEGER\", new String[][]{\n {\"0\", \"1\"},\n {\"1\", \"1\"}});\n verifyAttribute(\"sa.undefined\", \"O\", \"INTEGER\", new String[][]{{}});\n\n veryifyCollection(\"test-coll\", new String[]{\"0\"},\n new String[][]{\n {\"0\", \"0\", \"#test\"},\n {\"0\", \"1\", \"kdl\"},\n {\"0\", \"2\", \"dj\"},\n {\"0\", \"3\", \"me\"},\n {\"0\", \"4\", \"home\"}},\n new String[][]{\n {\"0\", \"0\", \"0:implied:kdl->dj\"},\n {\"0\", \"1\", \"1:implied:#test->me\"},\n {\"0\", \"2\", \"2:kdl->me\"},\n {\"0\", \"3\", \"3:kdl->dj\"},\n {\"0\", \"4\", \"4:me->home\"}});\n veryifyCollection(\"qg2test\", new String[]{\"1\", \"2\", \"3\"},\n new String[][]{\n {\"1\", \"1\", \"group\"},\n {\"2\", \"1\", \"group\"},\n {\"3\", \"1\", \"group\"},\n {\"1\", \"2\", \"person\"},\n {\"2\", \"3\", \"person\"},\n {\"3\", \"2\", \"person\"}},\n new String[][]{\n {\"1\", \"0\", \"group-person\"},\n {\"2\", \"2\", \"group-person\"},\n {\"3\", \"3\", \"group-person\"}});\n }", "@Test(timeout = 4000)\n public void test009() throws Throwable {\n Object object0 = new Object();\n String string0 = SQLUtil.renderValue(object0);\n assertNotNull(string0);\n }", "@Test\n public void testAddProgramRecordToHead() {\n System.out.println(\"addProgramRecordToHead\");\n SAMFileHeader header = new SAMFileHeader();\n SAMProgramRecord programRecord = new SAMProgramRecord(\"test\");\n PicardCommandLine instance = new PicardCommandLineImpl();\n instance.addProgramRecordToHead(header, programRecord);\n assertEquals(header.getProgramRecords().size(), 1);\n instance.addProgramRecordToHead(header, programRecord);\n assertEquals(header.getProgramRecords().size(), 2);\n assertNotNull(header.getProgramRecord(\"test_1\"));\n }", "DescribeRecordResult describeRecord(DescribeRecordRequest describeRecordRequest);", "@Test\n public void selectById() {\n }", "@org.junit.Test\r\n public void testGetSingleContact() {\r\n System.out.println(\"getSingleContact\");\r\n String emailid = \"dnv@gmail.com\";\r\n ContactDao instance = new ContactDao();\r\n List<ContactResponse> expResult = new ArrayList<ContactResponse>();\r\n ContactResponse cr = new ContactResponse(\"DN Verma1\",\"dnv@gmail.com\",\"9006847351\",\"DBG\");\r\n expResult.add(cr);\r\n List<ContactResponse> result = instance.getSingleContact(emailid);\r\n String s=\"No records Exists\";\r\n if(result.get(0).getMessage()==null)\r\n {\r\n assertEquals(expResult.get(0).getName(), result.get(0).getName());\r\n assertEquals(expResult.get(0).getMessage(), result.get(0).getMessage());\r\n assertEquals(expResult.get(0).getEmail(), result.get(0).getEmail());\r\n assertEquals(expResult.get(0).getCity(), result.get(0).getCity());\r\n assertEquals(expResult.get(0).getContact(), result.get(0).getContact());\r\n }\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "public TBasicSalaryTypeRecord() {\n\t\tsuper(jooq.model.tables.TBasicSalaryType.T_BASIC_SALARY_TYPE);\n\t}", "@Test\r\n\tpublic void testGetPastPregnanciesFromInit() {\r\n\t\tList<PregnancyInfo> list;\r\n\t\ttry {\r\n\t\t\tlist = pregnancyData.getRecordsFromInit(1);\r\n\t\t\tAssert.assertEquals(list, oic.getPastPregnanciesFromInit(1));\r\n\t\t} catch (DBException e) {\r\n\t\t\tAssert.fail(e.getMessage());\r\n\t\t}\r\n\t}", "int insertSelective(TestEntity record);" ]
[ "0.6613863", "0.6463971", "0.6453134", "0.6309039", "0.62752", "0.62636465", "0.62558264", "0.61102", "0.6090875", "0.6078767", "0.60746276", "0.60627013", "0.601562", "0.5989632", "0.5934695", "0.5911601", "0.59084034", "0.5902868", "0.5893419", "0.58911455", "0.5868076", "0.584617", "0.5842991", "0.5823877", "0.5821089", "0.58202446", "0.58200216", "0.5816896", "0.58059156", "0.58015066", "0.57986283", "0.5796956", "0.57868284", "0.5767578", "0.57456005", "0.57201165", "0.57158816", "0.570818", "0.57031465", "0.56952006", "0.5686608", "0.5685532", "0.5676918", "0.5673825", "0.56644577", "0.5657273", "0.56468827", "0.56423783", "0.56327856", "0.5631812", "0.56272733", "0.56268823", "0.5624", "0.5614262", "0.5606518", "0.56046945", "0.5604651", "0.5603478", "0.56018883", "0.5588221", "0.55867076", "0.5586013", "0.55717975", "0.5564701", "0.5562678", "0.5560083", "0.5550615", "0.55486256", "0.55439883", "0.55430037", "0.5539465", "0.5536745", "0.55345553", "0.5528806", "0.55213714", "0.55204976", "0.5510731", "0.5508291", "0.5501759", "0.5501484", "0.5501017", "0.5495945", "0.54918927", "0.54763746", "0.5473195", "0.5472938", "0.54716796", "0.5471487", "0.5468587", "0.54614747", "0.54613316", "0.5459975", "0.54597145", "0.5456253", "0.5455746", "0.5453655", "0.54534227", "0.54469514", "0.54384166", "0.5436552", "0.5435351" ]
0.0
-1
test a full basic record with several details
@Test public void fullConversion() { Map<String, String> details = new HashMap<String, String>(); details.put("key1", "val1"); details.put("secondkey", "secondval"); SimpleBasicMessage arec = new SimpleBasicMessage("my msg", details); arec.setMessageId(new MessageId("12345")); arec.setCorrelationId(new MessageId("67890")); String json = arec.toJSON(); System.out.println(json); assertNotNull("missing JSON", json); SimpleBasicMessage arec2 = SimpleBasicMessage.fromJSON(json, SimpleBasicMessage.class); assertNotNull("JSON conversion failed", arec2); assertNotSame(arec, arec2); assertNull("BasicMessage ID should not be encoded in JSON", arec2.getMessageId()); assertNull("Correlation ID should not be encoded in JSON", arec2.getCorrelationId()); assertEquals("my msg", arec2.getMessage()); assertEquals(2, arec2.getDetails().size()); assertEquals("val1", arec2.getDetails().get("key1")); assertEquals("secondval", arec2.getDetails().get("secondkey")); assertEquals(arec.getMessage(), arec2.getMessage()); assertEquals(arec.getDetails(), arec2.getDetails()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\tpublic void testGetRecords() {\r\n\t\tAssert.assertNull(oic.getRecords(\"a\"));\r\n\r\n\t\tList<ObstetricsInit> list;\r\n\t\ttry {\r\n\t\t\tlist = oiData.getRecords(1);\r\n\t\t\tAssert.assertEquals(list, oic.getRecords(\"1\"));\r\n\t\t} catch (DBException e) {\r\n\t\t\tAssert.fail(e.getMessage());\r\n\t\t}\r\n\t\t\r\n\t\t//TODO: Maybe test sorting\r\n\t}", "@Test\n\n\tpublic void Cases_26538_execute() throws Exception {\n\t\tVoodooUtils.voodoo.log.info(\"Running \" + testName + \"...\");\n\n\t\t// Verify fields show special chars in name and description fields\n\t\tmyCase.navToRecord();\n\t\tsugar().cases.recordView.getDetailField(\"name\").assertElementContains(casesRecord.get(\"name\"), true);\n\t\tsugar().cases.recordView.getDetailField(\"description\").assertElementContains(casesRecord.get(\"description\"), true);\n\n\t\tVoodooUtils.voodoo.log.info(testName + \" complete.\");\n\t}", "@Test\n public void recordTypeTest() {\n // TODO: test recordType\n }", "@Test\n public void getAllRecordsTest() {\n FileMetaData fileMetaData = new FileMetaData();\n fileMetaData.setAuthorName(\"Puneet\");\n fileMetaData.setFileName(\"resum2\");\n fileMetaData.setDescription(\"Attached resume to test upload\");\n fileMetaData.setUploadTimeStamp(DateUtil.getCurrentDate());\n fileMetaDataRepository.saveAndFlush(fileMetaData);\n fileMetaData = new FileMetaData();\n fileMetaData.setAuthorName(\"Puneet1\");\n fileMetaData.setFileName(\"resume3\");\n fileMetaData.setDescription(\"Attached resume to test upload1\");\n fileMetaData.setUploadTimeStamp(DateUtil.getCurrentDate());\n fileMetaDataRepository.saveAndFlush(fileMetaData);\n List<FileMetaData> fileMetaDataList = fileMetaDataRepository.findAll();\n Assert.assertNotNull(fileMetaDataList);\n //Assert.assertEquals(2, fileMetaDataList.size());\n }", "@Test\n void getNoteByIdSuccess() {\n Note retrievedNote = (Note) noteDao.getById(1);\n assertEquals(1, retrievedNote.getId());\n assertEquals(\"Amari Rodgers\", retrievedNote.getProspect());\n }", "@Test\n\tpublic void testFetchResult_with_proper_data() {\n\t}", "public void handleParsedRecord(CovariateTabParser.SampleRecord record) {\n\t\t\tif (numOfParsedRecords == 0) { // First record in file.\n\t\t\t\tAssert.assertEquals(\"A0001\", record.getIDNum());\n\t\t\t\tAssert.assertEquals(\"48\", record.getAge());\n\t\t\t\tAssert.assertEquals(\"M\", record.getGender());\n\t\t\t\tAssert.assertEquals(\"B\", record.getRace());\n\t\t\t\tAssert.assertEquals(\"70\", record.getHeight());\n\t\t\t\tAssert.assertEquals(\"152\", record.getWeight());\n\t\t\t\tAssert.assertEquals(\"21.81\", record.getBMI());\n\t\t\t\tAssert.assertEquals(\"11\", record.getCYP2C9());\n\t\t\t\tAssert.assertEquals(\"NN\", record.getC2C9());\n\t\t\t\tAssert.assertEquals(\"CT\", record.getVKOR());\n\t\t\t\tAssert.assertEquals(\"1\", record.getrfCHF());\n\t\t\t\tAssert.assertEquals(\"0\", record.getrfDM());\n\t\t\t\tAssert.assertEquals(\"0\", record.getStatin());\n\t\t\t\tAssert.assertEquals(\"5.048701308\", record.getAvgMaint());\n\t\t\t\tAssert.assertEquals(\"5.048701308\", record.getAvg1Maint());\n\t\t\t\tAssert.assertEquals(\"1.333333333\", record.getAvgOfK());\n\t\t\t\tAssert.assertEquals(\"1\", record.getalcohol());\n\t\t\t\tAssert.assertEquals(\"1\", record.getsmoke());\n\t\t\t\tAssert.assertEquals(\"0\", record.getamiod());\n\t\t\t\tAssert.assertEquals(\"anormal\", record.getCKD());\n\t\t\t\tAssert.assertEquals(\"0\", record.getCKD1());\n\t\t\t\tAssert.assertEquals(\"1.619131043\", record.getlogdose());\n\t\t\t\tAssert.assertEquals(\"2.246931532\", record.getsqdose());\n\t\t\t}\n\t\t\telse if (numOfParsedRecords == 1) { // Next record in file.\n\t\t\t\tAssert.assertEquals(\"A0171\", record.getIDNum());\n\t\t\t\tAssert.assertEquals(\"79\", record.getAge());\n\t\t\t\tAssert.assertEquals(\"F\", record.getGender());\n\t\t\t\tAssert.assertEquals(\"B\", record.getRace());\n\t\t\t\tAssert.assertEquals(\"69\", record.getHeight());\n\t\t\t\tAssert.assertEquals(\"130\", record.getWeight());\n\t\t\t\tAssert.assertEquals(\"19.2\", record.getBMI());\n\t\t\t\tAssert.assertEquals(\"11\", record.getCYP2C9());\n\t\t\t\tAssert.assertEquals(\"NN\", record.getC2C9());\n\t\t\t\tAssert.assertEquals(\"CC\", record.getVKOR());\n\t\t\t\tAssert.assertEquals(\"0\", record.getrfCHF());\n\t\t\t\tAssert.assertEquals(\"0\", record.getrfDM());\n\t\t\t\tAssert.assertEquals(\"0\", record.getStatin());\n\t\t\t\tAssert.assertEquals(\"6.090656632\", record.getAvgMaint());\n\t\t\t\tAssert.assertEquals(\"6.090656632\", record.getAvg1Maint());\n\t\t\t\tAssert.assertEquals(\"1.87804878\", record.getAvgOfK());\n\t\t\t\tAssert.assertEquals(\"0\", record.getalcohol());\n\t\t\t\tAssert.assertEquals(\"0\", record.getsmoke());\n\t\t\t\tAssert.assertEquals(\"0\", record.getamiod());\n\t\t\t\tAssert.assertEquals(\"anormal\", record.getCKD());\n\t\t\t\tAssert.assertEquals(\"0\", record.getCKD1());\n\t\t\t\tAssert.assertEquals(\"1.806755897\", record.getlogdose());\n\t\t\t\tAssert.assertEquals(\"2.467925573\", record.getsqdose());\n\t\t\t}\n\t\t\telse if (numOfParsedRecords == 2) { // Last record in file.\n\t\t\t\tAssert.assertEquals(\"B0036\", record.getIDNum());\n\t\t\t\tAssert.assertEquals(\"78\", record.getAge());\n\t\t\t\tAssert.assertEquals(\"F\", record.getGender());\n\t\t\t\tAssert.assertEquals(\"B\", record.getRace());\n\t\t\t\tAssert.assertEquals(\"0\", record.getHeight());\n\t\t\t\tAssert.assertEquals(\"0\", record.getWeight());\n\t\t\t\tAssert.assertEquals(\"0\", record.getBMI());\n\t\t\t\tAssert.assertNull(record.getCYP2C9());\n\t\t\t\tAssert.assertNull(record.getC2C9());\n\t\t\t\tAssert.assertNull(record.getVKOR());\n\t\t\t\tAssert.assertEquals(\"0\", record.getrfCHF());\n\t\t\t\tAssert.assertEquals(\"0\", record.getrfDM());\n\t\t\t\tAssert.assertEquals(\"0\", record.getStatin());\n\t\t\t\tAssert.assertNull(record.getAvgMaint());\n\t\t\t\tAssert.assertNull(record.getAvg1Maint());\n\t\t\t\tAssert.assertEquals(\"0\", record.getAvgOfK());\n\t\t\t\tAssert.assertEquals(\"0\", record.getalcohol());\n\t\t\t\tAssert.assertEquals(\"0\", record.getsmoke());\n\t\t\t\tAssert.assertEquals(\"0\", record.getamiod());\n\t\t\t\tAssert.assertEquals(\"moderat\", record.getCKD());\n\t\t\t\tAssert.assertEquals(\"1\", record.getCKD1());\n\t\t\t\tAssert.assertNull(record.getlogdose());\n\t\t\t\tAssert.assertNull(record.getsqdose());\n\t\t\t}\n\t\t\t// Increment total number of handled records.\n\t\t\tnumOfParsedRecords++;\n\t\t}", "@Test\r\n public void testRetrieve() {\r\n\r\n PaymentDetailPojo expResult = instance.save(paymentDetail1);\r\n assertEquals(expResult, instance.retrieve(paymentDetail1));\r\n }", "@Test\n\tpublic void checkIfThereIsRecords() {\n\n\t\tfinal HandlingRecords handlingRecords = new HandlingRecords(entityManagerFactory.createEntityManager());\n\n\t\t// there should be a least 3 because of the import of data.\n\t\tfinal List<Record> sampleOfEntities = handlingRecords.findASampleOfEntities(3);\n\n\t\tassertTrue(sampleOfEntities != null && sampleOfEntities.size() == 3);\n\n\t}", "@Test\n public void getAllMedicalRecords() {\n List<MedicalRecord> records = service.getAllMedicalRecords();\n\n //Assert\n assertEquals(2, records.size());\n }", "@Test\n public void testDAM32001001() {\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n // This call brings te order details from various tables into single entity using join\n OrderMB3ListPage orderMB3ListPage = dam3IndexPage.dam32001001Click();\n\n // Expected order details\n // the string is of the format\n // ORDER STATUS NAME, ITEM CODE, ITEM NAME, CATEGORY CODE, CATEGORY NAME, MEMO\n String expectedOrdeDetails = \"Order accepted, ITM0000001, Orange juice, CTG0000001, Drink, dummy1\";\n\n // get the details of the specified order in a single string\n String actualOrderDetails = orderMB3ListPage.getOrderDetails(1);\n\n // confirm the details of the order fetched from various tables\n assertThat(actualOrderDetails, is(expectedOrdeDetails));\n\n // confirmation for some more order details....\n\n expectedOrdeDetails = \"Stock checking, ITM0000002, NotePC, CTG0000002, PC, \";\n actualOrderDetails = orderMB3ListPage.getOrderDetails(2);\n assertThat(actualOrderDetails, is(expectedOrdeDetails));\n\n expectedOrdeDetails = \"Item Shipped, ITM0000003, Car, CTG0000003, Hot selling, dummy3\";\n actualOrderDetails = orderMB3ListPage.getOrderDetails(3);\n assertThat(actualOrderDetails, is(expectedOrdeDetails));\n\n expectedOrdeDetails = \"Order accepted, ITM0000001, Orange juice, CTG0000001, Drink, dummy4\";\n actualOrderDetails = orderMB3ListPage.getOrderDetails(4);\n assertThat(actualOrderDetails, is(expectedOrdeDetails));\n }", "public void testAuditDetail_Accuracy() {\r\n assertNotNull(\"The AuditDetail instance should be created.\", auditDetail);\r\n }", "@Test\r\n\tvoid testImportSingleRecordShouldCreateAPersonAndReturnTrue() {\r\n\t\tRecordParser parser = new RecordParser();\r\n\t\tassertTrue(parser.importSingleRecord(\"Cruise | Tom | Male | Green | 1962-07-03\"));\r\n\t\tassertEquals(1, parser.getPeople().size());\r\n\t}", "@Test\n\tpublic void testRecordSelect() throws Exception {\n\t\tfinal String module = \"-------------- MODULE Testing ----------------\\n\"\n\t\t\t\t+ \"ASSUME [a |-> 1, b |-> TRUE].a = 1 \\n\"\n\t\t\t\t+ \"=================================\";\n\n\t\tfinal String expected = \"MACHINE Testing\\n\"\n\t\t\t\t+ \"PROPERTIES rec(a : 1, b : TRUE)'a = 1\\n\"\n\t\t\t\t+ \"END\";\n\t\tcompare(expected, module);\n\t}", "@Test\n public void testViewRawMaterialWithSelectType1() throws Exception {\n System.out.println(\"viewRawMaterialWithSelectType\");\n Long factoryId = 1L;\n Collection<FactoryRawMaterialEntity> result = PurchaseOrderManagementModule.viewRawMaterialWithSelectType(factoryId);\n assertFalse(result.isEmpty());\n }", "@Then(\"List Employee specific details\")\r\n\tpublic void list_Employee_specific_details() {\n\t\trestTester.getSpecificEmployeeIdRecord(generatedEmployeeId);\r\n\t\tSystem.out.println(restTester.returnResponseAsString());\r\n\t\tassertTrue(restTester.returnResponseAsString().contains(\"false\"));\r\n\t}", "@Test\n /* testUpdateRecord\n * testing update exist record in Save.Json\n * */\n public void testUpdateRecord() {\n testAddRecord();\n\n score = 300;\n level = 3;\n name = \"test1\";\n\n saveReader.updateRecord(indexOfReturned, \"name\", name);\n assertEquals(\"True : name field updated successfully\", name, saveReader.LoadsList.get(indexOfReturned).name);\n\n saveReader.updateRecord(indexOfReturned, \"score\", score);\n assertEquals(\"True : score field updated successfully\", score, saveReader.LoadsList.get(indexOfReturned).score);\n\n saveReader.updateRecord(indexOfReturned, \"level\", level);\n assertEquals(\"True : level field updated successfully\", level, saveReader.LoadsList.get(indexOfReturned).level);\n }", "@org.junit.Test\n\tpublic void test() {\n\t\tassertEquals(\"\", crud.read());\n\t}", "@Override\n\tpublic void test00500Add_Validate_ExistingRecord() throws Exception\n\t{\n\t}", "public void testDetails() {\n\t\tassertEquals(\"Incorrect target\", TARGET, this.aggregate.getTarget());\n\t\tassertEquals(\"Incorrect change description\", CHANGE_DESCRIPTION, this.aggregate.getChangeDescription());\n\t}", "@Test\n public void testAddRecord() throws Exception {\n // Save pat1\n pat1.save();\n\n // pat1 should start with no records\n assert (pat1.getHealthRecords().length == 0);\n\n // Add one health record\n HealthRecordController.getInstance().addRecord(pat1.getPatientID(), new Date(), 1, 1, 1, 1);\n assert (pat1.getHealthRecords().length == 1);\n\n // Add another health record\n HealthRecordController.getInstance().addRecord(pat1.getPatientID(), new Date(), 2, 2, 2, 2);\n assert (pat1.getHealthRecords().length == 2);\n\n // Delete them both\n HealthRecord[] hrs = HealthRecordController.getInstance().getRecordsForPatient(pat1.getPatientID());\n for (HealthRecord hr : hrs) {\n hr.delete();\n }\n\n // Now this patient should have no HealthRecords\n assert (pat1.getHealthRecords().length == 0);\n }", "private void TestBasic() {\n\n\t\tPartTimeEmployee e = new PartTimeEmployee(1, \"One\", 40, 8.75);\n\t\tString result = new String();\n\t\t\n\t\tresult = \" Constructor :\\n\"\n\t\t\t+ String.format(\" %s\\n\", \"PartTimeEmployee(1, \\\"One\\\", 40, 8.75)\")\n\t\t\t+ String.format(\" toString() :\\n\")\t\t\n\t\t\t+ String.format(\" %s\\n\", e)\n\t\t\t+ String.format(\" Attributes :\\n\")\t\n\t\t\t+ String.format(\" %-12s : %s\\n\", \"id\", e.getID())\n\t\t\t+ String.format(\" %-12s : %s\\n\", \"name\", e.getName())\n\t\t\t+ String.format(\" %-12s : %s\\n\", \"hours\", e.getHours())\n\t\t\t+ String.format(\" %-12s : %s\\n\", \"rate\", e.getRate())\n\t\t\t+ String.format(\" Calculated attributes:\\n\")\t\n\t\t\t+ String.format(\" %-12s : %,.2f\\n\", \"salary\", e.calculateSalary());\n\t\tout.print(result);\n\t}", "@Test\n public void getRecipeByID_CorrectInformation(){\n int returned = testDatabase.addRecipe(testRecipe);\n Recipe retrieved = testDatabase.getRecipe(returned);\n assertEquals(\"getRecipeByID - Correct Title\", recipeTitle, retrieved.getTitle());\n assertEquals(\"getRecipeByID - Correct Servings\", 1, retrieved.getServings(), 0);\n assertEquals(\"getRecipeByID - Correct Prep Time\", 30, retrieved.getPrep_time(), 0);\n assertEquals(\"getRecipeByID - Correct Total Time\", 60, retrieved.getTotal_time(), 0);\n assertEquals(\"getRecipeByID - Correct Favorited\", false, retrieved.getFavorited());\n assertEquals(\"getRecipeByID - Ingredient Unit\", \"cups\", retrieved.getIngredientList().get(0).getUnit());\n assertEquals(\"getRecipeByID - Ingredient Quantity\", 2.0, retrieved.getIngredientList().get(0).getQuantity(), 0);\n assertEquals(\"getRecipeByID - Ingredient Details\", \"White Flour\", retrieved.getIngredientList().get(0).getDetails());\n assertEquals(\"getRecipeByID - First Direction Number\", 1, retrieved.getDirectionsList().get(0).getDirectionNumber());\n assertEquals(\"getRecipeByID - First Direction Text\", \"TestDirection1\", retrieved.getDirectionsList().get(0).getDirectionText());\n assertEquals(\"getRecipeByID - Second Direction Number\", 2, retrieved.getDirectionsList().get(1).getDirectionNumber());\n assertEquals(\"getRecipeByID - Second Direction Text\", \"TestDirection2\", retrieved.getDirectionsList().get(1).getDirectionText());\n }", "@Test\n\tpublic void givenCreateItem_whenValidRecord_ThenSuccess() {\n\t\tHashMap<String, Object> newRecord = getRecordHashMap(20, \"Steak\", \"Meats\", 15.5f);\n\n\t\t// create a new record and extract the ID from the response\n\t\tInteger newId = given().\n\t\t\tcontentType(ContentType.JSON).\n\t\t\tbody(newRecord).\n\t\twhen().\n\t\t\tpost(\"/\").\n\t\tthen().\n\t\t\tstatusCode(HttpStatus.CREATED.value()).\n\t\t\tcontentType(ContentType.JSON).\n\t\t\textract().\n\t\t\tpath(\"id\");\n\n\t\tnewRecord = setRecordId(newRecord, newId);\n\n\t\t// verify that the new record is created\n\t\tHashMap<String, Object> actual = given().\n\t\t\tpathParam(\"id\", newId).\n\t\twhen().\n\t\t\tget(\"/{id}\").\n\t\tthen().\n\t\t\tstatusCode(HttpStatus.OK.value()).\n\t\t\tcontentType(ContentType.JSON).\n\t\t\textract().path(\"$\");\n\n\t\tassertThat(newRecord).isEqualTo(actual);\n\n\t}", "@Test\n public void testViewRawMaterialWithSelectType2() throws Exception {\n System.out.println(\"viewRawMaterialWithSelectType\");\n Long factoryId = 1L;\n Collection<FactoryRawMaterialEntity> result = PurchaseOrderManagementModule.viewRawMaterialWithSelectType(factoryId);\n assertFalse(result.isEmpty());\n }", "@Test\n public void testDisplay() {\n System.out.println(\"display\");\n Member instance = member;\n \n String result = instance.display();\n String expResult = \"id: myId name: myName address: \"\n + \"01 London Road, Littlemoore, Oxford dob: 1999-01-01 dor: \"\n + \"2019-11-25 status: APPROVED balance: 120.0\"; \n \n assertEquals(expResult, result);\n }", "@Test\n public void detailsTest() {\n // TODO: test details\n }", "@Test\n public void detailsTest() {\n // TODO: test details\n }", "@Test\r\n\tpublic void testAddObstetricsRecord() {\r\n\t\t\r\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyy-MM-dd\");\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\tc.add(Calendar.MONTH, -1);\r\n\t\tString lmp = dateFormat.format(c.getTime());\t\r\n\t\t\r\n\t\toic.setLmp(lmp);\r\n\t\t\r\n\t\toic.setMultiplicity(\"1\");\r\n\t\tAssert.assertTrue(oic.getMultiplicity().equals(\"1\"));\r\n\t\toic.addObstetricsRecord();\r\n\t\t//LMP wasn't cleared, therefore it errored\r\n\t\tAssert.assertTrue(oic.getLmp().equals(lmp));\r\n\t\t\r\n\t\toic.setWeightGain(\"1\");\r\n\t\tAssert.assertTrue(oic.getWeightGain().equals(\"1\"));\r\n\t\toic.addObstetricsRecord();\r\n\t\t//LMP wasn't cleared, therefore it errored\r\n\t\tAssert.assertTrue(oic.getLmp().equals(lmp));\r\n\t\t\r\n\t\toic.setNumHoursInLabor(\"1\");\r\n\t\tAssert.assertTrue(oic.getNumHoursInLabor().equals(\"1\"));\r\n\t\toic.addObstetricsRecord();\r\n\t\t//LMP wasn't cleared, therefore it errored\r\n\t\tAssert.assertTrue(oic.getLmp().equals(lmp));\r\n\t\t\r\n\t\toic.setNumWeeksPregnant(\"39\");\r\n\t\tAssert.assertTrue(oic.getNumWeeksPregnant().equals(\"39\"));\r\n\t\toic.addObstetricsRecord();\r\n\t\t//LMP wasn't cleared, therefore it errored\r\n\t\tAssert.assertTrue(oic.getLmp().equals(lmp));\r\n\t\t\r\n\t\toic.setYearOfConception(\"2005\");\r\n\t\tAssert.assertTrue(oic.getYearOfConception().equals(\"2005\"));\r\n\t\toic.addObstetricsRecord();\r\n\t\t//LMP wasn't cleared, therefore it errored\r\n\t\tAssert.assertTrue(oic.getLmp().equals(lmp));\r\n\t\t\r\n\t\toic.setDeliveryType(\"Vaginal Delivery\");\t\t\r\n\t\toic.addPregnancyRecord();\r\n\t\t\r\n\t\toic.setYearOfConception(null);\r\n\t\toic.setNumWeeksPregnant(null);\r\n\t\toic.setNumHoursInLabor(null);\r\n\t\toic.setWeightGain(null);\r\n\t\toic.setMultiplicity(null);\r\n\t\toic.setLmp(\"\");\r\n\t\toic.addObstetricsRecord();\r\n\t\tAssert.assertTrue(oic.getLmp().equals(\"\"));\r\n\t\t\r\n\t\toic.setLmp(null);\r\n\t\toic.addObstetricsRecord();\r\n\t\tAssert.assertTrue(oic.getLmp() == null);\r\n\t\t\r\n\t\toic.setLmp(\"a\");\r\n\t\toic.addObstetricsRecord();\r\n\t\tAssert.assertTrue(oic.getLmp().equals(\"a\"));\r\n\t\t\r\n\t\toic.setLmp(lmp);\r\n\t\toic.addObstetricsRecord();\r\n\t\tAssert.assertTrue(oic.getLmp().equals(\"\"));\r\n\t}", "@Test()\n public void PatientRecord() {\n LoginPage login = new LoginPage(driver);\n DashboardItemsPage dash = new DashboardItemsPage(driver);\n FindPatientRecordPage fprecord = new FindPatientRecordPage(driver);\n login.LoginToDashboard(\"Admin\", \"Admin123\");\n fprecord.searchPatientRecord(\"Smith\");\n\n Assert.assertEquals(\"Find Patient Record\", \"Find Patient Record\");\n //Assert.assertEquals(Collections.singleton(fprecord.getPageTitle()), \"Find Patient Record\");\n fprecord.getPageTitle();\n }", "@Test\n\tpublic void test_04() {\n\n\t\t//Json data configuration\n\t\tcomplexobjectinformationclass childdataobject = new complexobjectinformationclass();\n\t\tcomplexobjectclass dataobject = new complexobjectclass();\n\n\t\tchilddataobject.setEmail(\"complex@complex.com\");\n\t\tchilddataobject.setPhone(\"12300000\");\n\t\tchilddataobject.setAddress(\"Bangladesh\");\n\n\t\tdataobject.setId(\"2\");\n\t\tdataobject.setAuthor(\"ataure\");\n\t\tdataobject.setTitle(\"This is title\");\n\t\tdataobject.setinformation(childdataobject);\n\n\n\t\t//Request body\n\t\tResponse reponse = given().\n\t\t\t\twhen().\n\t\t\t\tcontentType(ContentType.JSON).\n\t\t\t\tbody(dataobject).\n\t\t\t\tpost(\"http://localhost:3000/posts\");\n\n\t\tSystem.out.println(\"updated response data \"+ reponse.asString());\t\t\n\t}", "@Test\n\tpublic void specificationsTest() {\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tRecord record = TestHelper.mockRecord();\n\t\t\trecord.setVisible(true);\n\t\t\tentityManager.persist(record);\n\t\t}\n\n\t\t// and 2 private records\n\t\tfor (int i = 0; i < 2; i++) {\n\t\t\tRecord record = TestHelper.mockRecord();\n\t\t\trecord.setVisible(false);\n\t\t\tentityManager.persist(record);\n\t\t}\n\n\t\t// found 3 visible records\n\t\tRecordSpecification visibleSpec = new RecordSpecification();\n\t\tvisibleSpec.add(new SearchCriteria(\"visible\", true, SearchOperation.EQUAL));\n\t\tList<Record> visibleRecord = repository.findAll(visibleSpec);\n\t\tassertThat(visibleRecord).hasSize(3);\n\n\t\t// found 2 private records\n\t\tRecordSpecification privateSpecs = new RecordSpecification();\n\t\tprivateSpecs.add(new SearchCriteria(\"visible\", false, SearchOperation.EQUAL));\n\t\tList<Record> privateRecords = repository.findAll(privateSpecs);\n\t\tassertThat(privateRecords).hasSize(2);\n\t}", "public void testAll() {\r\n // Test dao.add\r\n ExtraPart part = new ExtraPart();\r\n part.setAttachPoint(new Coordinate(\"312,94\"));\r\n part.setImage(new ImageInfo(\"images/parts/extrapart1.png\",320,240));\r\n\r\n assertEquals(-1, part.getId());\r\n assertTrue(dao.add(part));\r\n assertTrue(part.getId() >= 0);\r\n\r\n // Test dao.getAll\r\n ArrayList<ExtraPart> parts = dao.getAll();\r\n assertEquals(1, parts.size());\r\n ExtraPart copy = parts.iterator().next();\r\n assertEquals(part.getId(), copy.getId());\r\n assertEquals(part.getAttachPoint(), copy.getAttachPoint());\r\n assertEquals(part.getImage(), copy.getImage());\r\n }", "List<Basicinfo> selectByExample(BasicinfoCriteria example);", "public void testInterpretingBasicExample1()\n {\n try {\n SalesFile t = new SalesFile(\"samples/data/in/base.dat\", AppConfig.fieldDelimiter);\n t.read();\n assertEquals(t.getTotalSalesman(), 2);\n assertEquals(t.getTotalCustomers(), 2);\n assertEquals(t.getMostExpensiveSaleId(), \"10\");\n assertEquals(t.getWorstSalesman(), \"Renato\");\n } catch(RecordInvalidTokenException ex) {\n assertTrue(\"This file is well formed, but something is wrong!\", false);\n } catch(FileNotFoundException e) {\n assertTrue(\"File must exist to complete the test!\", false);\n } catch(IOException e) {\n assertTrue(\"IO exception!\", false);\n }\n }", "DescribeRecordResult describeRecord(DescribeRecordRequest describeRecordRequest);", "public static void main(String[] args) \r\n\t{\n Myrecord me=new Myrecord();\r\n me.name=\"kanna\";\r\n me.rollno=56;\r\n me.marks=100;\r\n \r\n \t me.display();\r\n \t\r\n\t}", "@Test\r\n public void testSave() {\r\n\r\n PaymentDetailPojo result = instance.save(paymentDetail1);\r\n assertTrue(paymentDetail1.hasSameParameters(result));\r\n assertTrue(result.getId() > 0);\r\n }", "@Test\n void getByIdSuccess() {\n User retrievedUser = (User) dao.getById(1);\n //User retrievedUser = dao.getById(1);\n assertEquals(\"Dave\", retrievedUser.getFirstName());\n assertEquals(\"Queiser\", retrievedUser.getLastName());\n }", "public void testOneTable() {\n\n String\tsql\t= \"SELECT AD_Table_ID, TableName FROM AD_Table WHERE IsActive='Y'\";\n AccessSqlParser\tfixture\t= new AccessSqlParser(sql);\n\n assertEquals(\"AccessSqlParser[AD_Table|0]\", fixture.toString());\n }", "@Test\r\n\tpublic void testAddPregnancyRecord() {\r\n\t\t\r\n\t\toic.addPregnancyRecord();\r\n\t\tAssert.assertTrue(oic.getDisplayedPregnancies().isEmpty());\r\n\t\t\r\n\t\toic.setMultiplicity(\"2\");\r\n\t\toic.addPregnancyRecord();\r\n\t\tAssert.assertTrue(oic.getDisplayedPregnancies().isEmpty());\r\n\t\t\r\n\t\toic.setWeightGain(\"12.5\");\r\n\t\toic.addPregnancyRecord();\r\n\t\tAssert.assertTrue(oic.getDisplayedPregnancies().isEmpty());\r\n\t\t\r\n\t\toic.setNumHoursInLabor(\"-1\");\r\n\t\toic.addPregnancyRecord();\r\n\t\tAssert.assertTrue(oic.getDisplayedPregnancies().isEmpty());\r\n\t\t\r\n\t\toic.setNumWeeksPregnant(\"39\");\r\n\t\toic.addPregnancyRecord();\r\n\t\tAssert.assertTrue(oic.getDisplayedPregnancies().isEmpty());\r\n\t\t\r\n\t\t\r\n\t\toic.setYearOfConception(\"a\");\r\n\t\toic.addPregnancyRecord();\r\n\t\tAssert.assertTrue(oic.getDisplayedPregnancies().isEmpty());\r\n\t\t\r\n\t\toic.setYearOfConception(\"2005\");\r\n\t\toic.setDeliveryType(\"Vaginal Delivery\");\r\n\t\tAssert.assertTrue(oic.getDeliveryType().equals(\"Vaginal Delivery\"));\r\n\t\tAssert.assertTrue(oic.getDisplayedPregnancies().isEmpty());\t\t\r\n\t\t\r\n\t\toic.setYearOfConception(\"101\");\r\n\t\tAssert.assertTrue(oic.getDisplayedPregnancies().isEmpty());\r\n\t\t\r\n\t\toic.setYearOfConception(\"2005\");\r\n\t\toic.setNumHoursInLabor(\"3\");\r\n\t\toic.addPregnancyRecord();\r\n\t\tAssert.assertFalse(oic.getDisplayedPregnancies().isEmpty());\r\n\t}", "@Test\n public void testGetApartmentDetails() throws SQLException {\n System.out.println(\"getApartmentDetails\");\n int apartmentid = 2;\n ApartmentBLL instance = new ApartmentBLL();\n ResultSet result = instance.getApartmentDetails(apartmentid);\n assertTrue(result.next());\n \n }", "@Test\n public void addRecipe_CorrectInformation(){\n int returned = testDatabase.addRecipe(testRecipe);\n Recipe retrieved = testDatabase.getRecipe(returned);\n\n // Check all recipe fields are accurate\n assertEquals(\"addRecipe - Correct Title\", recipeTitle, retrieved.getTitle());\n assertEquals(\"addRecipe - Correct Servings\", 1, retrieved.getServings(), 0);\n assertEquals(\"addRecipe - Correct prep_time\", 30, retrieved.getPrep_time(), 0);\n assertEquals(\"addRecipe - Correct total_time\", 60, retrieved.getTotal_time(), 0);\n assertEquals(\"addRecipe - Correct Favorited\", false, retrieved.getFavorited());\n assertEquals(\"addRecipe - Correct Ingredient Unit\", \"cups\", retrieved.getIngredientList().get(0).getUnit());\n assertEquals(\"addRecipe - Correct Ingredient Quantity\", 2.0, retrieved.getIngredientList().get(0).getQuantity(), 0);\n assertEquals(\"addRecipe - Correct Ingredient Details\", \"White Flour\", retrieved.getIngredientList().get(0).getDetails());\n assertEquals(\"addRecipe - Correct First Direction Number\", 1, retrieved.getDirectionsList().get(0).getDirectionNumber());\n assertEquals(\"addRecipe - Correct First Direction Text\", \"TestDirection1\", retrieved.getDirectionsList().get(0).getDirectionText());\n assertEquals(\"addRecipe - Correct Second Direction Number\", 2, retrieved.getDirectionsList().get(1).getDirectionNumber());\n assertEquals(\"addRecipe - Correct Second Direction Text\", \"TestDirection2\", retrieved.getDirectionsList().get(1).getDirectionText());\n }", "@Test\n\tpublic void testGetPatientDetail_1()\n\t\tthrows Exception {\n\t\tPatientAccessor fixture = new PatientAccessor(\"\");\n\t\tString hospitalNumber = \"\";\n\n\t\tPatient result = fixture.getPatientDetail(hospitalNumber);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.IllegalStateException: _out shouldn't be null\n\t\t// at com.mongodb.DBPort.go(DBPort.java:110)\n\t\t// at com.mongodb.DBPort.call(DBPort.java:74)\n\t\t// at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:286)\n\t\t// at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:257)\n\t\t// at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:310)\n\t\t// at com.mongodb.DB.command(DB.java:274)\n\t\t// at com.mongodb.DB.command(DB.java:256)\n\t\t// at com.mongodb.DB.command(DB.java:313)\n\t\t// at com.mongodb.Mongo.getDatabaseNames(Mongo.java:393)\n\t\t// at com.comp2014group5.generic_database.FormDatabaseMongoImpl.<init>(FormDatabaseMongoImpl.java:24)\n\t\t// at com.comp2014.group5.patient_database.PatientAccessor.<init>(PatientAccessor.java:29)\n\t\tassertNotNull(result);\n\t}", "@Test\n public void printPetDetailedListTest() {\n\n }", "PrescriptionVerifyRecordDetail selectByPrimaryKey(String id);", "public void testModel(Context context) {\n // insert our test records into the database\n MovieDBHelper dbHelper = new MovieDBHelper(context);\n SQLiteDatabase db = dbHelper.getWritableDatabase();\n\n\n ContentValues movieValues = TestUtilities.createMovieValues();\n long movieRowId = db.insert(MovieContract.MovieEntry.TABLE_NAME, null, movieValues);\n // Verify we got a row back.\n assertTrue(\"Error: Failure to insert records into movie table\", movieRowId != -1);\n\n ContentValues trailerValues = TestUtilities.createTrailerValues();\n long trailerRowId = db.insert(MovieContract.TrailerEntry.TABLE_NAME, null, trailerValues);\n // Verify we got a row back.\n assertTrue(\"Error: Failure to insert trailer records\", trailerRowId != -1);\n\n //[uery the database and receive a Cursor back\n Cursor cursor = db.query(MovieContract.MovieEntry.TABLE_NAME, // Table to Query\n null, // all columns\n null, // Columns for the \"where\" clause\n null, // Values for the \"where\" clause\n null, // columns to group by\n null, // columns to filter by row groups\n null // sort order\n );\n // Move the cursor to a valid database row\n assertTrue(\"Error: No Records returned from location query\", cursor.moveToFirst());\n\n // Validate data in resulting Cursor with the original ContentValues\n TestUtilities.validateCurrentRecord(\"Error: Movie Query Validation Failed\", cursor, movieValues);\n\n\n // Move the cursor to demonstrate that there is only one record in the database\n assertFalse(\"Error: More than one record returned from location query\",\n cursor.moveToNext());\n\n // Finally, close the cursor and database\n cursor.close();\n db.close();\n\n\n }", "@Test\n void getByIdSuccess() {\n //Get User\n GenericDao<User> userDao = new GenericDao(User.class);\n User user = userDao.getById(2);\n\n //Create Test Car\n Car testCar = new Car(1,user,\"2016\",\"Jeep\",\"Wrangler\",\"1C4BJWFG2GL133333\");\n\n //Ignore Create/Update times\n testCar.setCreateTime(null);\n testCar.setUpdateTime(null);\n\n //Get Existing Car\n Car retrievedCar = carDao.getById(1);\n assertNotNull(retrievedCar);\n\n //Compare Cars\n assertEquals(testCar,retrievedCar);\n }", "public static void showResultPerson( Result<Record> result){\n \t for (Record r : result) {\n// Integer id = r.getValue(PERSON.PERSO_ID);\n String firstName = r.getValue(PERSON.PERSO_FIRSTNAME);\n String lastName = r.getValue(PERSON.PERSO_LASTNAME);\n\n System.out.println(\"Name : \" + firstName + \" \" + lastName);\n }\n }", "@Test\n public void testAll() throws ParseException {\n testCreate();\n testExists(true);\n testGetInfo(false);\n testUpdate();\n testGetInfo(true);\n testDelete();\n testExists(false);\n }", "public void testProductionRecord() {\n // test constructor used when creating production records from user interface\n Integer numProduced = 3; // this will come from the combobox in the UI\n\n for (int productionRunProduct = 0; productionRunProduct < numProduced; productionRunProduct++) {\n ProductionRecord pr = new ProductionRecord(0);\n System.out.println(pr.toString());\n }\n\n ProductionRecord pr = new ProductionRecord(0, 3, \"1\", new Date(System.currentTimeMillis()));\n\n textLog.setText(textLog.getText() + pr.toString());\n textLog.setText(textLog.getText() + \"\\n\" + pr.getProductionNumber());\n textLog.setText(textLog.getText() + \"\\n\" + pr.getProductID());\n textLog.setText(textLog.getText() + \"\\n\" + pr.getSerialnumber());\n textLog.setText(textLog.getText() + \"\\n\" + pr.getDateProduced());\n\n }", "@Test\r\n public void testCreate() {\r\n ActivityRecord record = setActivityRecord();\r\n recordDao.create(record);\r\n assertNotNull(record.getId());\r\n }", "@Test\n\tpublic void canFillAllInformation() {\n\t\t\n\t\tuserData John = People.getJohnInfo();\n\t\tboolean expected = true;\n\t\tboolean actual = new AutomationPracticeFormPageObject(driver, baseUrl)\n\t\t.openAutomationWebPage()\n\t\t.inputFirstName(John.getFirstName())\n\t\t.inputLastName(John.getLastName())\n\t\t.selectGender(John.getGender())\n\t\t.selectYearsOfExperience(John.getYearsOfExperience())\n\t\t.inputDate(John.getDate().toString())\n\t\t.selectProfession(John.getProfession())\n\t\t.selectAutomationTool(John.getAutomationTool())\n\t\t.selectContinent(John.getContinent())\n\t\t.selectMultipleContinents(John.getContinentList())\n\t\t.selectSeleniumCommand(John.getSeleniumCommands())\n\t\t.areFieldsCompleted();\n\t\t\n\t\tAssert.assertEquals(actual, expected);\n\t}", "@Test\n public void executeValidSearch_notAllFields(){\n emptySearchFields();\n view.setFloor(1);\n view.setBedrooms(1);\n view.setBathrooms(1);\n presenter.doSearch();\n Assert.assertTrue(presenter.hasNextResult());\n }", "@Test\n void getByIdSuccess() {\n logger.info(\"running getByID test\");\n User retrievedUser = (User)genericDao.getById(2);\n\n assertEquals(\"BigAl\", retrievedUser.getUserName());\n assertEquals(\"Albert\", retrievedUser.getFirstName());\n assertEquals(2, retrievedUser.getId());\n assertEquals(\"Einstein\", retrievedUser.getLastName());\n assertEquals(\"11223\", retrievedUser.getZipCode());\n assertEquals(LocalDate.of(1879,3,14), retrievedUser.getBirthDate());\n\n }", "public void setTestRecordData(TestRecordData trdata) { this.trdata = trdata; }", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyStdSpecificacctsPrepopulatedUserdetails() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the confirmation page of Add new user is getting displayed with prepopulated user details\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUser_Creation()\n\t\t.VerifySpecificAccountsViewNames(userProfile);\t \t \t\t \t \t\t \t \t \t \t\t \t \t\t \t \t\t \t \t\t\n\t}", "@org.junit.Test\r\n public void testGetSingleContact() {\r\n System.out.println(\"getSingleContact\");\r\n String emailid = \"dnv@gmail.com\";\r\n ContactDao instance = new ContactDao();\r\n List<ContactResponse> expResult = new ArrayList<ContactResponse>();\r\n ContactResponse cr = new ContactResponse(\"DN Verma1\",\"dnv@gmail.com\",\"9006847351\",\"DBG\");\r\n expResult.add(cr);\r\n List<ContactResponse> result = instance.getSingleContact(emailid);\r\n String s=\"No records Exists\";\r\n if(result.get(0).getMessage()==null)\r\n {\r\n assertEquals(expResult.get(0).getName(), result.get(0).getName());\r\n assertEquals(expResult.get(0).getMessage(), result.get(0).getMessage());\r\n assertEquals(expResult.get(0).getEmail(), result.get(0).getEmail());\r\n assertEquals(expResult.get(0).getCity(), result.get(0).getCity());\r\n assertEquals(expResult.get(0).getContact(), result.get(0).getContact());\r\n }\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "@Test\n public void testSelectSpecificRow() throws SQLException {\n // Arrange\n CommitStructure commit = getSampleCommit();\n String commitID = commit.getCommitID();\n // Act\n mysqlDatabase.insertCommitToDatabase(commit);\n CommitStructure commits = mysqlDatabase.selectSpecificRow(commitID);\n // Assert\n assertEquals(commits.getCommitID() , commitID);\n }", "@Test\r\n public void testFindActivityRecordByUser() {\r\n ActivityRecord rec1 = setActivityRecord();\r\n rec1.setBurnedCalories(20);\r\n recordDao.create(rec1);\r\n assertNotNull(recordDao.findActivityRecord(rec1.getId()));\r\n\r\n ActivityRecord rec2 = setActivityRecord();\r\n rec2.setBurnedCalories(40);\r\n recordDao.create(rec2);\r\n assertNotNull(recordDao.findActivityRecord(rec2.getId()));\r\n\r\n List<ActivityRecord> records = recordDao.findRecordsByUser(user);\r\n assertTrue(!records.isEmpty());\r\n assertTrue(records.contains(rec1));\r\n assertTrue(records.contains(rec2));\r\n }", "@Test\n\tpublic void findQCIndividualNotesTest(){\n//\t\tlog.trace(\"GETTING individual notes by Trainee\");\n\t\tfinal short weekNum = 2;\n\t\t\n\t\t// get notes\n\t\tList<Note> notes = noteDao.findQCIndividualNotes(TEST_TRAINEE_ID, weekNum);\n\t\t\n\t\t// compare with expected\n\t\tassertEquals(notes.size(),1);\n\t\tassertEquals(notes.get(0).getContent(),\"technically weak on SQL.\");\n\t}", "boolean test(final T record, final User user, final Context context);", "private void loadRecordDetails() {\n updateRecordCount();\n loadCurrentRecord();\n }", "@org.junit.Test\r\n public void testCreate() {\r\n System.out.println(\"create\");\r\n ContactRequest Crequest = new ContactRequest(\"DN Verma\",\"dnvv@gmail.com\",\"9006745345\",\"faizabad\");\r\n ContactDao instance = new ContactDao();\r\n List<ContactResponse> expResult = new ArrayList<ContactResponse>();;\r\n List<ContactResponse> result = instance.create(Crequest);\r\n expResult=instance.getSingleContact(\"dnvv@gmail.com\");\r\n String s=\"Duplicate entry 'dnvv@gmail.com' for key 1\";\r\n if(!result.get(0).getMessage().equals(s))\r\n {\r\n assertEquals(expResult.get(0).getName(), result.get(0).getName());\r\n assertEquals(expResult.get(0).getEmail(), result.get(0).getEmail());\r\n assertEquals(expResult.get(0).getCity(), result.get(0).getCity());\r\n assertEquals(expResult.get(0).getContact(), result.get(0).getContact());\r\n }\r\n }", "public void displayRecords() {\n\t\tSystem.out.println(\"****Display Records****\");\n\t\tSystem.out.print(\"Firstname \\tLastname \\tAddress \\t\\tCity \\t\\tState \\t\\t\\tZIP \\t\\tPhone \\n\");\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tif (details[i] == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSystem.out.println(details[i]);\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void testDetails() throws InvalidEmailException, InvalidPhoneException, Exception {\n\t\tSystem.out.println(\"======Enter test details:======\");\n\t\tSystem.out.println(\"1.Fetch patient details by email:\");\n\t\tSystem.out.println(\"2.Fetch patient details by phone:\");\n\t\tSystem.out.println(\"3.EXIT\");\n\t\tSystem.out.println(\"Enter your choice:\");\n\t\tint choice = Integer.parseInt(sc.nextLine());\n\n\t\tboolean flag = true;\n\t\tdo {\n\t\t\tswitch (choice) {\n\t\t\tcase 1:\n\t\t\t\tSystem.out.println(\"Enter Email\");\n\t\t\t\tString email = sc.nextLine();\n\t\t\t\tSystem.out.println(email + \" hello\");\n\t\t\t\taddtest(email, \"e\");\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tSystem.out.println(\"Enter phone no:\");\n\t\t\t\tString phone = sc.nextLine();\n\t\t\t\taddtest(phone, \"p\");\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.println(\"returning\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(\"======Enter test details:======\");\n\t\t\tSystem.out.println(\"1.Fetch patient details by email:\");\n\t\t\tSystem.out.println(\"2.Fetch patient details by phone:\");\n\t\t\tSystem.out.println(\"3.EXIT\");\n\t\t\tSystem.out.println(\"Enter your choice:\");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\t\t} while (flag);\n\t}", "@Test\n public void findSample_whenNoFieldsAreSelected_sampleReturnedWithAllFields() {\n MolecularSampleDto molecularSampleDto = molecularSampleRepository.findOne(\n testMolecularSample.getUuid(),\n new QuerySpec(MolecularSampleDto.class)\n );\n \n assertNotNull(molecularSampleDto);\n assertEquals(testMolecularSample.getUuid(), molecularSampleDto.getUuid());\n assertEquals(TEST_MOLECULAR_SAMPLE_NAME, molecularSampleDto.getName());\n assertEquals(TEST_MATERIAL_SAMPLE_UUID.toString(), molecularSampleDto.getMaterialSample().getId());\n assertEquals(TEST_MOLECULAR_SAMPLE_SAMPLE_TYPE, molecularSampleDto.getSampleType());\n }", "public void testMatchCRUD() {\n assertFalse(dbHelper.mMatchTable.hasData());\n\n // Create\n\n // Read\n\n // Update\n\n // Delete\n dbHelper.mMatchTable.deleteAll();\n assertFalse(dbHelper.mMatchTable.hasData());\n }", "@Test\n public void testPersonReturn(){\n// System.out.println(\"------->\"+ mHbParam.getId());\n }", "@Test\n public void test4FindPk() {\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n SpecialityDTO respuesta = dao.findPk(\"telecomunicaciones\");\n assertEquals(respuesta,spec2);\n }", "@Test\n public void test2(){\n String sql = \"select order_id orderID, order_name orderName, order_date orderDate from order_table where order_id = ?\";\n Order order = getOrder(sql, 4);\n System.out.println(order);\n }", "int insert(Basicinfo record);", "private void testRow( QuerySet aQuerySet, String aPartDescription, int aRemoveQty,\n String aPartSerialOff, String aCondReasonOff, int aWarrentyCoverage,\n String aShedPartKey ) {\n\n Assert.assertEquals( \"part_description\", aPartDescription,\n aQuerySet.getString( \"part_description\" ) );\n Assert.assertEquals( \"removed_quantity\", aRemoveQty, aQuerySet.getInt( \"removed_quantity\" ) );\n\n Assert.assertEquals( \"part_serial_off\", aPartSerialOff,\n aQuerySet.getString( \"part_serial_off\" ) );\n Assert.assertEquals( \"cond_reason_off\", aCondReasonOff,\n aQuerySet.getString( \"cond_reason_off\" ) );\n Assert.assertEquals( \"warranty_coverage\", aWarrentyCoverage,\n aQuerySet.getInt( \"warranty_coverage\" ) );\n Assert.assertEquals( \"sched_part_key\", aShedPartKey,\n aQuerySet.getString( \"sched_part_key\" ) );\n }", "@Test\n public void selectById() {\n }", "@Test\n public void test_singleRetrieve_withoutParens_ParamQuery() {\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 Map<String, Object> recordMap = null;\n BridgeError expectedError = null;\n try {\n Record record = getAdapter().retrieve(request);\n } catch (BridgeError e) {\n expectedError = e;\n }\n\n assertNotNull(expectedError);\n }", "@Test\n public void getAllRecipes_RecipeInfo(){\n int returned = testDatabase.addRecipe(testRecipe);\n ArrayList<Recipe> allRecipes = testDatabase.getAllRecipes();\n Recipe retrieved = allRecipes.get(allRecipes.size()-1);\n //Retrieved should now contain all the same information as testRecipe\n assertEquals(\"getAllRecipes - Correct Title\", recipeTitle, retrieved.getTitle());\n assertEquals(\"getAllRecipes - Correct Servings\", 1, retrieved.getServings(), 0);\n assertEquals(\"getAllRecipes - Correct Prep Time\", 30, retrieved.getPrep_time(), 0);\n assertEquals(\"getAllRecipes - Correct Total Time\", 60, retrieved.getTotal_time(), 0);\n assertEquals(\"getAllRecipes - Correct Favorited\", false, retrieved.getFavorited());\n }", "public static void main(String[] args)\n\t{\n\t\tRecordDefinition recordDef = new RecordDefinition();\n\n\t\trecordDef.addFieldDefinition(000, Long.TYPE, \"Time\");\n\t\trecordDef.addFieldDefinition(001, Double.TYPE, \"Velocity\");\n\t\trecordDef.addFieldDefinition(002, Double.TYPE, \"Altitude\");\n\t\trecordDef.addFieldDefinition(003, Double.TYPE, \"Pressure\");\n\t\trecordDef.addFieldDefinition(004, Double.TYPE, \"Temperature\");\n\t\trecordDef.addFieldDefinition(005, Double.TYPE, \"Attitude\");\n\n\n\t\tRecord record = new Record(recordDef);\n\t\t//Should have all fields and no values\n\t\tSystem.out.println(record);\n\t\t\n\t\trecord.setValueByCode(0,1);\n\t\trecord.setValueByCode(1,1);\n\t\trecord.setValueByCode(2,1);\n\t\trecord.setValueByCode(3,1);\n\t\trecord.setValueByCode(4,1);\n\t\trecord.setValueByCode(5,1);\n\t\t\n\t\t//Should have all fields the fields set now\n\t\tSystem.out.println(record);\n\n\t}", "public void testInterpretingBasicExample2()\n {\n try {\n SalesFile t = new SalesFile(\"samples/data/in/base_2.dat\", AppConfig.fieldDelimiter);\n t.read();\n assertEquals(t.getTotalSalesman(), 2);\n assertEquals(t.getTotalCustomers(), 3);\n assertEquals(t.getMostExpensiveSaleId(), \"08\");\n assertEquals(t.getWorstSalesman(), \"Diego\");\n } catch(RecordInvalidTokenException ex) {\n assertTrue(\"This file is well formed, but something is wrong!\", false);\n } catch(FileNotFoundException e) {\n assertTrue(\"File must exist to complete the test!\", false);\n } catch(IOException e) {\n assertTrue(\"IO exception!\", false);\n }\n }", "@Test\n\t\tpublic void testGetAllMedicalAct() {\n\t\t\tfor (int i =0; i<10;i++){\n\t\t\t assertEquals(wraRestServer.listMedicalAct().get(i).getId(),medicalActDao.getAll().get(i).getId());\n\t\t}\n\t\t\t\n\t}", "public void testFields()\n {\n TestUtils.testNoAddedFields(getTestedClass(), null);\n }", "@Test\n\tpublic void findOneTest1() {\n\t\tLinija line = linijaService.findOne(1L);\n\t\t\n\t\tassertNotEquals(null, line);\n\t}", "@Test\n\tpublic void testRecord() throws Exception {\n\t\tfinal String module = \"-------------- MODULE Testing ----------------\\n\"\n\t\t\t\t+ \"CONSTANTS k \\n\"\n\t\t\t\t+ \"ASSUME k = [a |-> 1, b |-> TRUE] \\n\"\n\t\t\t\t+ \"=================================\";\n\n\t\tfinal String expected = \"MACHINE Testing\\n\"\n\t\t\t\t+ \"CONSTANTS k\\n\"\n\t\t\t\t+ \"PROPERTIES k : struct(a:INTEGER, b:BOOL) & k = rec(a : 1, b : TRUE) \\n\"\n\t\t\t\t+ \"END\";\n\t\tcompare(expected, module);\n\t}", "@Test\n public void selectById(){\n User user=iUserDao.selectById(\"158271202\");\n System.out.println(user.toString());\n }", "public void testPrintStudentDetails() {\n\t System.out.println(\"printStudentDetails\");\n\t Student instance = student1;\n\t student1.addCourse(course1);\n\t student1.addModule(module1);\n\t instance.printStudentDetails();\n\t }", "public RecordRecord() {\n\t\tsuper(org.jooq.examples.cubrid.demodb.tables.Record.RECORD);\n\t}", "@Test\n\tpublic void findAllIndividualNotesTest(){\n//\t\tlog.trace(\"GETTING individual notes by Batch\");\n\t\t//get batch \n\t\tfinal short weekNum = 2;\n\t\t// get individual notes\n\t\tList<Note> notes = noteDao.findAllIndividualNotes(TEST_TRAINEE_ID, weekNum);\n\t\t\n\t\t// compare with expected\n\t\tassertEquals(notes.size(),1);\n\t\tassertEquals(notes.get(0).getContent(),\"Good communication. Not as confident and less use of technical terms\");\n\t}", "@Test\n\tpublic void test() {\n\t\ttry {\n\t\t\t/**\n\t\t\t * Create a couple of patient and visulaize the attributes\n\t\t\t */\n\t\t\tPatient myPatient = new Patient();\n\t\t\tSystem.out.println(\t\"Patient name:\" + myPatient.getName() + \"\\n\" +\n\t\t\t\t\t\"Patient surname:\" + myPatient.getSurname() + \"\\n\" +\n\t\t\t\t\t\"Patient insurance:\" + myPatient.getInsuranceType() + \"\\n\" +\n\t\t\t\t\t\"Severity level:\" + myPatient.getSeverityLevel().getLevel() + \"\\n\");\n\t\t\t\n\t\t\tPatient mrJackson = new Patient(\"Robert\", \"Jackson\", \"gold\", new SeverityLevel(3));\n\t\t\tSystem.out.println(\t\"Patient name:\" + mrJackson.getName() + \"\\n\" +\n\t\t\t\t\t\"Patient surname:\" + mrJackson.getSurname() + \"\\n\" +\n\t\t\t\t\t\"Patient insurance:\" + mrJackson.getInsuranceType() + \"\\n\" +\n\t\t\t\t\t\"Severity level:\" + mrJackson.getSeverityLevel().getLevel() + \"\\n\");\n\t\t\t/**\n\t\t\t * Verify the system safety in the case where invalid paramenters are passed\n\t\t\t */\n\t\t\ttry {\n\t\t\t\tPatient mrNo = new Patient(\"Robert\", \"Jackson\", \"asdf\", new SeverityLevel(3));\n\t\t\t\tSystem.out.println(\t\"Patient name:\" + mrNo.getName() + \"\\n\" +\n\t\t\t\t\t\t\"Patient surname:\" + mrNo.getSurname() + \"\\n\" +\n\t\t\t\t\t\t\"Patient insurance:\" + mrNo.getInsuranceType() + \"\\n\" +\n\t\t\t\t\t\t\"Severity level:\" + mrNo.getSeverityLevel().getLevel() + \"\\n\");\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Could not create mrNo becaouse an exeption occured\");\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tPatient mrNo = new Patient(\"Robert\", \"Jackson\", \"gold\", new SeverityLevel(7));\n\t\t\t\tSystem.out.println(\t\"Patient name:\" + mrNo.getName() + \"\\n\" +\n\t\t\t\t\t\t\"Patient surname:\" + mrNo.getSurname() + \"\\n\" +\n\t\t\t\t\t\t\"Patient insurance:\" + mrNo.getInsuranceType() + \"\\n\" +\n\t\t\t\t\t\t\"Severity level:\" + mrNo.getSeverityLevel().getLevel() + \"\\n\");\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Could not create mrNo because an exeption occured\");\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Exeptions raised\");\n\t\t\tfail(\"Exeptions raised\");\n\t\t}\n\t\t\n\t\t/**\n\t\t * test update method adding an arrival and a registration event\n\t\t */\n\t\t//TODO;\n\t\t/**\n\t\t * test get arrival time method\n\t\t */\n\t\t\n\t}", "public abstract boolean record();", "@Override\n public String getRecordDetail() {\n return \"[\" + type + \"] \"\n + \"[\" + people + \" pax] \"\n + \"[\" + \"Total: $\" + amount + \"] \"\n + \"[\" + amountToMoney() + \" per person] \"\n + nameList;\n }", "@Test\r\n public void testRead() throws Exception {\r\n System.out.println(\"read\");\r\n int idbureau = 0;\r\n BureauDAO instance = new BureauDAO();\r\n instance.setConnection(dbConnect);\r\n Bureau obj = new Bureau(0,\"Test\",\"000000000\",\"\");\r\n Bureau expResult = instance.create(obj);\r\n idbureau=expResult.getIdbur();\r\n Bureau result = instance.read(idbureau);\r\n assertEquals(\"sigles différents\",expResult.getSigle(), result.getSigle());\r\n assertEquals(\"tel différents\",expResult.getTel(), result.getTel());\r\n //etc\r\n assertEquals(\"id différents\",expResult.getIdbur(),result.getIdbur());\r\n try{\r\n result=instance.read(0);\r\n fail(\"exception d'id inconnu non générée\");\r\n }\r\n catch(SQLException e){}\r\n instance.delete(result);\r\n }", "public ActHiDetailRecord() {\n super(ActHiDetail.ACT_HI_DETAIL);\n }", "@Test\n public void testCreateAndReadPositive() throws Exception{\n Item item = new Item();\n item.setName(\"item\");\n item.setType(ItemTypes.ALCOHOLIC_BEVERAGE);\n itemDao.create(item);\n Assert.assertNotNull(itemDao.read(item.getName()));\n }", "@Test\n\tpublic void testGetObjectByID() throws SQLException\n\t{\n\t\tInventoryItem nail = new Nail(\"asdf\",5,5,5.0,20);\n\t\tResultSet rs = DatabaseGateway.getObjectByID(\"Nail\", nail.id);\n\t\tif(rs.next())\n\t\t{\n\t\t\tassertEquals(rs.getInt(\"id\"),1);\n\t\t\tassertEquals(rs.getInt(\"ManufacturerID\"),5);\n\t\t\tassertEquals(rs.getInt(\"Price\"),5);\n\t\t\tassertEquals(rs.getString(\"UPC\"),\"asdf\");\n\t\t\tassertTrue(rs.getDouble(\"Length\") == 5.0);\n\t\t\tassertEquals(rs.getInt(\"NumberInBox\"), 20);\n\t\t}\n\t}", "@Test\n public void testDAM32101001() {\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n OrderMB3ListPage orderMB3ListPage = dam3IndexPage.dam32101001Click();\n\n String expectedOrdeDetails = \"Order accepted, ITM0000001, Orange juice, CTG0000001, Drink, dummy1\";\n\n // get the details of the specified order in a single string\n String actualOrderDetails = orderMB3ListPage.getOrderDetails(1);\n\n // confirm the details of the order fetched from various tables\n assertThat(actualOrderDetails, is(expectedOrdeDetails));\n\n orderMB3ListPage.setItemCode(\"ITM0000001\");\n\n orderMB3ListPage = orderMB3ListPage.fetchRelatedEntity();\n\n // Expected related entity category details\n String expRelatedEntityDet = \"CTG0000001, Drink\";\n\n String actRelatedEntityDet = orderMB3ListPage\n .getRelatedEntityCategoryDeatils(1);\n\n // confirmed realted entity details\n assertThat(actRelatedEntityDet, is(expRelatedEntityDet));\n\n }", "@Test\n void testGetByIdUser() {\n User getUser = (User) userData.crud.getById(1);\n assertEquals(\"Kevin\", getUser.getFirstName());\n logger.info(\"Got user information for ID: \" + getUser.getId());\n }", "@Test\n public void testClaimMedicalRecordNo() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setMedicalRecordNo,\n RdaFissClaim::getMedicalRecordNo,\n RdaFissClaim.Fields.medicalRecordNo,\n 17);\n }", "@Test\n\tpublic void testGetPatientDetail_2()\n\t\tthrows Exception {\n\t\tPatientAccessor fixture = new PatientAccessor(\"\");\n\t\tString hospitalNumber = \"\";\n\n\t\tPatient result = fixture.getPatientDetail(hospitalNumber);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.IllegalStateException: _out shouldn't be null\n\t\t// at com.mongodb.DBPort.go(DBPort.java:110)\n\t\t// at com.mongodb.DBPort.call(DBPort.java:74)\n\t\t// at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:286)\n\t\t// at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:257)\n\t\t// at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:310)\n\t\t// at com.mongodb.DB.command(DB.java:274)\n\t\t// at com.mongodb.DB.command(DB.java:256)\n\t\t// at com.mongodb.DB.command(DB.java:313)\n\t\t// at com.mongodb.Mongo.getDatabaseNames(Mongo.java:393)\n\t\t// at com.comp2014group5.generic_database.FormDatabaseMongoImpl.<init>(FormDatabaseMongoImpl.java:24)\n\t\t// at com.comp2014.group5.patient_database.PatientAccessor.<init>(PatientAccessor.java:29)\n\t\tassertNotNull(result);\n\t}", "@Test\r\n\tpublic void createAndRetrieveStudent() {\n\t\tStudent duke = Student.find.where().eq(\"studentId\", 1).findUnique();\r\n\r\n\t\t// Check whether inMemoryDatabase() works\r\n\t\t// If not, more than 2 row might be found\r\n\t\tint totalRow = Student.find.findRowCount();\r\n\t\torg.junit.Assert.assertEquals(2, totalRow);\r\n\r\n\t\torg.junit.Assert.assertNotNull(duke);\r\n\t\torg.junit.Assert.assertEquals(1, duke.studentId.longValue());\r\n\t}", "@Test\n public void findOne() {\n try{\n repo.save(s);\n repot.save(t);\n repon.save(n);\n assert repot.findOne(1)== t;\n assert repo.findOne(1) == s;\n assert repon.findOne(\"11\") == n;\n }\n catch (ValidationException e){\n }\n }", "public String wantDetail();", "@Test\n void getByIdOrderSuccess() {\n Order retrievedOrder = dao.getById(2);\n assertNotNull(retrievedOrder);\n assertEquals(\"February Large Long-Sleeve\", retrievedOrder.getDescription());\n\n }" ]
[ "0.6233463", "0.61646986", "0.61070925", "0.60880435", "0.6022359", "0.59738004", "0.59310263", "0.58895516", "0.58646363", "0.58528394", "0.58446795", "0.5818365", "0.58167404", "0.57543486", "0.57421714", "0.5740936", "0.57314384", "0.5682838", "0.5658224", "0.5640567", "0.5638743", "0.5635938", "0.5625279", "0.5623024", "0.56212586", "0.5620111", "0.560688", "0.560688", "0.5602105", "0.5601001", "0.5589918", "0.5583845", "0.55813205", "0.55797607", "0.55564225", "0.5556198", "0.5552262", "0.5552028", "0.55435294", "0.5537717", "0.55353314", "0.55282676", "0.55271167", "0.55255663", "0.55063856", "0.5500347", "0.5495043", "0.54911715", "0.54804546", "0.54773724", "0.5477264", "0.5470536", "0.5468256", "0.5467568", "0.5467089", "0.5466352", "0.5465304", "0.5462759", "0.5462719", "0.5461697", "0.5460263", "0.54544514", "0.54501605", "0.5444614", "0.5441056", "0.543525", "0.54279715", "0.5425075", "0.5419939", "0.5419588", "0.54191315", "0.5409838", "0.5408284", "0.5406225", "0.54057103", "0.54023826", "0.5397788", "0.53971153", "0.5396423", "0.5393033", "0.5390749", "0.53880715", "0.5382918", "0.53812134", "0.53736913", "0.5370426", "0.53673613", "0.53643125", "0.53625715", "0.53607297", "0.53597337", "0.5352651", "0.5345903", "0.5341541", "0.5335494", "0.533228", "0.5329009", "0.5325363", "0.5322999", "0.5320418", "0.5318379" ]
0.0
-1
tests that this can extract the JSON even if more data follows in the stream
@Test public void testReadFromInputStream() throws IOException { SimpleBasicMessage msg = new SimpleBasicMessage("test-msg", Collections.singletonMap("one", "111")); String json = msg.toJSON(); String extra = "This is some extra data"; String jsonPlusExtra = json + extra; ByteArrayInputStream in = new UncloseableByteArrayInputStream(jsonPlusExtra.getBytes()); BasicMessageWithExtraData<SimpleBasicMessage> fromJson = AbstractMessage.fromJSON(in, SimpleBasicMessage.class); SimpleBasicMessage msg2 = fromJson.getBasicMessage(); BinaryData leftoverFromJsonParser = fromJson.getBinaryData(); Assert.assertEquals(msg.getMessage(), msg2.getMessage()); Assert.assertEquals(msg.getDetails(), msg2.getDetails()); // now make sure the stream still has our extra data that we can read now byte[] leftoverBytes = new byte[leftoverFromJsonParser.available()]; leftoverFromJsonParser.read(leftoverBytes); String totalRemaining = new String(leftoverBytes, "UTF-8"); Assert.assertEquals(extra.length(), totalRemaining.length()); Assert.assertEquals(extra, totalRemaining); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testParseJSONStream() throws Throwable {\n // Build the input string to mock the JSON output\n // from openweathermap.org.\n String data = buildJSONData();\n\n // Convert JSON string to an InputStream.\n InputStream inputStream = new ByteArrayInputStream(data.getBytes());\n\n // Test the WeatherDataJsonParser main entry point.\n WeatherDataJsonParser parser = new WeatherDataJsonParser();\n\n try {\n // Test the parser.\n List<WeatherData> weatherDataList = parser.parseJsonStream(inputStream);\n\n // Now verify the results from the parser.\n validateWeatherDataList(weatherDataList);\n } catch (Exception e) {\n fail(\"Unable to parse weather data: \" + e);\n }\n }", "public void testParseJsonErrorStream() throws Throwable {\n String data = buildJsonErrorData();\n\n // Convert Json string to an InputStream.\n InputStream inputStream = new ByteArrayInputStream(data.getBytes());\n\n // Test the WeatherDataJsonParser main entry point.\n WeatherDataJsonParser parser = new WeatherDataJsonParser();\n\n try {\n // Test the parser.\n List<WeatherData> weatherDataList = parser.parseJsonStream(inputStream);\n\n // Now verify the results from the parser.\n validateErrorData(weatherDataList);\n } catch (Exception e) {\n fail(\"Unable to parse weather data: \" + e);\n }\n }", "@Test\n public void testChunkedOutputToChunkInput() throws Exception {\n final ChunkedInput<String> input = target().path(\"test\").request().get(new javax.ws.rs.core.GenericType<ChunkedInput<String>>() {});\n int counter = 0;\n String chunk;\n while ((chunk = input.read()) != null) {\n Assert.assertEquals((\"Unexpected value of chunk \" + counter), \"test\", chunk);\n counter++;\n } \n Assert.assertEquals(\"Unexpected numbed of received chunks.\", 3, counter);\n }", "@Test\n\tvoid testJSONObject1() {\n\t\tassertNotNull(r1.getOutput());\n\t}", "public boolean more() throws JSONException {\n this.next();\n if(this.end()) {\n return false;\n }\n this.back();\n\n return true;\n }", "public String readJson() {\n\t\t\tif (lastReadChar == ']') {\n\t\t\t\tSystem.out.println(\"Nunca deberia llegar a aca si usa hasNext()\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t// Si fue una coma, busco el siguiente '{'\n\t\t\twhile (read()!= '{');\n\t\t\t\n\t\t\tStringBuilder jsonText = new StringBuilder();\n\t\t\tjsonText.append((char) '{');\n\t\t\tlastReadChar = read();\n\t\t\t\n\t\t\twhile (lastReadChar != '}') { \n\t\t\t\tjsonText.append((char) lastReadChar);\n\t\t\t\tlastReadChar = read();\n\t\t\t} jsonText.append('}');\n\t\t\t\n\t\t\t// To satisfy Invariant: find the next ']' or ','\n\t\t\twhile (lastReadChar != ']' && lastReadChar != ',') lastReadChar = read(); \n\t\t\t\n\t\t\t//System.out.println(\"Analizando : \" + jsonText.toString());\n\t\t\treturn jsonText.toString();\n\t\t}", "public DtResponse readInfoGralJsonStream(InputStream in) throws IOException {\n InputStreamReader isReader = new InputStreamReader(in);\n //Creating a BufferedReader object\n BufferedReader breader = new BufferedReader(isReader);\n StringBuffer sb = new StringBuffer();\n String str;\n while((str = breader.readLine())!= null){\n sb.append(str);\n }\n Log.i(TAG, sb.toString());\n JsonReader reader = new JsonReader(new StringReader(sb.toString()));\n List<DtResponse> res = null;\n try {\n return readRESTMessage(reader);\n } finally {\n reader.close();\n }\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<JSONObject> linkedList0 = new LinkedList<JSONObject>();\n linkedList0.offerFirst(jSONObject0);\n JSONArray jSONArray0 = new JSONArray((Collection) linkedList0);\n JSONArray jSONArray1 = jSONObject0.toJSONArray(jSONArray0);\n assertEquals(1, jSONArray1.length());\n assertNotNull(jSONArray1);\n assertNotSame(jSONArray1, jSONArray0);\n }", "@Override\n public void onNext(JSONObject jsonObject) {\n }", "@Test\n public void testChunkedOutputToSingleString() throws Exception {\n final String response = target().path(\"test\").request().get(String.class);\n Assert.assertEquals(\"Unexpected value of chunked response unmarshalled as a single string.\", \"test\\r\\ntest\\r\\ntest\\r\\n\", response);\n }", "private void next(JSONTokener tokener) {\n char result = tokener.nextClean();\n // step back one if we haven't reached the end of the input\n if (result != 0) tokener.back();\n }", "protected MatchStrength hasJSONFormat(InputAccessor acc)\n/* */ throws IOException\n/* */ {\n/* 507 */ return ByteSourceJsonBootstrapper.hasJSONFormat(acc);\n/* */ }", "public JsonObject readStream(HashMap<String,String> meta, String name, InputStream stream, long length, StringBuilder errors) {\n try{\n javax.json.JsonReader rdr = Json.createReader(stream);\n return rdr.readObject();}\n catch(Exception ex) {errors.append(ex.toString());}\n return null;}", "@Override\n\tpublic TrailerData read()\n\t\t\tthrows Exception, UnexpectedInputException, ParseException, NonTransientResourceException {\n\t\tif(trailerData.isFinished())\n\t\t\treturn null;\n\t\ttrailerData.setFinished(Boolean.TRUE);\n\t\treturn trailerData;\n\t}", "@Test\n public void bufferProcessor_trafficMessageDecode_properJsonMessageReturned() throws JSONException {\n final BufferProcessor bp = new BufferProcessor();\n try (MockedStatic<Logger> mockStaticLogger = mockStatic(Logger.class); MockedStatic<Crc> mockStaticCrc = mockStatic(Crc.class)) {\n mockStaticCrc.when(() -> Crc.checkCrc(any(), anyInt(), anyInt())).thenReturn(true);\n JSONObject jsonResult;\n // TODO: Validate lat, lon, etc.\n // new parameters (isairborne, vspeed) test #1\n bp.put(testTrafficMessage, testTrafficMessage.length);\n jsonResult = new JSONObject(bp.decode(mock(Preferences.class)).get(0));\n assertEquals(\"traffic\", jsonResult.getString(\"type\"));\n assertEquals(true, jsonResult.getBoolean(\"isairborne\"));\n assertEquals(-64, jsonResult.getInt(\"vspeed\"));\n // new parameters (isairborne, vspeed) test #2\n bp.put(setAirborneFlagInCopy(testTrafficMessage, false), testTrafficMessage.length);\n jsonResult = new JSONObject(bp.decode(mock(Preferences.class)).get(0));\n assertEquals(false, jsonResult.getBoolean(\"isairborne\"));\n }\n }", "private InputStream streamMergedJson(JsonObject dataJson,\n\t\t\t\t\t\t\t\t\t\t JsonObject metaJson, JsonSimple existing) throws IOException {\n\t\t// Overwrite and/or create only nodes we consider new data\n\t\texisting.getJsonObject().put(\"recordIDPrefix\", idPrefix);\n\t\tJsonObject existingData = existing.writeObject(\"data\");\n\t\texistingData.putAll(dataJson);\n\t\tJsonObject existingMeta = existing.writeObject(\"metadata\");\n\t\texistingMeta.putAll(metaJson);\n\n\t\t// Turn into a stream to return\n\t\tString jsonString = existing.toString(true);\n\t\treturn IOUtils.toInputStream(jsonString, \"UTF-8\");\n\t}", "@Test(timeout = 4000)\n public void test096() throws Throwable {\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(\"{+HgP:|4P2;HQ~Jn\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Expected a ':' after a key at character 16 of {+HgP:|4P2;HQ~Jn\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }", "public void readNext(JCardDataStreamListener listener) throws IOException {\n\t\tif (parser == null) {\n\t\t\tJsonFactory factory = new JsonFactory();\n\t\t\tparser = factory.createParser(reader);\n\t\t} else if (parser.isClosed()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.listener = listener;\n\n\t\t//find the next vCard object\n\t\tJsonToken prev = parser.getCurrentToken();\n\t\tJsonToken cur;\n\t\twhile ((cur = parser.nextToken()) != null) {\n\t\t\tif (prev == JsonToken.START_ARRAY && cur == JsonToken.VALUE_STRING && \"vcard\".equals(parser.getValueAsString())) {\n\t\t\t\t//found\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (strict) {\n\t\t\t\t//the parser was expecting the jCard to be there\n\t\t\t\tif (prev != JsonToken.START_ARRAY) {\n\t\t\t\t\tthrow new JCardParseException(JsonToken.START_ARRAY, prev);\n\t\t\t\t}\n\n\t\t\t\tif (cur != JsonToken.VALUE_STRING) {\n\t\t\t\t\tthrow new JCardParseException(JsonToken.VALUE_STRING, cur);\n\t\t\t\t}\n\n\t\t\t\tthrow new JCardParseException(\"Invalid value for first token: expected \\\"vcard\\\" , was \\\"\" + parser.getValueAsString() + \"\\\"\", JsonToken.VALUE_STRING, cur);\n\t\t\t}\n\n\t\t\tprev = cur;\n\t\t}\n\n\t\tif (cur == null) {\n\t\t\t//EOF\n\t\t\teof = true;\n\t\t\treturn;\n\t\t}\n\n\t\tlistener.beginVCard();\n\t\tparseProperties();\n\n\t\tcheck(JsonToken.END_ARRAY, parser.nextToken());\n\t}", "private InputStream streamMergedJson(JsonObject dataJson,\r\n JsonObject metaJson, JsonSimple existing) throws IOException {\r\n // Overwrite and/or create only nodes we consider new data\r\n existing.getJsonObject().put(\"recordIDPrefix\", idPrefix);\r\n JsonObject existingData = existing.writeObject(\"data\");\r\n existingData.putAll(dataJson);\r\n JsonObject existingMeta = existing.writeObject(\"metadata\");\r\n existingMeta.putAll(metaJson);\r\n \r\n // Turn into a stream to return\r\n String jsonString = existing.toString(true);\r\n return IOUtils.toInputStream(jsonString, \"UTF-8\");\r\n }", "abstract Object read(@NonNull JsonReader reader) throws IOException;", "@Override\n protected Void doInBackground(Void... arg0) {\n HttpURLConnection urlConnection = null;\n\n try {\n URL data = new URL(url);\n urlConnection = (HttpURLConnection) data.openConnection();\n\n int responseCode = urlConnection.getResponseCode();\n\n if (responseCode == HttpURLConnection.HTTP_OK) {\n\n readJsonStream(urlConnection.getInputStream());\n }\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n urlConnection.disconnect();\n return null;\n }", "@Test\n\tpublic void testStartEndScanMarshalling() throws Exception {\n\t\tString json = \"{\\\"@type\\\":\\\"ScanBean\\\",\"\n\t\t\t\t+ \"\\\"uniqueId\\\":\\\"c8f12aee-d56a-49f6-bc03-9c7de9415674\\\",\"\n\t\t\t\t+ \"\\\"status\\\":\\\"SUBMITTED\\\",\"\n\t\t\t\t+ \"\\\"percentComplete\\\":0.0,\"\n\t\t\t\t+ \"\\\"submissionTime\\\":1441796619734,\"\n\t\t\t\t+ \"\\\"scanRequest\\\":{\\\"@type\\\":\\\"ScanRequest\\\",\"\n\t\t\t\t\t\t\t\t + \"\\\"compoundModel\\\":{\\\"@type\\\":\\\"CompoundModel\\\",\"\n\t\t\t\t\t\t\t\t + \"\\\"models\\\":[{\\\"@type\\\":\\\"TwoAxisGridPointsModel\\\",\"\n\t\t\t\t\t\t\t\t\t\t\t + \"\\\"name\\\":\\\"Grid\\\",\"\n\t\t\t\t\t\t\t\t\t\t\t + \"\\\"boundingBox\\\":{\\\"@type\\\":\\\"BoundingBox\\\",\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t + \"\\\"xAxisName\\\":\\\"stage_x\\\",\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t + \"\\\"yAxisName\\\":\\\"stage_y\\\",\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t + \"\\\"xAxisStart\\\":0.0,\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t + \"\\\"xAxisLength\\\":3.0,\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t + \"\\\"yAxisStart\\\":0.0,\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t + \"\\\"yAxisLength\\\":3.0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t + \"},\"\n\t\t\t\t\t\t\t\t\t\t\t + \"\\\"xAxisName\\\":\\\"stage_x\\\",\"\n\t\t\t\t\t\t\t\t\t\t\t + \"\\\"yAxisName\\\":\\\"stage_y\\\",\"\n\t\t\t\t\t\t\t\t\t\t\t + \"\\\"xAxisPoints\\\":5,\"\n\t\t\t\t\t\t\t\t\t\t\t + \"\\\"yAxisPoints\\\":5,\"\n\t\t\t\t\t\t\t\t\t\t\t + \"\\\"alternating\\\":false\"\n\t\t\t\t\t\t\t\t + \"}]},\"\n\t\t\t\t\t\t\t\t + \"\\\"startPosition\\\":{\\\"values\\\":{\\\"p\\\":1.0,\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"\\\"q\\\":2.0,\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"\\\"T\\\":290.0},\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"\\\"indices\\\":{},\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"\\\"stepIndex\\\":-1,\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"\\\"dimensionNames\\\":[[\\\"p\\\",\\\"q\\\",\\\"T\\\"]]\"\n\t\t\t\t\t\t\t\t\t\t + \"},\"\n\t\t\t\t\t\t\t\t + \"\\\"endPosition\\\":{\\\"values\\\":{\\\"p\\\":6.0,\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t + \"\\\"q\\\":7.0,\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t + \"\\\"T\\\":295.0},\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t + \"\\\"indices\\\":{},\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t + \"\\\"stepIndex\\\":-1,\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t + \"\\\"dimensionNames\\\":[[\\\"p\\\",\\\"q\\\",\\\"T\\\"]]\"\n\t\t\t\t\t\t\t\t\t\t + \"},\"\n\t\t\t\t\t\t\t\t + \"\\\"ignorePreprocess\\\":false,\"\n\t\t\t\t\t\t\t\t + \"\\\"filePath\\\":\\\"tempfile\\\",\"\n\t\t\t\t\t\t\t\t + \"\\\"detectors\\\":{\\\"drt_mock_mandelbrot_detector\\\":{\\\"@type\\\":\\\"MandelbrotModel\\\",\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"\\\"columns\\\":301,\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"\\\"enableNoise\\\":false,\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"\\\"escapeRadius\\\":10.0,\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"\\\"exposureTime\\\":0.1,\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"\\\"imaginaryAxisName\\\":\\\"stage_y\\\",\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"\\\"maxImaginaryCoordinate\\\":1.2,\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"\\\"maxIterations\\\":500,\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"\\\"maxRealCoordinate\\\":1.5,\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"\\\"name\\\":\\\"drt_mock_mandelbrot_detector\\\",\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"\\\"noiseFreeExposureTime\\\":5.0,\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"\\\"points\\\":1000,\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"\\\"realAxisName\\\":\\\"stage_x\\\",\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"\\\"rows\\\":241,\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"\\\"saveImage\\\":false,\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"\\\"saveSpectrum\\\":false,\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"\\\"saveValue\\\":true,\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"\\\"timeout\\\":0}\"\n\t\t\t\t\t\t\t\t + \"}}},\"\n\t\t\t\t+ \"\\\"point\\\":0,\"\n\t\t\t\t+ \"\\\"size\\\":0,\"\n\t\t\t\t+ \"\\\"scanNumber\\\":0\"\n\t\t\t\t+ \"}\";\n\n\t\tScanBean input = eservice.getEventConnectorService().unmarshal(json, null);\n\t\tString output = eservice.getEventConnectorService().marshal(input);\n\n\t\tSubsetStatus.assertJsonContains(\"Marshaller does not work with ScanBean with start and end positions.\", output, json);\n\t}", "@Override\n public boolean process(final byte current) throws Exception {\n if (detectJsonString && isEscaped(current)) {\n return true;\n }\n\n if (current == splitChar) {\n return false;\n }\n return true;\n }", "@Test\n public void testFromJson() {\n String rawTxJson = \"{\\n\" +\n \" \\\"tx_id\\\": \\\"88367f8df0e3bbb0027b1133b3de36ab779e26af00fc256bde7228c9727d20ef\\\",\\n\" +\n \" \\\"version\\\": 1,\\n\" +\n \" \\\"size\\\": 236,\\n\" +\n \" \\\"time_range\\\": 1521625823,\\n\" +\n \" \\\"inputs\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"type\\\": \\\"spend\\\",\\n\" +\n \" \\\"asset_id\\\": \\\"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\\\",\\n\" +\n \" \\\"asset_definition\\\": {},\\n\" +\n \" \\\"amount\\\": 100000000000,\\n\" +\n \" \\\"control_program\\\": \\\"0014f54622eeb837e39d359f7530b6fbbd7256c9e73d\\\",\\n\" +\n \" \\\"address\\\": \\\"sm1q74rz9m4cxl3e6dvlw5ctd7aawftvneeaqsuq3v\\\",\\n\" +\n \" \\\"spent_output_id\\\": \\\"34d739d5020d7e92477222b652e8fbe08467f5eb03700ce2ef57752930b05ff1\\\",\\n\" +\n \" \\\"input_id\\\": \\\"4ae0a25ea92e8c2749099576a234e7dfacb643597545873549c5000ba83fdd9a\\\"\\n\" +\n \" }\\n\" +\n \" ],\\n\" +\n \" \\\"outputs\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"type\\\": \\\"control\\\",\\n\" +\n \" \\\"id\\\": \\\"8a511581e2fb6986abc3be3bbd842434f642db7c56a1fc5c4c7adf93c750e9a4\\\",\\n\" +\n \" \\\"position\\\": 0,\\n\" +\n \" \\\"asset_id\\\": \\\"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\\\",\\n\" +\n \" \\\"asset_definition\\\": {},\\n\" +\n \" \\\"amount\\\": 99959999500,\\n\" +\n \" \\\"control_program\\\": \\\"00144453a011caf735428d0291d82b186e976e286fc1\\\",\\n\" +\n \" \\\"address\\\": \\\"sm1qg3f6qyw27u659rgzj8vzkxrwjahzsm7pyjen5j\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"type\\\": \\\"control\\\",\\n\" +\n \" \\\"id\\\": \\\"03b6ac529c2d1c7d422a7c063d74893e8ca2003b2b3368c27d0ede2d2f6ea3ba\\\",\\n\" +\n \" \\\"position\\\": 1,\\n\" +\n \" \\\"asset_id\\\": \\\"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\\\",\\n\" +\n \" \\\"asset_definition\\\": {},\\n\" +\n \" \\\"amount\\\": 500,\\n\" +\n \" \\\"control_program\\\": \\\"0014613908c28df499e3aa04e033100efaa24ca8fd01\\\",\\n\" +\n \" \\\"address\\\": \\\"sm1qvyus3s5d7jv782syuqe3qrh65fx23lgpzf33em\\\"\\n\" +\n \" }\\n\" +\n \" ],\\n\" +\n \" \\\"fee\\\": 40000000\\n\" +\n \" }\";\n RawTransaction decodedTx = RawTransaction.fromJson(rawTxJson);\n System.out.println(decodedTx.toJson());\n }", "@Test\n public void testGetJsonPayload() {\n System.out.println(\"getJsonPayload\");\n String expResult = (\"{\\n\"\n + \" \\\"iss\\\": \\\"https://ConsumerSystemURL\\\",\\n\"\n + \" \\\"sub\\\": \\\"1\\\",\\n\"\n + \" \\\"aud\\\": \\\"https://authorize.fhir.nhs.net/token\\\",\\n\"\n + \" \\\"exp\\\": 1503995882,\\n\"\n + \" \\\"iat\\\": 1503995582,\\n\"\n + \" \\\"reason_for_request\\\": \\\"directcare\\\",\\n\"\n + \" \\\"requesting_device\\\": {\\n\"\n + \" \\\"resourceType\\\": \\\"Device\\\",\\n\"\n + \" \\\"id\\\": \\\"1\\\",\\n\"\n + \" \\\"identifier\\\": [\\n\"\n + \" {\\n\"\n + \" \\\"system\\\": \\\"GPConnectTestSystem\\\",\\n\"\n + \" \\\"value\\\": \\\"Client\\\"\\n\"\n + \" }\\n\"\n + \" ],\\n\"\n + \" \\\"type\\\": {\\n\"\n + \" \\\"coding\\\": [\\n\"\n + \" {\\n\"\n + \" \\\"system\\\": \\\"DeviceIdentifierSystem\\\",\\n\"\n + \" \\\"code\\\": \\\"DeviceIdentifier\\\"\\n\"\n + \" }\\n\"\n + \" ]\\n\"\n + \" },\\n\"\n + \" \\\"model\\\": \\\"v1\\\",\\n\"\n + \" \\\"version\\\": \\\"1.1\\\"\\n\"\n + \" },\\n\"\n + \" \\\"requesting_organization\\\": {\\n\"\n + \" \\\"resourceType\\\": \\\"Organization\\\",\\n\"\n + \" \\\"id\\\": \\\"1\\\",\\n\"\n + \" \\\"identifier\\\": [\\n\"\n + \" {\\n\"\n + \" \\\"system\\\": \\\"http://fhir.nhs.net/Id/ods-organization-code\\\",\\n\"\n + \" \\\"value\\\": \\\"GPCA0001\\\"\\n\"\n + \" }\\n\"\n + \" ],\\n\"\n + \" \\\"name\\\": \\\"GP Connect Assurance\\\"\\n\"\n + \" },\\n\"\n + \" \\\"requesting_practitioner\\\": {\\n\"\n + \" \\\"resourceType\\\": \\\"Practitioner\\\",\\n\"\n + \" \\\"id\\\": \\\"1\\\",\\n\"\n + \" \\\"identifier\\\": [\\n\"\n + \" {\\n\"\n + \" \\\"system\\\": \\\"http://fhir.nhs.net/sds-user-id\\\",\\n\"\n + \" \\\"value\\\": \\\"GCASDS0001\\\"\\n\"\n + \" },\\n\"\n + \" {\\n\"\n + \" \\\"system\\\": \\\"LocalIdentifierSystem\\\",\\n\"\n + \" \\\"value\\\": \\\"1\\\"\\n\"\n + \" }\\n\"\n + \" ],\\n\"\n + \" \\\"name\\\": {\\n\"\n + \" \\\"family\\\": [\\n\"\n + \" \\\"AssurancePractitioner\\\"\\n\"\n + \" ],\\n\"\n + \" \\\"given\\\": [\\n\"\n + \" \\\"AssuranceTest\\\"\\n\"\n + \" ],\\n\"\n + \" \\\"prefix\\\": [\\n\"\n + \" \\\"Mr\\\"\\n\"\n + \" ]\\n\"\n + \" },\\n\"\n + \" \\\"practitionerRole\\\": [\\n\"\n + \" {\\n\"\n + \" \\\"role\\\": {\\n\"\n + \" \\\"coding\\\": [\\n\"\n + \" {\\n\"\n + \" \\\"system\\\": \\\"http://fhir.nhs.net/ValueSet/sds-job-role-name-1\\\",\\n\"\n + \" \\\"code\\\": \\\"AssuranceJobRole\\\"\\n\"\n + \" }\\n\"\n + \" ]\\n\"\n + \" }\\n\"\n + \" }\\n\"\n + \" ]\\n\"\n + \" },\\n\"\n + \" \\\"requested_scope\\\": \\\"patient/*.read\\\",\\n\"\n + \" \\\"requested_record\\\": {\\n\"\n + \" \\\"resourceType\\\": \\\"Patient\\\",\\n\"\n + \" \\\"identifier\\\": [\\n\"\n + \" {\\n\"\n + \" \\\"system\\\": \\\"https://fhir.nhs.uk/Id/nhs-number\\\",\\n\"\n + \" \\\"value\\\": \\\"9476719931\\\"\\n\"\n + \" }\\n\"\n + \" ]\\n\"\n + \" }\\n\"\n + \"}\\n\").replaceAll(\"\\n\", \"\\r\\n\");\n String result = instance.getJsonPayload();\n assertEquals(expResult, result);\n }", "@Test(timeout = 4000)\n public void test072() throws Throwable {\n String string0 = \"{*+HgP:6|49HQ~Jn\";\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(\"{*+HgP:6|49HQ~Jn\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Expected a ',' or '}' at character 16 of {*+HgP:6|49HQ~Jn\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }", "private IItem getJSonStreamAsItem() {\n final IItem item = JSonItemReader.parseItem(getInputStream(), api.getItemDefinition());\n\n ValidatorEngine.validate(item, false);\n\n return item;\n }", "@Test(timeout = 4000)\n public void test046() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<JSONObject> linkedList0 = new LinkedList<JSONObject>();\n JSONArray jSONArray0 = new JSONArray((Collection) linkedList0);\n JSONArray jSONArray1 = jSONObject0.toJSONArray(jSONArray0);\n assertNull(jSONArray1);\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.put(\",\\n\", false);\n jSONObject1.accumulate(\",\\n\", jSONObject0);\n JSONArray jSONArray0 = new JSONArray();\n assertEquals(0, jSONArray0.length());\n }", "private boolean getParseConvert(InfoRequestData infoRequestData) throws IOException {\n QueryParams params = infoRequestData.getQueryParams();\n HatchetCollection hatchetCollection = CollectionManager.get().getHatchetCollection();\n Hatchet hatchet = mStore.getImplementation(infoRequestData.isBackgroundRequest());\n\n try {\n int type = infoRequestData.getType();\n if (type >= InfoRequestData.INFOREQUESTDATA_TYPE_USERS\n && type < InfoRequestData.INFOREQUESTDATA_TYPE_USERS + 100) {\n JsonObject object =\n hatchet.getUsers(params.ids, params.name, params.random, params.count);\n if (object == null) {\n return false;\n }\n List<User> users = mStore.storeRecords(object, User.class, type,\n infoRequestData.isBackgroundRequest());\n infoRequestData.setResultList(users);\n return true;\n\n } else if (type >= InfoRequestData.INFOREQUESTDATA_TYPE_PLAYLISTS\n && type < InfoRequestData.INFOREQUESTDATA_TYPE_PLAYLISTS + 100) {\n JsonObject object = hatchet.getPlaylists(params.playlist_id);\n if (object == null) {\n return false;\n }\n List<Playlist> playlists = mStore.storeRecords(object, Playlist.class, type,\n infoRequestData.isBackgroundRequest());\n infoRequestData.setResultList(playlists);\n return true;\n\n } else if (type >= InfoRequestData.INFOREQUESTDATA_TYPE_ARTISTS\n && type < InfoRequestData.INFOREQUESTDATA_TYPE_ARTISTS + 100) {\n JsonObject object = hatchet.getArtists(params.ids, params.name);\n if (object == null) {\n return false;\n }\n if (type == InfoRequestData.INFOREQUESTDATA_TYPE_ARTISTS_TOPHITSANDALBUMS) {\n List<Query> topHits = mStore.storeRecords(object, Query.class, type,\n infoRequestData.isBackgroundRequest());\n Artist artist = Artist.get(params.name);\n Playlist playlist = Playlist.fromQueryList(TomahawkApp.PLUGINNAME_HATCHET + \"_\"\n + artist.getCacheKey(), null, null, topHits);\n hatchetCollection.addArtistTopHits(artist, playlist);\n\n List<Album> albums = mStore.storeRecords(object, Album.class, type,\n infoRequestData.isBackgroundRequest());\n if (albums.size() > 0) {\n for (Album album : albums) {\n hatchetCollection.addAlbum(album);\n }\n Album firstAlbum = albums.get(0);\n hatchetCollection.addArtistAlbums(firstAlbum.getArtist(), albums);\n }\n }\n List<Artist> artists = mStore.storeRecords(object, Artist.class, type,\n infoRequestData.isBackgroundRequest());\n for (Artist artist : artists) {\n hatchetCollection.addArtist(artist);\n }\n infoRequestData.setResultList(artists);\n return true;\n\n } else if (type >= InfoRequestData.INFOREQUESTDATA_TYPE_ALBUMS\n && type < InfoRequestData.INFOREQUESTDATA_TYPE_ALBUMS + 100) {\n JsonObject object = hatchet.getAlbums(params.ids, params.name, params.artistname);\n if (object == null) {\n return false;\n }\n if (type == InfoRequestData.INFOREQUESTDATA_TYPE_ALBUMS_TRACKS) {\n List<Query> tracks = mStore.storeRecords(object, Query.class, type,\n infoRequestData.isBackgroundRequest());\n Artist artist = Artist.get(params.artistname);\n Album album = Album.get(params.name, artist);\n Playlist playlist = Playlist.fromQueryList(TomahawkApp.PLUGINNAME_HATCHET + \"_\"\n + album.getCacheKey(), null, null, tracks);\n playlist.setFilled(true);\n hatchetCollection.addAlbumTracks(album, playlist);\n }\n List<Album> albums = mStore.storeRecords(object, Album.class, type,\n infoRequestData.isBackgroundRequest());\n for (Album album : albums) {\n hatchetCollection.addAlbum(album);\n }\n infoRequestData.setResultList(albums);\n return true;\n\n } else if (type == InfoRequestData.INFOREQUESTDATA_TYPE_SEARCHES) {\n JsonObject object = hatchet.getSearches(params.term);\n if (object == null) {\n return false;\n }\n List<Search> searches = mStore.storeRecords(object, Search.class, type,\n infoRequestData.isBackgroundRequest());\n infoRequestData.setResultList(searches);\n return true;\n\n } else if (type == InfoRequestData.INFOREQUESTDATA_TYPE_SOCIALACTIONS) {\n JsonObject object = hatchet.getSocialActions(null, params.userid, params.type,\n ISO8601Utils.format(params.before_date), params.limit);\n if (object == null) {\n return false;\n }\n List<SocialAction> socialActions = mStore.storeRecords(object, SocialAction.class,\n type, infoRequestData.isBackgroundRequest(), params);\n infoRequestData.setResultList(socialActions);\n return true;\n }\n } catch (RetrofitError e) {\n Log.e(TAG, \"getParseConvert: Request to \" + e.getUrl() + \" failed: \" + e.getClass()\n + \": \" + e.getLocalizedMessage());\n }\n return false;\n }", "boolean hasChunkResponse();", "void shouldParseTheJsonPostData() {\n }", "private void parseData() {\n\t\t\r\n\t}", "@Override\n\tpublic boolean willDecode(String jsonMessage) {\n\t\ttry {\n\t\t\t// Check if incoming message is valid JSON\n\t\t\tJson.createReader(new StringReader(jsonMessage)).readObject();\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}", "private String readVoidMessage() {\n JSONTokener tokener = new JSONTokener(this.inputStream);\n if(tokener.more()) {\n return TokenerHandler.getNextJSONStringNonContinuous(tokener);\n } else {\n throw new LostConnectionException();\n }\n }", "JSONStreamAware processRequest(HttpServletRequest paramHttpServletRequest)\r\n/* 24: */ throws NxtException\r\n/* 25: */ {\r\n/* 26:24 */ Account localAccount = ParameterParser.getAccount(paramHttpServletRequest);\r\n/* 27: */ \r\n/* 28:26 */ JSONObject localJSONObject1 = JSONData.accountBalance(localAccount);\r\n/* 29:27 */ JSONData.putAccount(localJSONObject1, \"account\", localAccount.getId());\r\n/* 30:29 */ if (localAccount.getPublicKey() != null) {\r\n/* 31:30 */ localJSONObject1.put(\"publicKey\", Convert.toHexString(localAccount.getPublicKey()));\r\n/* 32: */ }\r\n/* 33:32 */ if (localAccount.getName() != null) {\r\n/* 34:33 */ localJSONObject1.put(\"name\", localAccount.getName());\r\n/* 35: */ }\r\n/* 36:35 */ if (localAccount.getDescription() != null) {\r\n/* 37:36 */ localJSONObject1.put(\"description\", localAccount.getDescription());\r\n/* 38: */ }\r\n/* 39:38 */ if (localAccount.getCurrentLesseeId() != 0L)\r\n/* 40: */ {\r\n/* 41:39 */ JSONData.putAccount(localJSONObject1, \"currentLessee\", localAccount.getCurrentLesseeId());\r\n/* 42:40 */ localJSONObject1.put(\"currentLeasingHeightFrom\", Integer.valueOf(localAccount.getCurrentLeasingHeightFrom()));\r\n/* 43:41 */ localJSONObject1.put(\"currentLeasingHeightTo\", Integer.valueOf(localAccount.getCurrentLeasingHeightTo()));\r\n/* 44:42 */ if (localAccount.getNextLesseeId() != 0L)\r\n/* 45: */ {\r\n/* 46:43 */ JSONData.putAccount(localJSONObject1, \"nextLessee\", localAccount.getNextLesseeId());\r\n/* 47:44 */ localJSONObject1.put(\"nextLeasingHeightFrom\", Integer.valueOf(localAccount.getNextLeasingHeightFrom()));\r\n/* 48:45 */ localJSONObject1.put(\"nextLeasingHeightTo\", Integer.valueOf(localAccount.getNextLeasingHeightTo()));\r\n/* 49: */ }\r\n/* 50: */ }\r\n/* 51:48 */ DbIterator localDbIterator = localAccount.getLessors();Object localObject1 = null;\r\n/* 52: */ JSONArray localJSONArray3;\r\n/* 53: */ Object localObject2;\r\n/* 54: */ try\r\n/* 55: */ {\r\n/* 56:49 */ if (localDbIterator.hasNext())\r\n/* 57: */ {\r\n/* 58:50 */ JSONArray localJSONArray1 = new JSONArray();\r\n/* 59:51 */ localJSONArray3 = new JSONArray();\r\n/* 60:52 */ while (localDbIterator.hasNext())\r\n/* 61: */ {\r\n/* 62:53 */ localObject2 = (Account)localDbIterator.next();\r\n/* 63:54 */ localJSONArray1.add(Convert.toUnsignedLong(((Account)localObject2).getId()));\r\n/* 64:55 */ localJSONArray3.add(Convert.rsAccount(((Account)localObject2).getId()));\r\n/* 65: */ }\r\n/* 66:57 */ localJSONObject1.put(\"lessors\", localJSONArray1);\r\n/* 67:58 */ localJSONObject1.put(\"lessorsRS\", localJSONArray3);\r\n/* 68: */ }\r\n/* 69: */ }\r\n/* 70: */ catch (Throwable localThrowable2)\r\n/* 71: */ {\r\n/* 72:48 */ localObject1 = localThrowable2;throw localThrowable2;\r\n/* 73: */ }\r\n/* 74: */ finally\r\n/* 75: */ {\r\n/* 76:60 */ if (localDbIterator != null) {\r\n/* 77:60 */ if (localObject1 != null) {\r\n/* 78: */ try\r\n/* 79: */ {\r\n/* 80:60 */ localDbIterator.close();\r\n/* 81: */ }\r\n/* 82: */ catch (Throwable localThrowable5)\r\n/* 83: */ {\r\n/* 84:60 */ ((Throwable)localObject1).addSuppressed(localThrowable5);\r\n/* 85: */ }\r\n/* 86: */ } else {\r\n/* 87:60 */ localDbIterator.close();\r\n/* 88: */ }\r\n/* 89: */ }\r\n/* 90: */ }\r\n/* 91:62 */ localDbIterator = localAccount.getAssets(0, -1);localObject1 = null;\r\n/* 92: */ try\r\n/* 93: */ {\r\n/* 94:63 */ JSONArray localJSONArray2 = new JSONArray();\r\n/* 95:64 */ localJSONArray3 = new JSONArray();\r\n/* 96:65 */ while (localDbIterator.hasNext())\r\n/* 97: */ {\r\n/* 98:66 */ localObject2 = (Account.AccountAsset)localDbIterator.next();\r\n/* 99:67 */ JSONObject localJSONObject2 = new JSONObject();\r\n/* :0:68 */ localJSONObject2.put(\"asset\", Convert.toUnsignedLong(((Account.AccountAsset)localObject2).getAssetId()));\r\n/* :1:69 */ localJSONObject2.put(\"balanceQNT\", String.valueOf(((Account.AccountAsset)localObject2).getQuantityQNT()));\r\n/* :2:70 */ localJSONArray2.add(localJSONObject2);\r\n/* :3:71 */ JSONObject localJSONObject3 = new JSONObject();\r\n/* :4:72 */ localJSONObject3.put(\"asset\", Convert.toUnsignedLong(((Account.AccountAsset)localObject2).getAssetId()));\r\n/* :5:73 */ localJSONObject3.put(\"unconfirmedBalanceQNT\", String.valueOf(((Account.AccountAsset)localObject2).getUnconfirmedQuantityQNT()));\r\n/* :6:74 */ localJSONArray3.add(localJSONObject3);\r\n/* :7: */ }\r\n/* :8:76 */ if (localJSONArray2.size() > 0) {\r\n/* :9:77 */ localJSONObject1.put(\"assetBalances\", localJSONArray2);\r\n/* ;0: */ }\r\n/* ;1:79 */ if (localJSONArray3.size() > 0) {\r\n/* ;2:80 */ localJSONObject1.put(\"unconfirmedAssetBalances\", localJSONArray3);\r\n/* ;3: */ }\r\n/* ;4: */ }\r\n/* ;5: */ catch (Throwable localThrowable4)\r\n/* ;6: */ {\r\n/* ;7:62 */ localObject1 = localThrowable4;throw localThrowable4;\r\n/* ;8: */ }\r\n/* ;9: */ finally\r\n/* <0: */ {\r\n/* <1:82 */ if (localDbIterator != null) {\r\n/* <2:82 */ if (localObject1 != null) {\r\n/* <3: */ try\r\n/* <4: */ {\r\n/* <5:82 */ localDbIterator.close();\r\n/* <6: */ }\r\n/* <7: */ catch (Throwable localThrowable6)\r\n/* <8: */ {\r\n/* <9:82 */ ((Throwable)localObject1).addSuppressed(localThrowable6);\r\n/* =0: */ }\r\n/* =1: */ } else {\r\n/* =2:82 */ localDbIterator.close();\r\n/* =3: */ }\r\n/* =4: */ }\r\n/* =5: */ }\r\n/* =6:83 */ return localJSONObject1;\r\n/* =7: */ }", "@Override\n public boolean hasMorePayloads() \n {\n return this.payloadIndex < this.bytes_out.size();\n }", "@Override\n public Map<String, Object> next() {\n if (!hasNext()) {\n throw new NoSuchElementException(\"No more objects\");\n }\n return toJson(iterator.next());\n }", "private void parseJSON(String response)\n {\n try\n {\n // Using orj.json, get the file string and convert it to an object\n JSONObject object = (JSONObject) new JSONTokener(response).nextValue();\n\n // The Winnipeg Transit JSON results usually have nested values\n // We can identify the request by the first key of the first level\n\n // The method names() will retrieve an JSONArray with the key names\n JSONArray objectNames = object.names();\n\n // Retrieve the first key of the first level\n String firstKey = objectNames.getString(0);\n\n if (firstKey.equals(\"status\"))\n {\n parseStatus(object.getJSONObject(firstKey));\n }\n else if (firstKey.equals(\"stop-schedule\"))\n {\n parseStopSchedule(object.getJSONObject(firstKey));\n }\n }\n catch (JSONException e)\n {\n e.printStackTrace();\n }\n }", "private boolean isThereMoreData() {\n return nextUrl != null;\n }", "private void parseJsonF1 (String fromAsset) {\n try {\n JSONObject jsonObj = new JSONObject(fromAsset);\n JSONObject jsonObject = jsonObj.getJSONObject(\"data\");\n JSONObject details = jsonObject.getJSONObject(\"details\");\n Iterator<String> itr = details.keys();\n while (itr.hasNext()) {\n String key = itr.next();\n if (key.equals(\"minimumAmount\") || key.equals(\"minimumAmount\") || key.equals(\"suggestedAmount\")) {\n JSONArray jsonArray = details.getJSONArray(key);\n for (int i = 0; i < jsonArray.length(); i++) { // **line 2**\n JSONObject childJSONObject = jsonArray.getJSONObject(i);\n int amount = childJSONObject.getInt(\"amount\");\n String currency = childJSONObject.getString(\"currency\");\n DetailsBean details1 = new DetailsBean();\n details1.setAmout(amount);\n details1.setCurrency(currency);\n detailsList.add(details1);\n }\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public JSONDocument parse (InputStream is){\n JSONDocument temp = null;\n String data = \"\";\n if (is != null){\n try{\n int c;\n while((c = is.read()) != -1) data += (char)c;\n temp = this.parseString(this.cleanString(data));\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }else throw new IllegalArgumentException(\"InputStream cannot be null\");\n return temp;\n }", "@Test\r\n public void testRevisionParser() {\r\n JsonParser parser = new JsonParser();\r\n InputStream inputstream = getClass().getClassLoader().getResourceAsStream(\"sample.json\");\r\n assert inputstream != null;\r\n Reader reader = new InputStreamReader(inputstream);\r\n JsonElement rootElement = parser.parse(reader);\r\n JsonObject rootObject = rootElement.getAsJsonObject();\r\n JsonObject pages = rootObject.getAsJsonObject(\"query\").getAsJsonObject(\"pages\");\r\n JsonArray array = null;\r\n for (Map.Entry<String, JsonElement> entry : pages.entrySet()) {\r\n JsonObject entryObject = entry.getValue().getAsJsonObject();\r\n array = entryObject.getAsJsonArray(\"revisions\");\r\n Assert.assertNotNull(array);\r\n }\r\n System.out.println(array);\r\n\r\n }", "@Test\n public void testGetSupportingData() {\n System.out.println(\"getSupportingData\");\n String expResult = \"JWT json header\";\n String result = instance.getSupportingData();\n assertTrue(result.startsWith(expResult));\n expResult = \"true\\r\\n\";\n assertTrue(result.endsWith(expResult));\n }", "boolean process(JsonElement element);", "@Test(timeout = 4000)\n public void test071() throws Throwable {\n JSONTokener jSONTokener0 = new JSONTokener(\"{o?Z\");\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Expected a ':' after a key at character 4 of {o?Z\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }", "@Test(timeout = 4000)\n public void test075() throws Throwable {\n JSONTokener jSONTokener0 = new JSONTokener(\"{\");\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must end with '}' at character 1 of {\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }", "@Test\n public void readSystemObjectClassMedicineOrderRequest() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"MedicineOrderRequest\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return MedicineOrderRequest properly\", object.getClass(), actual.getClass());\n }", "private void readMoreBytesFromStream() throws IOException {\n if (!innerStreamHasMoreData) {\n return;\n }\n\n int bufferSpaceAvailable = buffer.length - bytesInBuffer;\n if (bufferSpaceAvailable <= 0) {\n return;\n }\n\n int bytesRead =\n stream.read(buffer, bytesInBuffer, bufferSpaceAvailable);\n\n if (bytesRead == -1) {\n innerStreamHasMoreData = false;\n } else {\n bytesInBuffer += bytesRead;\n }\n }", "@Test\n public void extractObjects_shouldReturnOfferResponseBody() {\n List<Object> objectProposals = getObjectProposalList();\n when(objectProposalService.detect(anyString(), anyMap(), any()))\n .thenReturn(Single.just(objectProposals));\n\n // When Object Proposal Api is asked to extract object from image byte array\n TestObserver<List<Object>> testObserver = objectProposalApi\n .detect(new byte[]{})\n .test();\n\n // Verify extractObjects method called once\n verify(objectProposalService, times(1))\n .detect(anyString(), anyMap(), any());\n\n testObserver.assertComplete();\n testObserver.assertNoErrors();\n testObserver.assertValue(Objects::nonNull);\n testObserver.assertValue(r -> r.size() == OBJECTS_SIZE);\n }", "@Override\n public int read() throws IOException {\n if (stream.available() > 0) {\n return stream.read();\n } else {\n layer.receiveMoreDataForHint(getHint());\n // either the stream is now filled, or we ran into a timeout\n // or the next stream is available\n return stream.read();\n }\n }", "@Test(timeout = 4000)\n public void test22() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n String string0 = \"53N/{T[\";\n JSONObject jSONObject1 = jSONObject0.put(\"53N/{T[\", (-1913.632));\n jSONObject1.toString((-821));\n jSONObject0.optString(\"53N/{T[\", \"53N/{T[\");\n jSONObject0.opt(\",2fHJL;.]tm*PJ9\");\n jSONObject0.optLong((String) null);\n jSONObject0.toString((-821));\n Byte byte0 = new Byte((byte)1);\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONObject jSONObject2 = jSONObject1.put(\"|f}%!.^JO \", (Collection) linkedList0);\n JSONObject jSONObject3 = jSONObject2.accumulate(\"o%,g eOJ=9n\\\"\", \"java.lang.Double@0000000003\");\n try { \n jSONObject3.getJSONObject(\"{\\n\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003,\\n\\\"java.lang.String@0000000004\\\": \\\"java.lang.Class@0000000005\\\"\\n}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"{\\\\n\\\\\\\"java.lang.String@0000000002\\\\\\\": java.lang.Double@0000000003,\\\\n\\\\\\\"java.lang.String@0000000004\\\\\\\": \\\\\\\"java.lang.Class@0000000005\\\\\\\"\\\\n}\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }", "private void readObjectNoData() throws ObjectStreamException {}", "private Object readJSON() throws JSONException\n {\n switch(read(3))\n {\n case zipObject:\n return readObject();\n case zipArrayString:\n return readArray(true);\n case zipArrayValue:\n return readArray(false);\n case zipEmptyObject:\n return new JSONObject();\n case zipEmptyArray:\n return new JSONArray();\n case zipTrue:\n return Boolean.TRUE;\n case zipFalse:\n return Boolean.FALSE;\n default:\n return JSONObject.NULL;\n }\n }", "@Override\r\n\tpublic boolean parseJson(JSONObject jo) {\n\t\tif (jo == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tthis.card_imageurl = JsonUtility.getString(jo, \"card_imageurl\", \"\");\r\n\t\tthis.image_url = JsonUtility.getString(jo, \"image_url\", \"\");\r\n\t\tthis.received_name = JsonUtility.getString(jo, \"received_name\", \"\");\r\n\t\tthis.content = Utility.decodeUnicode(JsonUtility.getString(jo, \"content\", \"\"));\r\n\t\tthis.from_name = JsonUtility.getString(jo, \"from_name\", \"\");\r\n\t\tthis.praise = JsonUtility.getString(jo, \"praise\", \"\");\r\n\r\n\t\treturn true;\r\n\t}", "private String getJson(InputStream inputStream){\n try {\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream, \"UTF-8\");\n Scanner scanner = new Scanner(inputStreamReader);\n StringBuffer stringBuffer = new StringBuffer();\n while (scanner.hasNext()) {\n stringBuffer.append(scanner.nextLine());\n }\n System.out.println(\"STRING BUFFER >>>>>>>\" +stringBuffer);\n return stringBuffer.toString();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Test(timeout = 4000)\n public void test098() throws Throwable {\n String string0 = \"{3&b()u=\\\"9(/N;Cfw?\";\n JSONTokener jSONTokener0 = new JSONTokener(\"{3&b()u=\\\"9(/N;Cfw?\");\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Unterminated string at character 18 of {3&b()u=\\\"9(/N;Cfw?\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }", "@Test\n public void readSystemObjectClassDoctorFeedback() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"DoctorFeedback\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return DoctorFeedback properly\", object.getClass(), actual.getClass());\n }", "private JSONArray readJSONArray() {\n JSONTokener tokener = new JSONTokener(this.inputStream);\n if (tokener.more()) {\n return TokenerHandler.getNextJSONArrayNonContinuous(tokener);\n } else {\n throw new LostConnectionException();\n }\n }", "public void test_001_Stream() throws Throwable {\n\n final String RESOURCE_URI = \"asimov_it_test_001_SP_PROXYING\";\n String uri = createTestResourceUri(RESOURCE_URI);\n\n HttpRequest request = createRequest().setUri(uri).addHeaderField(\"Cache-Control\" ,\"max-age=500\").getRequest();\n PrepareResourceUtil.prepareResource(uri, false);\n\n //miss\n sendRequest2(request, 10);\n //R1.2 miss\n checkMiss(request, 2, VALID_RESPONSE);\n }", "@Test(timeout = 4000)\n public void test077() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.putOpt(\"\", jSONObject0);\n jSONObject1.getJSONObject(\"\");\n Object object0 = JSONObject.NULL;\n JSONObject jSONObject2 = new JSONObject();\n assertEquals(0, jSONObject2.length());\n }", "private static List<News> extractFeaturesFromJsonResponse(String jsonResponse) {\n List<News> newsList = new ArrayList<>();\n\n try {\n JSONObject baseJsonObject = new JSONObject(jsonResponse);\n // If JSON object does not contain \"response\" return null object\n if (!baseJsonObject.has(Keys.JSON_NEWS_OBJECT_KEY)) {\n return null;\n }\n\n JSONObject response = baseJsonObject.getJSONObject(Keys.JSON_NEWS_OBJECT_KEY);\n JSONArray resultsArray = response.getJSONArray(Keys.JSON_NEWS_ARRAY_KEY);\n\n for (int i = 0; i < resultsArray.length(); i++) {\n JSONObject newsObject = resultsArray.getJSONObject(i);\n\n // Get section name\n String sectionName = newsObject.getString(Keys.JSON_NEWS_SECTION_KEY);\n // Get Headline\n String newsHeadline = newsObject.getString(Keys.JSON_NEWS_HEADLINE_KEY);\n // Get published time\n String publishedTime = newsObject.getString(Keys.JSON_NEWS_PUBLISHED_TIME_KEY);\n // Get web Url\n String webUrl = newsObject.getString(Keys.JSON_NEWS_URL_KEY);\n\n // Get thumbnail URL string\n String newsThumbnailUrlString = null;\n if (newsObject.has(Keys.JSON_NEWS_FIELDS_KEY)) {\n JSONObject field = newsObject.getJSONObject(Keys.JSON_NEWS_FIELDS_KEY);\n\n if (field.has(Keys.JSON_NEWS_THUMBNAIL_KEY)) {\n newsThumbnailUrlString = field.getString(Keys.JSON_NEWS_THUMBNAIL_KEY);\n }\n }\n\n // Get author name\n String authorName = null;\n if (newsObject.has(Keys.JSON_NEWS_TAGS_KEY)) {\n JSONArray tags = newsObject.getJSONArray(Keys.JSON_NEWS_TAGS_KEY);\n if (!tags.isNull(0)) {\n // If first element of array is not null then get the author name\n JSONObject tagsObject = tags.getJSONObject(0);\n if (tagsObject.has(Keys.JSON_NEWS_AUTHOR_NAME_KEY)) {\n authorName = tagsObject.getString(Keys.JSON_NEWS_AUTHOR_NAME_KEY);\n }\n }\n }\n newsList.add(new News(newsHeadline, sectionName, authorName, publishedTime, webUrl, newsThumbnailUrlString));\n }\n } catch (JSONException e) {\n Log.e(LOG_TAG, \"Error creating JSON object : extractFeaturesFromJsonResponse() method\", e);\n }\n return newsList;\n }", "private void readHttpDataChunkByChunk(HttpPostRequestDecoder decoder) {\n try {\n while (decoder.hasNext()) {\n InterfaceHttpData data = decoder.next();\n if (data != null) {\n // check if current HttpData is a FileUpload and previously set as partial\n if (partialContent == data) {\n partialContent = null;\n }\n try {\n // new value\n writeHttpData(data);\n } finally {\n data.release();\n }\n }\n }\n // Check partial decoding for a FileUpload\n InterfaceHttpData data = decoder.currentPartialHttpData();\n if (data != null) {\n if (partialContent == null) {\n partialContent = (HttpData) data;\n }\n }\n } catch (HttpPostRequestDecoder.EndOfDataDecoderException e1) {\n // end\n }\n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"B7?dng\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n jSONObject0.put(\"] is not a JSONArray.\", (double) (byte)39);\n jSONObject0.toString((int) (byte)39);\n jSONObject0.optString(\"a2H;Fk;R703/.\", \"] is not a JSONArray.\");\n jSONObject0.opt(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n jSONObject0.optLong(\"ik\");\n jSONObject0.toString((int) (byte)39);\n byte byte1 = (byte)97;\n Byte.compare((byte)97, (byte) (-119));\n jSONObject0.isNull(\"(_&\");\n JSONObject.numberToString(byte0);\n JSONObject.quote(\"\");\n JSONObject.doubleToString((byte) (-119));\n Short short0 = new Short((byte)39);\n jSONObject0.putOpt(\"\\\"$c.1O[-X9i\", short0);\n JSONTokener jSONTokener0 = new JSONTokener(\"'m P|=\");\n JSONArray jSONArray0 = null;\n try {\n jSONArray0 = new JSONArray(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONArray text must start with '[' at character 1 of 'm P|=\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }", "public void testGetJSON() {\n\t}", "@Override\n public boolean nextKeyValue() throws IOException, InterruptedException {\n key.set(pos);\n\n int jsonSize = 0;\n\n while (pos < splitEnd) {\n jsonSize = nextJson(value);\n\n if (jsonSize == 0)\n break; // end of split reached\n\n pos += jsonSize;\n\n // Line is lower than Maximum record line size\n // break and return true (found key / value)\n if (jsonSize < maxLineLength)\n break;\n }\n\n if (jsonSize == 0) {\n // end of split reached\n key = null;\n value = null;\n return false;\n } else {\n return true;\n }\n }", "@Test\n public void readSystemObjectClassPrescription() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"Prescription\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return Prescription properly\", object.getClass(), actual.getClass());\n }", "public static List<String> parseJSONPrinterOutput(InputStream input) {\n BufferedReader reader = null;\n ArrayList<String> result = new ArrayList<>();\n try {\n int skip = 0;\n boolean inRead = false;\n StringBuilder sb = new StringBuilder();\n reader = new BufferedReader(new InputStreamReader(input));\n String line = reader.readLine();\n while (line!=null) {\n Matcher matcher = PATTERN_LOG.matcher(line);\n if(line.isEmpty()) {\n line = reader.readLine();\n continue;\n }\n if (matcher.find()) {\n if(skip<2) {\n skip++;\n line = reader.readLine();\n continue;\n }\n if(sb.length()>0) {\n result.add(sb.toString());\n sb = new StringBuilder();\n }\n String start = matcher.group(1);\n if(start!=null && !(start.length()<=1)) {\n sb.append(start);\n sb.append(System.lineSeparator());\n }\n inRead = true;\n } else if(inRead) {\n sb.append(line);\n sb.append(System.lineSeparator());\n }\n\n line = reader.readLine();\n }\n if (sb.length() > 0) {\n result.add(sb.toString());\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n return result;\n } finally {\n if(reader!=null)\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return result;\n }", "@Test\n public void test006() {\n\n int size = response.extract().path(\"data.size\");\n\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The size of the items is: \" + size);\n System.out.println(\"------------------End of Test---------------------------\");\n }", "TorrentJsonParser getJsonParser();", "public abstract boolean onProcess(JSONObject jSONObject, long j) throws Exception;", "JsonNode readNextResponse() {\n try {\n String responseLine = this.stdout.readLine();\n if (responseLine == null) {\n throw new JsiiException(\"Child process exited unexpectedly!\");\n }\n final JsonNode response = JsiiObjectMapper.INSTANCE.readTree(responseLine);\n JsiiRuntime.notifyInspector(response, MessageInspector.MessageType.Response);\n return response;\n } catch (IOException e) {\n throw new JsiiException(\"Unable to read reply from jsii-runtime: \" + e.toString(), e);\n }\n }", "protected void responseBodyConsumed() {\n\n // make sure this is the initial invocation of the notification,\n // ignore subsequent ones.\n responseStream = null;\n responseConnection.setLastResponseInputStream(null);\n\n if (shouldCloseConnection(responseConnection)) {\n responseConnection.close();\n }\n\n doneWithConnection = true;\n if (!inExecute) {\n ensureConnectionRelease();\n }\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n String[] stringArray0 = new String[0];\n JSONObject jSONObject1 = new JSONObject(jSONObject0, stringArray0);\n assertFalse(jSONObject1.equals((Object)jSONObject0));\n }", "@ProcessElement\n public void processElement(ProcessContext c) {\n // Get the JSON data as a string from our stream.\n String data = c.element();\n TableRow output;\n\n // Attempt to decode our JSON data into a TableRow.\n try {\n output = objectMapper.readValue(data, TableRow.class);\n } catch (Exception e) {\n // We were unable to decode the JSON, let's put this string\n // into a TableRow manually, without decoding it, so we can debug\n // it later, and output it as \"bad data\".\n c.output(badData, createBadRow(data));\n return;\n }\n\n // Incredibly simple validation of data -- we are simply making sure\n // the event key exists in our decoded JSON. If it doesn't, it's bad data.\n // If you need to validate your data stream, this would be the place to do it!\n if (!output.containsKey(\"Name\")) {\n c.output(badData, createBadRow(data)); \n return;\n }\n\n // Output our good data twice to two different streams. rawData will eventually\n // be directly inserted into BigQuery without any special processing, where as\n // our other output (the \"default\" output), outputs a KV of (event, TableRow), where\n // event is the name of our event. This allows us to do some easy rollups of our event\n // data a bit further down.\n c.output(rawData, output);\n c.output(KV.of((String)output.get(\"Name\"), output));\n }", "public JSONObject read(InputStream uploadedInputStream);", "@Test\n void getAndFormatJson() {\n g.getJsonFromGitHub();\n String json = g.getJsonString();\n\n boolean isValid;\n try {\n new Gson().fromJson(json, Object.class);\n isValid = true;\n } catch(com.google.gson.JsonSyntaxException ex) {\n isValid = false;\n }\n assertTrue(isValid, \"Invalid JSON\");\n }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.optJSONObject(\"v.W.y`~H9LS\");\n assertNull(jSONObject1);\n }", "@Test\r\n public void testParseResult() throws Exception \r\n {\r\n System.out.println(\"parseResult\");\r\n JsonObject data = null;\r\n CPTAYahooEODMessage instance = new CPTAYahooEODMessage();\r\n JsonArray expResult = null;\r\n // instance.parseResult(data, null);\r\n }", "@Test\n public void readSystemObjectClassMedicine() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"Medicine\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return Medicine properly\", object.getClass(), actual.getClass());\n }", "public T read(JsonReader in) throws IOException {\n\t return null;\n\t }", "@Override\r\n public Reader contentReader() {\r\n try {\r\n return okResponse.body().charStream();\r\n } catch (IOException e) {\r\n throw fail(e);\r\n }\r\n }", "void scanDataBufferForEndOfData() {\n while (!allRowsReceivedFromServer() &&\n (dataBuffer_.readerIndex() != lastValidBytePosition_)) {\n stepNext(false);\n }\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n Long long0 = new Long((-1L));\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"i3@.UhF(TlbH|]?SS\";\n stringArray0[1] = \"\\\"l{g8@|<`A~s*ul$h\";\n stringArray0[2] = \"QmU{LG(E2hKNIE>tV_N\";\n JSONObject jSONObject0 = new JSONObject(long0, stringArray0);\n StringWriter stringWriter0 = new StringWriter(2247);\n jSONObject0.put(\"getdecode\", false);\n jSONObject0.put(\"i3@.UhF(TlbH|]?SS\", false);\n JSONObject.valueToString(\"i3@.UhF(TlbH|]?SS\", 190, 190);\n stringWriter0.append((CharSequence) \"\\\"java.lang.String@0000000002\\\"\");\n StringWriter stringWriter1 = stringWriter0.append('D');\n Writer writer0 = jSONObject0.write(stringWriter1);\n jSONObject0.write(writer0);\n JSONObject.valueToString(writer0, (-1), 2247);\n JSONArray jSONArray0 = null;\n try {\n jSONArray0 = new JSONArray((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n String string0 = \"{+H1R$Cu|49H=>Jn\";\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(\"{+H1R$Cu|49H=>Jn\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Expected a ',' or '}' at character 16 of {+H1R$Cu|49H=>Jn\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }", "@Test(timeout = 4000)\n public void test044() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONArray jSONArray0 = jSONObject0.optJSONArray(\"[]\");\n assertNull(jSONArray0);\n }", "public void read() throws IOException, JSONException, NoSuchAlgorithmException {\n\t\tlong taille_ans = inchan.readLong();\n\t\tbyte [] cbuf = new byte[(int)taille_ans];\n\t\tinchan.read(cbuf, 0, (int)taille_ans);\n\t\tString s = new String(cbuf,\"UTF-8\");\n\t\t\n\t\tJSONObject msg = new JSONObject(s);\n\t\tJSONObject obj;\n\t\t\n\t\tswitch ((String)msg.keys().next()) {\n\t\tcase \"next_turn\":\n\t\t\tchooseWord(periode);\n\t\t\tperiode = msg.getInt(\"next_turn\");\n\t\t\tmap_wordPool.put(periode, new JSONArray());\n\t\t\tSystem.out.println(\"AUTEUR \"+identifiant+\" est en nouvelle periode : \"+periode);\n\t\t\twork = true;\n\t\t\tbreak;\n\t\tcase \"letters_bag\":\n\t\t\t\tletters_bag = msg.getJSONArray(\"letters_bag\");\n\t\t\t\tSystem.out.println(\"AUTEUR \"+identifiant+\" a recu sac de lettres : \"+letters_bag);\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"full_letterpool\":\n\t\t\tobj = msg.getJSONObject(\"full_letterpool\");\n\t\t\tupdateLetterPool(obj);\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"full_wordpool\": \n\t\t\tobj = msg.getJSONObject(\"full_wordpool\");\n\t\t\tafficheFullWordrPool(obj);\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"diff_letterpool\": //TODO\n\t\t\tbreak;\n\t\tcase \"diff_wordpool\":\n\t\t\t//TODO Election du mot au début de la blockchain ?\n\t\t\t\t\tmsg.getJSONObject(\"diff_wordpool\").getJSONObject(\"wordpool\");\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"inject_word\":\n//\t\t\tSystem.out.println(\"inject word\");\n\t\t\tobj = msg.getJSONObject(\"inject_word\");\n\t\t\taddWordToPeriod(periode,obj);\n\t\t\tbreak;\n\t\tcase \"inject_letter\":\n\t\t\tobj = msg.getJSONObject(\"inject_letter\");\n\t\t\taddLetterToPeriod(obj.getInt(\"period\"), obj);\n\t\t\tbreak;\n\t\t\n\t\tdefault:\n//\t\t\tSystem.out.println(msg);\n\t\t\tbreak;\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"B7?dng\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n JSONObject jSONObject1 = jSONObject0.put(\"] is not a JSONArray.\", (double) (byte)39);\n jSONObject0.toString((int) (byte)39);\n jSONObject0.optString(\"a2H;Fk;R703/.\", \"] is not a JSONArray.\");\n jSONObject0.opt(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n jSONObject0.optLong(\"ik\");\n jSONObject0.toString((int) (byte)39);\n int int0 = new Byte((byte)97);\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n jSONObject0.put(\"*bpp)j7=\", (Collection) linkedList0);\n jSONObject1.accumulate(\"] is not a JSONArray.\", linkedList0);\n try { \n jSONObject0.getJSONObject(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"{\\\\\\\"java.lang.String@0000000002\\\\\\\": java.lang.Double@0000000003}\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }", "@Test\n public void testSimpleCompositeDataExtractor() throws Exception {\n String[] compositePropertyNames = new String[2];\n compositePropertyNames[0] = \"Count\";\n compositePropertyNames[1] = \"Latency\";\n\n final String[] compositePropertyDescriptions = new String[2];\n compositePropertyDescriptions[0] = \"Count of requests received for the command\";\n compositePropertyDescriptions[1] = \"Average Time Taken to process the command\";\n\n final OpenType[] compositePropertyTypes = new OpenType[2];\n compositePropertyTypes[0] = SimpleType.LONG;\n compositePropertyTypes[1] = SimpleType.FLOAT;\n\n CompositeType compositeType =\n new CompositeType(\"Command Stats\", \"Stats for each command\",\n compositePropertyNames, compositePropertyDescriptions,\n compositePropertyTypes);\n\n Object[] compositeValues = new Object[compositePropertyNames.length];\n compositeValues[0] = new Long(10);\n compositeValues[1] = new Float(38.34f);\n\n CompositeData compositeData =\n new CompositeDataSupport(compositeType, compositePropertyNames, compositeValues);\n\n ObjectToJsonConverter jsonConverter = new ObjectToJsonConverter();\n\n JsonElement jsonElement = jsonConverter.extractObject(compositeData);\n Assert.assertNotNull(jsonElement);\n\n JsonElement count = jsonElement.getAsJsonObject().get(\"Count\");\n Assert.assertNotNull(count);\n Assert.assertEquals(count.getAsLong(), 10);\n JsonElement latency = jsonElement.getAsJsonObject().get(\"Latency\");\n Assert.assertNotNull(latency);\n Assert.assertEquals(latency.getAsFloat(), 38.34f);\n }", "@Test\n\tpublic void testParse(){\n\t\t{\n\t HttpServletRequest request = mock(HttpServletRequest.class); \n\t IParser iParserObject = new ParseJSON();\n\t \n\t String stringObject = \"{key: 'value'}\";\n\t \tStringReader stringReaderObject=new StringReader(stringObject);\n\t \tBufferedReader bufferReaderObject = new BufferedReader(stringReaderObject);\n\n\t try {\n\t\t\t\twhen(request.getReader()).thenReturn(bufferReaderObject);\n\t\t\t} catch (IOException e2) {\n\t\t\t\te2.printStackTrace();\n\t\t\t}\n\n\t JSONObject jsonObject = iParserObject.parse(request);\n\t assertNotNull(jsonObject);\n\t assertEquals(1, jsonObject.length());\n\t assertEquals(\"value\",jsonObject.get(\"key\"));\n\t }\n \t}", "public Input readData() {\n JSONParser jsonParser = new JSONParser();\n List<Consumer> consumers = new ArrayList<>();\n List<Distributor> distributors = new ArrayList<>();\n List<Producer> producers = new ArrayList<>();\n List<MonthlyUpdates> monthlyUpdates = new ArrayList<>();\n long numberOfTurns;\n\n try {\n // Parsing the contents of the JSON file\n JSONObject jsonObject = (JSONObject) jsonParser.parse(new FileReader(inputPath));\n numberOfTurns = (long) (jsonObject.get(\"numberOfTurns\"));\n JSONObject initialData = (JSONObject) jsonObject.get(\"initialData\");\n JSONArray jsonConsumers = (JSONArray) initialData.get(\"consumers\");\n JSONArray jsonDistributors = (JSONArray) initialData.get(\"distributors\");\n JSONArray jsonProducers = (JSONArray) initialData.get(\"producers\");\n\n if (jsonConsumers != null) {\n ConsumerFactory consumerFactory = ConsumerFactory.getInstance();\n for (Object jsonConsumer : jsonConsumers) {\n consumers.add(consumerFactory.createConsumer(\n (long) ((JSONObject) jsonConsumer).get(\"id\"),\n (long) ((JSONObject) jsonConsumer).get(\"initialBudget\"),\n (long) ((JSONObject) jsonConsumer).get(\"monthlyIncome\")));\n }\n }\n\n if (jsonDistributors != null) {\n DistributorFactory distributorFactory = DistributorFactory.getInstance();\n for (Object jsonDistributor : jsonDistributors) {\n distributors.add(distributorFactory.createDistributor(\n (long) ((JSONObject) jsonDistributor).get(\"id\"),\n (long) ((JSONObject) jsonDistributor).get(\"contractLength\"),\n (long) ((JSONObject) jsonDistributor).get(\"initialBudget\"),\n (long) ((JSONObject) jsonDistributor).get(\"initialInfrastructureCost\"),\n (long) ((JSONObject) jsonDistributor).get(\"energyNeededKW\"),\n EnergyChoiceStrategyType.valueOf(((JSONObject) jsonDistributor).\n get(\"producerStrategy\").toString())));\n }\n }\n\n if (jsonProducers != null) {\n for (Object jsonProducer : jsonProducers) {\n producers.add(new Producer(((long) ((JSONObject) jsonProducer).get(\"id\")),\n EnergyType.valueOf(((JSONObject) jsonProducer).\n get(\"energyType\").toString()),\n (long) ((JSONObject) jsonProducer).get(\"maxDistributors\"),\n (double) ((JSONObject) jsonProducer).get(\"priceKW\"),\n (long) ((JSONObject) jsonProducer).get(\"energyPerDistributor\")));\n }\n }\n\n JSONArray jsonUpdates = (JSONArray) jsonObject.get(\"monthlyUpdates\");\n\n for (JSONObject monthlyUpdate : (Iterable<JSONObject>) jsonUpdates) {\n MonthlyUpdates update = new MonthlyUpdates();\n JSONArray newConsumers = (JSONArray) monthlyUpdate.get(\"newConsumers\");\n for (JSONObject newConsumer : (Iterable<JSONObject>) newConsumers) {\n update.getNewConsumers().add(new Consumer(Long.parseLong(newConsumer.get(\"id\").\n toString()),\n Long.parseLong(newConsumer.get(\"initialBudget\").toString()),\n Long.parseLong(newConsumer.get(\"monthlyIncome\").toString())));\n }\n org.json.simple.JSONArray costsChanges = (JSONArray) monthlyUpdate.\n get(\"distributorChanges\");\n for (JSONObject costsChange : (Iterable<JSONObject>) costsChanges) {\n update.getCostsChanges().add(new CostsChanges(Long.parseLong(costsChange.\n get(\"id\").toString()),\n Long.parseLong(costsChange.get(\"infrastructureCost\").toString())));\n }\n monthlyUpdates.add(update);\n }\n return new Input(numberOfTurns, consumers, distributors, producers, monthlyUpdates);\n\n } catch (ParseException | IOException e) {\n e.printStackTrace();\n }\n\n return new Input(0, consumers, distributors, producers, monthlyUpdates);\n\n }", "private boolean moreServerContent() {\n Stopwatch stopwatch = Stopwatch.createStarted();\n boolean moreDataAvailable;\n try {\n if (resIterator == null) {\n return false;\n }\n moreDataAvailable = resIterator.hasNext();\n recordSuccessMetric(MESSAGE_LATENCY_MS, stopwatch.elapsed(MILLISECONDS));\n } catch (Exception e) {\n recordErrorMetric(MESSAGE_LATENCY_MS, stopwatch.elapsed(MILLISECONDS), e);\n throw e;\n }\n if (!moreDataAvailable) {\n cancelCurrentRequest();\n }\n return moreDataAvailable;\n }", "private Object onParse(final String content) throws IOException{\n if(null == this.mBean)\n return null;\n\n try{\n return JSON.parseObject(content, this.mBean);\n }catch(Exception e){\n throw new IOException(e.getMessage());\n }\n }", "@Test\n public void testStreamParsePubDev3401() throws IOException {\n final int chunkSize = 64 * 1024;\n ParseSetupV3 ps = new ParseSetupV3();\n ps.parse_type = \"CSV\";\n ps.chunk_size = chunkSize;\n // mock Parser\n final List<Integer> pcCalls = new LinkedList<>();\n Parser p = new Parser(new ParseSetup(ps), null) {\n @Override protected ParseWriter parseChunk(int cidx, ParseReader din, ParseWriter dout) {\n pcCalls.add(cidx);\n byte[] data = din.getChunkData(cidx);\n assert cidx <= 3;\n assert ((data != null) && (data.length == chunkSize)) || (cidx == 3);\n return null;\n }\n };\n // mock source InputStream, only used for \"back-channel\" chunk index signalling\n final Queue<Integer> cidxs = new LinkedList<>(Arrays.asList(1, 2, 3, 4));\n InputStream bvs = new InputStream() {\n @Override public int read() throws IOException { throw new UnsupportedOperationException(); }\n @Override public int read(byte[] b, int off, int len) throws IOException {\n assert b == null;\n return cidxs.remove();\n }\n };\n // mock StreamParseWriter\n MockStreamParseWriter w = new MockStreamParseWriter(chunkSize);\n // Vec made of 3 chunks\n Key k = FVecFactory.makeByteVec(\n RandomStringUtils.randomAscii(chunkSize),\n RandomStringUtils.randomAscii(chunkSize),\n RandomStringUtils.randomAscii(chunkSize)\n );\n try {\n ByteVec v = DKV.getGet(k);\n p.streamParseZip(v.openStream(null), w, bvs);\n assertEquals(\"Expected calls to parseChunk()\", Arrays.asList(0, 1, 2, 3), pcCalls);\n assertEquals(\"Expected calls to nextChunk()\", Arrays.asList(0, 1, 2), w._nchks);\n } finally {\n k.remove();\n }\n }", "@Test\n public void fluxListStreamTest(){\n\n testClient.get().uri(\"/route/fluxListStream\") //Prepare an HTTP GET request.\n .accept(MediaType.APPLICATION_JSON)\n .exchange() // API call happens here, Perform the exchange without a request body.\n .expectStatus().isOk()\n // .returnResult(List.class) // Exit the chained flow in order to consume the response body externally,\n // .getResponseBody(); // Return the response body as a Flux<T> of decoded elements.\n .expectBodyList(String.class)\n .consumeWith((response) -> {\n //System.out.println(Objects.requireNonNull(response.getResponseBody()).get(0));\n assertThat(Objects.requireNonNull(response.getResponseBody()).get(0).contains(\"A\"));\n });\n\n/*\n StepVerifier.create(listStream.log())\n .expectSubscription()\n // .expectNext(streamList)\n .expectNext(streamList)\n .verifyComplete();\n*/\n\n }", "@Test\n public void readSystemObjectClassAppointmentRequest() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"AppointmentRequest\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return AppointmentRequest properly\", object.getClass(), actual.getClass());\n }", "public void test_002_Stream() throws Throwable {\n\n final String RESOURCE_URI = \"asimov_it_test_002_SP_PROXYING\";\n String uri = createTestResourceUri(RESOURCE_URI);\n\n HttpRequest request = createRequest().setUri(uri).addHeaderField(\"Cache-Control\" ,\"max-age=500\").getRequest();\n PrepareResourceUtil.prepareResource(uri, false);\n\n //miss, cached by RFC\n sendRequest2(request, 0);\n // R1.2 hit\n checkHit(request, 2, VALID_RESPONSE);\n }", "@Test(timeout = 4000)\n public void test099() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = new JSONObject(jSONObject0);\n JSONObject jSONObject2 = jSONObject1.putOpt(\"\", jSONObject0);\n Byte.compare((byte)42, (byte)42);\n JSONObject.quote(\"\");\n Byte.toUnsignedInt((byte)42);\n JSONObject.valueToString(jSONObject2, (-1394), (-1394));\n JSONObject jSONObject3 = new JSONObject(\"{\\n\\\"java.lang.String@0000000003\\\": {},\\n\\\"java.lang.String@0000000004\\\": \\\"java.lang.Class@0000000005\\\"\\n}\");\n String string0 = \"&<uWyN63)KiOjjs&n3\";\n JSONObject jSONObject4 = null;\n try {\n jSONObject4 = new JSONObject(\"&<uWyN63)KiOjjs&n3\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of &<uWyN63)KiOjjs&n3\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }", "protected void doConsumeResponse() throws Exception {\n if (response.getEntity() != null)\n response_data = EntityUtils.toByteArray(response.getEntity());\n }", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n StringWriter stringWriter0 = new StringWriter(12);\n Double.sum(0.0, (-2252.167794836282));\n Double.isFinite((-710.25));\n JSONObject.getNames((Object) stringWriter0);\n String string0 = \"\";\n String string1 = \"RT8u3l.~].,i\";\n JSONObject jSONObject1 = null;\n try {\n jSONObject1 = new JSONObject(\"RT8u3l.~].,i\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of RT8u3l.~].,i\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }" ]
[ "0.6503768", "0.6065198", "0.5784006", "0.5738627", "0.56927055", "0.5507705", "0.5487872", "0.54457194", "0.54316473", "0.5412099", "0.534334", "0.5334644", "0.53090256", "0.5275719", "0.52735025", "0.5253974", "0.52433294", "0.5237957", "0.5232952", "0.52111983", "0.5206786", "0.52040184", "0.51939064", "0.5179402", "0.51698905", "0.5165305", "0.5163293", "0.51568365", "0.51566726", "0.5154102", "0.51522464", "0.51459384", "0.51331186", "0.5117187", "0.5102196", "0.50937384", "0.508754", "0.5078752", "0.5077571", "0.50762993", "0.5069144", "0.506694", "0.50651306", "0.505244", "0.50511056", "0.50444925", "0.50404054", "0.50340384", "0.5028245", "0.50248754", "0.50231665", "0.5020659", "0.5017532", "0.501158", "0.5010602", "0.50054556", "0.4989946", "0.49881884", "0.4983241", "0.4976876", "0.49730057", "0.49608245", "0.4960255", "0.49600238", "0.49574804", "0.4948011", "0.49463677", "0.4942996", "0.4936095", "0.49273258", "0.49240774", "0.49240145", "0.49216464", "0.49188533", "0.49188042", "0.4912793", "0.4908349", "0.49028218", "0.49010938", "0.48906174", "0.48897803", "0.48886275", "0.48841774", "0.48822284", "0.48757723", "0.4875737", "0.48734412", "0.48661616", "0.4862515", "0.48606128", "0.48600972", "0.4856816", "0.48555672", "0.48490286", "0.48468685", "0.4843455", "0.48426178", "0.48413143", "0.4834648", "0.48301768" ]
0.5864017
2
Test that an array of IRIs resolve to the respective desired locations. Test with and without a suffix parameter provided.
private void testValidIRISpecified(final String service, final String redirectPrefix, final String[] resourcesThatShouldResolve) { // Include an ampersand in the test suffix, as it is important // to confirm that this comes back without any form of escaping applied. String dummyTestSuffix = "&dummyTestSuffix"; Response response = null; URI redirectLocation; for (String resource : resourcesThatShouldResolve) { try { response = NetClientUtils.doGetWithAdditionalComponentsNoRedirects( baseURL, service, webTarget -> webTarget.queryParam("iri", resource)); Assert.assertEquals(response.getStatusInfo().getFamily(), Family.REDIRECTION, "lookupIRI response status for iri: " + resource); redirectLocation = response.getLocation(); } finally { if (response != null) { response.close(); response = null; } } Assert.assertEquals(redirectLocation.toString(), redirectPrefix + "?uri=" + resource, "Redirect URL for " + resource); // Now again, with a suffix provided. try { response = NetClientUtils.doGetWithAdditionalComponentsNoRedirects( baseURL, service, webTarget -> webTarget.queryParam("iri", resource) .queryParam("suffix", dummyTestSuffix)); Assert.assertEquals(response.getStatusInfo().getFamily(), Family.REDIRECTION, "lookupIRI response status for iri: " + resource); redirectLocation = response.getLocation(); } finally { if (response != null) { response.close(); response = null; } } Assert.assertEquals(redirectLocation.toString(), redirectPrefix + "?uri=" + resource + dummyTestSuffix, "Redirect URL for " + resource + " with suffix " + dummyTestSuffix); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void saConstruction() {\n String text = \"BAAAAB0ABAAAAB1BABA2ABA3AAB4BBBB5BB\";\n\n SuffixArray sa1 = new SuffixArraySlow(text);\n SuffixArray sa2 = new SuffixArrayMed(text);\n SuffixArray sa3 = new SuffixArrayFast(text);\n SuffixArray[] suffixArrays = {sa1, sa2, sa3};\n\n for (int i = 0; i < suffixArrays.length; i++) {\n for (int j = i + 1; j < suffixArrays.length; j++) {\n SuffixArray s1 = suffixArrays[i];\n SuffixArray s2 = suffixArrays[j];\n for (int k = 0; k < s1.getSa().length; k++) {\n assertThat(s1.getSa()[k]).isEqualTo(s2.getSa()[k]);\n }\n }\n }\n }", "public static void main(String[] args) {\n\t\t\n\t\tString myList[] = {\"Bozo\", \"Foobar\", \"Delta\", \"Foozball\", \"Demo\", \"Money\", \"Zoo\"};\n\t\tint foundIndexes[];\n\t\tboolean found = false;\n\t\t\n\t\t\n\t\tSystem.out.println(\"This is the of the arrayHasExactMatch and indexOfOccurenceInArray methods\");\n\t\tSystem.out.println(\"The array to test contains the following items:\");\n\t\tfor(int i = 0; i < myList.length; i++) {\n\t\t\tSystem.out.print(myList[i] + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Scenario 1\");\n\t\tfound = ArrUtil.arrayHasExactMatch (myList, \"zo\", false);\n\t\tSystem.out.println(\"arrayHasExactMatch \" + found);\n\t\tSystem.out.println(\"Scenario 2\");\n\t\tfound = ArrUtil.arrayHasExactMatch (myList, \"zoo\", false);\n\t\tSystem.out.println(\"Scenario 3\");\n\t\tSystem.out.println(\"arrayHasExactMatch \" + found);\n\t\tSystem.out.println(\"Scenario 4\");\n\t\tfound = ArrUtil.arrayHasExactMatch (myList, \"zoo\", true);\n\t\tSystem.out.println(\"arrayHasExactMatch \" + found);\n\t\tSystem.out.println(\"Scenario 5\");\n\t\tfound = ArrUtil.arrayHasExactMatch (myList, \"foo\", true);\n\t\tSystem.out.println(\"arrayHasExactMatch \" + found);\n\t\tSystem.out.println(\"Scenario 6\");\n\t\tfound = ArrUtil.arrayHasExactMatch (myList, \"foo\", false);\n\t\tSystem.out.println(\"arrayHasExactMatch \" + found);\n\t\tSystem.out.println(\"Scenario 7\");\n\t\tfound = ArrUtil.arrayHasExactMatch (myList, \"delta\", true);\n\t\tSystem.out.println(\"arrayHasExactMatch \" + found);\n\t\tSystem.out.println(\"Scenario 8\");\n\t\tfound = ArrUtil.arrayHasExactMatch (myList, \"Delta\", true);\n\t\tSystem.out.println(\"arrayHasExactMatch \" + found);\n\t\t\n\t\tSystem.out.println(\"Scenario 9\");\n\t\tfoundIndexes = ArrUtil.indexOfOccuranceInArray (myList, \"zo\", false);\n\t\tSystem.out.println(\"indexOfOccuranceInArray \" + foundIndexes[0]);\n\t\tSystem.out.println(\"Scenario 10\");\n\t\tfoundIndexes = ArrUtil.indexOfOccuranceInArray (myList, \"zoo\", false);\n\t\tSystem.out.println(\"indexOfOccuranceInArray \" + foundIndexes[0]);\n\t\tSystem.out.println(\"Scenario 11\");\n\t\tfoundIndexes = ArrUtil.indexOfOccuranceInArray (myList, \"zoo\", true);\n\t\tSystem.out.println(\"indexOfOccuranceInArray \" + foundIndexes[0]);\n\t\tSystem.out.println(\"Scenario 12\");\n\t\tfoundIndexes = ArrUtil.indexOfOccuranceInArray (myList, \"foo\", true);\n\t\tSystem.out.println(\"indexOfOccuranceInArray \" + foundIndexes[0]);\n\t\tSystem.out.println(\"Scenario 13\");\n\t\tfoundIndexes = ArrUtil.indexOfOccuranceInArray (myList, \"foo\", false);\n\t\tSystem.out.println(\"indexOfOccuranceInArray \" + foundIndexes[0]);\n\t\tSystem.out.println(\"Scenario 14\");\n\t\tfoundIndexes = ArrUtil.indexOfOccuranceInArray (myList, \"delta\", true);\n\t\tSystem.out.println(\"indexOfOccuranceInArray \" + foundIndexes[0]);\n\t\tSystem.out.println(\"Scenario 15\");\n\t\tfoundIndexes = ArrUtil.indexOfOccuranceInArray (myList, \"Delta\", true);\n\t\tSystem.out.println(\"indexOfOccuranceInArray \" + foundIndexes[0]);\n\t\tSystem.out.println(\"This works\");\n\t}", "@Test\n public void testSearch(){\n for(int i = 0; i < realLocations.length; i++) {\n try {\n String[] locationInfo = new SearchTask().execute(browserKey, realLocations[i]).get();\n assertTrue(locationInfo.length > 0);\n testLocation(locationInfo);\n }\n catch (Exception e){\n assertFalse(\"Search task failed: \" + e.getMessage(), true);\n }\n }\n for(int i = 0; i < falseLocations.length; i++){\n try {\n String[] locationInfo = new SearchTask().execute(browserKey, (String) falseLocations[i]).get();\n assertTrue(locationInfo.length > 0);\n testLocation(locationInfo);\n }\n catch (Exception e){\n assertFalse(\"Search task failed: \" + e.getMessage(), true);\n }\n }\n }", "@Test\r\n void matches_iterable() {\n assertMatcherTrue(Paths.get(\"a\", \"b\"), size(2));\r\n }", "@Test\n\tpublic void testContainsSomePrefix() {\n\n\t\tString[] prefixes = {\"ne\", \"ned\", \"nes\", \"ning\", \"st\", \"sted\", \"sting\", \"sts\"};\n\t\tList<String> listPrefixes = Arrays.asList(prefixes);\n\n\t\tassertThat(\"Prefix contained\", StringUtils.containsSomePrefix(\"stedadsdf\", listPrefixes), equalTo(true));\n\t\tassertThat(\"Prefix contained\", StringUtils.containsSomePrefix(\"neasdsadfa\", listPrefixes), equalTo(true));\n\t\tassertThat(\"Prefix contained\", StringUtils.containsSomePrefix(\"ningsdfsf\", listPrefixes), equalTo(true));\n\t\tassertThat(\"Prefix not contained\", StringUtils.containsSomePrefix(\"nasfds\", listPrefixes), equalTo(false));\n\t\tassertThat(\"Prefix not contained\", StringUtils.containsSomePrefix(\"abdsfsd\", listPrefixes), equalTo(false));\n\t\tassertThat(\"Prefix not contained\", StringUtils.containsSomePrefix(\"ninsdfdsf\", listPrefixes), equalTo(false));\n\t\tassertThat(\"Prefix not contained\", StringUtils.containsSomePrefix(\"swerwrw\", listPrefixes), equalTo(false));\n\t}", "@Test\n\tpublic void testHappyPath() {\n\t\texpected.add(new int[]{94133,94133});\n\t\texpected.add(new int[]{94200,94299});\n\t\texpected.add(new int[]{94600,94699});\n\t\t\n\t\t//interger arrays for happy path\n\t\tint[] a1 = new int[] {94133,94133}, a2 = {94200,94299}, a3 = {94600,94699};\n\n\t\tint canShip1 = 94199, canShip2 = 94300, canShip3 = 65532;\n\t\t\n\t\t//\n\t\tint cantShip1 = 94133, cantShip2 = 94650, cantShip3 = 94230, cantShip4 = 94600, cantShip5 = 94299;\n\t\t\n\t\tSystem.out.println(\"********************************** Start testHappyPath() **********************************\");\n\t\t\n\t\tSystem.out.print(\"Input ZipCode Ranges:---------------> \");\n\t\tZipCodeUtil.printZipRange(a1, a2, a3);\n\t\t\n\t\ttry{\n\t\t\tmergedZips = ZipCodeUtil.getInstance().mergeUniqueRanges(a1, a2, a3);\n\t\t\t\n\t\t\tSystem.out.println(\"<----------------------- :Output \");\n\t\t\t\n\t\t\tfor(int[] range : mergedZips){\n\t\t\t\tZipCodeUtil.printZipRange(range);\t\n\t\t\t}\n\t\t\t\n\t\t\tAssert.assertArrayEquals(expected.toArray(), mergedZips.toArray());\n\n\t\t\tSystem.out.println(\"<----------------------- :ZipCode Range\");\n\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\tSystem.out.println(\"----------------- Test ZipCodes -------------------\");\n\n\t\t\tAssert.assertTrue(\"Can ship to: \"+ canShip1, ZipCodeUtil.getInstance().canShipTo(canShip1));\n\t\t\tSystem.out.println(\"Can ship to: \"+ canShip1 +\" \"+ ZipCodeUtil.getInstance().canShipTo(canShip1));\n\t\t\t\n\t\t\tAssert.assertTrue(\"Can ship to: \"+ canShip2, ZipCodeUtil.getInstance().canShipTo(canShip2));\n\t\t\tSystem.out.println(\"Can ship to: \"+ canShip2 +\" \"+ ZipCodeUtil.getInstance().canShipTo(canShip2));\n\t\t\t\n\t\t\tAssert.assertTrue(\"Can ship to: \"+ canShip3, ZipCodeUtil.getInstance().canShipTo(canShip3));\n\t\t\tSystem.out.println(\"Can ship to: \"+ canShip3 +\" \"+ ZipCodeUtil.getInstance().canShipTo(canShip3));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip1, ZipCodeUtil.getInstance().canShipTo(cantShip1));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip1 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip1));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip2, ZipCodeUtil.getInstance().canShipTo(cantShip2));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip2 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip2));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip3, ZipCodeUtil.getInstance().canShipTo(cantShip3));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip3 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip3));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip4, ZipCodeUtil.getInstance().canShipTo(cantShip4));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip4 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip4));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip5 , ZipCodeUtil.getInstance().canShipTo(cantShip5));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip5 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip5));\n\t\t\t\n\t\t\tSystem.out.println(\"----------------- End Test ZipCodes -------------------\");\n\n\t\t\n\t\t} catch(InvalidZipCode e){\n\t\t\tSystem.err.println(e.getErrorCode() + \" - \" + e.getMessage());\n\t\t\tAssert.fail(e.getErrorCode() + \" - \" + e.getMessage());\n\t\t}finally{\n\n\t\t\tSystem.out.println(\"********************************** End testHappyPath() **********************************\");\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "@Test\r\n\tpublic void testCheck_featureLocationBeginandEndwithNs() {\r\n\t\tint beginN = 10;\r\n\t\tEntry entry = entryFactory.createEntry();\r\n\t\tSequence newsequence = sequenceFactory.createSequenceByte(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".getBytes());\r\n\t\tentry.setSequence(newsequence);\r\n\t\tFeature feature1 = featureFactory.createFeature(\"feature1\");\r\n\t\tOrder<Location> order1 = new Order<Location>();\r\n\t\torder1.addLocation(locationFactory.createLocalRange((long) 1, (long) 8));\r\n\t\tfeature1.setLocations(order1);\r\n\t\tFeature feature2 = featureFactory.createFeature(\"feature2\");\r\n\t\tOrder<Location> order2 = new Order<Location>();\r\n\t\torder2.addLocation(locationFactory.createLocalRange((long) 40,\r\n\t\t\t\t(long) 46));\r\n\t\tfeature2.setLocations(order2);\r\n\t\tentry.addFeature(feature1);\r\n\t\tentry.addFeature(feature2);\r\n\t\tassertTrue(Utils.shiftLocation(entry, beginN,false).size() ==2);\r\n\t\t}", "private void buildBWTandTest(byte[] s, int nr , Alphabet alphabet) {\n if (nr == 11) {\n System.out.println();\n }\n Sequences sequence = Sequences.createEmptySequencesInMemory();\n try {\n sequence.addSequence(ByteBuffer.wrap(s));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n final SuffixTrayBuilder stb = new SuffixTrayBuilder(sequence, alphabet, \"suffix\");\n stb.build(\"bothLR\"); // WARNING: change the method and you must change the type cast in the\n // next line!\n assert (stb.getSuffixDLL() instanceof SuffixXorDLL);\n final SuffixXorDLL suffixDLL = (SuffixXorDLL) stb.getSuffixDLL(); // type cast is okay\n // because I used method\n // 'bothLR' to build the\n // list\n\n // test index\n bwt(s);\n BWTBuilder.BWT bwt = BWTBuilder.build(suffixDLL);\n BWTIndex index = BWTIndexBuilder.build(bwt.bwt, bwt.sampledSuffixArray);\n for (int i = -128; i < 128; i++) {\n assertEquals(String.format(\n \"[Test %d] Array 'c' differs at position %s (expected: %s - actual: %s)\", nr, i,\n c[i + 128], index.getFirstIndexPosition((byte) i)), c[i + 128],\n index.getFirstIndexPosition((byte) i));\n }\n \n if (nr == 11) {\n System.out.println(Arrays.toString(s));\n for (int i = 0; i < e.length; i++) {\n System.out.print(index.getCharacterAtIndexPosition(i));\n }\n System.out.println();\n }\n\n for (int i = 0; i < e.length; i++) {\n assertEquals(String.format(\n \"[Test %d] Array 'e' differs at position %s (expected: %s - actual: %s)\", nr, i,\n e[i], index.getCharacterAtIndexPosition(i)), e[i],\n index.getCharacterAtIndexPosition(i));\n }\n \n// System.out.println(Arrays.toString(e));\n// for (int i = 0; i < el.length; i++) {\n// System.out.print(index.getSuccedingIndexPosition(i) + \" \");\n// }\n// System.out.println();\n\n for (int i = 0; i < el.length; i++) {\n assertEquals(String.format(\n \"[Test %d] Array 'el' differs at position %s (expected: %s - actual: %s)\", nr, i,\n el[i], index.getSuccedingIndexPosition(i)), el[i],\n index.getSuccedingIndexPosition(i));\n }\n for (int i = 0; i < e.length; i++) {\n int sequencePos = index.map2text(i);\n assertEquals(\n String.format(\n \"[Test %d] Wrong mapping to text at index position %s (index.getSuccedingIndexPosition(i) = %d)\",\n nr, i, sequencePos), index.getCharacterAtIndexPosition(i),\n sequence.array()[sequencePos]);\n }\n }", "public void testLocation(String[] location){\n if(location.length == 3){\n assertNotSame(\"Expected 1st field of returned search to be of type Double\", new Exception(), Double.parseDouble(location[0]));\n assertNotSame(\"Expected 2nd field of returned search to be of type Double\", new Exception(), Double.parseDouble(location[1]));\n assertNotSame(\"Expected 3rd field of returned search to be of type String\", new String(), location[2]);\n }\n else if(location.length == 1){\n assertSame(\"Expected a value minimum value of double\",Double.toString(Double.MIN_VALUE),location[0]);\n }\n else {\n assertFalse(\"Unexpected location array size found\", true);\n }\n }", "public boolean useRegisteredSuffixPatternMatch()\n/* */ {\n/* 610 */ return this.registeredSuffixPatternMatch;\n/* */ }", "public boolean endsWith(\n String... suffix\n ) {\n \t// TODO optimize\n int offset = size() - suffix.length;\n if (offset < 0) return false;\n for(\n int index = 0;\n index < suffix.length;\n index++\n ) {\n if(!suffix[index].equals(this.getSegment(offset+index).toClassicRepresentation())) return false;\n }\n return true; \n }", "public static String[] findResources(final String suffix) {\n ClasspathScanner scanner = new ClasspathScanner();\n\n final ArrayList result = new ArrayList();\n\n scanner.scan(suffix, new ResourceVisitor() {\n public void accept(File dir, String relativeFileName) {\n result.add(relativeFileName.replace('\\\\', '/'));\n }\n\n public void accept(ZipFile archive, ZipEntry zipEntry) {\n result.add(zipEntry.getName().replace('\\\\', '/'));\n }\n });\n\n return (String[]) result.toArray(new String[result.size()]);\n }", "@Test\n\tpublic void testInterpolationSearch() {\n\t\tint[] numbers = {0, 1, 2, 3, 4, 5, 6};\n\t\tint r1 = _02_InterpolationSearch.interpolationSearch(numbers, 2);\n\t\tassertEquals(2, r1);\n\t\t\n\t\tint[] numbers2 = {2, 4, 6, 8, 10};\n\t\tint r2 = _02_InterpolationSearch.interpolationSearch(numbers2, 2);\n\t\tassertEquals(0, r2);\n\t\t\n\t\tint[] numbers3 = {100, 200, 300};\n\t\tint r3 = _02_InterpolationSearch.interpolationSearch(numbers3, 160);\n\t\tassertEquals(-1, r3);\n\n\t}", "public String visit(ArrayLookup n, LLVMRedux argu) throws Exception {\n\n String final_pointer = u.arrayLookup(n.f0.accept(this, argu),n.f2.accept(this, argu)), loader =u.getReg() ;\n u.println(loader+\" = load \"+u.dereference(u.javaTypeToLLVMType(u.getRegType(final_pointer)))+\", \"+u.javaTypeToLLVMType(u.getRegType(final_pointer))+\" \"+final_pointer);//todo get type\n if(u.getRegType(final_pointer).equals(\"boolean[]\")){\n u.println(u.getReg()+\" = trunc i8 \"+loader+\" to i1\");\n }\n //if finalpointer type is i8*, then truncate the result in a register and return that register.\n return u.getLastReg();\n }", "@java.lang.Override\n public io.envoyproxy.envoy.type.matcher.v3.StringMatcher getKnownSuffixes(int index) {\n return knownSuffixes_.get(index);\n }", "@When(\"Try to Attempt well-known or guessable resource locations\")\npublic void tryattemptwellknownorguessableresourcelocations(){\n}", "public default boolean isArrayScanpath() {\n\t\treturn false;\n\t}", "@Test\n\tpublic void testInterpolationSearch() {\n\t}", "@Test\n public void testGetLocation() {\n int[] location = board3by3.getLocation(1);\n int[] result = new int[2];\n result[0] = 2;\n result[1] = 0;\n boolean equiv = Arrays.equals(result, location);\n assertTrue(equiv);\n }", "@Test\n public void testGeneratorWithMultipleCustomResolverDirectories() throws Exception\n {\n File jarFile = new File(_tempDir, \"testWithResolverDirectories.jar\");\n Map<String, String> jarEntries = new HashMap<>();\n jarEntries.put(\"custom1/CustomResolverFoo.pdl\", \"record CustomResolverFoo { ref: CustomResolverBar }\");\n jarEntries.put(\"custom2/CustomResolverBar.pdl\", \"record CustomResolverBar { ref: CustomTransitive }\");\n // This entry is transitively referenced (not referenced by the source model)\n jarEntries.put(\"custom3/CustomTransitive.pdl\", \"record CustomTransitive {}\");\n createJarFile(jarFile, jarEntries);\n\n // Define the expected output\n Map<String, String> expectedTypeNamesToSourceFileMap = new HashMap<>();\n expectedTypeNamesToSourceFileMap.put(\"NeedsCustomResolvers\", PEGASUS_DIR + FS + \"NeedsCustomResolvers.pdl\");\n expectedTypeNamesToSourceFileMap.put(\"CustomResolverFoo\", jarFile + \":custom1/CustomResolverFoo.pdl\");\n expectedTypeNamesToSourceFileMap.put(\"CustomResolverBar\", jarFile + \":custom2/CustomResolverBar.pdl\");\n expectedTypeNamesToSourceFileMap.put(\"CustomTransitive\", jarFile + \":custom3/CustomTransitive.pdl\");\n\n testRunGenerator(\"NeedsCustomResolvers.pdl\", expectedTypeNamesToSourceFileMap, jarFile.getCanonicalPath(),\n Arrays.asList(\"custom1\", \"custom2\", \"custom3\"), null);\n }", "@Test\n\tpublic void testMergeZips() {\n\t\texpected.add(new int[]{94133,94133});\n\t\texpected.add(new int[]{94200,94699});\n\t\t\n\t\t//interger arrays for happy path\n\t\tint[] a1 = new int[] {94133,94133}, a2 = {94200,94299}, a3 = {94226,94699};\n\t\t\n\t\tint canShip1 = 94199, canShip2 = 94134, canShip3 = 65532;\n\t\t\n\t\t//\n\t\tint cantShip1 = 94133, cantShip2 = 94650, cantShip3 = 94230, cantShip4 = 94600, cantShip5 = 94299,\n\t\t\t\tcantShip6 = 94300;\n\t\t\n\t\tSystem.out.println(\"********************************** Start testMergeZips() **********************************\");\n\t\t\n\t\tSystem.out.print(\"Input ZipCode Ranges:---------------> \");\n\t\tZipCodeUtil.printZipRange(a1, a2, a3);\n\t\t\n\t\ttry{\n\t\t\tmergedZips = ZipCodeUtil.getInstance().mergeUniqueRanges(a1, a2, a3);\n\t\t\t\n\t\t\tSystem.out.println(\"<----------------------- :Output \");\n\t\t\t\n\t\t\tfor(int[] range : mergedZips){\n\t\t\t\tZipCodeUtil.printZipRange(range);\t\n\t\t\t}\n\t\t\t\n\t\t\tAssert.assertArrayEquals(expected.toArray(), mergedZips.toArray());\n\t\t\t\n\t\t\tSystem.out.println(\"<----------------------- :ZipCode Range\");\n\n\t\t\tSystem.out.println();\n\n\t\t\tSystem.out.println(\"----------------- Test ZipCodes -------------------\");\n\n\t\t\tAssert.assertTrue(\"Can ship to: \"+ canShip1, ZipCodeUtil.getInstance().canShipTo(canShip1));\n\t\t\tSystem.out.println(\"Can ship to: \"+ canShip1 +\" \"+ ZipCodeUtil.getInstance().canShipTo(canShip1));\n\n\t\t\tAssert.assertTrue(\"Can ship to: \"+ canShip2, ZipCodeUtil.getInstance().canShipTo(canShip2));\n\t\t\tSystem.out.println(\"Can ship to: \"+ canShip2 +\" \"+ ZipCodeUtil.getInstance().canShipTo(canShip2));\n\n\t\t\tAssert.assertTrue(\"Can ship to: \"+ canShip3 , ZipCodeUtil.getInstance().canShipTo(canShip3));\n\t\t\tSystem.out.println(\"Can ship to: \"+ canShip3 +\" \"+ ZipCodeUtil.getInstance().canShipTo(canShip3));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip1, ZipCodeUtil.getInstance().canShipTo(cantShip1));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip1 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip1));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip2, ZipCodeUtil.getInstance().canShipTo(cantShip2));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip2 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip2));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip3 , ZipCodeUtil.getInstance().canShipTo(cantShip3));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip3 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip3));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip4,ZipCodeUtil.getInstance().canShipTo(cantShip4));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip4 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip4));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip5 ,ZipCodeUtil.getInstance().canShipTo(cantShip5));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip5 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip5));\n\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip6 ,ZipCodeUtil.getInstance().canShipTo(cantShip6));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip6 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip6));\n\n\t\t\tSystem.out.println(\"----------------- End Test ZipCodes -------------------\");\n\n\t\t\n\t\t} catch(InvalidZipCode e){\n\n\t\t\tSystem.err.println(e.getErrorCode() + \" - \" + e.getMessage());\n\t\t\tAssert.fail(e.getErrorCode() + \" - \" + e.getMessage());\n\t\t}finally{\n\n\t\t\tSystem.out.println(\"********************************** End testMergeZips() **********************************\");\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "private static boolean subBandsMatch(int[] sourceBands, int[] destinationBands) {\n/* 108 */ if (sourceBands == null && destinationBands == null)\n/* 109 */ return true; \n/* 110 */ if (sourceBands != null && destinationBands != null) {\n/* 111 */ if (sourceBands.length != destinationBands.length)\n/* */ {\n/* 113 */ return false;\n/* */ }\n/* 115 */ for (int i = 0; i < sourceBands.length; i++) {\n/* 116 */ if (sourceBands[i] != destinationBands[i]) {\n/* 117 */ return false;\n/* */ }\n/* */ } \n/* 120 */ return true;\n/* */ } \n/* */ \n/* 123 */ return false;\n/* */ }", "@Test\n\tpublic void test() {\n\t\tTestUtil.testEquals(new Object[][]{\n\t\t\t\t{1, \"leetscode\", new String[]{\"leet\", \"code\", \"leetcode\"}},\n\t\t\t\t{3, \"sayhelloworld\", new String[]{\"hello\", \"world\"}},\n\t\t});\n\t}", "@java.lang.Override\n public io.envoyproxy.envoy.type.matcher.v3.StringMatcherOrBuilder getKnownSuffixesOrBuilder(\n int index) {\n return knownSuffixes_.get(index);\n }", "public static void assertContainsIds(Bundle bundle, String... ids) throws FHIRPathException {\n FHIRPathEvaluator evaluator = FHIRPathEvaluator.evaluator();\n EvaluationContext evaluationContext = new EvaluationContext(bundle);\n Collection<FHIRPathNode> tmpResults = evaluator.evaluate(evaluationContext, EXPRESSION_BUNDLE_IDS);\n Collection<String> listOfIds = tmpResults.stream().map(x -> x.toString()).collect(Collectors.toList());\n for (String id : ids) {\n assertTrue(listOfIds.contains(id));\n }\n }", "public static void main(String[] args) {\n\t\tfind_arr obj = new find_arr();\r\n\t\tint[] in = new int[] {1,1,1};\r\n\t\tint[] res = obj.arr(in);\r\n\t\tfor(int i:res) {\r\n\t\t\tSystem.out.println(i);\r\n\t\t}\r\n\t}", "@Test\n public void test() {\n TestUtil.testEquals(new Object[][]{\n {\"rpl\", \"abc\", new int[]{3, 5, 9}},\n {\"gfd\", \"aaa\", new int[]{1, 2, 3}}\n });\n }", "@Test\n\tpublic void testIsContainedInSomeWord() {\n\n\t\tString[] words = {\"ne\", \"ned\", \"nes\", \"ning\", \"st\", \"sted\", \"sting\", \"sts\"};\n\t\tList<String> listWords = Arrays.asList(words);\n\n\t\tassertThat(\"Prefix contained\", StringUtils.containsPrefix(listWords, \"sti\"), equalTo(true));\n\t\tassertThat(\"Prefix contained\", StringUtils.containsPrefix(listWords, \"ne\"), equalTo(true));\n\t\tassertThat(\"Prefix contained\", StringUtils.containsPrefix(listWords, \"ni\"), equalTo(true));\n\t\tassertThat(\"Prefix contained\", StringUtils.containsPrefix(listWords, \"s\"), equalTo(true));\n\t\tassertThat(\"Prefix not contained\", StringUtils.containsPrefix(listWords, \"sta\"), equalTo(false));\n\t\tassertThat(\"Prefix not contained\", StringUtils.containsPrefix(listWords, \"a\"), equalTo(false));\n\t\tassertThat(\"Prefix not contained\", StringUtils.containsPrefix(listWords, \"no\"), equalTo(false));\n\t}", "public void testBug631Suffixes() {\n // Set the prefix length large enough so that we ensure suffixes are\n // appropriately tested\n final PrefixTree tree = new PrefixTree(100);\n final String[] prototypeNames = {\n \"__proto__\", \"constructor\", \"eval\", \"prototype\", \"toString\",\n \"toSource\", \"unwatch\", \"valueOf\",};\n\n for (int i = 0; i < prototypeNames.length; i++) {\n final String name = prototypeNames[i];\n\n assertFalse(\"Incorrectly found \" + name, tree.contains(name));\n\n assertTrue(\"First add() didn't return true: \" + name, tree.add(name));\n assertFalse(\"Second add() of duplicate entry didn't return false: \"\n + name, tree.add(name));\n\n assertTrue(\"contains() didn't find added word: \" + name,\n tree.contains(name));\n }\n\n testSizeByIterator(tree);\n assertTrue(\"PrefixTree doesn't contain all of the desired words\",\n prototypeNames.length == tree.size());\n }", "@Test\n public void checkUniqueNumberSuffixRule0() {\n final String[] originalColumnNames = { \"a\", \"b\", \"c\", \"d\", \"e\" };\n final String[] expectedColumnNames = { \"a\", \"b\", \"c\", \"d\", \"e\" };\n checkUniqueNumberSuffixRuleInternal(originalColumnNames, expectedColumnNames);\n }", "public boolean useSuffixPatternMatch()\n/* */ {\n/* 590 */ return this.suffixPatternMatch;\n/* */ }", "private boolean isOEP(AbsoluteAddress location, String fileName) {\n\t\treturn (location != null) && (fileName.contains(\"api_test\") && location.toString().contains(\"401000\")\n\t\t\t\t|| fileName.contains(\"bof\") && location.toString().contains(\"401000\")\n\t\t\t\t|| fileName.contains(\"demo1\") && location.toString().contains(\"401000\")\n\t\t\t\t|| fileName.contains(\"demo2\") && location.toString().contains(\"401000\")\n\t\t\t\t|| fileName.contains(\"Aztec\") && location.toString().contains(\"401000\")\n\t\t\t\t|| fileName.contains(\"Benny\") && location.toString().contains(\"401000\")\n\t\t\t\t|| fileName.contains(\"Cabanas\") && location.toString().contains(\"401000\")\n\t\t\t\t|| fileName.contains(\"Adson\") && location.toString().contains(\"401000\")\n\t\t\t\t|| fileName.contains(\"api_testv2\") && location.toString().contains(\"401131\")\n\t\t\t\t);\n\t}", "private void genFillNamespaceIndexes(ArrayList nss, MethodBuilder mb) {\n if (nss != null) {\n for (int i = 0; i < nss.size(); i++) {\n mb.appendDUP();\n mb.appendLoadConstant(i);\n mb.appendLoadConstant\n (((NamespaceDefinition)nss.get(i)).getIndex());\n mb.appendIASTORE();\n }\n }\n }", "public static void main(String[] args) {\n\n String expresson = \"1+((2+3)*40)-5\";\n List<String> strings = toInffixExpresion(expresson);\n System.out.println(strings.toString());\n\n List<String> parse = parseSuffix(strings);\n System.out.println(parse);\n }", "@java.lang.Override\n public java.util.List<io.envoyproxy.envoy.type.matcher.v3.StringMatcher> getKnownSuffixesList() {\n return knownSuffixes_;\n }", "private static void testContains(BagInterface<String> aBag, String[] tests)\n {\n System.out.println(\"\\nTesting the method contains:\");\n for (int index = 0; index < tests.length; index++)\n System.out.println(\"Does this bag contain \" + tests[index] +\n \"? \" + aBag.contains(tests[index]));\n }", "@Test\n public void testLoadGeneLocationFile() throws ValidationException, IOException {\n GeneLocationConfiguration geneLocationConf =\n arrayDataService.loadGeneLocationFile(TestDataFiles.HG18_GENE_LOCATIONS_FILE, GenomeBuildVersionEnum.HG18);\n assertEquals(NUMBER_OF_HG18_GENE_LOCATIONS, geneLocationConf.getGeneLocations().size());\n\n geneLocationConf =\n arrayDataService.loadGeneLocationFile(TestDataFiles.HG19_GENE_LOCATIONS_FILE, GenomeBuildVersionEnum.HG19);\n assertEquals(NUMBER_OF_HG19_GENE_LOCATIONS, geneLocationConf.getGeneLocations().size());\n }", "private static boolean m45182a(String[] strArr, String str) {\n for (String str2 : strArr) {\n if (str.equals(str2)) {\n return true;\n }\n }\n return false;\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(longestRepeatingSubstringUsingSuffixArray(\"abcabc\"));\n\n\t}", "private boolean isPrefix(String filename, String[] array)\n\t{\n\t\tfor (String temp : array)\n\t\t{\n\t\t\tif (temp.startsWith(filename) == true)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public void testGetNamespacePrefixes() throws RepositoryException {\n String result[] = { \"prefix1\", \"prefix2\" };\n \n sessionControl.expectAndReturn(session.getNamespacePrefixes(), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespacePrefixes(), result);\n }", "public void testAbsolutize() throws Exception {\n\n Object[] test_values = {\n new String[]{\"/base/path\", \"foo.bar\", \"/base/path/foo.bar\"},\n new String[]{\"/base/path/\", \"foo.bar\", \"/base/path/foo.bar\"},\n new String[]{\"/base/path\", \"/foo.bar\", \"/foo.bar\"},\n \n new String[]{\"/base/path\", \"\", \"/base/path\"},\n new String[]{\"/base/path\", null, \"/base/path\"},\n \n new String[]{\"\", \"foo.bar\", \"foo.bar\"},\n new String[]{null, \"foo.bar\", \"foo.bar\"},\n };\n \n for (int i = 0; i < test_values.length; i++) {\n String tests[] = (String[]) test_values[i];\n String test_path = tests[0];\n String test_rel_resource = tests[1];\n String expected = tests[2];\n\n String result = NetUtils.absolutize(test_path, test_rel_resource);\n String message = \"Test \" +\n \" path \" + \"'\" + test_path + \"'\" +\n \" relativeResource \" + \"'\" + test_rel_resource;\n assertEquals(message, expected, result);\n }\n }", "public boolean[] map(LocusContext context, SAMRecord read) {\n boolean[] errorsPerCycle = new boolean[read.getReadLength() + 1];\n \n byte[] bases = read.getReadBases();\n byte[] contig = context.getReferenceContig().getBases();\n byte[] sq = (byte[]) read.getAttribute(\"SQ\");\n \n int totalMismatches = 0;\n \n for (int cycle = 0, offset = (int) context.getPosition(); cycle < bases.length; cycle++, offset++) {\n byte compBase;\n \n switch (contig[offset]) {\n case 'A':\n case 'a': compBase = 'A'; break;\n case 'C':\n case 'c': compBase = 'C'; break;\n case 'G':\n case 'g': compBase = 'G'; break;\n case 'T':\n case 't': compBase = 'T'; break;\n default: compBase = '.'; break;\n }\n \n if (compBase != '.') {\n if (useNextBestBase) {\n int nextBestBaseIndex = QualityUtils.compressedQualityToBaseIndex(sq[cycle]);\n byte nextBestBase;\n switch (nextBestBaseIndex) {\n case 0: nextBestBase = 'A'; break;\n case 1: nextBestBase = 'C'; break;\n case 2: nextBestBase = 'G'; break;\n case 3: nextBestBase = 'T'; break;\n default: nextBestBase = '.'; break;\n }\n \n if (nextBestBase != '.') {\n errorsPerCycle[cycle] = !(bases[cycle] == compBase || nextBestBase == compBase);\n totalMismatches = (!(bases[cycle] == compBase || nextBestBase == compBase)) ? 1 : 0;\n }\n } else {\n errorsPerCycle[cycle] = !(bases[cycle] == compBase);\n totalMismatches += (!(bases[cycle] == compBase)) ? 1 : 0;\n }\n }\n }\n \n /*\n if (totalMismatches > 4) {\n for (int cycle = 0; cycle < bases.length; cycle++) { System.out.print((char) bases[cycle]); } System.out.print(\"\\n\");\n for (int cycle = 0, offset = (int) context.getPosition(); cycle < bases.length; cycle++, offset++) { System.out.print((char) contig[offset]); } System.out.print(\"\\n\");\n System.out.println(totalMismatches + \"\\n\");\n }\n */\n\n // We encode that we saw a read in the last position of the array.\n // That way we know what to normalize by, and we get thread safety!\n errorsPerCycle[errorsPerCycle.length - 1] = true;\n \n return errorsPerCycle;\n }", "public void testVariableInClauseMayTakeMultipleSimultaneousBindings() throws Exception\n {\n resolveAndAssertSolutions(\"[[f(X)], (?- f(x), f(y)), [[]]]\");\n }", "public void testResourceURI() throws Exception {\n testResourceURI(\"RELS-EXT\");\n testResourceURI(\"RELS-INT\");\n }", "public static void main(String args[]) {\n\t\tString a[] = {\"mislav\", \"stanko\", \"mislav\", \"ana\",\"ana\"};\n\t\tString b[] = {\"stanko\", \"ana\", \"mislav\",\"mislav\"};\n\t\tsolution(a,b);\n\t}", "@java.lang.Override\n public int getKnownSuffixesCount() {\n return knownSuffixes_.size();\n }", "public void containsAnyIn(Iterable<?> expected) {\n containsAny(\"contains any element in\", expected);\n }", "@Test\n\tpublic void testInvariantPrefixRenaming() throws Exception {\n\t\ttestMachinePrefixRenaming(IInvariant.ELEMENT_TYPE);\n\t}", "private static INodeFile[] verifySrcFiles(FSDirectory fsd, String[] srcs,\n INodesInPath targetIIP, FSPermissionChecker pc) throws IOException {\n Set<INodeFile> si = new LinkedHashSet<>();\n final INodeFile targetINode = targetIIP.getLastINode().asFile();\n final INodeDirectory targetParent = targetINode.getParent();\n // now check the srcs\n for (String src : srcs) {\n final INodesInPath iip = fsd.getINodesInPath4Write(src);\n // permission check for srcs\n if (pc != null) {\n fsd.checkPathAccess(pc, iip, FsAction.READ); // read the file\n fsd.checkParentAccess(pc, iip, FsAction.WRITE); // for delete\n }\n\n final INode srcINode = iip.getLastINode();\n final INodeFile srcINodeFile = INodeFile.valueOf(srcINode, src);\n // make sure the src file and the target file are in the same dir\n if (srcINodeFile.getParent() != targetParent) {\n throw new HadoopIllegalArgumentException(\"Source file \" + src\n + \" is not in the same directory with the target \"\n + targetIIP.getPath());\n }\n // source file cannot be the same with the target file\n if (srcINode == targetINode) {\n throw new HadoopIllegalArgumentException(\"concat: the src file \" + src\n + \" is the same with the target file \" + targetIIP.getPath());\n }\n\n if(srcINodeFile.getStoragePolicyID() == HdfsConstants.DB_STORAGE_POLICY_ID) {\n throw new HadoopIllegalArgumentException(\"concat: source file \" + src\n + \" is stored in DB.\");\n }\n\n // source file cannot be under construction or empty\n if(srcINodeFile.isUnderConstruction() || srcINodeFile.numBlocks() == 0) {\n throw new HadoopIllegalArgumentException(\"concat: source file \" + src\n + \" is invalid or empty or underConstruction\");\n }\n // source file's preferred block size cannot be greater than the target\n // file\n if (srcINodeFile.getPreferredBlockSize() >\n targetINode.getPreferredBlockSize()) {\n throw new HadoopIllegalArgumentException(\"concat: source file \" + src\n + \" has preferred block size \" + srcINodeFile.getPreferredBlockSize()\n + \" which is greater than the target file's preferred block size \"\n + targetINode.getPreferredBlockSize());\n }\n si.add(srcINodeFile);\n }\n \n // make sure no two files are the same\n if (si.size() < srcs.length) {\n // it means at least two files are the same\n throw new HadoopIllegalArgumentException(\n \"concat: at least two of the source files are the same\");\n }\n return si.toArray(new INodeFile[si.size()]);\n }", "@Then(\"Assert the success of Attempt well-known or guessable resource locations\")\npublic void assattemptwellknownorguessableresourcelocations(){\n}", "@Test\n @Ignore\n public void testGlobExpansion() throws IOException {\n String container = \"test-container\" + randomUUID();\n BlobContainerClient blobContainerClient =\n azureBlobStoreFileSystem.getClient().createBlobContainer(container);\n\n // Create files\n List<String> blobNames = new ArrayList<>();\n blobNames.add(\"testdirectory/file1name\");\n blobNames.add(\"testdirectory/file2name\");\n blobNames.add(\"testdirectory/file3name\");\n blobNames.add(\"testdirectory/otherfile\");\n blobNames.add(\"testotherdirectory/file4name\");\n for (String blob : blobNames) {\n blobContainerClient.getBlobClient(blob).uploadFromFile(\"src/test/resources/in.txt\");\n }\n\n // Test patterns\n {\n AzfsResourceId pattern =\n AzfsResourceId.fromUri(\"azfs://account/\" + container + \"/testdirectory/file*\");\n List<String> expectedFiles =\n ImmutableList.of(\n \"azfs://account/\" + container + \"/testdirectory/file1name\",\n \"azfs://account/\" + container + \"/testdirectory/file2name\",\n \"azfs://account/\" + container + \"/testdirectory/file3name\");\n\n assertThat(\n expectedFiles, contains(toFilenames(azureBlobStoreFileSystem.expand(pattern)).toArray()));\n }\n\n {\n AzfsResourceId pattern =\n AzfsResourceId.fromUri(\"azfs://account/\" + container + \"/testdirectory/file[1-3]*\");\n List<String> expectedFiles =\n ImmutableList.of(\n \"azfs://account/\" + container + \"/testdirectory/file1name\",\n \"azfs://account/\" + container + \"/testdirectory/file2name\",\n \"azfs://account/\" + container + \"/testdirectory/file3name\");\n\n assertThat(\n expectedFiles, contains(toFilenames(azureBlobStoreFileSystem.expand(pattern)).toArray()));\n }\n\n {\n AzfsResourceId pattern =\n AzfsResourceId.fromUri(\"azfs://account/\" + container + \"/testdirectory/file?name\");\n List<String> expectedFiles =\n ImmutableList.of(\n \"azfs://account/\" + container + \"/testdirectory/file1name\",\n \"azfs://account/\" + container + \"/testdirectory/file2name\",\n \"azfs://account/\" + container + \"/testdirectory/file3name\");\n\n assertThat(\n expectedFiles, contains(toFilenames(azureBlobStoreFileSystem.expand(pattern)).toArray()));\n }\n\n {\n AzfsResourceId pattern =\n AzfsResourceId.fromUri(\"azfs://account/\" + container + \"/test*ectory/fi*name\");\n List<String> expectedFiles =\n ImmutableList.of(\n \"azfs://account/\" + container + \"/testdirectory/file1name\",\n \"azfs://account/\" + container + \"/testdirectory/file2name\",\n \"azfs://account/\" + container + \"/testdirectory/file3name\",\n \"azfs://account/\" + container + \"/testotherdirectory/file4name\");\n\n assertThat(\n expectedFiles, contains(toFilenames(azureBlobStoreFileSystem.expand(pattern)).toArray()));\n }\n\n // Clean up\n blobContainerClient.delete();\n }", "@Test\r\n public void deriveFromIncSuffixExpressionWithSIUnits() throws IOException {\r\n //example with siunit literal\r\n check(\"4km++\", \"(int,km)\");\r\n }", "static boolean AnyArrayTest(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"AnyArrayTest\")) return false;\n if (!nextTokenIs(b, K_ARRAY)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_);\n r = consumeTokens(b, 3, K_ARRAY, L_PAR, STAR_SIGN, R_PAR);\n p = r; // pin = 3\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }", "@Test(expected = IllegalArgumentException.class)\n public void testMultiLookupEmptySpecFails() {\n ctx.bucket().lookupIn(key);\n }", "@Test\n\tpublic void testErrorPath() {\n\t\tint[] e1 = new int[] {4133}, // error too not 5 digits ZIPE003\n\t\t\t e2 = {942004299}, // error greater than 5 digits ZIPE003\n\t\t\t e3 = {-94600}, // error zip negative number ZIPE004\n\t\t\t e4 = {50000, 40000}, // lower bound larger than upper bound ZIPE002\n\t\t\t e5 = {30000, 40000, 50000}, // too many zipCodes ZIPE001\n\t\t\t e6 = {}, //Empty ZIPE006\n\t\t e7 = {99999, -99999},//ZIPE005 = Upper range bound needs to be greater than zero.\n\t\t e8 = {99999},//ZIPE000 = Must provide more than one range to compare.\n\t e9 = {00000};//ZIPE007 = Zip Code greater than 0\n\t \t\n\t\tSystem.out.println(\"********************************** Start testErrorPath() **********************************\");\n\t\t\n\t\tSystem.out.print(\"Input ZipCode Ranges:---------------> \");\n\t\tZipCodeUtil.printZipRange(e1, e2, e3, e4, e5,e6, e7,e8, e9);\n\t\t\n\t\ttry{\n\t\t\tmergedZips = ZipCodeUtil.getInstance().mergeUniqueRanges(e1);\n\t\t\n\t\t} catch(InvalidZipCode e){\n\t\t\tAssert.assertEquals(ZipMsg.ZIPE003, e.getErrorCode());\n\t\t}\n\n\t\ttry{\n\t\t\tmergedZips = ZipCodeUtil.getInstance().mergeUniqueRanges(e2);\n\t\t\n\t\t} catch(InvalidZipCode e){\n\t\t\t\n\t\t\tAssert.assertEquals(ZipMsg.ZIPE003, e.getErrorCode());\n\t\t}\n\n\t\ttry{\n\t\t\tmergedZips = ZipCodeUtil.getInstance().mergeUniqueRanges(e3);\n\t\t\n\t\t} catch(InvalidZipCode e){\n\t\t\t\n\t\t\tAssert.assertEquals(ZipMsg.ZIPE004, e.getErrorCode());\n\t\t}\n\t\ttry{\n\t\t\tmergedZips = ZipCodeUtil.getInstance().mergeUniqueRanges(e4);\n\t\t\n\t\t} catch(InvalidZipCode e){\n\t\t\t\n\t\t\tAssert.assertEquals(ZipMsg.ZIPE002, e.getErrorCode());\n\t\t}\n\t\ttry{\n\t\t\tmergedZips = ZipCodeUtil.getInstance().mergeUniqueRanges(e5);\n\t\t\n\t\t} catch(InvalidZipCode e){\n\t\t\t\n\t\t\tAssert.assertEquals(ZipMsg.ZIPE001, e.getErrorCode());\n\t\t}\n\t\t\n\t\ttry{\n\t\t\tmergedZips = ZipCodeUtil.getInstance().mergeUniqueRanges(e6);\n\t\t\n\t\t} catch(InvalidZipCode e){\n\t\t\t\n\t\t\tAssert.assertEquals(ZipMsg.ZIPE006, e.getErrorCode());\n\t\t}\n\t\ttry{\n\t\t\tmergedZips = ZipCodeUtil.getInstance().mergeUniqueRanges(e7);\n\t\t\n\t\t} catch(InvalidZipCode e){\n\t\t\t\n\t\t\tAssert.assertEquals(ZipMsg.ZIPE005, e.getErrorCode());\n\t\t}\n\t\t\n\t\ttry{\n\t\t\tmergedZips = ZipCodeUtil.getInstance().mergeUniqueRanges(e8);\n\t\t\n\t\t} catch(InvalidZipCode e){\n\t\t\t\n\t\t\tAssert.assertEquals(ZipMsg.ZIPE000, e.getErrorCode());\n\t\t}\n\n\t\ttry{\n\t\t\tZipCodeUtil.getInstance().canShipTo(e9[0]);\n\t\t\t\n\t\t} catch(InvalidZipCode e){\n\t\t\t\n\t\t\tAssert.assertEquals(ZipMsg.ZIPE007, e.getErrorCode());\n\t\t}\n\t\tfinally{\n\n\t\t\tSystem.out.println(\"********************************** End testErrorPath() **********************************\");\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t}", "@java.lang.Override\n public java.util.List<? extends io.envoyproxy.envoy.type.matcher.v3.StringMatcherOrBuilder> \n getKnownSuffixesOrBuilderList() {\n return knownSuffixes_;\n }", "@Test\r\n public void testInvalidIncSuffixExpressionWithSIUnits() throws IOException {\n checkError(\"varS++\", \"0xA0170\");\r\n }", "public static int[] suffixArray(CharSequence S) {\n int n = S.length();\n Integer[] order = new Integer[n];\n for (int i = 0; i < n; i++)\n order[i] = n - 1 - i;\n\n // stable sort of characters\n Arrays.sort(order, (a, b) -> Character.compare(S.charAt(a), S.charAt(b)));\n\n int[] sa = new int[n];\n int[] classes = new int[n];\n for (int i = 0; i < n; i++) {\n sa[i] = order[i];\n classes[i] = S.charAt(i);\n }\n // sa[i] - suffix on i'th position after sorting by first len characters\n // classes[i] - equivalence class of the i'th suffix after sorting by\n // first len characters\n\n for (int len = 1; len < n; len *= 2) {\n int[] c = classes.clone();\n for (int i = 0; i < n; i++) {\n // condition sa[i - 1] + len < n simulates 0-symbol at the end\n // of the string\n // a separate class is created for each suffix followed by\n // simulated 0-symbol\n classes[sa[i]] = i > 0 && c[sa[i - 1]] == c[sa[i]] && sa[i - 1] + len < n\n && c[sa[i - 1] + len / 2] == c[sa[i] + len / 2] ? classes[sa[i - 1]] : i;\n }\n // Suffixes are already sorted by first len characters\n // Now sort suffixes by first len * 2 characters\n int[] cnt = new int[n];\n for (int i = 0; i < n; i++)\n cnt[i] = i;\n int[] s = sa.clone();\n for (int i = 0; i < n; i++) {\n // s[i] - order of suffixes sorted by first len characters\n // (s[i] - len) - order of suffixes sorted only by second len\n // characters\n int s1 = s[i] - len;\n // sort only suffixes of length > len, others are already sorted\n if (s1 >= 0)\n sa[cnt[classes[s1]]++] = s1;\n }\n }\n return sa;\n }", "@Test\n\tpublic void testIconOverlay() {\n\t\tfor (QUADRANT quad : QUADRANT.values()) {\n\t\t\tImageIcon icon = new MultiIconBuilder(makeEmptyIcon(32, 32, Palette.GRAY))\n\t\t\t\t\t.addIcon(makeQuandrantIcon(32, 32, Palette.RED, Palette.BLACK), 14, 14, quad)\n\t\t\t\t\t.build();\n\t\t\ticon.getDescription();\n\t\t}\n\t}", "public void testAvailableZipcodesAreValid(int programid, String programName);", "public void test_generateLongArray_helper(long base, long wildcard,\n long[] expected) {\n\n long[] observed = w.generateLongArray(base, wildcard, 0);\n //System.out.println(\"Observed: \" + Arrays.toString(observed));\n Assert.assertArrayEquals(expected, observed);\n }", "DoSearch extension(String... extensions);", "private void checkLocation(String mapName, Set<Point> seenLocations, List<Point> wildLocations) {\n Assert.assertFalse(mapName, wildLocations.isEmpty());\n for (Point location : wildLocations) {\n Assert.assertFalse(seenLocations.contains(location));\n seenLocations.add(location);\n }\n }", "public static List<Integer> lcs(List<Integer> arr1, List<Integer> arr2) {\r\n ArrayList empty = new ArrayList();\r\n /* BEFORE WE ALLOCATE ANY DATA STORAGE, VALIDATE ARGS */\r\n if (null == arr1 || 0 == arr1.size())\r\n return empty;\r\n if (null == arr2 || 0 == arr2.size())\r\n return empty;\r\n\r\n if (equalLists(arr1, arr2)) {\r\n return arr1;\r\n }\r\n\r\n /* ALLOCATE VARIABLES WE'LL NEED FOR THE ROUTINE */\r\n ArrayList<Integer> bestMatch = new ArrayList<Integer>();\r\n ArrayList<Integer> currentMatch = new ArrayList<Integer>();\r\n ArrayList<List<Integer>> dataSuffixList = new ArrayList<List<Integer>>();\r\n ArrayList<List<Integer>> lineSuffixList = new ArrayList<List<Integer>>();\r\n\r\n /* FIRST, COMPUTE SUFFIX ARRAYS */\r\n for (int i = 0; i < arr1.size(); i++) {\r\n dataSuffixList.add(arr1.subList(i, arr1.size()));\r\n }\r\n for (int i = 0; i < arr2.size(); i++) {\r\n lineSuffixList.add(arr2.subList(i, arr2.size()));\r\n }\r\n\r\n /* STANDARD SORT SUFFIX ARRAYS */\r\n IntegerListComparator comp = new IntegerListComparator();\r\n Collections.sort(dataSuffixList, comp);\r\n Collections.sort(lineSuffixList, comp);\r\n\r\n /* NOW COMPARE ARRAYS MEMBER BY MEMBER */\r\n List<?> d = null;\r\n List<?> l = null;\r\n List<?> shorterTemp = null;\r\n int stopLength = 0;\r\n int k = 0;\r\n boolean match = false;\r\n\r\n bestMatch.retainAll(empty);\r\n bestMatch.addAll(currentMatch);\r\n for (int i = 0; i < dataSuffixList.size(); i++) {\r\n d = (List) dataSuffixList.get(i);\r\n for (int j = 0; j < lineSuffixList.size(); j++) {\r\n l = (List) lineSuffixList.get(j);\r\n if (d.size() < l.size()) {\r\n shorterTemp = d;\r\n } else {\r\n shorterTemp = l;\r\n }\r\n\r\n currentMatch.retainAll(empty);\r\n k = 0;\r\n stopLength = shorterTemp.size();\r\n match = (l.get(k).equals(d.get(k)));\r\n while (k < stopLength && match) {\r\n if (l.get(k).equals(d.get(k))) {\r\n currentMatch.add((Integer) shorterTemp.get(k));\r\n k++;\r\n } else {\r\n match = false;\r\n }\r\n }\r\n if (currentMatch.size() > bestMatch.size()) {\r\n bestMatch.retainAll(empty);\r\n bestMatch.addAll(currentMatch);\r\n }\r\n }\r\n }\r\n return bestMatch;\r\n }", "@Test\n\tpublic void testPresenceOfWellknownFileAnalyzers() {\n\t\tint i = 0;\n\t\tfinal ServiceLoader<FileAnalyzer> loader = ServiceLoader.load(FileAnalyzer.class);\n\t\tfor(FileAnalyzer la: loader) {\n\t\t\ti++;\n\t\t\tSystem.out.println(\"File analyzer #\" + i + \": \" + la.getClass().getName());\n\t\t}\n\t\tassertTrue(i>=7);\n\t}", "@Test\n public void clueFromCodenameShouldReturnSaidCodename()\n {\n String codename = DatabaseHelper.getRandomCodename();\n String[] clues = DatabaseHelper.getCluesForCodename(codename);\n int errors = 0;\n\n for (int i = 0; i < clues.length; i++)\n {\n int index = Arrays.binarySearch(DatabaseHelper.getCodenamesForClue(clues[i]), codename);\n if (!(index >= 0))\n {\n errors++;\n }\n\n }\n\n assertEquals(0, errors);\n }", "public GenericArrayLocationCriterion(List<TypePathEntry> location) {\n this.location = location;\n this.typePath = TypePathEntry.listToTypePath(location);\n }", "public static void main(String[] args) {\n\n\t\t\nString[] stud= {\"marks\",\"steve\",\"jenny\",\"kevin\"};\n\t\t\n\tSystem.out.println(Arrays.asList(stud).contains(\"marks\"));//true\n\tSystem.out.println(Arrays.asList(stud).contains(\"henry\"));//false\n\t\n\t\n\t}", "@Test\n\tpublic void testSampleSkirt() {\n\t\t// Note must use assertTrue(Arrays.equals(... as plain .equals does not work\n\t\t// right for arrays.\n\t\tassertTrue(Arrays.equals(new int[] {0, 0, 0}, pyr1.getSkirt()));\n\t\tassertTrue(Arrays.equals(new int[] {1, 0, 1}, pyr3.getSkirt()));\n\t\t\n\t\tassertTrue(Arrays.equals(new int[] {0, 0, 1}, s.getSkirt()));\n\t\tassertTrue(Arrays.equals(new int[] {1, 0}, sRotated.getSkirt()));\n\t\t\n\t\tassertTrue(Arrays.equals(new int[] {0}, stick1.getSkirt()));\n\t\tassertTrue(Arrays.equals(new int[] {0, 0, 0, 0}, stick2.getSkirt()));\n\t\t\n\t\tassertTrue(Arrays.equals(new int[] {0, 0}, square1.getSkirt()));\n\t\tassertTrue(Arrays.equals(new int[] {0, 0}, square2.getSkirt()));\n\t\t\n\t\tassertTrue(Arrays.equals(new int[] {0, 0}, l1_1.getSkirt()));\n\t\tassertTrue(Arrays.equals(new int[] {0, 0, 0}, l1_2.getSkirt()));\n\t\tassertTrue(Arrays.equals(new int[] {2, 0}, l1_3.getSkirt()));\n\t\tassertTrue(Arrays.equals(new int[] {0, 1, 1}, l1_4.getSkirt()));\n\t\t\n\t\tassertTrue(Arrays.equals(new int[] {0, 0}, l2_1.getSkirt()));\n\t\tassertTrue(Arrays.equals(new int[] {1, 1, 0}, l2_2.getSkirt()));\n\t\tassertTrue(Arrays.equals(new int[] {0, 2}, l2_3.getSkirt()));\n\t\tassertTrue(Arrays.equals(new int[] {0, 0, 0}, l2_4.getSkirt()));\n\t\t\n\t\tassertTrue(Arrays.equals(new int[] {0, 0, 1}, s1_1.getSkirt()));\n\t\tassertTrue(Arrays.equals(new int[] {1, 0}, s1_2.getSkirt()));\n\t\t\n\t\tassertTrue(Arrays.equals(new int[] {1, 0, 0}, s2_1.getSkirt()));\n\t\tassertTrue(Arrays.equals(new int[] {0, 1}, s2_2.getSkirt()));\n\t}", "@Test\n public void validMountainArray() {\n ValidMountainArray_941 validMountainArray = new ValidMountainArray_941();\n boolean test1 = validMountainArray.validMountainArray(new int[] {2, 1});\n Assert.assertEquals(test1,false);\n\n boolean test2 = validMountainArray.validMountainArray(new int[] {3, 5, 5});\n Assert.assertEquals(test2,false);\n\n boolean test3 = validMountainArray.validMountainArray(new int[] {0, 3, 2, 1});\n Assert.assertEquals(test3,true);\n }", "private GenericArrayLocationCriterion(TypePath typePath, List<TypePathEntry> location) {\n this.typePath = typePath;\n this.location = location;\n }", "@Test\n public void testInvalidS3Prefixes() throws GenieException {\n final String[] invalidPrefixes = new String[]{ \"\", \" \", \"s3/\", \"s3//\", \"s3:/\", \"s3x:/\", \"foo://\", \"file://\", \"http://\" };\n for (final String invalidPrefix : invalidPrefixes) {\n final String path = invalidPrefix + \"bucket/key\";\n Assert.assertFalse((\"Passed validation: \" + path), this.s3FileTransfer.isValid(path));\n boolean genieException = false;\n try {\n this.s3FileTransfer.getS3Uri(path);\n } catch (GenieBadRequestException e) {\n genieException = true;\n } finally {\n Assert.assertTrue((\"Parsed without error: \" + path), genieException);\n }\n }\n }", "public void testIssueUrlsWithPrefixes() throws Exception {\n Iterator<ArticleFiles> artIter = getArticleIteratorAfterSimCrawl(au, \"issue\");\n Pattern pat = getPattern((SubTreeArticleIterator) artIter);\n // issue\n assertMatchesRE(pat,\"https://www.foo.com/index.php/test/issue/view/99\");\n // wont exist\n assertNotMatchesRE(pat,\"https://www.foo.com/index.php/test/article/view/99/100\");\n // abstract, wont exist\n assertNotMatchesRE(pat,\"https://www.foo.com/index.php/test/article/view/99\");\n // an article view but not an abstract\n assertNotMatchesRE(pat,\"https://www.foo.com/index.php/test/article/view/99/22\");\n // probably pdf\n assertNotMatchesRE(pat,\"https://www.foo.com/index.php/test/article/download/99/22\");\n\n }", "interface ExtConstants {\n public static final String[] IMAGE_EXTENSIONS = { \".tiff\", \".tif\", \".gif \", \".jpeg\", \".jpg\" };\n}", "public static void main(String[] args) {\n\t\tint[] arr = new int[] {10, 15, 3, 7};\n\t\tint target = 17;\n\t\t\n\t\tif(targetExists(arr, target)) {\n\t\t\tSystem.out.println(\"Exists\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Does not Exist\");\n\t\t}\n\t}", "Collection<LocatorIF> getItemIdentifiersByPrefix(String prefix);", "public void testCompareViaSort() throws Exception {\n\n String correctlySortedNames[] = {\n \"0000_aaa\",\n \"0000_bbb\",\n \"1111DC_U_022107_L99_Sum.lsm\",\n \"6325DC_U_022107_L0_Sum.lsm\",\n \"6325DC_U_022107_L1_Sum.lsm\",\n \"6325DC_U_022107_L2_Sum.lsm\",\n \"6325DC_U_022107_L8_Sum.lsm\",\n \"6325DC_U_022107_L9_Sum.lsm\",\n \"6325DC_U_022107_L10_Sum.lsm\",\n \"6325DC_U_022107_L11_Sum.lsm\",\n \"6325DC_U_022107_L20_Sul.lsm\",\n \"6325DC_U_022107_L20_Sum.lsm\",\n \"6325DC_U_022107_L20_Sun.lsm\",\n \"6325DC_U_022107_L21_Sum.lsm\",\n \"6325DC_U_022107_L22_Sum.lsm\",\n \"6325DC_U_022107_L99_Sum.lsm\",\n \"6325DC_U_022107_L111_Sum.lsm\",\n \"6325DC_U_022107_L222_Sum.lsm\",\n \"7777DC_U_022107_L22_Sum.lsm\",\n \"9999_aaa\",\n \"9999_bbb\" \n };\n\n FileTarget[] targets = new FileTarget[correctlySortedNames.length];\n\n int index = 0;\n for (String name : correctlySortedNames) {\n int reverseOrder = targets.length - 1 - index;\n File file = new File(name);\n targets[reverseOrder] = new FileTarget(file);\n index++;\n }\n\n Arrays.sort(targets, new LNumberComparator());\n\n index = 0;\n for (FileTarget target : targets) {\n assertEquals(\"name \" + index + \" of \" + targets.length +\n \" was not sorted correctly\",\n correctlySortedNames[index], target.getName());\n index++;\n }\n }", "@Test\n\tpublic void testSearchIteratorTaxonIdCriteria(){\n\t\tIterator<TaxonLookupModel> it = taxonDAO.searchIterator(-1, null, 7, null, null, null, false, \"taxonomically\");\n\t\tString[] orderedCalName = new String[]{\"_Mock7\",\"_Mock1\",\"_Mock3\",\"_Mock5\",\"_Mock2\",\"_Mock4\",\"_Mock6\"};\n\t\tint i = 0;\n\t\twhile(it.hasNext()){\n\t\t\tassertEquals(orderedCalName[i], it.next().getCalname());\n\t\t\ti++;\n\t\t}\n\t}", "IIndexFragmentBinding[] findBindingsForPrefix(char[] prefix, boolean filescope, IndexFilter filter, IProgressMonitor monitor) throws CoreException;", "@Test\n\tpublic void testGuardPrefixRenaming() throws Exception {\n\t\ttestMachinePrefixRenaming(IGuard.ELEMENT_TYPE);\n\t}", "protected String[] getPaths(String[] args, Job job) {\n\t\tString[] paths = new String[2];\n\t\tpaths[0] = args[0];\n\t\tpaths[1] = args[1];\n\t\treturn paths;\n\t}", "@Test\n public void testCheckPz_int_intArr() {\n System.out.println(\"checkPz\");\n int pz = 4;\n int[] number = {1, 2, 3, 4, 3, 4};\n AbstractMethod instance = new AbstractMethodImpl();\n boolean expResult = true;\n boolean result = instance.checkPz(pz, number);\n assertEquals(expResult, result);\n\n }", "public static void main (String args[]) {\n\t\tint[][] ar = BandedArraySearch.create(13);\n\t\tnew BandedArraySolution(ar).trial();\n\t}", "private void search(String[] searchItem)\n {\n }", "@Test\n public void testGetUrlOfAllFilesOfMetsDocument() throws Exception {\n System.out.println(\"getUrlOfAllFilesOfMetsDocument\");\n String resourceId = \"id_0016\";\n String items[] = {\"url16\", \"url2_16\"};\n\n this.mockMvc.perform(get(\"/api/v1/metastore/mets/\" + resourceId + \"/files/url\"))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(MockMvcResultMatchers.jsonPath(\"$\", Matchers.hasSize(2)))\n .andExpect(MockMvcResultMatchers.jsonPath(\"$.[*]\", Matchers.hasItems(items)))\n .andReturn();\n }", "@Test\n public void testIndexOf() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n Integer arg = 7;\n\n int result = instance.indexOf(arg);\n int expResult = 2;\n\n assertEquals(expResult, result);\n\n }", "private boolean startsWithAny(List<String> packagesToTreatAsOpaque, String qualifiedTypeName) {\n for (String packageName : packagesToTreatAsOpaque) {\n if (!Strings.isNullOrEmpty(packageName) && qualifiedTypeName.startsWith(packageName)) {\n return true;\n }\n }\n return false;\n }", "boolean hasLocationNames();", "public void test17() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }", "@Test\n public void resourceFolderAndResourcesTest() {\n Common.ArtifactLocation myLibRoot = sourceProto(\"com/google/mylib/res\");\n Common.ArtifactLocation anotherLibRoot = sourceProto(\"com/google/anotherlib/res\");\n Common.ArtifactLocation resourceAar = sourceProto(\"com/google/mylib/resources.aar\");\n\n IntellijIdeInfo.AndroidIdeInfo input =\n IntellijIdeInfo.AndroidIdeInfo.newBuilder()\n .addResources(myLibRoot)\n .addResources(anotherLibRoot)\n .addResFolders(\n IntellijIdeInfo.ResFolderLocation.newBuilder()\n .setRoot(myLibRoot)\n .setAar(resourceAar)\n .build())\n .addResFolders(\n IntellijIdeInfo.ResFolderLocation.newBuilder().setRoot(anotherLibRoot).build())\n .build();\n\n AndroidIdeInfo output = AndroidIdeInfo.fromProto(input);\n\n assertThat(\n output.getResources().stream()\n .map(AndroidResFolder::getRoot)\n .map(ArtifactLocation::getRelativePath)\n .collect(Collectors.toList()))\n .containsExactly(\"com/google/mylib/res\", \"com/google/anotherlib/res\");\n\n AndroidResFolder folder0 = output.getResources().get(0);\n AndroidResFolder folder1 = output.getResources().get(1);\n\n assertThat(folder0.getRoot()).isEqualTo(ArtifactLocation.fromProto(myLibRoot));\n assertThat(folder1.getRoot()).isEqualTo(ArtifactLocation.fromProto(anotherLibRoot));\n\n assertThat(folder0.getAar()).isEqualTo(ArtifactLocation.fromProto(resourceAar));\n }", "@Test\n public void restoreIpAddressesBacktrack2Test() {\n String s1 = \"25525511135\";\n Set<String> expected1 = new HashSet<>();\n expected1.add(\"255.255.11.135\");\n expected1.add(\"255.255.111.35\");\n Set<String> actual1 = new HashSet<>(restoreIpAddressesBacktrack2(s1));\n assertEquals(expected1.size(), actual1.size());\n for (String s : expected1) {\n assertTrue(actual1.contains(s));\n }\n /**\n * Example 2:\n * Input: \"010010\"\n * Output: [\"0.10.0.10\",\"0.100.1.0\"]\n */\n String s2 = \"010010\";\n Set<String> expected2 = new HashSet<>();\n expected2.add(\"0.10.0.10\");\n expected2.add(\"0.100.1.0\");\n Set<String> actual2 = new HashSet<>(restoreIpAddressesBacktrack2(s2));\n assertEquals(expected2.size(), actual2.size());\n for (String s : expected2) {\n assertTrue(actual2.contains(s));\n }\n }", "@Test\n void testObjectArrayLoad() throws Exception {\n GeneratedBase testClass = genTestClass(\"\" +\n \"String[] myStrings = null;\" +\n \"myStrings[0];\");\n\n assertNpeMessage(testClass::run, \"Loading object from null array - local variable in slot 8\");\n }", "public void test18() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }", "int mo9692a(String[] strArr, int i);", "public boolean check(String ab) {\n\n for (String a : sol_n) {\n if (ab.equals(a)) {\n return true;\n }\n }\n return false;\n }", "@Test\n public void shouldReturnUniqueCodenames()\n {\n String[] codenames = DatabaseHelper.getRandomCodenames(25);\n boolean noMatches = true;\n\n\n for (int i = 0; i < codenames.length-1; i++)\n {\n for (int j = i+1; j < codenames.length; j++)\n {\n if (codenames[i] == codenames[j])\n {\n noMatches = false;\n // Here to give more detailed feedback in case the test fails.\n System.out.println(\"Match found: \" + codenames[i] + \" \" + codenames[j]);\n }\n }\n }\n\n assert(noMatches);\n }", "public void testFindContainersForLocation() {\n \t\t//should find the workspace root\n \t\tIWorkspaceRoot root = getWorkspace().getRoot();\n \t\tIContainer[] result = root.findContainersForLocation(root.getLocation());\n \t\tassertEquals(\"1.0\", 1, result.length);\n \t\tassertEquals(\"1.1\", root, result[0]);\n \t\t\n \t\t//deep linked resource\n \t\tIProject p1 = root.getProject(\"p1\");\n \t\tIProject p2 = root.getProject(\"p2\");\n \t\tIFolder parent = p2.getFolder(\"parent\");\n \t\tIFolder link = parent.getFolder(\"link\");\n \t\tensureExistsInWorkspace(new IResource[] {p1, p2, parent}, true);\n \t\ttry {\n \t\t\tlink.createLink(p1.getLocationURI(), IResource.NONE, getMonitor());\n \t\t} catch (CoreException e) {\n \t\t\tfail(\"1.99\", e);\n \t\t}\n \t\tresult = root.findContainersForLocation(p1.getLocation());\n \t\tassertEquals(\"2.0\", 2, result.length);\n \t\tboolean p1Found = false, linkFound = false;\n \t\tfor (int i = 0; i < result.length; i++) {\n \t\t\tif (result[i].equals(p1))\n \t\t\t\tp1Found = true;\n \t\t\telse if (result[i].equals(link))\n \t\t\t\tlinkFound = true;\n \t\t}\n \t\tassertTrue(\"2.1\", p1Found);\n \t\tassertTrue(\"2.2\", linkFound);\n \t\t\n \t\t// TODO add more tests\n \t}", "public abstract boolean shouldResolve(int i, int j);", "public ContentHandler[] forSuffix(String suffix) {\n return impl.forSuffix(suffix);\n }" ]
[ "0.53763026", "0.51506644", "0.5094155", "0.48965958", "0.48397863", "0.47901013", "0.47522518", "0.4747761", "0.47107387", "0.46802288", "0.46664563", "0.46604702", "0.46498075", "0.45868886", "0.45836923", "0.45728946", "0.45649004", "0.45451933", "0.45267797", "0.45258886", "0.44812334", "0.44789118", "0.44702265", "0.44354483", "0.44297314", "0.4427623", "0.44000754", "0.43987542", "0.438423", "0.4374752", "0.43601435", "0.43550873", "0.43368632", "0.43366173", "0.43333554", "0.4331346", "0.4326995", "0.43255576", "0.43238807", "0.43234143", "0.43081257", "0.43075386", "0.43073002", "0.43046612", "0.43031475", "0.43026116", "0.42993078", "0.42967886", "0.4285726", "0.42799118", "0.4262213", "0.42601037", "0.42532596", "0.42531535", "0.42491797", "0.4247517", "0.4245096", "0.4239734", "0.42359063", "0.42339498", "0.42306", "0.42197865", "0.421708", "0.42145997", "0.42139092", "0.42076316", "0.4201857", "0.41972804", "0.41969317", "0.4195071", "0.41889638", "0.41872737", "0.4186628", "0.41836688", "0.41834775", "0.41804323", "0.4176781", "0.41720575", "0.41698802", "0.41635787", "0.4150415", "0.4150056", "0.4149465", "0.41478446", "0.41438195", "0.41369048", "0.41345584", "0.41333815", "0.41327247", "0.4131997", "0.41301408", "0.41278315", "0.4127393", "0.41269284", "0.41148686", "0.411267", "0.41108638", "0.41108474", "0.4109671", "0.41084763" ]
0.6074136
0
TODO Autogenerated method stub
@Override public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url, extraHeaders); return true; }
{ "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
........................ D A T A F I E L D S ............................// ............. G L O B A L P R I V A T E C O N S T A N T S .............// ................. G L O B A L P R I V A T E V A R S ...................// ........................ C O N S T R U C T O R S ..........................// ...................... P R I V A T E M E T H O D S ......................// ...................... P U B L I C M E T H O D S ........................// find the smallest number greater than b which is a multiple of a. for example 5/2 = 2.5 then we round 2.5 upward to get 3 and 3 2 = 6 and return 6
public static int findSmallestMultiple(int dividend, int divisor) { float temp = ((float) dividend / (float) divisor) + (float) 0.5; return Math.round(temp) * divisor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static BigInteger divideAndRound(BigInteger a, BigInteger b) {\r\n BigInteger result = a.divide(b);\r\n //Case 1: Integer part of the quotient is positive, a%b*2>=b, then the float part of the quotient>=.5, therefore add 1 to quotient\r\n if(result.signum()>0 && a.mod(b).multiply(new BigInteger(\"2\")).compareTo(b)>=0)\r\n result = result.add(BigInteger.ONE);\r\n //Case 2: Integer part of the quotient is negative, a%b*2<=b but a%b<>0 , \r\n //then the float part of the quotient<=-0.5, therefore subtract 1 from quotient\r\n else if(result.signum()<0 && a.mod(b).multiply(new BigInteger(\"2\")).compareTo(b)<=0 && !a.mod(b).equals(BigInteger.ZERO))\r\n result = result.subtract(BigInteger.ONE);\r\n //Case 3: Integer part of the quotient is zero then two cases arise: a>0 or a<0\r\n else if(result.signum()==0)\r\n { \r\n //Case 1.1: a>0.5 then result=1\r\n if(a.compareTo(BigInteger.ZERO)>0 && a.mod(b).multiply(new BigInteger(\"2\")).compareTo(b)>=0)\r\n result = BigInteger.ONE;\r\n //Case 1.1: a<-0.5 then result=-1\r\n else if(a.compareTo(BigInteger.ZERO)<0 && a.mod(b).multiply(new BigInteger(\"2\")).compareTo(b)<=0)\r\n result = BigInteger.ZERO.subtract(BigInteger.ONE); //-1 :)\r\n }\r\n return result;\r\n }", "private long maxDivide(long a, long b) {\n\t\twhile (a % b == 0) {\n\t\t\ta = a / b;\n\t\t}\n\t\treturn a;\n\t}", "public static int DIV_ROUND_UP(int a, int b) {\n\treturn (a + b - 1) / b;\n }", "private double min(double a, double b) {\n if (a > b) {\n return b;\n }\n return a;\n }", "public static int LCM(int a, int b){\r\n int lowest = a * b / GCD(a,b);\r\n //System.out.print(lowest);\r\n return lowest;\r\n }", "private static int findGcd(int a, int b) {\n\n\t\tint low = a < b ? a : b;\n\t\tint high = a < b ? b : a;\n\n\t\tif (high % low == 0) {\n\t\t\treturn low;\n\t\t} else {\n\t\t\treturn findGcd(high, high % low);\n\t\t}\n\t}", "public static double ceil(double a) {\n\t\treturn ((a<0)?(int)a:(int)(a+1));\t\n\t}", "static int greatestDenominator(int a, int b) {\n int denominator = 0;\n\n // Loops from 0 to max(a, b) to test denominators\n for (int i = 1; i < Math.max(a, b); i++) {\n if (a % i == 0 && b % i == 0) {\n denominator = i;\n }\n }\n\n return denominator;\n }", "private static int wrap(int a, int b)\n {\n return (a < 0) ? (a % b + b) : (a % b);\n }", "public static int lowestCommonFactor(int a, int b)\n\t{\n\t\treturn (a * b) / greatestCommonFactor(a, b);\n\t}", "public static int round(float a) {\t\n\t\treturn (int)floor(a + 0.5f);\n\t}", "public static double min(double a, double b) {\t\n\t\treturn ((a<b)?a:b);\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int gcd = 1, lcm = 1;\n int temp = a;\n int temp2 = b;\n // int fact = 1;\n if (a > b) {\n\n for (int i = a; i < a * b;i+=a) {\n if ( i % b == 0) {\n lcm = i;\n break;\n // System.out.println(lcm);\n } \n }\n } else {\n for (int i = b; i < a * b; i+=b) {\n if ( i%a == 0) {\n lcm = i;\n break;\n // System.out.println(lcm);\n } \n }\n\n }\n gcd = (a * b) / lcm;\n System.out.println(gcd);\n System.out.println(lcm);\n }", "public static double floor(double a) {\t\n\t\treturn ((a<0)?(int)(a-1):(int)a);\t\n\t}", "private static int gcd(int a, int b)\r\n\t{\r\n\t\tint remainder = a % b;\r\n\t\tif(remainder == 0)\r\n\t\t{\r\n\t\t\treturn b;\r\n\t\t}\r\n\t\treturn gcd(b, remainder);\r\n\t}", "public static int round(float a) {\n return (int) Math.floor(a + 0.5f);\n }", "private int getGCD(int a, int b) {\n \n /** This ensures the larger of the two numbers is in a */\n if(a < b){\n /** Temp variable used for swapping two variables */\n int temp = a;\n a = b;\n b = temp;\n }\n\n /** The remainder needs to be stored to recursively find the gcd */\n int remainder;\n if((remainder = a % b) == 0) {\n return b;\n } else {\n return getGCD(b, remainder);\n }\n }", "public static void main(String[] args) {\n// System.out.println(Math.floor(12.34));/\n// System.out.println(Math.(12.34));/\n// System.out.println(Math.ceil(12.34));/\n// System.out.println(Math.ceil(12.34));/\n int start=5;\n int end=66;\n int i=start+(int)(Math.round(Math.random()*(end-start)) );\n System.out.println(i);\n }", "private static int cprModFunction(int a, int b) {\n\t\tint res = a % b;\n\t\tif (res < 0)\n\t\t\tres += b;\n\t\treturn res;\n\t}", "public static int round(double a) {\n return (int) Math.floor(a + 0.5f);\n }", "private double calcG(int a, int b) {\n return a % 2 == 0 && b % 2 == 0 ? 20 : a % 2 == 1 && b % 2 == 1 ? 1 : 5;\n }", "static long lcm(long a, long b) \n\t\t{ \n\t\t\treturn (a*b)/gcd(a, b); \n\t\t}", "private static int gcd (int a, int b) {\n int m = Math.max (Math.abs (a), Math.abs (b));\n if (m == 0) throw new ArithmeticException (\" zero in gcd \");\n int n = Math.min (Math.abs (a), Math.abs (b));\n while (n > 0) {\n a = m % n;\n m = n;\n n = a;\n }\n return m;\n }", "public static double removeSharedDigit(int a, int b) {\n if (a == b) return -1;\r\n if (a == (10*(b%10) + (b/10))) return -1;\r\n if (a%10 == b%10 && a%10 != 0) return (double)((int)a/10) / ((int)(b/10));\r\n if (a/10 == b/10) return (double)((int)a%10) / ((int)(b%10));\r\n if (a/10 == b%10) return (double)((int)a%10) / ((int)(b/10));\r\n if (a%10 == b/10) return (double)((int)a/10) / ((int)(b%10));\r\n return -1;\r\n }", "public double divide(double a, double b, boolean rem){ return rem? a%b: a/b; }", "java.math.BigDecimal getMultipleBetMinimum();", "static int min(int a, int b) {\n return Math.min(a, b);\n }", "public static double div(double a, double b){\r\n\t\treturn a/b;\r\n\t}", "private static int gcd(int a, int b) {\n\t\tif(a==0){\n\t\t\treturn b;\n\t\t}\n\t\treturn gcd(b%a,a);\n\t}", "public static int gcd(int a, int b){\n int tmp = a;\r\n a = Math.max(a,b);\r\n b = Math.min(tmp,b);\r\n \r\n //write GCD\r\n int remainder;\r\n do{\r\n remainder = a%b;\r\n a = b;\r\n b = remainder;\r\n } while(remainder !=0);\r\n \r\n return a;\r\n }", "private double heuristic(Node a, Node b){\n\n // absolute value of the differences in floors\n return Math.abs(a.getFloor() - b.getFloor());\n }", "private int gcd(int a, int b){\r\n int r, temp;\r\n if( a<b ){ temp = a; a = b; b = temp; }\r\n while( b!=0 ){ r = a%b; a = b; b = r; }\r\n return a;\r\n }", "static double getMax(double a, double b) {\n\t\treturn (a > b) ? a : b;\n\t}", "public static int middle(int a){\n\t\treturn (int) Math.round((double) a/2);\n\t}", "private int min(int a, int b) {\n\t\treturn a<b?a:b;\n\t}", "java.math.BigDecimal getFractionalMinimum();", "double divide (double a, double b) {\n\t\tdouble result = a/b;\n\t\treturn result;\n\t}", "static long gcd(long a, long b) {\n\t\ta = Math.abs(a); b = Math.abs(b);\n\t\tif(a < b) return gcd(b,a);\n\t\tif(b == 0) return a;\n\t\treturn gcd(a%b, b);\n\t}", "public static final int round(final float a) {\r\n\r\n if (a < 0) {\r\n return ((int) (a - 0.5f));\r\n } else {\r\n return ((int) (a + 0.5f));\r\n }\r\n }", "public static long findMin(Equation e1, Equation e2, long low, long high) {\n if(high - low <= 0) return high;\n long median = (high + low)/2 ;\n System.out.println(low);\n System.out.println(median);\n System.out.println(high);\n\n long medianDifference = e2.evaluate(median) - e1.evaluate(median);\n long medianDifference1 = e2.evaluate(median + 1) - e1.evaluate(median + 1) ;\n\n if(medianDifference < 0) medianDifference = - medianDifference;\n if(medianDifference1 < 0) medianDifference1 = - medianDifference1;\n\n System.out.println(medianDifference);\n System.out.println(medianDifference1);\n System.out.println();\n\n if(medianDifference < medianDifference1) {\n return findMin(e1,e2,low,median);\n } else {\n return findMin(e1,e2,median + 1, high);\n }\n }", "public static double div(double a, double b) {\n return a / b;\n }", "private static int calculateLCM(int a, int b){\n\t\tint gcd = calculateGCD(a, b);\n\t\tint lcm = (a/gcd)*b; //same as a*b/gcd but a*b could be very large number so avoiding that\n\t\treturn lcm;\n\t}", "static double bSearchSqrt(double t){\n\t\tdouble l = 0.0, r = t, res = -1.0;\n\t\twhile(Math.abs(r - l) > 1e-7){ //guaranteed 6 \"good\" digits\n\t\t\tdouble m = l + (r - l) / 2.0;\n\t\t\tif(m * m <= t){\n\t\t\t\tl = m;\n\t\t\t\tres = m;\n\t\t\t}else{\n\t\t\t\tr = m;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "public static int mod(int a,int b) {\n\t\tif (b == 0) return 0;\n\t\tif (b<0) {\n\t\t\treturn -mod(-a,-b);\n\t\t} else if(a<0) {\n\t\t\twhile (Math.abs(a-b)>b)a+=b;\n\t\t\treturn a;\n\t\t} else {\n\t\t\twhile (a-b>=0) a-=b;\n\t\t\treturn a;\n\t\t}\n\t\t\n\t}", "public int getMinFloor();", "public static int gcd(int a, int b) {\n int t = 0;\n while (b != 0) {\n t = b;\n b = a % b;\n a = t;\n }\n return Math.abs(a);\n }", "public static int gcd(int a, int b) {\r\n\t\twhile(b > 0) {\r\n\t\t\tint temp = b;\r\n\t\t\tb = a % b;\r\n\t\t\ta = temp;\r\n\t\t}\r\n\t\t\r\n\t\treturn a;\r\n\t}", "private static int findLCM(int a, int b) {\n return a * (b / findGCD(a, b));\n }", "public static int gcd(int a, int b){\r\n return a>b ? lnko_ordered(a,b) : lnko_ordered(b,a);\r\n }", "private static boolean isDivisibeby3or5(int a){\n\t\treturn a%3 == 0 || a%5 == 0;\n\t}", "private static boolean gcd(int a, int b) {\n while (b > 0) {\n int temp = b;\n b = a % b;\n a = temp;\n }\n return a == 1;\n }", "private int gcd(int a, int b) {\n // Note that the loop below, as-is, will time out on negative inputs.\n // The gcd should always be a positive number.\n // Add code here to pre-process the inputs so this doesn't happen.\n if ( a < 0 ) {\n a = - a;\n }\n if ( b < 0 ) {\n b = - b;\n }\n\n \twhile (a != b)\n \t if (a > b)\n \t\t a = a - b;\n \t else\n \t\t b = b - a;\n \treturn a;\n }", "private static int sumOfAllMultiplesof3or5ForAandBelow (int a){\n\t\treturn (a==0)? 0 : sumOfAllMultiplesof3or5ForAandBelow(a-1) + ((isDivisibeby3or5(a))? a : 0) ;\n\t}", "private static int fastfloor(double x){\n\t\tint xi=(int)x;\n\t\treturn x<xi?xi-1:xi;\n\t}", "public int division(int a, int b) {\n return a / b;\n }", "private static final long floorDivide(long n, long d) {\n\treturn ((n >= 0) ? \n\t\t(n / d) : (((n + 1L) / d) - 1L));\n }", "public static int min(int a, int b) {\n return b + ((a - b) & (a - b) >> 31);\n }", "public p207() {\n double target = 1/12345.0;\n double log2 = Math.log(2);\n\n for (int x = 2; x < 2000000; x++){\n double a = Math.floor(Math.log(x) / log2) / (x-1);\n if (a < target){\n System.out.println(x*(x-1L));\n break;\n }\n }\n }", "public static int findGCF(int a, int b) {\r\n\t\tint GCF = 1;\r\n\t\tfor (int i = 1; i <= Math.abs(a); i++) {\r\n\t\t\t// loop to find greatest common factor\r\n\t\t\tif (((a % i) == 0) && ((b % i) == 0)) {\r\n\t\t\t\tGCF = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn GCF;\r\n\t}", "public static final int round(final double a) {\r\n\r\n if (a < 0) {\r\n return ((int) (a - 0.5d));\r\n } else {\r\n return ((int) (a + 0.5d));\r\n }\r\n }", "public int pgcdByDE(int a, int b) throws Exception{\n if(a <1 || b <1){\n throw new Exception(\"a et b doivent etre >= 1\");\n }\n int reste = a > b ? a % b : b % a;\n if(reste == 0)\n return a > b ? b : a;\n if(a > b){\n a = reste;\n }else b = reste;\n return pgcdByDE(a,b);\n }", "static int gcd(int a, int b) {\r\n\t\tif (b == 0)\r\n\t\t\treturn a;\r\n\t\treturn gcd(b, a % b);\r\n\t}", "public static int gcd(int a, int b) {\n\t\t// take absolute values\n\t\tif (a < 0) {\n\t\t\ta *= -1;\n\t\t}\n\t\tif (b < 0) {\n\t\t\tb *= -1;\n\t\t}\n\n\t\t// ensure a > b\n\t\tif (a < b) {\n\t\t\tint temp = a;\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\t// a = b * (a / b) + (a % b)\n\t\t// then b = (a % b) * ((a % b) / b) + (a % b) % b\n\t\t// by the division algorithm. Execute until some\n\t\t// such product has no remainder, the remainder of\n\t\t// the previous equation is GCD(a, b).\n\t\twhile (b > 0) {\n\t\t\tint temp = b;\n\t\t\tb = a % b;\n\t\t\ta = temp;\n\t\t}\n\t\treturn a;\n\t}", "static int min(int a, int b) { return a < b ? a : b; }", "public static boolean almost_less(double a, double b) {\n if (almost_equals(a, b)) {\n return false;\n }\n return a < b;\n }", "static int minVal(int a, int b, int c, int d){ //minVal function evaluates the lowest value takes 4 ints and returns an int\n \n //logic: (logic table)\n //\n int[] val = new int[]{a, b, c, d}; //loads it into a array to make it easier to cycle through\n if(a == minVal(val[0], val[1])){//if a is smaller than b\n if (a == minVal(val[0], val[2])){// if a is smaller than c\n if(a == minVal(val[0], val[3])) //if a is smaller than d, return a\n return a;\n return val[3]; // if d is not smaller than a but a is smaller than the rest return d\n }//end if\n else if(c == minVal(val[2], val[3])) //if a is smaller than b but not smaller than c, check if c is smaller than d\n return val[2];//return c\n return val[3];// if a is smaller than b but not smaller than c, and c is not smaller than d, return d \n }//end if \n else{ //if(b == minVal(val[0], val[1])){ //if b is smaller than a\n if (b == minVal(val[1], val[2])){ //if b is smaller than c\n if(b == minVal(val[1], val[3])) //if b is smaller than d, return b\n return b;\n return val[3];// if d is not smaller than a but a is smaller than the rest return d\n }//end if\n else if(c == minVal(val[2], val[3]))//if a is smaller than b but not smaller than c, check if c is smaller than d\n return val[2];//return c\n return val[3];// if a is smaller than b but not smaller than c, and c is not smaller than d, return d \n }//end else\n \n }", "@Test\n\tpublic void nearestSmallerEqFibTest() {\n\t\tAssert.assertTrue(ifn.nearestSmallerEqFib(30) == 21);\n\t}", "public static float mid(float a, float b, float c) {\n if (a >= b) {\n if (b >= c) {\n return b; // a >= b >= c\n } else if (a >= c) {\n return c; // a >= c > b\n } else {\n return a; // c > a >= b\n }\n } else if (a >= c) {\n return a; // b > a >= c\n } else if (b >= c) {\n return c; // b >= c > a\n } else {\n return b; // c > b > a\n }\n }", "public static int GCD(int a, int b){\r\n if (b == 0){\r\n return a;\r\n }\r\n return GCD(b,a%b);\r\n }", "java.math.BigDecimal getSingleBetMinimum();", "public static int smin(int a, int b) {\n return (a < b) ? a : b;\n }", "public static int close10(int a, int b){\n\n int aDiff = Math.abs(a - 10);\n int bDiff = Math.abs(b - 10);\n\n if (aDiff < bDiff) {\n return a;\n }\n if (bDiff < aDiff) {\n return b;\n }\n return 0; // aDiff == bDiff\n }", "public static void sortNumbers(int a, int b) {\n int holder;\r\n if (a < 0 && b < 0) {\r\n a *= -1;//absolute value, both positive if both negative\r\n b *= -1;\r\n }\r\n if (a > b) {//makes Two be larger number\r\n holder = a;\r\n a = b;\r\n b = holder;\r\n }\r\n smallNumber = a;\r\n largeNumber = b;\r\n\r\n }", "public double pissRandom(double a, double b){\n\t\tdouble min = b, max = a;\n\t\tif (a < b){\n\t\t\tmin = a;\n\t\t\tmax = b;\n\t\t}\n\t\treturn min + pissRandom(max - min);\n\t}", "private int getGCD(int a, int b) {\r\n if ( b == 0 ) {\r\n return a;\r\n } else {\r\n return getGCD(b, a % b);\r\n }\r\n }", "public int div(int a, int b) {\n\t\t\treturn compute(a, b, OPER_DIV);\n\t\t}", "public static int lcm(int a, int b) {\r\n\t\treturn a * (b / gcd(a, b));\r\n\t}", "public static float modulus(float a, float b)\n\t{\n\t\treturn (a % b + b) % b;\n\t}", "public int gcd(int a, int b) {\n // write your code here\n if (b != 0) {\n return gcd(b, a % b);\n }\n else\n return a;\n }", "public double divide(double a, double b) {\n\t\treturn a/b;\n\t}", "public static int GCD(int a, int b){\n\t\tif(b == 0) return a;\n\t\treturn GCD(b, a%b);\n\t}", "public static void sort(int[] a)\r\n\t {\r\n\t int[] b = new int[10];\r\n\t int max = getMax(a);\r\n\t int place = 1;\r\n\t System.out.println(max);\r\n\t while (max / place > 0)\r\n\t {\r\n\t \tint[] bucket = new int[10];\r\n\t for (int i = 0; i < a.length; i++)\r\n\t {\r\n\t \tbucket[(a[i]/place) % 10]++;\r\n\t }\t \r\n\t for (int i = 1; i < 10; i++)\r\n\t {\r\n\t \tbucket[i] += bucket[i - 1];\r\n\t } \r\n\t for (int i = a.length - 1; i >= 0; i--)\r\n\t {\r\n\t \tb[--bucket[(a[i]/place)%10]] = a[i];\r\n\t } \r\n\t for (int i=0; i<a.length; i++)\r\n\t {\r\n\t \ta[i] = b[i];\r\n\t }\t \r\n\t place *= 10; \r\n\t }\r\n\t }", "public static double mid(double a, double b, double c) {\n if (a >= b) {\n if (b >= c) {\n return b; // a >= b >= c\n } else if (a >= c) {\n return c; // a >= c > b\n } else {\n return a; // c > a >= b\n }\n } else if (a >= c) {\n return a; // b > a >= c\n } else if (b >= c) {\n return c; // b >= c > a\n } else {\n return b; // c > b > a\n }\n }", "public static void main(String[] args) {\n System.out.print(\"a= \");\n int a= new Scanner(System.in).nextInt();\n System.out.print(\"b= \");\n int b = new Scanner(System.in).nextInt();\n int c=a*b;\n while (a!=b){\n if (a>b) a=a-b;\n else b=b-a;\n }\n System.out.println(\"UCLN= \"+a);\n System.out.println(\"BCNN= \"+(c/a));\n\n }", "public int compare(Point a, Point b)\n {\n return (int) (Math.ceil(a.x - b.x));\n }", "private static int minimum(int a, int b, int c)\n {\n return Math.min(a, Math.min(b,c));\n }", "@Test\n public void test(){\n int a = 3;\n int b = 6;\n System.out.println(a % b);\n System.out.println(Long.MAX_VALUE);\n }", "public static int getMinDistanceTime(Asteroid a, Asteroid b) {\n\n\t\tdouble minDistance = -1;\n\t\tint minDistTime = Integer.MAX_VALUE;\n\t\tfor(int t = 0; t < 20*365; t++){\n\t\t\tdouble distance = Point.distance(a.orbit.positionAt((long)t - a.epoch),b.orbit.positionAt((long)t - b.epoch));\n\t\t\tif(distance < minDistance){\n\t\t\t\tminDistance = distance;\n\t\t\t\tminDistTime = t;\n\t\t\t}\t\t\t\n\t\t}\n\t\treturn minDistTime;\n\t}", "public static void main(String[] args) {\n int a[]=new int[5];\r\n int j=1;\r\n a[0]=(int)(Math.random()*100);\r\n a[1]=(int)(Math.random()*100);\r\n a[2]=(int)(Math.random()*100);\r\n a[3]=(int)(Math.random()*100);\r\n a[4]=(int)(Math.random()*100);\r\n int minValue=a[0];\r\n for(int i=1;i<a.length;i++) {\t\r\n \tif(minValue>a[i]) {\r\n \t\tminValue=a[i];}\r\n }\r\n System.out.println(\"第一个数是\"+a[0]);\r\n System.out.println(\"第二个数是\"+a[1]);\r\n System.out.println(\"第三个数是\"+a[2]);\r\n System.out.println(\"第四个数是\"+a[3]);\r\n System.out.println(\"第五个数是\"+a[4]);\r\n System.out.println(\"最小的数是\"+minValue); \r\n\t}", "public long countLessThan(RationalFraction a) {\n // TODO: use Stream API\n\n return bigList.stream()\n .filter(s -> s.getValue() < a.getValue())\n .count();\n }", "int gcd(int a, int b) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t int x,y,r=1;\r\n\t\t if(a<b)\r\n\t\t {\r\n\t\t\t x = b;\r\n\t\t\t y = a;\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t\t x = a;\r\n\t\t\t y = b;\r\n\t\t }\r\n\t\t while(r!=0)\r\n\t\t {\r\n\t\t r = x%y;\r\n\t\t if(r==0)\r\n\t\t\t break;\r\n\t\t x = y;\r\n\t\t y = r;\r\n\t\t }\r\n\t\t// System.out.println(\"====\"+y);\r\n\t\treturn y;\r\n\t}", "public static int HCF(int a, int b){\r\n int x, i, hcf = 0;\r\n \r\n for(i = 1; i<=a || i<=b; i++){\r\n if(a%i == 0 && b%i == 0){\r\n hcf = i;\r\n }} \r\n //System.out.print(hcf);\r\n return hcf;\r\n }", "public static int part1(double num)\r\n {\r\n \r\n //Math.floor extract the integer part, then substract it from the original one \r\n int firstNum=(int)Math.floor(num);\r\n double secondNum=num-firstNum;\r\n return firstNum;\r\n \r\n }", "static double sol4(int[] a,int[] b){\r\n \tint mid1=0,mid2= 0;\r\n \tif((a.length+b.length)%2==0) {\r\n \t\tmid1 = (a.length+b.length)/2 -1;\r\n \t\tmid2 = mid1 + 1;\r\n \t\t}else {\r\n \t\t\tmid1 = mid2 = (a.length+b.length)/2;\r\n \t\t}\r\n \t\tint[] ab = new int[a.length+b.length];\r\n \t\tint i=0,j=0,count=0;\r\n\t\twhile (i<a.length && j<b.length){\r\n\t\t\tif (a[i]<b[j]){ \r\n\t\t\t\tab[count++]=a[i++];\r\n\t\t\t}else{\r\n\t\t\t\tab[count++]=b[j++];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (i==a.length){\r\n\t\t\twhile (j<b.length){\r\n\t\t\t\tab[count++]=b[j++];\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\twhile (i<a.length){\r\n\t\t\t\tab[count++]=a[i++];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//for (int n =0; n< ab.length;n++){\r\n\t\t//\tSystem.out.println(ab[n]);\r\n\t\t//}\r\n\t\tdouble ans = -1;\r\n\t\tif (mid1 == mid2){\r\n\t\t\tans = (double) ab[mid1];\r\n\t\t\treturn ans;\r\n\t\t}\r\n\t\tans = (double) (ab[mid1]+ab[mid2])/2;\r\n\t\treturn ans;\r\n\r\n }", "public static boolean almost_less(double a, double b, long maxUlps) {\n if (almost_equals(a, b, maxUlps)) {\n return false;\n }\n return a < b;\n }", "int main()\n{\n int b1, b2, b3, i, b;\n cin>>b1>>b2>>b3;\n for(i = b3; i > 0; i--)\n if(b1 % i == 0 && b2 % i == 0 && b3 % i == 0)\n break;\n if (b1 >= b2 && b1 <= b3)\n b = b1;\n else if (b2 >= b1 && b2 <= b3)\n b = b2;\n else if (b1 >= b3 && b1 <= b2)\n b = b2;\n else if (b2 >= b3 && b2 <= b1)\n b = b2;\n else\n b = b3;\n cout<<\"The treasure is in box which has number \"<<b<<\"\\nThe code to open the box is \"<<i;\n}", "private double span(double a, double s) {\n\t\tdouble ay = f(a,s);\r\n\t\tLog.d(TAG, \"span: ay = \" + ay);\r\n\t\tdouble by;\r\n\t\tdouble k;\r\n\t\tif (ay > 0) {\r\n\t\t\tby = f(a+1,s);\r\n\t\t\tk = (by-ay);\r\n\t\t\tLog.d(TAG, \"span: ay > 0\");\r\n\t\t} else {\r\n\t\t\tby = f(a-1,s);\r\n\t\t\tk = (ay-by);\r\n\t\t\tLog.d(TAG, \"span: ay < 0\");\r\n\t\t}\r\n\t\tLog.d(TAG, \"span: by = \" + by);\r\n\t\tLog.d(TAG, \"span: k = \" + k);\r\n\t\tdouble b = a - 1.2/k*ay;\r\n\t\tif (b < Math.sqrt(-g*50)+1) {\r\n\t\t\tb = Math.ceil(Math.sqrt(-g*50)+1);\r\n\t\t}\r\n\t\tLog.d(TAG, \"span: b = \" + b);\r\n\t\tby = f(b,s);\r\n\t\tLog.d(TAG, \"span: by = \" + by);\r\n\t\tif (ay*by>0) {\r\n\t\t\tLog.d(TAG, \"span: ay*by > 0\");\r\n\t\t\tif (ay>0) {\r\n\t\t\t\tLog.d(TAG, \"span: ay > 0\");\r\n\t\t\t\treturn span(a+2,s);\r\n\t\t\t} else {\r\n\t\t\t\tLog.d(TAG, \"span: ay < 0\");\r\n\t\t\t\treturn span(a-2,s);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tLog.d(TAG, \"span: ay*by < 0\");\r\n\t\t\treturn iterator(a,b,ay,by, s);\r\n\t\t}\r\n\t}", "private double distanceEstimate(Node a, Node b){\n return Math.abs(a.getFloor() - b.getFloor()) * FLOOR_COST + distanceBetween(a,b);\n }", "double getLeft(double min);", "public static void main(String[] args) {\n double a=100;\n double b=200;\n double c=400.5;\n boolean aMin=a<b && a<c; //if a is less than both b and c,then is the minimum\n boolean bMin=b<a && b<c;//if b is less then booth a and c, then b is the minimum\n boolean cMin=c<a && c<b;//if\n if(aMin){\n System.out.println(a+\"is the minimum number\");}\n if(bMin){\n System.out.println(b+\"is the minimum number\");}\n if(cMin){\n System.out.println(c+\"is the minimum number\");}\n\n }" ]
[ "0.71736276", "0.6815133", "0.6450228", "0.6378111", "0.6195384", "0.6027218", "0.60202134", "0.59973764", "0.5993307", "0.5961965", "0.59533614", "0.5886065", "0.58828", "0.58746225", "0.5770831", "0.5741547", "0.57322294", "0.57011706", "0.5699014", "0.56891376", "0.56739306", "0.5669343", "0.56608933", "0.56550276", "0.56423897", "0.5625125", "0.5616747", "0.5614099", "0.56138104", "0.5606529", "0.55807304", "0.5566865", "0.5561171", "0.5533235", "0.55188054", "0.55118537", "0.55042535", "0.54794085", "0.54658824", "0.54644746", "0.54590744", "0.5458011", "0.54344285", "0.5413921", "0.5411096", "0.54077595", "0.5405985", "0.54056734", "0.5399904", "0.53958267", "0.5387976", "0.53824985", "0.53824395", "0.5379417", "0.5370144", "0.5368168", "0.5365462", "0.53590494", "0.53472304", "0.53468996", "0.5339769", "0.5336021", "0.5332994", "0.5331619", "0.53315794", "0.53312767", "0.5329875", "0.53236204", "0.5312189", "0.5280332", "0.52794987", "0.52790385", "0.5275396", "0.5275377", "0.52507275", "0.52476877", "0.52414376", "0.52344537", "0.52319163", "0.5227863", "0.5227323", "0.52215093", "0.52208585", "0.521991", "0.5219431", "0.5214273", "0.52129453", "0.52071226", "0.5204436", "0.5196953", "0.5181232", "0.51800364", "0.51703113", "0.5165068", "0.51563686", "0.5156274", "0.51547056", "0.51530063", "0.5150977", "0.5146681" ]
0.6516205
2
method convert an array of string to Hash Map
public static HashMap<String, Integer> convertArrayToHashMap(String[] arr) { HashMap<String, Integer> hm = new HashMap<String, Integer>(); for (int i = 0; i < arr.length; i++) hm.put(arr[i], i); return hm; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Map<String, String> convertArrayToMap(PairDTO[] pairDTOs) {\n Map<String, String> map = new HashMap<>();\n for (PairDTO pairDTO : pairDTOs) {\n map.put(pairDTO.getKey(), pairDTO.getValue());\n }\n return map;\n }", "public static HashMap<String, Integer> convertArrayListToHashMap(\n ArrayList<String> arr)\n {\n HashMap<String, Integer> hm = new HashMap<String, Integer>();\n\n for (int i = 0; i < arr.size(); i++)\n hm.put(arr.get(i), i);\n\n return hm;\n\n }", "public HashMap<String, String[]> convertToArray() throws IOException\n\t{\n\t HashMap<String, String[]> map = new HashMap<String, String[]>();\n\t String[] list;\n\t \n\t String line;\n\t BufferedReader reader;\n\t\t\n\t try {\n\t\t\treader = new BufferedReader(new FileReader(filePath));\n\t\t\t\n\t\t\twhile ((line = reader.readLine()) != null)\n\t\t {\n\t\t\t\tString key = line;\n\t\t\t\tString value = \"\";\n\t\t\t\tString tmp;\n\t\t\t\t\n\t\t\t\twhile(!(tmp=reader.readLine()).equals(\"$\"))\n\t\t\t\t{\t\n\t\t\t\t\tvalue = value+tmp; \n\t\t\t\t}\n\t\t\t\tString values = value.replaceAll(\"\\\"\", \"\");\n\t\t\t\t\n\t\t\t\tString[] parts = values.split(\",\");\n\t\t map.put(key, parts);\n\t\t }\n\t\t\t\n\t\t\t/*for (String key : map.keySet())\n\t\t {\n\t\t System.out.println(key);\n\t\t for(int i=0; i < map.get(key).length; i++)\n\t\t {\n\t\t \tSystem.out.println(map.get(key)[i]);\n\t\t }\n\t\t }*/\n\t\t\t\n\t\t reader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t \n\t \n\t return map;\n\t}", "public static Map<String,Integer> stringArrayToMap(String[] entries, boolean ignoreNull) {\n\t\tMap<String,Integer> map = new HashMap<String,Integer>();\n\t\tif(entries==null) {\n\t\t\tthrow new RuntimeException(\"StringArrayToMap: entries==null\");\n\t\t}\n\t\tfor(int i=0;i<entries.length;i++) {\n\t\t\tif(entries[i]==null) {\n\t\t\t\tif(!ignoreNull) {\n\t\t\t\t\tlog.warn(\"StringArrayToMap: entries[\"+i+\"]==null ==> will not be included in map\");\t\t\t\t\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmap.put(entries[i], i);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}", "private static Set<String> m23475a(String[] strArr) {\n if (strArr == null || strArr.length == 0) {\n return Collections.emptySet();\n }\n HashSet hashSet = new HashSet(strArr.length);\n for (String str : strArr) {\n hashSet.add(str);\n }\n return hashSet;\n }", "private HashMap<String, String> generateHashMapFromStringList(String...strings) throws Exception {\n\n\t\tif(strings.length % 2 != 0)\n\n\t\t\tthrow InvalidStringListException;\n\n\t\tHashMap<String, String> map = new HashMap<String, String>();\n\n\t\tfor(int i = 0; i < strings.length; i += 2) // Each key will be i, with the following becoming its value\n\n\t\t\tmap.put(strings[i], strings[i + 1]);\n\n\t\treturn map;\n\t}", "private HashMap<Object, Object> HashMapTransform(List<String> lines) {\n\n HashMap<Object, Object> keypair = new HashMap<>();\n\n for (String line : lines) {\n if (line.contains(pairDelimiter)) {\n String[] intermediate = line.split(pairDelimiter, maxSplitSize);\n keypair.put(intermediate[0], intermediate[1]);\n }\n }\n return keypair;\n }", "@SuppressWarnings(\"unchecked\")\n private static <T> Map<String, T> mapOf(Object... inputs) {\n Map<String, T> map = new HashMap<>();\n for (int i = 0; i < inputs.length; i += 2) {\n String key = (String) inputs[i];\n T value = (T) inputs[i + 1];\n map.put(key, value);\n }\n return map;\n }", "@SuppressWarnings(\"rawtypes\")\n\tpublic static Map stringToMap(String params) {\n\t\tMap<String, String> map = new HashMap<String, String>();\n\n\t\tif (params == null) {\n\t\t\tSystem.out.println(\"\");\n\n\t\t} else {\n\t\t\tString[] arr = params.split(\",\");\n\t\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\t\tString key = arr[i].substring(0, arr[i].indexOf(\":\"));\n\t\t\t\tString value = arr[i].substring(arr[i].indexOf(\":\") + 1);\n\t\t\t\tmap.put(key, value);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}", "private static Map countStringOccurences(String[] strArray, AdminJdbcService adminJdbcService) {\n logger.debug(\"Count String Occurences method found\");\n\n Map<String, Integer> countMap = new TreeMap<String, Integer>();\n Map<String, Integer> controlIdsMap = new TreeMap<String, Integer>();\n Set<String> controlIdsSet = new TreeSet<String>();\n Set<String> keySet = countMap.keySet();\n List list = new ArrayList();\n\n for (String string : strArray) {\n String control[] = string.split(\":\");\n if ( !Utils.isNullOrEmpty(control[1]) && Integer.parseInt(control[1].trim()) == 2 ) {\n if (!countMap.containsKey(control[0])) {\n countMap.put(control[0], 1);\n } else {\n Integer count = countMap.get(control[0]);\n count = count + 1;\n countMap.put(control[0], count);\n }\n }\n }\n\n\n return countMap;\n }", "public void hashFunction1(String[] stringsForArray, String[] theArray) {\n\n for (int n = 0; n < stringsForArray.length; n++) {\n\n String newElementVal = stringsForArray[n];\n\n theArray[Integer.parseInt(newElementVal)] = newElementVal;\n\n }\n\n }", "public static HashMap<String, Integer> countOccurences(ArrayList<String> arr) {\n arr = toSortedString(arr);\n HashMap<String, Integer> hash = new HashMap();\n for(String str :arr){\n if(hash.containsKey(str)){\n hash.replace(str, hash.get(str)+1);\n }\n else{\n hash.put(str,1);\n }\n }\n return hash;\n }", "private static HashMap<String, Integer> makeMap(String[] words) {\n HashMap<String, Integer> map = new HashMap();\n for (int i = 0; i < words.length; i++) {\n map.merge(words[i], 1, Integer::sum);\n }\n return map;\n}", "public static HashMap<String,Integer> counter(ArrayList<String> arr){\n\t\tHashMap<String,Integer> map = new HashMap<String,Integer>();\n\t\t\tfor(String s : arr){\n\t\t\t\tif (map.keySet().contains(s)){\n\t\t\t\t\tmap.put(s, map.get(s)+1);\n\t\t\t\t}else{\n\t\t\t\t\tmap.put(s, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn map;\t\n\t}", "void constructMap(JsonArray array)\n {\n JsonObject obj = array.get(0).getAsJsonObject();\n\n // Loop on them\n for(Map.Entry<String, JsonElement> entry : obj.entrySet())\n {\n String key = entry.getKey(); // ID:TYPE\n if(!(key.matches(\"(\\\\d+):([A-Z_]+)\")))\n continue;\n\n String[] split = key.split(\":\");\n long id = Long.parseLong(split[0]);\n CodeType type = remapLegacyCodeType(split[1]);\n\n Map<CodeType, Map<String, String>> userMap = map.getOrDefault(id, new HashMap<>());\n Map<String, String> codesForTypeMap = userMap.getOrDefault(type, new HashMap<>());\n\n for(Map.Entry<String, JsonElement> code : entry.getValue().getAsJsonObject().entrySet())\n codesForTypeMap.put(code.getKey(), code.getValue().getAsString());\n\n userMap.put(type, codesForTypeMap);\n map.put(id, userMap);\n }\n\n array.remove(obj); // Remove the codes object\n }", "public static Map<String, String> stringToHashtable(String file) {\r\n if (file == null) {\r\n return null;\r\n }\r\n\r\n String sansComments = eraseComments(file);\r\n int pos = 0, count = sansComments.length();\r\n Map<String, String> retval = new HashMap<String, String>();\r\n\r\n // Split the file, line by line, into key/value pairs\r\n while (pos < count) {\r\n int eol = offsetToEOL(sansComments, pos);\r\n int next = offsetToNextLine(sansComments, pos);\r\n if (eol > 0) {\r\n String line = sansComments.substring(pos, pos + eol);\r\n StringTokenizer st = new StringTokenizer(line, \"=\");\r\n String key = st.nextToken();\r\n String value = \"\";\r\n if (st.hasMoreTokens()) {\r\n value = st.nextToken();\r\n }\r\n\r\n // Place scalar values in the hashtable directly\r\n // otherwise break comma separated ones into Vectors.\r\n // If they can be, items are inserted as Doubles, failing\r\n // that, as Strings.\r\n // int comma = value.indexOf(\",\");\r\n // if (comma == -1) {\r\n // try {\r\n // retval.put(key, new Double(value));\r\n // } catch (NumberFormatException nfe) {\r\n retval.put(key, value);\r\n // } // endtry\r\n // } else {\r\n // Vector<Comparable> v = new Vector<Comparable>();\r\n // StringTokenizer values = new StringTokenizer(value, \",\");\r\n // while (values.hasMoreTokens()) {\r\n // String s = values.nextToken();\r\n // try {\r\n // v.addElement(new Double(s));\r\n // } catch (NumberFormatException nfe) {\r\n // v.addElement(s.trim());\r\n // } // endtry\r\n // } // endwhile\r\n // retval.put(key, v);\r\n // } // endif\r\n } // endif\r\n pos += next;\r\n } // endwhile\r\n\r\n return retval;\r\n }", "private void fillMap(String[] querys) {\r\n\r\n\t\tLOG.info(\"fillMap\");\r\n\r\n\t\tquerysMap = new HashMap<String, String>();\r\n\t\t\r\n\t\tfor (String query : querys) {\r\n\t\t\t\r\n\t\t\tString[] temp = getStringArray(query, START_QUERY_PATTERN);\r\n\t\t\t\r\n\t\t\tif (temp != null && temp.length == 2) {\r\n\t\t\t\t\r\n\t\t\t\ttemp[0] = temp[0].replaceAll(\"\\\\P{Alnum}\", \"\");\r\n\t\t\t\tquerysMap.put(temp[0], temp[1].trim());\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tLOG.error(\"El array es nulo o la longitud no es la esperada\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tLOG.info(\"END fillMap\");\r\n\r\n\t}", "Map<String, String> asMap();", "public static LinkedHashMap<String, Object> arrayToMap(Object[] dataArray) {\n LinkedHashMap<String, Object> map = new LinkedHashMap<String, Object>();\n if (0 != dataArray.length % 2) throw new UtilsException(\"Invalid odd elements count\");\n for (int i = 0; i < dataArray.length; i += 2) {\n Object objKey = dataArray[i];\n if (!(objKey instanceof String)) throw new UtilsException(\"Invalid key: [\" + objKey + \"]\");\n map.put((String) objKey, dataArray[i + 1]);\n }\n return map;\n }", "public static HashMap<String, String> createVariableMap(String vvlist[]) {\n \t\tif (vvlist.length%2 != 0)\n \t\t\treturn null;\n \t\t\n \t\tHashMap<String, String> variableMap = new HashMap<String, String>();\n \t\tString variable;\n \t\tString value;\n \t\tfor (int i = 0; i < vvlist.length; i += 2) {\n \t\t\tvariable = (String)vvlist[i];\n \t\t\tvalue = vvlist[i + 1];\n \t\t\t\n \t\t\tvariableMap.put(variable, value);\n \t\t}\n \t\t\n \t\treturn variableMap;\n \t}", "HashMap<Character, Integer> countCharacter(char[] array) {\n\t\tHashMap<Character, Integer> hm = new HashMap<Character, Integer>();\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (hm.containsKey(array[i]))\n\t\t\t\thm.put(array[i], hm.get(array[i]) + 1);\n\n\t\t\telse\n\t\t\t\thm.put(array[i], 1);\n\t\t}\n\t\treturn hm;\n\n\t}", "public HashMap<String, String> convertToHashMapOfStrings()\n {\n HashMap<String, String> hashMapOfStrings = new HashMap<String, String>();\n for (DataPreferenceEnum key : preferencesHashMap.keySet())\n {\n String valueString = preferencesHashMap.get(key).toString();\n hashMapOfStrings.put(key.toString(), valueString);\n }\n\n return (hashMapOfStrings);\n }", "public static String[][] groupAnagrams(String[] strs) {\n\t\tif (strs.length == 0) return new String[][] {};\n\t\tMap<String, List<String>> map = new HashMap<String, List<String>>();\n\t\tfor (String s : strs) {\n\t\t\tchar[] ch = s.toCharArray();\n\t\t\tArrays.sort(ch);\n\t\t\tString key = new String(ch);\n\t\t\tif(!map.containsKey(key)) {\n\t\t\t\tList<String> list = new ArrayList<>();\n\t\t\t\tlist.add(s);\n\t\t\t\tmap.put(key, list);\n\t\t\t}else\n\t\t\t\tmap.get(key).add(s);\n\t\t}\n//\t\tprint(map);\n\t\treturn convertMapToArray2D(map);\n }", "public static void sanitizeAndSplit(ArrayList<String> myChunk){\n\t\t//Variables\n\t\tString myStringArray[] = {};\n\n\t\ttry {\n\t\t\t//step through string array and put key value pairs into a string\n\t\t\tfor(String temp : myChunk){\n\t\t\t\t//Split the key and values as put into hashMap\n\t\t\t\tif(temp != null) {\n\t\t\t\t\tmyStringArray = temp.split(\"\\\\s+\");\n\t\t\t\t\tWord word = hm.get(myStringArray[0]);\n\t\t\t\t\tif(word == null) {\n\t\t\t\t\t\thm.put(myStringArray[0], new Word(myStringArray[0], Integer.parseInt(myStringArray[1])));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\thm.get(myStringArray[0]).addToCount(Integer.parseInt(myStringArray[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Map<String, String> decode(String s) {\n String[] keyValuePairs = s.split(\"&\");\n\n //creating tab 2D tab for separating key from value\n String[][] keyAndValue = new String[keyValuePairs.length][2];\n\n //iterating through the tab to split \"key=value\" pairs into 2D tab as [[key, value], [key, value]]\n for (int i = 0; i <= keyValuePairs.length - 1; i++) {\n //splitting \"key=value\" pairs into 2D tab as [[key, value], [key, value]]\n keyAndValue[i] = keyValuePairs[i].split(\"=\");\n //adding [[key, value], [key, value]] to the map\n for (int j = 0; j <= keyAndValue.length - 1; j++) {\n keyValuesMap.put(keyAndValue[i][0], keyAndValue[i][1]);\n }\n }\n return keyValuesMap;\n }", "public Map<String, Integer> wordCount(String[] strings) {\n Map <String, Integer> map = new HashMap();\n int counter = 1;\n for (String s: strings){\n if (map.containsKey(s)){\n counter = map.get(s);\n map.put(s, counter + 1);\n }else{\n counter = 1;\n map.put(s, counter);\n }\n }\n return map;\n}", "private Map createSpecimenArrayMap(SpecimenArrayForm specimenArrayForm)\r\n\t{\r\n\t\tfinal Map arrayContentMap = new HashMap();\r\n\t\tString value = \"\";\r\n\t\tfinal int rowCount = specimenArrayForm.getOneDimensionCapacity();\r\n\t\tfinal int columnCount = specimenArrayForm.getTwoDimensionCapacity();\r\n\r\n\t\tfor (int i = 0; i < rowCount; i++)\r\n\t\t{\r\n\t\t\tfor (int j = 0; j < columnCount; j++)\r\n\t\t\t{\r\n\t\t\t\tfor (int k = 0; k < AppletConstants.ARRAY_CONTENT_ATTRIBUTE_NAMES.length; k++)\r\n\t\t\t\t{\r\n\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\tif (k == AppletConstants.ARRAY_CONTENT_ATTR_POS_DIM_ONE_INDEX)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tvalue = String.valueOf(i + 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (k == AppletConstants.ARRAY_CONTENT_ATTR_POS_DIM_TWO_INDEX)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tvalue = String.valueOf(j + 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarrayContentMap.put(SpecimenArrayAppletUtil\r\n\t\t\t\t\t\t\t.getArrayMapKey(i, j, columnCount, k), value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn arrayContentMap;\r\n\t}", "private static HashMap<String, String> parseArgs(String... args)\n {\n final HashMap<String, String> map = new HashMap();\n //TODO convert args to map\n String lastArg = null;\n for (String string : args)\n {\n //Store new arg\n if (string.startsWith(\"-\"))\n {\n lastArg = string.trim().replaceFirst(\"-\", \"\");\n if (lastArg.contains(\"=\"))\n {\n String[] split = lastArg.split(\"=\");\n lastArg = split[0];\n map.put(lastArg, split[1].replace(\"\\\\\\\"\", \"\"));\n continue;\n }\n map.put(lastArg, null);\n }\n else\n {\n //Store arg value, or append value\n String v = map.get(lastArg);\n if (v == null)\n {\n v = string;\n }\n else\n {\n v += \",\" + string;\n }\n map.put(lastArg, v);\n }\n }\n return map;\n }", "Map <String, List <String> > parse (List <String> keys, List <String> lines);", "public static void main(String[] args) {\n\t\tArrayList<String> givenArray = new ArrayList<String>();\n\t\tArrayList<String> listOfNamesStartingWithA = new ArrayList<String>();\n\t\tArrayList<String> listOfNamesStartingWithG = new ArrayList<String>();\n\t\tgivenArray.add(\"apple\");\n\t\tgivenArray.add(\"appleinc\");\n\t\tgivenArray.add(\"applemac\");\n\t\tgivenArray.add(\"google\");\n\t\t\n\t\tHashMap<String, ArrayList> map = new HashMap<String, ArrayList>();\n\t\tmap.clone();\n\t\tIterator<String> itr = givenArray.iterator();\n\t\t\n\t\twhile(itr.hasNext()) {\n\t\t\tString arrayListOb = itr.next();\n\n\t\t\tString key =arrayListOb.substring(0, 1);\n\t\t\tif(key.startsWith(\"a\")) {\n\t\t\t\tlistOfNamesStartingWithA.add(arrayListOb);\t\n\t\t\t\tmap.put(key, listOfNamesStartingWithA);\t\n\t\t\t}\n\t\t\tif(key.startsWith(\"g\")) {\n\t\t\t\tlistOfNamesStartingWithG.add(arrayListOb);\n\t\t\t\tmap.put(key, listOfNamesStartingWithG);\n\t\t\t}\t\t\t\t\n\t\t\tSystem.out.println(key);\n\t\t\tSystem.out.println(map.get(key));\n\t\t}\n\t\tSystem.out.println(map.size());\n\t\t//System.out.println(map.get(\"g\"));\n\t\t//System.out.println(map.get(\"a\"));\n\t\t/*for(Map.Entry<String,ArrayList> entry: map.entrySet())\n\t\t{\n\t\t\tSystem.out.println(map.get(\"a\"));\n\t\t}*/\n\t}", "private Map getAsMap(BuildStatus bs) {\n String lines[] = bs.toExternalForm().split(\"\\n\");\n Map m = new HashMap();\n for (int i = 0; i < lines.length; i++) {\n String line = lines[i];\n String parts[] = line.split(\"=\");\n String name = parts[0];\n String value = parts[1];\n m.put(name + \"=\", value);\n }\n return m;\n }", "public static void main(String[] args) {\n\t\tMap<String, List<String>> map = new HashMap<>();\n\t\tList<String> list = new ArrayList<>();\n\t\tmap.put(\"key1\", list);\n\t\tmap.get(\"key1\").add(\"value1\");\n\t\tmap.get(\"key1\").add(\"value2\");\n\t\t\n\n\t\t//(map.get(\"key1\").get(0)).isEqualTo(\"value1\");\n\t\t//(map.get(\"key1\").get(1)).isEqualTo(\"value2\");\n\t\t\n\t\tMap<String, String> map1 = Stream.of(new String[][] {\n\t\t\t { \"Hello\", \"World\" }, \n\t\t\t { \"John\", \"Doe\" }, \n\t\t\t}).collect(Collectors.toMap(data -> data[0], data -> data[1])); \n\t\t//Notice here the data type of key and value of the Map is same.\n\t\t//In order to make it more generic letís take the array of Objects and perform the same operation:\n\t\tMap<String, Integer> map2 = Stream.of(new Object[][] { \n\t\t { \"data1\", 1 }, \n\t\t { \"data2\", 2 }, \n\t\t}).collect(Collectors.toMap(data -> (String) data[0], data -> (Integer) data[1]));\n\t\t//Here, we create a map of the key as String and value as an Integer.\n\t}", "public static Map<String, String> strToMap(String str) {\n return strToMap(str, \"|\", false);\n }", "public Map<String, Integer> wordLen(String[] str) {\n\t\t\n\t\tMap<String, Integer> map = new HashMap<String, Integer>();\n\t\t\n\t\tfor (int i = 0; i < str.length; i++) {\n\t\t\tmap.put(str[i], str[i].length());\n\t\t}\n\t\t\n\t\treturn map;\n\t\t\n\t}", "HashMap<String,Integer> mapCode(String[] splitwords){\n\t\t\tHashMap<String,Integer> wordsOfCode= new HashMap<String,Integer>();\n\t\t\tLovinsStemmer nonSuffixes=new LovinsStemmer();\n\t\t\t//PorterStemmer nonSuffixes=new PorterStemmer();\n\t\t\tint num=0;\n\t\t\tfor(int i=0; i<splitwords.length;i++) {\n\t\t\t\tString temp=nonSuffixes.stem(splitwords[i]);\n\t\t\t\tif(!totalWords.containsKey(temp)) {\n\t\t\t\t\ttotalWords.put(temp, num);\n\t\t\t\t\t\n\t\t\t\t\twordsOfCode.put(temp,num);\n\t\t\t\t\tnum++;\n\t\t\t\t}else if(!wordsOfCode.containsKey(temp)) {\n\t\t\t\t\twordsOfCode.put(temp,totalWords.get(temp));\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn wordsOfCode;\n\t\t\t\n\t\t}", "public static LinkedHashMap<String, Object> toMap(Object... elems) {\n return arrayToMap(elems);\n }", "public static void hashMapEx() {\n\t\tString str = \"habiletechE\";\n\t\tstr = str.toLowerCase();\n\t\tchar[] ch = str.toCharArray();\n\t\tint size = ch.length;\n\n\t\tHashMap<Character, Integer> hmap = new HashMap<Character, Integer>();\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (!hmap.containsKey(ch[i]))\n\t\t\t\thmap.put(ch[i], 1);\n\t\t\telse {\n\t\t\t\tint val = hmap.get(ch[i]) + 1;\n\t\t\t\thmap.put(ch[i], val);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Duplicate Charaacters :\");\n\t\tfor (Map.Entry<Character, Integer> hm : hmap.entrySet()) {\n\t\t\tif (hm.getValue() > 1)\n\t\t\t\tSystem.out.println(hm.getKey() + \" \" + hm.getValue());\n\t\t}\n\t}", "public HashMap<String, Integer> getHashMap(){\n\t\tHashMap <String, Integer> hm1 = new HashMap <String, Integer>();\n\t\t//get each line of the book and store it as an arrayList\n\t\twords = wordData.getLines();\n\t \n\t\tfor(int i =0; i<words.size(); i++){\n\t\t\t \n\t\t\tString[] aLine = words.get(i).split(\" \");\n\t\t\t\n\t\t\tfor(int j = 0; j<aLine.length; j++){\n\t\t\t\t\n\t\t\t\t// convert all upper case to lower case & remove all non-alphabetic symbols;\n\t\t\t\t\t\n\t\t\t\tsparsedWords.add(aLine[j].toLowerCase().replaceAll(\"[^\\\\w]\", \"\"));\n\t\t\t}\n\t\t}\n\t\t//put in key and value in hashmap\n\t\tfor(int key = 0; key < sparsedWords.size(); key++){\n\t\t\t\n\t\t\tif (hm1.containsKey(sparsedWords.get(key))){\n\t\t\t\tint count = hm1.get(sparsedWords.get(key));\n\t\t\t\thm1.put(sparsedWords.get(key), count + 1);\n\t\t\t}else{\n\t\t\t\thm1.put(sparsedWords.get(key), 1);\n\t\t\t}\n\t\t}\n\t\treturn hm1;\n\t\t \t\n\t\t}", "public static Map<String, String> queryToMap(String query){\n Map<String, String> result = new HashMap<String, String>();\n for (String param : query.split(\"&\")) {\n String pair[] = param.split(\"=\");\n if (pair.length>1) {\n result.put(pair[0], pair[1]);\n }else{\n result.put(pair[0], \"\");\n }\n }\n return result;\n }", "private void toMap(String cycle) {\n for (int i = 0; i < cycle.length() - 1; i++) {\n Integer input = _alphabet.toInt(cycle.charAt(i));\n Integer output = _alphabet.toInt(cycle.charAt(i + 1));\n _map.put(input, output);\n }\n Integer i = _alphabet.toInt(cycle.charAt(cycle.length() - 1));\n Integer o = _alphabet.toInt(cycle.charAt(0));\n _map.put(i, o);\n }", "private Map<String, String> toMap(final Attributes atts) {\r\n\t\tfinal Map<String, String> values = Maps.newLinkedHashMap();\r\n\t\t\r\n\t\tfor (int index = 0; index < atts.getLength(); index++) {\r\n\t\t\tvalues.put(atts.getLocalName(index), atts.getValue(index));\r\n\t\t}\r\n\t\t\r\n\t\treturn values;\r\n\t}", "private static Map<String, String> getArgMap(String[] args) {\n \t\r\n Map<String,String> argMap = new HashMap<String,String>();\r\n for (int i = 0; i < args.length; i++) {\r\n \tlogger.info(\"arg[\"+i+\"]=\"+args[i]);\r\n String[] argArray = args[i].split(\"=\"); //$NON-NLS-1$\r\n\r\n if (argArray.length == 2) {\r\n argMap.put(argArray[0], argArray[1]);\r\n }\r\n }\r\n return argMap;\r\n }", "public static HashMap<Integer, String> createDictionary(HashSet<Integer> byteKey, ArrayList<String> bitsValue){\n HashMap<Integer, String> dictionary = new HashMap<>();\n ArrayList <Integer> bytesKey = new ArrayList<>(byteKey);\n for (int i = 0; i < bytesKey.size(); i++) {\n dictionary.put(bytesKey.get(i), bitsValue.get(i));\n }\n return dictionary;\n }", "public void sortChars(String[] array){\n HashMap<String, LinkedList<String>> list = new HashMap<String, LinkedList<String>>();\n\n for(String s: array){\n String key = sortChars(s);\n if(!list.containsKey(key)){\n list.put(key, new LinkedList<String>());\n }\n LinkedList<String> anagrams = list.get(key);\n anagrams.push(s);\n }\n\n int index = 0;\n for(String key: list.keySet()){\n LinkedList<String> anagrams = list.get(key);\n for(String val: anagrams){\n array[index] = val;\n index++;\n }\n }\n }", "public static Map<String, String> convertTomap(Stream<String> stream, String delimiter) {\n logger.info(\"converting stream of strings to Map using delimiter : \" + delimiter);\n return stream.filter(current_line -> current_line.length() > 0)\n .map(cl -> cl.split(delimiter))\n .filter(cl -> cl.length > 1)\n .collect(Collectors.toMap(cl -> cl[0].trim(), cl -> cl[1].trim(), (val1, val2) -> val2.trim()));\n }", "public static Map<String,String> StringtoMap(String str){\n\t\tMap<String,String> map = new LinkedHashMap<String,String>();\n\n\t\ttry {\n\t\t\tDocument document = DocumentHelper.parseText(str);\n\t\t\tElement root = document.getRootElement();\n\t\t\tList<Element> elementList = root.elements();\n\t\t\tfor(Element e : elementList){\n\t\t\t\tmap.put(e.getName(), e.getText());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn map;\n\t}", "private String[] toArray(String str) { String arr[] = new String[1]; arr[0] = str; return arr; }", "public static Map mapFrom(Object[][] keyValueSets) {\r\n\t\tMap map = new HashMap(keyValueSets.length);\r\n\t\tfor (int i=0; i<keyValueSets.length; i++) {\r\n\t\t\tmap.put(keyValueSets[i][0], keyValueSets[i][1]);\r\n\t\t}\r\n\t\treturn map;\r\n\t}", "private static void initializeMap() {\n\t\tmap = new HashMap<String, MimeTransferEncoding>();\n\t\tfor (MimeTransferEncoding mte : MimeTransferEncoding.values()) {\n\t\t\tmap.put(mte.string, mte);\n\t\t}\n\t}", "public Map<String, Integer> wordCount(String[] strings) {\n\n\n Map<String, Integer> mojaMapa = new HashMap<String, Integer>();\n\n for (String element : strings) {\n if (mojaMapa.containsKey(element)) {\n Integer iloscWystapienElementu = mojaMapa.get(element);\n mojaMapa.put(element, iloscWystapienElementu + 1);\n } else {\n mojaMapa.put(element, 1);\n }\n\n\n }\n return mojaMapa;\n }", "public HashMap<String, String> convertToString() throws IOException\n\t{\n\t HashMap<String, String> map = new HashMap<String, String>();\n\n\t String line;\n\t BufferedReader reader;\n\t String multiple_line=null;\n\t\ttry {\n\t\t\treader = new BufferedReader(new FileReader(filePath));\n\t\t\t\n\t\t\twhile ((line = reader.readLine()) != null)\n\t\t {\n\t\t String[] parts = (line.replaceAll(\"\\\"\", \"\").split(\"=\", 2)); //tolto replaceAll\n\t\t if (parts.length >= 2)\n\t\t {\n\t\t String key = parts[0];\n\t\t multiple_line=key;\n\t\t String value = parts[1];\n\t\t map.put(key, value);\n\t\t } else {\n\t\t \n\t\t String line2=map.get(multiple_line);\n\t\t map.put(multiple_line, line2+\"\\n\"+line);\n\t\t }\n\t\t }\n\t\t\t\n\t\t\t//for (String key : map.keySet())\n\t\t //{\n\t\t // System.out.println(key + \":\" + map.get(key));\n\t\t // }\n\t\t reader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t \n\t \n\t return map;\n\t}", "private HashMap parseMap(String localData){\n int localPointer = 0;\n HashMap temp = new HashMap();\n char c = localData.charAt(localPointer++);\n while (c != '}'){\n String entry = \"\";\n entry_loop :\n while (c != '}'){\n switch (c){\n case ',' :\n c = localData.charAt(localPointer++);\n break entry_loop;\n case '{' :\n String tempEntry = this.getFull(localData.substring(localPointer),0);\n entry += tempEntry;\n localPointer += tempEntry.length();\n break ;\n case '[' :\n String tempEntry2 = this.getFull(localData.substring(localPointer),1);\n entry += tempEntry2;\n localPointer += tempEntry2.length();\n break ;\n default :\n entry += c;\n break ;\n }\n c = localData.charAt(localPointer++);\n }\n entry = entry.trim();\n String[] entryArray = entry.split(\":\",2);\n String key = entryArray[0].trim();\n String value = entryArray[1].trim();\n Object keyObj = null;\n Object valueObj = null;\n\n switch (this.getDataType(key.trim())){\n case String:\n keyObj = key.trim().replace(\"\\\"\",\"\");\n break ;\n case Integer:\n keyObj = Long.parseLong(key.trim());\n break ;\n case Float:\n keyObj = Float.parseFloat(key.trim());\n break ;\n case Boolean:\n keyObj = Boolean.parseBoolean(key.trim());\n break ;\n case Map:\n keyObj = this.parseMap(key.trim());\n break ;\n case List:\n keyObj = this.parseList(key.trim());\n }\n\n switch (this.getDataType(value.trim())){\n case String:\n valueObj = value.trim().replace(\"\\\"\",\"\");\n break ;\n case Integer:\n valueObj = Long.parseLong(value.trim());\n break ;\n case Float:\n valueObj = Float.parseFloat(value.trim());\n break ;\n case Boolean:\n valueObj = Boolean.parseBoolean(value.trim());\n break ;\n case Map:\n valueObj = this.parseMap(value.trim());\n break ;\n case List:\n valueObj = this.parseList(value.trim());\n }\n temp.put(keyObj,valueObj);\n }\n return temp;\n }", "String[][] packData();", "public static Map<String, String> queryToMap(String query) {\n\t\tMap<String, String> result = new HashMap<String, String>();\n\t\tfor (String param : query.split(\"&\")) {\n\t\t\tString pair[] = param.split(\"=\");\n\t\t\tif (pair.length > 1) {\n\t\t\t\tresult.put(pair[0], pair[1]);\n\t\t\t} else {\n\t\t\t\tresult.put(pair[0], \"\");\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static Map<String, String> queryToMap(String query) {\n\t\tMap<String, String> result = new HashMap<String, String>();\n\t\tfor (String param : query.split(\"&\")) {\n\t\t\tString pair[] = param.split(\"=\");\n\t\t\tif (pair.length > 1) {\n\t\t\t\tresult.put(pair[0], pair[1]);\n\t\t\t} else {\n\t\t\t\tresult.put(pair[0], \"\");\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static <T> Set<T> convertArrayToSet(T array[]) \r\n { \r\n \r\n // Create the Set by passing the Array \r\n // as parameter in the constructor \r\n Set<T> set = new HashSet<>(Arrays.asList(array)); \r\n \r\n // Return the converted Set \r\n return set; \r\n }", "public static Map<String, IpAddress> convert(List<IpAddress> ipAddressList) {\n Map<String, IpAddress> ipAddressMap = new HashMap<String, IpAddress>();\n\n for (IpAddress ipAddress : ipAddressList) {\n ipAddressMap.put(ipAddress.getUuid(), ipAddress);\n }\n\n return ipAddressMap;\n }", "public static Map<String, String> getQueryMap(String query) throws UnsupportedEncodingException\n {\n String[] params = query.split(\"&\");\n Map<String, String> map = new HashMap<String, String>(params.length);\n for (String param : params)\n {\n String[] keyValue = param.split(\"=\");\n map.put(keyValue[0], URLDecoder.decode(keyValue[1], \"UTF-8\"));\n }\n return map;\n }", "public static Map<String, String> strToMap(String str, boolean trim) {\n return strToMap(str, \"|\", trim);\n }", "private static Map<String, String> generateDataMap(String dataString) {\n dataString = strManager.removeString(dataString, \" \");\n dataString = strManager.removeString(dataString, \"\\\\+\");\n String[] dataSet = dataString.split(\",\", -1);\n\n Map<String, String> dataMap = new HashMap<String, String>();\n\n for (int i = 2; i < dataSet.length; i++) {\n String[] d = dataSet[i].split(\"=\", -1);\n String transducer = d[0];\n String value = strManager.removeUnits(d[1]);\n\n dataMap.put(transducerNames.get(transducer), value);\n }\n dataMap = addLocation(dataMap);\n\n return dataMap;\n }", "public final Map<String, Integer> mo33708h(List<String> list) {\n return (Map) m968r(new C2164bs(this, list));\n }", "public ArrayList<String> anagrams(String[] strs) {\n HashMap<String, ArrayList<String>> rec=new HashMap<String,ArrayList<String>>();\n ArrayList<String> ans=new ArrayList<String>();\n if(strs.length==0)return ans;\n for(int i=0;i<strs.length;i++){\n char[] key=strs[i].toCharArray();\n Arrays.sort(key);\n String newkey=new String(key);\n if(rec.containsKey(newkey)){\n rec.get(newkey).add(strs[i]);\n }\n else{\n ArrayList<String> ad=new ArrayList<String>();\n ad.add(strs[i]);\n rec.put(newkey,ad);\n }\n }\n for(ArrayList<String> value:rec.values()){\n if(value.size()>1)ans.addAll(value);\n }\n return ans;\n }", "public static Map<String, String> strToMap(String str, String delim, boolean trim) {\n return strToMap(str, delim, trim, null);\n\n }", "private static Map<String, String> createMapFromList(final List<String> all) {\n\t\tfinal Map<String, String> map = new ConcurrentHashMap<>();\n\n\t\tfor (final String documentElement : all) {\n\t\t\tif (documentElement != null) {\n\t\t\t\tmap.put(documentElement, documentElement);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}", "public static HashMap<String, ArrayList<String>> parseKeyValueList(String keySpliter, String strToParse) {\r\n\t\treturn parseKeyValueList (keySpliter, null, \"\\n\", strToParse);\r\n\t}", "private static List<List<String>> groupAnagrams(String[] strs) {\n List<List<String>> result = new ArrayList<List<String>>();\n\n HashMap<Integer, ArrayList<String>> map = new HashMap<Integer, ArrayList<String>>();\n for(String str: strs){\n int key = 0;\n for(int i=0; i<str.length(); i++){\n key = key + (str.charAt(i)-'a');\n }\n\n if(map.containsKey(key)){\n map.get(key).add(str);\n }else{\n ArrayList<String> al = new ArrayList<String>();\n al.add(str);\n map.put(key, al);\n }\n }\n\n result.addAll(map.values());\n\n return result;\n }", "public ArrayList<State> stringArraytoStateArray (ArrayList<String> pArray)\r\n\t{\r\n\t\tArrayList<State> sArray = new ArrayList<State>();\r\n\t\tfor (Iterator<String> iterator = pArray.iterator(); iterator.hasNext();) \r\n\t\t{\r\n\t\t\tString string1 = (String) iterator.next();\r\n\t\t\tState sTemp = new State(string1);\r\n\t\t\tsTemp.toString();\r\n\t\t\tsArray.add(sTemp);\r\n\t\t}\r\n\t\treturn sArray;\r\n\t}", "public static HashMap<String, ArrayList<String>> parseKeyValueList(String keySpliter,String valueSpliter, String strToParse) {\r\n\t\treturn parseKeyValueList (keySpliter, valueSpliter, \"\\n\", strToParse);\r\n\t}", "public static List<List<String>> groupAnagrams(String[] strs) {\n String[] wordHash = new String[strs.length];\n for (int i = 0; i < strs.length; i++) { // O(n)\n wordHash[i] = hashWord(strs[i]); // O(c + 26)\n }\n HashMap<String,List<String>> map = new HashMap<>();\n for (int i = 0; i < strs.length; i++) {\n List<String> words = map.getOrDefault(wordHash[i], new ArrayList<String>());\n words.add(strs[i]);\n map.put(wordHash[i], words);\n }\n List<List<String>> out = new ArrayList<>();\n for (String k : map.keySet()) {\n out.add(map.get(k));\n }\n return out;\n }", "public List<List<String>> groupAnagrams(String[] strs) {\n \n int len = strs.length;\n Hashtable<String, List<String>> anagrams = new Hashtable<>();\n \n for(int i=0; i<len; i++){\n char[] sorted = strs[i].toCharArray(); \n Arrays.sort(sorted);\n String key = String.valueOf(sorted);\n List<String> temp = new ArrayList<>();\n \n if(anagrams.containsKey(key)){\n temp = anagrams.get(key);\n \n }\n temp.add(strs[i]);\n anagrams.put(key, temp);\n }\n \n \n List<List<String>> answer = new ArrayList<>();\n \n for(List<String> item: anagrams.values() ){\n answer.add(item);\n }\n \n return answer;\n \n }", "public static int[][] fillMap(List<String> lines){\n int[][] map=new int[lines.size()][lines.get(0).length()];\n //find values of each spot\n for(int i=0;i<lines.size();i++){\n for(int j=0;j<lines.get(i).length();j++){\n char c=lines.get(i).charAt(j);\n switch (c) {\n case '_': //empty\n map[i][j]=0;\n break;\n case 'B': //Blue\n map[i][j]=1;\n break;\n case 'A': //Cyan\n map[i][j]=2;\n break;\n case 'W': //white\n map[i][j]=3;\n break;\n case 'R': //red\n map[i][j]=4;\n break;\n case 'P': //pink\n map[i][j]=5;\n break;\n case 'D': //magenta\n map[i][j]=6;\n break;\n case 'O': //orange\n map[i][j]=7;\n break;\n case 'G': //Green\n map[i][j]=8;\n break;\n case 'Y': //Yellow\n map[i][j]=9;\n break;\n case 'K': //Seafoam\n map[i][j]=10;\n break;\n case 'Q': //purple\n map[i][j]=11;\n break;\n default:\n map[i][j]=12; //shouldn't happen\n break;\n }\n }\n }\n return map;\n }", "public void createIDMap()\n {\n IDMap = new HashMap<>();\n idFile.open(\"idpassword.txt\");\n String line = idFile.getNextLine();\n\n\n\n while(line!=null) {\n String[] fields = line.split(\",\");\n IDMap.put(fields[0], fields[1]);\n\n line = idFile.getNextLine();\n\n }\n\n }", "public Map<String, String> toSingleValueMap()\r\n/* 367: */ {\r\n/* 368:538 */ LinkedHashMap<String, String> singleValueMap = new LinkedHashMap(this.headers.size());\r\n/* 369:539 */ for (Map.Entry<String, List<String>> entry : this.headers.entrySet()) {\r\n/* 370:540 */ singleValueMap.put((String)entry.getKey(), (String)((List)entry.getValue()).get(0));\r\n/* 371: */ }\r\n/* 372:542 */ return singleValueMap;\r\n/* 373: */ }", "private Map<String, String> extractPropertyValues(String[] paramArray,\n\t\t\tString[] connPropertyNames) {\n\n\t\tMap<String, String> connPropValues = new HashMap<String, String>();\n\t\tString[] temp = null;\n\t\tString userPassedValue = null;\n\n\t\tfor (int i = 0; i < paramArray.length; i++) {\n\t\t\ttemp = paramArray[i].split(\"=\");\n\t\t\tfor (int j = 0; j < connPropertyNames.length; j++) {\n\t\t\t\tif (temp[0].equalsIgnoreCase(connPropertyNames[j])) {\n\t\t\t\t\tif (temp.length < 2) {\n\t\t\t\t\t\tuserPassedValue = \"\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tuserPassedValue = temp[1];\n\t\t\t\t\t}\n\t\t\t\t\tconnPropValues.put(connPropertyNames[j], userPassedValue);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn connPropValues;\n\t}", "public static HashMap<String,String[][]> build(String[][] data){\r\n\t\tString key;\t\t\t\t\t\t\t\t\t\t\t//One of the keys\r\n\t\tString[][] value;\t\t\t\t\t\t\t\t\t//The corresponding value\r\n\t\tString[] valueElement0, valueElement1;\t\t\t\t//The two arrays in the value\r\n\t\tInteger step;\t\t\t\t\t\t\t\t\t\t//For keeping track of the position in the array\r\n\t\tString warning;\t\t\t\t\t\t\t\t\t\t//A message to let the user know there might be a problem\r\n\t HashMap<String, String[][]> result;\r\n\t \r\n\t if ((data.length % 3) != 0) {\r\n\t \twarning = \r\n\t \t\t\t\"WARNING in HashMapBuilder2.build: Bug detected. Contact Ken Samuel.\";\r\n\t \tSystem.err.println(warning);\r\n\t \tGlobal.unableToRespondMessage.add(warning);\r\n\t }\r\n\t \r\n\t result = new HashMap<String, String[][]>();\t\t\t//Initialize\r\n\t key = null;\t\t\t\t\t\t\t\t\t\t\t//Initialize\r\n\t valueElement0 = new String[0];\t\t\t\t\t\t//Initialize\r\n\t valueElement1 = new String[0];\t\t\t\t\t\t//Initialize\r\n\t step = -1;\t\t\t\t\t\t\t\t\t\t\t//Initialize\r\n\t for(String[] array : data){\r\n\t step++;\r\n\t switch(step % 3){\r\n\t case 0: \r\n\t if(array[0] == null) {\r\n\t \twarning = \"WARNING in HashMapBuilder2.build: Bug detected. Contact Ken Samuel.\";\r\n\t \t \tSystem.err.println(warning);\r\n\t \t \tGlobal.unableToRespondMessage.add(warning);\r\n\t }\r\n\t key = array[0];\r\n\t continue;\r\n\t case 1:\r\n\t \tvalueElement0 = array;\r\n\t continue;\r\n\t case 2:\r\n\t \tvalueElement1 = array;\r\n\t\t \tvalue = new String[2][Math.max(valueElement0.length,valueElement1.length)];\r\n\t\t \tvalue[0] = valueElement0;\r\n\t\t \tvalue[1] = valueElement1;\r\n\t\t \tresult.put(key,value);\r\n\t break;\r\n\t default:\t\t\t//This should never happen\r\n\t \twarning = \"WARNING in HashMapBuilder2.build: Bug detected. Contact Ken Samuel.\";\r\n \t \tSystem.err.println(warning);\r\n \t \tGlobal.unableToRespondMessage.add(warning);\r\n\t }\r\n\t }\r\n\t return result;\r\n\t}", "public static Map<String, String> strToMap(String str, String delim, boolean trim, String pairsSeparator) {\n if (UtilValidate.isEmpty(str)) {\n return null;\n }\n Map<String, String> decodedMap = new HashMap<>();\n List<String> elements = split(str, delim);\n pairsSeparator = pairsSeparator == null ? \"=\" : pairsSeparator;\n\n for (String s: elements) {\n\n List<String> e = split(s, pairsSeparator);\n if (e.size() != 2) {\n continue;\n }\n String name = e.get(0);\n String value = e.get(1);\n if (trim) {\n if (name != null) {\n name = name.trim();\n }\n if (value != null) {\n value = value.trim();\n }\n }\n\n try {\n if (value != null && name != null) {\n decodedMap.put(URLDecoder.decode(name, \"UTF-8\"), URLDecoder.decode(value, \"UTF-8\"));\n }\n } catch (UnsupportedEncodingException e1) {\n Debug.logError(e1, MODULE);\n }\n }\n return decodedMap;\n }", "@Override\n public Map<String, List<PairModel>> getPairValues(String[] keyArr) {\n return null;\n }", "public static HashMap<String, CNV[]> splitByChromsome(CNV[] cnvs){\n\t\tArrayList<CNV> al = new ArrayList<CNV>();\n\t\tHashMap<String, CNV[]> map = new HashMap<String, CNV[]>();\n\t\tString chromosome = cnvs[0].getGrGraph().getChromosome();\n\t\t//for each GenomicRegion\n\t\tfor (int i=0; i< cnvs.length; i++){\n\t\t\t//same chromosome?\n\t\t\tif (cnvs[i].getGrGraph().getChromosome().equals(chromosome)){\n\t\t\t\tal.add(cnvs[i]);\n\t\t\t}\n\t\t\t//different chromosome!\n\t\t\telse {\n\t\t\t\t//set new chrom in map\n\t\t\t\tCNV[] regions = new CNV[al.size()];\n\t\t\t\tal.toArray(regions);\n\t\t\t\tmap.put(chromosome, regions);\n\t\t\t\t//reset params\n\t\t\t\tal = new ArrayList();\n\t\t\t\tal.add(cnvs[i]);\n\t\t\t\tchromosome = cnvs[i].getGrGraph().getChromosome();\n\t\t\t}\n\t\t}\n\t\t//add last\n\t\tCNV[] regions = new CNV[al.size()];\n\t\tal.toArray(regions);\n\t\tmap.put(chromosome, regions);\n\t\treturn map;\n\t}", "private Map<String, String> m15124a(Map<String, String> map) {\n String str;\n String str2;\n HashMap hashMap = new HashMap();\n if (map != null) {\n for (Entry entry : map.entrySet()) {\n Object key = entry.getKey();\n Object value = entry.getValue();\n if (!(key instanceof String) || !(value instanceof String)) {\n C7262l b = this.f13489a.mo23049b();\n StringBuilder sb = new StringBuilder();\n sb.append(\"Unexpected class type in trackEvent(); all keys and values passed as parameters must be String. Encountered \");\n sb.append(key.getClass().getCanonicalName());\n sb.append(\"/\");\n sb.append(value.getClass().getCanonicalName());\n sb.append(\"; will use toString() value instead, which may be unexpected...\");\n b.mo22913a(\"EventServiceImpl\", sb.toString());\n str = key.toString();\n str2 = value.toString();\n } else {\n str = (String) key;\n str2 = (String) value;\n }\n hashMap.put(str, str2);\n }\n }\n return hashMap;\n }", "private HashMap<String, String> returnCorrectMap(String...parameters) {\n\n\t\tHashMap<String, String> map = null;\n\n\t\ttry {\n\n\t\t\tmap = generateHashMapFromStringList(parameters);\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn map;\n\t}", "private static Map<String, String> parseAgentArgs(String agentArgs) {\n if (agentArgs == null) {\n return Collections.emptyMap();\n }\n String[] agentArgsArr = agentArgs.split(\",\");\n Map<String, String> argsMap = new HashMap<>(agentArgsArr.length);\n for (String arg : agentArgsArr) {\n String[] splitAgentArg = arg.split(\"=\");\n if (splitAgentArg.length != 2) {\n throw new IllegalArgumentException(\n String.format(\n \"Agent args is not well formed: %s. Use the format \\\"arg1=val1,arg2=val2,arg3=val3\\\"\",\n arg));\n }\n argsMap.put(splitAgentArg[0], splitAgentArg[1]);\n }\n return argsMap;\n }", "public static HashMap<String,String> splitJson(String s) {\n ObjectMapper mapper1 = new ObjectMapper();\n HashMap<String,String> rtn = new HashMap<String,String>();\n HashMap<String,String> jobj = null;\n try {\n jobj = mapper1.readValue(s, HashMap.class);\n for (Map.Entry<String, String> entrySet : jobj.entrySet()) {\n String key = entrySet.getKey();\n Object value = entrySet.getValue();\n rtn.put(key, mapper1.writeValueAsString(value));\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n return rtn;\n }", "public static void main(String[] args) {\n HashMap<Character,Integer> hMapOutPut = new HashMap<>();\n //HashMap map = new HashMap();\n String sInput = \"india\";\n char[] strInputArray = sInput.toCharArray();\n for(char fLoop: strInputArray) {\n System.out.println(fLoop);\n if(hMapOutPut.containsKey(fLoop)) {\n int temp=hMapOutPut.get(fLoop)+1;\n hMapOutPut.put(fLoop,temp );\n }else {\n hMapOutPut.put(fLoop, 1);\n }\n }\nSystem.out.println(hMapOutPut);\n }", "public void createHashTable() {\n\n String[] tempArray = new String[words.size()];\n\n for (int i = 0; i < words.size(); i++) {\n char[] word = words.get(i).toCharArray(); // char[] snarf\n Arrays.sort(word); // char[] afnrs\n tempArray[i] = toString(word); // String afnrs\n }\n\n for (int i = 0; i < words.size(); i++) {\n String word = tempArray[i];\n hashTable.put(word.substring(0, 4), i); // plocka bort bokstav nr 5\n String subString4 = (word.substring(0, 3) + word.substring(4, 5)); // plocka bort bokstav nr 4\n hashTable.put(subString4, i);\n String subString3 = (word.substring(0, 2) + word.substring(3, 5)); // plocka bort bokstav nr 3\n hashTable.put(subString3, i);\n String subString2 = (word.substring(0, 1) + word.substring(2, 5)); // plocka bort bokstav nr 2\n hashTable.put(subString2, i);\n hashTable.put(word.substring(1, 5), i); // plocka bort bokstav nr 1\n }\n }", "private static Map<Character, Set<Character>> genLessMap(String[] words) throws Exception {\n Map<Character, Set<Character>> map = new HashMap<>();\n for (int i = 1; i < words.length; i ++) {\n String a = words[i - 1];\n String b = words[i];\n boolean allEqual = true;\n for (int j = 0; j < a.length() && j < b.length(); j ++) {\n if (a.charAt(j) == b.charAt(j))\n continue;\n allEqual = false;\n Set<Character> sb = map.get(a.charAt(j));\n if (sb == null) {\n sb = new HashSet<Character>();\n map.put(a.charAt(j), sb);\n }\n sb.add(b.charAt(j));\n break;\n }\n if (allEqual && a.length() > b.length())\n throw new Exception(\"Invalid.\");\n }\n return map;\n }", "public static <T> Set<T> array2Set(T[] array) {\n\t\treturn new HashSet<T>(Arrays.asList(array));\n\t}", "private static HashMap<String,String> getRowValues( String[] headerArray, String row ) {\r\n\t\t\r\n\t\tString[] dataArray = ContactsImport.parseCSVLine(row, false);\r\n\t\tHashMap<String,String> values = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t//validate: number of elements in the row should be equals to the number of elements in the header\r\n\t\t\tif (dataArray.length != headerArray.length) {\r\n\t\t\t\t\r\n\t\t\t\tthrow( new Exception(\"number of elements doesn't match header row\"));\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t\r\n\t\t\t\t//store all values in the hashmap\r\n\t\t\t\tvalues = new HashMap<String,String>();\r\n\t\t\t\t\r\n\t\t\t\tfor (int i=0; i<dataArray.length; i++) {\r\n\t\t\t\t\tvalues.put( headerArray[i], dataArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.error(\"invalid row (\" + e.getMessage() + \"): \" + row);\r\n\t\t}\r\n\t\t\r\n\t\treturn values;\r\n\t\t\r\n\t}", "public static int hashCode(char[] array, int start, int end) {\n\t\tint code = 0;\n\t\tfor( int i = end - 1; i >= start; i-- )\n\t\t\tcode = code * 31 + array[i];\n\t\treturn code;\n\t}", "private static Map<String, List<String>> getCustomStringStructure(@NotNull String s) {\n String[] arr = s.split(\" \");\n // the storage\n Map<String, List<String>> map = new TreeMap<>();\n // put the first element in the storage\n List<String> l = new ArrayList<>();\n l.add(arr[0]);\n map.put(arr[0].substring(0, 1), l);\n\n for (int i = 1; i < arr.length; i++) {\n String sub = arr[i].substring(0, 1);\n // if map contains key put String arr[i] in the List\n if (map.containsKey(sub)) {\n map.get(sub).add(arr[i]);\n } else {\n // if not put first letter as a key and arr[i] as a value in the map\n List<String> list = new ArrayList<>();\n list.add(arr[i]);\n map.put(sub, list);\n }\n }\n\n // sort by size, by string's length and alphabetically\n Map<String, List<String>> collect = map.entrySet()\n .stream()\n .filter(k -> k.getValue().size() > 1)\n .collect(Collectors.toMap(\n Map.Entry::getKey,\n e -> e.getValue().stream().sorted((o1, o2) -> {\n if (o2.length() != o1.length()) {\n return o2.length() - o1.length();\n } else {\n return o1.compareTo(o2);\n }\n })\n .collect(Collectors.toList())\n ));\n\n // return TreeMap to sort keys\n return new TreeMap<>(collect);\n }", "private void setUrlPrefixMappingToMap(String[] prefixArr)\n\t{\n\t\tif( prefixArr != null )\n\t\t{\n\t\t\tfor(String urlPrefix : prefixArr)\n \t{ \n\t\t\t\tif(urlPrefix.contains(DELIMITER))\n\t\t\t\t{\n\t \t\tString[] keyVal = urlPrefix.split(\"::\");\n\t \t\tString key \t\t= keyVal[0];\n\t \t\tString value \t= keyVal[1].trim();\n\t \t\tlog.info(\"REST SERVICE Key------->>> \"+key);\n\t \t\tlog.info(\"REST SERVICE Value------->>> \"+value);\n\t \t\tappurlMap.put(key , value);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tlog.warn(\"NO DELEMETERS PROVIDED FOR REDIRECT SERVICE URL -------->>> \");\n\t\t\t\t}\n \t}\n\t\t}\n\t}", "public static Map<Integer,Integer> getSquares(int[] arr){\n\t\tMap<Integer,Integer> hm=new HashMap<>();\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\thm.put(arr[i],(int) Math.pow(arr[i],2));\n\t\t}\n\t\treturn hm;\t\n\t}", "public static Map<String, String> getQueryMap(String query) { \n Map<String, String> qmap = new HashMap<String, String>(); \n if (StringUtils.isEmpty(query)) {\n return qmap;\n }\n String[] params = query.split(\"&\"); \n for (String param : params) {\n String[] pair = param.split(\"=\");\n String name = pair[0];\n String value = \"\";\n if (pair.length > 1) {\n value = StringUtil.urlDecode(pair[1]);\n }\n qmap.put(name, value); \n } \n return qmap; \n }", "public final Map<String, Integer> mo34029a(List<String> list) {\n return (Map) m446a(new C1840ci(this, list));\n }", "public HashMap<String, String[]> readDictionary (){\n\t\tHashMap<String, String[]> hashmap = new HashMap<String, String[]>();\n\t\t\n\t\treturn (HashMap<String, String[]>) readDictionary(hashmap);\n\t}", "public final Map<Integer, List<zzbu.zzb>> zze(String str) {\n Preconditions.checkNotEmpty(str);\n ArrayMap arrayMap = new ArrayMap();\n Cursor cursor = null;\n try {\n cursor = mo40210c_().query(\"event_filters\", new String[]{\"audience_id\", \"data\"}, \"app_id=?\", new String[]{str}, (String) null, (String) null, (String) null);\n if (!cursor.moveToFirst()) {\n Map<Integer, List<zzbu.zzb>> emptyMap = Collections.emptyMap();\n if (cursor != null) {\n cursor.close();\n }\n return emptyMap;\n }\n do {\n try {\n zzbu.zzb zzb2 = (zzbu.zzb) ((zzib) ((zzbu.zzb.zza) zzks.zza(zzbu.zzb.zzl(), cursor.getBlob(1))).zzv());\n if (zzb2.zzf()) {\n int i = cursor.getInt(0);\n List list = (List) arrayMap.get(Integer.valueOf(i));\n if (list == null) {\n list = new ArrayList();\n arrayMap.put(Integer.valueOf(i), list);\n }\n list.add(zzb2);\n }\n } catch (IOException e) {\n zzr().zzf().zza(\"Failed to merge filter. appId\", zzez.zza(str), e);\n }\n } while (cursor.moveToNext());\n if (cursor != null) {\n cursor.close();\n }\n return arrayMap;\n } catch (SQLiteException e2) {\n zzr().zzf().zza(\"Database error querying filters. appId\", zzez.zza(str), e2);\n Map<Integer, List<zzbu.zzb>> emptyMap2 = Collections.emptyMap();\n if (cursor != null) {\n cursor.close();\n }\n return emptyMap2;\n } catch (Throwable th) {\n if (cursor != null) {\n cursor.close();\n }\n throw th;\n }\n }", "public static Map<String, List<Double>> stringToMapList(String text) {\n\t\tList<String> lines = splitLines(text);\n\t\tint keyIndex = 0;\n\t\tHashMap<String, List<Double>> entries = new HashMap<String, List<Double>>();\n\t\tfor (int i=0; i<lines.size(); i++) {\n\t\t\ttry {\n\t\t\t\tList<String> splitLine = splitWhitespace(lines.get(i));\n\t\t\t\tif (splitLine.size() > 0) {\n\t\t\t\t\tList<Double> values = new ArrayList<Double>();\n\t\t\t\t\tfor (int wordI=1; wordI<splitLine.size(); wordI++) {\n\t\t\t\t\t\tvalues.add(Double.parseDouble(splitLine.get(wordI)));\n\t\t\t\t\t}\n\t\t\t\t\tentries.put(splitLine.get(keyIndex), values);\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tSystem.out.println(\"Skipping entry \"+i+\": \"+lines.get(i));\n\t\t\t}\n\t\t}\n\t\treturn entries;\n\t}", "public static HashMap<String, String> readFromExcel() throws IOException, WriteException, BiffException {\n\t\t\t\tList<String> keyList = new ArrayList<String>(); \r\n\t\t\t\tList<String> list = new ArrayList<String>(); \r\n\t\t\t\tHashMap<String, String> map = new HashMap<String, String>(); \r\n\t\t\t\tString str = null;\r\n\t\t\t\r\n\t\t\t\ttry\r\n\t\t {\r\n\t\t File f1=new File(\"//ecs-9844/DoNotDelete/JenkinsData/input.xls\");\r\n\t\t //the excel sheet which contains data\r\n\t\t WorkbookSettings ws=new WorkbookSettings();\r\n\t\t ws.setLocale(new Locale(\"er\",\"ER\"));\r\n\t\t Workbook workbook=Workbook.getWorkbook(f1,ws);\r\n\t\t Sheet readsheet=workbook.getSheet(0);\r\n\t\t //Loop to read the KEYS from Excel i.e, 1st column of the Excel\r\n\t\t for(int i=0;i<readsheet.getColumns();i++) {\r\n\t\t \tstr=readsheet.getCell(i,0).getContents().toString();\r\n\t\t \tlist.add(str);\r\n\t\t }\r\n\t\t \tkeyList.addAll(list);\r\n\t\t \t// Hardcoding the first map (key, value) values \r\n\t\t \tmap.put(keyList.get(0), readsheet.getCell(0, 1).getContents().toString());\r\n\t\t \t// Loop to read TEST DATA from the Excel\r\n\t\t for(int i=1;i<readsheet.getRows();i++) {\r\n\t\t for(int j=1;j<readsheet.getColumns();j++) {\t\r\n\t\t str=readsheet.getCell(j,i).getContents().toString();\r\n\t\t list.add(str);\r\n\t\t System.out.println(str);\r\n\t\t map.put(keyList.get(j),str); \r\n\t\t \t}\r\n\t\t }\r\n\t\t //Print the map(key, value) \r\n\t\t System.out.println(\"Print map\");\r\n\t\t System.out.println(map);\r\n\t\t \r\n\t\t }\r\n\t\t catch(IOException e)\r\n\t\t {\r\n\t\t e.printStackTrace();\r\n\t\t }\r\n\r\n\t\t catch(BiffException e)\r\n\t\t {\r\n\t\t e.printStackTrace();\r\n\t\t } catch (Exception e) {\r\n\t\t e.printStackTrace(); \r\n\t\t }\r\n\t\t\t\t\treturn map;\r\n\t}", "private static String[][] getMap(String inputFile, String[][] Map) {\n\t\tFile text = new File(inputFile);\t\r\n\t\tint j = 0;\r\n\r\n\t\ttry {\r\n\t\t\tScanner s = new Scanner(text);\r\n\t\t\tString nex = s.nextLine();\r\n\t\t\t\r\n\t\t\twhile(s.hasNextLine())\r\n\t\t\t{\r\n\t\t\tnex = s.nextLine();\r\n\t\t\tfor (int i = 0; i < nex.length(); i++)\r\n\t\t\t{\r\n\t\t\t\tchar c = nex.charAt(i);\r\n\t\t\t\tString d = Character.toString(c);\r\n\t\t\t\tMap[j][i] = d;\t\r\n\t\t\t}\r\n\t\t\tj++;\r\n\t\t\t}\t\r\n\t\t\ts.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\t\treturn Map;\r\n}", "public static List<List<String>> groupAnagrams(String[] strs) {\n Map<List<Integer>, List<String>> map = new HashMap<>();\n for(String s : strs){\n List<Integer> curr = transform(s);\n if(map.containsKey(curr)) map.get(curr).add(s);\n else{\n List<String> newGrp = new ArrayList<>();\n newGrp.add(s);\n map.put(curr, newGrp);\n }\n }\n\n return new ArrayList<>(map.values());\n }", "Map<String, String> mo14888a();" ]
[ "0.6394613", "0.6257936", "0.6220052", "0.6179802", "0.57241297", "0.56663215", "0.56585866", "0.563694", "0.55912095", "0.5573005", "0.5537372", "0.5532285", "0.5514687", "0.5474215", "0.54165435", "0.5391567", "0.5389641", "0.5386097", "0.5294289", "0.5232356", "0.51652956", "0.516357", "0.5135285", "0.5127532", "0.5120333", "0.5067218", "0.502859", "0.49703392", "0.49689448", "0.49662322", "0.49654076", "0.49595422", "0.4950252", "0.49301568", "0.49157453", "0.48970243", "0.48890644", "0.48823214", "0.4879949", "0.48692295", "0.48691422", "0.48635256", "0.48510385", "0.48356828", "0.48133427", "0.4803149", "0.47993946", "0.47956854", "0.4783866", "0.47833496", "0.47735953", "0.47688738", "0.4754706", "0.4750259", "0.4750259", "0.47450322", "0.47445676", "0.47423357", "0.47365075", "0.4731526", "0.47310072", "0.4726368", "0.47247136", "0.47184518", "0.47177795", "0.47172853", "0.4713995", "0.47068462", "0.47059655", "0.4703837", "0.47035033", "0.47019523", "0.46991017", "0.4685159", "0.46826243", "0.46771884", "0.46709785", "0.46660644", "0.46619543", "0.4659504", "0.46459612", "0.46371648", "0.46345505", "0.46341798", "0.46203074", "0.46191934", "0.4615087", "0.46127182", "0.4605752", "0.4588738", "0.4588643", "0.45782223", "0.45764047", "0.45737836", "0.45659378", "0.45622256", "0.45459864", "0.45326588", "0.45308292", "0.452626" ]
0.7456682
0
method convert an array of string to Hash Map
public static HashMap<String, Integer> convertArrayListToHashMap( ArrayList<String> arr) { HashMap<String, Integer> hm = new HashMap<String, Integer>(); for (int i = 0; i < arr.size(); i++) hm.put(arr.get(i), i); return hm; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static HashMap<String, Integer> convertArrayToHashMap(String[] arr)\n {\n HashMap<String, Integer> hm = new HashMap<String, Integer>();\n\n for (int i = 0; i < arr.length; i++)\n hm.put(arr[i], i);\n\n return hm;\n\n }", "private Map<String, String> convertArrayToMap(PairDTO[] pairDTOs) {\n Map<String, String> map = new HashMap<>();\n for (PairDTO pairDTO : pairDTOs) {\n map.put(pairDTO.getKey(), pairDTO.getValue());\n }\n return map;\n }", "public HashMap<String, String[]> convertToArray() throws IOException\n\t{\n\t HashMap<String, String[]> map = new HashMap<String, String[]>();\n\t String[] list;\n\t \n\t String line;\n\t BufferedReader reader;\n\t\t\n\t try {\n\t\t\treader = new BufferedReader(new FileReader(filePath));\n\t\t\t\n\t\t\twhile ((line = reader.readLine()) != null)\n\t\t {\n\t\t\t\tString key = line;\n\t\t\t\tString value = \"\";\n\t\t\t\tString tmp;\n\t\t\t\t\n\t\t\t\twhile(!(tmp=reader.readLine()).equals(\"$\"))\n\t\t\t\t{\t\n\t\t\t\t\tvalue = value+tmp; \n\t\t\t\t}\n\t\t\t\tString values = value.replaceAll(\"\\\"\", \"\");\n\t\t\t\t\n\t\t\t\tString[] parts = values.split(\",\");\n\t\t map.put(key, parts);\n\t\t }\n\t\t\t\n\t\t\t/*for (String key : map.keySet())\n\t\t {\n\t\t System.out.println(key);\n\t\t for(int i=0; i < map.get(key).length; i++)\n\t\t {\n\t\t \tSystem.out.println(map.get(key)[i]);\n\t\t }\n\t\t }*/\n\t\t\t\n\t\t reader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t \n\t \n\t return map;\n\t}", "public static Map<String,Integer> stringArrayToMap(String[] entries, boolean ignoreNull) {\n\t\tMap<String,Integer> map = new HashMap<String,Integer>();\n\t\tif(entries==null) {\n\t\t\tthrow new RuntimeException(\"StringArrayToMap: entries==null\");\n\t\t}\n\t\tfor(int i=0;i<entries.length;i++) {\n\t\t\tif(entries[i]==null) {\n\t\t\t\tif(!ignoreNull) {\n\t\t\t\t\tlog.warn(\"StringArrayToMap: entries[\"+i+\"]==null ==> will not be included in map\");\t\t\t\t\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmap.put(entries[i], i);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}", "private static Set<String> m23475a(String[] strArr) {\n if (strArr == null || strArr.length == 0) {\n return Collections.emptySet();\n }\n HashSet hashSet = new HashSet(strArr.length);\n for (String str : strArr) {\n hashSet.add(str);\n }\n return hashSet;\n }", "private HashMap<String, String> generateHashMapFromStringList(String...strings) throws Exception {\n\n\t\tif(strings.length % 2 != 0)\n\n\t\t\tthrow InvalidStringListException;\n\n\t\tHashMap<String, String> map = new HashMap<String, String>();\n\n\t\tfor(int i = 0; i < strings.length; i += 2) // Each key will be i, with the following becoming its value\n\n\t\t\tmap.put(strings[i], strings[i + 1]);\n\n\t\treturn map;\n\t}", "private HashMap<Object, Object> HashMapTransform(List<String> lines) {\n\n HashMap<Object, Object> keypair = new HashMap<>();\n\n for (String line : lines) {\n if (line.contains(pairDelimiter)) {\n String[] intermediate = line.split(pairDelimiter, maxSplitSize);\n keypair.put(intermediate[0], intermediate[1]);\n }\n }\n return keypair;\n }", "@SuppressWarnings(\"unchecked\")\n private static <T> Map<String, T> mapOf(Object... inputs) {\n Map<String, T> map = new HashMap<>();\n for (int i = 0; i < inputs.length; i += 2) {\n String key = (String) inputs[i];\n T value = (T) inputs[i + 1];\n map.put(key, value);\n }\n return map;\n }", "@SuppressWarnings(\"rawtypes\")\n\tpublic static Map stringToMap(String params) {\n\t\tMap<String, String> map = new HashMap<String, String>();\n\n\t\tif (params == null) {\n\t\t\tSystem.out.println(\"\");\n\n\t\t} else {\n\t\t\tString[] arr = params.split(\",\");\n\t\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\t\tString key = arr[i].substring(0, arr[i].indexOf(\":\"));\n\t\t\t\tString value = arr[i].substring(arr[i].indexOf(\":\") + 1);\n\t\t\t\tmap.put(key, value);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}", "private static Map countStringOccurences(String[] strArray, AdminJdbcService adminJdbcService) {\n logger.debug(\"Count String Occurences method found\");\n\n Map<String, Integer> countMap = new TreeMap<String, Integer>();\n Map<String, Integer> controlIdsMap = new TreeMap<String, Integer>();\n Set<String> controlIdsSet = new TreeSet<String>();\n Set<String> keySet = countMap.keySet();\n List list = new ArrayList();\n\n for (String string : strArray) {\n String control[] = string.split(\":\");\n if ( !Utils.isNullOrEmpty(control[1]) && Integer.parseInt(control[1].trim()) == 2 ) {\n if (!countMap.containsKey(control[0])) {\n countMap.put(control[0], 1);\n } else {\n Integer count = countMap.get(control[0]);\n count = count + 1;\n countMap.put(control[0], count);\n }\n }\n }\n\n\n return countMap;\n }", "public void hashFunction1(String[] stringsForArray, String[] theArray) {\n\n for (int n = 0; n < stringsForArray.length; n++) {\n\n String newElementVal = stringsForArray[n];\n\n theArray[Integer.parseInt(newElementVal)] = newElementVal;\n\n }\n\n }", "public static HashMap<String, Integer> countOccurences(ArrayList<String> arr) {\n arr = toSortedString(arr);\n HashMap<String, Integer> hash = new HashMap();\n for(String str :arr){\n if(hash.containsKey(str)){\n hash.replace(str, hash.get(str)+1);\n }\n else{\n hash.put(str,1);\n }\n }\n return hash;\n }", "private static HashMap<String, Integer> makeMap(String[] words) {\n HashMap<String, Integer> map = new HashMap();\n for (int i = 0; i < words.length; i++) {\n map.merge(words[i], 1, Integer::sum);\n }\n return map;\n}", "public static HashMap<String,Integer> counter(ArrayList<String> arr){\n\t\tHashMap<String,Integer> map = new HashMap<String,Integer>();\n\t\t\tfor(String s : arr){\n\t\t\t\tif (map.keySet().contains(s)){\n\t\t\t\t\tmap.put(s, map.get(s)+1);\n\t\t\t\t}else{\n\t\t\t\t\tmap.put(s, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn map;\t\n\t}", "void constructMap(JsonArray array)\n {\n JsonObject obj = array.get(0).getAsJsonObject();\n\n // Loop on them\n for(Map.Entry<String, JsonElement> entry : obj.entrySet())\n {\n String key = entry.getKey(); // ID:TYPE\n if(!(key.matches(\"(\\\\d+):([A-Z_]+)\")))\n continue;\n\n String[] split = key.split(\":\");\n long id = Long.parseLong(split[0]);\n CodeType type = remapLegacyCodeType(split[1]);\n\n Map<CodeType, Map<String, String>> userMap = map.getOrDefault(id, new HashMap<>());\n Map<String, String> codesForTypeMap = userMap.getOrDefault(type, new HashMap<>());\n\n for(Map.Entry<String, JsonElement> code : entry.getValue().getAsJsonObject().entrySet())\n codesForTypeMap.put(code.getKey(), code.getValue().getAsString());\n\n userMap.put(type, codesForTypeMap);\n map.put(id, userMap);\n }\n\n array.remove(obj); // Remove the codes object\n }", "public static Map<String, String> stringToHashtable(String file) {\r\n if (file == null) {\r\n return null;\r\n }\r\n\r\n String sansComments = eraseComments(file);\r\n int pos = 0, count = sansComments.length();\r\n Map<String, String> retval = new HashMap<String, String>();\r\n\r\n // Split the file, line by line, into key/value pairs\r\n while (pos < count) {\r\n int eol = offsetToEOL(sansComments, pos);\r\n int next = offsetToNextLine(sansComments, pos);\r\n if (eol > 0) {\r\n String line = sansComments.substring(pos, pos + eol);\r\n StringTokenizer st = new StringTokenizer(line, \"=\");\r\n String key = st.nextToken();\r\n String value = \"\";\r\n if (st.hasMoreTokens()) {\r\n value = st.nextToken();\r\n }\r\n\r\n // Place scalar values in the hashtable directly\r\n // otherwise break comma separated ones into Vectors.\r\n // If they can be, items are inserted as Doubles, failing\r\n // that, as Strings.\r\n // int comma = value.indexOf(\",\");\r\n // if (comma == -1) {\r\n // try {\r\n // retval.put(key, new Double(value));\r\n // } catch (NumberFormatException nfe) {\r\n retval.put(key, value);\r\n // } // endtry\r\n // } else {\r\n // Vector<Comparable> v = new Vector<Comparable>();\r\n // StringTokenizer values = new StringTokenizer(value, \",\");\r\n // while (values.hasMoreTokens()) {\r\n // String s = values.nextToken();\r\n // try {\r\n // v.addElement(new Double(s));\r\n // } catch (NumberFormatException nfe) {\r\n // v.addElement(s.trim());\r\n // } // endtry\r\n // } // endwhile\r\n // retval.put(key, v);\r\n // } // endif\r\n } // endif\r\n pos += next;\r\n } // endwhile\r\n\r\n return retval;\r\n }", "private void fillMap(String[] querys) {\r\n\r\n\t\tLOG.info(\"fillMap\");\r\n\r\n\t\tquerysMap = new HashMap<String, String>();\r\n\t\t\r\n\t\tfor (String query : querys) {\r\n\t\t\t\r\n\t\t\tString[] temp = getStringArray(query, START_QUERY_PATTERN);\r\n\t\t\t\r\n\t\t\tif (temp != null && temp.length == 2) {\r\n\t\t\t\t\r\n\t\t\t\ttemp[0] = temp[0].replaceAll(\"\\\\P{Alnum}\", \"\");\r\n\t\t\t\tquerysMap.put(temp[0], temp[1].trim());\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tLOG.error(\"El array es nulo o la longitud no es la esperada\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tLOG.info(\"END fillMap\");\r\n\r\n\t}", "Map<String, String> asMap();", "public static LinkedHashMap<String, Object> arrayToMap(Object[] dataArray) {\n LinkedHashMap<String, Object> map = new LinkedHashMap<String, Object>();\n if (0 != dataArray.length % 2) throw new UtilsException(\"Invalid odd elements count\");\n for (int i = 0; i < dataArray.length; i += 2) {\n Object objKey = dataArray[i];\n if (!(objKey instanceof String)) throw new UtilsException(\"Invalid key: [\" + objKey + \"]\");\n map.put((String) objKey, dataArray[i + 1]);\n }\n return map;\n }", "public static HashMap<String, String> createVariableMap(String vvlist[]) {\n \t\tif (vvlist.length%2 != 0)\n \t\t\treturn null;\n \t\t\n \t\tHashMap<String, String> variableMap = new HashMap<String, String>();\n \t\tString variable;\n \t\tString value;\n \t\tfor (int i = 0; i < vvlist.length; i += 2) {\n \t\t\tvariable = (String)vvlist[i];\n \t\t\tvalue = vvlist[i + 1];\n \t\t\t\n \t\t\tvariableMap.put(variable, value);\n \t\t}\n \t\t\n \t\treturn variableMap;\n \t}", "HashMap<Character, Integer> countCharacter(char[] array) {\n\t\tHashMap<Character, Integer> hm = new HashMap<Character, Integer>();\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (hm.containsKey(array[i]))\n\t\t\t\thm.put(array[i], hm.get(array[i]) + 1);\n\n\t\t\telse\n\t\t\t\thm.put(array[i], 1);\n\t\t}\n\t\treturn hm;\n\n\t}", "public HashMap<String, String> convertToHashMapOfStrings()\n {\n HashMap<String, String> hashMapOfStrings = new HashMap<String, String>();\n for (DataPreferenceEnum key : preferencesHashMap.keySet())\n {\n String valueString = preferencesHashMap.get(key).toString();\n hashMapOfStrings.put(key.toString(), valueString);\n }\n\n return (hashMapOfStrings);\n }", "public static String[][] groupAnagrams(String[] strs) {\n\t\tif (strs.length == 0) return new String[][] {};\n\t\tMap<String, List<String>> map = new HashMap<String, List<String>>();\n\t\tfor (String s : strs) {\n\t\t\tchar[] ch = s.toCharArray();\n\t\t\tArrays.sort(ch);\n\t\t\tString key = new String(ch);\n\t\t\tif(!map.containsKey(key)) {\n\t\t\t\tList<String> list = new ArrayList<>();\n\t\t\t\tlist.add(s);\n\t\t\t\tmap.put(key, list);\n\t\t\t}else\n\t\t\t\tmap.get(key).add(s);\n\t\t}\n//\t\tprint(map);\n\t\treturn convertMapToArray2D(map);\n }", "public static void sanitizeAndSplit(ArrayList<String> myChunk){\n\t\t//Variables\n\t\tString myStringArray[] = {};\n\n\t\ttry {\n\t\t\t//step through string array and put key value pairs into a string\n\t\t\tfor(String temp : myChunk){\n\t\t\t\t//Split the key and values as put into hashMap\n\t\t\t\tif(temp != null) {\n\t\t\t\t\tmyStringArray = temp.split(\"\\\\s+\");\n\t\t\t\t\tWord word = hm.get(myStringArray[0]);\n\t\t\t\t\tif(word == null) {\n\t\t\t\t\t\thm.put(myStringArray[0], new Word(myStringArray[0], Integer.parseInt(myStringArray[1])));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\thm.get(myStringArray[0]).addToCount(Integer.parseInt(myStringArray[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Map<String, String> decode(String s) {\n String[] keyValuePairs = s.split(\"&\");\n\n //creating tab 2D tab for separating key from value\n String[][] keyAndValue = new String[keyValuePairs.length][2];\n\n //iterating through the tab to split \"key=value\" pairs into 2D tab as [[key, value], [key, value]]\n for (int i = 0; i <= keyValuePairs.length - 1; i++) {\n //splitting \"key=value\" pairs into 2D tab as [[key, value], [key, value]]\n keyAndValue[i] = keyValuePairs[i].split(\"=\");\n //adding [[key, value], [key, value]] to the map\n for (int j = 0; j <= keyAndValue.length - 1; j++) {\n keyValuesMap.put(keyAndValue[i][0], keyAndValue[i][1]);\n }\n }\n return keyValuesMap;\n }", "public Map<String, Integer> wordCount(String[] strings) {\n Map <String, Integer> map = new HashMap();\n int counter = 1;\n for (String s: strings){\n if (map.containsKey(s)){\n counter = map.get(s);\n map.put(s, counter + 1);\n }else{\n counter = 1;\n map.put(s, counter);\n }\n }\n return map;\n}", "private Map createSpecimenArrayMap(SpecimenArrayForm specimenArrayForm)\r\n\t{\r\n\t\tfinal Map arrayContentMap = new HashMap();\r\n\t\tString value = \"\";\r\n\t\tfinal int rowCount = specimenArrayForm.getOneDimensionCapacity();\r\n\t\tfinal int columnCount = specimenArrayForm.getTwoDimensionCapacity();\r\n\r\n\t\tfor (int i = 0; i < rowCount; i++)\r\n\t\t{\r\n\t\t\tfor (int j = 0; j < columnCount; j++)\r\n\t\t\t{\r\n\t\t\t\tfor (int k = 0; k < AppletConstants.ARRAY_CONTENT_ATTRIBUTE_NAMES.length; k++)\r\n\t\t\t\t{\r\n\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\tif (k == AppletConstants.ARRAY_CONTENT_ATTR_POS_DIM_ONE_INDEX)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tvalue = String.valueOf(i + 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (k == AppletConstants.ARRAY_CONTENT_ATTR_POS_DIM_TWO_INDEX)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tvalue = String.valueOf(j + 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarrayContentMap.put(SpecimenArrayAppletUtil\r\n\t\t\t\t\t\t\t.getArrayMapKey(i, j, columnCount, k), value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn arrayContentMap;\r\n\t}", "private static HashMap<String, String> parseArgs(String... args)\n {\n final HashMap<String, String> map = new HashMap();\n //TODO convert args to map\n String lastArg = null;\n for (String string : args)\n {\n //Store new arg\n if (string.startsWith(\"-\"))\n {\n lastArg = string.trim().replaceFirst(\"-\", \"\");\n if (lastArg.contains(\"=\"))\n {\n String[] split = lastArg.split(\"=\");\n lastArg = split[0];\n map.put(lastArg, split[1].replace(\"\\\\\\\"\", \"\"));\n continue;\n }\n map.put(lastArg, null);\n }\n else\n {\n //Store arg value, or append value\n String v = map.get(lastArg);\n if (v == null)\n {\n v = string;\n }\n else\n {\n v += \",\" + string;\n }\n map.put(lastArg, v);\n }\n }\n return map;\n }", "Map <String, List <String> > parse (List <String> keys, List <String> lines);", "public static void main(String[] args) {\n\t\tArrayList<String> givenArray = new ArrayList<String>();\n\t\tArrayList<String> listOfNamesStartingWithA = new ArrayList<String>();\n\t\tArrayList<String> listOfNamesStartingWithG = new ArrayList<String>();\n\t\tgivenArray.add(\"apple\");\n\t\tgivenArray.add(\"appleinc\");\n\t\tgivenArray.add(\"applemac\");\n\t\tgivenArray.add(\"google\");\n\t\t\n\t\tHashMap<String, ArrayList> map = new HashMap<String, ArrayList>();\n\t\tmap.clone();\n\t\tIterator<String> itr = givenArray.iterator();\n\t\t\n\t\twhile(itr.hasNext()) {\n\t\t\tString arrayListOb = itr.next();\n\n\t\t\tString key =arrayListOb.substring(0, 1);\n\t\t\tif(key.startsWith(\"a\")) {\n\t\t\t\tlistOfNamesStartingWithA.add(arrayListOb);\t\n\t\t\t\tmap.put(key, listOfNamesStartingWithA);\t\n\t\t\t}\n\t\t\tif(key.startsWith(\"g\")) {\n\t\t\t\tlistOfNamesStartingWithG.add(arrayListOb);\n\t\t\t\tmap.put(key, listOfNamesStartingWithG);\n\t\t\t}\t\t\t\t\n\t\t\tSystem.out.println(key);\n\t\t\tSystem.out.println(map.get(key));\n\t\t}\n\t\tSystem.out.println(map.size());\n\t\t//System.out.println(map.get(\"g\"));\n\t\t//System.out.println(map.get(\"a\"));\n\t\t/*for(Map.Entry<String,ArrayList> entry: map.entrySet())\n\t\t{\n\t\t\tSystem.out.println(map.get(\"a\"));\n\t\t}*/\n\t}", "private Map getAsMap(BuildStatus bs) {\n String lines[] = bs.toExternalForm().split(\"\\n\");\n Map m = new HashMap();\n for (int i = 0; i < lines.length; i++) {\n String line = lines[i];\n String parts[] = line.split(\"=\");\n String name = parts[0];\n String value = parts[1];\n m.put(name + \"=\", value);\n }\n return m;\n }", "public static void main(String[] args) {\n\t\tMap<String, List<String>> map = new HashMap<>();\n\t\tList<String> list = new ArrayList<>();\n\t\tmap.put(\"key1\", list);\n\t\tmap.get(\"key1\").add(\"value1\");\n\t\tmap.get(\"key1\").add(\"value2\");\n\t\t\n\n\t\t//(map.get(\"key1\").get(0)).isEqualTo(\"value1\");\n\t\t//(map.get(\"key1\").get(1)).isEqualTo(\"value2\");\n\t\t\n\t\tMap<String, String> map1 = Stream.of(new String[][] {\n\t\t\t { \"Hello\", \"World\" }, \n\t\t\t { \"John\", \"Doe\" }, \n\t\t\t}).collect(Collectors.toMap(data -> data[0], data -> data[1])); \n\t\t//Notice here the data type of key and value of the Map is same.\n\t\t//In order to make it more generic letís take the array of Objects and perform the same operation:\n\t\tMap<String, Integer> map2 = Stream.of(new Object[][] { \n\t\t { \"data1\", 1 }, \n\t\t { \"data2\", 2 }, \n\t\t}).collect(Collectors.toMap(data -> (String) data[0], data -> (Integer) data[1]));\n\t\t//Here, we create a map of the key as String and value as an Integer.\n\t}", "public static Map<String, String> strToMap(String str) {\n return strToMap(str, \"|\", false);\n }", "public Map<String, Integer> wordLen(String[] str) {\n\t\t\n\t\tMap<String, Integer> map = new HashMap<String, Integer>();\n\t\t\n\t\tfor (int i = 0; i < str.length; i++) {\n\t\t\tmap.put(str[i], str[i].length());\n\t\t}\n\t\t\n\t\treturn map;\n\t\t\n\t}", "HashMap<String,Integer> mapCode(String[] splitwords){\n\t\t\tHashMap<String,Integer> wordsOfCode= new HashMap<String,Integer>();\n\t\t\tLovinsStemmer nonSuffixes=new LovinsStemmer();\n\t\t\t//PorterStemmer nonSuffixes=new PorterStemmer();\n\t\t\tint num=0;\n\t\t\tfor(int i=0; i<splitwords.length;i++) {\n\t\t\t\tString temp=nonSuffixes.stem(splitwords[i]);\n\t\t\t\tif(!totalWords.containsKey(temp)) {\n\t\t\t\t\ttotalWords.put(temp, num);\n\t\t\t\t\t\n\t\t\t\t\twordsOfCode.put(temp,num);\n\t\t\t\t\tnum++;\n\t\t\t\t}else if(!wordsOfCode.containsKey(temp)) {\n\t\t\t\t\twordsOfCode.put(temp,totalWords.get(temp));\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn wordsOfCode;\n\t\t\t\n\t\t}", "public static LinkedHashMap<String, Object> toMap(Object... elems) {\n return arrayToMap(elems);\n }", "public static void hashMapEx() {\n\t\tString str = \"habiletechE\";\n\t\tstr = str.toLowerCase();\n\t\tchar[] ch = str.toCharArray();\n\t\tint size = ch.length;\n\n\t\tHashMap<Character, Integer> hmap = new HashMap<Character, Integer>();\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (!hmap.containsKey(ch[i]))\n\t\t\t\thmap.put(ch[i], 1);\n\t\t\telse {\n\t\t\t\tint val = hmap.get(ch[i]) + 1;\n\t\t\t\thmap.put(ch[i], val);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Duplicate Charaacters :\");\n\t\tfor (Map.Entry<Character, Integer> hm : hmap.entrySet()) {\n\t\t\tif (hm.getValue() > 1)\n\t\t\t\tSystem.out.println(hm.getKey() + \" \" + hm.getValue());\n\t\t}\n\t}", "public HashMap<String, Integer> getHashMap(){\n\t\tHashMap <String, Integer> hm1 = new HashMap <String, Integer>();\n\t\t//get each line of the book and store it as an arrayList\n\t\twords = wordData.getLines();\n\t \n\t\tfor(int i =0; i<words.size(); i++){\n\t\t\t \n\t\t\tString[] aLine = words.get(i).split(\" \");\n\t\t\t\n\t\t\tfor(int j = 0; j<aLine.length; j++){\n\t\t\t\t\n\t\t\t\t// convert all upper case to lower case & remove all non-alphabetic symbols;\n\t\t\t\t\t\n\t\t\t\tsparsedWords.add(aLine[j].toLowerCase().replaceAll(\"[^\\\\w]\", \"\"));\n\t\t\t}\n\t\t}\n\t\t//put in key and value in hashmap\n\t\tfor(int key = 0; key < sparsedWords.size(); key++){\n\t\t\t\n\t\t\tif (hm1.containsKey(sparsedWords.get(key))){\n\t\t\t\tint count = hm1.get(sparsedWords.get(key));\n\t\t\t\thm1.put(sparsedWords.get(key), count + 1);\n\t\t\t}else{\n\t\t\t\thm1.put(sparsedWords.get(key), 1);\n\t\t\t}\n\t\t}\n\t\treturn hm1;\n\t\t \t\n\t\t}", "public static Map<String, String> queryToMap(String query){\n Map<String, String> result = new HashMap<String, String>();\n for (String param : query.split(\"&\")) {\n String pair[] = param.split(\"=\");\n if (pair.length>1) {\n result.put(pair[0], pair[1]);\n }else{\n result.put(pair[0], \"\");\n }\n }\n return result;\n }", "private void toMap(String cycle) {\n for (int i = 0; i < cycle.length() - 1; i++) {\n Integer input = _alphabet.toInt(cycle.charAt(i));\n Integer output = _alphabet.toInt(cycle.charAt(i + 1));\n _map.put(input, output);\n }\n Integer i = _alphabet.toInt(cycle.charAt(cycle.length() - 1));\n Integer o = _alphabet.toInt(cycle.charAt(0));\n _map.put(i, o);\n }", "private Map<String, String> toMap(final Attributes atts) {\r\n\t\tfinal Map<String, String> values = Maps.newLinkedHashMap();\r\n\t\t\r\n\t\tfor (int index = 0; index < atts.getLength(); index++) {\r\n\t\t\tvalues.put(atts.getLocalName(index), atts.getValue(index));\r\n\t\t}\r\n\t\t\r\n\t\treturn values;\r\n\t}", "private static Map<String, String> getArgMap(String[] args) {\n \t\r\n Map<String,String> argMap = new HashMap<String,String>();\r\n for (int i = 0; i < args.length; i++) {\r\n \tlogger.info(\"arg[\"+i+\"]=\"+args[i]);\r\n String[] argArray = args[i].split(\"=\"); //$NON-NLS-1$\r\n\r\n if (argArray.length == 2) {\r\n argMap.put(argArray[0], argArray[1]);\r\n }\r\n }\r\n return argMap;\r\n }", "public static HashMap<Integer, String> createDictionary(HashSet<Integer> byteKey, ArrayList<String> bitsValue){\n HashMap<Integer, String> dictionary = new HashMap<>();\n ArrayList <Integer> bytesKey = new ArrayList<>(byteKey);\n for (int i = 0; i < bytesKey.size(); i++) {\n dictionary.put(bytesKey.get(i), bitsValue.get(i));\n }\n return dictionary;\n }", "public void sortChars(String[] array){\n HashMap<String, LinkedList<String>> list = new HashMap<String, LinkedList<String>>();\n\n for(String s: array){\n String key = sortChars(s);\n if(!list.containsKey(key)){\n list.put(key, new LinkedList<String>());\n }\n LinkedList<String> anagrams = list.get(key);\n anagrams.push(s);\n }\n\n int index = 0;\n for(String key: list.keySet()){\n LinkedList<String> anagrams = list.get(key);\n for(String val: anagrams){\n array[index] = val;\n index++;\n }\n }\n }", "public static Map<String, String> convertTomap(Stream<String> stream, String delimiter) {\n logger.info(\"converting stream of strings to Map using delimiter : \" + delimiter);\n return stream.filter(current_line -> current_line.length() > 0)\n .map(cl -> cl.split(delimiter))\n .filter(cl -> cl.length > 1)\n .collect(Collectors.toMap(cl -> cl[0].trim(), cl -> cl[1].trim(), (val1, val2) -> val2.trim()));\n }", "public static Map<String,String> StringtoMap(String str){\n\t\tMap<String,String> map = new LinkedHashMap<String,String>();\n\n\t\ttry {\n\t\t\tDocument document = DocumentHelper.parseText(str);\n\t\t\tElement root = document.getRootElement();\n\t\t\tList<Element> elementList = root.elements();\n\t\t\tfor(Element e : elementList){\n\t\t\t\tmap.put(e.getName(), e.getText());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn map;\n\t}", "private String[] toArray(String str) { String arr[] = new String[1]; arr[0] = str; return arr; }", "public static Map mapFrom(Object[][] keyValueSets) {\r\n\t\tMap map = new HashMap(keyValueSets.length);\r\n\t\tfor (int i=0; i<keyValueSets.length; i++) {\r\n\t\t\tmap.put(keyValueSets[i][0], keyValueSets[i][1]);\r\n\t\t}\r\n\t\treturn map;\r\n\t}", "private static void initializeMap() {\n\t\tmap = new HashMap<String, MimeTransferEncoding>();\n\t\tfor (MimeTransferEncoding mte : MimeTransferEncoding.values()) {\n\t\t\tmap.put(mte.string, mte);\n\t\t}\n\t}", "public Map<String, Integer> wordCount(String[] strings) {\n\n\n Map<String, Integer> mojaMapa = new HashMap<String, Integer>();\n\n for (String element : strings) {\n if (mojaMapa.containsKey(element)) {\n Integer iloscWystapienElementu = mojaMapa.get(element);\n mojaMapa.put(element, iloscWystapienElementu + 1);\n } else {\n mojaMapa.put(element, 1);\n }\n\n\n }\n return mojaMapa;\n }", "public HashMap<String, String> convertToString() throws IOException\n\t{\n\t HashMap<String, String> map = new HashMap<String, String>();\n\n\t String line;\n\t BufferedReader reader;\n\t String multiple_line=null;\n\t\ttry {\n\t\t\treader = new BufferedReader(new FileReader(filePath));\n\t\t\t\n\t\t\twhile ((line = reader.readLine()) != null)\n\t\t {\n\t\t String[] parts = (line.replaceAll(\"\\\"\", \"\").split(\"=\", 2)); //tolto replaceAll\n\t\t if (parts.length >= 2)\n\t\t {\n\t\t String key = parts[0];\n\t\t multiple_line=key;\n\t\t String value = parts[1];\n\t\t map.put(key, value);\n\t\t } else {\n\t\t \n\t\t String line2=map.get(multiple_line);\n\t\t map.put(multiple_line, line2+\"\\n\"+line);\n\t\t }\n\t\t }\n\t\t\t\n\t\t\t//for (String key : map.keySet())\n\t\t //{\n\t\t // System.out.println(key + \":\" + map.get(key));\n\t\t // }\n\t\t reader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t \n\t \n\t return map;\n\t}", "private HashMap parseMap(String localData){\n int localPointer = 0;\n HashMap temp = new HashMap();\n char c = localData.charAt(localPointer++);\n while (c != '}'){\n String entry = \"\";\n entry_loop :\n while (c != '}'){\n switch (c){\n case ',' :\n c = localData.charAt(localPointer++);\n break entry_loop;\n case '{' :\n String tempEntry = this.getFull(localData.substring(localPointer),0);\n entry += tempEntry;\n localPointer += tempEntry.length();\n break ;\n case '[' :\n String tempEntry2 = this.getFull(localData.substring(localPointer),1);\n entry += tempEntry2;\n localPointer += tempEntry2.length();\n break ;\n default :\n entry += c;\n break ;\n }\n c = localData.charAt(localPointer++);\n }\n entry = entry.trim();\n String[] entryArray = entry.split(\":\",2);\n String key = entryArray[0].trim();\n String value = entryArray[1].trim();\n Object keyObj = null;\n Object valueObj = null;\n\n switch (this.getDataType(key.trim())){\n case String:\n keyObj = key.trim().replace(\"\\\"\",\"\");\n break ;\n case Integer:\n keyObj = Long.parseLong(key.trim());\n break ;\n case Float:\n keyObj = Float.parseFloat(key.trim());\n break ;\n case Boolean:\n keyObj = Boolean.parseBoolean(key.trim());\n break ;\n case Map:\n keyObj = this.parseMap(key.trim());\n break ;\n case List:\n keyObj = this.parseList(key.trim());\n }\n\n switch (this.getDataType(value.trim())){\n case String:\n valueObj = value.trim().replace(\"\\\"\",\"\");\n break ;\n case Integer:\n valueObj = Long.parseLong(value.trim());\n break ;\n case Float:\n valueObj = Float.parseFloat(value.trim());\n break ;\n case Boolean:\n valueObj = Boolean.parseBoolean(value.trim());\n break ;\n case Map:\n valueObj = this.parseMap(value.trim());\n break ;\n case List:\n valueObj = this.parseList(value.trim());\n }\n temp.put(keyObj,valueObj);\n }\n return temp;\n }", "String[][] packData();", "public static Map<String, String> queryToMap(String query) {\n\t\tMap<String, String> result = new HashMap<String, String>();\n\t\tfor (String param : query.split(\"&\")) {\n\t\t\tString pair[] = param.split(\"=\");\n\t\t\tif (pair.length > 1) {\n\t\t\t\tresult.put(pair[0], pair[1]);\n\t\t\t} else {\n\t\t\t\tresult.put(pair[0], \"\");\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static Map<String, String> queryToMap(String query) {\n\t\tMap<String, String> result = new HashMap<String, String>();\n\t\tfor (String param : query.split(\"&\")) {\n\t\t\tString pair[] = param.split(\"=\");\n\t\t\tif (pair.length > 1) {\n\t\t\t\tresult.put(pair[0], pair[1]);\n\t\t\t} else {\n\t\t\t\tresult.put(pair[0], \"\");\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static <T> Set<T> convertArrayToSet(T array[]) \r\n { \r\n \r\n // Create the Set by passing the Array \r\n // as parameter in the constructor \r\n Set<T> set = new HashSet<>(Arrays.asList(array)); \r\n \r\n // Return the converted Set \r\n return set; \r\n }", "public static Map<String, IpAddress> convert(List<IpAddress> ipAddressList) {\n Map<String, IpAddress> ipAddressMap = new HashMap<String, IpAddress>();\n\n for (IpAddress ipAddress : ipAddressList) {\n ipAddressMap.put(ipAddress.getUuid(), ipAddress);\n }\n\n return ipAddressMap;\n }", "public static Map<String, String> getQueryMap(String query) throws UnsupportedEncodingException\n {\n String[] params = query.split(\"&\");\n Map<String, String> map = new HashMap<String, String>(params.length);\n for (String param : params)\n {\n String[] keyValue = param.split(\"=\");\n map.put(keyValue[0], URLDecoder.decode(keyValue[1], \"UTF-8\"));\n }\n return map;\n }", "public static Map<String, String> strToMap(String str, boolean trim) {\n return strToMap(str, \"|\", trim);\n }", "private static Map<String, String> generateDataMap(String dataString) {\n dataString = strManager.removeString(dataString, \" \");\n dataString = strManager.removeString(dataString, \"\\\\+\");\n String[] dataSet = dataString.split(\",\", -1);\n\n Map<String, String> dataMap = new HashMap<String, String>();\n\n for (int i = 2; i < dataSet.length; i++) {\n String[] d = dataSet[i].split(\"=\", -1);\n String transducer = d[0];\n String value = strManager.removeUnits(d[1]);\n\n dataMap.put(transducerNames.get(transducer), value);\n }\n dataMap = addLocation(dataMap);\n\n return dataMap;\n }", "public final Map<String, Integer> mo33708h(List<String> list) {\n return (Map) m968r(new C2164bs(this, list));\n }", "public ArrayList<String> anagrams(String[] strs) {\n HashMap<String, ArrayList<String>> rec=new HashMap<String,ArrayList<String>>();\n ArrayList<String> ans=new ArrayList<String>();\n if(strs.length==0)return ans;\n for(int i=0;i<strs.length;i++){\n char[] key=strs[i].toCharArray();\n Arrays.sort(key);\n String newkey=new String(key);\n if(rec.containsKey(newkey)){\n rec.get(newkey).add(strs[i]);\n }\n else{\n ArrayList<String> ad=new ArrayList<String>();\n ad.add(strs[i]);\n rec.put(newkey,ad);\n }\n }\n for(ArrayList<String> value:rec.values()){\n if(value.size()>1)ans.addAll(value);\n }\n return ans;\n }", "public static Map<String, String> strToMap(String str, String delim, boolean trim) {\n return strToMap(str, delim, trim, null);\n\n }", "private static Map<String, String> createMapFromList(final List<String> all) {\n\t\tfinal Map<String, String> map = new ConcurrentHashMap<>();\n\n\t\tfor (final String documentElement : all) {\n\t\t\tif (documentElement != null) {\n\t\t\t\tmap.put(documentElement, documentElement);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}", "public static HashMap<String, ArrayList<String>> parseKeyValueList(String keySpliter, String strToParse) {\r\n\t\treturn parseKeyValueList (keySpliter, null, \"\\n\", strToParse);\r\n\t}", "private static List<List<String>> groupAnagrams(String[] strs) {\n List<List<String>> result = new ArrayList<List<String>>();\n\n HashMap<Integer, ArrayList<String>> map = new HashMap<Integer, ArrayList<String>>();\n for(String str: strs){\n int key = 0;\n for(int i=0; i<str.length(); i++){\n key = key + (str.charAt(i)-'a');\n }\n\n if(map.containsKey(key)){\n map.get(key).add(str);\n }else{\n ArrayList<String> al = new ArrayList<String>();\n al.add(str);\n map.put(key, al);\n }\n }\n\n result.addAll(map.values());\n\n return result;\n }", "public ArrayList<State> stringArraytoStateArray (ArrayList<String> pArray)\r\n\t{\r\n\t\tArrayList<State> sArray = new ArrayList<State>();\r\n\t\tfor (Iterator<String> iterator = pArray.iterator(); iterator.hasNext();) \r\n\t\t{\r\n\t\t\tString string1 = (String) iterator.next();\r\n\t\t\tState sTemp = new State(string1);\r\n\t\t\tsTemp.toString();\r\n\t\t\tsArray.add(sTemp);\r\n\t\t}\r\n\t\treturn sArray;\r\n\t}", "public static HashMap<String, ArrayList<String>> parseKeyValueList(String keySpliter,String valueSpliter, String strToParse) {\r\n\t\treturn parseKeyValueList (keySpliter, valueSpliter, \"\\n\", strToParse);\r\n\t}", "public static List<List<String>> groupAnagrams(String[] strs) {\n String[] wordHash = new String[strs.length];\n for (int i = 0; i < strs.length; i++) { // O(n)\n wordHash[i] = hashWord(strs[i]); // O(c + 26)\n }\n HashMap<String,List<String>> map = new HashMap<>();\n for (int i = 0; i < strs.length; i++) {\n List<String> words = map.getOrDefault(wordHash[i], new ArrayList<String>());\n words.add(strs[i]);\n map.put(wordHash[i], words);\n }\n List<List<String>> out = new ArrayList<>();\n for (String k : map.keySet()) {\n out.add(map.get(k));\n }\n return out;\n }", "public List<List<String>> groupAnagrams(String[] strs) {\n \n int len = strs.length;\n Hashtable<String, List<String>> anagrams = new Hashtable<>();\n \n for(int i=0; i<len; i++){\n char[] sorted = strs[i].toCharArray(); \n Arrays.sort(sorted);\n String key = String.valueOf(sorted);\n List<String> temp = new ArrayList<>();\n \n if(anagrams.containsKey(key)){\n temp = anagrams.get(key);\n \n }\n temp.add(strs[i]);\n anagrams.put(key, temp);\n }\n \n \n List<List<String>> answer = new ArrayList<>();\n \n for(List<String> item: anagrams.values() ){\n answer.add(item);\n }\n \n return answer;\n \n }", "public static int[][] fillMap(List<String> lines){\n int[][] map=new int[lines.size()][lines.get(0).length()];\n //find values of each spot\n for(int i=0;i<lines.size();i++){\n for(int j=0;j<lines.get(i).length();j++){\n char c=lines.get(i).charAt(j);\n switch (c) {\n case '_': //empty\n map[i][j]=0;\n break;\n case 'B': //Blue\n map[i][j]=1;\n break;\n case 'A': //Cyan\n map[i][j]=2;\n break;\n case 'W': //white\n map[i][j]=3;\n break;\n case 'R': //red\n map[i][j]=4;\n break;\n case 'P': //pink\n map[i][j]=5;\n break;\n case 'D': //magenta\n map[i][j]=6;\n break;\n case 'O': //orange\n map[i][j]=7;\n break;\n case 'G': //Green\n map[i][j]=8;\n break;\n case 'Y': //Yellow\n map[i][j]=9;\n break;\n case 'K': //Seafoam\n map[i][j]=10;\n break;\n case 'Q': //purple\n map[i][j]=11;\n break;\n default:\n map[i][j]=12; //shouldn't happen\n break;\n }\n }\n }\n return map;\n }", "public void createIDMap()\n {\n IDMap = new HashMap<>();\n idFile.open(\"idpassword.txt\");\n String line = idFile.getNextLine();\n\n\n\n while(line!=null) {\n String[] fields = line.split(\",\");\n IDMap.put(fields[0], fields[1]);\n\n line = idFile.getNextLine();\n\n }\n\n }", "public Map<String, String> toSingleValueMap()\r\n/* 367: */ {\r\n/* 368:538 */ LinkedHashMap<String, String> singleValueMap = new LinkedHashMap(this.headers.size());\r\n/* 369:539 */ for (Map.Entry<String, List<String>> entry : this.headers.entrySet()) {\r\n/* 370:540 */ singleValueMap.put((String)entry.getKey(), (String)((List)entry.getValue()).get(0));\r\n/* 371: */ }\r\n/* 372:542 */ return singleValueMap;\r\n/* 373: */ }", "private Map<String, String> extractPropertyValues(String[] paramArray,\n\t\t\tString[] connPropertyNames) {\n\n\t\tMap<String, String> connPropValues = new HashMap<String, String>();\n\t\tString[] temp = null;\n\t\tString userPassedValue = null;\n\n\t\tfor (int i = 0; i < paramArray.length; i++) {\n\t\t\ttemp = paramArray[i].split(\"=\");\n\t\t\tfor (int j = 0; j < connPropertyNames.length; j++) {\n\t\t\t\tif (temp[0].equalsIgnoreCase(connPropertyNames[j])) {\n\t\t\t\t\tif (temp.length < 2) {\n\t\t\t\t\t\tuserPassedValue = \"\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tuserPassedValue = temp[1];\n\t\t\t\t\t}\n\t\t\t\t\tconnPropValues.put(connPropertyNames[j], userPassedValue);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn connPropValues;\n\t}", "public static HashMap<String,String[][]> build(String[][] data){\r\n\t\tString key;\t\t\t\t\t\t\t\t\t\t\t//One of the keys\r\n\t\tString[][] value;\t\t\t\t\t\t\t\t\t//The corresponding value\r\n\t\tString[] valueElement0, valueElement1;\t\t\t\t//The two arrays in the value\r\n\t\tInteger step;\t\t\t\t\t\t\t\t\t\t//For keeping track of the position in the array\r\n\t\tString warning;\t\t\t\t\t\t\t\t\t\t//A message to let the user know there might be a problem\r\n\t HashMap<String, String[][]> result;\r\n\t \r\n\t if ((data.length % 3) != 0) {\r\n\t \twarning = \r\n\t \t\t\t\"WARNING in HashMapBuilder2.build: Bug detected. Contact Ken Samuel.\";\r\n\t \tSystem.err.println(warning);\r\n\t \tGlobal.unableToRespondMessage.add(warning);\r\n\t }\r\n\t \r\n\t result = new HashMap<String, String[][]>();\t\t\t//Initialize\r\n\t key = null;\t\t\t\t\t\t\t\t\t\t\t//Initialize\r\n\t valueElement0 = new String[0];\t\t\t\t\t\t//Initialize\r\n\t valueElement1 = new String[0];\t\t\t\t\t\t//Initialize\r\n\t step = -1;\t\t\t\t\t\t\t\t\t\t\t//Initialize\r\n\t for(String[] array : data){\r\n\t step++;\r\n\t switch(step % 3){\r\n\t case 0: \r\n\t if(array[0] == null) {\r\n\t \twarning = \"WARNING in HashMapBuilder2.build: Bug detected. Contact Ken Samuel.\";\r\n\t \t \tSystem.err.println(warning);\r\n\t \t \tGlobal.unableToRespondMessage.add(warning);\r\n\t }\r\n\t key = array[0];\r\n\t continue;\r\n\t case 1:\r\n\t \tvalueElement0 = array;\r\n\t continue;\r\n\t case 2:\r\n\t \tvalueElement1 = array;\r\n\t\t \tvalue = new String[2][Math.max(valueElement0.length,valueElement1.length)];\r\n\t\t \tvalue[0] = valueElement0;\r\n\t\t \tvalue[1] = valueElement1;\r\n\t\t \tresult.put(key,value);\r\n\t break;\r\n\t default:\t\t\t//This should never happen\r\n\t \twarning = \"WARNING in HashMapBuilder2.build: Bug detected. Contact Ken Samuel.\";\r\n \t \tSystem.err.println(warning);\r\n \t \tGlobal.unableToRespondMessage.add(warning);\r\n\t }\r\n\t }\r\n\t return result;\r\n\t}", "public static Map<String, String> strToMap(String str, String delim, boolean trim, String pairsSeparator) {\n if (UtilValidate.isEmpty(str)) {\n return null;\n }\n Map<String, String> decodedMap = new HashMap<>();\n List<String> elements = split(str, delim);\n pairsSeparator = pairsSeparator == null ? \"=\" : pairsSeparator;\n\n for (String s: elements) {\n\n List<String> e = split(s, pairsSeparator);\n if (e.size() != 2) {\n continue;\n }\n String name = e.get(0);\n String value = e.get(1);\n if (trim) {\n if (name != null) {\n name = name.trim();\n }\n if (value != null) {\n value = value.trim();\n }\n }\n\n try {\n if (value != null && name != null) {\n decodedMap.put(URLDecoder.decode(name, \"UTF-8\"), URLDecoder.decode(value, \"UTF-8\"));\n }\n } catch (UnsupportedEncodingException e1) {\n Debug.logError(e1, MODULE);\n }\n }\n return decodedMap;\n }", "@Override\n public Map<String, List<PairModel>> getPairValues(String[] keyArr) {\n return null;\n }", "public static HashMap<String, CNV[]> splitByChromsome(CNV[] cnvs){\n\t\tArrayList<CNV> al = new ArrayList<CNV>();\n\t\tHashMap<String, CNV[]> map = new HashMap<String, CNV[]>();\n\t\tString chromosome = cnvs[0].getGrGraph().getChromosome();\n\t\t//for each GenomicRegion\n\t\tfor (int i=0; i< cnvs.length; i++){\n\t\t\t//same chromosome?\n\t\t\tif (cnvs[i].getGrGraph().getChromosome().equals(chromosome)){\n\t\t\t\tal.add(cnvs[i]);\n\t\t\t}\n\t\t\t//different chromosome!\n\t\t\telse {\n\t\t\t\t//set new chrom in map\n\t\t\t\tCNV[] regions = new CNV[al.size()];\n\t\t\t\tal.toArray(regions);\n\t\t\t\tmap.put(chromosome, regions);\n\t\t\t\t//reset params\n\t\t\t\tal = new ArrayList();\n\t\t\t\tal.add(cnvs[i]);\n\t\t\t\tchromosome = cnvs[i].getGrGraph().getChromosome();\n\t\t\t}\n\t\t}\n\t\t//add last\n\t\tCNV[] regions = new CNV[al.size()];\n\t\tal.toArray(regions);\n\t\tmap.put(chromosome, regions);\n\t\treturn map;\n\t}", "private Map<String, String> m15124a(Map<String, String> map) {\n String str;\n String str2;\n HashMap hashMap = new HashMap();\n if (map != null) {\n for (Entry entry : map.entrySet()) {\n Object key = entry.getKey();\n Object value = entry.getValue();\n if (!(key instanceof String) || !(value instanceof String)) {\n C7262l b = this.f13489a.mo23049b();\n StringBuilder sb = new StringBuilder();\n sb.append(\"Unexpected class type in trackEvent(); all keys and values passed as parameters must be String. Encountered \");\n sb.append(key.getClass().getCanonicalName());\n sb.append(\"/\");\n sb.append(value.getClass().getCanonicalName());\n sb.append(\"; will use toString() value instead, which may be unexpected...\");\n b.mo22913a(\"EventServiceImpl\", sb.toString());\n str = key.toString();\n str2 = value.toString();\n } else {\n str = (String) key;\n str2 = (String) value;\n }\n hashMap.put(str, str2);\n }\n }\n return hashMap;\n }", "private HashMap<String, String> returnCorrectMap(String...parameters) {\n\n\t\tHashMap<String, String> map = null;\n\n\t\ttry {\n\n\t\t\tmap = generateHashMapFromStringList(parameters);\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn map;\n\t}", "private static Map<String, String> parseAgentArgs(String agentArgs) {\n if (agentArgs == null) {\n return Collections.emptyMap();\n }\n String[] agentArgsArr = agentArgs.split(\",\");\n Map<String, String> argsMap = new HashMap<>(agentArgsArr.length);\n for (String arg : agentArgsArr) {\n String[] splitAgentArg = arg.split(\"=\");\n if (splitAgentArg.length != 2) {\n throw new IllegalArgumentException(\n String.format(\n \"Agent args is not well formed: %s. Use the format \\\"arg1=val1,arg2=val2,arg3=val3\\\"\",\n arg));\n }\n argsMap.put(splitAgentArg[0], splitAgentArg[1]);\n }\n return argsMap;\n }", "public static HashMap<String,String> splitJson(String s) {\n ObjectMapper mapper1 = new ObjectMapper();\n HashMap<String,String> rtn = new HashMap<String,String>();\n HashMap<String,String> jobj = null;\n try {\n jobj = mapper1.readValue(s, HashMap.class);\n for (Map.Entry<String, String> entrySet : jobj.entrySet()) {\n String key = entrySet.getKey();\n Object value = entrySet.getValue();\n rtn.put(key, mapper1.writeValueAsString(value));\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n return rtn;\n }", "public static void main(String[] args) {\n HashMap<Character,Integer> hMapOutPut = new HashMap<>();\n //HashMap map = new HashMap();\n String sInput = \"india\";\n char[] strInputArray = sInput.toCharArray();\n for(char fLoop: strInputArray) {\n System.out.println(fLoop);\n if(hMapOutPut.containsKey(fLoop)) {\n int temp=hMapOutPut.get(fLoop)+1;\n hMapOutPut.put(fLoop,temp );\n }else {\n hMapOutPut.put(fLoop, 1);\n }\n }\nSystem.out.println(hMapOutPut);\n }", "public void createHashTable() {\n\n String[] tempArray = new String[words.size()];\n\n for (int i = 0; i < words.size(); i++) {\n char[] word = words.get(i).toCharArray(); // char[] snarf\n Arrays.sort(word); // char[] afnrs\n tempArray[i] = toString(word); // String afnrs\n }\n\n for (int i = 0; i < words.size(); i++) {\n String word = tempArray[i];\n hashTable.put(word.substring(0, 4), i); // plocka bort bokstav nr 5\n String subString4 = (word.substring(0, 3) + word.substring(4, 5)); // plocka bort bokstav nr 4\n hashTable.put(subString4, i);\n String subString3 = (word.substring(0, 2) + word.substring(3, 5)); // plocka bort bokstav nr 3\n hashTable.put(subString3, i);\n String subString2 = (word.substring(0, 1) + word.substring(2, 5)); // plocka bort bokstav nr 2\n hashTable.put(subString2, i);\n hashTable.put(word.substring(1, 5), i); // plocka bort bokstav nr 1\n }\n }", "private static Map<Character, Set<Character>> genLessMap(String[] words) throws Exception {\n Map<Character, Set<Character>> map = new HashMap<>();\n for (int i = 1; i < words.length; i ++) {\n String a = words[i - 1];\n String b = words[i];\n boolean allEqual = true;\n for (int j = 0; j < a.length() && j < b.length(); j ++) {\n if (a.charAt(j) == b.charAt(j))\n continue;\n allEqual = false;\n Set<Character> sb = map.get(a.charAt(j));\n if (sb == null) {\n sb = new HashSet<Character>();\n map.put(a.charAt(j), sb);\n }\n sb.add(b.charAt(j));\n break;\n }\n if (allEqual && a.length() > b.length())\n throw new Exception(\"Invalid.\");\n }\n return map;\n }", "public static <T> Set<T> array2Set(T[] array) {\n\t\treturn new HashSet<T>(Arrays.asList(array));\n\t}", "private static HashMap<String,String> getRowValues( String[] headerArray, String row ) {\r\n\t\t\r\n\t\tString[] dataArray = ContactsImport.parseCSVLine(row, false);\r\n\t\tHashMap<String,String> values = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t//validate: number of elements in the row should be equals to the number of elements in the header\r\n\t\t\tif (dataArray.length != headerArray.length) {\r\n\t\t\t\t\r\n\t\t\t\tthrow( new Exception(\"number of elements doesn't match header row\"));\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t\r\n\t\t\t\t//store all values in the hashmap\r\n\t\t\t\tvalues = new HashMap<String,String>();\r\n\t\t\t\t\r\n\t\t\t\tfor (int i=0; i<dataArray.length; i++) {\r\n\t\t\t\t\tvalues.put( headerArray[i], dataArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.error(\"invalid row (\" + e.getMessage() + \"): \" + row);\r\n\t\t}\r\n\t\t\r\n\t\treturn values;\r\n\t\t\r\n\t}", "public static int hashCode(char[] array, int start, int end) {\n\t\tint code = 0;\n\t\tfor( int i = end - 1; i >= start; i-- )\n\t\t\tcode = code * 31 + array[i];\n\t\treturn code;\n\t}", "private static Map<String, List<String>> getCustomStringStructure(@NotNull String s) {\n String[] arr = s.split(\" \");\n // the storage\n Map<String, List<String>> map = new TreeMap<>();\n // put the first element in the storage\n List<String> l = new ArrayList<>();\n l.add(arr[0]);\n map.put(arr[0].substring(0, 1), l);\n\n for (int i = 1; i < arr.length; i++) {\n String sub = arr[i].substring(0, 1);\n // if map contains key put String arr[i] in the List\n if (map.containsKey(sub)) {\n map.get(sub).add(arr[i]);\n } else {\n // if not put first letter as a key and arr[i] as a value in the map\n List<String> list = new ArrayList<>();\n list.add(arr[i]);\n map.put(sub, list);\n }\n }\n\n // sort by size, by string's length and alphabetically\n Map<String, List<String>> collect = map.entrySet()\n .stream()\n .filter(k -> k.getValue().size() > 1)\n .collect(Collectors.toMap(\n Map.Entry::getKey,\n e -> e.getValue().stream().sorted((o1, o2) -> {\n if (o2.length() != o1.length()) {\n return o2.length() - o1.length();\n } else {\n return o1.compareTo(o2);\n }\n })\n .collect(Collectors.toList())\n ));\n\n // return TreeMap to sort keys\n return new TreeMap<>(collect);\n }", "private void setUrlPrefixMappingToMap(String[] prefixArr)\n\t{\n\t\tif( prefixArr != null )\n\t\t{\n\t\t\tfor(String urlPrefix : prefixArr)\n \t{ \n\t\t\t\tif(urlPrefix.contains(DELIMITER))\n\t\t\t\t{\n\t \t\tString[] keyVal = urlPrefix.split(\"::\");\n\t \t\tString key \t\t= keyVal[0];\n\t \t\tString value \t= keyVal[1].trim();\n\t \t\tlog.info(\"REST SERVICE Key------->>> \"+key);\n\t \t\tlog.info(\"REST SERVICE Value------->>> \"+value);\n\t \t\tappurlMap.put(key , value);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tlog.warn(\"NO DELEMETERS PROVIDED FOR REDIRECT SERVICE URL -------->>> \");\n\t\t\t\t}\n \t}\n\t\t}\n\t}", "public static Map<Integer,Integer> getSquares(int[] arr){\n\t\tMap<Integer,Integer> hm=new HashMap<>();\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\thm.put(arr[i],(int) Math.pow(arr[i],2));\n\t\t}\n\t\treturn hm;\t\n\t}", "public static Map<String, String> getQueryMap(String query) { \n Map<String, String> qmap = new HashMap<String, String>(); \n if (StringUtils.isEmpty(query)) {\n return qmap;\n }\n String[] params = query.split(\"&\"); \n for (String param : params) {\n String[] pair = param.split(\"=\");\n String name = pair[0];\n String value = \"\";\n if (pair.length > 1) {\n value = StringUtil.urlDecode(pair[1]);\n }\n qmap.put(name, value); \n } \n return qmap; \n }", "public final Map<String, Integer> mo34029a(List<String> list) {\n return (Map) m446a(new C1840ci(this, list));\n }", "public HashMap<String, String[]> readDictionary (){\n\t\tHashMap<String, String[]> hashmap = new HashMap<String, String[]>();\n\t\t\n\t\treturn (HashMap<String, String[]>) readDictionary(hashmap);\n\t}", "public final Map<Integer, List<zzbu.zzb>> zze(String str) {\n Preconditions.checkNotEmpty(str);\n ArrayMap arrayMap = new ArrayMap();\n Cursor cursor = null;\n try {\n cursor = mo40210c_().query(\"event_filters\", new String[]{\"audience_id\", \"data\"}, \"app_id=?\", new String[]{str}, (String) null, (String) null, (String) null);\n if (!cursor.moveToFirst()) {\n Map<Integer, List<zzbu.zzb>> emptyMap = Collections.emptyMap();\n if (cursor != null) {\n cursor.close();\n }\n return emptyMap;\n }\n do {\n try {\n zzbu.zzb zzb2 = (zzbu.zzb) ((zzib) ((zzbu.zzb.zza) zzks.zza(zzbu.zzb.zzl(), cursor.getBlob(1))).zzv());\n if (zzb2.zzf()) {\n int i = cursor.getInt(0);\n List list = (List) arrayMap.get(Integer.valueOf(i));\n if (list == null) {\n list = new ArrayList();\n arrayMap.put(Integer.valueOf(i), list);\n }\n list.add(zzb2);\n }\n } catch (IOException e) {\n zzr().zzf().zza(\"Failed to merge filter. appId\", zzez.zza(str), e);\n }\n } while (cursor.moveToNext());\n if (cursor != null) {\n cursor.close();\n }\n return arrayMap;\n } catch (SQLiteException e2) {\n zzr().zzf().zza(\"Database error querying filters. appId\", zzez.zza(str), e2);\n Map<Integer, List<zzbu.zzb>> emptyMap2 = Collections.emptyMap();\n if (cursor != null) {\n cursor.close();\n }\n return emptyMap2;\n } catch (Throwable th) {\n if (cursor != null) {\n cursor.close();\n }\n throw th;\n }\n }", "public static Map<String, List<Double>> stringToMapList(String text) {\n\t\tList<String> lines = splitLines(text);\n\t\tint keyIndex = 0;\n\t\tHashMap<String, List<Double>> entries = new HashMap<String, List<Double>>();\n\t\tfor (int i=0; i<lines.size(); i++) {\n\t\t\ttry {\n\t\t\t\tList<String> splitLine = splitWhitespace(lines.get(i));\n\t\t\t\tif (splitLine.size() > 0) {\n\t\t\t\t\tList<Double> values = new ArrayList<Double>();\n\t\t\t\t\tfor (int wordI=1; wordI<splitLine.size(); wordI++) {\n\t\t\t\t\t\tvalues.add(Double.parseDouble(splitLine.get(wordI)));\n\t\t\t\t\t}\n\t\t\t\t\tentries.put(splitLine.get(keyIndex), values);\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tSystem.out.println(\"Skipping entry \"+i+\": \"+lines.get(i));\n\t\t\t}\n\t\t}\n\t\treturn entries;\n\t}", "public static HashMap<String, String> readFromExcel() throws IOException, WriteException, BiffException {\n\t\t\t\tList<String> keyList = new ArrayList<String>(); \r\n\t\t\t\tList<String> list = new ArrayList<String>(); \r\n\t\t\t\tHashMap<String, String> map = new HashMap<String, String>(); \r\n\t\t\t\tString str = null;\r\n\t\t\t\r\n\t\t\t\ttry\r\n\t\t {\r\n\t\t File f1=new File(\"//ecs-9844/DoNotDelete/JenkinsData/input.xls\");\r\n\t\t //the excel sheet which contains data\r\n\t\t WorkbookSettings ws=new WorkbookSettings();\r\n\t\t ws.setLocale(new Locale(\"er\",\"ER\"));\r\n\t\t Workbook workbook=Workbook.getWorkbook(f1,ws);\r\n\t\t Sheet readsheet=workbook.getSheet(0);\r\n\t\t //Loop to read the KEYS from Excel i.e, 1st column of the Excel\r\n\t\t for(int i=0;i<readsheet.getColumns();i++) {\r\n\t\t \tstr=readsheet.getCell(i,0).getContents().toString();\r\n\t\t \tlist.add(str);\r\n\t\t }\r\n\t\t \tkeyList.addAll(list);\r\n\t\t \t// Hardcoding the first map (key, value) values \r\n\t\t \tmap.put(keyList.get(0), readsheet.getCell(0, 1).getContents().toString());\r\n\t\t \t// Loop to read TEST DATA from the Excel\r\n\t\t for(int i=1;i<readsheet.getRows();i++) {\r\n\t\t for(int j=1;j<readsheet.getColumns();j++) {\t\r\n\t\t str=readsheet.getCell(j,i).getContents().toString();\r\n\t\t list.add(str);\r\n\t\t System.out.println(str);\r\n\t\t map.put(keyList.get(j),str); \r\n\t\t \t}\r\n\t\t }\r\n\t\t //Print the map(key, value) \r\n\t\t System.out.println(\"Print map\");\r\n\t\t System.out.println(map);\r\n\t\t \r\n\t\t }\r\n\t\t catch(IOException e)\r\n\t\t {\r\n\t\t e.printStackTrace();\r\n\t\t }\r\n\r\n\t\t catch(BiffException e)\r\n\t\t {\r\n\t\t e.printStackTrace();\r\n\t\t } catch (Exception e) {\r\n\t\t e.printStackTrace(); \r\n\t\t }\r\n\t\t\t\t\treturn map;\r\n\t}", "private static String[][] getMap(String inputFile, String[][] Map) {\n\t\tFile text = new File(inputFile);\t\r\n\t\tint j = 0;\r\n\r\n\t\ttry {\r\n\t\t\tScanner s = new Scanner(text);\r\n\t\t\tString nex = s.nextLine();\r\n\t\t\t\r\n\t\t\twhile(s.hasNextLine())\r\n\t\t\t{\r\n\t\t\tnex = s.nextLine();\r\n\t\t\tfor (int i = 0; i < nex.length(); i++)\r\n\t\t\t{\r\n\t\t\t\tchar c = nex.charAt(i);\r\n\t\t\t\tString d = Character.toString(c);\r\n\t\t\t\tMap[j][i] = d;\t\r\n\t\t\t}\r\n\t\t\tj++;\r\n\t\t\t}\t\r\n\t\t\ts.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\t\treturn Map;\r\n}", "public static List<List<String>> groupAnagrams(String[] strs) {\n Map<List<Integer>, List<String>> map = new HashMap<>();\n for(String s : strs){\n List<Integer> curr = transform(s);\n if(map.containsKey(curr)) map.get(curr).add(s);\n else{\n List<String> newGrp = new ArrayList<>();\n newGrp.add(s);\n map.put(curr, newGrp);\n }\n }\n\n return new ArrayList<>(map.values());\n }", "Map<String, String> mo14888a();" ]
[ "0.7456682", "0.6394613", "0.6220052", "0.6179802", "0.57241297", "0.56663215", "0.56585866", "0.563694", "0.55912095", "0.5573005", "0.5537372", "0.5532285", "0.5514687", "0.5474215", "0.54165435", "0.5391567", "0.5389641", "0.5386097", "0.5294289", "0.5232356", "0.51652956", "0.516357", "0.5135285", "0.5127532", "0.5120333", "0.5067218", "0.502859", "0.49703392", "0.49689448", "0.49662322", "0.49654076", "0.49595422", "0.4950252", "0.49301568", "0.49157453", "0.48970243", "0.48890644", "0.48823214", "0.4879949", "0.48692295", "0.48691422", "0.48635256", "0.48510385", "0.48356828", "0.48133427", "0.4803149", "0.47993946", "0.47956854", "0.4783866", "0.47833496", "0.47735953", "0.47688738", "0.4754706", "0.4750259", "0.4750259", "0.47450322", "0.47445676", "0.47423357", "0.47365075", "0.4731526", "0.47310072", "0.4726368", "0.47247136", "0.47184518", "0.47177795", "0.47172853", "0.4713995", "0.47068462", "0.47059655", "0.4703837", "0.47035033", "0.47019523", "0.46991017", "0.4685159", "0.46826243", "0.46771884", "0.46709785", "0.46660644", "0.46619543", "0.4659504", "0.46459612", "0.46371648", "0.46345505", "0.46341798", "0.46203074", "0.46191934", "0.4615087", "0.46127182", "0.4605752", "0.4588738", "0.4588643", "0.45782223", "0.45764047", "0.45737836", "0.45659378", "0.45622256", "0.45459864", "0.45326588", "0.45308292", "0.452626" ]
0.6257936
2
method show the content of an array list.
public static <E> void showArrayList(ArrayList<E> arr) { System.out.println("..........................................."); for (int i = 0; i < arr.size(); i++) { System.out.format("\nElement #%d = [%s]%n", i, arr.get(i).toString()); } //for System.out.println(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void displayArrays(ArrayList list){}", "private static void displayList(ArrayList list) {\n System.out.println(\"The list contains \" + list.getCurrentSize()\n + \" string(s), as follows:\");\n Object[] listArray = list.toArray();\n for (int index = 0; index < listArray.length; index++) {\n System.out.print(listArray[index] + \" \");\n } // end for\n System.out.println();\n }", "public void display()\n {\n for (int i = 0; i < length; i++)\n {\n System.out.print(list[i] + \" \");\n }\n\n System.out.println();\n }", "public void viewList() {\n\t\tSystem.out.println(\"Your have \" + contacts.size() + \" contacts:\");\n\t\tfor (int i=0; i<contacts.size(); i++) {\n\t\t\tSystem.out.println((i+1) + \". \" \n\t\t\t\t\t+ contacts.get(i).getName() + \" number: \" \n\t\t\t\t\t+ contacts.get(i).getPhoneNum());\n\t\t}\n\t}", "public void printData(){\n for(int i=0; i<list.size(); i++){\n System.out.print(list.get(i) + \" \");\n }\n System.out.println();\n }", "public static void displayList(ExtendedListInterface aList) throws ListException {\r\n Object dataItem;\r\n\r\n for (int index = 1; index < aList.size(); index++){\r\n dataItem = aList.get(index);\r\n System.out.print(dataItem + \", \");\r\n }\r\n if (aList.size() >= 1) {\r\n dataItem = aList.get(aList.size());\r\n System.out.println(dataItem + \".\");\r\n } else {\r\n throw new ListException(\"displayList on an empty list\");\r\n }\r\n }", "private void showArray() {\n\t\tSystem.out.println(Arrays.toString(this.array));\n\n\t}", "public String toString()\n\t{\n\t\tSystem.out.print(\"Array list contains: [ \");\n\t\tfor(int i=0; i<size; i++)\n\t\t\tSystem.out.print(myArray[i]+ \", \");\n\t\treturn\" ]\";\n\t}", "private void showArrayAdaptView() {\n\t\tPersonAdapt personAdapt = new PersonAdapt(this, persons, R.layout.listview_item);\n\t\tlistView.setAdapter(personAdapt);\n\t}", "public String[] displayContents() {\n String[] contents = new String[this.items.size()];\n for (int i = 0; i < this.items.size(); i++) {\n contents[i] = this.items.get(i).getName();\n }\n return contents;\n }", "@Override\n\tpublic void printContent(List<Object> stingList) {\n\t\t\n\t}", "public void show_book()\n\t{\n\t\tsize=arr.size();\n\t\tif(size>0)\n\t\t{\n\t\t\t\n\t\t\tSystem.out.println(\"===========================================================\");\n\t\t\tSystem.out.println(\"Address Book List\");\n\t\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\t\tint i=1;\n\n\t\t\t//Special loop:= For Each loop for array list\n\t\t\tfor(String x: arr)\n\t\t\t{\n\t\t\t\tSystem.out.println(i+\". \"+x);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"No data Found\");\n\t\t}\n\t}", "public static void showD(ArrayList<ArrayList<String>> data){\n\t\tfor(int i = 0; i<data.get(0).size(); i++){\r\n\t\t\tfor(int j = 0; j<data.size(); j++){\r\n\t\t\t\tSystem.out.print(data.get(j).get(i));\r\n\t\t\t\tSystem.out.print(\"\\t\");\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"\\n\");\r\n\t\t}\r\n\t\treturn;\r\n\t}", "private void showArray(ArrayList<String[]> arr) {\n for(String[] row: arr){\n for(String x: row){\n System.out.print(x + \"\\t\\t\");\n }\n System.out.println();\n } \n System.out.println(\"------------------------------------\");\n }", "public void display(){\n \tfor(int i=0;i<size;i++){\n \tSystem.out.print(elements[i]+\" \");\n \t}\n\t}", "public static final SourceModel.Expr showList(SourceModel.Expr list) {\n\t\t\treturn \n\t\t\t\tSourceModel.Expr.Application.make(\n\t\t\t\t\tnew SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.showList), list});\n\t\t}", "public void showPatientList()\r\n\t{\n\t\tfor(int i=0; i<nextPatientLocation; i++)\r\n\t\t{\r\n\t\t\tString currentPositionPatientData = arrayPatients[i].toString();\r\n\t\t\tSystem.out.println(\"Patient \" + i + \" is \" + currentPositionPatientData);\r\n\t\t}\r\n\t}", "public void displayAsList()\n\t{\n\t\tSystem.out.println(\"Printing all vertices\");\n\t\tvertices.show();\n\t}", "void showSublist()\n {\n System.out.println(subs);\n }", "public void display()\r\n\t{\r\n\t\tif(this.isEmpty())\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Empty... nothing to display\");\r\n\t\t}else\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The Array: \");\t\r\n\t\tfor (int i =0; i<bookArray.length; i++)\r\n\t\t{\r\n\t\t\tif(bookArray[i]!=null)\r\n\t\t\t\tSystem.out.println(\"\\t\"+'\"'+bookArray[i]+'\"');\r\n\t\t}\r\n\t }\r\n\t}", "private static void listFormat() {\n\t\tSystem.out.println(\"List of all your movies\");\n\t\tSystem.out.println(\"=======================\");\n\t\tfor (int i = 0; i < movList.size(); i++) {\n\t\t\tSystem.out.println(movList.get(i));\n\t\t}\n\t}", "private void displayListView() {\n\t\tArrayList<FillterItem> fillterList = new ArrayList<FillterItem>();\n\n\t\tfor (int i = 0; i < province.length; i++) {\n\t\t\tLog.i(\"\", \"province[i]: \" + province[i]);\n\t\t\tFillterItem fillter = new FillterItem();\n\t\t\tfillter.setStrContent(province[i]);\n\t\t\tfillter.setSelected(valueList[i]);\n\t\t\t// add data\n\t\t\tfillterList.add(fillter);\n\t\t}\n\n\t\t// create an ArrayAdaptar from the String Array\n\t\tdataAdapter = new MyCustomAdapter(getContext(),\n\t\t\t\tR.layout.item_fillter_header, fillterList);\n\n\t\t// Assign adapter to ListView\n\t\tlistView.setAdapter(dataAdapter);\n\n\t}", "public String toString() {\n if (size > 0) {\n String display = \"[\";\n for (int i = 0; i < size - 1; i++) {\n display += list[i] + \",\";\n } display += list[size - 1] + \"]\";\n return display;\n }\n return \"[]\";\n }", "public void printList(){\n System.out.println(\"Printing the list\");\n for(int i = 0; i<adjacentcyList.length;i++){\n System.out.println(adjacentcyList[i].value);\n }\n }", "@Override\n public final String toString() {\n final int[] temp = new int[size];\n for (int i = 0; i < size; i++) {\n temp[i] = arrayList[i];\n }\n return Arrays.toString(temp);\n }", "public void listar() {\n\t\t\n\t}", "public void print()\n {\n for (int i=0; i<list.length; i++)\n System.out.println(i + \":\\t\" + list[i]);\n }", "public void display() {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tSystem.out.print(a[i] + \"\\t\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void displayList() {\n\n\t\tIterator<SimplePacket> itr = list.iterator();\n\n\t\twhile(itr.hasNext()) {\n\t\t\tSimplePacket packet = itr.next();\n\t\t\tif(!packet.isValidCheckSum()){\n\t\t\t\tSystem.out.print(\"[\" + packet.getSeq() + \"], \");\n\t\t\t}else{\n\t\t\t\tSystem.out.print(packet.getSeq() + \", \");\n\t\t\t}\n\t\t}\n\t}", "private void displayArray() {\r\n System.out.println(\"CEK ARRAY : \");\r\n for (i = 0; i < array.length; i++) {\r\n System.out.print(array[i]+\",\");\r\n }\r\n }", "public static void printList(ArrayList list) {\n String output = \"[ \";\n for (int i = 0; i < list.size(); i++) {\n if (i != 0) {\n output += \", \" + list.get(i);\n }\n else {\n output += list.get(i);\n }\n }\n output += \" ]\";\n System.out.println(output);\n }", "private void showList() {\n select();\n //create adapter\n adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, studentInfo);\n //show data list\n listView.setAdapter(adapter);\n }", "public void show() {\r\n\t\tfor (Carta carta: baraja) {\r\n\t\t\tSystem.out.println(carta);\r\n\t\t}\r\n\t}", "private static void printArray(ArrayList<Integer> list) {\n for (int i : list) {\n System.out.println(i * 3);\n }\n\n }", "public static <E> void showArrayList(ArrayList<E> arr, String msg)\n {\n System.out.println(msg);\n showArrayList(arr);\n\n }", "@Override\n\tpublic boolean showInList()\n\t{\n\t\treturn true;\n\t}", "@Override\n public String toString() {\n return list.toString();\n }", "public void arrayList(List<Student> list)\r\n\t{\r\n\t\tlist.add(s1);\r\n\t\tlist.add(s2);\r\n\t\tlist.add(s3);\r\n\t\tlist.add(s4);\r\n\t\tlist.add(s5);\r\n\t\tlist.add(s6);\r\n\t\tSystem.out.println(\"Objects of ArrayList\");\r\n\t\tfor(int i=0;i<list.size();i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(list.get(i));\r\n\t\t}\r\n\t}", "public String toString(){\n\t\t// Si la liste est vide\n\t\tif(this.nb == 0){\n\t\t\treturn \"[]\";\n\t\t}\n\t\tString retour = \"[\" + this.liste[0];\n\t\tfor(int i = 1 ; i < this.nb ; i++){\n\t\t\tretour += \", \" + this.liste[i];\n\t\t}\n\t\tretour += \"]\";\n\t\t\n\t\treturn retour;\n\t}", "public void displayList (String [] list, int count, String message){\n \n //Print utiliy\n System.out.println(\"\\n\\t\" + message);\n for (int i = 0; i < count; i++){\n System.out.println(\"\\t\" + (i+1) + \"\\t\" + list[i]);\n }//End for loop\n \n }", "@Override\r\n public String toString() {\r\n String output = \"[ \";\r\n for (int i = 0; i < count; i++) {\r\n output += list[i] + \", \";\r\n }\r\n if (count > 0) {\r\n output = output.substring(0, output.length() - 2);\r\n } else {\r\n output = output.substring(0, output.length() - 1);\r\n }\r\n output += \" ]\";\r\n return output;\r\n }", "public void showList(){\n\n List<Integer> lst1 = new ArrayList<Integer>();\n\n lst1.add(2);\n lst1.add(6);\n lst1.add(4);\n lst1.add(8);\n lst1.add(2);\n\n System.out.println(\"**********************************\");\n System.out.println(\"Arraylist:\" + lst1);\n\n //faster to add and remove\n List<Integer> lst2 = new LinkedList<Integer>();\n\n lst2.add(2);\n lst2.add(6);\n lst2.add(4);\n lst2.add(8);\n lst2.add(2);\n\n System.out.println(\"LinkedList: \" + lst2);\n System.out.println(\"********************************\");\n\n }", "public void printFormParticularIndex(ArrayList<Object> ar1) {\n\t\tSystem.out.println(\"To get value from particular index: \" + ar1.get(1));\n\t}", "public void showListData() {\n List<Operator> operators = operatorService.queryAll();\n String[][] datas = new String[operators.size()][8];\n for (int i = 0; i < datas.length; i++) {\n datas[i][0] = operators.get(i).getId().toString();\n datas[i][1] = operators.get(i).getName();\n datas[i][2] = operators.get(i).getSex();\n datas[i][3] = operators.get(i).getAge().toString();\n datas[i][4] = operators.get(i).getIdentityCard();\n datas[i][5] = operators.get(i).getWorkDate().toString();\n datas[i][6] = operators.get(i).getTel();\n datas[i][7] = operators.get(i).getAdmin().toString();\n }\n operatorManagetable.setModel(new DefaultTableModel(\n datas, new String[]{\"编号\", \"用户名\", \"性别\", \"年龄\", \"证件号\", \"工作时间\", \"电话号码\", \"是否为管理员\"}\n ));\n scrollPane1.setViewportView(operatorManagetable);\n }", "void printList();", "public void displayElements(MyList<Integer> m){\n\t\t//-----------------------------\n\t\t//SET OF OPS\n\t\t//-----------------------------\n\n\t\t//-----------------------------\n\t\t// I. SCENARIO IDENTIFICATION\n\t\t//-----------------------------\n\t\tint scenario = 0; \n\n\t\t//Rule 1. MyList is empty\n\t\tif (m.length() == 0) \n\t\t\tscenario = 1;\n\t\t//Rule 2. MyList is non-empty\n\t\telse\n\t\t\tscenario = 2;\n\n\t\t//-----------------------------\n\t\t// II. SCENARIO IMPLEMENTATION \n\t\t//-----------------------------\n\t\tswitch(scenario){\t\n\n\t\t//Rule 1. MyList is empty\n\t\tcase 1: \n\t\t\t//1. We print the empty message\n\t\t\tSystem.out.println(\"Empty MyList\");\n\n\t\t\tbreak;\n\n\t\t\t//Rule 2. MyList is non-empty\n\t\tcase 2: \n\t\t\t//1. We print the initial message\n\t\t\tint size = m.length();\n\t\t\tSystem.out.print(\"MyList has \" + size + \" items: [\");\n\n\t\t\t//2. We traverse the items\n\t\t\tfor (int i = 0; i < size - 1; i++)\n\t\t\t\tSystem.out.print(m.getElement(i) + \", \");\n\t\t\tSystem.out.println(m.getElement(size - 1) + \"]\");\n\n\t\t\tbreak;\n\n\t\t}\n\n\t}", "@Override\n public String toString()\n {\n StringBuilder builder = new StringBuilder();\n builder.append('[');\n for (Object item : list)\n {\n builder.append(item.toString());\n builder.append(\", \");\n }\n builder.append(']');\n return builder.toString();\n }", "public void printFormatedList()\r\n{\r\n System.out.println(\"[\");\r\n for(int i = 0; i < JustifiedList.size(); i++)\r\n {\r\n System.out.println(\"\\\"\" + JustifiedList.get(i) + \"\\\"\");\r\n }\r\n System.out.println(\"]\");\r\n}", "void printArray(CatalogueItem arr[])\r\n {\r\n int n = arr.length;\r\n for (int i=0; i<n; ++i)\r\n System.out.print(\r\n \"id: \" + arr[i].getItemId() + \" \"\r\n + \"name: \" + arr[i].getItemName() + \" \"\r\n + \"category: \" + arr[i].getCategory() + \"\\n\");\r\n System.out.println();\r\n System.out.println();\r\n }", "public void displayData(int[][] arr);", "public static void printToScreen(List<String> list1){\n\t\tJOptionPane.showMessageDialog(null, \"ArrayList has \" + list1.size() + \" Names\");\n\t\tJOptionPane.showMessageDialog(null, \"Here is the List \" + list1);\n\t}", "private static void showContacts(List<Contact> contactList) {\r\n\t\tcontactList.forEach(System.out::println);\r\n\t}", "@Override\n\tpublic int getCount()\n\t{\n\t\treturn arrayList.size();\n\t}", "public abstract ArrayList<String[]> toStrings();", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tFileInputStream fileInputStream = new FileInputStream(\"G:\\\\Prog\\\\arraylist.txt\");\n\t\t\tint i;\n\t\t\twhile((i = fileInputStream.read()) != -1)\n\t\t\t{\n\t\t\t\tSystem.out.print((char)i);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfileInputStream.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\n\t\n\tList l = new ArrayList();\n\t l.toArray();\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic int getCount() {\n\t\treturn arrayList.size();\r\n\t}", "private static void showList(StringBuffer aBuf,\n String[] aItems, String aStartTag, String aEndTag) {\n aBuf.append(aStartTag).append(NEW_LINE);\n for (int i=0; i<aItems.length; i++) {\n appendLI(aBuf, aItems[i]);\n }\n aBuf.append(aEndTag).append(NEW_LINE);\n}", "public void display()\n {\n System.out.println(�\\n The elements are�);\n for(int i=0; i<n; i++)\n System.out.println(� �+a[i]);\n }", "@Override\n\tpublic int getCount() {\n\t\treturn arrayList.size();\n\t}", "@Override\n\tpublic int getCount() {\n\t\treturn arrayList.size();\n\t}", "public void displayData(String[] str);", "public void list(){\n //loop through all inventory items\n for(int i=0; i<this.items.size(); i++){\n //print listing of each item\n System.out.printf(this.items.get(i).getListing()+\"\\n\");\n }\n }", "private void viewList() {\r\n PrintListMenuView listMenu = new PrintListMenuView();\r\n listMenu.displayMenu();\r\n }", "public static void printList(){\n ui.showToUser(ui.DIVIDER, \"Here are the tasks in your list:\");\n for (int i=0; i<Tasks.size(); ++i){\n Task task = Tasks.get(i);\n Integer taskNumber = i+1;\n ui.showToUser(taskNumber + \".\" + task.toString());\n }\n ui.showToUser(ui.DIVIDER);\n }", "public void list()\n {\n for(Personality objectHolder : pList)\n {\n String toPrint = objectHolder.getDetails();\n System.out.println(toPrint);\n }\n }", "private static void displayItems()\n {\n System.out.println(\"\\n\\tCurrent List of Products in the Store:\\n\");\n for(Sales s : store)\n System.out.println(s.toString());\n }", "private void printArrayList(ArrayList<String> printThis) {\n for(int i = 0; i < printThis.size(); i++) {\n System.out.print(printThis.get(i) + \"\\t\");\n }\n\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"\\nContents of SimpleArray:\\n\" + Arrays.toString(array);\n\t}", "@FXML\n\tprivate void onLoadLogClicked(){\n\n\t\tSystem.out.print(list);\n\t\tString showup = \"\";\n\t\tfor (int index = 0; index < list.size(); index++) {\n\t\t\tshowup += list.get(index)+\" & \"+dat.get(index);\n\t\t\tshowup += \"\\n\";\n\t\t}\n\t\ttextArea.setText(showup);\n\t}", "@Override\n public int getCount() {\n return arrlist.size();\n }", "@Override\n public int getCount() {\n return arrlist.size();\n }", "@Override\n public String toString() {\n return \"ArrayTaskList{\" +\n \"list=\" + Arrays.toString(list) +\n \", currentPos=\" + currentPos +\n \", listLength=\" + listLength +\n '}';\n }", "private void cargarLista(ArrayList<CarritoDTO> arrayList)\n {\n DefaultListModel modelo = new DefaultListModel();\n //Recorrer el contenido del ArrayList\n for(int i=0; i<arrayList.size(); i++) \n {\n CarritoDTO item =(CarritoDTO) arrayList.get(i);\n //Añadir cada elemento del ArrayList en el modelo de la lista\n modelo.add(i, item.toString());\n }\n //Asociar el modelo de lista al JList\n jList1.setModel(modelo);\n }", "private static void testAdd(ArrayList list, int[] content) {\n System.out.print(\"Adding to the list: \");\n for (int index = 0; index < content[index]; index++) {\n list.addToEnd(content);\n } // end for\n System.out.println();\n displayList(list);\n }", "public void show() {\r\n\t\tSystem.out.println(\"Id \\t Name \\t Address\");\r\n\t\t\r\n\t\tfor (int index = 0; index < emp.size(); index++) {\r\n\t\t\tSystem.out.println(emp.get(index).empId + \"\\t\" + emp.get(index).name +\"\\t\" + emp.get(index).adress);\r\n\t\t}\r\n\t}", "public String toString()\n {\n String s = \"\";\n for (int i=0; i<list.length; i++)\n s += i + \":\\t\" + list[i] + \"\\n\";\n return s;\n }", "static void print(List list)\r\n\t{\n\t\tfor(int i= 0; i < list.size(); i++){\r\n\t\t\tSystem.out.println(list.get(i));\r\n\t\t}\r\n\t}", "private void listExample()\n\t{\n\n\t\tArrayList <String> alist = new ArrayList<String>();//doesn't have to be string- can be Duck, or Mouse, or Apostrophe\n\t\talist.add(\"banana\"); //adds \"banana\" to the end of the list\n\t\talist.add(\"strawberry\");\n\t\talist.add(\"blueberry\");\n\t\talist.add(\"blackberry\");\n\t\t\n\t\tJOptionPane.showMessageDialog(null,alist);\n\t\t\n\t\talist.add(2, \"apple\"); //adds it in spot 2 (3rd position)\n\t\t\n\t\tJOptionPane.showMessageDialog(null,alist);\n\t\t\n\t\t\n\t\talist.remove(\"blueberry\"); \n\t\t/**\n\t\t * .remove returns what was in the spot that was just taken out--and shrinks down by one\n\t\t * .set also returns this value but it replaces the value with something else\n\t\t */\n\t\talist.remove(0); //removes 1st element\n\t\tJOptionPane.showMessageDialog(null,alist);\n\t\t\n\t\tfor (String str:alist)\n\t\t\tJOptionPane.showMessageDialog(null, str); //shows each individually\n\t\t\n\t\talist.set(1, \"coconut\"); //alist.set(index, element) --replaces\n\t\t\n\t\tint numberOfItems = alist.size();\n\t\talist.clear();\n\n\t\n\t}", "public ArrayList<String> a(ArrayList<View> arrayList) {\n ArrayList<String> arrayList2 = new ArrayList<>();\n int size = arrayList.size();\n for (int i = 0; i < size; i++) {\n View view = arrayList.get(i);\n arrayList2.add(p.e(view));\n p.a(view, (String) null);\n }\n return arrayList2;\n }", "private static void showList(List<String> list, int offsetX, int offsetY) {\r\n\t\tfor (int i = 1; i <= list.size(); i++) {\r\n\t\t\tGAME.drawTextScreen(offsetX, offsetY + (LINE_HEIGHT * i), list.get(i - 1));\r\n\t\t}\r\n\t}", "@Override\n public String toString(){\n String result = \"\";\n for(int i = 0; i < numItems; i++){\n result += arr[i] + \" \";\n }\n return result;\n }", "public String list() {\n final StringBuilder list = new StringBuilder(\"Here are the tasks in your list:\\n\\t\");\n records.forEach((el) -> list.append(\n String.format(\"%1$d. %2$s \\n\\t\",\n records.indexOf(el) + 1, el.toString())));\n return list.toString();\n }", "public static void listToPrint() {\r\n for (int i = 0; i < ListeElem.size(); i++) {\r\n ListeElem.get(i).toPrint();\r\n }\r\n\r\n }", "public void print_list() {\n \t \n \t//define current node as\n \t node<Type> current_node = new node<>();\n \t \n \t //now keep for loop and print the answer\n \t current_node = head;\n \t \n \t //print first element\n \t System.out.println(current_node.show_element());\n \t \n \t //now run for loop\n \t for (int i = 1 ; i <= len - 1 ; i ++) {\n \t\t \n \t\t //change current node\n \t\t current_node = current_node.show_next();\n \t\t \n \t\t //just print the answer\n \t\t System.out.println(current_node.show_element());\n \t }\n }", "@Override\r\n\tpublic void showList() {\n\t\tSystem.out.println(\"I am a MAC list\");\r\n\t}", "public void printAll(){\nfor(int i=0;i<size ;i++){\n System.out.println(\"a[%d]\"+data[i]); \n}\n System.out.println(\"size\"+size); \n}", "public String toString() {\n\t\treturn list.toString();\n\t}", "public String getDataAsString()\n\t{\n\t\tString listAsString = \"\";\n\t\t\n\t\tfor (int i = 0; i < list.length; i++)\n\t\t{\n\t\t\tlistAsString += list[i] + \" \";\n\t\t}\n\t\t\n\t\tlistAsString += \"\\nFront: \" + front + \"\\nRear: \" +\n\t\t\t\trear + \"\\nEntries: \" + counter;\n\t\t\n\t\treturn listAsString;\n\t}", "public List<String> viewExams() {\n List<String> list = new ArrayList<>();\n if (examList.size() == 0) {\n list.add(\"No Exams have been created yet!\");\n } else {\n for (int i = 0; i < examList.size(); i++) {\n String entry = (i + 1) + \".\" + examList.get(i).toString();\n list.add(entry);\n }\n }\n return list;\n }", "protected void showList(String[] convertLis) {\n sL.register(null, \"INFO\", \"Successful - showList - start\");\n for (int j = convertLis.length - 1; j >= 0; j-- ) {\n listConverting.getListModel().addElement(convertLis[j]);\n }\n sL.register(null, \"INFO\", \"Successful - showList - finished\");\n }", "@Override\n public String toString() {\n return \"SimpleArrayList{\"\n + \"values=\" + Arrays.toString(values)\n + '}';\n }", "public void displayData();", "private static void showList(ArrayList<? extends Machine> list) {\n System.out.println(\"In showlist method\");\n for(Machine machine: list) {\n System.out.println(machine);\n }\n\n }", "void showFacts(List<Fact> facts);", "public String display(){\n StringBuilder str = new StringBuilder();\n\n for(int i = 0; i < 3; ++i){\n if( Array[i] != null ) {\n str.append('\\n' + Names[i] + '\\n');\n str.append(Array[i].display());\n }\n }\n return str.toString();\n }", "public void show() {\n numberList.show();\n }", "public static void showNodeArrayList(ArrayList<Node> arr)\n {\n for (int i = 0; i < arr.size(); i++)\n {\n Node node = arr.get(i);\n System.out.format(\"Element #%d = [%s]%n\", i, node.getNodeID());\n } //for\n\n }", "@Override\n public void showListOfAudioFiles(ArrayList<AudioModel> audioModelArrayList) {\n }", "public static void printContactList()\n {\n if(myList.size() < 1)\n System.out.println(\"~empty list~\");\n else\n {\n System.out.println(\"Current Items\");\n System.out.println(\"-------------\");\n for(int i = 0; i < myList.size(); i++)\n {\n System.out.printf(i+\")\");\n Item itemPrint = myList.get(i);\n itemPrint.printItem(itemPrint.getFirstName(), itemPrint.getLastName(), itemPrint.getPhoneNumber(), itemPrint.getEmail());\n }\n }\n }", "public S<T> list(String[] data){\n\t\tif(t instanceof ListView){\n\t\t\t\n\t\t\t((ListView) t).setAdapter(new ArrayAdapter<String>(activity,\n\t\t android.R.layout.simple_list_item_1, android.R.id.text1, data));\n\t\t}\n\t\treturn this;\n\t}" ]
[ "0.80565214", "0.72794485", "0.664965", "0.6575048", "0.6529514", "0.6470372", "0.6445237", "0.6406743", "0.6352501", "0.6270823", "0.6262646", "0.62527835", "0.62398005", "0.6212774", "0.6204973", "0.61948156", "0.6185194", "0.61632067", "0.6142287", "0.61299276", "0.60963213", "0.6092055", "0.6062058", "0.60579544", "0.60528755", "0.60458803", "0.6035733", "0.60321635", "0.6030074", "0.6027708", "0.60263306", "0.6020302", "0.60167605", "0.59994596", "0.5993302", "0.5978091", "0.5971012", "0.59558547", "0.59519476", "0.5945913", "0.5941557", "0.5939915", "0.5939503", "0.59265834", "0.59224606", "0.591512", "0.589726", "0.58956605", "0.5857208", "0.58420384", "0.5833531", "0.58315074", "0.5831038", "0.5827874", "0.57976305", "0.5795035", "0.57873124", "0.57856107", "0.5780845", "0.5780845", "0.5780735", "0.57782537", "0.5774336", "0.57704633", "0.5769175", "0.5764547", "0.576031", "0.57452595", "0.5744618", "0.57295007", "0.57295007", "0.57272565", "0.57147944", "0.57121956", "0.5707798", "0.5705244", "0.57008934", "0.57007605", "0.5697824", "0.5696635", "0.569015", "0.5689777", "0.5685514", "0.5677598", "0.56716293", "0.5671268", "0.5671191", "0.56689197", "0.56627256", "0.56507033", "0.56483006", "0.56433296", "0.56386596", "0.56181043", "0.561612", "0.56122553", "0.561001", "0.56062937", "0.5604426", "0.5598621" ]
0.6774054
2
method show the content of an array list.
public static <E> void showArrayList(ArrayList<E> arr, String msg) { System.out.println(msg); showArrayList(arr); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void displayArrays(ArrayList list){}", "private static void displayList(ArrayList list) {\n System.out.println(\"The list contains \" + list.getCurrentSize()\n + \" string(s), as follows:\");\n Object[] listArray = list.toArray();\n for (int index = 0; index < listArray.length; index++) {\n System.out.print(listArray[index] + \" \");\n } // end for\n System.out.println();\n }", "public static <E> void showArrayList(ArrayList<E> arr)\n {\n System.out.println(\"...........................................\");\n\n for (int i = 0; i < arr.size(); i++)\n {\n System.out.format(\"\\nElement #%d = [%s]%n\", i, arr.get(i).toString());\n } //for\n\n System.out.println();\n\n\n }", "public void display()\n {\n for (int i = 0; i < length; i++)\n {\n System.out.print(list[i] + \" \");\n }\n\n System.out.println();\n }", "public void viewList() {\n\t\tSystem.out.println(\"Your have \" + contacts.size() + \" contacts:\");\n\t\tfor (int i=0; i<contacts.size(); i++) {\n\t\t\tSystem.out.println((i+1) + \". \" \n\t\t\t\t\t+ contacts.get(i).getName() + \" number: \" \n\t\t\t\t\t+ contacts.get(i).getPhoneNum());\n\t\t}\n\t}", "public void printData(){\n for(int i=0; i<list.size(); i++){\n System.out.print(list.get(i) + \" \");\n }\n System.out.println();\n }", "public static void displayList(ExtendedListInterface aList) throws ListException {\r\n Object dataItem;\r\n\r\n for (int index = 1; index < aList.size(); index++){\r\n dataItem = aList.get(index);\r\n System.out.print(dataItem + \", \");\r\n }\r\n if (aList.size() >= 1) {\r\n dataItem = aList.get(aList.size());\r\n System.out.println(dataItem + \".\");\r\n } else {\r\n throw new ListException(\"displayList on an empty list\");\r\n }\r\n }", "private void showArray() {\n\t\tSystem.out.println(Arrays.toString(this.array));\n\n\t}", "public String toString()\n\t{\n\t\tSystem.out.print(\"Array list contains: [ \");\n\t\tfor(int i=0; i<size; i++)\n\t\t\tSystem.out.print(myArray[i]+ \", \");\n\t\treturn\" ]\";\n\t}", "private void showArrayAdaptView() {\n\t\tPersonAdapt personAdapt = new PersonAdapt(this, persons, R.layout.listview_item);\n\t\tlistView.setAdapter(personAdapt);\n\t}", "public String[] displayContents() {\n String[] contents = new String[this.items.size()];\n for (int i = 0; i < this.items.size(); i++) {\n contents[i] = this.items.get(i).getName();\n }\n return contents;\n }", "@Override\n\tpublic void printContent(List<Object> stingList) {\n\t\t\n\t}", "public void show_book()\n\t{\n\t\tsize=arr.size();\n\t\tif(size>0)\n\t\t{\n\t\t\t\n\t\t\tSystem.out.println(\"===========================================================\");\n\t\t\tSystem.out.println(\"Address Book List\");\n\t\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\t\tint i=1;\n\n\t\t\t//Special loop:= For Each loop for array list\n\t\t\tfor(String x: arr)\n\t\t\t{\n\t\t\t\tSystem.out.println(i+\". \"+x);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"No data Found\");\n\t\t}\n\t}", "public static void showD(ArrayList<ArrayList<String>> data){\n\t\tfor(int i = 0; i<data.get(0).size(); i++){\r\n\t\t\tfor(int j = 0; j<data.size(); j++){\r\n\t\t\t\tSystem.out.print(data.get(j).get(i));\r\n\t\t\t\tSystem.out.print(\"\\t\");\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"\\n\");\r\n\t\t}\r\n\t\treturn;\r\n\t}", "private void showArray(ArrayList<String[]> arr) {\n for(String[] row: arr){\n for(String x: row){\n System.out.print(x + \"\\t\\t\");\n }\n System.out.println();\n } \n System.out.println(\"------------------------------------\");\n }", "public void display(){\n \tfor(int i=0;i<size;i++){\n \tSystem.out.print(elements[i]+\" \");\n \t}\n\t}", "public static final SourceModel.Expr showList(SourceModel.Expr list) {\n\t\t\treturn \n\t\t\t\tSourceModel.Expr.Application.make(\n\t\t\t\t\tnew SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.showList), list});\n\t\t}", "public void showPatientList()\r\n\t{\n\t\tfor(int i=0; i<nextPatientLocation; i++)\r\n\t\t{\r\n\t\t\tString currentPositionPatientData = arrayPatients[i].toString();\r\n\t\t\tSystem.out.println(\"Patient \" + i + \" is \" + currentPositionPatientData);\r\n\t\t}\r\n\t}", "public void displayAsList()\n\t{\n\t\tSystem.out.println(\"Printing all vertices\");\n\t\tvertices.show();\n\t}", "void showSublist()\n {\n System.out.println(subs);\n }", "public void display()\r\n\t{\r\n\t\tif(this.isEmpty())\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Empty... nothing to display\");\r\n\t\t}else\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The Array: \");\t\r\n\t\tfor (int i =0; i<bookArray.length; i++)\r\n\t\t{\r\n\t\t\tif(bookArray[i]!=null)\r\n\t\t\t\tSystem.out.println(\"\\t\"+'\"'+bookArray[i]+'\"');\r\n\t\t}\r\n\t }\r\n\t}", "private static void listFormat() {\n\t\tSystem.out.println(\"List of all your movies\");\n\t\tSystem.out.println(\"=======================\");\n\t\tfor (int i = 0; i < movList.size(); i++) {\n\t\t\tSystem.out.println(movList.get(i));\n\t\t}\n\t}", "private void displayListView() {\n\t\tArrayList<FillterItem> fillterList = new ArrayList<FillterItem>();\n\n\t\tfor (int i = 0; i < province.length; i++) {\n\t\t\tLog.i(\"\", \"province[i]: \" + province[i]);\n\t\t\tFillterItem fillter = new FillterItem();\n\t\t\tfillter.setStrContent(province[i]);\n\t\t\tfillter.setSelected(valueList[i]);\n\t\t\t// add data\n\t\t\tfillterList.add(fillter);\n\t\t}\n\n\t\t// create an ArrayAdaptar from the String Array\n\t\tdataAdapter = new MyCustomAdapter(getContext(),\n\t\t\t\tR.layout.item_fillter_header, fillterList);\n\n\t\t// Assign adapter to ListView\n\t\tlistView.setAdapter(dataAdapter);\n\n\t}", "public String toString() {\n if (size > 0) {\n String display = \"[\";\n for (int i = 0; i < size - 1; i++) {\n display += list[i] + \",\";\n } display += list[size - 1] + \"]\";\n return display;\n }\n return \"[]\";\n }", "public void printList(){\n System.out.println(\"Printing the list\");\n for(int i = 0; i<adjacentcyList.length;i++){\n System.out.println(adjacentcyList[i].value);\n }\n }", "@Override\n public final String toString() {\n final int[] temp = new int[size];\n for (int i = 0; i < size; i++) {\n temp[i] = arrayList[i];\n }\n return Arrays.toString(temp);\n }", "public void listar() {\n\t\t\n\t}", "public void print()\n {\n for (int i=0; i<list.length; i++)\n System.out.println(i + \":\\t\" + list[i]);\n }", "public void display() {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tSystem.out.print(a[i] + \"\\t\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void displayList() {\n\n\t\tIterator<SimplePacket> itr = list.iterator();\n\n\t\twhile(itr.hasNext()) {\n\t\t\tSimplePacket packet = itr.next();\n\t\t\tif(!packet.isValidCheckSum()){\n\t\t\t\tSystem.out.print(\"[\" + packet.getSeq() + \"], \");\n\t\t\t}else{\n\t\t\t\tSystem.out.print(packet.getSeq() + \", \");\n\t\t\t}\n\t\t}\n\t}", "private void displayArray() {\r\n System.out.println(\"CEK ARRAY : \");\r\n for (i = 0; i < array.length; i++) {\r\n System.out.print(array[i]+\",\");\r\n }\r\n }", "public static void printList(ArrayList list) {\n String output = \"[ \";\n for (int i = 0; i < list.size(); i++) {\n if (i != 0) {\n output += \", \" + list.get(i);\n }\n else {\n output += list.get(i);\n }\n }\n output += \" ]\";\n System.out.println(output);\n }", "private void showList() {\n select();\n //create adapter\n adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, studentInfo);\n //show data list\n listView.setAdapter(adapter);\n }", "public void show() {\r\n\t\tfor (Carta carta: baraja) {\r\n\t\t\tSystem.out.println(carta);\r\n\t\t}\r\n\t}", "private static void printArray(ArrayList<Integer> list) {\n for (int i : list) {\n System.out.println(i * 3);\n }\n\n }", "@Override\n\tpublic boolean showInList()\n\t{\n\t\treturn true;\n\t}", "@Override\n public String toString() {\n return list.toString();\n }", "public void arrayList(List<Student> list)\r\n\t{\r\n\t\tlist.add(s1);\r\n\t\tlist.add(s2);\r\n\t\tlist.add(s3);\r\n\t\tlist.add(s4);\r\n\t\tlist.add(s5);\r\n\t\tlist.add(s6);\r\n\t\tSystem.out.println(\"Objects of ArrayList\");\r\n\t\tfor(int i=0;i<list.size();i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(list.get(i));\r\n\t\t}\r\n\t}", "public String toString(){\n\t\t// Si la liste est vide\n\t\tif(this.nb == 0){\n\t\t\treturn \"[]\";\n\t\t}\n\t\tString retour = \"[\" + this.liste[0];\n\t\tfor(int i = 1 ; i < this.nb ; i++){\n\t\t\tretour += \", \" + this.liste[i];\n\t\t}\n\t\tretour += \"]\";\n\t\t\n\t\treturn retour;\n\t}", "public void displayList (String [] list, int count, String message){\n \n //Print utiliy\n System.out.println(\"\\n\\t\" + message);\n for (int i = 0; i < count; i++){\n System.out.println(\"\\t\" + (i+1) + \"\\t\" + list[i]);\n }//End for loop\n \n }", "@Override\r\n public String toString() {\r\n String output = \"[ \";\r\n for (int i = 0; i < count; i++) {\r\n output += list[i] + \", \";\r\n }\r\n if (count > 0) {\r\n output = output.substring(0, output.length() - 2);\r\n } else {\r\n output = output.substring(0, output.length() - 1);\r\n }\r\n output += \" ]\";\r\n return output;\r\n }", "public void showList(){\n\n List<Integer> lst1 = new ArrayList<Integer>();\n\n lst1.add(2);\n lst1.add(6);\n lst1.add(4);\n lst1.add(8);\n lst1.add(2);\n\n System.out.println(\"**********************************\");\n System.out.println(\"Arraylist:\" + lst1);\n\n //faster to add and remove\n List<Integer> lst2 = new LinkedList<Integer>();\n\n lst2.add(2);\n lst2.add(6);\n lst2.add(4);\n lst2.add(8);\n lst2.add(2);\n\n System.out.println(\"LinkedList: \" + lst2);\n System.out.println(\"********************************\");\n\n }", "public void printFormParticularIndex(ArrayList<Object> ar1) {\n\t\tSystem.out.println(\"To get value from particular index: \" + ar1.get(1));\n\t}", "public void showListData() {\n List<Operator> operators = operatorService.queryAll();\n String[][] datas = new String[operators.size()][8];\n for (int i = 0; i < datas.length; i++) {\n datas[i][0] = operators.get(i).getId().toString();\n datas[i][1] = operators.get(i).getName();\n datas[i][2] = operators.get(i).getSex();\n datas[i][3] = operators.get(i).getAge().toString();\n datas[i][4] = operators.get(i).getIdentityCard();\n datas[i][5] = operators.get(i).getWorkDate().toString();\n datas[i][6] = operators.get(i).getTel();\n datas[i][7] = operators.get(i).getAdmin().toString();\n }\n operatorManagetable.setModel(new DefaultTableModel(\n datas, new String[]{\"编号\", \"用户名\", \"性别\", \"年龄\", \"证件号\", \"工作时间\", \"电话号码\", \"是否为管理员\"}\n ));\n scrollPane1.setViewportView(operatorManagetable);\n }", "void printList();", "public void displayElements(MyList<Integer> m){\n\t\t//-----------------------------\n\t\t//SET OF OPS\n\t\t//-----------------------------\n\n\t\t//-----------------------------\n\t\t// I. SCENARIO IDENTIFICATION\n\t\t//-----------------------------\n\t\tint scenario = 0; \n\n\t\t//Rule 1. MyList is empty\n\t\tif (m.length() == 0) \n\t\t\tscenario = 1;\n\t\t//Rule 2. MyList is non-empty\n\t\telse\n\t\t\tscenario = 2;\n\n\t\t//-----------------------------\n\t\t// II. SCENARIO IMPLEMENTATION \n\t\t//-----------------------------\n\t\tswitch(scenario){\t\n\n\t\t//Rule 1. MyList is empty\n\t\tcase 1: \n\t\t\t//1. We print the empty message\n\t\t\tSystem.out.println(\"Empty MyList\");\n\n\t\t\tbreak;\n\n\t\t\t//Rule 2. MyList is non-empty\n\t\tcase 2: \n\t\t\t//1. We print the initial message\n\t\t\tint size = m.length();\n\t\t\tSystem.out.print(\"MyList has \" + size + \" items: [\");\n\n\t\t\t//2. We traverse the items\n\t\t\tfor (int i = 0; i < size - 1; i++)\n\t\t\t\tSystem.out.print(m.getElement(i) + \", \");\n\t\t\tSystem.out.println(m.getElement(size - 1) + \"]\");\n\n\t\t\tbreak;\n\n\t\t}\n\n\t}", "@Override\n public String toString()\n {\n StringBuilder builder = new StringBuilder();\n builder.append('[');\n for (Object item : list)\n {\n builder.append(item.toString());\n builder.append(\", \");\n }\n builder.append(']');\n return builder.toString();\n }", "public void printFormatedList()\r\n{\r\n System.out.println(\"[\");\r\n for(int i = 0; i < JustifiedList.size(); i++)\r\n {\r\n System.out.println(\"\\\"\" + JustifiedList.get(i) + \"\\\"\");\r\n }\r\n System.out.println(\"]\");\r\n}", "void printArray(CatalogueItem arr[])\r\n {\r\n int n = arr.length;\r\n for (int i=0; i<n; ++i)\r\n System.out.print(\r\n \"id: \" + arr[i].getItemId() + \" \"\r\n + \"name: \" + arr[i].getItemName() + \" \"\r\n + \"category: \" + arr[i].getCategory() + \"\\n\");\r\n System.out.println();\r\n System.out.println();\r\n }", "public void displayData(int[][] arr);", "public static void printToScreen(List<String> list1){\n\t\tJOptionPane.showMessageDialog(null, \"ArrayList has \" + list1.size() + \" Names\");\n\t\tJOptionPane.showMessageDialog(null, \"Here is the List \" + list1);\n\t}", "private static void showContacts(List<Contact> contactList) {\r\n\t\tcontactList.forEach(System.out::println);\r\n\t}", "@Override\n\tpublic int getCount()\n\t{\n\t\treturn arrayList.size();\n\t}", "public abstract ArrayList<String[]> toStrings();", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tFileInputStream fileInputStream = new FileInputStream(\"G:\\\\Prog\\\\arraylist.txt\");\n\t\t\tint i;\n\t\t\twhile((i = fileInputStream.read()) != -1)\n\t\t\t{\n\t\t\t\tSystem.out.print((char)i);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfileInputStream.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\n\t\n\tList l = new ArrayList();\n\t l.toArray();\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic int getCount() {\n\t\treturn arrayList.size();\r\n\t}", "private static void showList(StringBuffer aBuf,\n String[] aItems, String aStartTag, String aEndTag) {\n aBuf.append(aStartTag).append(NEW_LINE);\n for (int i=0; i<aItems.length; i++) {\n appendLI(aBuf, aItems[i]);\n }\n aBuf.append(aEndTag).append(NEW_LINE);\n}", "public void display()\n {\n System.out.println(�\\n The elements are�);\n for(int i=0; i<n; i++)\n System.out.println(� �+a[i]);\n }", "@Override\n\tpublic int getCount() {\n\t\treturn arrayList.size();\n\t}", "@Override\n\tpublic int getCount() {\n\t\treturn arrayList.size();\n\t}", "public void displayData(String[] str);", "public void list(){\n //loop through all inventory items\n for(int i=0; i<this.items.size(); i++){\n //print listing of each item\n System.out.printf(this.items.get(i).getListing()+\"\\n\");\n }\n }", "private void viewList() {\r\n PrintListMenuView listMenu = new PrintListMenuView();\r\n listMenu.displayMenu();\r\n }", "public static void printList(){\n ui.showToUser(ui.DIVIDER, \"Here are the tasks in your list:\");\n for (int i=0; i<Tasks.size(); ++i){\n Task task = Tasks.get(i);\n Integer taskNumber = i+1;\n ui.showToUser(taskNumber + \".\" + task.toString());\n }\n ui.showToUser(ui.DIVIDER);\n }", "public void list()\n {\n for(Personality objectHolder : pList)\n {\n String toPrint = objectHolder.getDetails();\n System.out.println(toPrint);\n }\n }", "private static void displayItems()\n {\n System.out.println(\"\\n\\tCurrent List of Products in the Store:\\n\");\n for(Sales s : store)\n System.out.println(s.toString());\n }", "private void printArrayList(ArrayList<String> printThis) {\n for(int i = 0; i < printThis.size(); i++) {\n System.out.print(printThis.get(i) + \"\\t\");\n }\n\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"\\nContents of SimpleArray:\\n\" + Arrays.toString(array);\n\t}", "@FXML\n\tprivate void onLoadLogClicked(){\n\n\t\tSystem.out.print(list);\n\t\tString showup = \"\";\n\t\tfor (int index = 0; index < list.size(); index++) {\n\t\t\tshowup += list.get(index)+\" & \"+dat.get(index);\n\t\t\tshowup += \"\\n\";\n\t\t}\n\t\ttextArea.setText(showup);\n\t}", "@Override\n public int getCount() {\n return arrlist.size();\n }", "@Override\n public int getCount() {\n return arrlist.size();\n }", "@Override\n public String toString() {\n return \"ArrayTaskList{\" +\n \"list=\" + Arrays.toString(list) +\n \", currentPos=\" + currentPos +\n \", listLength=\" + listLength +\n '}';\n }", "private void cargarLista(ArrayList<CarritoDTO> arrayList)\n {\n DefaultListModel modelo = new DefaultListModel();\n //Recorrer el contenido del ArrayList\n for(int i=0; i<arrayList.size(); i++) \n {\n CarritoDTO item =(CarritoDTO) arrayList.get(i);\n //Añadir cada elemento del ArrayList en el modelo de la lista\n modelo.add(i, item.toString());\n }\n //Asociar el modelo de lista al JList\n jList1.setModel(modelo);\n }", "private static void testAdd(ArrayList list, int[] content) {\n System.out.print(\"Adding to the list: \");\n for (int index = 0; index < content[index]; index++) {\n list.addToEnd(content);\n } // end for\n System.out.println();\n displayList(list);\n }", "public void show() {\r\n\t\tSystem.out.println(\"Id \\t Name \\t Address\");\r\n\t\t\r\n\t\tfor (int index = 0; index < emp.size(); index++) {\r\n\t\t\tSystem.out.println(emp.get(index).empId + \"\\t\" + emp.get(index).name +\"\\t\" + emp.get(index).adress);\r\n\t\t}\r\n\t}", "public String toString()\n {\n String s = \"\";\n for (int i=0; i<list.length; i++)\n s += i + \":\\t\" + list[i] + \"\\n\";\n return s;\n }", "static void print(List list)\r\n\t{\n\t\tfor(int i= 0; i < list.size(); i++){\r\n\t\t\tSystem.out.println(list.get(i));\r\n\t\t}\r\n\t}", "private void listExample()\n\t{\n\n\t\tArrayList <String> alist = new ArrayList<String>();//doesn't have to be string- can be Duck, or Mouse, or Apostrophe\n\t\talist.add(\"banana\"); //adds \"banana\" to the end of the list\n\t\talist.add(\"strawberry\");\n\t\talist.add(\"blueberry\");\n\t\talist.add(\"blackberry\");\n\t\t\n\t\tJOptionPane.showMessageDialog(null,alist);\n\t\t\n\t\talist.add(2, \"apple\"); //adds it in spot 2 (3rd position)\n\t\t\n\t\tJOptionPane.showMessageDialog(null,alist);\n\t\t\n\t\t\n\t\talist.remove(\"blueberry\"); \n\t\t/**\n\t\t * .remove returns what was in the spot that was just taken out--and shrinks down by one\n\t\t * .set also returns this value but it replaces the value with something else\n\t\t */\n\t\talist.remove(0); //removes 1st element\n\t\tJOptionPane.showMessageDialog(null,alist);\n\t\t\n\t\tfor (String str:alist)\n\t\t\tJOptionPane.showMessageDialog(null, str); //shows each individually\n\t\t\n\t\talist.set(1, \"coconut\"); //alist.set(index, element) --replaces\n\t\t\n\t\tint numberOfItems = alist.size();\n\t\talist.clear();\n\n\t\n\t}", "public ArrayList<String> a(ArrayList<View> arrayList) {\n ArrayList<String> arrayList2 = new ArrayList<>();\n int size = arrayList.size();\n for (int i = 0; i < size; i++) {\n View view = arrayList.get(i);\n arrayList2.add(p.e(view));\n p.a(view, (String) null);\n }\n return arrayList2;\n }", "private static void showList(List<String> list, int offsetX, int offsetY) {\r\n\t\tfor (int i = 1; i <= list.size(); i++) {\r\n\t\t\tGAME.drawTextScreen(offsetX, offsetY + (LINE_HEIGHT * i), list.get(i - 1));\r\n\t\t}\r\n\t}", "@Override\n public String toString(){\n String result = \"\";\n for(int i = 0; i < numItems; i++){\n result += arr[i] + \" \";\n }\n return result;\n }", "public String list() {\n final StringBuilder list = new StringBuilder(\"Here are the tasks in your list:\\n\\t\");\n records.forEach((el) -> list.append(\n String.format(\"%1$d. %2$s \\n\\t\",\n records.indexOf(el) + 1, el.toString())));\n return list.toString();\n }", "public static void listToPrint() {\r\n for (int i = 0; i < ListeElem.size(); i++) {\r\n ListeElem.get(i).toPrint();\r\n }\r\n\r\n }", "public void print_list() {\n \t \n \t//define current node as\n \t node<Type> current_node = new node<>();\n \t \n \t //now keep for loop and print the answer\n \t current_node = head;\n \t \n \t //print first element\n \t System.out.println(current_node.show_element());\n \t \n \t //now run for loop\n \t for (int i = 1 ; i <= len - 1 ; i ++) {\n \t\t \n \t\t //change current node\n \t\t current_node = current_node.show_next();\n \t\t \n \t\t //just print the answer\n \t\t System.out.println(current_node.show_element());\n \t }\n }", "@Override\r\n\tpublic void showList() {\n\t\tSystem.out.println(\"I am a MAC list\");\r\n\t}", "public void printAll(){\nfor(int i=0;i<size ;i++){\n System.out.println(\"a[%d]\"+data[i]); \n}\n System.out.println(\"size\"+size); \n}", "public String toString() {\n\t\treturn list.toString();\n\t}", "public String getDataAsString()\n\t{\n\t\tString listAsString = \"\";\n\t\t\n\t\tfor (int i = 0; i < list.length; i++)\n\t\t{\n\t\t\tlistAsString += list[i] + \" \";\n\t\t}\n\t\t\n\t\tlistAsString += \"\\nFront: \" + front + \"\\nRear: \" +\n\t\t\t\trear + \"\\nEntries: \" + counter;\n\t\t\n\t\treturn listAsString;\n\t}", "public List<String> viewExams() {\n List<String> list = new ArrayList<>();\n if (examList.size() == 0) {\n list.add(\"No Exams have been created yet!\");\n } else {\n for (int i = 0; i < examList.size(); i++) {\n String entry = (i + 1) + \".\" + examList.get(i).toString();\n list.add(entry);\n }\n }\n return list;\n }", "protected void showList(String[] convertLis) {\n sL.register(null, \"INFO\", \"Successful - showList - start\");\n for (int j = convertLis.length - 1; j >= 0; j-- ) {\n listConverting.getListModel().addElement(convertLis[j]);\n }\n sL.register(null, \"INFO\", \"Successful - showList - finished\");\n }", "@Override\n public String toString() {\n return \"SimpleArrayList{\"\n + \"values=\" + Arrays.toString(values)\n + '}';\n }", "public void displayData();", "private static void showList(ArrayList<? extends Machine> list) {\n System.out.println(\"In showlist method\");\n for(Machine machine: list) {\n System.out.println(machine);\n }\n\n }", "void showFacts(List<Fact> facts);", "public String display(){\n StringBuilder str = new StringBuilder();\n\n for(int i = 0; i < 3; ++i){\n if( Array[i] != null ) {\n str.append('\\n' + Names[i] + '\\n');\n str.append(Array[i].display());\n }\n }\n return str.toString();\n }", "public void show() {\n numberList.show();\n }", "public static void showNodeArrayList(ArrayList<Node> arr)\n {\n for (int i = 0; i < arr.size(); i++)\n {\n Node node = arr.get(i);\n System.out.format(\"Element #%d = [%s]%n\", i, node.getNodeID());\n } //for\n\n }", "@Override\n public void showListOfAudioFiles(ArrayList<AudioModel> audioModelArrayList) {\n }", "public static void printContactList()\n {\n if(myList.size() < 1)\n System.out.println(\"~empty list~\");\n else\n {\n System.out.println(\"Current Items\");\n System.out.println(\"-------------\");\n for(int i = 0; i < myList.size(); i++)\n {\n System.out.printf(i+\")\");\n Item itemPrint = myList.get(i);\n itemPrint.printItem(itemPrint.getFirstName(), itemPrint.getLastName(), itemPrint.getPhoneNumber(), itemPrint.getEmail());\n }\n }\n }", "public S<T> list(String[] data){\n\t\tif(t instanceof ListView){\n\t\t\t\n\t\t\t((ListView) t).setAdapter(new ArrayAdapter<String>(activity,\n\t\t android.R.layout.simple_list_item_1, android.R.id.text1, data));\n\t\t}\n\t\treturn this;\n\t}" ]
[ "0.80565214", "0.72794485", "0.6774054", "0.664965", "0.6575048", "0.6529514", "0.6470372", "0.6445237", "0.6406743", "0.6352501", "0.6270823", "0.6262646", "0.62527835", "0.62398005", "0.6212774", "0.6204973", "0.61948156", "0.6185194", "0.61632067", "0.6142287", "0.61299276", "0.60963213", "0.6092055", "0.6062058", "0.60579544", "0.60528755", "0.60458803", "0.6035733", "0.60321635", "0.6030074", "0.6027708", "0.60263306", "0.6020302", "0.60167605", "0.59994596", "0.5978091", "0.5971012", "0.59558547", "0.59519476", "0.5945913", "0.5941557", "0.5939915", "0.5939503", "0.59265834", "0.59224606", "0.591512", "0.589726", "0.58956605", "0.5857208", "0.58420384", "0.5833531", "0.58315074", "0.5831038", "0.5827874", "0.57976305", "0.5795035", "0.57873124", "0.57856107", "0.5780845", "0.5780845", "0.5780735", "0.57782537", "0.5774336", "0.57704633", "0.5769175", "0.5764547", "0.576031", "0.57452595", "0.5744618", "0.57295007", "0.57295007", "0.57272565", "0.57147944", "0.57121956", "0.5707798", "0.5705244", "0.57008934", "0.57007605", "0.5697824", "0.5696635", "0.569015", "0.5689777", "0.5685514", "0.5677598", "0.56716293", "0.5671268", "0.5671191", "0.56689197", "0.56627256", "0.56507033", "0.56483006", "0.56433296", "0.56386596", "0.56181043", "0.561612", "0.56122553", "0.561001", "0.56062937", "0.5604426", "0.5598621" ]
0.5993302
35
method show the content of an map.
public static <K,V> void showMap(Map<K,V> map) { System.out.println("..........................................."); int index = 0; for (Entry<?, ?> e : map.entrySet()) System.out.format("#%5d K = [%-15s] V = %s%n", index++, e.getKey(), e.getValue()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printMap() {\n String s = \"\";\n Stack st = new Stack();\n st.addAll(map.entrySet());\n while (!st.isEmpty()) {\n s += st.pop().toString() + \"\\n\";\n }\n window.getDHTText().setText(s);\n }", "public void displayMap() {\n MapMenuView mapMenu = new MapMenuView();\r\n mapMenu.display();\r\n \r\n }", "private static void showMap() {\n\t\tSet<Point> pointSet = map.keySet();\n\t\tfor (Point p : pointSet) {\n\t\t\tSystem.out.println(map.get(p));\n\t\t}\n\t}", "protected void showMap() {\n \t\t\n \t\tApplicationData applicationData;\n \t\ttry {\n \t\t\tapplicationData = ApplicationData.readApplicationData(this);\n \t\t\tif(applicationData != null){\n \t\t\t\tIntent intent = getIntent();\n \t\t\t\tNextLevel nextLevel = (NextLevel)intent.getSerializableExtra(ApplicationData.NEXT_LEVEL_TAG);\n \t\t\t\tAppLevelDataItem item = applicationData.getDataItem(this, nextLevel);\t\t\t\t\n \t\t\t\t\n \t\t\t\tif(Utils.hasLength(item.getGeoReferencia())){\n \t\t\t\t\tString urlString = \"http://maps.google.com/maps?q=\" + item.getGeoReferencia() + \"&near=Madrid,Espa�a\";\n \t\t\t\t\tIntent browserIntent = new Intent(\"android.intent.action.VIEW\", \n \t\t\t\t\t\t\tUri.parse(urlString ));\n \t\t\t\t\tstartActivity(browserIntent);\n \t\t\t\t}\n \t\t\t}\n \t\t} catch (InvalidFileException e) {\n \t\t}\n \t}", "private void viewMap() {\r\n \r\n // Get the current game \r\n theGame = cityofaaron.CityOfAaron.getTheGame();\r\n \r\n // Get the map \r\n Map map = theGame.getMap();\r\n Location locations = null;\r\n \r\n // Print the map's title\r\n System.out.println(\"\\n*** Map: CITY OF AARON and Surrounding Area ***\\n\");\r\n // Print the column numbers \r\n System.out.println(\" 1 2 3 4 5\");\r\n // for every row:\r\n for (int i = 0; i < max; i++){\r\n // Print a row divider\r\n System.out.println(\" -------------------------------\");\r\n // Print the row number\r\n System.out.print((i + 1) + \" \");\r\n // for every column:\r\n for(int j = 0; j<max; j++){\r\n // Print a column divider\r\n System.out.print(\"|\");\r\n // Get the symbols and locations(row, column) for the map\r\n locations = map.getLocation(i, j);\r\n System.out.print(\" \" + locations.getSymbol() + \" \");\r\n }\r\n // Print the ending column divider\r\n System.out.println(\"|\");\r\n }\r\n // Print the ending row divider\r\n System.out.println(\" -------------------------------\\n\");\r\n \r\n // Print a key for the map\r\n System.out.println(\"Key:\\n\" + \"|=| - Temple\\n\" + \"~~~ - River\\n\" \r\n + \"!!! - Farmland\\n\" + \"^^^ - Mountains\\n\" + \"[*] - Playground\\n\" \r\n + \"$$$ - Capital \" + \"City of Aaron\\n\" + \"### - Chief Judge/Courthouse\\n\" \r\n + \"YYY - Forest\\n\" + \"TTT - Toolshed\\n\" +\"xxx - Pasture with \"\r\n + \"Animals\\n\" + \"+++ - Storehouse\\n\" +\">>> - Undeveloped Land\\n\");\r\n }", "public void DisplayMap(Map<String,Object> display){\n\t\tSet set=display.entrySet();\n\t\tIterator i=set.iterator();\n\t\twhile(i.hasNext()){\n\t\t\tMap.Entry me = (Map.Entry)i.next();\n\t\t\tSystem.out.println(me.getKey()+\" \"+me.getValue());\n\t\t}\n\t}", "public void showMap() {\n//\t\tSystem.out.print(\" \");\n//\t\tfor (int i = 0; i < maxY; i++) {\n//\t\t\tSystem.out.print(i);\n//\t\t\tSystem.out.print(' ');\n//\t\t}\n\t\tSystem.out.println();\n\t\tfor (int i = 0; i < maxX; i++) {\n//\t\t\tSystem.out.print(i + \" \");\n\t\t\tfor (int j = 0; j < maxY; j++) {\n\t\t\t\tSystem.out.print(coveredMap[i][j]);\n\t\t\t\tSystem.out.print(' ');\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void printMap()\n {\n this.mapFrame.paint();\n this.miniMapFrame.paint();\n }", "@Override\r\n public void mapshow() {\r\n showMap l_showmap = new showMap(d_playerList, d_country);\r\n l_showmap.check();\r\n }", "public void setShowMap( boolean show )\r\n {\r\n showMap = show;\r\n }", "public void printMap() {\n\t\tmap.printMap();\n\t}", "public void printMap(GameMap map);", "public void displaymap(AircraftData data);", "public MapDisplay getMap(){\n\t\treturn map; //gibt die Karte zurück\n\t}", "public void showmap() {\n MapForm frame = new MapForm(this.mapLayout);\n frame.setSize(750, 540);\n frame.setLocationRelativeTo(null);\n frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);\n frame.setVisible(true);\n }", "public boolean getShowMap()\r\n {\r\n return showMap;\r\n }", "@Override\n\tpublic void drawMap(Map map) {\n\t\tSystem.out.println(\"Draw map\"+map.getClass().getName()+\"on SD Screen\");\n\t}", "public void printMiniMap() \n { \n /* this.miniMapFrame(); */\n }", "public void printMap()\n {\n if(this.firstTime)\n {\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() { setVisible(true); }\n });\n this.firstTime = false;\n }\n screen.repaint();\n }", "private void printMap() {\n\t\tfor(Integer key: location.keySet()){\n\t\t\tString val= location.get(key).toString();\n\t\t\tSystem.out.println(\"(\" + key.toString() + \", \" + val+ \")\");\n\t\t}\n\t}", "public void printMiniMap() { }", "public void display(){\n\t\tfor (Entry<String, Map<String, Integer>> entry : collocationMap.entrySet()){\n\t\t for (Entry<String, Integer> subEntry : entry.getValue().entrySet()){\n\t\t\t System.out.println(entry.getKey() + \" \" + subEntry.getKey() + \": \" + subEntry.getValue());\n\t\t }\n\t\t}\n\t}", "public void mapToString() {\r\n for (Square[] x : map) {\r\n for (Square y : x) {\r\n System.out.print(y.getVisual() + \" \");\r\n }\r\n System.out.println();\r\n }\r\n }", "public String showLocationContent() {\n\t\tContent content = null;\n printHeader();\n \n\t\tfor (Map.Entry<Integer, List<Content>> entry : contentMap.entrySet()) {\n\t\t\tList<Content> contentLst = entry.getValue();\n\n\t\t\tfor (int i = 0; i < contentListCapacity; i++) {\n\t\t\t\tif (contentLst == null)\n\t\t\t\t\tprintEmptyPlaceHolder(contentListCapacity);\n\t\t\t\telse {\n\t\t\t\t\tcontent = i < contentLst.size() ? contentLst.get(i) : null;\n\t\t\t\t\tif (content == null)\n\t\t\t\t\t\tSystem.out.printf(\"%5s\",\"\");\n\t\t\t\t\telse\n\t\t\t\t\t\tSystem.out.printf(\"%5s\",content.getBarcode() );\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\treturn \" Smart Robot Arm! \";\n\n\t}", "public String display(PlayMap aPlayMap) {\r\n String tmpOutput = \"\";\r\n Field tmpField;\r\n \r\n tmpOutput = \"<div class=\\\"map\\\" id=\\\"map\\\" style=\\\"width:\" + aPlayMap.getXDimension() * 34.75 + \"px; \";\r\n tmpOutput += \"height:\" + aPlayMap.getYDimension() * 34.75 + \"px;\\\">\\n\";\r\n // loop for row\r\n for (int i = 0; i < aPlayMap.getYDimension(); i++) {\r\n // loop for column\r\n for (int j = 0; j < aPlayMap.getXDimension(); j++) {\r\n tmpField = aPlayMap.getField(j, i);\r\n tmpOutput += \"<div id=\\\"\" + j + \"/\" + i + \"\\\" \";\r\n try {\r\n tmpOutput += \"class=\\\"field \" + Ground.getGroundLabeling(tmpField.getGround()) + \"\\\" \";\r\n } catch (UnknownFieldGroundException e) {\r\n e.printStackTrace();\r\n }\r\n Placeable tmpSetter = tmpField.getSetter();\r\n String tmpColor = new String (\"#000000\");\r\n String tmpPlacable = new String (\"item\");\r\n if (tmpSetter != null) {\r\n if (tmpSetter instanceof Figure) {\r\n tmpColor = new String();\r\n switch (tmpField.getSetter().getId()) {\r\n case 'A':\r\n tmpColor = \"#ff0000\";\r\n break;\r\n case 'B':\r\n tmpColor = \"#0000ff\";\r\n break;\r\n }\r\n tmpPlacable = \"figure\";\r\n }\r\n tmpOutput += \"onClick=\\\"checkUserAction(this);\\\" \";\r\n tmpOutput += \"onMouseOver=\\\"hoverOn(this);\\\" onMouseOut=\\\"hoverOff(this);\\\" status=\\\"placed\\\" filled=\\\"\" + tmpPlacable + \"\\\" placablecolor=\\\"\" + tmpColor + \"\\\" >\";\r\n String tmpImage = tmpSetter.getImage();\r\n tmpOutput += \"<img src=\\\"resources/pictures/\" + tmpImage + \"\\\">\";\r\n } else {\r\n tmpOutput += \"onClick=\\\"checkUserAction(this);\\\" \";\r\n tmpOutput += \"onMouseOver=\\\"hoverOn(this);\\\" onMouseOut=\\\"hoverOff(this);\\\" status=\\\"empty\\\" filled=\\\"no\\\" placablecolor=\\\"#000000\\\" >\";\r\n }\r\n tmpOutput += \"</div>\\n\";\r\n }\r\n }\r\n tmpOutput += \"</div>\\n\";\r\n\r\n return tmpOutput;\r\n }", "void display(Map m) {\r\n\t\tm.tour = this;\r\n\t\tm.update(m.getGraphics());\r\n\t}", "public String toString()\n {\n return super.toString() + \":\\n\" + getMap();\n }", "public void showRestaurantDetail(Map<String, Object> objectMap);", "public void showContent() {\n\n mapView.setVisibility(View.VISIBLE);\n loadingLayout.setVisibility(View.GONE);\n errorLayout.setVisibility(View.GONE);\n\n }", "private void readMap( Map<String, String> map ) {\n\t\t\n\t\tSet<Map.Entry<String, String>> set = map.entrySet();\n\t\t\n\t\tfor( Map.Entry<String, String> entry : set ) {\n\t\t\tSystem.out.printf( \"'%1$-10s' '%2$20s' %n\", entry.getKey(), entry.getValue() );\n\t\t}\n\t\t\n\t}", "public void printMap(int[][] map) {\n \tfor(int i = 7; i >= 0; i--) {\n \t\tfor(int j = 0; j < 8; j++) {\n \t\t\tSystem.out.print(\"\"+map[i][j]+\"\\t\");\n \t\t}\n \t\tSystem.out.println();\n \t}\n }", "private ImageIcon displayMap(int mapZoomLevel, Map map) {\n try {\n ImageIcon mapImage = new ImageIcon((new ImageIcon(map.getMap(mapZoomLevel))).getImage().getScaledInstance(700,450,java.awt.Image.SCALE_SMOOTH));\n return mapImage; \n\n } catch(Exception e) {\n return null; \n }\n }", "public void printMap(){\n\n for (Tile [] tile_row : this.layout)\n {\n for (Tile tile : tile_row)\n {\n if (tile.isShelf()){\n System.out.print(\" R \");\n }\n else if (tile.isDP()){\n System.out.print(\" D \");\n }\n\n else {\n System.out.print(\" * \");\n }\n\n }\n System.out.println();\n }\n\n }", "public static final SourceModel.Expr showJMap(SourceModel.Expr map) {\n\t\t\treturn \n\t\t\t\tSourceModel.Expr.Application.make(\n\t\t\t\t\tnew SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.showJMap), map});\n\t\t}", "static void printTheSpecifiedMap(MapLM mapToPrint){\n List<List<List<Ansi>>> mapAnsi = mapLMToAnsi(mapToPrint.getMap());\n for(int mapRow = 0; mapRow < GeneralInfo.ROWS_MAP; mapRow++){\n /*mapAnsi.get(mapRow).get(0) is the first square of the current mapRow,\n assuming the other squares on the same mapRow have the same\n number of rows (in other words, the same .size())\n */\n for(int squareRow=0; squareRow < mapAnsi.get(mapRow).get(0).size() ; squareRow++){\n //for each square on the specified mapRow(mapRow is a list of squares)\n for(List<Ansi> square: mapAnsi.get(mapRow)){\n AnsiConsole.out.print(square.get(squareRow));\n /*after the last character of the second line of the last square of\n each row of the map, print the corresponding vertical coordinate\n */\n if((/*last square of the foreach*/ square.equals(mapAnsi.get(mapRow).get(mapAnsi.get(mapRow).size()-1)))\n && squareRow == 1){\n //print vertical coordinate coordinate\n System.out.print(\" \" + verticalCoordinateForUser(mapRow));\n }\n }\n /*after printing the whole specified line of the map (the specified line of all\n the squares on the specified row of squares of the map), start a new line\n */\n System.out.print(\"\\n\");\n }\n }\n //print horizontal coordinates\n System.out.print(\"\\n\");\n for(int i=0; i < GeneralInfo.COLUMNS_MAP; i++){\n System.out.print(\" \" + horizontalCoordinateForUser(i) + \" \");\n }\n }", "public void printDetailedMap(GameMap map, List<String> playersNames);", "private static void showMap(LinkedList<String> addresses, LinkedList<String> refAddresses, LinkedList<String> comments){\n\t\t\n\t\tString url = null;\n\t\t\n\t\t\tFile f = new File (\"plugins/connectors/googleMaps/bin/tuc/apon/googleMaps/gmaps2.html\");\n//\t\t\tf.deleteOnExit();\n\t\t\ttry {\n\t\t\t\tWriter output = new BufferedWriter(new FileWriter(f));\n\t\t\t\toutput.write(\"<%@page contentType=\\\"text/html\\\" pageEncoding=\\\"UTF-8\\\"%>\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"<!DOCTYPE html \\\"-//W3C//DTD XHTML 1.0 Strict//EN\\\"\\n\");\n\t\t\t\toutput.write(\"\\t\\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\\\">\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t<html>\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t<head>\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t<meta http-equiv=\\\"content-type\\\" content=\\\"text/html; charset=utf-8\\\"/>\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t<title>Google Maps</title>\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t<script src=\\\"http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAehEtphK7nLd2bfjGnoeamRT2yXp_ZAY8_ufC3CFXhHIE1NvwkxRt67OEH9Y01Qjh2XRhCjBABPhfYg&sensor=false\\\"\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\ttype=\\\"text/javascript\\\"></script>\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t<script type=\\\"text/javascript\\\">\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\tvar map = null;\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\tvar geocoder = null;\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\tfunction initialize() {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tif (GBrowserIsCompatible()) {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tmap = new GMap2(document.getElementById(\\\"map_canvas\\\"));\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tmap.setCenter(new GLatLng(35.517321015720384, 24.02161180973053), 13)\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tmap.setUIToDefault();\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tgeocoder = new GClientGeocoder();\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t}\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tvar addresses=new Array(\");\n\t\t\t\tfor(int i=0;i<addresses.size();i++){\n\t\t\t\t\tString addr = addresses.get(i);\n\t\t\t\t\toutput.write(\"\\\"\"+addr+\"\\\"\");\n\t\t\t\t\tif(i != addresses.size()-1) output.write(\",\");\n\t\t\t\t}\n\t\t\t\toutput.write(\");\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tvar comments=new Array(\");\n\t\t\t\tfor(int i=0;i<addresses.size();i++){\t//this is done so that comments' array \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//is the same size with addresses array\n\t\t\t\t\tString comnt = \"\";\n\t\t\t\t\tif(i<comments.size())\n\t\t\t\t\t\tcomnt = comments.get(i);\n\t\t\t\t\toutput.write(\"\\\"\"+comnt+\"\\\"\");\n\t\t\t\t\tif(i != addresses.size()-1) output.write(\",\");\n\t\t\t\t}\n\t\t\t\toutput.write(\");\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tvar refAddresses=new Array(\");\n\t\t\t\tfor(int i=0;i<refAddresses.size();i++){\n\t\t\t\t\tString addr = refAddresses.get(i);\n\t\t\t\t\toutput.write(\"\\\"\"+addr+\"\\\"\");\n\t\t\t\t\tif(i != refAddresses.size()-1) output.write(\",\");\n\t\t\t\t}\n\t\t\t\toutput.write(\");\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tvar refComments=new Array(\");\n\t\t\t\tfor(int i=0;i<refAddresses.size();i++){\t//this is done so that comments' array \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//is the same size with addresses array\n\t\t\t\t\tString comnt = \"\";\n\t\t\t\t\toutput.write(\"\\\"\"+comnt+\"\\\"\");\n\t\t\t\t\tif(i != refAddresses.size()-1) output.write(\",\");\n\t\t\t\t}\n\t\t\t\toutput.write(\");\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tfor(i = 0; i < addresses.length; i++){\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tshowAddress(addresses[i],comments[i],0);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t}\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tfor(i = 0; i < refAddresses.length; i++){\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tshowAddress(refAddresses[i],refComments[i],1);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t}\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tfunction showAddress(address, comments,blue) {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tif (geocoder) {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\tgeocoder.getLatLng(\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\taddress,\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\tfunction(point) {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif (!point && i < addresses.length) {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\talert(address + \\\" not found\\\");\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t} else {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tmap.setCenter(point, 13);\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tvar baseIcon = new GIcon(G_DEFAULT_ICON);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbaseIcon.shadow = \\\"http://www.google.com/mapfiles/shadow50.png\\\";\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbaseIcon.iconSize = new GSize(20, 34);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbaseIcon.shadowSize = new GSize(37, 34);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbaseIcon.iconAnchor = new GPoint(9, 34);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbaseIcon.infoWindowAnchor = new GPoint(9, 2);\\n\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif(blue==1)\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbaseIcon.image=\\\"markers/marker_blue.png\\\";\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\telse\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbaseIcon.image=\\\"markers/marker.png\\\";\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tvar numberedIcon = new GIcon(baseIcon);\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tmarkerOptions = { icon:numberedIcon };\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tvar marker = new GMarker(point, markerOptions);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tmap.addOverlay(marker);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tGEvent.addListener(marker, \\\"click\\\", function(){\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tmarker.openInfoWindowHtml(address.replace(/\\\\+/g, \\\" \\\")+\\\"<br>\\\"+comments);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t});\\n\");\n\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t}\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t}\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t}\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t</script>\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t</head>\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t<body onload=\\\"initialize()\\\" onunload=\\\"GUnload()\\\">\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t<div id=\\\"map_canvas\\\" style=\\\"width: 800px; height: 600px\\\"></div>\\n\");\n\t\t\t\toutput.write(\"\\t\\t</body>\\n\");\n\t\t\t\toutput.write(\"\\t</html>\\n\");\n\t\t\t\t\n\t\t\t\toutput.close();\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\turl = \"file://\"+f.getAbsolutePath();\n\t\t\n\t\t\n\t\tif( !java.awt.Desktop.isDesktopSupported() ) {\n\n System.err.println( \"Desktop is not supported (fatal)\" );\n System.exit( 1 );\n }\n\n java.awt.Desktop desktop = java.awt.Desktop.getDesktop();\n\n if( !desktop.isSupported( java.awt.Desktop.Action.BROWSE ) ) {\n\n System.err.println( \"Desktop doesn't support the browse action (fatal)\" );\n System.exit( 1 );\n }\n\n try {\n \t/*\n \t * if all ok, making a URI from the URL and feeding it\n \t * to the platform's default browser \n \t */\n \tjava.net.URI uri = new java.net.URI(url);\n desktop.browse( uri );\n }\n catch ( Exception e ) {\n System.err.println( e.getMessage() );\n e.printStackTrace();\n }\n\t\t\n\t}", "public void show(int i){\n if (i == 0){\n this.showmap();\n } else \n this.showfigure();\n }", "private static void showMap(LinkedList<String> addresses, LinkedList<String> comments, boolean refAddr){\n\t\t\n\t\tString url = null;\n\t\t\n\t\t\tFile f = new File (\"plugins/connectors/googleMaps/bin/tuc/apon/googleMaps/gmaps2.html\");\n//\t\t\tf.deleteOnExit();\n\t\t\ttry {\n\t\t\t\tWriter output = new BufferedWriter(new FileWriter(f));\n\t\t\t\toutput.write(\"<%@page contentType=\\\"text/html\\\" pageEncoding=\\\"UTF-8\\\"%>\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"<!DOCTYPE html \\\"-//W3C//DTD XHTML 1.0 Strict//EN\\\"\\n\");\n\t\t\t\toutput.write(\"\\t\\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\\\">\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t<html>\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t<head>\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t<meta http-equiv=\\\"content-type\\\" content=\\\"text/html; charset=utf-8\\\"/>\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t<title>Google Maps</title>\\n\");\n\t\t\t\t//insert your google code API key here\n\t\t\t\toutput.write(\"\\t\\t\\t\\t<script src=\\\"http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAehEtphK7nLd2bfjGnoeamRT2yXp_ZAY8_ufC3CFXhHIE1NvwkxRt67OEH9Y01Qjh2XRhCjBABPhfYg&sensor=false\\\"\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\ttype=\\\"text/javascript\\\"></script>\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t<script type=\\\"text/javascript\\\">\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\tvar map = null;\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\tvar geocoder = null;\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\tfunction initialize() {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tif (GBrowserIsCompatible()) {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tmap = new GMap2(document.getElementById(\\\"map_canvas\\\"));\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tmap.setCenter(new GLatLng(35.517321015720384, 24.02161180973053), 13)\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tmap.setUIToDefault();\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tgeocoder = new GClientGeocoder();\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t}\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tvar addresses=new Array(\");\n\t\t\t\tfor(int i=0;i<addresses.size();i++){\n\t\t\t\t\tString addr = addresses.get(i);\n\t\t\t\t\toutput.write(\"\\\"\"+addr+\"\\\"\");\n\t\t\t\t\tif(i != addresses.size()-1) output.write(\",\");\n\t\t\t\t}\n\t\t\t\toutput.write(\");\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tvar comments=new Array(\");\n\t\t\t\tfor(int i=0;i<addresses.size();i++){\t//this is done so that comments' array \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//is the same size with addresses array\n\t\t\t\t\tString comnt = \"\";\n\t\t\t\t\tif(i<comments.size())\n\t\t\t\t\t\tcomnt = comments.get(i);\n\t\t\t\t\toutput.write(\"\\\"\"+comnt+\"\\\"\");\n\t\t\t\t\tif(i != addresses.size()-1) output.write(\",\");\n\t\t\t\t}\n\t\t\t\toutput.write(\");\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tfor(i = 0; i < addresses.length; i++){\\n\");\n\t\t\t\tif(!refAddr){\n\t\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tshowAddress(addresses[i],i,comments[i],0);\\n\");\n\t\t\t\t}else{\n\t\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tif(i==(addresses.length-1)){\\n\");\n\t\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\tshowAddress(addresses[i],i,comments[i],1);\\n\");\n\t\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t}else{\\n\");\n\t\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\tshowAddress(addresses[i],i,comments[i],0);\\n\");\n\t\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t}\\n\");\n\t\t\t\t}\n//\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tshowAddress(addresses[i],i,comments[i]);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t}\\n\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tfunction showAddress(address, index,comments,blue) {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tif (geocoder) {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\tgeocoder.getLatLng(\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\taddress,\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\tfunction(point) {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif (!point && i < addresses.length) {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\talert(address + \\\" not found\\\");\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t} else {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tmap.setCenter(point, 13);\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tvar letter = String.fromCharCode(\\\"A\\\".charCodeAt(0) + index);\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tvar baseIcon = new GIcon(G_DEFAULT_ICON);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbaseIcon.shadow = \\\"http://www.google.com/mapfiles/shadow50.png\\\";\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbaseIcon.iconSize = new GSize(20, 34);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbaseIcon.shadowSize = new GSize(37, 34);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbaseIcon.iconAnchor = new GPoint(9, 34);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbaseIcon.infoWindowAnchor = new GPoint(9, 2);\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tvar letteredIcon = new GIcon(baseIcon);\\n\");\n//\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tletteredIcon.image = \\\"http://www.google.com/mapfiles/marker\\\" + letter + \\\".png\\\";\\n\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif(blue==1){\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tletteredIcon.image = \\\"markers/marker_blue.png\\\";\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\telse{\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tletteredIcon.image = \\\"markers/marker.png\\\";\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\n\");\n\t\t\t\t/*\n\t\t\t\t * var letteredIcon = new GIcon(baseIcon);\n letteredIcon.image = \"http://www.google.com/mapfiles/marker\" + letter + \".png\";\n\t\t\t\t */\n\t\t\t\t//output.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tletteredIcon.image = \\\"markers/marker_blue.png\\\";\\n\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tmarkerOptions = { icon:letteredIcon };\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tvar marker = new GMarker(point, markerOptions);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tmap.addOverlay(marker);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tGEvent.addListener(marker, \\\"click\\\", function(){\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tmarker.openInfoWindowHtml(address.replace(/\\\\+/g, \\\" \\\")+\\\"<br>\\\"+comments);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t});\\n\");\n\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t}\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t}\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t}\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t</script>\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t</head>\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t<body onload=\\\"initialize()\\\" onunload=\\\"GUnload()\\\">\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t<div id=\\\"map_canvas\\\" style=\\\"width: 800px; height: 600px\\\"></div>\\n\");\n\t\t\t\toutput.write(\"\\t\\t</body>\\n\");\n\t\t\t\toutput.write(\"\\t</html>\\n\");\n\t\t\t\t\n\t\t\t\toutput.close();\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\turl = \"file://\"+f.getAbsolutePath();\n\t\t\n\t\t\n\t\tif( !java.awt.Desktop.isDesktopSupported() ) {\n\n System.err.println( \"Desktop is not supported (fatal)\" );\n System.exit( 1 );\n }\n\n java.awt.Desktop desktop = java.awt.Desktop.getDesktop();\n\n if( !desktop.isSupported( java.awt.Desktop.Action.BROWSE ) ) {\n\n System.err.println( \"Desktop doesn't support the browse action (fatal)\" );\n System.exit( 1 );\n }\n\n try {\n \t/*\n \t * if all ok, making a URI from the URL and feeding it\n \t * to the platform's default browser \n \t */\n \tjava.net.URI uri = new java.net.URI(url);\n desktop.browse( uri );\n }\n catch ( Exception e ) {\n System.err.println( e.getMessage() );\n e.printStackTrace();\n }\t\t\n\t}", "public static void printMap(Map<Integer,Double> map){\n\t\tfor (Map.Entry entry : map.entrySet())\n\t\t\tSystem.out.println(\"Key : \" + entry.getKey()+ \" Value : \" + entry.getValue());\n\t}", "void toConsole(IMap map);", "public void printMappings() {\t\n\t\tSystem.out.println(\"Printing rowsMap. \");\n\t\tfor (Map.Entry<String, String> entry : rowMap.entrySet()) {\n\t\t System.out.println(entry);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Printing columnMap. \");\n\t\tfor (Map.Entry<String, String> entry : columnMap.entrySet()) {\n\t\t System.out.println(entry);\n\t\t}\n\t}", "public List<String> portalShow(Map<String, String> map) {\n\t\treturn apMessageDao.portalShow(map);\r\n\t}", "@Override\n\tpublic void printFilteredMap() {\n\t\tthis.result.forEach((k, v )-> v.forEach((ke,ve) -> ve.forEach((s) -> System.out.println(k + \" : \"+ ke + \" : \"+ s))));\n\n\t}", "@Override\r\n public void ShowMaps() throws Exception {\r\n printInvalidCommandMessage();\r\n }", "public void showMapTypePanel(){\n mapTypePanel.showMapTypePanel();\n if(mapTypePanel.isVisible() && optionsPanel.isVisible()){\n optionsPanel.setVisible(false);\n if(iconPanel.isVisible()) iconPanel.setVisible(false);\n }\n if(routePanel.isVisible()) routePanel.setVisible(false); closeDirectionList();\n canvas.repaint();\n }", "public void display() {\n MyMapNode current = head;\n if (head == null) {\n System.out.println(\"List is empty\");\n return;\n }\n while (current != null) {\n //Prints each node by incrementing pointer\n System.out.print(current.data + \" \");\n current = current.next;\n }\n System.out.println();\n }", "public void ShowAll (View paramView)\n\t{\n\t\tfinal MapView mapView = (MapView) findViewById(R.id.mapView);\n\n\n\t\tmapView.getOverlays().clear();\n\t\titemizedoverlay.clear();\n\t\tmapView.setBuiltInZoomControls(false);\n\n\t\t// add our position to map\n\t\tmapView.getOverlays().add(myLocationOverlay);\n\t\tmapView.postInvalidate();\n\n\t\tfinal List<Overlay> mapOverlays = mapView.getOverlays();\n\t\tmyLocationOverlay.enableMyLocation();\n\n\t\t// add our position to map and refresh it\n\t\tmapView.getOverlays().add(myLocationOverlay);\n\t\tmapView.postInvalidate();\n\t\tmyLocationOverlay.enableMyLocation();\n\n\t\t// add all points from list to map\n\t\tfor(int i = 0; i<MiejscaArray.length; i++)\n\t\t{\t\n\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\tHashMap MojaMapa = (HashMap) MiejscaArray[i];\n\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\tHashMap MyMap = (HashMap) MojaMapa.get(\"Category\");\n\t\t\tSystem.out.println(MojaMapa);\n\n\t\t\tfloat Lat = Float.parseFloat(\"\"+MojaMapa.get(\"latitude\"));\n\t\t\tfloat Long = Float.parseFloat(\"\"+MojaMapa.get(\"longitude\"));\n\t\t\tint MicroLat = (int) (Lat*1e6);\n\t\t\tint MicroLong = (int) (Long*1e6);\n\n\t\t\tGeoPoint point = new GeoPoint(MicroLat, MicroLong);\n\t\t\tMyOverlayItem overlayitem = new MyOverlayItem(point, \n\t\t\t\t\t\"\"+i, \n\t\t\t\t\t\"\"+category, \n\t\t\t\t\t\"\"+MojaMapa.get(\"address\"),\n\t\t\t\t\t\"\"+MojaMapa.get(\"city\"),\n\t\t\t\t\t\"\"+MojaMapa.get(\"zip_code\"),\n\t\t\t\t\t\"\"+MojaMapa.get(\"country\"),\n\t\t\t\t\tString.format(\"%.2f\", Float.parseFloat(MojaMapa.get(\"kilometers\").toString())),\n\t\t\t\t\t\"\"+MojaMapa.get(\"latitude\"),\n\t\t\t\t\t\"\"+MojaMapa.get(\"longitude\"),\n\t\t\t\t\t\"\"+MyMap.get(\"icon\"), \n\t\t\t\t\tLat+\",\"+Long);\n\n\t\t\tSetDrawable(\"\"+MyMap.get(\"icon\"), \"\"+MyMap.get(\"color\"));\n\t\t\titemizedoverlay = new HelloItemizedOverlay(drawable, this);\n\t\t\titemizedoverlay.addOverlay(overlayitem);\n\t\t\tmapOverlays.add(itemizedoverlay);\n\t\t}\n\n\t\t// Remove WebView and place MapView in his place\n\t\tWebView webView = (WebView) findViewById(R.id.webView);\n\t\twebView.setVisibility(View.GONE);\n\n\t\tmylistView =(ListView)findViewById(android.R.id.list);\n\n\t\tif (isThisTablet == false)\n\t\t{\n\t\t\tmylistView.setVisibility(View.GONE);\n\t\t\tmapView.setVisibility(View.VISIBLE);\n\n\t\t\tButton Mapbutton = (Button) findViewById(R.id.map_button);\n\t\t\tMapbutton.setBackgroundColor(Color.BLUE);\n\n\t\t\tButton ListButton = (Button) findViewById(R.id.list_button);\n\t\t\tListButton.setBackgroundColor(Color.rgb(192, 192, 192));\n\n\t\t\tButton SzczeButton = (Button) findViewById(R.id.szczegoly_button);\n\t\t\tSzczeButton.setBackgroundColor(Color.rgb(192, 192, 192));\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Button Mapbutton = (Button) findViewById(R.id.map);\n\t\t\t//Mapbutton.setVisibility(View.GONE);\n\n\t\t\t//Button Szczebutton = (Button) findViewById(R.id.szczegoly);\n\t\t\t//Szczebutton.setVisibility(View.VISIBLE);\n\n\t\t\tmapView.setVisibility(View.VISIBLE);\t\n\t\t}\n\t}", "public void drawMap() {\r\n\t\tfor (int x = 0; x < map.dimensionsx; x++) {\r\n\t\t\tfor (int y = 0; y < map.dimensionsy; y++) {\r\n\t\t\t\tRectangle rect = new Rectangle(x * scalingFactor, y * scalingFactor, scalingFactor, scalingFactor);\r\n\t\t\t\trect.setStroke(Color.BLACK);\r\n\t\t\t\tif (islandMap[x][y]) {\r\n\t\t\t\t\tImage isl = new Image(\"island.jpg\", 50, 50, true, true);\r\n\t\t\t\t\tislandIV = new ImageView(isl);\r\n\t\t\t\t\tislandIV.setX(x * scalingFactor);\r\n\t\t\t\t\tislandIV.setY(y * scalingFactor);\r\n\t\t\t\t\troot.getChildren().add(islandIV);\r\n\t\t\t\t} else {\r\n\t\t\t\t\trect.setFill(Color.PALETURQUOISE);\r\n\t\t\t\t\troot.getChildren().add(rect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public int getCount() {\n return maps.size();\n }", "public void showMaps() throws Exception{\r\n MapMaintenanceBaseWindow mapMaintenanceBaseWindow = null;\r\n String unitNumber=mdiForm.getUnitNumber();\r\n \r\n if( ( mapMaintenanceBaseWindow = (MapMaintenanceBaseWindow)mdiForm.getFrame(\r\n CoeusGuiConstants.MAPS_BASE_FRAME_TITLE+\" \"+unitNumber))!= null ){\r\n if( mapMaintenanceBaseWindow.isIcon() ){\r\n mapMaintenanceBaseWindow.setIcon(false);\r\n }\r\n mapMaintenanceBaseWindow.setSelected( true );\r\n return;\r\n }\r\n \r\n MapMaintenanceBaseWindowController mapMaintenanceBaseWindowController = new MapMaintenanceBaseWindowController(unitNumber,false);\r\n mapMaintenanceBaseWindowController.display();\r\n \r\n }", "@Override\n public void displayMapTiles(MapTile[][] grid)\n {\n Platform.runLater(() -> {\n MapView mapArea = gui.getMapArea();\n mapArea.displayMapGrid(grid, -3, -3);\n });\n }", "public String getMap() { \n\t\treturn getMapElement().getValue();\n\t}", "private static void printMap(HashMap<String, Integer> hashMap) {\n\t\tfor (String key : hashMap.keySet()) {\r\n\t\t System.out.println(\"Key: \" + key + \" Value: \" + hashMap.get(key));\r\n }\r\n System.out.println(\"Total features in Hashmap: \"+ hashMap.size());\r\n\t}", "public void printImageMap(){\n for(int counter = savedMap.length-1 ; counter != -1;counter--)\n System.out.println(Arrays.toString(savedMap[counter]));\n }", "public static void drawMapPoints(ArrayList<PointOfInterest> points) {\n\t\t// Use a label to display the image\n\t\tJFrame frame = new JFrame();\n\t\tframe.setSize(1080, 540);\n\t\tMap map = new Map(null, (ArrayList<PointOfInterest>)(points), null, 2, 0, 0);\n\t\tframe.add(map);\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.setVisible(true);\n\t}", "public static void getMapDetails(){\n\t\tmap=new HashMap<String,String>();\r\n\t map.put(getProjName(), getDevID());\r\n\t //System.out.println(\"\\n[TEST Teamwork]: \"+ map.size());\r\n\t \r\n\t // The HashMap is currently empty.\r\n\t\tif (map.isEmpty()) {\r\n\t\t System.out.println(\"It is empty\");\r\n\t\t \r\n\t\t System.out.println(\"Trying Again:\");\r\n\t\t map=new HashMap<String,String>();\r\n\t\t map.put(getProjName(), getDevID());\r\n\t\t \r\n\t\t System.out.println(map.isEmpty());\r\n\t\t}\r\n\t\t \r\n\t\t\r\n\t\t//retrieving values from map\r\n\t Set<String> keys= map.keySet();\r\n\t for(String key : keys){\r\n\t \t//System.out.println(key);\r\n\t System.out.println(key + \": \" + map.get(key));\r\n\t }\r\n\t \r\n\t //searching key on map\r\n\t //System.out.println(\"Map Value: \"+map.containsKey(toStringMap()));\r\n\t System.out.println(\"Map Value: \"+map.get(getProjName()));\r\n\t \r\n\t //searching value on map\r\n\t //System.out.println(\"Map Key: \"+map.containsValue(getDevID()));\r\n\t \r\n\t\t\t\t\t // Put keys into an ArrayList and sort it.\r\n\t\t\t\t\t\t//ArrayList<String> list = new ArrayList<String>();\r\n\t\t\t\t\t\t//list.addAll(keys);\r\n\t\t\t\t\t\t//Collections.sort(list);\r\n\t\t\t\t\r\n\t\t\t\t\t\t// Display sorted keys and their values.\r\n\t\t\t\t\t\t//for (String key : list) {\r\n\t\t\t\t\t\t// System.out.println(key + \": \" + map.get(key));\r\n\t\t\t\t\t\t//}\t\t\t \r\n\t}", "@Override\n\tpublic int getCount()\n\t{\n\t\treturn maps.size();\n\t}", "public void printInfo() {\n String s = \"\";\n if (map.isEmpty()) {\n s += \"not keeping any entries\\n\";\n } else {\n s += \"This Node stores a range of \" + map.size() + \" keys :\\n from:\" + map.firstKey() + \" up to: \" + map.lastKey() + \"\\n\";\n }\n s += \"node key:\\t\" + nodeKey + \"\\n\";\n s += \"previous key:\\t\" + predKey + \"\\n\";\n\n window.getKeysInfoText().setText(s);\n }", "public static void printHashMapIS(Map<Integer, String> map) throws IOException{\n\t\tPrintWriter writer = new PrintWriter(\"C:/Users/Naveen/Desktop/TestRuns/LastRun/finalCatalogHash\");\n\t\tfor (Entry<Integer, String> entry : map.entrySet())\n\t {\t \t\t\n\t \t\twriter.println(entry.getKey()+\":\"+entry.getValue());\n\t }\n\t writer.close();\n\t}", "public void showOpponentMap(Admiral admiral) {\r\n\t\tint[] mapGrid = returnOpponent(admiral).getMapGrid();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"The map of admiral: \"\r\n\t\t\t\t+ returnOpponent(admiral).getAdmiralName());\r\n\t\tSystem.out.print(\" \");\r\n\t\tfor (int i = 0; i < Constants.COLUMNS_TITLES.length; i++) {\r\n\t\t\tSystem.out.print(\" \" + Constants.COLUMNS_TITLES[i]);\r\n\t\t}\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\tfor (int j = 0; j < Constants.ROW_LENGTH; j++) {\r\n\t\t\tif (j < 9) {\r\n\t\t\t\tSystem.out.print(j + 1 + \" \");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.print(j + 1);\r\n\t\t\t}\r\n\t\t\tfor (int k = 0; k < Constants.ROW_LENGTH; k++) {\r\n\t\t\t\tString cell = null;\r\n\t\t\t\tif (mapGrid[j * Constants.ROW_LENGTH + k] == 0\r\n\t\t\t\t\t\t|| mapGrid[j * Constants.ROW_LENGTH + k] == 1) {\r\n\t\t\t\t\tcell = \" \" + \"0\";\r\n\t\t\t\t} else if (mapGrid[j * Constants.ROW_LENGTH + k] == -1) {\r\n\t\t\t\t\tcell = \" \" + \"*\";\r\n\t\t\t\t} else if (mapGrid[j * Constants.ROW_LENGTH + k] == 2) {\r\n\t\t\t\t\tcell = \" \" + \"X\";\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.print(cell);\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"\\n\");\r\n\t\t}\r\n\t}", "void render(Map<String,List<Map<String,String>>> data);", "@ApiModelProperty(value = \"Whether the map should be shown for the event or not\")\n public Boolean isShowMap() {\n return showMap;\n }", "@FXML\n\tpublic void loadMap(ActionEvent ev) {\n menuBar.getScene().getWindow().hide();\n \n\t\tStage map = new Stage();\n\t\ttry {\n\t\t\tParent root = FXMLLoader.load(getClass().getResource(\"/FXML/Map.fxml\"));\n\t\t\tScene scene = new Scene(root);\n\t\t\tmap.setScene(scene);\n\t\t\tmap.show();\n\t\t\tmap.setResizable(false);\n\t\t\tmap.centerOnScreen();\n\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\t\n\t}", "@FXML\n\tpublic void loadMap(ActionEvent ev) {\n menuBar.getScene().getWindow().hide();\n \n\t\tStage map = new Stage();\n\t\ttry {\n\t\t\tParent root = FXMLLoader.load(getClass().getResource(\"/FXML/Map.fxml\"));\n\t\t\tScene scene = new Scene(root);\n\t\t\tmap.setScene(scene);\n\t\t\tmap.show();\n\t\t\tmap.setResizable(false);\n\t\t\tmap.centerOnScreen();\n\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\t\n\t}", "public void setContent(HashMap<Integer, ArrayList<String>> map) {\n if (map == null || map.size() < EXAM_ANSWER_VIEW_s.length) {\n return;\n }\n /** Question put in 0 */\n ArrayList<String> questionStrList = map.get(0);\n mExamQuestion.setText(questionStrList.get(0));\n for (int i = 1; i < EXAM_ANSWER_VIEW_s.length; i++) {\n /** answer put in 1 ~ 4 */\n ArrayList<String> answerStrList = map.get(i);\n ExamAnswerView examAnswerView = EXAM_ANSWER_VIEW_s[i];\n /** map.get(0) is spell, map.get(1) is chinese */\n examAnswerView.setExamAnswerString(answerStrList.get(1));\n }\n }", "public void showMap(boolean isEnd) {\n\t\t// Map shown inbetween games. Works by grabbing the system time in milliseconds,\n\t\t// adding 5000, and then counting down 1 second every second. Effectively keeping\n\t\t// the map screen up for 5 seconds.\n//\t\tif(legnum == 4) {\n//\t\t\treplay = new JButton(\"Replay\");\n//\t\t\treplay.setSize(frameWidth*5/100, frameHeight*5/100);\n//\t\t\tif(isOsprey) {\n//\t\t\t\treplay.setLocation((frameWidth/2)+frameWidth*30/100, frameHeight/2);\n//\t\t\t}\n//\t\t\telse {\n//\t\t\t\treplay.setLocation((frameWidth/2)+frameWidth*15/100, frameWidth/2);\n//\t\t\t}\n//\t\t\tframe.add(replay);\n//\t\t}\n\t\tlong tEnd = System.currentTimeMillis();\n\t\tframe.setVisible(true);\n\t\tlong tStart = tEnd + 3*1000;\n\t\twhile(tStart > tEnd) {\n\t\t\ttStart -= 1000;\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void map(){\n this.isMap = true;\n System.out.println(\"Switch to map mode\");\n }", "@Override\r\n \tpublic void setMap(Map m) {\n \t\t\r\n \t}", "@SuppressWarnings(\"unchecked\")\n\tpublic static void display(Map<String, ArrayList<Container>> map,MyWindowController controller, int months){\n\t\t\n\t\tStage stage = new Stage();\n\t\t\n\t\tDecimalFormat df = new DecimalFormat(\"#.00\");\n\t\t\n\t\tstage.initModality(Modality.APPLICATION_MODAL);\n\t\tstage.setTitle(\"Detailed Information\");\n\t\t\n\t\tstage.setHeight(500);\n\t\tstage.setWidth(900);\n\t\t\n\t\t\n\t\tVBox layout = new VBox();\n\t\tTableView<Container> table = new TableView<>();\n\t\t\n\t\tTableColumn<Container, String> brand = new TableColumn<>(\"Brand\");\n\t\tbrand.setCellValueFactory(new PropertyValueFactory<>(\"Brand\"));\n\n\t\tTableColumn<Container, String> description = new TableColumn<>(\"Description\");\n\t\tdescription.setCellValueFactory(new PropertyValueFactory<>(\"Description\"));\n\n\t\tTableColumn<Container, String> size = new TableColumn<>(\"Size\");\n\t\tsize.setCellValueFactory(new PropertyValueFactory<>(\"Size\"));\n\t\t\n\t\ttable.getColumns().addAll(brand,description,size);\n\t\t\n\t\tfor (int i = 1; i <= months; i++) {\n\t\t\tfinal int j = i;\n\t\t\tTableColumn<Container, Integer> col = new TableColumn<Container, Integer>(\"Month \"+i);\n\t\t\tcol.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Container,Integer>, ObservableValue<Integer>>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic ObservableValue<Integer> call(CellDataFeatures<Container, Integer> param) {\n\t\t\t\t\treturn new ReadOnlyObjectWrapper<Integer>(param.getValue().getSaleAtMonth(j));\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\ttable.getColumns().add(col);\n\t\t}\n\t\t\n\t\tTableColumn<Container,Double> average = new TableColumn<Container, Double>(\"Average\");\n\t\taverage.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Container,Double>, ObservableValue<Double>>() {\n\n\t\t\t@Override\n\t\t\tpublic ObservableValue<Double> call(CellDataFeatures<Container, Double> param) {\n\t\t\t\treturn new ReadOnlyObjectWrapper<Double>(Double.parseDouble(df.format(controller.getAverage(param.getValue().getBarcode(), months))));\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t});\n\t\ttable.getColumns().add(average);\n\t\t\n\t\tTableColumn<Container,Double> stdDiv = new TableColumn<Container, Double>(\"STD DIV\");\n\t\tstdDiv.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Container,Double>, ObservableValue<Double>>() {\n\n\t\t\t@Override\n\t\t\tpublic ObservableValue<Double> call(CellDataFeatures<Container, Double> param) {\n\t\t\t\treturn new ReadOnlyObjectWrapper<>(Double.parseDouble(df.format(controller.getStdDiv(param.getValue().getBarcode(), months))));\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t});\n\t\t\n\t\ttable.getColumns().add(stdDiv);\n\t\t\n\t\t\n\t\ttable.setItems(getData(map));\n\t\tScene scene = new Scene(table);\n\t\tstage.setScene(scene);\n\t\tstage.showAndWait();\n\t\t\n\t}", "private void dumpMap(PrintStream stream, Map<String, String> map) {\n for (String key : map.keySet()) {\n stream.println(\" \" + key + \" -> \" + map.get(key));\n }\n }", "public Map<String,Eetakemon> showAll(){\n return this.eetakemonmap;\n }", "public void showInfo() {\n\t\tfor (String key : list.keySet()) {\n\t\t\tSystem.out.println(\"\\tID: \" + key + list.get(key).toString());\n\t\t}\n\t}", "public void renderMap(GameMap gameMap, Player player)\n\t{\n\t\tthis.drawMapGlyphs(gameMap, player);\n\t\t// this.getGlyphs(gameMap, player);\n\t\t// for(Text text : this.getGlyphs(gameMap))\n\t\t// window.getRenderWindow().draw(text);\n\t}", "@Override\n public void onMapReady(GoogleMap map) {\n mMap = map;\n\n // Use a custom info window adapter to handle multiple lines of text in the\n // info window contents.\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n @Override\n // Return null here, so that getInfoContents() is called next.\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n // Inflate the layouts for the info window, title and snippet.\n View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n TextView title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n TextView snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }\n });\n\n // Turn on the My Location layer and the related control on the map.\n updateLocationUI();\n\n // Get the current location of the device and set the position of the map.\n getDeviceLocation();\n }", "private static void simpleMapExamples() {\n\t\tSystem.out.println(\"simpleMapExamples Start ----\");\n\t\t\n\t\tMap<String,Integer> mapEx1 = new HashMap<>();\n\t\t\n\t\tmapEx1.put(\"Amit\", 35);\n\t\tmapEx1.put(\"Gunjan\", 45);\n\t\tmapEx1.put(\"Vidut\", 55);\n\t\t\n\t\t//Loop over Map\n\t\tfor(Entry<String, Integer> entry : mapEx1.entrySet()) {\n\t\t\t\n\t\t\tString key = entry.getKey();\n\t\t\tInteger val = entry.getValue();\n\t\t\t\n\t\t\tSystem.out.println(\"KEY : \" + key + \" : VAL : \" + val);\n\t\t\t\n\t\t}\n\t\t\n\t\t//API to get collection of values from the map\n\t\tCollection<Integer> values = mapEx1.values();\n\t\t\n\t\t//Now browse over collection values using java8 lambda\n\t\tSystem.out.println(\"Printing values ...\");\n\t\tvalues.forEach((val) -> System.out.println(val));\n\t\t\n\t\t//Replace values in the map using \n\t\t//Here we are replacing each key's value to 46\n\t\tmapEx1.replaceAll(( s, i) -> {\n\t\t\treturn 46;\n\t\t});\n\t\t\n\t\tSystem.out.println(\"Printing after firing replaceAll...\");\n\t\t//Now print the key/value pair of map using lambda\n\t\tmapEx1.forEach((k,v) -> {\n\t\t\tSystem.out.println(\"Key : \" + k + \" Val \" + v);\n\t\t});\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"simpleMapExamples End ----\");\n\t}", "public void show(String fileName, Item itemType) {\n JFrame frame = new JFrame();\n frame.add(new mapPanel(fileName, itemType));\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n }", "public static String showAll(){\n return resultsMap.toString();\n }", "public void drawMap(ArrayList<Entity> entities){\n\t\t//draw map\n\t\tmap.draw(graphics, entities);\n\t}", "public MapPanel(String map, Object[] toLoad) {\n\t\tthis.setLayout(null);\n\t\tthis.setBackground(Color.white);\n\t\tthis.setPreferredSize(new Dimension(WIDTH, HEIGHT));\n\t\tthis.setSize(this.getPreferredSize());\n\t\tthis.setVisible(true);\n\t\tthis.setFocusable(true);\n\t\tthis.requestFocus();\n\t\ttheMap = new Map(map, 50);\n\t\ttheTrainer = new Trainer(theMap, toLoad);\n\n\t\tinBattle = false;\n\t}", "public void printPotionMap(Map<Potion,Integer> map) {\n\t\n\t\tSystem.out.println(\"**** Available Potions ****\");\n\t\tSystem.out.println(\"ID\\tName\\t\\tAmount\\tIncrease\\tAttributes\");\n\t\tSystem.out.println(\"===========================================================\");\n\t\tint id = 1;\n\t\t\n\t\tIterator<Entry<Potion, Integer>> iter = map.entrySet().iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\t Map.Entry<Potion, Integer> pair = iter.next();\n\t\t\t Potion p = pair.getKey();\n\t\t\t int amount = pair.getValue();\n\t\t\t System.out.printf(id++ + \"\\t\" + p.getName() + \"\\t\\t\" + amount + \"\\t\"+ p.getAmount()\t+ \"\\t\");\n\t\t\tfor(StatType t : p.getTypes()) {\n\t\t\t\tSystem.out.printf(t.toString() + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t}", "public static void printLookupTable(HashMap<Integer, String> map) {\n\t\tint size = map.size();\n\t\tfor(int i = 0; i < size; i++) { \n\t\t\tSystem.out.println(\"vertex descriptor:\\t\" + i + \"\\taddress:\\t\" + map.get(i));\n\t\t}\n\t}", "@Override\r\n public void mapshow()\r\n {\r\n printInvalidCommandMessage();\r\n }", "private void showMapAndSendCoordinate(String coordinateMap, String name) {\n showMapFragment = new ShowMapFragment();\n Bundle bundle = new Bundle();\n bundle.putString(\"LatLng\", coordinateMap);\n bundle.putString(\"Name\", name);\n showMapFragment.setArguments(bundle);\n\n getSupportFragmentManager()\n .beginTransaction()\n .replace(R.id.linearMap, showMapFragment)\n .commit();\n }", "public void printMap(Map<String, Integer> printMap, String[] outputLabels, int printNum){\n\t\tIterator mapIterator = printMap.entrySet().iterator();\n\t\tint j = 1;\n\t\tList<String> keys = new ArrayList<String>();\n\t\tList<Integer> values = new ArrayList<Integer>();\n\t\tString[] chartLabels = this.getChartLabels(outputLabels);\n\t\twhile(mapIterator.hasNext()){\n Map.Entry pair = (Map.Entry)mapIterator.next();\n if (j > printMap.size() - printNum){\n \tSystem.out.println(pair.getKey() + \": \" + (int)pair.getValue() + \" routes\");\n \tkeys.add((String) pair.getKey());\n \tvalues.add((Integer) pair.getValue());\n }\n if (!mapIterator.hasNext()){\n \tString message = outputLabels[0] + \": \" + (int)pair.getValue() + \"\\n\"\n \t\t\t+ outputLabels[1] + \": \" + pair.getKey();\n \tJOptionPane.showMessageDialog(null, message);\n \tSystem.out.println(outputLabels[0] + \": \" + (int)pair.getValue());\n System.out.println(outputLabels[1] + \": \" + pair.getKey());\n }\n j++;\n }\n\t\tSystem.out.println();\n\t\tfinal ChartUtils demo = new ChartUtils(\"Bar Chart\", keys, values, chartLabels);\n demo.pack();\n RefineryUtilities.centerFrameOnScreen(demo);\n demo.setVisible(true);\n\t}", "@Override\r\n\tpublic List<Map<String, Object>> list(Map<String, Object> map) {\n\t\treturn dao.list(map);\r\n\t}", "public void showDictionary() {\n Platform.runLater(() -> model.showDictionary());\n }", "Map<String, Object> getContent();", "@RequestMapping(value = \"/homed/{map}\", method = RequestMethod.GET)\r\n public String mapHomeDebug(HttpServletRequest request, @PathVariable(\"map\") String map, ModelMap model) throws ServletException, IOException { \r\n return(renderPage(request, model, \"map\", map, null, null, true));\r\n }", "public MapView(int height, int width)\n {\n stats = new FieldStats();\n colors = new LinkedHashMap<>();\n\n setTitle(\"Map Environment Viewer\");\n stepLabel = new JLabel(STEP_PREFIX, JLabel.CENTER);\n infoLabel = new JLabel(\" \", JLabel.CENTER);\n population = new JLabel(POPULATION_PREFIX, JLabel.CENTER);\n\n currentEnvironment = \"Savanna\";\n\n setLocation(500, 50);\n\n fieldView = new FieldView(height, width);\n\n Container contents = getContentPane();\n\n JPanel infoPane = new JPanel(new BorderLayout());\n infoPane.add(stepLabel, BorderLayout.WEST);\n infoPane.add(infoLabel, BorderLayout.CENTER);\n contents.add(infoPane, BorderLayout.NORTH);\n contents.add(fieldView, BorderLayout.CENTER);\n contents.add(population, BorderLayout.SOUTH);\n pack();\n setVisible(true);\n }", "public Map<String, Object> getInfo();", "public void printMap() {\n Set<String> manufacturers = cars.keySet();\n\n for (String manufacturer : cars.keySet()) {\n System.out.println(String.format(\"The following %s models are in stock: \", manufacturer));\n System.out.println(cars.get(manufacturer));\n\n }\n }", "public static void printHashMapSS(Map<String, String> map) throws IOException{\n\t\tPrintWriter writer = new PrintWriter(\"C:/Users/Naveen/Desktop/TestRuns/LastRun/documentHash\");\n\t\tfor (Entry<String, String> entry : map.entrySet())\n\t {\t \t\t\n\t \t\twriter.println(entry.getKey()+\":\"+entry.getValue());\n\t }\n\t writer.close();\n\t}", "public void notifyMapLoaded();", "public static void printMap(Map<String, Double> map, String filename) throws FileNotFoundException, UnsupportedEncodingException{\n\t\t\t\n\t\t\tPrintWriter writer = new PrintWriter(\"C:/Naveen/CCS/IR/AP89_DATA/AP_DATA/IndexWithStoppingAndWithStemming/\"+filename, \"UTF-8\");\n\t for (Entry<String, Double> entry : map.entrySet()){\n\t \t \n\t \t\twriter.println(entry.getKey()+\" \"+entry.getValue()+\" Exp\");\n\t }\n\t writer.close();\n\t }", "public static void printAvailableMaps() {\n \tFile folder = new File(\"./examples/\");\n \tFile[] listOfFiles = folder.listFiles();\n \tSystem.out.println(\"Available maps (choose one and start game with command 'game map_name' ) : \");\n\n \t for (int i = 0; i < listOfFiles.length; i++) {\n \t if (listOfFiles[i].isFile()) {\n \t System.out.println(\"\\t\"+listOfFiles[i].getName());\n \t } \n \t }\n }", "public String getMapDesc() {\n\t\treturn this.mapDesc;\n\t}", "public static void printMap(mapNode[][] nodes){\n\t\tint sizeOfMap = nodes.length;\r\n\t\tfor (int i = 0; i < sizeOfMap; i++) {\r\n\t\t\tfor (int j = 0; j < sizeOfMap; j++) {\r\n\t\t\t\tif (j == 9) {\r\n\t\t\t\t\tif(nodes[j][i].getOwnElevation() == 999999999){\r\n\t\t\t\t\t\tSystem.out.println(\"X\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(nodes[j][i].getOwnElevation() == -1){\r\n\t\t\t\t\t\tSystem.out.println(\"*\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tSystem.out.println(nodes[j][i].getOwnElevation());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif(nodes[j][i].getOwnElevation() == 999999999){\r\n\t\t\t\t\t\tSystem.out.print(\"X \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(nodes[j][i].getOwnElevation() == -1){\r\n\t\t\t\t\t\tSystem.out.print(\"* \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tSystem.out.print(nodes[j][i].getOwnElevation()+\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic String toString() {\t\t\n\t\treturn \"mirMap:\\n\" + mapToString(mirMap) + \"\\ngeneMap:\\n\" + mapToString(geneMap);\n\t}", "public void printMap()\r\n {\r\n\t\tint x = 0;\r\n for(Room[] row : rooms)\r\n {\r\n \tStringBuilder top = new StringBuilder(); // top row of room\r\n \tStringBuilder mid = new StringBuilder(); // mid row of room\r\n \tStringBuilder bot = null;\r\n \tif (x == row.length - 1) { // if the last row\r\n \t\tbot = new StringBuilder(); // bot row of room\r\n \t}\r\n \t\r\n for (Room room : row)\r\n {\r\n \tString roomStr = room.toString();\r\n top.append(roomStr.substring(0, 3)); // 0-3 top, 3-6, mid, 6-9 bot\r\n mid.append(roomStr.substring(3, 6)); \r\n if (x == row.length - 1) { //if the last row\r\n \tbot.append(roomStr.substring(6, 9)); //append the bot row\r\n }\r\n }\r\n // add new lines\r\n top.append('\\n');\r\n mid.append('\\n');\r\n \r\n System.out.print(top);\r\n System.out.print(mid);\r\n \r\n if (x == row.length - 1) {\r\n \tbot.append('\\n');\r\n \tSystem.out.print(bot);\r\n }\r\n x++;\r\n }\r\n }" ]
[ "0.7568112", "0.75447947", "0.74318343", "0.73314375", "0.72545177", "0.7148334", "0.6993021", "0.69880056", "0.68440497", "0.6838643", "0.68378663", "0.6791798", "0.67786247", "0.67648983", "0.6757717", "0.6671652", "0.65786654", "0.6557313", "0.6539057", "0.65278983", "0.63888425", "0.63872135", "0.6360171", "0.6342751", "0.6310536", "0.63044935", "0.62805045", "0.6250615", "0.62347007", "0.62076217", "0.61970115", "0.6188928", "0.618679", "0.6172673", "0.61648333", "0.6152314", "0.613948", "0.6131292", "0.611301", "0.6077383", "0.6039117", "0.6016114", "0.5989678", "0.5986882", "0.5970047", "0.59668726", "0.59235", "0.59185", "0.58858764", "0.5882675", "0.5880543", "0.585336", "0.5837593", "0.5831898", "0.5831806", "0.5827088", "0.58263963", "0.5812931", "0.5809512", "0.5808178", "0.5779416", "0.57725346", "0.57543635", "0.57303286", "0.57303286", "0.5718512", "0.571511", "0.5712141", "0.57029575", "0.57016224", "0.5696933", "0.56926036", "0.5686752", "0.5680448", "0.56800884", "0.5675375", "0.5673121", "0.5672601", "0.5660298", "0.5654194", "0.5644697", "0.56316453", "0.5630493", "0.5622194", "0.56158346", "0.56046355", "0.5591699", "0.55845344", "0.558342", "0.5566753", "0.55643034", "0.5556824", "0.5555667", "0.5554919", "0.5543802", "0.5537073", "0.5530559", "0.5520954", "0.5505845", "0.5503016" ]
0.7222877
5
method convert an array of string to Hash Map
public static <K,V> ArrayList<K> convertHashMapKeysToArrayList( HashMap<K,V> hm) { ArrayList<K> arr = new ArrayList(); for (K key: hm.keySet()) arr.add(key); return arr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static HashMap<String, Integer> convertArrayToHashMap(String[] arr)\n {\n HashMap<String, Integer> hm = new HashMap<String, Integer>();\n\n for (int i = 0; i < arr.length; i++)\n hm.put(arr[i], i);\n\n return hm;\n\n }", "private Map<String, String> convertArrayToMap(PairDTO[] pairDTOs) {\n Map<String, String> map = new HashMap<>();\n for (PairDTO pairDTO : pairDTOs) {\n map.put(pairDTO.getKey(), pairDTO.getValue());\n }\n return map;\n }", "public static HashMap<String, Integer> convertArrayListToHashMap(\n ArrayList<String> arr)\n {\n HashMap<String, Integer> hm = new HashMap<String, Integer>();\n\n for (int i = 0; i < arr.size(); i++)\n hm.put(arr.get(i), i);\n\n return hm;\n\n }", "public HashMap<String, String[]> convertToArray() throws IOException\n\t{\n\t HashMap<String, String[]> map = new HashMap<String, String[]>();\n\t String[] list;\n\t \n\t String line;\n\t BufferedReader reader;\n\t\t\n\t try {\n\t\t\treader = new BufferedReader(new FileReader(filePath));\n\t\t\t\n\t\t\twhile ((line = reader.readLine()) != null)\n\t\t {\n\t\t\t\tString key = line;\n\t\t\t\tString value = \"\";\n\t\t\t\tString tmp;\n\t\t\t\t\n\t\t\t\twhile(!(tmp=reader.readLine()).equals(\"$\"))\n\t\t\t\t{\t\n\t\t\t\t\tvalue = value+tmp; \n\t\t\t\t}\n\t\t\t\tString values = value.replaceAll(\"\\\"\", \"\");\n\t\t\t\t\n\t\t\t\tString[] parts = values.split(\",\");\n\t\t map.put(key, parts);\n\t\t }\n\t\t\t\n\t\t\t/*for (String key : map.keySet())\n\t\t {\n\t\t System.out.println(key);\n\t\t for(int i=0; i < map.get(key).length; i++)\n\t\t {\n\t\t \tSystem.out.println(map.get(key)[i]);\n\t\t }\n\t\t }*/\n\t\t\t\n\t\t reader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t \n\t \n\t return map;\n\t}", "public static Map<String,Integer> stringArrayToMap(String[] entries, boolean ignoreNull) {\n\t\tMap<String,Integer> map = new HashMap<String,Integer>();\n\t\tif(entries==null) {\n\t\t\tthrow new RuntimeException(\"StringArrayToMap: entries==null\");\n\t\t}\n\t\tfor(int i=0;i<entries.length;i++) {\n\t\t\tif(entries[i]==null) {\n\t\t\t\tif(!ignoreNull) {\n\t\t\t\t\tlog.warn(\"StringArrayToMap: entries[\"+i+\"]==null ==> will not be included in map\");\t\t\t\t\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmap.put(entries[i], i);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}", "private static Set<String> m23475a(String[] strArr) {\n if (strArr == null || strArr.length == 0) {\n return Collections.emptySet();\n }\n HashSet hashSet = new HashSet(strArr.length);\n for (String str : strArr) {\n hashSet.add(str);\n }\n return hashSet;\n }", "private HashMap<String, String> generateHashMapFromStringList(String...strings) throws Exception {\n\n\t\tif(strings.length % 2 != 0)\n\n\t\t\tthrow InvalidStringListException;\n\n\t\tHashMap<String, String> map = new HashMap<String, String>();\n\n\t\tfor(int i = 0; i < strings.length; i += 2) // Each key will be i, with the following becoming its value\n\n\t\t\tmap.put(strings[i], strings[i + 1]);\n\n\t\treturn map;\n\t}", "private HashMap<Object, Object> HashMapTransform(List<String> lines) {\n\n HashMap<Object, Object> keypair = new HashMap<>();\n\n for (String line : lines) {\n if (line.contains(pairDelimiter)) {\n String[] intermediate = line.split(pairDelimiter, maxSplitSize);\n keypair.put(intermediate[0], intermediate[1]);\n }\n }\n return keypair;\n }", "@SuppressWarnings(\"unchecked\")\n private static <T> Map<String, T> mapOf(Object... inputs) {\n Map<String, T> map = new HashMap<>();\n for (int i = 0; i < inputs.length; i += 2) {\n String key = (String) inputs[i];\n T value = (T) inputs[i + 1];\n map.put(key, value);\n }\n return map;\n }", "@SuppressWarnings(\"rawtypes\")\n\tpublic static Map stringToMap(String params) {\n\t\tMap<String, String> map = new HashMap<String, String>();\n\n\t\tif (params == null) {\n\t\t\tSystem.out.println(\"\");\n\n\t\t} else {\n\t\t\tString[] arr = params.split(\",\");\n\t\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\t\tString key = arr[i].substring(0, arr[i].indexOf(\":\"));\n\t\t\t\tString value = arr[i].substring(arr[i].indexOf(\":\") + 1);\n\t\t\t\tmap.put(key, value);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}", "private static Map countStringOccurences(String[] strArray, AdminJdbcService adminJdbcService) {\n logger.debug(\"Count String Occurences method found\");\n\n Map<String, Integer> countMap = new TreeMap<String, Integer>();\n Map<String, Integer> controlIdsMap = new TreeMap<String, Integer>();\n Set<String> controlIdsSet = new TreeSet<String>();\n Set<String> keySet = countMap.keySet();\n List list = new ArrayList();\n\n for (String string : strArray) {\n String control[] = string.split(\":\");\n if ( !Utils.isNullOrEmpty(control[1]) && Integer.parseInt(control[1].trim()) == 2 ) {\n if (!countMap.containsKey(control[0])) {\n countMap.put(control[0], 1);\n } else {\n Integer count = countMap.get(control[0]);\n count = count + 1;\n countMap.put(control[0], count);\n }\n }\n }\n\n\n return countMap;\n }", "public void hashFunction1(String[] stringsForArray, String[] theArray) {\n\n for (int n = 0; n < stringsForArray.length; n++) {\n\n String newElementVal = stringsForArray[n];\n\n theArray[Integer.parseInt(newElementVal)] = newElementVal;\n\n }\n\n }", "public static HashMap<String, Integer> countOccurences(ArrayList<String> arr) {\n arr = toSortedString(arr);\n HashMap<String, Integer> hash = new HashMap();\n for(String str :arr){\n if(hash.containsKey(str)){\n hash.replace(str, hash.get(str)+1);\n }\n else{\n hash.put(str,1);\n }\n }\n return hash;\n }", "private static HashMap<String, Integer> makeMap(String[] words) {\n HashMap<String, Integer> map = new HashMap();\n for (int i = 0; i < words.length; i++) {\n map.merge(words[i], 1, Integer::sum);\n }\n return map;\n}", "public static HashMap<String,Integer> counter(ArrayList<String> arr){\n\t\tHashMap<String,Integer> map = new HashMap<String,Integer>();\n\t\t\tfor(String s : arr){\n\t\t\t\tif (map.keySet().contains(s)){\n\t\t\t\t\tmap.put(s, map.get(s)+1);\n\t\t\t\t}else{\n\t\t\t\t\tmap.put(s, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn map;\t\n\t}", "void constructMap(JsonArray array)\n {\n JsonObject obj = array.get(0).getAsJsonObject();\n\n // Loop on them\n for(Map.Entry<String, JsonElement> entry : obj.entrySet())\n {\n String key = entry.getKey(); // ID:TYPE\n if(!(key.matches(\"(\\\\d+):([A-Z_]+)\")))\n continue;\n\n String[] split = key.split(\":\");\n long id = Long.parseLong(split[0]);\n CodeType type = remapLegacyCodeType(split[1]);\n\n Map<CodeType, Map<String, String>> userMap = map.getOrDefault(id, new HashMap<>());\n Map<String, String> codesForTypeMap = userMap.getOrDefault(type, new HashMap<>());\n\n for(Map.Entry<String, JsonElement> code : entry.getValue().getAsJsonObject().entrySet())\n codesForTypeMap.put(code.getKey(), code.getValue().getAsString());\n\n userMap.put(type, codesForTypeMap);\n map.put(id, userMap);\n }\n\n array.remove(obj); // Remove the codes object\n }", "public static Map<String, String> stringToHashtable(String file) {\r\n if (file == null) {\r\n return null;\r\n }\r\n\r\n String sansComments = eraseComments(file);\r\n int pos = 0, count = sansComments.length();\r\n Map<String, String> retval = new HashMap<String, String>();\r\n\r\n // Split the file, line by line, into key/value pairs\r\n while (pos < count) {\r\n int eol = offsetToEOL(sansComments, pos);\r\n int next = offsetToNextLine(sansComments, pos);\r\n if (eol > 0) {\r\n String line = sansComments.substring(pos, pos + eol);\r\n StringTokenizer st = new StringTokenizer(line, \"=\");\r\n String key = st.nextToken();\r\n String value = \"\";\r\n if (st.hasMoreTokens()) {\r\n value = st.nextToken();\r\n }\r\n\r\n // Place scalar values in the hashtable directly\r\n // otherwise break comma separated ones into Vectors.\r\n // If they can be, items are inserted as Doubles, failing\r\n // that, as Strings.\r\n // int comma = value.indexOf(\",\");\r\n // if (comma == -1) {\r\n // try {\r\n // retval.put(key, new Double(value));\r\n // } catch (NumberFormatException nfe) {\r\n retval.put(key, value);\r\n // } // endtry\r\n // } else {\r\n // Vector<Comparable> v = new Vector<Comparable>();\r\n // StringTokenizer values = new StringTokenizer(value, \",\");\r\n // while (values.hasMoreTokens()) {\r\n // String s = values.nextToken();\r\n // try {\r\n // v.addElement(new Double(s));\r\n // } catch (NumberFormatException nfe) {\r\n // v.addElement(s.trim());\r\n // } // endtry\r\n // } // endwhile\r\n // retval.put(key, v);\r\n // } // endif\r\n } // endif\r\n pos += next;\r\n } // endwhile\r\n\r\n return retval;\r\n }", "private void fillMap(String[] querys) {\r\n\r\n\t\tLOG.info(\"fillMap\");\r\n\r\n\t\tquerysMap = new HashMap<String, String>();\r\n\t\t\r\n\t\tfor (String query : querys) {\r\n\t\t\t\r\n\t\t\tString[] temp = getStringArray(query, START_QUERY_PATTERN);\r\n\t\t\t\r\n\t\t\tif (temp != null && temp.length == 2) {\r\n\t\t\t\t\r\n\t\t\t\ttemp[0] = temp[0].replaceAll(\"\\\\P{Alnum}\", \"\");\r\n\t\t\t\tquerysMap.put(temp[0], temp[1].trim());\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tLOG.error(\"El array es nulo o la longitud no es la esperada\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tLOG.info(\"END fillMap\");\r\n\r\n\t}", "Map<String, String> asMap();", "public static LinkedHashMap<String, Object> arrayToMap(Object[] dataArray) {\n LinkedHashMap<String, Object> map = new LinkedHashMap<String, Object>();\n if (0 != dataArray.length % 2) throw new UtilsException(\"Invalid odd elements count\");\n for (int i = 0; i < dataArray.length; i += 2) {\n Object objKey = dataArray[i];\n if (!(objKey instanceof String)) throw new UtilsException(\"Invalid key: [\" + objKey + \"]\");\n map.put((String) objKey, dataArray[i + 1]);\n }\n return map;\n }", "public static HashMap<String, String> createVariableMap(String vvlist[]) {\n \t\tif (vvlist.length%2 != 0)\n \t\t\treturn null;\n \t\t\n \t\tHashMap<String, String> variableMap = new HashMap<String, String>();\n \t\tString variable;\n \t\tString value;\n \t\tfor (int i = 0; i < vvlist.length; i += 2) {\n \t\t\tvariable = (String)vvlist[i];\n \t\t\tvalue = vvlist[i + 1];\n \t\t\t\n \t\t\tvariableMap.put(variable, value);\n \t\t}\n \t\t\n \t\treturn variableMap;\n \t}", "HashMap<Character, Integer> countCharacter(char[] array) {\n\t\tHashMap<Character, Integer> hm = new HashMap<Character, Integer>();\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (hm.containsKey(array[i]))\n\t\t\t\thm.put(array[i], hm.get(array[i]) + 1);\n\n\t\t\telse\n\t\t\t\thm.put(array[i], 1);\n\t\t}\n\t\treturn hm;\n\n\t}", "public HashMap<String, String> convertToHashMapOfStrings()\n {\n HashMap<String, String> hashMapOfStrings = new HashMap<String, String>();\n for (DataPreferenceEnum key : preferencesHashMap.keySet())\n {\n String valueString = preferencesHashMap.get(key).toString();\n hashMapOfStrings.put(key.toString(), valueString);\n }\n\n return (hashMapOfStrings);\n }", "public static String[][] groupAnagrams(String[] strs) {\n\t\tif (strs.length == 0) return new String[][] {};\n\t\tMap<String, List<String>> map = new HashMap<String, List<String>>();\n\t\tfor (String s : strs) {\n\t\t\tchar[] ch = s.toCharArray();\n\t\t\tArrays.sort(ch);\n\t\t\tString key = new String(ch);\n\t\t\tif(!map.containsKey(key)) {\n\t\t\t\tList<String> list = new ArrayList<>();\n\t\t\t\tlist.add(s);\n\t\t\t\tmap.put(key, list);\n\t\t\t}else\n\t\t\t\tmap.get(key).add(s);\n\t\t}\n//\t\tprint(map);\n\t\treturn convertMapToArray2D(map);\n }", "public static void sanitizeAndSplit(ArrayList<String> myChunk){\n\t\t//Variables\n\t\tString myStringArray[] = {};\n\n\t\ttry {\n\t\t\t//step through string array and put key value pairs into a string\n\t\t\tfor(String temp : myChunk){\n\t\t\t\t//Split the key and values as put into hashMap\n\t\t\t\tif(temp != null) {\n\t\t\t\t\tmyStringArray = temp.split(\"\\\\s+\");\n\t\t\t\t\tWord word = hm.get(myStringArray[0]);\n\t\t\t\t\tif(word == null) {\n\t\t\t\t\t\thm.put(myStringArray[0], new Word(myStringArray[0], Integer.parseInt(myStringArray[1])));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\thm.get(myStringArray[0]).addToCount(Integer.parseInt(myStringArray[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Map<String, String> decode(String s) {\n String[] keyValuePairs = s.split(\"&\");\n\n //creating tab 2D tab for separating key from value\n String[][] keyAndValue = new String[keyValuePairs.length][2];\n\n //iterating through the tab to split \"key=value\" pairs into 2D tab as [[key, value], [key, value]]\n for (int i = 0; i <= keyValuePairs.length - 1; i++) {\n //splitting \"key=value\" pairs into 2D tab as [[key, value], [key, value]]\n keyAndValue[i] = keyValuePairs[i].split(\"=\");\n //adding [[key, value], [key, value]] to the map\n for (int j = 0; j <= keyAndValue.length - 1; j++) {\n keyValuesMap.put(keyAndValue[i][0], keyAndValue[i][1]);\n }\n }\n return keyValuesMap;\n }", "public Map<String, Integer> wordCount(String[] strings) {\n Map <String, Integer> map = new HashMap();\n int counter = 1;\n for (String s: strings){\n if (map.containsKey(s)){\n counter = map.get(s);\n map.put(s, counter + 1);\n }else{\n counter = 1;\n map.put(s, counter);\n }\n }\n return map;\n}", "private Map createSpecimenArrayMap(SpecimenArrayForm specimenArrayForm)\r\n\t{\r\n\t\tfinal Map arrayContentMap = new HashMap();\r\n\t\tString value = \"\";\r\n\t\tfinal int rowCount = specimenArrayForm.getOneDimensionCapacity();\r\n\t\tfinal int columnCount = specimenArrayForm.getTwoDimensionCapacity();\r\n\r\n\t\tfor (int i = 0; i < rowCount; i++)\r\n\t\t{\r\n\t\t\tfor (int j = 0; j < columnCount; j++)\r\n\t\t\t{\r\n\t\t\t\tfor (int k = 0; k < AppletConstants.ARRAY_CONTENT_ATTRIBUTE_NAMES.length; k++)\r\n\t\t\t\t{\r\n\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\tif (k == AppletConstants.ARRAY_CONTENT_ATTR_POS_DIM_ONE_INDEX)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tvalue = String.valueOf(i + 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (k == AppletConstants.ARRAY_CONTENT_ATTR_POS_DIM_TWO_INDEX)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tvalue = String.valueOf(j + 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarrayContentMap.put(SpecimenArrayAppletUtil\r\n\t\t\t\t\t\t\t.getArrayMapKey(i, j, columnCount, k), value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn arrayContentMap;\r\n\t}", "private static HashMap<String, String> parseArgs(String... args)\n {\n final HashMap<String, String> map = new HashMap();\n //TODO convert args to map\n String lastArg = null;\n for (String string : args)\n {\n //Store new arg\n if (string.startsWith(\"-\"))\n {\n lastArg = string.trim().replaceFirst(\"-\", \"\");\n if (lastArg.contains(\"=\"))\n {\n String[] split = lastArg.split(\"=\");\n lastArg = split[0];\n map.put(lastArg, split[1].replace(\"\\\\\\\"\", \"\"));\n continue;\n }\n map.put(lastArg, null);\n }\n else\n {\n //Store arg value, or append value\n String v = map.get(lastArg);\n if (v == null)\n {\n v = string;\n }\n else\n {\n v += \",\" + string;\n }\n map.put(lastArg, v);\n }\n }\n return map;\n }", "Map <String, List <String> > parse (List <String> keys, List <String> lines);", "public static void main(String[] args) {\n\t\tArrayList<String> givenArray = new ArrayList<String>();\n\t\tArrayList<String> listOfNamesStartingWithA = new ArrayList<String>();\n\t\tArrayList<String> listOfNamesStartingWithG = new ArrayList<String>();\n\t\tgivenArray.add(\"apple\");\n\t\tgivenArray.add(\"appleinc\");\n\t\tgivenArray.add(\"applemac\");\n\t\tgivenArray.add(\"google\");\n\t\t\n\t\tHashMap<String, ArrayList> map = new HashMap<String, ArrayList>();\n\t\tmap.clone();\n\t\tIterator<String> itr = givenArray.iterator();\n\t\t\n\t\twhile(itr.hasNext()) {\n\t\t\tString arrayListOb = itr.next();\n\n\t\t\tString key =arrayListOb.substring(0, 1);\n\t\t\tif(key.startsWith(\"a\")) {\n\t\t\t\tlistOfNamesStartingWithA.add(arrayListOb);\t\n\t\t\t\tmap.put(key, listOfNamesStartingWithA);\t\n\t\t\t}\n\t\t\tif(key.startsWith(\"g\")) {\n\t\t\t\tlistOfNamesStartingWithG.add(arrayListOb);\n\t\t\t\tmap.put(key, listOfNamesStartingWithG);\n\t\t\t}\t\t\t\t\n\t\t\tSystem.out.println(key);\n\t\t\tSystem.out.println(map.get(key));\n\t\t}\n\t\tSystem.out.println(map.size());\n\t\t//System.out.println(map.get(\"g\"));\n\t\t//System.out.println(map.get(\"a\"));\n\t\t/*for(Map.Entry<String,ArrayList> entry: map.entrySet())\n\t\t{\n\t\t\tSystem.out.println(map.get(\"a\"));\n\t\t}*/\n\t}", "private Map getAsMap(BuildStatus bs) {\n String lines[] = bs.toExternalForm().split(\"\\n\");\n Map m = new HashMap();\n for (int i = 0; i < lines.length; i++) {\n String line = lines[i];\n String parts[] = line.split(\"=\");\n String name = parts[0];\n String value = parts[1];\n m.put(name + \"=\", value);\n }\n return m;\n }", "public static void main(String[] args) {\n\t\tMap<String, List<String>> map = new HashMap<>();\n\t\tList<String> list = new ArrayList<>();\n\t\tmap.put(\"key1\", list);\n\t\tmap.get(\"key1\").add(\"value1\");\n\t\tmap.get(\"key1\").add(\"value2\");\n\t\t\n\n\t\t//(map.get(\"key1\").get(0)).isEqualTo(\"value1\");\n\t\t//(map.get(\"key1\").get(1)).isEqualTo(\"value2\");\n\t\t\n\t\tMap<String, String> map1 = Stream.of(new String[][] {\n\t\t\t { \"Hello\", \"World\" }, \n\t\t\t { \"John\", \"Doe\" }, \n\t\t\t}).collect(Collectors.toMap(data -> data[0], data -> data[1])); \n\t\t//Notice here the data type of key and value of the Map is same.\n\t\t//In order to make it more generic letís take the array of Objects and perform the same operation:\n\t\tMap<String, Integer> map2 = Stream.of(new Object[][] { \n\t\t { \"data1\", 1 }, \n\t\t { \"data2\", 2 }, \n\t\t}).collect(Collectors.toMap(data -> (String) data[0], data -> (Integer) data[1]));\n\t\t//Here, we create a map of the key as String and value as an Integer.\n\t}", "public static Map<String, String> strToMap(String str) {\n return strToMap(str, \"|\", false);\n }", "public Map<String, Integer> wordLen(String[] str) {\n\t\t\n\t\tMap<String, Integer> map = new HashMap<String, Integer>();\n\t\t\n\t\tfor (int i = 0; i < str.length; i++) {\n\t\t\tmap.put(str[i], str[i].length());\n\t\t}\n\t\t\n\t\treturn map;\n\t\t\n\t}", "HashMap<String,Integer> mapCode(String[] splitwords){\n\t\t\tHashMap<String,Integer> wordsOfCode= new HashMap<String,Integer>();\n\t\t\tLovinsStemmer nonSuffixes=new LovinsStemmer();\n\t\t\t//PorterStemmer nonSuffixes=new PorterStemmer();\n\t\t\tint num=0;\n\t\t\tfor(int i=0; i<splitwords.length;i++) {\n\t\t\t\tString temp=nonSuffixes.stem(splitwords[i]);\n\t\t\t\tif(!totalWords.containsKey(temp)) {\n\t\t\t\t\ttotalWords.put(temp, num);\n\t\t\t\t\t\n\t\t\t\t\twordsOfCode.put(temp,num);\n\t\t\t\t\tnum++;\n\t\t\t\t}else if(!wordsOfCode.containsKey(temp)) {\n\t\t\t\t\twordsOfCode.put(temp,totalWords.get(temp));\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn wordsOfCode;\n\t\t\t\n\t\t}", "public static LinkedHashMap<String, Object> toMap(Object... elems) {\n return arrayToMap(elems);\n }", "public static void hashMapEx() {\n\t\tString str = \"habiletechE\";\n\t\tstr = str.toLowerCase();\n\t\tchar[] ch = str.toCharArray();\n\t\tint size = ch.length;\n\n\t\tHashMap<Character, Integer> hmap = new HashMap<Character, Integer>();\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (!hmap.containsKey(ch[i]))\n\t\t\t\thmap.put(ch[i], 1);\n\t\t\telse {\n\t\t\t\tint val = hmap.get(ch[i]) + 1;\n\t\t\t\thmap.put(ch[i], val);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Duplicate Charaacters :\");\n\t\tfor (Map.Entry<Character, Integer> hm : hmap.entrySet()) {\n\t\t\tif (hm.getValue() > 1)\n\t\t\t\tSystem.out.println(hm.getKey() + \" \" + hm.getValue());\n\t\t}\n\t}", "public HashMap<String, Integer> getHashMap(){\n\t\tHashMap <String, Integer> hm1 = new HashMap <String, Integer>();\n\t\t//get each line of the book and store it as an arrayList\n\t\twords = wordData.getLines();\n\t \n\t\tfor(int i =0; i<words.size(); i++){\n\t\t\t \n\t\t\tString[] aLine = words.get(i).split(\" \");\n\t\t\t\n\t\t\tfor(int j = 0; j<aLine.length; j++){\n\t\t\t\t\n\t\t\t\t// convert all upper case to lower case & remove all non-alphabetic symbols;\n\t\t\t\t\t\n\t\t\t\tsparsedWords.add(aLine[j].toLowerCase().replaceAll(\"[^\\\\w]\", \"\"));\n\t\t\t}\n\t\t}\n\t\t//put in key and value in hashmap\n\t\tfor(int key = 0; key < sparsedWords.size(); key++){\n\t\t\t\n\t\t\tif (hm1.containsKey(sparsedWords.get(key))){\n\t\t\t\tint count = hm1.get(sparsedWords.get(key));\n\t\t\t\thm1.put(sparsedWords.get(key), count + 1);\n\t\t\t}else{\n\t\t\t\thm1.put(sparsedWords.get(key), 1);\n\t\t\t}\n\t\t}\n\t\treturn hm1;\n\t\t \t\n\t\t}", "public static Map<String, String> queryToMap(String query){\n Map<String, String> result = new HashMap<String, String>();\n for (String param : query.split(\"&\")) {\n String pair[] = param.split(\"=\");\n if (pair.length>1) {\n result.put(pair[0], pair[1]);\n }else{\n result.put(pair[0], \"\");\n }\n }\n return result;\n }", "private void toMap(String cycle) {\n for (int i = 0; i < cycle.length() - 1; i++) {\n Integer input = _alphabet.toInt(cycle.charAt(i));\n Integer output = _alphabet.toInt(cycle.charAt(i + 1));\n _map.put(input, output);\n }\n Integer i = _alphabet.toInt(cycle.charAt(cycle.length() - 1));\n Integer o = _alphabet.toInt(cycle.charAt(0));\n _map.put(i, o);\n }", "private Map<String, String> toMap(final Attributes atts) {\r\n\t\tfinal Map<String, String> values = Maps.newLinkedHashMap();\r\n\t\t\r\n\t\tfor (int index = 0; index < atts.getLength(); index++) {\r\n\t\t\tvalues.put(atts.getLocalName(index), atts.getValue(index));\r\n\t\t}\r\n\t\t\r\n\t\treturn values;\r\n\t}", "private static Map<String, String> getArgMap(String[] args) {\n \t\r\n Map<String,String> argMap = new HashMap<String,String>();\r\n for (int i = 0; i < args.length; i++) {\r\n \tlogger.info(\"arg[\"+i+\"]=\"+args[i]);\r\n String[] argArray = args[i].split(\"=\"); //$NON-NLS-1$\r\n\r\n if (argArray.length == 2) {\r\n argMap.put(argArray[0], argArray[1]);\r\n }\r\n }\r\n return argMap;\r\n }", "public static HashMap<Integer, String> createDictionary(HashSet<Integer> byteKey, ArrayList<String> bitsValue){\n HashMap<Integer, String> dictionary = new HashMap<>();\n ArrayList <Integer> bytesKey = new ArrayList<>(byteKey);\n for (int i = 0; i < bytesKey.size(); i++) {\n dictionary.put(bytesKey.get(i), bitsValue.get(i));\n }\n return dictionary;\n }", "public void sortChars(String[] array){\n HashMap<String, LinkedList<String>> list = new HashMap<String, LinkedList<String>>();\n\n for(String s: array){\n String key = sortChars(s);\n if(!list.containsKey(key)){\n list.put(key, new LinkedList<String>());\n }\n LinkedList<String> anagrams = list.get(key);\n anagrams.push(s);\n }\n\n int index = 0;\n for(String key: list.keySet()){\n LinkedList<String> anagrams = list.get(key);\n for(String val: anagrams){\n array[index] = val;\n index++;\n }\n }\n }", "public static Map<String, String> convertTomap(Stream<String> stream, String delimiter) {\n logger.info(\"converting stream of strings to Map using delimiter : \" + delimiter);\n return stream.filter(current_line -> current_line.length() > 0)\n .map(cl -> cl.split(delimiter))\n .filter(cl -> cl.length > 1)\n .collect(Collectors.toMap(cl -> cl[0].trim(), cl -> cl[1].trim(), (val1, val2) -> val2.trim()));\n }", "public static Map<String,String> StringtoMap(String str){\n\t\tMap<String,String> map = new LinkedHashMap<String,String>();\n\n\t\ttry {\n\t\t\tDocument document = DocumentHelper.parseText(str);\n\t\t\tElement root = document.getRootElement();\n\t\t\tList<Element> elementList = root.elements();\n\t\t\tfor(Element e : elementList){\n\t\t\t\tmap.put(e.getName(), e.getText());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn map;\n\t}", "private String[] toArray(String str) { String arr[] = new String[1]; arr[0] = str; return arr; }", "public static Map mapFrom(Object[][] keyValueSets) {\r\n\t\tMap map = new HashMap(keyValueSets.length);\r\n\t\tfor (int i=0; i<keyValueSets.length; i++) {\r\n\t\t\tmap.put(keyValueSets[i][0], keyValueSets[i][1]);\r\n\t\t}\r\n\t\treturn map;\r\n\t}", "private static void initializeMap() {\n\t\tmap = new HashMap<String, MimeTransferEncoding>();\n\t\tfor (MimeTransferEncoding mte : MimeTransferEncoding.values()) {\n\t\t\tmap.put(mte.string, mte);\n\t\t}\n\t}", "public Map<String, Integer> wordCount(String[] strings) {\n\n\n Map<String, Integer> mojaMapa = new HashMap<String, Integer>();\n\n for (String element : strings) {\n if (mojaMapa.containsKey(element)) {\n Integer iloscWystapienElementu = mojaMapa.get(element);\n mojaMapa.put(element, iloscWystapienElementu + 1);\n } else {\n mojaMapa.put(element, 1);\n }\n\n\n }\n return mojaMapa;\n }", "public HashMap<String, String> convertToString() throws IOException\n\t{\n\t HashMap<String, String> map = new HashMap<String, String>();\n\n\t String line;\n\t BufferedReader reader;\n\t String multiple_line=null;\n\t\ttry {\n\t\t\treader = new BufferedReader(new FileReader(filePath));\n\t\t\t\n\t\t\twhile ((line = reader.readLine()) != null)\n\t\t {\n\t\t String[] parts = (line.replaceAll(\"\\\"\", \"\").split(\"=\", 2)); //tolto replaceAll\n\t\t if (parts.length >= 2)\n\t\t {\n\t\t String key = parts[0];\n\t\t multiple_line=key;\n\t\t String value = parts[1];\n\t\t map.put(key, value);\n\t\t } else {\n\t\t \n\t\t String line2=map.get(multiple_line);\n\t\t map.put(multiple_line, line2+\"\\n\"+line);\n\t\t }\n\t\t }\n\t\t\t\n\t\t\t//for (String key : map.keySet())\n\t\t //{\n\t\t // System.out.println(key + \":\" + map.get(key));\n\t\t // }\n\t\t reader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t \n\t \n\t return map;\n\t}", "private HashMap parseMap(String localData){\n int localPointer = 0;\n HashMap temp = new HashMap();\n char c = localData.charAt(localPointer++);\n while (c != '}'){\n String entry = \"\";\n entry_loop :\n while (c != '}'){\n switch (c){\n case ',' :\n c = localData.charAt(localPointer++);\n break entry_loop;\n case '{' :\n String tempEntry = this.getFull(localData.substring(localPointer),0);\n entry += tempEntry;\n localPointer += tempEntry.length();\n break ;\n case '[' :\n String tempEntry2 = this.getFull(localData.substring(localPointer),1);\n entry += tempEntry2;\n localPointer += tempEntry2.length();\n break ;\n default :\n entry += c;\n break ;\n }\n c = localData.charAt(localPointer++);\n }\n entry = entry.trim();\n String[] entryArray = entry.split(\":\",2);\n String key = entryArray[0].trim();\n String value = entryArray[1].trim();\n Object keyObj = null;\n Object valueObj = null;\n\n switch (this.getDataType(key.trim())){\n case String:\n keyObj = key.trim().replace(\"\\\"\",\"\");\n break ;\n case Integer:\n keyObj = Long.parseLong(key.trim());\n break ;\n case Float:\n keyObj = Float.parseFloat(key.trim());\n break ;\n case Boolean:\n keyObj = Boolean.parseBoolean(key.trim());\n break ;\n case Map:\n keyObj = this.parseMap(key.trim());\n break ;\n case List:\n keyObj = this.parseList(key.trim());\n }\n\n switch (this.getDataType(value.trim())){\n case String:\n valueObj = value.trim().replace(\"\\\"\",\"\");\n break ;\n case Integer:\n valueObj = Long.parseLong(value.trim());\n break ;\n case Float:\n valueObj = Float.parseFloat(value.trim());\n break ;\n case Boolean:\n valueObj = Boolean.parseBoolean(value.trim());\n break ;\n case Map:\n valueObj = this.parseMap(value.trim());\n break ;\n case List:\n valueObj = this.parseList(value.trim());\n }\n temp.put(keyObj,valueObj);\n }\n return temp;\n }", "String[][] packData();", "public static Map<String, String> queryToMap(String query) {\n\t\tMap<String, String> result = new HashMap<String, String>();\n\t\tfor (String param : query.split(\"&\")) {\n\t\t\tString pair[] = param.split(\"=\");\n\t\t\tif (pair.length > 1) {\n\t\t\t\tresult.put(pair[0], pair[1]);\n\t\t\t} else {\n\t\t\t\tresult.put(pair[0], \"\");\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static Map<String, String> queryToMap(String query) {\n\t\tMap<String, String> result = new HashMap<String, String>();\n\t\tfor (String param : query.split(\"&\")) {\n\t\t\tString pair[] = param.split(\"=\");\n\t\t\tif (pair.length > 1) {\n\t\t\t\tresult.put(pair[0], pair[1]);\n\t\t\t} else {\n\t\t\t\tresult.put(pair[0], \"\");\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static <T> Set<T> convertArrayToSet(T array[]) \r\n { \r\n \r\n // Create the Set by passing the Array \r\n // as parameter in the constructor \r\n Set<T> set = new HashSet<>(Arrays.asList(array)); \r\n \r\n // Return the converted Set \r\n return set; \r\n }", "public static Map<String, IpAddress> convert(List<IpAddress> ipAddressList) {\n Map<String, IpAddress> ipAddressMap = new HashMap<String, IpAddress>();\n\n for (IpAddress ipAddress : ipAddressList) {\n ipAddressMap.put(ipAddress.getUuid(), ipAddress);\n }\n\n return ipAddressMap;\n }", "public static Map<String, String> getQueryMap(String query) throws UnsupportedEncodingException\n {\n String[] params = query.split(\"&\");\n Map<String, String> map = new HashMap<String, String>(params.length);\n for (String param : params)\n {\n String[] keyValue = param.split(\"=\");\n map.put(keyValue[0], URLDecoder.decode(keyValue[1], \"UTF-8\"));\n }\n return map;\n }", "public static Map<String, String> strToMap(String str, boolean trim) {\n return strToMap(str, \"|\", trim);\n }", "private static Map<String, String> generateDataMap(String dataString) {\n dataString = strManager.removeString(dataString, \" \");\n dataString = strManager.removeString(dataString, \"\\\\+\");\n String[] dataSet = dataString.split(\",\", -1);\n\n Map<String, String> dataMap = new HashMap<String, String>();\n\n for (int i = 2; i < dataSet.length; i++) {\n String[] d = dataSet[i].split(\"=\", -1);\n String transducer = d[0];\n String value = strManager.removeUnits(d[1]);\n\n dataMap.put(transducerNames.get(transducer), value);\n }\n dataMap = addLocation(dataMap);\n\n return dataMap;\n }", "public final Map<String, Integer> mo33708h(List<String> list) {\n return (Map) m968r(new C2164bs(this, list));\n }", "public ArrayList<String> anagrams(String[] strs) {\n HashMap<String, ArrayList<String>> rec=new HashMap<String,ArrayList<String>>();\n ArrayList<String> ans=new ArrayList<String>();\n if(strs.length==0)return ans;\n for(int i=0;i<strs.length;i++){\n char[] key=strs[i].toCharArray();\n Arrays.sort(key);\n String newkey=new String(key);\n if(rec.containsKey(newkey)){\n rec.get(newkey).add(strs[i]);\n }\n else{\n ArrayList<String> ad=new ArrayList<String>();\n ad.add(strs[i]);\n rec.put(newkey,ad);\n }\n }\n for(ArrayList<String> value:rec.values()){\n if(value.size()>1)ans.addAll(value);\n }\n return ans;\n }", "public static Map<String, String> strToMap(String str, String delim, boolean trim) {\n return strToMap(str, delim, trim, null);\n\n }", "private static Map<String, String> createMapFromList(final List<String> all) {\n\t\tfinal Map<String, String> map = new ConcurrentHashMap<>();\n\n\t\tfor (final String documentElement : all) {\n\t\t\tif (documentElement != null) {\n\t\t\t\tmap.put(documentElement, documentElement);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}", "public static HashMap<String, ArrayList<String>> parseKeyValueList(String keySpliter, String strToParse) {\r\n\t\treturn parseKeyValueList (keySpliter, null, \"\\n\", strToParse);\r\n\t}", "private static List<List<String>> groupAnagrams(String[] strs) {\n List<List<String>> result = new ArrayList<List<String>>();\n\n HashMap<Integer, ArrayList<String>> map = new HashMap<Integer, ArrayList<String>>();\n for(String str: strs){\n int key = 0;\n for(int i=0; i<str.length(); i++){\n key = key + (str.charAt(i)-'a');\n }\n\n if(map.containsKey(key)){\n map.get(key).add(str);\n }else{\n ArrayList<String> al = new ArrayList<String>();\n al.add(str);\n map.put(key, al);\n }\n }\n\n result.addAll(map.values());\n\n return result;\n }", "public ArrayList<State> stringArraytoStateArray (ArrayList<String> pArray)\r\n\t{\r\n\t\tArrayList<State> sArray = new ArrayList<State>();\r\n\t\tfor (Iterator<String> iterator = pArray.iterator(); iterator.hasNext();) \r\n\t\t{\r\n\t\t\tString string1 = (String) iterator.next();\r\n\t\t\tState sTemp = new State(string1);\r\n\t\t\tsTemp.toString();\r\n\t\t\tsArray.add(sTemp);\r\n\t\t}\r\n\t\treturn sArray;\r\n\t}", "public static HashMap<String, ArrayList<String>> parseKeyValueList(String keySpliter,String valueSpliter, String strToParse) {\r\n\t\treturn parseKeyValueList (keySpliter, valueSpliter, \"\\n\", strToParse);\r\n\t}", "public static List<List<String>> groupAnagrams(String[] strs) {\n String[] wordHash = new String[strs.length];\n for (int i = 0; i < strs.length; i++) { // O(n)\n wordHash[i] = hashWord(strs[i]); // O(c + 26)\n }\n HashMap<String,List<String>> map = new HashMap<>();\n for (int i = 0; i < strs.length; i++) {\n List<String> words = map.getOrDefault(wordHash[i], new ArrayList<String>());\n words.add(strs[i]);\n map.put(wordHash[i], words);\n }\n List<List<String>> out = new ArrayList<>();\n for (String k : map.keySet()) {\n out.add(map.get(k));\n }\n return out;\n }", "public List<List<String>> groupAnagrams(String[] strs) {\n \n int len = strs.length;\n Hashtable<String, List<String>> anagrams = new Hashtable<>();\n \n for(int i=0; i<len; i++){\n char[] sorted = strs[i].toCharArray(); \n Arrays.sort(sorted);\n String key = String.valueOf(sorted);\n List<String> temp = new ArrayList<>();\n \n if(anagrams.containsKey(key)){\n temp = anagrams.get(key);\n \n }\n temp.add(strs[i]);\n anagrams.put(key, temp);\n }\n \n \n List<List<String>> answer = new ArrayList<>();\n \n for(List<String> item: anagrams.values() ){\n answer.add(item);\n }\n \n return answer;\n \n }", "public static int[][] fillMap(List<String> lines){\n int[][] map=new int[lines.size()][lines.get(0).length()];\n //find values of each spot\n for(int i=0;i<lines.size();i++){\n for(int j=0;j<lines.get(i).length();j++){\n char c=lines.get(i).charAt(j);\n switch (c) {\n case '_': //empty\n map[i][j]=0;\n break;\n case 'B': //Blue\n map[i][j]=1;\n break;\n case 'A': //Cyan\n map[i][j]=2;\n break;\n case 'W': //white\n map[i][j]=3;\n break;\n case 'R': //red\n map[i][j]=4;\n break;\n case 'P': //pink\n map[i][j]=5;\n break;\n case 'D': //magenta\n map[i][j]=6;\n break;\n case 'O': //orange\n map[i][j]=7;\n break;\n case 'G': //Green\n map[i][j]=8;\n break;\n case 'Y': //Yellow\n map[i][j]=9;\n break;\n case 'K': //Seafoam\n map[i][j]=10;\n break;\n case 'Q': //purple\n map[i][j]=11;\n break;\n default:\n map[i][j]=12; //shouldn't happen\n break;\n }\n }\n }\n return map;\n }", "public void createIDMap()\n {\n IDMap = new HashMap<>();\n idFile.open(\"idpassword.txt\");\n String line = idFile.getNextLine();\n\n\n\n while(line!=null) {\n String[] fields = line.split(\",\");\n IDMap.put(fields[0], fields[1]);\n\n line = idFile.getNextLine();\n\n }\n\n }", "public Map<String, String> toSingleValueMap()\r\n/* 367: */ {\r\n/* 368:538 */ LinkedHashMap<String, String> singleValueMap = new LinkedHashMap(this.headers.size());\r\n/* 369:539 */ for (Map.Entry<String, List<String>> entry : this.headers.entrySet()) {\r\n/* 370:540 */ singleValueMap.put((String)entry.getKey(), (String)((List)entry.getValue()).get(0));\r\n/* 371: */ }\r\n/* 372:542 */ return singleValueMap;\r\n/* 373: */ }", "private Map<String, String> extractPropertyValues(String[] paramArray,\n\t\t\tString[] connPropertyNames) {\n\n\t\tMap<String, String> connPropValues = new HashMap<String, String>();\n\t\tString[] temp = null;\n\t\tString userPassedValue = null;\n\n\t\tfor (int i = 0; i < paramArray.length; i++) {\n\t\t\ttemp = paramArray[i].split(\"=\");\n\t\t\tfor (int j = 0; j < connPropertyNames.length; j++) {\n\t\t\t\tif (temp[0].equalsIgnoreCase(connPropertyNames[j])) {\n\t\t\t\t\tif (temp.length < 2) {\n\t\t\t\t\t\tuserPassedValue = \"\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tuserPassedValue = temp[1];\n\t\t\t\t\t}\n\t\t\t\t\tconnPropValues.put(connPropertyNames[j], userPassedValue);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn connPropValues;\n\t}", "public static HashMap<String,String[][]> build(String[][] data){\r\n\t\tString key;\t\t\t\t\t\t\t\t\t\t\t//One of the keys\r\n\t\tString[][] value;\t\t\t\t\t\t\t\t\t//The corresponding value\r\n\t\tString[] valueElement0, valueElement1;\t\t\t\t//The two arrays in the value\r\n\t\tInteger step;\t\t\t\t\t\t\t\t\t\t//For keeping track of the position in the array\r\n\t\tString warning;\t\t\t\t\t\t\t\t\t\t//A message to let the user know there might be a problem\r\n\t HashMap<String, String[][]> result;\r\n\t \r\n\t if ((data.length % 3) != 0) {\r\n\t \twarning = \r\n\t \t\t\t\"WARNING in HashMapBuilder2.build: Bug detected. Contact Ken Samuel.\";\r\n\t \tSystem.err.println(warning);\r\n\t \tGlobal.unableToRespondMessage.add(warning);\r\n\t }\r\n\t \r\n\t result = new HashMap<String, String[][]>();\t\t\t//Initialize\r\n\t key = null;\t\t\t\t\t\t\t\t\t\t\t//Initialize\r\n\t valueElement0 = new String[0];\t\t\t\t\t\t//Initialize\r\n\t valueElement1 = new String[0];\t\t\t\t\t\t//Initialize\r\n\t step = -1;\t\t\t\t\t\t\t\t\t\t\t//Initialize\r\n\t for(String[] array : data){\r\n\t step++;\r\n\t switch(step % 3){\r\n\t case 0: \r\n\t if(array[0] == null) {\r\n\t \twarning = \"WARNING in HashMapBuilder2.build: Bug detected. Contact Ken Samuel.\";\r\n\t \t \tSystem.err.println(warning);\r\n\t \t \tGlobal.unableToRespondMessage.add(warning);\r\n\t }\r\n\t key = array[0];\r\n\t continue;\r\n\t case 1:\r\n\t \tvalueElement0 = array;\r\n\t continue;\r\n\t case 2:\r\n\t \tvalueElement1 = array;\r\n\t\t \tvalue = new String[2][Math.max(valueElement0.length,valueElement1.length)];\r\n\t\t \tvalue[0] = valueElement0;\r\n\t\t \tvalue[1] = valueElement1;\r\n\t\t \tresult.put(key,value);\r\n\t break;\r\n\t default:\t\t\t//This should never happen\r\n\t \twarning = \"WARNING in HashMapBuilder2.build: Bug detected. Contact Ken Samuel.\";\r\n \t \tSystem.err.println(warning);\r\n \t \tGlobal.unableToRespondMessage.add(warning);\r\n\t }\r\n\t }\r\n\t return result;\r\n\t}", "public static Map<String, String> strToMap(String str, String delim, boolean trim, String pairsSeparator) {\n if (UtilValidate.isEmpty(str)) {\n return null;\n }\n Map<String, String> decodedMap = new HashMap<>();\n List<String> elements = split(str, delim);\n pairsSeparator = pairsSeparator == null ? \"=\" : pairsSeparator;\n\n for (String s: elements) {\n\n List<String> e = split(s, pairsSeparator);\n if (e.size() != 2) {\n continue;\n }\n String name = e.get(0);\n String value = e.get(1);\n if (trim) {\n if (name != null) {\n name = name.trim();\n }\n if (value != null) {\n value = value.trim();\n }\n }\n\n try {\n if (value != null && name != null) {\n decodedMap.put(URLDecoder.decode(name, \"UTF-8\"), URLDecoder.decode(value, \"UTF-8\"));\n }\n } catch (UnsupportedEncodingException e1) {\n Debug.logError(e1, MODULE);\n }\n }\n return decodedMap;\n }", "@Override\n public Map<String, List<PairModel>> getPairValues(String[] keyArr) {\n return null;\n }", "public static HashMap<String, CNV[]> splitByChromsome(CNV[] cnvs){\n\t\tArrayList<CNV> al = new ArrayList<CNV>();\n\t\tHashMap<String, CNV[]> map = new HashMap<String, CNV[]>();\n\t\tString chromosome = cnvs[0].getGrGraph().getChromosome();\n\t\t//for each GenomicRegion\n\t\tfor (int i=0; i< cnvs.length; i++){\n\t\t\t//same chromosome?\n\t\t\tif (cnvs[i].getGrGraph().getChromosome().equals(chromosome)){\n\t\t\t\tal.add(cnvs[i]);\n\t\t\t}\n\t\t\t//different chromosome!\n\t\t\telse {\n\t\t\t\t//set new chrom in map\n\t\t\t\tCNV[] regions = new CNV[al.size()];\n\t\t\t\tal.toArray(regions);\n\t\t\t\tmap.put(chromosome, regions);\n\t\t\t\t//reset params\n\t\t\t\tal = new ArrayList();\n\t\t\t\tal.add(cnvs[i]);\n\t\t\t\tchromosome = cnvs[i].getGrGraph().getChromosome();\n\t\t\t}\n\t\t}\n\t\t//add last\n\t\tCNV[] regions = new CNV[al.size()];\n\t\tal.toArray(regions);\n\t\tmap.put(chromosome, regions);\n\t\treturn map;\n\t}", "private Map<String, String> m15124a(Map<String, String> map) {\n String str;\n String str2;\n HashMap hashMap = new HashMap();\n if (map != null) {\n for (Entry entry : map.entrySet()) {\n Object key = entry.getKey();\n Object value = entry.getValue();\n if (!(key instanceof String) || !(value instanceof String)) {\n C7262l b = this.f13489a.mo23049b();\n StringBuilder sb = new StringBuilder();\n sb.append(\"Unexpected class type in trackEvent(); all keys and values passed as parameters must be String. Encountered \");\n sb.append(key.getClass().getCanonicalName());\n sb.append(\"/\");\n sb.append(value.getClass().getCanonicalName());\n sb.append(\"; will use toString() value instead, which may be unexpected...\");\n b.mo22913a(\"EventServiceImpl\", sb.toString());\n str = key.toString();\n str2 = value.toString();\n } else {\n str = (String) key;\n str2 = (String) value;\n }\n hashMap.put(str, str2);\n }\n }\n return hashMap;\n }", "private HashMap<String, String> returnCorrectMap(String...parameters) {\n\n\t\tHashMap<String, String> map = null;\n\n\t\ttry {\n\n\t\t\tmap = generateHashMapFromStringList(parameters);\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn map;\n\t}", "private static Map<String, String> parseAgentArgs(String agentArgs) {\n if (agentArgs == null) {\n return Collections.emptyMap();\n }\n String[] agentArgsArr = agentArgs.split(\",\");\n Map<String, String> argsMap = new HashMap<>(agentArgsArr.length);\n for (String arg : agentArgsArr) {\n String[] splitAgentArg = arg.split(\"=\");\n if (splitAgentArg.length != 2) {\n throw new IllegalArgumentException(\n String.format(\n \"Agent args is not well formed: %s. Use the format \\\"arg1=val1,arg2=val2,arg3=val3\\\"\",\n arg));\n }\n argsMap.put(splitAgentArg[0], splitAgentArg[1]);\n }\n return argsMap;\n }", "public static HashMap<String,String> splitJson(String s) {\n ObjectMapper mapper1 = new ObjectMapper();\n HashMap<String,String> rtn = new HashMap<String,String>();\n HashMap<String,String> jobj = null;\n try {\n jobj = mapper1.readValue(s, HashMap.class);\n for (Map.Entry<String, String> entrySet : jobj.entrySet()) {\n String key = entrySet.getKey();\n Object value = entrySet.getValue();\n rtn.put(key, mapper1.writeValueAsString(value));\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n return rtn;\n }", "public static void main(String[] args) {\n HashMap<Character,Integer> hMapOutPut = new HashMap<>();\n //HashMap map = new HashMap();\n String sInput = \"india\";\n char[] strInputArray = sInput.toCharArray();\n for(char fLoop: strInputArray) {\n System.out.println(fLoop);\n if(hMapOutPut.containsKey(fLoop)) {\n int temp=hMapOutPut.get(fLoop)+1;\n hMapOutPut.put(fLoop,temp );\n }else {\n hMapOutPut.put(fLoop, 1);\n }\n }\nSystem.out.println(hMapOutPut);\n }", "public void createHashTable() {\n\n String[] tempArray = new String[words.size()];\n\n for (int i = 0; i < words.size(); i++) {\n char[] word = words.get(i).toCharArray(); // char[] snarf\n Arrays.sort(word); // char[] afnrs\n tempArray[i] = toString(word); // String afnrs\n }\n\n for (int i = 0; i < words.size(); i++) {\n String word = tempArray[i];\n hashTable.put(word.substring(0, 4), i); // plocka bort bokstav nr 5\n String subString4 = (word.substring(0, 3) + word.substring(4, 5)); // plocka bort bokstav nr 4\n hashTable.put(subString4, i);\n String subString3 = (word.substring(0, 2) + word.substring(3, 5)); // plocka bort bokstav nr 3\n hashTable.put(subString3, i);\n String subString2 = (word.substring(0, 1) + word.substring(2, 5)); // plocka bort bokstav nr 2\n hashTable.put(subString2, i);\n hashTable.put(word.substring(1, 5), i); // plocka bort bokstav nr 1\n }\n }", "private static Map<Character, Set<Character>> genLessMap(String[] words) throws Exception {\n Map<Character, Set<Character>> map = new HashMap<>();\n for (int i = 1; i < words.length; i ++) {\n String a = words[i - 1];\n String b = words[i];\n boolean allEqual = true;\n for (int j = 0; j < a.length() && j < b.length(); j ++) {\n if (a.charAt(j) == b.charAt(j))\n continue;\n allEqual = false;\n Set<Character> sb = map.get(a.charAt(j));\n if (sb == null) {\n sb = new HashSet<Character>();\n map.put(a.charAt(j), sb);\n }\n sb.add(b.charAt(j));\n break;\n }\n if (allEqual && a.length() > b.length())\n throw new Exception(\"Invalid.\");\n }\n return map;\n }", "public static <T> Set<T> array2Set(T[] array) {\n\t\treturn new HashSet<T>(Arrays.asList(array));\n\t}", "private static HashMap<String,String> getRowValues( String[] headerArray, String row ) {\r\n\t\t\r\n\t\tString[] dataArray = ContactsImport.parseCSVLine(row, false);\r\n\t\tHashMap<String,String> values = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t//validate: number of elements in the row should be equals to the number of elements in the header\r\n\t\t\tif (dataArray.length != headerArray.length) {\r\n\t\t\t\t\r\n\t\t\t\tthrow( new Exception(\"number of elements doesn't match header row\"));\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t\r\n\t\t\t\t//store all values in the hashmap\r\n\t\t\t\tvalues = new HashMap<String,String>();\r\n\t\t\t\t\r\n\t\t\t\tfor (int i=0; i<dataArray.length; i++) {\r\n\t\t\t\t\tvalues.put( headerArray[i], dataArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.error(\"invalid row (\" + e.getMessage() + \"): \" + row);\r\n\t\t}\r\n\t\t\r\n\t\treturn values;\r\n\t\t\r\n\t}", "public static int hashCode(char[] array, int start, int end) {\n\t\tint code = 0;\n\t\tfor( int i = end - 1; i >= start; i-- )\n\t\t\tcode = code * 31 + array[i];\n\t\treturn code;\n\t}", "private static Map<String, List<String>> getCustomStringStructure(@NotNull String s) {\n String[] arr = s.split(\" \");\n // the storage\n Map<String, List<String>> map = new TreeMap<>();\n // put the first element in the storage\n List<String> l = new ArrayList<>();\n l.add(arr[0]);\n map.put(arr[0].substring(0, 1), l);\n\n for (int i = 1; i < arr.length; i++) {\n String sub = arr[i].substring(0, 1);\n // if map contains key put String arr[i] in the List\n if (map.containsKey(sub)) {\n map.get(sub).add(arr[i]);\n } else {\n // if not put first letter as a key and arr[i] as a value in the map\n List<String> list = new ArrayList<>();\n list.add(arr[i]);\n map.put(sub, list);\n }\n }\n\n // sort by size, by string's length and alphabetically\n Map<String, List<String>> collect = map.entrySet()\n .stream()\n .filter(k -> k.getValue().size() > 1)\n .collect(Collectors.toMap(\n Map.Entry::getKey,\n e -> e.getValue().stream().sorted((o1, o2) -> {\n if (o2.length() != o1.length()) {\n return o2.length() - o1.length();\n } else {\n return o1.compareTo(o2);\n }\n })\n .collect(Collectors.toList())\n ));\n\n // return TreeMap to sort keys\n return new TreeMap<>(collect);\n }", "private void setUrlPrefixMappingToMap(String[] prefixArr)\n\t{\n\t\tif( prefixArr != null )\n\t\t{\n\t\t\tfor(String urlPrefix : prefixArr)\n \t{ \n\t\t\t\tif(urlPrefix.contains(DELIMITER))\n\t\t\t\t{\n\t \t\tString[] keyVal = urlPrefix.split(\"::\");\n\t \t\tString key \t\t= keyVal[0];\n\t \t\tString value \t= keyVal[1].trim();\n\t \t\tlog.info(\"REST SERVICE Key------->>> \"+key);\n\t \t\tlog.info(\"REST SERVICE Value------->>> \"+value);\n\t \t\tappurlMap.put(key , value);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tlog.warn(\"NO DELEMETERS PROVIDED FOR REDIRECT SERVICE URL -------->>> \");\n\t\t\t\t}\n \t}\n\t\t}\n\t}", "public static Map<Integer,Integer> getSquares(int[] arr){\n\t\tMap<Integer,Integer> hm=new HashMap<>();\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\thm.put(arr[i],(int) Math.pow(arr[i],2));\n\t\t}\n\t\treturn hm;\t\n\t}", "public static Map<String, String> getQueryMap(String query) { \n Map<String, String> qmap = new HashMap<String, String>(); \n if (StringUtils.isEmpty(query)) {\n return qmap;\n }\n String[] params = query.split(\"&\"); \n for (String param : params) {\n String[] pair = param.split(\"=\");\n String name = pair[0];\n String value = \"\";\n if (pair.length > 1) {\n value = StringUtil.urlDecode(pair[1]);\n }\n qmap.put(name, value); \n } \n return qmap; \n }", "public final Map<String, Integer> mo34029a(List<String> list) {\n return (Map) m446a(new C1840ci(this, list));\n }", "public HashMap<String, String[]> readDictionary (){\n\t\tHashMap<String, String[]> hashmap = new HashMap<String, String[]>();\n\t\t\n\t\treturn (HashMap<String, String[]>) readDictionary(hashmap);\n\t}", "public final Map<Integer, List<zzbu.zzb>> zze(String str) {\n Preconditions.checkNotEmpty(str);\n ArrayMap arrayMap = new ArrayMap();\n Cursor cursor = null;\n try {\n cursor = mo40210c_().query(\"event_filters\", new String[]{\"audience_id\", \"data\"}, \"app_id=?\", new String[]{str}, (String) null, (String) null, (String) null);\n if (!cursor.moveToFirst()) {\n Map<Integer, List<zzbu.zzb>> emptyMap = Collections.emptyMap();\n if (cursor != null) {\n cursor.close();\n }\n return emptyMap;\n }\n do {\n try {\n zzbu.zzb zzb2 = (zzbu.zzb) ((zzib) ((zzbu.zzb.zza) zzks.zza(zzbu.zzb.zzl(), cursor.getBlob(1))).zzv());\n if (zzb2.zzf()) {\n int i = cursor.getInt(0);\n List list = (List) arrayMap.get(Integer.valueOf(i));\n if (list == null) {\n list = new ArrayList();\n arrayMap.put(Integer.valueOf(i), list);\n }\n list.add(zzb2);\n }\n } catch (IOException e) {\n zzr().zzf().zza(\"Failed to merge filter. appId\", zzez.zza(str), e);\n }\n } while (cursor.moveToNext());\n if (cursor != null) {\n cursor.close();\n }\n return arrayMap;\n } catch (SQLiteException e2) {\n zzr().zzf().zza(\"Database error querying filters. appId\", zzez.zza(str), e2);\n Map<Integer, List<zzbu.zzb>> emptyMap2 = Collections.emptyMap();\n if (cursor != null) {\n cursor.close();\n }\n return emptyMap2;\n } catch (Throwable th) {\n if (cursor != null) {\n cursor.close();\n }\n throw th;\n }\n }", "public static Map<String, List<Double>> stringToMapList(String text) {\n\t\tList<String> lines = splitLines(text);\n\t\tint keyIndex = 0;\n\t\tHashMap<String, List<Double>> entries = new HashMap<String, List<Double>>();\n\t\tfor (int i=0; i<lines.size(); i++) {\n\t\t\ttry {\n\t\t\t\tList<String> splitLine = splitWhitespace(lines.get(i));\n\t\t\t\tif (splitLine.size() > 0) {\n\t\t\t\t\tList<Double> values = new ArrayList<Double>();\n\t\t\t\t\tfor (int wordI=1; wordI<splitLine.size(); wordI++) {\n\t\t\t\t\t\tvalues.add(Double.parseDouble(splitLine.get(wordI)));\n\t\t\t\t\t}\n\t\t\t\t\tentries.put(splitLine.get(keyIndex), values);\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tSystem.out.println(\"Skipping entry \"+i+\": \"+lines.get(i));\n\t\t\t}\n\t\t}\n\t\treturn entries;\n\t}", "public static HashMap<String, String> readFromExcel() throws IOException, WriteException, BiffException {\n\t\t\t\tList<String> keyList = new ArrayList<String>(); \r\n\t\t\t\tList<String> list = new ArrayList<String>(); \r\n\t\t\t\tHashMap<String, String> map = new HashMap<String, String>(); \r\n\t\t\t\tString str = null;\r\n\t\t\t\r\n\t\t\t\ttry\r\n\t\t {\r\n\t\t File f1=new File(\"//ecs-9844/DoNotDelete/JenkinsData/input.xls\");\r\n\t\t //the excel sheet which contains data\r\n\t\t WorkbookSettings ws=new WorkbookSettings();\r\n\t\t ws.setLocale(new Locale(\"er\",\"ER\"));\r\n\t\t Workbook workbook=Workbook.getWorkbook(f1,ws);\r\n\t\t Sheet readsheet=workbook.getSheet(0);\r\n\t\t //Loop to read the KEYS from Excel i.e, 1st column of the Excel\r\n\t\t for(int i=0;i<readsheet.getColumns();i++) {\r\n\t\t \tstr=readsheet.getCell(i,0).getContents().toString();\r\n\t\t \tlist.add(str);\r\n\t\t }\r\n\t\t \tkeyList.addAll(list);\r\n\t\t \t// Hardcoding the first map (key, value) values \r\n\t\t \tmap.put(keyList.get(0), readsheet.getCell(0, 1).getContents().toString());\r\n\t\t \t// Loop to read TEST DATA from the Excel\r\n\t\t for(int i=1;i<readsheet.getRows();i++) {\r\n\t\t for(int j=1;j<readsheet.getColumns();j++) {\t\r\n\t\t str=readsheet.getCell(j,i).getContents().toString();\r\n\t\t list.add(str);\r\n\t\t System.out.println(str);\r\n\t\t map.put(keyList.get(j),str); \r\n\t\t \t}\r\n\t\t }\r\n\t\t //Print the map(key, value) \r\n\t\t System.out.println(\"Print map\");\r\n\t\t System.out.println(map);\r\n\t\t \r\n\t\t }\r\n\t\t catch(IOException e)\r\n\t\t {\r\n\t\t e.printStackTrace();\r\n\t\t }\r\n\r\n\t\t catch(BiffException e)\r\n\t\t {\r\n\t\t e.printStackTrace();\r\n\t\t } catch (Exception e) {\r\n\t\t e.printStackTrace(); \r\n\t\t }\r\n\t\t\t\t\treturn map;\r\n\t}", "private static String[][] getMap(String inputFile, String[][] Map) {\n\t\tFile text = new File(inputFile);\t\r\n\t\tint j = 0;\r\n\r\n\t\ttry {\r\n\t\t\tScanner s = new Scanner(text);\r\n\t\t\tString nex = s.nextLine();\r\n\t\t\t\r\n\t\t\twhile(s.hasNextLine())\r\n\t\t\t{\r\n\t\t\tnex = s.nextLine();\r\n\t\t\tfor (int i = 0; i < nex.length(); i++)\r\n\t\t\t{\r\n\t\t\t\tchar c = nex.charAt(i);\r\n\t\t\t\tString d = Character.toString(c);\r\n\t\t\t\tMap[j][i] = d;\t\r\n\t\t\t}\r\n\t\t\tj++;\r\n\t\t\t}\t\r\n\t\t\ts.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\t\treturn Map;\r\n}", "public static List<List<String>> groupAnagrams(String[] strs) {\n Map<List<Integer>, List<String>> map = new HashMap<>();\n for(String s : strs){\n List<Integer> curr = transform(s);\n if(map.containsKey(curr)) map.get(curr).add(s);\n else{\n List<String> newGrp = new ArrayList<>();\n newGrp.add(s);\n map.put(curr, newGrp);\n }\n }\n\n return new ArrayList<>(map.values());\n }", "Map<String, String> mo14888a();" ]
[ "0.7456682", "0.6394613", "0.6257936", "0.6220052", "0.6179802", "0.57241297", "0.56663215", "0.56585866", "0.563694", "0.55912095", "0.5573005", "0.5537372", "0.5532285", "0.5514687", "0.5474215", "0.54165435", "0.5391567", "0.5389641", "0.5386097", "0.5294289", "0.5232356", "0.51652956", "0.516357", "0.5135285", "0.5127532", "0.5120333", "0.5067218", "0.502859", "0.49703392", "0.49689448", "0.49662322", "0.49654076", "0.49595422", "0.4950252", "0.49301568", "0.49157453", "0.48970243", "0.48890644", "0.48823214", "0.4879949", "0.48692295", "0.48691422", "0.48635256", "0.48510385", "0.48356828", "0.48133427", "0.4803149", "0.47993946", "0.47956854", "0.4783866", "0.47833496", "0.47735953", "0.47688738", "0.4754706", "0.4750259", "0.4750259", "0.47450322", "0.47445676", "0.47423357", "0.47365075", "0.4731526", "0.47310072", "0.4726368", "0.47247136", "0.47184518", "0.47177795", "0.47172853", "0.4713995", "0.47068462", "0.47059655", "0.4703837", "0.47035033", "0.47019523", "0.46991017", "0.4685159", "0.46826243", "0.46771884", "0.46709785", "0.46660644", "0.46619543", "0.4659504", "0.46459612", "0.46371648", "0.46345505", "0.46341798", "0.46203074", "0.46191934", "0.4615087", "0.46127182", "0.4605752", "0.4588738", "0.4588643", "0.45782223", "0.45764047", "0.45737836", "0.45659378", "0.45622256", "0.45459864", "0.45326588", "0.45308292", "0.452626" ]
0.0
-1
method convert an array of string to Hash Map
public static <K,V> ArrayList<V> convertHashMapToArrayList( HashMap<K,V> hm) { ArrayList<V> arr = new ArrayList(); for (V value: hm.values()) arr.add(value); return arr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static HashMap<String, Integer> convertArrayToHashMap(String[] arr)\n {\n HashMap<String, Integer> hm = new HashMap<String, Integer>();\n\n for (int i = 0; i < arr.length; i++)\n hm.put(arr[i], i);\n\n return hm;\n\n }", "private Map<String, String> convertArrayToMap(PairDTO[] pairDTOs) {\n Map<String, String> map = new HashMap<>();\n for (PairDTO pairDTO : pairDTOs) {\n map.put(pairDTO.getKey(), pairDTO.getValue());\n }\n return map;\n }", "public static HashMap<String, Integer> convertArrayListToHashMap(\n ArrayList<String> arr)\n {\n HashMap<String, Integer> hm = new HashMap<String, Integer>();\n\n for (int i = 0; i < arr.size(); i++)\n hm.put(arr.get(i), i);\n\n return hm;\n\n }", "public HashMap<String, String[]> convertToArray() throws IOException\n\t{\n\t HashMap<String, String[]> map = new HashMap<String, String[]>();\n\t String[] list;\n\t \n\t String line;\n\t BufferedReader reader;\n\t\t\n\t try {\n\t\t\treader = new BufferedReader(new FileReader(filePath));\n\t\t\t\n\t\t\twhile ((line = reader.readLine()) != null)\n\t\t {\n\t\t\t\tString key = line;\n\t\t\t\tString value = \"\";\n\t\t\t\tString tmp;\n\t\t\t\t\n\t\t\t\twhile(!(tmp=reader.readLine()).equals(\"$\"))\n\t\t\t\t{\t\n\t\t\t\t\tvalue = value+tmp; \n\t\t\t\t}\n\t\t\t\tString values = value.replaceAll(\"\\\"\", \"\");\n\t\t\t\t\n\t\t\t\tString[] parts = values.split(\",\");\n\t\t map.put(key, parts);\n\t\t }\n\t\t\t\n\t\t\t/*for (String key : map.keySet())\n\t\t {\n\t\t System.out.println(key);\n\t\t for(int i=0; i < map.get(key).length; i++)\n\t\t {\n\t\t \tSystem.out.println(map.get(key)[i]);\n\t\t }\n\t\t }*/\n\t\t\t\n\t\t reader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t \n\t \n\t return map;\n\t}", "public static Map<String,Integer> stringArrayToMap(String[] entries, boolean ignoreNull) {\n\t\tMap<String,Integer> map = new HashMap<String,Integer>();\n\t\tif(entries==null) {\n\t\t\tthrow new RuntimeException(\"StringArrayToMap: entries==null\");\n\t\t}\n\t\tfor(int i=0;i<entries.length;i++) {\n\t\t\tif(entries[i]==null) {\n\t\t\t\tif(!ignoreNull) {\n\t\t\t\t\tlog.warn(\"StringArrayToMap: entries[\"+i+\"]==null ==> will not be included in map\");\t\t\t\t\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmap.put(entries[i], i);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}", "private static Set<String> m23475a(String[] strArr) {\n if (strArr == null || strArr.length == 0) {\n return Collections.emptySet();\n }\n HashSet hashSet = new HashSet(strArr.length);\n for (String str : strArr) {\n hashSet.add(str);\n }\n return hashSet;\n }", "private HashMap<String, String> generateHashMapFromStringList(String...strings) throws Exception {\n\n\t\tif(strings.length % 2 != 0)\n\n\t\t\tthrow InvalidStringListException;\n\n\t\tHashMap<String, String> map = new HashMap<String, String>();\n\n\t\tfor(int i = 0; i < strings.length; i += 2) // Each key will be i, with the following becoming its value\n\n\t\t\tmap.put(strings[i], strings[i + 1]);\n\n\t\treturn map;\n\t}", "private HashMap<Object, Object> HashMapTransform(List<String> lines) {\n\n HashMap<Object, Object> keypair = new HashMap<>();\n\n for (String line : lines) {\n if (line.contains(pairDelimiter)) {\n String[] intermediate = line.split(pairDelimiter, maxSplitSize);\n keypair.put(intermediate[0], intermediate[1]);\n }\n }\n return keypair;\n }", "@SuppressWarnings(\"unchecked\")\n private static <T> Map<String, T> mapOf(Object... inputs) {\n Map<String, T> map = new HashMap<>();\n for (int i = 0; i < inputs.length; i += 2) {\n String key = (String) inputs[i];\n T value = (T) inputs[i + 1];\n map.put(key, value);\n }\n return map;\n }", "@SuppressWarnings(\"rawtypes\")\n\tpublic static Map stringToMap(String params) {\n\t\tMap<String, String> map = new HashMap<String, String>();\n\n\t\tif (params == null) {\n\t\t\tSystem.out.println(\"\");\n\n\t\t} else {\n\t\t\tString[] arr = params.split(\",\");\n\t\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\t\tString key = arr[i].substring(0, arr[i].indexOf(\":\"));\n\t\t\t\tString value = arr[i].substring(arr[i].indexOf(\":\") + 1);\n\t\t\t\tmap.put(key, value);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}", "private static Map countStringOccurences(String[] strArray, AdminJdbcService adminJdbcService) {\n logger.debug(\"Count String Occurences method found\");\n\n Map<String, Integer> countMap = new TreeMap<String, Integer>();\n Map<String, Integer> controlIdsMap = new TreeMap<String, Integer>();\n Set<String> controlIdsSet = new TreeSet<String>();\n Set<String> keySet = countMap.keySet();\n List list = new ArrayList();\n\n for (String string : strArray) {\n String control[] = string.split(\":\");\n if ( !Utils.isNullOrEmpty(control[1]) && Integer.parseInt(control[1].trim()) == 2 ) {\n if (!countMap.containsKey(control[0])) {\n countMap.put(control[0], 1);\n } else {\n Integer count = countMap.get(control[0]);\n count = count + 1;\n countMap.put(control[0], count);\n }\n }\n }\n\n\n return countMap;\n }", "public void hashFunction1(String[] stringsForArray, String[] theArray) {\n\n for (int n = 0; n < stringsForArray.length; n++) {\n\n String newElementVal = stringsForArray[n];\n\n theArray[Integer.parseInt(newElementVal)] = newElementVal;\n\n }\n\n }", "public static HashMap<String, Integer> countOccurences(ArrayList<String> arr) {\n arr = toSortedString(arr);\n HashMap<String, Integer> hash = new HashMap();\n for(String str :arr){\n if(hash.containsKey(str)){\n hash.replace(str, hash.get(str)+1);\n }\n else{\n hash.put(str,1);\n }\n }\n return hash;\n }", "private static HashMap<String, Integer> makeMap(String[] words) {\n HashMap<String, Integer> map = new HashMap();\n for (int i = 0; i < words.length; i++) {\n map.merge(words[i], 1, Integer::sum);\n }\n return map;\n}", "public static HashMap<String,Integer> counter(ArrayList<String> arr){\n\t\tHashMap<String,Integer> map = new HashMap<String,Integer>();\n\t\t\tfor(String s : arr){\n\t\t\t\tif (map.keySet().contains(s)){\n\t\t\t\t\tmap.put(s, map.get(s)+1);\n\t\t\t\t}else{\n\t\t\t\t\tmap.put(s, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn map;\t\n\t}", "void constructMap(JsonArray array)\n {\n JsonObject obj = array.get(0).getAsJsonObject();\n\n // Loop on them\n for(Map.Entry<String, JsonElement> entry : obj.entrySet())\n {\n String key = entry.getKey(); // ID:TYPE\n if(!(key.matches(\"(\\\\d+):([A-Z_]+)\")))\n continue;\n\n String[] split = key.split(\":\");\n long id = Long.parseLong(split[0]);\n CodeType type = remapLegacyCodeType(split[1]);\n\n Map<CodeType, Map<String, String>> userMap = map.getOrDefault(id, new HashMap<>());\n Map<String, String> codesForTypeMap = userMap.getOrDefault(type, new HashMap<>());\n\n for(Map.Entry<String, JsonElement> code : entry.getValue().getAsJsonObject().entrySet())\n codesForTypeMap.put(code.getKey(), code.getValue().getAsString());\n\n userMap.put(type, codesForTypeMap);\n map.put(id, userMap);\n }\n\n array.remove(obj); // Remove the codes object\n }", "public static Map<String, String> stringToHashtable(String file) {\r\n if (file == null) {\r\n return null;\r\n }\r\n\r\n String sansComments = eraseComments(file);\r\n int pos = 0, count = sansComments.length();\r\n Map<String, String> retval = new HashMap<String, String>();\r\n\r\n // Split the file, line by line, into key/value pairs\r\n while (pos < count) {\r\n int eol = offsetToEOL(sansComments, pos);\r\n int next = offsetToNextLine(sansComments, pos);\r\n if (eol > 0) {\r\n String line = sansComments.substring(pos, pos + eol);\r\n StringTokenizer st = new StringTokenizer(line, \"=\");\r\n String key = st.nextToken();\r\n String value = \"\";\r\n if (st.hasMoreTokens()) {\r\n value = st.nextToken();\r\n }\r\n\r\n // Place scalar values in the hashtable directly\r\n // otherwise break comma separated ones into Vectors.\r\n // If they can be, items are inserted as Doubles, failing\r\n // that, as Strings.\r\n // int comma = value.indexOf(\",\");\r\n // if (comma == -1) {\r\n // try {\r\n // retval.put(key, new Double(value));\r\n // } catch (NumberFormatException nfe) {\r\n retval.put(key, value);\r\n // } // endtry\r\n // } else {\r\n // Vector<Comparable> v = new Vector<Comparable>();\r\n // StringTokenizer values = new StringTokenizer(value, \",\");\r\n // while (values.hasMoreTokens()) {\r\n // String s = values.nextToken();\r\n // try {\r\n // v.addElement(new Double(s));\r\n // } catch (NumberFormatException nfe) {\r\n // v.addElement(s.trim());\r\n // } // endtry\r\n // } // endwhile\r\n // retval.put(key, v);\r\n // } // endif\r\n } // endif\r\n pos += next;\r\n } // endwhile\r\n\r\n return retval;\r\n }", "private void fillMap(String[] querys) {\r\n\r\n\t\tLOG.info(\"fillMap\");\r\n\r\n\t\tquerysMap = new HashMap<String, String>();\r\n\t\t\r\n\t\tfor (String query : querys) {\r\n\t\t\t\r\n\t\t\tString[] temp = getStringArray(query, START_QUERY_PATTERN);\r\n\t\t\t\r\n\t\t\tif (temp != null && temp.length == 2) {\r\n\t\t\t\t\r\n\t\t\t\ttemp[0] = temp[0].replaceAll(\"\\\\P{Alnum}\", \"\");\r\n\t\t\t\tquerysMap.put(temp[0], temp[1].trim());\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tLOG.error(\"El array es nulo o la longitud no es la esperada\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tLOG.info(\"END fillMap\");\r\n\r\n\t}", "Map<String, String> asMap();", "public static LinkedHashMap<String, Object> arrayToMap(Object[] dataArray) {\n LinkedHashMap<String, Object> map = new LinkedHashMap<String, Object>();\n if (0 != dataArray.length % 2) throw new UtilsException(\"Invalid odd elements count\");\n for (int i = 0; i < dataArray.length; i += 2) {\n Object objKey = dataArray[i];\n if (!(objKey instanceof String)) throw new UtilsException(\"Invalid key: [\" + objKey + \"]\");\n map.put((String) objKey, dataArray[i + 1]);\n }\n return map;\n }", "public static HashMap<String, String> createVariableMap(String vvlist[]) {\n \t\tif (vvlist.length%2 != 0)\n \t\t\treturn null;\n \t\t\n \t\tHashMap<String, String> variableMap = new HashMap<String, String>();\n \t\tString variable;\n \t\tString value;\n \t\tfor (int i = 0; i < vvlist.length; i += 2) {\n \t\t\tvariable = (String)vvlist[i];\n \t\t\tvalue = vvlist[i + 1];\n \t\t\t\n \t\t\tvariableMap.put(variable, value);\n \t\t}\n \t\t\n \t\treturn variableMap;\n \t}", "HashMap<Character, Integer> countCharacter(char[] array) {\n\t\tHashMap<Character, Integer> hm = new HashMap<Character, Integer>();\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (hm.containsKey(array[i]))\n\t\t\t\thm.put(array[i], hm.get(array[i]) + 1);\n\n\t\t\telse\n\t\t\t\thm.put(array[i], 1);\n\t\t}\n\t\treturn hm;\n\n\t}", "public HashMap<String, String> convertToHashMapOfStrings()\n {\n HashMap<String, String> hashMapOfStrings = new HashMap<String, String>();\n for (DataPreferenceEnum key : preferencesHashMap.keySet())\n {\n String valueString = preferencesHashMap.get(key).toString();\n hashMapOfStrings.put(key.toString(), valueString);\n }\n\n return (hashMapOfStrings);\n }", "public static String[][] groupAnagrams(String[] strs) {\n\t\tif (strs.length == 0) return new String[][] {};\n\t\tMap<String, List<String>> map = new HashMap<String, List<String>>();\n\t\tfor (String s : strs) {\n\t\t\tchar[] ch = s.toCharArray();\n\t\t\tArrays.sort(ch);\n\t\t\tString key = new String(ch);\n\t\t\tif(!map.containsKey(key)) {\n\t\t\t\tList<String> list = new ArrayList<>();\n\t\t\t\tlist.add(s);\n\t\t\t\tmap.put(key, list);\n\t\t\t}else\n\t\t\t\tmap.get(key).add(s);\n\t\t}\n//\t\tprint(map);\n\t\treturn convertMapToArray2D(map);\n }", "public static void sanitizeAndSplit(ArrayList<String> myChunk){\n\t\t//Variables\n\t\tString myStringArray[] = {};\n\n\t\ttry {\n\t\t\t//step through string array and put key value pairs into a string\n\t\t\tfor(String temp : myChunk){\n\t\t\t\t//Split the key and values as put into hashMap\n\t\t\t\tif(temp != null) {\n\t\t\t\t\tmyStringArray = temp.split(\"\\\\s+\");\n\t\t\t\t\tWord word = hm.get(myStringArray[0]);\n\t\t\t\t\tif(word == null) {\n\t\t\t\t\t\thm.put(myStringArray[0], new Word(myStringArray[0], Integer.parseInt(myStringArray[1])));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\thm.get(myStringArray[0]).addToCount(Integer.parseInt(myStringArray[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Map<String, String> decode(String s) {\n String[] keyValuePairs = s.split(\"&\");\n\n //creating tab 2D tab for separating key from value\n String[][] keyAndValue = new String[keyValuePairs.length][2];\n\n //iterating through the tab to split \"key=value\" pairs into 2D tab as [[key, value], [key, value]]\n for (int i = 0; i <= keyValuePairs.length - 1; i++) {\n //splitting \"key=value\" pairs into 2D tab as [[key, value], [key, value]]\n keyAndValue[i] = keyValuePairs[i].split(\"=\");\n //adding [[key, value], [key, value]] to the map\n for (int j = 0; j <= keyAndValue.length - 1; j++) {\n keyValuesMap.put(keyAndValue[i][0], keyAndValue[i][1]);\n }\n }\n return keyValuesMap;\n }", "public Map<String, Integer> wordCount(String[] strings) {\n Map <String, Integer> map = new HashMap();\n int counter = 1;\n for (String s: strings){\n if (map.containsKey(s)){\n counter = map.get(s);\n map.put(s, counter + 1);\n }else{\n counter = 1;\n map.put(s, counter);\n }\n }\n return map;\n}", "private Map createSpecimenArrayMap(SpecimenArrayForm specimenArrayForm)\r\n\t{\r\n\t\tfinal Map arrayContentMap = new HashMap();\r\n\t\tString value = \"\";\r\n\t\tfinal int rowCount = specimenArrayForm.getOneDimensionCapacity();\r\n\t\tfinal int columnCount = specimenArrayForm.getTwoDimensionCapacity();\r\n\r\n\t\tfor (int i = 0; i < rowCount; i++)\r\n\t\t{\r\n\t\t\tfor (int j = 0; j < columnCount; j++)\r\n\t\t\t{\r\n\t\t\t\tfor (int k = 0; k < AppletConstants.ARRAY_CONTENT_ATTRIBUTE_NAMES.length; k++)\r\n\t\t\t\t{\r\n\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\tif (k == AppletConstants.ARRAY_CONTENT_ATTR_POS_DIM_ONE_INDEX)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tvalue = String.valueOf(i + 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (k == AppletConstants.ARRAY_CONTENT_ATTR_POS_DIM_TWO_INDEX)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tvalue = String.valueOf(j + 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarrayContentMap.put(SpecimenArrayAppletUtil\r\n\t\t\t\t\t\t\t.getArrayMapKey(i, j, columnCount, k), value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn arrayContentMap;\r\n\t}", "private static HashMap<String, String> parseArgs(String... args)\n {\n final HashMap<String, String> map = new HashMap();\n //TODO convert args to map\n String lastArg = null;\n for (String string : args)\n {\n //Store new arg\n if (string.startsWith(\"-\"))\n {\n lastArg = string.trim().replaceFirst(\"-\", \"\");\n if (lastArg.contains(\"=\"))\n {\n String[] split = lastArg.split(\"=\");\n lastArg = split[0];\n map.put(lastArg, split[1].replace(\"\\\\\\\"\", \"\"));\n continue;\n }\n map.put(lastArg, null);\n }\n else\n {\n //Store arg value, or append value\n String v = map.get(lastArg);\n if (v == null)\n {\n v = string;\n }\n else\n {\n v += \",\" + string;\n }\n map.put(lastArg, v);\n }\n }\n return map;\n }", "Map <String, List <String> > parse (List <String> keys, List <String> lines);", "public static void main(String[] args) {\n\t\tArrayList<String> givenArray = new ArrayList<String>();\n\t\tArrayList<String> listOfNamesStartingWithA = new ArrayList<String>();\n\t\tArrayList<String> listOfNamesStartingWithG = new ArrayList<String>();\n\t\tgivenArray.add(\"apple\");\n\t\tgivenArray.add(\"appleinc\");\n\t\tgivenArray.add(\"applemac\");\n\t\tgivenArray.add(\"google\");\n\t\t\n\t\tHashMap<String, ArrayList> map = new HashMap<String, ArrayList>();\n\t\tmap.clone();\n\t\tIterator<String> itr = givenArray.iterator();\n\t\t\n\t\twhile(itr.hasNext()) {\n\t\t\tString arrayListOb = itr.next();\n\n\t\t\tString key =arrayListOb.substring(0, 1);\n\t\t\tif(key.startsWith(\"a\")) {\n\t\t\t\tlistOfNamesStartingWithA.add(arrayListOb);\t\n\t\t\t\tmap.put(key, listOfNamesStartingWithA);\t\n\t\t\t}\n\t\t\tif(key.startsWith(\"g\")) {\n\t\t\t\tlistOfNamesStartingWithG.add(arrayListOb);\n\t\t\t\tmap.put(key, listOfNamesStartingWithG);\n\t\t\t}\t\t\t\t\n\t\t\tSystem.out.println(key);\n\t\t\tSystem.out.println(map.get(key));\n\t\t}\n\t\tSystem.out.println(map.size());\n\t\t//System.out.println(map.get(\"g\"));\n\t\t//System.out.println(map.get(\"a\"));\n\t\t/*for(Map.Entry<String,ArrayList> entry: map.entrySet())\n\t\t{\n\t\t\tSystem.out.println(map.get(\"a\"));\n\t\t}*/\n\t}", "private Map getAsMap(BuildStatus bs) {\n String lines[] = bs.toExternalForm().split(\"\\n\");\n Map m = new HashMap();\n for (int i = 0; i < lines.length; i++) {\n String line = lines[i];\n String parts[] = line.split(\"=\");\n String name = parts[0];\n String value = parts[1];\n m.put(name + \"=\", value);\n }\n return m;\n }", "public static void main(String[] args) {\n\t\tMap<String, List<String>> map = new HashMap<>();\n\t\tList<String> list = new ArrayList<>();\n\t\tmap.put(\"key1\", list);\n\t\tmap.get(\"key1\").add(\"value1\");\n\t\tmap.get(\"key1\").add(\"value2\");\n\t\t\n\n\t\t//(map.get(\"key1\").get(0)).isEqualTo(\"value1\");\n\t\t//(map.get(\"key1\").get(1)).isEqualTo(\"value2\");\n\t\t\n\t\tMap<String, String> map1 = Stream.of(new String[][] {\n\t\t\t { \"Hello\", \"World\" }, \n\t\t\t { \"John\", \"Doe\" }, \n\t\t\t}).collect(Collectors.toMap(data -> data[0], data -> data[1])); \n\t\t//Notice here the data type of key and value of the Map is same.\n\t\t//In order to make it more generic letís take the array of Objects and perform the same operation:\n\t\tMap<String, Integer> map2 = Stream.of(new Object[][] { \n\t\t { \"data1\", 1 }, \n\t\t { \"data2\", 2 }, \n\t\t}).collect(Collectors.toMap(data -> (String) data[0], data -> (Integer) data[1]));\n\t\t//Here, we create a map of the key as String and value as an Integer.\n\t}", "public static Map<String, String> strToMap(String str) {\n return strToMap(str, \"|\", false);\n }", "public Map<String, Integer> wordLen(String[] str) {\n\t\t\n\t\tMap<String, Integer> map = new HashMap<String, Integer>();\n\t\t\n\t\tfor (int i = 0; i < str.length; i++) {\n\t\t\tmap.put(str[i], str[i].length());\n\t\t}\n\t\t\n\t\treturn map;\n\t\t\n\t}", "HashMap<String,Integer> mapCode(String[] splitwords){\n\t\t\tHashMap<String,Integer> wordsOfCode= new HashMap<String,Integer>();\n\t\t\tLovinsStemmer nonSuffixes=new LovinsStemmer();\n\t\t\t//PorterStemmer nonSuffixes=new PorterStemmer();\n\t\t\tint num=0;\n\t\t\tfor(int i=0; i<splitwords.length;i++) {\n\t\t\t\tString temp=nonSuffixes.stem(splitwords[i]);\n\t\t\t\tif(!totalWords.containsKey(temp)) {\n\t\t\t\t\ttotalWords.put(temp, num);\n\t\t\t\t\t\n\t\t\t\t\twordsOfCode.put(temp,num);\n\t\t\t\t\tnum++;\n\t\t\t\t}else if(!wordsOfCode.containsKey(temp)) {\n\t\t\t\t\twordsOfCode.put(temp,totalWords.get(temp));\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn wordsOfCode;\n\t\t\t\n\t\t}", "public static LinkedHashMap<String, Object> toMap(Object... elems) {\n return arrayToMap(elems);\n }", "public static void hashMapEx() {\n\t\tString str = \"habiletechE\";\n\t\tstr = str.toLowerCase();\n\t\tchar[] ch = str.toCharArray();\n\t\tint size = ch.length;\n\n\t\tHashMap<Character, Integer> hmap = new HashMap<Character, Integer>();\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (!hmap.containsKey(ch[i]))\n\t\t\t\thmap.put(ch[i], 1);\n\t\t\telse {\n\t\t\t\tint val = hmap.get(ch[i]) + 1;\n\t\t\t\thmap.put(ch[i], val);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Duplicate Charaacters :\");\n\t\tfor (Map.Entry<Character, Integer> hm : hmap.entrySet()) {\n\t\t\tif (hm.getValue() > 1)\n\t\t\t\tSystem.out.println(hm.getKey() + \" \" + hm.getValue());\n\t\t}\n\t}", "public HashMap<String, Integer> getHashMap(){\n\t\tHashMap <String, Integer> hm1 = new HashMap <String, Integer>();\n\t\t//get each line of the book and store it as an arrayList\n\t\twords = wordData.getLines();\n\t \n\t\tfor(int i =0; i<words.size(); i++){\n\t\t\t \n\t\t\tString[] aLine = words.get(i).split(\" \");\n\t\t\t\n\t\t\tfor(int j = 0; j<aLine.length; j++){\n\t\t\t\t\n\t\t\t\t// convert all upper case to lower case & remove all non-alphabetic symbols;\n\t\t\t\t\t\n\t\t\t\tsparsedWords.add(aLine[j].toLowerCase().replaceAll(\"[^\\\\w]\", \"\"));\n\t\t\t}\n\t\t}\n\t\t//put in key and value in hashmap\n\t\tfor(int key = 0; key < sparsedWords.size(); key++){\n\t\t\t\n\t\t\tif (hm1.containsKey(sparsedWords.get(key))){\n\t\t\t\tint count = hm1.get(sparsedWords.get(key));\n\t\t\t\thm1.put(sparsedWords.get(key), count + 1);\n\t\t\t}else{\n\t\t\t\thm1.put(sparsedWords.get(key), 1);\n\t\t\t}\n\t\t}\n\t\treturn hm1;\n\t\t \t\n\t\t}", "public static Map<String, String> queryToMap(String query){\n Map<String, String> result = new HashMap<String, String>();\n for (String param : query.split(\"&\")) {\n String pair[] = param.split(\"=\");\n if (pair.length>1) {\n result.put(pair[0], pair[1]);\n }else{\n result.put(pair[0], \"\");\n }\n }\n return result;\n }", "private void toMap(String cycle) {\n for (int i = 0; i < cycle.length() - 1; i++) {\n Integer input = _alphabet.toInt(cycle.charAt(i));\n Integer output = _alphabet.toInt(cycle.charAt(i + 1));\n _map.put(input, output);\n }\n Integer i = _alphabet.toInt(cycle.charAt(cycle.length() - 1));\n Integer o = _alphabet.toInt(cycle.charAt(0));\n _map.put(i, o);\n }", "private Map<String, String> toMap(final Attributes atts) {\r\n\t\tfinal Map<String, String> values = Maps.newLinkedHashMap();\r\n\t\t\r\n\t\tfor (int index = 0; index < atts.getLength(); index++) {\r\n\t\t\tvalues.put(atts.getLocalName(index), atts.getValue(index));\r\n\t\t}\r\n\t\t\r\n\t\treturn values;\r\n\t}", "private static Map<String, String> getArgMap(String[] args) {\n \t\r\n Map<String,String> argMap = new HashMap<String,String>();\r\n for (int i = 0; i < args.length; i++) {\r\n \tlogger.info(\"arg[\"+i+\"]=\"+args[i]);\r\n String[] argArray = args[i].split(\"=\"); //$NON-NLS-1$\r\n\r\n if (argArray.length == 2) {\r\n argMap.put(argArray[0], argArray[1]);\r\n }\r\n }\r\n return argMap;\r\n }", "public static HashMap<Integer, String> createDictionary(HashSet<Integer> byteKey, ArrayList<String> bitsValue){\n HashMap<Integer, String> dictionary = new HashMap<>();\n ArrayList <Integer> bytesKey = new ArrayList<>(byteKey);\n for (int i = 0; i < bytesKey.size(); i++) {\n dictionary.put(bytesKey.get(i), bitsValue.get(i));\n }\n return dictionary;\n }", "public void sortChars(String[] array){\n HashMap<String, LinkedList<String>> list = new HashMap<String, LinkedList<String>>();\n\n for(String s: array){\n String key = sortChars(s);\n if(!list.containsKey(key)){\n list.put(key, new LinkedList<String>());\n }\n LinkedList<String> anagrams = list.get(key);\n anagrams.push(s);\n }\n\n int index = 0;\n for(String key: list.keySet()){\n LinkedList<String> anagrams = list.get(key);\n for(String val: anagrams){\n array[index] = val;\n index++;\n }\n }\n }", "public static Map<String, String> convertTomap(Stream<String> stream, String delimiter) {\n logger.info(\"converting stream of strings to Map using delimiter : \" + delimiter);\n return stream.filter(current_line -> current_line.length() > 0)\n .map(cl -> cl.split(delimiter))\n .filter(cl -> cl.length > 1)\n .collect(Collectors.toMap(cl -> cl[0].trim(), cl -> cl[1].trim(), (val1, val2) -> val2.trim()));\n }", "public static Map<String,String> StringtoMap(String str){\n\t\tMap<String,String> map = new LinkedHashMap<String,String>();\n\n\t\ttry {\n\t\t\tDocument document = DocumentHelper.parseText(str);\n\t\t\tElement root = document.getRootElement();\n\t\t\tList<Element> elementList = root.elements();\n\t\t\tfor(Element e : elementList){\n\t\t\t\tmap.put(e.getName(), e.getText());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn map;\n\t}", "private String[] toArray(String str) { String arr[] = new String[1]; arr[0] = str; return arr; }", "public static Map mapFrom(Object[][] keyValueSets) {\r\n\t\tMap map = new HashMap(keyValueSets.length);\r\n\t\tfor (int i=0; i<keyValueSets.length; i++) {\r\n\t\t\tmap.put(keyValueSets[i][0], keyValueSets[i][1]);\r\n\t\t}\r\n\t\treturn map;\r\n\t}", "private static void initializeMap() {\n\t\tmap = new HashMap<String, MimeTransferEncoding>();\n\t\tfor (MimeTransferEncoding mte : MimeTransferEncoding.values()) {\n\t\t\tmap.put(mte.string, mte);\n\t\t}\n\t}", "public Map<String, Integer> wordCount(String[] strings) {\n\n\n Map<String, Integer> mojaMapa = new HashMap<String, Integer>();\n\n for (String element : strings) {\n if (mojaMapa.containsKey(element)) {\n Integer iloscWystapienElementu = mojaMapa.get(element);\n mojaMapa.put(element, iloscWystapienElementu + 1);\n } else {\n mojaMapa.put(element, 1);\n }\n\n\n }\n return mojaMapa;\n }", "public HashMap<String, String> convertToString() throws IOException\n\t{\n\t HashMap<String, String> map = new HashMap<String, String>();\n\n\t String line;\n\t BufferedReader reader;\n\t String multiple_line=null;\n\t\ttry {\n\t\t\treader = new BufferedReader(new FileReader(filePath));\n\t\t\t\n\t\t\twhile ((line = reader.readLine()) != null)\n\t\t {\n\t\t String[] parts = (line.replaceAll(\"\\\"\", \"\").split(\"=\", 2)); //tolto replaceAll\n\t\t if (parts.length >= 2)\n\t\t {\n\t\t String key = parts[0];\n\t\t multiple_line=key;\n\t\t String value = parts[1];\n\t\t map.put(key, value);\n\t\t } else {\n\t\t \n\t\t String line2=map.get(multiple_line);\n\t\t map.put(multiple_line, line2+\"\\n\"+line);\n\t\t }\n\t\t }\n\t\t\t\n\t\t\t//for (String key : map.keySet())\n\t\t //{\n\t\t // System.out.println(key + \":\" + map.get(key));\n\t\t // }\n\t\t reader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t \n\t \n\t return map;\n\t}", "private HashMap parseMap(String localData){\n int localPointer = 0;\n HashMap temp = new HashMap();\n char c = localData.charAt(localPointer++);\n while (c != '}'){\n String entry = \"\";\n entry_loop :\n while (c != '}'){\n switch (c){\n case ',' :\n c = localData.charAt(localPointer++);\n break entry_loop;\n case '{' :\n String tempEntry = this.getFull(localData.substring(localPointer),0);\n entry += tempEntry;\n localPointer += tempEntry.length();\n break ;\n case '[' :\n String tempEntry2 = this.getFull(localData.substring(localPointer),1);\n entry += tempEntry2;\n localPointer += tempEntry2.length();\n break ;\n default :\n entry += c;\n break ;\n }\n c = localData.charAt(localPointer++);\n }\n entry = entry.trim();\n String[] entryArray = entry.split(\":\",2);\n String key = entryArray[0].trim();\n String value = entryArray[1].trim();\n Object keyObj = null;\n Object valueObj = null;\n\n switch (this.getDataType(key.trim())){\n case String:\n keyObj = key.trim().replace(\"\\\"\",\"\");\n break ;\n case Integer:\n keyObj = Long.parseLong(key.trim());\n break ;\n case Float:\n keyObj = Float.parseFloat(key.trim());\n break ;\n case Boolean:\n keyObj = Boolean.parseBoolean(key.trim());\n break ;\n case Map:\n keyObj = this.parseMap(key.trim());\n break ;\n case List:\n keyObj = this.parseList(key.trim());\n }\n\n switch (this.getDataType(value.trim())){\n case String:\n valueObj = value.trim().replace(\"\\\"\",\"\");\n break ;\n case Integer:\n valueObj = Long.parseLong(value.trim());\n break ;\n case Float:\n valueObj = Float.parseFloat(value.trim());\n break ;\n case Boolean:\n valueObj = Boolean.parseBoolean(value.trim());\n break ;\n case Map:\n valueObj = this.parseMap(value.trim());\n break ;\n case List:\n valueObj = this.parseList(value.trim());\n }\n temp.put(keyObj,valueObj);\n }\n return temp;\n }", "String[][] packData();", "public static Map<String, String> queryToMap(String query) {\n\t\tMap<String, String> result = new HashMap<String, String>();\n\t\tfor (String param : query.split(\"&\")) {\n\t\t\tString pair[] = param.split(\"=\");\n\t\t\tif (pair.length > 1) {\n\t\t\t\tresult.put(pair[0], pair[1]);\n\t\t\t} else {\n\t\t\t\tresult.put(pair[0], \"\");\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static Map<String, String> queryToMap(String query) {\n\t\tMap<String, String> result = new HashMap<String, String>();\n\t\tfor (String param : query.split(\"&\")) {\n\t\t\tString pair[] = param.split(\"=\");\n\t\t\tif (pair.length > 1) {\n\t\t\t\tresult.put(pair[0], pair[1]);\n\t\t\t} else {\n\t\t\t\tresult.put(pair[0], \"\");\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static <T> Set<T> convertArrayToSet(T array[]) \r\n { \r\n \r\n // Create the Set by passing the Array \r\n // as parameter in the constructor \r\n Set<T> set = new HashSet<>(Arrays.asList(array)); \r\n \r\n // Return the converted Set \r\n return set; \r\n }", "public static Map<String, IpAddress> convert(List<IpAddress> ipAddressList) {\n Map<String, IpAddress> ipAddressMap = new HashMap<String, IpAddress>();\n\n for (IpAddress ipAddress : ipAddressList) {\n ipAddressMap.put(ipAddress.getUuid(), ipAddress);\n }\n\n return ipAddressMap;\n }", "public static Map<String, String> getQueryMap(String query) throws UnsupportedEncodingException\n {\n String[] params = query.split(\"&\");\n Map<String, String> map = new HashMap<String, String>(params.length);\n for (String param : params)\n {\n String[] keyValue = param.split(\"=\");\n map.put(keyValue[0], URLDecoder.decode(keyValue[1], \"UTF-8\"));\n }\n return map;\n }", "public static Map<String, String> strToMap(String str, boolean trim) {\n return strToMap(str, \"|\", trim);\n }", "private static Map<String, String> generateDataMap(String dataString) {\n dataString = strManager.removeString(dataString, \" \");\n dataString = strManager.removeString(dataString, \"\\\\+\");\n String[] dataSet = dataString.split(\",\", -1);\n\n Map<String, String> dataMap = new HashMap<String, String>();\n\n for (int i = 2; i < dataSet.length; i++) {\n String[] d = dataSet[i].split(\"=\", -1);\n String transducer = d[0];\n String value = strManager.removeUnits(d[1]);\n\n dataMap.put(transducerNames.get(transducer), value);\n }\n dataMap = addLocation(dataMap);\n\n return dataMap;\n }", "public final Map<String, Integer> mo33708h(List<String> list) {\n return (Map) m968r(new C2164bs(this, list));\n }", "public ArrayList<String> anagrams(String[] strs) {\n HashMap<String, ArrayList<String>> rec=new HashMap<String,ArrayList<String>>();\n ArrayList<String> ans=new ArrayList<String>();\n if(strs.length==0)return ans;\n for(int i=0;i<strs.length;i++){\n char[] key=strs[i].toCharArray();\n Arrays.sort(key);\n String newkey=new String(key);\n if(rec.containsKey(newkey)){\n rec.get(newkey).add(strs[i]);\n }\n else{\n ArrayList<String> ad=new ArrayList<String>();\n ad.add(strs[i]);\n rec.put(newkey,ad);\n }\n }\n for(ArrayList<String> value:rec.values()){\n if(value.size()>1)ans.addAll(value);\n }\n return ans;\n }", "public static Map<String, String> strToMap(String str, String delim, boolean trim) {\n return strToMap(str, delim, trim, null);\n\n }", "private static Map<String, String> createMapFromList(final List<String> all) {\n\t\tfinal Map<String, String> map = new ConcurrentHashMap<>();\n\n\t\tfor (final String documentElement : all) {\n\t\t\tif (documentElement != null) {\n\t\t\t\tmap.put(documentElement, documentElement);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}", "public static HashMap<String, ArrayList<String>> parseKeyValueList(String keySpliter, String strToParse) {\r\n\t\treturn parseKeyValueList (keySpliter, null, \"\\n\", strToParse);\r\n\t}", "private static List<List<String>> groupAnagrams(String[] strs) {\n List<List<String>> result = new ArrayList<List<String>>();\n\n HashMap<Integer, ArrayList<String>> map = new HashMap<Integer, ArrayList<String>>();\n for(String str: strs){\n int key = 0;\n for(int i=0; i<str.length(); i++){\n key = key + (str.charAt(i)-'a');\n }\n\n if(map.containsKey(key)){\n map.get(key).add(str);\n }else{\n ArrayList<String> al = new ArrayList<String>();\n al.add(str);\n map.put(key, al);\n }\n }\n\n result.addAll(map.values());\n\n return result;\n }", "public ArrayList<State> stringArraytoStateArray (ArrayList<String> pArray)\r\n\t{\r\n\t\tArrayList<State> sArray = new ArrayList<State>();\r\n\t\tfor (Iterator<String> iterator = pArray.iterator(); iterator.hasNext();) \r\n\t\t{\r\n\t\t\tString string1 = (String) iterator.next();\r\n\t\t\tState sTemp = new State(string1);\r\n\t\t\tsTemp.toString();\r\n\t\t\tsArray.add(sTemp);\r\n\t\t}\r\n\t\treturn sArray;\r\n\t}", "public static HashMap<String, ArrayList<String>> parseKeyValueList(String keySpliter,String valueSpliter, String strToParse) {\r\n\t\treturn parseKeyValueList (keySpliter, valueSpliter, \"\\n\", strToParse);\r\n\t}", "public static List<List<String>> groupAnagrams(String[] strs) {\n String[] wordHash = new String[strs.length];\n for (int i = 0; i < strs.length; i++) { // O(n)\n wordHash[i] = hashWord(strs[i]); // O(c + 26)\n }\n HashMap<String,List<String>> map = new HashMap<>();\n for (int i = 0; i < strs.length; i++) {\n List<String> words = map.getOrDefault(wordHash[i], new ArrayList<String>());\n words.add(strs[i]);\n map.put(wordHash[i], words);\n }\n List<List<String>> out = new ArrayList<>();\n for (String k : map.keySet()) {\n out.add(map.get(k));\n }\n return out;\n }", "public List<List<String>> groupAnagrams(String[] strs) {\n \n int len = strs.length;\n Hashtable<String, List<String>> anagrams = new Hashtable<>();\n \n for(int i=0; i<len; i++){\n char[] sorted = strs[i].toCharArray(); \n Arrays.sort(sorted);\n String key = String.valueOf(sorted);\n List<String> temp = new ArrayList<>();\n \n if(anagrams.containsKey(key)){\n temp = anagrams.get(key);\n \n }\n temp.add(strs[i]);\n anagrams.put(key, temp);\n }\n \n \n List<List<String>> answer = new ArrayList<>();\n \n for(List<String> item: anagrams.values() ){\n answer.add(item);\n }\n \n return answer;\n \n }", "public static int[][] fillMap(List<String> lines){\n int[][] map=new int[lines.size()][lines.get(0).length()];\n //find values of each spot\n for(int i=0;i<lines.size();i++){\n for(int j=0;j<lines.get(i).length();j++){\n char c=lines.get(i).charAt(j);\n switch (c) {\n case '_': //empty\n map[i][j]=0;\n break;\n case 'B': //Blue\n map[i][j]=1;\n break;\n case 'A': //Cyan\n map[i][j]=2;\n break;\n case 'W': //white\n map[i][j]=3;\n break;\n case 'R': //red\n map[i][j]=4;\n break;\n case 'P': //pink\n map[i][j]=5;\n break;\n case 'D': //magenta\n map[i][j]=6;\n break;\n case 'O': //orange\n map[i][j]=7;\n break;\n case 'G': //Green\n map[i][j]=8;\n break;\n case 'Y': //Yellow\n map[i][j]=9;\n break;\n case 'K': //Seafoam\n map[i][j]=10;\n break;\n case 'Q': //purple\n map[i][j]=11;\n break;\n default:\n map[i][j]=12; //shouldn't happen\n break;\n }\n }\n }\n return map;\n }", "public void createIDMap()\n {\n IDMap = new HashMap<>();\n idFile.open(\"idpassword.txt\");\n String line = idFile.getNextLine();\n\n\n\n while(line!=null) {\n String[] fields = line.split(\",\");\n IDMap.put(fields[0], fields[1]);\n\n line = idFile.getNextLine();\n\n }\n\n }", "public Map<String, String> toSingleValueMap()\r\n/* 367: */ {\r\n/* 368:538 */ LinkedHashMap<String, String> singleValueMap = new LinkedHashMap(this.headers.size());\r\n/* 369:539 */ for (Map.Entry<String, List<String>> entry : this.headers.entrySet()) {\r\n/* 370:540 */ singleValueMap.put((String)entry.getKey(), (String)((List)entry.getValue()).get(0));\r\n/* 371: */ }\r\n/* 372:542 */ return singleValueMap;\r\n/* 373: */ }", "private Map<String, String> extractPropertyValues(String[] paramArray,\n\t\t\tString[] connPropertyNames) {\n\n\t\tMap<String, String> connPropValues = new HashMap<String, String>();\n\t\tString[] temp = null;\n\t\tString userPassedValue = null;\n\n\t\tfor (int i = 0; i < paramArray.length; i++) {\n\t\t\ttemp = paramArray[i].split(\"=\");\n\t\t\tfor (int j = 0; j < connPropertyNames.length; j++) {\n\t\t\t\tif (temp[0].equalsIgnoreCase(connPropertyNames[j])) {\n\t\t\t\t\tif (temp.length < 2) {\n\t\t\t\t\t\tuserPassedValue = \"\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tuserPassedValue = temp[1];\n\t\t\t\t\t}\n\t\t\t\t\tconnPropValues.put(connPropertyNames[j], userPassedValue);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn connPropValues;\n\t}", "public static HashMap<String,String[][]> build(String[][] data){\r\n\t\tString key;\t\t\t\t\t\t\t\t\t\t\t//One of the keys\r\n\t\tString[][] value;\t\t\t\t\t\t\t\t\t//The corresponding value\r\n\t\tString[] valueElement0, valueElement1;\t\t\t\t//The two arrays in the value\r\n\t\tInteger step;\t\t\t\t\t\t\t\t\t\t//For keeping track of the position in the array\r\n\t\tString warning;\t\t\t\t\t\t\t\t\t\t//A message to let the user know there might be a problem\r\n\t HashMap<String, String[][]> result;\r\n\t \r\n\t if ((data.length % 3) != 0) {\r\n\t \twarning = \r\n\t \t\t\t\"WARNING in HashMapBuilder2.build: Bug detected. Contact Ken Samuel.\";\r\n\t \tSystem.err.println(warning);\r\n\t \tGlobal.unableToRespondMessage.add(warning);\r\n\t }\r\n\t \r\n\t result = new HashMap<String, String[][]>();\t\t\t//Initialize\r\n\t key = null;\t\t\t\t\t\t\t\t\t\t\t//Initialize\r\n\t valueElement0 = new String[0];\t\t\t\t\t\t//Initialize\r\n\t valueElement1 = new String[0];\t\t\t\t\t\t//Initialize\r\n\t step = -1;\t\t\t\t\t\t\t\t\t\t\t//Initialize\r\n\t for(String[] array : data){\r\n\t step++;\r\n\t switch(step % 3){\r\n\t case 0: \r\n\t if(array[0] == null) {\r\n\t \twarning = \"WARNING in HashMapBuilder2.build: Bug detected. Contact Ken Samuel.\";\r\n\t \t \tSystem.err.println(warning);\r\n\t \t \tGlobal.unableToRespondMessage.add(warning);\r\n\t }\r\n\t key = array[0];\r\n\t continue;\r\n\t case 1:\r\n\t \tvalueElement0 = array;\r\n\t continue;\r\n\t case 2:\r\n\t \tvalueElement1 = array;\r\n\t\t \tvalue = new String[2][Math.max(valueElement0.length,valueElement1.length)];\r\n\t\t \tvalue[0] = valueElement0;\r\n\t\t \tvalue[1] = valueElement1;\r\n\t\t \tresult.put(key,value);\r\n\t break;\r\n\t default:\t\t\t//This should never happen\r\n\t \twarning = \"WARNING in HashMapBuilder2.build: Bug detected. Contact Ken Samuel.\";\r\n \t \tSystem.err.println(warning);\r\n \t \tGlobal.unableToRespondMessage.add(warning);\r\n\t }\r\n\t }\r\n\t return result;\r\n\t}", "public static Map<String, String> strToMap(String str, String delim, boolean trim, String pairsSeparator) {\n if (UtilValidate.isEmpty(str)) {\n return null;\n }\n Map<String, String> decodedMap = new HashMap<>();\n List<String> elements = split(str, delim);\n pairsSeparator = pairsSeparator == null ? \"=\" : pairsSeparator;\n\n for (String s: elements) {\n\n List<String> e = split(s, pairsSeparator);\n if (e.size() != 2) {\n continue;\n }\n String name = e.get(0);\n String value = e.get(1);\n if (trim) {\n if (name != null) {\n name = name.trim();\n }\n if (value != null) {\n value = value.trim();\n }\n }\n\n try {\n if (value != null && name != null) {\n decodedMap.put(URLDecoder.decode(name, \"UTF-8\"), URLDecoder.decode(value, \"UTF-8\"));\n }\n } catch (UnsupportedEncodingException e1) {\n Debug.logError(e1, MODULE);\n }\n }\n return decodedMap;\n }", "@Override\n public Map<String, List<PairModel>> getPairValues(String[] keyArr) {\n return null;\n }", "public static HashMap<String, CNV[]> splitByChromsome(CNV[] cnvs){\n\t\tArrayList<CNV> al = new ArrayList<CNV>();\n\t\tHashMap<String, CNV[]> map = new HashMap<String, CNV[]>();\n\t\tString chromosome = cnvs[0].getGrGraph().getChromosome();\n\t\t//for each GenomicRegion\n\t\tfor (int i=0; i< cnvs.length; i++){\n\t\t\t//same chromosome?\n\t\t\tif (cnvs[i].getGrGraph().getChromosome().equals(chromosome)){\n\t\t\t\tal.add(cnvs[i]);\n\t\t\t}\n\t\t\t//different chromosome!\n\t\t\telse {\n\t\t\t\t//set new chrom in map\n\t\t\t\tCNV[] regions = new CNV[al.size()];\n\t\t\t\tal.toArray(regions);\n\t\t\t\tmap.put(chromosome, regions);\n\t\t\t\t//reset params\n\t\t\t\tal = new ArrayList();\n\t\t\t\tal.add(cnvs[i]);\n\t\t\t\tchromosome = cnvs[i].getGrGraph().getChromosome();\n\t\t\t}\n\t\t}\n\t\t//add last\n\t\tCNV[] regions = new CNV[al.size()];\n\t\tal.toArray(regions);\n\t\tmap.put(chromosome, regions);\n\t\treturn map;\n\t}", "private Map<String, String> m15124a(Map<String, String> map) {\n String str;\n String str2;\n HashMap hashMap = new HashMap();\n if (map != null) {\n for (Entry entry : map.entrySet()) {\n Object key = entry.getKey();\n Object value = entry.getValue();\n if (!(key instanceof String) || !(value instanceof String)) {\n C7262l b = this.f13489a.mo23049b();\n StringBuilder sb = new StringBuilder();\n sb.append(\"Unexpected class type in trackEvent(); all keys and values passed as parameters must be String. Encountered \");\n sb.append(key.getClass().getCanonicalName());\n sb.append(\"/\");\n sb.append(value.getClass().getCanonicalName());\n sb.append(\"; will use toString() value instead, which may be unexpected...\");\n b.mo22913a(\"EventServiceImpl\", sb.toString());\n str = key.toString();\n str2 = value.toString();\n } else {\n str = (String) key;\n str2 = (String) value;\n }\n hashMap.put(str, str2);\n }\n }\n return hashMap;\n }", "private HashMap<String, String> returnCorrectMap(String...parameters) {\n\n\t\tHashMap<String, String> map = null;\n\n\t\ttry {\n\n\t\t\tmap = generateHashMapFromStringList(parameters);\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn map;\n\t}", "private static Map<String, String> parseAgentArgs(String agentArgs) {\n if (agentArgs == null) {\n return Collections.emptyMap();\n }\n String[] agentArgsArr = agentArgs.split(\",\");\n Map<String, String> argsMap = new HashMap<>(agentArgsArr.length);\n for (String arg : agentArgsArr) {\n String[] splitAgentArg = arg.split(\"=\");\n if (splitAgentArg.length != 2) {\n throw new IllegalArgumentException(\n String.format(\n \"Agent args is not well formed: %s. Use the format \\\"arg1=val1,arg2=val2,arg3=val3\\\"\",\n arg));\n }\n argsMap.put(splitAgentArg[0], splitAgentArg[1]);\n }\n return argsMap;\n }", "public static HashMap<String,String> splitJson(String s) {\n ObjectMapper mapper1 = new ObjectMapper();\n HashMap<String,String> rtn = new HashMap<String,String>();\n HashMap<String,String> jobj = null;\n try {\n jobj = mapper1.readValue(s, HashMap.class);\n for (Map.Entry<String, String> entrySet : jobj.entrySet()) {\n String key = entrySet.getKey();\n Object value = entrySet.getValue();\n rtn.put(key, mapper1.writeValueAsString(value));\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n return rtn;\n }", "public static void main(String[] args) {\n HashMap<Character,Integer> hMapOutPut = new HashMap<>();\n //HashMap map = new HashMap();\n String sInput = \"india\";\n char[] strInputArray = sInput.toCharArray();\n for(char fLoop: strInputArray) {\n System.out.println(fLoop);\n if(hMapOutPut.containsKey(fLoop)) {\n int temp=hMapOutPut.get(fLoop)+1;\n hMapOutPut.put(fLoop,temp );\n }else {\n hMapOutPut.put(fLoop, 1);\n }\n }\nSystem.out.println(hMapOutPut);\n }", "public void createHashTable() {\n\n String[] tempArray = new String[words.size()];\n\n for (int i = 0; i < words.size(); i++) {\n char[] word = words.get(i).toCharArray(); // char[] snarf\n Arrays.sort(word); // char[] afnrs\n tempArray[i] = toString(word); // String afnrs\n }\n\n for (int i = 0; i < words.size(); i++) {\n String word = tempArray[i];\n hashTable.put(word.substring(0, 4), i); // plocka bort bokstav nr 5\n String subString4 = (word.substring(0, 3) + word.substring(4, 5)); // plocka bort bokstav nr 4\n hashTable.put(subString4, i);\n String subString3 = (word.substring(0, 2) + word.substring(3, 5)); // plocka bort bokstav nr 3\n hashTable.put(subString3, i);\n String subString2 = (word.substring(0, 1) + word.substring(2, 5)); // plocka bort bokstav nr 2\n hashTable.put(subString2, i);\n hashTable.put(word.substring(1, 5), i); // plocka bort bokstav nr 1\n }\n }", "private static Map<Character, Set<Character>> genLessMap(String[] words) throws Exception {\n Map<Character, Set<Character>> map = new HashMap<>();\n for (int i = 1; i < words.length; i ++) {\n String a = words[i - 1];\n String b = words[i];\n boolean allEqual = true;\n for (int j = 0; j < a.length() && j < b.length(); j ++) {\n if (a.charAt(j) == b.charAt(j))\n continue;\n allEqual = false;\n Set<Character> sb = map.get(a.charAt(j));\n if (sb == null) {\n sb = new HashSet<Character>();\n map.put(a.charAt(j), sb);\n }\n sb.add(b.charAt(j));\n break;\n }\n if (allEqual && a.length() > b.length())\n throw new Exception(\"Invalid.\");\n }\n return map;\n }", "public static <T> Set<T> array2Set(T[] array) {\n\t\treturn new HashSet<T>(Arrays.asList(array));\n\t}", "private static HashMap<String,String> getRowValues( String[] headerArray, String row ) {\r\n\t\t\r\n\t\tString[] dataArray = ContactsImport.parseCSVLine(row, false);\r\n\t\tHashMap<String,String> values = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t//validate: number of elements in the row should be equals to the number of elements in the header\r\n\t\t\tif (dataArray.length != headerArray.length) {\r\n\t\t\t\t\r\n\t\t\t\tthrow( new Exception(\"number of elements doesn't match header row\"));\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t\r\n\t\t\t\t//store all values in the hashmap\r\n\t\t\t\tvalues = new HashMap<String,String>();\r\n\t\t\t\t\r\n\t\t\t\tfor (int i=0; i<dataArray.length; i++) {\r\n\t\t\t\t\tvalues.put( headerArray[i], dataArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.error(\"invalid row (\" + e.getMessage() + \"): \" + row);\r\n\t\t}\r\n\t\t\r\n\t\treturn values;\r\n\t\t\r\n\t}", "public static int hashCode(char[] array, int start, int end) {\n\t\tint code = 0;\n\t\tfor( int i = end - 1; i >= start; i-- )\n\t\t\tcode = code * 31 + array[i];\n\t\treturn code;\n\t}", "private static Map<String, List<String>> getCustomStringStructure(@NotNull String s) {\n String[] arr = s.split(\" \");\n // the storage\n Map<String, List<String>> map = new TreeMap<>();\n // put the first element in the storage\n List<String> l = new ArrayList<>();\n l.add(arr[0]);\n map.put(arr[0].substring(0, 1), l);\n\n for (int i = 1; i < arr.length; i++) {\n String sub = arr[i].substring(0, 1);\n // if map contains key put String arr[i] in the List\n if (map.containsKey(sub)) {\n map.get(sub).add(arr[i]);\n } else {\n // if not put first letter as a key and arr[i] as a value in the map\n List<String> list = new ArrayList<>();\n list.add(arr[i]);\n map.put(sub, list);\n }\n }\n\n // sort by size, by string's length and alphabetically\n Map<String, List<String>> collect = map.entrySet()\n .stream()\n .filter(k -> k.getValue().size() > 1)\n .collect(Collectors.toMap(\n Map.Entry::getKey,\n e -> e.getValue().stream().sorted((o1, o2) -> {\n if (o2.length() != o1.length()) {\n return o2.length() - o1.length();\n } else {\n return o1.compareTo(o2);\n }\n })\n .collect(Collectors.toList())\n ));\n\n // return TreeMap to sort keys\n return new TreeMap<>(collect);\n }", "private void setUrlPrefixMappingToMap(String[] prefixArr)\n\t{\n\t\tif( prefixArr != null )\n\t\t{\n\t\t\tfor(String urlPrefix : prefixArr)\n \t{ \n\t\t\t\tif(urlPrefix.contains(DELIMITER))\n\t\t\t\t{\n\t \t\tString[] keyVal = urlPrefix.split(\"::\");\n\t \t\tString key \t\t= keyVal[0];\n\t \t\tString value \t= keyVal[1].trim();\n\t \t\tlog.info(\"REST SERVICE Key------->>> \"+key);\n\t \t\tlog.info(\"REST SERVICE Value------->>> \"+value);\n\t \t\tappurlMap.put(key , value);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tlog.warn(\"NO DELEMETERS PROVIDED FOR REDIRECT SERVICE URL -------->>> \");\n\t\t\t\t}\n \t}\n\t\t}\n\t}", "public static Map<Integer,Integer> getSquares(int[] arr){\n\t\tMap<Integer,Integer> hm=new HashMap<>();\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\thm.put(arr[i],(int) Math.pow(arr[i],2));\n\t\t}\n\t\treturn hm;\t\n\t}", "public static Map<String, String> getQueryMap(String query) { \n Map<String, String> qmap = new HashMap<String, String>(); \n if (StringUtils.isEmpty(query)) {\n return qmap;\n }\n String[] params = query.split(\"&\"); \n for (String param : params) {\n String[] pair = param.split(\"=\");\n String name = pair[0];\n String value = \"\";\n if (pair.length > 1) {\n value = StringUtil.urlDecode(pair[1]);\n }\n qmap.put(name, value); \n } \n return qmap; \n }", "public final Map<String, Integer> mo34029a(List<String> list) {\n return (Map) m446a(new C1840ci(this, list));\n }", "public HashMap<String, String[]> readDictionary (){\n\t\tHashMap<String, String[]> hashmap = new HashMap<String, String[]>();\n\t\t\n\t\treturn (HashMap<String, String[]>) readDictionary(hashmap);\n\t}", "public final Map<Integer, List<zzbu.zzb>> zze(String str) {\n Preconditions.checkNotEmpty(str);\n ArrayMap arrayMap = new ArrayMap();\n Cursor cursor = null;\n try {\n cursor = mo40210c_().query(\"event_filters\", new String[]{\"audience_id\", \"data\"}, \"app_id=?\", new String[]{str}, (String) null, (String) null, (String) null);\n if (!cursor.moveToFirst()) {\n Map<Integer, List<zzbu.zzb>> emptyMap = Collections.emptyMap();\n if (cursor != null) {\n cursor.close();\n }\n return emptyMap;\n }\n do {\n try {\n zzbu.zzb zzb2 = (zzbu.zzb) ((zzib) ((zzbu.zzb.zza) zzks.zza(zzbu.zzb.zzl(), cursor.getBlob(1))).zzv());\n if (zzb2.zzf()) {\n int i = cursor.getInt(0);\n List list = (List) arrayMap.get(Integer.valueOf(i));\n if (list == null) {\n list = new ArrayList();\n arrayMap.put(Integer.valueOf(i), list);\n }\n list.add(zzb2);\n }\n } catch (IOException e) {\n zzr().zzf().zza(\"Failed to merge filter. appId\", zzez.zza(str), e);\n }\n } while (cursor.moveToNext());\n if (cursor != null) {\n cursor.close();\n }\n return arrayMap;\n } catch (SQLiteException e2) {\n zzr().zzf().zza(\"Database error querying filters. appId\", zzez.zza(str), e2);\n Map<Integer, List<zzbu.zzb>> emptyMap2 = Collections.emptyMap();\n if (cursor != null) {\n cursor.close();\n }\n return emptyMap2;\n } catch (Throwable th) {\n if (cursor != null) {\n cursor.close();\n }\n throw th;\n }\n }", "public static Map<String, List<Double>> stringToMapList(String text) {\n\t\tList<String> lines = splitLines(text);\n\t\tint keyIndex = 0;\n\t\tHashMap<String, List<Double>> entries = new HashMap<String, List<Double>>();\n\t\tfor (int i=0; i<lines.size(); i++) {\n\t\t\ttry {\n\t\t\t\tList<String> splitLine = splitWhitespace(lines.get(i));\n\t\t\t\tif (splitLine.size() > 0) {\n\t\t\t\t\tList<Double> values = new ArrayList<Double>();\n\t\t\t\t\tfor (int wordI=1; wordI<splitLine.size(); wordI++) {\n\t\t\t\t\t\tvalues.add(Double.parseDouble(splitLine.get(wordI)));\n\t\t\t\t\t}\n\t\t\t\t\tentries.put(splitLine.get(keyIndex), values);\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tSystem.out.println(\"Skipping entry \"+i+\": \"+lines.get(i));\n\t\t\t}\n\t\t}\n\t\treturn entries;\n\t}", "public static HashMap<String, String> readFromExcel() throws IOException, WriteException, BiffException {\n\t\t\t\tList<String> keyList = new ArrayList<String>(); \r\n\t\t\t\tList<String> list = new ArrayList<String>(); \r\n\t\t\t\tHashMap<String, String> map = new HashMap<String, String>(); \r\n\t\t\t\tString str = null;\r\n\t\t\t\r\n\t\t\t\ttry\r\n\t\t {\r\n\t\t File f1=new File(\"//ecs-9844/DoNotDelete/JenkinsData/input.xls\");\r\n\t\t //the excel sheet which contains data\r\n\t\t WorkbookSettings ws=new WorkbookSettings();\r\n\t\t ws.setLocale(new Locale(\"er\",\"ER\"));\r\n\t\t Workbook workbook=Workbook.getWorkbook(f1,ws);\r\n\t\t Sheet readsheet=workbook.getSheet(0);\r\n\t\t //Loop to read the KEYS from Excel i.e, 1st column of the Excel\r\n\t\t for(int i=0;i<readsheet.getColumns();i++) {\r\n\t\t \tstr=readsheet.getCell(i,0).getContents().toString();\r\n\t\t \tlist.add(str);\r\n\t\t }\r\n\t\t \tkeyList.addAll(list);\r\n\t\t \t// Hardcoding the first map (key, value) values \r\n\t\t \tmap.put(keyList.get(0), readsheet.getCell(0, 1).getContents().toString());\r\n\t\t \t// Loop to read TEST DATA from the Excel\r\n\t\t for(int i=1;i<readsheet.getRows();i++) {\r\n\t\t for(int j=1;j<readsheet.getColumns();j++) {\t\r\n\t\t str=readsheet.getCell(j,i).getContents().toString();\r\n\t\t list.add(str);\r\n\t\t System.out.println(str);\r\n\t\t map.put(keyList.get(j),str); \r\n\t\t \t}\r\n\t\t }\r\n\t\t //Print the map(key, value) \r\n\t\t System.out.println(\"Print map\");\r\n\t\t System.out.println(map);\r\n\t\t \r\n\t\t }\r\n\t\t catch(IOException e)\r\n\t\t {\r\n\t\t e.printStackTrace();\r\n\t\t }\r\n\r\n\t\t catch(BiffException e)\r\n\t\t {\r\n\t\t e.printStackTrace();\r\n\t\t } catch (Exception e) {\r\n\t\t e.printStackTrace(); \r\n\t\t }\r\n\t\t\t\t\treturn map;\r\n\t}", "private static String[][] getMap(String inputFile, String[][] Map) {\n\t\tFile text = new File(inputFile);\t\r\n\t\tint j = 0;\r\n\r\n\t\ttry {\r\n\t\t\tScanner s = new Scanner(text);\r\n\t\t\tString nex = s.nextLine();\r\n\t\t\t\r\n\t\t\twhile(s.hasNextLine())\r\n\t\t\t{\r\n\t\t\tnex = s.nextLine();\r\n\t\t\tfor (int i = 0; i < nex.length(); i++)\r\n\t\t\t{\r\n\t\t\t\tchar c = nex.charAt(i);\r\n\t\t\t\tString d = Character.toString(c);\r\n\t\t\t\tMap[j][i] = d;\t\r\n\t\t\t}\r\n\t\t\tj++;\r\n\t\t\t}\t\r\n\t\t\ts.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\t\treturn Map;\r\n}", "public static List<List<String>> groupAnagrams(String[] strs) {\n Map<List<Integer>, List<String>> map = new HashMap<>();\n for(String s : strs){\n List<Integer> curr = transform(s);\n if(map.containsKey(curr)) map.get(curr).add(s);\n else{\n List<String> newGrp = new ArrayList<>();\n newGrp.add(s);\n map.put(curr, newGrp);\n }\n }\n\n return new ArrayList<>(map.values());\n }", "Map<String, String> mo14888a();" ]
[ "0.7456682", "0.6394613", "0.6257936", "0.6220052", "0.6179802", "0.57241297", "0.56663215", "0.56585866", "0.563694", "0.55912095", "0.5573005", "0.5537372", "0.5532285", "0.5514687", "0.5474215", "0.54165435", "0.5391567", "0.5389641", "0.5386097", "0.5294289", "0.5232356", "0.51652956", "0.516357", "0.5135285", "0.5127532", "0.5120333", "0.5067218", "0.502859", "0.49703392", "0.49689448", "0.49662322", "0.49654076", "0.49595422", "0.4950252", "0.49301568", "0.49157453", "0.48970243", "0.48890644", "0.48823214", "0.4879949", "0.48692295", "0.48691422", "0.48635256", "0.48510385", "0.48356828", "0.48133427", "0.4803149", "0.47993946", "0.47956854", "0.4783866", "0.47833496", "0.47735953", "0.47688738", "0.4754706", "0.4750259", "0.4750259", "0.47450322", "0.47445676", "0.47423357", "0.47365075", "0.4731526", "0.47310072", "0.4726368", "0.47247136", "0.47184518", "0.47177795", "0.47172853", "0.4713995", "0.47068462", "0.47059655", "0.4703837", "0.47035033", "0.47019523", "0.46991017", "0.4685159", "0.46826243", "0.46771884", "0.46709785", "0.46660644", "0.46619543", "0.4659504", "0.46459612", "0.46371648", "0.46345505", "0.46341798", "0.46203074", "0.46191934", "0.4615087", "0.46127182", "0.4605752", "0.4588738", "0.4588643", "0.45782223", "0.45764047", "0.45737836", "0.45659378", "0.45622256", "0.45459864", "0.45326588", "0.45308292", "0.452626" ]
0.0
-1
test method read the given array list and separate it to odd and even array.
public static <E> void separateArrToOddEvenArr( ArrayList<E> inArr, ArrayList<E> oddArr, ArrayList<E> evenArr) { boolean isOddDone = false; for(E str : inArr) { if (!isOddDone) { oddArr.add(str); isOddDone = true; } else { evenArr.add(str); isOddDone = false; } } //for }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void oddarray() {\n ArrayList<Integer> y = new ArrayList<Integer>();\n for (int i =1; i<256; i++){\n if (i%2 != 0){\n y.add(i);\n }\n }\n System.out.println(y);\n }", "public static void main(String args[])\n {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int arr[] = new int[n+1];\n int arr1[] = new int[n+1];\n int arr2[] = new int[n+1];\n int o = 0 , e = 0;\n for(int i = 1 ; i <= n ; i++ )\n {\n arr[i] = sc.nextInt();\n if(i%2 != 0)\n {\n arr1[o] = arr[i];\n o++;\n }\n else\n {\n arr2[e] = arr[i];\n e++;\n }\n }\n //System.out.println(\"Odd place \"+o+\" even \"+e);\n int nor = sc.nextInt();\n //odd \n int temp = 0;\n /* for(int z = 0 ; z < e ; z ++)\n {\n System.out.println(arr2[z]);\n }\n */\n for(int i = 0 ; i < nor ; i++)\n {\n temp = arr1[o-1];\n \tfor(int j = o-1 ; j > 0 ; j-- )\n {\n arr1[j] = arr1[j-1]; \n }\n arr1[0] = temp;\n }\n /*for(int i = 0 ; i < o ; i++)\n System.out.println(arr1[i]);*/\n \n //even\n for(int j = 0 ; j < nor ; j++)\n {\n temp = arr2[0];\n for(int k = 0 ; k < e ; k++ )\n {\n arr2[k]=arr2[k+1];\n }\n arr2[e-1] = temp;\n }\n int j = 0 , k = 0;\n for(int i = 1 ; i <= n ; i++)\n {\n if(i%2 != 0)\n System.out.print(arr1[j++]+\" \");\n else\n System.out.print(arr2[k++]+\" \");\n }\n \t}", "public static void main(String[] args) {\n\t\t\r\n\t\tint j=0,k=0;\r\n\t\t\r\n\t\tScanner scanner=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter the size of array\");\r\n\t\tint size=scanner.nextInt();\r\n\t\t\r\n\t\tint []arr=new int[size];\r\n\t\tint []even=new int[size];\r\n\t\tint []odd=new int[size];\r\n\t\t\r\n\t\tSystem.out.println(\"Enter the Values in array\");\r\n\t\tfor(int i=0;i<arr.length;i++)\r\n\t\t{\r\n\t\t\tarr[i]=scanner.nextInt();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t for(int i=0;i<arr.length;i++)\r\n\t\t{\r\n\t\t\tif(arr[i]%2!=0)\r\n\t\t\t{\r\n\t\t\t\todd[j]=arr[i];\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\teven[k]=arr[i];\r\n\t\t\t\tk++;\r\n\t\t\t}\r\n\t\t}\r\n \r\n\t \r\n\t System.out.print(\"odd:\");\r\n\t\tfor(int i=0;i<j;i++)\r\n\t\t{\r\n\t\t\tSystem.out.print(odd[i]+\" \");\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t \r\n\t\tSystem.out.print(\"Even:\");\r\n\t\tfor(int i=0;i<k;i++)\r\n\t\t{\r\n\t\t\tSystem.out.print(even[i]+\" \");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public void ArrayWithOdd(int[] arr){\n ArrayList<Integer> newArr = new ArrayList<Integer>();\n for(int val : arr){\n if(val % 2 != 0){\n newArr.add( val );\n }\n }\n System.out.println( newArr.toString() );\n }", "@Test\n public void filterEvenNumbersTest1(){\n String unfiltered[] = {\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\"};\n //create an int array with filtered ints\n Integer[] filtered = {2,4,6,8};\n //compare the filtered ints to filterEvenNumbers(unfiltered)\n assertArrayEquals(filtered, solution.filterEvenNumbers(unfiltered));\n }", "public static void sortByOddAndEven(int[] array) {\n\n // int [] arraySample = {2, 1, 3, 5, 4, 9, 8, 11};\n\n int length = array.length - 2;\n\n for (int i = 0; i < length; i++) {\n int j = i + 1;\n\n while ((array[i] % 2) == (array[j] % 2)) {\n j++;\n if (j >= length) {\n// print(array);\n return;\n }\n }\n\n if (j > i + 1) {\n swap(array, i + 1, j);\n }\n }\n }", "@Test\n public void filterEvenNumbersTest2(){\n String unfiltered[] = {\"5\",\"10\",\"15\",\"20\",\"25\",\"30\",\"35\",\"40\"};\n //create an int array with filtered ints\n Integer[] filtered = {10,20,30,40};\n //compare the filtered ints to filterEvenNumbers(unfiltered)\n assertArrayEquals(filtered, solution.filterEvenNumbers(unfiltered));\n }", "@Test(timeout=2000)\n public void getAllOddsTest()\n {\n int[] mixed = {1,5,3,8,10,34,62,31,45,20};\n int[] mixedResult = {1,5,3,31,45};\n int[] even = {2,4,6,8,10,20,30,58};\n int[] evenResult = {};\n int[] odd = {1,3,5,7,9,11,13,15,19};\n int[] oddResult = {1,3,5,7,9,11,13,15,19};\n int[] singleEven = {2};\n int[] singleEvenResult = {};\n int[] singleOdd = {1};\n int[] singleOddResult = {1};\n \n assertArrayEquals( \"getAllOdds() with a mixed array failed.\", mixedResult, OddsEvens.getAllOdds( mixed ) );\n assertArrayEquals( \"getAllOdds() with an array of only evens failed.\",evenResult, OddsEvens.getAllOdds( even ) );\n assertArrayEquals( \"getAllOdds() with an array of only odds failed.\",oddResult, OddsEvens.getAllOdds( odd ) );\n assertArrayEquals( \"getAllOdds() with an array of a single even failed.\",singleEvenResult, OddsEvens.getAllOdds( singleEven ) );\n assertArrayEquals( \"getAllOdds() with an array of a single odd failed.\",singleOddResult, OddsEvens.getAllOdds( singleOdd ) );\n }", "public static void rearrangeOddAndEven(int arr[]) {\n System.out.println(Arrays.toString(arr));\n Arrays.sort(arr);\n for(int i=0; i < arr.length-1; i+=2) {\n int temp = arr[i];\n arr[i] = arr[i+1];\n arr[i+1] = temp;\n }\n System.out.println(Arrays.toString(arr));\n System.out.println();\n }", "public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n//\t\tint arr[]=new int[10];\n//\t\tint odd[]=new int[10];\n//\t\tint even[]=new int[10];\n//\t\tint e=0,o=0;\n//\t\tSystem.out.println(\"enter total number\");\n//\t\tint n =sc.nextInt();\n//\t\tSystem.out.println(\"enter array\");\n//\t\tfor(int i=0;i<n;i++)\n//\t\t\tarr[i]=sc.nextInt();\n//\tfor(int var:arr)\n//\t{\n//\t\tif(var%2==0)\n//\t\t{\n//\t\t\teven[e]=var;\n//\t\t\te++;\n//\t\t}\n//\t\telse\n//\t\t{\n//\t\t\todd[o]=var;\n//\t\t\to++;\n//\t\t}\n//\t}\n//\t\tSystem.out.println(\"even array\");\n//\t\tfor(int var:even)\n//\t\t\tSystem.out.println(var);\n//\t\tSystem.out.println(\"odd array\");\n//\t\tfor(int var:odd)\n//\t\t\tSystem.out.println(var);\n\n//\t\t\n//\t\tint arr[]=new int[5];\n//\t\tint rev[]=new int [5];\n//\t\tfor(int i=0;i<5;i++)\n//\t\t\tarr[i]=sc.nextInt();\n//\t\tint j=5;\n//\t\tfor(int i=0;i<5;i++)\n//\t\t\trev[i]=arr[--j];\n//\t\tSystem.out.println(\"given array\");\n//\t\tfor(int var:arr)\n//\t\t\tSystem.out.println(var);\n//\t\tSystem.out.println(\"reverse array\");\n//\t\tfor(int var:rev)\n//\t\t\tSystem.out.println(var);\n\n//\t\tfor(int i=1;i<6;i++)\n//\t\t{\n//\t\t\tfor(int j=1;j<=i;j++)\n//\t\t\t\tSystem.out.print(i);\n//\t\t\tSystem.out.println();\n//\t\t}\n\n\t}", "private int[] sortByEvenOdd(int[] numbers) {\n\t\tint nextEven=0, nextOdd = numbers.length-1;\n\t\twhile(nextEven<nextOdd) {\n\t\t\tif(numbers[nextEven]%2==0) {\n\t\t\t\tnextEven++;\n\t\t\t}else {\n\t\t\t\tint temp = numbers[nextEven];\n\t\t\t\tnumbers[nextEven]= numbers[nextOdd];\n\t\t\t\tnumbers[nextOdd--]=temp;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn numbers;\n\t}", "public static void main(String[] args) {\n int numbers[] = new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 21, 45};\r\n int num[] = null;\r\n //System.out.println(numbers[3]);\r\n for (int i = 0; i < numbers.length; i++) {\r\n if (numbers[i] % 2 == 0) { //If the remaining value zero after division by 2 then it is even number \r\n \r\n System.out.println(numbers[i] + \" is even number\");\r\n //asd.set(i, numbers[i]);\r\n } else { // else it is odd number\r\n System.out.println(numbers[i] + \" is odd number\");\r\n\r\n }\r\n }\r\n //System.out.println(num); \r\n }", "public static int processArray(ArrayList<Integer> array) {\n\n ArrayList<Integer> dataArray = new ArrayList<>();\n int ctr = 0;\n for(int i=0;i<array.size();i++){\n if(array.get(i)%2==1){\n dataArray.add(array.get(i));\n }\n else{\n if(dataArray.size()>0)\n ctr+=getOddData(dataArray);\n dataArray.clear();\n }\n }\n if(dataArray.size()>0)\n ctr+=getOddData(dataArray);\n\n return ctr;\n }", "public Integer arrayOddNumbers(int[] arr4){\n\t\tArrayList<Integer> oddArray = new ArrayList<Integer>();\n\t\tfor(int f = 0; f < arr4.length; f++){\n\t\t\tif(arr4[f] % 2 == 1){\n\t\t\t\toddArray.add(arr4[f]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(oddArray);\n\t\treturn 0;\n\t}", "public static void CountEvenOdd(int[] array) {\n\n }", "static int[] sortArray(int[] array) {\n if (array.length == 0) {\n return array;\n }\n\n //transform the array in a list which, in the end will hold sorted odds\n List<Integer> myList = new ArrayList<>(array.length);\n for (int i : array) {\n myList.add(i);\n }\n\n //i need a hash map for the evens so i can store them and their indexes\n Map<Integer, Integer> evensIndexes = new HashMap<>();\n //i need a new array to hold the result\n int[] result = new int[array.length];\n\n //put evens and their indexes in the hash map\n for (int i = 0; i < array.length; i++) {\n for (Integer x : myList) {\n if (x % 2 == 0 && x.equals(array[i])) {\n evensIndexes.put(i, x);\n }\n }\n }\n\n System.out.println(\"evensIndexes \" + evensIndexes);\n\n //sort the list and remove evens\n myList.sort(Integer::compareTo);\n\n for (Integer i : evensIndexes.values()) {\n myList.remove(i);\n }\n\n //put evens from the hash map into the result array\n for (int i = 0; i < result.length; i++) {\n for (Map.Entry<Integer, Integer> set : evensIndexes.entrySet()) {\n if (i == set.getKey()) {\n result[i] = set.getValue();\n break;\n }\n }\n }\n\n System.out.println(\"result after evens added \" + Arrays.toString(result));\n\n //use an iterator to get odd values from the list and add them in the result array\n Iterator<Integer> odd = myList.iterator();\n\n for (int i = 0; i < result.length; i++) {\n if (result[i] == 0 && array[i] != 0) {\n while (odd.hasNext()) {\n result[i] = odd.next();\n odd.remove();\n break;\n }\n }\n }\n\n return result;\n\n }", "public static void main(String[] args) {\n\t\tint[] arr = {1,4,3,5,2,2,4,11,7,6,9,10};\n\t\tStack<Integer> evenarr = new Stack<Integer>();\n\t\tStack<Integer> oddarr = new Stack<Integer>();\n\t\t\n\t\tfor(int i=0;i<arr.length;i++)\n\t\t\tif(arr[i]%2==0)\n\t\t\t\tevenarr.add(arr[i]);\n\t\t\telse\n\t\t\t\toddarr.add(arr[i]);\n\t\t\n\t\tfor(int j=0;j<arr.length;j++)\n\t\t\t{\n\t\t\tif(j%2==0)\n\t\t\t\tSystem.out.println(evenarr.pop());\t\t\t\t \n\t\t\telse\n\t\t\t\tSystem.out.println(oddarr.pop());\n\t\t\t\t \n\t\t\t}\n\t\t\n\t}", "public static void main(String [] args) \r\n {\r\n //initialize arrays and index varaiables\r\n int[] origList = new int[10];\r\n int[] evenList = new int[10];\r\n int[] oddList = new int[10];\r\n int[] negList = new int[10];\r\n int indexE=0,indexO=0,indexN=0;\r\n\r\n Scanner scan = new Scanner(System.in);\r\n\r\n //terminal input for original list\r\n for(int i=0;i <10;i++)\r\n {\r\n System.out.print(\"Enter number for array at index \" + i+ \": \");\r\n origList[i]=scan.nextInt();\r\n }\r\n\r\n //sort values from originl list and organze them in other list\r\n for(int i=0;i <10;i++)\r\n {\r\n //even\r\n if( ( (origList[i] % 2) == 0) && (origList[i] != 0) )\r\n {\r\n evenList[indexE] = origList[i];\r\n indexE++;\r\n }\r\n\r\n //odd\r\n if( ( ( (origList[i] %2) == 1) || ( (origList[i] % 2) == -1) ) && (origList[i] != 0))\r\n {\r\n oddList[indexO]=origList[i];\r\n indexO++;\r\n }\r\n\r\n //negative\r\n if(Math.abs(origList[i]) != origList[i])\r\n {\r\n negList[indexN]= origList[i];\r\n indexN++;\r\n }\r\n }\r\n\r\n //print out original integers\r\n System.out.print(\"The original integers were: \");\r\n for(int i=0;i < 10;i++)\r\n {\r\n System.out.print(origList[i] + \" \");\r\n }\r\n\r\n //print out even integers\r\n System.out.print(\"\\nThe even integers are: \");\r\n for(int i=0;i < indexE;i++)\r\n {\r\n System.out.print(evenList[i] + \" \");\r\n }\r\n\r\n //prit out odd integers\r\n System.out.print(\"\\nThe odd integers are: \");\r\n for(int i=0;i < indexO;i++)\r\n {\r\n System.out.print(oddList[i] + \" \");\r\n }\r\n\r\n //print out negative integers\r\n System.out.print(\"\\nThe negative integers are: \");\r\n for(int i=0;i < indexN;i++)\r\n {\r\n System.out.print(negList[i] + \" \");\r\n }\r\n\r\n }", "private static int[] oddEvenSort(int[] array) {\n\t\tboolean sorted = false;\n\t\twhile (!sorted) {\n\t\t\tsorted = true;\n\t\t\tfor (int i = 0; i < array.length - 1; i += 2) {\n\t\t\t\tif (array[i] > array[i + 1]) {\n\t\t\t\t\tint temp = array[i];\n\t\t\t\t\tarray[i] = array[i + 1];\n\t\t\t\t\tarray[i + 1] = temp;\n\t\t\t\t\tsorted = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int i = 1; i < array.length - 1; i += 2) {\n\t\t\t\tif (array[i] > array[i + 1]) {\n\t\t\t\t\tint temp = array[i];\n\t\t\t\t\tarray[i] = array[i + 1];\n\t\t\t\t\tarray[i + 1] = temp;\n\t\t\t\t\tsorted = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn array;\n\t}", "public static void main(String[] args) {\n System.out.println(oddFilter(Arrays.asList(1, 2, 3, 4, 5)));\n // should print [1, 3, 5]\n }", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in); // object creation of Scanner class\r\n\t\tSystem.out.print(\"Enter the size of the array : \");\r\n\t\tint size=sc.nextInt(); // input size for first array\r\n\t\tint array[]=new int[size];\r\n\t\tint oddsum=0,evensum=0;\r\n\t\tfor(int i=0;i<size;i++) {\r\n\t\t\tSystem.out.print(\"Enter Element \"+(i+1)+\" : \"); // input elements of array\r\n\t\t\tarray[i]=sc.nextInt();\r\n\t\t}\r\n\t\tfor(int i=0;i<size;i++) {\r\n\t\t\tif((i+1)%2==0) // determining whether index is odd or even\r\n\t\t\t\tevensum+=array[i];\r\n\t\t\telse\r\n\t\t\t\toddsum+=array[i];\r\n\t\t}\r\n\t\tSystem.out.println(\"Sum of elements of even index = \"+evensum);\r\n\t\tSystem.out.println(\"Sum of elements of odd index = \"+oddsum);\r\n\t\t\r\n\t\tsc.close();\r\n\t}", "int[] populateArray(int[] firstArr,int[] secondArr){\n\t\tlength = firstArr.length + secondArr.length; //Getting length of the resultant array\n\t\tresultArr = new int[length]; //set resultant array length\n\t\tfor(kCounter = 0 ; kCounter < length; kCounter++){\n\t\t\t//checking index of the array is even or odd\n\t\t\tif(kCounter % 2 == 0){\n\t\t\t\tresultArr[kCounter] = secondArr[iCounter]; //if position is even then add element to even index\n\t\t\t\tiCounter++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tresultArr[kCounter] = firstArr[jCounter]; //if position is odd then add element to odd index\n\t\t\t\tjCounter++;\n\t\t\t}\n\t\t}\n\t\treturn resultArr;\n\t}", "public static void createArrayOfOdds()\n {\n int[] odds = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19};\n \n //odds = {1, 3, 5, 7, 9, 11, 13, 15, 17, 20}; // this won't compile\n \n /*\n * Bounds errors\n * Arrays have a fized size once initialized. The index we specify must\n * refer to a valid element. Otherwise, an ArrayIndexOutOfBounds exception is generated.\n */\n \n for(int i = 0; i <= odds.length; i++)\n {\n //System.out.println(i + \": \" + odds[i]); // the exception tells you useful info!\n }\n \n /*\n * Array references\n * variables of type array, contain a reference to the array.\n * assigning one array to another, copies the reference,\n * not the array's elements.\n */\n int[] moreOdds = odds;\n \n /*\n * This code changes the value of the element in the array, which is\n * referenced by both variables.\n */\n odds[2] = 6;\n System.out.println(moreOdds[2]);\n \n \n /*\n * Enhanced for loop\n * similar to the \"for...in... \" structure in Python\n * iterates over the values in an array, and accesses each element.\n */\n for(int number : odds)\n {\n System.out.println( number);\n }\n \n /*\n * Limitations of enhanced for loops\n * the local variable (e.g. number) contains a copy of the value in the element.\n * cannot modify the values of the element in the array\n * cannot easily determine the index of an element.\n */\n for(int number : odds)\n {\n number += 1;\n System.out.println( number);\n }\n \n for(int number : odds)\n {\n System.out.println( number);\n }\n }", "public static void main(String[]args){\n int arr[]={1,2,3,4,5,6,7};\n int even=0;\n int odd=0;\n\n //loop to find even and odd to sum\n for(int i=0;i<x.length; i++){\n if(i%2==0){\n even +=x[i];\n }\n else{\n odd+=x[i];\n }\n }\n\n \n\n //Displaying the array\n System.out.println(\"The randomly generated integers are:\");\n for(int index=0;index< x.length;index++){\n System.out.println( x[index] + \"\");\n }\n \n \n \n System.out.println(\"Sum of numbers at even indexes\" + \"=\"+even);\n System.out.println(\"Average of numbers at odd indexes\" + \"=\"+odd/n);\n\n \n\n rotateArray();\n\n\n \n\n }", "private static int[] oddNumbers(int i, int j) {\n\t\tint size = (j - i + 1) / 2 ;\n int[] a = new int[size];\n \n\t\tint l = 0;\n\t\twhile (i <= j) {\n\t\t\t//if (i % 2 != 0) {\n\t\t\tif ((1 & i) == 1) {\n\t\t\t\t//System.out.println(i);\n\t\t\t\ta[l] = i;\n\t\t\t\tl++;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\t\n\t\treturn a;\n\n\t}", "public static void removedEvenLength(LinkedList<String> list){ //ARRAY AND LINKED \r\n\t\t\r\n\t\tIterator< String> i = list.iterator();// call iterator\r\n\t\twhile ( i.hasNext()){\r\n\t\t\tString element = i.next();\r\n\t\t\tif (element.length()%2 == 0){// even\r\n\t\t\t\ti.remove();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\t}", "public static void main(String[] args) {\n\t\tint[] array_nums = {1, 7, 8, 5, 7, 13, 0, 2, 4, 9};\n\t\tSystem.out.println(\"Original array: \"+ Arrays.toString(array_nums));\n\t\tfor (int i = 0; i < array_nums.length -1; i++) {\n\t\t\tfor (int j = i+1; j < array_nums.length; j++) {\n\t\t\t\tif(array_nums[i]%2 == 0 && array_nums[j]%2 == 1) {\n\t\t\t\t\tint temp = array_nums[i];\n\t\t\t\t\tarray_nums[i] = array_nums[j];\n\t\t\t\t\tarray_nums[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"The result: \"+ Arrays.toString(array_nums));\n\t}", "boolean checkOdd(int[] table)\n{\n boolean found = false;\n for (int count : table)\n if (count % 2 == 1)\n {\n if (found) return false;\n found = true;\n }\n return true;\n}", "public static void main(String[] args) {\n\t\tScanner t = new Scanner(System.in);\n\t\tint n = t.nextInt();\n\t\tint[] a = new int[n];\n\t\tArrayList<Integer> odd = new ArrayList<>();\n\t\tArrayList<Integer> even = new ArrayList<>();\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ta[i] = t.nextInt();\n\n\t\t\tif (a[i] % 2 == 0)\n\t\t\t\teven.add(i + 1);\n\t\t\telse\n\t\t\t\todd.add(i + 1);\n\t\t}\n\n\t\tif (even.size() == 1)\n\t\t\tSystem.out.println(even.get(0));\n\t\telse\n\t\t\tSystem.out.println(odd.get(0));\n\n\t}", "public static void main(String[] args) throws IOException{\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));\n\t //TODO Take First line using buffer reader and seperate element by space.\n\t String[] firstMultipleInput = bufferedReader.readLine().replaceAll(\"\\\\s+$\", \"\").split(\" \");\n\t \t \t \tArrayList<Integer> inpArray = new ArrayList<Integer>(firstMultipleInput.length);\n\t \t \t \tfor (int i = 0; i < firstMultipleInput.length; i++) {\n\t\t\t\t\tinpArray.add(Integer.valueOf(firstMultipleInput[i]).intValue());\n\t\t\t\t}\n\t \t System.out.println(DifferenceEvenOdd.solve( inpArray));\n }", "@Test\r\n\tpublic void testToArrayType() {\r\n\t\tMunitions[] sample1 = new Munitions[5];\r\n\t\tsample1 = list.toArray(sample1);\r\n\t\tAssert.assertEquals(15, sample1.length);\r\n\t\tfor (int i = 0; i < sample1.length; i++) {\r\n\t\t\tAssert.assertNotNull(sample1[i]);\r\n\t\t}\r\n\t\tMunitions[] sample2 = new Munitions[20];\r\n\t\tsample2 = list.toArray(sample2);\r\n\t\tAssert.assertEquals(20, sample2.length);\r\n\t\tfor (int i = 0; i < sample2.length - list.size(); i++) {\r\n\t\t\tAssert.assertNotNull(sample1[i]);\r\n\t\t}\r\n\t}", "public void partitionArray(int[] nums) {\n if(nums==null||nums.length<=1) return;\n int left=0, right=nums.length-1;\n while(left<=right){\n while (left<=right&&nums[left]%2!=0) left++;\n while(left<=right&&nums[right]%2==0) right--;\n if(left<=right){\n int tmp=nums[left];\n nums[left]=nums[right];\n nums[right]=tmp;\n left++;\n right--;\n }\n }\n }", "@Test\n public void pairNumbersDivisibleBy3_passTwoListsNumbers_returnListsOfPairs() {\n List<int[]> output = Java8Streams.pairNumbersDivisibleBy3(new ArrayList<>(Arrays.asList(1, 2, 3)), new ArrayList<>(Arrays.asList(3, 4)));\n assertThat(output).containsExactly(new int[]{2, 4}, new int[]{3, 3});\n }", "public void segregateEvenAndOddNodes() {\r\n\t\tif(header == null)\r\n\t\t\treturn;\r\n\t\tNode<Integer> evenItr = null;\r\n\t\tNode<Integer> oddItr = null;\r\n\t\t\r\n\t\tNode<Integer> evenHeader = null;\r\n\t\tNode<Integer> oddHeader = null;\r\n\t\t\r\n\t\tNode<Integer> itr = header;\r\n\t\tNode<Integer> prevItr;\r\n\t\t\r\n\t\twhile(itr != null) {\r\n\t\t\tInteger data = itr.data;\r\n\t\t\tif(data % 2 == 0) {\r\n\t\t\t\tif(evenItr == null) {\r\n\t\t\t\t\tevenItr = itr;\r\n\t\t\t\t\tevenHeader = itr;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tevenItr.next = itr;\r\n\t\t\t\t\tevenItr = itr;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif(oddItr == null) {\r\n\t\t\t\t\toddItr = itr;\r\n\t\t\t\t\toddHeader = itr;\r\n\t\t\t\t} else {\r\n\t\t\t\t\toddItr.next = itr;\r\n\t\t\t\t\toddItr = itr;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tprevItr = itr;\r\n\t\t\titr = itr.next;\r\n\t\t\tprevItr.next = null;\r\n\t\t}\r\n\t\tif(evenItr == null) {\r\n\t\t\t//only odd nodes\r\n\t\t\theader = oddHeader;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(oddItr == null) {\r\n\t\t\t//only even nodes\r\n\t\t\theader = evenHeader;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t//both odd and even nodes\r\n\t\theader = evenHeader;\r\n\t\tevenItr.next = oddHeader;\r\n\t}", "public static void main(String[] args) {\n\t\tArrayListTask flowThrough = new ArrayListTask();\n\t\t//Part 1\n\t\tint [] arr = {1, 2, 3, 4};\n\t\tSystem.out.println(flowThrough.inputArray(arr));\n\t\tint [] arr1 = {8, 16, 10};\n\t\tSystem.out.println(flowThrough.inputArray(arr1));\n\t\tint [] arr2 = {5, 0, -10};\n\t\tSystem.out.println(flowThrough.inputArray(arr2));\n\n\t\t//Part 2\n\t\tSystem.out.println(flowThrough.evenCount(arr));\n\t\tSystem.out.println(flowThrough.evenCount(arr1));\n\t\tint [] arr3 = {5, 0, 22};\n\t\tSystem.out.println(flowThrough.evenCount(arr3));\n\t\t\n\t\t//Part 3\n\t\tSystem.out.println(Arrays.toString(flowThrough.backwardChars(\"football\")));\n\t\tSystem.out.println(Arrays.toString(flowThrough.backwardChars(\"Career center\")));\n\t\tSystem.out.println(Arrays.toString(flowThrough.backwardChars(\"?\")));\n\t\t\n\t\t//Part 4\n\t\tString [] test1 = {\"buffalo\", \"dog\"};\n\t\tString[] test2 = {\"bobcat\", \"siamese cat\", \"catbird\"};\n\t\tString[] test3 = {\"Cat\", \"frog\", \"mouse\"};\n\t\tSystem.out.println(Arrays.toString(flowThrough.catty(test1)));\n\t\tSystem.out.println(Arrays.toString(flowThrough.catty(test2)));\n\t\tSystem.out.println(Arrays.toString(flowThrough.catty(test3)));\n\t\t\n\t}", "@Test\r\n\tpublic void testToArray() {\r\n\t\tObject[] sample = list.toArray();\r\n\t\tAssert.assertEquals(15, sample.length);\r\n\t\tfor (int i = 0; i < sample.length; i++) {\r\n\t\t\tAssert.assertNotNull(sample[i]);\r\n\t\t}\r\n\t}", "static void everyother(String []array) {\n\t\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\t\tif (i%2==0) {\n\t\t\t\t\tSystem.out.println(array[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public int[] sortArrayByParity2(int[] A) {\n boolean exit = false;\n for(int i=0;i<A.length-1;i++){//0 .. n-2\n if (A[i] % 2 == 0)\n continue;\n //if it is odd, find even to replace with\n for (int j=i+1;j<A.length;j++){//0 .. n-1\n if (A[j] % 2 == 0){\n //swap\n int temp = A[i];\n A[i] = A[j];\n A[j] = temp;\n break;\n }\n\n //if we reached the last elem in array, it means all of them were check and all of them are odds\n if (j == A.length - 1){\n exit = true;\n }\n\n }\n //all of them were checked, exit outer loop\n if (exit) {\n break;\n }\n }\n\n return A;\n }", "public static void main(String[] args) throws IOException{\n\t\tBufferedReader br=new BufferedReader(new FileReader(\"numbers.txt\"));\r\n\t\tString line=br.readLine();\r\n\t\tString evennum[]=line.split(\",\");\r\n\t\tfor(int i=0;i<evennum.length;i++) {\r\n\t\t\tint num=Integer.parseInt(evennum[i]);\r\n\t\t\t\r\n\t\t\tif(num%2==0)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(num);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private static void segrateNumbers(int[] arr, int left, int right) {\n\n while (left < right) {\n // keep moving towards right, until find an odd number\n while (arr[left] % 2 != 1) {\n left++;\n }\n\n // keep moving towards left, until find an even number\n while (arr[right] % 2 != 0) {\n right--;\n }\n\n // if so, swap them\n if (left < right) {\n int temp = arr[left];\n arr[left] = arr[right];\n arr[right] = temp;\n }\n }\n }", "public int[] sortArrayByParity(int[] A) {\n\n //start is a marker to the begining of odd numbers\n //end is a marker to the end of odd numbers\n int start=0,end=0;\n //temp is used for swapping operations\n int temp = 0;\n while(end <= A.length - 1) {\n if(A[end] % 2 > 0) { //that means it is odd, move end only and keep start as is\n //move end cursor more until we find even number to swap with index A[start]\n //i is the marker of the begining of odd\n end++;\n } else {\n //swap odd with even\n temp = A[start];//just temp/holder\n A[start] = A[end];//this even\n A[end]= temp; //this is odd\n start++;//move start to the new position [begining of odd numbers]\n end++;//step to the next elem\n }\n }\n\n return A;\n }", "public static void main(String[] args) {\n int[] nums = {2,3,8,6,2,7,3,3,8};\n// oddOne(nums);\n System.out.println(oddOne(nums));\n }", "public static LinkListPlay oddEven(LinkListPlay input) {\n if (input == null || input.getHead() == null || input.getHead().getNextNode() == null) {\n return input;\n }\n\n Node node = input.getHead();\n Node prev = null;\n LinkListPlay evenData = new LinkListPlay();\n int count = 1;\n\n while (node != null) {\n if (count % 2 == 0) {\n evenData.insertAtHead(new Node(node.getData()));\n prev.setNextNode(node.getNextNode());\n }\n prev = node;\n node = node.getNextNode();\n count++;\n\n }\n\n return mergeNode(input, evenData);\n //System.out.println(\"\");\n }", "public static int[] fillEvenNumbers(int[] array) {\n for (int i = 0; i < array.length; i++) {\n array[i] = 2 * i;\n }\n return array;\n }", "public static void main(String[] args) {\n\t int[] numbers = {13, 45, 26, 22, 19, 24, 20, 30, 90, 12};\n\n for(int i = 0; i < numbers.length; i++){\n if(numbers[i]%2 == 0){\n System.out.println(\"Even number: \" + numbers[i]);\n }\n }\n }", "public static void main(String[] args) {\n\t\tListNode head = new ListNode(17);\n\t\thead.next = new ListNode(15);\n\t\thead.next.next = new ListNode(8);\n\t\thead.next.next.next = new ListNode(12);\n\t\thead.next.next.next.next = new ListNode(5);\n\t\thead.next.next.next.next.next = new ListNode(7);\n\t\t\n\t\tListNode res = new SegregateEvenAndOdd().segregate(head);\n\t\twhile(res != null){\n\t\t\tSystem.out.print(res.val+\" \");\n\t\t\tres = res.next;\n\t\t}\n\t\t\n\t}", "public static void EvenSort(int arr[], int start, int end)\n {\n int n = end;\n for (int i = 0; i < n-1; i++)\n for (int j = 0; j < n-i-1; j++)\n if (arr[j] > arr[j+1])\n {\n // swap arr[j+1] and arr[j]\n int temp = arr[j];\n arr[j] = arr[j+1];\n arr[j+1] = temp;\n }\n }", "public ListNode oddEvenList(ListNode head) {\n if(head == null)return head;\n ListNode dummyNode = new ListNode(-1);\n dummyNode.next = head;\n ListNode odd = head;\n ListNode even = head.next;\n ListNode start = even;\n while(odd.next != null && even.next != null){\n odd.next = even.next;\n odd = odd.next;\n even.next = odd.next;\n even = even.next;\n }\n odd.next = start;\n return dummyNode.next;\n }", "@Given(\"I do practics\")\n\n\n public void iDoPractics() {\n// printNum(5);\n// int[] arr = {1,3,5,3,2};\n Object[] arr = {1,3,5,3,2};\n// System.out.println(isArrayEmpty(arr));\n// System.out.println(isArrayNotEmpty(arr));\n System.out.println(isArrayContains(arr, 2));\n\n\n// int[] arr = {2, -4, 5, 6, 7, 1};\n// for (int i = 0; i <= arr.length - 1; i++) {\n// if (arr[i] % 2 != 0)\n// System.out.print(arr[i]);\n// }\n\n }", "@Test\n public void testToArray_GenericType() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.add(5);\n instance.add(6);\n\n Integer[] expResult = { 1, 2, 3, 4, 5, 6 };\n Integer[] result = instance.toArray(new Integer[] {});\n assertArrayEquals(expResult, result);\n }", "@Test\r\n\tpublic void testDiv02() {\n\t\tdoReturn(100).when(arrList).get(0); //not strict on return type\r\n\t\tAssertions.assertEquals(\"Fe\", arrList.get(0));\r\n\t}", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int[] nums = {input.nextInt(),input.nextInt(),input.nextInt(),input.nextInt(),input.nextInt()};\n\n //TODO: Write your code below\n int countEven = 0;\n for(int each : nums){\n if(each % 2 != 0){\n continue;\n }\n countEven++;\n }\n System.out.println(countEven);\n\n\n\n }", "@Test\n public void testArray()\n throws Exception\n {\n initialize();\n genericTests();\n for (int i = 0; i < 10; i++)\n {\n permutateArrays();\n genericTests();\n }\n }", "public static <E> void divideArrIntoHalfArr(\n ArrayList<E> inArr, ArrayList<E> halfOneArr, ArrayList<E> halfTwoArr) {\n\n int size = inArr.size() / 2;\n\n for (int i = 0; i < size; i++)\n halfOneArr.add(inArr.get(i));\n\n for (int i = size; i < inArr.size(); i++)\n halfTwoArr.add(inArr.get(i));\n\n\n }", "public static void main(String[] args) {\n\t\tint[] array = {5, 3, 2, 8, 1, 4};\n\t\tarray = SortTheOdd.sortArray(array);\n\t\tfor (int i = 0;i<array.length;i++){\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Please enter space separated array to sort array with merge sort: \\n\"); \r\n\t\tString[] arrRowItems = scanner.nextLine().split(\" \");\r\n\t\tscanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\r\n\t\tint[] arr = new int[arrRowItems.length];\r\n\t\tfor (int j = 0; j < arrRowItems.length; j++) {\r\n\t\t\tint arrItem = Integer.parseInt(arrRowItems[j]);\r\n\t\t\tarr[j] = arrItem;\r\n\t\t}\r\n\t\tint arrCopy[] = arr;\r\n\t\tmergeSort(arr, 0, arr.length - 1,true); // sort ascending \r\n\t\tSystem.out.println(\"Ascending Array \\n\");\r\n\t\tprintMyarray(arr);\r\n\t\tmergeSort(arrCopy, 0, arrCopy.length - 1,false); // sort descending\r\n\t\tSystem.out.println(\"\\nDescending Array \\n\");\r\n\t\tprintMyarray(arrCopy);\r\n\t\tscanner.close();\r\n\t}", "@Test\n public void testSort_intArr_half() {\n int[] expResult = ASC_CHECK_HALF_SORT_ARRAY;\n sorter.sort(data, 0, 8);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "public static void main(String[] args) {\n\t\tScanner t = new Scanner(System.in);\n\t\tint test = t.nextInt();\n\n\t\twhile (test-- > 0) {\n\t\t\tint n = t.nextInt();\n\t\t\tint[] a = new int[n];\n\t\t\tint even = 0, idx = 0;\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\ta[i] = t.nextInt();\n\n\t\t\t\tif (a[i] % 2 == 0) {\n\t\t\t\t\teven++;\n\t\t\t\t\tidx = i + 1;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (even > 0) {\n\t\t\t\tSystem.out.println(1);\n\t\t\t\tSystem.out.println(idx);\n\t\t\t} else if (n > 1) {\n\t\t\t\tSystem.out.println(2);\n\t\t\t\tSystem.out.println(1 + \" \" + 2);\n\n\t\t\t} else {\n\t\t\t\tSystem.out.println(-1);\n\t\t\t}\n\t\t}\n\t}", "public static ArrayList getAllOdds(ArrayList vals) {\r\n ArrayList odd = new ArrayList(vals.length());\r\n int j = 0;\r\n for (int i = 0; i < vals.length(); i++) {\r\n int val = (int) vals.getItem(i);\r\n if (val % 2 == 1) {\r\n odd.addItem(val, j);\r\n j++;\r\n }\r\n }\r\n return odd;\r\n }", "public ListNode oddEvenList(ListNode head) {\n\t\tif (head == null || head.next == null)\n\t\t\treturn head;\n\n\t\tListNode oddHead = new ListNode(0);\n\t\tListNode evenHead = new ListNode(0);\n\t\toddHead.next = head;\n\t\tevenHead.next = head;\n\t\tListNode odd = oddHead, even = evenHead;\n\t\tListNode cur = head;\n\t\tint count = 1;\n\t\twhile (cur != null) {\n\t\t\tif (count % 2 == 0) {\n\t\t\t\teven.next = cur;\n\t\t\t\teven = even.next;\n\t\t\t} else {\n\t\t\t\todd.next = cur;\n\t\t\t\todd = odd.next;\n\t\t\t}\n\t\t\tcount++;\n\t\t\tcur = cur.next;\n\t\t}\n\t\teven.next = null;\n\t\todd.next = evenHead.next;\n\t\treturn oddHead.next;\n\t}", "public static void main(String[] args) {\n\t\tint [] inArray = {1, 1, 3, 4};\r\n\t\tSystem.out.println (countEven(inArray));\r\n\t\t\r\n\t\t\r\n\r\n\t}", "@Test\n public void testToArray_0args() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.add(5);\n instance.add(6);\n\n Integer[] expResult = { 1, 2, 3, 4, 5, 6 };\n Object[] result = instance.toArray();\n assertArrayEquals(expResult, result);\n\n }", "public static void main(String[] args) {\n /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */\n Scanner sc = new Scanner(System.in);\n int cases = sc.nextInt();\n for(int i=0;i<cases;i++){\n \tString[] strArray = sc.next().split(\"\");\n\n \tString odd = \"\";\n \tString even = \"\";\n \t\n \tfor(int j=1;j<strArray.length;j++){\n \t\tif(j%2==0){\n\t\t\t\t\teven += strArray[j];\n \t\t}else{\n \t\t\todd += strArray[j];\n \t\t}\n \t\t\n \t}\n \t\n \tSystem.out.println(odd + \" \" + even);\n }\n }", "public static ArrayList<Integer> oddValues(ArrayList<Integer> initialList){\n\t\tfor (Iterator<Integer> i = initialList.iterator(); i.hasNext();) {\n\t\t\tif(i.next()%2 == 0) {\n\t\t\t\ti.remove();\n\t\t\t}\n\t\t}\n\t\treturn initialList;\n\t}", "public ListNode oddEvenListOnValue(ListNode head) {\n\t\tif (head == null || head.next == null)\n\t\t\treturn head;\n\n\t\tListNode oddHead = new ListNode(0);\n\t\tListNode evenHead = new ListNode(0);\n\t\toddHead.next = head;\n\t\tevenHead.next = head;\n\t\tListNode odd = oddHead, even = evenHead;\n\t\tListNode cur = head;\n\t\twhile (cur != null) {\n\t\t\tif (cur.val % 2 == 0) {\n\t\t\t\teven.next = cur;\n\t\t\t\teven = even.next;\n\t\t\t} else {\n\t\t\t\todd.next = cur;\n\t\t\t\todd = odd.next;\n\t\t\t}\n\t\t\tcur = cur.next;\n\t\t}\n\t\teven.next = null;\n\t\todd.next = evenHead.next;\n\t\treturn oddHead.next;\n\t}", "public static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\r\n\t\tint n=s.nextInt();\r\n\t\tint a[]=new int[n];\r\n\t\tint even_count=0,odd_count=0;\r\n\t\tfor(int i=0;i<n;i++) {\r\n\t\t\ta[i]=s.nextInt();\r\n\t\t\tif(a[i]%2==0) {\r\n\t\t\t\teven_count+=1;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\todd_count+=1;\r\n\t\t}\r\n\t\tSystem.out.println(\"even numbers are\"+even_count+\" \"+\"odd numbers are\"+odd_count);\r\n\t\ts.close();\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tArrayList<Integer> numbers = new ArrayList<Integer>();\n\t\tnumbers.add(5);\n\t\tnumbers.add(50);\n\t\tnumbers.add(10);\n\t\tnumbers.add(60);\n\t\tnumbers.add(15);\n\t\tnumbers.add(70);\n\t\t\n\t\tSystem.out.println(numbers);\n\t\t\n\t\tList<Integer> evenNumbers = numbers.stream().filter(I -> I%2==0).collect(Collectors.toList());\n\t\tSystem.out.println(evenNumbers);\n\t}", "@Test\n public void Board_creteHouseAndStoreArray_shouldCreateArrayList()\n {\n int actual = 0;\n Iterator<Integer> iterator = sut.getHousesAndStores();\n int expected = sut.getBoardRows()*sut.getBoardHousesPerSide() + sut.getStoreSize();\n while(iterator.hasNext())\n {\n iterator.next();\n actual++;\n }\n assertEquals(expected,actual);\n }", "@Test\n public void test13() throws Throwable {\n // Undeclared exception!\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1333,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test13\");\n try {\n IteratorUtils.arrayListIterator((Object) \"\", 978);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Argument is not an array\n //\n }\n }", "public ArrayList<Integer> enLigeListe(ArrayList<Integer> list) {\r\n ArrayList<Integer> ligeListe = new ArrayList<>();\r\n for (int i = 0; i < list.size(); i++) {\r\n if (list.get(i) % 2 != 1) {\r\n ligeListe.add(list.get(i));\r\n }\r\n }\r\n return ligeListe;\r\n }", "public static void main(String[] args) {\n\t\tScanner scannerObj = new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter a size of array :: \");\n\t\tint size = scannerObj.nextInt();\n\t\tint[] array = new int[size];\n\t\tSystem.out.println(\"Please enter the elements of array :: \"); \n\t\t\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tarray [i] = scannerObj.nextInt();\n\t\t}\n\t\tprintArray(array);\n\t\tmoveEven(array);\n\t\tprintArray(array);\n\n\t}", "@Test\r\n public void allNumbersAreEven() {\r\n it = new EvenIterator(new int[]{2, 4, 6, 8});\r\n assertThat(it.hasNext(), is(true));\r\n assertThat(it.next(), is(2));\r\n assertThat(it.hasNext(), is(true));\r\n assertThat(it.next(), is(4));\r\n assertThat(it.hasNext(), is(true));\r\n assertThat(it.next(), is(6));\r\n assertThat(it.hasNext(), is(true));\r\n assertThat(it.next(), is(8));\r\n }", "public static void main(String[] args) {\n\n Scanner input = new Scanner(System.in);\n int[] nums = {input.nextInt(), input.nextInt(),input.nextInt(),input.nextInt(),input.nextInt(),input.nextInt(),input.nextInt()};\n int len = nums.length-1;\n for (int i=0;i<nums.length/2;i++){\n int temp=nums[i];\n nums[i]=nums[len-i];\n nums[len-i]=temp;\n }\n //Do not change below statement:\n System.out.println(Arrays.toString(nums));\n }", "public int[] sortArrayByParityII(int[] A) {\r\n \r\n \tint[] res = new int[A.length];\r\n \tint[] evens = new int[A.length / 2];\r\n \tint[] odds = new int[A.length / 2];\r\n \t\r\n \tfor (int i = 0, e = 0, o = 0; i < A.length; i++) {\r\n \t\t\r\n \t\tif (A[e] % 2 == 0) {\r\n \t\t\tevens[e] = A[i];\r\n \t\t\te++;\r\n \t\t} else {\r\n \t\t\todds[o] = A[i];\r\n \t\t\to++;\r\n \t\t}\t\r\n \t}\r\n \t\t\r\n \tfor (int i = 0, e = 0, o = 0; i < res.length; i++) {\r\n \t\t\r\n \t\tif (i % 2 == 0) {\r\n \t\t\tres[i] = evens[e];\r\n \t\t\te++;\r\n \t\t}\r\n \t\telse {\r\n \t\t\tres[i] = odds[o];\r\n \t\t\to++;\r\n \t\t}\r\n \t}\r\n \t\r\n \treturn res;\r\n }", "@Test\n public void loopTest() {\n Object[] resultActual = new Object[] {this.work1, this.work2, this.work3, this.work4};\n Object[] resultExpected = new Object[4];\n int index = 0;\n while (this.it.hasNext()) {\n resultExpected[index++] = this.it.next();\n }\n assertThat(resultActual, is(resultExpected));\n }", "@Test\n public void pairNumbers_passTwoListsNumbers_returnListOfPairs() {\n List<int[]> output = Java8Streams.pairNumbers(new ArrayList<>(Arrays.asList(1, 2, 3)), new ArrayList<>(Arrays.asList(3, 4)));\n assertThat(output).containsExactly(new int[]{1, 3}, new int[]{1, 4}, new int[]{2, 3}, new int[]{2, 4}, new int[]{3, 3}, new int[]{3, 4});\n }", "public static void main(String[] args) {\n\t\t\n\t\tint arr[]= {12,50,2,5,25};\n\t\tint sum=0,sume=0,sumo=0;\n\t\tfor(int i=0; i<5; i++) {\n\t\t\tsum=sum+arr[i];\n\t\t\t}\n\t\tSystem.out.println(\"Sum = \"+sum);\n\t\t\n\t\tfor(int i=0; i<5; i++) {\n\t\t\tif(arr[i]%2==0) {\n\t\t\t\tsume=sume+arr[i];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsumo=sumo+arr[i];\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Sum of even = \"+sume);\n\t\tSystem.out.println(\"Sum of odd= \"+sumo);\n\t}", "public static void main(String []args) {\n\t\tList<String> numbers = Arrays.asList(\"1\", \"2\", \"3\", \"4\", \"5\", \"6\",\"7\",\"8\",\"9\");\r\n\t\t//Generate numbers from 1 to 9\r\n\t\tSystem.out.println(IntStream.range(1,10).mapToObj(String::valueOf).collect(Collectors.toList()));\r\n//\t\tSystem.out.println(\"Original list \" + numbers);\r\n\t\t\r\n\t\tList<Integer> even = numbers.stream()\r\n\t\t\t\t//gets the integer value from the string\r\n//\t\t\t\t.map(s ->Integer.valueOf(s))\r\n\t\t\t\t.map(Integer::valueOf) // Another way to do the top line(line 18)\r\n\t\t\t\t//checking if it is even\r\n\t\t\t\t.filter(number -> number % 2 ==1)// Odd numbers\r\n//\t\t\t\t.filter(number -> number % 2 ==0)// Even numbers\r\n\t\t\t\t//Collects results in to list call even.\r\n\t\t\t\t.collect(Collectors.toList());\r\n\t\t\r\n\t\tSystem.out.println(even);\r\n\r\n\t\tList<String> strings = Arrays.asList(\"abc\", \"\", \"bc\", \"efg\", \"abcd\", \"\", \"jkl\", \"\", \"\");\r\n\t\tSystem.out.println(strings);\r\n\t\t\r\n\t\tList<String> filtered = strings.stream()\r\n\t\t\t\t// checking each item and we check it is empty\r\n\t\t\t\t.filter(s-> !s.isEmpty())\r\n//\t\t\t\t.filter(s-> s.isEmpty())\r\n\t\t\t\t// add the remaining element to the list\r\n\t\t\t\t.collect(Collectors.toList());\r\n\t\tSystem.out.println(filtered);\r\n\t\t\r\n\t\t// Known as a method reference \r\n//\t\tforEach(System.out::println)\r\n\t\t \r\n\t}", "public static void main(String args[]) {\n Scanner in = new Scanner(System.in);\n int as = in.nextInt();\n int arr[] = new int[as];\n for (int i = 0; i< as ; i++)\n {\n arr[i] = in.nextInt();\n }\n separate(as, arr);\n for (int i = 0; i< as ; i++)\n {\n System.out.print(arr[i] + \" \");\n }\n }", "public int[] sortEvenPositionArray(int[] arr) {\n for (int i = 0; i < arr.length; i += 2) {\n for (int a = 0; a < arr.length - 1 - i; a += 2) {\n if (arr[a] > arr[a + 2]) {\n int temp = arr[a];\n arr[a] = arr[a + 2];\n arr[+2] = temp;\n }\n }\n }\n return arr;\n\n }", "@Test\n\tpublic void rotateArray_rotateLeftTwoItems() {\n\t\tint[] nums = prepareInputArray(5);\n\t\tint[] rotatedArray = ArrayLeftRotation.rotateArray(nums, 2);\n\t\tassertThat(rotatedArray[0], equalTo(3));\n\t\tassertThat(rotatedArray[1], equalTo(4));\n\t\tassertThat(rotatedArray[2], equalTo(5));\n\t\tassertThat(rotatedArray[3], equalTo(1));\n\t\tassertThat(rotatedArray[4], equalTo(2));\n\t}", "public static void main(String[] args) {\n\tint array[]=new int[]{10,20,30,40,50};\t\r\n\t\tint sum=0;\r\n\t\t\r\n\t\tfor(int i=0;i<array.length;i++)\r\n\t\t{\r\n\t\t\tif(array[i]%2==0) //if(array[i]%2==1)\r\n\t\t\tsum=sum+array[i];\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(sum);\r\n\t\t\r\n\t\t\r\n\t\r\n\r\n\t\r\n\t\r\n\t}", "public static LLList getAllOdds(LLList vals) {\r\n LLList odd = new LLList();\r\n int j = 0;\r\n for (int i = 0; i < vals.length(); i++) {\r\n int val = (int) vals.getItem(i);\r\n if (val % 2 == 1) {\r\n odd.addItem(val, j);\r\n j++;\r\n }\r\n }\r\n return odd;\r\n }", "public static Node createEvenListFromOriginal(Node head){\n Node previous = null;\n Node current = head;\n Node newHead = null;\n Node newCurrent = null;\n while(current != null){\n if(current.data % 2 == 0){\n if(newHead == null){\n newHead = new Node(current.data);\n newCurrent = newHead;\n }\n else{\n Node next = new Node(current.data);\n newCurrent.next = next;\n newCurrent = next;\n }\n if(previous != null){\n previous.next = current.next;\n }\n }\n previous = current;\n current = current.next;\n }\n return newHead;\n }", "@Test\n public void hailstoneSequenceEven() {\n List<Integer> expected = new ArrayList<>();\n expected.add(12);\n expected.add(6);\n expected.add(3);\n expected.add(10);\n expected.add(5);\n expected.add(16);\n expected.add(8);\n expected.add(4);\n expected.add(2);\n expected.add(1);\n assertThat(ComputeStuff.hailstoneSequence(12), is(expected));\n }", "static List<Integer> oddNumbers(int l, int r) {\n List<Integer> output = new ArrayList<Integer>();\n if (l % 2 == 0) {\n l = l + 1;\n }\n while (l <= r) {\n output.add(l);\n l = l + 2;\n }\n return output;\n }", "@Test\n public void testArrayCreation() {\n final String[] array = ArrayUtils.toArray(\"foo\", \"bar\");\n assertEquals(2, array.length);\n assertEquals(\"foo\", array[0]);\n assertEquals(\"bar\", array[1]);\n }", "@Test\n public void findFrequency(){\n\n int[] input = {2,2,4,12,7,2,7,2,7,7};\n List<Integer> expected = new ArrayList<>(Arrays.asList(4,12));\n assertEquals(expected , Computation.findOdd(input));\n }", "public static void main(String[] args) throws Exception {\n /////\n /////\n /////\n /////\n /////\n ///// the easy way \n /////\n /////\n /////\n /////\n /////\n /////\n /////\n /////\n\n Scanner inputs = new Scanner(System.in);\n System.out.println(\"enter a number to to turn into binary form\");\n int n ;\n n = inputs.nextInt();\n int[] b= new int[100];\n int i =0;\n while(n > 0)\n \n {\n b[i++] = n%2;\n n = n/2;\n } \n b = Arrays.copyOfRange(b, 0, i-1);\n System.out.println(Arrays.toString(b).replace(\",\", \"\").replace(\"[\", \"\").replace(\"]\", \"\") );\n // System.out.println(\"at first array was \");\n // System.out.println(\"array reverse is \");\n\n // /////\n // /////\n // /////\n // /////\n // /////\n // /////\n // ///// the HARD way \n // /////\n // /////\n // /////\n // /////\n // /////\n // /////\n // /////\n // /////\n // for (int i = 0; i < n/2; i++) {\n // int x = data[i];\n // int y = data[n-i-1];\n // x = x - y;\n // y =x+y;\n // x = y-x;\n // data[i] = x;\n // data[n-i-1] = y;\n // }\n \n // System.out.println(\"HARD IS \"+Arrays.toString(data) );\n\n\n inputs.close();\n\n }", "public static int[] fillOddNumbers(int[] array) {\n for (int i = 0; i < array.length; i++) {\n array[i] = (2 * i) + 1;\n }\n return array;\n }", "public static void main(String[] args) {\n\t\t\n\t\tint arr[]={1,2,3,4,5,6,7,8,9,10};\n\t\t\n\t\tint sumOdd=0;\n\t\tint sumEven=0;\n\t\t\n\t\tfor (int i=0;i<arr.length;i++)\n\t\t{\n\t\t\n\t\t\tif(arr[i]%2==0)\n\t\t\t{\n\t\t\t\tsumEven=sumEven+arr[i];\n\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsumOdd=sumOdd+arr[i];\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\n\t}", "public List<Integer> crateSecond(int size) {\n int[] arr = {2, 1, 2, 3, 2, 4, 2, 5};\n int arrSize = 8;\n List<Integer> secondAnswer = new ArrayList<>(size);\n for (int i = 0; i < size; i++) {\n int index = i%arrSize;\n\n secondAnswer.add(arr[index]);\n }\n return secondAnswer;\n\n }", "public HeaderNode[] splitList(DoublyLinkedListHeader list) {\r\n\t\tHeaderNode[] array = new HeaderNode[2];\r\n\t\tSystem.out.println(\"Enter an index\");\r\n\t\tint index = scanInt();\r\n\t\tif(index<0 || index> list.size()) {\r\n\t\t\tSystem.out.println(\"Cannot Split List! Invalid Index!\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tDoublyLinkedListHeader l1 = new DoublyLinkedListHeader();\r\n\t\t\tDoublyLinkedListHeader l2 = new DoublyLinkedListHeader();\r\n\t\t\tfor(int j=0; j<index;j++) {\r\n\t\t\t\tl1.add(list.get(j));\r\n\t\t\t}\r\n\t\t\tfor(int j=index; j<list.size();j++) {\r\n\t\t\t\tl2.add(list.get(j));\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"l1 \" + l1);\r\n\t\t\tSystem.out.println(\"l2 \" + l2);\r\n\t\t\tarray[0] = l1.getHeader();\r\n\t\t\tarray[1] = l2.getHeader();\r\n\t\t\treturn array;\r\n\t\t}\r\n\t}", "@Test\n public void sumOddLengthSubarrays3() {\n SumOddLengthSubarrays sol = new SumOddLengthSubarrays();\n int actual, expected;\n int[] nums;\n\n nums = new int[]{1,4,2,5,3};\n expected = 58;\n actual = sol.sumOddLengthSubarrays3(nums);\n Assert.assertEquals(expected, actual);\n\n\n nums = new int[]{10,11,12};\n expected = 66;\n actual = sol.sumOddLengthSubarrays3(nums);\n Assert.assertEquals(expected, actual);\n\n }", "@Test\n public void testFindOrientedPairs() {\n System.out.println(\"findOrientedPairs\");\n \n CCGeneticDrift instance = new CCGeneticDrift();\n String input = \"6 3 1 6 5 -2 4\";\n List<Integer> numbers = instance.inputStringToIntegerList(input);\n String expResult = \"[1 -2, 3 -2]\";\n List result = instance.findOrientedPairs(numbers);\n assertEquals(result.toString(), expResult);\n assertEquals(result.size(), 2);\n }", "public static void main(String[] args) {\n\t\tint[] IntArray= new int[10];\n\t\tint i=1;\n\t\tSystem.out.println(\"Even numbers from 1 to 10 are:\");\n\t\t\n\t\tfor(i=1;i<IntArray.length;i++)\n\t\t { \n\t\t\t if(i%2==0)\n\t\t\t {\n \t\t\t System.out.println(i);\n\t\t\t }\n\t\t \n\t\t\t }\n\t\t\t\t \n\t\t\n\n\t}", "@Test(timeout=2000)\n public void getAllEvensTest()\n {\n int[] mixed = {1,5,3,8,10,34,62,31,45,20};\n int[] mixedResult = {8,10,34,62,20};\n int[] even = {2,4,6,8,10,20,30,58};\n int[] evenResult = {2,4,6,8,10,20,30,58};\n int[] odd = {1,3,5,7,9,11,13,15,19};\n int[] oddResult = {};\n int[] singleEven = {2};\n int[] singleEvenResult = {2};\n int[] singleOdd = {1};\n int[] singleOddResult = {};\n \n assertArrayEquals( \"getAllEvens() with a mixed array failed.\", mixedResult, OddsEvens.getAllEvens( mixed ) );\n assertArrayEquals( \"getAllEvens() with an array of only evens failed.\",evenResult, OddsEvens.getAllEvens( even ) );\n assertArrayEquals( \"getAllEvens() with an array of only odds failed.\",oddResult, OddsEvens.getAllEvens( odd ) );\n assertArrayEquals( \"getAllEvens() with an array of a single even failed.\",singleEvenResult, OddsEvens.getAllEvens( singleEven ) );\n assertArrayEquals( \"getAllEvens() with an array of a single odd failed.\",singleOddResult, OddsEvens.getAllEvens( singleOdd ) );\n }", "@SuppressWarnings(\"unchecked\")\n public void testListToArray() throws Exception\n {\n List<PSKeyword> sourceList = new ArrayList<PSKeyword>();\n sourceList.add(createKeyword(\"1\"));\n sourceList.add(createKeyword(\"2\"));\n \n List<PSKeyword> targetList = roundTripListConversion(\n com.percussion.webservices.content.PSKeyword[].class, \n sourceList);\n\n assertTrue(sourceList.equals(targetList));\n }", "@Parameterized.Parameters\r\n\tpublic static Collection<Object[]> intersectionTests() throws IOException {\n\t\tInteger array1[][] = new Integer[6][];\r\n\t\tInteger array2[][] = new Integer[6][];\r\n\t\tInteger array3[][] = new Integer[6][];\r\n\t\tInteger array4[][] = new Integer[6][];\r\n\t\tInteger array5[][] = new Integer[6][];\r\n\t\tInteger array6[][] = new Integer[6][];\r\n\t\tInteger array7[][] = new Integer[6][];\r\n\t\tInteger array8[][] = new Integer[6][];\r\n\t\tInteger array9[][] = new Integer[6][];\r\n\t\tInteger array10[][] = new Integer[6][];\r\n\t\t \r\n\t\t// read text file \r\n\t\tBufferedReader br = new BufferedReader(new FileReader(\"test_input.txt\"));\r\n\t\tint counter=0; // row counter \r\n\t\tString line = null;\r\n\t\tint row=0;\r\n\t do {\r\n\t \t while ((line= br.readLine()) !=null) { // while file is not null\r\n\t \t\t // if line is empty set row back to zero and increase counter \r\n\t \t\t if (line.isEmpty()) {\r\n\t \t\t \r\n\t \t\t\t row=0;\r\n\t \t\t\t counter++; \r\n\t \t\t\t break; \r\n\t \t\t }\r\n\t \t\t \r\n\t \t\t String[] values = line.split(\",\"); // read file values\r\n\t\t\t\t Integer[] intValues = new Integer[values.length];\r\n\t \t\t \r\n\t\t\t\t // parse strings to int values \r\n\t\t\t\t for (int i=0; i<intValues.length; i++) {\r\n\t\t\t\t\t \r\n\t\t\t\t\t intValues[i] = Integer.parseInt(values[i]);\r\n\t\t\t\t\t \r\n\t\t\t\t } \r\n\t\t\t\t // store first set of values in first array\r\n\t\t\t\t if (counter==0){ \r\n\t\t\t\t\t array1[row]=intValues;\r\n\t\t\t\t\t\r\n\t\t\t\t }// store second set of values in 2nd array \r\n\t\t\t\t else if (counter==1) {\r\n\t\t\t\t\t \r\n\t\t\t\t\t array2[row]=intValues;\r\n\t\t\t\t\t\r\n\t\t\t\t }// store third set of values in 3rd array \r\n\t\t\t\t else if (counter==2) {\r\n\t\t\t\t\t \r\n\t\t\t\t\t array3[row]=intValues;\r\n\t\t\t\t\t \r\n\t\t\t\t }// store forth set of values in 4th array \r\n\t\t\t\t else if (counter==3) {\r\n\t \r\n\t\t\t\t\t array4[row]=intValues;\r\n\t\t\t\t\t\r\n\t\t\t\t }// store fifth set of values in 5th array \r\n\t\t\t\t else if (counter==4) {\r\n\t \r\n\t\t\t\t\t array5[row]=intValues;\r\n\t\t\t\t\t\r\n\t\t\t\t }// store sixth set of values in 5th array \r\n\t\t\t\t else if (counter==5) {\r\n\t\t\t\t\t \r\n\t\t\t\t\t array6[row]=intValues;\r\n\t\t\t\t\t\r\n\t\t\t\t }// store seventh set of values in 6th array \r\n\t\t\t\t else if (counter==6) {\r\n\t \r\n\t\t\t\t\t array7[row]=intValues;\r\n\t\t\t\t\t\r\n\t\t\t\t }// store eighth set of values in 7th array \r\n\t\t\t\t else if (counter==7) {\r\n\t \r\n\t\t\t\t\t array8[row]=intValues;\r\n\t\t\t\t\t\r\n\t\t\t\t }// store ninth set of values in 8th array \r\n\t\t\t\t else if (counter==8) {\r\n\t \r\n\t\t\t\t\t array9[row]=intValues;\r\n\t\t\t\t\t\r\n\t\t\t\t }\r\n\t\t\t\t else// store tenth set of values in 10th array \r\n\t\t\t\t\t array10[row]=intValues;\r\n\t\t\t\t\r\n\t\t\t\trow++; // increment row \r\n\t \t } \r\n\t }while(line !=null); \r\n\t\t \r\n\t\t\t \r\n\t\t\treturn Arrays.asList(new Object[][] { // create an object array that\t\t\t\t\t\t\r\n\t\t\t\t{array1},{array2},{array3},{array4}, // 10 sets of data \r\n\t\t\t\t{array5},{array6},{array7},\r\n\t\t\t\t{array8},{array9},{array10},\r\n\t\t\t}); \r\n\t\t}", "@Test\r\n public void iteratorWorksGood() throws Exception {\r\n int[] expected1 = {1, 2, 3, 4, 5};\r\n int i = 0;\r\n for (int el : sInt) {\r\n assertEquals(expected1[i], el);\r\n i++;\r\n }\r\n i = 0;\r\n String[] expected2 = {\"kek\", \"lel\", \"lol\"};\r\n for (String el : sStr) {\r\n assertEquals(expected2[i], el);\r\n i++;\r\n }\r\n }" ]
[ "0.63563", "0.63560295", "0.62793714", "0.62249076", "0.6182601", "0.6140212", "0.6119143", "0.6016328", "0.59500873", "0.58928204", "0.5855649", "0.5780577", "0.57436454", "0.5738407", "0.5703024", "0.5647968", "0.56381685", "0.56159055", "0.55827767", "0.555058", "0.55434936", "0.55309683", "0.5526539", "0.55221605", "0.5506896", "0.55044603", "0.54501617", "0.5400213", "0.53999126", "0.5396413", "0.5377766", "0.533829", "0.5332738", "0.53285044", "0.5291722", "0.52915907", "0.52866185", "0.52850103", "0.5280699", "0.52739", "0.52712786", "0.526324", "0.52524143", "0.5205893", "0.5201182", "0.519914", "0.5196332", "0.51681644", "0.5144972", "0.5143104", "0.51390153", "0.5136701", "0.51244974", "0.51228774", "0.5122472", "0.51171887", "0.51059735", "0.5102371", "0.5077182", "0.5075583", "0.50748354", "0.50720227", "0.50717694", "0.50671595", "0.5046405", "0.50455403", "0.50434035", "0.5038331", "0.5028039", "0.5020902", "0.50207365", "0.5013291", "0.501259", "0.50097615", "0.5003345", "0.49878624", "0.4977149", "0.49677062", "0.49644676", "0.49629337", "0.4955933", "0.49496427", "0.4946282", "0.49391636", "0.4937979", "0.49330208", "0.49308822", "0.49288836", "0.4924563", "0.49165887", "0.49146956", "0.4911453", "0.4908125", "0.48984897", "0.48918796", "0.48913944", "0.4883898", "0.48817265", "0.48712707", "0.48565066" ]
0.71600294
0
method show the content of an array list.
public static void showNodeQueue(AYQueue<Node> q) { for (int i = 0; i < q.size(); i++) { Node node = q.dequeue(); System.out.format("Element #%d = [%s]%n", i, node.getNodeID()); q.enqueue(node); } //for }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void displayArrays(ArrayList list){}", "private static void displayList(ArrayList list) {\n System.out.println(\"The list contains \" + list.getCurrentSize()\n + \" string(s), as follows:\");\n Object[] listArray = list.toArray();\n for (int index = 0; index < listArray.length; index++) {\n System.out.print(listArray[index] + \" \");\n } // end for\n System.out.println();\n }", "public static <E> void showArrayList(ArrayList<E> arr)\n {\n System.out.println(\"...........................................\");\n\n for (int i = 0; i < arr.size(); i++)\n {\n System.out.format(\"\\nElement #%d = [%s]%n\", i, arr.get(i).toString());\n } //for\n\n System.out.println();\n\n\n }", "public void display()\n {\n for (int i = 0; i < length; i++)\n {\n System.out.print(list[i] + \" \");\n }\n\n System.out.println();\n }", "public void viewList() {\n\t\tSystem.out.println(\"Your have \" + contacts.size() + \" contacts:\");\n\t\tfor (int i=0; i<contacts.size(); i++) {\n\t\t\tSystem.out.println((i+1) + \". \" \n\t\t\t\t\t+ contacts.get(i).getName() + \" number: \" \n\t\t\t\t\t+ contacts.get(i).getPhoneNum());\n\t\t}\n\t}", "public void printData(){\n for(int i=0; i<list.size(); i++){\n System.out.print(list.get(i) + \" \");\n }\n System.out.println();\n }", "public static void displayList(ExtendedListInterface aList) throws ListException {\r\n Object dataItem;\r\n\r\n for (int index = 1; index < aList.size(); index++){\r\n dataItem = aList.get(index);\r\n System.out.print(dataItem + \", \");\r\n }\r\n if (aList.size() >= 1) {\r\n dataItem = aList.get(aList.size());\r\n System.out.println(dataItem + \".\");\r\n } else {\r\n throw new ListException(\"displayList on an empty list\");\r\n }\r\n }", "private void showArray() {\n\t\tSystem.out.println(Arrays.toString(this.array));\n\n\t}", "public String toString()\n\t{\n\t\tSystem.out.print(\"Array list contains: [ \");\n\t\tfor(int i=0; i<size; i++)\n\t\t\tSystem.out.print(myArray[i]+ \", \");\n\t\treturn\" ]\";\n\t}", "private void showArrayAdaptView() {\n\t\tPersonAdapt personAdapt = new PersonAdapt(this, persons, R.layout.listview_item);\n\t\tlistView.setAdapter(personAdapt);\n\t}", "public String[] displayContents() {\n String[] contents = new String[this.items.size()];\n for (int i = 0; i < this.items.size(); i++) {\n contents[i] = this.items.get(i).getName();\n }\n return contents;\n }", "@Override\n\tpublic void printContent(List<Object> stingList) {\n\t\t\n\t}", "public void show_book()\n\t{\n\t\tsize=arr.size();\n\t\tif(size>0)\n\t\t{\n\t\t\t\n\t\t\tSystem.out.println(\"===========================================================\");\n\t\t\tSystem.out.println(\"Address Book List\");\n\t\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\t\tint i=1;\n\n\t\t\t//Special loop:= For Each loop for array list\n\t\t\tfor(String x: arr)\n\t\t\t{\n\t\t\t\tSystem.out.println(i+\". \"+x);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"No data Found\");\n\t\t}\n\t}", "public static void showD(ArrayList<ArrayList<String>> data){\n\t\tfor(int i = 0; i<data.get(0).size(); i++){\r\n\t\t\tfor(int j = 0; j<data.size(); j++){\r\n\t\t\t\tSystem.out.print(data.get(j).get(i));\r\n\t\t\t\tSystem.out.print(\"\\t\");\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"\\n\");\r\n\t\t}\r\n\t\treturn;\r\n\t}", "private void showArray(ArrayList<String[]> arr) {\n for(String[] row: arr){\n for(String x: row){\n System.out.print(x + \"\\t\\t\");\n }\n System.out.println();\n } \n System.out.println(\"------------------------------------\");\n }", "public void display(){\n \tfor(int i=0;i<size;i++){\n \tSystem.out.print(elements[i]+\" \");\n \t}\n\t}", "public static final SourceModel.Expr showList(SourceModel.Expr list) {\n\t\t\treturn \n\t\t\t\tSourceModel.Expr.Application.make(\n\t\t\t\t\tnew SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.showList), list});\n\t\t}", "public void showPatientList()\r\n\t{\n\t\tfor(int i=0; i<nextPatientLocation; i++)\r\n\t\t{\r\n\t\t\tString currentPositionPatientData = arrayPatients[i].toString();\r\n\t\t\tSystem.out.println(\"Patient \" + i + \" is \" + currentPositionPatientData);\r\n\t\t}\r\n\t}", "public void displayAsList()\n\t{\n\t\tSystem.out.println(\"Printing all vertices\");\n\t\tvertices.show();\n\t}", "void showSublist()\n {\n System.out.println(subs);\n }", "public void display()\r\n\t{\r\n\t\tif(this.isEmpty())\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Empty... nothing to display\");\r\n\t\t}else\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The Array: \");\t\r\n\t\tfor (int i =0; i<bookArray.length; i++)\r\n\t\t{\r\n\t\t\tif(bookArray[i]!=null)\r\n\t\t\t\tSystem.out.println(\"\\t\"+'\"'+bookArray[i]+'\"');\r\n\t\t}\r\n\t }\r\n\t}", "private static void listFormat() {\n\t\tSystem.out.println(\"List of all your movies\");\n\t\tSystem.out.println(\"=======================\");\n\t\tfor (int i = 0; i < movList.size(); i++) {\n\t\t\tSystem.out.println(movList.get(i));\n\t\t}\n\t}", "private void displayListView() {\n\t\tArrayList<FillterItem> fillterList = new ArrayList<FillterItem>();\n\n\t\tfor (int i = 0; i < province.length; i++) {\n\t\t\tLog.i(\"\", \"province[i]: \" + province[i]);\n\t\t\tFillterItem fillter = new FillterItem();\n\t\t\tfillter.setStrContent(province[i]);\n\t\t\tfillter.setSelected(valueList[i]);\n\t\t\t// add data\n\t\t\tfillterList.add(fillter);\n\t\t}\n\n\t\t// create an ArrayAdaptar from the String Array\n\t\tdataAdapter = new MyCustomAdapter(getContext(),\n\t\t\t\tR.layout.item_fillter_header, fillterList);\n\n\t\t// Assign adapter to ListView\n\t\tlistView.setAdapter(dataAdapter);\n\n\t}", "public String toString() {\n if (size > 0) {\n String display = \"[\";\n for (int i = 0; i < size - 1; i++) {\n display += list[i] + \",\";\n } display += list[size - 1] + \"]\";\n return display;\n }\n return \"[]\";\n }", "public void printList(){\n System.out.println(\"Printing the list\");\n for(int i = 0; i<adjacentcyList.length;i++){\n System.out.println(adjacentcyList[i].value);\n }\n }", "@Override\n public final String toString() {\n final int[] temp = new int[size];\n for (int i = 0; i < size; i++) {\n temp[i] = arrayList[i];\n }\n return Arrays.toString(temp);\n }", "public void listar() {\n\t\t\n\t}", "public void print()\n {\n for (int i=0; i<list.length; i++)\n System.out.println(i + \":\\t\" + list[i]);\n }", "public void display() {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tSystem.out.print(a[i] + \"\\t\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void displayList() {\n\n\t\tIterator<SimplePacket> itr = list.iterator();\n\n\t\twhile(itr.hasNext()) {\n\t\t\tSimplePacket packet = itr.next();\n\t\t\tif(!packet.isValidCheckSum()){\n\t\t\t\tSystem.out.print(\"[\" + packet.getSeq() + \"], \");\n\t\t\t}else{\n\t\t\t\tSystem.out.print(packet.getSeq() + \", \");\n\t\t\t}\n\t\t}\n\t}", "private void displayArray() {\r\n System.out.println(\"CEK ARRAY : \");\r\n for (i = 0; i < array.length; i++) {\r\n System.out.print(array[i]+\",\");\r\n }\r\n }", "public static void printList(ArrayList list) {\n String output = \"[ \";\n for (int i = 0; i < list.size(); i++) {\n if (i != 0) {\n output += \", \" + list.get(i);\n }\n else {\n output += list.get(i);\n }\n }\n output += \" ]\";\n System.out.println(output);\n }", "private void showList() {\n select();\n //create adapter\n adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, studentInfo);\n //show data list\n listView.setAdapter(adapter);\n }", "public void show() {\r\n\t\tfor (Carta carta: baraja) {\r\n\t\t\tSystem.out.println(carta);\r\n\t\t}\r\n\t}", "private static void printArray(ArrayList<Integer> list) {\n for (int i : list) {\n System.out.println(i * 3);\n }\n\n }", "public static <E> void showArrayList(ArrayList<E> arr, String msg)\n {\n System.out.println(msg);\n showArrayList(arr);\n\n }", "@Override\n\tpublic boolean showInList()\n\t{\n\t\treturn true;\n\t}", "@Override\n public String toString() {\n return list.toString();\n }", "public void arrayList(List<Student> list)\r\n\t{\r\n\t\tlist.add(s1);\r\n\t\tlist.add(s2);\r\n\t\tlist.add(s3);\r\n\t\tlist.add(s4);\r\n\t\tlist.add(s5);\r\n\t\tlist.add(s6);\r\n\t\tSystem.out.println(\"Objects of ArrayList\");\r\n\t\tfor(int i=0;i<list.size();i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(list.get(i));\r\n\t\t}\r\n\t}", "public String toString(){\n\t\t// Si la liste est vide\n\t\tif(this.nb == 0){\n\t\t\treturn \"[]\";\n\t\t}\n\t\tString retour = \"[\" + this.liste[0];\n\t\tfor(int i = 1 ; i < this.nb ; i++){\n\t\t\tretour += \", \" + this.liste[i];\n\t\t}\n\t\tretour += \"]\";\n\t\t\n\t\treturn retour;\n\t}", "public void displayList (String [] list, int count, String message){\n \n //Print utiliy\n System.out.println(\"\\n\\t\" + message);\n for (int i = 0; i < count; i++){\n System.out.println(\"\\t\" + (i+1) + \"\\t\" + list[i]);\n }//End for loop\n \n }", "@Override\r\n public String toString() {\r\n String output = \"[ \";\r\n for (int i = 0; i < count; i++) {\r\n output += list[i] + \", \";\r\n }\r\n if (count > 0) {\r\n output = output.substring(0, output.length() - 2);\r\n } else {\r\n output = output.substring(0, output.length() - 1);\r\n }\r\n output += \" ]\";\r\n return output;\r\n }", "public void showList(){\n\n List<Integer> lst1 = new ArrayList<Integer>();\n\n lst1.add(2);\n lst1.add(6);\n lst1.add(4);\n lst1.add(8);\n lst1.add(2);\n\n System.out.println(\"**********************************\");\n System.out.println(\"Arraylist:\" + lst1);\n\n //faster to add and remove\n List<Integer> lst2 = new LinkedList<Integer>();\n\n lst2.add(2);\n lst2.add(6);\n lst2.add(4);\n lst2.add(8);\n lst2.add(2);\n\n System.out.println(\"LinkedList: \" + lst2);\n System.out.println(\"********************************\");\n\n }", "public void printFormParticularIndex(ArrayList<Object> ar1) {\n\t\tSystem.out.println(\"To get value from particular index: \" + ar1.get(1));\n\t}", "public void showListData() {\n List<Operator> operators = operatorService.queryAll();\n String[][] datas = new String[operators.size()][8];\n for (int i = 0; i < datas.length; i++) {\n datas[i][0] = operators.get(i).getId().toString();\n datas[i][1] = operators.get(i).getName();\n datas[i][2] = operators.get(i).getSex();\n datas[i][3] = operators.get(i).getAge().toString();\n datas[i][4] = operators.get(i).getIdentityCard();\n datas[i][5] = operators.get(i).getWorkDate().toString();\n datas[i][6] = operators.get(i).getTel();\n datas[i][7] = operators.get(i).getAdmin().toString();\n }\n operatorManagetable.setModel(new DefaultTableModel(\n datas, new String[]{\"编号\", \"用户名\", \"性别\", \"年龄\", \"证件号\", \"工作时间\", \"电话号码\", \"是否为管理员\"}\n ));\n scrollPane1.setViewportView(operatorManagetable);\n }", "void printList();", "public void displayElements(MyList<Integer> m){\n\t\t//-----------------------------\n\t\t//SET OF OPS\n\t\t//-----------------------------\n\n\t\t//-----------------------------\n\t\t// I. SCENARIO IDENTIFICATION\n\t\t//-----------------------------\n\t\tint scenario = 0; \n\n\t\t//Rule 1. MyList is empty\n\t\tif (m.length() == 0) \n\t\t\tscenario = 1;\n\t\t//Rule 2. MyList is non-empty\n\t\telse\n\t\t\tscenario = 2;\n\n\t\t//-----------------------------\n\t\t// II. SCENARIO IMPLEMENTATION \n\t\t//-----------------------------\n\t\tswitch(scenario){\t\n\n\t\t//Rule 1. MyList is empty\n\t\tcase 1: \n\t\t\t//1. We print the empty message\n\t\t\tSystem.out.println(\"Empty MyList\");\n\n\t\t\tbreak;\n\n\t\t\t//Rule 2. MyList is non-empty\n\t\tcase 2: \n\t\t\t//1. We print the initial message\n\t\t\tint size = m.length();\n\t\t\tSystem.out.print(\"MyList has \" + size + \" items: [\");\n\n\t\t\t//2. We traverse the items\n\t\t\tfor (int i = 0; i < size - 1; i++)\n\t\t\t\tSystem.out.print(m.getElement(i) + \", \");\n\t\t\tSystem.out.println(m.getElement(size - 1) + \"]\");\n\n\t\t\tbreak;\n\n\t\t}\n\n\t}", "@Override\n public String toString()\n {\n StringBuilder builder = new StringBuilder();\n builder.append('[');\n for (Object item : list)\n {\n builder.append(item.toString());\n builder.append(\", \");\n }\n builder.append(']');\n return builder.toString();\n }", "public void printFormatedList()\r\n{\r\n System.out.println(\"[\");\r\n for(int i = 0; i < JustifiedList.size(); i++)\r\n {\r\n System.out.println(\"\\\"\" + JustifiedList.get(i) + \"\\\"\");\r\n }\r\n System.out.println(\"]\");\r\n}", "void printArray(CatalogueItem arr[])\r\n {\r\n int n = arr.length;\r\n for (int i=0; i<n; ++i)\r\n System.out.print(\r\n \"id: \" + arr[i].getItemId() + \" \"\r\n + \"name: \" + arr[i].getItemName() + \" \"\r\n + \"category: \" + arr[i].getCategory() + \"\\n\");\r\n System.out.println();\r\n System.out.println();\r\n }", "public void displayData(int[][] arr);", "public static void printToScreen(List<String> list1){\n\t\tJOptionPane.showMessageDialog(null, \"ArrayList has \" + list1.size() + \" Names\");\n\t\tJOptionPane.showMessageDialog(null, \"Here is the List \" + list1);\n\t}", "private static void showContacts(List<Contact> contactList) {\r\n\t\tcontactList.forEach(System.out::println);\r\n\t}", "@Override\n\tpublic int getCount()\n\t{\n\t\treturn arrayList.size();\n\t}", "public abstract ArrayList<String[]> toStrings();", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tFileInputStream fileInputStream = new FileInputStream(\"G:\\\\Prog\\\\arraylist.txt\");\n\t\t\tint i;\n\t\t\twhile((i = fileInputStream.read()) != -1)\n\t\t\t{\n\t\t\t\tSystem.out.print((char)i);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfileInputStream.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\n\t\n\tList l = new ArrayList();\n\t l.toArray();\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic int getCount() {\n\t\treturn arrayList.size();\r\n\t}", "private static void showList(StringBuffer aBuf,\n String[] aItems, String aStartTag, String aEndTag) {\n aBuf.append(aStartTag).append(NEW_LINE);\n for (int i=0; i<aItems.length; i++) {\n appendLI(aBuf, aItems[i]);\n }\n aBuf.append(aEndTag).append(NEW_LINE);\n}", "public void display()\n {\n System.out.println(�\\n The elements are�);\n for(int i=0; i<n; i++)\n System.out.println(� �+a[i]);\n }", "@Override\n\tpublic int getCount() {\n\t\treturn arrayList.size();\n\t}", "@Override\n\tpublic int getCount() {\n\t\treturn arrayList.size();\n\t}", "public void displayData(String[] str);", "public void list(){\n //loop through all inventory items\n for(int i=0; i<this.items.size(); i++){\n //print listing of each item\n System.out.printf(this.items.get(i).getListing()+\"\\n\");\n }\n }", "private void viewList() {\r\n PrintListMenuView listMenu = new PrintListMenuView();\r\n listMenu.displayMenu();\r\n }", "public static void printList(){\n ui.showToUser(ui.DIVIDER, \"Here are the tasks in your list:\");\n for (int i=0; i<Tasks.size(); ++i){\n Task task = Tasks.get(i);\n Integer taskNumber = i+1;\n ui.showToUser(taskNumber + \".\" + task.toString());\n }\n ui.showToUser(ui.DIVIDER);\n }", "public void list()\n {\n for(Personality objectHolder : pList)\n {\n String toPrint = objectHolder.getDetails();\n System.out.println(toPrint);\n }\n }", "private static void displayItems()\n {\n System.out.println(\"\\n\\tCurrent List of Products in the Store:\\n\");\n for(Sales s : store)\n System.out.println(s.toString());\n }", "private void printArrayList(ArrayList<String> printThis) {\n for(int i = 0; i < printThis.size(); i++) {\n System.out.print(printThis.get(i) + \"\\t\");\n }\n\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"\\nContents of SimpleArray:\\n\" + Arrays.toString(array);\n\t}", "@FXML\n\tprivate void onLoadLogClicked(){\n\n\t\tSystem.out.print(list);\n\t\tString showup = \"\";\n\t\tfor (int index = 0; index < list.size(); index++) {\n\t\t\tshowup += list.get(index)+\" & \"+dat.get(index);\n\t\t\tshowup += \"\\n\";\n\t\t}\n\t\ttextArea.setText(showup);\n\t}", "@Override\n public int getCount() {\n return arrlist.size();\n }", "@Override\n public int getCount() {\n return arrlist.size();\n }", "@Override\n public String toString() {\n return \"ArrayTaskList{\" +\n \"list=\" + Arrays.toString(list) +\n \", currentPos=\" + currentPos +\n \", listLength=\" + listLength +\n '}';\n }", "private void cargarLista(ArrayList<CarritoDTO> arrayList)\n {\n DefaultListModel modelo = new DefaultListModel();\n //Recorrer el contenido del ArrayList\n for(int i=0; i<arrayList.size(); i++) \n {\n CarritoDTO item =(CarritoDTO) arrayList.get(i);\n //Añadir cada elemento del ArrayList en el modelo de la lista\n modelo.add(i, item.toString());\n }\n //Asociar el modelo de lista al JList\n jList1.setModel(modelo);\n }", "private static void testAdd(ArrayList list, int[] content) {\n System.out.print(\"Adding to the list: \");\n for (int index = 0; index < content[index]; index++) {\n list.addToEnd(content);\n } // end for\n System.out.println();\n displayList(list);\n }", "public void show() {\r\n\t\tSystem.out.println(\"Id \\t Name \\t Address\");\r\n\t\t\r\n\t\tfor (int index = 0; index < emp.size(); index++) {\r\n\t\t\tSystem.out.println(emp.get(index).empId + \"\\t\" + emp.get(index).name +\"\\t\" + emp.get(index).adress);\r\n\t\t}\r\n\t}", "public String toString()\n {\n String s = \"\";\n for (int i=0; i<list.length; i++)\n s += i + \":\\t\" + list[i] + \"\\n\";\n return s;\n }", "static void print(List list)\r\n\t{\n\t\tfor(int i= 0; i < list.size(); i++){\r\n\t\t\tSystem.out.println(list.get(i));\r\n\t\t}\r\n\t}", "private void listExample()\n\t{\n\n\t\tArrayList <String> alist = new ArrayList<String>();//doesn't have to be string- can be Duck, or Mouse, or Apostrophe\n\t\talist.add(\"banana\"); //adds \"banana\" to the end of the list\n\t\talist.add(\"strawberry\");\n\t\talist.add(\"blueberry\");\n\t\talist.add(\"blackberry\");\n\t\t\n\t\tJOptionPane.showMessageDialog(null,alist);\n\t\t\n\t\talist.add(2, \"apple\"); //adds it in spot 2 (3rd position)\n\t\t\n\t\tJOptionPane.showMessageDialog(null,alist);\n\t\t\n\t\t\n\t\talist.remove(\"blueberry\"); \n\t\t/**\n\t\t * .remove returns what was in the spot that was just taken out--and shrinks down by one\n\t\t * .set also returns this value but it replaces the value with something else\n\t\t */\n\t\talist.remove(0); //removes 1st element\n\t\tJOptionPane.showMessageDialog(null,alist);\n\t\t\n\t\tfor (String str:alist)\n\t\t\tJOptionPane.showMessageDialog(null, str); //shows each individually\n\t\t\n\t\talist.set(1, \"coconut\"); //alist.set(index, element) --replaces\n\t\t\n\t\tint numberOfItems = alist.size();\n\t\talist.clear();\n\n\t\n\t}", "public ArrayList<String> a(ArrayList<View> arrayList) {\n ArrayList<String> arrayList2 = new ArrayList<>();\n int size = arrayList.size();\n for (int i = 0; i < size; i++) {\n View view = arrayList.get(i);\n arrayList2.add(p.e(view));\n p.a(view, (String) null);\n }\n return arrayList2;\n }", "private static void showList(List<String> list, int offsetX, int offsetY) {\r\n\t\tfor (int i = 1; i <= list.size(); i++) {\r\n\t\t\tGAME.drawTextScreen(offsetX, offsetY + (LINE_HEIGHT * i), list.get(i - 1));\r\n\t\t}\r\n\t}", "@Override\n public String toString(){\n String result = \"\";\n for(int i = 0; i < numItems; i++){\n result += arr[i] + \" \";\n }\n return result;\n }", "public String list() {\n final StringBuilder list = new StringBuilder(\"Here are the tasks in your list:\\n\\t\");\n records.forEach((el) -> list.append(\n String.format(\"%1$d. %2$s \\n\\t\",\n records.indexOf(el) + 1, el.toString())));\n return list.toString();\n }", "public static void listToPrint() {\r\n for (int i = 0; i < ListeElem.size(); i++) {\r\n ListeElem.get(i).toPrint();\r\n }\r\n\r\n }", "public void print_list() {\n \t \n \t//define current node as\n \t node<Type> current_node = new node<>();\n \t \n \t //now keep for loop and print the answer\n \t current_node = head;\n \t \n \t //print first element\n \t System.out.println(current_node.show_element());\n \t \n \t //now run for loop\n \t for (int i = 1 ; i <= len - 1 ; i ++) {\n \t\t \n \t\t //change current node\n \t\t current_node = current_node.show_next();\n \t\t \n \t\t //just print the answer\n \t\t System.out.println(current_node.show_element());\n \t }\n }", "@Override\r\n\tpublic void showList() {\n\t\tSystem.out.println(\"I am a MAC list\");\r\n\t}", "public void printAll(){\nfor(int i=0;i<size ;i++){\n System.out.println(\"a[%d]\"+data[i]); \n}\n System.out.println(\"size\"+size); \n}", "public String toString() {\n\t\treturn list.toString();\n\t}", "public String getDataAsString()\n\t{\n\t\tString listAsString = \"\";\n\t\t\n\t\tfor (int i = 0; i < list.length; i++)\n\t\t{\n\t\t\tlistAsString += list[i] + \" \";\n\t\t}\n\t\t\n\t\tlistAsString += \"\\nFront: \" + front + \"\\nRear: \" +\n\t\t\t\trear + \"\\nEntries: \" + counter;\n\t\t\n\t\treturn listAsString;\n\t}", "public List<String> viewExams() {\n List<String> list = new ArrayList<>();\n if (examList.size() == 0) {\n list.add(\"No Exams have been created yet!\");\n } else {\n for (int i = 0; i < examList.size(); i++) {\n String entry = (i + 1) + \".\" + examList.get(i).toString();\n list.add(entry);\n }\n }\n return list;\n }", "protected void showList(String[] convertLis) {\n sL.register(null, \"INFO\", \"Successful - showList - start\");\n for (int j = convertLis.length - 1; j >= 0; j-- ) {\n listConverting.getListModel().addElement(convertLis[j]);\n }\n sL.register(null, \"INFO\", \"Successful - showList - finished\");\n }", "@Override\n public String toString() {\n return \"SimpleArrayList{\"\n + \"values=\" + Arrays.toString(values)\n + '}';\n }", "public void displayData();", "private static void showList(ArrayList<? extends Machine> list) {\n System.out.println(\"In showlist method\");\n for(Machine machine: list) {\n System.out.println(machine);\n }\n\n }", "void showFacts(List<Fact> facts);", "public String display(){\n StringBuilder str = new StringBuilder();\n\n for(int i = 0; i < 3; ++i){\n if( Array[i] != null ) {\n str.append('\\n' + Names[i] + '\\n');\n str.append(Array[i].display());\n }\n }\n return str.toString();\n }", "public void show() {\n numberList.show();\n }", "public static void showNodeArrayList(ArrayList<Node> arr)\n {\n for (int i = 0; i < arr.size(); i++)\n {\n Node node = arr.get(i);\n System.out.format(\"Element #%d = [%s]%n\", i, node.getNodeID());\n } //for\n\n }", "@Override\n public void showListOfAudioFiles(ArrayList<AudioModel> audioModelArrayList) {\n }", "public static void printContactList()\n {\n if(myList.size() < 1)\n System.out.println(\"~empty list~\");\n else\n {\n System.out.println(\"Current Items\");\n System.out.println(\"-------------\");\n for(int i = 0; i < myList.size(); i++)\n {\n System.out.printf(i+\")\");\n Item itemPrint = myList.get(i);\n itemPrint.printItem(itemPrint.getFirstName(), itemPrint.getLastName(), itemPrint.getPhoneNumber(), itemPrint.getEmail());\n }\n }\n }", "public S<T> list(String[] data){\n\t\tif(t instanceof ListView){\n\t\t\t\n\t\t\t((ListView) t).setAdapter(new ArrayAdapter<String>(activity,\n\t\t android.R.layout.simple_list_item_1, android.R.id.text1, data));\n\t\t}\n\t\treturn this;\n\t}" ]
[ "0.80565214", "0.72794485", "0.6774054", "0.664965", "0.6575048", "0.6529514", "0.6470372", "0.6445237", "0.6406743", "0.6352501", "0.6270823", "0.6262646", "0.62527835", "0.62398005", "0.6212774", "0.6204973", "0.61948156", "0.6185194", "0.61632067", "0.6142287", "0.61299276", "0.60963213", "0.6092055", "0.6062058", "0.60579544", "0.60528755", "0.60458803", "0.6035733", "0.60321635", "0.6030074", "0.6027708", "0.60263306", "0.6020302", "0.60167605", "0.59994596", "0.5993302", "0.5978091", "0.5971012", "0.59558547", "0.59519476", "0.5945913", "0.5941557", "0.5939915", "0.5939503", "0.59265834", "0.59224606", "0.591512", "0.589726", "0.58956605", "0.5857208", "0.58420384", "0.5833531", "0.58315074", "0.5831038", "0.5827874", "0.57976305", "0.5795035", "0.57873124", "0.57856107", "0.5780845", "0.5780845", "0.5780735", "0.57782537", "0.5774336", "0.57704633", "0.5769175", "0.5764547", "0.576031", "0.57452595", "0.5744618", "0.57295007", "0.57295007", "0.57272565", "0.57147944", "0.57121956", "0.5707798", "0.5705244", "0.57008934", "0.57007605", "0.5697824", "0.5696635", "0.569015", "0.5689777", "0.5685514", "0.5677598", "0.56716293", "0.5671268", "0.5671191", "0.56689197", "0.56627256", "0.56507033", "0.56483006", "0.56433296", "0.56386596", "0.56181043", "0.561612", "0.56122553", "0.561001", "0.56062937", "0.5604426", "0.5598621" ]
0.0
-1
method show the content of an array list.
public static void showNodeArrayList(ArrayList<Node> arr) { for (int i = 0; i < arr.size(); i++) { Node node = arr.get(i); System.out.format("Element #%d = [%s]%n", i, node.getNodeID()); } //for }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void displayArrays(ArrayList list){}", "private static void displayList(ArrayList list) {\n System.out.println(\"The list contains \" + list.getCurrentSize()\n + \" string(s), as follows:\");\n Object[] listArray = list.toArray();\n for (int index = 0; index < listArray.length; index++) {\n System.out.print(listArray[index] + \" \");\n } // end for\n System.out.println();\n }", "public static <E> void showArrayList(ArrayList<E> arr)\n {\n System.out.println(\"...........................................\");\n\n for (int i = 0; i < arr.size(); i++)\n {\n System.out.format(\"\\nElement #%d = [%s]%n\", i, arr.get(i).toString());\n } //for\n\n System.out.println();\n\n\n }", "public void display()\n {\n for (int i = 0; i < length; i++)\n {\n System.out.print(list[i] + \" \");\n }\n\n System.out.println();\n }", "public void viewList() {\n\t\tSystem.out.println(\"Your have \" + contacts.size() + \" contacts:\");\n\t\tfor (int i=0; i<contacts.size(); i++) {\n\t\t\tSystem.out.println((i+1) + \". \" \n\t\t\t\t\t+ contacts.get(i).getName() + \" number: \" \n\t\t\t\t\t+ contacts.get(i).getPhoneNum());\n\t\t}\n\t}", "public void printData(){\n for(int i=0; i<list.size(); i++){\n System.out.print(list.get(i) + \" \");\n }\n System.out.println();\n }", "public static void displayList(ExtendedListInterface aList) throws ListException {\r\n Object dataItem;\r\n\r\n for (int index = 1; index < aList.size(); index++){\r\n dataItem = aList.get(index);\r\n System.out.print(dataItem + \", \");\r\n }\r\n if (aList.size() >= 1) {\r\n dataItem = aList.get(aList.size());\r\n System.out.println(dataItem + \".\");\r\n } else {\r\n throw new ListException(\"displayList on an empty list\");\r\n }\r\n }", "private void showArray() {\n\t\tSystem.out.println(Arrays.toString(this.array));\n\n\t}", "public String toString()\n\t{\n\t\tSystem.out.print(\"Array list contains: [ \");\n\t\tfor(int i=0; i<size; i++)\n\t\t\tSystem.out.print(myArray[i]+ \", \");\n\t\treturn\" ]\";\n\t}", "private void showArrayAdaptView() {\n\t\tPersonAdapt personAdapt = new PersonAdapt(this, persons, R.layout.listview_item);\n\t\tlistView.setAdapter(personAdapt);\n\t}", "public String[] displayContents() {\n String[] contents = new String[this.items.size()];\n for (int i = 0; i < this.items.size(); i++) {\n contents[i] = this.items.get(i).getName();\n }\n return contents;\n }", "@Override\n\tpublic void printContent(List<Object> stingList) {\n\t\t\n\t}", "public void show_book()\n\t{\n\t\tsize=arr.size();\n\t\tif(size>0)\n\t\t{\n\t\t\t\n\t\t\tSystem.out.println(\"===========================================================\");\n\t\t\tSystem.out.println(\"Address Book List\");\n\t\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\t\tint i=1;\n\n\t\t\t//Special loop:= For Each loop for array list\n\t\t\tfor(String x: arr)\n\t\t\t{\n\t\t\t\tSystem.out.println(i+\". \"+x);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"No data Found\");\n\t\t}\n\t}", "public static void showD(ArrayList<ArrayList<String>> data){\n\t\tfor(int i = 0; i<data.get(0).size(); i++){\r\n\t\t\tfor(int j = 0; j<data.size(); j++){\r\n\t\t\t\tSystem.out.print(data.get(j).get(i));\r\n\t\t\t\tSystem.out.print(\"\\t\");\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"\\n\");\r\n\t\t}\r\n\t\treturn;\r\n\t}", "private void showArray(ArrayList<String[]> arr) {\n for(String[] row: arr){\n for(String x: row){\n System.out.print(x + \"\\t\\t\");\n }\n System.out.println();\n } \n System.out.println(\"------------------------------------\");\n }", "public void display(){\n \tfor(int i=0;i<size;i++){\n \tSystem.out.print(elements[i]+\" \");\n \t}\n\t}", "public static final SourceModel.Expr showList(SourceModel.Expr list) {\n\t\t\treturn \n\t\t\t\tSourceModel.Expr.Application.make(\n\t\t\t\t\tnew SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.showList), list});\n\t\t}", "public void showPatientList()\r\n\t{\n\t\tfor(int i=0; i<nextPatientLocation; i++)\r\n\t\t{\r\n\t\t\tString currentPositionPatientData = arrayPatients[i].toString();\r\n\t\t\tSystem.out.println(\"Patient \" + i + \" is \" + currentPositionPatientData);\r\n\t\t}\r\n\t}", "public void displayAsList()\n\t{\n\t\tSystem.out.println(\"Printing all vertices\");\n\t\tvertices.show();\n\t}", "void showSublist()\n {\n System.out.println(subs);\n }", "public void display()\r\n\t{\r\n\t\tif(this.isEmpty())\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Empty... nothing to display\");\r\n\t\t}else\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The Array: \");\t\r\n\t\tfor (int i =0; i<bookArray.length; i++)\r\n\t\t{\r\n\t\t\tif(bookArray[i]!=null)\r\n\t\t\t\tSystem.out.println(\"\\t\"+'\"'+bookArray[i]+'\"');\r\n\t\t}\r\n\t }\r\n\t}", "private static void listFormat() {\n\t\tSystem.out.println(\"List of all your movies\");\n\t\tSystem.out.println(\"=======================\");\n\t\tfor (int i = 0; i < movList.size(); i++) {\n\t\t\tSystem.out.println(movList.get(i));\n\t\t}\n\t}", "private void displayListView() {\n\t\tArrayList<FillterItem> fillterList = new ArrayList<FillterItem>();\n\n\t\tfor (int i = 0; i < province.length; i++) {\n\t\t\tLog.i(\"\", \"province[i]: \" + province[i]);\n\t\t\tFillterItem fillter = new FillterItem();\n\t\t\tfillter.setStrContent(province[i]);\n\t\t\tfillter.setSelected(valueList[i]);\n\t\t\t// add data\n\t\t\tfillterList.add(fillter);\n\t\t}\n\n\t\t// create an ArrayAdaptar from the String Array\n\t\tdataAdapter = new MyCustomAdapter(getContext(),\n\t\t\t\tR.layout.item_fillter_header, fillterList);\n\n\t\t// Assign adapter to ListView\n\t\tlistView.setAdapter(dataAdapter);\n\n\t}", "public String toString() {\n if (size > 0) {\n String display = \"[\";\n for (int i = 0; i < size - 1; i++) {\n display += list[i] + \",\";\n } display += list[size - 1] + \"]\";\n return display;\n }\n return \"[]\";\n }", "public void printList(){\n System.out.println(\"Printing the list\");\n for(int i = 0; i<adjacentcyList.length;i++){\n System.out.println(adjacentcyList[i].value);\n }\n }", "@Override\n public final String toString() {\n final int[] temp = new int[size];\n for (int i = 0; i < size; i++) {\n temp[i] = arrayList[i];\n }\n return Arrays.toString(temp);\n }", "public void listar() {\n\t\t\n\t}", "public void print()\n {\n for (int i=0; i<list.length; i++)\n System.out.println(i + \":\\t\" + list[i]);\n }", "public void display() {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tSystem.out.print(a[i] + \"\\t\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void displayList() {\n\n\t\tIterator<SimplePacket> itr = list.iterator();\n\n\t\twhile(itr.hasNext()) {\n\t\t\tSimplePacket packet = itr.next();\n\t\t\tif(!packet.isValidCheckSum()){\n\t\t\t\tSystem.out.print(\"[\" + packet.getSeq() + \"], \");\n\t\t\t}else{\n\t\t\t\tSystem.out.print(packet.getSeq() + \", \");\n\t\t\t}\n\t\t}\n\t}", "private void displayArray() {\r\n System.out.println(\"CEK ARRAY : \");\r\n for (i = 0; i < array.length; i++) {\r\n System.out.print(array[i]+\",\");\r\n }\r\n }", "public static void printList(ArrayList list) {\n String output = \"[ \";\n for (int i = 0; i < list.size(); i++) {\n if (i != 0) {\n output += \", \" + list.get(i);\n }\n else {\n output += list.get(i);\n }\n }\n output += \" ]\";\n System.out.println(output);\n }", "private void showList() {\n select();\n //create adapter\n adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, studentInfo);\n //show data list\n listView.setAdapter(adapter);\n }", "public void show() {\r\n\t\tfor (Carta carta: baraja) {\r\n\t\t\tSystem.out.println(carta);\r\n\t\t}\r\n\t}", "private static void printArray(ArrayList<Integer> list) {\n for (int i : list) {\n System.out.println(i * 3);\n }\n\n }", "public static <E> void showArrayList(ArrayList<E> arr, String msg)\n {\n System.out.println(msg);\n showArrayList(arr);\n\n }", "@Override\n\tpublic boolean showInList()\n\t{\n\t\treturn true;\n\t}", "@Override\n public String toString() {\n return list.toString();\n }", "public void arrayList(List<Student> list)\r\n\t{\r\n\t\tlist.add(s1);\r\n\t\tlist.add(s2);\r\n\t\tlist.add(s3);\r\n\t\tlist.add(s4);\r\n\t\tlist.add(s5);\r\n\t\tlist.add(s6);\r\n\t\tSystem.out.println(\"Objects of ArrayList\");\r\n\t\tfor(int i=0;i<list.size();i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(list.get(i));\r\n\t\t}\r\n\t}", "public String toString(){\n\t\t// Si la liste est vide\n\t\tif(this.nb == 0){\n\t\t\treturn \"[]\";\n\t\t}\n\t\tString retour = \"[\" + this.liste[0];\n\t\tfor(int i = 1 ; i < this.nb ; i++){\n\t\t\tretour += \", \" + this.liste[i];\n\t\t}\n\t\tretour += \"]\";\n\t\t\n\t\treturn retour;\n\t}", "public void displayList (String [] list, int count, String message){\n \n //Print utiliy\n System.out.println(\"\\n\\t\" + message);\n for (int i = 0; i < count; i++){\n System.out.println(\"\\t\" + (i+1) + \"\\t\" + list[i]);\n }//End for loop\n \n }", "@Override\r\n public String toString() {\r\n String output = \"[ \";\r\n for (int i = 0; i < count; i++) {\r\n output += list[i] + \", \";\r\n }\r\n if (count > 0) {\r\n output = output.substring(0, output.length() - 2);\r\n } else {\r\n output = output.substring(0, output.length() - 1);\r\n }\r\n output += \" ]\";\r\n return output;\r\n }", "public void showList(){\n\n List<Integer> lst1 = new ArrayList<Integer>();\n\n lst1.add(2);\n lst1.add(6);\n lst1.add(4);\n lst1.add(8);\n lst1.add(2);\n\n System.out.println(\"**********************************\");\n System.out.println(\"Arraylist:\" + lst1);\n\n //faster to add and remove\n List<Integer> lst2 = new LinkedList<Integer>();\n\n lst2.add(2);\n lst2.add(6);\n lst2.add(4);\n lst2.add(8);\n lst2.add(2);\n\n System.out.println(\"LinkedList: \" + lst2);\n System.out.println(\"********************************\");\n\n }", "public void printFormParticularIndex(ArrayList<Object> ar1) {\n\t\tSystem.out.println(\"To get value from particular index: \" + ar1.get(1));\n\t}", "public void showListData() {\n List<Operator> operators = operatorService.queryAll();\n String[][] datas = new String[operators.size()][8];\n for (int i = 0; i < datas.length; i++) {\n datas[i][0] = operators.get(i).getId().toString();\n datas[i][1] = operators.get(i).getName();\n datas[i][2] = operators.get(i).getSex();\n datas[i][3] = operators.get(i).getAge().toString();\n datas[i][4] = operators.get(i).getIdentityCard();\n datas[i][5] = operators.get(i).getWorkDate().toString();\n datas[i][6] = operators.get(i).getTel();\n datas[i][7] = operators.get(i).getAdmin().toString();\n }\n operatorManagetable.setModel(new DefaultTableModel(\n datas, new String[]{\"编号\", \"用户名\", \"性别\", \"年龄\", \"证件号\", \"工作时间\", \"电话号码\", \"是否为管理员\"}\n ));\n scrollPane1.setViewportView(operatorManagetable);\n }", "void printList();", "public void displayElements(MyList<Integer> m){\n\t\t//-----------------------------\n\t\t//SET OF OPS\n\t\t//-----------------------------\n\n\t\t//-----------------------------\n\t\t// I. SCENARIO IDENTIFICATION\n\t\t//-----------------------------\n\t\tint scenario = 0; \n\n\t\t//Rule 1. MyList is empty\n\t\tif (m.length() == 0) \n\t\t\tscenario = 1;\n\t\t//Rule 2. MyList is non-empty\n\t\telse\n\t\t\tscenario = 2;\n\n\t\t//-----------------------------\n\t\t// II. SCENARIO IMPLEMENTATION \n\t\t//-----------------------------\n\t\tswitch(scenario){\t\n\n\t\t//Rule 1. MyList is empty\n\t\tcase 1: \n\t\t\t//1. We print the empty message\n\t\t\tSystem.out.println(\"Empty MyList\");\n\n\t\t\tbreak;\n\n\t\t\t//Rule 2. MyList is non-empty\n\t\tcase 2: \n\t\t\t//1. We print the initial message\n\t\t\tint size = m.length();\n\t\t\tSystem.out.print(\"MyList has \" + size + \" items: [\");\n\n\t\t\t//2. We traverse the items\n\t\t\tfor (int i = 0; i < size - 1; i++)\n\t\t\t\tSystem.out.print(m.getElement(i) + \", \");\n\t\t\tSystem.out.println(m.getElement(size - 1) + \"]\");\n\n\t\t\tbreak;\n\n\t\t}\n\n\t}", "@Override\n public String toString()\n {\n StringBuilder builder = new StringBuilder();\n builder.append('[');\n for (Object item : list)\n {\n builder.append(item.toString());\n builder.append(\", \");\n }\n builder.append(']');\n return builder.toString();\n }", "public void printFormatedList()\r\n{\r\n System.out.println(\"[\");\r\n for(int i = 0; i < JustifiedList.size(); i++)\r\n {\r\n System.out.println(\"\\\"\" + JustifiedList.get(i) + \"\\\"\");\r\n }\r\n System.out.println(\"]\");\r\n}", "void printArray(CatalogueItem arr[])\r\n {\r\n int n = arr.length;\r\n for (int i=0; i<n; ++i)\r\n System.out.print(\r\n \"id: \" + arr[i].getItemId() + \" \"\r\n + \"name: \" + arr[i].getItemName() + \" \"\r\n + \"category: \" + arr[i].getCategory() + \"\\n\");\r\n System.out.println();\r\n System.out.println();\r\n }", "public void displayData(int[][] arr);", "public static void printToScreen(List<String> list1){\n\t\tJOptionPane.showMessageDialog(null, \"ArrayList has \" + list1.size() + \" Names\");\n\t\tJOptionPane.showMessageDialog(null, \"Here is the List \" + list1);\n\t}", "private static void showContacts(List<Contact> contactList) {\r\n\t\tcontactList.forEach(System.out::println);\r\n\t}", "@Override\n\tpublic int getCount()\n\t{\n\t\treturn arrayList.size();\n\t}", "public abstract ArrayList<String[]> toStrings();", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tFileInputStream fileInputStream = new FileInputStream(\"G:\\\\Prog\\\\arraylist.txt\");\n\t\t\tint i;\n\t\t\twhile((i = fileInputStream.read()) != -1)\n\t\t\t{\n\t\t\t\tSystem.out.print((char)i);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfileInputStream.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\n\t\n\tList l = new ArrayList();\n\t l.toArray();\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic int getCount() {\n\t\treturn arrayList.size();\r\n\t}", "private static void showList(StringBuffer aBuf,\n String[] aItems, String aStartTag, String aEndTag) {\n aBuf.append(aStartTag).append(NEW_LINE);\n for (int i=0; i<aItems.length; i++) {\n appendLI(aBuf, aItems[i]);\n }\n aBuf.append(aEndTag).append(NEW_LINE);\n}", "public void display()\n {\n System.out.println(�\\n The elements are�);\n for(int i=0; i<n; i++)\n System.out.println(� �+a[i]);\n }", "@Override\n\tpublic int getCount() {\n\t\treturn arrayList.size();\n\t}", "@Override\n\tpublic int getCount() {\n\t\treturn arrayList.size();\n\t}", "public void displayData(String[] str);", "public void list(){\n //loop through all inventory items\n for(int i=0; i<this.items.size(); i++){\n //print listing of each item\n System.out.printf(this.items.get(i).getListing()+\"\\n\");\n }\n }", "private void viewList() {\r\n PrintListMenuView listMenu = new PrintListMenuView();\r\n listMenu.displayMenu();\r\n }", "public static void printList(){\n ui.showToUser(ui.DIVIDER, \"Here are the tasks in your list:\");\n for (int i=0; i<Tasks.size(); ++i){\n Task task = Tasks.get(i);\n Integer taskNumber = i+1;\n ui.showToUser(taskNumber + \".\" + task.toString());\n }\n ui.showToUser(ui.DIVIDER);\n }", "public void list()\n {\n for(Personality objectHolder : pList)\n {\n String toPrint = objectHolder.getDetails();\n System.out.println(toPrint);\n }\n }", "private static void displayItems()\n {\n System.out.println(\"\\n\\tCurrent List of Products in the Store:\\n\");\n for(Sales s : store)\n System.out.println(s.toString());\n }", "private void printArrayList(ArrayList<String> printThis) {\n for(int i = 0; i < printThis.size(); i++) {\n System.out.print(printThis.get(i) + \"\\t\");\n }\n\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"\\nContents of SimpleArray:\\n\" + Arrays.toString(array);\n\t}", "@FXML\n\tprivate void onLoadLogClicked(){\n\n\t\tSystem.out.print(list);\n\t\tString showup = \"\";\n\t\tfor (int index = 0; index < list.size(); index++) {\n\t\t\tshowup += list.get(index)+\" & \"+dat.get(index);\n\t\t\tshowup += \"\\n\";\n\t\t}\n\t\ttextArea.setText(showup);\n\t}", "@Override\n public int getCount() {\n return arrlist.size();\n }", "@Override\n public int getCount() {\n return arrlist.size();\n }", "@Override\n public String toString() {\n return \"ArrayTaskList{\" +\n \"list=\" + Arrays.toString(list) +\n \", currentPos=\" + currentPos +\n \", listLength=\" + listLength +\n '}';\n }", "private void cargarLista(ArrayList<CarritoDTO> arrayList)\n {\n DefaultListModel modelo = new DefaultListModel();\n //Recorrer el contenido del ArrayList\n for(int i=0; i<arrayList.size(); i++) \n {\n CarritoDTO item =(CarritoDTO) arrayList.get(i);\n //Añadir cada elemento del ArrayList en el modelo de la lista\n modelo.add(i, item.toString());\n }\n //Asociar el modelo de lista al JList\n jList1.setModel(modelo);\n }", "private static void testAdd(ArrayList list, int[] content) {\n System.out.print(\"Adding to the list: \");\n for (int index = 0; index < content[index]; index++) {\n list.addToEnd(content);\n } // end for\n System.out.println();\n displayList(list);\n }", "public void show() {\r\n\t\tSystem.out.println(\"Id \\t Name \\t Address\");\r\n\t\t\r\n\t\tfor (int index = 0; index < emp.size(); index++) {\r\n\t\t\tSystem.out.println(emp.get(index).empId + \"\\t\" + emp.get(index).name +\"\\t\" + emp.get(index).adress);\r\n\t\t}\r\n\t}", "public String toString()\n {\n String s = \"\";\n for (int i=0; i<list.length; i++)\n s += i + \":\\t\" + list[i] + \"\\n\";\n return s;\n }", "static void print(List list)\r\n\t{\n\t\tfor(int i= 0; i < list.size(); i++){\r\n\t\t\tSystem.out.println(list.get(i));\r\n\t\t}\r\n\t}", "private void listExample()\n\t{\n\n\t\tArrayList <String> alist = new ArrayList<String>();//doesn't have to be string- can be Duck, or Mouse, or Apostrophe\n\t\talist.add(\"banana\"); //adds \"banana\" to the end of the list\n\t\talist.add(\"strawberry\");\n\t\talist.add(\"blueberry\");\n\t\talist.add(\"blackberry\");\n\t\t\n\t\tJOptionPane.showMessageDialog(null,alist);\n\t\t\n\t\talist.add(2, \"apple\"); //adds it in spot 2 (3rd position)\n\t\t\n\t\tJOptionPane.showMessageDialog(null,alist);\n\t\t\n\t\t\n\t\talist.remove(\"blueberry\"); \n\t\t/**\n\t\t * .remove returns what was in the spot that was just taken out--and shrinks down by one\n\t\t * .set also returns this value but it replaces the value with something else\n\t\t */\n\t\talist.remove(0); //removes 1st element\n\t\tJOptionPane.showMessageDialog(null,alist);\n\t\t\n\t\tfor (String str:alist)\n\t\t\tJOptionPane.showMessageDialog(null, str); //shows each individually\n\t\t\n\t\talist.set(1, \"coconut\"); //alist.set(index, element) --replaces\n\t\t\n\t\tint numberOfItems = alist.size();\n\t\talist.clear();\n\n\t\n\t}", "public ArrayList<String> a(ArrayList<View> arrayList) {\n ArrayList<String> arrayList2 = new ArrayList<>();\n int size = arrayList.size();\n for (int i = 0; i < size; i++) {\n View view = arrayList.get(i);\n arrayList2.add(p.e(view));\n p.a(view, (String) null);\n }\n return arrayList2;\n }", "private static void showList(List<String> list, int offsetX, int offsetY) {\r\n\t\tfor (int i = 1; i <= list.size(); i++) {\r\n\t\t\tGAME.drawTextScreen(offsetX, offsetY + (LINE_HEIGHT * i), list.get(i - 1));\r\n\t\t}\r\n\t}", "@Override\n public String toString(){\n String result = \"\";\n for(int i = 0; i < numItems; i++){\n result += arr[i] + \" \";\n }\n return result;\n }", "public String list() {\n final StringBuilder list = new StringBuilder(\"Here are the tasks in your list:\\n\\t\");\n records.forEach((el) -> list.append(\n String.format(\"%1$d. %2$s \\n\\t\",\n records.indexOf(el) + 1, el.toString())));\n return list.toString();\n }", "public static void listToPrint() {\r\n for (int i = 0; i < ListeElem.size(); i++) {\r\n ListeElem.get(i).toPrint();\r\n }\r\n\r\n }", "public void print_list() {\n \t \n \t//define current node as\n \t node<Type> current_node = new node<>();\n \t \n \t //now keep for loop and print the answer\n \t current_node = head;\n \t \n \t //print first element\n \t System.out.println(current_node.show_element());\n \t \n \t //now run for loop\n \t for (int i = 1 ; i <= len - 1 ; i ++) {\n \t\t \n \t\t //change current node\n \t\t current_node = current_node.show_next();\n \t\t \n \t\t //just print the answer\n \t\t System.out.println(current_node.show_element());\n \t }\n }", "@Override\r\n\tpublic void showList() {\n\t\tSystem.out.println(\"I am a MAC list\");\r\n\t}", "public void printAll(){\nfor(int i=0;i<size ;i++){\n System.out.println(\"a[%d]\"+data[i]); \n}\n System.out.println(\"size\"+size); \n}", "public String toString() {\n\t\treturn list.toString();\n\t}", "public String getDataAsString()\n\t{\n\t\tString listAsString = \"\";\n\t\t\n\t\tfor (int i = 0; i < list.length; i++)\n\t\t{\n\t\t\tlistAsString += list[i] + \" \";\n\t\t}\n\t\t\n\t\tlistAsString += \"\\nFront: \" + front + \"\\nRear: \" +\n\t\t\t\trear + \"\\nEntries: \" + counter;\n\t\t\n\t\treturn listAsString;\n\t}", "public List<String> viewExams() {\n List<String> list = new ArrayList<>();\n if (examList.size() == 0) {\n list.add(\"No Exams have been created yet!\");\n } else {\n for (int i = 0; i < examList.size(); i++) {\n String entry = (i + 1) + \".\" + examList.get(i).toString();\n list.add(entry);\n }\n }\n return list;\n }", "protected void showList(String[] convertLis) {\n sL.register(null, \"INFO\", \"Successful - showList - start\");\n for (int j = convertLis.length - 1; j >= 0; j-- ) {\n listConverting.getListModel().addElement(convertLis[j]);\n }\n sL.register(null, \"INFO\", \"Successful - showList - finished\");\n }", "@Override\n public String toString() {\n return \"SimpleArrayList{\"\n + \"values=\" + Arrays.toString(values)\n + '}';\n }", "public void displayData();", "private static void showList(ArrayList<? extends Machine> list) {\n System.out.println(\"In showlist method\");\n for(Machine machine: list) {\n System.out.println(machine);\n }\n\n }", "void showFacts(List<Fact> facts);", "public String display(){\n StringBuilder str = new StringBuilder();\n\n for(int i = 0; i < 3; ++i){\n if( Array[i] != null ) {\n str.append('\\n' + Names[i] + '\\n');\n str.append(Array[i].display());\n }\n }\n return str.toString();\n }", "public void show() {\n numberList.show();\n }", "@Override\n public void showListOfAudioFiles(ArrayList<AudioModel> audioModelArrayList) {\n }", "public static void printContactList()\n {\n if(myList.size() < 1)\n System.out.println(\"~empty list~\");\n else\n {\n System.out.println(\"Current Items\");\n System.out.println(\"-------------\");\n for(int i = 0; i < myList.size(); i++)\n {\n System.out.printf(i+\")\");\n Item itemPrint = myList.get(i);\n itemPrint.printItem(itemPrint.getFirstName(), itemPrint.getLastName(), itemPrint.getPhoneNumber(), itemPrint.getEmail());\n }\n }\n }", "public S<T> list(String[] data){\n\t\tif(t instanceof ListView){\n\t\t\t\n\t\t\t((ListView) t).setAdapter(new ArrayAdapter<String>(activity,\n\t\t android.R.layout.simple_list_item_1, android.R.id.text1, data));\n\t\t}\n\t\treturn this;\n\t}" ]
[ "0.80565214", "0.72794485", "0.6774054", "0.664965", "0.6575048", "0.6529514", "0.6470372", "0.6445237", "0.6406743", "0.6352501", "0.6270823", "0.6262646", "0.62527835", "0.62398005", "0.6212774", "0.6204973", "0.61948156", "0.6185194", "0.61632067", "0.6142287", "0.61299276", "0.60963213", "0.6092055", "0.6062058", "0.60579544", "0.60528755", "0.60458803", "0.6035733", "0.60321635", "0.6030074", "0.6027708", "0.60263306", "0.6020302", "0.60167605", "0.59994596", "0.5993302", "0.5978091", "0.5971012", "0.59558547", "0.59519476", "0.5945913", "0.5941557", "0.5939915", "0.5939503", "0.59265834", "0.59224606", "0.591512", "0.589726", "0.58956605", "0.5857208", "0.58420384", "0.5833531", "0.58315074", "0.5831038", "0.5827874", "0.57976305", "0.5795035", "0.57873124", "0.57856107", "0.5780845", "0.5780845", "0.5780735", "0.57782537", "0.5774336", "0.57704633", "0.5769175", "0.5764547", "0.576031", "0.57452595", "0.5744618", "0.57295007", "0.57295007", "0.57272565", "0.57147944", "0.57121956", "0.5707798", "0.5705244", "0.57008934", "0.57007605", "0.5697824", "0.5696635", "0.569015", "0.5689777", "0.5685514", "0.5677598", "0.56716293", "0.5671268", "0.5671191", "0.56689197", "0.56627256", "0.56507033", "0.56483006", "0.56433296", "0.56386596", "0.56181043", "0.561612", "0.56122553", "0.56062937", "0.5604426", "0.5598621" ]
0.561001
97
method accumulate the content of the array list with new array list content.
public static void accumulateResults(double[] avgPArr, ArrayList<Double> oneRowResultArr) { int index = 0; for (double res : oneRowResultArr) avgPArr[index++] += res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n\tprotected void grow(){\n\t\t// makes new arraylist\n\t\tT[] temp = (T[]) new Object[data.length *2];\n\t\tfor(int i = 0; i < data.length; i++ ){\n\t\t\ttemp[i] = data[i];\n\t\t}\n\t\tdata = temp;\n\t}", "private void grow() {\n OmaLista<OmaPari<K, V>>[] newList = new OmaLista[this.values.length * 2];\n\n for (int i = 0; i < this.values.length; i++) {\n copy(newList, i);\n }\n\n this.values = newList;\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void growArray() {\n\t\tint tempSize = size * 2;\n\t\tE[] tempList = (E[]) new Object[tempSize];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\ttempList[i] = list[i];\n\t\t}\n\t\tlist = tempList;\n\t}", "private static void testAdd(ArrayList list, int[] content) {\n System.out.print(\"Adding to the list: \");\n for (int index = 0; index < content[index]; index++) {\n list.addToEnd(content);\n } // end for\n System.out.println();\n displayList(list);\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void growArray() {\n\t\tObject[] newList = new Object[size * 2];\n\t\tfor (int i = 0; i < size(); i++) {\n\t\t\tnewList[i] = get(i);\n\t\t}\n\t\tlist = (E[]) newList;\n\t\tsize *= 2;\n\t}", "public void addAll(ArrayIntList other) {\n\t\t\tensureCapacity(size + other.size);\n\t\t\tfor(int i = 0; i < other.size; i++) {\n\t\t\t\tadd(other.elementData[i]);\n\t\t\t}\n\t\t}", "public void newArray() {\n\t\t\n\t\tE[] newArray= (E[]) new Object[list.length * 2]; //Holds the old elements from the list array while new list array is being made\n\t\t\n\t\tfor(int i = 0; i < list.length; i++) {\n\t\t\t\n\t\t\tnewArray[i] = list[i]; //Copy the old list array into the newArray\n\t\t}\n\t\t\n\t\tlist = newArray; //Point the old array at the newArray starting memory location\n\t\t\n\t}", "private void grow() {\r\n\t\t\r\n\t\t Student [] newList = new Student[sizeOfList(list) + 4];\r\n\t int size = sizeOfList(list);\r\n\t \r\n\t for(int i = 0; i < size; i++) {\r\n\t \t newList[i] = list[i];\r\n\t }\r\n\t list = newList;\r\n\t}", "public static void processArrayList(){\n ArrayList<String> newArray = new ArrayList<String>();\n newArray.addAll(groceryList.getGroceryList()); //Method 1: adds all items from the groceryList into the newArray\n\n ArrayList<String> newArray2 = new ArrayList<String>(groceryList.getGroceryList()); //Method 2: same as method 1 but the copying happens at the time of initialising the newArray2\n\n //if for some reason you want to save all the contents of an arrayList into an array\n String[] myArray = new String[groceryList.getGroceryList().size()]; //create the array to be equal to the size of the arraylist\n myArray = groceryList.getGroceryList().toArray(myArray); //convert an arraylist of strings (the outcome of getGroceryList()), and save it into our array\n }", "@Override\r\n\tpublic void fill(ArrayList<T> list) {\r\n\t\t//Copy of list\r\n\t\tArrayList<T> copyData = list;\r\n\t\t// Add copy of list to the Stack\r\n\t\tfor (T e: copyData) {\r\n\t\t\tdata.add(e);\r\n\t\t}\r\n\t}", "protected void grow()\r\n\t{\t\r\n\t\tif(debug)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Debug - Starting grow\");\r\n\t\t}\r\n\t\t\r\n\t\tint[] temp = new int[count*2];\r\n\t\t\r\n\t\tfor(int index = 0; index < count; index++)\r\n\t\t{\r\n\t\t\ttemp[index] = numArray[index];\r\n\t\t\t\r\n\t\t\tif(debug)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Debug - temp[index] = \" + temp[index]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tnumArray = temp;\r\n\t\t\r\n\t\tif(debug)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Debug - Ending grow\");\r\n\t\t}\r\n\t}", "private void grow()\r\n\t{\r\n\t\tint [] temp = new int[count * 2]; // new array to hold the data\r\n\r\n\t\t// copy old data in new array\r\n\t\tfor (int i = 0; i < count; i++)\r\n\t\t\ttemp[i] = array[i];\r\n\r\n\t\tarray = temp; // update the new array\r\n\t}", "static final void addAll(ContainerValue cont, List<Value> result) {\r\n for (int i = 0; i < cont.getElementSize(); i++) {\r\n result.add(cont.getElement(i));\r\n }\r\n }", "@Override\n\t\t\tpublic void apply(Document arg0) {\n\t\t\t\tarray.add(arg0);\n\t\t\t}", "@Override\n\t\t\tpublic void apply(Document arg0) {\n\t\t\t\tarray.add(arg0);\n\t\t\t}", "@Override\n\t\t\tpublic void apply(Document arg0) {\n\t\t\t\tarray.add(arg0);\n\t\t\t}", "@Override\n\t\t\tpublic void apply(Document arg0) {\n\t\t\t\tarray.add(arg0);\n\t\t\t}", "@Override\n\t\t\tpublic void apply(Document arg0) {\n\t\t\t\tarray.add(arg0);\n\t\t\t}", "@Override\n\t\t\tpublic void apply(Document arg0) {\n\t\t\t\tarray.add(arg0);\n\t\t\t}", "public void extendArray() {\n int index = size();\n Object[] temp = new Object[index + 1];\n for (int i=0; i < index; i++) {\n temp[i] = AL[i];\n }\n AL = temp;\n }", "protected ArrayList<ArrayList<String>> method1() {\n\n ArrayList<ArrayList<String>> arr = new ArrayList<ArrayList<String>>();\n ArrayList<String> n_clone = new ArrayList<>(Arrays.asList(input));\n\n // Create equal amount of containers as requested.\n for (int i=0;i<num;i++) {\n arr.add(new ArrayList<String>());\n }\n\n // Iterate through given Array while putting items\n // into the containers you just created.\n Iterator itor = n_clone.iterator();\n int count = 0;\n while (itor.hasNext()) {\n if (count < this.num) {\n arr.get(count).add((String)itor.next());\n count++;\n } else {\n count = 0;\n }\n }\n\n System.out.println(\"Paying no attention to order, the Array - \");\n printArrayList(new ArrayList<>(Arrays.asList(input)));\n System.out.println(\"divided into \" + this.num + \" sections is: \\n\");\n printMatrix(arr);\n\n return arr;\n }", "private void grow() {\n int oldCapacity = this.values.length;\n int newCapacity = oldCapacity + (oldCapacity >> 1);\n Object[] newValues = new Object[newCapacity];\n System.arraycopy(this.values, 0, newValues, 0, oldCapacity);\n this.values = newValues;\n }", "private void grow() {\n int growSize = size + (size<<1);\n array = Arrays.copyOf(array, growSize);\n }", "public ListArrayBasedPlus(int size)\n {\n items = new Object[size];\n numItems = 0;\n }", "@Override\n\t\t\tpublic void apply(Document arg0) {\n\t\t\t\tarray_bp.add(arg0);\n\t\t\t}", "@Override\n\t\t\tpublic void apply(Document arg0) {\n\t\t\t\tarray_bp.add(arg0);\n\t\t\t}", "@Override\n\t\t\tpublic void apply(Document arg0) {\n\t\t\t\tarray_bp.add(arg0);\n\t\t\t}", "private static List<Integer> addOne(List<Integer> input) {\n\n\t\tList<Integer> copy = new ArrayList<>();\n\t\tcopy.addAll(input);\n\n\t\tint size = copy.size();\n\t\tcopy.set(size-1, input.get(size-1)+1);//last element of input is updated/replaced by (original value + 1)\n\n\t\tfor(int i=size-1; i>0 && copy.get(i)==10; i--) {\n\t\t\tcopy.set(i, 0);\n\t\t\tcopy.set(i-1, copy.get(i-1)+1);\n\t\t}\n\n\t\tif(copy.get(0) == 10) {\n\t\t\tcopy.set(0, 0);\n\t\t\tcopy.add(0, 1);//add 1 at index0 ,shift all elements after to right\n\t\t}\n\n\t\treturn copy;//this NOT modifies the original input\n\t}", "public void add( Comparable newVal ) {\n \t//if _data is full, expand the array\n \tif (_size == _data.length){\n\t \texpand();\n \t}\n \t\n\tset(_lastPos + 1, newVal);\n \t//increases _lastPos and _size\n \t_lastPos++;\n \t_size++;\n }", "private synchronized void addResultToMultiList() {\n\t addObjectToMultiList(resultArrayList);\r\n\t }", "private void grow() { \r\n\t\tint capacity = accounts.length;\r\n\t\tAccount [] tempArray = new Account[capacity += INITIAL_SIZE]; //tempArray with new capacity\r\n\t\tfor ( int i = 0; i < accounts.length; i++ ) { // Transfer all accounts into new Accounts\r\n\t\t\ttempArray[i] = accounts[i];\r\n\t\t}\t\t\r\n\t\taccounts = tempArray;\t\r\n\t\treturn;\r\n\t}", "private void grow()\n\t{\n\t\tint temp[] = new int[count * 2];\n\t\tfor(int index = 0; index < count; index = index + 1)\n\t\t\ttemp[index] = array1[index];\n\t\tarray1 = temp;\n\t}", "private void grow() {\n T[] arr_temp = (T[]) new Object[arr.length*2];\n for (int i=0; i<arr.length; i++){\n arr_temp[i] = arr[i];\n }\n arr = arr_temp;\n }", "private void addSizeArray() {\n int doubleSize = this.container.length * 2;\n Object[] newArray = new Object[doubleSize];\n System.arraycopy(this.container, 0, newArray, 0, this.container.length);\n this.container = new Object[doubleSize];\n System.arraycopy(newArray, 0, this.container, 0, doubleSize);\n }", "public static void main(String[] args) {\n\t\tArrayList ar=new ArrayList();\n\t\tar.add(100);\n\t\tar.add(200);\n\t\t\n\t\t ArrayList<Integer> arr=new ArrayList<Integer>();\n\t\t arr.add(10);\n\t\t arr.add(200);\n\t\t arr.add(400);\n\t\t \n\t\t \n\t\t System.out.println(arr.size());//length of arraylist\n\t\t \n\t\t //iteration\n\t\t for(int i=0;i<arr.size();i++) {\n\t\t\t System.out.println(i);\n\t\t }\n\t\t \n\t\t for(Integer e:arr) {\n\t\t\t System.out.println(e);\n\t\t }\n\t\t \n\t\t arr.stream().forEach(e->System.out.println(e));\n\t\t \n\t\t Iterator<Integer>it=arr.iterator();\n\t\t while(it.hasNext()) {\n\t\t\t System.out.println(it.next());\n\t\t }\n\t\tSystem.out.println(\"******************************************\");\n\n\t\t//create one arraylist with another\n\t\t\n\t\tArrayList<Integer> list= new ArrayList<Integer>(Arrays.asList(10,20,30,40,50));\n\t\t\n\t\t//arraylist methods\n\t\t//1.Add\n\t\tlist.add(90);\n\t\tSystem.out.println(list);\n\t\t\n\t\t//2.AddAll\n\t\tArrayList<String> ar1=new ArrayList<String>(Arrays.asList(\"Ruby\",\"Python\",\"Java\",\"C#\"));\n\t\t\n\t\tArrayList<String> ar2=new ArrayList<String>(Arrays.asList(\"Testing\",\"Devops\"));\n\n\t\tar1.addAll(ar2);\n\t\tar2.addAll(ar1);\n\t\tSystem.out.println(ar1);\n\t\tSystem.out.println(ar2);\n\t\t\n\t\t//3.clear\n\t\t//ar1.clear();\n\t\tSystem.out.println(ar1);\n\t\t\n\t\t//4.clone\n\t\tArrayList<String> clonelist=( ArrayList<String>)ar2.clone();\n\t\tSystem.out.println(clonelist);\n\n\t\t//5.contains\n\t\tSystem.out.println(ar2.contains(\"python\"));\n\t\t\n\t\t//6.index of\n\t\tSystem.out.println(ar1);\n\t\tSystem.out.println(ar1.indexOf(\"java\")>0);\n\t\t\n\t\t//7.last index of-returns inetegre\n\t\t\n\t\tArrayList<String> list1=new ArrayList<String>(Arrays.asList(\"Anu\",\"Naveen\",\"Tom\"));\n\t\tint i=list1.lastIndexOf(\"test\");\n\t\tSystem.out.println(i);\n\t\t\n\t\t//8.remove\n\t\tlist1.remove(1);\n\t\tlist1.remove(\"Anu\");\n\t\t\n\t\t//9.removeif\n\t\tArrayList<Integer> numbers=new ArrayList<Integer>(Arrays.asList(1,2,3,4,5,6,7,8,9,10));\n\t\tnumbers.removeIf(num->num%2==0);//printing all odd numbers /elimnating even numbers\n\t\tSystem.out.println(numbers);\n\t\t\n\t\t//10.retain All\n\t\tArrayList<String> al=new ArrayList<String>(Arrays.asList(\"ANu\",\"Robin\",\"Sky\",\"Red\"));\n\t\tal.retainAll(Collections.singleton(\"ANu\"));\n\t\tSystem.out.println(al);\n\t\t\n\t\t//11.How to create a substring from arraylist\n\t\tArrayList<Integer> no=new ArrayList<Integer>(Arrays.asList(1,2,3,4,5,6,7,8,9,12,13,14));\n\t\t\n\t\tArrayList<Integer> substring=new ArrayList<Integer>(no.subList(3, 9));\n\t\tSystem.out.println(substring);\n\t\t\n\t\t//How to convert an arraylist to array\n\t\tObject arr1[]=no.toArray();\n\t\tSystem.out.println(Arrays.toString(arr1));\n\t\t\n\t\tfor(Object e:arr1) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\t/*How to synchronise arraylist\n\t\t * 1.collections.synchronisedlist()->returns a synchronised list\n\t\t * 2.CopyOnWriteArraylist-synchronised variant of arraylist\n\t\t*/\n\t\t\n\t\tList<String> namelist=(List<String>) Collections.synchronizedCollection(new ArrayList<String>());\n\t\t\n\t\t\n\t\t//How to remove duplicate elements using linkedhashset and streams\n\t\t\n\t\t//how to compare 2 arraylist\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}", "public ArrayBackedList(IList list) {\n while (list.size() > stringArray.length) {\n reallocArray();\n }\n for (int i = 0; i < list.size(); i++) {\n stringArray[i] = list.get(i);\n }\n }", "private static List<Integer> addOnePlus(List<Integer> input) {\n\n\t\tint size = input.size();\n\t\tinput.set(size-1, input.get(size-1)+1);//last element of input is updated/replaced by (original value + 1)\n\n\t\tfor(int i=size-1; i>0 && input.get(i)==10; i--) {\n\t\t\tinput.set(i, 0);\n\t\t\tinput.set(i-1, input.get(i-1)+1);\n\t\t}\n\n\t\tif(input.get(0) == 10) {\n\t\t\tinput.set(0, 0);\n\t\t\tinput.add(0, 1);//add 1 at index0 ,shift all elements after to right\n\t\t}\n\n\t\treturn input;//this modifies the original input\n\t}", "private void increaseSize() {\n data = Arrays.copyOf(data, size * 3 / 2);\n }", "public void calculateArray() {\n\n for (int i = 0; i < array.length; i++) {\n sum += array[i];\n }\n }", "public void addAll(List<ContentValues> result) {\n for (ContentValues c : result) {\n add(c);\n }\n }", "private void arraySum(MyArrayList myArrayList, Results results) {\r\n int old_sum = myArrayList.sum();\r\n myArrayList.insertSorted(511);\r\n int new_sum = myArrayList.sum();\r\n if(old_sum < new_sum) {\r\n results.storeNewResult(\"ArraySum test case: PASSED\");\r\n }\r\n else { \r\n results.storeNewResult(\"ArraySum test case: FAILED\");\r\n }\r\n }", "@Override\n public void combineCons(ArrayList<Note> list) {\n }", "private void grow() { \n\n\t\tAccount[] temp = accounts;\n\t\taccounts = new Account[accounts.length+5];\n\t\t\n\t\tfor (int i = 0; i < temp.length; i++) {\n\t\t\taccounts[i] = temp[i];\n\t\t}\n\t\t\n\t}", "ArrayList<Unit> extend(){\n return list;\n }", "a(ArrayList arrayList) {\n super(1);\n this.$result = arrayList;\n }", "private void arrayIncreaaseSize(MyArrayList myArrayList, Results results) {\r\n int old_size = myArrayList.length();\r\n int value;\r\n Random rand = new Random();\r\n \r\n for(int i=0; i<50; i++) {\r\n value = rand.nextInt(10000);\r\n if(value < 0) {\r\n value = value * -1;\r\n }\r\n myArrayList.insertSorted(value);\r\n }\r\n if(myArrayList.length() == old_size + 25) {\r\n results.storeNewResult(\"ArrayIncrease test case: PASSED\");\r\n }\r\n else {\r\n results.storeNewResult(\"ArrayIncrease test case: FAILED\");\r\n }\r\n }", "public int add(T newData) {\n\t\tint newLength = 1;\n\t\t// If there is more data to add then available space in the array\n\t\tif(newLength > (array.length - length)) {\n\t\t\t// Double the array size\n\t\t\texpandArray(array.length);\n\t\t}\n\n\t\t// If the new data will wrapping around, add the new data and wrap around to fit\n\t\tif((index + length) < array.length && newLength > (array.length - (index + length))) {\n\t\t\t// The number of elements available up to the end of the array before needing to wrap around\n\t\t\tint tailLength = array.length - (index + length);\n\t\t\t// Copy data up to the end of the array\n\t\t\tif(tailLength > 0) {\n\t\t\t\tarray[index+length] = newData;\n\t\t\t}\n\t\t\t// Copy rest of data 'wrapped around' to the beginning of the array\n\t\t\telse {\n\t\t\t\tarray[0] = newData;\n\t\t\t}\n\t\t}\n\t\t// Else if the data fits without wrapping around, add the new data\n\t\telse {\n\t\t\tarray[(index + length) % array.length] = newData;\n\t\t}\n\t\t// Adjust the length\n\t\tlength = length + newLength;\n\t\t// Return the number of elements successfully added\n\t\treturn newLength;\n\t}", "public void revolver() {\n this.lista = Lista.escojerAleatorio(this, this.size()).lista;\n }", "public void compact()\n\t{\n\t\tif (addIndex == size())\n\t\t\treturn;\n\t\t\n\t\tObject narray = Array.newInstance( array.getClass().getComponentType(), addIndex );\n\t\tSystem.arraycopy( array, 0, narray, 0, addIndex );\n\t\tarray = narray;\n\t}", "public ArrayList<T> returnAsArray(ArrayList<T> arr) {\n\t\tif (arr == null) {\n\t\t\tarr = new ArrayList<T>();\n\t\t}\n\t\tif (this == null) {\n\t\t\treturn arr;\n\t\t}\n\t\tif (this.valCount == 0) {\n\t\t\treturn arr;\n\t\t}\n\t\tfor (int i = 0; i < childCount; ++i) {\n\t\t\tthis.children[i].returnAsArray(arr);\n\t\t\tif (i < childCount - 1) {\n\t\t\t\tarr.add(values[i]);\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}", "void arrayListToArray() {\n List<String> coolStringList = Arrays.asList( \"Java\", \"Scala\", \"Groovy\" ); //Declare &initialize o\n //coolStringList.add( \"Syed\" ); // Exception in thread \"main\" java.lang.UnsupportedOperationException\n coolStringList.set( 0, \"Syed\" );// works well\n System.out.println( coolStringList );\n/*\n /) Its not as fast as Arrays.asList() but more flexible.\n\n 2) This method actually copies the content of the underlying array into ArrayList provided.\n\n\n 3) Since you are creating copy of original array, you can add, modify and remove any element without affecting original one.*/\n\n List<String> assetList = new ArrayList();\n String[] asset = {\"equity\", \"stocks\", \"gold\", \"foriegn exchange\", \"fixed income\", \"futures\", \"options\"};\n Collections.addAll( assetList, asset );\n System.out.println( assetList );\n assetList.add( \"Mohammed\" );\n System.out.println( assetList );\n\n List newAssetList = new ArrayList();\n newAssetList.addAll( Arrays.asList( asset ) );\n System.out.println( newAssetList );\n newAssetList.add( \"YNS\" );\n System.out.println( newAssetList );\n /*String [] currency = {\"SGD\", \"USD\", \"INR\", \"GBP\", \"AUD\", \"SGD\"};\n System.out.println(\"Size of array: \" + currency.length);\n List<String> currencyList = CollectionUtils.arrayToList(currency);\n*/\n }", "@SuppressWarnings(\"unchecked\")\n \t@Override\n \tpublic PVector<E> plusAll(Collection<? extends E> l) {\n \t\tint n = l.size();\n \t\tif (n == 0) {\n \t\t\treturn this;\n \t\t} else if (count == 0 && l instanceof ArrayPVector) {\n \t\t\treturn (ArrayPVector<E>) l;\n \t\t} else if (!sublist && value != null\n \t\t\t\t&& offset + count + n <= value.length) {\n \t\t\t// l fits into the remaining space\n \t\t\tint i = count;\n \t\t\tfor (E e : l) {\n \t\t\t\tif (e == null) {\n \t\t\t\t\tthrow new IllegalArgumentException(\n \t\t\t\t\t\t\t\"Can't add null to an ArrayPVector\");\n \t\t\t\t}\n \t\t\t\tvalue[i++] = e;\n \t\t\t}\n \t\t\tsublist = true;\n \t\t\treturn new ArrayPVector<E>(value, offset, i);\n \t\t} else {\n \t\t\t// l longer than remaining space\n \t\t\tE[] val = (E[]) new Object[count + n];\n \t\t\tif (value != null) {\n \t\t\t\tSystem.arraycopy(value, offset, val, 0, count);\n \t\t\t}\n \t\t\tint i = count;\n \t\t\tfor (E e : l) {\n \t\t\t\tif (e == null) {\n \t\t\t\t\tthrow new IllegalArgumentException(\n \t\t\t\t\t\t\t\"Can't add null to an ArrayPVector\");\n \t\t\t\t}\n \t\t\t\tval[i++] = e;\n \t\t\t}\n \t\t\treturn new ArrayPVector<E>(val, 0, i);\n \t\t}\n \t}", "private void doubleArray()\n\t{\n\t\tT[] oldList = list;\n\t\tint oldSize = oldList.length;\n\t\t\n\t\tlist = (T[]) new Object[2 * oldSize];\n\t\t\n\t\t// copy entries from old array to new, bigger array\n\t\tfor (int index = 0; index < oldSize; index++)\n\t\t\tlist[index] = oldList[index];\n\t}", "public void add(E a)\n {\n if (size == data.length) { // if the list is at capacity...\n // create a new, larger array\n E[] newData = (E[])(new Object[2*data.length]);\n \n // copy over all of the old elements\n for (int i = 0; i < size; i++)\n newData[i] = data[i];\n \n // redirect the old data reference\n data = newData;\n }\n\n // insert the new element\n data[size] = a;\n size++;\n }", "public void addAll(T[] arr, int from, int length);", "private <T> void populateArrayFromList(T[] arr, ArrayList<T> arrayList) {\n\t\tSystem.out.println(\"Array size \" + arr.length);\n\t\tSystem.out.println(\"ArrayList size \" + arrayList.size());\n\t\tfor (int i = 0; i < arrayList.size(); i++) {\n\t\t\tsavedListModel.addElement(arrayList.get(i).toString());\n\t\t\tarr[i] = arrayList.get(i);\n\t\t}\n\t}", "@Override\n\tpublic void fill(ArrayList<T> list) throws StackOverflowException {\n\t\t//Iterate through the ArrayList. Copy each item, and add the copy to the Stack\n\t\tfor(int i = 0; i < list.size(); i++) {\n\t\t\tT newItem = list.get(i);\n\t\t\tthis.push(newItem);\n\t\t}\n\t\t\n\t}", "private void grow() {\n capacity *= 2;\n Object[] temp = new Object[capacity];\n for (int i = 0; i < values.length; i++) temp[i] = values[i];\n values = temp;\n }", "public FplList append(FplList list) {\n\t\tif (list == null || list.isEmpty()) {\n\t\t\treturn this;\n\t\t}\n\t\tif (isEmpty()) {\n\t\t\treturn list;\n\t\t}\n\t\tint totalSize = size() + list.size();\n\t\tint totalBuckets = shape.length + list.shape.length;\n\n\t\tFplValue[] lastBucket = shape[shape.length - 1];\n\t\tFplValue[] listFirstBucket = list.shape[0];\n\n\t\tif (lastBucket.length + listFirstBucket.length <= BASE_SIZE) {\n\t\t\tif (needsReshaping(totalBuckets - 1, totalSize)) {\n\t\t\t\treturn new FplList(mergedShape(shape, list.shape, totalSize));\n\t\t\t} else {\n\t\t\t\tFplValue[][] buckets = copyOf(shape, shape.length + list.shape.length - 1);\n\t\t\t\tFplValue[] bucket = copyOf(lastBucket, lastBucket.length + listFirstBucket.length);\n\t\t\t\tarraycopy(listFirstBucket, 0, bucket, lastBucket.length, listFirstBucket.length);\n\t\t\t\tbuckets[shape.length - 1] = bucket;\n\t\t\t\tarraycopy(list.shape, 1, buckets, shape.length, list.shape.length - 1);\n\t\t\t\treturn new FplList(buckets);\n\t\t\t}\n\t\t} else {\n\t\t\tif (needsReshaping(totalBuckets, totalSize)) {\n\t\t\t\treturn new FplList(mergedShape(shape, list.shape, totalSize));\n\t\t\t} else {\n\t\t\t\tFplValue[][] buckets = copyOf(shape, shape.length + list.shape.length);\n\t\t\t\tarraycopy(list.shape, 0, buckets, shape.length, list.shape.length);\n\t\t\t\treturn new FplList(buckets);\n\t\t\t}\n\t\t}\n\t}", "protected ArrayList<ArrayList<String>> method2() {\n ArrayList<ArrayList<String>> arr = new ArrayList<ArrayList<String>>();\n ArrayList<String> n_clone = new ArrayList<>(Arrays.asList(input));\n\n int whole = Math.floorDiv(input.length,this.num);\n int rem = input.length - whole*this.num; // 'rem' can be interpreted as number of exceptions\n // where each exception gets an extra item\n\n // Create equal number of containers as requested\n for (int i=0;i<this.num;i++) {\n arr.add(new ArrayList<String>());\n }\n\n // Iterate through given Array while putting items into containers\n Iterator itor = n_clone.iterator();\n int count = 0;\n while (itor.hasNext()) {\n for (int i = 0; i < whole; i++) {\n if (itor.hasNext()) {\n arr.get(count).add((String)itor.next());\n } else {\n break;\n }\n }\n if (rem != 0 && itor.hasNext()) {\n arr.get(count).add((String)itor.next());\n rem--;\n }\n count++;\n }\n\n printMatrix(arr);\n\n return arr;\n }", "public final void add() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tpush(secondTopMostValue + topMostValue);\n\t\t}\n\t}", "@Override\n public void refreshList(ArrayList<String> newList){\n }", "private ArrayList<Node<T>> addAll(Node<T> current, ArrayList<Node<T>> list) {\n\t\tlist.add(current);\n\t\tif (current.getLeft() != null) {\n\t\t\tlist = addAll(current.getLeft(), list);\n\t\t}\n\t\t\n\t\tif (current.getRight() != null) {\n\t\t\tlist = addAll(current.getRight(), list);\n\t\t}\n\t\t\n\t\treturn list;\n\t}", "@Override\r\n\tpublic void fill(ArrayList<T> list) throws StackOverflowException{\r\n\t\tfor (T e : list) {\r\n\t\t\tpush(e);\r\n\t\t}\r\n\t\t\r\n\t}", "private static final <T> List<T> append(List<T> list, T newElement) {\n List<T> newList = Lists.newArrayListWithCapacity(list.size() + 1);\n newList.addAll(list);\n newList.add(newElement);\n return newList;\n }", "testarray() {\r\n \tarrayList = new Arraylist();\t\r\n\t}", "private void grow(){\n\t\tberries.replaceAll((p, v) -> v + 1);\n\t\tapples.replaceAll((p, v) -> v + 1);\n\t}", "@Override\n public void add(T t) {\n checkIfArrayFull();\n\n arrayList[elementsInArray] = t;\n elementsInArray++;\n }", "void append(E[] elements);", "public ImmutableIntList appendAll(Iterable<Integer> list) {\n if (list instanceof Collection && ((Collection) list).isEmpty()) {\n return this;\n }\n return ImmutableIntList.copyOf(Iterables.concat(this, list));\n }", "public void refershData(ArrayList<SquareLiveModel> contents) {\n\t\tlistData = contents;\n\t\tnotifyDataSetChanged();\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic void add(T item){\n\t\t\n\n\t\tif(currentsize == data.length-1){\n\t\t\tgrow();\n\t\t}\n\n\t\t\n\t\tdata[currentsize] = item;\n\t\tcurrentsize++;\n\n\n\t}", "public void appendInPlace (List l) {\n\t\tif (this.isEmpty()) {\n\t\t\tmyHead = l.myHead;\n\t\t\tmySize = l.mySize;\n\t\t\tmyTail = l.myTail;\n\t\t}\n\t\telse if (l.isEmpty()) {\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tmyTail.myNext = l.myHead;\n\t\t\tmyTail = l.myTail;\n\t\t\tmySize += l.mySize;\n\t\t}\n\t}", "private void expand() {\n\n intElements = copyIntArray(intElements, intElements.length * 2);\n doubleElements = copyDoubleArray(doubleElements, doubleElements.length * 2);\n stringElements = copyStringArray(stringElements, stringElements.length * 2);\n typeOfElements = copyIntArray(typeOfElements, typeOfElements.length * 2);\n }", "public IList<T> append(IList<T> l) {\n return l;\n }", "@Override\r\n public NumericObjectArrayList makeDeepCopy() {\r\n NumericObjectArrayList list = new NumericObjectArrayList();\r\n for (int i = 0; i < this.getCount(); i++) {\r\n try {\r\n list.insert(i, this.getValueAt(i));\r\n } catch (IndexRangeException ex) {\r\n //Shouldn't happen\r\n }\r\n }\r\n return list;\r\n }", "public void addAll(final int[] newArray) {\n for (int eachVal: newArray) {\n add(eachVal);\n }\n }", "public double sum() {\n double sum = x;\n Lista iter = new Lista(this);\n while (iter.next != null) {\n sum += iter.next.x;\n iter = iter.next;\n }\n return sum;\n }", "@Override\n\tpublic boolean add(E item) {\n\t\tif (this.numberOfElements == this.size) {\n\t\t\tE[] newArrayList = (E[]) new Object[this.size * 2];\n\t\t\tint i = 0;\n\t\t\twhile (i < this.size) {\n\t\t\t\tnewArrayList[i] = this.arrayList[i];\n\t\t\t\ti += 1;\n\t\t\t}\n\t\t\tthis.arrayList = newArrayList;\n\t\t\tthis.size = this.size * 2;\n\t\t}\n\t\tthis.arrayList[this.numberOfElements] = item;\n\t\tthis.numberOfElements += 1;\n\t\treturn true;\n\t}", "private void resize() {\n int listSize = numItemInList();\n //debug\n //System.out.println(\"resize: \" + nextindex + \"/\" + list.length + \" items:\" + listSize);\n if (listSize <= list.length / 2) {\n for (int i = 0; i < listSize; i++) {\n list[i] = list[startIndex + i];\n }\n } else {\n Object[] newList = new Object[this.list.length * 2];\n\n// System.arraycopy(this.list, startIndex, newList, 0, this.list.length-startIndex);\n for (int i = 0; i < listSize; i++) {\n newList[i] = list[i + startIndex];\n }\n this.list = newList;\n //debug\n //System.out.println(\"After resize:\" + nextindex + \" / \" + list.length + \" items:\" + numItemInList());\n }\n nextindex = nextindex - startIndex;\n startIndex = 0;\n }", "@Override\n public BiConsumer<List<Integer>, Employee> accumulator() {\n return (resultList, employee) -> {\n if (resultList.isEmpty()) resultList.add(employee.getSalary());\n else {\n Integer currentTotal = resultList.get(0);\n currentTotal += employee.getSalary();\n resultList.set(0, currentTotal);\n }\n };\n }", "void add(int value) {\n size++;\n\n int[] newItems = new int[size];\n\n System.arraycopy(items, 0, newItems, 0, items.length);\n\n newItems[newItems.length - 1] = value;\n\n items = newItems;\n }", "private int[] appendToArray(int[] toBeAppendedTo, int x){\r\n int[] res = new int[toBeAppendedTo.length + 1];\r\n for(int i = 0; i < toBeAppendedTo.length; i++){\r\n res[i] = toBeAppendedTo[i];\r\n }\r\n res[toBeAppendedTo.length] = x;\r\n return res;\r\n }", "private void update_auxlist(ArrayList<Line> auxlist, Line workingSet) {\n\t\tLine new_working_set = new Line(workingSet);\n\n\t\t// Add the working set copy to the set of maximal lines\n\t\tauxlist.add(new_working_set);\n\t}", "private void update() {\n\t\twhile(words.size()<length) {\n\t\t\twords.add(new Word());\n\t\t}\n\t}", "private void grow() {\n Book[] temp = new Book[books.length + GROWTH_SIZE];\n for (int i = 0; i < books.length; i ++){\n temp[i] = books[i];\n }\n books = temp;\n }", "public static IntList incrList(IntList L, int x) {\n /* Your code here. */\n IntList newList = null;\n for (int i = L.size() - 1; i > -1; i--) { //construct the newList backwardly, iteratively\n newList = new IntList(L.get(i) + x, newList);\n }\n return newList;\n }", "public void addALl(List<T> list){\n for(int i = 0; i < list.size(); i++){\n add(list.get(i));\n }\n }", "public double get(){\n sum = 0;\n if(hasFilled){\n for(int j=0; j<list.length; j++)\n {\n sum += list[j];\n }\n \n return sum/(double)list.length;\n }\n else{\n for(int j = 0; j < index;j++){\n sum += list[j];\n }\n return sum/(double)index;\n }\n }", "public void sumValues(){\n\t\tint index = 0;\n\t\tDouble timeIncrement = 2.0;\n\t\tDouble timeValue = time.get(index);\n\t\tDouble packetValue;\n\t\twhile (index < time.size()){\n\t\t\tDouble packetTotal = 0.0;\n\t\t\twhile (timeValue < timeIncrement && index < packets.size()){\n\t\t\t\ttimeValue = time.get(index);\n\t\t\t\tpacketValue = packets.get(index);\n\t\t\t\tpacketTotal= packetTotal + packetValue;\n\t\t\t\tindex = index + 1;\n\t\t\t}\n\t\t\tArrayList<Double> xy = new ArrayList<Double>();\n\t\t\txy.add(timeIncrement);\n\t\t\txy.add(packetTotal);\n\t\t\ttotalIncrements.add(xy);\n\t\t\t// to get max and min need separate arrays\n\t\t\ttimeIncrements.add(timeIncrement);\n\t\t\tbyteIncrements.add(packetTotal);\n\t\t\ttimeIncrement = timeIncrement + 2.0;\t\n\t\t}\n\t\treturn;\n\n\t}", "public void update(double val) {\n\n ListEntry entry = new ListEntry(val, getModel().currentTime());\n accumulate.add(entry);\n super.update(val);\n }", "private void updateLists() {\r\n for (int i = 0; i < this.memoryLists.length; i++) {\r\n MemoryBlock memBlock = (MemoryBlock) memoryBlocks.get(i);\r\n\r\n if (memBlock.isChanged(this.lastChanged[i]) || memoryUpdateState[i]) {\r\n Vector<MemoryInt> memVector = memBlock.getMemoryVector();\r\n\r\n if (memVector != null) memoryLists[i].setListData(memVector);\r\n\r\n // if memory block has changed, do also redraw next time\r\n // in order to remove indication\r\n memoryUpdateState[i] = memBlock.isChanged(this.lastChanged[i]);\r\n this.lastChanged[i] = memBlock.lastChanged();\r\n }\r\n }\r\n }", "public void addTotal() {\n for (int i = 0; i < itemsInOrder.size(); i++) {\n this.dblTotal += itemsInOrder.get(i).getPrice();\n }\n }", "IList<T> append(IList<T> l);", "@SuppressWarnings (\"unchecked\") public void addAll(ItemList list){\n items.addAll(list.items);\n }", "public void addValues(List newValues) {\n synchronized (values) {\n values.addAll(newValues);\n }\n }", "public void updateList() \n { \n model.clear();\n for(int i = ScholarshipTask.repository.data.size() - 1; i >= 0; i--) \n {\n model.addElement(ScholarshipTask.repository.data.get(i));\n }\n }", "public void add(T element) {\n if (size + 1 >= capacity) {\n if (capacity == 0) capacity = 1;\n else capacity *= 2; // double the array size\n T[] tempArrayList = (T[]) new Object[capacity];\n for (int i = 0; i < size; i++) tempArrayList[i] = genericArrayList[i];\n genericArrayList = tempArrayList; // genericArray has extra null at the end\n }\n genericArrayList[size++] = element;\n }", "private void addActiveCourseListToCourseList() {\n courseList.addCoursesToList(activeCourseList);\n activeCourseList = new ArrayList<>();\n System.out.println(\"Added and Cleared!\");\n }", "public static void main(String[] args) {\n\t\tArrayList<Integer> array1 = new ArrayList<Integer>();\n\t\tarray1.add(1);\n\t\tarray1.add(2);\n\t\tarray1.add(3);\n\t\tarray1.add(4);\n\t\tSystem.out.println(array1);\n\t\tArrayList<Integer> array2 = new ArrayList<Integer>();\n\t\tarray2.add(5);\n\t\tarray2.add(6);\n\t\tarray2.add(7);\n\t\tarray2.add(8);\n\t\tSystem.out.println(array2);\n\t\tarray1.addAll(array2);\n\t\tSystem.out.println(array1);\n\t\t\n\t}", "public void refreshList() {\n mCursor.requery();\n mCount = mCursor.getCount() + mExtraOffset;\n notifyDataSetChanged();\n }" ]
[ "0.6795259", "0.6164269", "0.608804", "0.607578", "0.6035157", "0.60300183", "0.60115486", "0.5943821", "0.5933334", "0.5884256", "0.5866137", "0.5813034", "0.5770767", "0.57596225", "0.57596225", "0.57596225", "0.57596225", "0.57596225", "0.57596225", "0.5680371", "0.5661987", "0.5655663", "0.56518275", "0.5639765", "0.5614745", "0.5614745", "0.5614745", "0.559311", "0.557023", "0.5522241", "0.5517694", "0.5504565", "0.5492905", "0.5491794", "0.54392123", "0.54273546", "0.5425087", "0.54235214", "0.5397405", "0.53941154", "0.53869593", "0.5381257", "0.536689", "0.535634", "0.5334624", "0.53216386", "0.5318616", "0.53064656", "0.5295107", "0.5286923", "0.5286818", "0.52789295", "0.52662027", "0.52611536", "0.5260098", "0.5258657", "0.5254443", "0.5254135", "0.5253452", "0.5247842", "0.5245778", "0.5244156", "0.5237326", "0.52085924", "0.5205287", "0.52003574", "0.5200079", "0.5198134", "0.5191323", "0.51897115", "0.51895213", "0.5165533", "0.51596963", "0.5150567", "0.5142766", "0.5122966", "0.5119655", "0.5112836", "0.51003647", "0.5097698", "0.5094691", "0.5070778", "0.506076", "0.5055284", "0.50546056", "0.50527877", "0.5050533", "0.5037743", "0.5037635", "0.502519", "0.501967", "0.5014626", "0.5013615", "0.50121665", "0.501203", "0.5006135", "0.49794212", "0.49756473", "0.49738845", "0.49699372", "0.49649328" ]
0.0
-1
method accumulate the content of the array list with new array list content.
public static void calculateAvg(double[] avgPArr, int itemNum) { for (int i = 0; i < avgPArr.length; i++) avgPArr[i] /= itemNum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n\tprotected void grow(){\n\t\t// makes new arraylist\n\t\tT[] temp = (T[]) new Object[data.length *2];\n\t\tfor(int i = 0; i < data.length; i++ ){\n\t\t\ttemp[i] = data[i];\n\t\t}\n\t\tdata = temp;\n\t}", "private void grow() {\n OmaLista<OmaPari<K, V>>[] newList = new OmaLista[this.values.length * 2];\n\n for (int i = 0; i < this.values.length; i++) {\n copy(newList, i);\n }\n\n this.values = newList;\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void growArray() {\n\t\tint tempSize = size * 2;\n\t\tE[] tempList = (E[]) new Object[tempSize];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\ttempList[i] = list[i];\n\t\t}\n\t\tlist = tempList;\n\t}", "private static void testAdd(ArrayList list, int[] content) {\n System.out.print(\"Adding to the list: \");\n for (int index = 0; index < content[index]; index++) {\n list.addToEnd(content);\n } // end for\n System.out.println();\n displayList(list);\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void growArray() {\n\t\tObject[] newList = new Object[size * 2];\n\t\tfor (int i = 0; i < size(); i++) {\n\t\t\tnewList[i] = get(i);\n\t\t}\n\t\tlist = (E[]) newList;\n\t\tsize *= 2;\n\t}", "public void addAll(ArrayIntList other) {\n\t\t\tensureCapacity(size + other.size);\n\t\t\tfor(int i = 0; i < other.size; i++) {\n\t\t\t\tadd(other.elementData[i]);\n\t\t\t}\n\t\t}", "public void newArray() {\n\t\t\n\t\tE[] newArray= (E[]) new Object[list.length * 2]; //Holds the old elements from the list array while new list array is being made\n\t\t\n\t\tfor(int i = 0; i < list.length; i++) {\n\t\t\t\n\t\t\tnewArray[i] = list[i]; //Copy the old list array into the newArray\n\t\t}\n\t\t\n\t\tlist = newArray; //Point the old array at the newArray starting memory location\n\t\t\n\t}", "private void grow() {\r\n\t\t\r\n\t\t Student [] newList = new Student[sizeOfList(list) + 4];\r\n\t int size = sizeOfList(list);\r\n\t \r\n\t for(int i = 0; i < size; i++) {\r\n\t \t newList[i] = list[i];\r\n\t }\r\n\t list = newList;\r\n\t}", "public static void processArrayList(){\n ArrayList<String> newArray = new ArrayList<String>();\n newArray.addAll(groceryList.getGroceryList()); //Method 1: adds all items from the groceryList into the newArray\n\n ArrayList<String> newArray2 = new ArrayList<String>(groceryList.getGroceryList()); //Method 2: same as method 1 but the copying happens at the time of initialising the newArray2\n\n //if for some reason you want to save all the contents of an arrayList into an array\n String[] myArray = new String[groceryList.getGroceryList().size()]; //create the array to be equal to the size of the arraylist\n myArray = groceryList.getGroceryList().toArray(myArray); //convert an arraylist of strings (the outcome of getGroceryList()), and save it into our array\n }", "@Override\r\n\tpublic void fill(ArrayList<T> list) {\r\n\t\t//Copy of list\r\n\t\tArrayList<T> copyData = list;\r\n\t\t// Add copy of list to the Stack\r\n\t\tfor (T e: copyData) {\r\n\t\t\tdata.add(e);\r\n\t\t}\r\n\t}", "protected void grow()\r\n\t{\t\r\n\t\tif(debug)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Debug - Starting grow\");\r\n\t\t}\r\n\t\t\r\n\t\tint[] temp = new int[count*2];\r\n\t\t\r\n\t\tfor(int index = 0; index < count; index++)\r\n\t\t{\r\n\t\t\ttemp[index] = numArray[index];\r\n\t\t\t\r\n\t\t\tif(debug)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Debug - temp[index] = \" + temp[index]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tnumArray = temp;\r\n\t\t\r\n\t\tif(debug)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Debug - Ending grow\");\r\n\t\t}\r\n\t}", "private void grow()\r\n\t{\r\n\t\tint [] temp = new int[count * 2]; // new array to hold the data\r\n\r\n\t\t// copy old data in new array\r\n\t\tfor (int i = 0; i < count; i++)\r\n\t\t\ttemp[i] = array[i];\r\n\r\n\t\tarray = temp; // update the new array\r\n\t}", "static final void addAll(ContainerValue cont, List<Value> result) {\r\n for (int i = 0; i < cont.getElementSize(); i++) {\r\n result.add(cont.getElement(i));\r\n }\r\n }", "@Override\n\t\t\tpublic void apply(Document arg0) {\n\t\t\t\tarray.add(arg0);\n\t\t\t}", "@Override\n\t\t\tpublic void apply(Document arg0) {\n\t\t\t\tarray.add(arg0);\n\t\t\t}", "@Override\n\t\t\tpublic void apply(Document arg0) {\n\t\t\t\tarray.add(arg0);\n\t\t\t}", "@Override\n\t\t\tpublic void apply(Document arg0) {\n\t\t\t\tarray.add(arg0);\n\t\t\t}", "@Override\n\t\t\tpublic void apply(Document arg0) {\n\t\t\t\tarray.add(arg0);\n\t\t\t}", "@Override\n\t\t\tpublic void apply(Document arg0) {\n\t\t\t\tarray.add(arg0);\n\t\t\t}", "public void extendArray() {\n int index = size();\n Object[] temp = new Object[index + 1];\n for (int i=0; i < index; i++) {\n temp[i] = AL[i];\n }\n AL = temp;\n }", "protected ArrayList<ArrayList<String>> method1() {\n\n ArrayList<ArrayList<String>> arr = new ArrayList<ArrayList<String>>();\n ArrayList<String> n_clone = new ArrayList<>(Arrays.asList(input));\n\n // Create equal amount of containers as requested.\n for (int i=0;i<num;i++) {\n arr.add(new ArrayList<String>());\n }\n\n // Iterate through given Array while putting items\n // into the containers you just created.\n Iterator itor = n_clone.iterator();\n int count = 0;\n while (itor.hasNext()) {\n if (count < this.num) {\n arr.get(count).add((String)itor.next());\n count++;\n } else {\n count = 0;\n }\n }\n\n System.out.println(\"Paying no attention to order, the Array - \");\n printArrayList(new ArrayList<>(Arrays.asList(input)));\n System.out.println(\"divided into \" + this.num + \" sections is: \\n\");\n printMatrix(arr);\n\n return arr;\n }", "private void grow() {\n int oldCapacity = this.values.length;\n int newCapacity = oldCapacity + (oldCapacity >> 1);\n Object[] newValues = new Object[newCapacity];\n System.arraycopy(this.values, 0, newValues, 0, oldCapacity);\n this.values = newValues;\n }", "private void grow() {\n int growSize = size + (size<<1);\n array = Arrays.copyOf(array, growSize);\n }", "public ListArrayBasedPlus(int size)\n {\n items = new Object[size];\n numItems = 0;\n }", "@Override\n\t\t\tpublic void apply(Document arg0) {\n\t\t\t\tarray_bp.add(arg0);\n\t\t\t}", "@Override\n\t\t\tpublic void apply(Document arg0) {\n\t\t\t\tarray_bp.add(arg0);\n\t\t\t}", "@Override\n\t\t\tpublic void apply(Document arg0) {\n\t\t\t\tarray_bp.add(arg0);\n\t\t\t}", "private static List<Integer> addOne(List<Integer> input) {\n\n\t\tList<Integer> copy = new ArrayList<>();\n\t\tcopy.addAll(input);\n\n\t\tint size = copy.size();\n\t\tcopy.set(size-1, input.get(size-1)+1);//last element of input is updated/replaced by (original value + 1)\n\n\t\tfor(int i=size-1; i>0 && copy.get(i)==10; i--) {\n\t\t\tcopy.set(i, 0);\n\t\t\tcopy.set(i-1, copy.get(i-1)+1);\n\t\t}\n\n\t\tif(copy.get(0) == 10) {\n\t\t\tcopy.set(0, 0);\n\t\t\tcopy.add(0, 1);//add 1 at index0 ,shift all elements after to right\n\t\t}\n\n\t\treturn copy;//this NOT modifies the original input\n\t}", "public void add( Comparable newVal ) {\n \t//if _data is full, expand the array\n \tif (_size == _data.length){\n\t \texpand();\n \t}\n \t\n\tset(_lastPos + 1, newVal);\n \t//increases _lastPos and _size\n \t_lastPos++;\n \t_size++;\n }", "private synchronized void addResultToMultiList() {\n\t addObjectToMultiList(resultArrayList);\r\n\t }", "private void grow() { \r\n\t\tint capacity = accounts.length;\r\n\t\tAccount [] tempArray = new Account[capacity += INITIAL_SIZE]; //tempArray with new capacity\r\n\t\tfor ( int i = 0; i < accounts.length; i++ ) { // Transfer all accounts into new Accounts\r\n\t\t\ttempArray[i] = accounts[i];\r\n\t\t}\t\t\r\n\t\taccounts = tempArray;\t\r\n\t\treturn;\r\n\t}", "private void grow()\n\t{\n\t\tint temp[] = new int[count * 2];\n\t\tfor(int index = 0; index < count; index = index + 1)\n\t\t\ttemp[index] = array1[index];\n\t\tarray1 = temp;\n\t}", "private void grow() {\n T[] arr_temp = (T[]) new Object[arr.length*2];\n for (int i=0; i<arr.length; i++){\n arr_temp[i] = arr[i];\n }\n arr = arr_temp;\n }", "private void addSizeArray() {\n int doubleSize = this.container.length * 2;\n Object[] newArray = new Object[doubleSize];\n System.arraycopy(this.container, 0, newArray, 0, this.container.length);\n this.container = new Object[doubleSize];\n System.arraycopy(newArray, 0, this.container, 0, doubleSize);\n }", "public static void main(String[] args) {\n\t\tArrayList ar=new ArrayList();\n\t\tar.add(100);\n\t\tar.add(200);\n\t\t\n\t\t ArrayList<Integer> arr=new ArrayList<Integer>();\n\t\t arr.add(10);\n\t\t arr.add(200);\n\t\t arr.add(400);\n\t\t \n\t\t \n\t\t System.out.println(arr.size());//length of arraylist\n\t\t \n\t\t //iteration\n\t\t for(int i=0;i<arr.size();i++) {\n\t\t\t System.out.println(i);\n\t\t }\n\t\t \n\t\t for(Integer e:arr) {\n\t\t\t System.out.println(e);\n\t\t }\n\t\t \n\t\t arr.stream().forEach(e->System.out.println(e));\n\t\t \n\t\t Iterator<Integer>it=arr.iterator();\n\t\t while(it.hasNext()) {\n\t\t\t System.out.println(it.next());\n\t\t }\n\t\tSystem.out.println(\"******************************************\");\n\n\t\t//create one arraylist with another\n\t\t\n\t\tArrayList<Integer> list= new ArrayList<Integer>(Arrays.asList(10,20,30,40,50));\n\t\t\n\t\t//arraylist methods\n\t\t//1.Add\n\t\tlist.add(90);\n\t\tSystem.out.println(list);\n\t\t\n\t\t//2.AddAll\n\t\tArrayList<String> ar1=new ArrayList<String>(Arrays.asList(\"Ruby\",\"Python\",\"Java\",\"C#\"));\n\t\t\n\t\tArrayList<String> ar2=new ArrayList<String>(Arrays.asList(\"Testing\",\"Devops\"));\n\n\t\tar1.addAll(ar2);\n\t\tar2.addAll(ar1);\n\t\tSystem.out.println(ar1);\n\t\tSystem.out.println(ar2);\n\t\t\n\t\t//3.clear\n\t\t//ar1.clear();\n\t\tSystem.out.println(ar1);\n\t\t\n\t\t//4.clone\n\t\tArrayList<String> clonelist=( ArrayList<String>)ar2.clone();\n\t\tSystem.out.println(clonelist);\n\n\t\t//5.contains\n\t\tSystem.out.println(ar2.contains(\"python\"));\n\t\t\n\t\t//6.index of\n\t\tSystem.out.println(ar1);\n\t\tSystem.out.println(ar1.indexOf(\"java\")>0);\n\t\t\n\t\t//7.last index of-returns inetegre\n\t\t\n\t\tArrayList<String> list1=new ArrayList<String>(Arrays.asList(\"Anu\",\"Naveen\",\"Tom\"));\n\t\tint i=list1.lastIndexOf(\"test\");\n\t\tSystem.out.println(i);\n\t\t\n\t\t//8.remove\n\t\tlist1.remove(1);\n\t\tlist1.remove(\"Anu\");\n\t\t\n\t\t//9.removeif\n\t\tArrayList<Integer> numbers=new ArrayList<Integer>(Arrays.asList(1,2,3,4,5,6,7,8,9,10));\n\t\tnumbers.removeIf(num->num%2==0);//printing all odd numbers /elimnating even numbers\n\t\tSystem.out.println(numbers);\n\t\t\n\t\t//10.retain All\n\t\tArrayList<String> al=new ArrayList<String>(Arrays.asList(\"ANu\",\"Robin\",\"Sky\",\"Red\"));\n\t\tal.retainAll(Collections.singleton(\"ANu\"));\n\t\tSystem.out.println(al);\n\t\t\n\t\t//11.How to create a substring from arraylist\n\t\tArrayList<Integer> no=new ArrayList<Integer>(Arrays.asList(1,2,3,4,5,6,7,8,9,12,13,14));\n\t\t\n\t\tArrayList<Integer> substring=new ArrayList<Integer>(no.subList(3, 9));\n\t\tSystem.out.println(substring);\n\t\t\n\t\t//How to convert an arraylist to array\n\t\tObject arr1[]=no.toArray();\n\t\tSystem.out.println(Arrays.toString(arr1));\n\t\t\n\t\tfor(Object e:arr1) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\t/*How to synchronise arraylist\n\t\t * 1.collections.synchronisedlist()->returns a synchronised list\n\t\t * 2.CopyOnWriteArraylist-synchronised variant of arraylist\n\t\t*/\n\t\t\n\t\tList<String> namelist=(List<String>) Collections.synchronizedCollection(new ArrayList<String>());\n\t\t\n\t\t\n\t\t//How to remove duplicate elements using linkedhashset and streams\n\t\t\n\t\t//how to compare 2 arraylist\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}", "public ArrayBackedList(IList list) {\n while (list.size() > stringArray.length) {\n reallocArray();\n }\n for (int i = 0; i < list.size(); i++) {\n stringArray[i] = list.get(i);\n }\n }", "private static List<Integer> addOnePlus(List<Integer> input) {\n\n\t\tint size = input.size();\n\t\tinput.set(size-1, input.get(size-1)+1);//last element of input is updated/replaced by (original value + 1)\n\n\t\tfor(int i=size-1; i>0 && input.get(i)==10; i--) {\n\t\t\tinput.set(i, 0);\n\t\t\tinput.set(i-1, input.get(i-1)+1);\n\t\t}\n\n\t\tif(input.get(0) == 10) {\n\t\t\tinput.set(0, 0);\n\t\t\tinput.add(0, 1);//add 1 at index0 ,shift all elements after to right\n\t\t}\n\n\t\treturn input;//this modifies the original input\n\t}", "private void increaseSize() {\n data = Arrays.copyOf(data, size * 3 / 2);\n }", "public void calculateArray() {\n\n for (int i = 0; i < array.length; i++) {\n sum += array[i];\n }\n }", "public void addAll(List<ContentValues> result) {\n for (ContentValues c : result) {\n add(c);\n }\n }", "private void arraySum(MyArrayList myArrayList, Results results) {\r\n int old_sum = myArrayList.sum();\r\n myArrayList.insertSorted(511);\r\n int new_sum = myArrayList.sum();\r\n if(old_sum < new_sum) {\r\n results.storeNewResult(\"ArraySum test case: PASSED\");\r\n }\r\n else { \r\n results.storeNewResult(\"ArraySum test case: FAILED\");\r\n }\r\n }", "@Override\n public void combineCons(ArrayList<Note> list) {\n }", "private void grow() { \n\n\t\tAccount[] temp = accounts;\n\t\taccounts = new Account[accounts.length+5];\n\t\t\n\t\tfor (int i = 0; i < temp.length; i++) {\n\t\t\taccounts[i] = temp[i];\n\t\t}\n\t\t\n\t}", "ArrayList<Unit> extend(){\n return list;\n }", "a(ArrayList arrayList) {\n super(1);\n this.$result = arrayList;\n }", "private void arrayIncreaaseSize(MyArrayList myArrayList, Results results) {\r\n int old_size = myArrayList.length();\r\n int value;\r\n Random rand = new Random();\r\n \r\n for(int i=0; i<50; i++) {\r\n value = rand.nextInt(10000);\r\n if(value < 0) {\r\n value = value * -1;\r\n }\r\n myArrayList.insertSorted(value);\r\n }\r\n if(myArrayList.length() == old_size + 25) {\r\n results.storeNewResult(\"ArrayIncrease test case: PASSED\");\r\n }\r\n else {\r\n results.storeNewResult(\"ArrayIncrease test case: FAILED\");\r\n }\r\n }", "public int add(T newData) {\n\t\tint newLength = 1;\n\t\t// If there is more data to add then available space in the array\n\t\tif(newLength > (array.length - length)) {\n\t\t\t// Double the array size\n\t\t\texpandArray(array.length);\n\t\t}\n\n\t\t// If the new data will wrapping around, add the new data and wrap around to fit\n\t\tif((index + length) < array.length && newLength > (array.length - (index + length))) {\n\t\t\t// The number of elements available up to the end of the array before needing to wrap around\n\t\t\tint tailLength = array.length - (index + length);\n\t\t\t// Copy data up to the end of the array\n\t\t\tif(tailLength > 0) {\n\t\t\t\tarray[index+length] = newData;\n\t\t\t}\n\t\t\t// Copy rest of data 'wrapped around' to the beginning of the array\n\t\t\telse {\n\t\t\t\tarray[0] = newData;\n\t\t\t}\n\t\t}\n\t\t// Else if the data fits without wrapping around, add the new data\n\t\telse {\n\t\t\tarray[(index + length) % array.length] = newData;\n\t\t}\n\t\t// Adjust the length\n\t\tlength = length + newLength;\n\t\t// Return the number of elements successfully added\n\t\treturn newLength;\n\t}", "public void revolver() {\n this.lista = Lista.escojerAleatorio(this, this.size()).lista;\n }", "public void compact()\n\t{\n\t\tif (addIndex == size())\n\t\t\treturn;\n\t\t\n\t\tObject narray = Array.newInstance( array.getClass().getComponentType(), addIndex );\n\t\tSystem.arraycopy( array, 0, narray, 0, addIndex );\n\t\tarray = narray;\n\t}", "public ArrayList<T> returnAsArray(ArrayList<T> arr) {\n\t\tif (arr == null) {\n\t\t\tarr = new ArrayList<T>();\n\t\t}\n\t\tif (this == null) {\n\t\t\treturn arr;\n\t\t}\n\t\tif (this.valCount == 0) {\n\t\t\treturn arr;\n\t\t}\n\t\tfor (int i = 0; i < childCount; ++i) {\n\t\t\tthis.children[i].returnAsArray(arr);\n\t\t\tif (i < childCount - 1) {\n\t\t\t\tarr.add(values[i]);\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}", "void arrayListToArray() {\n List<String> coolStringList = Arrays.asList( \"Java\", \"Scala\", \"Groovy\" ); //Declare &initialize o\n //coolStringList.add( \"Syed\" ); // Exception in thread \"main\" java.lang.UnsupportedOperationException\n coolStringList.set( 0, \"Syed\" );// works well\n System.out.println( coolStringList );\n/*\n /) Its not as fast as Arrays.asList() but more flexible.\n\n 2) This method actually copies the content of the underlying array into ArrayList provided.\n\n\n 3) Since you are creating copy of original array, you can add, modify and remove any element without affecting original one.*/\n\n List<String> assetList = new ArrayList();\n String[] asset = {\"equity\", \"stocks\", \"gold\", \"foriegn exchange\", \"fixed income\", \"futures\", \"options\"};\n Collections.addAll( assetList, asset );\n System.out.println( assetList );\n assetList.add( \"Mohammed\" );\n System.out.println( assetList );\n\n List newAssetList = new ArrayList();\n newAssetList.addAll( Arrays.asList( asset ) );\n System.out.println( newAssetList );\n newAssetList.add( \"YNS\" );\n System.out.println( newAssetList );\n /*String [] currency = {\"SGD\", \"USD\", \"INR\", \"GBP\", \"AUD\", \"SGD\"};\n System.out.println(\"Size of array: \" + currency.length);\n List<String> currencyList = CollectionUtils.arrayToList(currency);\n*/\n }", "@SuppressWarnings(\"unchecked\")\n \t@Override\n \tpublic PVector<E> plusAll(Collection<? extends E> l) {\n \t\tint n = l.size();\n \t\tif (n == 0) {\n \t\t\treturn this;\n \t\t} else if (count == 0 && l instanceof ArrayPVector) {\n \t\t\treturn (ArrayPVector<E>) l;\n \t\t} else if (!sublist && value != null\n \t\t\t\t&& offset + count + n <= value.length) {\n \t\t\t// l fits into the remaining space\n \t\t\tint i = count;\n \t\t\tfor (E e : l) {\n \t\t\t\tif (e == null) {\n \t\t\t\t\tthrow new IllegalArgumentException(\n \t\t\t\t\t\t\t\"Can't add null to an ArrayPVector\");\n \t\t\t\t}\n \t\t\t\tvalue[i++] = e;\n \t\t\t}\n \t\t\tsublist = true;\n \t\t\treturn new ArrayPVector<E>(value, offset, i);\n \t\t} else {\n \t\t\t// l longer than remaining space\n \t\t\tE[] val = (E[]) new Object[count + n];\n \t\t\tif (value != null) {\n \t\t\t\tSystem.arraycopy(value, offset, val, 0, count);\n \t\t\t}\n \t\t\tint i = count;\n \t\t\tfor (E e : l) {\n \t\t\t\tif (e == null) {\n \t\t\t\t\tthrow new IllegalArgumentException(\n \t\t\t\t\t\t\t\"Can't add null to an ArrayPVector\");\n \t\t\t\t}\n \t\t\t\tval[i++] = e;\n \t\t\t}\n \t\t\treturn new ArrayPVector<E>(val, 0, i);\n \t\t}\n \t}", "private void doubleArray()\n\t{\n\t\tT[] oldList = list;\n\t\tint oldSize = oldList.length;\n\t\t\n\t\tlist = (T[]) new Object[2 * oldSize];\n\t\t\n\t\t// copy entries from old array to new, bigger array\n\t\tfor (int index = 0; index < oldSize; index++)\n\t\t\tlist[index] = oldList[index];\n\t}", "public void add(E a)\n {\n if (size == data.length) { // if the list is at capacity...\n // create a new, larger array\n E[] newData = (E[])(new Object[2*data.length]);\n \n // copy over all of the old elements\n for (int i = 0; i < size; i++)\n newData[i] = data[i];\n \n // redirect the old data reference\n data = newData;\n }\n\n // insert the new element\n data[size] = a;\n size++;\n }", "public void addAll(T[] arr, int from, int length);", "private <T> void populateArrayFromList(T[] arr, ArrayList<T> arrayList) {\n\t\tSystem.out.println(\"Array size \" + arr.length);\n\t\tSystem.out.println(\"ArrayList size \" + arrayList.size());\n\t\tfor (int i = 0; i < arrayList.size(); i++) {\n\t\t\tsavedListModel.addElement(arrayList.get(i).toString());\n\t\t\tarr[i] = arrayList.get(i);\n\t\t}\n\t}", "private void grow() {\n capacity *= 2;\n Object[] temp = new Object[capacity];\n for (int i = 0; i < values.length; i++) temp[i] = values[i];\n values = temp;\n }", "@Override\n\tpublic void fill(ArrayList<T> list) throws StackOverflowException {\n\t\t//Iterate through the ArrayList. Copy each item, and add the copy to the Stack\n\t\tfor(int i = 0; i < list.size(); i++) {\n\t\t\tT newItem = list.get(i);\n\t\t\tthis.push(newItem);\n\t\t}\n\t\t\n\t}", "public FplList append(FplList list) {\n\t\tif (list == null || list.isEmpty()) {\n\t\t\treturn this;\n\t\t}\n\t\tif (isEmpty()) {\n\t\t\treturn list;\n\t\t}\n\t\tint totalSize = size() + list.size();\n\t\tint totalBuckets = shape.length + list.shape.length;\n\n\t\tFplValue[] lastBucket = shape[shape.length - 1];\n\t\tFplValue[] listFirstBucket = list.shape[0];\n\n\t\tif (lastBucket.length + listFirstBucket.length <= BASE_SIZE) {\n\t\t\tif (needsReshaping(totalBuckets - 1, totalSize)) {\n\t\t\t\treturn new FplList(mergedShape(shape, list.shape, totalSize));\n\t\t\t} else {\n\t\t\t\tFplValue[][] buckets = copyOf(shape, shape.length + list.shape.length - 1);\n\t\t\t\tFplValue[] bucket = copyOf(lastBucket, lastBucket.length + listFirstBucket.length);\n\t\t\t\tarraycopy(listFirstBucket, 0, bucket, lastBucket.length, listFirstBucket.length);\n\t\t\t\tbuckets[shape.length - 1] = bucket;\n\t\t\t\tarraycopy(list.shape, 1, buckets, shape.length, list.shape.length - 1);\n\t\t\t\treturn new FplList(buckets);\n\t\t\t}\n\t\t} else {\n\t\t\tif (needsReshaping(totalBuckets, totalSize)) {\n\t\t\t\treturn new FplList(mergedShape(shape, list.shape, totalSize));\n\t\t\t} else {\n\t\t\t\tFplValue[][] buckets = copyOf(shape, shape.length + list.shape.length);\n\t\t\t\tarraycopy(list.shape, 0, buckets, shape.length, list.shape.length);\n\t\t\t\treturn new FplList(buckets);\n\t\t\t}\n\t\t}\n\t}", "protected ArrayList<ArrayList<String>> method2() {\n ArrayList<ArrayList<String>> arr = new ArrayList<ArrayList<String>>();\n ArrayList<String> n_clone = new ArrayList<>(Arrays.asList(input));\n\n int whole = Math.floorDiv(input.length,this.num);\n int rem = input.length - whole*this.num; // 'rem' can be interpreted as number of exceptions\n // where each exception gets an extra item\n\n // Create equal number of containers as requested\n for (int i=0;i<this.num;i++) {\n arr.add(new ArrayList<String>());\n }\n\n // Iterate through given Array while putting items into containers\n Iterator itor = n_clone.iterator();\n int count = 0;\n while (itor.hasNext()) {\n for (int i = 0; i < whole; i++) {\n if (itor.hasNext()) {\n arr.get(count).add((String)itor.next());\n } else {\n break;\n }\n }\n if (rem != 0 && itor.hasNext()) {\n arr.get(count).add((String)itor.next());\n rem--;\n }\n count++;\n }\n\n printMatrix(arr);\n\n return arr;\n }", "public final void add() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tpush(secondTopMostValue + topMostValue);\n\t\t}\n\t}", "@Override\n public void refreshList(ArrayList<String> newList){\n }", "private ArrayList<Node<T>> addAll(Node<T> current, ArrayList<Node<T>> list) {\n\t\tlist.add(current);\n\t\tif (current.getLeft() != null) {\n\t\t\tlist = addAll(current.getLeft(), list);\n\t\t}\n\t\t\n\t\tif (current.getRight() != null) {\n\t\t\tlist = addAll(current.getRight(), list);\n\t\t}\n\t\t\n\t\treturn list;\n\t}", "@Override\r\n\tpublic void fill(ArrayList<T> list) throws StackOverflowException{\r\n\t\tfor (T e : list) {\r\n\t\t\tpush(e);\r\n\t\t}\r\n\t\t\r\n\t}", "private static final <T> List<T> append(List<T> list, T newElement) {\n List<T> newList = Lists.newArrayListWithCapacity(list.size() + 1);\n newList.addAll(list);\n newList.add(newElement);\n return newList;\n }", "private void grow(){\n\t\tberries.replaceAll((p, v) -> v + 1);\n\t\tapples.replaceAll((p, v) -> v + 1);\n\t}", "testarray() {\r\n \tarrayList = new Arraylist();\t\r\n\t}", "@Override\n public void add(T t) {\n checkIfArrayFull();\n\n arrayList[elementsInArray] = t;\n elementsInArray++;\n }", "void append(E[] elements);", "public ImmutableIntList appendAll(Iterable<Integer> list) {\n if (list instanceof Collection && ((Collection) list).isEmpty()) {\n return this;\n }\n return ImmutableIntList.copyOf(Iterables.concat(this, list));\n }", "public void refershData(ArrayList<SquareLiveModel> contents) {\n\t\tlistData = contents;\n\t\tnotifyDataSetChanged();\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic void add(T item){\n\t\t\n\n\t\tif(currentsize == data.length-1){\n\t\t\tgrow();\n\t\t}\n\n\t\t\n\t\tdata[currentsize] = item;\n\t\tcurrentsize++;\n\n\n\t}", "public void appendInPlace (List l) {\n\t\tif (this.isEmpty()) {\n\t\t\tmyHead = l.myHead;\n\t\t\tmySize = l.mySize;\n\t\t\tmyTail = l.myTail;\n\t\t}\n\t\telse if (l.isEmpty()) {\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tmyTail.myNext = l.myHead;\n\t\t\tmyTail = l.myTail;\n\t\t\tmySize += l.mySize;\n\t\t}\n\t}", "private void expand() {\n\n intElements = copyIntArray(intElements, intElements.length * 2);\n doubleElements = copyDoubleArray(doubleElements, doubleElements.length * 2);\n stringElements = copyStringArray(stringElements, stringElements.length * 2);\n typeOfElements = copyIntArray(typeOfElements, typeOfElements.length * 2);\n }", "public IList<T> append(IList<T> l) {\n return l;\n }", "@Override\r\n public NumericObjectArrayList makeDeepCopy() {\r\n NumericObjectArrayList list = new NumericObjectArrayList();\r\n for (int i = 0; i < this.getCount(); i++) {\r\n try {\r\n list.insert(i, this.getValueAt(i));\r\n } catch (IndexRangeException ex) {\r\n //Shouldn't happen\r\n }\r\n }\r\n return list;\r\n }", "public void addAll(final int[] newArray) {\n for (int eachVal: newArray) {\n add(eachVal);\n }\n }", "public double sum() {\n double sum = x;\n Lista iter = new Lista(this);\n while (iter.next != null) {\n sum += iter.next.x;\n iter = iter.next;\n }\n return sum;\n }", "@Override\n\tpublic boolean add(E item) {\n\t\tif (this.numberOfElements == this.size) {\n\t\t\tE[] newArrayList = (E[]) new Object[this.size * 2];\n\t\t\tint i = 0;\n\t\t\twhile (i < this.size) {\n\t\t\t\tnewArrayList[i] = this.arrayList[i];\n\t\t\t\ti += 1;\n\t\t\t}\n\t\t\tthis.arrayList = newArrayList;\n\t\t\tthis.size = this.size * 2;\n\t\t}\n\t\tthis.arrayList[this.numberOfElements] = item;\n\t\tthis.numberOfElements += 1;\n\t\treturn true;\n\t}", "private void resize() {\n int listSize = numItemInList();\n //debug\n //System.out.println(\"resize: \" + nextindex + \"/\" + list.length + \" items:\" + listSize);\n if (listSize <= list.length / 2) {\n for (int i = 0; i < listSize; i++) {\n list[i] = list[startIndex + i];\n }\n } else {\n Object[] newList = new Object[this.list.length * 2];\n\n// System.arraycopy(this.list, startIndex, newList, 0, this.list.length-startIndex);\n for (int i = 0; i < listSize; i++) {\n newList[i] = list[i + startIndex];\n }\n this.list = newList;\n //debug\n //System.out.println(\"After resize:\" + nextindex + \" / \" + list.length + \" items:\" + numItemInList());\n }\n nextindex = nextindex - startIndex;\n startIndex = 0;\n }", "@Override\n public BiConsumer<List<Integer>, Employee> accumulator() {\n return (resultList, employee) -> {\n if (resultList.isEmpty()) resultList.add(employee.getSalary());\n else {\n Integer currentTotal = resultList.get(0);\n currentTotal += employee.getSalary();\n resultList.set(0, currentTotal);\n }\n };\n }", "void add(int value) {\n size++;\n\n int[] newItems = new int[size];\n\n System.arraycopy(items, 0, newItems, 0, items.length);\n\n newItems[newItems.length - 1] = value;\n\n items = newItems;\n }", "private int[] appendToArray(int[] toBeAppendedTo, int x){\r\n int[] res = new int[toBeAppendedTo.length + 1];\r\n for(int i = 0; i < toBeAppendedTo.length; i++){\r\n res[i] = toBeAppendedTo[i];\r\n }\r\n res[toBeAppendedTo.length] = x;\r\n return res;\r\n }", "private void update() {\n\t\twhile(words.size()<length) {\n\t\t\twords.add(new Word());\n\t\t}\n\t}", "private void update_auxlist(ArrayList<Line> auxlist, Line workingSet) {\n\t\tLine new_working_set = new Line(workingSet);\n\n\t\t// Add the working set copy to the set of maximal lines\n\t\tauxlist.add(new_working_set);\n\t}", "private void grow() {\n Book[] temp = new Book[books.length + GROWTH_SIZE];\n for (int i = 0; i < books.length; i ++){\n temp[i] = books[i];\n }\n books = temp;\n }", "public static IntList incrList(IntList L, int x) {\n /* Your code here. */\n IntList newList = null;\n for (int i = L.size() - 1; i > -1; i--) { //construct the newList backwardly, iteratively\n newList = new IntList(L.get(i) + x, newList);\n }\n return newList;\n }", "public void addALl(List<T> list){\n for(int i = 0; i < list.size(); i++){\n add(list.get(i));\n }\n }", "public double get(){\n sum = 0;\n if(hasFilled){\n for(int j=0; j<list.length; j++)\n {\n sum += list[j];\n }\n \n return sum/(double)list.length;\n }\n else{\n for(int j = 0; j < index;j++){\n sum += list[j];\n }\n return sum/(double)index;\n }\n }", "public void sumValues(){\n\t\tint index = 0;\n\t\tDouble timeIncrement = 2.0;\n\t\tDouble timeValue = time.get(index);\n\t\tDouble packetValue;\n\t\twhile (index < time.size()){\n\t\t\tDouble packetTotal = 0.0;\n\t\t\twhile (timeValue < timeIncrement && index < packets.size()){\n\t\t\t\ttimeValue = time.get(index);\n\t\t\t\tpacketValue = packets.get(index);\n\t\t\t\tpacketTotal= packetTotal + packetValue;\n\t\t\t\tindex = index + 1;\n\t\t\t}\n\t\t\tArrayList<Double> xy = new ArrayList<Double>();\n\t\t\txy.add(timeIncrement);\n\t\t\txy.add(packetTotal);\n\t\t\ttotalIncrements.add(xy);\n\t\t\t// to get max and min need separate arrays\n\t\t\ttimeIncrements.add(timeIncrement);\n\t\t\tbyteIncrements.add(packetTotal);\n\t\t\ttimeIncrement = timeIncrement + 2.0;\t\n\t\t}\n\t\treturn;\n\n\t}", "public void update(double val) {\n\n ListEntry entry = new ListEntry(val, getModel().currentTime());\n accumulate.add(entry);\n super.update(val);\n }", "private void updateLists() {\r\n for (int i = 0; i < this.memoryLists.length; i++) {\r\n MemoryBlock memBlock = (MemoryBlock) memoryBlocks.get(i);\r\n\r\n if (memBlock.isChanged(this.lastChanged[i]) || memoryUpdateState[i]) {\r\n Vector<MemoryInt> memVector = memBlock.getMemoryVector();\r\n\r\n if (memVector != null) memoryLists[i].setListData(memVector);\r\n\r\n // if memory block has changed, do also redraw next time\r\n // in order to remove indication\r\n memoryUpdateState[i] = memBlock.isChanged(this.lastChanged[i]);\r\n this.lastChanged[i] = memBlock.lastChanged();\r\n }\r\n }\r\n }", "public void addTotal() {\n for (int i = 0; i < itemsInOrder.size(); i++) {\n this.dblTotal += itemsInOrder.get(i).getPrice();\n }\n }", "IList<T> append(IList<T> l);", "@SuppressWarnings (\"unchecked\") public void addAll(ItemList list){\n items.addAll(list.items);\n }", "public void addValues(List newValues) {\n synchronized (values) {\n values.addAll(newValues);\n }\n }", "public void updateList() \n { \n model.clear();\n for(int i = ScholarshipTask.repository.data.size() - 1; i >= 0; i--) \n {\n model.addElement(ScholarshipTask.repository.data.get(i));\n }\n }", "public void add(T element) {\n if (size + 1 >= capacity) {\n if (capacity == 0) capacity = 1;\n else capacity *= 2; // double the array size\n T[] tempArrayList = (T[]) new Object[capacity];\n for (int i = 0; i < size; i++) tempArrayList[i] = genericArrayList[i];\n genericArrayList = tempArrayList; // genericArray has extra null at the end\n }\n genericArrayList[size++] = element;\n }", "private void addActiveCourseListToCourseList() {\n courseList.addCoursesToList(activeCourseList);\n activeCourseList = new ArrayList<>();\n System.out.println(\"Added and Cleared!\");\n }", "public static void main(String[] args) {\n\t\tArrayList<Integer> array1 = new ArrayList<Integer>();\n\t\tarray1.add(1);\n\t\tarray1.add(2);\n\t\tarray1.add(3);\n\t\tarray1.add(4);\n\t\tSystem.out.println(array1);\n\t\tArrayList<Integer> array2 = new ArrayList<Integer>();\n\t\tarray2.add(5);\n\t\tarray2.add(6);\n\t\tarray2.add(7);\n\t\tarray2.add(8);\n\t\tSystem.out.println(array2);\n\t\tarray1.addAll(array2);\n\t\tSystem.out.println(array1);\n\t\t\n\t}", "public void refreshList() {\n mCursor.requery();\n mCount = mCursor.getCount() + mExtraOffset;\n notifyDataSetChanged();\n }" ]
[ "0.6795938", "0.61651796", "0.60890216", "0.60758764", "0.603607", "0.60295796", "0.60116786", "0.5943278", "0.59328365", "0.58830035", "0.5867033", "0.5814113", "0.5770761", "0.57607305", "0.57607305", "0.57607305", "0.57607305", "0.57607305", "0.57607305", "0.56815284", "0.5663038", "0.56571513", "0.56528455", "0.5640107", "0.5615759", "0.5615759", "0.5615759", "0.55923074", "0.55711293", "0.5521621", "0.5518773", "0.5505476", "0.54941934", "0.54928833", "0.54380816", "0.54275787", "0.5424477", "0.5424254", "0.5396399", "0.5393837", "0.53861487", "0.5380177", "0.53675646", "0.53554446", "0.5333471", "0.5322434", "0.53186196", "0.5305559", "0.5295028", "0.52874845", "0.5286234", "0.5279088", "0.52659225", "0.52610654", "0.5261021", "0.5257339", "0.52554655", "0.5253669", "0.5252775", "0.52484494", "0.5245371", "0.52427167", "0.5235772", "0.5207894", "0.52037376", "0.51999867", "0.51998883", "0.519806", "0.51922053", "0.5189482", "0.5188818", "0.5165545", "0.5158923", "0.5151102", "0.51421905", "0.51231426", "0.51195306", "0.51104975", "0.5100045", "0.50979036", "0.50936294", "0.50709295", "0.50618285", "0.50552505", "0.5054376", "0.5054324", "0.5049568", "0.5035849", "0.5035367", "0.50241446", "0.50186986", "0.5013054", "0.5012443", "0.5012176", "0.5010252", "0.50054663", "0.49771482", "0.49758488", "0.4972312", "0.49689856", "0.49639845" ]
0.0
-1
method Scramble the given array and return it. postcondition: the given array is intact.
public static <E> ArrayList<E> scrambleArrayList(ArrayList<E> inArr) { ArrayList<E> scrambleArr = new ArrayList(); scrambleArr.addAll(inArr); Random rndVar = new Random(); int size = inArr.size(); E tempStr; for(int k = 0; k < size; k++) { int i = rndVar.nextInt(size); tempStr = scrambleArr.get(i); scrambleArr.remove(i); scrambleArr.add(tempStr); } //for return scrambleArr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void scrambledArray(int[] array){\n Random rand=new Random();// use java.util.random method to scramble the index number\n for(int i=0;i<array.length;i++){\n int num=rand.nextInt(15);\n // swap the two different positioned values by swaping their index number \n int temp=array[i];\n array[i]=array[num];\n array[num]=temp; }\n }", "private static char[] shuffle(char[] array) {\n\t\tRandom rand = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tint randIndex = rand.nextInt(array.length - 1);\n\t\t\tchar temp = array[i];\n\t\t\tarray[i] = array[randIndex];\n\t\t\tarray[randIndex] = temp;\n\t\t}\n\t\treturn array;\n\t}", "private static void scrambleArray(Integer[] a, boolean randomize) {\n\t\tfor (int k = 0; k < a.length; k++)\n\t\t\ta[k] = k;\n\t\tif (randomize) {\n\t\t\tRandom gen = new Random();\n\t\t\tfor (int k = 0; k < a.length; k++) {\n\t\t\t\tswap(a, k, gen.nextInt(a.length));\n\t\t\t}\n\t\t} else {\n\t\t\tint cell = (int) (a.length * 3.14159) % a.length;\n\t\t\tfor (int k = 0; k < a.length; k++) {\n\t\t\t\tswap(a, k, cell);\n\t\t\t\tcell = (int) (cell * 3.14159) % a.length;\n\t\t\t}\n\t\t}\n\n\t}", "private static void shuffleArray(int[] array)\n {\n int index, temp;\n Random random = new Random();\n for (int i = array.length - 1; i > 0; i--)\n {\n index = random.nextInt(i + 1);\n temp = array[index];\n array[index] = array[i];\n array[i] = temp;\n }\n }", "public static byte[] basicScramble(final boolean reverse, final StringBuilder to_scramble)\n\t{\n\t\treturn array(basicScramble(to_scramble, reverse).toString());\n\t}", "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}", "private static void scrambleArray(int[] a, boolean randomize) {\n\t\tfor (int k = 0; k < a.length; k++)\n\t\t\ta[k] = k;\n\t\tif (randomize) // use unpredictable random shuffle\n\t\t{\n\t\t\tRandom gen = new Random();\n\t\t\tfor (int k = 0; k < a.length; k++) {\n\t\t\t\tswap(a, k, gen.nextInt(a.length));\n\t\t\t}\n\t\t} else // use repeatable math formula for shuffle\n\t\t{\n\t\t\tint cell = (int) (a.length * 3.14159) % a.length;\n\t\t\tfor (int k = 0; k < a.length; k++) {\n\t\t\t\tswap(a, k, cell);\n\t\t\t\tcell = (int) (cell * 3.14159) % a.length;\n\t\t\t}\n\t\t}\n\n\t}", "private static void fromUnsortedArray()\n\t{\n Integer[] origArray = new Integer[] { 1, 1, 2, 3, 3, 3, 4, 5, 6, 6, 6, 7, 8 };\n \n // This array has duplicate elements\n System.out.println(Arrays.toString(origArray));\n \n Integer[] tempArray = removeDuplicates2(origArray);\n \n // Verify the array content\n System.out.println(Arrays.toString(tempArray));\n\t}", "public static int[] initialPermutation(int[] inputText){\n\t\tint[] permutedText = new int[64];\n\t\t\n\t\tfor(int i = 0; i < 8; i++){\n\t\t\tif(i < 4){\n\t\t\t\tpermutedText[i*8 + 0] = inputText[57 + i*2];\n\t\t\t\tpermutedText[i*8 + 1] = inputText[49 + i*2];\n\t\t\t\tpermutedText[i*8 + 2] = inputText[41 + i*2];\n\t\t\t\tpermutedText[i*8 + 3] = inputText[33 + i*2];\n\t\t\t\tpermutedText[i*8 + 4] = inputText[25 + i*2];\n\t\t\t\tpermutedText[i*8 + 5] = inputText[17 + i*2];\n\t\t\t\tpermutedText[i*8 + 6] = inputText[ 9 + i*2];\n\t\t\t\tpermutedText[i*8 + 7] = inputText[ 1 + i*2];\n\t\t\t}\n\t\t\telse{\n\t\t\t\tpermutedText[i*8 + 0] = inputText[56 + (i-4)*2];\n\t\t\t\tpermutedText[i*8 + 1] = inputText[48 + (i-4)*2];\n\t\t\t\tpermutedText[i*8 + 2] = inputText[40 + (i-4)*2];\n\t\t\t\tpermutedText[i*8 + 3] = inputText[32 + (i-4)*2];\n\t\t\t\tpermutedText[i*8 + 4] = inputText[24 + (i-4)*2];\n\t\t\t\tpermutedText[i*8 + 5] = inputText[16 + (i-4)*2];\n\t\t\t\tpermutedText[i*8 + 6] = inputText[ 8 + (i-4)*2];\n\t\t\t\tpermutedText[i*8 + 7] = inputText[ 0 + (i-4)*2];\n\t\t\t}\n\t\t}\n\t\treturn permutedText;\n\t}", "public static int[] perfectShuffle(int[] arr) { \n int[] newArr = new int[arr.length];\n for(int i = 0; i < arr.length - 1; i ++){\n if(i % 2 == 0){\n newArr[i] = arr[i / 2];\n }else{\n newArr[i] = arr[i / 2 + arr.length / 2];\n }\n }\n\n if(arr.length > 0) newArr[arr.length - 1] = arr[arr.length - 1];\n return newArr;\n }", "public static String[] randomizeHand(String[] arrayShuffle){\n String[] combine=new String[5];\n int k=-1;\n for(int i=0;i<5;i++){\n int j=(int)(Math.random()*52);\n if(j==k){continue;} // use if statements to avoid from picking up the same item twice\n else{combine[i]=arrayShuffle[j];k=j;\n }}\n return combine;}", "static void shuffleArray(String[] ar)\r\n {\n Random rnd = ThreadLocalRandom.current();\r\n for (int i = ar.length - 1; i > 0; i--)\r\n {\r\n int index = rnd.nextInt(i + 1);\r\n // Simple swap\r\n String a = ar[index];\r\n ar[index] = ar[i];\r\n ar[i] = a;\r\n }\r\n }", "private void ensureCap(){\n T[] temp = (T[])new Object[arr.length * 2];\n for(int i = 0; i < numItems; i++){\n temp[i] = this.arr[i];\n }\n this.arr = temp;\n }", "private static int[] rearrange(int[] arr) {\n\t\t\n\t\tSet<Integer> set = new HashSet<Integer>();\n\t\t\n\t\t// Storing all the values in the HashSet\n\t\tfor(int i : arr) {\n\t\t\tset.add(i);\n\t\t}\n\t\t\n\t\tfor(int i=0; i<arr.length ; i++) {\n\t\t\t\n\t\t\tif(set.contains(i))\n\t\t\t\tarr[i] =i;\n\t\t\telse\n\t\t\t\tarr[i] = -1;\t\n\t\t}\n\t\t\n\t\t\n\t\treturn arr;\n\t}", "public int[] task2_dedup(int[] array) {\n\t\tif (array == null || array.length <= 2) {\n\t\t\treturn array;\n\t\t}\n\t\tint start = 0;\n\t\t// for(int i = 2; i < array.length; i ++) {\n\t\t// if (array[start - 2] != array[i]) {\n\t\t// array[start] = array[i];\n\t\t// start ++;\n\t\t// }\n\t\t// }\n\t\tint count = 1;\n\t\tfor (int i = 1; i < array.length; i++) {\n\t\t\tif (array[i] != array[start]) {\n\t\t\t\tarray[++start] = array[i];\n\t\t\t\tcount = 1;\n\t\t\t} else {\n\t\t\t\tif (count < 2) {\n\t\t\t\t\tarray[++start] = array[i];\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn Arrays.copyOf(array, start + 1);\n\t}", "public static char[] flipBoard(char[] b) {\n\t\tfor (int i = 0; i < b.length; i++) {\n\t\t\tif (b[i] == 'W') {\n\t\t\t\tb[i] = 'B';\n\t\t\t} else if (b[i] == 'B') {\n\t\t\t\tb[i] = 'W';\n\t\t\t}\n\t\t}\n\t\treturn b;\n\t}", "public static int[] shuffle() {\n Random random = new Random();\n for (int i = 0; i < len; i++) {\n int j = random.nextInt(len);\n int temp = nums[i];\n nums[i] = nums[j];\n nums[j] = temp;\n }\n return nums;\n }", "private static int[] copyArray(int[] array) {\n\t\tint[] copy = new int[array.length]; \n\t\tfor(int i = 0; i < array.length; i ++) {\n\t\t\tcopy[i] = array[i];\n\t\t}\n\t\treturn copy;\n\t}", "public static int[] RevCopyArray(int[] inputArray) {\n int[] RevCopyArray = new int[inputArray.length];\n for (int i=0; i<RevCopyArray.length;i++) {\n RevCopyArray[i] = inputArray[inputArray.length-1-i];\n \n }\n return RevCopyArray;\n \n }", "private static String remix(String str, int[] arr){\n StringBuilder sb = new StringBuilder();\n char[] charArray = new char[arr.length];\n for (int i=0; i< arr.length;i++){\n charArray[i] = str.charAt(arr[i]);\n sb.append(charArray[i]);\n }\n// String returnString = charArray.toString();\n// return returnString;\n return sb.toString();\n\n }", "public static int[] generateCode(int a[]) {\n int b[];\n\n // We find the number of parity bits required:\n int i = 0, parity_count = 0, j = 0, k = 0;\n while (i < a.length) {\n // 2^(parity bits) must equal the current position\n // Current position is (number of bits traversed + number of parity bits + 1).\n // +1 is needed since array indices start from 0 whereas we need to start from 1.\n\n if (Math.pow(2, parity_count) == i + parity_count + 1) {\n parity_count++;\n } else {\n i++;\n }\n }\n\n // Length of 'b' is length of original data (a) + number of parity bits.\n b = new int[a.length + parity_count];\n\n // Initialize this array with '2' to indicate an 'unset' value in parity bit locations:\n for (i = 1; i <= b.length; i++) {\n if (Math.pow(2, j) == i) {\n // Found a parity bit location.\n // Adjusting with (-1) to account for array indices starting from 0 instead of 1.\n\n b[i - 1] = 2;\n j++;\n } else {\n b[k + j] = a[k++];\n }\n }\n for (i = 0; i < parity_count; i++) {\n // Setting even parity bits at parity bit locations:\n\n b[((int) Math.pow(2, i)) - 1] = getParity(b, i);\n }\n return b;\n }", "private String[] fixStringArray(String[] input) {\n\n List<String> loutput = new ArrayList<String>();\n\n for (String st : input) {\n if (!\"\".equalsIgnoreCase(st)) {\n loutput.add(st);\n }\n }\n String[] output = new String[loutput.size()];\n for (int i = 0; i < loutput.size(); i++) {\n output[i] = loutput.get(i);\n }\n return output;\n }", "public static int[] finalPermutation(int[] inputText){\n\t\tint[] permutedText = new int[64];\n\t\tfor(int i = 0; i < 8; i++){\n\t\t\tpermutedText[i*8 + 0] = inputText[39 - i];\n\t\t\tpermutedText[i*8 + 1] = inputText[ 7 - i];\n\t\t\tpermutedText[i*8 + 2] = inputText[47 - i];\n\t\t\tpermutedText[i*8 + 3] = inputText[15 - i];\n\t\t\tpermutedText[i*8 + 4] = inputText[55 - i];\n\t\t\tpermutedText[i*8 + 5] = inputText[23 - i];\n\t\t\tpermutedText[i*8 + 6] = inputText[63 - i];\n\t\t\tpermutedText[i*8 + 7] = inputText[31 - i];\n\t\t}\n\t\treturn permutedText;\n\t}", "void shuffleArray(String[] ar) {\n for (int i = ar.length - 1; i > 0; i--) {\n int index = rnd.nextInt(i + 1);\n // Simple swap\n String a = ar[index];\n ar[index] = ar[i];\n ar[i] = a;\n }\n }", "private void shrink() {\n int shrinkSize = array.length>>1;\n array = Arrays.copyOf(array, shrinkSize);\n }", "public void scramble(){\r\n for (int i = 0; i < data.length / 2; i++){\r\n int randomIndex1 = (int)(Math.random()*(data.length - 1));\r\n int randomIndex2 = (int)(Math.random()*(data.length - 1));\r\n swap(randomIndex1, randomIndex2);\r\n }\r\n }", "public int[] swapTwoBit(int[] input) {\n input[0] = input[0] ^ input[1];\n input[1] = input[0] ^ input[1];\n input[0] = input[0] ^ input[1];\n return input;\n }", "public static byte[] convertAndScramble(final boolean reverse, final String to_scramble)\n\t{\n\t\treturn array(basicScramble(stringtoBinary(to_scramble), reverse).toString());\n\t}", "public static int[] reverse(int[] array) {\n\n int length = array.length;\n int[] result = new int[length];\n\n\n for (int j = length - 1; j >= 0; j--) {\n\n result[j] = array[length - j - 1];\n\n }\n\n System.out.println(\"reverse\");\n print(result);\n\n return result; // this must be replaced by correct code\n }", "public static void arraySwaping(int array[]) {\r\n\r\n\t\tint temp, randInt;\r\n\r\n\t\tRandom rand = new Random();\r\n\r\n\t\tfor (int i = 0; i < array.length; i++) {\r\n\r\n\t\t\trandInt = rand.nextInt(array.length);\r\n\r\n\t\t\ttemp = array[i];\r\n\t\t\tarray[i] = array[randInt];\r\n\t\t\tarray[randInt] = temp;\r\n\r\n\t\t}\r\n\r\n\t}", "private int[] compact(int[] arr, int len) {\n assert arr != null;\n assert U.isNonDecreasingArray(arr, len);\n\n if (arr.length <= 1)\n return U.copyIfExceeded(arr, len);\n\n int newLen = 1;\n\n for (int i = 1; i < len; i++) {\n if (arr[i] != arr[newLen - 1])\n arr[newLen++] = arr[i];\n }\n\n return U.copyIfExceeded(arr, len);\n }", "public static int[] ArrayCopy(int[] inputArray){\n int[] copy=new int[inputArray.length];\n for (int i=0;i<inputArray.length;i++){\n copy[i]=inputArray[i];\n }\n return copy;\n }", "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 }", "public int[] shuffle() {\n\t\t\tif (originalArr == null)\n\t\t\t\treturn null;\n\t\t\tint randomArr[] = originalArr.clone();\n\t\t\tfor (int i = 1; i < originalArr.length; i++) {\n\t\t\t\tint newIndex = random.nextInt(i + 1);\n\t\t\t\tswap(i, newIndex, randomArr);\n\t\t\t}\n\t\t\treturn randomArr;\n\t\t}", "public int[] shuffle() {\n int[] result = reset();\n\n Random rand = new Random();\n for (int i = 0; i < result.length; i++) {\n int j = rand.nextInt(result.length - i) + i;\n int tmp = result[i];\n result[i] = result[j];\n result[j] = tmp;\n }\n return result;\n }", "private String[] reqArray(String[] originalArray, String[] resultArray) {\n\n int ind = 0;\n\n for (int i = 0; i < originalArray.length; i++) {\n if (originalArray[i] != null) {\n resultArray[ind] = originalArray[i];\n ind++;\n }\n }\n return resultArray;\n }", "public static <T> void shuffle(T[] array){\n Random rnd = ThreadLocalRandom.current();\n for (int i = array.length - 1; i > 0; i--)\n {\n int index = rnd.nextInt(i + 1);\n // Simple swap\n T a = array[index];\n array[index] = array[i];\n array[i] = a;\n }\n }", "public static <T> void shuffle(T[] array){\n Random rnd = ThreadLocalRandom.current();\n for (int i = array.length - 1; i > 0; i--)\n {\n int index = rnd.nextInt(i + 1);\n // Simple swap\n T a = array[index];\n array[index] = array[i];\n array[i] = a;\n }\n }", "public int[] shuffle() {\n\t\tRandom r = new Random();\n\t\tfor (int i = 0; i < this.nums.length; i++) {\n\t\t\tint index = r.nextInt(this.nums.length);\n\t\t\tif (i != index) {\n\t\t\t\tnums[i] = nums[i] ^ nums[index];\n\t\t\t\tnums[index] = nums[i] ^ nums[index];\n\t\t\t\tnums[i] = nums[i] ^ nums[index];\n\t\t\t}\n\t\t}\n\t\treturn nums;\n\t}", "Actor[] shuffle(Actor[] array) {\n for (int i = array.length; i > 0; i--) {\n int k = rand.nextInt(i);\n Actor tmp = array[k];\n array[k] = array[i - 1];\n array[i - 1] = tmp;\n }\n return array;\n }", "private static void shuffleArray(final int[] a) {\n for (int i = 1; i < a.length; i++) {\n int j = random.nextInt(i);\n int temp = a[i];\n a[i] = a[j];\n a[j] = temp;\n }\n }", "public static String [] randomizeArray(String[] array){\n Random rgen = new Random(); // Random number generator\n\n for (int i=0; i<array.length; i++) {\n int randomPosition = rgen.nextInt(array.length);\n String temp = array[i];\n array[i] = array[randomPosition];\n array[randomPosition] = temp;\n }\n\n return array;\n }", "protected static String[] copy (String[] array)\n {\n String[] copy = new String[array.length];\n System.arraycopy(array, 0, copy, 0, array.length);\n return copy;\n }", "static void shuffleArray(String[] ar) {\n Random rnd = new Random();\n for (int i = ar.length - 1; i > 0; i--) {\n int index = rnd.nextInt(i + 1);\n // Simple swap\n String a = ar[index];\n ar[index] = ar[i];\n ar[i] = a;\n }\n }", "public int[] shitArrayValuesToFront(int[] arr){\n for(int i = 0; i < arr.length; i++){\n if(i == arr.length - 1){\n arr[i] = 0;\n }else{\n arr[i] = arr[i + 1];\n }\n }\n return arr;\n }", "public static int[] task4_dedup(int[] array) {\n\t\tif (array == null || array.length <= 1) {\n\t\t\treturn array;\n\t\t}\n\t\tLinkedList<Integer> st = new LinkedList<Integer>();\n\t\tst.offer(array[0]);\n\t\tint i = 1;\n\t\twhile (i < array.length) {\n\t\t\tif (!st.isEmpty() && array[i] == st.peek()) {\n\t\t\t\twhile (i < array.length && array[i] == st.peek()) {\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\t// pop out st.peek();\n\t\t\t\tst.poll();\n\t\t\t} else {\n\t\t\t\tst.push(array[i]);\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"st.size() == \" + st.size());\n\t\tint[] result = new int[st.size()];\n\t\tfor (int j = st.size() - 1; j >= 0; j--) {\n\t\t\tresult[j] = st.poll();\n\t\t}\n\t\tSystem.out.println(result.length);\n\t\t\n\t\tSystem.out.println(\"-----------------\");\n\t\tfor(int k = 0; k < result.length; k++) {\n\t\t\tSystem.out.print(result[k] + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"-----------------\");\n\t\treturn result;\n\t}", "public String scramble(String word)\n {\n int i, j;\n String SwappedString = \"\";\n String first, middle, last;\n int wordLength = word.length();\n for (int k = 0; k < wordLength; k++)\n {\n i = generator.nextInt(wordLength-1);\n j = i+1 + generator.nextInt(wordLength-i-1);\n first = word.substring(0,i);\n middle = word.substring(i+1,j);\n if (j != wordLength)\n {\n last = word.substring(j+1);\n }\n else\n {\n last = \"\";\n }\n SwappedString = first + word.substring(j, j + 1) + middle + word.substring(i, i + 1) + last;\n word = SwappedString;\n }\n return SwappedString;\n }", "private static void shuffleArray(int[] ar) {\n Random rnd = ThreadLocalRandom.current();\n for (int i = ar.length - 1; i > 0; i--) {\n int index = rnd.nextInt(i + 1);\n int a = ar[index];\n ar[index] = ar[i];\n ar[i] = a;\n }\n }", "protected static byte[] m5339a(byte[] bArr, int i) {\n if (bArr == null || bArr.length == 0) {\n return null;\n }\n int indexOf = new String(bArr).indexOf(0);\n if (indexOf <= 0) {\n i = 1;\n } else if (indexOf + 1 <= i) {\n i = indexOf + 1;\n }\n byte[] bArr2 = new byte[i];\n System.arraycopy(bArr, 0, bArr2, 0, i);\n bArr2[i - 1] = (byte) 0;\n return bArr2;\n }", "static long[] riddle(long[] arr) {\n // complete this function\n return arr;\n }", "public void flipHand(){\n int up = 0;\n int down = Hand.length-1;\n Card[] temp = new Card[Hand.length];\n for(int i=0;i<Hand.length;i++){\n temp[down]=Hand[up];\n up++;down--;\n }\n Hand=temp;\n }", "public int[] bubleSort(int[] a) {\n\n\tint temp = 0;\n\tfor (int i = 0; i < a.length - 1; i++) {\n\t\tfor (int j = a.length - 1; j > 0; j--) {\n\t\t\tif (a[j] < a[j - 1]) {\n\t\t\t\ttemp = a[j];\n\t\t\t\ta[j] = a[j - 1];\n\t\t\t\ta[j - 1] = temp;\n\t\t\t}\n\t\t}\n\t}\n\treturn a;\n\t}", "private int[] mutateScramble(int[] child) {\n println(\"Doing a scramble mutation\", 4);\n displayChromosome(child, 4);\n for(int r = 0; r < 3; r++) {\n child = mutateSwapChild(child);\n child = mutateInversionChild(child);\n }\n displayChromosome(child, 4);\n return child;\n }", "public void compact()\n {\n array = toArray();\n }", "public int[] reset() {\n\t\t\treturn originalArr;\n\t\t}", "private static String scramble(final String byte_, final boolean reverse)\n\t{\n\t\tStringBuilder builder = new StringBuilder(byte_);\n\t\tfor( int i = 0; i < byte_.length(); i ++)\n\t\t\tif(byte_.charAt(i) == ( !reverse ? BIT_ONE : BIT_ZERO))\n\t\t\t{\n\t\t\t\tbuilder.setCharAt(i, ( !reverse ? BIT_ZERO : BIT_ONE));\n\t\t\t\treturn builder.toString();\n\t\t\t}\n\t\treturn null;\n\t}", "private static int flipArray(char [] dest, int start, int e, int w){\n int r;\n if (w > start) {\n // shift, assume small buffer size so don't use arraycopy\n r = w;\n w = start;\n while (r < e) {\n dest[w++] = dest[r++];\n }\n } else {\n w = e;\n }\n return w;\n }", "public static int[] selectionShuffle(int[] arr) { \n int temp;\n int idx;\n for(int i = 0; i < arr.length; i ++){\n idx = (int) (Math.random() * arr.length);\n temp = arr[i];\n arr[i] = arr[idx];\n arr[idx] = temp;\n }\n return arr;\n }", "private static String[] resetStringArray() {\n String[] st = new String[L_MAX];\n L = 2 << 8;\n W = 9;\n int i;\n // initialize symbol table with all 1-character strings\n for (i = 0; i < R; i++)\n st[i] = \"\" + (char) i;\n st[i++] = \"\"; // (unused) lookahead for EOF\n return st;\n }", "private int[] shuffle() {\n int len = data_random.length;\n Random rand = new Random();\n for (int i = 0; i < len; i++) {\n int r = rand.nextInt(len);\n int temp = data_random[i];\n data_random[i] = data_random[r];\n data_random[r]=temp;\n }\n return data_random;\n }", "private static int[] reverseArray(int[] inputs) {\n for(int i =0; i < inputs.length/2; i++) {\n int tmp = inputs[i];\n int nextPosition = (inputs.length - i) -1;\n inputs[nextPosition] = tmp;\n }\n return inputs;\n }", "public String[] removeEmptySpacesInArray(String[] arrayToClean){\n\t\t\n\t\tArrayList<String> stringList = new ArrayList<String>();\n\t\tfor(String theString : arrayToClean){\n\t\t\t\n\t\t\tif(theString != \"-1\" && theString != \"\")\n\t\t\t\tstringList.add(theString);\n\t\t\t\n\t\t}\n\t\t\n\t\treturn stringList.toArray(new String[stringList.size()]);\n\t\t\n\t}", "static void shuffleArray(int[] ar) {\n Random rnd = new Random();\n for (int i = ar.length - 1; i > 0; i--) {\n int index = rnd.nextInt(i + 1);\n // Simple swap\n int a = ar[index];\n ar[index] = ar[i];\n ar[i] = a;\n }\n }", "public static int[] prc(int[] arr,int p)\r\n {\n char[][] barr=new char[arr.length][];\r\n /*for(int i=0;i<barr.length;i++)\r\n barr[i] = new StringBuilder(\"\");*/\r\n int[] onesarr=new int[barr.length];\r\n int odd,even;\r\n odd=even=0;\r\n for(int i=0;i<arr.length;i++)\r\n {\r\n barr[i]=(Integer.toBinaryString(p^arr[i])).toCharArray();\r\n }\r\n\r\n /*for(int i=0;i<barr.length;i++)\r\n System.out.print(barr[i]+\" \");\r\n System.out.println();*/\r\n /*for(int i=0;i<barr.length;i++)\r\n {\r\n char[] tmp=new char[barr[i].length()];\r\n barr[i].getChars(0, barr[i].length(), tmp, 0);\r\n int t=0;\r\n for(int j=0;j<tmp.length;j++)\r\n {\r\n if(tmp[j]=='1')\r\n t++;\r\n }\r\n onesarr[i]=t;\r\n }*/\r\n for(int i=0;i<barr.length;i++)\r\n {\r\n int t=0;\r\n for(int j=0;j<barr[i].length;j++)\r\n {\r\n if(barr[i][j]=='1')\r\n t++;\r\n }\r\n onesarr[i]=t;\r\n }\r\n /*for(int i=0;i<onesarr.length;i++)\r\n System.out.print(onesarr[i]+\" \");\r\n System.out.println();*/\r\n for(int i=0;i<onesarr.length;i++)\r\n {\r\n if(onesarr[i]%2==0)\r\n even++;\r\n else\r\n odd++;\r\n }\r\n int[] ansarr=new int[2];\r\n ansarr[0]=even;\r\n ansarr[1]=odd;\r\n return ansarr; \r\n }", "private static int[] reverseArray(int[] arr) {\n int n = arr.length;\n int[] revertedArray = new int[n];\n int j = n;\n\n for (int value : arr) {\n revertedArray[j - 1] = value;\n j = j - 1;\n }\n\n return revertedArray;\n }", "public String scramble(String wordToScramble){\n\t\tString scrambled = \"\";\n\t\tint randomNumber;\n\n\t\tboolean letter[] = new boolean[wordToScramble.length()];\n\n\t\tdo {\n\t\t\trandomNumber = generator.nextInt(wordToScramble.length());\n\t\t\tif(letter[randomNumber] == false){\n\t\t\t\tscrambled += wordToScramble.charAt(randomNumber);\n\t\t\t\tletter[randomNumber] = true;\n\t\t\t}\n\t\t} while(scrambled.length() < wordToScramble.length());\n\n\t\tif(scrambled.equals(wordToScramble))\n\t\t\tscramble(word);\n\n\t\treturn scrambled;\n\t}", "public static void reverse(byte[] array) {\n if (array == null) {\n return;\n }\n int i = 0;\n int j = array.length - 1;\n byte tmp;\n while (j > i) {\n tmp = array[j];\n array[j] = array[i];\n array[i] = tmp;\n j--;\n i++;\n }\n }", "public static void reverseInSameArray(int[] array) {\n\n int length = array.length;\n\n for (int i = 0; i < length / 2; i++) {\n swap(array, i, length / 2);\n\n }\n\n System.out.println(\"reverseInSameArray\");\n print(array);\n }", "public int[] shuffle() {\n int[] shuffled = new int[length];\n for (int i = 0; i < length; i++)\n shuffled[i] = nums[i];\n for (int i = 0; i < length; i++) {\n int randomIndex = (int) (Math.random() * length);\n int temp = shuffled[i];\n shuffled[i] = shuffled[randomIndex];\n shuffled[randomIndex] = temp;\n }\n return shuffled;\n }", "public static void shuffle(int[] array)\n {\n int n = array.length;\n for (int i = 0; i < n; i++)\n {\n // choose index uniformly in [0, i]\n //explicit conversion to int\n int r = (int) (Math.random() * (i + 1));\n swap(array,r,i);\n }\n }", "private static String scramble(String text) {\n try {\n MessageDigest md = MessageDigest.getInstance(\"SHA-1\");\n md.update(text.getBytes(\"UTF-8\"));\n StringBuffer sb = new StringBuffer();\n for (byte b : md.digest()) sb.append(Integer.toString(b & 0xFF, 16));\n return sb.toString();\n } catch (UnsupportedEncodingException e) {\n return null;\n } catch (NoSuchAlgorithmException e) {\n return null;\n }\n }", "public int[] shuffle() {\n\n Random random = new Random();\n int posizioneRandom;\n int i = 0;\n int[] shuffleArray = new int[soluzione.length];\n\n while(i < soluzione.length){\n\n posizioneRandom = random.nextInt(soluzione.length);\n\n if(shuffleArray[posizioneRandom] == 0){\n\n shuffleArray[posizioneRandom] = soluzione[i];\n i++;\n }\n\n continue;\n\n\n }\n\n soluzione = shuffleArray;\n\n return soluzione;\n\n }", "public int[] shuffle() {\n int[] res = new int[nums.length];\n int r;\n for (int i = 0; i < nums.length; i++) {\n r = random.nextInt(i + 1);\n res[i] = res[r];\n res[r] = nums[i];\n }\n\n\n return res;\n }", "private String[] shrinkArray(String[] largeArray)\n\t{\n\t\tint counter = 0;\n\t\t\n\t\twhile(largeArray[counter] != null)\n\t\t{\n\t\t\t++counter;\n\t\t}\n\t\t\n\t\tString[] tempArray = new String[counter];\n\t\t\n\t\tfor(int i = 0; i < tempArray.length; ++i)\n\t\t{\n\t\t\ttempArray[i] = largeArray[i];\n\t\t}\n\n\t\treturn tempArray;\n\t}", "public static int[] breakArray(int[] myArray) {\n\n\t\t// System.out.println(\"myArray: \" + myArray.toString());\n\n\t\tif (myArray.length > 1) {\n\t\t\tint size = myArray.length;\n\t\t\tint newSize = size / 2;\n\n\t\t\tint[] a1 = new int[newSize];\n\t\t\tint[] a2 = new int[size - newSize];\n\n\t\t\t// Populate first array (a1)\n\t\t\tfor (int i = 0; i < newSize; i++) {\n\t\t\t\ta1[i] = myArray[i];\n\t\t\t}\n\n\t\t\t// Populate second array (a2)\n\t\t\tfor (int i = newSize; i < size; i++) {\n\t\t\t\ta2[i - newSize] = myArray[i];\n\t\t\t}\n\n\t\t\ta1 = breakArray(a1);\n\t\t\ta2 = breakArray(a2);\n\n\t\t\t// Call mergeSort to merge both arrays and sort them\n\t\t\tint[] rstArray = mergeSort(a1, a2);\n\n\t\t\treturn rstArray;\n\n\t\t} else {\n\t\t\treturn myArray;\n\t\t}\n\n\t}", "static void populateArray(int[] array) {\n\n Random r = new Random();\n\n for (int i = 0; i < array.length; i++) {\n\n array[i] = r.nextInt() % 100;\n\n if (array[i] < 0) array[i] = array[i] * -1;\n\n }\n\n }", "private void reset(){\n int j=0;\n for(int i=0; i<array.length; i++){\n if(j == itemCount) {return;}\n if(array[i]!=null){\n temp[j] = array[i];\n j++;\n }\n }\n }", "public static int[] shuffle(int[] deck){\n\t\tRandom rnd = new Random();\n\t for (int i = deck.length - 1; i > 0; i--)\n\t {\n\t int index = rnd.nextInt(i + 1);\n\t int a = deck[index];\n\t deck[index] = deck[i];\n\t deck[i] = a;\n\t }\n\t return deck;\n\t}", "protected static byte[] m5338a(byte[] bArr) {\n byte[] bArr2 = null;\n try {\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n GZIPOutputStream gZIPOutputStream = new GZIPOutputStream(byteArrayOutputStream);\n gZIPOutputStream.write(bArr);\n gZIPOutputStream.finish();\n gZIPOutputStream.close();\n bArr2 = byteArrayOutputStream.toByteArray();\n byteArrayOutputStream.close();\n return bArr2;\n } catch (Exception e) {\n return bArr2;\n }\n }", "public int[] shuffle() \n {\n List<Integer> al = new ArrayList(reset.length);\n //push all values of the original array onto an arraylist\n for(int i = 0; i < reset.length; i++)\n {\n al.add(reset[i]);\n }\n //shuffles the arraylist\n Collections.shuffle(al);\n return al.stream().mapToInt(Integer::intValue).toArray();\n }", "public static int[] reset() {\n nums = Arrays.copyOf(numsBackUp, numsBackUp.length);\n return nums;\n }", "private static void generateWorstUnsortArray(int[] array) {\n\n if (array.length == 2) {\n\n int swap = array[0];\n array[0] = array[1];\n array[1] = swap;\n } else if (array.length > 2) {\n\n int i, j;\n int m = (array.length + 1) / 2;\n int left[] = new int[m];\n int right[] = new int[array.length - m];\n\n for (i = 0, j = 0; i < array.length; i = i + 2, j++) {\n\n left[j] = array[i];\n }\n\n for (i = 1, j = 0; i < array.length; i= i + 2, j++) {\n\n right[j] = array[i];\n }\n\n generateWorstUnsortArray(left);\n generateWorstUnsortArray(right);\n merge(array, left, right);\n }\n }", "private static int[] post4(int[] input) {\n int indexFor = 0;\n for (int i = input.length - 1; i >= 0; i--) {\n if (input[i] == 4) {\n indexFor = i;\n break;\n }\n }\n // 1. done\n int size = input.length - indexFor - 1;\n // 2. done\n int[] output = new int[size];\n // 2.5. done\n /* for (int i = size - 1; i >= 0; i--) {\n output[i] = input[input.length + i - size];\n }*/\n for (int i = 0; i < size; i++) {\n output[i] = input[i + indexFor + 1];\n }\n // 3. done\n return output;\n }", "public int[] shuffle() {\n for (int i = nums.length - 1; i >= 0; i--) {\n swap(i, rnd.nextInt(i + 1));\n }\n \n return nums;\n }", "@Test\n public void reverseArray () {\n\n int[] input = {-2,5,-1,7,-3};\n int[] output = {-3,7,-1,5,-2};\n assertArrayEquals(output, Computation.reversal(input));\n\n }", "public static int[] duplicateReplacer(int[] arr) {\n for (int i = 0;i<arr.length;i++){\n for (int x = 0;x<i;x++){\n if (arr[x] == arr[i]) {\n arr[i] = -1;\n break;\n }\n }\n }\n return arr;\n }", "public int[] shuffle() {\n if (nums == null) {\n return null;\n }\n int[] a = nums.clone();\n for (int j = 1; j < a.length; j++) {\n // 类似蓄水池采样算法\n // i == j -> 1/(1+j)\n // j != j -> (1 - 1/(1+j)) * (1/j) = 1/(1/j)\n int i = random.nextInt(j + 1);\n swap(a, i, j);\n }\n return a;\n }", "void reset() {\n for (int i = 0; i < array.length; i++) {\n array[i] = -1;\n }\n }", "static void minimumBribes(int[] q) {\n \t\n \tfor(int i=0;i<q.length;i++){\n if((q[i] - (i+1)) > 2){\n System.out.println(\"Too chaotic\");\n return; \n }\n }\n \n int swaps=0;\n for(int i=0;i< q.length;i++){\n for(int j=i+1;j<q.length;j++){\n if(q[i] > q[j]){ \n int tmp=q[j];\n q[j]=q[i];\n q[i]=tmp;\n swaps++;\n }\n }\n }\n \n System.out.println(swaps);\n \n }", "public static int[] generatePalindrome(int[] a){\n\t\tint mid=a.length/2;\n\t\tint left,right;\n\t\tboolean isSmallest=false;\n\t\tif(a.length%2==0) {\n\t\t\tleft=mid-1;\n\t\t\tright=mid;\n\t\t}\n\t\telse {\n\t\t\tleft=mid-1;\n\t\t\tright=mid+1;\n\t\t}\n\t\twhile(left>=0 && a[left]==a[right]) {\n\t\t\tleft--;right++;\n\t\t}\n\t\tif(left<0 || a[left]<a[right])\n\t\t\tisSmallest=true;\n\t\t\n\t\tfor(;left>=0;left--,right++)\n\t\t\ta[right]=a[left];\n\t\t\t\n\t\tif(isSmallest) {\n\t\t\tint carry=1;\n\t\t\tint i=mid-1,j;\n\t\t\tif(a.length%2==0)\n\t\t\t\tj=mid;\n\t\t\telse {\n\t\t\t\ta[mid]+=carry;\n\t\t\t\tcarry=a[mid]/10;\n\t\t\t\ta[mid]%=10;\n\t\t\t\tj=mid+1;\n\t\t\t}\n\t\t\t\n\t\t\twhile(carry>0) {\n\t\t\t\ta[i]+=carry;\n\t\t\t\tcarry=a[mid]/10;\n\t\t\t\ta[i]%=10;\n\t\t\t\ta[j]=a[i];\n\t\t\t\tj++;i--;\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t}", "private static int[] reverse(int[] original) {\n int size = original.length;\n int[] reversed = new int[size];\n for(int i=0; i<size; i++) {\n reversed[i]= original[size - i-1];\n }\n return reversed;\n }", "public static int[] VolteaArrayInt(int[]array) {\n int aux;\n for (int i = 0; i < array.length / 2; i++) {\n aux = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = aux;\n }\n\n return array;\n }", "public int[] shuffle() {\r\n int max = nums.length - 1;\r\n for (int i = 0; i < nums.length; i++) {\r\n int index = new Random().nextInt(max)%(max - i + 1) + i;\r\n int tmp = nums[i];\r\n nums[i] = nums[index];\r\n nums[index] = tmp;\r\n }\r\n return nums;\r\n }", "private static void modifyArray(int[] array) {\n\t\t\n\t\tarray[0] = 99;\n\t\t\n\t\tarray = new int[5] ;\n\t\treturn;\n\t}", "public static ArrayList<char[]> generateBlackMovesOpening(char[] b) {\n\t\tArrayList<char[]> gbmList = new ArrayList<char[]>();\n\t\tArrayList<char[]> gbmswapList = new ArrayList<char[]>();\n\t\t// clone the char array\n\t\tchar[] tmp = b.clone();\n\t\t/*for (int i = 0; i < tmp.length; i++) {\n\t\t\tif (tmp[i] == 'W') {\n\t\t\t\ttmp[i] = 'B';\n\t\t\t} else if (tmp[i] == 'B') {\n\t\t\t\ttmp[i] = 'W';\n\t\t\t}\n\t\t}*/\n tmp=flipBoard(tmp);\n\t\tgbmList = generateAdd(tmp);\n\t\tfor (char[] gb : gbmList) {\n\t\t/*\tfor (int i = 0; i < gb.length; i++) {\n\t\t\t\tif (gb[i] == 'W') {\n\t\t\t\t\tgb[i] = 'B';\n\n\t\t\t\t} else if (gb[i] == 'B') {\n\t\t\t\t\tgb[i] = 'W';\n\t\t\t\t}\n\t\t\t}*/\n\t\t\t\n\t\t\tgbmswapList.add(flipBoard(gb));\n\t\t}\n\t\treturn gbmswapList;\n\t}", "private CoderResult decodeArrayLoop(ByteBuffer src, CharBuffer dst) {\n byte[] srcArray = src.array();\n int srcPosition = src.arrayOffset() + src.position();\n int srcLength = src.arrayOffset() + src.limit();\n\n char[] destArray = dst.array();\n int destPosition = dst.arrayOffset() + dst.position();\n int destLength = dst.arrayOffset() + dst.limit();\n int destLengthASCII = destPosition + Math.min(srcLength - srcPosition, destLength - destPosition);\n\n // ASCII only loop\n while (destPosition < destLengthASCII && srcArray[srcPosition] >= 0) {\n destArray[destPosition++] = (char) srcArray[srcPosition++];\n }\n\n while (srcPosition < srcLength) {\n int b1 = srcArray[srcPosition];\n if (b1 >= 0) {\n // 1 byte, 7 bits: 0xxxxxxx\n if (destPosition >= destLength) {\n return xflow(src, srcPosition, srcLength, dst, destPosition, 1);\n }\n destArray[destPosition++] = (char) b1;\n srcPosition++;\n } else if ((b1 >> 5) == -2) {\n // 2 bytes, 11 bits: 110xxxxx 10xxxxxx\n if (srcLength - srcPosition < 2 || destPosition >= destLength) {\n return xflow(src, srcPosition, srcLength, dst, destPosition, 2);\n }\n int b2 = srcArray[srcPosition + 1];\n if (isMalformed2(b1, b2)) {\n return malformed(src, srcPosition, dst, destPosition, 2);\n }\n destArray[destPosition++] = (char) (((b1 << 6) ^ b2) ^ 0x0f80);\n srcPosition += 2;\n } else if ((b1 >> 4) == -2) {\n // 3 bytes, 16 bits: 1110xxxx 10xxxxxx 10xxxxxx\n if (srcLength - srcPosition < 3 || destPosition >= destLength) {\n return xflow(src, srcPosition, srcLength, dst, destPosition, 3);\n }\n int b2 = srcArray[srcPosition + 1];\n int b3 = srcArray[srcPosition + 2];\n if (isMalformed3(b1, b2, b3)) {\n return malformed(src, srcPosition, dst, destPosition, 3);\n }\n destArray[destPosition++] = (char) (((b1 << 12) ^ (b2 << 6) ^ b3) ^ 0x1f80);\n srcPosition += 3;\n } else if ((b1 >> 3) == -2) {\n // 4 bytes, 21 bits: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx\n if (srcLength - srcPosition < 4 || destLength - destPosition < 2) {\n return xflow(src, srcPosition, srcLength, dst, destPosition, 4);\n }\n int b2 = srcArray[srcPosition + 1];\n int b3 = srcArray[srcPosition + 2];\n int b4 = srcArray[srcPosition + 3];\n int uc = ((b1 & 0x07) << 18) | ((b2 & 0x3f) << 12) | ((b3 & 0x3f) << 06) | (b4 & 0x3f);\n if (isMalformed4(b2, b3, b4) || !((uc >= 0x10000) && (uc <= 1114111))) {\n return malformed(src, srcPosition, dst, destPosition, 4);\n }\n destArray[destPosition++] = (char) (0xd800 | (((uc - 0x10000) >> 10) & 0x3ff));\n destArray[destPosition++] = (char) (0xdc00 | ((uc - 0x10000) & 0x3ff));\n srcPosition += 4;\n } else {\n return malformed(src, srcPosition, dst, destPosition, 1);\n }\n }\n return xflow(src, srcPosition, srcLength, dst, destPosition, 0);\n }", "private static int[] fix23(int[] arr) {\n int[] output = new int[3];\n for (int i = 0; i < arr.length-1; i++) {\n if (arr[i]==2 && arr[i+1]==3) {\n arr[i+1]=0;\n }\n\n }\n return arr;\n }", "public static void shuffle(int data[]) {\n\n }", "void reverseIterative(char arr[],int start) {\n // Your Logic Here\n for(int i=start;i<arr.length/2;i++)\n {\n if(arr[i] != arr[arr.length-1-i])\n {\n arr[i]^=arr[arr.length-1-i];\n arr[arr.length-1-i]^=arr[i];\n arr[i]^=arr[arr.length-1-i];\n }\n }\n}", "public static int[] removeFirstElement(int[] myArray) {\n\t\tint[] rst = new int[myArray.length - 1];\n\n\t\tfor (int i = 1; i < myArray.length; i++) {\n\t\t\trst[i - 1] = myArray[i];\n\t\t}\n\n\t\treturn rst;\n\t}" ]
[ "0.6041634", "0.60374045", "0.5592619", "0.55845875", "0.5527122", "0.5510946", "0.5509172", "0.534511", "0.5339594", "0.53259414", "0.5316918", "0.530075", "0.5264895", "0.5262622", "0.5248529", "0.5238772", "0.52311015", "0.5229928", "0.5217736", "0.52129495", "0.52096236", "0.5197645", "0.5185536", "0.51805854", "0.51750594", "0.51723754", "0.5170489", "0.51484764", "0.5148462", "0.5145359", "0.5125346", "0.51221", "0.51186395", "0.51124436", "0.51030797", "0.5101227", "0.5094398", "0.5094398", "0.5085341", "0.5076688", "0.50754833", "0.5064202", "0.5061231", "0.5055846", "0.5044277", "0.50372165", "0.5034879", "0.50347465", "0.5027806", "0.500911", "0.5005195", "0.498794", "0.49822995", "0.4979565", "0.49622506", "0.49538156", "0.49529272", "0.49486026", "0.49447864", "0.49334738", "0.49325192", "0.49317586", "0.4915107", "0.49109158", "0.49083245", "0.49072492", "0.4906409", "0.48830736", "0.4876437", "0.4875753", "0.48751548", "0.4871556", "0.48657048", "0.48634064", "0.48540273", "0.4838929", "0.48316407", "0.4819368", "0.48160103", "0.48101336", "0.48058325", "0.48050705", "0.4803502", "0.4802017", "0.48010063", "0.4800866", "0.47897738", "0.47816518", "0.47727442", "0.47710788", "0.4771064", "0.4764044", "0.4757506", "0.4757052", "0.4756285", "0.47529125", "0.47477615", "0.47474217", "0.4745894", "0.4732103" ]
0.5110373
34
method Show the content of an array.
public static void showStringArray(String[] arr) { System.out.println("..........................................."); for (int i = 0; i < arr.length; i++) { System.out.print(arr[i] + " "); } System.out.println(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showArray() {\n\t\tSystem.out.println(Arrays.toString(this.array));\n\n\t}", "private void displayArray() {\r\n System.out.println(\"CEK ARRAY : \");\r\n for (i = 0; i < array.length; i++) {\r\n System.out.print(array[i]+\",\");\r\n }\r\n }", "public static void displayValues(int [] array){\n System.out.println(Arrays.toString(array));\n }", "public void display()\r\n\t{\r\n\t\tif(this.isEmpty())\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Empty... nothing to display\");\r\n\t\t}else\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The Array: \");\t\r\n\t\tfor (int i =0; i<bookArray.length; i++)\r\n\t\t{\r\n\t\t\tif(bookArray[i]!=null)\r\n\t\t\t\tSystem.out.println(\"\\t\"+'\"'+bookArray[i]+'\"');\r\n\t\t}\r\n\t }\r\n\t}", "public void printArray()\n {\n for (int i=0;i<array.length; i++)\n {\n System.out.print(array[i] + \" \"); \n }\n System.out.println();\n }", "private static void Display(Cars[] arr) {\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tSystem.out.println(arr[i]);\n\n\t\t}\n\t}", "public static void Display(int[] array) {\n for(int i=0;i<array.length;i++){\n System.out.print(array[i]+\"\\t\");\n }\n System.out.println();\n }", "public void displayData(int[][] arr);", "private void displayArrays(ArrayList list){}", "@Override\n\tpublic String toString() {\n\t\treturn \"\\nContents of SimpleArray:\\n\" + Arrays.toString(array);\n\t}", "public static void MostrarArray(int array[]) {\n for (int i = 0; i < array.length; i++) {\n System.out.print(array[i] + \" | \");\n }\n System.out.println();\n }", "public static void displayArr(int[] a)\r\n {\r\n for(int i : a)\r\n System.out.print(i + \" \");\r\n System.out.println();\r\n }", "void printArray(CatalogueItem arr[])\r\n {\r\n int n = arr.length;\r\n for (int i=0; i<n; ++i)\r\n System.out.print(\r\n \"id: \" + arr[i].getItemId() + \" \"\r\n + \"name: \" + arr[i].getItemName() + \" \"\r\n + \"category: \" + arr[i].getCategory() + \"\\n\");\r\n System.out.println();\r\n System.out.println();\r\n }", "private static void show(Comparable[] a) {\n for (int i = 0; i < a.length; i++) {\n System.out.printf(\"a[%d] = %s\\n\", i + 1, a[i].toString());\n }\n System.out.println();\n }", "public static void printArray(int[] array){\n for(int i=0;i<array.length;i++){\n System.out.print(array[i]+\" \");\n }}", "public static void printArray(int[] array){\n\n for(int i = 0 ; i < array.length; i++){\n System.out.println(\"Element \" + i + \", value is \" + array[i]);\n }\n\n }", "public String toString()\n\t{\n\t\tSystem.out.print(\"Array list contains: [ \");\n\t\tfor(int i=0; i<size; i++)\n\t\t\tSystem.out.print(myArray[i]+ \", \");\n\t\treturn\" ]\";\n\t}", "public void displayArray(Cell[][] cells);", "public static void printArray(int[] array) {\r\n\t\tSystem.out.print(\"4. All values stored in the array is: \");\r\n\t\tfor (int i = 0; i < myList.length; i++) {\r\n\t\t\tSystem.out.print(myList[i] + \" \");\r\n\t\t}\r\n\t}", "public void display() {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tSystem.out.print(a[i] + \"\\t\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void ShowArr(int Arr[], int Length){\n\t\tfor(int i=0; i<Length; i++){\n\t\t\tSystem.out.print(Arr[i] + \" \");\n\t\t}\n\t}", "public void printArrays() {\n for (ArraySymbol as: arrays) {\n System.out.println(as);\n }\n }", "public static void display(int[] intArray) {\n for (int i = 0; i < intArray.length; i++)\n System.out.println(intArray[i]);\n }", "public static void show(int[][] arr) {\n\t\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\t\tfor(int j=0;j<arr.length;j++) {\n\t\t\t\t\tSystem.out.print(arr[i][j]+\"\\t \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}", "private static void printArray(Object[] array) {\n for (Object t : array) {\n System.out.println(\" \" + t + \", \");\n }\n }", "private void showArray(ArrayList<String[]> arr) {\n for(String[] row: arr){\n for(String x: row){\n System.out.print(x + \"\\t\\t\");\n }\n System.out.println();\n } \n System.out.println(\"------------------------------------\");\n }", "private static void display(int[] arr) {\n\t\tif (null != arr && arr.length > 0) {\n\t\t\tfor (int n : arr) {\n\t\t\t\tSystem.out.print(n + \" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t}", "protected static void show(Comparable[] a) {\n\t\t\r\n\t\tString retStr = \"\";\r\n\t\tfor(int i=0 ; i< a.length; i++)\r\n\t\t\tretStr+=\" \"+a[i];\r\n\t\t\r\n\t\tSystem.out.println(retStr);\r\n\t\t\r\n\t}", "public static void showArray(String varname, int[] array1) {\n\t\t\n\t\tSystem.out.println(\"---- Elements of \" + varname + \" -----\");\n\t\t\n\t\t// Length gives the number of elements in the array\n\t\tSystem.out.println(varname + \" contains \" + array1.length + \" elements\");\n\t\tint i = 0;\n\t\tfor(int elem: array1) {\n\t\t\tSystem.out.println(\" [\" + i++ + \"] = \" + elem);\n\t\t}\n\t}", "public void display()\n {\n System.out.println(�\\n The elements are�);\n for(int i=0; i<n; i++)\n System.out.println(� �+a[i]);\n }", "private static void printArray(int[] arr) {\n\t\tSystem.out.println(\"array is \");\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tSystem.out.print(arr[i]+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t}", "static void printArray(int[] array) {\n\n\n for (int i = 0; i < array.length; i++) {\n\n System.out.print(array[i] + \" \");\n\n\n }\n\n System.out.println();\n\n }", "public static void printArray(int[] array)\r\n {\r\n //Loop through array and print each individual element\r\n for (int n=0; n < array.length; ++n)\r\n {\r\n System.out.println(array [n]); \r\n \r\n }\r\n \r\n }", "@Override\n public String toString() {\n return \"array read on \" + System.identityHashCode(array) + \"; index=\" + index + \"; stream=\" + getStream().getStreamNumber();\n }", "public static void printIntArray(int[] array){\n for(int i = 0; i < array.length; i++)\n System.out.print(\"[\" + i + \"]\" + \" = \" + array[i] + \" \");\n }", "public static <E> void showArrayList(ArrayList<E> arr)\n {\n System.out.println(\"...........................................\");\n\n for (int i = 0; i < arr.size(); i++)\n {\n System.out.format(\"\\nElement #%d = [%s]%n\", i, arr.get(i).toString());\n } //for\n\n System.out.println();\n\n\n }", "public String display(){\n StringBuilder str = new StringBuilder();\n\n for(int i = 0; i < 3; ++i){\n if( Array[i] != null ) {\n str.append('\\n' + Names[i] + '\\n');\n str.append(Array[i].display());\n }\n }\n return str.toString();\n }", "public static void showArray(String[] a) {\n for (int row=0; row<a.length; row++) {\n Logger.print(a[row] + \" \");\n }\n Logger.print(\"\\n\");\n }", "public static <T> void printArray(T[] array){\n for(int i=0;i<array.length;i++){\n System.out.println(array[i]);\n }\n }", "public void displayData(String[] str);", "private static <T> void show(Comparable<T>[] a) {\n\t\tfor(int i=0; i<a.length; i++) \r\n\t\t\tSystem.out.print(a[i] + \" \");\r\n\t\tSystem.out.println();\r\n\t}", "public void print()\n\t{\n\t\tStringBuffer print = new StringBuffer();\n\t\tif (arraySize != 0)\n\t\t{\n\t\t\tfor (int index = 0; index < arraySize - 1; index++) \n\t\t\t{ \n\t\t\t\tprint.append(array[index] + \", \");\n\t\t\t}\n\t\t\tprint.append(array[arraySize - 1]);\n\t\t\tSystem.out.println(print.toString());\n\t\t}\n\t}", "public static void printArray(int[] array) {\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.print(\"array = [\");\r\n\t\tfor (int i=0; i < SIZE_OF_ARRAY-1; i++)\r\n\t\t\tSystem.out.print(\"\"+ array[i]+\" | \");\r\n\t\tSystem.out.println(\"\"+ array[SIZE_OF_ARRAY-1]+\"]\");\r\n\t\tSystem.out.println(\"-------------------------------------------------\"\r\n\t\t\t\t+ \"-------------------\");\r\n\t}", "private static void printArray(int[] array) {\n\t\tif(array==null){\n\t\t\tSystem.out.println(\"Nothing in the array.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint Len = array.length;\n\t\tfor(int i=0; i<Len; i++){\n\t\t\tSystem.out.print(\" \" + array[i]);\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}", "public void printArray(int array[]) {\n\t\tfor(int i = 0;i<array.length;i++) {\n\t\t\tSystem.out.println(\"Array[\"+ (i+1) +\"] = \"+array[i]);\n\t\t}\n\t}", "public static void showArrayValue(int arrayParameter[]){\r\n\t\t\tfor(int arrayElement:arrayParameter){\r\n\t\t\t\tSystem.out.println(arrayElement);\r\n\t\t\t}\r\n\t\t}", "public static void mostrararray(int[] miarray) {\r\n\r\n\t\tfor (int i = 0; i < miarray.length; i++) {\r\n\r\n\t\t\tSystem.out.print(miarray[i] + \" \");\r\n\r\n\t\t}\r\n\r\n\t}", "public static void printArray(String[] dataArray) {\n\t\t\n\t\tif (dataArray == null) {\n\t\t\tSystem.out.print(\"Empty Array\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint length = dataArray.length;\n\t\t\n\t\tSystem.out.print(\"\\nData: \\n\");\n\t\tSystem.out.print(\"Number of Entries: \" + (length) + \" \\n\");\n\t\t\n\t\tfor (int i = 0; i < length ; i++) { \n\t\t\tSystem.out.print(dataArray[i].toString() + \"\\t\");\n\t\t}\n\t\tSystem.out.print(\"\\n\");\n\t}", "public static <T extends Comparable<? super T>> void show(T[] a) {\n for (int i = 0; i < a.length; i++)\n System.out.print(a[i] + \" \");\n System.out.println();\n }", "static void printArray(Comparable[] arr) {\n\t\tint n = arr.length;\n\t\tfor (int i = 0; i < n; ++i)\n\t\t\tSystem.out.print(arr[i] + \" \");\n\t\tSystem.out.println();\n\t}", "public static void display(int [] a)\n\t\t{\n\t\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\t\tSystem.out.print(a[i] + \" \");\n\t\t\t\t\n\t\t\t\t\n\t\t\t}System.out.println();\n\t}", "public void display(){\n \tfor(int i=0;i<size;i++){\n \tSystem.out.print(elements[i]+\" \");\n \t}\n\t}", "public static void printArray(int[] arr) {\n System.out.println(\"===\");\n for (int i = 0; i < arr.length; i++) {\n System.out.println(arr[i]);\n }\n System.out.println(\"===\");\n }", "public static void printArray(int[] array) {\n \n for (int i = 0; i < array.length; i++) {\n \n System.out.println(\"array[\" + i + \"] = \" + array[i]);\n }\n }", "public static void show(Comparable[] a) {\n StringBuilder s= new StringBuilder();\n s.append(\"[\");\n for (int i = 0; i < a.length-1; i++) {\n s.append(a[i] + \", \");\n }\n s.append(a[a.length-1] + \"]\\n\");\n System.out.println(s.toString());\n }", "private static void printArray(Integer[] a) {\n\t\tfor (int k = 0; k < a.length; k++) {\n\t\t\tSystem.out.print(a[k] + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t}", "private static void printIntArray(int[] arr){\n\t\tSystem.out.print(\"[ \");\n\t\tfor(Integer i : arr){\n\t\t\tSystem.out.print(i + \" \");\n\t\t}\n\t\tSystem.out.println(\" ]\");\n\t}", "public static void printArray(double[] array) {\r\n\r\n for (int i = 0; i < array.length; i++) {\r\n System.out.print(\"[\" + array[i] + \"] \");\r\n }\r\n System.out.println(\"\");\r\n }", "private static void printArray(int[] array) {\n\t\tfor(int i: array) {\n\t\t\tSystem.out.print(i + \"\\t\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void printArray(int [] array) {\n\t\t\n\t\tfor(int i =0; i<array.length; i++) {\n\t\t\tSystem.out.print(array[i] + \" \");\n\t\t}\n\t}", "public void show() {\r\n\t\tfor (Carta carta: baraja) {\r\n\t\t\tSystem.out.println(carta);\r\n\t\t}\r\n\t}", "public static void printArray( int[] a ) {\n System.out.print(\"[\");\n for( int i : a )\n System.out.print( i + \",\");\n System.out.println(\"]\");\n }", "public static void printArray( int[] a ) {\n System.out.print(\"[\");\n for( int i : a )\n System.out.print( i + \",\");\n System.out.println(\"]\");\n }", "public static void printArray(int[] arr)\n {\n int i;\n // your code goes here\n for(i = 0;i< arr.length;i++)\n {\n\t\t System.out.println(arr[i]);\n }\n \n \n }", "static void printArray(int[] arr) {\n for (int item : arr) {\n System.out.print(item+ \" \");\n }\n }", "private static void printArray(int[] a) {\n\t\tfor (int k = 0; k < a.length; k++) {\n\t\t\tSystem.out.print(a[k] + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public static void printArray(Object[][] dataArray) {\n\t\t\n\t\tif (dataArray == null) {\n\t\t\tSystem.out.print(\"Empty Array\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint rows = dataArray.length;\n\t\tint cols = dataArray[0].length;\n\t\t\n\t\tSystem.out.print(\"\\nData: \\n\");\n\t\tSystem.out.print(\"Number of Rows: \" + (rows) + \" \\n\");\n\t\tSystem.out.print(\"Number of Columns: \" + (cols) + \" \\n\\n\");\n\t\n\t\tfor (int i = 0; i < rows ; i++) { \n\t\t\tfor (int j = 0; j < cols; j++) {\n\t\t\t\tSystem.out.print(dataArray[i][j].toString() + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}\n\t}", "public String toString() {\n int iMax = array.length - 1;\n if (iMax == -1)\n return \"[]\";\n\n StringBuilder b = new StringBuilder();\n b.append('[');\n for (int i = 0; ; i++) {\n b.append(getRaw(byteOffset(i)));\n if (i == iMax)\n return b.append(']').toString();\n b.append(',').append(' ');\n }\n }", "@Override\n public void run() {\n\tInteger[] array1 = {1,2,3};\n\tString[] array2 = {\"Vipul\",\"Ankita\"};\n\tprint(array1);\n\tprint(array2);\n\t\n }", "public static void printArray(int[] arr) {\n String output = \"[ \";\n for (int i = 0; i < arr.length; i++) {\n if (i != 0) {\n output += \", \" + arr[i];\n }\n else {\n output += arr[i];\n }\n }\n output += \" ]\";\n System.out.println(output);\n }", "public void printArray(){\n\n\t\tfor (int i=0;i<1;i++){\n\n\t\t\tfor (int j=0;j<population[i].getLength();j++){\n\n\t\t\t\tSystem.out.println(\"X\" + j + \": \" + population[i].getX(j) + \" \" + \"Y\"+ j + \": \" + population[i].getY(j));\n\t\t\t\tSystem.out.println();\n\n\t\t\t}//end j\n\n\t\t\tSystem.out.println(\"The duplicate count is: \" + population[i].duplicateCheck());\n\t\t\tSystem.out.println(\"The fitness is \" + population[i].computeFitness());\n\t\t\t//population[i].computeFitness();\n\n\t\t}//end i\n\n\t}", "static void printArray(int arr[]) \n\t { \n\t\t int n = arr.length; \n\t\t for (int i=0; i<n; ++i) \n\t\t\t System.out.print(arr[i] + \" \"); \n\t\t System.out.println(); \n\t }", "public static void printArray( int[] a ) {\n\tSystem.out.print(\"[\");\n\tfor( int i : a )\n\t System.out.print( i + \",\");\n\tSystem.out.print(\"]\");\n }", "public static void printArray(Cell[] arr) {\r\n\t\tConstants.logger.info(\"\\nWhole Field as single Array[\");\r\n\t\tfor (int j = 0; j < arr.length; j++) {\r\n\t\t\tSystem.out.print(arr[j]);\r\n\t\t}\r\n\t\tConstants.logger.info(\"]\\n\");\r\n\t}", "@Override\n public String toString() {\n String arrString = \"\";\n \n //loop to add all the elements\n for (int i = 0; i < this.array.length; i++) {\n arrString = arrString + \" \" + this.array[i];\n }\n \n return arrString;\n }", "public static void printArray( int[] a ) {\n\tSystem.out.print(\"[\");\n\tfor( int i : a )\n\t System.out.print( i + \",\");\n\tSystem.out.println(\"]\");\n }", "private static void show(Comparable[] a) {\n for (Comparable a1 : a)\n System.out.print(a1 + \" \");\n\n System.out.println();\n }", "@Override\n\tpublic String toString() {\n\t\tString s = \"\";\n\t\ts += \"[\";\n\t\tif (size() > 0) {\n\t\t\ts += arr[0];\n\t\t\tfor (int i = 1; i < arr.length; i++) {\n\t\t\t\ts += \", \" + arr[i];\n\t\t\t}\n\t\t}\n\t\ts += \"]\";\n\t\treturn s;\n\t}", "private void display(int[] array) {\n\t\tfor(int unique: array) {\n\t\t\tSystem.out.println(unique);\n\t\t}\n\t}", "public void printArray(int[] arr) {\n int n = arr.length;\n for (int i = 0; i < n; i++) {\n System.out.print(arr[i] + \" \");\n }\n }", "public static void printArray(int[] array)\n {\n for (int value : array)\n System.out.print(value + \" \");\n System.out.println();\n }", "public String toString()\n\t{\n\t\t// For empty array\n\t\tif(length() < 1)\n\t\t\tSystem.out.print(\"\");\n\t\tString output = \"\";\n\n\t\tfor(int index = 0; index < length(); index++)\n\t\t{\n\t\t\toutput = output + data[index];\n\t\t\tif(index+1 < length())\n\t\t\t{\n\t\t\t\toutput = output + \" \";\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}", "public static void displayArray(Participant[] participantArray)\n {\n for(int x = 0; x < participantArray.length; ++x)\n System.out.println(\"\\nParticipant #\" + (x + 1) +\n participantArray[x].toString());\n }", "static void print(int[] array)\n\t{\n\t\tfor(int i = 0; i < array.length; i++)\n\t\t{\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\t}", "public synchronized String toString()\n\t{\n\t\treturn Arrays.toString(array);\n\t}", "public void displayFirst() {\r\n\t\tSystem.out.println(\"The first in Array: \" +this.bookArray[0]);\r\n\t\t\r\n\t\t}", "public static void printArray(int[] array) {\n\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tSystem.out.print(array[i] + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public static void printArray(int[] a) {\n System.out.print(\"{\" + a[0]);\n for (int i = 1; i < a.length; i++) {\n System.out.print(\", \" + a[i]);\n }\n System.out.println(\"}\");\n }", "public static void printArray(String[] array){\n int noOfElement=array.length; // Number of element is the length of this array\n for(int i=0;i<array.length;i++){ // print out the each element in array with \" \"(space) splitting\n System.out.print(array[i]+\" \");}}", "public void printAll(){\nfor(int i=0;i<size ;i++){\n System.out.println(\"a[%d]\"+data[i]); \n}\n System.out.println(\"size\"+size); \n}", "public void printArray(long[] array) {\n System.out.println(Arrays.toString(array));\n }", "static void printArray(int arr[]) {\n int n = arr.length;\n for (int i = 0; i < n; ++i)\n System.out.print(arr[i] + \" \");\n \tSystem.out.println();\n }", "static void printArray(int arr[])\n {\n int n = arr.length;\n for (int i=0; i<n; ++i)\n System.out.print(arr[i]+\" \");\n System.out.println();\n }", "static void printArray(int arr[]) \n { \n for (int i = 0; i < arr.length; i++) \n System.out.print(arr[i] + \" \"); \n }", "public void PrintArray(People[] people){\n\t\tif(people == null){\n\t\t\treturn;\n\t\t}\n\t\tfor(int i=0;i<people.length;i++){\n\t\t\tSystem.out.println(people[i].age+\" \"+people[i].height);\n\t\t}\n\t}", "@Override\n public final String toString() {\n final int[] temp = new int[size];\n for (int i = 0; i < size; i++) {\n temp[i] = arrayList[i];\n }\n return Arrays.toString(temp);\n }", "private static void printArray(Node[][] puzzle) {\r\n\t\tfor (int i = 0; i < puzzle.length; i++) {\r\n\t\t\tfor (int j = 0; j < puzzle[0].length; j++) {\r\n\t\t\t\tSystem.out.print(puzzle[i][j].getValue());\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\r\n\t}", "public static void printArray(int[] a) {\n for (int el : a) {\n System.out.print(el + \" \");\n }\n System.out.println();\n }", "static void printArray(int arr[])\n {\n int n = arr.length;\n for (int i=0; i<n; ++i)\n System.out.print(arr[i] + \" \");\n System.out.println();\n }", "static void printArray(int arr[]) {\n\t\tint n = arr.length;\n\t\tfor (int i = 0; i < n; ++i)\n\t\t\tSystem.out.print(arr[i] + \" \");\n\t\tSystem.out.println();\n\t}" ]
[ "0.8293718", "0.7543752", "0.7257897", "0.7122195", "0.7065836", "0.70106393", "0.70090246", "0.6970034", "0.69536525", "0.6871642", "0.6857518", "0.6847874", "0.6821754", "0.67869216", "0.67666036", "0.67613673", "0.67105955", "0.67013615", "0.6676508", "0.66759914", "0.6657467", "0.66398346", "0.66157234", "0.6606693", "0.6605785", "0.66008127", "0.658313", "0.6545897", "0.6542627", "0.65391505", "0.65248585", "0.65245557", "0.65222025", "0.65218073", "0.6520227", "0.65185344", "0.65170157", "0.65122515", "0.6510668", "0.6506925", "0.65023595", "0.64991385", "0.6496369", "0.649592", "0.64942837", "0.64779663", "0.6471635", "0.6468541", "0.64640194", "0.64552325", "0.64374906", "0.6416267", "0.6368229", "0.63662386", "0.6358578", "0.63532156", "0.6340666", "0.6339874", "0.6337325", "0.633454", "0.63024807", "0.63012445", "0.63012445", "0.6292467", "0.6285594", "0.6284799", "0.6282134", "0.6279139", "0.6276566", "0.6272874", "0.6266864", "0.62661254", "0.62646157", "0.6263453", "0.6260332", "0.6258005", "0.6253134", "0.62514627", "0.62477463", "0.6244491", "0.62306", "0.6219572", "0.6217429", "0.6207205", "0.6195059", "0.6188208", "0.6187012", "0.6185261", "0.61801964", "0.6179805", "0.6176189", "0.61734813", "0.617149", "0.6161562", "0.61559826", "0.6141311", "0.6137407", "0.6128074", "0.6126033", "0.6122495" ]
0.6678793
18
method show the content of an array list.
public static void showDoubleArray(double[][] arr) { System.out.println("..........................................."); for (int i = 0; i < arr.length; i++) { for (int j = 0; j < arr[0].length; j++) { System.out.print(arr[i][j] + " "); } System.out.println(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void displayArrays(ArrayList list){}", "private static void displayList(ArrayList list) {\n System.out.println(\"The list contains \" + list.getCurrentSize()\n + \" string(s), as follows:\");\n Object[] listArray = list.toArray();\n for (int index = 0; index < listArray.length; index++) {\n System.out.print(listArray[index] + \" \");\n } // end for\n System.out.println();\n }", "public static <E> void showArrayList(ArrayList<E> arr)\n {\n System.out.println(\"...........................................\");\n\n for (int i = 0; i < arr.size(); i++)\n {\n System.out.format(\"\\nElement #%d = [%s]%n\", i, arr.get(i).toString());\n } //for\n\n System.out.println();\n\n\n }", "public void display()\n {\n for (int i = 0; i < length; i++)\n {\n System.out.print(list[i] + \" \");\n }\n\n System.out.println();\n }", "public void viewList() {\n\t\tSystem.out.println(\"Your have \" + contacts.size() + \" contacts:\");\n\t\tfor (int i=0; i<contacts.size(); i++) {\n\t\t\tSystem.out.println((i+1) + \". \" \n\t\t\t\t\t+ contacts.get(i).getName() + \" number: \" \n\t\t\t\t\t+ contacts.get(i).getPhoneNum());\n\t\t}\n\t}", "public void printData(){\n for(int i=0; i<list.size(); i++){\n System.out.print(list.get(i) + \" \");\n }\n System.out.println();\n }", "public static void displayList(ExtendedListInterface aList) throws ListException {\r\n Object dataItem;\r\n\r\n for (int index = 1; index < aList.size(); index++){\r\n dataItem = aList.get(index);\r\n System.out.print(dataItem + \", \");\r\n }\r\n if (aList.size() >= 1) {\r\n dataItem = aList.get(aList.size());\r\n System.out.println(dataItem + \".\");\r\n } else {\r\n throw new ListException(\"displayList on an empty list\");\r\n }\r\n }", "private void showArray() {\n\t\tSystem.out.println(Arrays.toString(this.array));\n\n\t}", "public String toString()\n\t{\n\t\tSystem.out.print(\"Array list contains: [ \");\n\t\tfor(int i=0; i<size; i++)\n\t\t\tSystem.out.print(myArray[i]+ \", \");\n\t\treturn\" ]\";\n\t}", "private void showArrayAdaptView() {\n\t\tPersonAdapt personAdapt = new PersonAdapt(this, persons, R.layout.listview_item);\n\t\tlistView.setAdapter(personAdapt);\n\t}", "public String[] displayContents() {\n String[] contents = new String[this.items.size()];\n for (int i = 0; i < this.items.size(); i++) {\n contents[i] = this.items.get(i).getName();\n }\n return contents;\n }", "@Override\n\tpublic void printContent(List<Object> stingList) {\n\t\t\n\t}", "public void show_book()\n\t{\n\t\tsize=arr.size();\n\t\tif(size>0)\n\t\t{\n\t\t\t\n\t\t\tSystem.out.println(\"===========================================================\");\n\t\t\tSystem.out.println(\"Address Book List\");\n\t\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\t\tint i=1;\n\n\t\t\t//Special loop:= For Each loop for array list\n\t\t\tfor(String x: arr)\n\t\t\t{\n\t\t\t\tSystem.out.println(i+\". \"+x);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"No data Found\");\n\t\t}\n\t}", "public static void showD(ArrayList<ArrayList<String>> data){\n\t\tfor(int i = 0; i<data.get(0).size(); i++){\r\n\t\t\tfor(int j = 0; j<data.size(); j++){\r\n\t\t\t\tSystem.out.print(data.get(j).get(i));\r\n\t\t\t\tSystem.out.print(\"\\t\");\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"\\n\");\r\n\t\t}\r\n\t\treturn;\r\n\t}", "private void showArray(ArrayList<String[]> arr) {\n for(String[] row: arr){\n for(String x: row){\n System.out.print(x + \"\\t\\t\");\n }\n System.out.println();\n } \n System.out.println(\"------------------------------------\");\n }", "public void display(){\n \tfor(int i=0;i<size;i++){\n \tSystem.out.print(elements[i]+\" \");\n \t}\n\t}", "public static final SourceModel.Expr showList(SourceModel.Expr list) {\n\t\t\treturn \n\t\t\t\tSourceModel.Expr.Application.make(\n\t\t\t\t\tnew SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.showList), list});\n\t\t}", "public void showPatientList()\r\n\t{\n\t\tfor(int i=0; i<nextPatientLocation; i++)\r\n\t\t{\r\n\t\t\tString currentPositionPatientData = arrayPatients[i].toString();\r\n\t\t\tSystem.out.println(\"Patient \" + i + \" is \" + currentPositionPatientData);\r\n\t\t}\r\n\t}", "public void displayAsList()\n\t{\n\t\tSystem.out.println(\"Printing all vertices\");\n\t\tvertices.show();\n\t}", "void showSublist()\n {\n System.out.println(subs);\n }", "public void display()\r\n\t{\r\n\t\tif(this.isEmpty())\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Empty... nothing to display\");\r\n\t\t}else\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The Array: \");\t\r\n\t\tfor (int i =0; i<bookArray.length; i++)\r\n\t\t{\r\n\t\t\tif(bookArray[i]!=null)\r\n\t\t\t\tSystem.out.println(\"\\t\"+'\"'+bookArray[i]+'\"');\r\n\t\t}\r\n\t }\r\n\t}", "private static void listFormat() {\n\t\tSystem.out.println(\"List of all your movies\");\n\t\tSystem.out.println(\"=======================\");\n\t\tfor (int i = 0; i < movList.size(); i++) {\n\t\t\tSystem.out.println(movList.get(i));\n\t\t}\n\t}", "private void displayListView() {\n\t\tArrayList<FillterItem> fillterList = new ArrayList<FillterItem>();\n\n\t\tfor (int i = 0; i < province.length; i++) {\n\t\t\tLog.i(\"\", \"province[i]: \" + province[i]);\n\t\t\tFillterItem fillter = new FillterItem();\n\t\t\tfillter.setStrContent(province[i]);\n\t\t\tfillter.setSelected(valueList[i]);\n\t\t\t// add data\n\t\t\tfillterList.add(fillter);\n\t\t}\n\n\t\t// create an ArrayAdaptar from the String Array\n\t\tdataAdapter = new MyCustomAdapter(getContext(),\n\t\t\t\tR.layout.item_fillter_header, fillterList);\n\n\t\t// Assign adapter to ListView\n\t\tlistView.setAdapter(dataAdapter);\n\n\t}", "public String toString() {\n if (size > 0) {\n String display = \"[\";\n for (int i = 0; i < size - 1; i++) {\n display += list[i] + \",\";\n } display += list[size - 1] + \"]\";\n return display;\n }\n return \"[]\";\n }", "public void printList(){\n System.out.println(\"Printing the list\");\n for(int i = 0; i<adjacentcyList.length;i++){\n System.out.println(adjacentcyList[i].value);\n }\n }", "@Override\n public final String toString() {\n final int[] temp = new int[size];\n for (int i = 0; i < size; i++) {\n temp[i] = arrayList[i];\n }\n return Arrays.toString(temp);\n }", "public void listar() {\n\t\t\n\t}", "public void print()\n {\n for (int i=0; i<list.length; i++)\n System.out.println(i + \":\\t\" + list[i]);\n }", "public void display() {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tSystem.out.print(a[i] + \"\\t\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void displayList() {\n\n\t\tIterator<SimplePacket> itr = list.iterator();\n\n\t\twhile(itr.hasNext()) {\n\t\t\tSimplePacket packet = itr.next();\n\t\t\tif(!packet.isValidCheckSum()){\n\t\t\t\tSystem.out.print(\"[\" + packet.getSeq() + \"], \");\n\t\t\t}else{\n\t\t\t\tSystem.out.print(packet.getSeq() + \", \");\n\t\t\t}\n\t\t}\n\t}", "private void displayArray() {\r\n System.out.println(\"CEK ARRAY : \");\r\n for (i = 0; i < array.length; i++) {\r\n System.out.print(array[i]+\",\");\r\n }\r\n }", "public static void printList(ArrayList list) {\n String output = \"[ \";\n for (int i = 0; i < list.size(); i++) {\n if (i != 0) {\n output += \", \" + list.get(i);\n }\n else {\n output += list.get(i);\n }\n }\n output += \" ]\";\n System.out.println(output);\n }", "private void showList() {\n select();\n //create adapter\n adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, studentInfo);\n //show data list\n listView.setAdapter(adapter);\n }", "public void show() {\r\n\t\tfor (Carta carta: baraja) {\r\n\t\t\tSystem.out.println(carta);\r\n\t\t}\r\n\t}", "private static void printArray(ArrayList<Integer> list) {\n for (int i : list) {\n System.out.println(i * 3);\n }\n\n }", "public static <E> void showArrayList(ArrayList<E> arr, String msg)\n {\n System.out.println(msg);\n showArrayList(arr);\n\n }", "@Override\n\tpublic boolean showInList()\n\t{\n\t\treturn true;\n\t}", "@Override\n public String toString() {\n return list.toString();\n }", "public void arrayList(List<Student> list)\r\n\t{\r\n\t\tlist.add(s1);\r\n\t\tlist.add(s2);\r\n\t\tlist.add(s3);\r\n\t\tlist.add(s4);\r\n\t\tlist.add(s5);\r\n\t\tlist.add(s6);\r\n\t\tSystem.out.println(\"Objects of ArrayList\");\r\n\t\tfor(int i=0;i<list.size();i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(list.get(i));\r\n\t\t}\r\n\t}", "public String toString(){\n\t\t// Si la liste est vide\n\t\tif(this.nb == 0){\n\t\t\treturn \"[]\";\n\t\t}\n\t\tString retour = \"[\" + this.liste[0];\n\t\tfor(int i = 1 ; i < this.nb ; i++){\n\t\t\tretour += \", \" + this.liste[i];\n\t\t}\n\t\tretour += \"]\";\n\t\t\n\t\treturn retour;\n\t}", "public void displayList (String [] list, int count, String message){\n \n //Print utiliy\n System.out.println(\"\\n\\t\" + message);\n for (int i = 0; i < count; i++){\n System.out.println(\"\\t\" + (i+1) + \"\\t\" + list[i]);\n }//End for loop\n \n }", "@Override\r\n public String toString() {\r\n String output = \"[ \";\r\n for (int i = 0; i < count; i++) {\r\n output += list[i] + \", \";\r\n }\r\n if (count > 0) {\r\n output = output.substring(0, output.length() - 2);\r\n } else {\r\n output = output.substring(0, output.length() - 1);\r\n }\r\n output += \" ]\";\r\n return output;\r\n }", "public void showList(){\n\n List<Integer> lst1 = new ArrayList<Integer>();\n\n lst1.add(2);\n lst1.add(6);\n lst1.add(4);\n lst1.add(8);\n lst1.add(2);\n\n System.out.println(\"**********************************\");\n System.out.println(\"Arraylist:\" + lst1);\n\n //faster to add and remove\n List<Integer> lst2 = new LinkedList<Integer>();\n\n lst2.add(2);\n lst2.add(6);\n lst2.add(4);\n lst2.add(8);\n lst2.add(2);\n\n System.out.println(\"LinkedList: \" + lst2);\n System.out.println(\"********************************\");\n\n }", "public void printFormParticularIndex(ArrayList<Object> ar1) {\n\t\tSystem.out.println(\"To get value from particular index: \" + ar1.get(1));\n\t}", "public void showListData() {\n List<Operator> operators = operatorService.queryAll();\n String[][] datas = new String[operators.size()][8];\n for (int i = 0; i < datas.length; i++) {\n datas[i][0] = operators.get(i).getId().toString();\n datas[i][1] = operators.get(i).getName();\n datas[i][2] = operators.get(i).getSex();\n datas[i][3] = operators.get(i).getAge().toString();\n datas[i][4] = operators.get(i).getIdentityCard();\n datas[i][5] = operators.get(i).getWorkDate().toString();\n datas[i][6] = operators.get(i).getTel();\n datas[i][7] = operators.get(i).getAdmin().toString();\n }\n operatorManagetable.setModel(new DefaultTableModel(\n datas, new String[]{\"编号\", \"用户名\", \"性别\", \"年龄\", \"证件号\", \"工作时间\", \"电话号码\", \"是否为管理员\"}\n ));\n scrollPane1.setViewportView(operatorManagetable);\n }", "void printList();", "public void displayElements(MyList<Integer> m){\n\t\t//-----------------------------\n\t\t//SET OF OPS\n\t\t//-----------------------------\n\n\t\t//-----------------------------\n\t\t// I. SCENARIO IDENTIFICATION\n\t\t//-----------------------------\n\t\tint scenario = 0; \n\n\t\t//Rule 1. MyList is empty\n\t\tif (m.length() == 0) \n\t\t\tscenario = 1;\n\t\t//Rule 2. MyList is non-empty\n\t\telse\n\t\t\tscenario = 2;\n\n\t\t//-----------------------------\n\t\t// II. SCENARIO IMPLEMENTATION \n\t\t//-----------------------------\n\t\tswitch(scenario){\t\n\n\t\t//Rule 1. MyList is empty\n\t\tcase 1: \n\t\t\t//1. We print the empty message\n\t\t\tSystem.out.println(\"Empty MyList\");\n\n\t\t\tbreak;\n\n\t\t\t//Rule 2. MyList is non-empty\n\t\tcase 2: \n\t\t\t//1. We print the initial message\n\t\t\tint size = m.length();\n\t\t\tSystem.out.print(\"MyList has \" + size + \" items: [\");\n\n\t\t\t//2. We traverse the items\n\t\t\tfor (int i = 0; i < size - 1; i++)\n\t\t\t\tSystem.out.print(m.getElement(i) + \", \");\n\t\t\tSystem.out.println(m.getElement(size - 1) + \"]\");\n\n\t\t\tbreak;\n\n\t\t}\n\n\t}", "@Override\n public String toString()\n {\n StringBuilder builder = new StringBuilder();\n builder.append('[');\n for (Object item : list)\n {\n builder.append(item.toString());\n builder.append(\", \");\n }\n builder.append(']');\n return builder.toString();\n }", "public void printFormatedList()\r\n{\r\n System.out.println(\"[\");\r\n for(int i = 0; i < JustifiedList.size(); i++)\r\n {\r\n System.out.println(\"\\\"\" + JustifiedList.get(i) + \"\\\"\");\r\n }\r\n System.out.println(\"]\");\r\n}", "void printArray(CatalogueItem arr[])\r\n {\r\n int n = arr.length;\r\n for (int i=0; i<n; ++i)\r\n System.out.print(\r\n \"id: \" + arr[i].getItemId() + \" \"\r\n + \"name: \" + arr[i].getItemName() + \" \"\r\n + \"category: \" + arr[i].getCategory() + \"\\n\");\r\n System.out.println();\r\n System.out.println();\r\n }", "public void displayData(int[][] arr);", "public static void printToScreen(List<String> list1){\n\t\tJOptionPane.showMessageDialog(null, \"ArrayList has \" + list1.size() + \" Names\");\n\t\tJOptionPane.showMessageDialog(null, \"Here is the List \" + list1);\n\t}", "private static void showContacts(List<Contact> contactList) {\r\n\t\tcontactList.forEach(System.out::println);\r\n\t}", "@Override\n\tpublic int getCount()\n\t{\n\t\treturn arrayList.size();\n\t}", "public abstract ArrayList<String[]> toStrings();", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tFileInputStream fileInputStream = new FileInputStream(\"G:\\\\Prog\\\\arraylist.txt\");\n\t\t\tint i;\n\t\t\twhile((i = fileInputStream.read()) != -1)\n\t\t\t{\n\t\t\t\tSystem.out.print((char)i);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfileInputStream.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\n\t\n\tList l = new ArrayList();\n\t l.toArray();\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic int getCount() {\n\t\treturn arrayList.size();\r\n\t}", "private static void showList(StringBuffer aBuf,\n String[] aItems, String aStartTag, String aEndTag) {\n aBuf.append(aStartTag).append(NEW_LINE);\n for (int i=0; i<aItems.length; i++) {\n appendLI(aBuf, aItems[i]);\n }\n aBuf.append(aEndTag).append(NEW_LINE);\n}", "public void display()\n {\n System.out.println(�\\n The elements are�);\n for(int i=0; i<n; i++)\n System.out.println(� �+a[i]);\n }", "@Override\n\tpublic int getCount() {\n\t\treturn arrayList.size();\n\t}", "@Override\n\tpublic int getCount() {\n\t\treturn arrayList.size();\n\t}", "public void displayData(String[] str);", "public void list(){\n //loop through all inventory items\n for(int i=0; i<this.items.size(); i++){\n //print listing of each item\n System.out.printf(this.items.get(i).getListing()+\"\\n\");\n }\n }", "private void viewList() {\r\n PrintListMenuView listMenu = new PrintListMenuView();\r\n listMenu.displayMenu();\r\n }", "public static void printList(){\n ui.showToUser(ui.DIVIDER, \"Here are the tasks in your list:\");\n for (int i=0; i<Tasks.size(); ++i){\n Task task = Tasks.get(i);\n Integer taskNumber = i+1;\n ui.showToUser(taskNumber + \".\" + task.toString());\n }\n ui.showToUser(ui.DIVIDER);\n }", "public void list()\n {\n for(Personality objectHolder : pList)\n {\n String toPrint = objectHolder.getDetails();\n System.out.println(toPrint);\n }\n }", "private static void displayItems()\n {\n System.out.println(\"\\n\\tCurrent List of Products in the Store:\\n\");\n for(Sales s : store)\n System.out.println(s.toString());\n }", "private void printArrayList(ArrayList<String> printThis) {\n for(int i = 0; i < printThis.size(); i++) {\n System.out.print(printThis.get(i) + \"\\t\");\n }\n\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"\\nContents of SimpleArray:\\n\" + Arrays.toString(array);\n\t}", "@FXML\n\tprivate void onLoadLogClicked(){\n\n\t\tSystem.out.print(list);\n\t\tString showup = \"\";\n\t\tfor (int index = 0; index < list.size(); index++) {\n\t\t\tshowup += list.get(index)+\" & \"+dat.get(index);\n\t\t\tshowup += \"\\n\";\n\t\t}\n\t\ttextArea.setText(showup);\n\t}", "@Override\n public int getCount() {\n return arrlist.size();\n }", "@Override\n public int getCount() {\n return arrlist.size();\n }", "@Override\n public String toString() {\n return \"ArrayTaskList{\" +\n \"list=\" + Arrays.toString(list) +\n \", currentPos=\" + currentPos +\n \", listLength=\" + listLength +\n '}';\n }", "private void cargarLista(ArrayList<CarritoDTO> arrayList)\n {\n DefaultListModel modelo = new DefaultListModel();\n //Recorrer el contenido del ArrayList\n for(int i=0; i<arrayList.size(); i++) \n {\n CarritoDTO item =(CarritoDTO) arrayList.get(i);\n //Añadir cada elemento del ArrayList en el modelo de la lista\n modelo.add(i, item.toString());\n }\n //Asociar el modelo de lista al JList\n jList1.setModel(modelo);\n }", "private static void testAdd(ArrayList list, int[] content) {\n System.out.print(\"Adding to the list: \");\n for (int index = 0; index < content[index]; index++) {\n list.addToEnd(content);\n } // end for\n System.out.println();\n displayList(list);\n }", "public void show() {\r\n\t\tSystem.out.println(\"Id \\t Name \\t Address\");\r\n\t\t\r\n\t\tfor (int index = 0; index < emp.size(); index++) {\r\n\t\t\tSystem.out.println(emp.get(index).empId + \"\\t\" + emp.get(index).name +\"\\t\" + emp.get(index).adress);\r\n\t\t}\r\n\t}", "public String toString()\n {\n String s = \"\";\n for (int i=0; i<list.length; i++)\n s += i + \":\\t\" + list[i] + \"\\n\";\n return s;\n }", "static void print(List list)\r\n\t{\n\t\tfor(int i= 0; i < list.size(); i++){\r\n\t\t\tSystem.out.println(list.get(i));\r\n\t\t}\r\n\t}", "private void listExample()\n\t{\n\n\t\tArrayList <String> alist = new ArrayList<String>();//doesn't have to be string- can be Duck, or Mouse, or Apostrophe\n\t\talist.add(\"banana\"); //adds \"banana\" to the end of the list\n\t\talist.add(\"strawberry\");\n\t\talist.add(\"blueberry\");\n\t\talist.add(\"blackberry\");\n\t\t\n\t\tJOptionPane.showMessageDialog(null,alist);\n\t\t\n\t\talist.add(2, \"apple\"); //adds it in spot 2 (3rd position)\n\t\t\n\t\tJOptionPane.showMessageDialog(null,alist);\n\t\t\n\t\t\n\t\talist.remove(\"blueberry\"); \n\t\t/**\n\t\t * .remove returns what was in the spot that was just taken out--and shrinks down by one\n\t\t * .set also returns this value but it replaces the value with something else\n\t\t */\n\t\talist.remove(0); //removes 1st element\n\t\tJOptionPane.showMessageDialog(null,alist);\n\t\t\n\t\tfor (String str:alist)\n\t\t\tJOptionPane.showMessageDialog(null, str); //shows each individually\n\t\t\n\t\talist.set(1, \"coconut\"); //alist.set(index, element) --replaces\n\t\t\n\t\tint numberOfItems = alist.size();\n\t\talist.clear();\n\n\t\n\t}", "public ArrayList<String> a(ArrayList<View> arrayList) {\n ArrayList<String> arrayList2 = new ArrayList<>();\n int size = arrayList.size();\n for (int i = 0; i < size; i++) {\n View view = arrayList.get(i);\n arrayList2.add(p.e(view));\n p.a(view, (String) null);\n }\n return arrayList2;\n }", "private static void showList(List<String> list, int offsetX, int offsetY) {\r\n\t\tfor (int i = 1; i <= list.size(); i++) {\r\n\t\t\tGAME.drawTextScreen(offsetX, offsetY + (LINE_HEIGHT * i), list.get(i - 1));\r\n\t\t}\r\n\t}", "@Override\n public String toString(){\n String result = \"\";\n for(int i = 0; i < numItems; i++){\n result += arr[i] + \" \";\n }\n return result;\n }", "public String list() {\n final StringBuilder list = new StringBuilder(\"Here are the tasks in your list:\\n\\t\");\n records.forEach((el) -> list.append(\n String.format(\"%1$d. %2$s \\n\\t\",\n records.indexOf(el) + 1, el.toString())));\n return list.toString();\n }", "public static void listToPrint() {\r\n for (int i = 0; i < ListeElem.size(); i++) {\r\n ListeElem.get(i).toPrint();\r\n }\r\n\r\n }", "public void print_list() {\n \t \n \t//define current node as\n \t node<Type> current_node = new node<>();\n \t \n \t //now keep for loop and print the answer\n \t current_node = head;\n \t \n \t //print first element\n \t System.out.println(current_node.show_element());\n \t \n \t //now run for loop\n \t for (int i = 1 ; i <= len - 1 ; i ++) {\n \t\t \n \t\t //change current node\n \t\t current_node = current_node.show_next();\n \t\t \n \t\t //just print the answer\n \t\t System.out.println(current_node.show_element());\n \t }\n }", "@Override\r\n\tpublic void showList() {\n\t\tSystem.out.println(\"I am a MAC list\");\r\n\t}", "public void printAll(){\nfor(int i=0;i<size ;i++){\n System.out.println(\"a[%d]\"+data[i]); \n}\n System.out.println(\"size\"+size); \n}", "public String toString() {\n\t\treturn list.toString();\n\t}", "public String getDataAsString()\n\t{\n\t\tString listAsString = \"\";\n\t\t\n\t\tfor (int i = 0; i < list.length; i++)\n\t\t{\n\t\t\tlistAsString += list[i] + \" \";\n\t\t}\n\t\t\n\t\tlistAsString += \"\\nFront: \" + front + \"\\nRear: \" +\n\t\t\t\trear + \"\\nEntries: \" + counter;\n\t\t\n\t\treturn listAsString;\n\t}", "public List<String> viewExams() {\n List<String> list = new ArrayList<>();\n if (examList.size() == 0) {\n list.add(\"No Exams have been created yet!\");\n } else {\n for (int i = 0; i < examList.size(); i++) {\n String entry = (i + 1) + \".\" + examList.get(i).toString();\n list.add(entry);\n }\n }\n return list;\n }", "protected void showList(String[] convertLis) {\n sL.register(null, \"INFO\", \"Successful - showList - start\");\n for (int j = convertLis.length - 1; j >= 0; j-- ) {\n listConverting.getListModel().addElement(convertLis[j]);\n }\n sL.register(null, \"INFO\", \"Successful - showList - finished\");\n }", "@Override\n public String toString() {\n return \"SimpleArrayList{\"\n + \"values=\" + Arrays.toString(values)\n + '}';\n }", "public void displayData();", "private static void showList(ArrayList<? extends Machine> list) {\n System.out.println(\"In showlist method\");\n for(Machine machine: list) {\n System.out.println(machine);\n }\n\n }", "void showFacts(List<Fact> facts);", "public String display(){\n StringBuilder str = new StringBuilder();\n\n for(int i = 0; i < 3; ++i){\n if( Array[i] != null ) {\n str.append('\\n' + Names[i] + '\\n');\n str.append(Array[i].display());\n }\n }\n return str.toString();\n }", "public void show() {\n numberList.show();\n }", "public static void showNodeArrayList(ArrayList<Node> arr)\n {\n for (int i = 0; i < arr.size(); i++)\n {\n Node node = arr.get(i);\n System.out.format(\"Element #%d = [%s]%n\", i, node.getNodeID());\n } //for\n\n }", "@Override\n public void showListOfAudioFiles(ArrayList<AudioModel> audioModelArrayList) {\n }", "public static void printContactList()\n {\n if(myList.size() < 1)\n System.out.println(\"~empty list~\");\n else\n {\n System.out.println(\"Current Items\");\n System.out.println(\"-------------\");\n for(int i = 0; i < myList.size(); i++)\n {\n System.out.printf(i+\")\");\n Item itemPrint = myList.get(i);\n itemPrint.printItem(itemPrint.getFirstName(), itemPrint.getLastName(), itemPrint.getPhoneNumber(), itemPrint.getEmail());\n }\n }\n }", "public S<T> list(String[] data){\n\t\tif(t instanceof ListView){\n\t\t\t\n\t\t\t((ListView) t).setAdapter(new ArrayAdapter<String>(activity,\n\t\t android.R.layout.simple_list_item_1, android.R.id.text1, data));\n\t\t}\n\t\treturn this;\n\t}" ]
[ "0.80565214", "0.72794485", "0.6774054", "0.664965", "0.6575048", "0.6529514", "0.6470372", "0.6445237", "0.6406743", "0.6352501", "0.6270823", "0.6262646", "0.62527835", "0.62398005", "0.6212774", "0.6204973", "0.61948156", "0.6185194", "0.61632067", "0.6142287", "0.61299276", "0.60963213", "0.6092055", "0.6062058", "0.60579544", "0.60528755", "0.60458803", "0.6035733", "0.60321635", "0.6030074", "0.6027708", "0.60263306", "0.6020302", "0.60167605", "0.59994596", "0.5993302", "0.5978091", "0.5971012", "0.59558547", "0.59519476", "0.5945913", "0.5941557", "0.5939915", "0.5939503", "0.59265834", "0.59224606", "0.591512", "0.589726", "0.58956605", "0.5857208", "0.58420384", "0.5833531", "0.58315074", "0.5831038", "0.5827874", "0.57976305", "0.5795035", "0.57873124", "0.57856107", "0.5780845", "0.5780845", "0.5780735", "0.57782537", "0.5774336", "0.57704633", "0.5769175", "0.5764547", "0.576031", "0.57452595", "0.5744618", "0.57295007", "0.57295007", "0.57272565", "0.57147944", "0.57121956", "0.5707798", "0.5705244", "0.57008934", "0.57007605", "0.5697824", "0.5696635", "0.569015", "0.5689777", "0.5685514", "0.5677598", "0.56716293", "0.5671268", "0.5671191", "0.56689197", "0.56627256", "0.56507033", "0.56483006", "0.56433296", "0.56386596", "0.56181043", "0.561612", "0.56122553", "0.561001", "0.56062937", "0.5604426", "0.5598621" ]
0.0
-1
method Divide the given array list into two half and return them in the given array lists.
public static <E> void divideArrIntoHalfArr( ArrayList<E> inArr, ArrayList<E> halfOneArr, ArrayList<E> halfTwoArr) { int size = inArr.size() / 2; for (int i = 0; i < size; i++) halfOneArr.add(inArr.get(i)); for (int i = size; i < inArr.size(); i++) halfTwoArr.add(inArr.get(i)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void merge(ArrayList<Integer> arrayList, int p, int q, int r){\n ArrayList<Integer> lowHalf = new ArrayList<>();\r\n ArrayList<Integer> topHalf = new ArrayList<>();\r\n\r\n int k = p;\r\n int i;\r\n int j;\r\n\r\n //Values from original array entered into the new arrays\r\n for (i = 0; k <= q; i++, k++) {\r\n lowHalf.add(i, arrayList.get(k));\r\n }\r\n for (j = 0; k <= r; j++, k++) {\r\n topHalf.add(j, arrayList.get(k));\r\n }\r\n\r\n\r\n k = p;\r\n i = 0;\r\n j = 0;\r\n\r\n\r\n while (i < lowHalf.size() && j < topHalf.size()) {\r\n if (lowHalf.get(i) < topHalf.get(j)) {\r\n arrayList.set(k, lowHalf.get(i));\r\n i++;\r\n } else {\r\n arrayList.set(k, topHalf.get(j));\r\n j++;\r\n }\r\n k++;\r\n }\r\n\r\n while (i < lowHalf.size()) {\r\n arrayList.set(k, lowHalf.get(i));\r\n k++;\r\n i++;\r\n }\r\n while (j < topHalf.size()) {\r\n arrayList.set(k, topHalf.get(j));\r\n k++;\r\n j++;\r\n }\r\n }", "public static int[] Divide (int[] ar)\n\t{\n\t if(ar.length<= 1)//that means we're done dividing the array\n\t {\n\t\t return ar; \n\t }\n\t int middle = ar.length/2;//dividing the array \n\t int [] left = new int [middle]; //this will be the left side of new array\n\t int [] right; //this will be the right side of new array but we need to know if the array's length is even or odd number\n\t if(ar.length %2 ==0)//if the length is even\n\t {\n\t\t right = new int [middle]; //if the length is even\n\t }\n\t else\n\t {\n\t\t right = new int [middle+1];//if the length is odd\n\t }\n\t int [] result = new int [ar.length];//this will be the new array after dividing\n\t \n\t for(int i=0;i<middle;i++)//fill the left side from 0 to the middle point\n\t {\n\t\t left[i]=ar[i];\n\t }\n\t for(int j=middle; j <ar.length;j++)//fill the right side from middle point which will have 0 to the end of array\n\t {\n\t\t int k =0; \n\t\t if(k < right.length)\n\t\t {\n\t\t right[k]=ar[j];\n\t\t k++;\n\t }\n\t }\n\t left = Divide(left);\n\t right = Divide(right);\n\t result = Merge(left,right);\n\t return result;\n\t \n\t \n\t \n\t}", "@Override\n public ArrayList<int[]> Split()\n {\n double hypervolume_best = -Double.MAX_VALUE;\n int hypervolume_best_i = 0;\n int hypervolume_best_j = 0;\n double hypervolume = 0d;\n\n for( int i = 0; i < Capacity_max + 1; i++)\n {\n for( int j = i + 1; j < Capacity_max + 1; j++)\n {\n hypervolume = 0d;\n double[] point1 = PointMatrix[ Items.get(i)[0] ][ Items.get(i)[1] ];\n double[] point2 = PointMatrix[ Items.get(j)[0] ][ Items.get(j)[1] ];\n\n for(int a = 0; a < Dimensions; a++)\n {\n if( point1[a] > point2[a] )\n hypervolume += Math.log10(point1[a] - point2[a]);\n if( point1[a] < point2[a] )\n hypervolume += Math.log10(point2[a] - point1[a]);\n }\n\n if( hypervolume_best < hypervolume)\n {\n hypervolume_best_i = i;\n hypervolume_best_j = j;\n hypervolume_best = hypervolume;\n }\n }\n }\n\n // Ready the split\n ArrayList<int[]> items_split = new ArrayList<>();\n items_split.addAll(Items);\n\n int point1_x = items_split.get(hypervolume_best_i)[0];\n int point1_y = items_split.get(hypervolume_best_i)[1];\n int point2_x = items_split.get(hypervolume_best_j)[0];\n int point2_y = items_split.get(hypervolume_best_j)[1];\n double[] point1 = PointMatrix[ point1_x ][ point1_y ];\n double[] point2 = PointMatrix[ point2_x ][ point2_y ];\n\n if(hypervolume_best_i > hypervolume_best_j)\n {\n items_split.remove(hypervolume_best_i);\n items_split.remove(hypervolume_best_j);\n }\n else\n {\n items_split.remove(hypervolume_best_j);\n items_split.remove(hypervolume_best_i);\n }\n\n // Create new box with point1\n BoundingBoxLeaf box1 = new BoundingBoxLeaf( PointMatrix, ParentBox, Tree, Depth, point1_x, point1_y );\n\n box1.SetBoxToFit(point1);\n box1.SetCoordsToFit( point1_x, point1_y);\n \n // Reset this box, and add point2\n BoundingBoxLeaf box2 = this;\n \n box2.SetBoxToFit(point2);\n box2.SetCoordsToFit( point2_x, point2_y);\n\n box2.Items.clear();\n box2.Items.add( new int[]{ point2_x, point2_y } );\n\n // Notify parent of split\n ParentBox.InsertBox_internal(box1);\n \n // Add items to the new boxes, up to min capacity\n int[] item_best;\n \n // box1\n while( box1.IsBelowMinCapacity() && !items_split.isEmpty() )\n {\n hypervolume_best = Double.MAX_VALUE;\n item_best = null;\n int index_best = -1;\n \n for(int i = 0; i < items_split.size(); i++ )\n {\n int[] item = items_split.get(i);\n double[] point = PointMatrix[ item[0] ][ item[1] ];\n \n hypervolume = box1.GetHyperVolume( point );\n \n if(hypervolume_best > hypervolume)\n {\n hypervolume_best = hypervolume;\n item_best = item; \n index_best = i;\n }\n \n }\n \n if(item_best != null)\n {\n box1.Items.add( new int[]{ item_best[0], item_best[1] } );\n box1.ExpandBoxToFit( PointMatrix[ item_best[0] ][ item_best[1] ] );\n box1.ExpandCoordsToFit( item_best[0], item_best[1]);\n \n items_split.remove(index_best);\n }\n }\n \n // box2\n while( box2.IsBelowMinCapacity() && !items_split.isEmpty() )\n {\n hypervolume_best = Double.MAX_VALUE;\n item_best = null;\n int index_best = -1;\n \n for(int i = 0; i < items_split.size(); i++ )\n {\n int[] item = items_split.get(i);\n double[] point = PointMatrix[ item[0] ][ item[1] ];\n hypervolume = box1.GetHyperVolume( point );\n \n if(hypervolume_best > hypervolume)\n {\n hypervolume_best = hypervolume;\n item_best = item; \n index_best = i;\n }\n \n }\n \n if(item_best != null)\n {\n box2.Items.add( new int[]{ item_best[0], item_best[1] } );\n box2.ExpandBoxToFit( PointMatrix[ item_best[0] ][ item_best[1] ] );\n box2.ExpandCoordsToFit( item_best[0], item_best[1]);\n \n items_split.remove(index_best);\n }\n }\n \n // return remaining to be reinserted into the tree\n return items_split; \n }", "void Divide(int[] a,int lef,int righ) // this function will\n // divide the array into halves and calls recursively\n {\n int left = lef;\n int right = righ;\n int[] b =a; // here modifying b or a will be the same as it is passed as reference\n if(left < right) {\n Divide(b, left, left + (right - left) / 2);\n Divide(b, 1 + left + (right - left) / 2, right);\n int middle = left + (right - left )/2;\n System.out.println(\"calling merge on left is \" + left +\" middle is\" +middle+ \" right is \"+ right);\n Merge(b, left,middle, right);\n }\n //System.out.println(\" left is \" + left + \" right is \"+ right);\n }", "private void mergeHalves(int[] array, int[] temp, int leftStart, int rightEnd){\r\n int leftEnd = (rightEnd + leftStart)/2;\r\n int rightStart = leftEnd + 1;\r\n int size = rightEnd - leftStart + 1;\r\n\r\n int left = leftStart;\r\n int right = rightStart;\r\n int index = leftStart;\r\n\r\n while(left <= leftEnd && right <= rightEnd){\r\n if(array[left] <= array[right]){\r\n temp[index] = array[left];\r\n left++;\r\n }else {\r\n temp[index] = array[right];\r\n right++;\r\n }\r\n index++;\r\n }\r\n System.arraycopy(array, left, temp, index, leftEnd - left + 1);\r\n System.arraycopy(array, right, temp, index, rightEnd - right + 1);\r\n System.arraycopy(temp, leftStart, array, leftStart, size);\r\n }", "private static <T extends Comparable<T>> int splitList(T[] list, int lo, int hi) {\n\t\tT pivot = list[lo];\r\n\t\tint left = lo + 1;\r\n\t\tint right = hi;\r\n\t\tSystem.out.println(\"splitList(list=\" + Arrays.toString(list) + \", lo=\" + lo + \", hi=\" + hi + \")\" + \" pivot=\"\r\n\t\t\t\t+ pivot + \", left=\" + left + \", right=\" + right);\r\n\r\n\t\twhile (true) {\r\n\t\t\twhile (left <= right) {\r\n\t\t\t\tif (list[left].compareTo(pivot) <= 0) {\r\n\t\t\t\t\tleft++;\r\n\t\t\t\t\tSystem.out.println(printArray(list, left, right, lo));\r\n\t\t\t\t} else\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\twhile (right > left) {\r\n\t\t\t\tif (list[right].compareTo(pivot) <= 0)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\telse {\r\n\t\t\t\t\tright--;\r\n\t\t\t\t\tSystem.out.println(printArray(list, left, right, lo));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (left >= right) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tswap(list, left, right);\r\n\t\t\tSystem.out.println(printArray(list, left, right, lo));\r\n\t\t}\r\n\t\tswap(list, lo, left - 1);\r\n\t\tSystem.out.println(printArray(list, left, right, lo));\r\n\r\n\t\treturn left - 1;\r\n\t}", "public static ArrayList<Float> mathematicalDivide(ArrayList<Float> firstWave, ArrayList<Float> secondWave) {\r\n ArrayList<Float> newWave = new ArrayList<>();\r\n int size = getSize(firstWave,secondWave);\r\n for (int i = 0; i < size; i++) {\r\n if (secondWave.get(i) == 0) {\r\n newWave.add(i, 0f);\r\n } else {\r\n newWave.add(i, firstWave.get(i) / secondWave.get(i));\r\n }\r\n }\r\n return newWave;\r\n }", "public static Pair<int[], int[]> splitArray (int[] elts) {\r\n\t\tint size = elts.length;\r\n\t\tint mid = size / 2;\r\n\t\tint[] left = new int[mid];\r\n\t\tint[] right = new int [size - mid];\r\n\t\t// Copy\r\n\t\tfor (int i = 0; i < mid; i++) {\r\n\t\t\tleft[i] = elts[i];\r\n\t\t}\r\n\t\tfor (int i = 0; i < right.length; i++) {\r\n\t\t\tright[i] = elts[i+mid];\r\n\t\t}\r\n\t\t// Return\r\n\t\treturn (new Pair<int[], int[]>(left, right));\r\n\t}", "private static int partition(int a[], int left, int right) {\r\n\t\t int i = left, j = right;\r\n\t\t int tmp;\r\n\t\t int pivot = a[(left + right) / 2];\r\n\r\n\t\t while (i <= j) {\r\n\t\t while (a[i] < pivot) // scan from left\r\n\t\t i++;\r\n\t\t count = count + 1;\r\n\t\t while (a[j] > pivot) // scan from right\r\n\t\t j--;\r\n\t\t count = count + 1;\r\n\t\t if (i <= j) { // swap\r\n\t\t tmp = a[i];\r\n\t\t a[i] = a[j];\r\n\t\t a[j] = tmp;\r\n\t\t i++;\r\n\t\t j--;\r\n\t\t }\r\n\t\t };\r\n\t\t return i; // this will be the dividing point between the two halves\r\n\t\t}", "void sort(int arr[], int left, int right) {\n if (left < right) {\n // Find the middle point\n int middle = (left + right) / 2;\n\n // Sort first and second halves\n sort(arr, left, middle);\n sort(arr, middle + 1, right);\n\n // Merge the sorted halves\n merge(arr, left, middle, right);\n }\n }", "public Chunks chunkDivide(List<Integer> S, int c) {\n\t\tdouble chunks = Math.ceil(c/2.0);\n\t\tList<Integer> S1 = new ArrayList<Integer>();\n\t\tList<Integer> S2 = new ArrayList<Integer>();\n\t\tint j = 0;\n\t\twhile(j < chunks) {\t\n\t\t\twhile(comps(S.get(0), S.get(1)) && S.size() > 1 && (S.get(0) < S.get(1))){\t\t//comparisons\n\t\t\t\tS1.add(S.remove(0));\n\t\t\t}\n\t\t\tS1.add(S.remove(0));\n\t\t\tj++;\n\t\t} \n\t\twhile(S.size() != 0) {\n\t\t\tS2.add(S.remove(0));\n\t\t}\t\n\t\tChunks p = new Chunks(S1, S2);\n\t\treturn p;\n\t}", "public void partitionArray(int[] nums) {\n if(nums==null||nums.length<=1) return;\n int left=0, right=nums.length-1;\n while(left<=right){\n while (left<=right&&nums[left]%2!=0) left++;\n while(left<=right&&nums[right]%2==0) right--;\n if(left<=right){\n int tmp=nums[left];\n nums[left]=nums[right];\n nums[right]=tmp;\n left++;\n right--;\n }\n }\n }", "public List<Integer> crateSecond(int size) {\n int[] arr = {2, 1, 2, 3, 2, 4, 2, 5};\n int arrSize = 8;\n List<Integer> secondAnswer = new ArrayList<>(size);\n for (int i = 0; i < size; i++) {\n int index = i%arrSize;\n\n secondAnswer.add(arr[index]);\n }\n return secondAnswer;\n\n }", "private void divideArray(int LowInd, int HighInd) {\n\t\tif(LowInd<HighInd){\r\n\t\t\tint mid = LowInd+(HighInd-LowInd)/2;\r\n\t\t\t\r\n\t\t\t//Left\r\n\t\t\tdivideArray(LowInd,mid);\r\n\t\t\t\r\n\t\t\t//Right\r\n\t\t\tdivideArray(mid+1, HighInd);\r\n\t\t\t\r\n\t\t\tMergeArray(LowInd, mid, HighInd);\r\n\t\t\t\r\n\t\t}\r\n\t}", "static void sort(int arr[], int l, int r) \n { \n if (l < r) \n { \n // Find middle \n int m = (l+r)/2; \n \n // Sort both halves\n sort(arr, l, m); \n sort(arr , m+1, r); \n \n // Merge both halves after they have been sorted \n merge(arr, l, m, r); \n } \n }", "public ArrayList<String> middle(ArrayList<String> values) {\n\t\tArrayList<String> empty = new ArrayList<String>();\n\t\tif(values == null) {\n\t\t\treturn empty;\n\t\t} else if (values.size() < 3 || values.size() % 2 == 0) {\n\t\t\treturn empty;\n\t\t}\n\t\tString first = values.get((int) Math.floor(values.size() / 2) - 1);\n\t\tString middle = values.get((int) Math.floor(values.size() / 2));\n\t\tString last = values.get((int) Math.floor(values.size() / 2) + 1);\n\t\tArrayList<String> returnArrayList = new ArrayList<String>();\n\t\treturnArrayList.add(first);\n\t\treturnArrayList.add(middle);\n\t\treturnArrayList.add(last);\n\t\treturn returnArrayList;\t// default return value to ensure compilation\n\t}", "@Test\n public void pairNumbersDivisibleBy3_passTwoListsNumbers_returnListsOfPairs() {\n List<int[]> output = Java8Streams.pairNumbersDivisibleBy3(new ArrayList<>(Arrays.asList(1, 2, 3)), new ArrayList<>(Arrays.asList(3, 4)));\n assertThat(output).containsExactly(new int[]{2, 4}, new int[]{3, 3});\n }", "public int[] helper(int[] data) {\n if (data.length < 2) {\n return data;\n }\n int mid = data.length / 2;\n\n return merge(\n helper(Arrays.copyOfRange(data, 0, mid)),\n helper(Arrays.copyOfRange(data, mid , data.length)));\n }", "protected ArrayList<ArrayList<String>> method1() {\n\n ArrayList<ArrayList<String>> arr = new ArrayList<ArrayList<String>>();\n ArrayList<String> n_clone = new ArrayList<>(Arrays.asList(input));\n\n // Create equal amount of containers as requested.\n for (int i=0;i<num;i++) {\n arr.add(new ArrayList<String>());\n }\n\n // Iterate through given Array while putting items\n // into the containers you just created.\n Iterator itor = n_clone.iterator();\n int count = 0;\n while (itor.hasNext()) {\n if (count < this.num) {\n arr.get(count).add((String)itor.next());\n count++;\n } else {\n count = 0;\n }\n }\n\n System.out.println(\"Paying no attention to order, the Array - \");\n printArrayList(new ArrayList<>(Arrays.asList(input)));\n System.out.println(\"divided into \" + this.num + \" sections is: \\n\");\n printMatrix(arr);\n\n return arr;\n }", "public HeaderNode[] splitList(DoublyLinkedListHeader list) {\r\n\t\tHeaderNode[] array = new HeaderNode[2];\r\n\t\tSystem.out.println(\"Enter an index\");\r\n\t\tint index = scanInt();\r\n\t\tif(index<0 || index> list.size()) {\r\n\t\t\tSystem.out.println(\"Cannot Split List! Invalid Index!\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tDoublyLinkedListHeader l1 = new DoublyLinkedListHeader();\r\n\t\t\tDoublyLinkedListHeader l2 = new DoublyLinkedListHeader();\r\n\t\t\tfor(int j=0; j<index;j++) {\r\n\t\t\t\tl1.add(list.get(j));\r\n\t\t\t}\r\n\t\t\tfor(int j=index; j<list.size();j++) {\r\n\t\t\t\tl2.add(list.get(j));\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"l1 \" + l1);\r\n\t\t\tSystem.out.println(\"l2 \" + l2);\r\n\t\t\tarray[0] = l1.getHeader();\r\n\t\t\tarray[1] = l2.getHeader();\r\n\t\t\treturn array;\r\n\t\t}\r\n\t}", "private static void sortWrapper(int list[], int leftIndex, int rightIndex) {\n if (leftIndex!=rightIndex) {\n int midIndex = (leftIndex + rightIndex)/2;\n //Sort left\n sortWrapper(list, leftIndex, midIndex);\n //Sort right\n sortWrapper(list, midIndex+1, rightIndex);\n //Merge sorted halves together\n merge(list, leftIndex, midIndex, rightIndex);\n }\n }", "void mergeSort(int arr[], int l, int r) \n { \n if (l < r) \n { \n // Find the middle point \n int m = (l+r)/2; \n \n // Sort first and second halves \n mergeSort(arr, l, m); \n mergeSort(arr , m+1, r); \n \n // Merge the sorted halves \n sort(arr, l, m, r); \n } \n\t}", "void h(List<List<Integer>> r, List<Integer> t, int n, int s){ \n for(int i = s; i*i <= n; i++){\n if(n % i != 0) continue; \n t.add(i);\n t.add(n / i);\n r.add(new ArrayList<>(t));\n t.remove(t.size() - 1);\n h(r, t, n/i, i);\n t.remove(t.size() - 1);\n }\n }", "static <T> ListNode<T> listZipping(ListNode<T> list) {\n int size = 1;\n\n ListNode<T> current = list;\n while (current.next != null) {\n size++;\n current = current.next;\n }\n\n if (size < 2) return list;\n\n current = list;\n for (int i = 0; i < (size - 1) / 2; i++) current = current.next;\n\n ListNode<T> secondHalf = current.next;\n current.next = null;\n\n // reverse the second half\n current = secondHalf;\n while (current.next != null) {\n ListNode<T> tmp = current.next;\n current.next = tmp.next;\n tmp.next = secondHalf;\n secondHalf = tmp;\n }\n\n // merge\n ListNode<T> firstHalf = list;\n for (int i = 0; i < size / 2; i++) {\n ListNode<T> firstHalfNext = firstHalf.next;\n firstHalf.next = secondHalf;\n ListNode<T> secondHalfNext = secondHalf.next;\n secondHalf.next = firstHalfNext;\n\n firstHalf = firstHalfNext;\n secondHalf = secondHalfNext;\n }\n\n\n return list;\n }", "void splitData( List<P> points , @Nullable GrowQueue_I32 indexes ,\n\t\t\t\t\tList<P> left , @Nullable GrowQueue_I32 leftIndexes ,\n\t\t\t\t\tList<P> right , @Nullable GrowQueue_I32 righrIndexes );", "public static int[] sort( int[] arr )\n {\n int m = arr.length / 2; //find the half way point \n if (arr.length == 1) { //base case: when the array has one number\n\t return arr; }\n else \n\t int[] firstH = new int[m]; //array holding the first half\n\t int[] secondH = new int[m]; //array holding the second half\n\t for (int i = 0; i < firstH.length; i++) { //fills both arrays up with the respective halves\n\t firstH[i] = arr[i];\n\t secondH[i] = arr[arr.length - 1 - i];\n\t }\n\t return merge(sort(firstH),sort(secondH)); //recursive that calls sort again on both halves, halfing them further until they reach the base case and merge will kick in, merging them together until you reach the top again and merge the original 2 halves \n }", "public static ArrayList<Integer> divideByTen(int[] list) {\n // create a new arrayList to add nums to after been moduloed\n ArrayList<Integer> modList = new ArrayList<Integer>();\n //foreach over the int[] and modulo by 10 and add to Integer ArrayList modList\n for (Integer i : list) {\n //test if num remainder is 0 afer division by 10\n if(i%10==0){\n //if it is 0 afer division by 10, then return original num\n modList.add(i);\n }else{\n modList.add(i%10);\n }\n }\n return modList;\n }", "private List<E> split(List<E> list, E marker, Boolean swap) {\n int idx = list.indexOf(marker);\n if (swap) return list.subList(0, idx);\n else return list.subList(idx + 1, list.size());\n }", "private static void mergeHalves(\n\t\tint[] ints,\n\t\tint[] copyOfInts,\n\t\tint min,\n\t\tint mid,\n\t\tint max\n\t\t) {\n\n\t\tSystem.arraycopy(ints, min, copyOfInts, min, max - min);\n\n\t\tint overallPos = min;\n\t\tint firstHalfPos = min;\n\t\tint secondHalfPos = mid;\n\n\t\twhile (firstHalfPos < mid && secondHalfPos < max) {\n\t\t\tif (copyOfInts[firstHalfPos] < copyOfInts[secondHalfPos]) {\n\t\t\t\tints[overallPos] = copyOfInts[firstHalfPos];\n\t\t\t\tfirstHalfPos++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tints[overallPos] = copyOfInts[secondHalfPos];\n\t\t\t\tsecondHalfPos++;\n\t\t\t}\n\t\t\toverallPos++;\n\t\t}\n\n\t\t// if the second half has been exhausted, move the remainder\n\t\t// of the first half to the end of the sorted array\n\t\twhile (firstHalfPos < mid) {\n\t\t\tints[overallPos] = copyOfInts[firstHalfPos];\n\t\t\tfirstHalfPos++;\n\t\t\toverallPos++;\n\t\t}\n\n\t}", "private PVector separate(ArrayList<Boid> boids)\n\t{\n\t\tfloat desiredseparation = 50.0f;\n\t\tPVector steer = new PVector(0, 0, 0);\n\t\tint count = 0;\n\n\t\t// too close ?\n\t\tfor (Boid other : boids)\n\t\t{\n\t\t\tfloat d = PVector.dist(getLocation(), other.getLocation());\n\t\t\tif ((d > 0) && (d < desiredseparation))\n\t\t\t{\n\t\t\t\tPVector diff = PVector.sub(getLocation(), other.getLocation());\n\t\t\t\tdiff.normalize();\n\t\t\t\tdiff.div(d);\n\t\t\t\tsteer.add(diff);\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tif (count > 0)\n\t\t{\n\t\t\tsteer.div(count);\n\t\t}\n\n\t\tif (steer.mag() > 0)\n\t\t{\n\t\t\tsteer.setMag(maxspeed);\n\t\t\tsteer.sub(velocity);\n\t\t\tsteer.limit(maxforce);\n\t\t}\n\n\t\treturn steer;\n\t}", "private static void merge(ArrayList<Integer> a, int left, int mid, int right) {\n\t\tint chunk1 = mid - left + 1;\r\n\t\tint chunk2 = right - mid;\r\n\t\tArrayList<Integer> tempArrLeft = new ArrayList<>();\r\n\t\tArrayList<Integer> tempArrRight = new ArrayList<>();\r\n\t\t//pipe data into temps\r\n\t\tfor (int i=0; i < chunk1; ++i) {\r\n\t\t\ttempArrLeft.add(a.get(left + i));\r\n\t\t}\r\n\t\tfor (int j=0; j < chunk2; ++j) {\r\n\t\t\ttempArrRight.add(a.get(mid + 1 + j));\r\n\t\t}\r\n\r\n\t\t//merge temp arrays\r\n\t\tint i = 0, j = 0;\r\n\t\tint k = left;\r\n\t\twhile (i < chunk1 && j < chunk2) {\r\n\t\t\tif (tempArrLeft.get(i) <= tempArrRight.get(j)) {\r\n\t\t\t\ta.set(k, tempArrLeft.get(i));\r\n\t\t\t\ti++;\r\n\t\t\t} else {\r\n\t\t\t\ta.set(k, tempArrRight.get(j));\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t\tk++;\r\n\t\t}\r\n\t\twhile (i < chunk1) {\r\n\t\t\ta.set(k, tempArrLeft.get(i));\r\n\t\t\ti++;\r\n\t\t\tk++;\r\n\t\t}\r\n\t\twhile (j < chunk2) {\r\n\t\t\ta.set(k, tempArrRight.get(j));\r\n\t\t\tj++;\r\n\t\t\tk++;\r\n\t\t}\r\n\t}", "private void splitArrayB() {\r\n //find upper bound. anything below goes within.\r\n //calculate highest A, loop through b til above that, then iterate b index til at end of b\r\n int a_count = 0;\r\n int b_count = 0;\r\n int highA = A[splitA[a_count]];\r\n boolean first = true;\r\n for(int i = 0; i < B.length; i++){\r\n if(highA >= B[i]){\r\n first = false;\r\n }\r\n else if(highA < B[i]){\r\n if(first == false){\r\n splitB[b_count] = i - 1;\r\n b_count++;\r\n highA = A[splitA[a_count]];\r\n a_count++;\r\n }\r\n else{\r\n while(a_count != splitA.length){\r\n if(highA < B[i]){\r\n splitB[b_count] = - 1;\r\n b_count++;\r\n a_count++;\r\n highA = A[splitA[a_count]];\r\n }\r\n else{\r\n splitB[b_count] = i;\r\n b_count++;\r\n a_count++;\r\n highA = A[splitA[a_count]];\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if(b_count != splitB.length){\r\n splitB[b_count] = splitB.length - 1;\r\n b_count++;\r\n while(b_count < splitB.length){\r\n splitB[b_count] = -1;\r\n b_count++;\r\n }\r\n return;\r\n }\r\n splitB[b_count - 1] = b_count - 1;\r\n }", "private void mergeSortHelper(Object arr[], int l, int r) \n\t{ \n\t\tif (l < r) \n\t\t{ \n\t\t\t// Find the middle point \n\t\t\tint m = (l+r)/2; \n\n\t\t\t// Sort first and second halves \n\t\t\tmergeSortHelper(arr, l, m); \n\t\t\tmergeSortHelper(arr , m+1, r); \n\n\t\t\t// Merge the sorted halves \n\t\t\tmerge(arr, l, m, r); \n\t\t} \n\t}", "public static List<List<String>> divideList(List<String> contents, int numberOfLists) {\n\n\t\tList<List<String>> dividedList = new ArrayList<List<String>>();\n\t\tint partsSize = contents.size() / numberOfLists;\n\t\tSystem.out.println(partsSize);\n\n\t\tList<String> newList = new ArrayList<String>();\n\t\tfor (int i = 0; i < contents.size(); i++) {\n\t\t\tnewList.add(contents.get(i));\n\n\t\t\tif((dividedList.size() < numberOfLists - 1) && (newList.size() == partsSize)) {\n\t\t\t\tdividedList.add(newList);\n\t\t\t\tnewList = new ArrayList<String>();\n\t\t\t\tcontinue;\n\t\t\t}\t\n\t\t}\n\t\tdividedList.add(newList);\n\t\treturn dividedList;\n\t}", "public LongNum div2(LongNum divided){\n LongNum res = divided.copy();\n for(int i = res.size()-1;i>=0;i--){\n if(i!=0)res.set(i-1,res.get(i-1)+(res.get(i)%2)*base);\n res.set(i , Math.floorDiv(res.get(i),2));\n }\n return res;\n }", "public ArrayList<Integer> enLigeListe(ArrayList<Integer> list) {\r\n ArrayList<Integer> ligeListe = new ArrayList<>();\r\n for (int i = 0; i < list.size(); i++) {\r\n if (list.get(i) % 2 != 1) {\r\n ligeListe.add(list.get(i));\r\n }\r\n }\r\n return ligeListe;\r\n }", "private static void sort(ArrayList<Integer> a, int left, int right) {\r\n\t\tif (left < right) {\r\n\t\t\tint mid = (left+right)/2;\r\n\t\t\t//sort both halves\r\n\t\t\tsort(a, left, mid);\r\n\t\t\tsort(a, mid + 1, right);\r\n\t\t\t//merge back\r\n\t\t\tmerge(a, left, mid, right);\r\n\t\t}\r\n\t}", "private void m10259a(ArrayList<Double> arrayList) {\n int size = arrayList.size();\n if (size <= this.f8993u) {\n this.f8973a.mo3315b((ArrayList) arrayList);\n return;\n }\n ArrayList arrayList2 = new ArrayList();\n int i = size / this.f8993u;\n for (int i2 = 0; i2 < this.f8993u; i2++) {\n int i3 = i2 * i;\n if (i3 >= size) {\n arrayList2.add(arrayList.get(size - 1));\n } else {\n arrayList2.add(arrayList.get(i3));\n }\n }\n this.f8973a.mo3315b(arrayList2);\n }", "double[] getSplitRatios();", "public static double[] elementWiseDivide(double[] a, double b){\n\n\t\t\tdouble[] res = new double[a.length];\n\n\t\t\tfor(int i = 0; i < a.length; i++)\n\t\t\t\tres[i] = (a[i] / b);\n\n\t\t\treturn res;\n\n }", "private void merge(ArrayList <Comparable> a, int first, int mid, int last){\r\n\t\tsteps += 5;\r\n\t\tArrayList<Comparable> temp = new ArrayList<Comparable>();\r\n\t\tint firstInd = first;\r\n\t\tint middle = mid + 1;\r\n\t\tsteps += 2;\r\n\t\twhile (firstInd <= mid && (middle) <= last) {\r\n\t\t\tif (a.get(firstInd).compareTo(a.get(middle)) < 0) {\r\n\t\t\t\ttemp.add(a.get(firstInd));\r\n\t\t\t\tfirstInd ++;\r\n\t\t\t\tsteps += 7;\r\n\t\t\t}else if (a.get(middle).compareTo(a.get(firstInd)) < 0){\r\n\t\t\t\ttemp.add(a.get(middle));\r\n\t\t\t\tmiddle++;\r\n\t\t\t\tsteps += 7;\r\n\t\t }else {\r\n\t\t\t\ttemp.add(a.get(middle));\r\n\t\t\t\tmiddle++;\r\n\t\t\t\tsteps += 3;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (firstInd >= mid + 1) {\r\n\t\t\tsteps += 4;\r\n\t\t\tfor (int i = middle; i <= last; i++) {\r\n\t\t\t\ttemp.add(a.get(i));\r\n\t\t\t}\r\n\t\t\tsteps += 3;\r\n\t\t}else {\r\n\t\t\tsteps += 2;\r\n\t\t\tfor (int i = firstInd; i <= mid; i++) {\r\n\t\t\t\ttemp.add(a.get(i));\r\n\t\t\t}\r\n\t\t\tsteps += 3;\r\n\t\t}\r\n\t\tsteps += 3;\r\n\t\tint j = 0;\r\n\t\tfor (int i = first; i <= last; i++) {\r\n\t\t\ta.set(i, temp.get(j));\r\n\t\t\tj++;\r\n\t\t\tsteps += 4;\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Merge\");\r\n\t\tSystem.out.println();\r\n\r\n\t}", "public static int[] middleWay(int[] a, int[] b) {\n int[] c = new int[2];\n int temp = 0;\n c[0] = a[a.length / 2];\n c[1] = b[b.length / 2];\n return c;\n\n }", "public Surface[] divideToSurfaces(String[] args, Rectangle[] boundaries) {\n MultipleBouncingBallsAnimation m = new MultipleBouncingBallsAnimation();\n int numberOfFrames = boundaries.length; // The number of frames needed.\n int numberOfBalls = args.length / numberOfFrames; // The number of balls per each frame.\n Surface[] s = new Surface[numberOfFrames];\n // Handle the case of an uneven division (give one more to each one of the first frames until the ball run out.\n int ballsLeftOver = args.length % numberOfFrames;\n int addToEven = 0;\n // Divide the balls in a each surface according to the number of frames.\n for (int i = 0; i < numberOfFrames; ++i) {\n // Check if there was left over balls in the division to frames.\n if (ballsLeftOver != 0) {\n // Add one more ball to the ith frame.\n addToEven = 1;\n // Subtract one from the left over balls.\n --ballsLeftOver;\n } else {\n addToEven = 0;\n }\n String[] newArgs = new String[numberOfBalls + addToEven];\n int takeBallsUntil = numberOfBalls * (i + 1) + addToEven;\n for (int j = i * numberOfBalls, count = 0; j < takeBallsUntil; ++j, ++count) {\n newArgs[count] = args[j];\n }\n s[i] = m.getBalls(newArgs, boundaries[i]);\n }\n return s;\n }", "public void twoHalfOpt() {\n\t\tint N = this.length();\n\t\tboolean improved = true;\n\t\twhile (improved) {\n\t\t\timproved = false;\n\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\tfor (int j = 0; j + 1 < i; j++) {\n\t\t\t\t\tif (twoHalfOpt(i, j)) {\n\t\t\t\t\t\timproved = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (int j = i + 1; j < N; j++) {\n\t\t\t\t\tif (twoHalfOpt(i, j)) {\n\t\t\t\t\t\timproved = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static Pair<Node, Node> splitAndReverse(Node head){\n\t\tNode f = head; //fast\n\t\tNode s = head; //slow\n\t\tint pos = 0;\n\t\t\n\t\tNode next = null;\n\t\t\n\t\tdo{\n\t\t\tif(pos == 0){\n\t\t\t\tnext = s.next;\n\t\t\t}else if(pos % 2 == 0){\n\t\t\t\tNode prev = s;\n\t\t\t\ts = next;\n\t\t\t\tnext = next.next;\n\t\t\t\ts.next = prev;\n\t\t\t}\n\t\t\t\n\t\t\tpos++;\n\t\t\tf = f.next;\n\t\t}while(f != null);\n\t\t\n\t\thead.next = null;\n\t\t\n\t\tSystem.out.println(s != null ? s.value : null);\n\t\t\n\t\tNode firstHalfInReverese = s;\n\t\t\n\t\t\n\t\t//process the 2nd half\n\t\ts = next; \n\t\tnext = s.next;\n\t\ts.next = null;//breaking link between 1st and 2nd halves\n\t\t\n\t\twhile(next != null){\n\t\t\tNode prev = s;\n\t\t\ts = next;\n\t\t\tnext = next.next;\n\t\t\ts.next = prev;\n\t\t}\n\t\t\n\t\tSystem.out.println(s != null ? s.value : null);\n\t\t\n\t\tNode secondHalfInReverse = s;\n\t\t\n\t\treturn new Pair<>(firstHalfInReverese, secondHalfInReverse);\n\t}", "@Test\r\n\tpublic void testDiv02() {\n\t\tdoReturn(100).when(arrList).get(0); //not strict on return type\r\n\t\tAssertions.assertEquals(\"Fe\", arrList.get(0));\r\n\t}", "public static void divide(Double[] vector, Double divider) {\r\n for(int i = 0; i < vector.length; i++){\r\n vector[i] = vector[i] / divider;\r\n }\r\n }", "public static ArrayList<Integer> mergeSort(ArrayList <Integer> list){\n System.out.println();\n System.out.println(\"Insertion Sort\");\n System.out.println();\n if (3 > 2){\n int mid= list.size()/2;\n ArrayList<Integer> left= new ArrayList<Integer>(mid);\n ArrayList<Integer> right=new ArrayList<Integer>(list.size()-mid);\n for (int i = 0; i < mid; i++) {\n left.add(list.get(i));\n } \n\n for (int i = 0; i < list.size()-mid; i++) {\n right.add(list.get(i));\n } \n\n left = mergeSort(left); \n right = mergeSort(right);\n merge(left,right,list);\n }\n return list;\n }", "public static List<int[]> getArrays( List<int[]> inputs, int end ) {\n ArrayList<int[]> arrays = new ArrayList<int[]>( );\n for (int[] stArr : inputs)\n {\n if (stArr[stArr.length-1] < end )\n {\n List<int[]> newArrays = getArrays( stArr, end );\n arrays.addAll( newArrays );\n }\n }\n \n return arrays;\n }", "public static void main(String[] args) {\n int limit = a.length/2;\n int size = 2;\n while(size<=limit) {\n createPartitionsOfSize(a, size);\n size+=2;\n }\n System.out.println(\"Result: \" + Arrays.toString(a));\n }", "private void merge(ArrayList<Integer> list, int low, int middle, int high) {\n\t\tArrayList<Integer> temp = new ArrayList<Integer>();\n\t\tList<Integer> s1;\n\t\tList<Integer> s2;\n\t\t\n\t\ts1 = new ArrayList<>(list.subList(low, middle + 1));\n\t\ts2 = new ArrayList<>(list.subList(middle + 1, high + 1));\n\t\t\n\t\tint i1 = 0;\n\t\tint i2 = 0;\n\t\t\n\t\twhile (i1 < s1.size() && i2 < s2.size()) {\n\t\t\tif(s1.get(i1).compareTo(s2.get(i2)) <= 0) {\n\t\t\t\ttemp.add(s1.get(i1));\n\t\t\t\ti1++;\n\t\t\t} else {\n\t\t\t\ttemp.add(s2.get(i2));\n\t\t\t\ti2++;\n\t\t\t}\n\t\t}\n\t\t\n\t\twhile (i1 < s1.size()) {\n\t\t\ttemp.add(s1.get(i1));\n\t\t\ti1++;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < temp.size();i++) {\n\t\t\tlist.set(i + low, temp.get(i));\n\t\t}\n\t}", "public BigDecimal divideNumbers(List<Integer> numbers) throws Exception;", "@Test\n public void testSort_intArr_half() {\n int[] expResult = ASC_CHECK_HALF_SORT_ARRAY;\n sorter.sort(data, 0, 8);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "public static int stepTwo(ArrayList<Integer> list) {\n\t\t\n\t\tint passNumber = 0;\n\t\tint sum = 0;\n\t\t\n\t\t//iterate through arraylist from right to left\n\t\tfor(int i = list.size()-1; i >= 0; i--) {\n\n\t\t\tint num = list.get(i);\n\t\t\tpassNumber++;\n\t\t\t\n\t\t\t//sum every other number beginning with second from the right\n\t\t\tif (passNumber % 2 == 0) {\n\t\t\t\tsum += num;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn sum;\n\t}", "void merge(int[] array, int[] helper, int low, int middle, int high) {\n for(int i = low; i <= high; i++) {\n helper[i] = array[i];\n }\n\n int helperLeft = low;\n int helperRight = middle + 1;\n int current = low;\n\n //Iterate through helper array. Compare left and right half, copying back\n //the smaller element from the two halves into the original array\n while(helperLeft <= middle && helperRight <= high) {\n if(helper[helperLeft] <= helper[helperRight]) {\n array[current] = helper[helperLeft];\n helperLeft++;\n }\n else { //If right element is smaller than left element\n array[current] = helper[helperRight];\n helperRight++;\n }\n current++;\n }\n\n //Copy the rest of the left side of the array into the target array\n int remaining = middle - helperLeft;\n for(int i = 0; i <= remaining; i++) {\n array[current + i] = helper[helperLeft + i];\n }\n }", "static <T> List<List<T>> chunkList(List<T> list, final int L) {\n\t\tList<List<T>> parts = new ArrayList<List<T>>();\n\t\tfinal int N = list.size();\n\t\t\n\t\tfor (int i = 0; i < N; i += L) {\n\t\t\tparts.add(new ArrayList<T>(\n\t\t\t\t\tlist.subList(i, Math.min(N, i + L)))\n\t\t\t\t\t);\n\t\t}\n\t\t\n\t\treturn parts;\n\t}", "private static <T extends Comparable<T>> void mergeSort(T[] arrayToSort, int startIndex, int endIndex) {\n if(startIndex + 1 < endIndex) {\n int centerIndex = (endIndex + startIndex)/2;\n mergeSort(arrayToSort, startIndex, centerIndex); // sort left half\n mergeSort(arrayToSort, centerIndex, endIndex); // sort right half\n merge(arrayToSort, startIndex, centerIndex, endIndex); // merge two, sorted halves\n }\n }", "public ArrayList<ArrayList<String>> fromFirstToSecond(ArrayList<String> words);", "public static double[][] sliceEquidist(double[] start, double[] end, int snum){\n\t\t//don't do anything with improper aguments\n\t\tif(start==null || end==null || snum<=1 || start.length==0 || end.length==0)\n\t\t\treturn null;\n\t\t//create \"divisor\" vector\n\t\tint m = start.length;\n\t\tdouble[] div = new double[m];\n\t\tdouble divlen=0.0;\n\t\tfor(int i=0; i<m; i++){\n\t\t\tdiv[i] = (end[i] - start[i])/(double)snum;\n\t\t\tdivlen += (div[i]*div[i]);\n\t\t}\n\t\t//don't do anything if the divisor has only zero entries\n\t\tif(divlen==0.0) return null;\n\n\t\tdouble[][] ret = new double[snum-1][m];\n\t\tfor(int i=0; i<snum-1; i++){\n\t\t\tfor(int j=0; j<m; j++){\n\t\t\t\tret[i][j] = start[j] + (double)(i+1) * div[j];\n\t\t\t}//next j\n\t\t}//next i\n\n\t\treturn ret;\n\t}", "public static void main(String[] args) \r\n\t{\n\r\n\t\tint[] A = {1,5,8,7,3,6};\r\n\t\tint[] B = {2,9,4};\r\n\t\t\r\n\t\tList<Integer> list = Arrays.stream(A).boxed().collect(Collectors.toList());\r\n\t\tList<Integer> list2 = Arrays.stream(B).boxed().collect(Collectors.toList());\r\n\t\tList<Integer> combine = new ArrayList<>();\r\n\t\tcombine.addAll(list);\r\n\t\tcombine.addAll(list2);\r\n\t\t\r\n\t\tSystem.out.println(list);\r\n\t\tSystem.out.println(combine);\r\n\t\tCollections.sort(combine);\r\n\t\tSystem.out.println(combine);\r\n\t\r\n\t\tList<Integer> extractA = combine.subList(0, A.length);\r\n\t\tList<Integer> extractB = combine.subList(A.length, A.length+B.length);\r\n\t\t\r\n\t\tSystem.out.println(extractA);\r\n\t\tSystem.out.println(extractB);\r\n\t\t\r\n// second approch for integer to array\t\t\r\n\t\tint[] ints = {1, 2, 3};\r\n\t\tList<Integer> intList = new ArrayList<Integer>();\r\n\t\t\r\n\t\tfor (int i = 0; i < ints.length; i++) \r\n\t\t{\r\n\t\t\t intList.add(ints[i]);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(intList);\r\n\t\t\r\n\t}", "public static void merge(Value[] arr, int low, int high) {\r\n int mid = low + (high - low) / 2; // the mid-point\r\n // Merge the two \"halves\" into a new array merged\r\n Value[] merged = new Value[high - low];\r\n int low_i = low;\r\n int upp_i = mid;\r\n for (int mer_i = 0; mer_i < merged.length; mer_i++) {\r\n if (low_i == mid) {\r\n // We already put all elements from the lower half in their\r\n // right place, so just put all the elements from the upper half\r\n // in their place, and be done.\r\n while (upp_i < high) {\r\n merged[mer_i] = arr[upp_i];\r\n upp_i++;\r\n mer_i++;\r\n }\r\n break;\r\n } else if (upp_i == high) {\r\n // We already put all elements from the upper half in their\r\n // right place, so just put all the elements from the lower half\r\n // in their place, and be done.\r\n while (low_i < mid) {\r\n merged[mer_i] = arr[low_i];\r\n low_i++;\r\n mer_i++;\r\n }\r\n double x = 0.5;\r\n for (int i = 0; i < merged.length; i++) {\r\n merged[i].draw(x, 0);\r\n }\r\n break;\r\n } else if (arr[low_i].getValue() < arr[upp_i].getValue()) { // when comparing objects, use arr[low_i].compareTo(arr[upp_i) < 0\r\n merged[mer_i] = arr[low_i];\r\n low_i++;\r\n } else {\r\n merged[mer_i] = arr[upp_i];\r\n upp_i++;\r\n }\r\n }\r\n // Copy the elements of merged back into arr in the right place.\r\n for (int i = 0; i < merged.length; i++)\r\n arr[low + i] = merged[i];\r\n }", "public static <E> void separateArrToOddEvenArr(\n ArrayList<E> inArr, ArrayList<E> oddArr, ArrayList<E> evenArr)\n {\n boolean isOddDone = false;\n\n for(E str : inArr) {\n if (!isOddDone) {\n oddArr.add(str);\n isOddDone = true;\n } else {\n evenArr.add(str);\n isOddDone = false;\n }\n } //for\n\n }", "private static void merge(ArrayList<Integer> leftList, ArrayList<Integer> rightList, ArrayList<Integer> outList) {\n\n int leftIndex = 0;\n int rightIndex = 0;\n int outIndex = 0;\n\n while (leftIndex < leftList.size() && rightIndex < rightList.size()) {\n\n if (leftList.get(leftIndex).compareTo(rightList.get(rightIndex)) <= 0) {\n outList.set(outIndex, leftList.get(leftIndex));\n leftIndex++;\n } else {\n outList.set(outIndex, rightList.get(rightIndex));\n rightIndex++;\n }\n\n outIndex++;\n\n }\n\n if (leftIndex < leftList.size()) {\n copyRemainder(leftList, leftIndex, outList, outIndex);\n } else {\n copyRemainder(rightList, rightIndex, outList, outIndex);\n }\n\n }", "private java.util.List<Node> divideEvenly(Slice.D d, String prefix, String[] names, int n, float p) {\n\t\tjava.util.List<Node> return_value = new ArrayList<Node>();\n\t\tfor(Node node : selected_nodes) {\n\t\t\treturn_value.addAll(node.divideEvenly(d, prefix, names, n, p));\n\t\t}\n\t\treturn return_value;\n\t}", "private static Array<Vector2>[] sliceByOneSide(PolygonShape shape, Vector2 p1, Vector2 p2){\n\t\tVector2[] polyPoints = PolyUtils.getVertices(shape);\n\t\tArray<Vector2> leftVerticies = new Array<>();\n\t\tArray<Vector2> rightVerticies = new Array<>();\n\t\tleftVerticies.add(new Vector2(p1));\n\t\tleftVerticies.add(new Vector2(p2));\n\t\trightVerticies.add(new Vector2(p1));\n\t\trightVerticies.add(new Vector2(p2));\n\n\n\t\tfor (Vector2 vertex : polyPoints) {\n\t\t\tif (det(p1, p2, vertex) > 0){\n\t\t\t\tleftVerticies.add(vertex);\n\t\t\t} else {\n\t\t\t\trightVerticies.add(vertex);\n\t\t\t}\n\t\t}\n\n\t\tleftVerticies = arrangeClockwise(leftVerticies);\n\t\trightVerticies = arrangeClockwise(rightVerticies);\n\t\treturn (Array<Vector2>[]) new Array[]{leftVerticies, rightVerticies};\n\t}", "public static <T extends Comparable<T>> List<T> sort(List<T> a) {\r\n if (a.size() < 2) {\r\n return a;\r\n }\r\n\r\n final List<T> leftHalf = a.subList(0, a.size() / 2);\r\n final List<T> rightHalf = a.subList(a.size() / 2, a.size());\r\n\r\n return Helper.merge(sort(leftHalf), sort(rightHalf));\r\n }", "public List<Integer> selfDividingNumbers(int left, int right) {\r\n List<Integer> res = new ArrayList<>();\r\n for (int i=left; i<=right; ++i){\r\n if (valid(i))\r\n res.add(i);\r\n }\r\n return res;\r\n }", "public org.apache.spark.ml.param.DoubleArrayArrayParam splitsArray () { throw new RuntimeException(); }", "public static ArrayList<int[]> multiSortednessData(int[] base) {\n\t\tArrayList<int[]> output = new ArrayList<int[]>();\n\t\tint[] array100 = Arrays.copyOf(base, base.length);\n\t\tint[] array75 = Arrays.copyOf(base, base.length);\n\t\tint[] array50 = Arrays.copyOf(base, base.length);\n\t\tint[] array25 = Arrays.copyOf(base, base.length);\n\t\t\n\t\tArrays.sort(array25, 0, base.length/4);\n\t\tArrays.sort(array75, 0, (base.length * 3)/4);\n\t\tArrays.sort(array50, 0, base.length/2);\n\t\tArrays.sort(array100, 0, base.length);\n\t\toutput.add(base);\n\t\toutput.add(array25);\n\t\toutput.add(array50);\n\t\toutput.add(array75);\n\t\toutput.add(array100);\n\t\t\n\t\treturn output;\n\t}", "private static ArrayList<byte[]> SplittedByte(byte[] byteToSplit, int length){\n ArrayList<byte[]> subBytes = new ArrayList<>();\n int index = 0;\n\n while (index < byteToSplit.length) {\n subBytes.add(Arrays.copyOfRange(byteToSplit,index, index + length));\n index +=length;\n }\n return subBytes;\n }", "public ArrayList<Integer> spiralOrder(final List<ArrayList<Integer>> a) {\r\n\t\t ArrayList<Integer> result = new ArrayList<Integer>();\r\n\t\t int T = 0, B = a.size()-1, L = 0, R = a.get(0).size()-1; \r\n\t\t int dir = 0;\r\n\t\t if(B <= 0){\r\n\t\t return result;\r\n\t\t }\r\n\t\t while(L <= R && T <= B){\r\n\t\t if(dir == 0){\r\n\t\t for(int k = L; k <= R; k++){\r\n\t\t result.add(a.get(T).get(k));\r\n\t\t }\r\n\t\t T++;\r\n\t\t }\r\n\t\t else if(dir == 1){\r\n\t\t for(int k = T; k <= B; k++){\r\n\t\t result.add(a.get(k).get(R));\r\n\t\t }\r\n\t\t R--;\r\n\t\t }\r\n\t\t else if(dir == 2){\r\n\t\t for(int k = R; k >= L; k--){\r\n\t\t result.add(a.get(B).get(k));\r\n\t\t }\r\n\t\t B--;\r\n\t\t }\r\n\t\t else if(dir == 3){\r\n\t\t for(int k = B; k >= T; k--){\r\n\t\t result.add(a.get(k).get(L));\r\n\t\t }\r\n\t\t L++;\r\n\t\t }\r\n\t\t dir = (dir+1) % 4;\r\n\t\t }\r\n\t\t return result;\r\n\t}", "static public Node[] createAlternateSplits(Node head, Node[] heads){ //TC: O(n), SC: O(1)\r\n if(!(head == null) || !(head.next == null)){ //we cannot create a split with one node or with an empty list\r\n heads[0] = head;\r\n heads[1] = head.next;\r\n Node p = head, temp;\r\n while(p != null){\r\n temp = p.next;\r\n p.next = (temp != null)? temp.next:temp;\r\n p = temp;\r\n }\r\n }\r\n \r\n return heads;\r\n \r\n }", "private ArrayList<String> splitHelper(ArrayList<String> accumulator, String remainder, int width, FontMetrics metrics){\n if (metrics.stringWidth(remainder) + 100 < width){\n accumulator.add(remainder);\n return accumulator;\n }\n int i = 0;\n while (metrics.stringWidth(remainder.substring(0,i++)) + 100 < width){}\n while (remainder.charAt(i--) != ' '){}\n accumulator.add(remainder.substring(0,++i));\n return splitHelper(accumulator,remainder.substring(i),width,metrics);\n }", "protected ArrayList<ArrayList<String>> method2() {\n ArrayList<ArrayList<String>> arr = new ArrayList<ArrayList<String>>();\n ArrayList<String> n_clone = new ArrayList<>(Arrays.asList(input));\n\n int whole = Math.floorDiv(input.length,this.num);\n int rem = input.length - whole*this.num; // 'rem' can be interpreted as number of exceptions\n // where each exception gets an extra item\n\n // Create equal number of containers as requested\n for (int i=0;i<this.num;i++) {\n arr.add(new ArrayList<String>());\n }\n\n // Iterate through given Array while putting items into containers\n Iterator itor = n_clone.iterator();\n int count = 0;\n while (itor.hasNext()) {\n for (int i = 0; i < whole; i++) {\n if (itor.hasNext()) {\n arr.get(count).add((String)itor.next());\n } else {\n break;\n }\n }\n if (rem != 0 && itor.hasNext()) {\n arr.get(count).add((String)itor.next());\n rem--;\n }\n count++;\n }\n\n printMatrix(arr);\n\n return arr;\n }", "public static int[] mergeSort(int[] arr, int lo, int hi) {\n //write your code here\n if(lo < hi) {\n int mid = (lo+hi)/2;\n int[] lft = mergeSort(arr, lo, mid);\n int[] rgt = mergeSort(arr, mid+1, hi);\n int[] res = mergeTwoSortedArrays(lft, rgt);\n return res;\n }\n return new int[]{arr[lo]}; // if(lo==hi)\n}", "private ListNode split2(ListNode head) {\n ListNode res = head.next;\n ListNode p1 = head;\n while (p1 != null) {\n ListNode p2 = p1.next;\n p1.next = p2.next;\n p1 = p1.next;\n if (p2.next != null) {\n p2.next = p1.next;\n }\n }\n return res;\n }", "public PVector separate (ArrayList<Boid> boids) {\n float desiredseparation = 25.0f;\n PVector steer = new PVector(0, 0, 0);\n int count = 0;\n // For every boid in the system, check if it's too close\n for (Boid other : boids) {\n float d = PVector.dist(position, other.position);\n // If the distance is greater than 0 and less than an arbitrary amount (0 when you are yourself)\n if ((d > 0) && (d < desiredseparation)) {\n // Calculate vector pointing away from neighbor\n PVector diff = PVector.sub(position, other.position);\n diff.normalize();\n diff.div(d); // Weight by distance\n steer.add(diff);\n count++; // Keep track of how many\n }\n }\n // Average -- divide by how many\n if (count > 0) {\n steer.div((float)count);\n }\n\n // As long as the vector is greater than 0\n if (steer.mag() > 0) {\n\n steer.normalize();\n steer.mult(maxspeed);\n steer.sub(velocity);\n steer.limit(maxforce);\n }\n return steer;\n }", "static ArrayList<Integer> getMajortiy(int arr[]){\n int num1=-1, num2=-1, count1=0, count2=0;\n for(int i:arr){\n if(i==num1) count1++;\n else if(i ==num2) count2++;\n else if(count1==0){\n num1=i;\n count1=1;\n }\n else if(count2==0){\n num2=i;\n count2=1;\n }\n else{\n count1--;\n count2--;\n }\n }\n count1=0; count2=0;\n for(int i:arr){\n if(i==num1) count1++;\n if(i==num2) count2++;\n }\n ArrayList<Integer>res= new ArrayList<>();\n if(count1>arr.length/3) res.add(num1);\n if(count2>arr.length/3) res.add(num2);\n return res;\n\n }", "public static List<Integer> doubling(List<Integer> list) {\n\t\treturn list.stream().map(n -> (n * 2))\n\t\t\t\t\t\t\t.collect(Collectors.toList());\n\t}", "private static void mergeLists() {\n\t\tint length = (photoList.size() / 2) - 1;\n\t\t\n\t\tif (photoList.size() % 2 == 0) {\n\t\t\tlength++;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tList<String> tL = new ArrayList<String>();\n\t\t\t\n\t\t\tPhoto p1 = photoList.get(i),\n\t\t\t\t p2 = photoList.get(photoList.size() - 1 - i);\n\t\t\t\n\t\t\tfor (String tag : p1.getTagList()) {\n\t\t\t\ttL.add(tag);\n\t\t\t}\n\t\t\t\n\t\t\tfor (String tag : p2.getTagList()) {\n\t\t\t\ttL.add(tag);\n\t\t\t}\n\t\t\t\n\t\t\tfor (int j = 0; j < tL.size() - 1; j++) {\n\t\t\t\tfor (int k = j; k < tL.size(); k++) {\n\t\t\t\t\tif (tL.get(j).equals(tL.get(k))) {\n\t\t\t\t\t\ttL.remove(k);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tslideList.add(new Slide(p1.getPhotoId(), p2.getPhotoId(), tL));\n\t\t}\n\t}", "private void combine( ArrayList<Type> array, ArrayList<Type> auxillary, int low, int mid, int high )\r\n\t{\r\n\t\t//copy the array into auxillary array for scratchwork\r\n\t\tfor (int index = low; index <= high; index++ )\r\n\t\t{\r\n\t\t\tauxillary.set(index, array.get(index));\r\n\t\t}\r\n\t\t\r\n\t\tint lowIndex = low;\r\n\t\tint midIndex= mid + 1;\r\n\t\tfor (int count= low; count <= high; count++)\r\n\t\t{\r\n\t\t\tif (lowIndex > mid)\r\n\t\t\t{\r\n\t\t\t\tarray.set(count, auxillary.get(midIndex));\r\n\t\t\t\tmidIndex++;\r\n\t\t\t}\r\n\t\t\telse if (midIndex > high)\r\n\t\t\t{\r\n\t\t\t\tarray.set(count, auxillary.get(lowIndex));\r\n\t\t\t\tlowIndex++;\r\n\t\t\t}\r\n\t\t\t// if the element at midIndex is smaller than the element at the lowIndex, place it into the\r\n\t\t\t// real array before the element at lowIndex\r\n\t\t\telse if((auxillary.get(midIndex).compareTo(auxillary.get(lowIndex)) == -1))\r\n\t\t\t{\r\n\t\t\t\tarray.set(count, auxillary.get(midIndex));\r\n\t\t\t\tmidIndex++;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tarray.set(count, auxillary.get(lowIndex));\r\n\t\t\t\tlowIndex++;\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t}", "private static int partition2 (List<Point> array, int low, int high)\n {\n int pivot = (int) array.get(high).getX(); \n \n int i = (low - 1); // Index of smaller element\n\n for (int j = low; j <= high- 1; j++)\n {\n // If current element is smaller than or\n // equal to pivot\n if (array.get(j).getX() <= pivot)\n {\n i++; // increment index of smaller element\n swap(array, i, j);\n }\n }\n swap(array, i + 1, high);\n return (i + 1);\n }", "private static List<TimeSeries> splitSeries(TimeSeries series, Duration splitDuration, Duration sliceDuration) {\n ArrayList<TimeSeries> subseries = new ArrayList<>();\n if (splitDuration != null && !splitDuration.isZero() && \n sliceDuration != null && !sliceDuration.isZero()) {\n\n List<Integer> beginIndexes = getSplitBeginIndexes(series, splitDuration);\n beginIndexes.forEach((subseriesBegin) -> {\n subseries.add(subseries(series, subseriesBegin, sliceDuration));\n });\n }\n return subseries;\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}", "public Floor[] getFloors(int startHeightOffset, int endHeightOffset) {\n/* 6401 */ if (this.floors == null) {\n/* 6402 */ return emptyFloors;\n/* */ }\n/* 6404 */ List<Floor> toReturn = new ArrayList<>();\n/* 6405 */ for (Floor floor : this.floors) {\n/* */ \n/* */ \n/* */ \n/* 6409 */ if (floor.getHeightOffset() >= startHeightOffset && floor.getHeightOffset() <= endHeightOffset)\n/* 6410 */ toReturn.add(floor); \n/* */ } \n/* 6412 */ return toReturn.<Floor>toArray(new Floor[toReturn.size()]);\n/* */ }", "public static <T extends Comparable<? super T>> void mergeSort(List<T> a,\n List<T> tmpArray, int low, int high){\n // base case if high - low < 1 then already sorted\n if(high - low < 1){\n return;\n }\n\n // else split array and sort each half and then merge the halves back together\n int center = (low + high)/2;\n mergeSort(a, tmpArray, low, center);\n mergeSort(a, tmpArray, center + 1, high);\n merge(a, tmpArray, low, high);\n }", "public void devideDataPartly(int index, int interval) {\n int i = 0, j = 0;\n testingSet = new Double[interval][2];\n trainingSet = new Double[data.length - interval][2];\n while (i + j < data.length) {\n if ((i + j - index) % (data.length / interval) == 0 && i < interval) {\n testingSet[i][0] = data[i + j][0];\n testingSet[i][1] = data[i + j][1];\n i++;\n } else {\n trainingSet[j][0] = data[i + j][0];\n trainingSet[j][1] = data[i + j][1];\n j++;\n }\n }\n }", "int[] populateArray(int[] firstArr,int[] secondArr){\n\t\tlength = firstArr.length + secondArr.length; //Getting length of the resultant array\n\t\tresultArr = new int[length]; //set resultant array length\n\t\tfor(kCounter = 0 ; kCounter < length; kCounter++){\n\t\t\t//checking index of the array is even or odd\n\t\t\tif(kCounter % 2 == 0){\n\t\t\t\tresultArr[kCounter] = secondArr[iCounter]; //if position is even then add element to even index\n\t\t\t\tiCounter++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tresultArr[kCounter] = firstArr[jCounter]; //if position is odd then add element to odd index\n\t\t\t\tjCounter++;\n\t\t\t}\n\t\t}\n\t\treturn resultArr;\n\t}", "public List<List<Integer>> subsets2(int[] A){\n\n int res = 0;\n int diff = Integer.MIN_VALUE;\n int count = 0;\n int start = 0;\n for (int i = 1; i < A.length; i++){\n int curDiff = A[i] - A[i - 1];\n if (diff == curDiff){\n count += i - start - 1 > 0 ? i - start - 1 : 0;\n } else {\n start = i - 1;\n diff = currDiff;\n res += count;\n count = 0;\n }\n }\n res += count;\n System.out.println(res);\n return new ArrayList<List<Integer>>();\n }", "public List<List<Integer>> subsets2(int[] nums) {\n if (nums == null || nums.length == 0) {\n return new ArrayList<>();\n }\n\n Queue<List<Integer>> queue = new LinkedList<>();\n List<List<Integer>> resList = new LinkedList<>();\n List<Integer> fst = new LinkedList<>();\n\n queue.offer(fst);\n resList.add(fst);\n\n while (!queue.isEmpty()) {\n int size = queue.size();\n\n for (int i = 0; i < size; i++) {\n List<Integer> list = queue.poll();\n\n int start = list.size() == 0 ? -1 : list.get(list.size() - 1);\n\n while (++start < nums.length) {\n List<Integer> newList = new LinkedList<>();\n\n for (Integer tmp : list) {\n newList.add(tmp);\n }\n\n newList.add(start);\n queue.offer(newList);\n resList.add(newList);\n }\n }\n }\n\n List<List<Integer>> res = new LinkedList<>();\n\n for (List<Integer> list : resList) {\n List<Integer> tmp = new LinkedList<>();\n\n for (Integer idx : list) {\n tmp.add(nums[idx]);\n }\n\n res.add(tmp);\n }\n\n return res;\n }", "protected ArrayList<Aircraft> mergeSort(ArrayList<Aircraft> list, boolean ascending)\r\n {\r\n\t\t// Use the merge sort algorithm to sort 'aircrafts' and then \r\n\t\t// return it. Initially this method just returns an empty\r\n \t// list - you need to fix this.\r\n \t\r\n \tArrayList<Aircraft> sorted = new ArrayList<Aircraft>();\r\n\r\n \t// TODO\r\n \tif(list.size()<=1) \r\n \t{\r\n \t\treturn list;\r\n \t}\r\n \t \r\n \t int middleIndex = list.size()/2; //find the middle index\r\n \t \r\n \t ArrayList<Aircraft> sortedL = new ArrayList<Aircraft>(middleIndex); //create new Empty array at left\r\n \t ArrayList<Aircraft> sortedR; // initialized new Array at Right \r\n \t \r\n \t \r\n \t if(list.size()%2 == 0) //create new Right Empty array has the same of Left empty array\r\n \t {\r\n \t sortedR = new ArrayList<Aircraft>(middleIndex); \r\n \t }else\r\n \t {\r\n \t sortedR = new ArrayList<Aircraft>(middleIndex+1);\r\n \t }\r\n \t \r\n \t for(int i = 0;i<middleIndex;i++)\r\n \t {\r\n \t sortedL.add(list.get(i)); //get index list with lest than middle index\r\n \t }\r\n \t \r\n \t for(int j = middleIndex ;j < list.size();j++)\r\n \t {\r\n \t sortedR.add(list.get(j)); //get index list with more than middle index\r\n \t }\r\n \t \r\n \t\r\n \t \r\n \t if(ascending == true) {\r\n \t sortedL = mergeSort(sortedL,true); // split elements in the left side;\r\n \t sortedR = mergeSort(sortedR,true); // split element in the right side;\r\n \t \r\n \t sorted= Merge(sortedL,sortedR,true);\r\n \t \r\n \t \r\n \t }else // for descending\r\n \t { \r\n \t \r\n \t sortedL = mergeSort(sortedL,false); // split elements in the left side;\r\n \t sortedR = mergeSort(sortedR,false); // split element in the right side;\r\n \t \r\n \t sorted= Merge(sortedL,sortedR,false);\r\n \t \r\n \t }\r\n \treturn sorted;\r\n\t\t\r\n \t\r\n\t\t\r\n \t\r\n }", "private ArrayList<TTC> generateSegmentsHelper(ArrayList<TTC> reference_list) {\n\n ArrayList<TTC> copy = new ArrayList<> (reference_list);\n int start = 0;\n int end = 0;\n\n while (!copy.get(start).equals(START_STATION)) {\n start += 1;\n }\n while (!copy.get(end).equals(endStation)) {\n end += 1;\n }\n if (start < end) {\n return new ArrayList<>(copy.subList(start, end + 1));\n } else if (start == end) {\n return new ArrayList<>(); // if enter and exit at the same station.\n } else {\n Collections.reverse(copy);\n return new ArrayList<>(copy.subList(end, start + 1));\n }\n }", "private void createNumPartitions(Integer[] splits, FeatureField featFld, \n \t\tList<Integer[]> newSplitList) {\n \t\tint min = (int)(featFld.getMin() + 0.01);\n \t\tint max = (int)(featFld.getMax() + 0.01);\n \t\tint binWidth = featFld.getBucketWidth();\n \tif (null == splits) {\n \t\t//first time\n \t\tfor (int split = min + binWidth ; split < max; split += binWidth) {\n \t\t\tInteger[] newSplits = new Integer[1];\n \t\t\tnewSplits[0] = split;\n \t\t\tnewSplitList.add(newSplits);\n \t\t\tcreateNumPartitions(newSplits, featFld,newSplitList);\n \t\t}\n \t} else {\n \t\t//create split based off last split that will contain one additinal split point\n \t\tint len = splits.length;\n \t\tif (len < featFld.getMaxSplit() -1) {\n\t \t\tfor (int split = splits[len -1] + binWidth; split < max; split += binWidth) {\n\t \t\t\tInteger[] newSplits = new Integer[len + 1];\n\t \t\t\tint i = 0;\n\t \t\t\tfor (; i < len; ++i) {\n\t \t\t\t\tnewSplits[i] = splits[i];\n\t \t\t\t}\n\t \t\t\tnewSplits[i] = split;\n\t \t\t\tnewSplitList.add(newSplits);\n\t \t\t\t\n\t \t\t\t//recurse to generate additional splits\n\t \t\t\tcreateNumPartitions(newSplits, featFld,newSplitList);\n\t \t\t}\n \t\t}\n \t}\n }", "int partition(int arr[], int low, int high, SequentialTransition sq,ArrayList<StackPane> list,double speed) \n\t {\n\t\t\tint step;\n//\t\t\tint n = arr.length;\n\t int pivot = arr[high]; \n\t int i = (low-1);\n\t for (int j=low; j<high; j++) \n\t { \n\t if (arr[j] <= pivot) \n\t { \n\t i++; \n\t int temp = arr[i]; \n\t arr[i] = arr[j]; \n\t arr[j] = temp; \n\t step = j - i;\n\t sq.getChildren().add(FillBeforeSwap(list.get(i), list.get(j),speed));\n\t sq.getChildren().add(swapMe(list.get(i), list.get(j), step, list, speed));\n\t sq.getChildren().add(FillAfterSwap(list.get(j), list.get(i), speed));\n\t } \n\t } \n\t int temp = arr[i+1]; \n\t arr[i+1] = arr[high]; \n\t arr[high] = temp; \n\t step = (high) - (i+1);\n\t sq.getChildren().add(FillBeforeSwap(list.get(i+1), list.get(high), speed));\n\t sq.getChildren().add(swapMe(list.get(i+1), list.get(high), step, list, speed));\n\t sq.getChildren().add(FillAfterSwap(list.get(i+1), list.get(high), speed));\n\t \n\t return i+1; \n\t }", "private static <Item extends Comparable> void partitionBed(\n List<Item> unsorted, Bear pivot,\n List<Item> less, List<Item> equal, List<Item> greater) {\n for (Item s : unsorted) {\n if (s.compareTo(pivot) < 0) {\n less.add(s);\n } else if (s.compareTo(pivot) == 0) {\n equal.add(s);\n } else {\n greater.add(s);\n }\n }\n }", "Entry<V>[][] getList() {\n @SuppressWarnings(\"unchecked\")\n Entry<V>[][] res = new Entry[4][2 * sizeCache];\n int i = 0;\n for (Entry<V> e = list1.next; e != mid1.next; e = e.next) {\n res[0][i++] = e;\n }\n\n i = 0;\n for (Entry<V> e = mid1.next; e != list1; e = e.next) {\n res[1][i++] = e;\n }\n\n i = 0;\n for (Entry<V> e = list2.next; e != mid2.next; e = e.next) {\n res[2][i++] = e;\n }\n\n i = 0;\n for (Entry<V> e = mid2.next; e != list2; e = e.next) {\n res[3][i++] = e;\n }\n\n\n return res;\n }", "public ArrayList<ArrayList<String>> fromSecondToFirst(ArrayList<String> words);", "private void createArrays(){\n array1 = new BubbleSort(CreateIntArray.fillArray(15)).bubbleSort();\n array2 = new BubbleSort(CreateIntArray.fillArray(15)).bubbleSort();\n BubbleSort.listArrayElements(array1);\n BubbleSort.listArrayElements(array2);\n\n int[] array = new int[array1.length + array2.length];\n\n int i = 0, j = 0;\n for (int k = 0; k < array.length; k++){\n if(i > array1.length - 1){\n array[k] = array2[j];\n j++;\n } else if(j > array2.length - 1){\n array[k] = array1[i];\n i++;\n } else if (array1[i] < array2[j]){\n array[k] = array1[i];\n i++;\n } else {\n array[k] = array2[j];\n j++;\n }\n\n }\n BubbleSort.listArrayElements(array);\n\n\n }", "private static <T extends Comparable<? super T>> void merge(List<T> list, int firstBegin, int firstFinish, int secondBegin, int secondFinish, T[] auxiliaryArray){\n int firstIndex = firstBegin;\n int secondIndex = secondBegin;\n int auxiliaryIndex = 0;\n while(firstIndex <= firstFinish && secondIndex <= secondFinish){\n if(list.get(firstIndex).compareTo(list.get(secondIndex)) <= 0){\n auxiliaryArray[auxiliaryIndex] = list.get(firstIndex);\n firstIndex++;\n }else{\n auxiliaryArray[auxiliaryIndex] = list.get(secondIndex);\n secondIndex++;\n }\n auxiliaryIndex++;\n }\n while(firstIndex <= firstFinish){\n auxiliaryArray[auxiliaryIndex] = list.get(firstIndex);\n firstIndex++;\n auxiliaryIndex++;\n }\n while(secondIndex <= secondFinish){\n auxiliaryArray[auxiliaryIndex] = list.get(secondIndex);\n secondIndex++;\n auxiliaryIndex++;\n }\n auxiliaryIndex = 0;\n for(int i = firstBegin; i <= secondFinish; i++){\n list.set(i, auxiliaryArray[auxiliaryIndex]);\n auxiliaryIndex++;\n }\n }", "private static <T extends Comparable<? super T>> void mergeSort(List<T> list, int begin, int mid, int finish, T[] auxiliaryArray){\n if(begin + 1 == finish)\n merge(list, begin, mid, mid + 1, finish, auxiliaryArray);\n else{\n if(begin < finish){\n mergeSort(list, begin, (mid + begin)/2, mid, auxiliaryArray);\n mergeSort(list, mid + 1, (finish + mid)/2, finish, auxiliaryArray);\n merge(list, begin, mid, mid + 1, finish, auxiliaryArray);\n }\n }\n }" ]
[ "0.62178135", "0.6138173", "0.6041947", "0.5899959", "0.5896317", "0.5817219", "0.58000916", "0.5762609", "0.5739854", "0.57398427", "0.56974757", "0.5674104", "0.56678003", "0.5612845", "0.5586692", "0.5549579", "0.55463696", "0.55300885", "0.5525138", "0.5509721", "0.55096966", "0.5484012", "0.54722863", "0.54525185", "0.54345137", "0.54242", "0.539412", "0.53941184", "0.53736037", "0.53515893", "0.5334739", "0.5330265", "0.53124166", "0.53063107", "0.5304644", "0.53024065", "0.5286341", "0.5277513", "0.52714026", "0.52625775", "0.5259623", "0.5221101", "0.52173924", "0.5192443", "0.51752245", "0.5165353", "0.5161395", "0.5159603", "0.5138038", "0.5102579", "0.50952494", "0.50898933", "0.50854176", "0.50816417", "0.50772226", "0.5065849", "0.50634295", "0.50564736", "0.5051892", "0.50477374", "0.5043465", "0.5043365", "0.5035993", "0.50359625", "0.5030498", "0.5027775", "0.5025874", "0.5023545", "0.5023276", "0.5021028", "0.50173587", "0.5016207", "0.5012581", "0.49936083", "0.498875", "0.49860033", "0.49845603", "0.49700132", "0.49579248", "0.49549186", "0.49516135", "0.4947177", "0.49390128", "0.49360794", "0.49350527", "0.4932652", "0.49300784", "0.49243155", "0.49092248", "0.49076143", "0.4906967", "0.49053377", "0.48955205", "0.48919857", "0.48839685", "0.48832512", "0.4878201", "0.48767918", "0.4875093", "0.48747662" ]
0.7687159
0
method ........................ M A I N M E T H O D ............................// This main method is just for testing this class.
public static void main(String[] args) throws ClassNotFoundException { testshowDoubleArray(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "public static void main() {\n \n }", "public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public static void main(String[] args) {\r\n// Use for unit testing\r\n }", "public static void main(String[]args) {\n\t\n\t\t\n\n}", "public static void main(String[] args) {\n // PUT YOUR TEST CODE HERE\n }", "public static void main(String[] args) {\r\n // 2. Call your method in various ways to test it here.\r\n }", "public static void main(){\n\t}", "public static void main()\n\t{\n\t}", "public static void main(String[] args)\r\t{", "public Main() {\n \n \n }", "public static void main(String [] args){\n \n \n \n \n }", "public static void main(String[] args)\r\n {\n \r\n \r\n }", "public static void main(String[] args) {\n \n \n \n \n }", "public static void main(String []args){\n\n }", "public static void main(String[] args) {\n \r\n\t}", "public static void main(String[] args) {\n \n \n }", "public static void main(String[] args) {\n \n \n }", "public Main() {\r\n\t}", "public static void main() {\n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "private Main() {\n\n super();\n }", "public static void main(String args[]) {\r\n }", "public static void main(String[] args) {\n DatabaseCommunicator test = new DatabaseCommunicator();\n// HashMap<String,LabTest> methods = test.getMethods();\n// System.out.println(methods.get(\"mingi labTest\").getMatrix());\n LabTest labTest = new LabTest();\n ArrayList testData = test.fileReader();\n DatabaseCommunicator.testSendingToDatabase(test, labTest, testData);\n }", "public static void main(String[] args) {\n \r\n}", "public static void main(String[] args) {\n \n \n \n\t}", "public void Main(){\n }", "private void test() {\n\n\t}", "public static void main (String []args){\n }", "public static void main(String[] args){\n\t\t\n\t\t\n \t}", "public static void main(String[] args) throws IOException {\n\r\n \r\n \r\n }", "public static void main (String args[]) {\n\t\t\n }", "public static void main(String[] args) throws Exception {\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) throws Exception {\n\r\n\t}", "public static void main(String[] args){\n\t\t\r\n\t}", "public static void main(String[] args)throws Exception{\n\t}", "private test5() {\r\n\t\r\n\t}", "public static void main(String []args){\n }", "public static void main(String []args){\n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String args[]){\n\t\t\n\t\n\t}", "public static void main(String[] args)\r\n {\r\n \r\n \r\n \r\n }", "public static void main(String args[]) { \r\n }", "public Main() {\r\n }", "public Main() {\r\n }", "public static void main(String[] args) {\r\n \r\n }", "public static void main(String[] args) {\r\n \r\n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "public static void main(String[] args) {\n\t\t\n\t\t\t\n\n\t}", "public static void main(String[] args) {\n\t\r\n}", "public static void main(String args[]){\n\t\t\n\t}", "public void main(){\n }", "private Main() {\n }", "public static void main(String[] args) {\n\t \t\n\t \t\n\t }", "private Main ()\n {\n super ();\n }", "public static void main(String[] args) \n {\n\t \n\t \n\t \n}", "public static void main(String[] args) {\n \n\n }", "public static void main(String args[]){\n\t\t\r\n\t}", "public static void main(String[] args){\n \t\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t}", "public static void main(String [] args) throws Exception{\n\t}", "public static void main(String[] args) {\n\r\n}", "private Main() {}", "public static void main(String[] args) {\n\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n // TODO Auto-generated method stub\n\n }", "public static void main(String[] args) {\n \n\t}", "public static void main(String[] args){\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n }", "public static void main(String[] args)\r\n {\n\r\n }", "public static void main(String[] args) {\n\t\t\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\r\n }", "public static void main(String[] args) {\t\n\t\t\n\t}", "public Main() {}", "public static void main(String[] args) {\n \n\t}", "public static void main(String[] args) {\n\t\t\t\t\n\t}", "public static void main(String[] args){\n new Testing().runTests();\r\n \r\n }", "public static void main (String [] args){\n\n\n\n \n\n\n\n\n\n \n\n\n\n\n\n\n\n }", "public static void main(String[] args) {\n // TODO code application logic here\n // some testing? or actually we can't run it standalone??\n }", "public static void main(String[] args) {\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n \n\t\t}", "public static void main(String[] args) {\n\r\n\t\t\r\n\t}", "private stendhal() {\n\t}", "public static void main(String[] args) {\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}" ]
[ "0.73036706", "0.71529526", "0.71257144", "0.7071305", "0.7007071", "0.69364625", "0.69284075", "0.6901514", "0.6897542", "0.68147856", "0.68125254", "0.67676014", "0.67267483", "0.67146325", "0.6701548", "0.6698225", "0.66658247", "0.66658247", "0.6657378", "0.6646109", "0.66439307", "0.66439307", "0.66439307", "0.66439307", "0.66439307", "0.66439307", "0.6642709", "0.66257745", "0.6608409", "0.66077536", "0.66077024", "0.66054505", "0.6604091", "0.66008466", "0.6598271", "0.6596587", "0.6583559", "0.6580419", "0.65755445", "0.65735835", "0.657118", "0.6565488", "0.65631187", "0.65631187", "0.6561369", "0.65594345", "0.65551573", "0.65551203", "0.65369684", "0.65369684", "0.65345037", "0.65345037", "0.65321165", "0.653176", "0.65264595", "0.6526329", "0.6522252", "0.6514833", "0.6504997", "0.6500765", "0.6495604", "0.6482729", "0.64807117", "0.647927", "0.64791447", "0.64791447", "0.64791447", "0.64791447", "0.6476572", "0.64747995", "0.6471946", "0.6468767", "0.64673734", "0.6462227", "0.6457322", "0.6453861", "0.64463603", "0.6439368", "0.64357245", "0.6433854", "0.6430553", "0.64297897", "0.6429668", "0.64280725", "0.64161766", "0.6414212", "0.6408553", "0.6406399", "0.64034724", "0.6401933", "0.6401933", "0.6401933", "0.6401933", "0.64011306", "0.64011306", "0.64011306", "0.64011306", "0.64011306", "0.64011306", "0.64011306", "0.64011306" ]
0.0
-1
/ 19: / 20:
public ItemSwordAndShield(Item.ToolMaterial mat) /* 21: */ { /* 22:20 */ super(mat, ""); /* 23:21 */ if (mat == Item.ToolMaterial.IRON) { /* 24:22 */ this.isIron = true; /* 25: */ } else { /* 26:24 */ this.isIron = false; /* 27: */ } /* 28: */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int method_2436() {\r\n return 16;\r\n }", "void mo1940i();", "void mo1942k();", "private void kk12() {\n\n\t}", "public void mo21877s() {\n }", "void mo1943l();", "public void method_4270() {}", "public static void listing5_16() {\n }", "@Override\n protected long advanceH(final long k) {\n return 5 * k - 2;\n }", "int method20()\n {\n return 579190;\n }", "public void mo21786K() {\n }", "public static void listing5_14() {\n }", "public void mo21782G() {\n }", "public static void listing5_15() {\n }", "public void mo21794S() {\n }", "public void mo21880v() {\n }", "public int mo36g() {\n return 2;\n }", "public void mo21879u() {\n }", "public void mo12930a() {\n }", "void mo1507n();", "public void mo21795T() {\n }", "public static int i()\r\n/* 25: */ {\r\n/* 26: 48 */ return 9;\r\n/* 27: */ }", "static void feladat10() {\n\t}", "public int mo36g() {\n return 4;\n }", "public int mo36g() {\n return 8;\n }", "public void mo21878t() {\n }", "public void mo5365c(int i, int i2) {\n }", "public void mo21783H() {\n }", "public void mo2740a() {\n }", "public void mo21779D() {\n }", "public void mo21789N() {\n }", "public void mo21788M() {\n }", "public void mo21800a() {\n }", "void mo1506m();", "public void mo3749d() {\n }", "public void mo2470d() {\n }", "static String m20335a(int i) {\n return String.format(null, \"%s.ols%d.%d\", \"v2\", 100, Integer.valueOf(i));\n }", "public abstract String mo9239aw();", "public void mo21787L() {\n }", "@Override\n\tpublic void challenge17() {\n\n\t}", "public abstract void mo2624j();", "void mo23327tY(int i);", "public void mo21793R() {\n }", "@Test\n\tpublic void getStartingSpaceCorrect(){\n\t\tassertEquals(11, adventurer1.getStartingSpace());\n\t}", "public void method_191() {}", "C20259y mo54455t(int i);", "void mo1933b(int i);", "public void mo6081a() {\n }", "public void mo21780E() {\n }", "public void mo23813b() {\n }", "public void mo38117a() {\n }", "public V get19();", "public static void testTalletLige() {\n\n if (20 % 2 == 0) {\n System.out.println(\"** \" + 20 + \" er et lige tal.\");\n }\n else\n System.out.println(\"** \" + 20 + \" er et ulige tal.\");\n }", "public void mo21825b() {\n }", "void mo1941j();", "void mo11024a(int i, int i2, String str);", "public abstract String mo9238av();", "public String c()\r\n/* 30: */ {\r\n/* 31:175 */ return \"step.\" + this.a;\r\n/* 32: */ }", "public int method_2031() {\r\n return this.field_1790;\r\n }", "public double get20To29FieldGoals()\r\n {\r\n return fg_20_29;\r\n }", "void m21();", "public static void main(String[] args) {\n\t\r\nfor (int i=1; i<=20; i++) {\r\n\tif (i!=20) {\r\n\t\t\r\n\tSystem.out.print(i+\"+\");\r\n}\r\nelse {\r\n\tSystem.out.println(i);\r\n}\r\n\t}\r\n\r\n}", "@Test\n public void test20True() {\n long start = System.currentTimeMillis();\n for (int i = 1; i <= 20; i++) {\n RandomGUID myguid = new RandomGUID(true);\n System.out.println(i + \" \" + myguid.toString());\n }\n System.out.println(Ansi.ansi().eraseScreen().render(String.format(\"20 条@|blue 耗时 |@@|yellow %s |@@|blue 毫秒|@\", System.currentTimeMillis() - start)));\n }", "public void mo97908d() {\n }", "void mo1761g(int i);", "public void mo5369d(int i, int i2) {\n }", "public void mo9233aH() {\n }", "public static void main002(String[] args) {\n\n\t\tint number\t= 20;\n\t\tSystem.out.println(\"Start = \" + number);\n\t\t\n\t\tnumber += 10;\t// number\t= number + 10;\n\t\tnumber -= 10;\t// number\t= number - 10\n\t\tnumber *= 10;\t// number\t= number * 10\n\t\tnumber /= 10;\t// number\t= number / 10\n\t\tnumber %= 10;\t// number\t= number % 10\n\t\tSystem.out.println(\"End = \" + number);\n\t}", "int getAtk();", "void mo9075h(String str, int i, int i2);", "public void mo3376r() {\n }", "public void method_193() {}", "private void m50367F() {\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\":_]J_/L!uFQ7%)BrL\");\n Token token0 = xPathLexer0.minus();\n assertEquals(\":\", token0.getTokenText());\n assertEquals(6, token0.getTokenType());\n \n Token token1 = xPathLexer0.nextToken();\n assertEquals(\"_\", token1.getTokenText());\n assertEquals(15, token1.getTokenType());\n }", "private double getReadTime(int wordCount) {\n return wordCount / 130.0;\n }", "private static android.util.Pair<com.google.android.exoplayer2.Format, java.lang.Long> m26780a(com.google.android.exoplayer2.p366s0.p374y.C9043p.C9044a r20, java.lang.String r21) {\n /*\n r0 = r20\n byte[] r1 = r0.f19970d\n int r2 = r0.f19968b\n byte[] r1 = java.util.Arrays.copyOf(r1, r2)\n r2 = 4\n byte r3 = r1[r2]\n r3 = r3 & 255(0xff, float:3.57E-43)\n r4 = 5\n byte r5 = r1[r4]\n r5 = r5 & 255(0xff, float:3.57E-43)\n r6 = 6\n byte r6 = r1[r6]\n r6 = r6 & 255(0xff, float:3.57E-43)\n int r3 = r3 << r2\n int r7 = r5 >> 4\n r13 = r3 | r7\n r3 = r5 & 15\n int r3 = r3 << 8\n r14 = r3 | r6\n r3 = 7\n byte r5 = r1[r3]\n r5 = r5 & 240(0xf0, float:3.36E-43)\n int r5 = r5 >> r2\n r6 = 2\n if (r5 == r6) goto L_0x0043\n r6 = 3\n if (r5 == r6) goto L_0x003d\n if (r5 == r2) goto L_0x0037\n r2 = 1065353216(0x3f800000, float:1.0)\n r18 = 1065353216(0x3f800000, float:1.0)\n goto L_0x004c\n L_0x0037:\n int r2 = r14 * 121\n float r2 = (float) r2\n int r5 = r13 * 100\n goto L_0x0048\n L_0x003d:\n int r2 = r14 * 16\n float r2 = (float) r2\n int r5 = r13 * 9\n goto L_0x0048\n L_0x0043:\n int r2 = r14 * 4\n float r2 = (float) r2\n int r5 = r13 * 3\n L_0x0048:\n float r5 = (float) r5\n float r2 = r2 / r5\n r18 = r2\n L_0x004c:\n r10 = 0\n r11 = -1\n r12 = -1\n r15 = -1082130432(0xffffffffbf800000, float:-1.0)\n java.util.List r16 = java.util.Collections.singletonList(r1)\n r17 = -1\n r19 = 0\n java.lang.String r9 = \"video/mpeg2\"\n r8 = r21\n com.google.android.exoplayer2.Format r2 = com.google.android.exoplayer2.Format.m24871a(r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19)\n r5 = 0\n byte r3 = r1[r3]\n r3 = r3 & 15\n int r3 = r3 + -1\n if (r3 < 0) goto L_0x0092\n double[] r7 = f19949q\n int r8 = r7.length\n if (r3 >= r8) goto L_0x0092\n r5 = r7[r3]\n int r0 = r0.f19969c\n int r0 = r0 + 9\n byte r3 = r1[r0]\n r3 = r3 & 96\n int r3 = r3 >> r4\n byte r0 = r1[r0]\n r0 = r0 & 31\n if (r3 == r0) goto L_0x008b\n double r3 = (double) r3\n r7 = 4607182418800017408(0x3ff0000000000000, double:1.0)\n double r3 = r3 + r7\n int r0 = r0 + 1\n double r0 = (double) r0\n double r3 = r3 / r0\n double r5 = r5 * r3\n L_0x008b:\n r0 = 4696837146684686336(0x412e848000000000, double:1000000.0)\n double r0 = r0 / r5\n long r5 = (long) r0\n L_0x0092:\n java.lang.Long r0 = java.lang.Long.valueOf(r5)\n android.util.Pair r0 = android.util.Pair.create(r2, r0)\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.exoplayer2.p366s0.p374y.C9043p.m26780a(com.google.android.exoplayer2.s0.y.p$a, java.lang.String):android.util.Pair\");\n }", "@Override\n protected int func_150123_b(int p_150123_1_)\n {\n return 60;\n }", "public void mo21791P() {\n }", "public void mo21867i() {\n mo21877s();\n }", "private void m50366E() {\n }", "public abstract String mo41086i();", "public abstract int getGuideSchematics();", "abstract String mo1748c();", "String mo20730b();", "public final int mo26232a(C17480i c17480i, int i, int i2) {\n int i3 = -1;\n AppMethodBeat.m2504i(2017);\n if (Math.abs(i2) <= 500 || Math.abs(i) >= Math.abs(i2)) {\n AppMethodBeat.m2505o(2017);\n } else {\n int itemCount = c17480i.getItemCount();\n if (itemCount == 0) {\n AppMethodBeat.m2505o(2017);\n } else {\n int cFY = this.sDo.cFY() + 1;\n if (cFY == -1) {\n AppMethodBeat.m2505o(2017);\n } else {\n boolean z = c17480i.mo1776iG() ? i > 0 : i2 > 0;\n if (c17480i instanceof C37140b) {\n PointF bX = ((C37140b) c17480i).mo1761bX(itemCount - 1);\n if (bX != null) {\n if (bX.x < 0.0f || bX.y < 0.0f) {\n i3 = 1;\n } else {\n i3 = 0;\n }\n if (i3 == 0) {\n if (!z) {\n i3 = cFY + 1;\n }\n i3 = cFY - 1;\n } else {\n if (z) {\n i3 = cFY + 1;\n }\n i3 = cFY - 1;\n }\n C4990ab.m7417i(\"MicroMsg.TopStory.TopStoryVideoPagerSnapHelper\", \"findTargetSnapPosition velocityY: %d centerPosition: %d forwardDirection: %b result: %d currentPlayPos: %d\", Integer.valueOf(i2), Integer.valueOf(cFY), Boolean.valueOf(z), Integer.valueOf(i3), Integer.valueOf(this.sDo.cFY() + 1));\n AppMethodBeat.m2505o(2017);\n }\n }\n i3 = 0;\n if (i3 == 0) {\n }\n C4990ab.m7417i(\"MicroMsg.TopStory.TopStoryVideoPagerSnapHelper\", \"findTargetSnapPosition velocityY: %d centerPosition: %d forwardDirection: %b result: %d currentPlayPos: %d\", Integer.valueOf(i2), Integer.valueOf(cFY), Boolean.valueOf(z), Integer.valueOf(i3), Integer.valueOf(this.sDo.cFY() + 1));\n AppMethodBeat.m2505o(2017);\n }\n }\n }\n return i3;\n }", "void mo1501h();", "public void mo21785J() {\n }", "@Test(timeout = 4000)\n public void test20() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"%\\\"`iss[ks6oulux\");\n assertEquals(\"%\\\"`is[ks6ouluc\", string0);\n }", "public void mo4359a() {\n }", "public int getMobCap()\r\n/* 24: */ {\r\n/* 25:41 */ return this.f;\r\n/* 26: */ }", "static int size_of_ani(String passed){\n\t\treturn 2;\n\t}", "void mo1970b();", "public double get10To19FieldGoals()\r\n {\r\n return fg_0_19;\r\n }", "public abstract void mo20899UO();", "void mo63039b(int i, int i2);", "private int h1(int p){\n\t\t return p % table.length;\n\t}", "public void mo21784I() {\n }", "public void mo9253f(int i, int i2) {\n }", "public abstract void mo9816d(int i, int i2);", "public String b4OrAfter();", "public void mo115190b() {\n }" ]
[ "0.55709076", "0.5493394", "0.5458398", "0.5426563", "0.534869", "0.5294282", "0.5293478", "0.52794755", "0.52790725", "0.5270086", "0.5209938", "0.520411", "0.520026", "0.5138509", "0.5125166", "0.5122229", "0.5110396", "0.5099524", "0.50953853", "0.50886554", "0.5086783", "0.50817066", "0.5080932", "0.5073349", "0.50650483", "0.50647694", "0.50613356", "0.5049914", "0.5048409", "0.50423765", "0.5039626", "0.50318646", "0.50275594", "0.5025994", "0.5025406", "0.5018613", "0.50150084", "0.5007887", "0.500623", "0.50011474", "0.49901783", "0.49887347", "0.49796456", "0.49746126", "0.4974334", "0.49706358", "0.49681622", "0.49656573", "0.4962406", "0.49533716", "0.49416137", "0.49375644", "0.49285665", "0.492314", "0.49210736", "0.4920645", "0.4908222", "0.49073005", "0.49049345", "0.4903139", "0.4902675", "0.4900606", "0.4899613", "0.48971164", "0.48943904", "0.48898938", "0.4883379", "0.48826203", "0.48812717", "0.4878447", "0.48744977", "0.48708436", "0.48707795", "0.4870668", "0.48697552", "0.4865703", "0.48639804", "0.4862204", "0.48615023", "0.48601007", "0.48514852", "0.48501453", "0.48439214", "0.48424125", "0.48422843", "0.48327607", "0.48287043", "0.4828685", "0.48206013", "0.48190272", "0.48155198", "0.48137861", "0.4812606", "0.48123777", "0.48112547", "0.4810333", "0.48070922", "0.48069602", "0.48067316", "0.48029548", "0.48024997" ]
0.0
-1
/ 29: / 30:
@SideOnly(Side.CLIENT) /* 31: */ public void registerIcons(IIconRegister iconRegister) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int interval() {\n return 30;\n }", "Period mo20733e();", "public int mo36g() {\n return 8;\n }", "public int getDuration()\r\n/* 70: */ {\r\n/* 71: 71 */ return this.duration;\r\n/* 72: */ }", "@Override\n protected long advanceH(final long k) {\n return 5 * k - 2;\n }", "public int mo36g() {\n return 4;\n }", "public void mo21877s() {\n }", "@Test public void shouldGive240MinFor950cent() {\r\n // Three hours: $1.5+2.0+3.0\r\n assertEquals( 4 * 60 /*minutes*/ , rs.calculateTime(950) ); \r\n }", "private int normalizeTime() {\n int currentTimeSeconds = (int) (System.currentTimeMillis() / 1000);\n\n // The graphing interval in minutes\n // TODO not hardcoded :3\n int interval = 30;\n\n // calculate the devisor denominator\n int denom = interval * 60;\n\n return (int) Math.round((currentTimeSeconds - (denom / 2d)) / denom) * denom;\n }", "void mo1506m();", "void milestone4(int inputSeconds){\n int days = inputSeconds / 86400;\n int seconds = inputSeconds % 86400;\n int hours = seconds / 3600;\n seconds = seconds % 3600;\n int minutes = seconds / 60;\n seconds = seconds % 60;\n\n System.out.println(\"Day/s: \" + days);\n System.out.println(\"Hour/s: \" + hours);\n System.out.println(\"Minute/s: \" + minutes);\n System.out.println(\"Second/s: \" + seconds);\n }", "public int method_2436() {\r\n return 16;\r\n }", "public int mo36g() {\n return 2;\n }", "public void mo12930a() {\n }", "public void mo2470d() {\n }", "private void kk12() {\n\n\t}", "void mo1507n();", "int main()\n{\n cin>>a.h>>a.m>>a.s>>b.h>>b.m>>b.s;\n int x=a.s-b.s;\n int y=a.m-b.m;\n int z=a.h-b.h;\n if(y<0){\n y+=60;\n z--;\n }\n if(x<0){\n x+=60;\n y--;\n }\n cout<<z<<\":\"<<y<<\":\"<<x;\n}", "@Override\n protected int func_150123_b(int p_150123_1_)\n {\n return 60;\n }", "public int getAvpfRrInterval();", "private void m128168k() {\n C42962b.f111525a.mo104671a(\"upload_page_duration\", C22984d.m75611a().mo59971a(\"first_selection_duration\", System.currentTimeMillis() - this.f104209S).mo59971a(\"page_stay_duration\", System.currentTimeMillis() - this.f104208R).f60753a);\n }", "public void mo21880v() {\n }", "void mo1943l();", "private void m4823s() {\n float f = this.f6613u;\n if (f > 100.0f || f < 0.0f) {\n throw new IllegalArgumentException(\"Invalid percentage.\");\n }\n float j = (float) m4814j();\n this.f6595c.setY((float) ((int) (j - ((f / 100.0f) * j))));\n }", "static void m14930d(String str) {\n int b = m14929b();\n int d = C3205z0.INFO.mo12550d();\n }", "private double getReadTime(int wordCount) {\n return wordCount / 130.0;\n }", "public void mo21878t() {\n }", "public void mo21786K() {\n }", "public void mo6081a() {\n }", "@Test public void Time_len_6()\t\t\t\t\t\t\t\t\t{tst_time_(\"041526\"\t\t\t\t\t, \"04:15:26.000\");}", "public void mo3376r() {\n }", "public void mo21788M() {\n }", "public void mo21794S() {\n }", "@Test(timeout = 4000)\n public void test30() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"+wH9QT=gN*}929gG\");\n assertEquals(\"+wh9qt=gn*}929g\", string0);\n }", "public int getSecondR() {\n/* 48 */ return this.secondR;\n/* */ }", "public void mo21783H() {\n }", "@Test(timeout = 4000)\n public void test29() throws Throwable {\n String string0 = EWrapperMsgGenerator.updateMktDepth(1, 1, 1002, 1002, 2494.84595, (-195));\n assertEquals(\"updateMktDepth: 1 1 1002 1002 2494.84595 -195\", string0);\n }", "public static int i()\r\n/* 25: */ {\r\n/* 26: 48 */ return 9;\r\n/* 27: */ }", "public void mo3370l() {\n }", "public void mo21867i() {\n mo21877s();\n }", "int getTonicNote(){\n String lastnote=\"\";\n int result;\n lastnote += Strinput.toCharArray()[Strinput.length()-4];\n lastnote += Strinput.toCharArray()[Strinput.length()-3];\n result = Integer.parseInt(lastnote);\n if(result<72){\n return result-60;\n }else{\n return result-12-60;\n }\n }", "void mo1942k();", "public void mo21787L() {\n }", "public static String timeInWords(final int h, final int m) {\n\n\t\tif(m == 0) {\n\t\t\treturn getFromNumber(h).getWord() + \" \" + minuteInWord(m);\n\t\t} else if (m > 30) {\n\t\t\treturn minuteInWord(60 - m) + \" to \" + getFromNumber(h + 1).getWord();\n\t\t} else {\n\t\t\treturn minuteInWord(m) + \" past \" + getFromNumber(h).getWord();\n\t\t}\n\n }", "public int getOperacion()\r\n/* 22: */ {\r\n/* 23:45 */ return this.operacion;\r\n/* 24: */ }", "@Test\n public void Keypad() {\n Assert.assertEquals(11, Computation.keypadTime(\"91566165\",\"639485712\"));\n Assert.assertEquals(1, Computation.keypadTime(\"5111\",\"752961348\"));\n }", "private int K(int t)\n {\n if(t<=19)\n return 0x5a827999;\n else if(t<=39)\n return 0x6ed9eba1;\n else if(t<=59)\n return 0x8f1bbcdc;\n else \n return 0xca62c1d6;\n }", "public void mo21795T() {\n }", "public static void main(String[] args) {\n System.out.println(getDurationString(65,45));\n\n System.out.println(getDurationString(3945));\n }", "public static void main(String[] args) {\n\t\tSystem.out.println( getDurationString(61, 61));\r\n\t\t System.out.println(getDurationString(60, 59));\r\n\t\t System.out.println(getDurationString(-610, 9));\r\n\t\t System.out.println( getDurationString(1, 6));\r\n\t\t System.out.println( getDurationString(3722));\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void perSecond() {\n\r\n\t}", "public void mo3749d() {\n }", "private void m50366E() {\n }", "public void mo12628c() {\n }", "protected String mo3406c() {\n return \"Minute\";\n }", "static com.tencent.mm.plugin.appbrand.jsapi.b.a.a nI(java.lang.String r4) {\n /*\n r0 = 0;\n r1 = r4.length();\n r2 = 5;\n r1 = java.lang.Math.min(r1, r2);\n r1 = java.lang.Math.max(r0, r1);\n r1 = r4.substring(r0, r1);\n r2 = r1.toLowerCase();\n r1 = -1;\n r3 = r2.hashCode();\n switch(r3) {\n case 99228: goto L_0x003a;\n case 3704893: goto L_0x0025;\n case 104080000: goto L_0x002f;\n default: goto L_0x001e;\n };\n L_0x001e:\n r0 = r1;\n L_0x001f:\n switch(r0) {\n case 0: goto L_0x0045;\n case 1: goto L_0x0048;\n case 2: goto L_0x004b;\n default: goto L_0x0022;\n };\n L_0x0022:\n r0 = MONTH;\n L_0x0024:\n return r0;\n L_0x0025:\n r3 = \"year\";\n r2 = r2.equals(r3);\n if (r2 == 0) goto L_0x001e;\n L_0x002e:\n goto L_0x001f;\n L_0x002f:\n r0 = \"month\";\n r0 = r2.equals(r0);\n if (r0 == 0) goto L_0x001e;\n L_0x0038:\n r0 = 1;\n goto L_0x001f;\n L_0x003a:\n r0 = \"day\";\n r0 = r2.equals(r0);\n if (r0 == 0) goto L_0x001e;\n L_0x0043:\n r0 = 2;\n goto L_0x001f;\n L_0x0045:\n r0 = YEAR;\n goto L_0x0024;\n L_0x0048:\n r0 = MONTH;\n goto L_0x0024;\n L_0x004b:\n r0 = DAY;\n goto L_0x0024;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.mm.plugin.appbrand.jsapi.b.a.a.nI(java.lang.String):com.tencent.mm.plugin.appbrand.jsapi.b.a$a\");\n }", "public String c()\r\n/* 30: */ {\r\n/* 31:175 */ return \"step.\" + this.a;\r\n/* 32: */ }", "public void mo1531a() {\n }", "public long getTotalTime() {\n/* 73 */ return this.totalTime;\n/* */ }", "private void m3935R() {\n int i;\n int i2;\n if (mo4322L() == 1) {\n i2 = mo4758r() - mo4756p();\n i = mo4754o();\n } else {\n i2 = mo4741h() - mo4752n();\n i = mo4757q();\n }\n m3945n(i2 - i);\n }", "public static void main(String[] args) {\n\t\tint sec=60;\n\t\t int secondsAfter15 = 0;\n\t for(int i=1;i<=30;i++) {\n\t \tsecondsAfter15=60*i;\n\t }\n\t System.out.println(secondsAfter15);\n\t\t/*\n\t\t * Напиши код, который считает сколько секунд прошло с 15:00, если на часах\n\t\t * 15:30. Выведи результат на экран. Требования:\n\t\t * \n\t\t * Программа должна выводить текст.\n\t\t * \n\t\t * Выведенный текст должен быть целым положительным числом.\n\t\t * \n\t\t * Выведенное число должно быть кратно 60.\n\t\t * \n\t\t * Выводимое число должно соответствовать заданию.\n\t\t */\n\t}", "private void m50367F() {\n }", "public void mo21789N() {\n }", "public abstract Integer mo36210m();", "C20259y mo54455t(int i);", "public abstract void correctlyParsedUtterance(long ms);", "public void mo21782G() {\n }", "public void mo2471e() {\n }", "public abstract long mo9229aD();", "void mo1501h();", "public static void main(String[] args) {\n\n\tint time = 32150;\n\t\n\t\t\tSystem.out.print((time / 3600)+\" 시간 \");\n\t\t\tSystem.out.print((time % 3600 / 60)+\" 분 \");\n\t\t\tSystem.out.println((time % 3600 % 60)+\" 초\");\n\t\t\n\t\t\n\t}", "int mo1505l();", "@Test(timeout = 4000)\n public void test30() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickString((-1940), 2146889800, (String) null);\n assertEquals(\"id=-1940 unknown=null\", string0);\n }", "@Test\n public void testSplitTime(){\n \tCountDownTimer s = new CountDownTimer();\n \ts.splitTime(3975);\n \tassertEquals(s.toString(), \"1:06:15\");\n \t\n \ts.splitTime(45);\n \tassertEquals(s.toString(), \"0:00:45\");\n \t\n }", "int mo23521Ly();", "private KilometersPerHour() {}", "@Test(timeout = 4000)\n public void test30() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"metr\");\n assertEquals(\"meter\", string0);\n }", "void mo1940i();", "public abstract void mo2624j();", "public static int offset_infos_timestamp() {\n return (32 / 8);\n }", "C11316t5 mo29022j0();", "public void mo9233aH() {\n }", "protected int getNumberOfPeriods()\n {\n return 2;\n }", "public abstract void incorrectlyParsedUtterance(long ms);", "public abstract int mo9754s();", "public String printActivityPatternsSeason()\n\t{\n\t\tStringBuilder toReturn = new StringBuilder();\n\n\t\ttoReturn.append(\"ACTIVITY PATTERNS BY SEASON\\n\");\n\t\ttoReturn.append(\" Activity in one-hour segments by season\\n\");\n\n\t\tint[][] seasons = new int[][]\n\t\t{\n\t\t\t\t{ 11, 0, 1 }, // 1\n\t\t\t\t{ 2, 3, 4 }, // 2\n\t\t\t\t{ 5, 6, 7 }, // 3\n\t\t\t\t{ 8, 9, 10 } }; // 4\n\n\t\tint[] lengthPerSeason = new int[4];\n\t\tint[] monthlyTotals = new int[12];\n\t\tfor (Location location : analysis.getAllImageLocations())\n\t\t{\n\t\t\tList<ImageEntry> withLocation = new ImageQuery().locationOnly(location).query(images);\n\t\t\tLocalDateTime firstDate = analysis.getFirstImageInList(withLocation).getDateTaken();\n\t\t\tLocalDateTime lastDate = analysis.getLastImageInList(withLocation).getDateTaken();\n\t\t\tInteger firstMonth = firstDate.getMonthValue();\n\t\t\tInteger lastMonth = lastDate.getMonthValue();\n\t\t\tInteger firstDay = firstDate.getDayOfMonth();\n\t\t\tInteger lastDay = lastDate.getDayOfMonth();\n\t\t\ttoReturn.append(String.format(\"%-28s\", location.getName()));\n\t\t\tint monthTotal = 0;\n\t\t\tfor (int i = 0; i < 12; i++)\n\t\t\t{\n\t\t\t\tint monthValue = 0;\n\t\t\t\tif (firstMonth == lastMonth && firstMonth == i)\n\t\t\t\t\tmonthValue = lastDay - firstDay + 1;\n\t\t\t\telse if (firstMonth == i)\n\t\t\t\t\tmonthValue = 31 - firstDay + 1;\n\t\t\t\telse if (lastMonth == i)\n\t\t\t\t\tmonthValue = lastDay;\n\t\t\t\telse if (firstMonth < i && lastMonth > i)\n\t\t\t\t\tmonthValue = 31;\n\n\t\t\t\ttoReturn.append(String.format(\" %2d \", monthValue));\n\t\t\t\tmonthTotal = monthTotal + monthValue;\n\t\t\t\tmonthlyTotals[i] = monthlyTotals[i] + monthValue;\n\t\t\t}\n\t\t\ttoReturn.append(monthTotal).append(\"\\n\");\n\t\t}\n\n\t\tfor (int[] season : seasons)\n\t\t\tfor (int month : season)\n\t\t\t\tlengthPerSeason[ArrayUtils.indexOf(seasons, season)] = lengthPerSeason[ArrayUtils.indexOf(seasons, season)] + monthlyTotals[month];\n\n\t\tfor (Species species : analysis.getAllImageSpecies())\n\t\t{\n\t\t\tList<ImageEntry> withSpecies = new ImageQuery().speciesOnly(species).query(analysis.getImagesSortedByDate());\n\n\t\t\ttoReturn.append(species.getName()).append(\"\\n\");\n\t\t\ttoReturn.append(\" Dec-Jan-Feb Mar-Apr-May Jun-Jul-Aug Sep-Oct-Nov\\n\");\n\t\t\ttoReturn.append(\"Camera trap days \");\n\n\t\t\tfor (Integer length : lengthPerSeason)\n\t\t\t\ttoReturn.append(String.format(\"%7d \", length));\n\t\t\ttoReturn.append(\"\\n\");\n\n\t\t\ttoReturn.append(\"Number of pictures \");\n\t\t\tint[] imagesPerSeason = new int[4];\n\t\t\tfor (int i = 0; i < 4; i++)\n\t\t\t{\n\t\t\t\tList<ImageEntry> seasonWithSpecies = new ImageQuery().monthOnly(seasons[i]).query(withSpecies);\n\t\t\t\tInteger activity = analysis.activityForImageList(seasonWithSpecies);\n\t\t\t\ttoReturn.append(String.format(\"%7d \", activity));\n\t\t\t\timagesPerSeason[i] = activity;\n\t\t\t}\n\t\t\ttoReturn.append(\"\\n\");\n\t\t\ttoReturn.append(\"Pictures/Effort \");\n\t\t\tdouble total = 0;\n\t\t\tdouble ratios[] = new double[4];\n\t\t\tfor (int i = 0; i < 4; i++)\n\t\t\t{\n\t\t\t\tdouble currentRatio = 0;\n\t\t\t\tif (lengthPerSeason[i] != 0)\n\t\t\t\t\tcurrentRatio = (double) imagesPerSeason[i] / lengthPerSeason[i];\n\t\t\t\ttoReturn.append(String.format(\"%5.4f \", currentRatio));\n\t\t\t\tratios[i] = currentRatio;\n\t\t\t\ttotal = total + currentRatio;\n\t\t\t}\n\t\t\ttoReturn.append(\"\\n\");\n\t\t\ttoReturn.append(\"Visitation proportion \");\n\t\t\tfor (int i = 0; i < 4; i++)\n\t\t\t{\n\t\t\t\tif (total != 0)\n\t\t\t\t\ttoReturn.append(String.format(\"%5.4f \", ratios[i] / total));\n\t\t\t\telse\n\t\t\t\t\ttoReturn.append(String.format(\"%5.4f \", 0f));\n\t\t\t}\n\n\t\t\ttoReturn.append(\"\\n\");\n\n\t\t\tStringBuilder toAdd = new StringBuilder();\n\n\t\t\ttoAdd.append(\" Hour Number Freq Number Freq Number Freq Number Freq\\n\");\n\n\t\t\tint[] hourlyTotals = new int[4];\n\n\t\t\t// 24 hrs\n\t\t\tfor (int j = 0; j < 24; j++)\n\t\t\t{\n\t\t\t\tList<ImageEntry> withSpeciesAtTime = new ImageQuery().timeFrame(j, j + 1).query(withSpecies);\n\n\t\t\t\ttoAdd.append(String.format(\" %02d:00-%02d:00 \", j, j + 1));\n\n\t\t\t\t// 4 seasons\n\t\t\t\tfor (int i = 0; i < 4; i++)\n\t\t\t\t{\n\t\t\t\t\tList<ImageEntry> withSpeciesAtTimeInSeason = new ImageQuery().monthOnly(seasons[i]).query(withSpeciesAtTime);\n\t\t\t\t\tList<ImageEntry> withSpeciesInSeason = new ImageQuery().monthOnly(seasons[i]).query(withSpecies);\n\t\t\t\t\tInteger numPics = analysis.activityForImageList(withSpeciesAtTimeInSeason);\n\t\t\t\t\tInteger totalPics = analysis.activityForImageList(withSpeciesInSeason);\n\t\t\t\t\tdouble frequency;\n\t\t\t\t\tif (totalPics != 0)\n\t\t\t\t\t\tfrequency = (double) numPics / totalPics;\n\t\t\t\t\telse\n\t\t\t\t\t\tfrequency = 0;\n\n\t\t\t\t\thourlyTotals[i] = hourlyTotals[i] + numPics;\n\n\t\t\t\t\ttoAdd.append(String.format(\"%5d %5.3f \", numPics, frequency));\n\t\t\t\t}\n\n\t\t\t\ttoAdd.append(\"\\n\");\n\t\t\t}\n\n\t\t\ttoAdd.append(\" Hourly pics \");\n\t\t\tfor (int hourlyTotal : hourlyTotals) toAdd.append(String.format(\"%7d \", hourlyTotal));\n\n\t\t\ttoAdd.append(\"\\n\");\n\n\t\t\ttoReturn.append(toAdd).append(\"\\n\");\n\t\t}\n\n\t\treturn toReturn.toString();\n\t}", "@Test(timeout = 4000)\n public void test49() throws Throwable {\n String string0 = EWrapperMsgGenerator.currentTime((-532L));\n assertEquals(\"current time = -532 (Dec 31, 1969 11:51:08 PM)\", string0);\n }", "int getPeriod();", "void mo310e();", "private static String m10f() {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"sh\");\n stringBuilder.append(\"el\");\n stringBuilder.append(\"la\");\n return stringBuilder.toString();\n }", "private double normaliseViewingTime() {\n return this.averageViewingTime / (double) this.content.getViewLength();\n }", "public void mo4359a() {\n }", "public void Series() {\n\t\tint n=8,i=1,k=2,count=0;\n\t\tSystem.out.print(n+\" \");\n\t\twhile (count<5) {\n\t\t\tn=n*i;//12\n\t\t\tn=n-k;//9\n\t\t\tSystem.out.print(n+\" \");//9\n\t\t\ti++;\n\t\t\tk++;\n\t\t\tcount++;\n\t\t}\n\t\t/*System.out.println(n);//8\n\t\tn=n*1;//8\n\t\tn=n-2;//6\n\t\t\n\t\tSystem.out.println(n);//6\n\t\tn=n*2;//12\n\t\tn=n-3;//9\n\t\tSystem.out.println(n);//9\n\t\tn=n*3;//27\n\t\tn=n-4;//23\n\t\tSystem.out.println(n);\n\t\tn=n*4;//12\n\t\tn=n-5;*/\n\t\t\n\t\t/*System.out.println(n);\n\t\tn=n*5;//12\n\t\tn=n-6;\n\t\tSystem.out.println(n);*/\n\t\t\n\t}", "public void mo21779D() {\n }", "@Test public void shouldGive120MinFor350cent() {\r\n // Two hours: $1.5+2.0\r\n assertEquals( 2 * 60 /*minutes*/ , rs.calculateTime(350) ); \r\n }", "public int mo80c() {\n return 7;\n }", "public void mo21800a() {\n }", "public void mo21780E() {\n }", "public void mo21879u() {\n }", "public void method_4270() {}", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n String string0 = SQLUtil.normalize(\"b}v&-;$$:Hw1:\", false);\n assertEquals(\"b } v & - ; $ $ : Hw1 :\", string0);\n }" ]
[ "0.54845506", "0.54821557", "0.53871346", "0.5385825", "0.5359807", "0.53577125", "0.53272223", "0.5306162", "0.5304366", "0.52712005", "0.52699524", "0.5210013", "0.52068156", "0.5196326", "0.5182267", "0.5178887", "0.5170129", "0.51600206", "0.51475865", "0.51424783", "0.5137459", "0.5128181", "0.51176816", "0.5101394", "0.50954753", "0.5077174", "0.50762117", "0.50679207", "0.5059399", "0.50583076", "0.50535613", "0.505155", "0.5050558", "0.50479966", "0.50413465", "0.5040475", "0.5032374", "0.5020929", "0.50032794", "0.49984467", "0.49947658", "0.4993608", "0.49922103", "0.4989709", "0.49886993", "0.49850434", "0.49780816", "0.49758053", "0.49667585", "0.49654567", "0.49606857", "0.49596405", "0.4958745", "0.4953494", "0.49523616", "0.49510548", "0.4943766", "0.4943414", "0.4938104", "0.49321187", "0.4914838", "0.4913377", "0.49092844", "0.4901368", "0.4900511", "0.48950097", "0.48947212", "0.48909646", "0.48853263", "0.48803103", "0.48792854", "0.48785257", "0.48768288", "0.48750514", "0.4867362", "0.4866358", "0.48626536", "0.48586336", "0.48582712", "0.4853936", "0.48458531", "0.48428348", "0.48417687", "0.4840209", "0.48388574", "0.4837487", "0.4834958", "0.48345184", "0.48308486", "0.48210004", "0.4817714", "0.4816809", "0.48140153", "0.48127863", "0.48120153", "0.48109767", "0.4810597", "0.48094475", "0.48092413", "0.48086601", "0.48063684" ]
0.0
-1
/ 32: / 33:
@SideOnly(Side.CLIENT) /* 34: */ public void getSubItems(Item itemId, CreativeTabs table, List list) /* 35: */ { /* 36:35 */ for (int i = 0; i < 13; i++) /* 37: */ { /* 38:36 */ ItemStack is = new ItemStack(itemId); /* 39:37 */ is.stackTagCompound = new NBTTagCompound(); /* 40:38 */ is.stackTagCompound.setShort("Shield", (short)i); /* 41:39 */ list.add(is); /* 42: */ } /* 43: */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo33732Px();", "public int method_2436() {\r\n return 16;\r\n }", "private static int m31084a(zzss zzss) {\n int a = zzss.mo32193a(5);\n if (a == 31) {\n return zzss.mo32193a(6) + 32;\n }\n return a;\n }", "public int n_()\r\n/* 429: */ {\r\n/* 430:442 */ return this.a.length + 4;\r\n/* 431: */ }", "C2841w mo7234g();", "public int p_()\r\n/* 96: */ {\r\n/* 97:117 */ return 64;\r\n/* 98: */ }", "public int mo36g() {\n return 4;\n }", "public int mo36g() {\n return 8;\n }", "private static long getPrevNorm32(PrevArgs paramPrevArgs, int paramInt1, int paramInt2)\n/* */ {\n/* 534 */ paramPrevArgs.c = paramPrevArgs.src[(--paramPrevArgs.current)];\n/* 535 */ paramPrevArgs.c2 = '\\000';\n/* */ \n/* */ \n/* */ \n/* */ \n/* 540 */ if (paramPrevArgs.c < paramInt1)\n/* 541 */ return 0L;\n/* 542 */ if (!UTF16.isSurrogate(paramPrevArgs.c))\n/* 543 */ return getNorm32(paramPrevArgs.c);\n/* 544 */ if (UTF16.isLeadSurrogate(paramPrevArgs.c))\n/* */ {\n/* 546 */ return 0L; }\n/* 547 */ if ((paramPrevArgs.current != paramPrevArgs.start) && \n/* 548 */ (UTF16.isLeadSurrogate(paramPrevArgs.c2 = paramPrevArgs.src[(paramPrevArgs.current - 1)]))) {\n/* 549 */ paramPrevArgs.current -= 1;\n/* 550 */ long l = getNorm32(paramPrevArgs.c2);\n/* */ \n/* 552 */ if ((l & paramInt2) == 0L)\n/* */ {\n/* */ \n/* */ \n/* 556 */ return 0L;\n/* */ }\n/* */ \n/* 559 */ return getNorm32FromSurrogatePair(l, paramPrevArgs.c);\n/* */ }\n/* */ \n/* */ \n/* 563 */ paramPrevArgs.c2 = '\\000';\n/* 564 */ return 0L;\n/* */ }", "private static int colorspaceSh(int s) {\r\n return (s << 16);\r\n }", "private static boolean isNorm32Regular(long paramLong)\n/* */ {\n/* 332 */ return paramLong < 4227858432L;\n/* */ }", "private static int mix32(int k) {\n k = (k ^ (k >>> 16)) * 0x85ebca6b;\n k = (k ^ (k >>> 13)) * 0xc2b2ae35;\n return k ^ (k >>> 16);\n }", "static int getNumPatterns() { return 64; }", "private int e(String paramString, int paramInt)\r\n/* 628: */ {\r\n/* 629:624 */ int i1 = paramString.length();\r\n/* 630:625 */ int i2 = 0;\r\n/* 631:626 */ int i3 = 0;\r\n/* 632:627 */ int i4 = -1;\r\n/* 633:628 */ int i5 = 0;\r\n/* 634:631 */ for (; i3 < i1; i3++)\r\n/* 635: */ {\r\n/* 636:632 */ char c1 = paramString.charAt(i3);\r\n/* 637:634 */ switch (c1)\r\n/* 638: */ {\r\n/* 639: */ case '§': \r\n/* 640:636 */ if (i3 < i1 - 1)\r\n/* 641: */ {\r\n/* 642:637 */ char c2 = paramString.charAt(++i3);\r\n/* 643:638 */ if ((c2 == 'l') || (c2 == 'L')) {\r\n/* 644:639 */ i5 = 1;\r\n/* 645:640 */ } else if ((c2 == 'r') || (c2 == 'R') || (c(c2))) {\r\n/* 646:641 */ i5 = 0;\r\n/* 647: */ }\r\n/* 648: */ }\r\n/* 649:643 */ break;\r\n/* 650: */ case '\\n': \r\n/* 651:646 */ i3--;\r\n/* 652:647 */ break;\r\n/* 653: */ case ' ': \r\n/* 654:649 */ i4 = i3;\r\n/* 655: */ default: \r\n/* 656:651 */ i2 += a(c1);\r\n/* 657:652 */ if (i5 != 0) {\r\n/* 658:653 */ i2++;\r\n/* 659: */ }\r\n/* 660: */ break;\r\n/* 661: */ }\r\n/* 662:657 */ if (c1 == '\\n')\r\n/* 663: */ {\r\n/* 664:658 */ i3++;i4 = i3;\r\n/* 665: */ }\r\n/* 666: */ else\r\n/* 667: */ {\r\n/* 668:662 */ if (i2 > paramInt) {\r\n/* 669: */ break;\r\n/* 670: */ }\r\n/* 671: */ }\r\n/* 672: */ }\r\n/* 673:667 */ if ((i3 != i1) && (i4 != -1) && (i4 < i3)) {\r\n/* 674:668 */ return i4;\r\n/* 675: */ }\r\n/* 676:670 */ return i3;\r\n/* 677: */ }", "public int mo36g() {\n return 2;\n }", "void mo33731Pw();", "private int hash3(T key) { //last char + length of word\r\n char lastchar = key.toString().charAt( key.toString().length()-1 );\r\n return (lastchar + key.toString().length())%newTable.length;\r\n }", "int mo27483b();", "public void method_258(int var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8, boolean var9) {\n try {\n if(var6 == 0) {\n var6 = 16777215;\n }\n\n if(var7 == 0) {\n var7 = 16777215;\n }\n\n int var10 = this.field_736[var5];\n int var11 = this.field_737[var5];\n int var12 = 0;\n int var13 = 0;\n int var14 = var8 << 16;\n int var15 = (var10 << 16) / var3;\n int var16 = (var11 << 16) / var4;\n int var17 = -(var8 << 16) / var4;\n int var18;\n int var19;\n if(this.field_742[var5]) {\n var18 = this.spriteWidthFull[var5];\n var19 = this.field_741[var5];\n var15 = (var18 << 16) / var3;\n var16 = (var19 << 16) / var4;\n int var20 = this.field_738[var5];\n int var21 = this.field_739[var5];\n if(var9) {\n var20 = var18 - this.field_736[var5] - var20;\n }\n\n var1 += (var20 * var3 + var18 - 1) / var18;\n int var22 = (var21 * var4 + var19 - 1) / var19;\n var2 += var22;\n var14 += var22 * var17;\n if(var20 * var3 % var18 != 0) {\n var12 = (var18 - var20 * var3 % var18 << 16) / var3;\n }\n\n if(var21 * var4 % var19 != 0) {\n var13 = (var19 - var21 * var4 % var19 << 16) / var4;\n }\n\n var3 = ((this.field_736[var5] << 16) - var12 + var15 - 1) / var15;\n var4 = ((this.field_737[var5] << 16) - var13 + var16 - 1) / var16;\n }\n\n var18 = var2 * this.field_723;\n var14 += var1 << 16;\n if(var2 < this.field_743) {\n var19 = this.field_743 - var2;\n var4 -= var19;\n var2 = this.field_743;\n var18 += var19 * this.field_723;\n var13 += var16 * var19;\n var14 += var17 * var19;\n }\n\n if(var2 + var4 >= this.field_744) {\n var4 -= var2 + var4 - this.field_744 + 1;\n }\n\n var19 = var18 / this.field_723 & 1;\n if(!this.interlace) {\n var19 = 2;\n }\n\n if(var7 == 16777215) {\n if(this.spritePixels[var5] != null) {\n if(!var9) {\n this.method_259(this.pixels, this.spritePixels[var5], 0, var12, var13, var18, var3, var4, var15, var16, var10, var6, var14, var17, var19);\n } else {\n this.method_259(this.pixels, this.spritePixels[var5], 0, (this.field_736[var5] << 16) - var12 - 1, var13, var18, var3, var4, -var15, var16, var10, var6, var14, var17, var19);\n }\n } else if(!var9) {\n this.method_261(this.pixels, this.spriteColoursUsed[var5], this.spriteColourList[var5], 0, var12, var13, var18, var3, var4, var15, var16, var10, var6, var14, var17, var19);\n } else {\n this.method_261(this.pixels, this.spriteColoursUsed[var5], this.spriteColourList[var5], 0, (this.field_736[var5] << 16) - var12 - 1, var13, var18, var3, var4, -var15, var16, var10, var6, var14, var17, var19);\n }\n } else if(this.spritePixels[var5] != null) {\n if(!var9) {\n this.method_260(this.pixels, this.spritePixels[var5], 0, var12, var13, var18, var3, var4, var15, var16, var10, var6, var7, var14, var17, var19);\n } else {\n this.method_260(this.pixels, this.spritePixels[var5], 0, (this.field_736[var5] << 16) - var12 - 1, var13, var18, var3, var4, -var15, var16, var10, var6, var7, var14, var17, var19);\n }\n } else if(!var9) {\n this.method_262(this.pixels, this.spriteColoursUsed[var5], this.spriteColourList[var5], 0, var12, var13, var18, var3, var4, var15, var16, var10, var6, var7, var14, var17, var19);\n } else {\n this.method_262(this.pixels, this.spriteColoursUsed[var5], this.spriteColourList[var5], 0, (this.field_736[var5] << 16) - var12 - 1, var13, var18, var3, var4, -var15, var16, var10, var6, var7, var14, var17, var19);\n }\n } catch (Exception var23) {\n System.out.println(\"error in sprite clipping routine\"); // authentic System.out.println\n }\n }", "public abstract Integer mo36210m();", "private void m50367F() {\n }", "private static long getNorm32(char[] paramArrayOfChar, int paramInt1, int paramInt2)\n/* */ {\n/* 379 */ long l = getNorm32(paramArrayOfChar[paramInt1]);\n/* 380 */ if (((l & paramInt2) > 0L) && (isNorm32LeadSurrogate(l)))\n/* */ {\n/* 382 */ l = getNorm32FromSurrogatePair(l, paramArrayOfChar[(paramInt1 + 1)]);\n/* */ }\n/* 384 */ return l;\n/* */ }", "C5727e mo33224a();", "public void mo32111rr(int i) {\n }", "public int a(char paramChar)\r\n/* 484: */ {\r\n/* 485:481 */ if (paramChar == '§') {\r\n/* 486:482 */ return -1;\r\n/* 487: */ }\r\n/* 488:485 */ if (paramChar == ' ') {\r\n/* 489:486 */ return 4;\r\n/* 490: */ }\r\n/* 491:489 */ int i1 = \"\".indexOf(paramChar);\r\n/* 492:490 */ if ((paramChar > 0) && (i1 != -1) && (!this.k)) {\r\n/* 493:491 */ return this.d[i1];\r\n/* 494: */ }\r\n/* 495:495 */ if (this.e[paramChar] != 0)\r\n/* 496: */ {\r\n/* 497:496 */ int i2 = this.e[paramChar] >>> 4;\r\n/* 498:497 */ int i3 = this.e[paramChar] & 0xF;\r\n/* 499:499 */ if (i3 > 7)\r\n/* 500: */ {\r\n/* 501:500 */ i3 = 15;\r\n/* 502:501 */ i2 = 0;\r\n/* 503: */ }\r\n/* 504:503 */ i3++;\r\n/* 505: */ \r\n/* 506:505 */ return (i3 - i2) / 2 + 1;\r\n/* 507: */ }\r\n/* 508:508 */ return 0;\r\n/* 509: */ }", "static int size_of_shld(String passed){\n\t\treturn 3;\n\t}", "public int p_()\r\n/* 463: */ {\r\n/* 464:477 */ return 64;\r\n/* 465: */ }", "public int arn() {\n return 383;\n }", "public int getInternalBlockLength()\r\n/* 40: */ {\r\n/* 41: 95 */ return 32;\r\n/* 42: */ }", "public int hash3 ( String key )\n {\n int hashVal = 0;\n if(key != null){\n for( int i = 0; i < key.length(); i++ ){\n hashVal = (37 * hashVal) + key.charAt(i);}\n hashVal %= tableSize;\n if(hashVal<0)\n hashVal += tableSize; \n if(hashVal != 0)\n return hashVal;\n else\n return 0;\n }\n else\n {\n //System.out.println(\"Key is null\");\n return 0;\n }\n }", "void mo32046rn(int i);", "public static int i()\r\n/* 25: */ {\r\n/* 26: 48 */ return 9;\r\n/* 27: */ }", "public abstract int mo9732a();", "private static int m36201b(Rect rect) {\n return rect.width() * rect.height();\n }", "public int func_70297_j_()\n/* */ {\n/* 71 */ return 64;\n/* */ }", "private int K(int t)\n {\n if(t<=19)\n return 0x5a827999;\n else if(t<=39)\n return 0x6ed9eba1;\n else if(t<=59)\n return 0x8f1bbcdc;\n else \n return 0xca62c1d6;\n }", "void mo12637b();", "private static int getPrevCC(PrevArgs paramPrevArgs)\n/* */ {\n/* 574 */ return (int)(0xFF & getPrevNorm32(paramPrevArgs, 768, 65280) >> 8);\n/* */ }", "public long Time33Hash(String key) {\n\t\tlong hash = 0;\n\t\tchar[] cArr = key.toCharArray();\n\n\t\tfor (int i = 0; i < cArr.length; ++i) {\n\t\t\thash = (hash * 33) + cArr[i];\n\t\t}\n\n\t\treturn hash;\n\t}", "void mo107677b(Integer num);", "public void mo4683c() {\n mo4679a(3);\n }", "@Override\n\tpublic void challenge16() {\n\n\t}", "static int hash(int h) {\n\t\t // This function ensures that hashCodes that differ only by constant \n\t\t // multiples at each bit position have a bounded number of collisions \n\t\t // (approximately 8 at default load factor).\n\t\th ^= (h >>> 20) ^ (h >>> 12);\n\t\treturn h ^ (h >>> 7) ^ (h >>> 4);\n\t}", "int pacemodulator() {\n int buckpacedirector = ((rand.nextInt() >> rightshift) & 7);\n int rbuckpacedirector = 0;\n\n rbuckpacedirector = switch (buckpacedirector)\n {\n case 0 -> 2;\n case 1 -> 3;\n case 2 -> 4;\n case 3 -> 5;\n case 4 -> 6;\n case 5 -> 7;\n case 6 -> 8;\n default -> 1;\n };\n return rbuckpacedirector;\n }", "public short mo34e() {\n return 41;\n }", "C3676k mo12649b();", "public static int m8655e() {\n return 8;\n }", "short digits();", "public abstract int mo9736c(int i);", "public static long getNorm32FromSurrogatePair(long paramLong, char paramChar)\n/* */ {\n/* 365 */ return \n/* 366 */ 0xFFFFFFFF & NormTrieImpl.normTrie.getTrailValue((int)paramLong, paramChar);\n/* */ }", "public int mo3356c() {\n return 0;\n }", "public void method_246(int var1, int var2, int var3, int var4, int var5, int var6) {\n try {\n int var7 = this.field_736[var5];\n int var8 = this.field_737[var5];\n int var9 = 0;\n int var10 = 0;\n int var11 = (var7 << 16) / var3;\n int var12 = (var8 << 16) / var4;\n int var13;\n int var14;\n if(this.field_742[var5]) {\n var13 = this.spriteWidthFull[var5];\n var14 = this.field_741[var5];\n var11 = (var13 << 16) / var3;\n var12 = (var14 << 16) / var4;\n var1 += (this.field_738[var5] * var3 + var13 - 1) / var13;\n var2 += (this.field_739[var5] * var4 + var14 - 1) / var14;\n if(this.field_738[var5] * var3 % var13 != 0) {\n var9 = (var13 - this.field_738[var5] * var3 % var13 << 16) / var3;\n }\n\n if(this.field_739[var5] * var4 % var14 != 0) {\n var10 = (var14 - this.field_739[var5] * var4 % var14 << 16) / var4;\n }\n\n var3 = var3 * (this.field_736[var5] - (var9 >> 16)) / var13;\n var4 = var4 * (this.field_737[var5] - (var10 >> 16)) / var14;\n }\n\n var13 = var1 + var2 * this.field_723;\n var14 = this.field_723 - var3;\n int var15;\n if(var2 < this.field_743) {\n var15 = this.field_743 - var2;\n var4 -= var15;\n var2 = 0;\n var13 += var15 * this.field_723;\n var10 += var12 * var15;\n }\n\n if(var2 + var4 >= this.field_744) {\n var4 -= var2 + var4 - this.field_744 + 1;\n }\n\n if(var1 < this.field_745) {\n var15 = this.field_745 - var1;\n var3 -= var15;\n var1 = 0;\n var13 += var15;\n var9 += var11 * var15;\n var14 += var15;\n }\n\n if(var1 + var3 >= this.field_746) {\n var15 = var1 + var3 - this.field_746 + 1;\n var3 -= var15;\n var14 += var15;\n }\n\n byte var17 = 1;\n if(this.interlace) {\n var17 = 2;\n var14 += this.field_723;\n var12 += var12;\n if((var2 & 1) != 0) {\n var13 += this.field_723;\n --var4;\n }\n }\n\n this.method_253(this.pixels, this.spritePixels[var5], 0, var9, var10, var13, var14, var3, var4, var11, var12, var7, var17, var6);\n } catch (Exception var16) {\n System.out.println(\"error in sprite clipping routine\"); // authentic System.out.println\n }\n }", "@Override\n protected long advanceH(final long k) {\n return 5 * k - 2;\n }", "public int mo3361f() {\n return 1;\n }", "public int getBlockLength()\r\n/* 45: */ {\r\n/* 46:107 */ return -32;\r\n/* 47: */ }", "void mo3796b(int i);", "public static void main(String[] args) {\n\n\n\n\n\n System.out.println((char) ('a' - 32));\n }", "public final int zzj() {\n return this.zzab % 32;\n }", "public void mo9233aH() {\n }", "long mo20406a();", "static int getAnchor(int a){\n return a-((a-1)%3);\n }", "int mo5867a(String str, long j);", "public void method_245(int var1, int var2, int var3, int var4, int var5, int var6) {\n try {\n int var7 = this.field_736[var5];\n int var8 = this.field_737[var5];\n int var9 = 0;\n int var10 = 0;\n int var11 = (var7 << 16) / var3;\n int var12 = (var8 << 16) / var4;\n int var13;\n int var14;\n if(this.field_742[var5]) {\n var13 = this.spriteWidthFull[var5];\n var14 = this.field_741[var5];\n var11 = (var13 << 16) / var3;\n var12 = (var14 << 16) / var4;\n var1 += (this.field_738[var5] * var3 + var13 - 1) / var13;\n var2 += (this.field_739[var5] * var4 + var14 - 1) / var14;\n if(this.field_738[var5] * var3 % var13 != 0) {\n var9 = (var13 - this.field_738[var5] * var3 % var13 << 16) / var3;\n }\n\n if(this.field_739[var5] * var4 % var14 != 0) {\n var10 = (var14 - this.field_739[var5] * var4 % var14 << 16) / var4;\n }\n\n var3 = var3 * (this.field_736[var5] - (var9 >> 16)) / var13;\n var4 = var4 * (this.field_737[var5] - (var10 >> 16)) / var14;\n }\n\n var13 = var1 + var2 * this.field_723;\n var14 = this.field_723 - var3;\n int var15;\n if(var2 < this.field_743) {\n var15 = this.field_743 - var2;\n var4 -= var15;\n var2 = 0;\n var13 += var15 * this.field_723;\n var10 += var12 * var15;\n }\n\n if(var2 + var4 >= this.field_744) {\n var4 -= var2 + var4 - this.field_744 + 1;\n }\n\n if(var1 < this.field_745) {\n var15 = this.field_745 - var1;\n var3 -= var15;\n var1 = 0;\n var13 += var15;\n var9 += var11 * var15;\n var14 += var15;\n }\n\n if(var1 + var3 >= this.field_746) {\n var15 = var1 + var3 - this.field_746 + 1;\n var3 -= var15;\n var14 += var15;\n }\n\n byte var17 = 1;\n if(this.interlace) {\n var17 = 2;\n var14 += this.field_723;\n var12 += var12;\n if((var2 & 1) != 0) {\n var13 += this.field_723;\n --var4;\n }\n }\n\n this.method_252(this.pixels, this.spritePixels[var5], 0, var9, var10, var13, var14, var3, var4, var11, var12, var7, var17, var6);\n } catch (Exception var16) {\n System.out.println(\"error in sprite clipping routine\"); // authentic System.out.println\n }\n }", "public void mo33394d() {\n mo33393c();\n mo33395e();\n }", "void mo4833b();", "@Test\n public void testTakeNumberFromString224() { // FlairImage: 224\n assertEquals(\"From: FlairImage line: 225\", 123, takeNumberFromString(\"123\")); \n assertEquals(\"From: FlairImage line: 226\", 0, takeNumberFromString(\"123a\")); \n assertEquals(\"From: FlairImage line: 227\", -123, takeNumberFromString(\"-123\")); \n assertEquals(\"From: FlairImage line: 228\", 0, takeNumberFromString(\"--123\")); \n assertEquals(\"From: FlairImage line: 229\", 0, takeNumberFromString(\"pz4\")); \n }", "private void m50366E() {\n }", "public void int3_m() {\n\t\t\n\t}", "private int c(int paramInt)\r\n/* 38: */ {\r\n/* 39:39 */ if (paramInt >= 2) {\r\n/* 40:40 */ return 2 + (paramInt & 0x1);\r\n/* 41: */ }\r\n/* 42:42 */ return paramInt;\r\n/* 43: */ }", "public static void main(String[] args) {\n System.out.println(32>>2);// 0010 0000>>2= 0000 1000=8\n\n System.out.println(32/4);//32除以2的2次幂\n\n System.out.println(8<<2);// 0000 1000<<2=0010 0000=32\n System.out.println(8*4);//8 乘以2的2次幂\n\n System.out.println(2<<2);//2*2(2)=8\n\n System.out.println(-32>>>2);//32除以2的2次幂\n\n\n }", "public int m224a() {\n return 1;\n }", "public abstract int mo123248g();", "public int mo38499c() {\n return this.f27232a;\n }", "public abstract int mo9754s();", "public abstract Integer mo36212o();", "public void mo3376r() {\n }", "void mo5875b(String str, long j);", "public int mo4321K() {\n View a = mo4328a(mo4732e() - 1, -1, false, true);\n if (a == null) {\n return -1;\n }\n return mo4749l(a);\n }", "@Override\n\tpublic void challenge17() {\n\n\t}", "static int psw(){\n\t\tint psw = 0;\n\t\tpsw+=(CS?1:0);\n\t\tpsw+=(P?4:0);\n\t\tpsw+=(AC?16:0);\n\t\tpsw+=(Z?64:0);\n\t\tpsw+=(S?128:0);\n\t\treturn psw;\n\t}", "public void func_70295_k_() {}", "public abstract int mo123249h();", "public int mo4452e() {\n /*\n r7 = this;\n int r0 = r7.f2518c\n r7.f2519d = r0\n r0 = 0\n r1 = 0\n r2 = 0\n L_0x0007:\n int r3 = r7.f2519d\n if (r3 <= 0) goto L_0x003b\n byte r3 = r7.mo4449a()\n r4 = -1\n if (r3 == 0) goto L_0x0034\n r5 = 1\n if (r3 == r5) goto L_0x002e\n r6 = 2\n if (r3 == r6) goto L_0x002e\n r6 = 9\n if (r3 == r6) goto L_0x0007\n switch(r3) {\n case 14: goto L_0x0028;\n case 15: goto L_0x0028;\n case 16: goto L_0x0025;\n case 17: goto L_0x0025;\n case 18: goto L_0x0022;\n default: goto L_0x001f;\n }\n L_0x001f:\n if (r2 != 0) goto L_0x0007\n goto L_0x0039\n L_0x0022:\n int r1 = r1 + 1\n goto L_0x0007\n L_0x0025:\n if (r2 != r1) goto L_0x002b\n return r5\n L_0x0028:\n if (r2 != r1) goto L_0x002b\n return r4\n L_0x002b:\n int r1 = r1 + -1\n goto L_0x0007\n L_0x002e:\n if (r1 != 0) goto L_0x0031\n return r5\n L_0x0031:\n if (r2 != 0) goto L_0x0007\n goto L_0x0039\n L_0x0034:\n if (r1 != 0) goto L_0x0037\n return r4\n L_0x0037:\n if (r2 != 0) goto L_0x0007\n L_0x0039:\n r2 = r1\n goto L_0x0007\n L_0x003b:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: androidx.core.text.BidiFormatter.C0510a.mo4452e():int\");\n }", "public static void main(String[] args) {\n\t\t\n\t\tint myNumber=356;\n\t\tint stepOne=myNumber*myNumber;\n\t\tint step2=stepOne+myNumber;\n\t\tint step3=step2/myNumber;\n\t\tint step4=step3+17;\n\t\tint step5=step4-myNumber;\n\t\tint step6=step5/6;\n\t\t\n\t\tSystem.out.println(\"The magic number is \"+step6);\n\n\t}", "void m63698a() {\n m63702c();\n m63701b();\n }", "public int mo1534c() {\n return 2;\n }", "public int a_(int paramInt)\r\n/* 166: */ {\r\n/* 167:189 */ return 0;\r\n/* 168: */ }", "void mo25956a(int i);", "void mo64942a(String str, long j, long j2);", "public void mo5332a(int i) {\n }", "public void mo3946e() {\n m25427g();\n }", "public int method_1143(int var1) {\r\n return this.height / 4 + 0 + (24 * var1 - 24) + this.field_987;\r\n }", "public static void main003(String[] args) {\n\t\t/*\n\t\t * numberStart++ tra ve gia tri cua numberStart, sau đo tang number lan mot đon vi\n\t\t * numberStart-- tra ve gia tri cua numberStart, sau đo giam number xuong mot đon vi\n\t\t * ++numberStart tang numberStart len mot don vi, sau đo tra ve gia tri cua numberStart\n\t\t * --numberStart giam numberStart xuong mot don vi, sau đo tra ve gia tri cua numberStart\n\t\t */\n\t\tint numberStart\t= 20;\n\t\tint numberEnd\t= 0;\n\t\t\n//\t\tnumberEnd\t\t= ++numberStart;\n\t\tnumberEnd\t\t= --numberStart;\n\t\tSystem.out.println(\"Number Start = \" + numberStart);\n\t\tSystem.out.println(\"Number End = \" + numberEnd);\n\t}", "private static int m3066a(int i, int i2, int i3, int i4, int i5) {\n if (i5 == 0) {\n return 0;\n }\n return (((i * NormalGiftView.ALPHA_255) * i2) + ((i3 * i4) * (255 - i2))) / (i5 * NormalGiftView.ALPHA_255);\n }", "void m8367a();", "public abstract long mo24412e();", "public void mo33392b() {\n mo33395e();\n }", "long mo1636a(long j, alb alb);", "public abstract long mo9748m();", "void ciff_block_1030()\n{\n int key[] = new int[2];\n key[0] = 0x410;\n key[1] = 0x45f3;\n int i, bpp, row, col, vbits=0;\n long bitbuf=0;\n\n get2();\n if ((get4()) != 0x80008 || get4()==0) return;\n bpp = get2();\n if (bpp != 10 && bpp != 12) return;\n for (i=row=0; row < 8; row++)\n for (col=0; col < 8; col++) {\n if (vbits < bpp) {\n\tbitbuf = bitbuf << 16 | (get2() ^ key[i++ & 1]);\n\tvbits += 16;\n }\n white[row][col] = ( char)( bitbuf << (LONG_BIT - vbits) >> (LONG_BIT - bpp));\n vbits -= bpp;\n }\n}", "int mo54441g(int i);" ]
[ "0.58808213", "0.5879061", "0.5680651", "0.5654", "0.5645227", "0.5630402", "0.5630296", "0.56136394", "0.5568993", "0.5567183", "0.5512024", "0.5504513", "0.5502662", "0.5447573", "0.5416775", "0.53795934", "0.53360534", "0.53123266", "0.5299049", "0.52848846", "0.52829754", "0.5278993", "0.52739316", "0.5271452", "0.5264421", "0.5261138", "0.52511066", "0.5247445", "0.5246514", "0.52376693", "0.5231832", "0.5230616", "0.5227479", "0.52164143", "0.5199377", "0.5194356", "0.5174584", "0.5165838", "0.5164236", "0.5157177", "0.51567805", "0.513923", "0.5137146", "0.51364833", "0.5131514", "0.5130461", "0.5117851", "0.5117749", "0.51104075", "0.5107828", "0.51054233", "0.5101641", "0.5098117", "0.509731", "0.50962335", "0.508625", "0.50830114", "0.5080209", "0.50794476", "0.5074332", "0.50741845", "0.5071255", "0.5070911", "0.5066036", "0.5058392", "0.505105", "0.504716", "0.50433934", "0.5043172", "0.5042898", "0.50336874", "0.5031792", "0.50208634", "0.5019001", "0.50168365", "0.5013368", "0.50058174", "0.49991226", "0.49973106", "0.49953318", "0.4995305", "0.49930996", "0.49853903", "0.49815363", "0.4977598", "0.4976057", "0.49758935", "0.49729773", "0.49696022", "0.49665633", "0.49661055", "0.495831", "0.49577567", "0.4956241", "0.49540395", "0.49531284", "0.49492186", "0.4948849", "0.49487278", "0.49464908", "0.49444294" ]
0.0
-1
/ 44: / 45:
public int getShieldID(ItemStack is) /* 46: */ { /* 47:45 */ if (is.stackTagCompound != null) { /* 48:46 */ return is.stackTagCompound.getShort("Shield"); /* 49: */ } /* 50:48 */ return super.getShieldID(is); /* 51: */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mo4359a() {\n }", "public void mo9233aH() {\n }", "public void mo3749d() {\n }", "public void mo44053a() {\n }", "public void mo21782G() {\n }", "public void method_4270() {}", "public int mo36g() {\n return 4;\n }", "public String tri4(int h){\n\t\tString S = \"\";\n\t\tint H = h;\n\t\tint HH = H;\n\t\tint Counter = 0;\n\t\tint UsingCounter = Counter;\n\n\t\twhile (H > 0){\n\t\t\tHH = H;\n\t\t\twhile (UsingCounter > 0){\n\t\t\t\tS = S + \" \";\n\t\t\t\tUsingCounter = UsingCounter - 1;}\n\t\t\twhile (HH > 0) {\n\t\t\t\tS = S + \"*\";\n\t\t\t\tHH = HH - 1;}\n\t\t\tCounter = Counter + 1;\n\t\t\tUsingCounter = Counter;\n\t\t\tS = S + \"\\n\";\n\t\t\tH = H - 1;}\n\n\t\treturn S; }", "@Test(timeout = 4000)\n public void test45() throws Throwable {\n String string0 = EWrapperMsgGenerator.updateMktDepthL2(2146794261, 927, \"@\", 2146889800, (-180), 2146794261, (-1940));\n assertEquals(\"updateMktDepth: 2146794261 927 @ 2146889800 -180 2.146794261E9 -1940\", string0);\n }", "public void mo6944a() {\n }", "public void mo55254a() {\n }", "public void mo21783H() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo21779D() {\n }", "public void mo4683c() {\n mo4679a(3);\n }", "private void kk12() {\n\n\t}", "public int method_2436() {\r\n return 16;\r\n }", "public void mo21794S() {\n }", "void mo54435d();", "public void mo5248a() {\n }", "dkj mo4367a(dkk dkk);", "public void mo56167c() {\n }", "public void mo21788M() {\n }", "public void mo3376r() {\n }", "public void mo23813b() {\n }", "public void mo21787L() {\n }", "public void mo21793R() {\n }", "public void mo21877s() {\n }", "public void mo2470d() {\n }", "public void mo21786K() {\n }", "public void skystonePos4() {\n }", "private final void m46511P() {\n C15593cd.m50346a(this.f40707H.f44224a, this.f40705F, \"aeh2\");\n }", "public void mo21785J() {\n }", "private void m50366E() {\n }", "public int method_1143(int var1) {\r\n return this.height / 4 + 0 + (24 * var1 - 24) + this.field_987;\r\n }", "void mo56163g();", "public int getSnakeStartLength();", "public void mo38117a() {\n }", "public void mo21789N() {\n }", "public void mo2740a() {\n }", "public int mo4452e() {\n /*\n r7 = this;\n int r0 = r7.f2518c\n r7.f2519d = r0\n r0 = 0\n r1 = 0\n r2 = 0\n L_0x0007:\n int r3 = r7.f2519d\n if (r3 <= 0) goto L_0x003b\n byte r3 = r7.mo4449a()\n r4 = -1\n if (r3 == 0) goto L_0x0034\n r5 = 1\n if (r3 == r5) goto L_0x002e\n r6 = 2\n if (r3 == r6) goto L_0x002e\n r6 = 9\n if (r3 == r6) goto L_0x0007\n switch(r3) {\n case 14: goto L_0x0028;\n case 15: goto L_0x0028;\n case 16: goto L_0x0025;\n case 17: goto L_0x0025;\n case 18: goto L_0x0022;\n default: goto L_0x001f;\n }\n L_0x001f:\n if (r2 != 0) goto L_0x0007\n goto L_0x0039\n L_0x0022:\n int r1 = r1 + 1\n goto L_0x0007\n L_0x0025:\n if (r2 != r1) goto L_0x002b\n return r5\n L_0x0028:\n if (r2 != r1) goto L_0x002b\n return r4\n L_0x002b:\n int r1 = r1 + -1\n goto L_0x0007\n L_0x002e:\n if (r1 != 0) goto L_0x0031\n return r5\n L_0x0031:\n if (r2 != 0) goto L_0x0007\n goto L_0x0039\n L_0x0034:\n if (r1 != 0) goto L_0x0037\n return r4\n L_0x0037:\n if (r2 != 0) goto L_0x0007\n L_0x0039:\n r2 = r1\n goto L_0x0007\n L_0x003b:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: androidx.core.text.BidiFormatter.C0510a.mo4452e():int\");\n }", "public void mo97908d() {\n }", "public void mo23438b() {\n }", "void mo54405a();", "C4945r5 mo19056B();", "public void mo21878t() {\n }", "public int p_()\r\n/* 96: */ {\r\n/* 97:117 */ return 64;\r\n/* 98: */ }", "private void m50367F() {\n }", "public int mo36g() {\n return 2;\n }", "public void mo21784I() {\n }", "public void mo5382o() {\n }", "public void mo9848a() {\n }", "public void mo21791P() {\n }", "public void mo21795T() {\n }", "public int mo36g() {\n return 8;\n }", "void mo3194r();", "C2841w mo7234g();", "void mo54408a(int i, int i2, int i3, int i4);", "public String c()\r\n/* 30: */ {\r\n/* 31:175 */ return \"step.\" + this.a;\r\n/* 32: */ }", "@Override\n\tpublic void challenge17() {\n\n\t}", "public void mo3946e() {\n m25427g();\n }", "public void mo6081a() {\n }", "C4945r5 mo19057F();", "void mo7444g(int i, int i2);", "public int p_()\r\n/* 463: */ {\r\n/* 464:477 */ return 64;\r\n/* 465: */ }", "public void mo21792Q() {\n }", "public int getLine()\n/* */ {\n/* 1312 */ return this.line;\n/* */ }", "void mo57278c();", "public void mo115188a() {\n }", "public void mo21781F() {\n }", "public static void incorrect4() {\r\n\r\n System.out.println(\" *---*\");\r\n System.out.println(\" | |\");\r\n System.out.println(\" 0 |\");\r\n System.out.println(\" /|\\\\ | Incorrect - 4\");\r\n System.out.println(\" |\");\r\n System.out.println(\" |\");\r\n System.out.println(\"==========\");\r\n }", "public void mo8738a() {\n }", "void mo1943l();", "void mo41083a();", "public int getInternalBlockLength()\r\n/* 40: */ {\r\n/* 41: 95 */ return 32;\r\n/* 42: */ }", "public void mo21879u() {\n }", "public void mo2471e() {\n }", "public void mo21780E() {\n }", "public void mo12930a() {\n }", "void mo4833b();", "public final void mo42079g() {\n mo42076a(riv.f43130x, mo42086n());\n super.mo42079g();\n }", "public int mo4318H() {\n View a = mo4328a(0, mo4732e(), true, false);\n if (a == null) {\n return -1;\n }\n return mo4749l(a);\n }", "@Override\n\tpublic void challenge14() {\n\n\t}", "C7904c mo24084a();", "void mo57277b();", "public void mo9241ay() {\n }", "private final void step4() { switch (b[k])\n\t {\n\t case 'e': if (ends(\"icate\")) { r(\"ic\"); break; }\n\t if (ends(\"ative\")) { r(\"\"); break; }\n\t if (ends(\"alize\")) { r(\"al\"); break; }\n\t break;\n\t case 'i': if (ends(\"iciti\")) { r(\"ic\"); break; }\n\t break;\n\t case 'l': if (ends(\"ical\")) { r(\"ic\"); break; }\n\t if (ends(\"ful\")) { r(\"\"); break; }\n\t break;\n\t case 's': if (ends(\"ness\")) { r(\"\"); break; }\n\t break;\n\t } }", "public void mo44231a(int i) {\n }", "private byte m1654g() {\n char charAt;\n do {\n int i = this.f2519d;\n if (i >= this.f2518c) {\n return 12;\n }\n CharSequence charSequence = this.f2516a;\n this.f2519d = i + 1;\n charAt = charSequence.charAt(i);\n this.f2520e = charAt;\n } while (charAt != ';');\n return 12;\n }", "void mo56161e();", "public void mo21800a() {\n }", "public String editar()\r\n/* 441: */ {\r\n/* 442:445 */ return null;\r\n/* 443: */ }", "public int getDuration()\r\n/* 70: */ {\r\n/* 71: 71 */ return this.duration;\r\n/* 72: */ }", "public void mo55462a() {\n C3615m3.this.f1448g.mo55369a(this.f1459a);\n C3615m3.this.f1448g.mo55371a(C3552h2.m914h().mo55455c());\n }", "public void mo3370l() {\n }" ]
[ "0.5657412", "0.5654962", "0.564915", "0.5610772", "0.55883723", "0.55796033", "0.55521715", "0.5534126", "0.5522801", "0.5520283", "0.5519082", "0.5516812", "0.5466976", "0.5466976", "0.5466976", "0.5466976", "0.5466976", "0.5466976", "0.5466976", "0.5456711", "0.5449525", "0.54492134", "0.54343385", "0.5427558", "0.5412427", "0.53931624", "0.5388232", "0.5382934", "0.5375116", "0.5368662", "0.53287077", "0.5316418", "0.53137857", "0.53134763", "0.53128785", "0.5298805", "0.52912647", "0.52873456", "0.52789205", "0.52768815", "0.52707136", "0.52656174", "0.52630126", "0.5259896", "0.5256351", "0.52518934", "0.52508545", "0.5249094", "0.5246963", "0.5246566", "0.5244112", "0.5243331", "0.52307355", "0.52303845", "0.52277464", "0.5213122", "0.5205172", "0.5200366", "0.519602", "0.51872563", "0.5183523", "0.51830894", "0.5181664", "0.51723677", "0.51574063", "0.51566416", "0.51549315", "0.5154399", "0.51465625", "0.51436603", "0.5131382", "0.5131239", "0.5121482", "0.51205605", "0.510734", "0.5104815", "0.5103215", "0.5102754", "0.5101515", "0.50998306", "0.5098264", "0.5091529", "0.50889", "0.5085541", "0.50846165", "0.507322", "0.5066907", "0.5066584", "0.5066149", "0.5058338", "0.50508416", "0.5050818", "0.50436634", "0.50408125", "0.50346947", "0.5033995", "0.50319", "0.5031434", "0.50298667", "0.5024181", "0.50207865" ]
0.0
-1
/ 52: / 53:
public IIcon getIconFromDamage(int par1) /* 54: */ { /* 55:53 */ if (this.isIron) { /* 56:54 */ return Items.iron_sword.getIconFromDamage(par1); /* 57: */ } /* 58:55 */ return Items.diamond_sword.getIconFromDamage(par1); /* 59: */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void m50366E() {\n }", "public int method_2436() {\r\n return 16;\r\n }", "public void mo21877s() {\n }", "private static int m31084a(zzss zzss) {\n int a = zzss.mo32193a(5);\n if (a == 31) {\n return zzss.mo32193a(6) + 32;\n }\n return a;\n }", "public void mo21794S() {\n }", "void mo1507n();", "public int arn() {\n return 383;\n }", "public abstract int mo9754s();", "public void method_4270() {}", "private void kk12() {\n\n\t}", "public void mo12628c() {\n }", "C1458cs mo7613iS();", "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 mo3749d() {\n }", "public void mo44053a() {\n }", "private void m50367F() {\n }", "public void mo21782G() {\n }", "public void mo21783H() {\n }", "public void mo21786K() {\n }", "public abstract Integer mo36210m();", "public void mo2470d() {\n }", "public void mo55254a() {\n }", "public void mo6081a() {\n }", "public void mo12930a() {\n }", "public int mo36g() {\n return 4;\n }", "public int mo36g() {\n return 8;\n }", "public void mo38117a() {\n }", "long getUnknown72();", "void mo1506m();", "public abstract long mo9229aD();", "public void mo21879u() {\n }", "public void mo21779D() {\n }", "public void mo21867i() {\n mo21877s();\n }", "void mo1943l();", "public void mo23813b() {\n }", "public final int mo50059a() {\n return 2;\n }", "C4945r5 mo19056B();", "public void mo21878t() {\n }", "public void mo9848a() {\n }", "void mo80452a();", "public int mo36g() {\n return 2;\n }", "long getUnknown12();", "public void mo21792Q() {\n }", "public void mo21789N() {\n }", "public abstract Integer mo36212o();", "public abstract int mo8526p();", "public void mo4683c() {\n mo4679a(3);\n }", "public void mo9233aH() {\n }", "public void mo3376r() {\n }", "public void mo21787L() {\n }", "private void m81850n() {\n m81843b(m81844c(C6969H.m41409d(\"G738BEA12B634AE16F20F9277F0E4D1\")));\n }", "public void mo56167c() {\n }", "public void mo21788M() {\n }", "public abstract long mo13681c();", "public void mo1531a() {\n }", "public void mo21785J() {\n }", "void mo57277b();", "void mo21073d();", "public static asw m47155c() {\n return zzfkz;\n }", "void mo7353b();", "void mo56163g();", "void mo57278c();", "public int n_()\r\n/* 429: */ {\r\n/* 430:442 */ return this.a.length + 4;\r\n/* 431: */ }", "void mo1942k();", "private int m10257E() throws cf {\r\n int i = 0;\r\n int i2;\r\n if (this.g.mo1996h() >= 5) {\r\n byte[] f = this.g.mo1994f();\r\n int g = this.g.mo1995g();\r\n i2 = 0;\r\n int i3 = 0;\r\n while (true) {\r\n byte b = f[g + i];\r\n i3 |= (b & 127) << i2;\r\n if ((b & 128) != 128) {\r\n this.g.mo1993a(i + 1);\r\n return i3;\r\n }\r\n i2 += 7;\r\n i++;\r\n }\r\n } else {\r\n i2 = 0;\r\n while (true) {\r\n byte u = mo1978u();\r\n i2 |= (u & 127) << i;\r\n if ((u & 128) != 128) {\r\n return i2;\r\n }\r\n i += 7;\r\n }\r\n }\r\n }", "public void mo21780E() {\n }", "public int mo34973b() {\n return 48;\n }", "public abstract int mo9749n();", "static void m14930d(String str) {\n int b = m14929b();\n int d = C3205z0.INFO.mo12550d();\n }", "void mo54405a();", "public void mo5382o() {\n }", "public void mo21791P() {\n }", "void mo57275a();", "public void m23075a() {\n }", "public void mo21825b() {\n }", "public short mo34e() {\n return 41;\n }", "public void skystonePos6() {\n }", "public int mo1534c() {\n return 2;\n }", "public abstract void mo56925d();", "public void mo3370l() {\n }", "public void mo5248a() {\n }", "void mo4833b();", "void mo12637b();", "private byte m1654g() {\n char charAt;\n do {\n int i = this.f2519d;\n if (i >= this.f2518c) {\n return 12;\n }\n CharSequence charSequence = this.f2516a;\n this.f2519d = i + 1;\n charAt = charSequence.charAt(i);\n this.f2520e = charAt;\n } while (charAt != ';');\n return 12;\n }", "void mo41083a();", "void mo21072c();", "int getUnknown13();", "void mo12650d();", "void mo17013d();", "static String m3302v() throws C1108a {\n if (f3067ki != null) {\n return f3067ki;\n }\n throw new C1108a();\n }", "void mo3194r();", "void m1864a() {\r\n }", "public void func_70295_k_() {}", "public abstract void mo2624j();", "String mo20731c();" ]
[ "0.6148362", "0.6052902", "0.6031856", "0.6028189", "0.6003016", "0.60016537", "0.5985573", "0.59760076", "0.5970174", "0.5965696", "0.5963945", "0.5959638", "0.5948024", "0.5948024", "0.5948024", "0.5948024", "0.5948024", "0.5948024", "0.5948024", "0.5938184", "0.59219855", "0.591126", "0.5883807", "0.5882175", "0.5880169", "0.5874438", "0.58566064", "0.5851667", "0.58306897", "0.5823639", "0.58183026", "0.5815299", "0.5810457", "0.57958466", "0.57928497", "0.57919693", "0.5788223", "0.57812244", "0.5765119", "0.5758066", "0.57506263", "0.57429814", "0.5737049", "0.5734685", "0.57309467", "0.5728978", "0.57251084", "0.57242197", "0.5721228", "0.57190776", "0.57164675", "0.5713517", "0.5713271", "0.57087284", "0.5708043", "0.57033163", "0.56996965", "0.56986505", "0.56888485", "0.56887054", "0.56815004", "0.5676851", "0.5673161", "0.56725806", "0.56647384", "0.5660229", "0.5659393", "0.5652504", "0.56520796", "0.56447047", "0.564322", "0.56414056", "0.564129", "0.56393826", "0.5636565", "0.56345624", "0.563119", "0.5627268", "0.562652", "0.5625867", "0.5619264", "0.56178504", "0.561709", "0.5616142", "0.56132174", "0.56099975", "0.5600854", "0.5597309", "0.5595526", "0.5592789", "0.5590264", "0.55901504", "0.5588938", "0.5583454", "0.55819094", "0.5580875", "0.5580577", "0.5580319", "0.55796766", "0.55779517", "0.55778134" ]
0.0
-1
TODO Autogenerated method stub
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); progress = UserCenterDialog.onCreateDialog(this); context = this; shellRW = new RWSharedPreferences(context, "addInfo"); initDialog(NoticeActivityGroup.LOTNO); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override protected void onPause() { super.onPause(); MobclickAgent.onPause(this);//BY贺思明 2012-7-24 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override protected void onResume() { super.onResume(); MobclickAgent.onResume(this);//BY贺思明 2012-7-24 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode==1) { if (resultCode==OAuthV1AuthorizeWebView.RESULT_CODE) { //从返回的Intent中获取验证码 tenoAuth=(OAuthV1) data.getExtras().getSerializable("oauth"); try { tenoAuth=OAuthV1Client.accessToken(tenoAuth); /* * 注意:此时oauth中的Oauth_token和Oauth_token_secret将发生变化,用新获取到的 * 已授权的access_token和access_token_secret替换之前存储的未授权的request_token * 和request_token_secret. */ tencent_token=tenoAuth.getOauthToken(); tencent_access_token_secret=tenoAuth.getOauthTokenSecret(); shellRW.putStringValue("tencent_token", tencent_token); shellRW.putStringValue("tencent_access_token_secret", tencent_access_token_secret); } catch (Exception e) { e.printStackTrace(); } Intent intent=new Intent(NewNoticeInfoActivity.this, TencentShareActivity.class); intent.putExtra("tencent", LotnoDetailView.shareString); intent.putExtra("oauth", tenoAuth); startActivity(intent); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Use the model to update the database and then return back to the member page.
@RequestMapping(method = RequestMethod.POST) public ModelAndView onSubmit(@ModelAttribute("memberRegistration") MemberRegistration memberRegistration) { System.out.println("submitted member for update, name=" + memberRegistration.getMember().getLastName()); System.out.println("Member id to add/edit=" + memberRegistration.getMember().getMemberId()); if (memberRegistration.getMember().getMemberId() == 0) { MemberRegistrationBO.addMember(memberRegistration); } else { try { MemberRegistrationBO.updateMemberRegistration(memberRegistration); } catch (Exception ex) { Logger.getLogger(MemberBioUpdateController.class.getName()).log(Level.SEVERE, null, ex); System.out.println("There was an error updating the member"); } } ModelAndView mv; mv = new ModelAndView("memberBio"); mv.addObject("informationMessage", "Member information saved"); mv.addObject("memberRegistration", memberRegistration); return mv; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void updateModelFromView();", "void updateViewFromModel();", "@RequestMapping(\"updat\")\r\n\tpublic String update(Model m) \r\n\t{\n\t\tm.addAttribute(\"update1\",new Employee());\r\n\t\treturn \"update\";//register.jsp==form action=register\r\n\t}", "@RequestMapping(value = \"/updateTransaction\", method = RequestMethod.POST)\r\n\tpublic ModelAndView update(HttpServletRequest request, ModelMap model) {\n\t\treturn new ModelAndView(\"redirect:list\");\r\n\r\n\t}", "public String update()\n {\n this.conversation.end();\n\n try\n {\n if (this.id == null)\n {\n this.entityManager.persist(this.automotor);\n return \"search?faces-redirect=true\";\n }\n else\n {\n this.entityManager.merge(this.automotor);\n return \"view?faces-redirect=true&id=\" + this.automotor.getId();\n }\n }\n catch (Exception e)\n {\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(e.getMessage()));\n return null;\n }\n }", "@Override\r\n\tpublic void setModel() {\n\t\tnew UpUI(context).execute();\r\n\t}", "@Override\n public void Update(Model model) {\n\n }", "public boolean update(ModelObject obj);", "@Override\n\tpublic void update(Member member) {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tsession.update(member);\n\t}", "public void updateModel()\n {\n if (beanModel instanceof EnterTillPayrollPayOutBeanModel)\n {\n EnterTillPayrollPayOutBeanModel model = (EnterTillPayrollPayOutBeanModel) beanModel;\n model.setAmount(amountField.getText());\n model.setSelectedReasonCode(reasonCodeField.getSelectedIndex());\n model.setPaidTo(paidToField.getText());\n model.setEmployeeID(employeeIDField.getText());\n model.setAddressLine(0, addressLine1Field.getText());\n model.setAddressLine(1, addressLine2Field.getText());\n model.setAddressLine(2, addressLine3Field.getText());\n model.setSelectedApprovalCodeIndex(approvalCodeField.getSelectedIndex());\n model.setComment(commentField.getText());\n }\n }", "public String update()\r\n {\r\n this.conversation.end();\r\n\r\n try\r\n {\r\n \t \r\n \t createUpdateImage(this.item);\r\n createUpdateSound(this.item);\r\n \t \r\n \t \r\n if (this.id == null)\r\n {\r\n this.entityManager.persist(this.item);\r\n return \"search?faces-redirect=true\";\r\n }\r\n else\r\n {\r\n this.entityManager.merge(this.item);\r\n return \"view?faces-redirect=true&id=\" + this.item.getId();\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(e.getMessage()));\r\n return null;\r\n }\r\n }", "public void update(com.conurets.inventory.model.User model) throws InventoryException {\n }", "@Override\r\n\tpublic int updateMember(Member member) {\n\t\treturn memberDAO.updateMember(member);\r\n\t}", "private void updatePage() {\n\t\ttry {\n\t\t\tList<ParseUser> friendUsers = ParseUser.getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t.fromLocalDatastore()\n\t\t\t\t\t\t\t\t\t\t\t\t\t.whereNotEqualTo(\"facebookId\", currentUser.getString(\"facebookId\"))\n\t\t\t\t\t\t\t\t\t\t\t\t\t.find();\n\t\t\t\n\t\t\tpopulateViews(friendUsers);\n\t\t\n\t\t} catch (ParseException e) {\n\t\t\tLog.e(StealTheCheeseApplication.LOG_TAG, \"Fetch friends from localstore failed with message: \" + e);\n\t\t}\n\t}", "void updateModel() {\n updateModel(false);\n }", "public String update() {\n\t\tif (getElement().getIdTipo() == null) {\n\t\t\tFacesContext.getCurrentInstance()\n\t\t\t\t\t.addMessage(\n\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\tnew FacesMessage(\"Tipo non valido\",\n\t\t\t\t\t\t\t\t\t\"Selezionare il tipo.\"));\n\t\t\treturn null;\n\t\t}\n\t\tModulo t = getSession().update(element);\n\t\t// refresh locale\n\t\telement = t;\n\t\trefreshModel();\n\t\t// vista di destinzione\n\t\toperazioniLogHandler.save(OperazioniLog.MODIFY, JSFUtils.getUserName(),\n\t\t\t\t\"modifica moduli: \" + this.element.getNome());\n\t\treturn viewPage();\n\t}", "@Override\r\n\tpublic void update(Member member) {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tsession.update(member);\r\n\t\tsession.flush();\r\n\t}", "public void update() throws ValidationException, SQLException {\n validate(false);\n boolean success = false;\n Connection conn = null;\n Statement stmt = null;\n StringBuffer sqlUpdate = new StringBuffer(\"UPDATE Member set MemberName='\");\n sqlUpdate.append(SqlHelper.escapeForSql(memberName));\n sqlUpdate.append(\"', EmailAddressVisibleToOthers=\");\n sqlUpdate.append((emailAddressVisibleToOthers ? 1 : 0));\n sqlUpdate.append(\" where LoginName = '\");\n sqlUpdate.append(SqlHelper.escapeForSql(loginName));\n sqlUpdate.append(\"'\");\n if (log.isInfoEnabled()) log.info(sqlUpdate.toString());\n try {\n conn = PoolManager.getConnection();\n conn.setAutoCommit(false);\n stmt = conn.createStatement();\n stmt.execute(sqlUpdate.toString());\n EmailAddress.update(this, emailAddressList, conn);\n conn.commit();\n } catch (SQLException se) {\n try {\n conn.rollback();\n } catch (SQLException ser) {\n }\n if (log.isErrorEnabled()) log.error(\"Sql Error on Update Member\", se);\n throw se;\n } finally {\n try {\n if (stmt != null) {\n stmt.close();\n stmt = null;\n }\n } catch (SQLException se) {\n }\n try {\n if (conn != null) {\n conn.setAutoCommit(true);\n PoolManager.freeConnection(conn);\n conn = null;\n }\n } catch (SQLException se) {\n }\n }\n }", "public void update( final T model )\n\t{\n\t\tthis.dao.save( model );\n\t}", "public void update() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.update(this); // routine now uses leaseDao to get CampLease class\r\n\t}", "@Override\n\tpublic void modify(UserModel um) throws Exception {\n\t\tsf.getCurrentSession().update(um);\n\t}", "public void UpdateItem(View view) {\n /*update a friend record given the id*/\n updateFriend(friendsDatabaseReference);\n /*the alternative*/\n// updateFriend_updateChildren(friendsDatabaseReference);\n }", "@Override\r\n\tpublic String update() {\n\t\tSystem.out.println(\"updateView.\");\r\n\t\t\r\n\t\t//javax.servlet.http.HttpSession session=request.getSession();\r\n\t\t//javax.servlet.ServletContext application=request.getServletContext();\r\n\t\t\r\n\t\t//String vId=request.getParameter(\"id\");\r\n\t\tif(!SysFun.isNullOrEmpty(id)) {\r\n\t\t\tLong iId=SysFun.parseLong(id);\r\n\t\t\tHeadLine bean=headLineService.load(iId);\r\n\t\t\t\r\n\t\t\tif(bean!=null) {\r\n\t\t\t\t\r\n\t\t\t\trequest.put(\"Id\", bean.getId());\r\n\t\t\t\trequest.put(\"lineName\", bean.getLineName());\r\n\t\t\t\trequest.put(\"lineLink\", bean.getLineLink());\r\n\t\t\t\t//request.put(\"lineImg\", bean.getLineImg());\r\n\t\t\t\treturn \"update\";\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn \"go_preload\";\r\n\t}", "@Override\n public void onClick(View view) {\n\n\n\n userDetail.setFname(fname.getText().toString());\n userDetail.setLname(lname.getText().toString());\n userDetail.setAge(Integer.parseInt(age.getText().toString()));\n userDetail.setWeight(Double.valueOf(weight.getText().toString()));\n userDetail.setAddress(address.getText().toString());\n\n try {\n new EditUserProfile(editUserProfileURL,getActivity(),userDetail).execute();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n Toast.makeText(getActivity(), \"Saved Profile Successfully\",\n Toast.LENGTH_SHORT).show();\n getFragmentManager().popBackStack();\n\n }", "public void updateModel() {\n\t\t// Set the mode to validation\n\t\tmode = UPDATE;\n\t\t// Traverses the source and updates the model when UML elements are\n\t\t// missing\n\t\tinspect();\n\t}", "public int update(ReviewVO review_memberVO);", "@Override\n\tpublic ActionForward update(HttpServletRequest request, HttpServletResponse response) {\n\t\treturn null;\n\t}", "@Override\n\tpublic ActionForward update(HttpServletRequest request, HttpServletResponse response) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic void updateMember(Member member) throws Exception {\n\t\tmemberDao.updateMember(member);\r\n\t}", "@Override\n\tpublic int update(Object model) {\n\t\treturn 0;\n\t}", "@PostMapping(\"/update\")\n public String update(@ModelAttribute Mod mod){\n modService.update(mod);\n return \"redirect:/mods\";\n }", "private void updateUserDetailsFromView() {\n\t\tcurrentDetails.setFirstName(detailDisplay.getFirstName().getValue());\n\t\tcurrentDetails.setLastName(detailDisplay.getLastName().getValue());\n\t\tcurrentDetails.setMiddleInitial(detailDisplay.getMiddleInitial().getValue());\n\t\tcurrentDetails.setTitle(detailDisplay.getTitle().getValue());\n\t\tcurrentDetails.setEmailAddress(detailDisplay.getEmailAddress().getValue());\n\t\tcurrentDetails.setPhoneNumber(detailDisplay.getPhoneNumber().getValue());\n\t\tcurrentDetails.setActive(detailDisplay.getIsActive().getValue());\n\t\t//currentDetails.setRootOid(detailDisplay.getRootOid().getValue());\n\t\tcurrentDetails.setRole(detailDisplay.getRole().getValue());\n\t\t\n\t\tcurrentDetails.setOid(detailDisplay.getOid().getValue());\n\t\tString orgId = detailDisplay.getOrganizationListBox().getValue();\n\t\tcurrentDetails.setOrganizationId(orgId);\n\t\tResult organization = detailDisplay.getOrganizationsMap().get(orgId);\n\t\tif (organization != null) {\n\t\t\tcurrentDetails.setOrganization(organization.getOrgName());\n\t\t} else {\n\t\t\tcurrentDetails.setOrganization(\"\");\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void onPersistSuccess(EntityUpdatedEvent event) {\n\t\t\t\tglobalApplicationState.refreshPage();\r\n\t\t\t}", "public void updatePerson(){\r\n\r\n // Generally update is performed after search \r\n // need to find out which record is going to update \r\n\r\n if (recordNumber >= 0 && recordNumber < personsList.size())\r\n {\r\n PersonInfo person = (PersonInfo)personsList.get(recordNumber);\r\n\r\n int id = person.getId();\r\n\r\n\t /*get values from text fields*/ \r\n\t name = tfName.getText();\r\n\t address = tfAddress.getText();\r\n\t phone = Integer.parseInt(tfPhone.getText());\r\n email = tfEmail.getText();\r\n\r\n\t /*update data of the given person name*/\r\n\t person = new PersonInfo(id, name, address, phone, email);\r\n pDAO.updatePerson(person);\r\n\r\n\t JOptionPane.showMessageDialog(null, \"Person info record updated successfully.\"); \r\n }\r\n else\r\n { \r\n JOptionPane.showMessageDialog(null, \"No record to Update\"); \r\n }\r\n }", "@RequestMapping(value = \"/user/profile\", method = RequestMethod.POST)\n\tpublic String updateUserProfile(@ModelAttribute(\"washeeRequestModel\") WasheeRegModel washeeRegModel,\n\t\t\tPrincipal principal) {\n\n\t\tuserService.update(washeeRegModel, principal.getName());\n\t\treturn \"redirect:/user/profile.html?success=true\";\n\t}", "public void update() throws NotFoundException {\n\tUserDA.update(this);\n }", "@Override\n\tpublic void updateMember(MemberVO member) {\n\t\tsqlSession.update(\"com.coderdy.myapp.member.dao.mapper.MemberMapper.updateMember\", member);\n\t}", "public void updateUserDetails() {\n\t\tSystem.out.println(\"Calling updateUserDetails() Method To Update User Record\");\n\t\tuserDAO.updateUser(user);\n\t}", "public boolean updateMember(final MemberPo po);", "@RequestMapping(value = \"/update\", method = RequestMethod.POST)\n public String updateStudent(ModelMap view, Student student) {\n studentService.update(student);\n view.addAttribute(\"msg\", new String(\"\"));\n return(\"redirect:/list\");\n }", "public void updateCurrentValues(AnyUriModel model) {\r\n this.model = model;\r\n resetValuesFromModel();\r\n }", "private String prepareAndReturnEditPage(Model model) {\n this.populateDentistVisitFormModel(model);\n return \"editForm\";\n }", "@Then(\"^: proceed to checkout$\")\r\n\tpublic void proceed_to_checkout() throws Throwable {\n\t\tobj.update();\r\n\t}", "@Override\n // Update user\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n HttpSession session = request.getSession();\n User user = new User();\n user.setUserGroup(Integer.parseInt(request.getParameter(\"user_group\")));\n //user.setUpdatedBy= session.getAttribute(\"username\");\n String userid = request.getParameter(\"id\");\n user.setId(Integer.parseInt(userid));\n dao.updateUser(user);\n RequestDispatcher view = request.getRequestDispatcher(LIST_USER);\n request.setAttribute(\"users\", dao.getAllUsers());\n view.forward(request, response);\n }", "public void run() {\n if (infomap.containsKey(\"updateListFiles\")) {\n tblDocChanges.setModel(new DocumentApproveRejectChangesTableModel());\n List<String> odfdocs =\n (List<String>) infomap.get(\"updateListFiles\");\n changesInfo.reload(odfdocs.toArray(new String[odfdocs.size()]));\n ((DocApproveRejectListModel) listMembers.getModel()).resetModel();\n\n }\n\n if (infomap.containsKey(\"updateListFile\")) {\n tblDocChanges.setModel(new DocumentApproveRejectChangesTableModel());\n String odfdoc = (String) infomap.get(\"updateListFile\");\n changesInfo.reload(odfdoc);\n ((DocApproveRejectListModel) listMembers.getModel()).resetModel();\n }\n }", "public void BtnContinue() {\n\n if (formValidation()) {\n try {\n SaveDraft();\n if (UpdateDB()) {\n// startActivity(new Intent(getApplicationContext(), EndingActivity.class).putExtra(\"complete\", true));\n startActivity(new Intent(getApplicationContext(), Form04_EF_D.class));\n } else {\n Toast.makeText(this, \"Error in updating db!!\", Toast.LENGTH_SHORT).show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }", "@RequestMapping(value=\"/employeeupdt\", method=RequestMethod.POST)\npublic String UpdateSave(EmployeeRegmodel erm)\n{\n\tEmployeeRegmodel erm1 = ergserv.findOne(erm.getEmployee_id());\n\t\n\term1.setEmployee_address(erm.getEmployee_address());\n\term1.setEmail(erm.getEmail());\n\term1.setEmployee_dob(erm.getEmployee_dob());\n\term1.setEmployee_phoneno(erm.getEmployee_phoneno());\n\term1.setEmployee_password(erm.getEmployee_password());\n\term1.setEmployee_fullname(erm.getEmployee_fullname());\n\term1.setEmployee_fname(erm.getEmployee_fname());\n\t\n\tergserv.updateEmployeeRegmodel(erm1);\n\treturn \"update.jsp\";\n}", "public void update() throws Exception {\n\t HaUserDao.getInstance().updateUser(this);\n\t}", "public void update()\n {\n this.controller.updateAll();\n theLogger.info(\"Update request recieved from UI\");\n }", "public void edit() throws Exception {\n super.assertModelsExist();\n for (Model model : models) {\n gotoEditPage(model);\n populateValues(model);\n save(model);\n handlePostErrors();\n }\n }", "@Override\r\n\tpublic void update(WechatMember member) {\n\t\t\r\n\t}", "@Transactional(readOnly = true)\n\tpublic void refresh() {\n\t\tswitch (actualView) {\n\t\tcase LIST:\n\t\t\trefreshList();\n\t\t\tbreak;\n\t\tcase EDIT:\n\t\t\t// refreshForm(); // TODO\n\t\t\tbreak;\n\t\t}\n\t}", "public String update() {\r\n\t\tuserService.update(userEdit);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"update\";\r\n\t}", "public void update(E model) {\n\t\tgetHibernateTemplate().update(model);\r\n\t}", "public void launchUpdate() {\n\n\t\tif (checkRegister() == true && psw.getText() != newpsw.getText()) {\n\t\t\tDatabase.getInstance().updateUser(newpsw.getText(), username.getText());\n\t\t\tstatus.setText(\"Account updated\");\n\t\t} else {\n\t\t\tstatus.setText(\"Password already exist or this account doesn't exist\");\n\t\t}\n\n\t}", "public void update() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.update(this);\n\t\tsession.getTransaction().commit();\n\t}", "private static void LessonDAOUpdate() {\n PersonDAO personDAO = new PersonDAOImpl();\n\n Person person = personDAO.getPersonById(7);\n person.setFirstName(\"Teddy\");\n\n if(personDAO.updatePerson(person)) {\n System.out.println(\"Person Update Success!\");\n } else {\n System.out.println(\"Person Update Fail!\");\n }\n }", "@RequestMapping(value = \"/editUserData\" , method = RequestMethod.POST)\n\tpublic String saveEditUser(@ModelAttribute(\"updateDetails\") LoginUser user, Model model)\n\t{\n\t\tLoginUser updatedDetails=loginService.updateData(user);\n\n\n\n\t\t//\tSystem.out.println(\"return in controller \"+l);\n\t\tmodel.addAttribute(\"updatedDetails\", updatedDetails);\n\t\treturn \"login\";\n\t}", "@Override\r\n\tpublic int updateMember(MemberVO member) {\n\t\tMemberMapper mapper = sqlSession.getMapper(MemberMapper.class);\r\n\t\treturn mapper.updateMember(member);\r\n\t}", "public void update() {\n manager.update();\n }", "public void update(){\r\n\t\tthis.loadRecords();\r\n\t}", "public String update()\n {\n this.conversation.end();\n\n try\n {\n if (this.id == null)\n {\n this.entityManager.persist(this.paramIntervento);\n return \"search?faces-redirect=true\";\n }\n else\n {\n this.entityManager.merge(this.paramIntervento);\n return \"view?faces-redirect=true&id=\" + this.paramIntervento.getNome();\n }\n }\n catch (Exception e)\n {\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(e.getMessage()));\n return null;\n }\n }", "@Override\n public int update(Model model) throws ServiceException {\n try {\n \treturn getDao().updateByID(model);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tlogger.error(e.getMessage());\n\t\t\tthrow new ServiceException(ResultCode.DB_ERROR);\n\t\t}\n }", "public void editButtonClicked(){\n String first = this.firstNameInputField.getText();\n String last = this.lastNameInputField.getText();\n String email = this.emailInputField.getText();\n String dep = \"\";\n String role=\"\";\n if(this.departmentDropdown.getSelectionModel().getSelectedItem() == null){\n dep= this.departmentDropdown.promptTextProperty().get();\n //this means that the user did not change the dropdown\n \n }else{\n dep = this.departmentDropdown.getSelectionModel().getSelectedItem();\n }\n \n if(this.roleDropdown.getSelectionModel().getSelectedItem()== null){\n role = this.roleDropdown.promptTextProperty().get();\n }else{\n role = this.roleDropdown.getSelectionModel().getSelectedItem();\n }\n \n if(this.isDefaultValue(first) && \n this.isDefaultValue(last) && \n this.isDefaultValue(email) && \n this.isDefaultValue(role) && \n this.isDefaultValue(dep)){\n //this is where we alert the user that no need for update is needed\n Alert alert = new Alert(AlertType.INFORMATION);\n alert.setContentText(\"User information has not changed...no update performed\");\n alert.showAndWait();\n \n }else{\n \n if(this.userNameLabel.getText().equals(\"User\")){\n System.out.println(\"This is empty\");\n }else{\n //create a new instance of the connection class\n this.dbConnection = new Connectivity();\n //this is where we do database operations\n if(this.dbConnection.ConnectDB()){\n //we connected to the database \n \n boolean update= this.dbConnection.updateUser(first, last, email, dep,role , this.userNameLabel.getText());\n \n \n }else{\n System.out.println(\"Could not connect to the database\");\n }\n \n }\n }\n }", "private void updateEmployeeSeating() {\n BookingModel bookingModel1 = new BookingModel();\n UserModel userModel1 = new UserModel();\n try {\n bookingModel1.updateBookingSeat(employeeID, seatNum);\n userModel1.setPreviousSeat(seatNum);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic Patient update( Patient model, int patientId) {\n\t\treturn null;\n\t}", "public void update(User user);", "@Override\r\n\tpublic void MemberUpdate() {\n\r\n\t}", "@RequestMapping(value = \"/admin/update_admin__account\")\r\n public String adminUpdateAccountPage(@ModelAttribute(\"AdminEditCommand\") AdminEditCommand cmd, HttpSession session) {\r\n System.out.println(\"form data: \" + cmd.getA());\r\n \r\n Admin current_admin = (Admin) session.getAttribute(\"admin\");\r\n Admin a = cmd.getA();\r\n a.setId(current_admin.getId());\r\n a.setImage(\"default.png\");\r\n Admin admin = adminService.updateAdminDetails(a);\r\n System.out.println(\"new admin : \" + admin);\r\n if(admin != null ) {\r\n addAdminInSession(admin, session);\r\n return \"redirect:/admin/admin_profile?Account Updated\";\r\n } else {\r\n return \"redirect:/admin/admin_edit_account?Upload failed\";\r\n }\r\n\r\n \r\n }", "public void updatePhone(DetailModel detailModel){\n\n }", "@Override\n\tpublic String update(Long id, Model m) throws Exception {\n\t\treturn null;\n\t}", "@Override\n\tpublic String update(Long id, Model m) throws Exception {\n\t\treturn null;\n\t}", "@RequestMapping(value = \"/editAccountPage\", method = RequestMethod.GET)\n\tpublic String jobseekerEditAccount(Model m, HttpServletRequest req) {\n\t\tHttpSession session = req.getSession();\n\t\tString username = (String) session.getAttribute(\"username\");\n\t\tSystem.out.println(\"session username = \" + username);\n\t\tString firstname = (String) session.getAttribute(\"firstname\");\n\t\tm.addAttribute(\"firstname\", firstname);\n\t\tm.addAttribute(\"state\", \"editAccount\");\n\t\tSystem.out.println(\"I'm jobseeker editAccount\");\n\t\treturn \"js.editAccount\";\n\t\t// return \"redirect:../home\";\n\t}", "public void handleUpdate(){\n increaseDecrease(\"i\");\n action=\"update\";\n buttonSave.setVisible(true);\n admission.setEditable(false);\n\n }", "private void goUpdatePasswordSucess() {\n\n AppManager.getAppManager().finishActivity(ForgetpasswordActivity.class);\n finish();\n }", "private void updateBalance(){\n Intent toUpdateBal = new Intent(this, UpdateAccount.class);\n startActivity(toUpdateBal);\n }", "@RequestMapping(value=\"/ExternalUsers/EditProfile\", method = RequestMethod.GET)\n\t\tpublic String editProfile(ModelMap model) {\n\t\t\t// redirect to the editProfile.jsp\n\t\t\treturn \"/ExternalUsers/EditProfile\";\n\t\t\t\n\t\t}", "Account.Update update();", "void update(User user);", "void update(User user);", "public void refreshState() {\n if (this.currentPost != null) {\n postId = this.currentPost.getId();\n this.currentPost = ctrl.getPost(postId);\n }\n if (this.currentUser != null) {\n username = this.currentUser.getUsername();\n this.currentUser = ctrl.getSystemUser(username);\n }\n this.postList = ctrl.getPostList();\n this.userList = ctrl.getUserList();\n\n inputTextNumber = 0;\n //ctrl.refreshState();\n }", "protected static void update() {\n\t\tstepsTable.update();\n\t\tactive.update();\n\t\tmeals.update();\n\t\t\n\t}", "@RequestMapping(\"/showFormForUpdate\")\n\tpublic String showFormForUpdate(@RequestParam(\"personId\") int theId, Model theModel) {\n\t\tPerson thePerson = patientKeeperService.getPerson(theId);\n\n\t\t// set person as a model attribute to pre-populate the form\n\t\ttheModel.addAttribute(\"person\", thePerson);\n\n\t\t// send over to our form\n\t\treturn \"person-form\";\n\t}", "@Override\n\tpublic String update(Integer id, Model m) throws Exception {\n\t\treturn null;\n\t}", "@Override\n\tpublic String update(Integer id, Model m) throws Exception {\n\t\treturn null;\n\t}", "@Override\n public void onSuccess() {\n EventSender.friendUpdate(mPerson, getIntent().getIntExtra(DATA_POSITION, 0), FriendEventModel.OP_EDIT);\n finish();\n }", "@Action(value=\"update\",results={@Result(name=\"queryAll\",location=\"/zjwqueryMange.jsp\")})\n\tpublic String update()\n\t{\n\t\tkehuDAO.update(kehu);\n\t\t//查询 id kehu\n\t\tkehuList = (ArrayList) kehuDAO.findAll();\n\t\treturn \"queryAll\";\n\t}", "@Override\n\tpublic int update(MemberVO memberVo) {\n\t\treturn 0;\n\t}", "private static void updateUser() {\n\t currentUser = Structure.User(currentUser);\n\t CRUDUsers.compareWithRemote(currentUser).subscribe(new SingleSubscriber<User>() {\n\t\t @Override\n\t\t public void onSuccess(User value) {\n\t\t\t\tConnection.logIn(value);\n\t\t }\n\t\t\n\t\t @Override\n\t\t public void onError(Throwable error) {\n\t\t\t logOff();\n\t\t\t App.showMessage(error.getMessage());\n\t\t }\n\t });\n }", "private void update(){\n if(!((EditText)findViewById(R.id.bookTitle)).getText().toString().trim().isEmpty()){\n if(!appData.getCurrentBookId().isEmpty()){\n mRealm.executeTransactionAsync(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n BookInfo mBookInfo= realm.where(BookInfo.class).equalTo(\"mBookId\",\n appData.getCurrentBookId()).findFirst();\n mBookInfo.setBookTitle(((EditText) findViewById(R.id.bookTitle))\n .getText().toString());\n mBookInfo.setAuthorsNames(((EditText) findViewById(R.id.bookAuthor))\n .getText().toString());\n mBookInfo.setGenre(mSelectedGenre.get(\"position\"));\n }\n });\n Intent main = new Intent(this,BookListActivity.class);\n startActivity(main);\n finish();\n }else{\n\n mRealm.executeTransactionAsync(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n\n BookInfo mBookInfo = realm.createObject(BookInfo.class,\n UUID.randomUUID().toString());\n mBookInfo.setBookTitle(((EditText) findViewById(R.id.bookTitle))\n .getText().toString());\n mBookInfo.setAuthorsNames(((EditText) findViewById(R.id.bookAuthor))\n .getText().toString());\n mBookInfo.setGenre(mSelectedGenre.get(\"position\"));\n }\n });\n Intent main = new Intent(this,BookListActivity.class);\n startActivity(main);\n finish();\n\n }\n }else{\n new AlertDialog.Builder(EditOrAddBookActivity.this)\n .setTitle(\"No Book Title\")\n .setMessage(\"You must at the very least have a book title\")\n .setCancelable(false)\n .setPositiveButton(\"ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // Whatever...\n }\n }).show();\n }\n }", "public boolean update(User u);", "public void handleUpdate(ActionEvent event) throws InterruptedException, FileNotFoundException{\r\n \t String result=tempUser.validate(newUser_Manage.getText());\r\n \t if(result.equalsIgnoreCase(\"true\")){\r\n \t\t feedback_Manage.setText(\"Username Already Exist!\");\r\n \t\t Thread.sleep(50);\r\n \t\t feedback_Manage.setText(\"\");\r\n \t\t } else {\r\n \t\t\t feedback_Manage.setText(\"Update Successful!\");\r\n \t\t\t if(newUser_Manage.getText().isEmpty()!=true)\r\n \t\t\t\t currentUser.setUserName(newUser_Manage.getText());\r\n \t\t\t if(newGoal_Manage.getText().isEmpty()!=true)\r\n \t\t\t\t currentUser.setGoal(newGoal_Manage.getText());\r\n \t\t\t Thread.sleep(100);\r\n \t\t\t this.changeView(\"../view/Main.fxml\");\r\n \t\t\t }\r\n \t }", "@Override\r\n\tpublic void resultsUpdated() {\r\n\t\tmLayout.hideText();\r\n\t\t\r\n\t\tif(mModel.getResults().size() == 1){\r\n\t\t\tmModel.selectPerson(mModel.getResults().get(0));\r\n\t\t\tmController.getProfilePicture(mModel.getResults().get(0).sciper);\r\n\t\t\tmDialog = new PersonDetailsDialog(this, mModel.getSelectedPerson());\r\n\t\t\tmDialog.show();\r\n\t\t}else\r\n\t\t\tstartActivity(new Intent(getApplicationContext(), DirectoryResultListView.class));\r\n\t\t\r\n\t}", "@Override\n\tpublic ModelAndView update(HttpServletRequest request) {\n\t\treturn null;\n\t}", "@Override\n\tpublic ModelAndView update(HttpServletRequest request) {\n\t\treturn null;\n\t}", "@RequestMapping(value = \"/modify\", method=RequestMethod.POST) //보낼때 post로 보낸다..............용량 크거나 아이다 패스워드같은\n\tpublic String modify(HttpServletRequest request, Model model) {\n\t\tdao.modify(request.getParameter(\"bId\"), \n\t\t\t\trequest.getParameter(\"bName\"), \n\t\t\t\trequest.getParameter(\"bTitle\"), \n\t\t\t\trequest.getParameter(\"bContent\"));\n\t\treturn \"redirect:list\";\n\t}", "int updateByPrimaryKey(Member record);", "@Override\n\tpublic void execute(Model model) {\n\t\tMap<String, Object> map = model.asMap();\n\t\tHttpServletRequest request = (HttpServletRequest)map.get(\"request\");\n\t\tHttpSession session=request.getSession();\n\t\tString userId = (String) session.getAttribute(\"userid\");\n\t\tint pId = Integer.parseInt(request.getParameter(\"pId\"));\n\t\tSystem.out.println(\"BID=====\"+pId);\n\t\tPBasketDao dao = new PBasketDao();\n\t\tdao.write(pId, userId);\n\t}", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\tdatabseExecuteQuery(\"UPDATE userdetails SET verify=1 where username='\"+Username+\"'\");\n\t\t\t\t\n\t\t\t\t//after that make verifiacation GUI again \n\t\t\t\tnew Verification();\n\t\t\t}", "void update(Member member);" ]
[ "0.641058", "0.6409238", "0.5914253", "0.5887935", "0.5874198", "0.5826155", "0.58256453", "0.58173645", "0.578901", "0.5785212", "0.57745034", "0.57673705", "0.5750777", "0.5724847", "0.57118714", "0.56788313", "0.5673181", "0.5670021", "0.55999255", "0.5585759", "0.55734676", "0.5572938", "0.55714095", "0.55578315", "0.5556972", "0.5551352", "0.5546683", "0.5546683", "0.553837", "0.55346006", "0.5530873", "0.5527756", "0.5522886", "0.55090004", "0.5508965", "0.55082047", "0.55075496", "0.5495336", "0.5491937", "0.54790306", "0.5472978", "0.5471436", "0.5469409", "0.5462411", "0.54568464", "0.5455565", "0.5443858", "0.5437418", "0.5437183", "0.54217803", "0.5418004", "0.54104096", "0.5409703", "0.54095584", "0.539384", "0.5389443", "0.53817385", "0.5379344", "0.5369374", "0.5368728", "0.5352854", "0.53508735", "0.5347364", "0.53223854", "0.5320278", "0.53082037", "0.5304062", "0.5302645", "0.5296225", "0.5294595", "0.52937746", "0.52937746", "0.5289961", "0.52898455", "0.5289627", "0.52872425", "0.5286588", "0.52689934", "0.5263072", "0.5263072", "0.52594465", "0.5256757", "0.52555496", "0.5252666", "0.5252666", "0.5245454", "0.5242148", "0.52420294", "0.5238888", "0.52364916", "0.5233277", "0.5226941", "0.5225789", "0.52237946", "0.52237946", "0.52211833", "0.5218179", "0.5209777", "0.52096206", "0.52094305" ]
0.5882304
4
Autowire the User Service GET Method of Register shows the page.
@RequestMapping(value="/ExternalUsers/EditProfile", method = RequestMethod.GET) public String editProfile(ModelMap model) { // redirect to the editProfile.jsp return "/ExternalUsers/EditProfile"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value = \"/registration\", method = RequestMethod.GET)\n public String showPageRegistration(Model model)\n {\n model.addAttribute(\"registeredUser\", new User());\n return \"registration\";\n }", "@GetMapping(\"/register\")\n public String showRegister(Model model){\n model.addAttribute(\"user\", new User());\n return \"registerForm\";\n }", "@GetMapping(value=\"/\")\n\tpublic String showRegistrationForm(WebRequest request, Model model) {\n\t\tUserDTO userDTO = new UserDTO();\n\t\tmodel.addAttribute(\"user\", userDTO);\n\t\treturn \"security/register\";\n\t}", "@GetMapping(\"register\")\n public String registerForm(Model model){\n model.addAttribute(\"user\", new User());\n return \"register_form\";\n }", "@RequestMapping(value = \"/registeredUsers\", method = RequestMethod.GET)\n public String registeredUsers()\n {\n return \"registeredUsers\";\n }", "@GetMapping(\"/registration\")\n\t public String registration(Model model) {\n\t model.addAttribute(\"userForm\", new User());\n\t return \"registration\";\n\t }", "@RequestMapping(value = \"/register\", method = RequestMethod.GET)\n public ModelAndView displayRegisterForm() {\n return new ModelAndView(\"registerForm\", \"customer\", new Customer());\n }", "@GetMapping(\"/registration\")\n public String registration(Model model) {\n \t\n model.addAttribute(\"userForm\", new User());\n\n return \"registration\";\n }", "@RequestMapping(\"/newuser\")\r\n\tpublic ModelAndView newUser() {\t\t\r\n\t\tRegister reg = new Register();\r\n\t\treg.setUser_type(\"ROLE_INDIVIDUAL\");\r\n\t\treg.setEmail_id(\"abc@xyz.com\");\r\n\t\treg.setFirst_name(\"First Name\");\r\n\t\treg.setCity(\"pune\");\r\n\t\treg.setMb_no(new BigInteger(\"9876543210\"));\r\n\t\treturn new ModelAndView(\"register\", \"rg\", reg);\r\n\t}", "@RequestMapping(method = RequestMethod.GET)\r\n\tpublic String resiterMethod(@ModelAttribute UsersInfo info, ModelMap model) {\n\t\treturn \"Register\";\r\n\t}", "@Autowired\n public RegistrationController(UserService userService)\n {\n this.userService = userService;\n }", "@GetMapping(\"/register\")\r\n\tpublic String showRegistrationForm(Model theModel) {\r\n\t\ttheModel.addAttribute(\"user\", new UserCrm());\r\n\t\treturn \"registration\";\r\n\t}", "@GetMapping(\"/register-particular\")\n\tpublic ModelAndView goToRegisterPartForm() {\n\t\t\n\t\tModelAndView mav = new ModelAndView(\"register-particular\");\n\t\tUser user = new User();\n\t\tmav.addObject(\"user\", user);\n\n\t\treturn mav;\n\t}", "private void register_user() {\n\n\t\tHttpRegister post = new HttpRegister();\n\t\tpost.execute(Config.URL + \"/api/newuser\");\n\n\t}", "@RequestMapping(value = \"/register\",method = RequestMethod.GET)\r\n\tpublic String viewRegistration(Model model) { \r\n\t\tmodel.addAttribute(\"userForm\", uservalue);\r\n\t\t//UserForm Name of the model attribute under which the form object is exposed. Defaults to 'command'.\r\n\t\treturn \"Registration\";\r\n\t}", "@GetMapping(\"/register-pro\")\n\tpublic ModelAndView goToRegisterProForm() {\n\t\t\n\t\tModelAndView mav = new ModelAndView(\"register-pro\");\n\t\tUser user = new User();\n\t\tmav.addObject(\"user\", user);\n\n\t\treturn mav;\n\t}", "@Override\n\tprotected String url() {\n\t\treturn \"user\";\n\t}", "@RequestMapping(\"/register\")\r\n\tpublic ModelAndView register(@ModelAttribute(\"registerForm\") final UserRegisterForm form) {\r\n\t\treturn new ModelAndView(\"users/register\");\r\n\t}", "public RegisterPage goRegisterPage () {\n return topBar.goRegisterPage();\n }", "@GetMapping(\"/user\")\n public String user(){\n\n return \"User .. \";\n }", "@RequestMapping(value = \"/registration\")\n public String registration(Model model) {\n User user = new User();\n model.addAttribute(\"user\", user);\n return \"user/registration\";\n }", "@GetMapping(\"register\")\n public String registerForm(RegisterForm registerForm) {\n return \"register\";\n }", "public String toRegister() {\r\n\t\treturn \"/admin/register.jsf\";\r\n\t}", "public String registration() {\n if (name != null) {\n int createdUsers = DBUtils.addUser(name, password, email);\n if (createdUsers > 0) {\n try {\n HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();\n request.login(name, password);\n initUser();\n request.getSession().setAttribute(\"current_user\", this);\n } catch (ServletException e) {\n FacesContext context = FacesContext.getCurrentInstance();\n FacesMessage message = new FacesMessage(\"Wrong login or password\");\n message.setSeverity(FacesMessage.SEVERITY_ERROR);\n context.addMessage(\"login\", message);\n }\n return \"/index?faces-redirect=true\";\n }\n }\n return \"/pages/register.xhtml?faces-redirect=true\";\n }", "@GetMapping({\"/reg\",\"/\"})\r\n\tpublic String showReg() {\r\n\t\treturn \"ProductRegister\";\r\n\t}", "@GET(Config.REGISTER) Call<User> registerUser(@QueryMap Map<String, String> body);", "@GetMapping(\"/pharmRegister\")\n public String pharmRegister(Model model){\n model.addAttribute(\"pharmacist\", new User());\n return \"views/pharmacist/pharmacistRegister\";\n }", "public void handleRegister() {\n\t\tmainApp.showRegistrationPage();\n\t}", "@GetMapping\n public String onRegistration() {\n return \"registration\";\n }", "@RequestMapping(value=\"/signup\",method=RequestMethod.GET)\r\n\tpublic ModelAndView signupSuccess()\r\n\t{\r\n\t\tModelAndView mv=new ModelAndView(\"DefaultPage\");\r\n\t\tmv.addObject(\"title\",\"signup\");\r\n\t\tmv.addObject(\"userClicksSignup\", true);\r\n\t\tUser nuser=new User();\r\n\t\t//setting few fields\r\n\t\tnuser.setEnabled(true);\r\n\t\tnuser.setRole(\"USER\");\r\n\t\tmv.addObject(\"user\", nuser);\r\n\t\treturn mv;\r\n\t}", "public interface UserRegisterService {\n\n public Boolean isHave(String username);\n\n void insertUser(UserRegister user);\n\n PagedResult<UserRegister> queryPage(String username,Integer pageNo,Integer pageSize);\n\n void deleteUser(int userId);\n}", "@RequestMapping(value = \"/signup\", method = RequestMethod.GET)\n\tpublic String signUpPage(Model model)\n\t{\n\t\t/* Initialize user registration form */\n\t\tmodel.addAttribute(\"userForm\", new UserDto());\n\t\treturn \"user/signup\";\n\t}", "@RequestMapping(\"/signup\")\n public String signupPage() {\n return \"createProfile\";\n }", "@RequestMapping(\"/getusers\")\n public UserViewModel userViewModel (){\n return userService.getAllUsers();\n }", "@RequestMapping(value = \"/reg.htm\",method = RequestMethod.POST)\r\n\tpublic String register(User user,BindingResult result,ModelMap map,HttpSession session,HttpServletResponse response) throws IOException {\r\n\t\t\r\n\t\t\tuserService.addUser(user);\r\n\t\t\treturn \"regSuccess\";\t\r\n\t\t}", "void register() {\n if (registerView.getFirstName().length() == 0 || registerView.getLastName().length() == 0 || registerView.getUsername().length() == 0 || registerView.getPassword().length() == 0) {\n IDialog invalidRegistrationDialog\n = dialogFactory.createDialog(DialogFactoryOptions.dialogNames.MESSAGE, new HashMap<String, Object>() {\n {\n put(\"message\", \"Unable to register: Fields must be non-empty!\");\n put(\"title\", \"Authentication Error\");\n put(\"messageType\", DialogFactoryOptions.dialogType.ERROR);\n }\n });\n\n invalidRegistrationDialog.run();\n } else {\n if (userController.registerUser(registerView.getFirstName(), registerView.getLastName(), registerView.getUsername(), registerView.getPassword()) != null) {\n mainFrame.setPanel(panelFactory.createPanel(PanelFactoryOptions.panelNames.MAIN_MENU));\n } else {\n IDialog invalidRegistrationDialog = dialogFactory.createDialog(DialogFactoryOptions.dialogNames.MESSAGE, new HashMap<String, Object>() {\n {\n put(\"message\", \"Unable to register: Username is already taken\");\n put(\"title\", \"Authentication Error\");\n put(\"messageType\", DialogFactoryOptions.dialogType.ERROR);\n }\n });\n\n invalidRegistrationDialog.run();\n }\n }\n }", "interface ViewUserRegistration {\n void showLoading();\n\n void hideLoading();\n\n void userRegistrationSuccess(UserRegisterResponse userRegisterResponse);\n\n void userRegistrationError(String error);\n }", "@RequestMapping(value = \"/\", method = GET)\n public ModelAndView showRegistrationPage(ModelAndView modelAndView, Applicant applicant) {\n modelAndView.addObject(\"user\", applicant);\n modelAndView.setViewName(REGISTRATION_PAGE);\n return modelAndView;\n }", "public static Result register(){\n Skier loggedInSkier=Session.register();\n if(loggedInSkier!=null) {\n login(loggedInSkier);\n return renderHome(loggedInSkier);\n }else\n return badRequest(index.render(\"Something went wrong!\"));\n }", "@RequestMapping(method= RequestMethod.GET, value=\"/staff/signup\")\n public String getSignupTemplate() {\n return \"signup-staff\";\n }", "@RequestMapping(\"/getUsers\")\r\n\tpublic String getUsers() {\r\n\t\treturn \"Hai Hello How are you\";\r\n\t}", "@GetMapping(\"/getUser\")\n public UserDTO getUser(@RequestParam(value=\"username\" ) String username , @RequestParam(value=\"password\" ) String password) throws Exception{\n\n\n UsersEntity user = userService.getUser(username,password);\n String us = \"Welcome\" + user.getFirstName() + \" \" + user.getLastName();\n return new UserDTO(user.getFirstName(),user.getLastName());\n }", "public RegisterUserBean() {\n this.account.setGender(Boolean.TRUE);\n this.roleID = 5;\n }", "@POST\n @Path(\"register\")\n @Produces(MediaType.APPLICATION_JSON)\n public JAXResult register(UserBE user){\n return null;\n }", "private void registerUser()\n {\n /*AuthService.createAccount takes a Consumer<Boolean> where the result will be true if the user successfully logged in, or false otherwise*/\n authService.createAccount(entryService.extractText(namedFields), result -> {\n if (result.isEmpty()) {\n startActivity(new Intent(this, DashboardActivity.class));\n } else {\n makeToast(result);\n formContainer.setAlpha(1f);\n progressContainer.setVisibility(View.GONE);\n progressContainer.setOnClickListener(null);\n }\n });\n }", "public Register() {\n user = new User();\n em = EMF.createEntityManager();\n valid = false;\n }", "@Override\n @RequestMapping(\"/register\")\n public ConfirmationMessage register(@RequestParam(value = \"username\", defaultValue = \"\") String username,\n @RequestParam(value = \"password1\", defaultValue = \"\") String password1,\n @RequestParam(value = \"password2\", defaultValue = \"\") String password2,\n @RequestParam(value = \"email\", defaultValue = \"\") String email,\n @RequestParam(value = \"city\", defaultValue = \"\") String city) {\n return userLogic.register(username, password1, password2, email, city);\n }", "@RequestMapping(value = {\"/register\"}, method = RequestMethod.GET)\n public String newUser(ModelMap model) {\n User user = new User();\n Customer customer = new Customer();\n List<UserProfile> userProfileList = new ArrayList();\n user.setCustomer(customer);\n user.setUserProfileList(userProfileList);\n model.addAttribute(\"user\", user);\n model.addAttribute(\"edit\", false);\n model.addAttribute(\"action\", \"newuser\");\n model.addAttribute(\"loggedinuser\", appService.getPrincipal());\n return \"registration\";\n }", "@GetMapping(value = \"/registration\")\n public String onRegistration() {\n return \"registration\";\n }", "@RequestMapping(\"register.action\")\n\tpublic ModelAndView register(String username,String password){\n\t\tboolean result=ud.insert(username,password);\n\t\t\n\t\tModelAndView mv=new ModelAndView();\n\t\tmv.addObject(\"message\", username);\n\t\tmv.addObject(\"str1\", \"success\");\n\t\tmv.setViewName(\"sign-up3\");\n\t\t\n\t\treturn mv;\n\t}", "@GetMapping(\"/doctorRegister\")\n public String doctorRegister(Model model){\n model.addAttribute(\"doctor\", new User());\n model.addAttribute(\"info\", new PrescriberInfo());\n return \"views/doctor/doctorRegister\";\n }", "String registerUser(User user);", "@RequestMapping(value = \"/add/userList\", method = RequestMethod.GET)\r\n\tpublic ModelAndView listUser() {\n\t\t\r\n\t\tSystem.out.println(\"Entering list user method\");\r\n\t\tuserDAO.list();\r\n\t\t\r\n\t\tModelAndView mv = new ModelAndView(\"page\");\r\n\t\tmv.addObject(\"greeting\", \"This is list of value \");\r\n\t\treturn mv;\r\n\t}", "private void registerUser(HttpServletRequest request, HttpServletResponse response){\n String firstName = request.getParameter(\"firstName\");\n String lastName = request.getParameter(\"lastName\");\n String address = request.getParameter(\"address\");\n String email = request.getParameter(\"email\");\n String shipAddress = request.getParameter(\"shipAddress\");\n int role = Integer.parseInt(request.getParameter(\"role\"));\n User user = new User(firstName,lastName,address,email,shipAddress,role);\n userServices.addUser(user);\n try {\n request.getRequestDispatcher(\"/home\").forward(request,response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@GetMapping(\"/patientRegister\")\n public String patientRegister(Model model){\n model.addAttribute(\"patient\", new User());\n model.addAttribute(\"info\", new PatientInfo());\n return \"views/patient/patientRegister\";\n }", "@RequestMapping(\"/user\")\n @ResponseBody\n public MyUser getUser(@RequestParam String userName) {\n return userService.getUserByUsername(userName);\n }", "@GetMapping(\"/register\")\n\tpublic String showOrderMethodReg() {\n\t\treturn \"OrderMethodRegister\";\n\t}", "private ShowCreateAnswerPage() {\n this.service = UserService.retrieve();\n this.validator = Validator.retrieve();\n }", "@GetMapping(\"/registration\")\n public String getRegistration(Model model)\n {\n model.addAttribute(\"newAccount\", new Account());\n \n return \"registration\";\n }", "@RequestMapping(value={\"/register\"}, method = RequestMethod.POST)\n public String registeraccount(@Valid User user,\n \t\tBindingResult result,\n \t\tModel model,\n \t\tHttpServletRequest request) {\n\n \t//titulo de la ventana\n \tmodel.addAttribute(\"title\", messages.getMessage(\"text.register.tittle\", null, LocaleContextHolder.getLocale()));\n \t\n \t//si hay un error al validar\n if (result.hasErrors()) {\n\t return \"aplication/register\";\n\t \n //si la cuenta ya existe\n } else if (userDao.findByUserName(user.getUsername()) != null){\n\t model.addAttribute(\"error\", messages.getMessage(\"text.register.error.accountexists\", null, LocaleContextHolder.getLocale()));\n\t return \"aplication/register\";\n \n //si el correo ya existe\n } else if (userDao.findEmail(user.getEmail()) != null) {\n model.addAttribute(\"error\", messages.getMessage(\"text.register.error.emailexists\", null, LocaleContextHolder.getLocale()));\n return \"aplication/register\";\n \n //si el correo no es valido\n } else if (!esEmailCorrecto(user.getEmail())) {\n model.addAttribute(\"error\", messages.getMessage(\"text.register.error.emailinvalid\", null, LocaleContextHolder.getLocale()));\n return \"aplication/register\";\n \n //si tiene mas de x caracteres la contraseña\n } else if (user.getPassword().length() > User.passwordmax) {\n \tmodel.addAttribute(\"error\", messages.getMessage(\"text.register.error.passwordmaxone\", null, LocaleContextHolder.getLocale()) + \" \" + User.passwordmax + \" \" + messages.getMessage(\"text.register.error.passwordmaxtwo\", null, LocaleContextHolder.getLocale()));\n \treturn \"aplication/register\";\n \t\n //si todo es valido\n }else {\n \t\n \t//codificamos la contraseña\n PasswordEncoder encode = paswordncoder();\n user.setPassword(encode.encode(user.getPassword()));\n \n //configuramos la cuenta\n user.setEnabled(false);\n user.setNotLocker(true);\n user.setSystenBan(false);\n \n try {\n //enviamos el correo de activar cuenta\n eventPublisher.publishEvent(new OnRegistrationCompleteEvent(user, \n \t\tLocaleContextHolder.getLocale(), request.getContextPath()));\n } catch (Exception e) {\n user.setEnabled(true);\n }\n \n userDao.save(user);\n \n \n \n //hacemos que se siga a si mismo\n followDao.save(new Follow(user, user));\n \n \n \n \n //le añadimos su rol\n UserAuthority au = new UserAuthority();\n au.setUser(user);\n au.setAuthority(authorityDao.findByName(\"user\"));\n userAuthorityDao.save(au);\n \n \n return \"redirect:/login?register\"; \n }\n }", "@PostMapping(\"/registration\")\n\t public String registration(@ModelAttribute(\"userForm\") User userForm, BindingResult bindingResult,Model model) {if (bindingResult.hasErrors()) {\n\t return \"registration\";\n\t }\n\t userService.save(userForm);\n\t localUsername=userForm.getUsername();\n\t boolean flag=userService.autoLogin(userForm.getUsername(), userForm.getPasswordConfirm());\n\t model.addAttribute(\"expense\", expenseService.getMonthAndYearAndAmount());\n\t model.addAttribute(\"username\",userForm.getUsername());\n\t return \"redirect:/dashboard\";\n\t }", "@RequestMapping(value = \"/addNewUser.html\", method = RequestMethod.GET)\n\tpublic ModelAndView addNewUser() {\n\n\t\treturn new ModelAndView(\"newUser\", \"form\", new FbUser());\n\n\t}", "@RequestMapping(value = \"form\", method = RequestMethod.GET)\n public String form() {\n return \"user_form\";\n }", "@RequestMapping(\"/addUser\")\n public String addUser(){\n return \"added\";\n }", "@GetMapping(\"/addUser\")\n public String home() {\n User user = new User();\n user.setUserName(\"Gitika\");\n user.setPassword(passwordEncoder.encode(\"saurabh321\"));\n user.setActive(true);\n user.setRoles(\"Role_Admin\");\n userRepository.save(user);\n return \"User created successfully\";\n }", "@RequestMapping(value = \"/admin/signup\", method = RequestMethod.GET)\n public String adminSignupPage(Model model)\n {\n\t model.addAttribute(\"adminForm\", new UserDto());\n\t return \"admin/admin-signup\";\n }", "private void registrationView() {\n String login;\n String email;\n String password;\n\n try {\n while (true) {\n printLine();\n print(\"\\tВведите логин\\n\");\n print(\"\\t>>>>> \");\n login = readStringFromConsole();\n\n print(\"\\tВведите email\\n\");\n print(\"\\t>>>>> \");\n try {\n email = valid.emailValidation(readStringFromConsole());\n } catch (NotValidDataException e) {\n printErr(\"\\tнекорректный email\");\n continue;\n }\n\n print(\"\\tВведите пароль\\n\");\n print(\"\\t>>>>> \");\n try {\n password = valid.passwordValidation(readStringFromConsole());\n } catch (NotValidDataException e) {\n printErr(\"\\tнекорректный password\");\n continue;\n }\n break;\n }\n\n try {\n\n serviceAuthorizationService.registration(new UserDto()\n .withUsername(login)\n .withEmail(email)\n .withPassword(password));\n setStatus(REGISTERED);\n printLine();\n print(\"\\tВы успешно зарегистрировались\");\n } catch (AlreadyExistsException e) {\n e.showMessage();\n registrationView();\n }\n } catch (IOException e) {\n registrationView();\n }\n }", "@GetMapping(\"/customers/register\")\n @ResponseStatus(HttpStatus.CREATED)\n public String Add(@ModelAttribute Customer customer, Model model) {\n model.addAttribute(\"customer\", customer);\n\n return \"bank/register\";\n }", "User registration(User user);", "private void userRegister(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString name=request.getParameter(\"name\");\r\n\t\tString loginid=request.getParameter(\"loginid\");\r\n\t\tString pwd=request.getParameter(\"pwd\");\r\n\t\tString email=request.getParameter(\"email\");\r\n\t\tString addr=request.getParameter(\"address\");\r\n\t\tString phno=request.getParameter(\"phno\");\r\n\t\tUser u=new User(name,loginid,pwd,email,addr,phno);\r\n\t\tUserFunctions uf=new UserFunctionsImpl();\r\n\t\tString username=uf.register(u);\r\n\t\tRequestDispatcher dispatcher = request.getRequestDispatcher(\"successregi.jsp\");\r\n\t\trequest.setAttribute(\"name\", username); \r\n dispatcher.forward(request, response);\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n UsuarioControladora control = new UsuarioControladora();\n //Creamos un List para recorrer desde la vista\n List<Usuario> usuarios = control.listarUsuarios();\n //seteamos a un atributo dicha lista\n request.setAttribute(\"users\", usuarios);\n //enviamos a la vista con el Dispatcher\n request.getRequestDispatcher(\"empleadoCreate.jsp\").forward(request, response);\n }", "@Override\r\n protected void doGet(\r\n HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\n EntityManagerFactory emf =\r\n (EntityManagerFactory)getServletContext().getAttribute(\"useremf\");\r\n EntityManager em = emf.createEntityManager();\r\n \r\n try {\r\n // Handle new attributes (if any):\r\n String firstname = request.getParameter(\"firstname\");\r\n String lastname = request.getParameter(\"lastname\");\r\n String email = request.getParameter(\"email\");\r\n String username = request.getParameter(\"username\");\r\n String password = request.getParameter(\"password\");\r\n if (firstname != null && lastname != null && email != null && username != null && password != null ) {\r\n em.getTransaction().begin();\r\n em.persist(new User(firstname,lastname,email,username,password));\r\n em.getTransaction().commit();\r\n }\r\n \r\n // Display the list of users:\r\n List<User> user =\r\n em.createQuery(\"SELECT g FROM User g\", User.class).getResultList();\r\n request.setAttribute(\"users\", user);\r\n request.getRequestDispatcher(\"login/signup.jsp\").forward(request, response);\r\n \r\n } finally {\r\n // Close the PersistenceManager:\r\n if (em.getTransaction().isActive())\r\n em.getTransaction().rollback();\r\n em.close();\r\n }\r\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n request.getRequestDispatcher(\"/WEB-INF/Register.jsp\").forward(request, response);\n //processRequest(request, response);\n\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n String bsn = request.getParameter(\"bsn\");\n String uuid = request.getParameter(\"uuid\");\n if (service.ActivateUser(bsn, uuid)) { \n PrintWriter out = response.getWriter();\n out.println(\"Uw account is succesvol geregistreerd. U kunt nu inloggen op de website van de Rekeningrijder.\");\n }\n else {\n PrintWriter out = response.getWriter();\n out.println(\"Registratie is mislukt. Mogelijk is de link verlopen of is de account al geactiveerd.\");\n }\n } catch (Exception ex) {\n PrintWriter out = response.getWriter();\n out.println(\"Er is een fout opgetreden: \" + ex.toString());\n }\n }", "boolean registerUser(UserRegisterDTO userRegisterDTO);", "@RequestMapping( method = RequestMethod.GET )\n\tpublic String showUserForm( ModelMap model, HttpServletRequest request ) {\n\t\tUsuario usuario = new Usuario();\n\t\tmodel.addAttribute( \"usuario\", usuario );\n\t\treturn \"Formulario\";\n\t}", "@Override\n\tpublic void regist(User user) {\n\t\tdao.addUser(user);\n\t}", "@Override\n\tpublic void registerWithService(UserDao userDao) {\n\t\t\n\t}", "public interface RegisterService {\n\n /**\n * 获取验证码\n * @param para\n * @return\n */\n RegisterResult getPictureCode(RegisterEnter para);\n /**\n * 注册用户\n * @param para\n * @return\n */\n RegisterResult registerUser(RegisterEnter para);\n\n\n /**\n * 个人用户注册设置密码\n * @param para\n * @return\n */\n @Role\n RegisterResult register_person(RegisterEnter para);\n\n /**\n * 插入注册推荐人公司信息\n * @param dept\n */\n void insertReferrerDept(String dept,String mobileNo);\n}", "@GetMapping(value = URL + \"/show/{id}\")\n @ResponseBody\n public Users showById(@PathVariable int id) {\n return usersService.showById(id);\n }", "@RequestMapping(value=\"/register\",method = RequestMethod.GET)\n\n public Student register(Student std) \n {\n return srt.saveAndFlush(std);\n }", "@RequestMapping(value = \"/getUser/{id}\",method = RequestMethod.GET)\n @ApiOperation(value = \"getUser\")\n public String GetUser(@PathVariable int id){\n System.out.println(\"===========\"+id);\n return userService.findAll(id).toString();\n }", "public String toUser() {\r\n\t\treturn \"/user/Welcome.jsf\";\r\n\t}", "@GetMapping\n public List<user> list() {\n return USERRepository.findAll();\n }", "@EventListener(ApplicationReadyEvent.class)\n public void get() {\n User testUser = new User(\"Jan\", getPasswordEncoder().encode(\"123\"), \"ROLE_USER\");\n User testAdmin = new User(\"Olek\", getPasswordEncoder().encode(\"321\"), \"ROLE_ADMIN\");\n userRepository.save(testUser);\n userRepository.save(testAdmin);\n }", "private void register(HttpServletRequest req, HttpServletResponse resp) {\n\t\tString nickname=req.getParameter(\"nickname\");\n\t\tString password=req.getParameter(\"password\");\n\t\tString gender=req.getParameter(\"gender\");\n\t\tdouble salary=Double.parseDouble(req.getParameter(\"salary\"));\n\t\t\n\t\t//可以首先怕段昵称是否已经被使用,如果已经被使用,则不允许注册\n\t\t\t//获取服务对象\n\t\tIEmpService service =new EmpService();\n\t\t\t//调用判断用户名是否存在的方法\n\t\tif(service.findEmpByNickname(nickname)==1) {\n\t\t\t//把提示信息调入请求域中\n\t\t\t\treq.setAttribute(\"RegistFail\", \"用户名已经被注册\");\n\t\t\t//请求转发\n\t\t\ttry {\n\t\t\t\treq.getRequestDispatcher(\"/register\").forward(req, resp);\n\t\t\t} catch (ServletException e) {\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}else {\n\t\t\t//调用注册的方法\n\t\t\ttry{\n\t\t\t\tEmp emp =new Emp(null,nickname,password,gender,salary);\n\t\t\t\tservice.regist(emp);\n\t\t\t\tresp.getWriter().write(\"注册成功, 即将跳转到登录页面\");\n\t\t\t\tresp.setHeader(\"refresh\", \"3;url=/zjj/Login.jsp\");\n\n\t\t\t}catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}\n\t\t\n\t}", "public void registerUser(RegisterForm form) throws DAOException;", "@GetMapping\n public String getPage(Map<String, Object> model) {\n model.put(\"users\", userService.getAll());\n return \"users\";\n }", "@Override\r\n\tprotected void service(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\n\t\t\r\n\t\t\r\n\t\ttry{\r\n\t\t\t \r\n\t\t\t//接受注册数据\r\n\t\t\tString username = request.getParameter(\"username\");\r\n\t\t\tString nickname = request.getParameter(\"nickname\");\r\n\t\t\tString pwd = request.getParameter(\"pwd\");\r\n\t\t\tString confirmPwd = request.getParameter(\"confirmPwd\");\r\n\t\t\t//调用biz\r\n\t\t\tUserBiz userBiz = new UserBizImpl();\r\n\t\t\tuserBiz.regist(username, nickname, pwd, confirmPwd);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\trequest.setAttribute(\"user\", nickname);\r\n\t\t\t//request.getRequestDispatcher(\"/login.jsp\");\r\n\t\t\tresponse.sendRedirect(\"/LoginDemo1/login.jsp\");\r\n\t\t}catch (Exception e){\r\n\t\te.printStackTrace();\r\n\t\t\t//跳转到注册页面\r\n\t\t\trequest.getRequestDispatcher(\"/register.jsp\");\r\n\t\t\r\n\t\t}\r\n\t}", "public Register() {\n \n initComponents();\n \n }", "@GET\n @Path(\"/{register_id}\")\n Response getRegisterById(@PathParam(\"register_id\") Long registerId);", "@RequestMapping(value = \"/userhomepage\", method = RequestMethod.GET)\n public ModelAndView displayUserHomepage() {\n return new ModelAndView(\"userhomepage\");\n }", "private String users(ModelMap model, Integer user_id) {\n\t\tList<Object> users = userservice.fetchUser(user_id);\n\t\tfor (Iterator<Object> iterator1 = users.iterator(); iterator1.hasNext();) {\n\t\t\tUser user = (User) iterator1.next();\n\t\t\tmodel.addAttribute(\"userdetail\", user);\n\t\t\tmodel.addAttribute(\"addresses\", user.getAddress());\n\t\t\tmodel.addAttribute(\"files\", user.getFile());\n\t\t}\n\t\treturn \"register\";\n\t}", "public void Register() {\n Url url = new Url();\n User user = new User(fname.getText().toString(), lname.getText().toString(), username.getText().toString(), password.getText().toString());\n Call<Void> registerUser = url.createInstanceofRetrofit().addNewUser(user);\n registerUser.enqueue(new Callback<Void>() {\n @Override\n public void onResponse(Call<Void> call, Response<Void> response) {\n Toast.makeText(getActivity(), \"User Registered successfully\", Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onFailure(Call<Void> call, Throwable t) {\n Toast.makeText(getActivity(), \"Error\" + t, Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n public ModelAndView getUserInfo(String userName, @PathVariable String email,\n HttpServletRequest req, HttpServletResponse res, ModelMap model) {\n return null;\n }", "@RequestMapping(\"/createnewuser\")\r\n\tpublic ModelAndView userCreated(@ModelAttribute(\"rg\") Register reg) {\r\n\t\t\r\n\t\tBigInteger num = reg.getMb_no();\r\n\t\tSystem.out.println(\"mbno=\"+num.toString());\r\n\t\t//Doing the entry of New User in Spring_Users table\r\n\t\t\r\n\t\tString username = reg.getEmail_id();\r\n\t\tString password = reg.getPassword();\r\n\t\tSpringUsers su = new SpringUsers();\r\n\t\tsu.setUsername(username);\r\n\t\tsu.setPassword(password);\r\n\t\tsu.setEnabled(1);\r\n\t\tSystem.out.println(\"username=\"+username);\r\n\t\tSystem.out.println(\"password=\"+password);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString r = reg.getUser_type();\r\n\t\t\r\n\t\t//if(r.equals(\"ROLE_INDIVIDUAL\"))\r\n\t\t\t//return new ModelAndView(\"individualhomepage\");\r\n\t\t//if(r.equals(\"ROLE_BROKER\"))\r\n\t//\t\treturn new ModelAndView(\"brokerhomepage\");\r\n\t\t//if(r.equals(\"ROLE_BUILDER\"))\r\n\t\t//\treturn new ModelAndView(\"builderhomepage\");\r\n\t\t\r\n\t//\tint i = susvc.entryOfNewUser(su);\r\n\t\t\r\n\t\tint j = regsvc.registerNewUser(reg);\r\n\t\t \r\n\t\treturn new ModelAndView(\"usercreated\");\r\n\r\n\t}", "@GetMapping(\"/{id}\")\n public user get(@PathVariable(\"id\")Long id){\n return USERRepository.getOne(id);\n }", "@GetMapping(\"/{id}\")\n public User get(@PathVariable(\"id\") final int id) {\n return userService.get(id);\n }", "@RequestMapping(value = \"/managerUser\", method = RequestMethod.GET)\n\tpublic String managerUser(Model model) {\n\t\tAuthentication auth = SecurityContextHolder.getContext().getAuthentication();\n\t\tmodel.addAttribute(\"username\", auth.getName());\n\t\tmodel.addAttribute(\"title\", \"WeSpeak | Quản lý tài khoản\");\n\n\t\tList<Users> list = userDAO.listUser();\n\t\tmodel.addAttribute(\"userModel\", list);\n\n\t\treturn \"managerUserPage\";\n\t}", "@PostMapping(\"/register\")\n public ResponseEntity<Map<String, String>> registerUser(@RequestBody User user){ \n userService.registerUser(user);\n return new ResponseEntity<>(generateJWTTToken(user), HttpStatus.OK);\n }", "@Override\r\n\tpublic User1 userRegistration() {\n\t\treturn null;\r\n\t}" ]
[ "0.7096007", "0.699221", "0.68902725", "0.67490715", "0.67323256", "0.66836905", "0.66673225", "0.6587877", "0.6552238", "0.6514673", "0.65043706", "0.64587104", "0.64339375", "0.64332235", "0.64017045", "0.6365839", "0.6317428", "0.6312586", "0.6298264", "0.6294", "0.6269763", "0.6253515", "0.6220814", "0.6215457", "0.61924565", "0.6161632", "0.611037", "0.6093588", "0.6091772", "0.6086648", "0.60824114", "0.6078476", "0.6077729", "0.60766184", "0.6017175", "0.6008718", "0.6005997", "0.5991982", "0.59756243", "0.59686553", "0.5943896", "0.5924516", "0.59211063", "0.59195775", "0.59153783", "0.5907435", "0.59072125", "0.5905205", "0.58979553", "0.58917475", "0.588908", "0.5883792", "0.58775175", "0.58684844", "0.5858649", "0.5848571", "0.5831762", "0.5830606", "0.58215815", "0.5809049", "0.5805639", "0.5787967", "0.57535017", "0.5744073", "0.5730243", "0.5712404", "0.57081985", "0.57038367", "0.57025224", "0.5699673", "0.56952643", "0.5689048", "0.5680588", "0.5676809", "0.56641424", "0.56589687", "0.5658539", "0.5658441", "0.56574607", "0.5655273", "0.56518996", "0.5649481", "0.5649407", "0.56461686", "0.56394327", "0.5638825", "0.5632588", "0.56310946", "0.5626674", "0.5620936", "0.56132656", "0.5605414", "0.56022084", "0.5597486", "0.5594934", "0.55907047", "0.55871207", "0.55775064", "0.5575237", "0.5572876", "0.5565798" ]
0.0
-1
POST Method of Register comes back after the submit of User Details Form.
@RequestMapping(value="/ExternalUsers/EditProfile", method = RequestMethod.POST) public ModelAndView createNewRequest(@ModelAttribute("editProfileFormBean") @Valid EditProfileFormBean editProfileFormBean, BindingResult result, ModelMap model, SessionStatus status, HttpSession sessionID) { ArrayList<String> errorCode = new ArrayList<String>(); if (result.hasErrors()){ System.out.println("comes in form errors of issues"); //model.addAttribute("issueStatus", "Please fill the necessary fields and try again"); model.addAttribute("editProfileFormBean",editProfileFormBean); return new ModelAndView( "/ExternalUsers/EditProfile",model); } Boolean serverValidationError = false; if(editProfileFormBean.getemailId()==""|| !editProfileFormBean.getemailId().matches("^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$")) { errorCode.add("Please check the email. It is not in expected format."); model.addAttribute("editStatus",errorCode); serverValidationError = true; } if(editProfileFormBean.getuserName()==""| !editProfileFormBean.getuserName().matches("^[a-zA-Z0-9 ,.]+$")) { errorCode.add("Please check the email. It is not in expected format."); model.addAttribute("editStatus",errorCode); serverValidationError = true; } // use the Form Elements values from Issue form //Calling add new issue method of issueFormBean if(editProfileFormBean.getfirstName()==""|| !editProfileFormBean.getfirstName().matches("^[a-zA-Z0-9 ,.]+$")) { errorCode.add("Please check the First Name. It is not in expected format."); model.addAttribute("editStatus",errorCode); serverValidationError = true; } if(editProfileFormBean.getlastName()==""|| !editProfileFormBean.getlastName().matches("^[a-zA-Z0-9 ,.]+$")) { errorCode.add("Please check the Last Name. It is not in expected format."); model.addAttribute("editStatus",errorCode); serverValidationError = true; } if(editProfileFormBean.getaddress()==""|| !editProfileFormBean.getaddress().matches("^[a-zA-Z0-9 ,.]+$")) { errorCode.add("Please check the Address. It is not in expected format."); model.addAttribute("editStatus",errorCode); serverValidationError = true; } if(editProfileFormBean.getcontactNum()==""|| !editProfileFormBean.getcontactNum().matches("^[0-9 -]+$")) { errorCode.add("Please check the Contact No. It is not in expected format."); model.addAttribute("editStatus",errorCode); serverValidationError = true; } if(serverValidationError){ return new ModelAndView("/ExternalUsers/EditProfile", model); // return back to register } //getting the userID from session if(serverValidationError!=true) { Integer userId = (Integer) sessionID.getAttribute("userId"); UserDTO userDTO = new UserDTO(); userDTO.setUserId(userId); Boolean updateStatus = editProfileService.editProfile(editProfileFormBean,sessionID); System.out.println("updateStatus is :" + updateStatus); if(updateStatus){ model.addAttribute("updateStatus", "Profile updated successfully"); // model.addAttribute("userName", userRegistrationFormBean.getUserName()); // System.out.println("63 : comes till here"); // //return new ModelAndView(new RedirectView("Welcome")); return new ModelAndView("/ExternalUsers/EditProfile", model); // Login page } else{ model.addAttribute("updateStatus", "There seems to be some connection issues. Please try again"); return new ModelAndView("/ExternalUsers/EditProfile", model); // return back to issues page } } return new ModelAndView("/ExternalUsers/EditProfile", model); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void register_user() {\n\n\t\tHttpRegister post = new HttpRegister();\n\t\tpost.execute(Config.URL + \"/api/newuser\");\n\n\t}", "@RequestMapping(value = \"/reg.htm\",method = RequestMethod.POST)\r\n\tpublic String register(User user,BindingResult result,ModelMap map,HttpSession session,HttpServletResponse response) throws IOException {\r\n\t\t\r\n\t\t\tuserService.addUser(user);\r\n\t\t\treturn \"regSuccess\";\t\r\n\t\t}", "UserRegistrationResponse registrationPost(RegistrationForm registrationForm);", "@PostMapping(\"/registration\")\n\t public String registration(@ModelAttribute(\"userForm\") User userForm, BindingResult bindingResult,Model model) {if (bindingResult.hasErrors()) {\n\t return \"registration\";\n\t }\n\t userService.save(userForm);\n\t localUsername=userForm.getUsername();\n\t boolean flag=userService.autoLogin(userForm.getUsername(), userForm.getPasswordConfirm());\n\t model.addAttribute(\"expense\", expenseService.getMonthAndYearAndAmount());\n\t model.addAttribute(\"username\",userForm.getUsername());\n\t return \"redirect:/dashboard\";\n\t }", "private void registerUser() {\n\n // Get register name\n EditText mRegisterNameField = (EditText) findViewById(R.id.register_name_field);\n String nickname = mRegisterNameField.getText().toString();\n\n // Get register email\n EditText mRegisterEmailField = (EditText) findViewById(R.id.register_email_field);\n String email = mRegisterEmailField.getText().toString();\n\n // Get register password\n EditText mRegisterPasswordField = (EditText) findViewById(R.id.register_password_field);\n String password = mRegisterPasswordField.getText().toString();\n\n AccountCredentials credentials = new AccountCredentials(email, password);\n credentials.setNickname(nickname);\n\n if (DataHolder.getInstance().isAnonymous()) {\n credentials.setOldUsername(DataHolder.getInstance().getUser().getUsername());\n }\n\n sendRegistrationRequest(credentials);\n }", "@RequestMapping(value=\"/register\", method=RequestMethod.POST)\n\tpublic String userRegistration(@ModelAttribute User reqUser, final RedirectAttributes redirectAttributes){\n\t\tUser user = userService.findByName(reqUser.getName());\n if (user != null) {\n redirectAttributes.addFlashAttribute(\"saveUser\", \"exist-name\");\n logger.warn(user.getName() + \" Alredy Exits..! \");\n return \"redirect:/register\";\n }\n user = userService.findByEmail(reqUser.getEmail());\n if (user != null) {\n redirectAttributes.addFlashAttribute(\"saveUser\", \"exist-email\");\n logger.warn(user.getEmail() + \" Alredy Exits..! \");\n return \"redirect:/register\";\n }\n\n reqUser.setPassword(PassEncoding.getInstance().passwordEncoder.encode(reqUser.getPassword()));\n reqUser.setRole(Roles.ROLE_USER.getValue());\n\n if (userService.save(reqUser) != null) {\n redirectAttributes.addFlashAttribute(\"saveUser\", \"success\");\n logger.info(user + \" Save Successfully..\");\n } else {\n \tlogger.warn(user + \" Not Save Successfully..\");\n redirectAttributes.addFlashAttribute(\"saveUser\", \"fail\");\n }\n\n return \"redirect:/register\";\n\t}", "@Override\n protected void onSubmit()\n {\n final ApplicationUser appUser = (ApplicationUser) getModelObject();\n UserRegistration userRegistration = new UserRegistration(appUser.getBusinessUser());\n paramUserId = userRegistration.getUserId();\n //paramDateTime = userRegistration.getRequestTimeAsString();\n //paramToken = userRegistration.getMailToken();\n\n // Note: Dccd does not use a validation Page!\n\n\t\t\t// Construct the url for the activation of member and/or organisation\n\t\t\tMap<String, String> parameterMap = new HashMap<String, String>();\n\t\t\tparameterMap.put(\"userId\", paramUserId);\n\t\t\tparameterMap.put(\"inEditMode\", \"0\"); // activation button is placed on non-edit page!\n\t\t\tparameterMap.put(\"enableModeSwitch\", \"1\");\n\t\t\tfinal String activationUrl = createPageURL(MemberPage.class, parameterMap);\n\t\t\tuserRegistration.setActivationUrl(activationUrl);\n\t\t\tlogger.debug(\"activationUrl: \" + activationUrl);\n\n if (isOrganisationEdit())\n {\n \tlogger.debug(\"new Organisation must now be registered\");\n \tassert(null != newOrganisation);\n \t// Also register the new organisation\n \tlogger.debug(\"New organistation: \" + newOrganisation.getId());\n \tOrganisationRegistration organisationRegistration =\n \t\tnew OrganisationRegistration(newOrganisation);\n\n \tuserRegistration.setOrganisation(newOrganisation);\n \tDccdUserService.getService().handleRegistrationRequest(userRegistration, organisationRegistration);\n\n \tif (!organisationRegistration.isCompleted())\n \t{\n \t\t// something went wrong!\n \tlogger.debug(\"Could not complete organisation registration\");\n for (String stateKey : organisationRegistration.getAccumulatedStateKeys())\n {\n //error(getString(stateKey));\n \t// allow for substitution\n error(getString(stateKey, new Model(organisationRegistration)));\n }\n \t}\n }\n else\n {\n \tuserRegistration.setOrganisation(selectedOrganisation);\n \tuserRegistration = DccdUserService.getService().handleRegistrationRequest(userRegistration);\n }\n\n if (userRegistration.isCompleted())\n {\n disableForm(new String[] {});\n info(getString(\"missionAccomplished\", new Model(appUser)));\n //setResponsePage(new InfoPage(getString(\"registrationpage.header\")));\n // use specific page for the confirmation\n setResponsePage(new RegistrationConfirmPage(appUser));\n }\n else\n {\n \tlogger.debug(\"Could not complete user registration\");\n for (String stateKey : userRegistration.getAccumulatedStateKeys())\n {\n error(getString(stateKey));\n }\n }\n logger.debug(\"End onSubmit: \" + userRegistration.toString());\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString fname = request.getParameter(\"fname\");\n\t\tString lname = request.getParameter(\"lname\");\n\t\tString gender = request.getParameter(\"gender\");\n\t\tString qualification = request.getParameter(\"qualification\");\n\t\tString address= request.getParameter(\"address\");\n\t\tString phoneno = request.getParameter(\"phoneno\");\n\t\tString mailid = request.getParameter(\"mailid\");\n\t\tString username = request.getParameter(\"username\");\n\t\tString password = request.getParameter(\"password\");\n\t\tString hintquestion = request.getParameter(\"hintquestion\");\n\t\tString hintanswer = request.getParameter(\"hintanswer\");\n\t\tString designation = request.getParameter(\"designation\");\n\t\t\n\t\tRegister register = new Register( fname, lname, gender, qualification, address, phoneno, mailid, username, password, hintquestion, hintanswer, designation);\n\t\t//Using Java Beans - An easiest way to play with group of related data\n\t\tregister.setFname(fname);\n\t\tregister.setLname(lname);\n\t\tregister.setGender(gender);\n\t\tregister.setQualification(qualification);\n\t\tregister.setAddress(address);\n\t\tregister.setPhoneno(phoneno);\n\t\tregister.setMailid(mailid);\n\t\tregister.setUsername(username);\n\t\tregister.setPassword(password);\n\t\tregister.setHintquestion(hintquestion);\n\t\tregister.setHintanswer(hintanswer);\n\t\tregister.setDesignation(designation);\n\t\tRegisterDao registerDao = new RegisterDao();\n\t\tString userRegistered = registerDao.registerUser(register);\n\t\t\n\t\tif(userRegistered.equals(\"SUCCESS\")) //On success, you can display a message to user on Home page\n\t\t{\n\t\t\tresponse.sendRedirect(\"./Register.jsp?msg=Successfully saved\");\n\t\t}\n\t\telse //On Failure, display a meaningful message to the User.\n\t\t{\n\t\trequest.setAttribute(\"errMessage\", userRegistered);\n\t\trequest.getRequestDispatcher(\"/Register.jsp\").forward(request, response);\n\t\t}\n\t\t\n\t\t\n\t}", "private void register() {\r\n if (mName.getText().length() == 0) {\r\n mName.setError(\"please fill this field\");\r\n return;\r\n }\r\n if (mEmail.getText().length() == 0) {\r\n mEmail.setError(\"please fill this field\");\r\n return;\r\n }\r\n if (mPassword.getText().length() == 0) {\r\n mPassword.setError(\"please fill this field\");\r\n return;\r\n }\r\n if (mPassword.getText().length() < 6) {\r\n mPassword.setError(\"password must have at least 6 characters\");\r\n return;\r\n }\r\n\r\n\r\n final String email = mEmail.getText().toString();\r\n final String password = mPassword.getText().toString();\r\n final String name = mName.getText().toString();\r\n\r\n FirebaseAuth.getInstance().createUserWithEmailAndPassword(email, password).addOnCompleteListener(getActivity(), new OnCompleteListener<AuthResult>() {\r\n @Override\r\n public void onComplete(@NonNull Task<AuthResult> task) {\r\n if (!task.isSuccessful()) {\r\n Snackbar.make(view.findViewById(R.id.layout), \"sign up error\", Snackbar.LENGTH_SHORT).show();\r\n } else {\r\n String uid = FirebaseAuth.getInstance().getCurrentUser().getUid();\r\n\r\n //Saves the user's info in the database\r\n Map<String, Object> mNewUserMap = new HashMap<>();\r\n mNewUserMap.put(\"email\", email);\r\n mNewUserMap.put(\"name\", name);\r\n\r\n FirebaseDatabase.getInstance().getReference().child(\"users\").child(uid).updateChildren(mNewUserMap);\r\n }\r\n }\r\n });\r\n\r\n }", "private void registration() {\n\t\tif (ur_name.getText().length() > 0 && email.getText().length() > 0\r\n\t\t\t\t&& pass.getText().length() > 0\r\n\t\t\t\t&& re_pass.getText().length() > 0) {\r\n\t\t\tif (pass.getText().toString()\r\n\t\t\t\t\t.equalsIgnoreCase(re_pass.getText().toString())) {\r\n\t\t\t\tString postEntity = \"user_name=\" + ur_name.getText().toString()\r\n\t\t\t\t\t\t+ \"&email=\" + email.getText().toString() + \"&password=\"\r\n\t\t\t\t\t\t+ pass.getText().toString() + \"&gcm_id=\"\r\n\t\t\t\t\t\t+ GlobalDeclares.getGcmId();\r\n\t\t\t\tnew ServerUtilities(getApplicationContext(),\r\n\t\t\t\t\t\tGlobalDeclares.NEW_REGISTRATION, postEntity, delegate);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\t\"Password does not match!\", Toast.LENGTH_LONG).show();\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\"You need to fill all the fields!\", Toast.LENGTH_LONG)\r\n\t\t\t\t\t.show();\r\n\t\t}\r\n\r\n\t}", "public void Register() {\n Url url = new Url();\n User user = new User(fname.getText().toString(), lname.getText().toString(), username.getText().toString(), password.getText().toString());\n Call<Void> registerUser = url.createInstanceofRetrofit().addNewUser(user);\n registerUser.enqueue(new Callback<Void>() {\n @Override\n public void onResponse(Call<Void> call, Response<Void> response) {\n Toast.makeText(getActivity(), \"User Registered successfully\", Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onFailure(Call<Void> call, Throwable t) {\n Toast.makeText(getActivity(), \"Error\" + t, Toast.LENGTH_SHORT).show();\n }\n });\n }", "private void userRegister(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString name=request.getParameter(\"name\");\r\n\t\tString loginid=request.getParameter(\"loginid\");\r\n\t\tString pwd=request.getParameter(\"pwd\");\r\n\t\tString email=request.getParameter(\"email\");\r\n\t\tString addr=request.getParameter(\"address\");\r\n\t\tString phno=request.getParameter(\"phno\");\r\n\t\tUser u=new User(name,loginid,pwd,email,addr,phno);\r\n\t\tUserFunctions uf=new UserFunctionsImpl();\r\n\t\tString username=uf.register(u);\r\n\t\tRequestDispatcher dispatcher = request.getRequestDispatcher(\"successregi.jsp\");\r\n\t\trequest.setAttribute(\"name\", username); \r\n dispatcher.forward(request, response);\r\n\t}", "@PostMapping(\"/process_register\")\n public String processRegistration(User user,Model model)\n throws SignatureException, NoSuchAlgorithmException, InvalidKeyException{\n\n //checking if user exists\n if(userService.existByLogin(user.getLogin())) {\n model.addAttribute(\"error\", true);\n return \"registerForm\";\n }\n\n model.addAttribute(\"user\", user);\n //saving user\n /* userRepository.save(user);*/\n userService.saveUser(user, Sha512.generateSalt().toString());\n return \"registerSuccessful\";\n }", "private void registerUser()\n {\n /*AuthService.createAccount takes a Consumer<Boolean> where the result will be true if the user successfully logged in, or false otherwise*/\n authService.createAccount(entryService.extractText(namedFields), result -> {\n if (result.isEmpty()) {\n startActivity(new Intent(this, DashboardActivity.class));\n } else {\n makeToast(result);\n formContainer.setAlpha(1f);\n progressContainer.setVisibility(View.GONE);\n progressContainer.setOnClickListener(null);\n }\n });\n }", "void register() {\n if (registerView.getFirstName().length() == 0 || registerView.getLastName().length() == 0 || registerView.getUsername().length() == 0 || registerView.getPassword().length() == 0) {\n IDialog invalidRegistrationDialog\n = dialogFactory.createDialog(DialogFactoryOptions.dialogNames.MESSAGE, new HashMap<String, Object>() {\n {\n put(\"message\", \"Unable to register: Fields must be non-empty!\");\n put(\"title\", \"Authentication Error\");\n put(\"messageType\", DialogFactoryOptions.dialogType.ERROR);\n }\n });\n\n invalidRegistrationDialog.run();\n } else {\n if (userController.registerUser(registerView.getFirstName(), registerView.getLastName(), registerView.getUsername(), registerView.getPassword()) != null) {\n mainFrame.setPanel(panelFactory.createPanel(PanelFactoryOptions.panelNames.MAIN_MENU));\n } else {\n IDialog invalidRegistrationDialog = dialogFactory.createDialog(DialogFactoryOptions.dialogNames.MESSAGE, new HashMap<String, Object>() {\n {\n put(\"message\", \"Unable to register: Username is already taken\");\n put(\"title\", \"Authentication Error\");\n put(\"messageType\", DialogFactoryOptions.dialogType.ERROR);\n }\n });\n\n invalidRegistrationDialog.run();\n }\n }\n }", "public void registerUser(RegisterForm form) throws DAOException;", "public ManResponseBean registerUser(UserRegisterForm bean) throws Exception {\n String url = \"/services/RegisterUser\";\n /*\n * UserId SecurePassword SecurePin PinPayment PinAmount PinMenu PinPG\n * PinPGRate Name LeadId EmailNotify etc ReturnUrl TermsAgree Email\n * Language\n */\n NameValuePair[] params = {\n new NameValuePair(\"UserId\", bean.getUserId()),\n new NameValuePair(\"SecurePassword\", bean.getSecurePassword()),\n new NameValuePair(\"SecurePin\", bean.getSecurePin()),\n new NameValuePair(\"PinPayment\", bean.getPinPayment()),\n new NameValuePair(\"PinAmount\", bean.getPinAmount()),\n new NameValuePair(\"PinMenu\", bean.getPinMenu()),\n new NameValuePair(\"PinPG\", bean.getPinPG()),\n new NameValuePair(\"PinPGRate\", bean.getPinPGRate()),\n new NameValuePair(\"FirstName\", bean.getFirstName()),\n new NameValuePair(\"LastName\", bean.getLastName()),\n new NameValuePair(\"Name\", bean.getFirstName() + \" \"\n + bean.getLastName()),\n new NameValuePair(\"LeadId\", bean.getLeadId()),\n new NameValuePair(\"EmailNotify\", bean.getEmailNotify()),\n new NameValuePair(\"etc\", bean.getEtc()),\n new NameValuePair(\"ReturnUrl\", bean.getReturnUrl()),\n new NameValuePair(\"TermsAgree\", bean.getTermsAgree()),\n new NameValuePair(\"Question\", bean.getQuestion()),\n new NameValuePair(\"Answer\", bean.getAnswer()),\n new NameValuePair(\"Language\", bean.getLanguage()),\n new NameValuePair(\"Email\", bean.getEmail()) };\n ManResponseBean response = handlePOSTRequest(url, params, null);\n return response;\n }", "@RequestMapping(value=\"/submission\",method = RequestMethod.POST)\r\n\tpublic String processRegistration(@ModelAttribute(\"userForm\") User user,Model model) {\r\n\t\tmodel.addAttribute(\"userForm\", uservalue);\r\n\t\tSystem.out.println(\"username: \" + user.getUsername());\r\n\t\tSystem.out.println(\"email: \" + user.getEmail());\r\n\r\n\t\treturn \"RegistrationSuccess\";\r\n\t}", "@POST\n @Path(\"/users/register\")\n public Response register(\n @Context HttpServletRequest request \n ,@Context HttpServletResponse response\n ,@Context ServletContext servletContext\n ,String raw\n ){\n try{\n log.debug(\"/register called\");\n// String raw=IOUtils.toString(request.getInputStream());\n mjson.Json x=mjson.Json.read(raw);\n \n Database2 db=Database2.get();\n for (mjson.Json user:x.asJsonList()){\n String username=user.at(\"username\").asString();\n \n if (db.getUsers().containsKey(username))\n db.getUsers().remove(username); // remove so we can overwrite the user details\n \n Map<String, String> userInfo=new HashMap<String, String>();\n for(Entry<String, Object> e:user.asMap().entrySet())\n userInfo.put(e.getKey(), (String)e.getValue());\n \n userInfo.put(\"level\", LevelsUtil.get().getBaseLevel().getRight());\n userInfo.put(\"levelChanged\", new SimpleDateFormat(\"yyyy-MM-dd\").format(new Date()));// nextLevel.getRight());\n \n db.getUsers().put(username, userInfo);\n log.debug(\"New User Registered (via API): \"+Json.newObjectMapper(true).writeValueAsString(userInfo));\n db.getScoreCards().put(username, new HashMap<String, Integer>());\n \n db.addEvent(\"New User Registered (via API)\", username, \"\");\n }\n \n db.save();\n return Response.status(200).entity(\"{\\\"status\\\":\\\"DONE\\\"}\").build();\n }catch(IOException e){\n e.printStackTrace();\n return Response.status(500).entity(\"{\\\"status\\\":\\\"ERROR\\\",\\\"message\\\":\\\"\"+e.getMessage()+\"\\\"}\").build(); \n }\n \n }", "private void doRegister(){\n Map<String, String> mParams = new HashMap<>();\n mParams.put(\"account\", etPhone.getText().toString());\n mParams.put(\"password\", etPwd.getText().toString());\n mParams.put(\"code\", etValid.getText().toString());\n\n x.http().post(HttpUtils.getRequestParams(\"/teacher/v1/register\", mParams),\n\n new Callback.CommonCallback<String>() {\n @Override\n public void onSuccess(String result) {\n\n CustomProgress.hideDialog();\n LogUtil.d(\"\"+result);\n Response response = CommonUtil.checkResponse(result);\n if (response.isStatus()) {\n SharedPreferences shareAutoLogin = MyApplication.getInstance().getShareAutoLogin();\n SharedPreferences.Editor editor = shareAutoLogin.edit();\n editor.putBoolean(MyApplication.getInstance().AUTOLOGIN, true);\n editor.commit();\n MyApplication.getInstance().setShareApp(etPhone.getText().toString(), etPwd.getText().toString());\n User user = User.getUserFromJsonObj(response.getData().optJSONObject(\"data\"));\n User.setCurrentUser(user);\n MobclickAgent.onProfileSignIn(user.getNickName());\n\n // 登录环信\n if (!StringUtils.isEmpty(user.hxId) && !StringUtils.isEmpty(user.hxPwd))\n AppUtils.loginEmmobAndSaveInfo(user);\n\n // 极光推送设置别名\n JPushInterface.setAlias(RegisterActivity.this, user.getId() + \"\", new TagAliasCallback() {\n @Override\n public void gotResult(int i, String s, Set<String> set) {\n if (i == 0) {\n LogUtil.i(\"极光推送别名设置成功,别名:\" + s);\n }\n }\n });\n\n socketLogin(user.getToken());\n\n Intent intent = new Intent(RegisterActivity.this, CodeActivity.class);\n startActivity(intent);\n finish();\n } else {\n Toast.makeText(x.app(), response.getData().optString(\"message\"), Toast.LENGTH_SHORT).show();\n\n }\n }\n\n @Override\n public void onError(Throwable ex, boolean isOnCallback) {\n\n CustomProgress.hideDialog();\n\n if (ex instanceof HttpException) { // 网络错误\n HttpException httpEx = (HttpException) ex;\n int responseCode = httpEx.getCode();\n String responseMsg = httpEx.getMessage();\n String errorResult = httpEx.getResult();\n LogUtil.d(responseCode + \":\" + responseMsg);\n Toast.makeText(x.app(), x.app().getResources().getString(R.string.net_error), Toast.LENGTH_SHORT).show();\n } else { // 其他错误\n // ...\n }\n //Toast.makeText(x.app(), ex.getMessage(), Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onCancelled(CancelledException cex) {\n Toast.makeText(x.app(), \"cancelled\", Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onFinished() {\n\n }\n });\n\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n String username = request.getParameter(\"username\");\n String password1 = request.getParameter(\"password1\");\n String password2 = request.getParameter(\"password2\");\n String firstname = request.getParameter(\"firstname\");\n String lastname = request.getParameter(\"lastname\");\n \n try {\n if(manager.existingUser(username) != null){\n request.setAttribute(\"message\", \"Username esistente!\");\n RequestDispatcher rd = request.getRequestDispatcher(\"signup_page.jsp\");\n rd.forward(request, response);\n }else if(manager.badPassword(password1, password2)){\n request.setAttribute(\"message\", \"Password errata!\");\n RequestDispatcher rd = request.getRequestDispatcher(\"signup_page.jsp\");\n rd.forward(request, response);\n }else{\n User user;\n manager.register(firstname, lastname, username, password2);\n user = manager.authenticate(username, password2);\n HttpSession session = request.getSession(true);\n session.setAttribute(\"user\", user);\n response.sendRedirect(request.getContextPath()+\"/index.jsp\");\n }\n } catch (SQLException ex) {\n Logger.getLogger(SignupServlet.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "@PostMapping(\"/register\")\n public String register(@Valid UserForm userForm, BindingResult result){\n if(!userForm.confirmPassword()){\n result.rejectValue(\"confirmPassword\",\"confirmError\",\"两次密码不一致\");\n// boo = false;\n }\n if(result.hasErrors()){\n return \"register\"; // 如果使用@Valid注解,就表示已经将userForm和result放到了model中,直接可以在前端获取信息\n }\n// if(result.hasErrors()){\n// List<FieldError> fieldErrors = result.getFieldErrors();\n// for(FieldError error : fieldErrors){\n// System.out.println(error.getField() + \" : \" + error.getDefaultMessage() + \" : \" + error.getCode());\n// }\n// boo = false;\n// }\n// if(!boo){\n// return \"register\";\n// }\n User user = userForm.convertToUser();\n userRepository.save(user);\n return \"redirect:/login\";\n }", "@RequestMapping(value = \"register\", method = RequestMethod.POST)\n public String register(@ModelAttribute @Valid RegisterForm registerForm, Errors errors, HttpServletRequest request, Model model) {\n\n if (errors.hasErrors()) {\n model.addAttribute(\"title\", \"Register to RandNums\");\n model.addAttribute(\"sessionActive\", isSessionActive(request.getSession()));\n return \"login/register\";\n }\n\n User existingUser = userDao.findByUsername(registerForm.getUsername());\n\n if (existingUser != null) {\n errors.rejectValue(\"username\", \"username.alreadyexists\", \"A user with that username already exists\");\n model.addAttribute(\"title\", \"Register\");\n model.addAttribute(\"sessionActive\", isSessionActive(request.getSession()));\n return \"login/register\";\n }\n\n User newUser = new User(registerForm.getUsername(), registerForm.getEmail(), registerForm.getPassword());\n\n userDao.save(newUser);\n setUserInSession(request.getSession(), newUser);\n\n return \"redirect:/home\";\n }", "@Override\n public boolean userRegister(User user) \n { \n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"INSERT INTO users (firstname,lastname,username,password,city,number) \"\n + \"values ('\"+ user.getFirstname()+\"',\" \n + \"'\" + user.getLastname() + \"',\" \n + \"'\" + user.getUsername() + \"',\" \n + \"'\" + user.getPassword() + \"',\" \n + \"'\" + user.getCity() + \"',\"\n + \"'\" + user.getNumber() + \"')\";\n int result = stmt.executeUpdate(sql);\n \n stmt.close();\n conn.close();\n if(result == 1) return true;\n else return false;\n } \n catch (SQLException ex) { ex.printStackTrace(); return false;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return false;} \n }", "@PostMapping(\"/registration\")\n public String registration(@ModelAttribute(\"userForm\") User userForm, BindingResult bindingResult) {\n \n \tuserValidator.validate(userForm, bindingResult); // Validates the user registration form inputs and binds the errors.\n\n if (bindingResult.hasErrors()) {\n return \"registration\";\n }\n\n userService.save(userForm);\n\n return \"redirect:/welcome\";\n }", "public void processRegistration() {\n try {\n System.out.println(\"Processing Registration\");\n FacesContext c = FacesContext.getCurrentInstance();\n c.getApplication().getNavigationHandler().handleNavigation(c, null, \"register.xhtml\");\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n }\n }", "private void submitForm() {\n Toast.makeText(this, \"Registering...\", Toast.LENGTH_LONG).show();\n }", "public String submit()\r\n\t{\n\t\tUserDetailsInterface userImpl = new UserDetailsImpl();\r\n\t\t\r\n\t\tint result = 0;\r\n\t\ttry{\r\n\t\t//Pass all value through registerbean class to userImpl Interface and call saveUser() method\r\n\t\t\tresult = userImpl.saveAccountadminUser(emailid.toLowerCase().trim(), password, firstname, lastname, shortname,hashkey,organizationname);\r\n\t\t\r\n\t\t\t//boolean valid = LoginDAO.validate(user, pwd);\r\n\t\t\tif (result == 1) {\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(\r\n\t\t\t\t\t\tnull,\r\n\t\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_WARN,\r\n\t\t\t\t\t\t\t\t\"Admin Role created successfully\",\r\n\t\t\t\t\t\t\t\t\"\"));\r\n\t\t\t\treturn \"login\";\r\n\t\t\t}\r\n\t\t\tif (result == 2) {\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(\r\n\t\t\t\t\t\tnull,\r\n\t\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_WARN,\r\n\t\t\t\t\t\t\t\t\"User Inactive\",\r\n\t\t\t\t\t\t\t\t\"User already created, please activate the user credentials before login the sytem\"));\r\n\t\t\t\treturn \"accountadminregister\";\r\n\t\t\t}\r\n\t\t\tif (result == 4) {\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(\r\n\t\t\t\t\t\tnull,\r\n\t\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_WARN,\r\n\t\t\t\t\t\t\t\t\"Internal Error\",\r\n\t\t\t\t\t\t\t\t\"Please check the server logs\"));\r\n\t\t\t\treturn \"accountadminregister\";\r\n\t\t\t}\r\n\t\t\tif (result == 6) {\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(\r\n\t\t\t\t\t\tnull,\r\n\t\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_WARN,\r\n\t\t\t\t\t\t\t\t\"User Exit\",\r\n\t\t\t\t\t\t\t\t\"User already created, please login with your credentials\"));\r\n\t\t\t\treturn \"accountadminregister\";\r\n\t\t\t}\r\n\t\t\tif (result == 7) {\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_WARN,\r\n\t\t\t\t\t\t\"Please do not use public domain\", \"Please use own company domain\"));\r\n\t\t\t\treturn \"accountadminregister\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t\tFacesContext.getCurrentInstance().addMessage(\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_WARN,\r\n\t\t\t\t\t\t\t\"Internal Error\",\r\n\t\t\t\t\t\t\t\"Please check the server logs\"));\r\n\t\t\treturn \"accountadminregister\";\r\n\t\t}\r\n\t\r\n\t\treturn \"sendemailbutton\";\r\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tMap<String, String[]> parameterMap =\n\t\t\t\treq.getParameterMap();\n\n\t\tUser u = new User();\n\t\ttry {\n\t\t\t//可以直接把map中的内容设置到对象上\n\t\t\tBeanUtils.populate(u,parameterMap);\n\n\t\t} catch (IllegalAccessException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvocationTargetException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n int insertUser = userDao.insertUser(u);\n if (insertUser==1){\n resp.getWriter().write(\"SUCCESS\");\n resp.setStatus(302);\n resp.sendRedirect(\"http://localhost:8080/TextRegister.html\");\n }else{\n RequestDispatcher dispatcher = req.getRequestDispatcher(\"/insert\");\n dispatcher.include(req,resp);\n }\n\n\n\t}", "@POST\n @Path(\"register\")\n @Produces(MediaType.APPLICATION_JSON)\n public JAXResult register(UserBE user){\n return null;\n }", "public void RegisterUser() {\n try {\n reg = new Registration();\n reg.setFirstName(FName);\n reg.setLastName(LName);\n reg.setCompanyName(CompanyName);\n reg.setEmail(Email);\n reg.setMobile(mobile);\n ValidateRegistration validator = new ValidateRegistration();\n boolean legitmail = validator.validateEmail(reg);\n if ( legitmail == false ) {\n System.out.println(\"Not a legitimate Email\");\n FacesContext c = FacesContext.getCurrentInstance();\n FacesMessage m = new FacesMessage(\"Invalid Email\", \"The email provided is not correct\");\n c.addMessage(null, m);\n } else {\n FacesContext c = FacesContext.getCurrentInstance();\n c.getApplication().getNavigationHandler().handleNavigation(c, null, \"mainpage.xhtml\");\n }\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n }\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n System.out.println(\"mskjhfkjds\");\r\n String userId, fname, lname, pword, email, dob, fpq , fpa, m ,gender,cpword;\r\n userId=request.getParameter(\"uname\");\r\n fname=request.getParameter(\"fname\");\r\n lname=request.getParameter(\"lname\");\r\n pword=request.getParameter(\"pswd\");\r\n cpword=request.getParameter(\"cpswd\");\r\n email=request.getParameter(\"email\");\r\n dob=request.getParameter(\"bdate\");\r\n fpq=request.getParameter(\"sq\");\r\n fpa=request.getParameter(\"ans\");\r\n gender=\"M\";\r\n m=request.getParameter(\"mob_no\");\r\n User user=new User();\r\n try {\r\n if(!user.username_available(userId))\r\n {\r\n System.out.println(\"dfgdf\");\r\n response.sendRedirect(\"UserExist.jsp\");\r\n return;\r\n }\r\n else{\r\n if(cpword.compareTo(pword)!=0)\r\n {\r\n System.out.println(\"YOu are \");\r\n response.sendRedirect(\"Failed.jsp\");\r\n }\r\n else\r\n {\r\n pword=user.encrypt(pword,\"VIGENERECIPHER\");\r\n user.signup_nomobile(userId,fname, lname, pword, email, gender, dob, fpq , fpa);\r\n System.out.println(\"Method to chala11\");\r\n\r\n if(m!=null)\r\n user.setM(m);\r\n System.out.println(\"Method to chala\");\r\n response.sendRedirect(\"index.jsp\");\r\n System.out.println(\"Jadoo\");\r\n return;\r\n } \r\n }\r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(RegisterServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n }", "@RequestMapping(value = \"Register\", method = RequestMethod.POST)\n\tpublic ModelAndView register(@Valid @ModelAttribute(\"userMaster\") UserMaster userMaster, BindingResult result,\n\t\t\tModelMap model) {\n\t\tString viewName = \"home\";\n\t\tuserValidator.validate(userMaster, result);\n\t\tif (result.hasErrors()) {\n\t\t\tviewName = \"register\";\n\t\t\treturn new ModelAndView(viewName);\n\t\t}\n\t\tString id = userMasterService.save(userMaster);\n\t\tif (id.equalsIgnoreCase(\"username exits\") || id.equalsIgnoreCase(\"email exits\")) {\n\t\t\tmodel.addAttribute(\"error\", id);\n\t\t\tlogger.info(\"Cannot save because \" + id);\n\t\t\treturn new ModelAndView(\"register\");\n\t\t} else {\n\t\t\tviewName = \"login\";\n\t\t\tmodel.addAttribute(\"loginForm\", new LoginForm());\n\t\t\tmodel.addAttribute(\"error\", \"Successfully registered.<br>Please Login.\");\n\t\t\tlogger.info(\"New User:id = \" + id);\n\t\t\treturn new ModelAndView(viewName);\n\t\t}\n\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\trequest.setCharacterEncoding(\"utf-8\");\n\t\tString pnumber = request.getParameter(\"pnumber\");\n\t\tString username = request.getParameter(\"username\");\n\t\tString nickname = request.getParameter(\"nickname\");\n\t\tString password = request.getParameter(\"password\");\n\t\tString age = request.getParameter(\"age\");\n\t\t// 0-male 1-female\n\t\tString sex = request.getParameter(\"sex\");\n\n\t\tUser user = new User(0,pnumber,password,username,Integer.parseInt(sex),Integer.parseInt(age),nickname,0,0);\n\t\t\n\t\tif (new UserImpl().addUser(user))\n\t\t\trequest.setAttribute(\"hint\", \"注册成功!\");\n\t\telse\n\t\t\trequest.setAttribute(\"hint\", \"注册失败!该手机号已被注册\");\n\n\t\trequest.getRequestDispatcher(\"hint.jsp\").forward(request, response);\n\t}", "public void register(View view) {\n if(radioGroup.getCheckedRadioButtonId() == -1){\n Snackbar.make(getCurrentFocus(),\"Please select one of the Options: Student or Professor\",Snackbar.LENGTH_LONG).show();\n return;\n }\n if (usn.getText().toString().trim().equals(\"\")){\n usn.setError(\"This field cannot be empty\");\n return;\n } else if (password.getText().toString().trim().equals(\"\")){\n password.setError(\"This field cannot be empty\");\n return;\n } else if(password.getText().toString().trim().length() < 8){\n password.setError(\"Password too short.\");\n return;\n } else if(confirmPassword.getText().toString().trim().equals(\"\")){\n confirmPassword.setError(\"This field cannot be empty\");\n return;\n } else if(!(password.getText().toString().trim()\n .equals(confirmPassword.getText().toString().trim()))){\n password.setError(\"Passwords do not match\");\n confirmPassword.setError(\"Passwords do not match\");\n return;\n }\n progressBar.setVisibility(View.VISIBLE);\n mAuth.signInAnonymously().addOnSuccessListener(authResult -> myRef.child(usn.getText().toString().trim()).addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n try {\n String username = dataSnapshot.child(\"emailId\").getValue().toString();\n String password = confirmPassword.getText().toString().trim();\n System.out.println(username);\n mAuth.createUserWithEmailAndPassword(username,password)\n .addOnCompleteListener(RegisterActivity.this,task -> {\n Log.d(\"TAG\",\"Created User:\"+task.isSuccessful());\n if(!task.isSuccessful()){\n Toast.makeText(RegisterActivity.this, \"Error occurred.\" +\n \" Could not create user. Please \" +\n \"check your internet connection\", Toast.LENGTH_LONG).show();\n return;\n }\n else {\n startActivity(new Intent(RegisterActivity.this,LoginActivity.class));\n finish();\n }\n });\n\n }catch (NullPointerException e){\n usn.setError(\"Invalid USN. Please check your input or contact\" +\n \" your department for help\");\n progressBar.setVisibility(View.INVISIBLE);\n }\n }\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n }))\n .addOnFailureListener(e -> {\n progressBar.setVisibility(View.INVISIBLE);\n Snackbar.make(view,\"Something went wrong.Please check if you have an internet connection or that the details\" +\n \"entered are valid\",Snackbar.LENGTH_LONG).show();\n });\n }", "public void handleRegister() {\n\t\tmainApp.showRegistrationPage();\n\t}", "@RequestMapping(value = \"/registreren\", method = RequestMethod.POST)\n\tpublic String register(HttpServletRequest req, @ModelAttribute(\"form\") RegisterForm form,\n Errors errors, HttpSession session) {\n synchronized(AccountController.class) { // hopefully registrations don't occur too much\n User user = userSessionService.getCurrentUser(session);\n if (user == null || user.isAnonymous()) {\n validator.validate(form, errors);\n if (!errors.hasErrors()) {\n try {\n user = new User();\n form.applyTo(user);\n userRepo.store(user);\n userSessionService.login(session, user);\n int userId = user.getId();\n\t\t\t\t\t\t\n String userName = \"anonymous\";\n userName = Integer.toString(userId);\n\t\t\t\t\t\tString userIP = ipUtil.getClientIp(req);\n\t\t\t\t\t\tString action = \"register\";\n\t\t\t\t\t\tString userAgent = req.getHeader(\"user-agent\");\n\t\t\t\t\t\tString referer = req.getHeader(\"Referer\");\n\t\t\t\t\t\tif (referer == null){\n\t\t\t\t\t\t\treferer = \"register\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tLog4jPrefix.initialise(userName, userIP, action, userAgent, referer);\n log.info(String.format(\"Registered %s!\", user.getShortDescription()));\n } catch(Exception e) {\n // this exception may have been caused by duplicate user\n // so we'll simply validate again. If validation fails\n // we'll return this page, otherwise we'll rethrow,\n // resulting in the error page\n validator.validate(form, errors);\n if (!errors.hasErrors()) {\n if (e instanceof RuntimeException) {\n throw (RuntimeException) e;\n }\n throw new RuntimeException(e);\n }\n // show form again\n return \"register\";\n }\n } else {\n // show form again\n return \"register\";\n }\n }\n }\n return \"redirect:/\";\n\t}", "@RequestMapping(value={\"/register\"}, method = RequestMethod.POST)\n public String registeraccount(@Valid User user,\n \t\tBindingResult result,\n \t\tModel model,\n \t\tHttpServletRequest request) {\n\n \t//titulo de la ventana\n \tmodel.addAttribute(\"title\", messages.getMessage(\"text.register.tittle\", null, LocaleContextHolder.getLocale()));\n \t\n \t//si hay un error al validar\n if (result.hasErrors()) {\n\t return \"aplication/register\";\n\t \n //si la cuenta ya existe\n } else if (userDao.findByUserName(user.getUsername()) != null){\n\t model.addAttribute(\"error\", messages.getMessage(\"text.register.error.accountexists\", null, LocaleContextHolder.getLocale()));\n\t return \"aplication/register\";\n \n //si el correo ya existe\n } else if (userDao.findEmail(user.getEmail()) != null) {\n model.addAttribute(\"error\", messages.getMessage(\"text.register.error.emailexists\", null, LocaleContextHolder.getLocale()));\n return \"aplication/register\";\n \n //si el correo no es valido\n } else if (!esEmailCorrecto(user.getEmail())) {\n model.addAttribute(\"error\", messages.getMessage(\"text.register.error.emailinvalid\", null, LocaleContextHolder.getLocale()));\n return \"aplication/register\";\n \n //si tiene mas de x caracteres la contraseña\n } else if (user.getPassword().length() > User.passwordmax) {\n \tmodel.addAttribute(\"error\", messages.getMessage(\"text.register.error.passwordmaxone\", null, LocaleContextHolder.getLocale()) + \" \" + User.passwordmax + \" \" + messages.getMessage(\"text.register.error.passwordmaxtwo\", null, LocaleContextHolder.getLocale()));\n \treturn \"aplication/register\";\n \t\n //si todo es valido\n }else {\n \t\n \t//codificamos la contraseña\n PasswordEncoder encode = paswordncoder();\n user.setPassword(encode.encode(user.getPassword()));\n \n //configuramos la cuenta\n user.setEnabled(false);\n user.setNotLocker(true);\n user.setSystenBan(false);\n \n try {\n //enviamos el correo de activar cuenta\n eventPublisher.publishEvent(new OnRegistrationCompleteEvent(user, \n \t\tLocaleContextHolder.getLocale(), request.getContextPath()));\n } catch (Exception e) {\n user.setEnabled(true);\n }\n \n userDao.save(user);\n \n \n \n //hacemos que se siga a si mismo\n followDao.save(new Follow(user, user));\n \n \n \n \n //le añadimos su rol\n UserAuthority au = new UserAuthority();\n au.setUser(user);\n au.setAuthority(authorityDao.findByName(\"user\"));\n userAuthorityDao.save(au);\n \n \n return \"redirect:/login?register\"; \n }\n }", "public void onRegisterPressed(View v) {\n String username = ((EditText) findViewById(R.id.usernameNew)).getText().toString();\n String password = ((EditText) findViewById(R.id.passwordNew)).getText().toString();\n String checkPassword = ((EditText) findViewById(R.id.passwordNew2)).getText().toString();\n Register register = new Register(username, password, checkPassword);\n TextView passwordCheck = findViewById(R.id.passwordCheck);\n TextView errorUsername = findViewById(R.id.errorUsername);\n\n if(!register.assertPassword()) {\n passwordCheck.setVisibility(View.VISIBLE);\n } else {\n passwordCheck.setVisibility(View.GONE);\n }\n if (!register.assertUsername()) {\n errorUsername.setVisibility(View.VISIBLE);\n } else {\n errorUsername.setVisibility(View.GONE);\n }\n if(register.assertUsername() && register.assertPassword()) {\n User user = new User(username, password, (UserTypes)userTypeSpinner.getSelectedItem());\n\n Toast.makeText(this, \"Account Added\", Toast.LENGTH_SHORT).show();\n\n Persistence.getInstance().write(User.SAVE_FILE, getApplicationContext(), user);\n\n Intent mainIntent = new Intent(this, MainActivity.class);\n mainIntent.putExtra(\"EXTRA_USER_TYPE\", user.getAccountType());\n startActivity(mainIntent);\n\n finish();\n }\n }", "@RequestMapping(value = \"/newUserRegistration\", method = RequestMethod.POST)\r\npublic ModelAndView newUserRegistration(ModelAndView model,\r\n\t\t@RequestParam(\"userid\") String userid,\r\n\t\t@RequestParam(\"password\") String password,\r\n\t\t@RequestParam(\"repassword\") String repassword,\r\n\t\t@RequestParam(\"firstname\") String firstname,\r\n\t\t@RequestParam(\"lastname\") String lastname,\r\n\t\t@RequestParam(\"address\") String address,\r\n\t\t@RequestParam(\"city\") String city,\r\n\t\t@RequestParam(\"state\") String state,\r\n\t\t@RequestParam(\"pin\") String pin,\r\n\t\t@RequestParam(\"phone\") String phone,\r\n\t\t@RequestParam(\"email\") String email,\r\n\t\t@RequestParam(\"paypalaccount\") String paypalaccount) {\t\t\r\n\t//the values get inserted into the user table if the password and repassword matches\r\n\t if(password.equals(repassword)) {\r\n\t\t User user = new User();\r\n\t\t user.setUserId(userid);\r\n\t\t user.setFirstName(firstname);\r\n\t\t user.setLastName(lastname);\r\n\t\t user.setPassword(password);\r\n\t\t user.setAddress(address);\r\n\t\t user.setCity(city);\r\n\t\t user.setState(state);\r\n\t\t user.setPin(pin);\r\n\t\t user.setPhone(phone);\r\n\t\t user.setEmail(email);\r\n\t\t user.setPaypalAccount(paypalaccount);\r\n\t userService.newUserRegistration(user);\r\n\t model.setViewName(\"registrationSuccess\");\r\n return model;\r\n\t }\r\n\t else\r\n\t {\r\n\t \t //if password and repassword are not matched then it will redirect to registrationFailure page \r\n\t \t model.setViewName(\"registrationFailure\");\r\n\t return model;\r\n\t }\r\n}", "private void registerUser(HttpServletRequest request, HttpServletResponse response){\n String firstName = request.getParameter(\"firstName\");\n String lastName = request.getParameter(\"lastName\");\n String address = request.getParameter(\"address\");\n String email = request.getParameter(\"email\");\n String shipAddress = request.getParameter(\"shipAddress\");\n int role = Integer.parseInt(request.getParameter(\"role\"));\n User user = new User(firstName,lastName,address,email,shipAddress,role);\n userServices.addUser(user);\n try {\n request.getRequestDispatcher(\"/home\").forward(request,response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@RequestMapping(\"register.action\")\n\tpublic ModelAndView register(String username,String password){\n\t\tboolean result=ud.insert(username,password);\n\t\t\n\t\tModelAndView mv=new ModelAndView();\n\t\tmv.addObject(\"message\", username);\n\t\tmv.addObject(\"str1\", \"success\");\n\t\tmv.setViewName(\"sign-up3\");\n\t\t\n\t\treturn mv;\n\t}", "@Override\n public void performRegister(final String name, final String email, final String gender, final String password){\n\n mAuth.createUserWithEmailAndPassword(email.toLowerCase(),password)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n User user = new User();\n user.setName(name);\n user.setEmail(email.toLowerCase());\n user.setGender(gender);\n user.setPassword(password);\n FirebaseDatabase.getInstance().getReference(\"Users\")\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .setValue(user).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast.makeText(context, \"Authentication Success.\",\n Toast.LENGTH_LONG).show();\n view.redirectToLogin();\n } else {\n Toast.makeText(context, \"Authentication Failed.\",\n Toast.LENGTH_LONG).show();\n }\n }\n });\n } else {\n Log.w(TAG, \"createUserWithEmail:failure\", task.getException());\n Toast.makeText(context, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n }", "private void Register()\n {\n Intent registerIntent = new Intent (LoginActivity.this, RegisterActivity.class);\n startActivity(registerIntent);\n finish();\n }", "public String registration() {\n if (name != null) {\n int createdUsers = DBUtils.addUser(name, password, email);\n if (createdUsers > 0) {\n try {\n HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();\n request.login(name, password);\n initUser();\n request.getSession().setAttribute(\"current_user\", this);\n } catch (ServletException e) {\n FacesContext context = FacesContext.getCurrentInstance();\n FacesMessage message = new FacesMessage(\"Wrong login or password\");\n message.setSeverity(FacesMessage.SEVERITY_ERROR);\n context.addMessage(\"login\", message);\n }\n return \"/index?faces-redirect=true\";\n }\n }\n return \"/pages/register.xhtml?faces-redirect=true\";\n }", "@PostMapping(\"/signup\")\n public ResponseEntity<?> registerUser(@RequestBody RegistrationRequest registrationRequest){\n return userService.registerUser(registrationRequest);\n }", "public String createRegisterForm(Register reg)\n {\n DBConnect db = new DBConnect();\n Connection con;\n \n try\n {\n con = (Connection) db.establishConnection();\n String q = \"insert into registerUser (register_name, register_email, register_phone, register_pass)\"\n + \"values (?, ?, ?, ?)\";\n \n PreparedStatement prepareState = con.prepareStatement(q);\n \n prepareState.setString(1, reg.getRegisterName());\n prepareState.setString(2, reg.getRegisterEmail());\n prepareState.setString(3, reg.getRegisterPhone());\n prepareState.setString(4, reg.getRegisterPassword());\n \n prepareState.execute();\n con.close();\n \n return \"Successfully Registered..!!\";\n }\n \n catch(Exception ex)\n {\n System.err.println(\"Exception..!!\");\n System.err.println(\"Message: \" + ex.getMessage());\n \n return \"Data Not Registered..!!\";\n }\n \n }", "private void register() {\n RegisterModel registerModel = new RegisterModel(edtEmail.getText().toString(),\n edtPaswd.getText().toString(),\n edtDisplayName.getText().toString());\n\n Response.Listener<RegisterApiResponse> responseListener = new Response.Listener<RegisterApiResponse>() {\n @Override\n public void onResponse(RegisterApiResponse response) {\n if (response.isSuccess()) login();\n }\n };\n\n Response.ErrorListener errorListener = new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.cancel();\n if (error != null) {\n String errorMsg = \"An error occurred\";\n String err = (error.getMessage() == null) ? errorMsg : error.getMessage();\n Log.d(TAG, err);\n error.printStackTrace();\n\n if (err.matches(AppConstants.CONNECTION_ERROR) || err.matches(AppConstants.TIMEOUT_ERROR)) {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(RegisterActivity.this);\n alertDialog.setTitle(getString(R.string.error_title_signup));\n alertDialog.setMessage(getString(R.string.error_message_network)).setCancelable(false)\n .setPositiveButton(getString(R.string.dialog_ok), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n alertDialog.show();\n } else if (err.matches(\".*Duplicate entry .* for key 'name_UNIQUE'.*\")) {\n edtDisplayName.setError(\"username taken\");\n edtDisplayName.requestFocus();\n } else if (err.matches(\".*The email has already been taken.*\")) {\n edtEmail.setError(\"email taken\");\n edtEmail.requestFocus();\n } else {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(RegisterActivity.this);\n alertDialog.setTitle(getString(R.string.error_title_signup));\n alertDialog.setMessage(getString(R.string.error_message_network)).setCancelable(false)\n .setPositiveButton(getString(R.string.dialog_ok), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n alertDialog.show();\n }\n }\n }\n };\n\n\n progressDialog.setMessage(getString(R.string.progress_dialog_message_login));\n RegistrationRequests registerRequest =\n RegistrationRequests.register(this, registerModel, responseListener, errorListener);\n VolleyRequest.getInstance(this.getApplicationContext()).addToRequestQueue(registerRequest);\n progressDialog.show();\n }", "void saveRegisterInformation(UserDTO userDTO);", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n registerNewMember(request, response);\n }", "@RequestMapping(\"/newuser\")\r\n\tpublic ModelAndView newUser() {\t\t\r\n\t\tRegister reg = new Register();\r\n\t\treg.setUser_type(\"ROLE_INDIVIDUAL\");\r\n\t\treg.setEmail_id(\"abc@xyz.com\");\r\n\t\treg.setFirst_name(\"First Name\");\r\n\t\treg.setCity(\"pune\");\r\n\t\treg.setMb_no(new BigInteger(\"9876543210\"));\r\n\t\treturn new ModelAndView(\"register\", \"rg\", reg);\r\n\t}", "protected void doPost(HttpServletRequest req, HttpServletResponse res) \n\t\tthrows ServletException, IOException {\n\t\t// we'll eventually use a SQL insert statement here\n\t\t// the info that we're posting/inserting to the database comes from PARAMETERS\n\t\t\n\t\tString firstname = req.getParameter(\"firstName\"); // make sure this matched the \"name\" value in your HTML!\n\t\tString lastname = req.getParameter(\"lastName\");\n\t\tString email = req.getParameter(\"email\");\n\t\tString password = req.getParameter(\"password\");\n\t\t\n\t\t// the we create an insert statement Statement statement = conn.createStatement()\n\t\ttry {\n\t\t\tStatement statement = conn.createStatement();\n\t\t\tint result = statement.executeUpdate(\"INSERT INTO bank_user VALUES ('\"+firstname+\"', '\"+lastname+\"', '\"+email+\"', '\"+password+\"')\"); // executeUpdate returns an INTEGER of how many rows were affected \n\t\t\t// an insert statement affects 1 row, but an update or delete statment can affect more...\t\n\n\t\t\t\n\t\t\tPrintWriter out = res.getWriter();\n\t\t\t\n\t\t\tif (result > 0) {\n\t\t\t\tout.println(\"<h1>User Created!</h1>\");\n\t\t\t} else {\n\t\t\t\tout.println(\"<h1>Error creating user...</h1>\");\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void register(HttpServletRequest req, HttpServletResponse resp) {\n\t\tString nickname=req.getParameter(\"nickname\");\n\t\tString password=req.getParameter(\"password\");\n\t\tString gender=req.getParameter(\"gender\");\n\t\tdouble salary=Double.parseDouble(req.getParameter(\"salary\"));\n\t\t\n\t\t//可以首先怕段昵称是否已经被使用,如果已经被使用,则不允许注册\n\t\t\t//获取服务对象\n\t\tIEmpService service =new EmpService();\n\t\t\t//调用判断用户名是否存在的方法\n\t\tif(service.findEmpByNickname(nickname)==1) {\n\t\t\t//把提示信息调入请求域中\n\t\t\t\treq.setAttribute(\"RegistFail\", \"用户名已经被注册\");\n\t\t\t//请求转发\n\t\t\ttry {\n\t\t\t\treq.getRequestDispatcher(\"/register\").forward(req, resp);\n\t\t\t} catch (ServletException e) {\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}else {\n\t\t\t//调用注册的方法\n\t\t\ttry{\n\t\t\t\tEmp emp =new Emp(null,nickname,password,gender,salary);\n\t\t\t\tservice.regist(emp);\n\t\t\t\tresp.getWriter().write(\"注册成功, 即将跳转到登录页面\");\n\t\t\t\tresp.setHeader(\"refresh\", \"3;url=/zjj/Login.jsp\");\n\n\t\t\t}catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}\n\t\t\n\t}", "private void userRegister(String n, String e, String phn, String addr, String user, String pass) {\n Connection dbcon = DBConnection.connectDB();\n if(dbcon != null){\n try {\n PreparedStatement st = (PreparedStatement) \n dbcon.prepareStatement(\"INSERT INTO registration (name,email,phone,address,username,password) VALUES(?,?,?,?,?,?)\");\n \n \n \n st.setString(1, n);\n st.setString(2, e);\n st.setString(3, phn);\n st.setString(4, addr);\n st.setString(5, user);\n st.setString(6, pass);\n \n \n int rs = st.executeUpdate();\n \n JOptionPane.showMessageDialog(this, \"Registration Successful.\", \n \"Success\", JOptionPane.INFORMATION_MESSAGE);\n \n name.setText(\"\");\n email.setText(\"\");\n phone.setText(\"\");\n address.setText(\"\");\n username.setText(\"\");\n password.setText(\"\");\n \n\n \n } catch (SQLException ex) {\n Logger.getLogger(Login.class.getName()).log(Level.SEVERE, null, ex);\n }\n }else{\n System.out.println(\"The connection is not available\");\n }\n }", "private void signUpEvt() {\n String emailRegex = \"(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\\\"(?:[\\\\x01-\\\\x08\\\\x0b\\\\x0c\\\\x0e-\\\\x1f\\\\x21\\\\x23-\\\\x5b\\\\x5d-\\\\x7f]|\\\\\\\\[\\\\x01-\\\\x09\\\\x0b\\\\x0c\\\\x0e-\\\\x7f])*\\\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\\\x01-\\\\x08\\\\x0b\\\\x0c\\\\x0e-\\\\x1f\\\\x21-\\\\x5a\\\\x53-\\\\x7f]|\\\\\\\\[\\\\x01-\\\\x09\\\\x0b\\\\x0c\\\\x0e-\\\\x7f])+)\\\\])\";\n // Get User Details\n String fullname = this.view.getWelcomePanel().getSignUpPanel().getFullnameText().getText().trim();\n String email = this.view.getWelcomePanel().getSignUpPanel().getEmailText().getText().trim();\n String password = new String(this.view.getWelcomePanel().getSignUpPanel().getPasswordText().getPassword()).trim();\n\n if (!fullname.equals(\"\") && !email.equals(\"\") && !password.equals(\"\")) {\n if (email.matches(emailRegex)) {\n if (model.getSudokuDB().registerUser(fullname, email, password)) {\n view.getWelcomePanel().getCardLayoutManager().next(view.getWelcomePanel().getSlider());\n // Clear Fields\n view.getWelcomePanel().getSignUpPanel().clear();\n Object[] options = {\"OK\"};\n JOptionPane.showOptionDialog(this, \"Your registration was successful!\\n You can now sign in to your account.\", \"Successful Registration\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n } else {\n Object[] options = {\"Let me try again\"};\n JOptionPane.showOptionDialog(this, \"Your registration was unsuccessful!\\nBe sure not to create a duplicate account.\", \"Unsuccessful Registration\", JOptionPane.OK_OPTION, JOptionPane.ERROR_MESSAGE, null, options, null);\n }\n } else {\n // Email doesn't meet requirement\n Object[] options = {\"I will correct that\"};\n JOptionPane.showOptionDialog(this, \"You must provide a valid email address.\", \"Invalid Email Address\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n } else {\n // Empty Fields\n Object[] options = {\"Alright\"};\n JOptionPane.showOptionDialog(this, \"In order to register, all fields must be filled out.\", \"Empty Fields\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n }", "@PostMapping(\"/register\")\n public ResponseEntity<Map<String, String>> registerUser(@RequestBody User user){ \n userService.registerUser(user);\n return new ResponseEntity<>(generateJWTTToken(user), HttpStatus.OK);\n }", "public void registerUser(View view) {\n if(!validateName() | !validatePassword() | !validatePhoneNo() | !validateEmail()){\n return;\n }\n String phoneNo = regPhoneNo.getEditText().getText().toString();\n String name = regName.getEditText().getText().toString();\n String email = regEmail.getEditText().getText().toString();\n String password = regPassword.getEditText().getText().toString();\n\n //Call the next activity and pass phone no with it\n Intent intent = new Intent(getApplicationContext(), otpVerify.class);\n intent.putExtra(\"phoneNo\", phoneNo);\n intent.putExtra(\"password\", password);\n intent.putExtra(\"email\", email);\n intent.putExtra(\"name\", name);\n startActivity(intent);\n }", "public void registerUser(View view) {\n this.closeKeyboard();\n this.validator.validate();\n if (this.validator.hasNoErrors()) {\n User user = createUser();\n RealmUser registeredUser = registerUserDetails(user);\n //TODO register on server.\n if (registeredUser != null) {\n new MockUserRegistrationService().registerUser(user.getFirstName(), user.getLastName(), user.getEmail(), user.getInsuranceProvider(), user.getInsurancePlan());\n doOnRegistrationSuccess();\n }\n }\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n String userId = request.getParameter(\"userId\");\n String name = request.getParameter(\"name\");\n String email = request.getParameter(\"email\");\n String phoneno = request.getParameter(\"phoneno\");\n String feedback = request.getParameter(\"feedback\");\n \n FeedbackBean feedbackBean = new FeedbackBean();\n //Using Java Beans - An easiest way to play with group of related data\n feedbackBean.setUserId(userId);\n feedbackBean.setName(name);\n feedbackBean.setEmail(email);\n feedbackBean.setFeedback(feedback);\n \n FeedbackDao feedbackDao = new FeedbackDao();\n \n //The core Logic of the Registration application is present here. We are going to insert user data in to the database.\n String userRegistered = feedbackDao.registerUser(feedbackBean);\n \n if(userRegistered.equals(\"SUCCESS\")) //On success, you can display a message to user on Home page\n {\n request.getRequestDispatcher(\"/Success.jsp\").forward(request, response);\n }\n else //On Failure, display a meaningful message to the User.\n {\n request.setAttribute(\"errMessage\", userRegistered);\n request.getRequestDispatcher(\"/Feedback.jsp\").forward(request, response);\n }\n }", "@Test(priority=1, dataProvider=\"User Details\")\n\t\tpublic void registration(String firstname,String lastname,String emailAddress,\n\t\t\t\tString telephoneNum,String address1,String cityName,String postcodeNum,\n\t\t\t\tString country,String zone,String pwd,String confirm_pwd) throws Exception{\n\t\t\t\n\t\t\thomePage = new HomePage(driver);\n//'**********************************************************\t\t\t\n//Calling method to click on 'Create Account' link\n\t\t\tregistraionPageOC = homePage.clickCreateAccount();\n//'**********************************************************\t\t\t\n//Calling method to fill user details in Registration page and verify account is created\n\t\t\tregistraionPageOC.inputDetails(firstname,lastname,emailAddress,telephoneNum,address1,cityName,postcodeNum,country,zone,pwd,confirm_pwd);\n\t\t\ttry{\n\t\t\tAssert.assertEquals(\"Your Account Has Been Created!\", driver.getTitle(),\"Titles Not Matched: New Account Not Created\");\n\t\t\textentTest.log(LogStatus.PASS, \"Registration: New User Account is created\");\n\t\t\t}catch(Exception e){\n\t\t\t\textentTest.log(LogStatus.FAIL, \"Registration is not successful\");\n\t\t\t}\n\t\t}", "@Override\n @RequestMapping(\"/register\")\n public ConfirmationMessage register(@RequestParam(value = \"username\", defaultValue = \"\") String username,\n @RequestParam(value = \"password1\", defaultValue = \"\") String password1,\n @RequestParam(value = \"password2\", defaultValue = \"\") String password2,\n @RequestParam(value = \"email\", defaultValue = \"\") String email,\n @RequestParam(value = \"city\", defaultValue = \"\") String city) {\n return userLogic.register(username, password1, password2, email, city);\n }", "public void register()\n {\n String n = nameProperty.getValue();\n if (n == null || n.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String p = passwordProperty.getValue();\n if (p == null || p.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String e = emailProperty.getValue();\n if (e == null || e.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String ph = phoneProperty.getValue();\n if (ph == null || ph.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n if (ph.length() != 8)\n {\n throw new IllegalArgumentException(\"Invalid phone number\");\n }\n try\n {\n Integer.parseInt(ph);\n }\n catch (NumberFormatException ex)\n {\n throw new IllegalArgumentException(\"Invalid phone number\", ex);\n }\n String t = titleProperty.getValue();\n if (t == null || t.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String a = authorProperty.getValue();\n if (a == null || a.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String y = yearProperty.getValue();\n if (y == null || y.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n if (y.length() != 4)\n {\n throw new IllegalArgumentException(\"Invalid year\");\n }\n try\n {\n Integer.parseInt(y);\n }\n catch (NumberFormatException ex)\n {\n throw new IllegalArgumentException(\"Invalid year\", ex);\n }\n\n try\n {\n\n model.registerUser(n, p, e, ph, t, a, y);\n\n }\n catch (Exception e1)\n {\n\n e1.printStackTrace();\n }\n\n }", "@PostMapping(\"/register\")\n\tpublic String processRegistration(@ModelAttribute (name=\"vendor_details\") Vendor v,BindingResult res , RedirectAttributes flashMap)\n\t{\n\t\tSystem.out.println(\"inside registration method\");\n\t\tSystem.out.println(\"in process reg form : vendor details \" + v);\n\t\tSystem.out.println(\"in process reg form : payment details \" + v.getDetails());\n\t\tSystem.out.println(\"binding result \" + res );\n\t\tflashMap.addFlashAttribute(\"message\", vendorService.registerVendor(v));\n\t\t//after inserting the details : redirect client to vendor list\n\t\treturn \"redirect:/admin/list\";\n\t}", "@PostMapping(\"/register\")\n public String saveUser(@ModelAttribute User user){\n return \"redirect:login\";\n }", "private void registerNewMember(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n response.setContentType(\"text/html;charset=UTF-8\");\n RequestDispatcher dispatcher = null;\n MemberRegistrationTO memberRegistrationTO = new MemberRegistrationTO();\n HttpSession errorMessage = request.getSession(true);\n try {\n if (request.getParameter(\"firstname\").equals(\"\") || request.getParameter(\"lastname\").equals(\"\")\n || request.getParameter(\"gender\").equals(\"\") || request.getParameter(\"dateofbirth\").equals(\"\")\n || request.getParameter(\"emailaddress\").equals(\"\") || request.getParameter(\"contact\").equals(\"\")\n || request.getParameter(\"password\").equals(\"\")) {\n throw new NullPointerException(PropertyUtil.getCMSMessages(\"227\"));\n }\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n dateFormat.setLenient(false);\n memberRegistrationTO.setFirstname(request.getParameter(\"firstname\"));\n memberRegistrationTO.setLastname(request.getParameter(\"lastname\"));\n memberRegistrationTO.setGender(request.getParameter(\"gender\"));\n String date = request.getParameter(\"dateofbirth\");\n dateFormat.format(new Date(date));\n memberRegistrationTO.setDateofbirth(date);\n memberRegistrationTO.setEmailaddress(request.getParameter(\"emailaddress\"));\n memberRegistrationTO.setContactnumber(request.getParameter(\"contact\"));\n memberRegistrationTO.setPassword(request.getParameter(\"password\"));\n if (new MemberRegistrationFacade().registerMember(memberRegistrationTO)) {\n HttpSession memberRegistrationTOSession = request.getSession(true);\n memberRegistrationTOSession.setAttribute(\"memberRegistrationTO\", memberRegistrationTO);\n\n dispatcher = request.getRequestDispatcher(\"successful.jsp\");\n }\n } catch (IllegalArgumentException e) {\n errorMessage.setAttribute(\"errorMessage\", PropertyUtil.getCMSMessages(\"205\"));\n dispatcher = request.getRequestDispatcher(\"MemberRegistration.jsp\");\n LOGGER.info(\"Happened at class\" + this.getClass().getName()+\" at \"+Calendar.getInstance().getTime()+\" -\" + e.getMessage());\n } catch (CMSBusinessException e) {\n errorMessage.setAttribute(\"errorMessage\", e.getMessage());\n dispatcher = request.getRequestDispatcher(\"MemberRegistration.jsp\");\n LOGGER.info(\"Happened at class\" + this.getClass().getName()+\" at \"+Calendar.getInstance().getTime()+\" -\" + e.getMessage());\n\n } catch (DatabaseException e) {\n errorMessage.setAttribute(\"errorMessage\", e.getMessage());\n dispatcher = request.getRequestDispatcher(\"MemberRegistration.jsp\");\n LOGGER.info(\"Happened at class\" + this.getClass().getName()+\" at \"+Calendar.getInstance().getTime()+\" -\" + e.getMessage());\n } catch (NullPointerException e) {\n errorMessage.setAttribute(\"errorMessage\", e.getMessage());\n dispatcher = request.getRequestDispatcher(\"MemberRegistration.jsp\");\n LOGGER.info(\"Happened at class\" + this.getClass().getName()+\" at \"+Calendar.getInstance().getTime()+\" -\" + e.getMessage());\n } finally {\n dispatcher.forward(request, response);\n }\n\n }", "@POST\n\t @Consumes(MediaType.MULTIPART_FORM_DATA)\n\t @Produces(MediaType.APPLICATION_JSON)\n\t @Path(\"/Register\")\n\t public Response Register(@FormDataParam(\"Email\") String Email,\n\t\t\t @FormDataParam(\"FirstName\") String FirstName,\n\t\t\t @FormDataParam(\"LastName\") String LastName,\n\t\t\t @FormDataParam(\"Password\") String Password,\n\t\t\t @FormDataParam(\"Phone\") String Phone,\n\t\t\t @FormDataParam(\"Street\") String Street,\n\t\t\t @FormDataParam(\"City\") String City,\n\t\t\t @FormDataParam(\"State\") String State,\n\t\t\t @FormDataParam(\"PostalCode\") String PostalCode){\n\t\t int statusCode=400;\n\t\t int rs=-1;\n\t\t int emailFound=0;\n\t\t String result;\n\t\t DBConnection databaseInstance= new DBConnection();\n\t\t HashMap<String,String> memberData = new HashMap<String,String>();\n\t\t JSONObject jsonObject= new JSONObject();\t\n\t\t \n\t\t if(Email.equals(\"\")||FirstName.equals(\"\")||LastName.equals(\"\")||Password.equals(\"\")||Phone.equals(\"\")||Street.equals(\"\")||City.equals(\"\")||State.equals(\"\")||PostalCode.equals(\"\")) \n\t\t\t return listBook.makeCORS(Response.status(statusCode), \"\");\n\t\t memberData.put(\"Email\", Email);\n\t\t emailFound=retrieveMember(memberData).length(); \n\t\t \n\t\t memberData.put(\"FirstName\", FirstName);\t\t \n\t\t memberData.put(\"LastName\", LastName);\t\t \n\t\t memberData.put(\"Password\",Password);\t\t \n\t\t memberData.put(\"Phone\", Phone);\t\t \n\t\t memberData.put(\"Street\", Street);\t\t\t \n\t\t memberData.put(\"City\", City);\n\t\t memberData.put(\"PostalCode\", PostalCode);\n\t\t \n\t\t if(emailFound==0){\n\t\t rs= databaseInstance.tableInsertion(memberData, \"members\"); \n\t\t }\t\t \n\t\t try {\n\t\t\t \tif(rs==-1){\n\t\t\t\t\tstatusCode=401;\n\t\t\t\t\tjsonObject.put(\"msg\", \"Email is already in use\");\n\t\t\t\t}\n\t\t\t\tif(rs>0){\n\t\t\t\t\tstatusCode=200;\n\t\t\t\t\tjsonObject.put(\"msg\", \"Register succesful \" + rs);\n\t\t\t\t}\n\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t result =\"\"+ jsonObject;\n\t\t \n\t\t\n\t\treturn listBook.makeCORS(Response.status(statusCode), result);\t\t\t \t\t \n\t }", "@PostMapping(value = \"/users\")\n\tpublic <T> ResponseEntity<?> registerProcess(@RequestBody User user) {\t\n\t\tLoginResponse registerResponse = new LoginResponse();\n\t\ttry {\n\n\t\t\tuser.setUserId(userDelegate.fetchUserId(user.getEmail()));\n\t\t\tregisterResponse = userDelegate.register(user);\n\t\t\treturn responseUtil.successResponse(registerResponse);\n\t\t\t\n\t\t} catch(ApplicationException e){\t\n\t\treturn responseUtil.errorResponse(e);\n\t}\n\t\t\n\t}", "public String register() {\r\n\t\tif (password.equals(passwordConfirm)) {\r\n\t\t\tUser newUser = new User(username, password);\r\n\t\t\t\r\n\t\t\tif (dataManager.addUser(newUser)) {\r\n\t\t\t\tFacesMessage message = new FacesMessage(\"User has been registered successfully.\");\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, message);\r\n\t\t\t\tlogger.info(\"New user has been registered.\");\r\n\t\t\t\treturn \"login.xhtml\";\r\n\t\t\t\t\r\n\t\t\t}\t\t\t\r\n\t\t\tFacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, \"\", \"A user with the same username already exists.\");\r\n\t\t\tFacesContext.getCurrentInstance().addMessage(\"registration_form:username\", message);\t\t\t\r\n\t\t}\r\n\t\telse {\r\n\t\t\tFacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, \"\", \"Password confirmation is incorrect.\");\r\n\t\t\tFacesContext.getCurrentInstance().addMessage(\"registration_form:password_confirm\", message);\t\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@PostMapping(path = \"/register\")\n public @ResponseBody\n String registerUser( @RequestBody TaiKhoan user) {\n // Admin admin = mAdminDao.findByToken(token);\n //if (admin != null) {\n TaiKhoan taiKhoan = mTaiKhoanDao.save(new TaiKhoan(user.getTentk(), user.getMatkhau(), user.getGmail(), user.getSdt(),user.getCmt(),user.getTypeuser(),user.getAnh()));\n if (taiKhoan != null) return AC_REGISTER_SUCESS;\n else return AC_REGISTER_NO_SUCESS;\n //} else return AC_REGISTER_NO_SUCESS;\n }", "private void registerUser() {\n displayLoader();\n JSONObject request = new JSONObject();\n try {\n request.put(\"firstname\",firstName);\n request.put(\"lastname\",lastName);\n if (isTutor) {\n request.put(\"tutor\", 1);\n } else {\n request.put(\"tutor\", 0);\n }\n request.put(\"username\", username);\n request.put(\"email\", email);\n request.put(\"password\", password);\n request.put(\"School\",university);\n request.put(\"Department\",major);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n JsonObjectRequest jsArrayRequest = new JsonObjectRequest\n (Request.Method.POST, register_url, request, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n pDialog.dismiss();\n try {\n System.out.println();\n //Check if user got registered successfully\n if (response.getInt(KEY_STATUS) == 0) {\n //Set the user session\n //session.loginUser(username,fullName);\n Toast.makeText(getApplicationContext(),\n \"Registration Successful\", Toast.LENGTH_SHORT).show();\n\n Log.i(TAG, \"onResponse: \"+response.toString());\n navigateToNextPage();\n\n }else {\n\n Log.i(TAG, \"onResponse: \"+request.toString());\n// String message= request.getString(\"message\");\n Toast.makeText(getApplicationContext(),\n \"Registration Successful\", Toast.LENGTH_SHORT).show();\n\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n pDialog.dismiss();\n\n Log.i(TAG, \"onErrorResponse: \"+error.getMessage());\n //Display error message whenever an error occurs\n Toast.makeText(getApplicationContext(),\n \"Unable to register. Please try after some time\", Toast.LENGTH_SHORT).show();\n\n }\n });\n\n // Access the RequestQueue through your singleton class.\n MySingleton.getInstance(this).addToRequestQueue(jsArrayRequest);\n }", "boolean registerUser(UserRegisterDTO userRegisterDTO);", "@RequestMapping(\"/createnewuser\")\r\n\tpublic ModelAndView userCreated(@ModelAttribute(\"rg\") Register reg) {\r\n\t\t\r\n\t\tBigInteger num = reg.getMb_no();\r\n\t\tSystem.out.println(\"mbno=\"+num.toString());\r\n\t\t//Doing the entry of New User in Spring_Users table\r\n\t\t\r\n\t\tString username = reg.getEmail_id();\r\n\t\tString password = reg.getPassword();\r\n\t\tSpringUsers su = new SpringUsers();\r\n\t\tsu.setUsername(username);\r\n\t\tsu.setPassword(password);\r\n\t\tsu.setEnabled(1);\r\n\t\tSystem.out.println(\"username=\"+username);\r\n\t\tSystem.out.println(\"password=\"+password);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString r = reg.getUser_type();\r\n\t\t\r\n\t\t//if(r.equals(\"ROLE_INDIVIDUAL\"))\r\n\t\t\t//return new ModelAndView(\"individualhomepage\");\r\n\t\t//if(r.equals(\"ROLE_BROKER\"))\r\n\t//\t\treturn new ModelAndView(\"brokerhomepage\");\r\n\t\t//if(r.equals(\"ROLE_BUILDER\"))\r\n\t\t//\treturn new ModelAndView(\"builderhomepage\");\r\n\t\t\r\n\t//\tint i = susvc.entryOfNewUser(su);\r\n\t\t\r\n\t\tint j = regsvc.registerNewUser(reg);\r\n\t\t \r\n\t\treturn new ModelAndView(\"usercreated\");\r\n\r\n\t}", "@RequestMapping(value = \"/signup\", method = RequestMethod.POST)\n\tpublic String signUpSubmit(@ModelAttribute(\"userForm\") @Valid UserDto userForm, BindingResult bindingResult,\n\t\t\t\t\t\t\t HttpServletRequest request, Model model)\n\t{\n\t\tif (userService.findUserByUsername(userForm.getUsername()) != null)\n\t\t\tbindingResult.rejectValue(\"username\", \"message.usernameDuplicate\");\n\n\t\t/* Check if passwords match */\n\t\tif (!userForm.getPassword().equals(userForm.getPasswordConfirm()))\n\t\t\tbindingResult.rejectValue(\"passwordConfirm\", \"message.passwordConfirmNotMatch\");\n\n\t\t/* Retry Registration if there are any errors */\n\t\tif (bindingResult.hasErrors()) {\n\t\t\tmodel.addAttribute(\"userForm\", userForm);\n\t\t\treturn \"user/signup\";\n\t\t}\n\n\t\t/* Register new user */\n\t\tArrayList<Role> roles = new ArrayList<Role>();\n\t\troles.add(userService.findRoleByName(\"ROLE_USER\"));\n\t\tUser newUser = userService.saveNewUser(userForm, roles);\n\n\t\t/* Publish Event and send confirmation e-mail */\n\t\ttry {\n\t\t\teventPublisher.publishEvent(new OnRegistrationCompleteEvent(newUser, request.getLocale(), userService.getAppUrl(request)));\n\t\t} catch (Exception me) {\n\t\t\tmodel.addAttribute(\"userForm\", userForm);\n\t\t\tmodel.addAttribute(\"errorMessage\", me);\n\t\t\tme.printStackTrace();\n\t\t\treturn \"user/signup\";\n\t\t}\n\n\t\t/* Redirect to success page */\n\t\treturn \"redirect:/signup-confirm\";\n\t}", "private void attemptRegister() {\n\n // Reinicia los errores de los EditText\n mEditEmail.setError(null);\n mEditFirstName.setError(null);\n mEditLastName.setError(null);\n mEditPassword.setError(null);\n mEditPasswordConfirm.setError(null);\n\n // Obtiene los valores ingresados por el usuario\n String email = Utils.checkEditTextForEmpty(getContext(),mEditEmail);\n String firstName = Utils.checkEditTextForEmpty(getContext(),mEditFirstName);\n String lastName = Utils.checkEditTextForEmpty(getContext(),mEditLastName);\n String password = Utils.checkEditTextForEmpty(getContext(),mEditPassword);\n String passwordConfirm = Utils.checkEditTextForEmpty(getContext(),mEditPasswordConfirm);\n\n //Revisa si hay valor vacío\n if (email == null || firstName == null || lastName == null || password == null || passwordConfirm == null) {\n return;\n }\n\n // Valida el correo\n if (!email.contains(\"@\")) {\n mEditEmail.setError(getString(R.string.error_invalid_email));\n mEditEmail.requestFocus();\n return;\n }\n\n // Valida la contraseña\n if (password.length() < 3) {\n mEditPassword.setError(getString(R.string.error_invalid_password));\n mEditPassword.requestFocus();\n return;\n }\n\n //Valida que las contraseñas hagan match\n if (!password.equals(passwordConfirm)) {\n mEditPasswordConfirm.setError(getString(R.string.error_invalid_password_confirmation));\n mEditPasswordConfirm.requestFocus();\n return;\n }\n\n // Intenta crear la cuenta\n Toast.makeText(getContext(), \"Bienvenido\", Toast.LENGTH_LONG).show();\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE_REGISTER) {\n if (resultCode == RESULT_OK) {\n\n // TODO: Implement successful register logic here\n // If register is successfully, automatically doLogin and go to MainActivity\n this.finish();\n }\n }\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n try {\n //Get data \n String username = request.getParameter(\"txtUsername\");\n String password = request.getParameter(\"pwfPassword\");\n String confirmPassword = request.getParameter(\"pwfConfirmPassword\");\n String name = request.getParameter(\"txtName\");\n// DateFormat format = DateFormat.getDateInstance();\n SimpleDateFormat sdf = new SimpleDateFormat(\"MM/dd/yyyy\");\n Date getTime = sdf.parse(request.getParameter(\"txtDateOfBirth\"));\n Timestamp dateOfBirTimestamp = new Timestamp(getTime.getTime());\n int gender = GenderList.toInt(request.getParameter(\"cbGender\"));\n String address = request.getParameter(\"txtAddress\");\n String phoneNumber = request.getParameter(\"txtPhoneNumber\");\n String email = request.getParameter(\"txtEmail\");\n String identityCard = request.getParameter(\"identityCard\");\n int roleID = RoleList.getID(\"reader\");\n \n //Create new user and insert to data base\n UserDTO user = new UserDTO(username, password, name, dateOfBirTimestamp, gender, address, phoneNumber, email, identityCard, roleID, UserDTO.STATUS_AVAILABLE);\n if(!new UserDAO().createUser(user)){\n Map<String,String> error = new HashMap<String, String>();\n error.put(\"EXISTENCE\", \"Tên đăng nhập này đã tồn tại. Xin hãy chọn tên đăng nhập khác.\");\n request.setAttribute(\"ERROR\", error);\n user.setPassword(\"\");\n request.setAttribute(\"OLD-INFO\", user);\n } else {\n request.removeAttribute(\"txtUsername\");\n request.removeAttribute(\"pwfPassword\");\n request.removeAttribute(\"pwfConfirmPassword\");\n request.removeAttribute(\"txtName\");\n request.removeAttribute(\"txtDateOfBirth\");\n request.removeAttribute(\"txtEmail\");\n request.removeAttribute(\"txtAddress\");\n request.removeAttribute(\"txtPhoneNumber\");\n request.setAttribute(\"SUCCESS\", \"Chúc mừng! bạn đã tạo tài khoảng thành công!!\");\n }\n } catch (Exception ex) {\n System.out.println(\"Register controller \" + ex.getMessage());\n log(ex.getMessage());\n }\n finally{\n request.getRequestDispatcher(RESULT).forward(request, response);\n }\n }", "@RequestMapping(\"/processForm\")\n\tpublic String processForm( @Valid @ModelAttribute(\"register\") Register theRegister, BindingResult theBindingResult) {\n\t\tSystem.out.println(\"Register new: \" + theRegister.getFirstName() \n\t\t\t\t\t\t+ \" \" + theRegister.getLastName());\n\t\t\n\t\tif(theBindingResult.hasErrors()) {\n\t\t\t\n\t\t\treturn \"register-form\";\n\t\t}else {\n\t\t\treturn \"register-confirmation\";\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "@RequestMapping(value=\"/signup-c\", method=RequestMethod.POST)\r\n\tpublic String signup(HttpServletRequest req,Model model, @ModelAttribute(value=\"newUser\") Consultant user, BindingResult br,\r\n\t\t\tRedirectAttributes redirectAttributes,\r\n\t\t\t@RequestParam(\"title\") String jobTitle,\r\n\t\t\t@RequestParam(\"employer\") String employer) {\r\n\t\t\r\n\t\tSystem.out.println(\"POST Consultant\");\r\n\t\t\r\n\t\tString email = user.getEmail().toLowerCase();\r\n\t\tif(!pattern.matcher(email).find()){\r\n\t\t\tSystem.out.println(\"invalid email\");\r\n\t\t\t/* TODO: add error messageInvalid EMAIL */\r\n\t\t\treturn null; // add the correct view string\r\n\t\t}\r\n\t\t\r\n\t\tif (!br.hasErrors()) {\r\n\t\t\tuser.setCurrentTitle(jobTitle);\r\n\t\t\tuser.setEmployer(employer);\r\n\t\t\t//System.out.println(user);\r\n\t\t\t\r\n\t\t\tIUser newUser = userDAO.create(user);\r\n\t\t\treq.setAttribute(\"userId\", newUser.getUserId());\r\n\t\t\tmodel.addAttribute(\"newUser\", user);\r\n\t\t\tredirectAttributes.addFlashAttribute(\"userId\", newUser.getUserId());\r\n\t\t\t/* TODO: write Consultant to DB */\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn \"redirect:/signUpRequest\";\r\n\t}", "@RequestMapping(value=\"/signup\",method=RequestMethod.GET)\r\n\tpublic ModelAndView signupSuccess()\r\n\t{\r\n\t\tModelAndView mv=new ModelAndView(\"DefaultPage\");\r\n\t\tmv.addObject(\"title\",\"signup\");\r\n\t\tmv.addObject(\"userClicksSignup\", true);\r\n\t\tUser nuser=new User();\r\n\t\t//setting few fields\r\n\t\tnuser.setEnabled(true);\r\n\t\tnuser.setRole(\"USER\");\r\n\t\tmv.addObject(\"user\", nuser);\r\n\t\treturn mv;\r\n\t}", "@RequestMapping(method = RequestMethod.POST,\n consumes = MediaType.APPLICATION_JSON_VALUE)\n public void registerNewUser(@RequestBody @Valid UserDetails user){\n userRepository.save(user);\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\ttry{\n\t\t\tCookie ck[]=request.getCookies();\n\t\t\tString user = ck[0].getValue();\n\t\t\t\n\t\t\tAdminDao adminDao = new AdminDaoImpl();\n\t\t\tAdmin admin = adminDao.getAdmin(user);\n\t\t\t//String username = request.getParameter(\"username\");\n\t\t\t//String pass = request.getParameter(\"password\");\n\t\t\tString submitType = request.getParameter(\"submit\");\n\t\t\t\n\t\t\t//Login login = new Login(username, pass);\n\t\t\t\n\t\t\tDoctorDao doctorDao = new DoctorDaoImpl();\n\t\t\tDoctor a = new Doctor();\n\t\t\t\n\t\t\tif(submitType.equals(\"register\")){\n\t\t\t\ta.setName(request.getParameter(\"name\"));\n\t\t\t\ta.setUsername(request.getParameter(\"username\"));\n\t\t\t\ta.setPassword(request.getParameter(\"password\"));\n\t\t\t\ta.setSpecialty(request.getParameter(\"Specialty\"));\n\t\t\t\ta.setInfo(request.getParameter(\"Info\"));\n\t\t\t\tdoctorDao.addDoctor(a);\n\t\t\t\t\n\t\t\t\t//SlotDao slotdao = new SlotDaoImpl();\n\t\t\t\t//slotdao.addSlot(new Slot(600,700,a.getID()));\n\t\t\t\t\n\t\t\t\trequest.setAttribute(\"successMessage\", \"Registration done, please login!\");\n\t\t\t\trequest.setAttribute(\"name\", admin.getName());\n\t\t\t\trequest.getRequestDispatcher(\"AdminHome.jsp\").forward(request, response);\n\t\t\t}}\n\t\tcatch(Exception e){System.out.println(\"Something went wrong\");}\n\t\t\n\t}", "@RequestMapping(\"/register\")\r\n\tpublic ModelAndView register(@ModelAttribute(\"registerForm\") final UserRegisterForm form) {\r\n\t\treturn new ModelAndView(\"users/register\");\r\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String action = request.getParameter(\"action\");\n \n String name = request.getParameter(\"name\");\n String email = request.getParameter(\"email\");\n String password = request.getParameter(\"password\");\n String address = request.getParameter(\"address\");\n String phone = request.getParameter(\"phone\");\n int status = 1;\n long url = System.currentTimeMillis();\n String passMD5 = helper.MD5Generator.generate(password);\n User user = new User(name, email, passMD5, address, phone,status,url); \n if (action.equals(\"Create\")) {\n if (!userDao.find(user)) {\n Controller.controller.addUser(user);\n response.sendRedirect(\"doUser\");\n } else {\n response.sendRedirect(\"create-user.jsp\");\n } \n } else if (action.equals(\"Edit\")) {\n if (userDao.find(email) != null) {\n Controller.controller.editUser(user);\n response.sendRedirect(\"doUser\");\n } else {\n response.sendRedirect(\"edit-user.jsp\");\n }\n }\n \n \n }", "@RequestMapping(value = \"register_new_customer\", method = { RequestMethod.POST })\n\tpublic void registerNewUser(@RequestParam(\"username\") String username, @RequestParam(\"password\") String password,\n\t\t\t\t\t\t\t\t@RequestParam(\"firstName\") String firstName, @RequestParam(\"lastName\") String lastName,\n\t\t\t\t\t\t\t\tHttpServletResponse response) {\n\t\tSystem.out.println(username + \" \" + password + \" \" + lastName + \" \" + firstName);\n\n\t\ttry {\n\t\t\t// In case the user already exist, show error to the user\n\t\t\tif (isExistUser(username)) {\n\t\t\t\tHttpStatus status = HttpStatus.CONFLICT;\n\t\t\t\tresponse.setStatus(status.value());\n\t\t\t} else {\n\t\t\t\t// Create Mongo client\n\t\t\t\tMongoClient mongoClient = new MongoClient(\"localhost\", 27017);\n\t\t\t\tMongoDatabase db = mongoClient.getDatabase(\"projectDB\");\n\n\t\t\t\t// Create Users collection\n\t\t\t\tMongoCollection<Document> collection = db.getCollection(\"USERS\");\n\n\t\t\t\t// Create user document and add to users collection\n\t\t\t\tDocument document = new Document(\"username\", username).append(\"password\", password)\n\t\t\t\t\t\t.append(\"firstName\", firstName).append(\"lastName\", lastName)\n\t\t\t\t\t\t.append(\"RegistrationDate\", new Date());\n\t\t\t\tcollection.insertOne(document);\n\t\t\t\tSystem.out.println(\"Document inserted successfully\");\n\n\t\t\t\t//Close DB connection and send OK message to the user\n\t\t\t\tmongoClient.close();\n\t\t\t\tHttpStatus status = HttpStatus.OK;\n\t\t\t\tresponse.setStatus(status.value());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\tHttpStatus status = HttpStatus.CONFLICT;\n\t\t\tresponse.setStatus(status.value());\n\t\t}\n\n\t}", "public void registerUser(View view) {\n TextView emailAddressField = (TextView) findViewById(R.id.registerEmailAddress);\n final String emailAddress = emailAddressField.getText().toString();\n\n TextView passwordField = (TextView) findViewById(R.id.registerPassword);\n final String password = passwordField.getText().toString();\n\n TextView nameField = (TextView) findViewById(R.id.registerName);\n final String name = nameField.getText().toString();\n\n final String company = \"Purple Store\";\n\n if(emailAddress.isEmpty() || password.isEmpty() || name.isEmpty()) {\n Toast.makeText(this, \"Email Address, password or name cannot be blank\",Toast.LENGTH_SHORT).show();\n return;\n }\n\n mAuth.createUserWithEmailAndPassword(emailAddress, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(TAG, \"createUserWithEmail:success\");\n FirebaseUser currentUser = mAuth.getCurrentUser();\n String uid = currentUser.getUid();\n\n // Write credentials in Fire Store\n User newUser = new User();\n newUser.createUser(uid, emailAddress, name, company);\n newUser.writeData();\n\n // Save the details on shared preferences for future calls\n SharedPreferences sharedPreferences = getSharedPreferences(\"USER_DETAILS\", Context.MODE_PRIVATE);\n\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"userId\", uid);\n editor.putString(\"emailAddress\", emailAddress);\n editor.putString(\"name\", name);\n editor.putString(\"companyId\", company);\n editor.apply();\n\n // Redirect to Dashboard\n Intent intent = new Intent(RegisterActivity.this, MainActivity.class);\n startActivity(intent);\n } else {\n // If sign in fails, display a message to the user.\n Log.w(TAG, \"createUserWithEmail:failure\", task.getException());\n Toast.makeText(RegisterActivity.this, task.getException().getMessage(),Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "private void registerUser(){\r\n String E = Email.getText().toString().trim();\r\n String P = Password.getText().toString().trim();\r\n\r\n //if email is empty then give error\r\n if(E.isEmpty()){\r\n Email.setError(\"Email is required\");\r\n Email.requestFocus();\r\n return;\r\n }\r\n\r\n //if email is not an email format give error\r\n if(!Patterns.EMAIL_ADDRESS.matcher(E).matches()){\r\n Email.setError(\"Please enter a valid email\");\r\n Email.requestFocus();\r\n return;\r\n }\r\n //if password is empty then give error\r\n if(P.isEmpty()){\r\n Password.setError(\"Password is required\");\r\n Password.requestFocus();\r\n return;\r\n }\r\n //if password is less then 6 characters, give error.\r\n if(P.length()< 6){\r\n Password.setError(\"Minimum Password length has to be 6 or more characters\");\r\n Password.requestFocus();\r\n return;\r\n }\r\n //Calls the firebase method to create a new user.\r\n mAuth.createUserWithEmailAndPassword(E, P).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\r\n @Override\r\n public void onComplete(@NonNull Task<AuthResult> task) {\r\n if(task.isSuccessful()){\r\n Toast.makeText(getApplicationContext(),\"User register Sucessfully\",Toast.LENGTH_SHORT).show();\r\n }\r\n }\r\n });\r\n }", "public void onSignUpClick() {\n\t\tString uid = regview.getUsername();\n\t\tString pw = regview.getPassword();\n\t\tString na = regview.getName();\n\t\tString em = regview.getEmail();\n\t\tString text = \"\";\n\t\tif(uid.equals(\"\") || pw.equals(\"\") || na.equals(\"\")|| em.equals(\"\")){\n\t\t\ttext = \"Please fill out all fields!\";\n\t\t} else if(regview.findUser(uid)!=User.NULL_USER){\n\t\t\ttext = \"The username already exsit, please try another one!\";\n\t\t} else {\n\t\t\tregview.addUser(new User(uid,pw,na,em));\n\t\t\tregview.goLoginPage();\n\t\t}\n\t\tregview.setRegisterText(text);\n\t}", "private void sendToServer(User register) {\r\n RegisterServiceAsync registerServiceAsync = GWT.create(RegisterService.class);\r\n AsyncCallback<String> asyncCallback = new AsyncCallback<String>() {\r\n public void onSuccess(String result) {\r\n if (result != null) {\r\n String[] tmp = result.split(\"_\");\r\n \r\n int value = Integer.parseInt(tmp[0]);\r\n if (value == User.OK) {\r\n RootPanel.get(\"content\").clear();\r\n String[] href = Window.Location.getHref().split(\"#\");\r\n String linker = href[0].contains(\"?\") ? \"&\" : \"?\";\r\n getEntry().showDialogBox(\"ActivationLink\", href[0] + linker + \"activationCode=\" + tmp[1]);\r\n History.newItem(\"welcome\");\r\n } else {\r\n if (value >= User.PASSWORD_FAULT) {\r\n value -= User.PASSWORD_FAULT;\r\n }\r\n if (value >= User.USERNAME_FAULT) {\r\n value -= User.USERNAME_FAULT; \r\n registerInvalid(User.USERNAME_FAULT);\r\n }\r\n if (value >= User.EMAIL_FORMAT) {\r\n value -= User.EMAIL_FORMAT;\r\n registerInvalid(User.EMAIL_FORMAT);\r\n }\r\n if (value >= User.GEBURTSTAG_AGE) {\r\n value -= User.GEBURTSTAG_AGE;\r\n registerInvalid(User.GEBURTSTAG_AGE);\r\n }\r\n if (value >= User.GEBURTSTAG_FORMAT) {\r\n value -= User.GEBURTSTAG_FORMAT;\r\n registerInvalid(User.GEBURTSTAG_FORMAT);\r\n }\r\n if (value >= User.GEBURTSTAG_FAULT) {\r\n value -= User.GEBURTSTAG_FAULT;\r\n registerInvalid(User.GEBURTSTAG_FAULT);\r\n }\r\n submit.setEnabled(true);\r\n }\r\n } else {\r\n submit.setEnabled(true);\r\n }\r\n }\r\n \r\n public void onFailure(Throwable caught) {\r\n registerInvalid(0);\r\n System.out.println(caught);\r\n }\r\n };\r\n registerServiceAsync.register(register, asyncCallback);\r\n }", "private void registerUser() {\n String finalFullName = fullName.getText().toString().trim();\n String finalAge = age.getText().toString().trim();\n String finalEmail = email.getText().toString().trim();\n String finalPassword = password.getText().toString().trim();\n\n if(finalFullName.isEmpty()){\n fullName.setError(\"Full name is required.\");\n fullName.requestFocus();\n return;\n }\n\n if(finalAge.isEmpty()){\n age.setError(\"Age is required.\");\n age.requestFocus();\n return;\n }\n\n if(finalEmail.isEmpty()){\n email.setError(\"Email is required.\");\n email.requestFocus();\n return;\n }\n\n if(!Patterns.EMAIL_ADDRESS.matcher(finalEmail).matches()){\n email.setError(\"Please provide valid email!.\");\n email.requestFocus();\n return;\n }\n\n if(finalPassword.length() < 6){\n password.setError(\"Min. password length is 6 characters.\");\n password.requestFocus();\n return;\n }\n\n if(finalPassword.isEmpty()){\n password.setError(\"Password is required.\");\n password.requestFocus();\n return;\n }\n\n progressBar.setVisibility(View.VISIBLE);\n\n setEmail(finalEmail);\n setAge(finalAge);\n setFullName(finalFullName);\n\n //Using Firebase libraries, create the user data and send the info to Firebase\n mAuth.createUserWithEmailAndPassword(finalEmail, finalPassword)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //Create the User object\n User user = new User(getFullName(),getEmail(),getAge());\n\n //Now send that object to the Realtime Database\n FirebaseDatabase.getInstance().getReference(\"Users\")\n //Get registered user's ID and set it the the User object\n //so that they're connected\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n //pass the user object. OnCompleteListener is used to Check if\n //the data was added to the database.\n .setValue(user).addOnCompleteListener(new OnCompleteListener<Void>() {\n //Inside OnCompleteListener you must complete that\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n if(task.isSuccessful()){\n Toast.makeText(RegistrationActivity.this, \"User has been registered successfully!\", Toast.LENGTH_LONG).show();\n progressBar.setVisibility(View.GONE);\n\n //Then redirect to login layout\n } else {\n Toast.makeText(RegistrationActivity.this,\"Failed to register. Try again.\", Toast.LENGTH_LONG).show();\n progressBar.setVisibility(View.GONE);\n }\n\n }\n });\n } else {\n Toast.makeText(RegistrationActivity.this,\"Failed to register. Try again.\", Toast.LENGTH_LONG).show();\n progressBar.setVisibility(View.GONE);\n }\n }\n });\n\n\n\n }", "private void register() {\n\n //Displaying a progress dialog\n final ProgressDialog loading = ProgressDialog.show(this, \"Registering\",\n \"Please wait...\", false, false);\n\n\n //Getting user data\n// username = editTextUsername.getText().toString().trim();\n// password = editTextPassword.getText().toString().trim();\n// phone = editTextPhone.getText().toString().trim();\n\n\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n loading.dismiss();\n confirmOtp();\n }\n }, 3000);\n\n\n //Again creating the string request\n// StringRequest stringRequest = new StringRequest(Request.Method.POST, Config.REGISTER_URL,\n// new Response.Listener<String>() {\n// @Override\n// public void onResponse(String response) {\n// loading.dismiss();\n// try {\n// //Creating the json object from the response\n// JSONObject jsonResponse = new JSONObject(response);\n//\n// //If it is success\n// if(jsonResponse.getString(Config.TAG_RESPONSE).equalsIgnoreCase(\"Success\")){\n// //Asking user to confirm otp\n// confirmOtp();\n// }else{\n// //If not successful user may already have registered\n// Toast.makeText(BusinessRegistration.this, \"Username or Phone number already registered\", Toast.LENGTH_LONG).show();\n// }\n// } catch (JSONException e) {\n// e.printStackTrace();\n// }\n// }\n// },\n// new Response.ErrorListener() {\n// @Override\n// public void onErrorResponse(VolleyError error) {\n// loading.dismiss();\n// Toast.makeText(BusinessRegistration.this, error.getMessage(), Toast.LENGTH_LONG).show();\n// }\n// }) {\n// @Override\n// protected Map<String, String> getParams() throws AuthFailureError {\n// Map<String, String> params = new HashMap<>();\n// //Adding the parameters to the request\n// params.put(Config.KEY_USERNAME, username);\n// params.put(Config.KEY_PASSWORD, password);\n// params.put(Config.KEY_PHONE, phone);\n// return params;\n// }\n// };\n\n //Adding request the the queue\n// requestQueue.add(stringRequest);\n }", "private void UserRegister(String fname, String mname, String lname, String address, String username, String userpassword) throws SQLException, ClassNotFoundException\n {\n //Register the driver.i.e Adding mysql database driver to classpath.\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n //Connect to the database\n Connection dbconn=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/quiz\", \"root\", \"2001\");\n //Query. It represents precomplied SQL statement.\n PreparedStatement st= dbconn.prepareStatement(\"INSERT INTO user (firstname,middlename,lastname,address,username,userpassword)VALUES(?,?,?,?,?,?)\");\n st.setString(1, fname);\n st.setString(2, mname);\n st.setString(3, lname);\n st.setString(4, address);\n st.setString(5, username);\n st.setString(6, userpassword);\n //execute query\n int res =st.executeUpdate();\n JOptionPane.showMessageDialog(this,\"User data Inserted \",\"SUCCESS\",JOptionPane.INFORMATION_MESSAGE);\n \n tf_firstname.setText(\"\");\n tf_middlename.setText(\"\");\n tf_lastname.setText(\"\");\n tf_address.setText(\"\");\n tfUsername.setText(\"\");\n Password.setText(\"\");\n }", "@PostMapping(\"/signup\")\n public ResponseEntity<?> registerUser(@Valid @RequestBody SignupRequest signupRequest) {\n System.out.println(\"Creating User \" + signupRequest);\n\n if (userAccountDetailsService.isUserExistByUsername(signupRequest.getUsername())) {\n System.out.println(\"A User with username: \" + signupRequest.getUsername() + \" already exist\");\n return new ResponseEntity<Void>(HttpStatus.CONFLICT);\n }\n\n UserAccount userAccount = new UserAccount();\n userAccount.setName(signupRequest.getName());\n userAccount.setUsername(signupRequest.getUsername());\n userAccount.setAge(signupRequest.getAge());\n userAccount.setPassword(passwordEncoder.encode(signupRequest.getPassword()));\n\n Set<String> roles = signupRequest.getRole();\n Set<Authorities> authorities = new HashSet<>();\n for(String role: roles) {\n Authorities authority = new Authorities();\n authority.setAuthority(role);\n authority.setUserAccount(userAccount);\n authorities.add(authority);\n }\n userAccount.setAuthorities(authorities);\n\n userAccountDetailsService.saveUser(userAccount);\n\n return new ResponseEntity<Void>(HttpStatus.CREATED);\n }", "@Override\n public void onClick(View v) {\n name = txtName.getText().toString();\n username = txtUsername.getText().toString();\n password = txtPassword.getText().toString();\n try {\n if (username.trim().length() > 0 && password.trim().length() > 0 && name.trim().length() > 0) {\n dbHelper.open();\n dbHelper.Register(username, password, name);\n //jika tombol diklik akan muncul toast daftar berhasil dan langsung menuju ke halaman login\n Toast.makeText(RegisterActivity.this, \"Daftar berhasil\", Toast.LENGTH_LONG).show();\n finish();\n } else {\n //jika tombol diklik akan muncul toast daftar gagal, lengkapi form!\n Toast.makeText(RegisterActivity.this, \"Daftar gagal, lengkapi form!\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n Toast.makeText(RegisterActivity.this, e.getMessage(), Toast.LENGTH_LONG).show();\n }\n }", "@Override\r\n protected void doPost(HttpServletRequest request,\r\n HttpServletResponse response) throws ServletException, IOException {\r\n \r\n String path = request.getPathInfo();\r\n if (path.equals(\"/signup\")) {\r\n \r\n String name = request.getParameter(\"name\");\r\n String email = request.getParameter(\"email\");\r\n String login = request.getParameter(\"login\");\r\n String password= request.getParameter(\"password\");\r\n \r\n User user = new User(login, password, name, email, false, false);\r\n \r\n BCryptPassword bcrypt = new BCryptPassword(user.getPassword());\r\n loginService.putUser(user.getLogin(), bcrypt, User.ROLES);\r\n \r\n MongoDB.store(user);\r\n response.sendRedirect(\"/login\");\r\n }\r\n }", "private void registerUser(){\n mAuth.createUserWithEmailAndPassword(correo, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //mapa de valores\n Map<String, Object> map = new HashMap<>();\n map.put(\"name\",name);\n map.put(\"email\",correo);\n map.put(\"password\",password);\n map.put(\"birthday\",cumple);\n map.put(\"genre\",genre);\n map.put(\"size\",size);\n //obtenemos el id asignado por la firebase\n String id= mAuth.getCurrentUser().getUid();\n //pasamos el mapa de valores\n mDatabase.child(\"Users\").child(id).setValue(map).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task2) {\n //validams que la tarea sea exitosa\n if(task2.isSuccessful()){\n startActivity(new Intent(DatosIniciales.this, MainActivity.class));\n //evitamos que vuelva a la pantalla con finsh cuando ya se ha registrado\n finish();\n }else{\n Toast.makeText(DatosIniciales.this, \"Algo fallo ups!!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }else{\n Toast.makeText(DatosIniciales.this, \"No pudimos completar su registro\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "@RequestMapping(value=\"{username}\", method=RequestMethod.POST)\n @ResponseStatus(HttpStatus.CREATED)\n String register(@RequestBody User user) throws ServerException, UserException {\n try {\n LOGGER.info(\"/users/{username} POST hit with user {}\", user);\n return userFacade.register(user);\n } catch (RuntimeException e) {\n LOGGER.error(\"Error in /users/{username} POST {}\", e);\n throw new ServerException(e);\n }\n }", "@RequestMapping(value = { \"/new\" }, method = RequestMethod.POST)\r\n public String saveUser(@Valid User user, BindingResult result,\r\n ModelMap model) {\r\n if (result.hasErrors()) {\r\n return \"registration\";\r\n }\r\n\r\n // Preferred way to achieve uniqueness of field [loginID] should be implementing custom @Unique annotation\r\n // and applying it on field [loginID] of Model class [User].Below mentioned peace of code [if block] is\r\n // to demonstrate that you can fill custom errors outside the validation\r\n // framework as well while still using internationalised messages.\r\n\r\n if(!service.isLoginIDUnique(user.getId(), user.getLoginID())){\r\n FieldError loginIDError =new FieldError(\"user\",\"loginID\",messageSource.getMessage(\"non.unique.loginID\", new String[]{user.getLoginID()}, Locale.getDefault()));\r\n result.addError(loginIDError);\r\n return \"registration\";\r\n }\r\n\r\n service.saveUser(user);\r\n model.addAttribute(\"success\", \"user \" + user.getLoginID() + \" registered successfully\");\r\n return \"success\";\r\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\r\n\t\trequest.setCharacterEncoding(\"UTF-8\");\r\n\t\t\r\n\t\tString id = \"\";\r\n\t\tString password = \"\";\r\n\t\tString gender = \"\";\r\n\t\tString moviecat = \"\";\r\n\t\tint age = 0;\r\n\t\tStringBuilder cat = new StringBuilder();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tid = request.getParameter(\"id\");\r\n\t\t\tpassword = request.getParameter(\"password\");\r\n\t\t\tgender = request.getParameter(\"gender\");\r\n\t\t\tage = Integer.parseInt(request.getParameter(\"age\"));\r\n\t\t\r\n\t\t\tString[] categories = request.getParameterValues(\"categories\");\r\n\t\t\tfor(String s : categories) {\r\n\t\t\t\tcat = cat.append(s+\",\");\r\n\t\t\t}\r\n\t\t\tmoviecat = cat.toString();\r\n\t\t} catch(Exception ex) {\r\n\t\t\tSystem.out.println(\"注册表单出错...\");\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tUsers u = new Users();\r\n\t\tu.setId(id);\r\n\t\tu.setPassword(password);\r\n\t\tu.setGender(gender);\r\n\t\tu.setAge(age);\r\n\t\tu.setMoviecat(moviecat);\r\n\t\t\r\n\t\tUserDAO udao = new UserDAO();\r\n\t\t\r\n\t\tif(udao.userReg(u)) {\r\n\t\t\trequest.getRequestDispatcher(\"../reg_success.jsp\").forward(request, response);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tresponse.sendRedirect(\"../reg_failure.jsp\");\r\n\t\t}\r\n\t}", "@RequestMapping(value = \"/register/customer\", method = RequestMethod.POST)\n\tpublic AjaxResponseDTO registerCustomerToPortal(@RequestBody UserDTO user) throws Exception {\n\t\tLOG.info(\"Registartion process initiated for a customer name:\" + user.getName() + \" and with email:\"\n\t\t\t\t+ user.getEmailAddress());\n\t\tAjaxResponseDTO responseDTO = new AjaxResponseDTO();\n\t\ttry {\n\t\t\tuser.setAccountVerified(null);\n\t\t\tuser.setToken(this.getToken());\n\t\t\tif(StringUtils.isNotBlank(user.getPassword())) {\n\t\t\t\tuser.setPassword(passwordEncoder.encode(user.getPassword()));\n\t\t\t}\n\t\t\tUserDTO response = userFacade.create(user);\n\t\t\tresponseDTO.setData(response);\n\t\t\t// to send email to user after registration\n\t\t\temailFacade.sendLTONotificationEmailVerfication(response.getName(), response.getEmailAddress(), response.getToken());\n\t\t\tLOG.info(\"Registration Email sent successfully to the user with email: \" + user.getEmailAddress());\n\n\t\t\tLOG.info(\"Registartion process completed for a customer name:\" + user.getName() + \" and with email:\"\n\t\t\t\t\t+ user.getEmailAddress() + \" and userId is:\" + user.getId());\n\t\t} catch (NonUniqueResultException nue) {\n\t\t\tLOG.info(\"User Name already exist: \" + user.getUserName());\n\t\t\tAjaxErrorDTO errorDTO = new AjaxErrorDTO();\n\t\t\terrorDTO.setErrorCode(ControllerConstants.ErrorCodes.BAD_REQUEST);\n\t\t\terrorDTO.setErrorMessage(ControllerConstants.ErrorMessages.USER_ALREADY_EXIST);\n\t\t\tresponseDTO.setError(errorDTO);\n\t\t}\n\n\t\treturn responseDTO;\n\n\t}", "@RequestMapping(value=\"/signup/{username}/{password}\")\n @ResponseBody\n public boolean signup(@PathVariable String username, @PathVariable String password){\n\n User user = new User(username, password);\n try{\n customUserDetailsService.save(user);\n return true;\n }catch (Exception e) {\n System.out.println(e);\n //ef return false tha er username fratekid...\n return false;\n }\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n String action = request.getParameter(\"action\"); \n UserService userService = new UserService();\n int userId;\n\n switch(action) {\n case \"login\":\n String email = request.getParameter(\"email-input\");\n String password = request.getParameter(\"password-input\");\n if(userService.login(email, password)) {\n HttpSession session = request.getSession(true);\n User user = userService.getUser(\"email-input\");\n userId = user.getUserId();\n request.setAttribute(\"role\", userService.getRole(userId).getRoleName());\n response.sendRedirect(\"profile\");\n \n return;\n } else {\n request.setAttribute(\"helpText\", \"Either the username or password you have entered in incorrect.\");\n request.setAttribute(\"correct\", \"false\");\n getServletContext().getRequestDispatcher(\"/WEB-INF/login.jsp\").forward(request, response); \n }\n break;\n case \"register\":\n User user = new User();\n \n String firstNameInput = request.getParameter(\"first-name-input\");\n String lastNameInput = request.getParameter(\"last-name-input\");\n String emailInput = request.getParameter(\"email-input\");\n String passwordInput = request.getParameter(\"password-input\");\n String phoneNumberInput = request.getParameter(\"phone-number-input\");\n String zipCodeInput = request.getParameter(\"zip-code-input\");\n String streetAddressInput = request.getParameter(\"street-address-input\");\n String cityInput = request.getParameter(\"city-input\");\n String stateInput = request.getParameter(\"state-input\");\n String countryInput = request.getParameter(\"country-input\");\n \n ArrayList<Address> addressList = new ArrayList<Address>();\n Address address = new Address();\n address.setCity(cityInput);\n address.setCountry(countryInput);\n address.setState(stateInput);\n address.setStreetAddress(streetAddressInput);\n address.setZipCode(zipCodeInput);\n addressList.add(address);\n \n // user.setPhoneNumber(phoneNumberInput);\n user.setEmail(emailInput);\n user.setPassword(passwordInput);\n user.setFirstName(firstNameInput);\n user.setLastName(lastNameInput);\n user.setAddressList(addressList);\n \n request.setAttribute(\"helpText\", \"You have now been registered, and can now login with your new account.\");\n getServletContext().getRequestDispatcher(\"/WEB-INF/login.jsp\").forward(request, response);\n break;\n }\n \n }" ]
[ "0.7658796", "0.74153125", "0.7288244", "0.7253244", "0.7164506", "0.7116988", "0.70952255", "0.7086688", "0.70525444", "0.70314914", "0.7004147", "0.698948", "0.69718665", "0.697056", "0.6968028", "0.69501185", "0.69314903", "0.6925237", "0.6881477", "0.68609107", "0.68398", "0.68357956", "0.6812276", "0.6810751", "0.6805822", "0.6800308", "0.67934704", "0.67932105", "0.67859775", "0.67806524", "0.67748725", "0.6762695", "0.6754296", "0.6752437", "0.6735727", "0.6673123", "0.66666585", "0.66648954", "0.66645586", "0.66604733", "0.6657993", "0.66535336", "0.66535246", "0.6650287", "0.6647969", "0.66263866", "0.6618897", "0.6606719", "0.6606424", "0.65688264", "0.6559533", "0.6549261", "0.65433156", "0.65412885", "0.6538387", "0.6537517", "0.6536851", "0.6531409", "0.65185624", "0.6501304", "0.6497474", "0.6493075", "0.6489084", "0.6486739", "0.64850175", "0.64830554", "0.64797556", "0.64790195", "0.6477999", "0.6475786", "0.647133", "0.64697677", "0.6460932", "0.6457807", "0.64432025", "0.64299893", "0.6429007", "0.64235216", "0.6421595", "0.64198387", "0.64156955", "0.6391755", "0.6389604", "0.6377043", "0.63715506", "0.6360624", "0.63568926", "0.6356363", "0.6352911", "0.63466555", "0.63405675", "0.6337414", "0.63301647", "0.63301516", "0.6327474", "0.63269615", "0.6326122", "0.6320239", "0.63164705", "0.63152134", "0.6312267" ]
0.0
-1
Assign the view components to instance variables
private void getViewComponents() { _gameView = (GameView) findViewById(R.id.game_cv_gameview); _levelView = (TextView) findViewById(R.id.game_tv_curlevel); _scoreView = (TextView) findViewById(R.id.game_tv_curscore); _startBtn = (Button) findViewById(R.id.game_btn_start); _gestureOverlay = (GestureOverlayView) findViewById(R.id.game_gov_gestures); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getComponents() {\n drawerLayout = binding.activityMainDrawerLayout;\n navigationView = binding.navigationView;\n floatingActionButton = binding.flAddPet;\n shareAppButton = binding.flShareApp;\n }", "public ViewProperty() {\n initComponents();\n }", "public ViewClass() {\n\t\tcreateGUI();\n\t\taddComponentsToFrame();\n\t\taddActionListeners();\n\t}", "public ManipularView() {\n initComponents();\n }", "private void initViews() {\n\n\t}", "private void initViews() {\n\n }", "public ViewDataIn() {\n initComponents();\n }", "protected abstract void initializeComponent(View view);", "public viewOpe() {\n initComponents();\n }", "public ViewInit() {\n initComponents();\n }", "public View() {\n initComponents();\n }", "private void initView() {\n\n }", "@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}", "public void initViews(){\n }", "private void viewInit() {\n }", "@Override\r\n\tprotected void initViews() {\n\t\t\r\n\t}", "protected abstract void initViews();", "private void setViews() {\n\n }", "public abstract void initViews();", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "public void initView() {\n\t\t view.initView(model);\t \n\t }", "protected abstract void initView();", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "@Override\n protected void initView() {\n }", "@Override\n protected void initView() {\n }", "public void initView(){}", "public ViewSinFaltante() {\n initComponents();\n }", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "void initializeView() {\n displayProjectFilter();\n displayTimeFrameFilter();\n\n setUsersIntoComboBox();\n setClientsIntoComboBox();\n setProjectsIntoComboBox();\n setDateRestrictions();\n setValidators();\n setTable();\n\n selectUser();\n selectClient();\n selectProject();\n listenDatePickerStart();\n listenDatePickerEnd();\n\n removeUserFilter();\n removeProjectFilter();\n removeTimeFrameFilter();\n clearAllFilters();\n\n // this is important for hiding user combo box and stuff\n setUpUserRules();\n\n //vBox.translateXProperty().bind((scrollPane.widthProperty().subtract(vBox.widthProperty())).divide(2));\n scrollPane.widthProperty().addListener((observable, oldValue, newValue) -> {\n if (newValue != null) {\n grid.setPrefWidth(newValue.doubleValue() - (oldValue.doubleValue() - scrollPane.getViewportBounds().getWidth()));\n }\n });\n\n //TODO: Refactor this.\n setUpBarChart();\n tbvTasks.getItems().addListener((ListChangeListener.Change<? extends TaskConcrete2> c) -> {\n setUpBarChart();\n });\n\n setToolTipsForButtons();\n changeTableSize();\n }", "@Override\n\tpublic void initView() {\n\t\t\n\t}", "@Override\n public void initView() {\n }", "@Override\n\tprotected void initView()\n\t{\n\n\t}", "private void initComponents() {\n\t\t\n\t}", "private void initComponents() {\n\t\t\n\t}", "protected abstract void initializeView();", "protected void initializeComponent(final View view) {\n this.solutionView =\n (TextView) view.findViewById(\n R.id.reponses_solution);\n this.argumentsView =\n (TextView) view.findViewById(\n R.id.reponses_arguments);\n this.questionView =\n (TextView) view.findViewById(\n R.id.reponses_question);\n\n this.dataLayout =\n (RelativeLayout) view.findViewById(\n R.id.reponses_data_layout);\n this.emptyText =\n (TextView) view.findViewById(\n R.id.reponses_empty);\n }", "public abstract void initView();", "public View() {\n this.view = new ViewPanel();\n //this.view.setGraph(this.graph);\n initComponents();\n this.m_algoritmos.setEnabled(false);\n this.mi_maze.setEnabled(false);\n this.mi_salvarImagem.setEnabled(false);\n }", "void initializeUIComponents(View v);", "private void initComponents()\n {\n //LAYOUT\n initLayoutComponents();\n \n //TRANSITION COMPONENTS\n initTransitionComponents();\n \n //SEARCH PANE COMPONENTS\n initSearchComponents();\n \n //RESULTS PANE COMPONENTS\n initResultComponents();\n \n // CRAWLER CONTROLS\n initCrawlerControlsComponents();\n \n // KEYWORD BAR\n initKeywordBarComponents();\n \n //WORKER CONTROLS\n initWorkerComponents();\n \n //URL COMPONENTS\n initURLMenuComponents();\n\n //BASE LAYOUT COMPONENTS\n initBaseLayout();\n }", "public HomeView() {\n initComponents();\n }", "@Override\n public void initView() {\n\n }", "public AlunoView() {\n initComponents();\n bus = new AlunoBus();\n }", "private void setUpViews() {\n\n updateFooterCarInfo();\n updateFooterUsrInfo();\n\n\n setResultActionListener(new ResultActionListener() {\n @Override\n public void onResultAction(AppService.ActionType actionType) {\n if (ModelManager.getInstance().getGlobalInfo() != null) {\n GlobalInfo globalInfo = ModelManager.getInstance().getGlobalInfo();\n\n switch (actionType) {\n case CarInfo:\n updateFooterCarInfo();\n break;\n case UsrInfo:\n updateFooterUsrInfo();\n break;\n case Charger:\n updateChargeStationList();\n break;\n }\n }\n }\n });\n }", "void initView();", "@Override\n protected void initViewSetup() {\n }", "private void initView() {\n TIMManager.getInstance().addMessageListener(this);\n initAdapter();\n initRefresh();\n }", "private void initView() {\n\t\timg_back = (ImageView) findViewById(R.id.img_back_updatejob);\n\t\tedt_content = (EditText) findViewById(R.id.edt_content_updatejob);\n\t\tedt_course = (EditText) findViewById(R.id.edt_course_updatejob);\n\t\tbtn_delete = (Button) findViewById(R.id.btn_delete_updatejob);\n\t\tbtn_update = (Button) findViewById(R.id.btn_update_updatejob);\n\t}", "@Override\n\tpublic void InitView() {\n\t\t\n\t}", "private void initMyComponents() {\n this.jPanel1.setLayout(new BoxLayout(this.jPanel1, BoxLayout.Y_AXIS));\n this.jPanel1.add(controller.getPressureController().getEMeasureBasicView());\n this.jPanel1.add(controller.getTemperatureController().getEMeasureBasicView());\n this.controller.getPressureController().getListeners().add(this);\n this.controller.getTemperatureController().getListeners().add(this);\n this.jComboBox1.setModel(new DefaultComboBoxModel(FluidKind.values()));\n this.changeResponce();\n }", "private void initLayoutComponents()\n {\n viewPaneWrapper = new JPanel(new CardLayout());\n viewPane = new JTabbedPane();\n crawlPane = new JPanel(new BorderLayout());\n transitionPane = new JPanel();\n searchPane = new BGRenderer(Color.WHITE, WINDOW_WIDTH, WINDOW_HEIGHT);\n resultsPane = new BGRenderer(Color.WHITE, WINDOW_WIDTH, WINDOW_HEIGHT);\n }", "public ViewUsluga() {\n initComponents();\n obrada = new ObradaUsluga();\n postInitComponents(); \n }", "private void initComponents() {\r\n\t\temulator = new Chip8();\r\n\t\tpanel = new DisplayPanel(emulator);\r\n\t\tregisterPanel = new EmulatorInfoPanel(emulator);\r\n\t\t\r\n\t\tcontroller = new Controller(this, emulator, panel, registerPanel);\r\n\t}", "private void initializeViewAndControls() {\r\n txtEmail.setText(\"Email - \"+ AppConstants.ADMIN_EMAIL);\r\n txtCustomerCarePhone.setText(\"Customer Care - \"+ AppConstants.CUSTOMER_CARE_NUMBER);\r\n txtTollFreePhone.setText(\"Toll Free - \"+ AppConstants.TOLL_FREE_NUMBER);\r\n }", "private void initView() {\n\t\tsna_viewpager = (ViewPager) findViewById(R.id.sna_viewpager);\r\n\t\thost_bt = (Button) findViewById(R.id.host_bt);\r\n\t\tcomment_bt = (Button) findViewById(R.id.comment_bt);\r\n\t\tback_iv = (ImageView) findViewById(R.id.back_iv);\r\n\t\trelativeLayout_project = (RelativeLayout) findViewById(R.id.relativeLayout_project);\r\n\t\trelativeLayout_addr = (RelativeLayout) findViewById(R.id.relativeLayout_addr);\r\n\t\trelativeLayout_activity = (RelativeLayout) findViewById(R.id.relativeLayout_activity);\r\n\t\trelativeLayout_host = (RelativeLayout) findViewById(R.id.relativeLayout_host);\r\n\t\trelativeLayout_comment = (RelativeLayout) findViewById(R.id.relativeLayout_comment);\r\n\t\tll_point = (LinearLayout) findViewById(R.id.ll_point);\r\n\t\tstoyrName = (TextView) findViewById(R.id.stoyrName);\r\n\t\tstory_addr = (TextView) findViewById(R.id.story_addr);\r\n\t\t\r\n\t}", "ViewComponent createViewComponent();", "private void initializeViews()\n {\n scrMainContainer = findViewById(R.id.scrMainContainer);\n btnBack = findViewById(R.id.btnBack);\n etEmail = findViewById(R.id.etEmail);\n tvEmailError = findViewById(R.id.tvEmailError);\n etUsername = findViewById(R.id.etUsername);\n tvUsernameError = findViewById(R.id.tvUsernameError);\n etPassword = findViewById(R.id.etPassword);\n tvPasswordError = findViewById(R.id.tvPasswordError);\n btnCreateAccount = findViewById(R.id.btnCreateAccount);\n relLoadingPanel = findViewById(R.id.relLoadingPanel);\n }", "public AulaView() {\n initComponents();\n }", "private void assignViews() {\n mTextView = (TextView) findViewById(R.id.textViewForEnterEmail);\n mEdTxtEmail = (EditText) findViewById(R.id.edTxtEmailInForgotPass);\n mButton = (Button) findViewById(R.id.btnSubmit);\n }", "public MainView() {\n initComponents();\n \n }", "private void initViews() {\n textViewRole = findViewById(R.id.textViewAddress);\n recyclerViewUsers = findViewById(R.id.recyclerViewUsers);\n appCompatButtonAddProperty = findViewById(R.id.appCompatButtonAddProperty);\n }", "private void init() {\n //set view to presenter\n presenter.setView(this, service);\n\n setupView();\n }", "private void bindView() {\n mToolbar = (Toolbar) findViewById(R.id.tb_main);\n mMainLayout = (CoordinatorLayout) findViewById(R.id.crdl_main);\n mProgressDialog = (AVLoadingIndicatorView) findViewById(R.id.avi_progress_dialog);\n mPersonsView = (RecyclerView) findViewById(R.id.rv_persons);\n mPersonsView.setLayoutManager(new LinearLayoutManager(context));\n }", "private void initializeComponents(View view) {\n etTitle = (EditText) view.findViewById(R.id.etTitle);\n etAmount = (EditText) view.findViewById(R.id.etAmount);\n btnSave = (Button) view.findViewById(R.id.btnSaveExpense);\n category = (Spinner) view.findViewById(R.id.spinnerCategory);\n\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(getActivity(), R.array.spinner_choises, android.R.layout.simple_spinner_dropdown_item);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n category.setAdapter(adapter);\n\n btnDatePicker = (TextView) view.findViewById(R.id.btnExpenseDatePicker);\n btnSave.setOnClickListener(new btnSaveClicked());\n btnDatePicker.setOnClickListener(new btnDatePickerClicked());\n }", "public CutiView() {\n initComponents();\n this.cutiController = new CutiController(new MyConnection().getConnection());\n bindingTable();\n reset();\n }", "private void initialiseViews() {\n setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL);\n bindings = DataBindingUtil.setContentView(this, R.layout.activity_catalog_product);\n bindings.activityCatalogProductPb.setVisibility(View.GONE);\n\n bindings.activityCatalogProductFab.setOnClickListener(v -> {\n\n Intent addProductIntent = new Intent(ProductCatalogMain.this,\n ProductEditor.class);\n startActivity(addProductIntent);\n\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n\n });\n\n setSupportActionBar(bindings.activityCatalogProductToolbar);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n\n tabPageAdapter = new ProductCatalogFragmentPageAdapter(getSupportFragmentManager());\n tabViewPager = bindings.activityCatalogProductVp;\n tabViewPager.setAdapter(tabPageAdapter);\n\n if (bindings.activityCatalogProductVp != null) {\n setupViewPager(bindings.activityCatalogProductVp);\n }\n\n // Sets up the Tab's and their titles.\n bindings.activityCatalogProductTl.setupWithViewPager(bindings.activityCatalogProductVp);\n\n }", "private void initView() {\r\n\t\tviewerGraz.refresh(true);\r\n\t\tviewerGraz.refresh(true);\r\n\t\tviewerKapfenberg.refresh(true);\r\n\t\tviewerLeoben.refresh(true);\r\n\t\tviewerMariazell.refresh(true);\r\n\t\tviewerWien.refresh(true);\r\n\t}", "public ClientView() {\n initComponents();\n }", "private void setupView()\n {\n btn = (Button) this.findViewById(R.id.btn);\n btn2 = (Button) this.findViewById(R.id.btn2);\n btn3 = (Button) this.findViewById(R.id.btn3);\n\n }", "public ControlView (SimulationController sc){\n myProperties = ResourceBundle.getBundle(\"english\");\n myStartBoolean = false;\n mySimulationController = sc;\n myRoot = new HBox();\n myPropertiesList = sc.getMyPropertiesList();\n setView();\n\n }", "public GUIView() {\n initComponents();\n setMaxThreads();\n setCountOfElements(1);\n setCountOfThreads(1);\n this.isReadyForCalculation = false;\n }", "protected abstract void initViews(View mView);", "public ViewDetalleVentas() {\n initComponents();\n }", "private void initViews() {\n View view = getView();\n if (view != null) {\n edtConfirmPassword = view.findViewById(R.id.edt_reg_confim_password);\n edtConfirmPassword.setTag(\"Confirm Password\");\n edtEmail = view.findViewById(R.id.edt_reg_email);\n edtEmail.setTag(\"Email\");\n edtPhone = view.findViewById(R.id.edt_reg_phone);\n edtPhone.setTag(\"Phone\");\n edtPassword = view.findViewById(R.id.edt_reg_password);\n edtPassword.setTag(\"Password\");\n tv_RegisterSignIn = view.findViewById(R.id.tv_register_sign_in);\n btn_reg_signup = view.findViewById(R.id.btn_reg_signup);\n edtUserName = view.findViewById(R.id.edt_reg_name);\n edtUserName.setTag(\"Name\");\n }\n }", "public MantClientesView() {\n initComponents();\n }", "private void initViews() {\n\t\tet_area = (EditText) findViewById(R.id.et_area);\r\n\t\tbtn_search = (Button) findViewById(R.id.btn_search);\r\n\t\tll_main = (LinearLayout) findViewById(R.id.ll_main);\r\n\t}", "public MainView() {\n initComponents();\n }", "public MainView() {\n initComponents();\n }", "private void initComponent() {\n\t\tmlistview=(ClickLoadListview) findViewById(R.id.ListView_hidden_check);\n\t\tChemicals_directory_search=(CustomFAB) findViewById(R.id.company_hidden_search);\n\t\tChemicals_directory_search.setVisibility(View.GONE);\n\t\ttopbar_com_name=(TopBarView) findViewById(R.id.topbar_com_name);\n\t\tsearch_chemical_name=(SearchInfoView) findViewById(R.id.search_chemical_name);\n\t}", "public resultview() {\n initComponents();\n }", "public ViewRentas() {\n initComponents();\n }", "private void initializePresentation() {\r\n viewRankingAttemptFX = new ViewRankingAttemptFX(this);\r\n viewRankingPlayerFX = new ViewRankingPlayerFX(this);\r\n viewLoginFX = new ViewLoginFX(this);\r\n viewRegisterFX = new ViewRegisterFX(this);\r\n viewProblemListFX = new ViewProblemListFX(this);\r\n viewLoginFX = new ViewLoginFX(this);\r\n viewRegisterFX = new ViewRegisterFX(this);\r\n viewMenuFX = new ViewMenuFX(this);\r\n viewSettingsFX = new ViewSettingsFX(this);\r\n viewGenerateFX = new ViewGenerateFX(this);\r\n viewAttemptFX = new ViewAttemptFX(this);\r\n viewAttemptListFX = new ViewAttemptListFX(this);\r\n\r\n viewsFX.add(viewLoginFX);\r\n viewsFX.add(viewRankingAttemptFX);\r\n viewsFX.add(viewRankingPlayerFX);\r\n viewsFX.add(viewRegisterFX);\r\n viewsFX.add(viewProblemListFX);\r\n viewsFX.add(viewMenuFX);\r\n viewsFX.add(viewSettingsFX);\r\n viewsFX.add(viewGenerateFX);\r\n viewsFX.add(viewAttemptFX);\r\n viewsFX.add(viewAttemptListFX);\r\n\r\n }", "public RegionView() {\n initComponents();\n this.regionController=new RegionController(new MyConnection().getConnection());\n bindingTable();\n }", "private void init()\n\t{\n\t\tsetModel(new Model(Id.model, this, null));\n\t\tsetEnviroment(new Enviroment(Id.enviroment, this, model()));\n\t\tsetVaccinationCenter(new VaccinationCenter(Id.vaccinationCenter, this, model()));\n\t\tsetCanteen(new Canteen(Id.canteen, this, vaccinationCenter()));\n\t\tsetRegistration(new Registration(Id.registration, this, vaccinationCenter()));\n\t\tsetExamination(new Examination(Id.examination, this, vaccinationCenter()));\n\t\tsetVaccination(new Vaccination(Id.vaccination, this, vaccinationCenter()));\n\t\tsetWaitingRoom(new WaitingRoom(Id.waitingRoom, this, vaccinationCenter()));\n\t\tsetSyringes(new Syringes(Id.syringes, this, vaccination()));\n\t}", "public VendaView() {\n initComponents();\n }", "private void initViews() {\n webView = (WebView)findViewById(R.id.crop_webview);\n confirm_location = (Button)findViewById(R.id.btn_confirm_location);\n toolbar = (Toolbar)findViewById(R.id.map_toolbar);\n }", "private void setupView() {\n view.setName(advertisement.getTitle());\n view.setPrice(advertisement.getPrice());\n view.setDescription(advertisement.getDescription());\n view.setDate(advertisement.getDatePublished());\n view.setTags(advertisement.getTags());\n setCondition();\n if (advertisement.getImageUrl() != null) { //the url here is null right after upload\n view.setImageUrl(advertisement.getImageUrl());\n }\n }", "public PromedioView() {\n initComponents();\n }", "public IView() {\n initComponents();\n setLocationRelativeTo(null); //Center form on screen\n }", "public SimulationView() {\n initComponents();\n }", "private void injectViews() {\n Field[] declaredFields = getClass().getDeclaredFields();\n for (Field declaredField : declaredFields) {\n if(declaredField.isAnnotationPresent(InjectView.class)) {\n declaredField.setAccessible(true);\n try {\n declaredField.set(this, findViewById(declaredField.getAnnotation(InjectView.class).value()));\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n }\n }\n }", "private void setupVariables() {\n mCalendarView = findViewById(R.id.calendarView);\n mTextView = findViewById(R.id.eventsView);\n }", "public VPacientes() {\n initComponents();\n inicializar();\n }", "private void initViews() {\r\n etEmail = findViewById(R.id.et_mail);\r\n etVerifyCode = findViewById(R.id.et_l_verifyCode);\r\n etNewPsw = findViewById(R.id.et_new_psw);\r\n etConfirmPsw = findViewById(R.id.et_confirm_psw);\r\n }", "public void initialize() {\n this.setPreferredSize(new com.ulcjava.base.application.util.Dimension(548, 372));\n this.add(getTitlePane(), new com.ulcjava.base.application.GridBagConstraints(0, 0, 3, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getXpertIvyPane(), new com.ulcjava.base.application.GridBagConstraints(0, 1, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getLicensePane(), new com.ulcjava.base.application.GridBagConstraints(0, 2, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getDatabasePane(), new com.ulcjava.base.application.GridBagConstraints(0, 3, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getJavaPane(), new com.ulcjava.base.application.GridBagConstraints(0, 4, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n }", "private void assignComponents() {\r\n if (myTask != null) {\r\n textFieldName.setText(myTask.getName());\r\n textFieldDescription.setText(myTask.getDescription());\r\n textFieldDueDate.setText(myTask.getDueDate().toString());\r\n comboPriority.setSelectedItem(myTask.getPriority());\r\n } else {\r\n textFieldName.setText(null);\r\n textFieldDescription.setText(null);\r\n textFieldDueDate.setText(null);\r\n comboPriority.setSelectedItem(-1);\r\n }\r\n }" ]
[ "0.7158187", "0.7019771", "0.6994555", "0.69620883", "0.69188625", "0.68845546", "0.68482906", "0.6824207", "0.68187994", "0.67966205", "0.67857265", "0.6783526", "0.6773475", "0.6773475", "0.67627937", "0.6757246", "0.67497987", "0.67252356", "0.6713453", "0.66974735", "0.66721654", "0.66721654", "0.66705483", "0.66589636", "0.66534644", "0.66534644", "0.66521955", "0.66521955", "0.66383433", "0.6630662", "0.6602422", "0.6602422", "0.6602211", "0.65656865", "0.6548536", "0.65429467", "0.65160716", "0.65160716", "0.6513277", "0.6508277", "0.6507072", "0.6494588", "0.6490177", "0.64841753", "0.64785665", "0.64324456", "0.6431398", "0.64266586", "0.64264953", "0.64178944", "0.64151573", "0.6410328", "0.6402818", "0.63976574", "0.6382763", "0.63803464", "0.6378979", "0.6350811", "0.63377935", "0.63231397", "0.6311278", "0.6304154", "0.629276", "0.6290851", "0.6288795", "0.62834376", "0.62711173", "0.6263876", "0.6263425", "0.62416565", "0.62384635", "0.62358326", "0.62346625", "0.62306356", "0.6227787", "0.6225591", "0.6221028", "0.6212387", "0.6203363", "0.6198675", "0.6193387", "0.6193387", "0.6192162", "0.6191549", "0.61886716", "0.6187149", "0.6186536", "0.61830163", "0.6181871", "0.6178042", "0.61735076", "0.6171134", "0.6170609", "0.6164237", "0.61582994", "0.61508834", "0.61479706", "0.61387336", "0.61377895", "0.61335665" ]
0.68062943
9
Method that setups up the listener for the user to view the correct movements
private void showCorrectMovements() { _startBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (_curMovementIndex < _game.getCorrectMovements().size()) { if(_curMovementIndex == _game.getCorrectMovements().size() - 1) { _startBtn.setText(getString(R.string.start)); } else { _startBtn.setText(getString(R.string.next)); } _gameView.getGameRects().get(_game.getCorrectMovements().get(_curMovementIndex)).hide(true); _gameView.invalidate(); _curMovementIndex++; } else { for (GameRectangle rect : _gameView.getGameRects()) { rect.hide(false); } _gameView.invalidate(); start(); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "default void onMoveMade(ScotlandYardView view, Move move) {}", "void onMove();", "protected void onMove() {\r\n }", "public void listenForMove(Display disp){\n MoveListener moveListener = new MoveListener(disp, receiver);\n moveListener.start();\n }", "public void onMoveGestureStarted()\n\t{\n\t\tfireEvent(TiC.EVENT_MOVE_START, null);\n\t}", "private void setupListeners() {\t\t\n\n\t\tnextButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\t gameModel.generateGame();\n\t\t\t\t \n\t\t\t\t setGameModel(gameModel);\n\t\t\t\t \n\t\t\t\t //gameModel = new GameModel(gameModel.getList());\n\t\t\t\t \n\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\ttilePanel.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tSystem.out.println(\"PRESS\");\n\t\t\t}\n\t\t\t\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\tSystem.out.println(\"RELEASED\");\n\t\t\t}\n\t\t});\n\t}", "@Override\n public void onMove(float x, float y) {\n }", "public MoveListener(Model model) {\n this.model = model;\n moveP = null;\n description = \"Stuetzpunkte verschieben\";\n }", "@Override\r\n\tprotected void onMove() {\n\t\t\r\n\t}", "@Override\n public void onMove(boolean absolute) {\n \n }", "public void movementStrategy() {\n System.out.println(\"Player has chosen\" + this.playerMovement);\n }", "@Override\n public void simpleUpdate(float tpf) {\n listener.setLocation(cam.getLocation());\n listener.setRotation(cam.getRotation());\n }", "private void setUpListeners() {\n TextView listOfPlacesText = findViewById(R.id.list_of_places_text);\n listOfPlacesText.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(ScavengerHunt.this, ListOfPlaces.class);\n startActivity(intent);\n }\n });\n\n // Goes to List of Places activity\n ImageView topArrow = findViewById(R.id.top_arrow);\n topArrow.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(ScavengerHunt.this, ListOfPlaces.class);\n startActivity(intent);\n }\n });\n\n // Goes to QR Scanner\n TextView checkOffText = findViewById(R.id.checkoff_place_text);\n checkOffText.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n if (ContextCompat.checkSelfPermission(ScavengerHunt.this,\n Manifest.permission.CAMERA) == PackageManager.PERMISSION_GRANTED) {\n Intent intent = new Intent(ScavengerHunt.this, ScanQRCode.class);\n startActivity(intent);\n } else {\n requestCameraPermission();\n }\n }\n });\n\n // Goes to QR Scanner\n ImageView bottomArrow = findViewById(R.id.bottom_arrow);\n bottomArrow.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(ScavengerHunt.this, ScanQRCode.class);\n startActivity(intent);\n }\n });\n\n // Moves camera to Student Union when pressed (in case the user is off campus)\n ImageView pawImage = findViewById(R.id.paw);\n pawImage.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(34.181309518547195, -117.32371486723423), 18));\n }\n });\n\n }", "public void move (View view){\n\n if (toyRobotIsActive){//only run code after PLACE is DONE\n\n if (orientation == 0) {//Move while Facing North\n\n if((robot.getTranslationY()/perUnitY*(-1)) >=4) {\n System.out.println(\"Out of Bounds\");//Chk Error in Logs\n errorMessage(\"Out of Bounds\");//Error display to user via Toast\n } else {\n robot.animate().translationYBy(-perUnitY).setDuration(50);\n } //move robot 1 unit\n\n } else if (orientation == 3 || orientation == -1) {//Facing West\n if((robot.getTranslationX()/perUnitX) <= 0) {\n System.out.println(\"Out of Bounds\");\n errorMessage(\"Out of Bounds\");\n } else {\n robot.animate().translationXBy(-perUnitX).setDuration(50);\n }\n\n\n } else if (orientation == 2 || orientation == -2) {//Facing South\n if((robot.getTranslationY()/perUnitY)*(-1) <= 0){\n System.out.println(\"Out of Bounds\");\n errorMessage(\"Out of Bounds\");\n } else {\n robot.animate().translationYBy(perUnitY).setDuration(50);\n }\n\n\n } else if (orientation == 1 || orientation == -3) {//Facing East\n if((robot.getTranslationX()/perUnitX) >=4){\n System.out.println(\"Out of Bounds\");\n errorMessage(\"Out of Bounds\");\n } else {\n robot.animate().translationXBy(perUnitX).setDuration(50);\n }\n }\n } else errorMessage(\"Please place toy robot\"); //button not active if\n }", "private void setupListener(){\n /*\n Listener to scrool video preview timeline when video timeline\n more than layout width\n */\n videoTimeline.setOnTouchListener(new OnTouchListener() {\n @Override\n public boolean onTouch(View v, final MotionEvent event) {\n switch (event.getAction()){\n // Detect Touch Down\n case MotionEvent.ACTION_DOWN:\n move1 = (int)event.getX();\n break;\n\n // Detect when gesture move\n case MotionEvent.ACTION_MOVE:\n\n // Detect if video preview timeline posision equal than layout start\n if(videoTimeline.getCanvasWidthStart() == 0){\n // Detect when scroll to left\n if((int)event.getX() <= move1){\n final Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n if(isScrollRight && !isScrollLeft){\n move4 = 0;\n }\n move2 = (int)event.getX();\n if(Math.abs((move1 - move2) - move4) < (videoTimeline.getCanvasWidth() - usedWidth)){\n move3 = move1 - move2;\n move5 = move5 + (move3 - move4);\n videoTimeline.setXPos(-Math.abs(move5));\n canvasSeekPos = (move5 * duration) / (videoTimeline.getCanvasWidth() + Math.abs(videoTimeline.getCanvasWidthStart()));\n // videoPlayerControl.setStartPos(rangeSeekPos + canvasSeekPos);\n // videoPlayerControl.setEndPos(rangeSeekEndPos+canvasSeekPos);\n WritableMap event = Arguments.createMap();\n event.putInt(Events.START_POS, rangeSeekPos + canvasSeekPos);\n\n WritableMap event2 = Arguments.createMap();\n event2.putInt(Events.END_POS, rangeSeekEndPos+canvasSeekPos);\n\n eventEmitter.receiveEvent(getId(), EventsEnum.EVENT_GET_START_POS.toString(), event);\n eventEmitter.receiveEvent(getId(), EventsEnum.EVENT_GET_END_POS.toString(), event2);\n move4 = move3;\n isScrollRight = false;\n isScrollLeft = true;\n }\n }\n });\n thread.run();\n }\n\n }else\n // Detect if video preview timeline posision less than layout start\n if(videoTimeline.getCanvasWidthStart() < 0){\n // Detect when scroll to left\n if((int)event.getX() <= move1){\n final Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n if(isScrollRight && !isScrollLeft){\n move4 = 0;\n }\n move2 = (int)event.getX();\n if(Math.abs((move1 - move2) - move4) < (videoTimeline.getCanvasWidth() - usedWidth)){\n move3 = move1 - move2;\n move5 = move5 + (move3 - move4);\n videoTimeline.setXPos(-Math.abs(move5));\n canvasSeekPos = (move5 * duration) / (videoTimeline.getCanvasWidth() + Math.abs(videoTimeline.getCanvasWidthStart()));\n // videoPlayerControl.setStartPos(rangeSeekPos + canvasSeekPos);\n // videoPlayerControl.setEndPos(rangeSeekEndPos+canvasSeekPos);\n WritableMap event = Arguments.createMap();\n event.putInt(Events.START_POS, rangeSeekPos + canvasSeekPos);\n\n WritableMap event2 = Arguments.createMap();\n event2.putInt(Events.END_POS, rangeSeekEndPos+canvasSeekPos);\n\n eventEmitter.receiveEvent(getId(), EventsEnum.EVENT_GET_START_POS.toString(), event);\n eventEmitter.receiveEvent(getId(), EventsEnum.EVENT_GET_END_POS.toString(), event2);\n move4 = move3;\n isScrollRight = false;\n isScrollLeft = true;\n }\n }\n });\n thread.run();\n }else\n // Detect when scroll to right\n if((int)event.getX() > move1){\n final Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n if(!isScrollRight && isScrollLeft){\n move4 = 0;\n }\n move2 = (int) event.getX();\n if (Math.abs((move5 - ((move2 - move1) - move4))) < Math.abs(videoTimeline.getCanvasWidthStart())) {\n move3 = move2 - move1;\n move5 = move5 - (move3 - move4);\n videoTimeline.setXPos(-Math.abs(move5));\n canvasSeekPos = (move5 * duration) / (videoTimeline.getCanvasWidth() + Math.abs(videoTimeline.getCanvasWidthStart()));\n // videoPlayerControl.setStartPos(rangeSeekPos + canvasSeekPos);\n // videoPlayerControl.setEndPos(rangeSeekEndPos+canvasSeekPos);\n WritableMap event = Arguments.createMap();\n event.putInt(Events.START_POS, rangeSeekPos + canvasSeekPos);\n\n WritableMap event2 = Arguments.createMap();\n event2.putInt(Events.END_POS, rangeSeekEndPos+canvasSeekPos);\n\n eventEmitter.receiveEvent(getId(), EventsEnum.EVENT_GET_START_POS.toString(), event);\n eventEmitter.receiveEvent(getId(), EventsEnum.EVENT_GET_END_POS.toString(), event2);\n move4 = move3;\n isScrollRight = true;\n isScrollLeft = false;\n }\n }\n });\n thread.start();\n }\n\n }\n break;\n case MotionEvent.ACTION_UP:\n move4 = 0;\n break;\n default:\n break;\n }\n return true;\n }\n });\n\n /*\n Listener for seekbar control (Seekbar button left and right)\n index (0) = button seek left\n index (1) = button seek right\n value = value of seekButton (0 - 100)\n */\n seekbar.addOnRangeSeekBarListener(new OnRangeSeekBarListener() {\n @Override\n public void onCreate(CustomRangeSeekBarView customRangeSeekBarView, int index, float value) {\n }\n\n @Override\n public void onSeek(CustomRangeSeekBarView customRangeSeekBarView, int index, float value) {\n if(index == 0){\n rangeSeekPos = (int)((value/100) * maxDuration);\n canvasSeekPos = (move5 * duration) / (videoTimeline.getCanvasWidth() + Math.abs(videoTimeline.getCanvasWidthStart()));\n // videoPlayerControl.setStartPos(rangeSeekPos + canvasSeekPos);\n WritableMap event = Arguments.createMap();\n event.putInt(Events.START_POS, rangeSeekPos + canvasSeekPos);\n\n eventEmitter.receiveEvent(getId(), EventsEnum.EVENT_GET_START_POS.toString(), event);\n }else{\n rangeSeekEndPos = (int)(maxDuration * (value/100));\n // videoPlayerControl.setEndPos(rangeSeekEndPos+canvasSeekPos);\n WritableMap event = Arguments.createMap();\n event.putInt(Events.END_POS, rangeSeekEndPos+canvasSeekPos);\n\n eventEmitter.receiveEvent(getId(), EventsEnum.EVENT_GET_END_POS.toString(), event);\n }\n }\n\n @Override\n public void onSeekStart(CustomRangeSeekBarView customRangeSeekBarView, int index, float value) {\n }\n\n @Override\n public void onSeekStop(CustomRangeSeekBarView customRangeSeekBarView, int index, float value) {\n }\n });\n }", "public interface GameViewListener\n{\n public void positionSelected(ChessVector position);\n}", "private void initialSetup() {\n\t\tcaretTimer = new Timeline(new KeyFrame(Duration.millis(GlobalAppSettings.caretBlinkRate), new EventHandler<ActionEvent>(){\r\n\t\t\t@Override\r\n\t\t public void handle(ActionEvent event) {\r\n\t\t\t\tisCaretVisible = !isCaretVisible;\t\t\t\t\r\n\t\t\t\tif(caretParagraph!= null && caretIndex == anchor) {\r\n\t\t\t\t\ttextModifyFacade.getLineViewWithIndex(caretIndex).getColumnView().getDocumentView().refreshOverlay();\r\n\t\t\t\t}\r\n\t\t }\r\n\t\t}));\r\n\t\tcaretTimer.setCycleCount(-1);\r\n\t\tcaretTimer.play();\r\n\t\t\r\n\t\tcaretMovementTimer = new Timeline(new KeyFrame(Duration.millis(GlobalAppSettings.fastDeviceFrameMillis), new EventHandler<ActionEvent>(){\r\n\t\t\t@Override\r\n\t\t public void handle(ActionEvent event) {\r\n\t\t\t\ttotalDestination += GlobalAppSettings.fastDeviceFrameMillis;\r\n\t\t\t\tscreenX = interpolation.apply(startX, destinationX, totalDestination / GlobalAppSettings.caretMovementTime);\r\n\t\t\t\tscreenY = interpolation.apply(startY, destinationY, totalDestination / GlobalAppSettings.caretMovementTime);\r\n\t\t\t\tif(totalDestination > GlobalAppSettings.caretMovementTime){\r\n\t\t\t\t\tscreenX = destinationX;\r\n\t\t\t\t\tscreenY = destinationY;\r\n\t\t\t\t\tcaretMovementTimer.stop();\r\n\t\t\t\t\ttotalDestination = 0;\r\n\t\t\t\t}\r\n\t\t\t\tif(caretParagraph!= null && caretIndex == anchor) {\r\n\t\t\t\t\ttextModifyFacade.getLineViewWithIndex(caretIndex).getColumnView().getDocumentView().refreshOverlay();\r\n\t\t\t\t}\r\n\t\t }\r\n\t\t}));\r\n\t\tcaretMovementTimer.setCycleCount(-1);\r\n\t\t\r\n\t\tcaretIndex = 0;\r\n\t\tanchor = 0;\r\n\t}", "private void setTouchListener() {\n OnTouchListener mTouchListener = new OnTouchListener() {\n\n private float mLastTouchY;\n private float mLastTouchX;\n private int mActivePointerId = MotionEvent.INVALID_POINTER_ID;\n private int counter = 0; // counter to draw only a second for better rendering\n\n @Override\n public boolean onTouch(View view, MotionEvent motionEvent) {\n\n final int action = motionEvent.getActionMasked();\n\n switch (action) {\n case MotionEvent.ACTION_DOWN: {\n final int pointerIndex = motionEvent.getActionIndex();\n final float x = motionEvent.getX(pointerIndex);\n final float y = motionEvent.getY(pointerIndex);\n mLastTouchX = x;\n mLastTouchY = y;\n mActivePointerId = motionEvent.getPointerId(0);\n break;\n }\n\n case MotionEvent.ACTION_MOVE: {\n counter++;\n final int pointerIndex = motionEvent.findPointerIndex(mActivePointerId);\n final float x = motionEvent.getX(pointerIndex);\n final float y = motionEvent.getY(pointerIndex);\n final float dx = x - mLastTouchX;\n final float dy = y - mLastTouchY;\n\n setPositions(dx, dy);\n mLastTouchX = x;\n mLastTouchY = y;\n\n if (counter % 2 == 0) {\n counter = 0;\n mListener.onPositionUpdated();\n }\n break;\n }\n\n case MotionEvent.ACTION_UP: {\n mActivePointerId = MotionEvent.INVALID_POINTER_ID;\n break;\n }\n\n case MotionEvent.ACTION_CANCEL: {\n mActivePointerId = MotionEvent.INVALID_POINTER_ID;\n break;\n }\n\n case MotionEvent.ACTION_POINTER_UP: {\n\n final int pointerIndex = motionEvent.getActionIndex();\n final int pointerId = motionEvent.getPointerId(pointerIndex);\n\n if (pointerId == mActivePointerId) {\n final int newPointerIndex = pointerIndex == 0 ? 1 : 0;\n mLastTouchX = motionEvent.getX(newPointerIndex);\n mLastTouchY = motionEvent.getY(newPointerIndex);\n setX(mLastTouchX);\n setY(mLastTouchY);\n mActivePointerId = motionEvent.getPointerId(newPointerIndex);\n }\n break;\n }\n }\n return true;\n }\n\n /**update the view position after validate the position is in the parent view\n * @param dx x delta\n * @param dy y delta\n * @return\n */\n private void setPositions(float dx, float dy) {\n\n // prevent the point to be drag outside of the parent layout on the X axis\n if (getX() + dx + 2 * POINT_RADIUS >= ((View) getParent()).getWidth())\n setX(((View) getParent()).getWidth() - 2 * POINT_RADIUS);\n else if (getX() + dx < 0)\n setX(0);\n else\n setX(getX() + dx);\n\n\n // prevent the point to be drag outside of the parent layout on the Y axis\n if (getY() + dy + 2 * POINT_RADIUS > ((View) getParent()).getHeight())\n setY(((View) getParent()).getHeight() - 2 * POINT_RADIUS);\n else if (getY() + dy < 0)\n setY(0);\n else\n setY(getY() + dy);\n\n }\n };\n setOnTouchListener(mTouchListener);\n }", "private void handleMovement() {\n if (movements.isEmpty()) return;\n try {\n switch (movements.peek()) {\n case MOVE_UP:\n game.movePlayer(Direction.N);\n break;\n case MOVE_LEFT:\n game.movePlayer(Direction.W);\n break;\n case MOVE_DOWN:\n game.movePlayer(Direction.S);\n break;\n case MOVE_RIGHT:\n game.movePlayer(Direction.E);\n break;\n }\n } catch (Exception ignored) { }\n }", "public void setLocationListener(SeagullLocationListener listener){\n this.moveListener = listener;\n }", "@Override\n public void doOpponentMove(Display disp) {\n listenForMove(disp);\n }", "void onIdentityMove(int fromPosition, int toPosition);", "public void onScannedRobot(ScannedRobotEvent e ) {\n\t\t// Replace the next line with any behavior you would like\n \n \n \n if (target==e.getName()) {\n \tdouble absBearing = e.getBearingRadians() + getHeadingRadians();\n \tsetTurnGunRightRadians(\n \t Utils.normalRelativeAngle(absBearing - \n \t getGunHeadingRadians())\n \t );\n \tfire(1);\n } else if (target==\"NULLNULLNULL\" ) {\n \ttarget=e.getName();\n }\n \n\t\tout.println(\"\\ntarget \"+target+\n\t\t\t\t\t\"\\nmy change \"+\n\t\t\t\t\t\"\\nmy radar \"+getRadarHeadingRadians());\n\t\t\n\t\t\n\t}", "public void attachOnMoveListener(OnMoveMadeListener listener) {\n moveListeners.add(listener);\n }", "@Override\n public void movement() {\n if (isAlive()) {\n //Prüfung ob A oder die linke Pfeiltaste gedrückt ist\n if (Keyboard.isKeyDown(KeyEvent.VK_LEFT) || Keyboard.isKeyDown(KeyEvent.VK_A)) {\n //Änder die X Position um den speed wert nach link (verkleinert sie)\n setPosX(getPosX() - getSpeed());\n //Prüft ob der Spieler den linken Rand des Fensters erreicht hat\n if (getPosX() <= 0) {\n //Setzt die X Position des Spielers an den Rand des Fensters zurück\n setPosX(0);\n }\n }\n //Prüfung ob D oder die rechte Pfeiltaste gedrückt ist\n if (Keyboard.isKeyDown(KeyEvent.VK_RIGHT) || Keyboard.isKeyDown(KeyEvent.VK_D)) {\n //Änder die X Position um den speed wert nach rechts (vergrößert sie)\n setPosX(getPosX() + getSpeed());\n //Prüft ob der Spieler den rechten Rand des Fensters erreicht hat\n if (getPosX() >= Renderer.getWindowSizeX() - getWight() - 7) {\n //Setzt die X Position des Spielers an den Rand des Fensters zurück\n setPosX(Renderer.getWindowSizeX() - getWight() - 7);\n }\n }\n //Aktualsiert die Hitbox\n setBounds();\n }\n }", "@Override\n\tpublic void onScannedRobot(ScannedRobotEvent e)\n\t{\n\t\tif(this.running)\n\t\t{\n\n\t\t\tdouble angleToEnemy = e.getBearing();\n\t\t\tdouble angleToEnemyRadians = e.getBearingRadians();\n\t\n\t // Calculate the angle to the scanned robot\n\t \tdouble angle = Math.toRadians((this.robotStatus.getHeading() + angleToEnemy) % 360);\n\t\n\t // Calculate the coordinates of the robot\n\t \tdouble enemyX = (this.robotStatus.getX() + Math.sin(angle) * e.getDistance());\n\t \tdouble enemyY = (this.robotStatus.getY() + Math.cos(angle) * e.getDistance());\n\t \tdouble enemyDistance = e.getDistance();\n\t \t\n\t \t//Saving enemy position variables in a list of object class.\n\t \t//Only enemy positions from different quadrants, that were never reached will be saved.\n\t \tif((getQuadrant(getX(), getY()) != getQuadrant(enemyX, enemyY)) && (!quadrants.contains((double)getQuadrant(enemyX, enemyY))))\n\t\t\t\tthis.positions.add(new Position<Double>(enemyX, enemyY, enemyDistance, angleToEnemyRadians));\n\t\t}\n\t}", "@Override\n\tpublic void onPlayerMove(PlayerMoveEvent e) {\n\t\t\n\t}", "public final void updateListener() {\n\t\tswitch (state) {\n\t\tcase 0:\n\t\t\taddMouseListenerToResultList();\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\taddMouseListenerToMovieDisplay();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\taddMouseListenerToPersonDisplay();\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\taddMouseListenerToCompanyDisplay();\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\taddMouseListenerToRandomMoviePanel();\n\t\t\tbreak;\n\t\t}\n\t}", "public void getMovements()\n {\n if(\n Greenfoot.isKeyDown(\"Up\")||Greenfoot.isKeyDown(\"W\")||\n Greenfoot.isKeyDown(\"Down\")||Greenfoot.isKeyDown(\"S\")||\n Greenfoot.isKeyDown(\"Right\")||Greenfoot.isKeyDown(\"D\")||\n Greenfoot.isKeyDown(\"Left\") ||Greenfoot.isKeyDown(\"A\")||\n getWorld().getObjects(Traps.class).isEmpty() == false //car trap engendre un mouvement sans les touches directionnelles\n )\n {\n isMoved = true;\n }\n else{isMoved = false;}\n }", "public TraitGuiListener(){\n\t\tplugin = RacesAndClasses.getPlugin();\n\t\tBukkit.getPluginManager().registerEvents(this, plugin);\n\t}", "private void onMoveClicked() {\r\n\t\tWindow.MoveInfo moveInfo = Window.showMoveDialog();\r\n\t\t\r\n\t\tif (moveInfo != null) {\r\n\t\t\tif(!chart.moveStudentToEmptySeat(moveInfo.name, moveInfo.emptySeatRow, moveInfo.emptySeatCol)) {\r\n\t\t\t\tWindow.msg(\"Unable to move student. Either there is no student with this name or the other seat is not empty.\");\r\n\t\t\t}\r\n\t\t\tupdate();\r\n\t\t}\r\n\t}", "@Override\n\tpublic void onMoveCompleted(MoveEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void excute() {\n\t\tmoveEvent.move(commandinfo.getValue() * 200);\n\t}", "private void configure() {\n\t\tthis.pressedListener = new EventHandler<MouseEvent>() {\n\t\t\t@Override\n\t\t\tpublic void handle(MouseEvent me) {\n\t\t\t\tstartDragX = me.getSceneX();\n\t\t\t\tstartDragY = me.getSceneY();\n\t\t\t\tstartNodeX = getTranslateX();\n\t\t\t\tstartNodeY = getTranslateY();\n\t\t\t\tstartWidth = getMaxWidth();\n\t\t\t\tstartHeight = getMaxHeight();\n\t\t\t}\n\t\t};\n\t\ttopDragger.setOnMousePressed(this.pressedListener);\n\t\tbottomDragger.setOnMousePressed(this.pressedListener);\n\t\tleftDragger.setOnMousePressed(this.pressedListener);\n\t\trightDragger.setOnMousePressed(this.pressedListener);\n\n\t\tsetTop(topDragger);\n\t\tsetBottom(bottomDragger);\n\t\tsetLeft(leftDragger);\n\t\tsetRight(rightDragger);\n\t\tsetCenter(center);\n\t\tbuildDragListeners();\n\t\tbuildResizeListeners();\n\t}", "private void movementPhase() {\n ClickObserver.getInstance().setCreatureFlag(\"\");\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(false);\n TheCupGUI.update();\n Board.removeCovers();\n }\n });\n for (Player p : playerList) {\n \tplayer = p;\n player.flipAllUp();\n\t ClickObserver.getInstance().setActivePlayer(player);\n\t ClickObserver.getInstance().setCreatureFlag(\"Movement: SelectMovers\");\n\t InfoPanel.uncover(player.getName());\n\t if (p.getHexesWithPiece().size() > 0) {\n\t \tClickObserver.getInstance().setClickedTerrain(p.getHexesWithPiece().get(0));\n\t }\n\t pause();\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n \tClickObserver.getInstance().whenTerrainClicked();\n \t GUI.getHelpText().setText(\"Movement Phase: \" + player.getName()\n + \", Move your armies\");\n \t Game.getRackGui().setOwner(player);\n }\n });\n\t \n\t while (isPaused) {\n \ttry { Thread.sleep(100); } catch( Exception e ){ return; } \n\t }\n\t InfoPanel.cover(player.getName());\n player.flipAllDown();\n }\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(true);\n }\n });\n ClickObserver.getInstance().setCreatureFlag(\"\");\n }", "private void setEvents() {\n \n // On drag detected event (the start of a drag and drop)\n this.setOnDragDetected( e-> {\n if(this.dragEnabled) {\n Dragboard db;\n \n // if on board transfer mode is move, if from the pieces box, copy\n if(this.isOnBoard) { db = startDragAndDrop(TransferMode.MOVE); }\n else { db = startDragAndDrop(TransferMode.COPY); }\n \n ClipboardContent content = new ClipboardContent();\n content.putString(toString());\n db.setContent(content);\n \n if(StrategoView.ENABLE_CONSOLE_DEBUG) { System.out.print(\"Drag started on \"); }\n this.startFullDrag();\n }\n e.consume();\n });\n \n // Mouse dragover event handler (for accepting a drag and drop)\n this.setOnDragOver(new EventHandler<DragEvent>() {\n @Override\n public void handle(DragEvent event) {\n if(dropEnabled) {\n Dragboard db = event.getDragboard();\n if (db.hasString()) {\n event.acceptTransferModes(TransferMode.COPY_OR_MOVE);\n }\n event.consume();\n }\n }\n });\n \n // Drag over entered event ( mouse is dragging over this)\n this.setOnDragEntered(e -> {\n if(dropEnabled) {\n\n // setting color to \"highlight\" square mouse is over\n Color c = Color.MAGENTA;\n setBorderColor(c);\n \n if(StrategoView.ENABLE_CONSOLE_DEBUG) { System.out.print(\"Drag entered \");}\n }\n });\n\n // Drag over exited event ( mouse is no longer dragging over this)\n this.setOnDragExited(e -> {\n if(dropEnabled) {\n\n // reseting to stored color value (mouse drag no longer over)\n setBorderColor(this.borderColor);\n e.consume();\n \n if(StrategoView.ENABLE_CONSOLE_DEBUG) { System.out.print(\"Drag exited \"); }\n }\n });\n \n // Drag over dropped event (the drag and drop event is completed)\n this.setOnDragDropped(e -> {\n Dragboard db = e.getDragboard();\n boolean success = false;\n int toPieceIndex = pieceIndex; // saving previous piece\n if(db.hasString() && this.dropEnabled) {\n \n //TODO check with controller for valid position\n \n boolean moved = false;\n \n String rawInfo = db.getString();\n String[] info = rawInfo.split(\" \");\n this.playerColor = Color.web(info[5]);\n isVisible = (info[6].substring(0, 4).equals(\"true\"));\n int fromPieceIndex = Integer.parseInt(info[0]);\n int fromRow = StrategoView.translate(Integer.parseInt(info[1]));\n int fromCol = StrategoView.translate(Integer.parseInt(info[2]));\n int toRow = StrategoView.translate(row);\n int toCol = StrategoView.translate(col);\n // getting whether the moved piece came from the board (true) or the pieces box (false)\n boolean fromBoard = (info[4].substring(0, 4).equals(\"true\"));\n if(fromBoard) {\n \n // requesting movement from controller\n if(Piece.isMoveValid(fromRow, fromCol, toRow, toCol, PieceView.convertPieceIndexToType(fromPieceIndex))) {\n // piece will move\n //this.show();\n //controller.getPosition(fromRow, fromCol);\n \n }\n moved = controller.movePiece(fromRow, fromCol, toRow, toCol);\n \n \n if(StrategoView.ENABLE_CONSOLE_DEBUG) {\n if(!moved) {\n System.out.println(\"Not moved (from controller)\");\n }\n System.out.printf(\"From Piece index: %d \", fromPieceIndex);\n System.out.printf(\"To Piece index: %d \", toPieceIndex);\n }\n \n \n }else { // Not from board (placed during setup)\n moved = true;\n this.pieceIndex = fromPieceIndex;\n update();\n if(toPieceIndex != pieceIndex){ // if pieced placed is not the same piece already there\n StrategoView.updateLabels(pieceIndex, -1); // decrement count of new piece\n \n if(toPieceIndex >= 0) { // If position on board was occupied by another piece\n StrategoView.updateLabels(toPieceIndex, 1); // increment count of old piece\n }\n }\n // Changing border color value (drag over exit event will actually set the border color)\n this.borderColor = Color.web(info[3]);\n\n }\n if(moved) {\n success = true;\n }\n \n if(StrategoView.ENABLE_CONSOLE_DEBUG) {\n System.out.print(\"Drag ended on \");\n System.out.printf(\"String: %s %s %s\\n\", info[0], info[1], info[2]);\n System.out.printf(\"Dropped on row %d and col %d\\n\", row, col);\n }\n \n }\n e.setDropCompleted(success);\n \n e.consume();\n \n });\n }", "private void initListener() {\n initPieceListener();\n initButtonsListener();\n }", "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 movement() {\n\n\t\t// If the player wants to move left ie presses 'a' key..\n\t\tif (spaceInvadersGame.getKeyManager().left) {\n\n\t\t\t// If the player is on the left bound of the window do not move.\n\t\t\tif (xPosition <= 0) {\n\n\t\t\t\t// Move the player's xPosition left.\n\t\t\t} else {\n\t\t\t\txPosition -= playerSpeed;\n\t\t\t}\n\n\t\t} else if (spaceInvadersGame.getKeyManager().right) {\n\t\t\tif (xPosition >= 500 - width) {\n\n\t\t\t} else {\n\t\t\t\txPosition += playerSpeed;\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onMovement() {\n showToast(\"设备移动\");\n LogUtil.e(\"move\");\n }", "public void addKeyListeners() {\n\t\t\tkeyAdapter = new KeyAdapter(){\n\t\t\t\t@Override\n\t\t\t\tpublic void keyPressed(KeyEvent e){\n\t\t\t\t\tchar command;\n\t\t\t\t\tif (e.getKeyCode() == KeyEvent.VK_SHIFT) {\n//\t\t\t\t\t\tSystem.out.println(\"FORWARD\");\n\t\t\t\t\t\tcommand = 'F';\n\t\t\t\t\t} else if (e.getKeyCode() == KeyEvent.VK_RIGHT) {\n//\t\t\t\t\t\tSystem.out.println(\"TURN RIGHT\");\n\t\t\t\t\t\tcommand = 'R';\n\t\t\t\t\t} else if (e.getKeyCode() == KeyEvent.VK_LEFT){\n//\t\t\t\t\t\tSystem.out.println(\"TURN LEFT\");\n\t\t\t\t\t\tcommand = 'L';\n\t\t\t\t\t//Let's disable 'F', 'R' and 'L' keys because they're captured by the arrow keys above\n\t\t\t\t\t} else if (e.getKeyCode() == KeyEvent.VK_F || e.getKeyCode() == KeyEvent.VK_R || e.getKeyCode() == KeyEvent.VK_L) {\n\t\t\t\t\t\tcommand = '-';\t//this signifies an invalid command.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcommand = Character.toUpperCase(e.getKeyChar());\n\t\t\t\t\t}\n\n\n\t\t\t\t\tif (currentState == GameState.PLAYING) {\n\t\t\t\t\t\t//If this is tutorial mode, check status first to see if this action should be allowed at all.\n\t\t\t\t\t\t//If not approved, end this method immediately\n\t\t\t\t\t\tif (SAR.this.isTutorialMode()) {\n\t\t\t\t\t\t\tboolean actionApproved = tutorial.checkTutorialActionApproved(command);\n\t\t\t\t\t\t\tif (!actionApproved) return;\n\t\t\t\t\t\t} else if (SAR.this.isPracticeMissionHumanMode()) {\n\t\t\t\t\t\t\tboolean actionApproved = practiceDrillHuman.checkMissionActionApproved(command);\n\t\t\t\t\t\t\tif (!actionApproved) return;\n\t\t\t\t\t\t} else if (SAR.this.isPracticeMissionAIMode()) {\n\t\t\t\t\t\t\tboolean actionApproved = practiceDrillAI.checkMissionActionApproved(command);\n\t\t\t\t\t\t\tif (!actionApproved) return;\n\t\t\t\t\t\t} else if (SAR.this.isFinalMissionMode()){\n\t\t\t\t\t\t\tif (!finalMission.checkMissionActionApproved(command)) return;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//Depending on whether the control mode is \"H\" for manual control only, \"R\" for automated control only,\n\t\t\t\t\t\t//or \"B\" for both modes enabled, certain commands will be disabled / enabled accordingly.\n\t\t\t\t\t\t//For instance, in mode \"R\", only the spacebar command will be recognized.\n\t\t\t\t\t\tif ( (\"H\".contains(SAR.this.controlMode) && \"FRLGSQO\" .contains(String.valueOf(command))) ||\n\t\t\t\t\t\t\t (\"R\".contains(SAR.this.controlMode) && \" \" .contains(String.valueOf(command))) ||\n\t\t\t\t\t\t\t (\"B\".contains(SAR.this.controlMode) && \"FRLGSQO \".contains(String.valueOf(command))) ) {\n\t\t\t\t\t\t\tboolean validKeyTyped = updateGame(currentPlayer, command, 0); // invoke update method with the given command\n\t\t\t\t\t\t\t// Switch player (in the event that we have a 2-player mission)\n\t\t\t\t\t\t\tif(validKeyTyped) {\n\t\t\t\t\t\t\t\tSAR.this.numOfMoves++;\n\t\t\t\t\t\t\t\tPlayer nextPlayer = (currentPlayer == h1 ? h2 : h1);\n\t\t\t\t\t\t\t\tif (nextPlayer.isAlive())\n\t\t\t\t\t\t\t\t\tcurrentPlayer = nextPlayer;\n//\t\t\t\t\t\t\t\tSystem.out.printf(\"Total no. of moves so far: %s\\n\", numOfMoves);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//end nested if\n\n\t\t\t\t\t\t//If we're in tutorial mode, we need to check to see\n\t\t\t\t\t\t//if user has completed what the tutorial asked them to do\n\t\t\t\t\t\tif (SAR.this.isTutorialMode()) {\n\t\t\t\t\t\t\ttutorial.checkTutorialStatus(String.valueOf(command));\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (Character.toUpperCase(command) == 'A') { // this command can be used when mission is over to restart mission\n\t\t\t\t\t\tif (SAR.this.isTutorialMode()) {\n\t\t\t\t\t\t\tinitTutorial();\t//If this was a tutorial mode, restart the same tutorial\n//\t\t\t\t\t\t\ttutorial = new Tutorial(SAR.this);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse initMission();\t\t\t\t\t\t\t\t\t//otherwise, initialize mission again\n\t\t\t\t\t} else if(Character.toUpperCase(command) == 'O' && !SAR.this.isTutorialOrMissionMode()) {\t// open options window as long as this isn't' tutorial mode\n\t\t\t\t\t\topenOptionsWindow();\t//custom method\n\t\t\t\t\t}\n\t\t\t\t\t// Refresh the drawing canvas\n\t\t\t\t\trepaint(); // Call-back paintComponent().\n\n\t\t\t\t}\n\t\t\t\t//end public void keyPressed\n\t\t\t};\n\t\t\t//end keyAdapter initialization\n\t\t\taddKeyListener(keyAdapter);\n\t\t}", "public void setListeners()\n {\n connect.setOnClickListener(this);\n stopMotors.setOnClickListener(this);\n\n mVerticalSeekbarLeft.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {\n @Override\n public void onStopTrackingTouch(SeekBar seekBar) {\n }\n\n @Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n\n }\n\n @Override\n public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n // Convert using scale\n progress = progress - numberOfNotches;\n progress = progress * scale;\n\n // Direction is sent as 0 for forward or 1 for backward\n leftDirection = 0;\n\n // If progress is negative, set direction to 1 and then take abs to avoid sending \"-\" over bluetooth\n if (progress < 0) {\n leftDirection = 1;\n progress = Math.abs(progress);\n }\n\n speedHolder.setLeftSpeed(\"\" + leftDirection + progress);\n mLeftSliderText.setText(String.valueOf(progress));\n\n writeData(\"move \" + speedHolder.getLeftSpeed() + \" \" + speedHolder.getRightSpeed() + \"x\");\n }\n\n });\n\n mVerticalSeekbarRight.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {\n @Override\n public void onStopTrackingTouch(SeekBar seekBar) {\n }\n\n @Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n\n }\n\n @Override\n public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n // Convert using scale\n progress = progress - numberOfNotches;\n progress = progress * scale;\n\n // Direction is sent as 0 for forward or 1 for backward\n rightDirection = 0;\n\n // If progress is negative, set direction to 1 and then take abs to avoid sending \"-\" over bluetooth\n if (progress < 0) {\n rightDirection = 1;\n progress = Math.abs(progress);\n }\n\n speedHolder.setRightSpeed(\"\" + rightDirection + progress);\n mRightSliderText.setText(String.valueOf(progress));\n\n writeData(\"move \" + speedHolder.getLeftSpeed() + \" \" + speedHolder.getRightSpeed() + \"x\");\n }\n });\n }", "public void engage(ScannedRobotEvent e){\r\n setTurnRight(e.getBearing());\r\n setAhead(e.getDistance() + 5);\r\n \r\n //tell where it is heading\r\n fire(1);\r\n }", "public abstract void positionChanged(PositionChangedEvent event);", "public void actionPerformed(ActionEvent event) {\t// Positionsdaten der bewegbaren Objekte aktualisieren und im Anschluss neu zeichnen\n \tEnemy.move();\n\t Player.move();\n\t TemporaryItem.updater();\n\t //ProjectileManager.controlProjectiles();\n\t Projectile.move();\n\t DisplayManager.updateDisplayTimers();\n\t Traps.updater();\n\t\n\t Controls.controls.updateGamePad();\n \trepaint();\t\t// neu zeichnen\n }", "public interface MovementView {\n\n /**\n * Tells the view to add al line for the turtle with the given index starting and ending at the given coordinates\n *\n * @param index - integer turtle index whose movement has drawn the line\n * @param start - coordinate start value in slogo coordinate system\n * @param end - coordinate end value in slogo coordinate system\n */\n void addLine(int index, Coordinate start, Coordinate end);\n\n /**\n * Tells the view to move the turtle with the given index from the start coordinate to the end coordinate\n *\n * @param turtleIndex - integer index of turtle to move\n * @param start - coordinate from which the turtle starts in slogo coordinate system\n * @param end - coordinate from which the turtle ends\n */\n void moveTurtle(int turtleIndex, Coordinate start, Coordinate end);\n\n /**\n * Tells the view to rotate a turtle with the given index\n *\n * @param turtleIndex - integer index of turtle to be rotated\n * @param degrees - double number of degrees to rotate the turtle clockwise\n */\n void rotateTurtle(int turtleIndex, double degrees);\n\n}", "public void openMoving() {\n myActivity.setContentView(R.layout.moving);\n Button movingButtonToGame = myActivity.findViewById(R.id.button10);\n\n movingButtonToGame.setOnClickListener(\n new View.OnClickListener() {\n public void onClick(View v) {\n ShogiHumanPlayer.this.setAsGui(myActivity);\n usingRulesScreen = false;\n if (state != null) {\n receiveInfo(state);\n }\n }\n });\n }", "@Override\r\n public void mouseDragged(MouseEvent e) {\r\n int deltaX = e.getXOnScreen() - screenX;\r\n int deltaY = e.getYOnScreen() - screenY; \r\n \r\n setLocation(myX + deltaX, myY + deltaY);\r\n }", "void playerPositionChanged(Player player);", "@Override\n public void actionPerformed(ActionEvent e){ \n move();\n }", "@Override\r\n\tpublic void handleEvent(GameEvent<S, A> e) {\r\n\t\tif ((e.getType() == EventType.Info || e.getType() == EventType.Change) && e.getState().getTurn() == this.playerId) decideMakeAutomaticMove();\r\n\t}", "@Override\n\tpublic void onPlayerMoveEvent(double x, double y, boolean isMove) {\n\t\tmouseX = x;\n\t\tmouseY = y;\n\t\tthis.isMove = isMove;\n\t}", "private void listen() {\n try {\n this.console.println(MapControl.checkListen(FireSwamp.getPlayer().getPlayerPosition(),\n FireSwamp.getCurrentGame().getGameMap()));\n } catch (MapControlException ex) {\n Logger.getLogger(GameMenuView.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void setupUIListeners() {\n\t\tsetupEditTextListeners();\n\t\tsetupSeekBarsListeners();\n\t}", "@Override\n public void move() {\n System.out.println(\"I roam here and there\");\n }", "protected void setupListeners() {\n\t\t\n\t\tloginBtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent click) {\n\t\t\t\tSession session = theController.validateUser(usernameField.getText(), passwordField.getText());\n\t\t\t\tif(session != null) {\n\t\t\t\t\ttheController.login();\n\t\t\t\t} else {\n\t\t\t\t\tlblInvalid.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnRegister.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent click) {\n\t\t\t\ttheController.register();\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnGuide.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent click) {\n\t\t\t\ttheController.viewGuide();\n\t\t\t}\n\t\t});\n\t\t\n\t}", "@Override\n\tpublic void gameStarted() {\n\t\tupdatePosition(0,0,0);\n//\t\tstartSendingPositionsThread();\n\t}", "public MoveListener(Model model, String description) {\n this.model = model;\n moveP = null;\n this.description = description;\n }", "@Override\n public void updatePosition(float deltaTime) {\n if (isBeingRotated || isBeginMoved) return;\n // prevent overshooting when camera is not updated.\n deltaTime = Math.min(deltaTime, 0.5f);\n\n Vector3f eyeDir = new Vector3f(eyeOffset);\n GLFWWindow window = game.window();\n int width = window.getWidth();\n int height = window.getHeight();\n\n // correction for toolbar\n int corrMouseYPos = (int) mouseYPos;\n int corrMouseXPos = (int) mouseXPos;\n\n // x movement\n if (corrMouseXPos < SCREEN_MOVE_BORDER_SIZE) {\n float value = positionToMovement(corrMouseXPos) * deltaTime;\n eyeDir.normalize(value).cross(getUpVector());\n focus.add(eyeDir.x, eyeDir.y, 0);\n\n } else {\n int xInv = width - corrMouseXPos;\n if (xInv < SCREEN_MOVE_BORDER_SIZE) {\n float value = positionToMovement(xInv) * deltaTime;\n eyeDir.normalize(value).cross(getUpVector());\n focus.sub(eyeDir.x, eyeDir.y, 0);\n }\n }\n\n eyeDir.set(eyeOffset);\n // y movement\n if (corrMouseYPos < SCREEN_MOVE_BORDER_SIZE) {\n float value = positionToMovement(corrMouseYPos) * deltaTime;\n eyeDir.normalize(value);\n focus.sub(eyeDir.x, eyeDir.y, 0);\n\n } else {\n int yInv = height - corrMouseYPos;\n if (yInv < SCREEN_MOVE_BORDER_SIZE) {\n float value = positionToMovement(yInv) * deltaTime;\n eyeDir.normalize(value);\n focus.add(eyeDir.x, eyeDir.y, 0);\n }\n }\n }", "public interface WalkthroughViewListener {\n}", "@Override\n public void mouseDragged(MouseEvent evt) {\n setLocation(evt.getXOnScreen() - posX, evt.getYOnScreen() - posY);\n }", "private UserInteraction() {\n\t\tthis.elevatorManager = ElevatorManager.getInstance();\n\t}", "void userMoveRequested(int playerIndex);", "@Override\n public void onCameraMoveStarted(int i) {\n\n }", "private void setListener() {\n\t\tmSlidingLayer.setOnInteractListener(this);\r\n\t\tmMsgNotifySwitch.setOnCheckedChangeListener(this);\r\n\t\tmMsgSoundSwitch.setOnCheckedChangeListener(this);\r\n\t\tmShowHeadSwitch.setOnCheckedChangeListener(this);\r\n\t\tmAccountSetting.setOnClickListener(this);\r\n\t\tmMyProfile.setOnClickListener(this);\r\n\t\tmFaceJazzEffect.setOnClickListener(this);\r\n\t\tmAcountInfo.setOnClickListener(this);\r\n\t\tmFeedBack.setOnClickListener(this);\r\n\t\tmExitAppBtn.setOnClickListener(this);\r\n\r\n\t}", "public void move() {\n\t\tSystem.out.println(\"Robot Can Move\");\n\t}", "@Override\n\t\t\t\tpublic void onActionMove(float x, float y) {\n\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void onActionMove(float x, float y) {\n\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void onActionMove(float x, float y) {\n\n\t\t\t\t}", "public void keyListener() {\n\t\tsetOnKeyPressed(event -> {\n\t\t\tif(death) {}\n\t\t\telse \t{\n\t\t\tif (event.getCode() == KeyCode.W || event.getCode() == KeyCode.UP)\n\t\t\t{\n\t\t\t\tmove(0, -movementY);\n\t\t\t\tsetImage(frogImg(4));\n\t\t\t\taddPoints(10);\n\n\t\t\t}\n\n\t\t\tif (event.getCode() == KeyCode.A || event.getCode() == KeyCode.LEFT)\n\t\t\t{\n\t\t\t\tmove(-movementX, 0);\n\t\t\t\tsetImage(frogImg(5));\n\t\t\t}\n\n\t\t\tif (event.getCode() == KeyCode.S || event.getCode() == KeyCode.DOWN)\n\t\t\t{\n\t\t\t\tmove(0, movementY);\n\t\t\t\tsetImage(frogImg(6));\n\t\t\t\taddPoints(-10);\n\t\t\t}\n\n\t\t\tif (event.getCode() == KeyCode.D || event.getCode() == KeyCode.RIGHT)\n\t\t\t{\n\t\t\t\tmove(movementX, 0);\n\t\t\t\tsetImage(frogImg(7));\n\t\t\t}\n\n\t\t}\n\t\t\t});\n\t\tsetOnKeyReleased(event -> {\n\t\tif (death) {}\n\t\t\telse {\n\t\t\tif (event.getCode() == KeyCode.W || event.getCode() == KeyCode.UP) {\n\t\t\t\taddPoints(10);\n\t\t\t\tsetImage(frogImg(0));\n\t\t\t\tmove(0, -movementY);\n\t\t\t}\n\t\t\tif (event.getCode() == KeyCode.A || event.getCode() == KeyCode.LEFT) {\n\t\t\t\t move(-movementX, 0);\n\t\t\t\tsetImage(frogImg(1));\n\t\t\t}\n\t\t\tif (event.getCode() == KeyCode.S || event.getCode() == KeyCode.DOWN) {\n\t\t\t\t move(0, movementY);\n\t\t\t\tsetImage(frogImg(2));\n\t\t\t\taddPoints(-10);\n\t\t\t}\n\t\t\tif (event.getCode() == KeyCode.D || event.getCode() == KeyCode.RIGHT) {\n\t\t\t\t move(movementX, 0);\n\t\t\t\tsetImage(frogImg(3));\n\t\t\t}\n\t\t}\n\t\t});\n\t}", "public void setMarioEvents() {\n\t\tCollisionEvent event1, event2, event4, event98, event6, event7, event8, event9;\n\t\tAdvancedCollisionEvent event_1LandsTop4, event_1Touches4NotTop, event5;\n\t\ttry {\n\t\t\t// player with block\n\t\t\tevent1 = new CollisionEvent(\n\t\t\t\t\tArrays.asList(new String[] { \"0\", \"1\" }),\n\t\t\t\t\tPLAYER_LANDING_ON_BLOCK_STRING);\n\t\t\t// enemy with block\n\t\t\tevent2 = new CollisionEvent(Arrays.asList(\"1\", \"2\"),\n\t\t\t\t\tENEMY_ON_BLOCK_STRING);\n\t\t\t// player killing enemy\n\t\t\tevent_1LandsTop4 = new AdvancedCollisionEvent(Arrays.asList(\"0\",\n\t\t\t\t\t\"2\", \"true\", \"false\", \"false\", \"false\", \"false\"),\n\t\t\t\t\tPLAYER_JUMPING_ON_ENEMY_STRING);\n\t\t\t// enemy kills player\n\t\t\tevent_1Touches4NotTop = new AdvancedCollisionEvent(Arrays.asList(\n\t\t\t\t\t\"0\", \"2\", \"false\", \"true\", \"true\", \"true\", \"false\"),\n\t\t\t\t\tENEMY_KILLING_PLAYER_STRING);\n\t\t\t// player reaches goal\n\t\t\tevent4 = new CollisionEvent(Arrays.asList(\"0\", \"3\"),\n\t\t\t\t\tPLAYER_HITTING_GOAL_STRING);\n\t\t\t// player collects coin\n\t\t\tevent98 = new CollisionEvent(Arrays.asList(\"0\", \"5\"),\n\t\t\t\t\tPLAYER_COLLECTING_COIN_STRING);\n\t\t\t// bullet hits enemy\n\t\t\tevent5 = new AdvancedCollisionEvent(Arrays.asList(\"2\", \"150\",\n\t\t\t\t\t\"true\", \"true\", \"true\", \"true\", \"true\"),\n\t\t\t\t\tBULLET_HITTING_ENEMY_STRING);\n\t\t\t// player gets gun power up\n\t\t\tevent6 = new CollisionEvent(Arrays.asList(\"0\", \"6\"),\n\t\t\t\t\tPLAYER_HITS_GUN_POWERUP_STRING);\n\t\t\t// player gets invincibility power up\n\t\t\tevent7 = new CollisionEvent(Arrays.asList(\"0\", \"7\"),\n\t\t\t\t\tPLAYER_HITS_INVINCIBILITY_POWERUP_STRING);\n\t\t\t// player gets size power up\n\t\t\tevent8 = new CollisionEvent(Arrays.asList(\"0\", \"8\"),\n\t\t\t\t\tPLAYER_HITS_SIZE_POWER_UP_STRING);\n\t\t\t// player gets speed power up\n\t\t\tevent9 = new CollisionEvent(Arrays.asList(\"0\", \"9\"),\n\t\t\t\t\tPLAYER_HITS_SPEED_POWERUP_STRING);\n\t\t\tAddPowerUpAction action13 = new AddPowerUpAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"0\", \"8\",\n\t\t\t\t\t\t\tSIZE_POWER_UP_STRING, \"10\", \"mario\")));\n\t\t\tAddPowerUpAction action12 = new AddPowerUpAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"0\", \"9\",\n\t\t\t\t\t\t\tSPEED_POWER_UP_STRING, \"10\", \"bullet\")));\n\n\t\t\tDecreaseObjectHitPointsByCollisionAction action14 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"8\", \"0\")));\n\t\t\tDecreaseObjectHitPointsByCollisionAction action15 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"9\", \"0\")));\n\t\t\tDecreaseObjectHitPointsByCollisionAction action9 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"6\", \"0\")));\n\t\t\tDecreaseObjectHitPointsByCollisionAction action11 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"7\", \"0\")));\n\t\t\tAddPowerUpAction action7 = new AddPowerUpAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"0\", \"6\",\n\t\t\t\t\t\t\tGUN_POWERUP_STRING, \"10\", \"mario\")));\n\t\t\tAddPowerUpAction action8 = new AddPowerUpAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"0\", \"7\",\n\t\t\t\t\t\t\tINVINCIBILITY_POWERUP_STRING, \"10\", \"mobile\")));\n\t\t\tCollideSolidAction action = new CollideSolidAction(\n\t\t\t\t\tnew Tuple<Integer>(0, 1).toListString());\n\t\t\tCollideSolidAction action2 = new CollideSolidAction(\n\t\t\t\t\tnew Tuple<Integer>(2, 1).toListString());\n\t\t\tKillPlayerAction action3 = new KillPlayerAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"0\")));\n\n\t\t\tDecreaseObjectHitPointsByCollisionAction action10 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"5\", \"0\")));\n\t\t\tDecreaseObjectHitPointsByCollisionAction action5 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"150\", \"2\")));\n\t\t\tDecreaseObjectHitPointsByCollisionAction action6 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"2\", \"150\")));\n\t\t\tEndLevelAction action4 = new EndLevelAction(new ArrayList<String>());\n\n\t\t\tChangeScoreAction action98 = new ChangeScoreAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"5\")));\n\t\t\tDecreaseObjectHitPointsByCollisionAction action_1Kills4 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"2\", \"0\")));\n\n\t\t\tevent1.addAction(action);\n\t\t\tevent2.addAction(action2);\n\t\t\tevent_1Touches4NotTop.addAction(action3);\n\t\t\tevent_1LandsTop4.addAction(action_1Kills4);\n\t\t\tevent4.addAction(action4);\n\t\t\tevent98.addAction(action98);\n\t\t\tevent98.addAction(action10);\n\t\t\tevent5.addAction(action5, action6);\n\t\t\tevent6.addAction(action7, action9);\n\t\t\tevent7.addAction(action8, action11);\n\t\t\tevent9.addAction(action12, action15);\n\t\t\tevent8.addAction(action13, action14);\n\t\t\tmyLevel.addEvent(event1, event2, event_1Touches4NotTop, event4,\n\t\t\t\t\tevent98, event_1LandsTop4, event5, event6, event7, event8,\n\t\t\t\t\tevent9);\n\t\t\tmyLevelObjectBar.initializeEventsMap(myLevel.getEvents());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setListeners(){\n\t\t\n\t\tthis.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// chosen to add new patient\n\t\t\t\t\n\t\t\t\tArrayList<String> constructorInput = null;\n\t\t\t\tconstructorInput = NewPatientWindow.showInputdialog(true);\n\t\t\t\t\n\t\t\t\t// if cancel or close chosen on new patient window:\n\t\t\t\tif (constructorInput == null)\n\t\t\t\t\treturn; \n\t\t\t\t\n\t\t\t\t//else:\n\t\t\t\tBrainFreezeMain.patients.add(new Patient(\n\t\t\t\t\t\t(constructorInput.toArray( new String[constructorInput.size()]))));\n\t\t\t\tBrainFreezeMain.currentPatientIndex = BrainFreezeMain.patients.size()-1;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tLeftPanel.refreshPatientLabel(); // change to patient list, update label\n\t\t\t\tLeftPanel.refreshPatientData(); // change to patient, update data\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t}", "boolean prepareToMove();", "private void adjustObserverLocationByClick(int dir, double offset) {\n\t\tHBox n0 = (HBox) uicontrols.getChildren().get(0);\n\t\tHBox n1 = (HBox) uicontrols.getChildren().get(1);\n\t\tTextField t0 = (TextField) n0.getChildren().get(1); // Lat\n\t\tTextField t1 = (TextField) n1.getChildren().get(1); // Long\n\t\tdouble latitude = 0.0;\n\t\tdouble longitude = 0.0;\n\t\ttry {\n\t\t\tlatitude = Double.parseDouble(t0.getText());\n\t\t\tlongitude = Double.parseDouble(t1.getText());\n\t\t} catch(NumberFormatException e) {\n\t\t}\n\t\tif (dir == 1) { // NW\n\t\t\tlatitude += offset;\n\t\t\tlongitude -= (offset * 4);\n\t\t\tif (latitude > 89.99999) {\n\t\t\t\tlatitude = 89.99999;\n\t\t\t}\n\t\t\tif (longitude < -180.0) {\n\t\t\t\tlongitude += 180.0;\n\t\t\t\tlongitude = 180.0 + longitude;\n\t\t\t}\n\t\t} else if (dir == 2) { // NE\n\t\t\tlatitude += offset;\n\t\t\tlongitude += (offset * 4);\n\t\t\tif (latitude > 89.99999) {\n\t\t\t\tlatitude = 89.99999;\n\t\t\t}\n\t\t\tif (longitude > 180.0) {\n\t\t\t\tlongitude -= 180.0;\n\t\t\t\tlongitude = -180.0 + longitude;\n\t\t\t}\n\t\t} else if (dir == 3) { // SW\n\t\t\tlatitude -= offset;\n\t\t\tlongitude -= (offset * 4);\n\t\t\tif (latitude < -89.99999) {\n\t\t\t\tlatitude = -89.99999;\n\t\t\t}\n\t\t\tif (longitude < -180.0) {\n\t\t\t\tlongitude += 180.0;\n\t\t\t\tlongitude = 180.0 + longitude;\n\t\t\t}\n\t\t} else if (dir == 4) { // SE\n\t\t\tlatitude -= offset;\n\t\t\tlongitude += (offset * 4);\n\t\t\tif (latitude < -89.99999) {\n\t\t\t\tlatitude = -89.99999;\n\t\t\t}\n\t\t\tif (longitude > 180.0) {\n\t\t\t\tlongitude -= 180.0;\n\t\t\t\tlongitude = -180.0 + longitude;\n\t\t\t}\n\t\t}\n\t\tt0.setText(\"\" + latitude);\n\t\tt1.setText(\"\" + longitude);\n\t}", "private void setInputListeners () {\r\n // initialize input state\r\n myLastKeyPressed = NO_KEY_PRESSED;\r\n myKeys = new TreeSet<Integer>();\r\n addKeyListener(new KeyAdapter() {\r\n @Override\r\n public void keyPressed (KeyEvent e) {\r\n // resets key after being used once. Does not affect getKeysPressed.\r\n if (myLastKeyPressed == e.getKeyCode()) {\r\n myLastKeyPressed = NO_KEY_PRESSED;\r\n }\r\n else {\r\n myLastKeyPressed = e.getKeyCode();\r\n }\r\n myKeys.add(e.getKeyCode());\r\n }\r\n\r\n @Override\r\n public void keyReleased (KeyEvent e) {\r\n myKeys.remove(e.getKeyCode());\r\n }\r\n });\r\n myLastMousePosition = NO_MOUSE_PRESSED;\r\n addMouseMotionListener(new MouseMotionAdapter() {\r\n @Override\r\n public void mouseDragged (MouseEvent e) {\r\n myLastMousePosition = e.getPoint();\r\n }\r\n });\r\n addMouseListener(new MouseAdapter() {\r\n @Override\r\n public void mousePressed (MouseEvent e) {\r\n myLastMousePosition = e.getPoint();\r\n myMouseClick = true;\r\n }\r\n\r\n @Override\r\n public void mouseReleased (MouseEvent e) {\r\n myLastMousePosition = NO_MOUSE_PRESSED;\r\n myMouseClick = false;\r\n }\r\n });\r\n }", "private void handleMovements(GameGUI gui) {\r\n\t\tboolean accelerate = gui.isUpPressed();\r\n\t\tint turn = NO_TURNING;\r\n\t\tif (gui.isLeftPressed()) {\r\n\t\t\tturn++;\r\n\t\t}\r\n\t\tif (gui.isRightPressed()) {\r\n\t\t\tturn--;\r\n\t\t}\r\n\t\tgetPhysics().move(accelerate, turn);\r\n\r\n\t}", "public void update() {\n\t\tint xa = 0, ya = 0; \n\t\tif(game.getPlayer().x < 0){\n\t\t\txa -= 2;\n\t\t}else if(game.getPlayer().x + 32 > game.getScreen().width){\n\t\t\txa += 2;\n\t\t}\n\t\tif(game.getPlayer().y < 0){\n\t\t\tya -= 2;\n\t\t}else if(game.getPlayer().y + 32 > game.getScreen().height){\n\t\t\tya +=2;\n\t\t}\n\t\t\n\t\tif (xa != 0 || ya!= 0) move(xa, ya);\n\t\t\n\t\t//detects if the mouse is clicking on the interface\n\t\t/*if(Mouse.getButton() == 1 && Mouse.getX() >= 0 && Mouse.getX() <= 1200 && Mouse.getY() > 525 && Mouse.getY() < 675) {\n\t\t\tclicked = true;\n\t\t} else {\n\t\t\tclicked = false;\n\t\t}*/\n\t\t\n\t\treturn;\n\t}", "@Override\n public void handle(MouseEvent event) {\n if( robberWillMove ){\n System.out.println(\"robber1\");\n robberWillMove = false;\n robberIsMoving = true;\n }\n }", "public void onEventSelected(int position);", "public void setMovementChanged(boolean movementChanged) {\n this.movementChanged = movementChanged;\n }", "private void announcementBtnListener() {\n announcementBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n game.setScreen(new AnnouncementsScreen(game));\n }\n });\n }", "@Override\r\n protected void createListeners(\r\n ) {\r\n \tsuper.createListeners();\r\n \t\r\n inputManager.addMapping( \"nextScene\"\r\n , new KeyTrigger( KeyInput.KEY_RETURN ) );\r\n inputManager.addMapping( \"priorScene\"\r\n , new KeyTrigger( KeyInput.KEY_BACKSLASH ) );\r\n inputManager.addMapping( \"abortLoad\"\r\n , new KeyTrigger( KeyInput.KEY_DELETE ) );\r\n \r\n ActionListener aListener = new CSGTestActionListener(); \r\n inputManager.addListener( aListener, \"nextScene\" );\r\n inputManager.addListener( aListener, \"priorScene\" );\r\n inputManager.addListener( aListener, \"abortLoad\" );\r\n }", "@Override\r\n\tpublic void onMovableChanged(Movable movable) {\r\n\t\tControllerEventSource.notifyMovableChanged(movable);\r\n\t}", "@Override\n public boolean onTouch(View view, MotionEvent motionEvent) {\n\n final int action = motionEvent.getActionMasked();\n\n switch (action) {\n case MotionEvent.ACTION_DOWN: {\n final int pointerIndex = motionEvent.getActionIndex();\n final float x = motionEvent.getX(pointerIndex);\n final float y = motionEvent.getY(pointerIndex);\n mLastTouchX = x;\n mLastTouchY = y;\n mActivePointerId = motionEvent.getPointerId(0);\n break;\n }\n\n case MotionEvent.ACTION_MOVE: {\n counter++;\n final int pointerIndex = motionEvent.findPointerIndex(mActivePointerId);\n final float x = motionEvent.getX(pointerIndex);\n final float y = motionEvent.getY(pointerIndex);\n final float dx = x - mLastTouchX;\n final float dy = y - mLastTouchY;\n\n setPositions(dx, dy);\n mLastTouchX = x;\n mLastTouchY = y;\n\n if (counter % 2 == 0) {\n counter = 0;\n mListener.onPositionUpdated();\n }\n break;\n }\n\n case MotionEvent.ACTION_UP: {\n mActivePointerId = MotionEvent.INVALID_POINTER_ID;\n break;\n }\n\n case MotionEvent.ACTION_CANCEL: {\n mActivePointerId = MotionEvent.INVALID_POINTER_ID;\n break;\n }\n\n case MotionEvent.ACTION_POINTER_UP: {\n\n final int pointerIndex = motionEvent.getActionIndex();\n final int pointerId = motionEvent.getPointerId(pointerIndex);\n\n if (pointerId == mActivePointerId) {\n final int newPointerIndex = pointerIndex == 0 ? 1 : 0;\n mLastTouchX = motionEvent.getX(newPointerIndex);\n mLastTouchY = motionEvent.getY(newPointerIndex);\n setX(mLastTouchX);\n setY(mLastTouchY);\n mActivePointerId = motionEvent.getPointerId(newPointerIndex);\n }\n break;\n }\n }\n return true;\n }", "private void processNewMoveEvent(MotionEvent ev) {\n float distanceMoved = mClickY - ev.getY();\n if (Math.abs(distanceMoved) > mTouchSlop ) {\n if (distanceMoved < 0) {\n // scrolled down so show FAB\n mController.sendEvent(this, EventType.SHOW_FAB, null, null, null,\n 0, 0, 0, null, null);\n } else {\n // scrolle up so hide FAB\n mController.sendEvent(this, EventType.HIDE_FAB, null, null, null,\n 0, 0, 0, null, null);\n\n }\n // set Y to the current place in the gesture\n mClickY = ev.getY();\n }\n }", "private void setListener() {\r\n\t\taddGridRowListener(new GridRowListenerAdapter() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onRowClick(GridPanel grid, int rowIndex, EventObject e) {\r\n\t\t\t\tif (!trackPointOverlay.isVisible()) {\r\n\t\t\t\t\tsetVisible(true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tint currentRowIndex = rowIndex + (getCurrentPage() - 1)\r\n\t\t\t\t\t\t* getPageSize();\r\n\t\t\t\ttrackPointOverlay.getWaypointOverlay(currentRowIndex)\r\n\t\t\t\t\t\t.showInfoWindow();\r\n\t\t\t\tMapPanel.getMapWidgetInstance().setCenter(\r\n\t\t\t\t\t\ttrackPointOverlay.getWaypoint(currentRowIndex)\r\n\t\t\t\t\t\t\t\t.getLatLng());\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}", "public void updatePosition(){\n\t\t//maps the position to the closest \"grid\"\n\t\tif(y-curY>=GameSystem.GRID_SIZE/2){\n\t\t\tcurY=curY+GameSystem.GRID_SIZE;\n\t\t\tyGridNearest++;\n\t\t}\n\t\telse if(curX-x>=GameSystem.GRID_SIZE/2){\n\t\t\tcurX=curX-GameSystem.GRID_SIZE;\n\t\t\txGridNearest--;\n\t\t}\n\t\telse if(x-curX>=GameSystem.GRID_SIZE/2){\n\t\t\tcurX=curX+GameSystem.GRID_SIZE;\n\t\t\txGridNearest++;\n\t\t}\n\t\telse if(curY-y>=GameSystem.GRID_SIZE/2){\n\t\t\tcurY=curY-GameSystem.GRID_SIZE;\n\t\t\tyGridNearest--;\n\t\t}\n\t\t//sets the last completely arrived location grid\n\t\tif(y-yTemp>=GameSystem.GRID_SIZE){\n\t\t\tyTemp=yTemp+GameSystem.GRID_SIZE;\n\t\t\ty=yTemp;\n\t\t\tlastY++;\n\t\t}\n\t\telse if(xTemp-x>=GameSystem.GRID_SIZE){\n\t\t\txTemp=xTemp-GameSystem.GRID_SIZE;\n\t\t\tx=xTemp;\n\t\t\tlastX--;\n\t\t}\n\t\telse if(x-xTemp>=GameSystem.GRID_SIZE){\n\t\t\txTemp=xTemp+GameSystem.GRID_SIZE;\n\t\t\tx=xTemp;\n\t\t\tlastX++;\n\t\t}\n\t\telse if(yTemp-y>=GameSystem.GRID_SIZE){\n\t\t\tyTemp=yTemp-GameSystem.GRID_SIZE;\n\t\t\ty=yTemp;\n\t\t\tlastY--;\n\t\t}\n\t\t//only updates nextX and nextY when the move buttons are being pressed down\n\t\t/*\n\t\tif(movable){\n\t\t\tif(direction.equals(\"right\")){\n\t\t\t\t\tnextX=lastX+1;\n\t\t\t\t\tnextY=lastY;\n\t\t\t}\n\t\t\telse if(direction.equals(\"left\")){\n\t\t\t\tnextX=lastX-1;\n\t\t\t\tnextY=lastY;\n\t\t\t}\n\t\t\telse if(direction.equals(\"up\")){\n\t\t\t\tnextY=lastY-1;\n\t\t\t\tnextX=lastX;\n\t\t\t}\n\t\t\telse if(direction.equals(\"down\")){\n\t\t\t\tnextY=lastY+1;\n\t\t\t\tnextX=lastX;\n\t\t\t}\n\t\t}\n\t\t*/\n\t\t\n\t}", "public void addListeners() {\n\t\tsave.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t//Set the window variables\r\n\t\t\t\tEnvironmentVariables.setWidth(Float.parseFloat(width.getText()));\r\n\t\t\t\tEnvironmentVariables.setHeight(Float.parseFloat(height.getText()));\r\n\t\t\t\tEnvironmentVariables.setTitle(title.getText());\r\n\t\t\t\tupdateGameWorld();\r\n\t\t\t\t//go to save function\r\n\t\t\t\tsaveGame();\r\n\t\t\t\t\r\n\t\t\t\tWindow.getFrame().setVisible(false);\r\n\t\t\t\tWindow.getFrame().dispose();\r\n\t\t\t\t\r\n\t\t\t\tHomePage.buildHomePage();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\t//reset to empty world\r\n\t\treset.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tEnvironmentVariables.clearWorld();\r\n\t\t\t\tWindow.render();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private void hookDraggablePanelListeners() {\n draggablePanel.setDraggableListener(new DraggableListener() {\n @Override\n public void onMaximized() {\n //playVideo();\n }\n\n @Override\n public void onMinimized() {\n //Empty\n }\n\n @Override\n public void onClosedToLeft() {\n\n }\n\n @Override\n public void onClosedToRight() {\n\n }\n });\n }", "private void setupListeners() {\n\t\tfor (int i = 0; i < _controlPoints.length; i++) {\n\t\t\taddControlPointListener(_controlPoints[i][0], i);\n\t\t\taddControlPointListener(_controlPoints[i][1], i);\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < _selectionButtons.length; i++) {\n\t\t\taddPointSelectionButtonListener(i);\n\t\t}\n\t}", "private void onMovementComplete() {\n Callable<Boolean> movementCompleted;\n Consumer<Method> movementFailed;\n\n synchronized (_mutex) {\n movementCompleted = _movementCompleted;\n movementFailed = _movementFailed;\n\n _movementCompleted = null;\n _movementFailed = null;\n }\n\n boolean bMovementCompleted = false;\n if (movementCompleted != null) {\n try {\n bMovementCompleted = movementCompleted.call();\n } catch (Exception e) {\n _log.error(\"An error occurred while completing a movement.\", e);\n }\n }\n\n if (!bMovementCompleted && movementFailed != null) {\n movementFailed.accept(null);\n }\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n \t\t gd.getTank().move();\n\t\t}", "private void setListener() {\n\t}", "private void display_StaffMenu(Character user, int start_x, int start_y) {\n in_Menu = true;\n Staff_Menu.setMenu_switch(true);\n Staff_Menu.setUser(cursor.getAim());\n bottom_screen.show_attack = true;\n bottom_screen.cleanGreenArea();\n Staff_Menu.setCursor_y(0);\n bottom_screen.add_Affect_Area(Staff_Menu.getStaff().get(0));\n if (Staff_Menu.getStaff().get(0) != null) {\n System.out.println(\"staff\");\n } else {\n System.out.println(\"empty\");\n }\n\n addKeyListener(new KeyListener() {\n\n @Override\n public void keyTyped(KeyEvent e) {\n\n }\n\n @Override\n public void keyPressed(KeyEvent e) {\n switch (e.getKeyCode()) {\n case KeyEvent.VK_UP:\n if (Staff_Menu.isMenu_switch()) {\n Staff_Menu.shift_CursorY(-1);\n } else {\n Staff_Menu.setTarget(bottom_screen.pre_StaffAim(Staff_Menu.getAim_staff()));\n FacetoTarget(user, Staff_Menu.getTarget());\n }\n break;\n\n case KeyEvent.VK_DOWN:\n if (Staff_Menu.isMenu_switch()) {\n Staff_Menu.shift_CursorY(1);\n } else {\n Staff_Menu.setTarget(bottom_screen.next_StaffAim(Staff_Menu.getAim_staff()));\n FacetoTarget(user, Staff_Menu.getTarget());\n }\n break;\n\n case KeyEvent.VK_LEFT:\n if (!Staff_Menu.isMenu_switch()) {\n Staff_Menu.setTarget(bottom_screen.pre_StaffAim(Staff_Menu.getAim_staff()));\n FacetoTarget(user, Staff_Menu.getTarget());\n }\n break;\n case KeyEvent.VK_RIGHT:\n if (!Staff_Menu.isMenu_switch()) {\n Staff_Menu.setTarget(bottom_screen.next_StaffAim(Staff_Menu.getAim_staff()));\n FacetoTarget(user, Staff_Menu.getTarget());\n }\n break;\n\n case KeyEvent.VK_Z:\n if (Staff_Menu.isMenu_switch()) {\n Camp camp;\n\n switch (Staff_Menu.getAim_staff().getMagicEffect().getClass().getName()) {\n case \"Item.HealMagic\":\n camp = Camp.PLAYER;\n break;\n case \"Item.UnlockMagic\":\n camp = Camp.Envir;\n break;\n default:\n camp = Camp.ENEMY;\n break;\n }\n Staff_Menu.setTarget(bottom_screen.generate_TargetList(camp, Staff_Menu.getAim_staff()).get(0));\n FacetoTarget(user, Staff_Menu.getTarget());\n if (!bottom_screen.AimList.isEmpty()) {\n bottom_screen.aim = bottom_screen.AimList.get(0);\n bottom_screen.item_aim = null;\n }\n if (!bottom_screen.LockList.isEmpty()) {\n bottom_screen.item_aim = bottom_screen.LockList.get(0);\n bottom_screen.aim = null;\n }\n\n Staff_Menu.setMenu_switch(false);\n bottom_screen.show_Aim = true;\n } else {\n switch (Staff_Menu.getAim_staff().getMagicEffect().getClass().getName()) {\n case \"Item.HealMagic\":\n display_HP(1, bottom_screen.aim);\n Staff_Menu.getAim_staff().staff(bottom_screen.aim, bottom_screen.cursor.getAim());\n ;\n display_HP_Timer(window_1, Staff_Menu.getAim_staff());\n break;\n\n case \"Item.UnlockMagic\":\n System.out.println(\"apply unlock magic to \" + bottom_screen.item_aim.getName());\n if (bottom_screen.item_aim instanceof Gate) {\n unlock_Gate((Gate) bottom_screen.item_aim, Staff_Menu.getAim_staff());\n\n } else if (bottom_screen.item_aim instanceof Chest) {\n unlock_Chest(cursor.getAim(), (Chest) bottom_screen.item_aim, Staff_Menu.getAim_staff());\n }\n cursor.getAim().setMovepoint(false);\n\n break;\n default:\n break;\n }\n Staff_Menu.clean();\n bottom_screen.clean();\n removeKeyListener(this);\n character_map[start_x + bottom_screen.left][start_y + bottom_screen.top] = null;\n character_map[user.x + bottom_screen.left][user.y + bottom_screen.top] = user;\n\n\n }\n break;\n\n case KeyEvent.VK_X:\n if (Staff_Menu.isMenu_switch()) {\n Staff_Menu.setVisible(false);\n removeKeyListener(this);\n try {\n display_CharMenu(cursor.getAim(), start_x, start_y);\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n } else {\n Staff_Menu.setMenu_switch(true);\n bottom_screen.show_Aim = false;\n }\n break;\n }\n Staff_Menu.repaint();\n }\n\n @Override\n public void keyReleased(KeyEvent e) {\n\n }\n });\n Staff_Menu.setVisible(true);\n }", "public void startMovingToTarget() \r\n {\n movingToTarget = true;\r\n }", "public void findRobotPosition(){\n targetVisible = false;\n for (VuforiaTrackable trackable : allTrackables) {\n if (((VuforiaTrackableDefaultListener)trackable.getListener()).isVisible()) {\n telemetry.addData(\"Visible Target\", trackable.getName());\n targetVisible = true;\n\n // Get the position of the visible target and put the X & Y position in visTgtX and visTgtY\n // We will use these for determining bearing and range to the visible target\n OpenGLMatrix tgtLocation = trackable.getLocation();\n VectorF tgtTranslation = tgtLocation.getTranslation();\n visTgtX = tgtTranslation.get(0) / mmPerInch;\n visTgtY = tgtTranslation.get(1) / mmPerInch;\n //telemetry.addData(\"Tgt X & Y\", \"{X, Y} = %.1f, %.1f\", visTgtX, visTgtY);\n\n // getUpdatedRobotLocation() will return null if no new information is available since\n // the last time that call was made, or if the trackable is not currently visible.\n OpenGLMatrix robotLocationTransform = ((VuforiaTrackableDefaultListener)trackable.getListener()).getUpdatedRobotLocation();\n if (robotLocationTransform != null) {\n lastLocation = robotLocationTransform;\n }\n break;\n }\n }\n\n // Provide feedback as to where the robot is located (if we know).\n if (targetVisible) {\n // express position (translation) of robot in inches.\n VectorF translation = lastLocation.getTranslation();\n //telemetry.addData(\"Pos (in)\", \"{X, Y, Z} = %.1f, %.1f, %.1f\",\n // translation.get(0) / mmPerInch, translation.get(1) / mmPerInch, translation.get(2) / mmPerInch);\n\n // express the rotation of the robot in degrees.\n Orientation rotation = Orientation.getOrientation(lastLocation, EXTRINSIC, XYZ, DEGREES);\n //telemetry.addData(\"Rot (deg)\", \"{Roll, Pitch, Heading} = %.0f, %.0f, %.0f\", rotation.firstAngle, rotation.secondAngle, rotation.thirdAngle);\n\n // Robot position is defined by the standard Matrix translation (x and y)\n robotX = translation.get(0)/ mmPerInch;\n robotY = translation.get(1)/ mmPerInch;\n\n // Robot bearing (in +vc CCW cartesian system) is defined by the standard Matrix z rotation\n robotBearing = rotation.thirdAngle;\n\n // target range is based on distance from robot position to the visible target\n // Pythagorean Theorum\n targetRange = Math.sqrt((Math.pow(visTgtX - robotX, 2) + Math.pow(visTgtY - robotY, 2)));\n\n // target bearing is based on angle formed between the X axis to the target range line\n // Always use \"Head minus Tail\" when working with vectors\n targetBearing = Math.toDegrees(Math.atan((visTgtY - robotY)/(visTgtX - robotX)));\n\n // Target relative bearing is the target Heading relative to the direction the robot is pointing.\n // This can be used as an error signal to have the robot point the target\n relativeBearing = targetBearing - robotBearing;\n // Display the current visible target name, robot info, target info, and required robot action.\n\n telemetry.addData(\"Robot\", \"[X]:[Y] (Heading) [%5.0fin]:[%5.0fin] (%4.0f°)\",\n robotX, robotY, robotBearing);\n telemetry.addData(\"Target\", \"[TgtRange] (TgtBearing):(RelB) [%5.0fin] (%4.0f°):(%4.0f°)\",\n targetRange, targetBearing, relativeBearing);\n }\n else {\n telemetry.addData(\"Visible Target\", \"none\");\n }\n }", "@Override\r\n public void mouseDragged(MouseEvent e) {\n int thisX = getLocation().x;\r\n int thisY = getLocation().y;\r\n\r\n //determina el desplazamiento\r\n int xMoved = (thisX + e.getX()) - (thisX + initialClick.x);\r\n int yMoved = (thisY + e.getY()) - (thisY + initialClick.y);\r\n\r\n //mueve la ventana a su nueva posicion\r\n int X = thisX + xMoved;\r\n int Y = thisY + yMoved;\r\n this.setLocation(X, Y);\r\n }", "private void moved(MouseEvent e)\r\n {\n }", "public void start() {\r\n view.addListener(this);\r\n view.makeVisible();\r\n view.display();\r\n }", "private void setupEventHandlers() {\n myMap.addEventHandler(MapViewEvent.MAP_CLICKED, event -> {\n event.consume();\n final Coordinate newPosition = event.getCoordinate().normalize();\n latitude.setText(newPosition.getLatitude().toString());\n longitude.setText(newPosition.getLongitude().toString());\n\n this.markerClick.setPosition(newPosition);\n this.myMap.addMarker(this.markerClick);\n });\n }", "public interface GameListener {\n\n /**\n * Called when a player makes a move in the game.\n * @param playerIndex Player identifier\n * @param move Move made\n */\n void moveAdded(int playerIndex, Move move);\n\n /**\n * Called when a move is undone.\n */\n void moveRemoved(Move move);\n\n /**\n * Called when a haslam.blackstone.players turn has started.\n * @param playerIndex Player identifier\n */\n void turnStarted(int playerIndex);\n\n /**\n * Called when the game has started.\n */\n void gameStarted();\n\n /**\n * Called when a previous game is resumed.\n */\n void gameResumed();\n\n /**\n * Called when the game has finished.\n */\n void gameFinished();\n\n /**\n * Called when the game requests a move from the user.\n */\n void userMoveRequested(int playerIndex);\n\n /**\n * Called when a new position is loaded by the user.\n * @param orderedMoves A list of moves made, in order, to assemble the new\n * position.\n */\n void positionLoaded(List<Move> orderedMoves);\n\n /**\n * Called when a position is cleared by the user.\n */\n void positionCleared();\n\n /**\n * Called when the user adds an external player.\n */\n void playerAdded();\n\n}" ]
[ "0.6512936", "0.6501417", "0.6481702", "0.64034444", "0.63221645", "0.63053405", "0.6269371", "0.6237209", "0.6229826", "0.62094223", "0.6074158", "0.6030215", "0.5949711", "0.59375006", "0.59112155", "0.5890389", "0.5834394", "0.5824458", "0.5787811", "0.57829416", "0.57641697", "0.575562", "0.5733934", "0.57258534", "0.57171285", "0.5713724", "0.5703762", "0.5701698", "0.56739515", "0.5669963", "0.56619114", "0.56616354", "0.56353366", "0.56349623", "0.56332564", "0.563144", "0.5624989", "0.5623776", "0.56076115", "0.56043196", "0.56042933", "0.55929625", "0.55913436", "0.5577463", "0.5567621", "0.5566675", "0.5563463", "0.5549168", "0.55468714", "0.5539962", "0.5538813", "0.553135", "0.55280757", "0.5526783", "0.55222744", "0.55216974", "0.5518743", "0.55175835", "0.5513146", "0.5510888", "0.55057913", "0.5502591", "0.5501507", "0.54988205", "0.54977447", "0.549512", "0.5491122", "0.5491122", "0.5491122", "0.548756", "0.54791635", "0.5469629", "0.5468524", "0.54623383", "0.5459507", "0.5454781", "0.5453747", "0.54499906", "0.54416156", "0.544067", "0.5434159", "0.54318345", "0.54303813", "0.54264015", "0.5425809", "0.5424973", "0.54183507", "0.54151523", "0.54143316", "0.54097134", "0.5406927", "0.5405461", "0.5404411", "0.54005677", "0.5400346", "0.5399201", "0.53971595", "0.5395925", "0.53935754", "0.53893524", "0.5385151" ]
0.0
-1
Method that sets up the view for a new game, calls start method on the MemoryGame
private void start() { _countdownBar = new TimeProgressBar((ProgressBar) findViewById(R.id.game_pb_countdown), _game); _gameView.setClickable(true); _startBtn.setEnabled(false); _game.startGame(); _countdownBar.startTimer(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GameView() {\n initComponents();\n gameView(30, 30);\n }", "private void newGame()\r\n {\r\n //close the current screen\r\n screen.dispose();\r\n //start back at the set up menu\r\n SetupView screen = new SetupView();\r\n SetupController controller = new SetupController(screen);\r\n screen.registerObserver(controller);\r\n }", "public void newGame()\n\t{\n\t\tmap = new World(3, viewSize, playerFactions);\n\t\tview = new WorldView(map, viewSize, this);\n\t\tbar = new Sidebar(map, barSize);\n\t}", "void newGame() {\n\t\tstate = new model.State () ; \n\t\tif(host != null ) host.show(state) ; \n\t}", "public ViewMain()\n\t{\n\t\tview = new View();\n\t\t\n\t\tcolors = new Color[20][10];\n\t\tfor(int i=0; i < 20; ++i)\n\t\t\tfor(int j=0; j < 10; ++j)\n\t\t\t\tcolors[i][j] = Color.DARK_GRAY;\n\t\t\n\t\tpanel = new BoardGamePanel(colors);\n\t\tpanel.setVisible(true);\n\t\t\n\t\tgameInfo = new GameInfo();\n\t\t\n\t\tactionListenner();\n\t\t\n\t}", "@Override\n\tpublic void startCreateNewGame() \n\t{\t\n\t\tgetNewGameView().setTitle(\"\");\n\t\tgetNewGameView().setRandomlyPlaceHexes(false);\n\t\tgetNewGameView().setRandomlyPlaceNumbers(false);\n\t\tgetNewGameView().setUseRandomPorts(false);\n\t\tif(!getNewGameView().isModalShowing())\n\t\t{\n\t\t\tgetNewGameView().showModal();\n\t\t}\n\t}", "public MemoryGame() {\n infoCard = new Dialogue(\"Memory! As a cashier, you must be able to remember customers' orders. Click cards to flip over and match pairs. Good luck!\", \"Coworker\");\n drawing = new MemoryGameDrawing();\n Utility.changeDrawing(drawing);\n bgm = new BGM(\"memory\");\n bgm.play();\n }", "public void showView(){\n this.addObserver(GameView.GameViewNewGame(this));\n }", "public void loadNewGameView()\n\t{\n\t\ttry {\n\t\t\tprimaryStage.setTitle(\"Neues Spiel\");\n\t\t\tGridPane root = new GridPane();\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"/view/NewGame.fxml\"));\n\t\t\troot = loader.load();\n\t\t\tNewGameViewController viewController = (NewGameViewController) loader.getController();\n\t\t\tviewController.setOnitamaController(onitamaController);\n\t\t\tviewController.init();\n\n\t\t\tScene scene = new Scene(root);\n\t\t\t//((Stage) outerPane.getScene().getWindow()).setScene(scene);\n\t\t\tPlatform.runLater(() -> { LoadViewController.primaryStage.setScene(scene); });\n\t\t\t//LoadViewController.primaryStage.setScene(scene);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void startNewGame()\n {\n // Display the Banner Page.\n \n System.out.println(\"\\nWelcome to the city of Aaron.\");\n \n // Prompt for and get the user’s name.\n String name;\n System.out.println(\"\\nPlease type in your first name: \");\n name = keyboard.next();\n\n // Call the createNewGame() method in the GameControl class\n \n GameControl.createNewGame(name);\n\n // Display a welcome message\n System.out.println(\"Welcome \" + name + \" have fun!!!\");\n \n //Call the GameMenuView\n GameMenuView gmv = new GameMenuView();\n gmv.displayMenu();\n }", "@FXML\n private void startGame(){\n AnchorPane anchorPane = new AnchorPane();\n Scene gameScene = new Scene(anchorPane, 800, 600);\n Stage gameStage = new Stage();\n GameView gameView = new GameView(anchorPane, gameScene, gameStage);\n gameView.gameStart();\n }", "public Game() {\n\t\tsuper();\n\t\tgameModel = new GameModel();\n\t\tview = new GamePane(gameModel);\n\t\t\n\t\tadd(view);\n\t\tpack();\n\t\tsetLocationRelativeTo(null);\n\t}", "public void startApplication() {\n\t\tgameView = new GameGUI(this);\n\t\t\n\t\t/*\n\t\t * Create bonus GUI now.\n\t\t * TODO: Use swing worker thread to create bonus GUI\n\t\t * \t\t that way if GUI had more bells and whistles to it\n\t\t * \t\t the bonus GUI creation wouldn't take up processing time\n\t\t * \t\t on the main thread.\n\t\t */\n\t\tcreateBonusGUI();\n\t\t\n\t\t//GUI created and ready to show to the user\n\t\tgameView.allowVisibility();\n\t\tGameSounds.startBackgroundMusic();\n\t}", "public void startProgram()\r\n\t{\r\n\t\tview.displayPlayerNames();\r\n\t\tview.loadGameData();\r\n\t\tview.displayGame();\r\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n \tview = new GameView(this);\n super.onCreate(savedInstanceState);\n setContentView(view);\n }", "public void loadGameView() {\n\t\ttry {\n\t\t\tprimaryStage.setTitle(\"Spiel Laden\");\n\t\t\tBorderPane root = new BorderPane();\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"/view/LoadGame.fxml\"));\n\t\t\troot = loader.load();\n\t\t\tLoadGameViewController loadGameViewController = (LoadGameViewController) loader.getController();\n\t\t\tloadGameViewController.setOnitamaController(onitamaController);\n\t\t\tloadGameViewController.init();\n\t\t\tScene scene = new Scene(root);\n\t\t\t//((Stage) outerPane.getScene().getWindow()).setScene(scene);\n\t\t\t//LoadViewController.primaryStage.setScene(scene);\n\t\t\tPlatform.runLater(() -> { LoadViewController.primaryStage.setScene(scene); });\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public void create() {\n setScreen(new ServerScreen(\n new RemoteGame(),\n new SocketIoGameServer(HOST, PORT)\n ));\n }", "@Override\n\tpublic void show() {\n\t\tsetUpGame();\n\t}", "public void startGame() {\r\n this.setupGame();\r\n }", "public StartScreen()\n { \n // Create a new world with 1111x602 cells with a cell size of 1x1 pixels.\n super(1111, 602, 1); \n prepare();\n background.playLoop();\n }", "@Override \n protected void startup() {\n GretellaView view = new GretellaView(this);\n show( view );\n view.initView(); \n }", "public void startGame() {\n\t\t//Start the rendering first\n\t\tgetRenderer().startRendering();\n\t\t\n\t\t//Start the game thread after that.\n\t\tgetGameThread().start();\n\t}", "private void startGame() {\n\t\tmain.next_module = new Game(main, inputs, gameSelectionData);\n\t}", "public static void startGame()\r\n\t{\r\n\t\tnew ModeFrame();\r\n\t}", "public MainScreen(Game game) {\n\t\tthis.game = game;\n\t\tcreate();\n\t}", "void startView();", "@FXML\n void startGame(ActionEvent event) {\n logic.viewUpdated();\n }", "public GameScreen() {\n\n\t\tint midPointY = (int) (Const.GAME_HEIGHT / 2);\n\n\t\tworld = new GameWorld(midPointY);\n\t\trenderer = new GameRenderer(world);\n\n\t\tGdx.input.setInputProcessor(new InputHandler(world.getVentilatorUp(), world.getVentilatorDown()));\n\t\t// Gdx.input.setInputProcessor(new\n\t\t// InputHandler(world.getVentilatorTwo()));\n\t}", "public void newGame(){\n\t\tsoundMan.BackgroundMusic1();\n\n\t\tstatus.setGameStarting(true);\n\n\t\t// init game variables\n\t\tbullets = new ArrayList<Bullet>();\n\n\t\tstatus.setShipsLeft(8);\n\t\tstatus.setGameOver(false);\n\n\t\tif (!status.getNewLevel()) {\n\t\t\tstatus.setAsteroidsDestroyed(0);\n\t\t}\n\n\t\tstatus.setNewAsteroid(false);\n\n\t\t// init the ship and the asteroid\n\t\tnewShip(gameScreen);\n\t\tnewAsteroid(gameScreen);\n\n\t\t// prepare game screen\n\t\tgameScreen.doNewGame();\n\t\tsoundMan.StopMusic2();\n\t\tsoundMan.StopMusic3();\n\t\tsoundMan.StopMusic4();\n\t\tsoundMan.StopMusic5();\n\t\tsoundMan.StopMusic6();\n\t\t// delay to display \"Get Ready\" message for 1.5 seconds\n\t\tTimer timer = new Timer(1500, new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstatus.setGameStarting(false);\n\t\t\t\tstatus.setGameStarted(true);\t\n\n\t\t\t\tstatus.setLevel(1);\n\t\t\t\tstatus.setNumLevel(1);\n\t\t\t\tstatus.setScore(0);\n\t\t\t\tstatus.setYouWin(false);\n\t\t\t\tstatus.setBossLife(0);\n\t\t\t}\n\t\t});\n\t\ttimer.setRepeats(false);\n\t\ttimer.start();\n\t}", "public void startGame(){\n System.out.println(\"[SERVER]: Starting a new game\");\n mainPage = new MainPage();\n mainPage.setMatch(match);\n mainPage.setRemoteController(senderRemoteController);\n\n Platform.runLater( () -> {\n try {\n firstPage.closePrimaryStage();\n if(chooseMap != null)\n chooseMap.closePrimaryStage();\n mainPage.start(new Stage());\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n );\n }", "private void startGame() {\n hideView(R.id.title);\n hideView(R.id.score);\n gameView.setVisibility(View.VISIBLE);\n level=0;\n totalPoints =0;\n gameView.setTotalPoints(totalPoints);\n startLevel();\n }", "private void changeView(){\r\n\t\t\tm.changeView(Views.GAME, gameType, game);\r\n\t}", "public void startGame() \n\t{\n\t\tgamePanel.startGame();\n\t}", "@Override\n\tpublic void create () {\n\t\tgempiresAssetHandler = new GempiresAssetHandler(this);\n\t\tbatch = new SpriteBatch();\n\t\tcastle = new CastleScreen(this);\n\t\tsetScreen(new MainMenuScreen(this));\n\t}", "public void newGame() {\n init();\n updateScoreBoard();\n Toast.makeText(getContext(), \"New Game started\", Toast.LENGTH_LONG).show();\n }", "public void start()\n\t{\n\t\tview.showWindow();\n\t\taddListeners();\n\t}", "public GameScreen(String seed){\n\t\tthis.mazeSession = new MazeSession(seed);\n\t\tthis.mazeDrawer = new DrawMaze(this.mazeSession);\n\t\tgsPcs = new PropertyChangeSupport(this);\n\t\tshowContent();\n\t}", "public void newGame () throws IOException {\n\t\tMenuController.setTheme(selectedTheme);\n\t\tScene tableViewScene = FXMLLoader.load(Main.class.getResource(\"/views/menu.fxml\"));\n\t\tStage stage = (Stage)gameScene.getWindow();\n\t\tstage.setScene(tableViewScene);\n\t\t// Views dosen't update on Linux when you don't set size, until you move the view.\n\t\t// To fix that we need to update the view somehow. This was the solution...\n\t\tstage.setX(stage.getX());\n\t\tstage.show();\n\t}", "public void start() {\r\n view.addListener(this);\r\n view.makeVisible();\r\n view.display();\r\n }", "public Game(){\n\t\tDimension size = new Dimension(width * scale, height * scale);\n\t\tsetPreferredSize(size);\n\t\t\n\t\tscreen = new Screen(width, height);//instantiated the new screen\n\t\t\n\t\tframe = new JFrame();\n\t\t\n\t}", "public void doNewGame(View view) {\n mainHelper.restart();\n }", "public void run (){\n\t\t\t\t\t\t\t\t\tgame.setScreen(game.ui);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}", "public void onStartNewGame() {\n // Set view to activity_main so that fragment knows where to inflate its own\n setContentView(R.layout.activity_main);\n // Replace the currently active fragment with gameFragment\n gameFragment = new GameFragment();\n CanvasView.mPlayer.setPosition(40f, 40f);\n CanvasView.mGoal.placeGoal();\n ft = fm.beginTransaction();\n ft.replace(R.id.container, gameFragment);\n ft.commit();\n\n }", "public GameWindow() {\n\t\tthis.initWindow();\n\t}", "@Override\n public void show() {\n batch = new SpriteBatch();\n stage = createStage();\n\n // create overlays\n hud = new GigagalHUD();\n victoryOverlay = new VictoryOverlay();\n gameoverOverlay = new GameOverOverlay();\n\n // determine input processor\n useOnScreenControl = (Gdx.app.getType() == Application.ApplicationType.Android // on mobile\n || Configs.instance.isDebugOnScreenControlEnabled() // or debugging\n );\n\n if (useOnScreenControl) {\n onscreenControl = new OnscreenControl();\n gameInputProcessor = new TouchProcessor(onscreenControl);\n } else {\n gameInputProcessor = new KeyPressProcessor();\n }\n\n Gdx.input.setInputProcessor(gameInputProcessor);\n\n // load new level\n startNewLevel();\n }", "private void start() {\n GameStateManager gameStateManager = new GameStateManager();\n JPanel jPanel = gameStateManager.getGameState().getJPanel();\n jPanel.setVisible(true);\n GUI gui = GUI.getInstance();\n gui.setjPanel(jPanel);\n gui.addKeyListener(gameStateManager);\n GameStateObserver gameStateObserver = new GameStateObserver(gameStateManager,gui);\n gameStateManager.addObserver(gameStateObserver);\n }", "public Controller(Game game, View consoleView, View graphicalView){\n\t\tthis.game = game;\n\t\tthis.consoleView = consoleView;\n\t\tthis.graphicalView = graphicalView;\t\n\t\t\n\t\tstart();\n\t}", "public void loadGameCanvasView()\n\t{\n\t\ttry {\n\t\t\tprimaryStage.setTitle(\"Onitama\");\n\t\t\tGridPane root = new GridPane();\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"/view/GameCanvas.fxml\"));\n\t\t\troot = loader.load();\n\t\t\tGameCanvasViewController viewController = (GameCanvasViewController) loader.getController();\n\t\t\tviewController.setOnitamaController(onitamaController);\n\t\t\tviewController.init();\n\n\t\t\tScene scene = new Scene(root);\n\t \t// this fixes java bug when change scnene after dialog\n\t\t\t// javafx bug https://bugs.openjdk.java.net/browse/JDK-8140491\n\t\t\tPlatform.runLater(() -> { \n\t\t\t\tLoadViewController.primaryStage.setScene(scene);\n\t\t\t});\n\t\t\t//LoadViewController.primaryStage.setScene(scene);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void startGame() {\r\n setGrid();\r\n setSnake();\r\n newPowerUp();\r\n timer.start();\r\n }", "public void startGameView(View view) {\r\n Log.d(TAG, \"button pressed\");\r\n startTime = System.currentTimeMillis();\r\n\r\n gameRunning = true;\r\n\r\n// startTimer();\r\n startRegTimer();\r\n }", "public void constructGameView(int num){\r\n\t\t\r\n\t\t//Create pawn panel\r\n\t\tgameView.getGamePiecesPanel().createPawnPanel(num);\r\n\t\t\r\n\t\t//Add action listeners to pawn buttons\r\n\t\tgameView.getGamePiecesPanel().setGamePieceButtonListener(new ActionListener(){\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif( pawnListener != null ){\r\n\r\n\t\t\t\t\tObject source = e.getSource();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(source instanceof PawnButton){\r\n\t\t\t\t\t\tint index = ((PawnButton) source).getIndex();\r\n\t\t\t\t\t\tVari vari = ((PawnButton) source).getColor(); \r\n\t\t\t\t\t\r\n\t\t\t\t\t\tpawnListener.pawnPressPerformed(new PawnButtonEvent(index, vari));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void newGame()\n\t{\n\t\tplanet.setLevel(0);\n\t\tship.resetScore();\n\t\tstopThreads();\n\t\tplanet = new Planet(750,600);\n\t\tship = new Ship(20.0,750,600,planet);\n\t\tbuttonPanel.update(ship,planet);\n\t\tgamePanel.update(ship,planet);\n\n\t\trestartThreads();\n\t}", "public SnakeGameView(Context context) {\n\t\tsuper(context);\n\t\tthis.context = context;\n\t\tmanager = new SnakeGameManager(context);\n\t}", "protected void newGame() {\r\n playSound( RESET );\r\n\r\n timeTitle.setText( Msgs.str( \"Time\" ) );\r\n timeMesg.setText( Msgs.str( \"zeroTime\" ) );\r\n infoMesg.setText( Msgs.str( \"Ready\" ) );\r\n scoreTitle.setText( Msgs.str( \"Score\" ) );\r\n\r\n adjustScore();\r\n currentScore = 0;\r\n scoreMesg.setText( \"0\" );\r\n\r\n mineField.newGame();\r\n minesTitle.setText( Msgs.str( \"mines.left\" ) );\r\n setMinesMesg( mineField.getNumHiddenMines() );\r\n\r\n pane.repaint();\r\n }", "private void startGame() {\r\n\t\tthis.gameMap.startGame();\r\n\t}", "public Game(){\n\t\tDimension dimension = new Dimension(Game.WIDTH, Game.HEIGHT); //Create dimensions for window size\n\t\tsetPreferredSize(dimension); //Set the start size\n\t\tsetMinimumSize(dimension); //Set the min size\n\t\tsetMaximumSize(dimension); //Set the max size, this locks the window size.\n\t\taddKeyListener(this); //Add the key listener to the game object\n\t\tlevel1(); //Load level 1\n\t\twinScreen = new WinScreen(); //Create win object\n\t\tdeadScreen = new DeadScreen(); //Create dead object\n\t\tstartScreen = new StartScreen(); //Create startScreen object\n\t\tpauseScreen = new PauseScreen(); //Create pauseScreen object\n\t\tspriteSheet = new SpriteSheet(\"img/sprites.png\"); //Create SpriteSheet object\n\t\tnew Texture(); //Initialize texture object\n\t}", "public static void start(){\n new Light(new Vector3f(getSIZE()*Chunk.getCHUNKSIZE()/2,getSIZE()*Chunk.getCHUNKSIZE()/2,getSIZE()*Chunk.getCHUNKSIZE()/2));\n Keyboard.enableRepeatEvents(true);\n createWindow();\n initGL();\n generateWorld();\n Game.gameLoop();\n }", "public Start() {\n super();\n setTitle(\"Monopoly\");\n setDefaultCloseOperation(EXIT_ON_CLOSE);\n\n mainPanel = new JPanel();\n mainPanel.setLayout(new BorderLayout());\n _gameWindow = new GameWindow();\n _welcome = new WelcomeWindow();\n _gameLoop = new PlayersLoop();\n\n changeGameState(GameState.START_STATE);\n\n setContentPane(mainPanel);\n\n pack();\n setVisible(true);\n setSize(new Dimension(800, 600));\n }", "public static void create(){\n\t\tstage = new Stage(new StretchViewport(1680, 1050)); \n\t\tCamera camera = stage.getCamera();\n\t\tcamera.update();\n\n\t\t//Instantiate the Managers\n\t\tGdx.input.setInputProcessor(getStage());\t\n\t\tstage.getActors().clear();\n\t\t\n\t\tmapManager = new Game_Map_Manager();\n\t\tmapManager.create(getStage());\n\t\t\n\t\tGame_CardHand cardHand = new Game_CardHand();\n\t\tcardHand.create(getStage());\n\n\t\tGameScreenUI actorManager = new GameScreenUI();\n\t\tactorManager.create(getStage());\n\n\t\tTrainDepotUI trainDepot = new TrainDepotUI();\n\t\ttrainDepot.create(getStage());\n\n\t\tGoalMenu goalScreenManager = new GoalMenu();\n\t\tgoalScreenManager.create(getStage());\n\t\t\n\t\tPlayerGoals ticketManager = new PlayerGoals();\n\t\tticketManager.create(getStage());\t\n\t\t\n\t\tGame_StartingSequence startgameManager = new Game_StartingSequence(replayMode);\n\t\tstartgameManager.create(getStage());\n\t\t\n\t\tGame_Shop shop = new Game_Shop();\n\t\tshop.create(getStage());\n\t\t\n\t\tGame_PauseMenu pauseMenu= new Game_PauseMenu();\n\t\tpauseMenu.create(getStage());\n\t\t\n\t\tWarningMessage warningMessage = new WarningMessage();\n\t\twarningMessage.create(getStage());\n\t\t\n\t\tif (replayMode){\n\t\t\tReplayModeUI replayUI = new ReplayModeUI();\n\t\t\treplayUI.create(getStage());\n\t\t\t\n\t\t\tif (Game_StartingSequence.inProgress){\n\t\t\t\tWorldMap replayMap = WorldMap.getInstance();\n\t\t\t\tGame_StartingSequence.player1 = false;\n\t\t\t\t\n\t\t\t\tStation p1station = replayMap.stationsList.get(0);\n\t\t\t\tfor (Station station : replayMap.stationsList){\n\t\t\t\t\tif (station.getName().equals(LocomotionCommotion.getReplayTurn().getJSONObject(\"player1\").getJSONArray(\"stations\").getJSONObject(0).getString(\"stationName\"))){\n\t\t\t\t\t\tp1station = station;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tStation p2station = replayMap.stationsList.get(1);\n\t\t\t\tfor (Station station : replayMap.stationsList){\n\t\t\t\t\tif (station.getName().equals(LocomotionCommotion.getReplayTurn().getJSONObject(\"player2\").getJSONArray(\"stations\").getJSONObject(0).getString(\"stationName\"))){\n\t\t\t\t\t\tp2station = station;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcreateCoreGame(p1station, p2station);\n\t\t\t\tGame_StartingSequence.startGame();\n\t\t\t\tGameScreenUI.refreshResources();\n\t\t\t\tGame_StartingSequence.inProgress = false;\n\t\t\t}\n\t\t}\n\t}", "public void startGame() {\n\t\ttank1.create(20, 530, 0, 0);\n\t\ttank1.setDefaults();\n\t\ttank2.create(960, 530, 0, 0);\n\t\ttank2.setDefaults();\n\t\tobjects.add(tank1);\n\t\tobjects.add(tank2);\n\t\tground = new Groundmod2((int) (Math.random() * 4));\n\t\tturn = Turn.PLAYER1;\n\t\tgrabFocus();\n\t}", "public static void spielstart() {\n\n\t\tThread thread = new Thread() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tgameboard = new GameFrame();\n\n\t\t\t}\n\t\t};\n\n\t\tthread.start();\n\n\t}", "@Override\n\tpublic void create() {\n\t\tthis.playScreen = new PlayScreen<EntityUnknownGame>(this);\n\t\tsetScreen(this.playScreen);\n\t\t\n\t\t//this.shadowMapTest = new ShadowMappingTest<EntityUnknownGame>(this);\n\t\t//setScreen(this.shadowMapTest);\n\t\t\n\t\t//this.StillModelTest = new StillModelTest<EntityUnknownGame>(this);\n\t\t//setScreen(this.StillModelTest);\n\t\t\n//\t\tthis.keyframedModelTest = new KeyframedModelTest<EntityUnknownGame>(this);\n//\t\tsetScreen(this.keyframedModelTest);\n\t}", "private void createGameMode() {\n GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();\n Rectangle fullScreenBounds = ge.getDefaultScreenDevice().getDefaultConfiguration().getBounds();\n boolean fs = ge.getDefaultScreenDevice().isFullScreenSupported();\n \n setTitle(gameName);\n setName(gameName);\n setDefaultCloseOperation(EXIT_ON_CLOSE);\n \n map = new UAVMap(this, UAVModes.GAME, fs);\n \n if (fs) {\n fullScreen = new Window(this);\n fullScreen.add(map.getCanvas());\n ge.getDefaultScreenDevice().setFullScreenWindow(fullScreen);\n } else {\n this.setSize((int)(.9 * fullScreenBounds.width), (int)(.9 * fullScreenBounds.height));\n this.setLocation(fullScreenBounds.x + (int) (.05 * fullScreenBounds.width), \n fullScreenBounds.y + (int) (.05 * fullScreenBounds.height));\n Container content = getContentPane();\n content.setLayout(new GridBagLayout());\n GridBagConstraints c = new GridBagConstraints();\n c.fill = GridBagConstraints.BOTH;\n c.weightx = 1;\n c.weighty = 1;\n content.add(map.getCanvas(), c);\n setVisible(true);\n }\n map.initializeGame();\n map.startTimer(); \n }", "@Override\n\tpublic void createNewGame() \n\t{\n\t\t//Create new game\n\t\tboolean randomhexes = getNewGameView().getRandomlyPlaceHexes();\n\t\tboolean randomnumbers = getNewGameView().getRandomlyPlaceNumbers();\n\t\tboolean randomports = getNewGameView().getUseRandomPorts();\n\t\tString title = getNewGameView().getTitle();\n\t\t\n\t\ttry \n\t\t{\n\t\t\tReference.GET_SINGLETON().proxy.createGame(title, randomhexes, randomnumbers, randomports);\n\t\t} \n\t\tcatch (JoinExceptions e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t//Refresh game list\n\t\tList<Game> gamelist = Reference.GET_SINGLETON().proxy.getGameList();\n\t\tGameInfo[] games = new GameInfo[gamelist.size()];\n\t\tint counter = 0;\n\t\tfor(Game game: gamelist)\n\t\t{\n\t\t\tGameInfo thisgame = new GameInfo();\n\t\t\tthisgame.setId(game.getId());\n\t\t\tthisgame.setTitle(game.getTitle());\n\t\t\tfor(Player player : game.getPlayers())\n\t\t\t{\n\t\t\t\tPlayerInfo player_info = new PlayerInfo(player);\n\t\t\t\tplayer_info.setColor(player.getColor());\n\t\t\t\tif(!(player.color == null))thisgame.addPlayer(player_info);\n\t\t\t}\n\t\t\tgames[counter] = thisgame;\n\t\t\tcounter++;\n\t\t}\n\t\t\n\t\tReference ref = Reference.GET_SINGLETON();\n\t\t\n\t\tPlayerInfo ourguy = new PlayerInfo();\n\t\t\n\t\tourguy.setId(ref.player_id);\n\t\tourguy.setName(ref.name);\n\t\tif(getNewGameView().isModalShowing())\n\t\t{\n\t\t\tgetNewGameView().closeModal();\n\t\t}\n\t\tif (getNewGameView().isModalShowing())\n\t\t{\n\t\t\tgetNewGameView().closeModal();\n\t\t}\n\n\t\tgetJoinGameView().setGames(games, ourguy);\n\t\t\n\t}", "public void startGame() {\n\t\tinitChips();\n\t\tassignAndStartInitialProjects();\n\t}", "public void setUpView() {\n\n\n\t\t//Make the components\n\t\tinputAnswer = new Button(\"Submit\");\n\t\tbegin\t\t= new Button(\"Begin level \" + gameLevel);\n\t\tblueButt\t= new Button();\n\t\tredButt = new Button();\n\t\tgreenButt = new Button();\n\t\tyellowButt = new Button();\n\t\tclear = new Button(\"Clear\");\n\t\tguessArea = new TextArea();\n\t\ttopPan = new Panel();\n\t\tinstructLab = new Label(\"Welcome to the great guessing game. Try and finish it, its fun honest!\");\n\t\treset = new Button(\"Start again?\");\n\t\tpointsLab = new Label(\"Points: \" + points);\n\t\t\n\t\t//Change the font\n\t\tFont font = new Font(\"Verdana\", Font.BOLD, 18);\n\t\tinstructLab.setFont(font);\n\t\t\n\t\t//Add the label to the top panel\n\t\ttopPan.add(instructLab);\n\t\t\n\t\t//Set layout\n\t\tsetLayout(new MigLayout());\n\t\n\t\t//Set the size of the components\n\t\tblueButt.setPreferredSize (new Dimension(60, 50));\n\t\tredButt.setPreferredSize (new Dimension(60, 50));\n\t\tgreenButt.setPreferredSize (new Dimension(60, 50));\n\t\tyellowButt.setPreferredSize(new Dimension(60, 50));\n\t\tguessArea.setPreferredSize (new Dimension(50, 10));\n\t\tpointsLab.setPreferredSize (new Dimension(100, 30));\n\t\t\n\t\t//Turn the submit button of until there is something to submit\n\t\tinputAnswer.setEnabled(false);\n\n\t\t//Set the button colour\n\t\tblueButt.setBackground (Color.blue);\n\t\tredButt.setBackground (Color.red);\n\t\tgreenButt.setBackground (Color.green);\n\t\tyellowButt.setBackground(Color.yellow);\n\t\t\n\t\t//Hide the reset button until it is needed\n\t\treset.setVisible(false);\n\n\t\t//Add the components to the applet\n\t\tadd(topPan, \"wrap\");\n\t\tadd(redButt, \"cell 0 1\");\n\t\tadd(blueButt, \"cell 0 1\");\t\t\n\t\tadd(greenButt, \"cell 0 1\");\n\t\tadd(yellowButt, \"cell 0 1\");\n\t\tadd(begin, \"wrap\");\n\t\tadd(guessArea, \"wrap\");\n\t\tadd(inputAnswer,\"split 2\");\t\n\t\tadd(clear, \"gap left 340, cell 0 2, wrap\");\n\t\tadd(reset, \t\t\"wrap\");\n\t\tadd(pointsLab);\n\n\n\n\t\t//If the status bar is present show the user there level\n\t\tshowStatus(\"You are on level: \" + gameLevel);\n\n\n\t\t//Set the size of the applet\n\t\tsetSize(new Dimension(1000, 1000));\n\n\t}", "public void launchMainScreen() {\n\t\tmainWindow = new MainGameScreen(this);\n\t}", "public void create() {\n connect();\n batch = new SpriteBatch();\n font = new BitmapFont();\n\n audioManager.preloadTracks(\"midlevelmusic.wav\", \"firstlevelmusic.wav\", \"finallevelmusic.wav\", \"mainmenumusic.wav\");\n\n mainMenuScreen = new MainMenuScreen(this);\n pauseMenuScreen = new PauseMenuScreen(this);\n settingsScreen = new SettingsScreen(this);\n completeLevelScreen = new CompleteLevelScreen(this);\n completeGameScreen = new CompleteGameScreen(this);\n\n setScreen(mainMenuScreen);\n }", "private void initializeGUIComponents() {\n\t\tmyScene = new Scene(myRoot);\n ButtonConditionManager.getInstance().beginListeningToScene(myScene);\n\t\tmyStage.setTitle(\"MY PLAYER VIEW\");\n\t\tmyStage.setScene(myScene);\n\t\tmyStage.show();\n\t\tmyCanvas = new GameCanvas();\n\t\tmyRoot.getChildren().add(myCanvas.getNode());\n\t\tmyCanvas.getNode().toBack();\n\t}", "public WinScreen()\r\n { \r\n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\r\n super(1500, 500, 1); \r\n\r\n prepare();\r\n }", "public void run() {\n\t\t\t\t\t\tNewCustomWindow.createAndShowCustomGame();\n\t\t\t\t\t\t// Close the start menu window and remove it from memory\n\t\t\t\t\t\tstartMenu.dispose();\n\t\t\t\t\t}", "private void startGame() {\n betOptionPane();\n this.computerPaquetView.setShowJustOneCard(true);\n blackjackController.startNewGame(this);\n }", "public void openGamePane() {\n\t\tParent root;\n\t\ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(GAMEPANELOCATION));\n\t\t\tloader.setController(this);\n\t\t\troot = loader.load();\n\t\t\tScene scene = new Scene(root);\n\t\t\tStage stage = new Stage();\n\t\t\tstage.setScene(scene);\n\t\t\tstage.show();\n\t\t} catch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tgamePane.setBackground(new Background(new BackgroundFill(new Color(195/256.0,222/256.0,250/256.0,1),CornerRadii.EMPTY, Insets.EMPTY)));\n\t\tgameObjects=new HashMap<Integer,GameObjectVisualComponent>();\n\t\tpodium=new ArrayList<Text>();\n\t\tpodium.add(new Text(gamePane.getWidth()-100,15,\"TOP\"));\n\t\tgamePane.getChildren().add(podium.get(0));\n\t}", "public void start_game() throws IOException, JAXBException {\n savetoxml();\n logger.trace(\"starting the game now...\");\n primarystage.setResizable(false);\n primarystage.setScene(game_scene);\n primarystage.show();\n\n }", "public abstract void init(int myIndex, GameView view);", "@Override\n public void start(Stage primaryStage) {\n// if (screenWidth >= 414) {\n// screenWidth = 414;\n// }\n// if (screenHeight >= 736) {\n// screenHeight = 736;\n// }//preset stage/scene size\n\n //System.out.println(Integer.toString(screenWidth) + Integer.toString(screenHeight));\n System.out.print(\"Default:\");\n gameController = new GameController(1, 4);//default player and map size\n// gameController.newMapPane();//preload a Map Pane\n\n ScreenController mainContainer = new ScreenController();\n mainContainer.loadScreen(GroupGame.homeScreenID, GroupGame.homeScreenFile);\n mainContainer.loadScreen(GroupGame.newOptionID, GroupGame.newOptionFile);\n mainContainer.loadScreen(GroupGame.createPlayerID, GroupGame.createPlayerFile);\n mainContainer.loadScreen(GroupGame.MapScreenID, GroupGame.MapScreenFile);\n mainContainer.setScreen(GroupGame.homeScreenID);\n\n Group root = new Group();\n root.getChildren().addAll(mainContainer);\n Scene scene = new Scene(root);\n primaryStage.setScene(scene);\n primaryStage.show();\n }", "public GameController() {\r\n\t\tsuper();\r\n\t\tthis.model = Main.getModel();\r\n\t\tthis.player = this.model.getPlayer();\r\n\t\tthis.timeline = this.model.getIndefiniteTimeline();\r\n\t}", "public void start(){\n getBoard();\n prepareBoard();\n renderBoard();\n }", "private void initialiseViews() {\n\n layoutGameOver = findViewById(R.id.layout_gameover);\n layoutGame = findViewById(R.id.layout_game);\n\n layoutGame.setVisibility(View.VISIBLE);\n layoutGameOver.setVisibility(View.GONE);\n\n tvHighScore = findViewById(R.id.tv_highscore);\n tvCurrentScore = findViewById(R.id.tv_current_score);\n tvGameoverScore = findViewById(R.id.tv_gameover_score);\n\n\n gvBoard = findViewById(R.id.gl_board);\n btNewGame =findViewById(R.id.bt_newgame);\n btRestart =findViewById(R.id.bt_restart);\n\n btNewGame.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startNewGame();\n }\n });\n btRestart.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startNewGame();\n }\n });\n }", "@Override\n\tpublic void create() {\n\t\tthis.batch = new SpriteBatch();\n\t\t\n//\t\tgame.batch.begin();\n// player.draw(game.batch);\n// \n// game.batch.end();\n\t\t\n\t\tmanager = new AssetManager();\n\t\tmanager.setLoader(TiledMap.class, new TmxMapLoader(new InternalFileHandleResolver()));\n\t\tmanager.load(\"data/level1.tmx\", TiledMap.class);\n\t\tmanager.load(\"data/background.png\", Texture.class);\n//\t\tmanager.load(\"level1.tsx\", TiledMapTileSet.class);\n\t\tmanager.finishLoading();\n\t\tscreen = new GameScreen(this);\n\t\tsetScreen(screen);\n\t\t\n\t}", "@Override protected void startup() {\n BlaiseGraphicsTestFrameView view = new BlaiseGraphicsTestFrameView(this);\n canvas1 = view.canvas1;\n root1 = view.canvas1.getGraphicRoot();\n canvas1.setSelectionEnabled(true);\n show(view);\n }", "public void newGame()\n\t{\n\t\tthis.setVisible(false);\n\t\tthis.playingField = null;\n\t\t\n\t\tthis.playingField = new PlayingField(this);\n\t\tthis.setSize(new Dimension((int)playingField.getSize().getWidth()+7, (int)playingField.getSize().getHeight() +51));\n\t\tthis.setLocation(new Point(200,20));\n\t\tthis.setContentPane(playingField);\n\t\t\n\t\tthis.setVisible(true);\n\t}", "private void startNewGame( ){\n\n mGame.clearBoard();\n mGameOver = false;\n\n // Reset all buttons\n for (int i = 0; i < mBoardButtons.length; i++) {\n mBoardButtons[i].setText(\"\");\n mBoardButtons[i].setEnabled(true);\n mBoardButtons[i].setOnClickListener(new ButtonClickListener(i));\n }\n // Human goes first\n mDiffTextView.setText(mGame.dificult);\n mInfoTextView.setText(\"You go first.\");\n\n }", "public void startGame(View view) {\r\n start_flg = true;\r\n startLayout.setVisibility(View.INVISIBLE);\r\n\r\n // check if chrono is not running\r\n if (!running) {\r\n chronometer.setBase(SystemClock.elapsedRealtime());\r\n chronometer.start();\r\n running = true;\r\n }\r\n\r\n\r\n if (frameHeight == 0) {\r\n frameHeight = gameFrame.getHeight();\r\n frameWidth = gameFrame.getWidth();\r\n initialFrameWidth = frameWidth;\r\n\r\n boxSize = box.getHeight();\r\n boxX = box.getX();\r\n boxY = box.getY();\r\n }\r\n\r\n frameWidth = initialFrameWidth;\r\n\r\n box.setX(0.0f);\r\n black.setY(3000.0f);\r\n orange.setY(3000.0f);\r\n pink.setY(3000.0f);\r\n\r\n blackY = black.getY();\r\n orangeY = orange.getY();\r\n pinkY = pink.getY();\r\n\r\n box.setVisibility(View.VISIBLE);\r\n black.setVisibility(View.VISIBLE);\r\n orange.setVisibility(View.VISIBLE);\r\n pink.setVisibility(View.VISIBLE);\r\n\r\n timeCount = 0;\r\n score = 0;\r\n String a = \"Score : 0\";\r\n scoreLabel.setText(a);\r\n\r\n\r\n timer = new Timer();\r\n timer.schedule(new TimerTask() {\r\n @Override\r\n public void run() {\r\n if (start_flg) {\r\n handler.post(new Runnable() {\r\n @Override\r\n public void run() {\r\n changePos();\r\n }\r\n });\r\n }\r\n }\r\n }, 0, 20);\r\n }", "public Connect4View() {\n\t\tgame = new TilePane();\n\t\tcontroller = new SingleController(game);\n\t\tcontroller.getModel().addObserver(this);\n\t\tgameFinished = false;\n\t}", "public GameController() {\n \t\t// Fill the table empty positions.\n \t\tfor (int i = 0; i < MAX_NUMBER_OF_PILES; i++) {\n \t\t\tmTable.add(i, null);\n \t\t}\n \t\tcreateDeck();\n \t\tgs = new GameState(mTable, pileNames, pileNo);\n \t\tnew Listener(this);\n \t}", "private void setUpView()\n {\n view = new DefaultDrawingView();\n DrawingEditorProxy editor = new DrawingEditorProxy();\n editor.setTarget(new DefaultDrawingEditor());\n view.addNotify(editor);\n for (Handle h : handles)\n h.setView(view);\n }", "public void run() {\n gf = addGameFrame(\"Pacman\", displayW, displayH);\n }", "@Override\n\tpublic void create() {\n\t\tGdx.app.setLogLevel(Application.LOG_DEBUG);\n\t\t\n\t\t//Load assets\n\t\tAssets.instance.init(new AssetManager());\n\t\t\n\t\t//initialize controller and renderer\n\t\tworldController = new WorldController();\n\t\tworldRenderer= new WorldRenderer(worldController);\n\t\t\n\t\t//The world is not paused on start\n\t\tpaused = false;\n\t}", "public void startGame() {\n\t\timages = new ImageContainer();\n\t\ttimer = new Timer(15, this);\n\t\ttimer.setRepeats(true);\n\t\tlevelStartTimer = new Timer(2000, this);\n\t\thighScore = new HighScore();\n\t\tpacmanAnimation = new PacmanAnimation(images.pacman, new int[] { 3, 2,\n\t\t\t\t0, 1, 2 });\n\t\tactualLevel = 1;\n\t\tinitNewLevel();\n\t}", "private void init() {\n\t\tdisplay = new Display(title, width, height);\n\t\tdisplay.getFrame().addKeyListener(keyManager); //lets us access keyboard\n\t\tdisplay.getFrame().addMouseListener(mouseManager);\n\t\tdisplay.getFrame().addMouseMotionListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseMotionListener(mouseManager);\n\t\tAssets.init();\n\t\t\n\t\tgameCamera = new GameCamera(this, 0,0);\n\t\thandler = new Handler(this);\n\t\t\n\t\tgameState = new GameState(handler);\n\t\tmenuState = new MenuState(handler);\n\t\tsettingState = new SettingState(handler);\n\t\tmapState = new mapState(handler);\n\t\tmansionState = new mansionState(handler);\n\t\tparkState = new parkState(handler);\n\t\tjazzState = new jazzState(handler);\n\t\tmansionGardenState = new mansionGardenState(handler);\n\t\tmansionArcadeState = new mansionArcadeState(handler);\n\t\tmansionStudyState = new mansionStudyState(handler);\n\t\tjazzPRoomState = new jazzPRoomState(handler);\n\t\tState.setState(menuState);\n\t}", "public SnakeUI() {\r\n setFrame(); \r\n setKeyListener();\r\n setTimer();\r\n startGame();\r\n this.setVisible(true);\r\n }", "public void startNewGame();", "@Override\n public void newGame() {\n //TODO Implement this method\n }", "public Game() {\n\n GameBoard gameBoard = new GameBoard();\n Renderer renderer = new Renderer(gameBoard);\n }", "private void startGame() {\n gameCountDownTimer = getGameTimer();\n gameCountDownTimer.start();\n animateBalloonView(balloon1, true);\n animateBalloonView(balloon2, true);\n animateBalloonView(balloon3, true);\n animateBalloonView(balloon4, true);\n animateBalloonView(balloon5, true);\n currentScreenGameState = GameState.PLAYING;\n String controlButtonTitle = getResources().getString(R.string.pause_btn);\n conttroler.setText(controlButtonTitle);\n setCurrentScreenCover();\n invalidateOptionsMenu();\n }", "void newGame() {\n logger.log(\"New game starting.\");\n logger.log(divider);\n\n\n // Create the deck.\n createDeck();\n logger.log(\"Deck loaded: \" + deck.toString());\n\t logger.log(divider);\n\n\n // Shuffle the deck.\n shuffleDeck();\n logger.log(\"Deck shuffled: \" + deck.toString());\n logger.log(divider);\n\n // Create the players.\n createPlayers();\n setGameState(GameState.PLAYERS_SPAWNED);\n\n // Deal cards to players' decks.\n deal();\n for (Player player : players) {\n logger.log(\"Hand: \" + player);\n }\n \n\n // Randomly select the active player for the first round.\n selectRandomPlayer();\n\n setGameState(GameState.NEW_GAME_INITIALISED);\n }", "public void Start() \r\n {\r\n // Set the canvas as the current phone's screen\r\n mDisplay.setCurrent(this);\r\n\r\n // we call our own initialize function to setup all game objects\r\n GameInitialize();\r\n\r\n // Here we setup the thread and start it\r\n Thread thread = new Thread(this);\r\n thread.start();\r\n }", "public LoadingScreen2()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1280, 720, 1); \n tracker = new Tracker();\n }", "@Override\n public void show() {\n stage = new Stage(new FitViewport(game.SCREEN_WIDTH, game.SCREEN_HEIGHT), batch);\n Gdx.input.setInputProcessor(stage);\n\n background = game.getAssetManager().get(\"startscreen.png\");\n bgViewPort = new StretchViewport(game.SCREEN_WIDTH, game.SCREEN_HEIGHT);\n\n fonts = new Fonts();\n fonts.createSmallestFont();\n fonts.createSmallFont();\n fonts.createMediumFont();\n fonts.createLargeFont();\n fonts.createTitleFont();\n\n createButtons();\n }", "private void setNextGame() {\n Persistence db = Persistence.getInstance();\n game = db.getNextGame();\n\n // set the initial grid in the model\n grid = game.getInitial();\n\n // get rid of everything on the view grid\n view.clearGrid(true);\n\n // put givens for new game into view\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if (grid.isGiven(i, j)) {\n view.setGiven(i, j, grid.getNumber(i, j));\n } // if given\n } // for j\n } // for i\n\n }" ]
[ "0.7515422", "0.7402611", "0.7126322", "0.7120116", "0.697259", "0.6896314", "0.68948334", "0.6882022", "0.68734825", "0.6858331", "0.6818818", "0.68115777", "0.67965096", "0.6747021", "0.673791", "0.6735359", "0.6733734", "0.6703886", "0.6689848", "0.6671159", "0.6667414", "0.6666414", "0.66646767", "0.66327935", "0.6625928", "0.66118133", "0.6596457", "0.6572511", "0.65643775", "0.6556522", "0.65498936", "0.65496314", "0.65471005", "0.65398765", "0.6539341", "0.65309197", "0.6520101", "0.6512062", "0.6503846", "0.6496699", "0.64880955", "0.6461885", "0.64585286", "0.64573944", "0.64463896", "0.6426352", "0.6423831", "0.64189917", "0.64124495", "0.63997036", "0.638917", "0.63868433", "0.6386463", "0.6382072", "0.6373737", "0.63698494", "0.63403505", "0.6332739", "0.63291675", "0.6321447", "0.6310553", "0.62948716", "0.62934405", "0.62834185", "0.62812805", "0.62771827", "0.6272857", "0.6272238", "0.6269887", "0.62626004", "0.6254656", "0.6250031", "0.62469274", "0.62457585", "0.6245645", "0.6245147", "0.62437814", "0.623576", "0.62243134", "0.62161714", "0.62134963", "0.6212396", "0.6198499", "0.6192418", "0.6192318", "0.61915565", "0.6191071", "0.61886126", "0.6185899", "0.6184617", "0.61777705", "0.61667156", "0.6166622", "0.6157626", "0.6152216", "0.61456764", "0.61454743", "0.61443657", "0.61424255", "0.6132577", "0.6131986" ]
0.0
-1
Sets up the intent to go to the next level of the game
private void nextLevel() { Intent nextLevel = new Intent(GameLevelActivity.this, GameLevelActivity.class); nextLevel.putExtra(IGameLevelConstants.INTENT_TYPE, IGameLevelConstants.NEXT_LEVEl); startActivity(nextLevel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void nextLevel(){\n Intent toMainAct2 = new Intent(MainActivity.this, Main2Activity.class);\n toMainAct2.putExtra(\"score\",iScore);\n startActivity(toMainAct2);\n }", "private void nextLevel(){\n Intent intent = new Intent(MainActivity.this, Main2Activity.class);\n intent.putExtra(\"currentPoints\", score);\n startActivity(intent);\n }", "public void goToNextLevel(View view) {\n Intent intent = new Intent(this, BoardActivity.class);\n intent.putExtra(MSG_LVL, level+1);\n intent.putExtra(MSG_TELEPORTS, nbSafeTeleports+1);\n intent.putExtra(MSG_SCORE, score);\n startActivity(intent);\n }", "public void goNextLevel(){\r\n setCurrentLevel(currentLevel.getNextLevel());\r\n }", "void startGame() {\n if (getHealth() <= 0) {\n startAgain();\n }\n int level = getLevel();\n if (level == 1) {\n Intent intent = new Intent(this, Level1Activity.class);\n intent.putExtra(sendPlayer, currPlayer);\n startActivity(intent);\n } else if (level == 2) {\n Intent intent = new Intent(this, Level2Activity.class);\n intent.putExtra(sendPlayer, currPlayer);\n startActivity(intent);\n } else if (level == 3) {\n Intent intent = new Intent(this, Level3Activity.class);\n intent.putExtra(sendPlayer, currPlayer);\n startActivity(intent);\n }\n }", "public void goNextLevel() {\r\n world.stop();\r\n levelMusic.close();\r\n if(level == 1) {\r\n level++;\r\n world = new Level2();\r\n world.populate(this);\r\n keyHandler.setBody(world.getPlayer());\r\n view.setWorld(world);\r\n controlPanel.setWorld(world);\r\n audioManager = new AudioManager();\r\n levelMusic = audioManager.getLevel2Sound();\r\n levelMusic.loop();\r\n world.start();\r\n }\r\n else if(level == 2) {\r\n level++;\r\n world = new Level3();\r\n world.populate(this);\r\n keyHandler.setBody(world.getPlayer());\r\n view.setWorld(world);\r\n controlPanel.setWorld(world);\r\n audioManager = new AudioManager();\r\n levelMusic = audioManager.getLevel3Sound();\r\n levelMusic.loop();\r\n world.start();\r\n }\r\n else {\r\n System.out.println(\"PLAYER SURVIVED\");\r\n System.exit(0);\r\n }\r\n }", "public void startNextLevel() {\n if (getLevel() < 3) {\n setLevel(getLevel() + 1);\n startGame();\n }\n }", "protected void showNextLevel(Context context, NextLevel nextLevel) {\n \t\t if(nextLevel != null){\n \t\t\tApplicationData appData;\n \t\t\ttry {\n \t\t\t\tappData = ApplicationData.readApplicationData(context);\n \t\t\t\tAppLevel level = appData.getNextAppLevel(nextLevel, context);\n \t\t\t\tif(level != null){\n \t\t\t\t\tClass<? extends Activity> clazz = level.getAcivityClass();\n \t\t\t\t\t\n \t\t\t\t\tIntent launchActivity = new Intent(context, clazz);\t\t\t\t\n \t\t\t\t\tlaunchActivity.putExtra(ApplicationData.NEXT_LEVEL_TAG, nextLevel);\n \t\t\t\t\tlaunchActivity.putExtra(ApplicationData.IS_ENTRY_POINT_TAG, false);\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\tcontext.startActivity(launchActivity);\n \t\t\t\t}else{\n \t\t\t\t\tCharSequence text = \"Invalid Next Level: \" + nextLevel.toString();\n \t\t\t\t\tint duration = Toast.LENGTH_SHORT;\n \n \t\t\t\t\tToast toast = Toast.makeText(context, text, duration);\n \t\t\t\t\ttoast.show();\t\t\t\t\t\n \t\t\t\t}\n \t\t\t} catch (InvalidFileException e) {\n \t\t\t\n \t\t\t} \n \t\t} \n \t}", "public void startNextLevel(int levelJump) {\n\t\tint nextLevel = currentLevel.getLevelNumber() + levelJump;\n\n\t\tIntent returnIntent = new Intent();\n\t\treturnIntent.putExtra(WordZapConstants.NEXT_LEVEL_PARAM_KEYNAME,\n\t\t\t\tnextLevel);\n\t\tsetResult(Activity.RESULT_OK, returnIntent);\n\n\t\tfinish();\n\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent levelone = new Intent(\"anky.dj.iitkgp.LEVELONE\");\r\n\t\t\t\tstartActivity(levelone);\r\n\t\t\t}", "protected void changeActivity() {\n\t\tIntent intent = new Intent();\r\n\t\tintent.setClass(this,MainActivity.class);\r\n\t\t//intent.putExtra(\"padapter\", MainActivity.selectedLevel);\r\n\t\t\r\n\t\tstartActivity(intent);\r\n\t}", "private void goToNextActivity() {\n startActivity(new Intent(this,NextActivity.class));\n }", "public void toNext(View view) {\n Intent intent = new Intent(this, BonusSpinner.class);\n intent.putExtra(\"player\", player);\n startActivity(intent);\n finish();\n }", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent leveltwo = new Intent(\"anky.dj.iitkgp.LEVELTWO\");\r\n\t\t\t\tstartActivity(leveltwo);\r\n\t\t\t}", "public void fightClick(View view) {\n this.player.incrementTries();\n this.player.setTarget(level);\n Intent fightIntent = new Intent(this, FightActivity.class);\n fightIntent.putExtra(\"player\", player);\n fightIntent.putExtra(\"level\", level);\n startActivity(fightIntent);\n }", "public void onClickGo(View view){\n Intent intent;\n int gameEndCode = 0;\n // if (sws) {\n intent = new Intent(MainActivity.this, GameField.class);\n /*\n intent.putExtra(\"start_w_settings\",pref.getBoolean(\"start_w_settings\", false));\n intent.putExtra(\"field_size\",pref.getInt(\"field_size\",3));*/\n // }\n // else {intent = new Intent(MainActivity.this, Settings.class);}\n startActivityForResult(intent, gameEndCode);\n }", "@Override\n\t public void onFinish(){\n\t \tIntent nextScreen = new Intent(getApplicationContext(), Main_Menu_2.class);\n\t\t\t // TODO Auto-generated method stub\n\t\t startActivity(nextScreen);\n\t }", "public void onClick(View v) {\n Intent intent = new Intent(code1.this, Levels.class);\n startActivity(intent);\n\n }", "void onClickNextTurn();", "private void gotoPlay() {\n Intent launchPlay = new Intent(this, GameConfig.class);\n startActivity(launchPlay);\n }", "public void win() {\n\n\t\t// exist next level?\n\t\tif (Project.project.getMaps().get(maptyp).size() > id + 1) {\n\t\t\tProject.project.startLevel(maptyp, id + 1);\n\n\t\t\t// save it\n\t\t\tif (Project.project.getMapLevel(maptyp) < id + 1) {\n\t\t\t\tProject.project.setMapLevel(maptyp, id + 1);\n\t\t\t}\n\t\t} else {\n\t\t\tPWindow.window.setActScene(new MessageScene(\"Gewonnen\", \"\", new MenuMainScene()));\n\t\t}\n\t}", "private void start(int levelID) {\n Intent levelIntent = new Intent(V_MainActivity.this, V_LevelActivity.class);\n levelIntent.putExtra(\"levelID\", levelID); // put the level ID in the intent\n startActivity(levelIntent); // go to levelActivity with intent levelIntent\n }", "public void nextLevel() {\n if (game.level <= 8) {\n game.level = game.level + 1;\n if (isOver()) {\n game.overallMoves = game.getOverallMoves() + game.getMoves();\n }\n f.score.setText(\"Overall Score: \" + game.getOverallMoves());\n restartLevel();\n }\n else if (game.level == 9) { //FINAL LEVEL\n f.levelNum.setText(\"GAME\");\n f.moves.setText(\"OVER\");\n f.score.setText(\"FINAL SCORE: \" + game.getOverallMoves());\n repaint();\n }\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\t\tpublic void onClick(View arg0) {\n\t\t\tString levelNum = level.getText().toString();\n\t\t\tIntent intent = new Intent();\n\t\t\tintent.setClass(BeginningActivity.this, MainActivity.class);\n\t\t\tintent.putExtra(\"levelNum\", levelNum);\n\t\t\t//try to find the level file, if it does not exist, nothing happens.\n\t\t\ttry{\n\t\t\t\tgetResources().getAssets().open(\"bricks\"+levelNum+\".dat\");\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();//finish this beginning activity\n\t\t\t}catch (Exception e){\n\t\t\t}\t\t\t\n\t\t}", "void ChangeActivity(){\n\n Intent intent = new Intent(this, MainActivity.class);\n\n intent.putExtra(NUMBER, number_of_players);\n\n startActivity(intent);\n finish();\n\n }", "public void playClick(View view)\r\n {\r\n Intent intent=new Intent(MainActivity.this, LevelActivity.class);\r\n startActivity(intent);\r\n }", "public void next() {\n String type = startIntent.getStringExtra(\"type\");\n String mdKey = startIntent.getStringExtra(\"md_key\");\n Intent next = new Intent(activity, MainActivity.class);\n\n if(type != null && !type.isEmpty() ||\n (type != null && !type.isEmpty() &&\n mdKey != null && !mdKey.isEmpty())) {\n next.putExtra(\"type\", type);\n\n if (type.equals(\"order_info\") ||\n type.equals(\"order_chat\")) {\n next.putExtra(\"md_key\", mdKey);\n }\n }\n\n activity.startActivity(next);\n activity.finish();\n }", "private void goToMenu() {\n game.setScreen(new MainMenuScreen(game));\n\n }", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent levelthree = new Intent(\"anky.dj.iitkgp.LEVELTHREE\");\r\n\t\t\t\tstartActivity(levelthree);\r\n\t\t\t}", "private void openNextActivity(Intent intent) {\n\n String message = intent.getStringExtra(\"phase\");\n\n Log.d(\"STATE\", \"Waiting activity, phase is -> \" + message );\n if(message != null) {\n if (message.equals(\"USER_JOINED\")) { //TODO: This should be for ready to vote.\n Log.d(\"STATE\", \"Waiting activity, USER JOINED\" );\n\n Intent i = new Intent(this, VoteActivity.class);\n startActivity(i);\n } else if (message.equals(\"result\")) { //TODO: Change this to the new \"phase\" value\n Log.d(\"STATE\", \"Waiting activity. Meadle is ready\" );\n //Notification has been received that alerts meadle is complete\n MeadleDataManager.setHasResult(this);\n\n Intent i = new Intent(this, ResultsActivity.class);\n startActivity(i);\n } else if(message.equals(\"VOTING_FINISHED\")){\n Log.d(\"Votiing Finished\",intent.getExtras().toString());\n Intent i = new Intent(this,MeetingPointActivity.class);\n i.putExtras(intent.getExtras());\n startActivity(i);\n }\n }\n }", "public void onClick(DialogInterface dialog,int id) {\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent intent = new Intent(context, LevelActivity.class);\n startActivity(intent);\n }\n }, 50);\n }", "private void getNextLevel(Exit exit) {\n switch (exit.getAdjacentState(gameModel)) {\n case \"Game Screen\":\n initialGameScreen();\n break;\n case \"Level 1\":\n levelOneScreen();\n break;\n case \"Level 2\":\n levelTwoScreen();\n break;\n case \"Level 3\":\n levelThreeScreen();\n break;\n case \"Level 4\":\n levelFourScreen();\n break;\n case \"Level 5\":\n levelFiveScreen();\n break;\n case \"Level 6\":\n levelSixScreen();\n break;\n case \"Level 7\":\n levelSevenScreen();\n break;\n case \"Level 8\":\n levelEightScreen();\n break;\n case \"Weapons Screen\":\n weaponsScreen();\n break;\n case \"Training Screen\":\n trainingScreen();\n break;\n case \"Boss Screen\":\n bossScreen();\n break;\n case \"Vaccine Screen\":\n vaccineScreen();\n break;\n case \"Win Screen\":\n winScreen();\n break;\n case \"Exit Game\":\n exitGame();\n break;\n default:\n }\n }", "private void nextLevelQuery(){\n AlertDialog.Builder dialog = new AlertDialog.Builder(this);\n dialog.setTitle(\"Warning! Insane Whack-A-Mole Incoming!\");\n dialog.setMessage(\"Would you like to advance to advanced mode?\");\n dialog.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n nextLevel();\n Log.v(TAG, \"User accepts!\");\n }\n });\n dialog.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n Log.v(TAG, \"User decline!\");\n }\n });\n AlertDialog alertBox = dialog.create();\n alertBox.show();\n Log.v(TAG, \"Advance option given to user!\");\n }", "public void setNextLevel(Level level){\r\n this.currentLevel.setNextLevel(level);\r\n }", "private void nextLevel()\n\t{\n\t\tMapInstance.getInstance().setSelectedLevel(MapInstance.getInstance().getSelectedLevel() + 1);\n\t}", "public void testLaunch(View v)\n {\n Intent intent = new Intent(MainMenuActivity.this, GameActivity.class);\n intent.putExtra(\"level\", level);\n\t\tstartActivityForResult(intent, 0x1234);\n }", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface arg0,\n\t\t\t\t\t\t\tint arg1) {\n\t\t\t\t\t\tIntent i = new Intent(getActivity().getApplicationContext(),InGame.class);\n\t\t\t\t\t\tBille bille= Bille.getBille();\n\t\t\t\t\t\tchrono.reset();\n\t\t\t\t\t\tbille.setVies(8);\n\t\t\t\t\t\ti.putExtra(\"lvl\", InGame.getlvl()+1);\n\t\t\t\t\t\tgetActivity().startActivity(i);\n\t\t\t\t\t}", "private void buttonNext (){\n Intent nextActivity = new Intent(Question_One.this, Question_two.class);\n nextActivity.putExtra(EXTRA_TEXT,scoreCounter);\n startActivity(nextActivity);\n }", "private void goToMenu() {\n\t\tgame.setScreen(new MainMenuScreen(game));\n\n\t}", "@Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n // Needs to be reversed here due to the setting of the team in the\n // Inkast module\n if (team1.isChecked()) {\n GlobalVars.setFirstTeam(team2.getText().toString());\n } else if (team2.isChecked()) {\n GlobalVars.setFirstTeam(team1.getText().toString());\n }\n\n GlobalVars.setTurnNumber(1);\n GlobalVars.initializegame();\n\n GlobalVars.addToString(\"{{Game initialize}}\\n\");\n Intent processturn = new Intent(\"ca.longship.planetkubb.TURNINKAST\");\n\n startActivity(processturn);\n\n }", "private void nextScreen() {\n mHandler.post(new Runnable() {\n @Override\n public void run() {\n Intent intent = new Intent(SplashScreenActivity.this, HomeActivity.class);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n //check draw over app permission\n if (!Settings.canDrawOverlays(SplashScreenActivity.this)) {\n intent = new Intent(SplashScreenActivity.this, DrawOverAppActivity.class);\n }\n }\n startActivity(intent);\n }\n });\n }", "public void nextLevel() {\n // stops the game\n world.stop();\n level++;\n switch (level) {\n case 2:\n // get a new world\n world = new Level2();\n // populates new world with Level2()\n world.populate(this);\n \n move.setObstacle(world.getObstacle());\n move2.setObstacle2(world.getObstacle2());\n drop.setBallDrop(world.getBallPlatform());\n view.setWorld(world);\n \n try {\n gameMusicL2 = new SoundClip(\"data/music2.wav\");\n gameMusicL2.loop();\n gameMusicL1.stop();\n } catch (UnsupportedAudioFileException|IOException|LineUnavailableException e) {\n System.out.println(e);\n }\n \n //JFrame debugView = new DebugViewer(world, 500, 500);\n break;\n case 3:\n // get a new world\n world = new Level3();\n // populates new world with Level3()\n world.populate(this);\n \n move.setObstacle(world.getObstacle());\n drop.setBallDrop(world.getBallPlatform());\n world.addStepListener(new MovingBlock(world.getBlock()));\n view.setWorld(world);\n \n try {\n gameMusicL3 = new SoundClip(\"data/music3.wav\");\n gameMusicL3.loop();\n gameMusicL2.stop();\n } catch (UnsupportedAudioFileException|IOException|LineUnavailableException e) {\n System.out.println(e);\n }\n \n //JFrame debugView = new DebugViewer(world, 500, 500); \n break;\n default:\n System.out.println(\"Congratulations, you have completed the game!\");\n System.exit(0);\n }\n world.start();\n }", "void gotoMainIntent() {\r\n // Intenting to start the activity \"main\".\r\n Intent mainIntent = new Intent(this, Main.class);\r\n this.startActivity(mainIntent);\r\n this.finish(); // Splash screen is done now... Needed, otherwise when closing the main activity will result\r\n // in coming back to the splashscreen.\r\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(getApplicationContext(), Gametwofive.class);\n startActivity(intent);\n }", "@Override\r\n public void onClick(View v) {\n startActivity(new Intent(TwoPlayer.this, MainMenu.class));\r\n finish();\r\n }", "public void onClick(View v) {\n Intent nextScreen = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(nextScreen);\n }", "protected void loadNextActivity() {\n\t\tIntent intent = new Intent(this, nextActivityClass);\n\t\tstartActivity(intent);\n\t}", "private void goToMainScreen() {\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent mainIntent;\n\n MainActivity act = new MainActivity();\n Intent intent = new Intent(getApplication(), MainActivity.class);\n startActivity(intent);\n finish();\n }\n }, SPLASH_DISPLAY_LENGHT);\n }", "public void onStartbutton(View view){\n\n if(naughty != 0) {\n score = 0;\n\n // initializes Dictionary for good gameplay\n if(naughty == 1){\n dict().initializeDict();\n }\n Intent gameboard = new Intent(this, GameboardActivity.class);\n gameboard.putExtra(\"naughty\", naughty);\n gameboard.putExtra(\"score\",score);\n gameboard.putExtra(\"guessnum\",guessnum);\n gameboard.putExtra(\"wordlen\",wordlen);\n startActivity(gameboard);\n }\n else {\n Toast.makeText(MenuActivity.this, \"Please select Game mode\", Toast.LENGTH_SHORT).show();\n }\n\n }", "@Override\r\n public void onClick(View v) {\n Intent intent = new Intent(GameActivity.this, LeaderboardActivity.class);\r\n startActivity(intent);\r\n }", "@Override\n public void onClick(View view) {\n Intent screenChange = new Intent(getApplicationContext(), settings.class);\n //creating a bundle to store the variables that will be passed into the next\n //activity\n //starting our activity for a result\n startActivity(screenChange);\n }", "public void levelOneScreen() {\n timer.stop();\n gameModel.setState(\"Level 1\");\n currentScene = levelSetup.getLevelOne().getScene(levelOneInitialEntrance);\n currentBoard = levelSetup.getLevelOne().getBoard();\n currentLevelScreen = levelSetup.getLevelOne();\n levelOneInitialEntrance = (levelOneInitialEntrance ? false : false);\n moveCharacter(mainWindow, currentScene, hero, currentBoard);\n\n }", "@Override\n public void onClick(View view) {\n Intent wannaGuess = new Intent(mContext, WannaGuessActivity.class);\n mContext.startActivity(wannaGuess);\n\n// Intent detailIntent = Game.starter(mContext, mCurrentSport.getTitle(),\n// mCurrentSport.getImageResource());\n\n\n //Start the detail activity\n// mContext.startActivity(detailIntent);\n\n //anoter ver\n\n // @Override\n// protected void onCreate(Bundle savedInstanceState) {\n// super.onCreate(savedInstanceState);\n// setContentView(R.layout.activity_main);\n//\n// //Find the view that shows the catch me category\n//// TextView catchMe = (TextView) findViewById(R.id.catch_me);\n//// catchMe.setOnClickListener(new View.OnClickListener() {\n//// @Override\n//// public void onClick(View v) {\n//// Intent catchMeIntent = new Intent(MainActivity.this, CatchMe.class);\n//// startActivity(catchMeIntent);\n//// }\n//// });\n//\n// }\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tgetWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,\r\n\t\t\t\tWindowManager.LayoutParams.FLAG_FULLSCREEN);\r\n\t\tsetContentView(R.layout.menu);\r\n\t\tbeginner = (Button) findViewById(R.id.beginner);\r\n\t\tintermediate = (Button) findViewById(R.id.intermediate);\r\n\t\texpert = (Button) findViewById(R.id.expert);\r\n\t\tbeginner.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tIntent levelone = new Intent(\"anky.dj.iitkgp.LEVELONE\");\r\n\t\t\t\tstartActivity(levelone);\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t\tintermediate.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tIntent leveltwo = new Intent(\"anky.dj.iitkgp.LEVELTWO\");\r\n\t\t\t\tstartActivity(leveltwo);\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t\texpert.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tIntent levelthree = new Intent(\"anky.dj.iitkgp.LEVELTHREE\");\r\n\t\t\t\tstartActivity(levelthree);\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}", "@Override\n public void onClick(View v) {\n Intent next = new Intent(HomeActivity.this,Playerinfo.class); //set intent for going to playerinfo class\n startActivity(next); // click to continue to the next activity\n //player.pause();\n }", "public void forwardOnClick(View view){\n while(Integer.parseInt(mazeController.getPercentDone()) < 99) {\n\n }\n Intent newIntent = new Intent(this, Play.class);\n startActivity(newIntent);\n }", "private void NextTurn() {\n\t\tTextView tvStatus = (TextView) findViewById(R.id.tvStatus);\n\t\t\n\t\t\tif(player_1){\n\t\t\t\tplayer_1 = false;\n\t\t\t\tif(players == 1){ \n\t\t\t\t\ttvStatus.setText(\"Android Nole's turn\");\n\t\t\t\t\tLog.i(\"TEST\",\"Android turn\");\n\t\t\t\t\tAndroidTurn();\n\t\t\t\t}else{\n\t\t\t\t\ttvStatus.setText(\"Nole's turn\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tplayer_1 = true;\n\t\t\t\ttvStatus.setText(\"Gator's turn\");\n\t\t\t}\n\t\t}", "public void nextTurn(){\n\t\tthis.setCurrentElement(this.getCurrentElement().getNext());\n\t}", "public void openGame(View view) {\n setViewBackgroundWithoutResettingPadding(view, R.drawable.bkg_button_on);\n\n // Calculates the first level least completed on file\n String levelCodes = loadLevelStatus(this);\n int firstUnsolvedLevel = levelCodes.indexOf(\"0\");\n if (firstUnsolvedLevel == -1) {\n firstUnsolvedLevel = levelCodes.indexOf(\"1\");\n }\n if (firstUnsolvedLevel == -1) {\n firstUnsolvedLevel = levelCodes.indexOf(\"2\");\n }\n if (firstUnsolvedLevel == -1) {\n firstUnsolvedLevel = 0;\n }\n\n // Saves the default level scroll position and the first unsolved level\n SharedPreferences.Editor settingsEditor = sharedPreferences.edit();\n settingsEditor.putInt(GRID_POSITION, firstUnsolvedLevel);\n settingsEditor.putInt(CURRENT_LEVEL, firstUnsolvedLevel);\n settingsEditor.apply();\n\n // Starts the intent at the first level not completed\n Intent intent = new Intent(this, BoardActivity.class);\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent=new Intent(Glory.this,SettingsActivity.class);\n\t\t\t\tintent.putExtra(\"GAMESTARTED\", false);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "private void goToMenu() {\n Intent intentProfile = new Intent(PregonesActivosActivity.this, MenuInicial.class);\n PregonesActivosActivity.this.startActivity(intentProfile);\n }", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface arg0,\n\t\t\t\t\t\t\tint arg1) {\n\t\t\t\t\t\tIntent i = new Intent(getActivity().getApplicationContext(),InGame.class);\n\t\t\t\t\t\tBille bille= Bille.getBille();\n\t\t\t\t\t\tchrono.reset();\n\t\t\t\t\t\tbille.setVies(8);\n\t\t\t\t\t\ti.putExtra(\"lvl\", InGame.getlvl());\n\t\t\t\t\t\tgetActivity().startActivity(i);\n\t\t\t\t\t}", "public void nextTurn() {\r\n activePlayer = nextPlayer;\r\n advanceNextPlayer();\r\n }", "@Override\n public void onClick(View v)\n {\n\n Intent intent = new Intent (getApplicationContext(), Leaderboard.class);\n startActivity(intent);\n finish();\n }", "@OnClick(R.id.nextButton)\n public void onNext(View view){\n Intent intent = new Intent(getApplicationContext(), SettingActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n finish();\n database.close();\n }", "private void nextActivity(String id)\n\t{\n\t\tIntent intent=new Intent(kanto_Map, PropertyList.class);\n\t\tintent.putExtra(\"Id\", id);\n\t\tkanto_Map.startActivity(intent);\n\t}", "public void Next(){\n Bundle extras = new Bundle();\n extras.putString(\"IdEvento\", IdEvento); // se obtiene el valor mediante getString(...)\n\n Intent intent = new Intent(this, AtendiendoEmergencia.class);\n //Agrega el objeto bundle a el Intne\n intent.putExtras(extras);\n //Inicia Activity\n startActivity(intent);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Intent intent = new Intent(SuperScouting.this, MatchList.class);\n intent.putExtra(Constants.Intent_Extras.NEXT_PAGE, Constants.Intent_Extras.SUPER_SCOUTING);\n startActivity(intent);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Intent intent = new Intent(SuperScouting.this, SuperScouting.class);\n if (practice) {\n intent.putExtra(Constants.Intent_Extras.MATCH_NUMBER, -1);\n } else {\n intent.putExtra(Constants.Intent_Extras.MATCH_NUMBER, matchNumber + 1);\n }\n startActivity(intent);\n }", "public void onClick(DialogInterface dialog, int which) {\n Intent nextScreen = new Intent(getApplicationContext(), Mockup1.class);\n startActivityForResult(nextScreen, 0);\n\n }", "public void gotoMain(View v) {\n Intent intent = new Intent(chords.this, MainActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View view){\n Intent thisIntent = new Intent(getBaseContext(),ProblemsActivity.class);\n\n if (levelSelected==1){\n level=\"one\";\n }\n else if(levelSelected==2){\n level=\"two\";\n }\n else if(levelSelected==3){\n level=\"three\";\n }\n else if(levelSelected==4){\n level=\"four\";\n }\n else if(levelSelected==5){\n level=\"five\";\n }\n else{\n //Error\n }\n\n //Setting Intention Extra\n switch (view.getId()){\n\n case R.id.imgadd1:\n testName = \"add\" + level;\n break;\n\n case R.id.imgsub1:\n testName = \"sub\" + level;\n break;\n case R.id.imgmul1:\n testName = \"mul\" + level;\n break;\n case R.id.imgdiv1:\n testName = \"div\" + level;\n break;\n }\n thisIntent.putExtra(\"OPER_LEVEL\", testName);\n startActivity(thisIntent);\n }", "public void onClick(View v) {\n Intent i = new Intent(getApplicationContext(),GameActivity.class);\n\n\n startActivity(i);\n }", "@Override\n public void onClick(View v) {\n {\n SharedPreferences sharedpreferencesRS= getSharedPreferences(\"SCREENNAME\" , MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedpreferencesRS.edit();\n editor.putString(\"screenname\" , \"roundsetting\");\n editor.commit();\n Intent NextScreen = new Intent(RoundSetting.this, SelectCourse.class);\n // NextScreen.putExtras(bundle);\n startActivity(NextScreen);\n }\n\n\n }", "@Override\n public void jumpActivity() {\n startActivity(new Intent(MainActivity.this, MainActivity.class));\n }", "public void scoreGame(View v){\n Intent intent = new Intent(MainActivity.this,Main2Activity.class);\n\n intent.putExtra(\"tries\" , triesLeft);\n\n startActivityForResult(intent, 0);\n\n }", "private void openMainActivity(int pos) {\n Intent i = new Intent(Launcher.this, MainActivity.class);\n i.putExtra(\"division\", pos);\n startActivity(i);\n }", "private void switch_level_game(){\n switch (level_name){\n case \"Beginners\":\n uri_grammar1 = \"https://www.talkenglish.com/grammar/grammar.aspx\";\n uri_grammar2 = \"https://www.englisch-hilfen.de/en/exercises_list/alle_grammar.htm\";\n uri_grammar3 = \"https://learnenglish.britishcouncil.org/en/english-grammar\";\n button_grammar1_text = \"בסיס הדקדוק האנגלי\";\n button_grammar2_text = \"תרגילי דקדוק באנגלית\";\n button_grammar3_text = \"לימוד אנגלית\";\n break;\n\n case \"Basic\":\n uri_grammar1 = \"https://www.learnamericanenglishonline.com/Links.html\";\n uri_grammar2 = \"http://www.english-test.net/toefl/\";\n uri_grammar3 = \"https://learnenglish.britishcouncil.org/en/english-grammar\";\n button_grammar1_text = \"בסיס הדקדוק האנגלי\";\n button_grammar2_text = \"מבחן דקדוק באנגלית\";\n button_grammar3_text = \"לימוד אנגלית\";\n break;\n\n case \"Advanced\":\n uri_grammar1 = \"http://www.advanced-english-grammar.com/\";\n uri_grammar2 = \"http://www.bbc.co.uk/learningenglish/english/course/towards-advanced/unit-6/session-1\";\n uri_grammar3 = \"https://learnenglish.britishcouncil.org/en/english-grammar\";\n button_grammar1_text = \"דקדוק אנגלית למתקדמים\";\n button_grammar2_text = \"תרגילי דקדוק באנגלית\";\n button_grammar3_text = \"לימוד אנגלית\";\n break;\n }\n }", "@Override\n\t\t\tpublic void onClick() {\n\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"正在跳转\", 1000).show();\n\t\t\t\tIntent intentSwitch = new Intent(TestRolateAnimActivity.this,com.example.thirdapp.LocationActivity.class); \n\t\t\t\tstartActivity(intentSwitch);\n\t\t\t\tSystem.out.println(\"4\");\n\t\t\t}", "@Override\n public void onClick(View v) {\n {\n saveRoundSetting();\n SharedPreferences sharedpreferencesRS= getSharedPreferences(\"SCREENNAME\" , MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedpreferencesRS.edit();\n editor.putString(\"screenname\" , \"roundsetting\");\n editor.commit();\n Intent NextScreen = new Intent(RoundSetting.this, SelectCourse.class);\n // NextScreen.putExtras(bundle);\n startActivity(NextScreen);\n finish();\n }\n\n\n }", "public void toGameEndActivity(int x){\n /* record socre*/\n System.out.println(\"yes\"+x);\n Intent intent=new Intent();\n intent.putExtra(\"score\",String.valueOf(x));\n /* move from this activity to new activity*/\n intent.setClass(MainActivity.this,EndActivity.class);\n MainActivity.this.startActivity(intent);\n MainActivity.this.finish();\n }", "@SuppressLint(\"NewApi\")\r\n\tpublic void showLevelAdvanceMenu() {\n\t\ttry {\r\n\t\t\tThread.sleep(500);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t}\r\n\t\tLevelManager levelManager = game.getModel().getLevelManager();\r\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n \tbuilder.setTitle(getString(R.string.level_passed) + \"\\n\" + getString(R.string.next_up));\r\n \tLevel[] nextLevels = levelManager.getNextLevels();\r\n \tLevel nextLevel = nextLevels[0];\r\n \tString levelCaption = nextLevel.getCaption();\r\n \t\r\n \tfinal List<Stage> unlockedStages = levelManager.getOtherUnlockedStages(nextLevel.getStageKey());\r\n \t\r\n \tboolean twoLevelsTemp = false;\r\n \tLevel nextUnlockedLevelTemp = null;\r\n \tint levelsCount = 1;\r\n \tif (nextLevels.length > 1) {\r\n \t\tnextUnlockedLevelTemp = nextLevels[1];\r\n \t\ttwoLevelsTemp = true;\r\n \t\tlevelsCount++;\r\n \t}\r\n \tfinal Level nextUnlockedLevel = nextUnlockedLevelTemp;\r\n \tfinal boolean twoLevels = twoLevelsTemp;\r\n \t\r\n \tString[] items = new String[unlockedStages.size() + levelsCount];\r\n \tint i = 0;\r\n \titems[i++] = levelCaption;\r\n \tif (twoLevels) {\r\n \t\titems[i++] = nextUnlockedLevel.getCaption();\r\n \t}\r\n \tfor (Stage stage: unlockedStages) {\r\n \t\titems[i++] = stage.getCaption();\r\n \t}\r\n \tbuilder.setItems(items, new DialogInterface.OnClickListener() {\r\n \t public void onClick(DialogInterface dialog, int item) {\r\n \t \tif (item > 0) {\r\n \t \t\tif (twoLevels) {\r\n \t \t\t\tif (item == 1) {\r\n \t \t\t\t\tgame.getController().selectLevel(nextUnlockedLevel);\r\n \t \t\t\t} else {\r\n \t \t\t\tshowChooseLevelMenu(unlockedStages.get(item - 2));\r\n \t \t\t\t}\r\n \t \t\t} else {\r\n \t \t\t\tshowChooseLevelMenu(unlockedStages.get(item - 1));\r\n \t \t\t}\r\n \t \t}\r\n \t \tpassLevelMenuDone();\r\n \t }\r\n \t});\r\n \tbuilder.setOnCancelListener(new DialogInterface.OnCancelListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onCancel(DialogInterface dialog) {\r\n\t\t\t\tpassLevelMenuDone();\r\n\t\t\t}\r\n\t\t});\r\n \ttry {\r\n\t \tbuilder.setOnDismissListener(new DialogInterface.OnDismissListener() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onDismiss(DialogInterface dialog) {\r\n\t\t\t\t\tpassLevelMenuDone();\r\n\t\t\t\t}\r\n\t\t\t});\r\n \t} catch (Throwable t) {\r\n \t\t// this might throw if API is not compatible\r\n \t\tLog.i(\"JaroActivity\", \"showLevelAdvanceMenu.t\");\r\n \t}\r\n \tAlertDialog dialog = builder.create();\r\n \tdialog.show();\r\n\t}", "public void nextTurn(){\n\t\tplayers[currentPlayer].setNotCurrentPlayer();\n\t\t\n\t\t//increment current player to advance to next player\n\t\tcurrentPlayer = (currentPlayer + 1) % players.length;\n\t\t\n\t\t//update the new current player\n\t\tupdateCurrentPlayerView();\n\t}", "public void switchToSlidingTile() {\n Intent slidingTile = new Intent(this, SlidingTileGameActivity.class);\n startActivity(slidingTile);\n }", "@RequestMapping(\"/next\")\n public void nextTurn() {\n playerService.nextTurn();\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\r\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = USER;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}", "public void gotoProfileActivity()\n {\n Log.e(\"next\",\"\"+\"log\");\n startActivity(new Intent(OTPActivity.this, UserProfileActivity.class));\n finish();\n }", "private void startGame() {\n hideView(R.id.title);\n hideView(R.id.score);\n gameView.setVisibility(View.VISIBLE);\n level=0;\n totalPoints =0;\n gameView.setTotalPoints(totalPoints);\n startLevel();\n }", "public void nextLevelTogo() {\n if (this.myClearedLines % 2 == 0) {\n myLinesToGo = 2;\n } else {\n myLinesToGo = 1;\n }\n }", "public void gameOver(){\n Intent intent = new Intent(getContext(), GameOver.class); //set intent to game over activity\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_CLEAR_TASK);\n getContext().startActivity(intent); //goes to game over activity\n }", "private void goToMain(){\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(getApplicationContext(),\n\t\t\t\t\t\tLeaderBoard.class);\n\t\t\t\tstartActivity(i);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(LevelActivity.this,\n\t\t\t\t\t\tSnack_703Activity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "public void toNextPage(View v) {\n Intent i = new Intent(MainActivity.this, SecondActivity.class);\n i.putExtra(\"is_played\", is_played);\n startActivity(i);\n }", "public void nextQuestion() {\n if (currentq<questionbank.size()-1)\n {\n currentq++;\n }\n else\n {\n currentq=0;\n finished=true;\n\n Intent i = new Intent(MainActivity.this, ScorecardActivity.class);\n //Intent(coming from, where to go)\n i.putExtra(EXTRAMESSAGE1, Integer.toString(score));\n startActivity(i);\n\n }\n question.setText(questionbank.get(currentq).getQuestionText());\n\n\n }", "@Override\n\tpublic void onClick(View arg0) {\n\t\tIntent intent=new Intent();\n\t\tif(!newSeason){\n\t\t\tintent.setClass(League.this,TeamList.class);\n\t\t\tintent.putExtra(\"goal1\", t1);\n\t\t\tintent.putExtra(\"goal2\", t2);\n\t\t\tintent.putExtra(\"id1\", id1);\n\t\t\tintent.putExtra(\"id2\", id2);\n\t\t\tintent.putExtra(\"team1\", team1);\n\t\t\tintent.putExtra(\"team2\", team2);\n\t\t\tstartActivity(intent);\n\t\t}\n\t\telse{\n\t\t\t//intent.setClass(League.this, ChoosePlayers.class);\n\t\t\t//intent.putExtra(\"season\", \"end\");\n\t\t\t//intent.putExtra(\"balance\", balance);\n\t\t\tintent.setClass(League.this, Knockout.class);\n\t\t\tintent.putExtra(\"team1\", t[0].name);\n\t\t\tintent.putExtra(\"team2\", t[1].name);\n\t\t\tintent.putExtra(\"id1\", t[0].ImageId);\n\t\t\tintent.putExtra(\"id2\", t[1].ImageId);\n\t\t\tstartActivity(intent);\n\t\t\tfinish();\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public void playerView(View view) {\n PlayerCapabilityFacade pcf = new PlayerCapabilityFacade();\n Intent intent;\n if(pcf.isTournamentActive()) {\n intent = new Intent(ModeSelectionActivity.this, PlayerTourneyActivity.class);\n } else {\n intent = new Intent(ModeSelectionActivity.this, PlayerTotalsActivity.class);\n }\n\n startActivity(intent);\n\n //else onclick go to PlayerTourneyActivity\n }", "public void nextTurn() {\n visionChanged = true;\n SoundPlayer.playEndTurn();\n // Check if any protection objectives have failed\n gameState.updateAllHeroProtectionGoals(getHeroManager());\n // hook the next turn\n if (!multiplayerGameManager.hookNextTurn()) {\n\n if (map.enemyPerformingMove()) {\n return;\n }\n // Enemy action was made\n if (playerTurn && map.hasEnemy()) {\n try {\n map.enemyTurn(this);\n } catch (InterruptedException e) {\n logger.error(\"ayylmao at the GameManager.nextTurn(..) Method\");\n Platform.exit();\n Thread.currentThread().interrupt();\n }\n } else {\n map.playerTurn(this);\n updateBuffIcons();\n updateTempVisiblePoints();\n map.turnTick();\n for(CurrentHeroChangeListener listener:heroChangeListeners){\n \tlistener.onHeroChange(getHeroManager().getCurrentHero());\n }\n }\n\n } else {\n moveViewTo(getHeroManager().getCurrentHero().getX(), getHeroManager().getCurrentHero().getY());\n updateBuffIcons();\n updateTempVisiblePoints();\n }\n\n map.updateVisibilityArray();\n dayNightClock.tick();\n turnTickLiveTiles();\n abilitySelected = AbilitySelected.MOVE;\n abilitySelectedChanged = true;\n backgroundChanged = true;\n gameChanged = true;\n minimapChanged = true;\n saveOriginator.writeMap(this.map, this.getObjectives(), this.gameState);\n // update(this.tracker,null);\n }", "public void startAgain() {\n setLevel(1);\n setScore(0);\n setPotion(0);\n setBonusKeys(0);\n setCoin(0);\n setHealth(100);\n startGame();\n }" ]
[ "0.7904112", "0.7692341", "0.7520215", "0.73511064", "0.7333882", "0.7154464", "0.7136409", "0.68039536", "0.6797487", "0.66381776", "0.6632387", "0.65076125", "0.6493753", "0.6484904", "0.6457066", "0.6430519", "0.64163965", "0.63999325", "0.6386721", "0.63848627", "0.6382707", "0.636138", "0.63331735", "0.6327882", "0.6322082", "0.6287741", "0.62849957", "0.6278818", "0.62753737", "0.6258518", "0.62267727", "0.6207751", "0.62002003", "0.6191444", "0.61869884", "0.6180246", "0.6174982", "0.61684763", "0.6160378", "0.61544967", "0.6147078", "0.61426276", "0.6123138", "0.6080123", "0.6039782", "0.6038268", "0.6029118", "0.6012088", "0.5996117", "0.59771305", "0.5976071", "0.5973578", "0.5973129", "0.5969417", "0.5966077", "0.59606767", "0.59577096", "0.59521174", "0.5945223", "0.5936504", "0.593397", "0.5928867", "0.591092", "0.5891163", "0.58810407", "0.5867505", "0.5861083", "0.5856392", "0.58535886", "0.5835418", "0.5827038", "0.5823479", "0.58166414", "0.58146644", "0.5813716", "0.5797757", "0.5797344", "0.57952124", "0.57950944", "0.5793511", "0.5786271", "0.5775973", "0.5764714", "0.576442", "0.5764284", "0.5761532", "0.5760279", "0.5757849", "0.5757804", "0.5756275", "0.5749424", "0.57471204", "0.5743463", "0.5731891", "0.57288295", "0.57271427", "0.5727068", "0.5726275", "0.5725875", "0.5725429" ]
0.86468476
0
Sets up and displays the game over dialog
private void gameOverDialog() { AlertDialog dialog = _dialogFactory.createDialog(this, R.string.lost, R.string.game_over); dialog.setButton(DialogInterface.BUTTON_NEUTRAL, getString(R.string.ok), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { gotoGameEnd(IGameConstants.GAME_OVER); } }); dialog.setCancelable(false); _dialogActive = true; dialog.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void showWinnerDialog() {\n String message = getGameOverMessage();\n JOptionPane.showMessageDialog( this, message, GameContext.getLabel(\"GAME_OVER\"),\n JOptionPane.INFORMATION_MESSAGE );\n }", "public GameOver() {\n initComponents();\n setForm();\n }", "public void gameOver() {\n\t\tframe.setTitle(frame.getTitle() + \" - Game Over\");\n\t}", "private void gameOverAlert() {\n \tAlert alert = new Alert(AlertType.INFORMATION);\n \t\n \talert.setTitle(\"Game Over!\");\n \talert.setHeaderText(\"You Did Not Get A New High Score!\\nYour High Score: \" + level.animal.getPoints());\n \talert.setContentText(\"Try Again Next Time!\");\n \talert.show();\n\t}", "public void gameOver() {\r\n // save score\r\n endScore = pointsScore;\r\n\r\n // game over dialog\r\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n LayoutInflater inflater = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\r\n View dialogView = inflater.inflate(R.layout.game_over, null); // create view for custom dialog\r\n builder.setCancelable(false);\r\n builder.setView(dialogView); // set view to game over layout\r\n\r\n // final score and time remaining\r\n TextView finalScore = (TextView) dialogView.findViewById(R.id.final_score);\r\n finalScore.setText(\"Your final score is \"+pointsScore);\r\n\r\n\r\n // restart button within dialog\r\n Button gameoverRestart = (Button) dialogView.findViewById(R.id.gameover_restart);\r\n gameoverRestart.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n gameOverDialog.dismiss();\r\n doDataAddToDb();\r\n dataAddAppInstance();\r\n ((GameActivity) getActivity()).restartGame();\r\n }\r\n });\r\n\r\n // main menu button within dialog\r\n Button gameoverMain = (Button) dialogView.findViewById(R.id.gameover_main);\r\n gameoverMain.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n gameOverDialog.dismiss();\r\n dataAddAppInstance();\r\n doDataAddToDb();\r\n\r\n getActivity().finish();\r\n }\r\n });\r\n gameOverDialog = builder.show();\r\n }", "public void gameOver() {\r\n\t\tgameFrame.gameOver();\r\n\t\tnotifyViews();\r\n\t}", "private void displayLoseScreen() {\n new EventPopupWindow(String.format(\"GAME OVER:\\nYou failed to collect all %d parts.\\n\\n\"\n + \"Score: %d\",\n getShipPartsNeededCount(),\n getScore()));\n }", "public void displayGameOver() {\n\t\tthis.theScreen.setFont(Preferences.GAME_OVER_FONT);\n\t\tthis.theScreen.setColor(Preferences.GAME_OVER_COLOR);\n\t\tthis.theScreen.drawString(Preferences.GAME_OVER_TEXT,\n\t\t\t\tPreferences.GAME_OVER_X, Preferences.GAME_OVER_Y);\n\t}", "public void display_game_over_text () {\n\n fill(150, 100);\n rect(0, 0, displayW, displayH);\n\n textFont(myFont);\n textAlign(CENTER);\n textSize(displayH/20);\n fill(255);\n text(\"Game Over\", displayW/2, 3*displayH/7);\n\n if (score.winnerName == \"Pacmax\") {\n text(\"Winner is Pacmax! Your score is \" + score.score, displayW/2, 4*displayH/7);\n } else {\n text(\"Winner is Blinky!\", displayW/2, 4*displayH/7);\n }\n\n mySound.play_game_over_song();\n\n isKeyInputAllowed = false;\n }", "public GameOverScreen(final PApplet display) {\n\t\tsuper(display);\n\n\t\tviews.add(new Background(display));\n\t\tviews.add(new Text(display, \"Game Over\\n\" + \"¯\\\\_(X.x)_/¯\\n\" + \"Press ENTER to restart ♪♫♪\", true));\n\t}", "private void showGameOverDialog() {\n this.computerPaquetView.showOnceHiddenCards();\n int dialogResult = JOptionPane.showConfirmDialog (null, String.format(\"%s, you have lost!\\nPlay again?\", this.blackjackController.getHumanPlayer().getName()),\"\", JOptionPane.YES_NO_OPTION);\n if(dialogResult == JOptionPane.YES_OPTION){\n this.blackjackController.getHumanPlayer().resetBudget();\n this.startGame();\n } else {\n this.dispose();\n }\n }", "private void setupGameOverPanel(){\n\n //Adding the gameOver label to gameOverPanel\n gameOver.setFont(new Font(Font.SERIF, Font.BOLD, 50));\n gameOver.setAlignmentX(Font.CENTER_BASELINE);\n gameOverPanel.add(gameOver);\n\n //Adding the gameOverPanel to fullPanel\n fullPanel.add(gameOverPanel, BorderLayout.NORTH);\n }", "public void gameOverState(final Context context) {\n final Dialog gameoverDialog = new Dialog(context);\n gameoverDialog.setContentView(R.layout.layout_gameover);\n gameoverDialog.setCancelable(true);\n gameoverDialog.show();\n String scoreGet = \"Score: \" + String.valueOf(score);\n //This function is not used by GamePanelActivity, but rather when it is called from GamePanel itself\n //It defines a dialog box, which uses the game over layout\n\n Button menuButton = (Button) gameoverDialog.findViewById(R.id.button);\n final EditText nameBar = (EditText) gameoverDialog.findViewById(R.id.editTextTextPersonName);\n final String scoreFinal = String.valueOf(score);\n TextView scoreText = (TextView)gameoverDialog.findViewById(R.id.scoreView);\n scoreText.setText(scoreGet);\n //The game over layout includes a field for getting a name\n\n menuButton.setOnClickListener(new View.OnClickListener() {\n @RequiresApi(api = Build.VERSION_CODES.KITKAT)\n @Override\n public void onClick(View view) {\n String name = nameBar.getText().toString();\n\n if (name.isEmpty())\n try {\n StringBuilder text = new StringBuilder();\n File path = new File(Environment.getExternalStorageDirectory()+\"/\"+Environment.DIRECTORY_DOCUMENTS+\"/\");\n File file = new File(path,\"asteroidsname.dat\");\n\n if(file.exists()) {\n try {\n BufferedReader bruh = new BufferedReader(new FileReader(file));\n String line;\n\n while ((line = bruh.readLine()) != null) {\n text.append(line);\n name = line;\n }\n bruh.close();\n } catch (IOException e) {\n Toast.makeText(context, e.getMessage(), Toast.LENGTH_SHORT).show();\n e.printStackTrace();\n }\n }\n //This is a direct copy of the file reading code from the Leaderboards activity\n //If the name text is left blank, this reads from the default name file\n //If it doesn't exists, it just leaves it as \"Player 1\"\n else{\n name = \"Player 1\";\n }\n updateLeaderboards(name, scoreFinal);\n gameoverDialog.dismiss();\n } catch(Exception e) {\n e.printStackTrace();\n }\n else if (name.length() > 20)\n nameBar.setError(\"Please enter a shorter name!\");\n else {\n try {\n updateLeaderboards(name, scoreFinal);\n gameoverDialog.dismiss();\n //This is here in case the player manually enters a name\n } catch (Exception e) {\n Toast.makeText(context, \"Leaderboards update failed!\", Toast.LENGTH_SHORT).show();\n e.printStackTrace();\n }\n }\n }\n });\n }", "public void GameOver(){\n\n\t\tguessBttn.setVisible(false);\n\t\tguessFullWord.setVisible(false);\n\t\tAnswerBox.setDisable(true); //can no longer use the text box\n\t\tresultMessage.setText(\" Sorry!! You Lost.\\nLet's Try to Play Again!\");\n\t\tplayAgain.setVisible(true);\n\t\trevealLabel.setText(\"The mystery word was:\");\n\t\trevealLabel.setVisible(true);\n\t\twordDashes.setText(mysteryWord);\n\t}", "public void gameOver() {\r\n grid.exposeMines();\r\n this.displayGrid();\r\n System.out.println(\"Better luck next time!\");\r\n }", "public void gameOver()\r\n {\n addObject(new Text(\"Game Over\"), 550, 300);\r\n backgroundMusic.pause();\r\n Greenfoot.stop();\r\n }", "private void gameOverDialog() {\n Toast makeText;\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.game_over), Toast.LENGTH_LONG);\n makeText.show();\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.final_score) + score, Toast.LENGTH_LONG);\n makeText.show();\n }", "private void gameOver() {\n\t\t\n\t}", "@Override\n public void gameOver() {\n messagePanel.showMessage(image);\n setEnabled(false);\n }", "void gameOver();", "void gameOver();", "@Override\n\tpublic void show() {\n\t\tsetUpGame();\n\t}", "public void switchToGameOverScreen() {\n \tCardLayout currLayout = (CardLayout) screens.getLayout();\n \tcurrLayout.show(screens, \"gameover\");\n }", "public GameOverStandalone() {\n initComponents();\n \n ranks = new LinkedList<String>();\n \n FadingEffect fader = new FadingEffect();\n fader.Fade(this);\n \n// mainActivity=this;\n// \n// Thread fading = new Thread(new Runnable() {\n// @Override\n// public void run() {\n// while (true) {\n// int x=java.awt.MouseInfo.getPointerInfo().getLocation().x;\n// int y=java.awt.MouseInfo.getPointerInfo().getLocation().y;\n// if (x>mainActivity.getX()&&x<(mainActivity.getX()+mainActivity.getWidth())&&y>mainActivity.getY()&&y<(mainActivity.getY()+mainActivity.getHeight())) {\n// mainActivity.setOpacity(1.0f);\n// }\n// else {\n// mainActivity.setOpacity(0.75f);\n// }\n// try {\n// Thread.sleep(100);\n// } catch (Exception e) {\n// \n// }\n// }\n// }\n// });\n// fading.start();\n }", "public static void gameOver(Stage endGame) {\n\t\tendGame.setTitle(\"Game over\");\n\t\tInventory.inventory.clear();\n\t\tPane GOLayout = new Pane();\n\t\t\n\t\tGOLayout.getChildren().add(ButtonEvents.playButton(endGame, 265, 230));\n\t\tGOLayout.getChildren().add(ButtonEvents.exitButton(165,230));\n\t\tScene scene = new Scene (GOLayout, 500, 500);\n\n\t\tendGame.setScene(scene);\n\t\tendGame.show();\n\t}", "private void addDialog(boolean gameWon) {\n String separator = Hauptfenster.getSeparator();\n String img_source = Hauptfenster.getDirectory() + \"image\" + separator + hauptfenster.getTheme();\n String[] choices = {\"Neues Spiel\", \"Abbrechen\"};\n ImageIcon lose = new ImageIcon(img_source + separator + \"gameover.gif\");\n ImageIcon win = new ImageIcon(img_source + separator + \"win.gif\");\n int result;\n if(gameWon) {\n result = JOptionPane.showOptionDialog(hauptfenster, \"Sie haben das Spiel gewonnen!\", \"Win\", JOptionPane.YES_NO_OPTION, JOptionPane.PLAIN_MESSAGE, win, choices, \"Neues Spiel\");\n }\n else {\n result = JOptionPane.showOptionDialog(hauptfenster, \"Sie haben das Spiel verloren!\", \"Game Over\", JOptionPane.YES_NO_OPTION, JOptionPane.PLAIN_MESSAGE, lose, choices, \"Neues Spiel\");\n }\n hauptfenster.getSounds().stopPlaying(); // beenden aller aktiven Soundwiedergaben\n if(result == 0) {\n hauptfenster.getSpielfeld().drawNew();\n hauptfenster.newGame();\n }\n }", "public void gameOver() {\n\t\t\n\t\tgameOverBool = true;\n\t\t\n\t\tif(garbagegame.scoreCount > bestScore){//save high score if it is beaten\n\t\t\tbestScore = garbagegame.scoreCount;\n\t\t\tpref = this.getSharedPreferences(\"ca.gsalisi.garbages\", Context.MODE_PRIVATE);\n\t\t\tEditor editor = pref.edit();\n\t\t\teditor.putInt(\"best\", bestScore);\n\t\t\teditor.commit();\n\t\t\tupdatedata();\n\t\t\tupdateBest();\n\t\t}\n\t\t\n\t\tgarbagegame.stopGame();\n\t\t\n\t\t//creates dialog\n\t\toverDialog = new Dialog(GameActivity.this, R.style.CustomDialog);\n\t\toverDialog.setContentView(R.layout.game_over);\n\t\toverDialog.setCanceledOnTouchOutside(false);\n\t\n\t\tTextView tv = new TextView(this);\n\t\ttv.setText(\"Game Over!\");\n\t\ttv.setTypeface(typeface);\n\n\t\tTextView education;\n\t\teducation=overDialog.findViewById(R.id.education);\n\t\tint sije=edu.size();\n Random random=new Random();\n int mod=(random.nextInt(1000))%sije;\n education.setText(edu.get(mod));\n education.setTypeface(typeface);\n\n\t\t\n\t\toverDialog.setTitle(\"Game Over!\");\n\t\t\n\t\tTextView scoreOver = (TextView) overDialog.findViewById(R.id.score_view2);\n\t\tTextView bestOver = (TextView) overDialog.findViewById(R.id.best_view2);\n\t\t\n\t\tscoreOver.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 22);\n\t\tbestOver.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 22);\n\t\t\n\t\tscoreOver.setTypeface(typeface);\n\t\tbestOver.setTypeface(typeface);\n\t\t\n\t\tscoreOver.setText(gameGraphics.getScoreView().getText().toString());\n\t\tbestOver.setText(bestScoreView.getText().toString());\n\t\t\n\t\tImageButton restartbtn = (ImageButton) overDialog.findViewById(R.id.btn_gameover);\n\t\trestartbtn.setOnClickListener(new OnClickListener(){\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\toverDialog.dismiss();\n\t\t\t\tgarbagegame.resetGame();\n\t\t\t\tgameOverBool = false;\n\t\t\t}\n\t\t});\n\t\toverDialog.show();\n\t\t\n\t\toverDialog.setOnCancelListener(new Dialog.OnCancelListener(){\n\n\t\t\t@Override\n\t\t\tpublic void onCancel(DialogInterface arg0) {\n\t\t\t\tgarbagegame.resetGame();\n\t\t\t\tgameOverBool = false;\n\t\t\t}\n\t\t});\n\t\t\n\t}", "private void gameWonDialog() {\n // stack overflow\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle((game.isPlayer_turn()) ? R.string.player_win_title : R.string.bank_win_title);\n builder.setMessage((game.isPlayer_turn()) ? R.string.player_win_message : R.string.bank_win_message);\n\n // Set up the buttons\n builder.setPositiveButton(R.string.play_again, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n resetGame();\n }\n });\n builder.setNegativeButton(R.string.return_to_home, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n returnToMain();\n }\n });\n //builder.show();\n\n AlertDialog alert = builder.create();\n alert.show();\n Button nbutton = alert.getButton(DialogInterface.BUTTON_NEGATIVE);\n nbutton.setBackgroundColor(getResources().getColor(R.color.bank_red));\n Button pbutton = alert.getButton(DialogInterface.BUTTON_POSITIVE);\n pbutton.setBackgroundColor(getResources().getColor(R.color.yale_blue));\n }", "public void gameOver() \n {\n ScoreBoard endGame = new ScoreBoard(\"You Lose!\", scoreCounter.getValue());\n addObject(endGame, getWidth()/2, getHeight()/2);\n }", "public void gameOver() {\n // if (ENABLE_SOUND) {\n // sfx.endGame();\n // }\n doLeaderboard = true;\n frameRate(10);\n //this.state = GameState.MENU;\n //If line 151 runs, it bypasses the gameover leaderboard screen for some reason\n //redraw();\n}", "@Override\r\n\tpublic void gameOver() {\n\t\tover = true;\r\n\t\tupdate();\r\n\t}", "private void showGameOver()\n {\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n //Todo:\n // step 1. get the winner name using game.getWinner()\n // step 2. put the string player.getName()+\" won the game!\" to the string reference called \"result\"\n Player winner = game.getWinner();\n String result = winner.getName() + \" won the game!\";\n\n // pass the string referred by \"result\" to make an alert window\n // check the bottom of page 9 of the PA description for the appearance of this alert window\n Alert alert = new Alert(AlertType.CONFIRMATION, result, ButtonType.YES, ButtonType.NO);\n alert.showAndWait();\n if (alert.getResult() == ButtonType.YES)\n {\n Platform.exit();\n }\n }\n });\n }", "private void displayWinScreen() {\n if (crewState.getShip().getShieldLevel() > 0) {\n new EventPopupWindow(String.format(\"You Won:\\nYou managed to collect all %d parts.\\n\\n\"\n + \"Score: %d\",\n getShipPartsNeededCount(),\n getScore()));\n } else {\n new EventPopupWindow(String.format(\"Although your ship is toast, you technically \"\n + \"still won the game. None of the parts are useful anymore, you will die on \"\n + \"this planet, but according to the job description you did everything that \"\n + \"was required. At least you can say you followed the spec, right?\\n\\n\"\n + \"Score: %d\",\n getShipPartsNeededCount(),\n getScore()));\n }\n }", "private void gameOver(Stage stage) {\n\t\t\n\t\t//A specific label is created, coloured red and is scaled to be 2.5 times its usual size,\n\t\t//to emphasise the state of the game.\n\t\tLabel gameOver = new Label(\"Game over\");\n\t\tgameOver.setTextFill(Color.RED);\n\t\tgameOver.setScaleX(2.5);\n\t\tgameOver.setScaleY(2.5);\n\t\tgameOver.setMinWidth(300);\n\t\tgameOver.setAlignment(Pos.BASELINE_CENTER);\n\t\t\n\t\t//End statement labels are created to explain to the player why the game has ended and\n\t\t//what they can do next.\n\t\tLabel endStatement1 = new Label(\"You have run out of tries\");\n\t\tendStatement1.setMinWidth(300);\n\t\tendStatement1.setAlignment(Pos.CENTER);\n\t\tLabel endStatement2 = new Label(\"Press any key to start a new game or escape to exit.\");\n\t\tendStatement2.setWrapText(true);\n\t\tendStatement2.setPrefWidth(200);\n\t\tendStatement2.setMinWidth(200);\n\t\tendStatement2.setMaxWidth(200);\n\t\tendStatement2.setAlignment(Pos.BASELINE_CENTER);\n\n\t\t//These labels are put into a VBox, along with the Region object to help move the labels down\n\t\t//on the screen. The int determines how much space should be between each node in the VBox.\n\t\tVBox v = new VBox(20,eh,gameOver,endStatement1,endStatement2);\n\t\tv.setAlignment(Pos.TOP_CENTER);\n\t\tVBox.setVgrow(eh,Priority.ALWAYS);\n\t\t\n\t\t//The VBox is put into a group and the scene is then recreated with this group.\n\t\tgroup = new Group(v);\n\t\tscene = new Scene(group,300,300,Color.LIGHTGREY);\n\t\tstage.setScene(scene);\n\t\tstage.setResizable(false);\n\t\tstage.setTitle(\"Hangman\");\n\t\tstage.show();\n\t\t\n\t\tscene.setOnKeyReleased(new EventHandler<KeyEvent>() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void handle(KeyEvent e) {\n\t\t\t\t\n\t\t\t\t//If the player presses the escape button, the socket and stage are closed, ending\n\t\t\t\t//the client program.\n\t\t\t\tif(e.getCode()==KeyCode.ESCAPE) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tclient.close();\n\t\t\t\t\t}catch(IOException ioe) {\n\t\t\t\t\t}\n\t\t\t\t\tstage.close();\n\t\t\t\t//However, if the player has pressed any other button, the start method is called in\n\t\t\t\t//order to start a new game. It sets up the window once again and resets certain values\n\t\t\t\t//so that the game can behave normally.\n\t\t\t\t}else {\n\t\t\t\t\tstart(stage);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public void gameOver(){\n\t\tstatus.setGameStarted(false);\n\t\tstatus.setGameOver(true);\n\t\tgameScreen.doNewGame();\n\t\tsoundMan.StopMusic();\n\t\n\t\t// delay to display \"Game Over\" messa\tprivate Object rand;\n\n\t\tTimer timer = new Timer(3000, new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstatus.setGameOver(false);\n\t\t\t}\n\t\t});\n\t\ttimer.setRepeats(false);\n\t\ttimer.start();\n\t}", "private void gameOver(){\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(GameActivity.this);\n alertDialogBuilder\n .setMessage(\"Your score: \" + correctScore + \"%\").setCancelable(false).setPositiveButton(\"New Game\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n startActivity(new Intent(getApplicationContext(), MainActivity.class));\n }\n });\n AlertDialog alertDialog = alertDialogBuilder.create();\n alertDialog.show();\n }", "private void gameOver(final int status) {\n // Play R.raw.robot_bleep\n soundPool.play(this.soundIds[2], 1, 1, 3, 0, (float) 1.0);\n this.gameOverDisplayed = true;\n ((PongGame) context).gameState = PongGame.GAME_OVER;\n this.touchEnabled = false;\n\n ((PongGame) context).runOnUiThread(new Runnable() {\n @Override\n public void run() {\n DialogInterface.OnDismissListener listener = new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(@NonNull DialogInterface dialog) {\n dialog.dismiss();\n }\n };\n GeneralFunctions.displayDialog(context, status, listener);\n }\n });\n }", "@Override\n public void show() {\n\n skin = new Skin(Gdx.files.internal(\"menu/menu.json\"),new TextureAtlas(\"menu/menu.pack\"));\n\n Image background = new Image(skin, \"menuscreen\");\n background.setPosition(0,0);\n stage.addActor(background);\n\n Image gameOver = new Image(skin,\"gameOver\");\n gameOver.setPosition( ( 800 - 484)/2 , (480 - 345)/2 ) ;\n stage.addActor(gameOver);\n\n Button gameOverSim = new Button(skin,\"gameOverSim\");\n gameOverSim.setPosition(265,100);\n stage.addActor(gameOverSim);\n\n Button gameOverNao = new Button(skin,\"gameOverNao\");\n gameOverNao.setPosition(425,100);\n stage.addActor(gameOverNao);\n\n gameOverSim.addListener(new ClickListener() {\n @Override\n public void clicked(InputEvent event, float x, float y) {\n // TO DO passar o level como parametro no construtor\n selecionado.play();\n ((Game) Gdx.app.getApplicationListener()).setScreen(new PlayScreen(game, level));\n dispose();\n }\n });\n\n gameOverNao.addListener(new ClickListener() {\n @Override\n public void clicked(InputEvent event, float x, float y) {\n selecionado.play();\n ((Game) Gdx.app.getApplicationListener()).setScreen(new MenuScreen(game));\n dispose();\n }\n });\n\n }", "public void gano() {\n\t\t\n\t\tGameOver_Win win = new GameOver_Win(1);\n\t\thiloJuego = null;\n\t\tthis.panelJuego = null;\n\t\tthis.dispose();\n\t\tthis.juego = null;\n\t\twin.setVisible(true);\n\t\t\n\t}", "@Override\r\n\tpublic void gameOver() {\n\t\tgameOver = true;\r\n\t\tupdate();\r\n\t}", "private void setupGameWindow()\n {\n uControll.setWindowProperties(new WindowListener() {\n @Override\n public void windowOpened(WindowEvent we) {\n }\n\n @Override\n public void windowClosing(WindowEvent we) {\n menuPanel.open();\n }\n\n @Override\n public void windowClosed(WindowEvent we) {\n }\n\n @Override\n public void windowIconified(WindowEvent we) {\n }\n\n @Override\n public void windowDeiconified(WindowEvent we) {\n }\n\n @Override\n public void windowActivated(WindowEvent we) {\n }\n\n @Override\n public void windowDeactivated(WindowEvent we) {\n }\n });\n }", "private void showLoserDialog() {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"You Have Been Defeated \" + player1.getName() + \",Computer Wins!!\", new ButtonType(\"Close\", ButtonBar.ButtonData.NO), new ButtonType(\"Try Again?\", ButtonBar.ButtonData.YES));\n alert.setGraphic(new ImageView(new Image(this.getClass().getResourceAsStream(\"/Images/bronze.png\"))));\n alert.setHeaderText(null);\n alert.setTitle(\"Computer Wins\");\n alert.showAndWait();\n if (alert.getResult().getButtonData() == ButtonBar.ButtonData.YES) {\n onReset();\n }\n }", "public void game_over() {\n JOptionPane.showMessageDialog(null,\"GAME OVER\",\"Titolo finestra mettici quello che vuoi\",1);\n\n System.exit(0);\n}", "@Override\n public void gameOver(GameController game) {\n updateScreen(game);\n ((MultiplayerHostController) Main.game).updateClient();\n\n switch (game.getCurrentState()) {\n case END_DRAW:\n JOptionPane.showMessageDialog(this, \"Draw!\");\n break;\n case END_CIRCLE:\n JOptionPane.showMessageDialog(this, \"You won!\");\n break;\n case END_CROSS:\n JOptionPane.showMessageDialog(this, \"You lost!\");\n break;\n }\n stopGame();\n }", "private void gameOver() {\n System.out.println(\"GAME OVER!!\");\n\n reset();\n mGameOver = true;\n mChangeObserver.gameOver();\n }", "private void gameOver(Button button) {\n\t\tImageView iv = new ImageView(new Image(\"public/images/\"+selectedTheme+\"/mine.png\"));\n\t\tiv.setFitHeight(40);\n\t\tiv.setFitWidth(40);\n\t\tbutton.setGraphic(iv);\n\n\t\tgameOver.setText(\"GAME OVER: Try again?\");\n\t\tgameOver.setVisible(true);\n\n\t\tgame.setDone();\n\t}", "private void gameOver() {\r\n timer.stop();\r\n if (JOptionPane.showConfirmDialog(this, \r\n \"Game Over!\\nDo you want to play again?\",\r\n FORM_TITLE,JOptionPane.YES_NO_OPTION) == \r\n JOptionPane.YES_OPTION) {\r\n startGame();\r\n }\r\n else { \r\n close();\r\n }\r\n }", "public void displayWin()\n {\n if(player1 instanceof GameController){\n player1.gameOver(1);\n } else {\n player2.gameOver(1);\n }\n }", "public void gameOver() {\n\t}", "public void gameOver() {\n\n g.setColor(Color.red);\n Font small = new Font(\"Helvetica\", Font.BOLD, 30);\n g.setFont(small);\n g.drawString(\"GAME OVER\", 250, 300);\n g.drawString(\"PRESS R TO RESTART GAME\", 150,400 );\n if(keyManager.restart==true)\n {\n gameOver=true;\n aliens.clear();\n shotVisible=false;\n Assets.init();\n \n player = new Player(getWidth() / 2, getHeight() - 100, 1, 60, 40, this);\n for (int i = 0; i < 4; i++) {\n for (int j = 0; j < 6; j++) {\n aliens.add(new Alien(150 + 50 * j, 50 + 50 * i, 1, 40, 40, this));\n }\n }\n \n \n }\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n controller.gameOver();\n }", "private void gameOver() {\n\t\tAsteroidsGameOverString gameOverString = new AsteroidsGameOverString(GameObject.ROOT);\n\t\tgameOverString.setScale(new Vector3(5.0, 5.0, 5.0));\n\t\tgameOverString.translate(new Vector3(0.0, 8.0));\n\t}", "private void gameOver() {\n\t\tgameOver=true;\n\t}", "public void win() {\n JOptionPane.showConfirmDialog(null, \"You won! You got out with \" + this.player.getGold() + \" gold!\", \"VICTORY!\", JOptionPane.OK_OPTION);\n this.saveScore();\n this.updateScores();\n this.showTitleScreen();\n }", "public static void gameOver() {\n ScoreBoard.write(ScoreController.getScoresPath());\n populate();\n }", "public void createMainGame() {\n\t\tpanelIntro.setVisible(false);\n\t\tintroButtonPanel.setVisible(false);\n\t\t\n\t\tpanelMain = new JPanel();\n\t\t\n\t\tcon.add(panelMain);\n\t\t\n\t\tplayerPanel = new JPanel();\n\t\tplayerPanel.setBounds(50, 25, 924, 50);\n\t\tplayerPanel.setBackground(Color.DARK_GRAY);\n\t\tplayerPanel.setLayout(new GridLayout(1,4));\n\t\tpanelMain.add(playerPanel);\n\t\tcon.add(playerPanel);\n\t\t\n\t\tenergyLabel = new JLabel(\" Energie: \");\n\t\tenergyLabel.setFont(playerInfo);\n\t\tenergyLabel.setForeground(Color.LIGHT_GRAY);\n\t\tplayerPanel.add(energyLabel);\n\t\t\n\t\tenergyLabelNumber = new JLabel();\n\t\tenergyLabelNumber.setFont(playerInfo);\n\t\tenergyLabelNumber.setForeground(Color.LIGHT_GRAY);\n\t\tplayerPanel.add(energyLabelNumber);\n\t\t\n\t\tdoubtLevelLabel = new JLabel(\"Misstrauen: \");\n\t\tdoubtLevelLabel.setFont(playerInfo);\n\t\tdoubtLevelLabel.setForeground(Color.LIGHT_GRAY);\n\t\tplayerPanel.add(doubtLevelLabel);\n\t\t\n\t\tdLLNumber = new JLabel();\n\t\tdLLNumber.setFont(playerInfo);\n\t\tdLLNumber.setForeground(Color.LIGHT_GRAY);\n\t\tplayerPanel.add(dLLNumber);\n\t\tplayerPanel.add(Box.createRigidArea(new Dimension(50, 50)));\n\t\tplayerPanel.add(Box.createRigidArea(new Dimension(50, 50)));\n\t\tplayerPanel.add(Box.createRigidArea(new Dimension(50, 50)));\n\t\tplayerPanel.add(Box.createRigidArea(new Dimension(50, 50)));\n\t\t\n\t\tbirdText = new JTextArea();\n\t\tbirdText.setBackground(Color.BLACK);\n\t\tbirdText.setFont(dialogueText);\n\t\tbirdText.setForeground(Color.white);\n\t\tbirdText.setLineWrap(true);\n\t\tbirdText.setWrapStyleWord(true);\n\t\tbirdText.setBounds(354, 200, 250, 150);\n\t\tbirdText.setVisible(false);\n\t\tcon.add(birdText);\n\t\t\n\t\tbirdPanel = new JPanel();\n\t\tbirdPanel.setBounds(354, 387, 60, 82);\n\t\tbirdPanel.setBackground(Color.BLACK);\n\t\tbirdPanel.addMouseListener(new birdListener());\n\t\ttry {\n\t\t\tBufferedImage birdPicture = ImageIO.read(new File(\".//res//bird_kleiner.jpg\"));\n\t\t\tJLabel birdLabel = new JLabel(new ImageIcon(birdPicture));\n\t\t\tbirdPanel.add(birdLabel);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tcon.add(birdPanel);\n\t\t\n\t\thereComesTheText = new JTextArea();\n\t\thereComesTheText.setBounds(55, 100, 285, 370);\n\t\thereComesTheText.setBackground(Color.BLACK);\n\t\thereComesTheText.setForeground(Color.LIGHT_GRAY);\n\t\thereComesTheText.setFont(dialogueText);\n\t\thereComesTheText.setLineWrap(true);\n\t\thereComesTheText.setWrapStyleWord(true);\n\t\tpanelMain.add(hereComesTheText);\n\t\tcon.add(hereComesTheText);\n\t\t\n\t\timagePanel.setBounds(427, 95, 546, 375);\n\t\timagePanel.setBackground(Color.black);\n\t\tpanelMain.add(imagePanel);\n\t\tcon.add(panelMain);\n\t\t\n\t\timagePanel.add(imageLabel);\n\t\t\n\t\tcon.add(imagePanel);\n\t\t\n\t\tpanelButtons = new JPanel();\n\t\tpanelButtons.setBounds(50, 510, 924, 200);\n\t\tpanelButtons.setBackground(Color.black);\n\t\tpanelButtons.setLayout(new GridLayout(2, 2));\n\t\tcon.add(panelButtons);\n\t\t\n\t\tfor(int i=1; i<5; i++) {\n\t\t\tbuttons.get(i).setBackground(Color.black);\n\t\t\tbuttons.get(i).setForeground(Color.LIGHT_GRAY);\n\t\t\tbuttons.get(i).setFont(runningText);\n\t\t\tbuttons.get(i).setFocusPainted(false);\n\t\t\tpanelButtons.add(buttons.get(i));\n\t\t}\n\t}", "public void gameOver ()\n {\n Greenfoot.delay (50);\n if (gameOver)\n {\n fader = new Fader (); // create a new fader\n addObject (fader, 400, 300); // add the fader object to the world\n if (UserInfo.isStorageAvailable()) {\n HighScore highScore = new HighScore (score);\n addObject (highScore, 300, 170);\n }\n Greenfoot.stop();\n }\n }", "public void GameWin () {\n\t\t\n\t\twordDashes.setText(mysteryWord);\n\t\tguessBttn.setVisible(false);\n\t\tguessFullWord.setVisible(false);\n\t\tAnswerBox.setDisable(true); //can no longer use the text box\n\t\tresultMessage.setText(\" Great Job!!\\nYou Guessed the Word!!\");\n\t\tplayAgain.setVisible(true); \n\t\t\n\t}", "@Override\n public void show() {\n batch = new SpriteBatch();\n stage = createStage();\n\n // create overlays\n hud = new GigagalHUD();\n victoryOverlay = new VictoryOverlay();\n gameoverOverlay = new GameOverOverlay();\n\n // determine input processor\n useOnScreenControl = (Gdx.app.getType() == Application.ApplicationType.Android // on mobile\n || Configs.instance.isDebugOnScreenControlEnabled() // or debugging\n );\n\n if (useOnScreenControl) {\n onscreenControl = new OnscreenControl();\n gameInputProcessor = new TouchProcessor(onscreenControl);\n } else {\n gameInputProcessor = new KeyPressProcessor();\n }\n\n Gdx.input.setInputProcessor(gameInputProcessor);\n\n // load new level\n startNewLevel();\n }", "private void initPlayers() {\n UIManager.put(\"Panel.background\", LIGHT_GRAY);\n UIManager.put(\"OptionPane.background\", LIGHT_GRAY);\n\n JOptionPane pane = new JOptionPane();\n JDialog dialog = pane.createDialog(\"\");\n dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\n\n JButton onePlayer = createButton(\"1P\", dialog);\n JButton twoPlayer = createButton(\"2P\", dialog);\n Object option[] = {onePlayer, Box.createRigidArea(new Dimension(20,0)), twoPlayer};\n\n JPanel panel = new JPanel(new BorderLayout());\n pane.setMessage(panel);\n pane.setOptions(option);\n\n dialog.setSize(new Dimension(150, 100));\n dialog.setLocationRelativeTo(null);\n dialog.setVisible(true);\n }", "public void open(Plugin plugin, SpoutPlayer splayer) {\n\n GenericPopup popup = new GenericPopup();\n int width = splayer.getMainScreen().getMaxWidth();\n int height = splayer.getMainScreen().getMaxHeight();\n pluginLeg.log(\"aight\" + width + \"\" + height);\n\n// int width = splayer.getCurrentScreen().getWidth();\n// int height = splayer.getCurrentScreen().getHeight();\n\n //title of the screen\n GenericLabel topLabel = new GenericLabel(\"Clan-Invitation\");\n topLabel.setScale(1);\n\n topLabel.setWidth(topLabel.getText().length() * 8 * (int) topLabel.getScale()).setHeight((int) topLabel.getScale() * 15);\n\n topLabel.setX(width / 2 - topLabel.getWidth() / 2);\n topLabel.setY(topLabel.getHeight() / 2 + 5);\n popup.attachWidget(plugin, topLabel);\n\n //title of the screen\n String questionString = \"&2You are invited to \"+clan.getName()+\". Do you want to join?\";\n GenericLabel questionLabel = new GenericLabel(LegendaryClans.parseColor(questionString));\n questionLabel.setScale(1);\n questionLabel.setWidth(questionLabel.getText().length() * 5 * (int) questionLabel.getScale());\n questionLabel.setHeight((int) questionLabel.getScale() * 15);\n\n questionLabel.setX(width / 2 - questionLabel.getWidth() / 2);\n questionLabel.setY(height / 2 - questionLabel.getHeight() / 2);\n popup.attachWidget(plugin, questionLabel);\n\n //Accept Button\n LegendaryButton acceptButton = new LegendaryButton(LegendaryClans.parseColor(\"&2Accept!\"), popup) {\n\n @Override\n public void onButtonClick(ButtonClickEvent event) {\n if (pluginLeg.getClanManager().getClanByPlayer(clan.getLeaders().get(0)) != null && askedPlayer != null) {\n clan.addMember(askedPlayer);\n } \n getPopup().close();\n }\n };\n\n\n acceptButton.setWidth(acceptButton.getText().length() * 8 * (int) acceptButton.getScale()).setHeight((int) acceptButton.getScale() * 15);;\n acceptButton.setX(width / 2 + width / 4 - acceptButton.getWidth() / 2).setY(height / 2 + height / 4 - acceptButton.getHeight() / 2);\n\n\n popup.attachWidget(plugin, acceptButton);\n //deny button\n LegendaryButton denieButton = new LegendaryButton(LegendaryClans.parseColor(\"&4Deny!\"), popup) {\n\n @Override\n public void onButtonClick(ButtonClickEvent event) {\n clan.broadcastMessage(\"&4\" + askedPlayer.getName() + \" denied invitation!\");\n getPopup().close();\n }\n };\n\n denieButton.setWidth(acceptButton.getText().length() * 8 * (int) acceptButton.getScale());\n denieButton.setHeight((int) denieButton.getScale() * 15);\n// \n// ((LegendaryClans)plugin).log(\"\"+width+\",\"+height);\n// denieButton.setX(denieButton.getX()+denieButton.getWidth()/2 +10);\n\n denieButton.setX(width / 4 - denieButton.getWidth() / 2);\n denieButton.setY(height / 2 + height / 4 - denieButton.getHeight() / 2);\n popup.attachWidget(plugin, denieButton);\n\n splayer.closeActiveWindow();\n splayer.getMainScreen().attachPopupScreen(popup);\n }", "private void newGame()\r\n {\r\n //close the current screen\r\n screen.dispose();\r\n //start back at the set up menu\r\n SetupView screen = new SetupView();\r\n SetupController controller = new SetupController(screen);\r\n screen.registerObserver(controller);\r\n }", "public void winDialog() {\n\n\t\tif (JOptionPane.showOptionDialog(null,\n\t\t\t\t\"Player \" + playerTurn\n\t\t\t\t\t\t+ \" created a SAP and wins the game! Congratulations!\\nWould you like to play again?\",\n\t\t\t\t\"Game Over\", 0, JOptionPane.PLAIN_MESSAGE, null, options, options[0]) == JOptionPane.YES_OPTION) {\n\t\t\trestartGame();\n\t\t} else {\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t}", "public GameWindow() {\n\t\tthis.initWindow();\n\t}", "private void i_win() {\n\t\tif (MainMusic.isPlaying())\n\t\t\tMainMusic.stop();\n\t\tMainMusic = MediaPlayer.create(Game.this, R.raw.win);\n\t\tMainMusic.start();\n\t\tgame_panel.Pause_game=true;\n\t\tWinDialog.setVisibility(View.VISIBLE);\n\t}", "private void aboutHandler() {\n JOptionPane.showMessageDialog(\n this.getParent(),\n \"YetAnotherChessGame v1.0 by:\\nBen Katz\\nMyles David\\n\"\n + \"Danielle Bushrow\\n\\nFinal Project for CS2114 @ VT\");\n }", "@Override\r\n public void onGameEnded() {\r\n this.setVisible(true);\r\n }", "public void gameOver() {\n cls();\n displayWord();\n displayGuessedAndRemain();\n printHangman();\n System.out.println(\"Game over!\");\n System.exit(0);\n }", "public void gameOver(Graphics g){\n\t\tg.setColor(Color.BLACK);\n\t\tg.setFont(new Font(\"Dialog\", Font.ROMAN_BASELINE, 100));\t\n\t\tg.drawString(\"GAME OVER\" ,100,400);\n\t}", "public GamesWindow(Point p)\n {\n initComponents();\n pack();\n this.setTitle(\"Space Attack\");\n this.setLocation(p);\n error.setVisible(false);\n this.setVisible(true);\n }", "public void gameOver(Pane p){\n HBox gameOver = new HBox();\r\n gameOver.setTranslateY(ventanaY/2);\r\n gameOver.setMinWidth(ventanaX);\r\n gameOver.setAlignment(Pos.CENTER);\r\n gameOver.setSpacing(100);\r\n \r\n p.getChildren().add(gameOver);\r\n \r\n Text textoGameOver = new Text(\"Game Over\");\r\n textoGameOver.setFont(Font.font(50));\r\n textoGameOver.setFill(Color.WHITE);\r\n \r\n gameOver.getChildren().add(textoGameOver);\r\n }", "public void perdio() {\n\t\tthis.juego = null;\n\t\thiloJuego = null;\n\t\tthis.panelJuego = null;\n\t\tthis.dispose();\n\t\tGameOver_Win go = new GameOver_Win(0);\n\t\tgo.setVisible(true);\n\t\t\n\t}", "public void gameOver() \n {\n new GameOver();\n Greenfoot.stop();\n }", "private void drawGameOver() {\r\n\t\tg.setColor(Color.GRAY);\r\n\t\t// creates a new font\r\n\t\tFont myFont = new Font(Font.SANS_SERIF, Font.BOLD, TetrisGame.PANEL_WIDTH * 3 / 2);\r\n\t\tg.setFont(myFont);\r\n\t\t// draws the words \"Game Over\"\r\n\t\tg.drawString(\"GAME OVER!\",\r\n\t\t\t\t TetrisGame.PANEL_WIDTH * TetrisGame.SQUARE_LENGTH / 3,\r\n\t\t\t\t TetrisGame.PANEL_HEIGHT * TetrisGame.SQUARE_LENGTH / 2);\r\n\t\t// draws the score\r\n\t\tg.drawString(game.gameOverMessage,\r\n\t\t\t\t TetrisGame.PANEL_WIDTH * TetrisGame.SQUARE_LENGTH / 3,\r\n\t\t\t\t TetrisGame.PANEL_HEIGHT * TetrisGame.SQUARE_LENGTH / 2 + 20);\r\n\t\t// draws the restart message\r\n\t\tg.drawString(\"Press R to Retry\",\r\n\t\t\t\t TetrisGame.PANEL_WIDTH * TetrisGame.SQUARE_LENGTH / 3,\r\n\t\t\t\t TetrisGame.PANEL_HEIGHT * TetrisGame.SQUARE_LENGTH / 2 + 40);\r\n\t}", "void win() {\n if (_game.isWon()) {\n showMessage(\"Congratulations you win!!\", \"WIN\", \"plain\");\n }\n }", "private void drawGameOverScreen(Graphics g) {\n \t\tg.setColor(Color.blue);\n \t\tg.fillRect(0, 0, getWidth(), getHeight());\n \t\tg.setColor(Color.white);\n \t\tg.setFont(new Font(\"Courier New\", Font.PLAIN, 18));\n \t\tg.drawString(\"A problem has been detected and your computer\", 50, 30);\n \t\tg.drawString(\"has been shut down to prevent damage to your computer.\", 50, 60);\n \n \t\tg.drawString(\"OUT_OF_CPU_ERROR\", 50, 120);\n \n \t\tg.drawString(\"Diagnostics\", 50, 240);\n \t\tg.drawString(\"Items Junked: \" + ((RecycleBin) (objects.get(0))).getAmountCollected(), 50, 300);\n \t\tg.drawString(\"Time Elapsed: \" + (timeGameEnded - timeGameStarted) / 1000000000.0 + \" s\", 50, 360);\n \n \t\tg.drawString(\"Press <Esc> to power down.\", 50, 400);\n \t}", "public void gameOver(String winOrLoss){\r\n\t\t\r\n\t\tAlertDialog.Builder alert = new AlertDialog.Builder(HardActivity.this);//Create end of game alert\r\n\t\t\r\n\t\t//get time info\r\n\t\tChronometer timer = (Chronometer)findViewById(R.id.chronometer1);\r\n\t\tString time = (String) timer.getText();\r\n\t\ttimer.stop();\r\n\t\t\r\n\t\t//Add game info to database\r\n\t\tdatabase.addScore(\"hard\", correctMinesGotten, time);\r\n\t\t\r\n\t\t//Loser!\r\n\t\tif(winOrLoss == \"lost\"){\r\n\t\t\t//set title\r\n\t\t\talert.setTitle(\"Game Over!\");\r\n\t\t\t//set dialog message\r\n\t\t\talert.setMessage(\"\\n\" + \"Top Score\\n-------\\n\" + getHighscores())\r\n\t\t\t\t .setCancelable(true)//disable canceling feature\r\n\t\t\t\t \r\n\t\t\t\t //Play again button\r\n\t\t\t\t .setPositiveButton(\"Play Again\", new DialogInterface.OnClickListener() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\r\n//\t\t\t\t\t\tEasyActivity.this.finish();\r\n\t\t\t\t\t\tfinish();\r\n\t\t\t\t\t\tstartActivity(getIntent());\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t\t\r\n\t\t\t\t//New level button\r\n\t\t\t\t.setNegativeButton(\"Choose New Level\", new DialogInterface.OnClickListener() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\r\n\t\t\t\t\t\tHardActivity.this.finish();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\r\n\t\t//Winner!\r\n\t\t}else{\r\n\t\t\t//set title\r\n\t\t\talert.setTitle(\"Winner!\");\r\n\t\t\t//set dialog message\r\n\t\t\talert.setMessage(\"Nice job!\" + \r\n\t\t\t\t\t\t\t \"\\n\" + \"Top Scores\\n\" + getHighscores())\r\n\t\t\t\t .setCancelable(false)//disable cancel feature\r\n\t\t\t\t \r\n\t\t\t\t //Play again button\r\n\t\t\t\t .setPositiveButton(\"Play Again\", new DialogInterface.OnClickListener() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\r\n\t\t\t\t\t\tfinish();\r\n\t\t\t\t\t\tstartActivity(getIntent());\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t\t\r\n\t\t\t\t//Choose level button\r\n\t\t\t\t.setNegativeButton(\"Choose New Level\", new DialogInterface.OnClickListener() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\r\n\t\t\t\t\t\tHardActivity.this.finish();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\t//Display alert\r\n\t\tAlertDialog alertDialog = alert.create();\r\n\t\talertDialog.show();\r\n\t\t\r\n\t}", "public void gameOver() {\n tb.setState();\n Date finalDate = new Date();\n float currTime = (finalDate.getTime() - start) / 1000F;\n Intent intent = new Intent(getContext(), TrueBlueOverActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n\n intent.putExtra(\"Score\", score);\n\n intent.putExtra(\"Time\", currTime);\n\n intent.putExtra(\"Level\", level);\n getContext().startActivity(intent);\n }", "@Override\n\tpublic void show() {\n\t\tGameView.VIEW.addDialog(this);\n\t\tsuper.show();\n\t}", "private void showDrawDialog() {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \" Game Has Ended in a Draw!! \\n\\n\\n Thanks For Playing \" + player1.getName(), new ButtonType(\"Close\", ButtonBar.ButtonData.NO), new ButtonType(\"Play Again\", ButtonBar.ButtonData.YES));\n alert.setGraphic(new ImageView(new Image(this.getClass().getResourceAsStream(\"/Images/draw.png\"))));\n alert.setHeaderText(null);\n alert.setTitle(\"Draw!\");\n alert.showAndWait();\n if (alert.getResult().getButtonData() == ButtonBar.ButtonData.YES) {\n onReset();\n }\n }", "private void showEndGameResults() {\n EndGameDialog endGameDialog = new EndGameDialog(this, stats, playerOne, playerTwo, (e) -> {\n dispose();\n\n this.start();\n });\n\n\n }", "private void showContent(){\n\t\tLayoutManager overlay = new OverlayLayout(this);\n\t\tsetLayout(overlay);\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tBorderLayout layout = new BorderLayout();\n\t\tlayout.setHgap(10);\n\t layout.setVgap(10);\n\t\tpanel.setLayout(layout); \n\t\tpanel.setBorder(new EmptyBorder(new Insets(20,50,20,50)));\n\t\tpanel.setOpaque(false);\n\t\tadd(panel);\n\t\t\n\t /*\n\t * Top Panel of the Game Screen\n\t * Buttons: back to home, suspend, quit and restart\n\t */\n\t JPanel controlPanel = new JPanel();\n\t controlPanel.setLayout(new GridLayout(1,4, 1, 1));\n\t\tcontrolPanel.setOpaque(false);\n\t\tpanel.add(controlPanel, BorderLayout.NORTH);\n\t\t\n\t\tIcon back = new ImageIcon(\"assets/back.jpg\");\n\t\tJButton btnBack = new JButton(back);\n\t\tbtnBack.setOpaque(false);\n\t\tbtnBack.setContentAreaFilled(false);\n\t\tbtnBack.setBorderPainted(false);\n\t\tbtnBack.setFocusPainted(false);\n\t\tbtnBack.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tgsPcs.firePropertyChange(\"exit\", null, null);\n\t\t\t}\n\t\t});\n\t\tcontrolPanel.add(btnBack);\n\t\tcontrolPanel.add(new JLabel(\"\"));\n\t\t//controlPanel.add(new JLabel(\"\"));\n\t\t\n\t\tIcon restart = new ImageIcon(\"assets/restart.jpg\");\n\t\tJButton btnRestart = new JButton(restart);\n\t\tbtnRestart.setOpaque(false);\n\t\tbtnRestart.setContentAreaFilled(false);\n\t\tbtnRestart.setBorderPainted(false);\n\t\tbtnRestart.setFocusPainted(false);\n\t\tbtnRestart.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tmazeSession.resetSession();\n\t\t\t\trepaint();\n\t\t\t}\n\t\t});\n\t\tcontrolPanel.add(btnRestart);\n\n\t\tIcon exit = new ImageIcon(\"assets/exit.jpg\");\n\t\tJButton btnQuit = new JButton(exit);\n\t\tbtnQuit.setOpaque(false);\n\t\tbtnQuit.setContentAreaFilled(false);\n\t\tbtnQuit.setBorderPainted(false);\n\t\tbtnQuit.setFocusPainted(false);\n\t\tbtnQuit.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tif(showConfirmExit() == JOptionPane.OK_OPTION){\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tpublic int showConfirmExit(){\n\t\t return JOptionPane.showConfirmDialog(null,\"Are you sure?\",\"Yes\",JOptionPane.OK_CANCEL_OPTION);\n\t\t \n\t\t\t}\n\t\t});\n\t\tcontrolPanel.add(btnQuit);\n\t\t\n\t\tthis.mazeDrawer.setOpaque(false);\n\t\tthis.mazeDrawer.setPreferredSize(new Dimension(150, 150));\n\t\tpanel.add(this.mazeDrawer, BorderLayout.CENTER);\n\t\t\n\t\t/*\n\t\t * Bottom Panel of the Game Screen\n\t\t * Contains music slider and game score \n\t\t */\n\t\tJPanel bottomPanel = new JPanel();\n\t\tbottomPanel.setOpaque(false);\n\t\tFlowLayout layout1 = new FlowLayout();\n\t layout1.setHgap(10); \n\t bottomPanel.setLayout(layout1);\n\t\tpanel.add(bottomPanel, BorderLayout.SOUTH);\n\t\t\n\t\tJLabel lblCourseID = new JLabel(\"Course ID: \");\n\t\tlblCourseID.setForeground(Color.WHITE);\n\t\tlblCourseID.setFont(new Font(\"Lucida Grande\", Font.BOLD, 18));\n\t\tbottomPanel.add(lblCourseID);\n\t\tJLabel courseID = new JLabel (mazeSession.getCourseID());\n\t\tcourseID.setFont(new Font(\"Lucida Grande\", Font.BOLD, 18));\n\t\tcourseID.setForeground(Color.WHITE);\n\t\tbottomPanel.add(courseID);\n\t\t\n\t\tJLabel lblScore = new JLabel(\"\\t\\t\\t\\t\\t\\t\\tScore:\");\n\t\tlblScore.setForeground(Color.WHITE);\n\t\tlblScore.setFont(new Font(\"Lucida Grande\", Font.BOLD, 18));\n\t\tthis.scoreLabel = new JLabel(Integer.toString(this.mazeSession.getScore()));\n\t\tscoreLabel.setFont(new Font(\"Lucida Grande\", Font.BOLD, 18));\n\t\tscoreLabel.setForeground(Color.WHITE);\n\t\tbottomPanel.add(lblScore);\n\t\tbottomPanel.add(this.scoreLabel);\n\t\t\n\t\t// background image\n\t\tImagePanel image = new ImagePanel(\n\t\t\tnew ImageIcon(\"assets/forest2.png\").getImage());\n\t\tadd(image);\n\t}", "Hotel_GUI() throws IOException {\r\n \tsetLayout(new BorderLayout()); \r\n \t\r\n \tinitialize();\r\n \r\n for(int i=0; i<12; i++){\r\n \tfor(int j=0; j<15; j++){\r\n \t\thelp_square[i][j].setLabel(help_square[i][j].getType());\r\n \t\tboard_panel.add(help_square[i][j]);\r\n \t}\r\n }\r\n \t\r\n \tfinal JPanel toolBar = new JPanel(new FlowLayout(FlowLayout.LEFT));\r\n \t\r\n \tcreateCards();\r\n \tfor(int i=0; i<hotelNumber; i++){\r\n \t\tsetPopUp(i);\r\n \t}\r\n \t\r\n \t\r\n\t\tfinal JPopupMenu popup1 = new JPopupMenu();\r\n\t popup1.add(new JMenuItem(new AbstractAction(\"Start\") {\r\n\t /**\r\n\t\t\t\t * \r\n\t\t\t\t */\r\n\t\t\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t \tpopupCards.removeAll();\t \t\t\r\n\t \thotelItems.clear();\r\n\t \t\r\n\t \tbutton2.setEnabled(true);\r\n\t\t\t button3.setEnabled(true);\r\n\t\t\t button4.setEnabled(true);\r\n\t\t\t button5.setEnabled(true);\r\n\t\t\t button6.setEnabled(true);\r\n\t\t\t button7.setEnabled(true);\r\n\t\t\t button8.setEnabled(true);\r\n\t \t\r\n\t\t\t myGame = null;\r\n\t \tmyGame = new NewGame(board_panel, help_square);\r\n\t \tmyGame.initialization();\r\n\t \ttry {\r\n\t\t\t\t\t\tcreateCards();\r\n\t\t\t\t\t} catch (FileNotFoundException e1) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t}\r\n\t \tfor(int i=0; i<hotelNumber; i++){\r\n\t \t\tsetPopUp(i);\r\n\t \t}\r\n\t \t\r\n\t \tfor(int i=0; i<3; i++){\r\n\t \t\tsetProfitsPopUp(i);\r\n\t \t\tsetEntrancesPopUp(i);\r\n\t \t}\r\n\t \tgameStarted = true;\r\n\t \tmyGame.new_game();\r\n\t }\r\n\t \t\t }));\r\n\t popup1.add(new JMenuItem(new AbstractAction(\"Stop\") {\r\n\t /**\r\n\t\t\t\t * \r\n\t\t\t\t */\r\n\t\t\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t t.stop();\r\n\t button2.setEnabled(false);\r\n\t\t\t button3.setEnabled(false);\r\n\t\t\t button4.setEnabled(false);\r\n\t\t\t button5.setEnabled(false);\r\n\t\t\t button6.setEnabled(false);\r\n\t\t\t button7.setEnabled(false);\r\n\t\t\t button8.setEnabled(false);\r\n\t }\r\n\t }));\r\n\t popup1.add(popupCards);\r\n\t popup1.add(new JMenuItem(new AbstractAction(\"Exit\") {\r\n\t /**\r\n\t\t\t\t * \r\n\t\t\t\t */\r\n\t\t\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t System.exit(0);\r\n\t }\r\n\t }));\r\n\t final JButton button1 = new JButton(\"Game\");\r\n\t button1.addMouseListener(new MouseAdapter() {\r\n\t public void mousePressed(MouseEvent e) {\r\n\t popup1.show(e.getComponent(), e.getX(), e.getY());\r\n\t }\r\n\t });\r\n\t toolBar.add(button1);\r\n\t \r\n\t final JPopupMenu popup2 = new JPopupMenu();\r\n\t popup2.add(gameHotels);\r\n\t popup2.add(playerEntrances);\r\n\t popup2.add(playerProfits);\r\n\t \r\n\t button2 = new JButton(\"Statistics\");\r\n\t button2.addMouseListener(new MouseAdapter() {\r\n\t public void mousePressed(MouseEvent e) {\r\n\t popup2.show(e.getComponent(), e.getX(), e.getY());\r\n\t }\r\n\t });\r\n\t toolBar.add(button2);\r\n \t\r\n\t\tJPanel infos1 = new JPanel(new FlowLayout(FlowLayout.LEFT));\r\n\t\tinfos1.add(new JLabel(\"Player1: \"));\r\n\t\tinfos1.add(p1Money);\r\n\t\tinfos1.add(new JLabel(\" \"));\r\n\t\tinfos1.add(new JLabel(\"Player2: \"));\r\n\t\tinfos1.add(p2Money);\r\n\t\tinfos1.add(new JLabel(\" \"));\r\n\t\tinfos1.add(new JLabel(\"Player3: \"));\r\n\t\tinfos1.add(p3Money);\r\n\t\tJPanel infos2 = new JPanel(new FlowLayout(FlowLayout.RIGHT));\r\n\t\tinfos2.add(new JLabel(\"Available Hotels: \"));\r\n\t\tinfos2.add(hotelAv);\r\n\t\tinfos2.add(new JLabel(\" \"));\r\n\t\tinfos2.add(new JLabel(\"Total Time: \"));\r\n\t\tinfos2.add(timer);\r\n\t\tJPanel infoPanel = new JPanel(new GridLayout(1,2));\r\n\t\tinfoPanel.add(infos1);\r\n\t\tinfoPanel.add(infos2);\r\n\t\tJPanel twoPanels = new JPanel(new GridLayout(2,1));\r\n\t\ttwoPanels.add(toolBar);\r\n\t\ttwoPanels.add(infoPanel);\r\n\t\tadd(twoPanels, BorderLayout.NORTH);\r\n\t\t\r\n\t\t\r\n\t\tbutton3 = new JButton(\"Roll dice & result\");\r\n\t\tbutton3.addActionListener(this);\r\n button4 = new JButton(\"Request building & result\");\r\n button4.addActionListener(this);\r\n button5 = new JButton(\"Buy hotel\");\r\n button5.addActionListener(this);\r\n button6 = new JButton(\"Buy entrance\");\r\n button6.addActionListener(this);\r\n button7 = new JButton(\"Request +1000 from bank\");\r\n button7.addActionListener(this);\r\n button8 = new JButton(\"Finish round\");\r\n button8.addActionListener(this);\r\n \r\n final JPanel options = new JPanel(new GridLayout(6,1));\r\n options.add(button3);\r\n options.add(button4);\r\n options.add(button5);\r\n options.add(button6);\r\n options.add(button7);\r\n options.add(button8);\r\n add(options, BorderLayout.EAST);\r\n \r\n add(board_panel, BorderLayout.CENTER);\r\n \r\n \r\n \r\n \r\n }", "private void showMatchOverDialog(String winnerName) {\n this.computerPaquetView.showOnceHiddenCards();\n int dialogResult = JOptionPane.showConfirmDialog (null, String.format(\"%s won!\\nContinue?\", winnerName),\"\", JOptionPane.YES_NO_OPTION);\n if(dialogResult == JOptionPane.YES_OPTION){\n this.startGame();\n } else {\n this.dispose();\n }\n }", "private void displayControlDialog() {\n final String gameInfo = \"CLASSIC MODE\" + \"\\nMove Left: Left Arrow\"\n + \"\\nMove Right: Right Arrow\" + \"\\nMove Down: Down Arrow\"\n + \"\\nDrop: Space\" + \"\\nRotate Clockwise: Up Arrow\"\n + \"\\nRotate Counter-Clockwise: Z\\n\" + \"\\nANTI-GRAVITY MODE\"\n + \"\\nMove up: Up Arrow\" + \"\\nRotate Clockwise: Down Arrow\\n\"\n + \"\\nSCORING\"\n + \"\\nEarn 100 points for each line cleared. As you\\n\"\n + \"level up, each line cleared will be worth 100 points times\\n\"\n + \"the number of the level you are on. For example, one line\\n\"\n + \"cleared at level 3 is worth 300 points.\";\n JOptionPane.showMessageDialog(null, gameInfo, \"Controls and scoring\",\n JOptionPane.PLAIN_MESSAGE);\n\n }", "public void createChooseGameUI()\n {\n \tHashMap<InventoryRunnable, InventoryItem> inventoryStuff = new HashMap<InventoryRunnable, InventoryItem>();\n \t\n \tInventoryRunnable gladiatorJoinRunnable = new GladiatorJoinInventoryRunnable(plugin);\n \t\n \tArrayList<String> gladiatorLore = new ArrayList<String>();\n \tgladiatorLore.add(\"FIGHT TO THE DEATH AND WIN YOUR FREEDOM\");\n \tgladiatorLore.add(\"GOOD LUCK WARRIOR!\");\n \tInventoryItem gladiatorItem = new InventoryItem(plugin, Material.SHIELD, \"GLADIATOR\", gladiatorLore, 1, true, 1);\n \tinventoryStuff.put(gladiatorJoinRunnable, gladiatorItem);\n \t\n \tchooseGameUI = new GUIInventory(plugin, \"MINIGAMES\", inventoryStuff, 3);\n }", "public void openGamePane() {\n\t\tParent root;\n\t\ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(GAMEPANELOCATION));\n\t\t\tloader.setController(this);\n\t\t\troot = loader.load();\n\t\t\tScene scene = new Scene(root);\n\t\t\tStage stage = new Stage();\n\t\t\tstage.setScene(scene);\n\t\t\tstage.show();\n\t\t} catch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tgamePane.setBackground(new Background(new BackgroundFill(new Color(195/256.0,222/256.0,250/256.0,1),CornerRadii.EMPTY, Insets.EMPTY)));\n\t\tgameObjects=new HashMap<Integer,GameObjectVisualComponent>();\n\t\tpodium=new ArrayList<Text>();\n\t\tpodium.add(new Text(gamePane.getWidth()-100,15,\"TOP\"));\n\t\tgamePane.getChildren().add(podium.get(0));\n\t}", "private void initializeUI() {\r\n this.parentFrame = game.getFrame();\r\n parentFrame.setEnabled(false); // Disable main game UI during the ending dialog.\r\n createResultPopup();\r\n }", "public void theGameMenuClicked() {\n System.out.println(\"THE GAME (you just lost it)\");\n }", "public WinPrompt()\n {\n //Create a label to display text\n Label youWin = new Label(\"Winner, Game Over!\");\n\n //build ok button\n Button ok = new Button(\"Ok\");\n\n //once ok is clicked just close the prompt\n ok.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n close();\n }\n });\n\n //generate scene\n VBox root = new VBox();\n root.setPadding(new Insets(30, 30, 30, 30));\n root.getChildren().addAll(youWin, ok);\n Scene s = new Scene(root);\n this.setScene(s);\n }", "@Override\r\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\r\n\r\n\t\t\t\t//PacHumanGame pacHumanGamePanel = new PacHumanGame(700, 700, Color.black);\r\n\t\t\t\t//pacHumanGamePanel = new PacHumanGame(700, 700, Color.black);\r\n\t\t\t\tpacHumanGamePanel = new PacHumanGame(700, 700, Color.black, batSpeed, score, lives);\r\n\t\t\t\tpacHumanGameFrame = new JFrame(\"Score: \" + score + \" Lives: \" + lives);\r\n\t\t\t\tpacHumanGameFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\t\tpacHumanGameFrame.add(pacHumanGamePanel);\r\n\t\t\t\tpacHumanGameFrame.pack();\r\n\t\t\t\tpacHumanGameFrame.setVisible(true);\r\n\r\n\t\t\t\t// This will make the store invisible. If you want it to still be open\r\n\t\t\t\t// underneath the game, delete this.\r\n\t\t\t\tpanel.setVisible(false);\r\n\t\t\t\tf.setVisible(false);\r\n\t\t\t}", "private void makeDialog() {\n \t\tfinal BackgroundGame thisPanel = this;\n \n \t\tfinal JInternalFrame dialog = new JInternalFrame(\"Question!\");\n \t\tdialog.addInternalFrameListener(new InternalFrameListener() {\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameOpened(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameClosing(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameClosed(InternalFrameEvent arg0) {\n \t\t\t\tthisPanel.requestFocusInWindow();\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameIconified(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameDeiconified(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameActivated(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameDeactivated(InternalFrameEvent arg0) {\n \t\t\t}\n \t\t});\n \n \t\tQuestion randQuestion = questions.get(\n \t\t\t\t(int) (Math.random() * questions.size()));\n \n \t\tJLabel label = new JLabel(randQuestion.getQuestion());\n \t\tlabel.setHorizontalAlignment(SwingConstants.LEFT);\n \t\tFont font = label.getFont();\n \t\tlabel.setFont(label.getFont().deriveFont(font.PLAIN, 14.0f));\n \n \t\tJPanel a = new JPanel();\n \t\ta.setLayout(new BoxLayout(a, BoxLayout.Y_AXIS));\n \t\ta.add(label);\n \t\t\n \t\tJPanel choicesPanel = new JPanel();\n \t\tfor (int i = 1; i <= 4; ++i) {\n \t\t\tString choice = randQuestion.getChoice(i);\n \t\t\tJButton button = new JButton();\n \t\t\tif (randQuestion.answerIs(choice)) {\n \t\t\t\t//Remove the \"--\" marker\n \t\t\t\tchoice = choice.substring(0, choice.indexOf(\"--\"));\n \t\t\t\t\n \t\t\t\tbutton.addActionListener(new ActionListener() {\n \t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n \t\t\t\t\t\tdialog.setVisible(false);\n \t\t\t\t\t\tdialog.dispose();\n \t\t\t\t\t}\n \t\t\t\t});\n \n \t\t\t}\n \t\t\t\t\t\t\t\n \t\t\tbutton.setText(choice);\n \t\t\tchoicesPanel.add(button);\n \t\t}\n \t\ta.add(choicesPanel);\n \n \t\tdialog.setContentPane(a);\n \n \t\tdialog.pack();\n \t\tdialog.setVisible(true);\n \t\tadd(dialog);\n \n \t\tdialog.setLocation(\n \t\t\t\t(int) (Math.random() * (getWidth() - dialog.getWidth())),\n \t\t\t\t(int) (Math.random() * (getHeight() - dialog.getHeight())));\n \t\t/*\n \t\t\n \t\tfor (max = max; max >= 1; max--) {\n \t\ttest = choices.get((int) (Math.random() * max) + min);\n \t\tSystem.out.println(test);\n \t\tSystem.out.println(choices.indexOf(test));\n \t\tchoices.remove(test);\n \t\tSystem.out.println(max);\n \t\t}*/\n \n \t\tincreaseCpuUsage(2);\n \t}", "public GameLostPanel() {\n initComponents();\n }", "public interface Constants {\n /*Title of game*/\n String EUKER = \"Euker\";\n\n int FRAME_PADDING = 25;\n\n /*Size of mainFrame*/\n int WIDTH_FRAME = FRAME_PADDING;\n int HEIGHT_FRAME = (FRAME_PADDING * 5);\n\n /*Size of GamePlayChoice*/\n int WIDTH_GAME_PLAY = 100;\n int HEIGHT_GAME_PLAY = 200;\n\n\n /*StatusPanel*/\n String STATUS_PANEL = \"Status Panel\";\n String WINNER = \"Winner: \";\n String CURRENT_TURN = \"Current Turn: \";\n\n /*Button labels for game play popup*/\n String TWO_PLAYER_BUTTON = \"2 H\";\n String FOUR_PLAYER_BUTTON = \"4 H\";\n String THREE_PLAYER_PC_BUTTON = \"3 H 1 PC\";\n String TWO_PLAYER_PC_BUTTON = \"2 H 2 PC\";\n String ONE_PLAYER_PC_BUTTON = \"1 H 3 PC\";\n\n /*Suits*/\n String CLUBS = \"CLUBS\";\n String HEARTS = \"HEARTS\";\n String SPADES = \"SPADES\";\n String DIAMONDS = \"DIAMONDS\";\n\n /*Values of cards*/\n String ACE = \"ACE\";\n String KING = \"KING\";\n String QUEEN = \"QUEEN\";\n String JACK = \"JACK\";\n String TEN = \"TEN\";\n String NINE = \"NINE\";\n String EIGHT = \"EIGHT\";\n String SEVEN = \"SEVEN\";\n String SIX = \"SIX\";\n String FIVE = \"FIVE\";\n String FOUR = \"FOUR\";\n String THREE = \"THREE\";\n String TWO = \"TWO\";\n\n /**Number of iterations to shuffle a deck of cards.*/\n int SHUFFLE_ITERATIONS = 100;\n\n /**Maximum number of cards a player can have at any given time.\n * 5 for normal hand, 6 if you are the dealer.*/\n int MAX_PLAYER_CARD_COUNT = 6;\n\n /**Number of cards in a euker deck.*/\n int EUKER_CARD_COUNT = 24;\n\n /*Orientation of each player.*/\n String LEFT = \"LEFT\";\n String RIGHT = \"RIGHT\";\n String TOP = \"TOP\";\n String BOTTOM = \"BOTTOM\";\n}", "private void checkGame() {\n if (game.checkWin()) {\n rollButton.setDisable(true);\n undoButton.setDisable(true);\n this.dialogFlag = true;\n if (game.isDraw()) {\n showDrawDialog();\n return;\n }\n if (game.getWinner().getName().equals(\"Computer\")) {\n showLoserDialog();\n return;\n }\n showWinnerDialog(player1);\n }\n }", "private void showTitleScreen() {\n\t\tresetParameters();\n\t\t\n\t\t// if the play button is not clicked\n\t\twhile (!Mouse.isButtonDown(0)\n\t\t\t\t|| !(Mouse.getX() >= 249 && Mouse.getX() <= 539 && Mouse.getY() <= (displayHeight - 215) && Mouse.getY() >= (displayHeight - 284))) {\n\t\t\t// draw title screen\n\t\t\tdrawScreen(sprite.get(\"titleScreen\"));\n\t\t\t\n\t\t\tif (Mouse.isButtonDown(0) && Mouse.getX() >= 249 && Mouse.getX() <= 539\n\t\t\t\t\t&& Mouse.getY() <= (displayHeight - 304) && Mouse.getY() >= (displayHeight - 373)) {\n\t\t\t\tshowInstructScreen();\n\t\t\t}\n\t\t\t\n\t\t\tif (Mouse.isButtonDown(0) && Mouse.getX() >= 249 && Mouse.getX() <= 539\n\t\t\t\t\t&& Mouse.getY() <= (displayHeight - 393) && Mouse.getY() >= (displayHeight - 462)) {\n\t\t\t\tshowCreditsScreen();\n\t\t\t}\n\t\t\tif (Mouse.isButtonDown(0) && Mouse.getX() >= 249 && Mouse.getX() <= 539\n\t\t\t\t\t&& Mouse.getY() <= (displayHeight - 482) && Mouse.getY() >= (displayHeight - 551)) {\n\t\t\t\tDisplay.destroy();\n\t\t\t\tAL.destroy();\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\t\n\t\t\t// update display\n\t\t\tupdateDisplay();\n\t\t}\n\t\t\n\t\t// reset beginning time\n\t\tDelta.setBeginningTime(Delta.getTime());\n\t}", "private void dialogAbout() {\n\t\tGraphicalUserInterfaceAbout.start();\r\n\t}", "public AboutGame() {\n initComponents();\n }", "private void showWinnerDialog(Player player) {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Congratulations \" + player.getName() + \", You are Victorious!!\", new ButtonType(\"Close\", ButtonBar.ButtonData.NO), new ButtonType(\"Play Again\", ButtonBar.ButtonData.YES));\n alert.setGraphic(new ImageView(new Image(this.getClass().getResourceAsStream(\"/Images/winner.png\"))));\n alert.setHeaderText(null);\n alert.setTitle(player.getName() + \" Wins!!\");\n alert.showAndWait();\n if (alert.getResult().getButtonData() == ButtonBar.ButtonData.YES) {\n onReset();\n }\n }", "private void showGameOverScreen(){\n try{\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Game.class.getResource(\"view/GameOverScreen.fxml\"));\n AnchorPane anchorPane = (AnchorPane) loader.load();\n\n rootLayout.setCenter(anchorPane);\n }catch(IOException e){\n e.printStackTrace();\n }\n }" ]
[ "0.72241235", "0.7222491", "0.71522063", "0.71170217", "0.69802463", "0.6940923", "0.69098234", "0.6885554", "0.6876938", "0.68625283", "0.6858565", "0.68236494", "0.68116766", "0.68019456", "0.6759348", "0.67209566", "0.6700721", "0.6700577", "0.66885465", "0.66774726", "0.66774726", "0.66659284", "0.6656879", "0.66526824", "0.6652154", "0.6643936", "0.6643606", "0.6599265", "0.655581", "0.6535289", "0.65284896", "0.6523716", "0.65161306", "0.64912903", "0.64881724", "0.6467036", "0.6453447", "0.6453132", "0.6441081", "0.64374703", "0.64238703", "0.64216834", "0.6417462", "0.6398683", "0.63958377", "0.6385356", "0.6385117", "0.6378791", "0.63768667", "0.6373541", "0.63637096", "0.6359101", "0.6356123", "0.6338084", "0.6323315", "0.63156754", "0.62617123", "0.6256444", "0.6252302", "0.6248177", "0.62463945", "0.6234587", "0.62081385", "0.6195109", "0.61892587", "0.6189145", "0.6186882", "0.6185222", "0.61847705", "0.61837375", "0.6172251", "0.616443", "0.6152132", "0.61434996", "0.6142452", "0.61358917", "0.61342394", "0.6133289", "0.6128068", "0.6127402", "0.6126911", "0.6123988", "0.61232525", "0.61191523", "0.6110268", "0.61085355", "0.61047715", "0.6099357", "0.60942894", "0.608469", "0.60781837", "0.60729915", "0.6067375", "0.6065313", "0.6064079", "0.6061124", "0.6061016", "0.60584414", "0.6055048", "0.6052801" ]
0.77612746
0
Sets up and displays the success dialog
private void successDialog() { AlertDialog dialog = _dialogFactory.createDialog(this, R.string.completed, R.string.success); dialog.setButton(DialogInterface.BUTTON_NEUTRAL, getString(R.string.ok), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { gotoGameEnd(IGameConstants.GAME_SUCCESS); } }); dialog.setCancelable(false); _dialogActive = true; dialog.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void success() {\n showMessage(\"Congratulations!\", \"success\");\n }", "void showSuccess();", "private void buildSuccessDialog(){\n\t\tmainDialog = new JDialog(mainWindow,\"Success!\");\n\t\t//mainDialog.getContentPane().removeAll();\n\t\tJPanel p1 = new JPanel (new BorderLayout());\n\t\tp1.setBackground(Color.white);\n\t\t//success text\n\t\tJLabel lab = new JLabel(\"Login Successful!\");\n\t\tlab.setFont( new Font(\"URW Gothic L\",Font.BOLD, 15));\n\t\tlab.setAlignmentX(Component.LEFT_ALIGNMENT);\n\t\tp1.add(lab, BorderLayout.NORTH);\n\t\t\n\t\t//success image\n\t\tImageIcon img = new ImageIcon (\"./client_images/success.png\");\n\t\timg = new ImageIcon ( img.getImage().getScaledInstance(100,100,Image.SCALE_DEFAULT));\n\t\tJLabel imgLabel = new JLabel(img);\n\t\tp1.add(imgLabel,BorderLayout.CENTER);\n\n\t\tJButton ok = new JButton (\"Ok\");\n\t\t//pressing ok closes the application\n\t\t//register action listener (anonymous inner class is sufficient)\n\t\tok.addActionListener (new ActionListener(){\n\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\t\t\t\t//call GUI's close up method to gracefully release all\n\t\t\t\t\t\t\t//resources\n\t\t\t\t\t\t\tClientGui.this.closeUp();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t);\n\n\t\tp1.add(ok,BorderLayout.SOUTH);\n\n\t\t//settings of the dialog box\n\t\tmainDialog.getContentPane().add(p1);\n\t\tmainDialog.setLocationRelativeTo(mainWindow);\n\t\tmainDialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\n\t\tmainDialog.setModal(true);\n\t\tmainDialog.setMinimumSize(new Dimension(300,200));\n\t\tmainDialog.setMaximumSize(new Dimension(300,200));\n\t\tmainDialog.setResizable(false);\n\t\tmainDialog.setVisible(true);\n\t\n\t}", "private void showSuccess() {\n if (binder.isValid()){\n Notification notification = Notification.show(\"Your Advert Has Been Updated \");\n notification.addThemeVariants(NotificationVariant.LUMO_SUCCESS);\n UI.getCurrent().getPage().reload();\n }\n }", "@Override\n\t\t\tpublic void onSuccess() {\n\t\t\t\tToast.makeText(MainActivity.this, \"submit success\", Toast.LENGTH_LONG).show();\n\t\t\t}", "private void displaySaveSuccess() {\n\t\tString title = \"Event successfully save...\";\n\t\tString msg =\n\t\t\t\t\"To Do List: \" +txtSubject.getText()+ \n\t\t\t\t\"\\nhas been save....\";\n\t\tJOptionPane.showMessageDialog(\n\t\t\t\tnull, msg, title, JOptionPane.INFORMATION_MESSAGE);\n\t}", "private void SuccessfulBox(View v){\n \t//create an alert box with specified properties\n \tnew AlertDialog.Builder(this)\n \t.setTitle(\"Submit Successfully!\")\n \t.setMessage(\"New prescription information has been added to\" + \" \" +item)\n \t.setNeutralButton(\"ok\", null)\n \t.show();\n }", "@Override\n public void onSuccess() {\n login_success = true;\n showInfoAndGoto();\n }", "public void working() {\n\t\t Dialog d = new Dialog(this);\r\n\t\t d.setTitle(\"hech yea!\");\r\n\t\t TextView tv = new TextView(this);\r\n\t\t tv.setText(\"Success\");\r\n\t\t d.setContentView(tv);\r\n\t\t d.show();\t\r\n\t}", "@Override\r\n\t\t\t\t\t\t\tpublic void onSuccess(String result) {\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tWindow.alert(\"Thank you for selecting\");\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}", "private void showSuccessDialog(String username, String groupName) {\n\n successDialog = new CustomAlertDialog(\n RunnerActivity.this);\n successDialog.setCancelableFlag(false);\n successDialog.setTitle(\"Add user\");\n //String message = String.format(\"Add user: %s to group: %s Successfully!\", new String[]{username, groupName});\n String message = String.format(\"Add user: %s to group: %s Successfully!\", username, groupName);\n successDialog.setMessage(message);\n successDialog.setPositiveButton(getString(R.string.ok),\n new OnPositiveButtonClick() {\n\n @Override\n public void onButtonClick(View view) {\n // TODO Auto-generated method stub\n successDialog.dismiss();\n }\n });\n\n successDialog.show();\n }", "void showSuccess(String message);", "@Then(\"The user should see the success message\")\n\tpublic void the_user_should_see_the_success_message() {\n\t\tAddTariffPlanPage details = new AddTariffPlanPage();\n\t\tString actual = details.getSucessmsg().getText();\n\t\tAssert.assertEquals(\"Congratulation you add Tariff Plan\", actual);\n\n\t}", "public void showReportAbuseSuccess() {\n try {\n AlertDialog.Builder builder = new AlertDialog.Builder(this.mContext);\n builder.setTitle(this.mContext.getResources().getString(R.string.consult_report_abuse_thanks));\n builder.setMessage(this.mContext.getResources().getString(R.string.consult_comment_report_abuse_success));\n builder.setPositiveButton(this.mContext.getResources().getString(R.string.alert_dialog_confirmation_ok_button_text), new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n }\n });\n builder.show();\n } catch (Exception unused) {\n Trace.w(TAG, \"Failed to show disclaimer for consult photo editing\");\n }\n }", "public void showSucceedDeleteDialog() {\n\t\tString msg = getApplicationContext().getResources().getString(\n\t\t\t\tR.string.MSG_DLG_LABEL_DELETE_ITEM_SUCCESS);\n\t\tfinal AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(\n\t\t\t\tthis);\n\t\talertDialogBuilder\n\t\t\t\t.setMessage(msg)\n\t\t\t\t.setCancelable(false)\n\t\t\t\t.setPositiveButton(\n\t\t\t\t\t\tgetApplicationContext().getResources().getString(\n\t\t\t\t\t\t\t\tR.string.MSG_DLG_LABEL_OK),\n\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\tstartActivity(getIntent());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\tAlertDialog alertDialog = alertDialogBuilder.create();\n\t\talertDialog.show();\n\n\t}", "protected void handleResultSuccessful(final T result) {\n\t\tgetContentResultHolder().setVisible(true);\n\t}", "public void success() {\n Toast.makeText(ui.getApplicationContext(),\"Account successfully created!\",Toast.LENGTH_SHORT).show();\n }", "@Override\n\tpublic void postResult(boolean success, String text) {\n\t\t\n\t\tif (progressDialog.isShowing())\n\t\t\tprogressDialog.dismiss();\n\t\t\n\t\tfinish();\n\t}", "public void alertSaveSuccess() {\n\t\tthis.alert(\"Saved\",\"Game saved\",AlertType.INFORMATION);\n\t}", "private void showSuccessDialog(){\n\n String successMsg = getString(R.string.msgDeviceRegistered);\n AlertDialog dialog = new AlertDialog.Builder(ValidationActivity.this).create();\n dialog.setMessage(successMsg);\n dialog.setCancelable(false);\n dialog.setButton(DialogInterface.BUTTON_POSITIVE, \"Fertig\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n\n publishCommand(\"AUTH_END\");\n\n // disconnect mqtt-client and go to main-activity\n try {\n IMqttToken disconToken = mqttClient.disconnect();\n disconToken.setActionCallback(new IMqttActionListener() {\n @Override\n public void onSuccess(IMqttToken asyncActionToken) {\n\n // Go to main-activity\n Intent intent = new Intent(ValidationActivity.this, MainActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); // clear activity back-stack\n startActivity(intent);\n }\n\n @Override\n public void onFailure(IMqttToken asyncActionToken,\n Throwable exception) {\n // something went wrong, but probably we are disconnected anyway\n }\n });\n } catch (MqttException e) {\n e.printStackTrace();\n }\n\n }\n });\n\n dialog.show();\n dialog.getButton(DialogInterface.BUTTON_POSITIVE).setTextColor(getResources().getColor(R.color.colorPrimary));\n }", "public void onSuccess() {\n Toast.makeText(StoneSDK.this.cordova.getActivity(), \"Ativado com sucesso, iniciando o aplicativo\", Toast.LENGTH_SHORT).show();\n callbackContext.success(\"Ativado com sucesso\");\n }", "public void onSuccess(Boolean arg0) {\n\t\t\t\t\t\tMessageBox.info(\"Hotovo\",\"plán v době svátků odebrán\",null);\n\t\t\t\t\t}", "public void showDialog() {\n mDialogInfoWithTwoButtons = new DialogInfoWithTwoButtons(mContext,\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n saveTemplate(mToastEdited);\n mDialogInfoWithTwoButtons.getDialog().dismiss();\n }\n }, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mTemplateId = mDatabaseManager.getTemplateNewId();\n mPreferenceManager.setTemplateId(mTemplateId);\n saveTemplate(mToastCreated);\n mDialogInfoWithTwoButtons.getDialog().dismiss();\n }\n }, mTitle, mMessage, mTitleButtonOne, mTitleButtonTwo);\n mDialogInfoWithTwoButtons.getDialog().show();\n }", "@Override\n\t\t\t\tpublic void onSuccess(String[] result) {\n\t\t\t\t\tWindow.alert(\"UPLOADED\");\n\t\t\t\t}", "DialogResult show();", "@Override\n public void onSuccess(Void unused) {\n Snackbar.make(save, R.string.sucessfull_update, BaseTransientBottomBar.LENGTH_SHORT).show();\n }", "@FXML public void handleOk() {\n\t\tSystem.out.println(\"OK clicked!\");\n\t\t\n\t\tif (checkParameters().equals(ErrorCode.BatchSize)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Batch Size]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.ConfidenceFactor)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Confidence Factor]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.MinNumObj)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Min Num Obj]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.NumDecimalPlaces)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Num Decimal Places]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.NumFolds)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Num Folds]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.Seed)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Seed]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.Fine)) {\n\t\t\tsaveParameters();\n\t\t\tClassifiersWindowsManager.stage.close();\n\t\t}\n\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tdialog = new ProgressDialog(VerifiedAccountActivity.this);\n\t\t\tdialog.setMessage(VerifiedAccountActivity.this.getResources()\n\t\t\t\t\t.getString(R.string.submit));\n\t\t\tdialog.setCanceledOnTouchOutside(false);\n\t\t\tdialog.show();\n\t\t}", "@Override\n\t\t\t\t\tpublic void run(){\n\t\t\t\t\t\t//status of 1 is success\n\t\t\t\t\t\tif (status==1){\n\t\t\t\t\t\t\tmainDialog.dispose();\n\t\t\t\t\t\t\tbuildSuccessDialog();\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//else error\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tmainDialog.dispose();\n\t\t\t\t\t\t\tbuildErrorDialog(status);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "private void usernameTakenDialog() {\n Dialog dialog = new Dialog(\"Username taken\", cloudSkin, \"dialog\") {\n public void result(Object obj) {\n System.out.println(\"result \" + obj);\n }\n };\n dialog.text(\"This username has already been taken, try a new one.\");\n dialog.button(\"OK\", true);\n dialog.show(stage);\n }", "@Override\n\t\tpublic void onSuccess(Article result) {\n\t\t\tWindow.alert(result.toString());\n\t\t}", "public void clickOnSuccessOkBtn() throws Exception {\r\n\t\r\n\t\t\tclickOnButton(btnOKSuccess);\r\n\t\t\tlog(\"clicked on OK button and object is:-\" + btnOKSuccess.toString());\r\n\t\t\tThread.sleep(1000);\r\n\t}", "private void showDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"User created successfully\");\n builder.setIcon(R.drawable.ic_shield);\n builder.setCancelable(true);\n builder.setPositiveButton(\n \"Continue\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n });\n AlertDialog alert11 = builder.create();\n alert11.show();\n Window window = alert11.getWindow();\n assert window != null;\n WindowManager.LayoutParams wlp = window.getAttributes();\n wlp.gravity = Gravity.CENTER;\n wlp.y = 270;\n wlp.flags &= ~WindowManager.LayoutParams.FLAG_DIM_BEHIND;\n window.setAttributes(wlp);\n }", "void successUiUpdater();", "@Override\n\tpublic boolean performOk() {\n\t\t// Get the preference store\n\t\tfinal IPreferenceStore preferenceStore = getPreferenceStore();\n\n\t\t// Set the values from the fields\n\t\tpreferenceStore.setValue(DEFAULT_PASSWORD_LENGTH, spiLength.getSelection());\n\t\tpreferenceStore.setValue(USE_LOWERCASE_LETTERS, btnUseLowercase.getSelection());\n\t\tpreferenceStore.setValue(USE_UPPERCASE_LETTERS, btnUserUppercase.getSelection());\n\t\tpreferenceStore.setValue(USE_DIGITS, btnUseDigits.getSelection());\n\t\tpreferenceStore.setValue(USE_SYMBOLS, btnUseSymbols.getSelection());\n\t\tpreferenceStore.setValue(USE_EASY_TO_READ, btnUseEaseToRead.getSelection());\n\t\tpreferenceStore.setValue(USE_HEX_ONLY, btnUseHexOnly.getSelection());\n\n\t\t// Return true to allow dialog to close\n\t\treturn true;\n\t}", "@Override\n public void onSuccess(Boolean result)\n {\n if (result)\n {\n System.out.println(\"user info successfully updated!\");\n Window.alert(\"Successfully updated!\");\n }\n else\n {\n System.out.println(\"something is wrong on the server side!\");\n }\n }", "@Required\n\tpublic void setSuccessView(String successView) {\n\t\tthis.successView = successView;\n\t}", "public void successfulReservation()\n {\n showToastMessage(getResources().getString(R.string.successfulReservation));\n }", "@Override\n public void onSuccess() {\n btn_addPhoto.setText(\"Change Photo\");\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tprogressDialog.show();\n\t\t\tprogressDialog.setMessage(\"Contacting server for sharing...\");\n\t\t}", "public String getSuccessView() {\n\t\treturn successView;\n\t}", "private void onOK() {\n if (TextUtil.isEmpty(nick.getText())) {\n showMessage(\"插件名称\");\n return;\n }\n if (TextUtil.isEmpty(name.getText())) {\n showMessage(\"插件代号\");\n return;\n }\n if (TextUtil.isEmpty(version.getText())) {\n showMessage(\"插件版本\");\n return;\n }\n if (TextUtil.isEmpty(path.getText())) {\n showMessage(\"插件路径\");\n return;\n }\n String nickV = nick.getText();\n String nameV = name.getText();\n String versionV = version.getText();\n UploadPluginDto dto = RequestManagement.uploadPlugin(selectFile, nameV, versionV, nickV);\n if (dto != null && dto.getResult() != null) {\n if (pluginPanel != null) {\n pluginPanel.addItem(dto.getResult());\n }\n }\n dispose();\n }", "@Override\n\tpublic void showProgress() {\n\t\twaitDialog(true);\n\t}", "private void submitForm() {\n final Dialog dialog = new Dialog(context);\n\t\t dialog.setContentView(R.layout.dialogbox);\n\t\t dialog.setTitle(\"Sucess!\");\n\t\t dialog.setCancelable(false);\n\t dialog.setCanceledOnTouchOutside(false);\n\t\t TextView txt = (TextView) dialog.findViewById(R.id.errorlog);\n\t\t txt.setText(\"Registration Successfull.\");\n\t\t Button dialogButton = (Button) dialog.findViewById(R.id.release);\n\t\t dialogButton.setOnClickListener(new OnClickListener() {\n\t\t\t public void onClick(View vd) {\n\t\t\t\t change.setEnabled(true);\n\t\t\t\t dialog.dismiss();\n\t\t\n\t\t}\n\t\t});\n\t\t dialog.show();\n}", "@Override\n\t\t\t\t\tpublic void onSuccess() {\n\t\t\t\t\t\tToast.makeText(RegisterActivity.this,\"Sign up successfully!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tstartActivity(new Intent(RegisterActivity.this, LoginActivity.class));\n\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onSuccess() {\n\n\t\t\t\t\t\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void onSuccess(ArrayList<InformationRequestEntity> result) {\n\t\t\t\tupdatedView(result);\r\n\t\t\t\t// Window.alert(\"Successfully added new Information Request in\r\n\t\t\t\t// Updated list\");\r\n\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void onSuccess(ResponseInfo<String> result) {\n\t\t\t\t\t\t\tToast.makeText(AddIncomeActivity.this, \"保存成功!\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t}", "public void setSuccess(boolean success) {\n this.success = success;\n }", "public void setSuccess(boolean success) {\n this.success = success;\n }", "protected void okPressed() {\n\t\tconfig.setExportThreadCount(txtThreadCount.getSelection());\n\t\tconfig.setImportThreadCount(txtMaxImportThreadCountPerTable.getSelection());\n\t\tconfig.setCommitCount(txtCommitCount.getSelection());\n\t\tif (txtPageCount != null) {\n\t\t\tconfig.setPageFetchCount(txtPageCount.getSelection());\n\t\t}\n\t\tif (txtFileMaxSize != null) {\n\t\t\tconfig.setMaxCountPerFile(txtFileMaxSize.getSelection());\n\t\t}\n\t\tconfig.setImplicitEstimate(btnImplicitEstimate.getSelection());\n\t\tsuper.okPressed();\n\t}", "private void createResultPopup() {\r\n resultDialog = new JDialog(parentFrame);\r\n resultDialog.setLayout(new BoxLayout(resultDialog.getContentPane(), BoxLayout.Y_AXIS));\r\n resultDialog.setAlwaysOnTop(true);\r\n Utilities.centerWindowTo(resultDialog, parentFrame);\r\n resultDialog.add(createResultLabel());\r\n resultDialog.add(createButtonDescription());\r\n resultDialog.add(createConfirmationButtons());\r\n resultDialog.pack();\r\n resultDialog.setVisible(true);\r\n }", "@Override\r\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tJSONArray response) {\n\t\t\t\t\t\trepairInitBelowLayout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\trepairInitBelow2Layout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\tgetTopicDetailsInfos(response,\"init\");\r\n\t\t\t\t\t\tFlag = \"ok\";\r\n\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t}", "void onSuccess();", "void onSuccess();", "void onSuccess();", "void onSuccess();", "SuccessMessageDisplayInterface getSuccessMessageDisplay();", "@Override\n protected void onPreExecute() {\n this.progressDialog.setMessage(\"Adding workouts...\");\n this.progressDialog.show();\n }", "@Override\r\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\r\n\t\t\tdialog = new Dialog(Data4.this);\r\n\t\t\tdialog.setTitle(\"Please wait\");\r\n\t\t\tTextView tv = new TextView(Data4.this.getApplicationContext());\r\n\t\t\ttv.setText(\"Uploading Data to SpreadSheet...\");\r\n\t\t\tdialog.setContentView(tv);\r\n\t\t\tdialog.show();\r\n\t\t}", "public String execute() {\n\t\treturn SUCCESS;\n\t}", "@Then ( \"the prescription has successfully been added\" )\r\n public void success () {\r\n wait.until( ExpectedConditions.visibilityOfElementLocated( By.name( \"success\" ) ) );\r\n assertTrue( driver.getPageSource().contains( \"Drug created successfully\" ) );\r\n }", "public void showOpinionCreatedMessage(int success) {\n if (success == 2) { // Update Opinion\n Toast.makeText(getBaseContext(), \"Opinión actualizada con éxito\", Toast.LENGTH_LONG).show();\n } else if (success == 1) { // Insert Opinion\n Toast.makeText(getBaseContext(), \"Opinión enviada con éxito\", Toast.LENGTH_LONG).show();\n } else { // Insert & Update Failed\n Toast.makeText(getBaseContext(), \"Intentelo más tarde\", Toast.LENGTH_LONG).show();\n }\n }", "public void showSuccess() {\n ViewFlipper vf = findViewById(R.id.register_viewFlipper);\n vf.showNext();\n }", "@Override\r\n\t\t\t\t\t\t\t\tpublic void onSuccess(\r\n\t\t\t\t\t\t\t\t\t\tResultadoActualizacionEntidad result) {\n\t\t\t\t\t\t\t\t\tvista.getBotonGuardar().setEnabled(false);\r\n\t\t\t\t\t\t\t\t\tvista.deshabilitarInputText();\r\n\t\t\t\t\t\t\t\t\tvista.getBotonCancelar().setText(\"Aceptar\");\r\n\t\t\t\t\t\t\t\t}", "private void displayProgressDialog() {\n pDialog.setMessage(\"Logging In.. Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n }", "private void showFinishMsg() {}", "public void displaySuccessMessage(String successMessage) {\n userMessage.setTextFill(Color.GREEN);\n userMessage.setText(successMessage);\n }", "private void displayProgressDialog() {\n pDialog.setMessage(\"Logging in.. Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "public void reportSuccess() {\n Crashlytics.logBreadcrumb(\"MuunLockOverlay: reportSuccess\");\n\n pinInput.setSuccess();\n }", "@Override\n\t\t\t\t\tpublic void onSuccess(String result) {\n\t\t\t\t\t\tpath_of_uploaded_file = result;\n\t\t\t\t\t\tontology.get(ontology.size() - 1).setFilePath(result);\n\t\t\t\t\t\tWindow.alert(\"Pass\");\n\t\t\t\t\t\tgreetingService.greetServer(list, path_of_uploaded_file, 1, ontology_class);\n\t\t\t\t\t\tgreetingService.greetServer(list, path_of_uploaded_file, 2, property_resource);\n\t\t\t\t\t\tgreetingService.greetServer(list, path_of_uploaded_file, 3, property_literal);\n\n\t\t\t\t\t\tontologies.addItem(ontology.get(ontology.size() - 1).getName());\n\n\t\t\t\t\t\t// logger.log(Level.SEVERE, baseURI);\n\t\t\t\t\t}", "public void setAsSuccessful_OK(){\n setStatus(200);\n }", "private void savedDialog() {\n\t\tTextView tv = new TextView(this);\n\t\ttv.setText(\"Changes to the current recipe have been saved.\");\n\t\tAlertDialog.Builder alert = new AlertDialog.Builder(this);\n\t\talert.setTitle(\"Success\");\n\t\talert.setView(tv);\n\t\talert.setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\tpublic void onClick(DialogInterface dialog, int whichButton) {\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t\talert.show();\n\t}", "private void showDeleteSuccess() {\n Notification notification = Notification.show(\"Your Advert Has Been Deleted \");\n notification.addThemeVariants(NotificationVariant.LUMO_ERROR);\n UI.getCurrent().getPage().reload();\n }", "@Override\r\n\t\tprotected void onPostExecute(Object result) {\n\t\t\tsuper.onPostExecute(result);\r\n\t\t\tif(dialog.isShowing())\r\n\t\t\t\tdialog.cancel();\r\n\t\t\tToast.makeText(getApplicationContext(), \"Inserted Succesfully\", Toast.LENGTH_LONG).show();\r\n\t\t\t\r\n\t\t\t\r\n\t\t \r\n\t\t}", "private void showDialog(){\n progress = new ProgressDialog(this);\n progress.setTitle(getString(R.string.progress_dialog_loading));\n progress.setMessage(getString(R.string.progress_dialog_authenticating_with_firebase));\n progress.setCancelable(false);\n progress.show();\n }", "public void onSuccess(String result) {\n\t\t\t\tmember_info.setText(result);\n\t\t\t}", "public String execute()\n {\n return SUCCESS();\n }", "@Override\n protected void onPreExecute()\n {\n dialog.show();\n super.onPreExecute();\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tdialog = new ProgressDialog(VerifiedAccountActivity.this);\n\t\t\tdialog.setMessage(VerifiedAccountActivity.this.getResources()\n\t\t\t\t\t.getString(R.string.upload_product_msg));\n\t\t\tdialog.setCanceledOnTouchOutside(false);\n\t\t\tdialog.show();\n\t\t}", "public void finalRequest() {\n if (!isSaved) {\n mDialogInfoWithTwoButtons = new DialogInfoWithTwoButtons(mContext,\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n isFinish = true;\n mDialogInfoWithTwoButtons.getDialog().dismiss();\n addToTemplates();\n }\n }, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mDialogInfoWithTwoButtons.getDialog().dismiss();\n getActivity().finish();\n }\n }, mTitle, mMessageFinal, mTitleButtonOneFinal, mTitleButtonTwoFinal);\n mDialogInfoWithTwoButtons.getDialog().show();\n } else {\n getActivity().finish();\n }\n }", "private void setSuccessMsg(HttpServletRequest request, String[] displayNameParams,\r\n\t\t\tboolean isEditOperation)\r\n\t{\r\n\t\tString key = \"object.add.success\";\r\n\t\tif (isEditOperation)\r\n\t\t{\r\n\t\t\tkey = \"object.edit.success\";\r\n\t\t}\r\n\t\tActionMessages messages = new ActionMessages();\r\n\t\tmessages.add(ActionErrors.GLOBAL_MESSAGE, new ActionMessage(key, displayNameParams));\r\n\t\tsaveMessages(request, messages);\r\n\t}", "@Override\n protected void onPreExecute() {\n progressDialog.setMessage(\"Creating Account...\");\n progressDialog.show();\n super.onPreExecute();\n }", "@Override\n\t\t\t\t\tpublic void onSuccess(Object t) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tJSONObject jsonObject = new JSONObject(t.toString());\n\t\t\t\t\t\t\tString code = JsonGetInfo.getJsonString(jsonObject,\n\t\t\t\t\t\t\t\t\t\"code\");\n\t\t\t\t\t\t\tString msg = JsonGetInfo.getJsonString(jsonObject,\n\t\t\t\t\t\t\t\t\t\"msg\");\n\t\t\t\t\t\t\tif (!\"\".equals(msg)) {\n\t\t\t\t\t\t\t\tToast.makeText(SaveReceipptActivity.this, msg,\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (\"1\".equals(code)) {\n\t\t\t\t\t\t\t\tsetResult(1);\n\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (JSONException 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\tsuper.onSuccess(t);\n\t\t\t\t\t}", "@Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(getApplicationContext(), \"Success!\",\n Toast.LENGTH_LONG).show();\n }", "private void displayLoader() {\n pDialog = new ProgressDialog(RegisterActivity.this);\n pDialog.setMessage(\"Signing Up.. Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "private void showUploadFinishMessage() {\n if (loopDir.isEmpty()) {\n if (filesUnderFolder == 0) {\n if (rootFolderUploaded) {\n SC.say(\"Your folder is uploaded.\");\n } else {\n if (isAlreadyExist) {\n SC.say(\"Upload file is already exists.\");\n } else {\n SC.say(\"Your file is uploaded.\");\n }\n }\n } else {\n if (isAlreadyExist) {\n SC.say(\"Your folder is uploaded. Some files already exists.\");\n } else {\n SC.say(\"Your folder is uploaded.\");\n }\n }\n if (\"yellow\".equals(leftLayout.getBackgroundColor())) {\n leftLayout.setBackgroundColor(\"white\");\n }\n }\n }", "public void setSuccess(boolean value) {\r\n this.success = value;\r\n }", "public void doPositiveClick() {\n\t\t//Shows message that contact added to database. \n\t\tToast.makeText(this, \"Контакт сохранен\", Toast.LENGTH_SHORT).show();\n\t\taddRecord();\n\t}", "protected void onPostExecute(final Boolean success) {\r\n \t if (this.dialog.isShowing()) {\r\n this.dialog.dismiss();\r\n }\r\n \t if (success){\r\n Toast.makeText(context, \"Export successful!\", Toast.LENGTH_SHORT).show();\r\n }\r\n else {\r\n Toast.makeText(context, \"Export failed!\", Toast.LENGTH_SHORT).show();\r\n }\r\n }", "@Override\n\tprotected void onPreExecute() {\n\t\tsuper.onPreExecute();\n\n\t\tprogress = ProgressDialog.show(act, \"\", \"Please wait ...\", true);\n\t\talert = new AlertDialog.Builder(act);\n\n\t}", "private void showResults() {\n verifyFCMToken(this);\n progressDialog.cancel();\n Toast.makeText(RegisterActivity.this, \"Welcome!\", Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "@Override\n protected void onPreExecute() {\n\n this.dialog.setMessage(\"Please wait ...\");\n this.dialog.show();\n }", "@Override\n public void onSuccess() {\n }", "@Override\n public void onSuccess() {\n }", "@Override\n public void onSuccess() {\n }", "@Override\n public void onSuccess() {\n }", "@Override\r\n public void onResult(boolean result)\r\n {\n if (result) {\r\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"Set Successfully\"));\r\n } else {\r\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"Set Fail\"));\r\n }\r\n }", "public static void showSuccessPopUp(String headerText, String contentText) {\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.initStyle(StageStyle.UTILITY);\n alert.setTitle(\"Information\");\n alert.setHeaderText(headerText);\n alert.setContentText(contentText);\n\n alert.showAndWait();\n }", "@Override\n\t\t\t\t\tpublic void onSuccess(Integer result) {\n\t\t\t\t\t\tif (result == 0) {\n\t\t\t\t\t\t\tgetApplyDialog();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tToastUtil.showToast(context, \"无法获取游戏信息\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}" ]
[ "0.7687237", "0.751876", "0.7136427", "0.71079224", "0.70941675", "0.70624804", "0.69840026", "0.68782336", "0.6869234", "0.68545717", "0.6796067", "0.678999", "0.66752094", "0.6669029", "0.6607875", "0.6569477", "0.65058035", "0.6494167", "0.6425685", "0.63820666", "0.63620806", "0.6341365", "0.63145316", "0.6295879", "0.6278258", "0.6252635", "0.6231749", "0.6222968", "0.6218972", "0.620031", "0.61919934", "0.61866915", "0.6170754", "0.61629575", "0.61545265", "0.6151926", "0.61386454", "0.61220396", "0.6121604", "0.6107513", "0.6087112", "0.60854125", "0.6082432", "0.6080466", "0.6070995", "0.60477436", "0.6036643", "0.6033228", "0.60319996", "0.60319996", "0.6027732", "0.6015188", "0.60149276", "0.59950197", "0.59950197", "0.59950197", "0.59950197", "0.5993178", "0.5984476", "0.59827477", "0.59779304", "0.59594023", "0.59569705", "0.5956693", "0.5956124", "0.5955698", "0.59512156", "0.5947911", "0.5947649", "0.5946361", "0.59341735", "0.59329975", "0.593054", "0.59192526", "0.59117264", "0.59114903", "0.59081876", "0.5905143", "0.58882546", "0.5878763", "0.5878742", "0.5878166", "0.5875723", "0.5873078", "0.5869806", "0.58626026", "0.5854876", "0.58528644", "0.58469063", "0.5842421", "0.584035", "0.58376765", "0.58321923", "0.58321863", "0.58321863", "0.58321863", "0.58321863", "0.5831139", "0.5828589", "0.5827493" ]
0.7489252
2
Creates and displays the time selection dialog
private void timeSelectionDialog() { final TimeSelectionDialog timeSelectDialog = new TimeSelectionDialog(this, _game); timeSelectDialog.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { _game.setTime(timeSelectDialog.getSelectedTime()); timeSelectDialog.dismiss(); } }); timeSelectDialog.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void chooseTimeDialog() {\n Calendar c = Calendar.getInstance();\n int hourOfDay = c.get(Calendar.HOUR_OF_DAY);\n int minute = c.get(Calendar.MINUTE);\n\n TimePickerDialog timePickerDialog =\n new TimePickerDialog(getContext(), this, hourOfDay, minute, false);\n timePickerDialog.show();\n }", "private void showTimerPickerDialog() {\n backupCal = cal;\n if (cal == null) {\n cal = Calendar.getInstance();\n }\n\n TimePickerFragment fragment = new TimePickerFragment();\n\n fragment.setCancelListener(new DialogInterface.OnCancelListener() {\n @Override\n public void onCancel(DialogInterface dialog) {\n cal = backupCal;\n EventBus.getDefault().post(new TaskEditedEvent());\n }\n });\n\n fragment.setCalendar(cal);\n fragment.show(getFragmentManager(), \"timePicker\");\n }", "private void showTimePicker(){\n\n // Create new time picker instance\n TimePickerDialog timePicker = new TimePickerDialog(this, (view, hourOfDay, minute) -> {\n // Update booking time\n bookingHour = hourOfDay;\n bookingMinute = minute;\n\n // Set the contents of the edit text to the relevant hours / minutes\n timeInput.setText(getString(R.string.desired_time_format, bookingHour, bookingMinute));\n\n }, bookingHour, bookingMinute, true);\n\n timePicker.setTitle(getString(R.string.desired_time_selection));\n timePicker.show();\n\n // Change button colors\n Button positiveButton = timePicker.getButton(AlertDialog.BUTTON_POSITIVE);\n positiveButton.setTextColor(getColor(R.color.colorPrimary));\n Button negativeButton = timePicker.getButton(AlertDialog.BUTTON_NEGATIVE);\n negativeButton.setTextColor(getColor(R.color.colorPrimary));\n }", "private void showTimeDialog() {\n\t\tTimePickerDialog tpd = new TimePickerDialog(this, new OnTimeSetListener(){\r\n\t\t\tpublic void onTimeSet(TimePicker view , int hour, int minute){\r\n\t\t\t\tgiorno.set(Calendar.HOUR_OF_DAY,hour);\r\n\t\t\t\tgiorno.set(Calendar.MINUTE,minute); \r\n\t\t\t\tEditText et_ora = (EditText) BookingActivity.this.findViewById(R.id.prenotazione_et_ora);\r\n\t\t\t\tformatter.applyPattern(\"HH:mm\");\r\n\t\t\t\tet_ora.setText(formatter.format(giorno.getTime()));\r\n\t\t\t}\t\t\t \t\r\n\t\t}, giorno.get(Calendar.HOUR_OF_DAY), giorno.get(Calendar.MINUTE), true);\r\n\t\ttpd.show();\r\n\t}", "public void pickTime(View view) {\n\n DialogFragment newFragment = new TimePicker();\n newFragment.show(getFragmentManager(), \"timePicker\");\n\n }", "private void showDialogTime() {\n final TimePickerDialog timePickerDialog = new TimePickerDialog(getActivity(),\n new TimePickerDialog.OnTimeSetListener() {\n\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n\n mCal.set(Calendar.HOUR_OF_DAY, hourOfDay);\n mCal.set(Calendar.MINUTE, minute);\n\n tvDate.setText(getDateString(mCal));\n\n }\n }, mCal.get(Calendar.HOUR_OF_DAY), mCal.get(Calendar.MINUTE), true);\n\n DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(),\n new DatePickerDialog.OnDateSetListener() {\n\n @Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n\n mCal.set(Calendar.YEAR, year);\n mCal.set(Calendar.MONTH, monthOfYear);\n mCal.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n\n timePickerDialog.show();\n }\n }, mCal.get(Calendar.YEAR), mCal.get(Calendar.MONTH), mCal.get(Calendar.DAY_OF_MONTH));\n datePickerDialog.show();\n }", "@Override\n public void onClick(View v) {\n new TimePickerDialog(getActivity(), starttimepicker, trigger.getStarttime().get(Calendar.HOUR), trigger.getStarttime().get(Calendar.MINUTE), true).show();\n }", "public void showStartTimeDialog(View v){\n DialogFragment dialogFragment = null;\n switch (v.getId()) {\n case R.id.newEvent_button_from_hour:\n dialogFragment = new StartTimePicker(0);\n break;\n case R.id.newEvent_button_to_hour:\n dialogFragment = new StartTimePicker(1);\n break;\n }\n dialogFragment.show(getFragmentManager(), \"start_time_picker\");\n }", "private void selectTime() {\n Calendar calendar = Calendar.getInstance();\n int hour = calendar.get(Calendar.HOUR_OF_DAY);\n int minute = calendar.get(Calendar.MINUTE);\n TimePickerDialog timePickerDialog = new TimePickerDialog(this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int i, int i1) {\n timeTonotify = i + \":\" + i1; //temp variable to store the time to set alarm\n mTimebtn.setText(FormatTime(i, i1)); //sets the button text as selected time\n }\n }, hour, minute, false);\n timePickerDialog.show();\n }", "@Override\n public void onClick(View v) {\n new TimePickerDialog(getActivity(), endtimepicker, trigger.getEndtime().get(Calendar.HOUR), trigger.getEndtime().get(Calendar.MINUTE), true).show();\n }", "private void showTimePicker(){\n final Calendar c = Calendar.getInstance();\n mHour = c.get(Calendar.HOUR_OF_DAY);\n mMinute = c.get(Calendar.MINUTE);\n\n // Launch Time Picker Dialog\n TimePickerDialog tpd = new TimePickerDialog(this,\n new TimePickerDialog.OnTimeSetListener() {\n\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay,\n int minute) {\n // Display Selected time in textbox\n pickupTime.setText(hourOfDay + \":\" + minute);\n// Log.e(TAG,\"Time set: \" + mHour + \",\" + mMinute + \",\");\n }\n }, mHour, mMinute, false);\n\n tpd.show();\n }", "protected void ShowTimePickerDialog() {\n\r\n\t\tfinal Calendar c = Calendar.getInstance();\r\n\t\tint mHour = c.get(Calendar.HOUR_OF_DAY);\r\n\t\tint mMinute = c.get(Calendar.MINUTE);\r\n\r\n\t\tCustomTimePickerDialog timepicker = new CustomTimePickerDialog(\r\n\t\t\t\tgetActivity(), timePickerListener, mHour, mMinute, false);\r\n\t\ttimepicker.show();\r\n\r\n\t}", "public void showTimePickerDialog(View v) {\n TextView tf = (TextView) v;\n Bundle args = getTimeFromLabel(tf.getText());\n args.putInt(\"id\", v.getId());\n TimePickerFragment newFragment = new TimePickerFragment();\n newFragment.setArguments(args);\n newFragment.show(getSupportFragmentManager(), \"timePicker\");\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog39 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t39Hour39 = hourOfDay1;\n t39Minute39 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t39Hour39, t39Minute39);\n //set selected time on text view\n\n\n timeS20 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime20.setText(timeS20);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog39.updateTime(t39Hour39, t39Minute39);\n //show dialog\n timePickerDialog39.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog42 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t42Hour42 = hourOfDay1;\n t42Minute42 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t42Hour42, t42Minute42);\n //set selected time on text view\n\n\n timeE21 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime21.setText(timeE21);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog42.updateTime(t42Hour42, t42Minute42);\n //show dialog\n timePickerDialog42.show();\n }", "public void showTimePickerDialog(int input) {\n Bundle args = new Bundle();\n args.putInt(\"input\", input);\n DialogFragment newFragment = new TimeFragment();\n newFragment.setArguments(args);\n newFragment.show(getSupportFragmentManager(), \"timePicker\");\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog19 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t19Hour19 = hourOfDay1;\n t19Minute19 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t19Hour19, t19Minute19);\n //set selected time on text view\n\n\n timeS10 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime10.setText(timeS10);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog19.updateTime(t19Hour19, t19Minute19);\n //show dialog\n timePickerDialog19.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog10 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t10Hour10 = hourOfDay1;\n t10Minute10 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t10Hour10, t10Minute10);\n //set selected time on text view\n\n\n timeE5 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime5.setText(timeE5);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog10.updateTime(t10Hour10, t10Minute10);\n //show dialog\n timePickerDialog10.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog31 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t31Hour31 = hourOfDay1;\n t31Minute31 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t31Hour31, t31Minute31);\n //set selected time on text view\n\n\n timeS16 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime16.setText(timeS16);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog31.updateTime(t31Hour31, t31Minute31);\n //show dialog\n timePickerDialog31.show();\n }", "public static CustomisableListSelectionDialog\n createTimeListSelectionDialog(Shell parent, String[] preSelected) {\n return new CustomisableListSelectionDialog(\n parent,\n TIME_RESOURCE_PREFIX,\n new TimeProviderFactory(),\n createTimeListValidator(),\n true, // duplicate time values are allowed.\n preSelected);\n\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog43 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t43Hour43 = hourOfDay1;\n t43Minute43 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t43Hour43, t43Minute43);\n //set selected time on text view\n\n\n timeS22 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime22.setText(timeS22);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog43.updateTime(t43Hour43, t43Minute43);\n //show dialog\n timePickerDialog43.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog13 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t13Hour13 = hourOfDay1;\n t13Minute13 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t13Hour13, t13Minute13);\n //set selected time on text view\n\n\n timeS7 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime7.setText(timeS7);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog13.updateTime(t13Hour13, t13Minute13);\n //show dialog\n timePickerDialog13.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog40 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t40Hour40 = hourOfDay1;\n t40Minute40 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t40Hour40, t40Minute40);\n //set selected time on text view\n\n\n timeE20 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime20.setText(timeE20);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog40.updateTime(t40Hour40, t40Minute40);\n //show dialog\n timePickerDialog40.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog20 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t20Hour20 = hourOfDay1;\n t20Minute20 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t20Hour20, t20Minute20);\n //set selected time on text view\n\n\n timeE10 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime10.setText(timeE10);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog20.updateTime(t20Hour20, t20Minute20);\n //show dialog\n timePickerDialog20.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog32 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t32Hour32 = hourOfDay1;\n t32Minute32 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t32Hour32, t32Minute32);\n //set selected time on text view\n\n\n timeE16 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime16.setText(timeE16);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog32.updateTime(t32Hour32, t32Minute32);\n //show dialog\n timePickerDialog32.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog27 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t27Hour27 = hourOfDay1;\n t27Minute27 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t27Hour27, t27Minute27);\n //set selected time on text view\n\n\n timeS14 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime14.setText(timeS14);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog27.updateTime(t27Hour27, t27Minute27);\n //show dialog\n timePickerDialog27.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog41 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t41Hour41 = hourOfDay1;\n t41Minute41 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t41Hour41, t41Minute41);\n //set selected time on text view\n\n\n timeS21 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime21.setText(timeS21);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog41.updateTime(t41Hour41, t41Minute41);\n //show dialog\n timePickerDialog41.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog35 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t35Hour35 = hourOfDay1;\n t35Minute35 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t35Hour35, t35Minute35);\n //set selected time on text view\n\n\n timeS18 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime18.setText(timeS18);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog35.updateTime(t35Hour35, t35Minute35);\n //show dialog\n timePickerDialog35.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog33 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t33Hour33 = hourOfDay1;\n t33Minute33 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t33Hour33, t33Minute33);\n //set selected time on text view\n\n\n timeS17 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime17.setText(timeS17);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog33.updateTime(t33Hour33, t33Minute33);\n //show dialog\n timePickerDialog33.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog18 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t18Hour18 = hourOfDay1;\n t18Minute18 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t18Hour18, t18Minute18);\n //set selected time on text view\n\n\n timeE9 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime9.setText(timeE9);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog18.updateTime(t18Hour18, t18Minute18);\n //show dialog\n timePickerDialog18.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog9 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t9Hour9 = hourOfDay1;\n t9Minute9 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t9Hour9, t9Minute9);\n //set selected time on text view\n\n\n timeS5 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime5.setText(timeS5);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog9.updateTime(t9Hour9, t9Minute9);\n //show dialog\n timePickerDialog9.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog16 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t16Hour16 = hourOfDay1;\n t16Minute16 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t16Hour16, t16Minute16);\n //set selected time on text view\n\n\n timeE8 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime8.setText(timeE8);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog16.updateTime(t16Hour16, t16Minute16);\n //show dialog\n timePickerDialog16.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog23 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t23Hour23 = hourOfDay1;\n t23Minute23 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t23Hour23, t23Minute23);\n //set selected time on text view\n\n\n timeS12 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime12.setText(timeS12);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog23.updateTime(t23Hour23, t23Minute23);\n //show dialog\n timePickerDialog23.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog21 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t21Hour21 = hourOfDay1;\n t21Minute21 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t21Hour21, t21Minute21);\n //set selected time on text view\n\n\n timeS11 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime11.setText(timeS11);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog21.updateTime(t21Hour21, t21Minute21);\n //show dialog\n timePickerDialog21.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog47 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t47Hour47 = hourOfDay1;\n t47Minute47 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t47Hour47, t47Minute47);\n //set selected time on text view\n\n\n timeS24 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime24.setText(timeS24);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog47.updateTime(t47Hour47, t47Minute47);\n //show dialog\n timePickerDialog47.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog50 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t50Hour50 = hourOfDay1;\n t50Minute50 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t50Hour50, t50Minute50);\n //set selected time on text view\n\n\n timeE25 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime25.setText(timeE25);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog50.updateTime(t50Hour50, t50Minute50);\n //show dialog\n timePickerDialog50.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog25 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t25Hour25 = hourOfDay1;\n t25Minute25 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t25Hour25, t25Minute25);\n //set selected time on text view\n\n\n timeS13 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime13.setText(timeS13);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog25.updateTime(t25Hour25, t25Minute25);\n //show dialog\n timePickerDialog25.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog29 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t29Hour29 = hourOfDay1;\n t29Minute29 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t29Hour29, t29Minute29);\n //set selected time on text view\n\n\n timeS15 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime15.setText(timeS15);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog29.updateTime(t29Hour29, t29Minute29);\n //show dialog\n timePickerDialog29.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog49 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t49Hour49 = hourOfDay1;\n t49Minute49 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t49Hour49, t49Minute49);\n //set selected time on text view\n\n\n timeS25 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime25.setText(timeS25);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog49.updateTime(t49Hour49, t49Minute49);\n //show dialog\n timePickerDialog49.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog46 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t46Hour46 = hourOfDay1;\n t46Minute46 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t46Hour46, t46Minute46);\n //set selected time on text view\n\n\n timeE23 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime23.setText(timeE23);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog46.updateTime(t46Hour46, t46Minute46);\n //show dialog\n timePickerDialog46.show();\n }", "@Override\n public void onClick(View view) {\n timeDialog.show(getFragmentManager(), \"timePicker\");\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog3 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t3Hour3 = hourOfDay1;\n t3Minute3 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t3Hour3, t3Minute3);\n //set selected time on text view\n\n\n timeS2 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime2.setText(timeS2);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog3.updateTime(t3Hour3, t3Minute3);\n //show dialog\n timePickerDialog3.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog4 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t4Hour4 = hourOfDay1;\n t4Minute4 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t4Hour4, t4Minute4);\n //set selected time on text view\n\n\n timeE2 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime2.setText(timeE2);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog4.updateTime(t4Hour4, t4Minute4);\n //show dialog\n timePickerDialog4.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog17 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t17Hour17 = hourOfDay1;\n t17Minute17 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t17Hour17, t17Minute17);\n //set selected time on text view\n\n\n timeS9 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime9.setText(timeS9);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog17.updateTime(t17Hour17, t17Minute17);\n //show dialog\n timePickerDialog17.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog34 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t34Hour34 = hourOfDay1;\n t34Minute34 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t34Hour34, t34Minute34);\n //set selected time on text view\n\n\n timeE17 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime17.setText(timeE17);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog34.updateTime(t34Hour34, t34Minute34);\n //show dialog\n timePickerDialog34.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog45 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t45Hour45 = hourOfDay1;\n t45Minute45 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t45Hour45, t45Minute45);\n //set selected time on text view\n\n\n timeS23 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime23.setText(timeS23);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog45.updateTime(t45Hour45, t45Minute45);\n //show dialog\n timePickerDialog45.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog12 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t12Hour12 = hourOfDay1;\n t12Minute12 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t12Hour12, t12Minute12);\n //set selected time on text view\n\n\n timeE6 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime6.setText(timeE6);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog12.updateTime(t12Hour12, t12Minute12);\n //show dialog\n timePickerDialog12.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog2 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t2Hour2 = hourOfDay1;\n t2Minute2 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t2Hour2, t2Minute2);\n //set selected time on text view\n\n\n timeE1 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime1.setText(timeE1);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog2.updateTime(t2Hour2, t2Minute2);\n //show dialog\n timePickerDialog2.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog8 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t8Hour8 = hourOfDay1;\n t8Minute8 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t8Hour8, t8Minute8);\n //set selected time on text view\n\n\n timeE4 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime4.setText(timeE4);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog8.updateTime(t8Hour8, t8Minute8);\n //show dialog\n timePickerDialog8.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog22 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t22Hour22 = hourOfDay1;\n t22Minute22 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t22Hour22, t22Minute22);\n //set selected time on text view\n\n\n timeE11 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime11.setText(timeE11);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog22.updateTime(t22Hour22, t22Minute22);\n //show dialog\n timePickerDialog22.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog38 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t38Hour38 = hourOfDay1;\n t38Minute38 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t38Hour38, t38Minute38);\n //set selected time on text view\n\n\n timeE19 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime19.setText(timeE19);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog38.updateTime(t38Hour38, t38Minute38);\n //show dialog\n timePickerDialog38.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog11 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t11Hour11 = hourOfDay1;\n t11Minute11 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t11Hour11, t11Minute11);\n //set selected time on text view\n\n\n timeS6 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime6.setText(timeS6);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog11.updateTime(t11Hour11, t11Minute11);\n //show dialog\n timePickerDialog11.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog37 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t37Hour37 = hourOfDay1;\n t37Minute37 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t37Hour37, t37Minute37);\n //set selected time on text view\n\n\n timeS19 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime19.setText(timeS19);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog37.updateTime(t37Hour37, t37Minute37);\n //show dialog\n timePickerDialog37.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog26 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t26Hour26 = hourOfDay1;\n t26Minute26 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t26Hour26, t26Minute26);\n //set selected time on text view\n\n\n timeE13 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime13.setText(timeE13);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog26.updateTime(t26Hour26, t26Minute26);\n //show dialog\n timePickerDialog26.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog15 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t15Hour15 = hourOfDay1;\n t15Minute15 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t15Hour15, t15Minute15);\n //set selected time on text view\n\n\n timeS8 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime8.setText(timeS8);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog15.updateTime(t15Hour15, t15Minute15);\n //show dialog\n timePickerDialog15.show();\n }", "@Override\n public void onClick(View v) {\n showDialog(TIME_DIALOG_ID);\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog36 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t36Hour36 = hourOfDay1;\n t36Minute36 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t36Hour36, t36Minute36);\n //set selected time on text view\n\n\n timeE18 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime18.setText(timeE18);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog36.updateTime(t36Hour36, t36Minute36);\n //show dialog\n timePickerDialog36.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog5 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t5Hour5 = hourOfDay1;\n t5Minute5 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t5Hour5, t5Minute5);\n //set selected time on text view\n\n\n timeS3 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime3.setText(timeS3);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog5.updateTime(t5Hour5, t5Minute5);\n //show dialog\n timePickerDialog5.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog1 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t1Hour1 = hourOfDay1;\n t1Minute1 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t1Hour1, t1Minute1);\n //set selected time on text view\n\n\n timeS1 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime1.setText(timeS1);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog1.updateTime(t1Hour1, t1Minute1);\n //show dialog\n timePickerDialog1.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog48 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t48Hour48 = hourOfDay1;\n t48Minute48 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t48Hour48, t48Minute48);\n //set selected time on text view\n\n\n timeE24 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime24.setText(timeE24);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog48.updateTime(t48Hour48, t48Minute48);\n //show dialog\n timePickerDialog48.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog28 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t28Hour28 = hourOfDay1;\n t28Minute28 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t28Hour28, t28Minute28);\n //set selected time on text view\n\n\n timeE14 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime14.setText(timeE14);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog28.updateTime(t28Hour28, t28Minute28);\n //show dialog\n timePickerDialog28.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog14 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t14Hour14 = hourOfDay1;\n t14Minute14 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t14Hour14, t14Minute14);\n //set selected time on text view\n\n\n timeE7 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime7.setText(timeE7);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog14.updateTime(t14Hour14, t14Minute14);\n //show dialog\n timePickerDialog14.show();\n }", "private void pickTime(final Calendar initTime){\n //callback once time is selected\n TimePickerDialog.OnTimeSetListener setTime = new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n initTime.set(\n initTime.get(Calendar.YEAR),\n initTime.get(Calendar.MONTH),\n initTime.get(Calendar.DATE),\n hourOfDay,\n minute\n );\n setDateTimeViews(); //updates views\n }\n };\n //creates dialogue\n TimePickerDialog timePickerDialog = new TimePickerDialog(this,\n setTime,\n initTime.get(Calendar.HOUR_OF_DAY),\n initTime.get(Calendar.MINUTE),\n false);\n timePickerDialog.show(); //shows the dialogue\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog30 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t30Hour30 = hourOfDay1;\n t30Minute30 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t30Hour30, t30Minute30);\n //set selected time on text view\n\n\n timeE15 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime15.setText(timeE15);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog30.updateTime(t30Hour30, t30Minute30);\n //show dialog\n timePickerDialog30.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog24 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t24Hour24 = hourOfDay1;\n t24Minute24 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t24Hour24, t24Minute24);\n //set selected time on text view\n\n\n timeE12 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime12.setText(timeE12);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog24.updateTime(t24Hour24, t24Minute24);\n //show dialog\n timePickerDialog24.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog44 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t44Hour44 = hourOfDay1;\n t44Minute44 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t44Hour44, t44Minute44);\n //set selected time on text view\n\n\n timeE22 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime22.setText(timeE22);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog44.updateTime(t44Hour44, t44Minute44);\n //show dialog\n timePickerDialog44.show();\n }", "private void getTimeView() {\n\n\t\ttry {\n\n\t\t\t// Launch Time Picker Dialog\n\n\t\t\tSystem.out.println(\"!!!!!in time picker\" + hour);\n\t\t\tSystem.out.println(\"!!!!!in time picker\" + minutes);\n\n\t\t\tTimePickerDialog tpd = new TimePickerDialog(this,\n\t\t\t\t\tnew TimePickerDialog.OnTimeSetListener() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onTimeSet(TimePicker view, int hourOfDay,\n\t\t\t\t\t\t\t\tint minute) {\n\n\t\t\t\t\t\t\tif (rf_booking_date_box.getText().toString()\n\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(currDate.toString())) {\n\t\t\t\t\t\t\t\tc = Calendar.getInstance();\n\t\t\t\t\t\t\t\tint curr_hour = c.get(Calendar.HOUR_OF_DAY);\n\t\t\t\t\t\t\t\tint curr_minutes = c.get(Calendar.MINUTE);\n\n\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!shikha\"\n\t\t\t\t\t\t\t\t\t\t\t\t+ curr_hour);\n\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!shikha\"\n\t\t\t\t\t\t\t\t\t\t\t\t+ curr_minutes);\n\n\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!hourOfDay<curr_hour\"\n\t\t\t\t\t\t\t\t\t\t\t\t+ (hourOfDay < curr_hour));\n\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!minute<curr_minutes\"\n\t\t\t\t\t\t\t\t\t\t\t\t+ (minute < curr_minutes));\n\n\t\t\t\t\t\t\t\tif (hourOfDay < curr_hour\n\t\t\t\t\t\t\t\t\t\t&& minute < curr_minutes\n\t\t\t\t\t\t\t\t\t\t|| hourOfDay < curr_hour\n\t\t\t\t\t\t\t\t\t\t&& minute <= curr_minutes\n\t\t\t\t\t\t\t\t\t\t|| hourOfDay == curr_hour\n\t\t\t\t\t\t\t\t\t\t&& minute < curr_minutes) {\n\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! in if\");\n\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\tgetString(R.string.str_Please_choose_valid_time),\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\tminutes = minute;\n\t\t\t\t\t\t\t\t\thour = hourOfDay;\n\n\t\t\t\t\t\t\t\t\tString time1 = hour + \":\" + minutes;\n\n\t\t\t\t\t\t\t\t\tDate time;\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\ttime = new SimpleDateFormat(\"HH:mm\")\n\t\t\t\t\t\t\t\t\t\t\t\t.parse(hour + \":\" + minutes);\n\n\t\t\t\t\t\t\t\t\t\tDateFormat outputFormatter = new SimpleDateFormat(\n\t\t\t\t\t\t\t\t\t\t\t\t\"HH:mm\");\n\t\t\t\t\t\t\t\t\t\tString final_time = outputFormatter\n\t\t\t\t\t\t\t\t\t\t\t\t.format(time);\n\n\t\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!final_time...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ final_time);\n\n\t\t\t\t\t\t\t\t\t\t// Display Selected time in textbox\n\t\t\t\t\t\t\t\t\t\trf_booking_time_box.setText(final_time);\n\t\t\t\t\t\t\t\t\t\tBooking_Screen_TabLayout.rf_booking_time_header.setText(final_time);\n\n\t\t\t\t\t\t\t\t\t\t// Display Selected time in textbox\n\t\t\t\t\t\t\t\t\t\t// rf_booking_time_box.setText(hourOfDay\n\t\t\t\t\t\t\t\t\t\t// + \":\" +\n\t\t\t\t\t\t\t\t\t\t// minute);\n\t\t\t\t\t\t\t\t\t\tGlobal_variable.str_Time_From = final_time;\n\t\t\t\t\t\t\t\t\t\tGlobal_variable.str_Time_To = final_time;\n\n\t\t\t\t\t\t\t\t\t} catch (java.text.ParseException e) {\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tminutes = minute;\n\t\t\t\t\t\t\t\thour = hourOfDay;\n\n\t\t\t\t\t\t\t\tString time1 = hour + \":\" + minutes;\n\n\t\t\t\t\t\t\t\tDate time;\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\ttime = new SimpleDateFormat(\"HH:mm\")\n\t\t\t\t\t\t\t\t\t\t\t.parse(hour + \":\" + minutes);\n\n\t\t\t\t\t\t\t\t\tDateFormat outputFormatter = new SimpleDateFormat(\n\t\t\t\t\t\t\t\t\t\t\t\"HH:mm\");\n\t\t\t\t\t\t\t\t\tString final_time = outputFormatter\n\t\t\t\t\t\t\t\t\t\t\t.format(time);\n\n\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!final_time...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ final_time);\n\n\t\t\t\t\t\t\t\t\t// Display Selected time in textbox\n\t\t\t\t\t\t\t\t\trf_booking_time_box.setText(final_time);\n\t\t\t\t\t\t\t\t\tBooking_Screen_TabLayout.rf_booking_time_header.setText(final_time);\n\t\t\t\t\t\t\t\t\t// Display Selected time in textbox\n\t\t\t\t\t\t\t\t\t// rf_booking_time_box.setText(hourOfDay +\n\t\t\t\t\t\t\t\t\t// \":\" +\n\t\t\t\t\t\t\t\t\t// minute);\n\t\t\t\t\t\t\t\t\tGlobal_variable.str_Time_From = final_time;\n\t\t\t\t\t\t\t\t\tGlobal_variable.str_Time_To = final_time;\n\n\t\t\t\t\t\t\t\t} catch (java.text.ParseException e) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}, hour, minutes, false);\n\t\t\ttpd.show();\n\t\t\ttpd.setCancelable(false);\n\t\t\ttpd.setCanceledOnTouchOutside(false);\n\n\t\t} catch (NullPointerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void initializeTime() {\n hour = cal.get(Calendar.HOUR);\n min = cal.get(Calendar.MINUTE);\n\n time = (EditText) findViewById(R.id.textSetTime);\n time.setInputType(InputType.TYPE_NULL);\n\n //Set EditText text to be current time\n if(min < 10) {\n time.setText(hour + \":0\" + min);\n } else {\n time.setText(hour + \":\" + min);\n }\n\n time.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n picker = new TimePickerDialog(ControlCenterActivity.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int i, int i1) {\n if(i1 < 10) {\n time.setText(i + \":0\" + i1);\n } else {\n time.setText(i + \":\" + i1);\n }\n }\n }, hour, min, false);\n\n picker.show();\n }\n });\n }", "public int showDateTimeDialog()\n\t{\n\t\treturn showDialog(owner, layoutPanel, SwingLocale.getString(\"date_time_selector\"), IconFactory.getSwingIcon(\"component/calendar_48.png\"));\n\t}", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog7 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t7Hour7 = hourOfDay1;\n t7Minute7 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t7Hour7, t7Minute7);\n //set selected time on text view\n\n\n timeS4 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime4.setText(timeS4);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog7.updateTime(t7Hour7, t7Minute7);\n //show dialog\n timePickerDialog7.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog6 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t6Hour6 = hourOfDay1;\n t6Minute6 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t6Hour6, t6Minute6);\n //set selected time on text view\n\n\n timeE3 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime3.setText(timeE3);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog6.updateTime(t6Hour6, t6Minute6);\n //show dialog\n timePickerDialog6.show();\n }", "public void showTimeStartPickerDialog(View v) {\n DialogFragment newFragment = new TimePickerFragment() {\n @Override\n public void onTimeSet(TimePicker view, int hour, int minute) {\n timeStartTV = (TextView)findViewById(R.id.timeStartTV);\n hourStart=hour;\n minuteStart=minute;\n timeStartTV.setText(makeHourFine(hour,minute));\n if(hourEnd!=99||minuteEnd!=99) {\n if ((hourEnd + (minuteEnd / 60.0)) - (hourStart + (minuteStart / 60.0)) >= 0) {\n hoursD = Round((hourEnd + (minuteEnd / 60.0)) - (hourStart + (minuteStart / 60.0)), 2);\n } else\n hoursD = Round((hourEnd + (minuteEnd / 60.0)) + 24 - (hourStart + (minuteStart / 60.0)), 2);\n\n hours = (EditText) findViewById(R.id.HoursET);\n hours.setText(Double.toString(hoursD));\n }\n\n }\n\n };\n newFragment.show(getSupportFragmentManager(), \"timeStartPicker\");\n }", "private void setUpTimePickers() {\n timeText.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n MaterialTimePicker.Builder builder = new MaterialTimePicker.Builder();\n builder.setTitleText(\"Time Picker Title\");\n builder.setHour(12);\n builder.setMinute(0);\n\n final MaterialTimePicker timePicker = builder.build();\n\n timePicker.addOnPositiveButtonClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n timeChoice = LocalTime.of(timePicker.getHour(),timePicker.getMinute());\n String selectedTimeStr = timeChoice.format(DateTimeFormatter.ofPattern(\"kk:mm\"));\n timeText.setText(selectedTimeStr);\n }\n });\n\n timePicker.show(getSupportFragmentManager(),\"TimePicker\");\n }\n });\n\n }", "private void createTimeCombo() {\n \t\t\ttimeCombo = new Combo(this, SWT.READ_ONLY);\n \t\t\ttimeCombo.setItems(new String[] { \"12:00 AM\", \"1:00 AM\", \"2:00 AM\", \"3:00 AM\", \"4:00 AM\", \"5:00 AM\",\n \t\t\t\t\t\"6:00 AM\", \"7:00 AM\", \"8:00 AM\", \"9:00 AM\", \"10:00 AM\", \"11:00 AM\", \"12:00 PM\", \"1:00 PM\",\n \t\t\t\t\t\"2:00 PM\", \"3:00 PM\", \"4:00 PM\", \"5:00 PM\", \"6:00 PM\", \"7:00 PM\", \"8:00 PM\", \"9:00 PM\", \"10:00 PM\",\n \t\t\t\t\t\"11:00 PM\" });\n \t\t\ttimeCombo.select(Calendar.getInstance().get(Calendar.HOUR_OF_DAY));\n \t\t\ttimeCombo.addModifyListener(new ModifyListener() {\n \t\t\t\tpublic void modifyText(ModifyEvent arg0) {\n \t\t\t\t\tdate.set(Calendar.HOUR_OF_DAY, timeCombo.getSelectionIndex());\n \t\t\t\t\tdate.set(Calendar.MINUTE, 0);\n \t\t\t\t\tupdateCalendar();\n \t\t\t\t}\n \t\t\t});\n \t\t\ttimeCombo.addKeyListener(this);\n \t\t}", "public void showTimePickerDialog(View view) {\n TimePickerDialog timePickerDialog = new TimePickerDialog(this,\n new TimePickerDialog.OnTimeSetListener() {\n\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay,\n int minute) {\n hour1 = hourOfDay;\n minute1 = minute;\n text3.setText(hourOfDay + \":\" + minute);\n }\n }, hour1, minute1, true);\n timePickerDialog.show();\n }", "private static void setupTimePicker(LoopView timeHours, LoopView timeMins, LoopView timeTime) {\n timeHours.setItemsVisibleCount(5);\n timeHours.setNotLoop();\n //timeMins.setItems(timeMinsList);\n timeMins.setItemsVisibleCount(5);\n timeMins.setNotLoop();\n //timeTime.setItems(timeTimeList);\n timeTime.setItemsVisibleCount(5);\n timeTime.setNotLoop();\n }", "public static String showTimePickerDialog(final Context appContext,\n final TextView eStartTime) {\n\n final Calendar c = Calendar.getInstance();\n currentHour = c.get(Calendar.HOUR_OF_DAY);\n currentMinute = c.get(Calendar.MINUTE);\n currentSeconds = c.get(Calendar.SECOND);\n TimePickerDialog tpd = new TimePickerDialog(appContext,\n new TimePickerDialog.OnTimeSetListener() {\n\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay,\n int minutes) {\n int hour = hourOfDay;\n int minute = minutes;\n String time = \"\" + hourOfDay + \"\" + minutes + \"00\";\n DTU.time = time;\n int flg = 0;\n String strHour, strMinutes, strAMPM;\n\n if (hour > 12) {\n flg = 1;\n hour = hour - 12;\n strAMPM = \"PM\";\n } else {\n strAMPM = \"AM\";\n }\n if (hour < 10) {\n strHour = \"0\" + hour;\n } else {\n strHour = \"\" + hour;\n }\n if (minute < 10) {\n strMinutes = \"0\" + minute;\n } else {\n strMinutes = \"\" + minute;\n }\n eStartTime\n .setText(strHour + \":\" + strMinutes + strAMPM);\n\n }\n }, currentHour, currentMinute, false);\n tpd.show();\n\n return \"\";\n }", "public void showTimeEndPickerDialog(View v) {\n DialogFragment newFragment = new TimePickerFragment() {\n @Override\n public void onTimeSet(TimePicker view, int hour, int minute) {\n timeEndTV = (TextView)findViewById(R.id.timeEndTV);\n timeEndTV.setText(makeHourFine(hour, minute));\n hourEnd=hour;\n minuteEnd=minute;\n if(hourStart!=99||minuteStart!=99) {\n if ((hourEnd + (minuteEnd / 60.0)) - (hourStart + (minuteStart / 60.0)) >= 0) {\n hoursD =Round((hourEnd + (minuteEnd / 60.0)) - (hourStart + (minuteStart / 60.0)), 2);\n } else\n hoursD = Round((hourEnd + (minuteEnd / 60.0)) + 24 - (hourStart + (minuteStart / 60.0)), 2);\n\n hours = (EditText) findViewById(R.id.HoursET);\n hours.setText(Double.toString(hoursD));\n }\n\n\n }\n\n\n };\n newFragment.show(getSupportFragmentManager(), \"timeStartPicker\");\n }", "@Override\n protected Dialog onCreateDialog(int id) {\n switch (id) {\n // create a new TimePickerDialog with values you want to show\n case TIME_DIALOG_ID:\n return new TimePickerDialog(this, mTimeSetListener, mHour, mMinute, false);\n }\n return null;\n }", "private TimePicker createTimePicker() {\r\n\r\n TimePickerSettings timeSettings = new TimePickerSettings();\r\n timeSettings.initialTime = LocalTime.of(9, 0);\r\n timeSettings.setAllowKeyboardEditing(false);\r\n timeSettings.generatePotentialMenuTimes\r\n (TimePickerSettings.TimeIncrement.OneHour,\r\n null, null);\r\n\r\n TimePicker timePicker = new TimePicker(timeSettings);\r\n timeSettings.setVetoPolicy(new VetoTimes());\r\n\r\n return timePicker;\r\n\r\n }", "private void setTime(TextView textView) {\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(getActivity(), new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n textView.setText( selectedHour + \":\" + selectedMinute);\n }\n }, hour, minute, false);//Yes 24 hour time\n mTimePicker.setTitle(\"Select Time\");\n mTimePicker.show();\n }", "private void showChooseCurNonGarTimeDialog1(){\n\t\talertDialog = new AlertDialog.Builder(this);\n\t\talertDialog.setTitle(\"请选择添到店时间\");\n\t\ttimeString = new String[] { \"20:00\", \"23:59\",\"次日06:00\"};\n\t\tfinal ArrayList<String> arrayList = new ArrayList<String>();\n\t\t//final ArrayList<String> arrayListType = new ArrayList<String>();\n\n\t\tfor (int i = 0; i < timeString.length; i++) {\n\t\t\tif (!timeString[i].equals(\"null\")) {\n\t\t\t\tarrayList.add(timeString[i]);\t\n\t\t\t\t//arrayListType.add(typeArrayStrings[i]);\n\n\t\t\t}\n\t\t}\n\t\t//将遍历之后的数组 arraylist的内容在选择器上显示 \n\t\talertDialog.setSingleChoiceItems(arrayList.toArray(new String[0]), 0, new DialogInterface.OnClickListener(){\n\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tdialog.dismiss();\n\t\t\t\tSystem.out.println(\"***被点击***\"+which);\n\t\t\t\tdialog.toString();\n\t\t\t\tswitch (which) {\n\t\t\t\tcase 0:\n\t\t\t\t\t\n\t\t\t\t\tarrivingTime = (getTimeCurrentHr()+1)+\":00\"+\"-\"+\"20:00\";\n\t\t\t\t\tpostArrivalEarlyTime = liveTimeString + \" \" + (getTimeCurrentHr()+1)+\":00:00\";\n\t\t\t\t\tpostArrivalLateTime = leaveTimeString + \" \" + \"20:00:00\";\n\t\t\t\t\ttimeTextView.setText(arrivingTime);\n\t\t\t\t\tsetTime(arrivingTime);\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\tcase 1:\n\t\t\t\t\t\n\t\t\t\t\tarrivingTime = \"20:00-23:59\";\n\t\t\t\t\ttimeTextView.setText(arrivingTime);\n\t\t\t\t\tpostArrivalEarlyTime = liveTimeString + \" \" +\"20:00:00\";\n\t\t\t\t\tpostArrivalLateTime = leaveTimeString + \" \" + \"23:59:00\";\n\t\t\t\t\tsetTime(arrivingTime);\n\t\t\t\t\tbreak;\t\t\t\n\t\t\t\tcase 2:\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tarrivingTime = \"23:59-次日06:00\";\n\t\t\t\t\ttimeTextView.setText(arrivingTime);\n\t\t\t\t\tpostArrivalEarlyTime = liveTimeString + \" \" +\"23:59:00\";\n\t\t\t\t\tpostArrivalLateTime = getDateNext(liveTimeString) + \" \" + \"06:00:00\";\n\t\t\t\t\tsetTime(arrivingTime);\n\t\t\t\t\tint dayNum1 = Integer.parseInt(dayTextView.getText().toString());\n\t\t\t\t\tint roomNum1 = Integer.parseInt(roomtTextView.getText().toString());\n\t\t\t\t\tif(dayNum1 != 1){\n\t\t\t\t\t\t//dayTextView.setText(\"\"+(dayNum1+1));\n\t\t\t\t\t\t//zongpicTextView.setText(\"¥\"+((j/dayNum1)*(dayNum1-1)*roomNum1));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//dayTextView.setText(\"1\");\n\t\t\t\t\t\t//zongpicTextView.setText(\"¥\"+(j*1*roomNum1));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbreak;\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tarrivingTime = \"\";\n\t\t\t\t\tsetTime(arrivingTime);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}).show();\n\t}", "private void showChooseNonCurNonGarTimeDialog(){\n\t\talertDialog = new AlertDialog.Builder(this);\n\t\talertDialog.setTitle(\"请选择添到店时间\");\n\t\ttimeString = new String[] { \"20:00\", \"23:59\",\"次日06:00\"};\n\t\tfinal ArrayList<String> arrayList = new ArrayList<String>();\n\t\t//final ArrayList<String> arrayListType = new ArrayList<String>();\n\n\t\tfor (int i = 0; i < timeString.length; i++) {\n\t\t\tif (!timeString[i].equals(\"null\")) {\n\t\t\t\tarrayList.add(timeString[i]);\t\n\t\t\t\t//arrayListType.add(typeArrayStrings[i]);\n\t\t\t\t//timeTextView.setText(timeString[0]);\n\t\t\t}\n\t\t}\n\t\t//将遍历之后的数组 arraylist的内容在选择器上显示 \n\t\talertDialog.setSingleChoiceItems(arrayList.toArray(new String[0]), 0, new DialogInterface.OnClickListener(){\n\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tdialog.dismiss();\n\t\t\t\tSystem.out.println(\"***被点击***\"+which);\n\t\t\t\tdialog.toString();\n\t\t\t\tswitch (which) {\n\t\t\t\tcase 0:\n\t\t\t\t\tarrivingTime = \"14:00-20:00\";\n\t\t\t\t\ttimeTextView.setText(arrivingTime);\n\t\t\t\t\tpostArrivalEarlyTime = liveTimeString + \" \" +\"14:00:00\";\n\t\t\t\t\tpostArrivalLateTime = leaveTimeString + \" \" + \"20:00:00\";\n\t\t\t\t\tsetTime(arrivingTime);\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\tcase 1:\n\t\t\t\t\t\n\t\t\t\t\tarrivingTime = \"20:00-23:59\";\n\t\t\t\t\ttimeTextView.setText(arrivingTime);\n\t\t\t\t\tpostArrivalEarlyTime = liveTimeString + \" \" +\"20:00:00\";\n\t\t\t\t\tpostArrivalLateTime = leaveTimeString + \" \" + \"23:59:00\";\n\t\t\t\t\tsetTime(arrivingTime);\n\t\t\t\t\tbreak;\t\t\t\n\t\t\t\tcase 2:\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tarrivingTime = \"23:59-次日06:00\";\n\t\t\t\t\ttimeTextView.setText(arrivingTime);\n\t\t\t\t\tpostArrivalEarlyTime = liveTimeString + \" \" +\"23:59:00\";\n\t\t\t\t\tpostArrivalLateTime = getDateNext(liveTimeString) + \" \" + \"06:00:00\";\n\t\t\t\t\tint dayNum1 = Integer.parseInt(dayTextView.getText().toString());\n\t\t\t\t\tint roomNum1 = Integer.parseInt(roomtTextView.getText().toString());\n\t\t\t\t\tif(dayNum1 != 1){\n\t\t\t\t\t\t//dayTextView.setText(\"\"+(dayNum1+1));\n\t\t\t\t\t\t//zongpicTextView.setText(\"¥\"+((j/dayNum1)*(dayNum1+1)*roomNum1));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//dayTextView.setText(\"1\");\n\t\t\t\t\t\t//zongpicTextView.setText(\"¥\"+(j*1*roomNum1));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tsetTime(arrivingTime);\n\t\t\t\t\tbreak;\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tarrivingTime = \"\";\n\t\t\t\t\tsetTime(arrivingTime);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}).show();\n\t}", "private void showChooseCurNonGarTimeDialog2(){\n\t\talertDialog = new AlertDialog.Builder(this);\n\t\talertDialog.setTitle(\"请选择添到店时间\");\n\t\ttimeString = new String[] {\"23:59\",\"次日06:00\"};\n\t\tfinal ArrayList<String> arrayList = new ArrayList<String>();\n\t\t//final ArrayList<String> arrayListType = new ArrayList<String>();\n\n\t\tfor (int i = 0; i < timeString.length; i++) {\n\t\t\tif (!timeString[i].equals(\"null\")) {\n\t\t\t\tarrayList.add(timeString[i]);\t\n\t\t\t\t//arrayListType.add(typeArrayStrings[i]);\n\n\t\t\t}\n\t\t}\n\t\t//将遍历之后的数组 arraylist的内容在选择器上显示 \n\t\talertDialog.setSingleChoiceItems(arrayList.toArray(new String[0]), 0, new DialogInterface.OnClickListener(){\n\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tdialog.dismiss();\n\t\t\t\tSystem.out.println(\"***被点击***\"+which);\n\t\t\t\tdialog.toString();\n\t\t\t\tswitch (which) {\n\t\t\t\tcase 0:\n\t\t\t\t\t\n\t\t\t\t\tarrivingTime = (getTimeCurrentHr()+1)+\":00\"+\"-\"+\"23:59\";\n\t\t\t\t\ttimeTextView.setText(arrivingTime);\n\t\t\t\t\tpostArrivalEarlyTime = liveTimeString + \" \" + (getTimeCurrentHr()+1)+\":00:00\";\n\t\t\t\t\tpostArrivalLateTime = leaveTimeString + \" \" + \"23:59:00\";\n\t\t\t\t\tsetTime(arrivingTime);\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\tcase 1:\n\t\t\t\t\t\n\t\t\t\t\tarrivingTime = \"23:59-次日06:00\";\n\t\t\t\t\ttimeTextView.setText(arrivingTime);\n\t\t\t\t\tpostArrivalEarlyTime = liveTimeString + \" \" +\"23:59:00\" ;\n\t\t\t\t\tpostArrivalLateTime = getDateNext(liveTimeString)+ \" \" + \"06:00:00\";\n\t\t\t\t\tsetTime(arrivingTime);\n\t\t\t\t\tint dayNum1 = Integer.parseInt(dayTextView.getText().toString());\n\t\t\t\t\tint roomNum1 = Integer.parseInt(roomtTextView.getText().toString());\n\t\t\t\t\tif(dayNum1 != 1){\n\t\t\t\t\t\t//dayTextView.setText(\"\"+(dayNum1+1));\n\t\t\t\t\t\t//zongpicTextView.setText(\"¥\"+((j/dayNum1)*(dayNum1-1)*roomNum1));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//dayTextView.setText(\"1\");\n\t\t\t\t\t\t//zongpicTextView.setText(\"¥\"+(j*1*roomNum1));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\t\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tarrivingTime = \"\";\n\t\t\t\t\tsetTime(arrivingTime);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}).show();\n\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n int hour = calendarSelected.get(Calendar.HOUR_OF_DAY);\n int minute = calendarSelected.get(Calendar.MINUTE);\n\n // Create a new instance of TimePickerDialog and return it\n return new TimePickerDialog(getActivity(), this, hour, minute,\n DateFormat.is24HourFormat(getActivity()));\n }", "@Override\r\n\tpublic void timeDialogCallBack(String time) {\n\t\t\r\n\t}", "public void showTimePickerDialog(View v) {\n DialogFragment newFragment = new DatePickerFragment();\n newFragment.setTargetFragment(RegisterFragment.this, 0);\n newFragment.show(getFragmentManager(), \"datePicker\");\n }", "@Override\n protected void onPrepareDialogBuilder(AlertDialog.Builder builder) {\n super.onPrepareDialogBuilder(builder);\n\n builder.setView(timePicker);\n }", "@Override\n public void onClick(View v) {\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(getActivity(), new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n eventTime.setText( selectedHour + \":\" + selectedMinute);\n }\n }, hour, minute, true);//Yes 24 hour time\n mTimePicker.setTitle(\"Event Time\");\n mTimePicker.show();\n\n }", "public TimeSelector() {\n super(new GridBagLayout());\n createInterface();\n }", "@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\n\t\t\t\t TimePickerDialog tpd = new TimePickerDialog(contextyeild, //same Activity Context like before\n\t\t\t\t new TimePickerDialog.OnTimeSetListener() {\n\n\t\t\t\t @Override\n\t\t\t\t public void onTimeSet(TimePicker view, int hourOfDay,int minute) {\n\t\t\t\t \n\t\t\t\t hour = hourOfDay;\n\t\t\t\t \t\t min = minute;\n\t\t\t\t \t\t \n\t\t\t\t \t\t\t String timeSet = \"\";\n\t\t\t\t \t\t\t if (hour > 12) {\n\t\t\t\t \t\t\t hour -= 12;\n\t\t\t\t \t\t\t timeSet = \"PM\";\n\t\t\t\t \t\t\t } else if (hour == 0) {\n\t\t\t\t \t\t\t hour += 12;\n\t\t\t\t \t\t\t timeSet = \"AM\";\n\t\t\t\t \t\t\t } else if (hour == 12)\n\t\t\t\t \t\t\t timeSet = \"PM\";\n\t\t\t\t \t\t\t else\n\t\t\t\t \t\t\t timeSet = \"AM\";\n\t\t\t\t \t\t\t \n\t\t\t\t \t\t\t \n\t\t\t\t \t\t\t String minutes = \"\";\n\t\t\t\t \t\t\t if (min < 10)\n\t\t\t\t \t\t\t minutes = \"0\" + min;\n\t\t\t\t \t\t\t else\n\t\t\t\t \t\t\t minutes = String.valueOf(min);\n\t\t\t\t \t\t\t \n\t\t\t\t \t\t\t // Append in a StringBuilder\n\t\t\t\t \t\t\t String aTime = new StringBuilder().append(hour).append(':')\n\t\t\t\t \t\t\t .append(minutes).append(\" \").append(timeSet).toString();\n\t\t\t\t \t\t\t \n\t\t\t\t \t\t\t harvesttime.setText(aTime); \n\t\t\t\t }\n\t\t\t\t }, hour, min, false);\n\t\t\t\t \n\t\t\t\t tpd.show();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "@Override\n public void onClick(View v) {\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(AddRDV.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n editTextHeur.setText(String.format(\"%02d\",selectedHour) + \":\" + String.format(\"%02d\" ,selectedMinute)+\":\"+\"00\");\n }\n }, hour, minute, true);//Yes 24 hour time\n mTimePicker.setTitle(\"Select time of your appointment\");\n mTimePicker.show();\n\n }", "void showDialog() {\n\t\tDFTimePicker dtf = DFTimePicker.newInstance();\n DialogFragment newFragment = dtf;\n newFragment.show(getFragmentManager(), \"dialog\");\n }", "@Override\n public void onClick(View v) {\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(AddTripActivity.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n String a = \"\" + selectedMinute;\n String b = \"\" + selectedHour;\n if(selectedMinute<10){\n a = \"0\"+selectedMinute;\n }\n if(selectedHour<10){\n b = \"0\"+selectedHour;\n }\n mTime.setText( b + \":\" + a);\n }\n }, hour, minute, true);\n mTimePicker.setTitle(\"Select Time\");\n mTimePicker.show();\n\n }", "private void customTime(boolean shouldStart) {\n\n if (customCalendar == null) {\n customCalendar = Calendar.getInstance();\n customYear = customCalendar.get(Calendar.YEAR);\n customMonth = customCalendar.get(Calendar.MONTH);\n customDay = customCalendar.get(Calendar.DAY_OF_MONTH);\n }\n\n timeDialog = new DatePickerDialog(this, this, customYear, customMonth, customDay);\n timeDialog.show();\n if (shouldStart) {\n Toasty.info(StatActivity.this, \"Selection start time\").show();\n } else {\n Toasty.info(StatActivity.this, \"Select end time\").show();\n }\n }", "@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t TimePickerDialog tpd = new TimePickerDialog(contextyeild, //same Activity Context like before\n\t\t\t\t\t\t\t new TimePickerDialog.OnTimeSetListener() {\n\n\t\t\t\t\t\t\t @Override\n\t\t\t\t\t\t\t public void onTimeSet(TimePicker view, int hourOfDay,int minute) {\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t hour = hourOfDay;\n\t\t\t\t\t\t\t \t\t min = minute;\n\t\t\t\t\t\t\t \t\t \n\t\t\t\t\t\t\t \t\t\t String timeSet = \"\";\n\t\t\t\t\t\t\t \t\t\t if (hour > 12) {\n\t\t\t\t\t\t\t \t\t\t hour -= 12;\n\t\t\t\t\t\t\t \t\t\t timeSet = \"PM\";\n\t\t\t\t\t\t\t \t\t\t } else if (hour == 0) {\n\t\t\t\t\t\t\t \t\t\t hour += 12;\n\t\t\t\t\t\t\t \t\t\t timeSet = \"AM\";\n\t\t\t\t\t\t\t \t\t\t } else if (hour == 12)\n\t\t\t\t\t\t\t \t\t\t timeSet = \"PM\";\n\t\t\t\t\t\t\t \t\t\t else\n\t\t\t\t\t\t\t \t\t\t timeSet = \"AM\";\n\t\t\t\t\t\t\t \t\t\t \n\t\t\t\t\t\t\t \t\t\t \n\t\t\t\t\t\t\t \t\t\t String minutes = \"\";\n\t\t\t\t\t\t\t \t\t\t if (min < 10)\n\t\t\t\t\t\t\t \t\t\t minutes = \"0\" + min;\n\t\t\t\t\t\t\t \t\t\t else\n\t\t\t\t\t\t\t \t\t\t minutes = String.valueOf(min);\n\t\t\t\t\t\t\t \t\t\t \n\t\t\t\t\t\t\t \t\t\t // Append in a StringBuilder\n\t\t\t\t\t\t\t \t\t\t String aTime = new StringBuilder().append(hour).append(':')\n\t\t\t\t\t\t\t \t\t\t .append(minutes).append(\" \").append(timeSet).toString();\n\t\t\t\t\t\t\t \t\t\t \n\t\t\t\t\t\t\t \t\t\t harvesttime.setText(aTime); \n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t }, hour, min, false);\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t tpd.show();\t\t\t\n\t\t\t\t\t\t\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n final Calendar c = Calendar.getInstance();\n int hour = c.get(Calendar.HOUR_OF_DAY);\n int minute = c.get(Calendar.MINUTE);\n\n // Retornar en nueva instancia del dialogo selector de tiempo\n return new TimePickerDialog(getActivity(),this, hour, minute, DateFormat.is24HourFormat(getActivity()));\n }", "private void showChooseCurNonGarTimeDialog3(){\n\t\talertDialog = new AlertDialog.Builder(this);\n\t\talertDialog.setTitle(\"请选择添到店时间\");\n\t\ttimeString = new String[] {\"次日06:00\"};\n\t\tfinal ArrayList<String> arrayList = new ArrayList<String>();\n\t\t//final ArrayList<String> arrayListType = new ArrayList<String>();\n\n\t\tfor (int i = 0; i < timeString.length; i++) {\n\t\t\tif (!timeString[i].equals(\"null\")) {\n\t\t\t\tarrayList.add(timeString[i]);\t\n\t\t\t\t//arrayListType.add(typeArrayStrings[i]);\n\n\t\t\t}\n\t\t}\n\t\t//将遍历之后的数组 arraylist的内容在选择器上显示 \n\t\talertDialog.setSingleChoiceItems(arrayList.toArray(new String[0]), 0, new DialogInterface.OnClickListener(){\n\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tdialog.dismiss();\n\t\t\t\tSystem.out.println(\"***被点击***\"+which);\n\t\t\t\tdialog.toString();\n\t\t\t\tswitch (which) {\n\t\t\t\tcase 0:\n\t\t\t\t\t\n\t\t\t\t\tarrivingTime = \"23:59-次日06:00\";\n\t\t\t\t\ttimeTextView.setText(arrivingTime);\n\t\t\t\t\tpostArrivalEarlyTime = liveTimeString + \" \" +\"23:59:00\";\n\t\t\t\t\tpostArrivalLateTime = getDateNext(liveTimeString) + \" \" + \"06:00:00\";\n\t\t\t\t\tsetTime(arrivingTime);\n\t\t\t\t\tint dayNum1 = Integer.parseInt(dayTextView.getText().toString());\n\t\t\t\t\tint roomNum1 = Integer.parseInt(roomtTextView.getText().toString());\n\t\t\t\t\tif(dayNum1 != 1){\n\t\t\t\t\t\t//dayTextView.setText(\"\"+(dayNum1+1));\n\t\t\t\t\t\t//zongpicTextView.setText(\"¥\"+((j/dayNum1)*(dayNum1-1)*roomNum1));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//dayTextView.setText(\"1\");\n\t\t\t\t\t\t//zongpicTextView.setText(\"¥\"+(j*1*roomNum1));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tarrivingTime = \"\";\n\t\t\t\t\tsetTime(arrivingTime);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}).show();\n\t}", "@Override\n public void onClick(View v) {\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(AddReminder.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n edtSelectTimeForMeet.setText( \"\" + selectedHour + \":\" + selectedMinute);\n }\n }, hour, minute, true);\n mTimePicker.setTitle(\"Select Time\");\n mTimePicker.show();\n\n }", "private void showTimePicker(final EditText editText, final boolean isStartType) {\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(mActivity, R.style.DialogTheme, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n if (isStartType) {\n Calendar datetime = Calendar.getInstance();\n Calendar c = Calendar.getInstance();\n datetime.set(Calendar.HOUR_OF_DAY, selectedHour);\n datetime.set(Calendar.MINUTE, selectedMinute);\n if (datetime.getTimeInMillis() > c.getTimeInMillis()) {\n// it's after current\n editText.setText(parseTimeToTimeDate(String.format(Locale.getDefault(), \"%02d\", selectedHour) + \":\" +\n String.format(Locale.getDefault(), \"%02d\", selectedMinute)));\n } else {\n// it's before current'\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.start_time_cant_be_less));\n\n }\n } else {\n if (!checktimings(etBeginTime.getText().toString(), parseTimeToTimeDate(String.format(Locale.getDefault(), \"%02d\", selectedHour) + \":\" +\n String.format(Locale.getDefault(), \"%02d\", selectedMinute)))) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.end_time_cant_less));\n } else if (pickUpTime != null && !pickUpTime.equals(\"\") && !appUtils.matchSameTime(appUtils.parseDateToTime(pickUpTime), selectedHour + \":\" + selectedMinute)) {\n appUtils.showAlertDialog(mActivity, \"\", getString(R.string.same_pickup_time), getString(R.string.ok), \"\", null);\n } else {\n editText.setText(parseTimeToTimeDate(String.format(Locale.getDefault(), \"%02d\", selectedHour) + \":\" +\n String.format(Locale.getDefault(), \"%02d\", selectedMinute)));\n }\n }\n }\n }, hour, minute, true);//Yes 24 hour time\n mTimePicker.setTitle(\"\");\n mTimePicker.show();\n }" ]
[ "0.7714337", "0.7255733", "0.7205583", "0.7089519", "0.70657676", "0.7027068", "0.6978379", "0.6964186", "0.6948655", "0.6940623", "0.69297695", "0.68709844", "0.6838816", "0.68233174", "0.68188787", "0.6816705", "0.6812578", "0.68112594", "0.6810403", "0.6805011", "0.68017316", "0.67996436", "0.67976385", "0.6793771", "0.67857707", "0.6782094", "0.67802924", "0.67768115", "0.67716604", "0.6771644", "0.67695206", "0.6764119", "0.67633635", "0.67592174", "0.6758919", "0.67574567", "0.67556995", "0.67527646", "0.6752355", "0.67480403", "0.6746863", "0.6744711", "0.6743004", "0.67395884", "0.6739397", "0.6734554", "0.67317104", "0.672072", "0.67186517", "0.67147326", "0.67126036", "0.6712129", "0.6706853", "0.6706793", "0.6697434", "0.669133", "0.6687633", "0.66852254", "0.66768295", "0.6673117", "0.6671501", "0.6666907", "0.6656182", "0.6651829", "0.6638764", "0.66348535", "0.66218024", "0.66185987", "0.66062045", "0.65896696", "0.6576006", "0.65655404", "0.6522288", "0.65175277", "0.64993554", "0.64957315", "0.6468126", "0.64159864", "0.6410802", "0.64093274", "0.6399498", "0.6378706", "0.63765085", "0.63676834", "0.63602066", "0.63557065", "0.635271", "0.633851", "0.6331587", "0.6322941", "0.6317008", "0.62870896", "0.62870705", "0.62870324", "0.62719345", "0.62649155", "0.6261229", "0.62403244", "0.6239433", "0.621335" ]
0.77118725
1
Sets up and displays the level complete dialog
private void levelCompleteDialog() { AlertDialog dialog = _dialogFactory.createDialog(this, R.string.level_complete_long, R.string.level_complete); dialog.setButton(DialogInterface.BUTTON_POSITIVE, getString(R.string.next_level), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { nextLevel(); } }); dialog.setButton(DialogInterface.BUTTON_NEGATIVE, getString(R.string.finish), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { gotoGameEnd(IGameConstants.GAME_OVER); } }); dialog.setCancelable(false); _dialogActive = true; dialog.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressLint(\"NewApi\")\r\n\tpublic void showLevelAdvanceMenu() {\n\t\ttry {\r\n\t\t\tThread.sleep(500);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t}\r\n\t\tLevelManager levelManager = game.getModel().getLevelManager();\r\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n \tbuilder.setTitle(getString(R.string.level_passed) + \"\\n\" + getString(R.string.next_up));\r\n \tLevel[] nextLevels = levelManager.getNextLevels();\r\n \tLevel nextLevel = nextLevels[0];\r\n \tString levelCaption = nextLevel.getCaption();\r\n \t\r\n \tfinal List<Stage> unlockedStages = levelManager.getOtherUnlockedStages(nextLevel.getStageKey());\r\n \t\r\n \tboolean twoLevelsTemp = false;\r\n \tLevel nextUnlockedLevelTemp = null;\r\n \tint levelsCount = 1;\r\n \tif (nextLevels.length > 1) {\r\n \t\tnextUnlockedLevelTemp = nextLevels[1];\r\n \t\ttwoLevelsTemp = true;\r\n \t\tlevelsCount++;\r\n \t}\r\n \tfinal Level nextUnlockedLevel = nextUnlockedLevelTemp;\r\n \tfinal boolean twoLevels = twoLevelsTemp;\r\n \t\r\n \tString[] items = new String[unlockedStages.size() + levelsCount];\r\n \tint i = 0;\r\n \titems[i++] = levelCaption;\r\n \tif (twoLevels) {\r\n \t\titems[i++] = nextUnlockedLevel.getCaption();\r\n \t}\r\n \tfor (Stage stage: unlockedStages) {\r\n \t\titems[i++] = stage.getCaption();\r\n \t}\r\n \tbuilder.setItems(items, new DialogInterface.OnClickListener() {\r\n \t public void onClick(DialogInterface dialog, int item) {\r\n \t \tif (item > 0) {\r\n \t \t\tif (twoLevels) {\r\n \t \t\t\tif (item == 1) {\r\n \t \t\t\t\tgame.getController().selectLevel(nextUnlockedLevel);\r\n \t \t\t\t} else {\r\n \t \t\t\tshowChooseLevelMenu(unlockedStages.get(item - 2));\r\n \t \t\t\t}\r\n \t \t\t} else {\r\n \t \t\t\tshowChooseLevelMenu(unlockedStages.get(item - 1));\r\n \t \t\t}\r\n \t \t}\r\n \t \tpassLevelMenuDone();\r\n \t }\r\n \t});\r\n \tbuilder.setOnCancelListener(new DialogInterface.OnCancelListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onCancel(DialogInterface dialog) {\r\n\t\t\t\tpassLevelMenuDone();\r\n\t\t\t}\r\n\t\t});\r\n \ttry {\r\n\t \tbuilder.setOnDismissListener(new DialogInterface.OnDismissListener() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onDismiss(DialogInterface dialog) {\r\n\t\t\t\t\tpassLevelMenuDone();\r\n\t\t\t\t}\r\n\t\t\t});\r\n \t} catch (Throwable t) {\r\n \t\t// this might throw if API is not compatible\r\n \t\tLog.i(\"JaroActivity\", \"showLevelAdvanceMenu.t\");\r\n \t}\r\n \tAlertDialog dialog = builder.create();\r\n \tdialog.show();\r\n\t}", "private void initializeUI() {\r\n this.parentFrame = game.getFrame();\r\n parentFrame.setEnabled(false); // Disable main game UI during the ending dialog.\r\n createResultPopup();\r\n }", "public GUI() {\n this.game = new Game();\n String[] levels = {\"assets/TxtTestLevel.txt\", \"assets/TxtTestLevel2.txt\", \"assets/TxtTestLevel4.txt\", \"assets/TxtTestLevel5.txt\"};\n this.gameLevels = Level.getListOfLevels(levels);\n this.game.loadLevel(gameLevels.get(0));\n this.bottomMenu = new BottomMenu(this);\n this.topMenu = new TopMenu(this);\n this.sidePanel = new SidePanel(this);\n this.keyListener = new KeyboardListener(this);\n this.msgWindow = new PopUpWindow();\n }", "private void displayControlDialog() {\n final String gameInfo = \"CLASSIC MODE\" + \"\\nMove Left: Left Arrow\"\n + \"\\nMove Right: Right Arrow\" + \"\\nMove Down: Down Arrow\"\n + \"\\nDrop: Space\" + \"\\nRotate Clockwise: Up Arrow\"\n + \"\\nRotate Counter-Clockwise: Z\\n\" + \"\\nANTI-GRAVITY MODE\"\n + \"\\nMove up: Up Arrow\" + \"\\nRotate Clockwise: Down Arrow\\n\"\n + \"\\nSCORING\"\n + \"\\nEarn 100 points for each line cleared. As you\\n\"\n + \"level up, each line cleared will be worth 100 points times\\n\"\n + \"the number of the level you are on. For example, one line\\n\"\n + \"cleared at level 3 is worth 300 points.\";\n JOptionPane.showMessageDialog(null, gameInfo, \"Controls and scoring\",\n JOptionPane.PLAIN_MESSAGE);\n\n }", "void makeDialog()\n\t{\n\t\tfDialog = new ViewOptionsDialog(this.getTopLevelAncestor());\n\t}", "@Override\n public void show() {\n batch = new SpriteBatch();\n stage = createStage();\n\n // create overlays\n hud = new GigagalHUD();\n victoryOverlay = new VictoryOverlay();\n gameoverOverlay = new GameOverOverlay();\n\n // determine input processor\n useOnScreenControl = (Gdx.app.getType() == Application.ApplicationType.Android // on mobile\n || Configs.instance.isDebugOnScreenControlEnabled() // or debugging\n );\n\n if (useOnScreenControl) {\n onscreenControl = new OnscreenControl();\n gameInputProcessor = new TouchProcessor(onscreenControl);\n } else {\n gameInputProcessor = new KeyPressProcessor();\n }\n\n Gdx.input.setInputProcessor(gameInputProcessor);\n\n // load new level\n startNewLevel();\n }", "@Override\n protected void complete()\n {\n // Log the result of the script execution(s)\n logScriptCompletionStatus(associations, isBad);\n\n // Enable the calling dialog's controls\n dialog.setControlsEnabled(true);\n }", "private void nextLevelQuery(){\n AlertDialog.Builder dialog = new AlertDialog.Builder(this);\n dialog.setTitle(\"Warning! Insane Whack-A-Mole Incoming!\");\n dialog.setMessage(\"Would you like to advance to advanced mode?\");\n dialog.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n nextLevel();\n Log.v(TAG, \"User accepts!\");\n }\n });\n dialog.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n Log.v(TAG, \"User decline!\");\n }\n });\n AlertDialog alertBox = dialog.create();\n alertBox.show();\n Log.v(TAG, \"Advance option given to user!\");\n }", "public void completeLevel() {\n\n this.getCurrentRoom().setIsDoorLocked(false);\n levelsCompleted++;\n this.setCurrentRoom(currentRoom.getNextRoom());\n inventory.clearContainer();\n }", "public abstract void levelComplete();", "public void showLifeCycleDialog() {\n\t\t\tlifeCycleDialogBox = new DialogBox(true);\n\t\t\tlifeCycleDialogBox.setGlassEnabled(true);\n\t\t\tlifeCycleDialogBox.setText(\"Seguimiento del Documento\");\n\n\t\t\t// Vertical Panel\n\t\t\tVerticalPanel vp = new VerticalPanel();\n\t\t\tvp.setSize(\"100%\", \"100%\");\n\t\t\tvp.add(lifeCycleCellTree);\n\t\t\tvp.add(new HTML(\"&nbsp;\"));\n\t\t\tvp.add(lifeCycleCloseButton);\n\n\t\t\t// Scroll Panel\n\t\t\tScrollPanel scrollPanel = new ScrollPanel();\n\t\t\tif (getUiParams().isMobile())\n\t\t\t\tscrollPanel.setSize(Window.getClientWidth() + \"px\", Window.getClientHeight() + \"px\");\n\t\t\telse\n\t\t\t\tscrollPanel.setSize(Window.getClientWidth() * .4 + \"px\", Window.getClientHeight() * .3 + \"px\");\n\t\t\tscrollPanel.setWidget(vp);\n\t\t\tlifeCycleDialogBox.setWidget(scrollPanel);\n\n\t\t\tDouble d = Window.getClientWidth() * .3;\n\t\t\tif (!getUiParams().isMobile()) \n\t\t\t\tlifeCycleDialogBox.setPopupPosition(d.intValue(), UiTemplate.NORTHSIZE * 3);\n\n\t\t\tlifeCycleDialogBox.show();\n\t\t}", "private static void createAndShowGUI() {\n\t\tJFrame.setDefaultLookAndFeelDecorated(true);\n\n\t\tLevelEditor le = new LevelEditor();\n\t}", "private void initialize() {\r\n //this.setVisible(true);\r\n \r\n\t // added pre-set popup menu here\r\n// this.add(getPopupFindMenu());\r\n this.add(getPopupDeleteMenu());\r\n this.add(getPopupPurgeMenu());\r\n\t}", "public NewCityDialog(MainWindow owner, boolean showCancelOption) {\r\n\t\tsetText(owner.guiStrings.get(\"welcome.caption\"));\r\n\t\tthis.owner = owner;\r\n\t\t\r\n\t\tVerticalPanel vp1 = new VerticalPanel();\r\n\t\tHorizontalPanel hp1 = new HorizontalPanel();\r\n\t\tvp1.add(hp1);\r\n\t\t\r\n\t\tCanvas canvas = Canvas.createIfSupported();\r\n\t\tif (canvas == null){\r\n\t\t\tWindow.alert(\"canvs not suported\");\r\n\t\t}\r\n\t\tcanvas.setWidth(\"360px\");\r\n\t\tcanvas.setCoordinateSpaceWidth(360);\r\n\r\n\t\tcanvas.setHeight(\"300px\");\r\n\t\tcanvas.setCoordinateSpaceHeight(300);\r\n\t\t\r\n\t\thp1.add(canvas);\r\n\t\t\r\n\t\tVerticalPanel levelBox = new VerticalPanel();\r\n\t\thp1.add(levelBox);\r\n\t\t\r\n\t\tHorizontalPanel buttonPane = new HorizontalPanel();\r\n\t\tvp1.add(buttonPane);\r\n\r\n\t\tengine = new Micropolis();\r\n\t\tnew MapGenerator(engine).generateNewCity();\r\n\t\t\r\n\t\tmapPane = new OverlayMapView(engine,canvas);\r\n\t\t\r\n\t\t//drawArea.add(mapPane, BorderLayout.CENTER);*/\r\n\t\t\r\n\t\tRadioButton radioBtn;\r\n\t\tfor (int lev = GameLevel.MIN_LEVEL; lev <= GameLevel.MAX_LEVEL; lev++) {\r\n\t\t\tfinal int x = lev;\r\n\t\t\tradioBtn = new RadioButton(\"level\",owner.guiStrings.get(\"menu.difficulty.\" + lev));\r\n\t\t\tradioBtn.addClickHandler(new ClickHandler() {\r\n\t\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\tsetGameLevel(x);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tlevelBox.add(radioBtn);\r\n\t\t\tlevelBtns.put(lev, radioBtn);\r\n\t\t}\r\n\t\tsetGameLevel(GameLevel.MIN_LEVEL);\r\n\r\n\t\tButton btn;\r\n\t\tbtn = new Button(owner.guiStrings.get(\"welcome.previous_map\"),new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tonPreviousMapClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbuttonPane.add(btn);\r\n\t\tbtn.setEnabled(false);\r\n\t\tpreviousMapBtn = btn;\r\n\r\n\t\tbtn = new Button(owner.guiStrings.get(\"welcome.next_map\"),new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tonNextMapClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbuttonPane.add(btn);\r\n\r\n\t\tbtn = new Button(owner.guiStrings.get(\"welcome.load_city\"),new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tmicropolis.client.Micropolis.mainWindow.loadGame();\r\n\t\t\t\thide();\r\n\t\t\t}\r\n\t\t});\r\n\t\tif (!micropolis.client.Micropolis.userInfo.logined){\r\n\t\t\tbtn.setEnabled(false);\r\n\t\t}\r\n\t\tbuttonPane.add(btn);\r\n\r\n\t\tbtn = new Button(owner.guiStrings.get(\"welcome.play_this_map\"),new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tonPlayClicked();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbuttonPane.add(btn);\r\n\t\tbtn.setFocus(true);\r\n\t\tif (showCancelOption) {\r\n\t\t\tbtn = new Button(owner.guiStrings.get(\"welcome.cancel\"),new ClickHandler() {\r\n\t\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\t\tonCancelClicked();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tbuttonPane.add(btn);\r\n\t\t}else{\r\n\t\t\tbtn = new Button(owner.guiStrings.get(\"welcome.quit\"),new ClickHandler() {\r\n\t\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\t\tonQuitClicked();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tbuttonPane.add(btn);\r\n\t\t}\r\n\t\tadd(vp1);\r\n\t}", "private void initDialog() {\n }", "public void loadRoomViewerUI()\r\n\t{\r\n\t\t// start the loader thread so the graphics can be drawn as the loading takes place\r\n\t\tnew RoomViewerLoadingThread(roomViewerUI).start();\r\n\t}", "public void display() {\r\n subAwardDlgWindow.setVisible(true);\r\n }", "public void initialize() {\r\n\t\t\r\n\t\tJLabel lblLevel = new JLabel(\"Level\");\r\n\t\tlblLevel.setBounds(120, 124, 100, 45);\r\n\t\tlblLevel.setForeground(new Color(184, 134, 11));\r\n\t\tlblLevel.setFont(new Font(\"Britannic Bold\", Font.PLAIN, 35));\r\n\t\tadd(lblLevel);\r\n\t\t\r\n\t\tlevelList = new JComboBox<String>();\r\n\t\tlevelList.setUI(new MyComboBoxUI());\r\n\t\t((JLabel)levelList.getRenderer()).setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlevelList.setBounds(280, 124, 400, 45);\r\n\t\tlevelList.setBorder(BorderFactory.createLineBorder(Color.BLUE));\r\n\t\tlevelList.setForeground(new Color(184, 134, 11));\r\n\t\tlevelList.setFont(new Font(\"Britannic Bold\", Font.PLAIN, 35));\r\n\t\tlevelList.setBackground(Color.WHITE);\r\n\t\tadd(levelList);\r\n\t\t\r\n\t\t// Load all unlocked levels to the combobox\r\n\t\tint highest = lvlm.getHighestLevel().getLevelNum();\r\n\t\tfor (int i = 0; i < lvlList.size(); i++) {\r\n\t\t\tLevel l = lvlList.get(i);\r\n\t\t\tif (l.getLevelNum() <= highest) {\r\n\t\t\t\tString name = lvlList.get(i).toString();\r\n\t\t\t\tlevelList.addItem(name);\r\n\t\t\t}\r\n\t\t}\t\t\r\n//\t\tlevelList.setRenderer(new DisabledItemsRenderer<String>());\r\n\r\n\t\tImageIcon buttonBack = new ImageIcon(PlayGameScreenView.class.getResource(\"/sw/resource/image/button_back.png\"));\r\n\t\tImageIcon newBtnBack = new ImageIcon(buttonBack.getImage().getScaledInstance(227, 69, java.awt.Image.SCALE_SMOOTH));\r\n\t\tImageIcon btnBackRollover = new ImageIcon(PlayGameScreenView.class.getResource(\"/sw/resource/image/button_back_Rollover.png\"));\r\n\t\tImageIcon newBtnBackRollover = new ImageIcon(btnBackRollover.getImage().getScaledInstance(227, 69, java.awt.Image.SCALE_SMOOTH));\r\n\t\tImageIcon btnBackPressed = new ImageIcon(PlayGameScreenView.class.getResource(\"/sw/resource/image/button_back_Pressed.png\"));\r\n\t\tImageIcon newBtnBackPressed = new ImageIcon(btnBackPressed.getImage().getScaledInstance(227, 69, java.awt.Image.SCALE_SMOOTH));\r\n\t\tJButton btnBack = new JButton(newBtnBack);\r\n\t\tbtnBack.setBounds(20, 500, 227, 69);\r\n\t\tbtnBack.setBorderPainted(false);\r\n\t\tbtnBack.setBackground(Color.WHITE);\r\n\t\tbtnBack.setBorder(null);\r\n\t\tbtnBack.setContentAreaFilled(false);\r\n\t\tbtnBack.addActionListener(new MainMenuController());\r\n\t\tbtnBack.setRolloverEnabled(true);\r\n\t\tbtnBack.setRolloverIcon(newBtnBackRollover);\r\n\t\tbtnBack.setPressedIcon(newBtnBackPressed);\r\n\t\tadd(btnBack);\r\n\t\t\r\n\t\tImageIcon buttonStart = new ImageIcon(PlayGameScreenView.class.getResource(\"/sw/resource/image/button_startGame.png\"));\r\n\t\tImageIcon newBtnStart = new ImageIcon(buttonStart.getImage().getScaledInstance(227, 69, java.awt.Image.SCALE_SMOOTH));\r\n\t\tImageIcon btnStartRollover = new ImageIcon(PlayGameScreenView.class.getResource(\"/sw/resource/image/button_startGame_Rollover.png\"));\r\n\t\tImageIcon newBtnStartRollover = new ImageIcon(btnStartRollover.getImage().getScaledInstance(227, 69, java.awt.Image.SCALE_SMOOTH));\r\n\t\tImageIcon btnStartPressed = new ImageIcon(PlayGameScreenView.class.getResource(\"/sw/resource/image/button_startGame_Pressed.png\"));\r\n\t\tImageIcon newBtnStartPressed = new ImageIcon(btnStartPressed.getImage().getScaledInstance(227, 69, java.awt.Image.SCALE_SMOOTH));\r\n\t\tJButton btnStartGame = new JButton(newBtnStart);\r\n\t\tbtnStartGame.setBounds(550, 500, 227, 69);\r\n\t\tbtnStartGame.setBorderPainted(false);\r\n\t\tbtnStartGame.setBackground(Color.WHITE);\r\n\t\tbtnStartGame.setBorder(null);\r\n\t\tbtnStartGame.setContentAreaFilled(false);\r\n\t\tbtnStartGame.addActionListener(new StartGameController());\r\n\t\tbtnStartGame.setRolloverEnabled(true);\r\n\t\tbtnStartGame.setRolloverIcon(newBtnStartRollover);\r\n\t\tbtnStartGame.setPressedIcon(newBtnStartPressed);\r\n\t\tadd(btnStartGame);\r\n\r\n\t\tImageIcon backgroundImg = new ImageIcon(PlayGameScreenView.class.getResource(\"/sw/resource/image/secondBackground.png\"));\r\n\t\tImageIcon newBackground = new ImageIcon(backgroundImg.getImage().getScaledInstance(800, 573, java.awt.Image.SCALE_SMOOTH));\r\n\t\tJLabel background = new JLabel(newBackground);\r\n\t\tbackground.setVerticalAlignment(SwingConstants.TOP);\r\n\t\tbackground.setBackground(Color.WHITE);\r\n\t\tbackground.setBounds(0, 0, 800, 600);\r\n\t\tadd(background);\r\n\t\tsetLayout(null);\r\n\t}", "public void handle(long time){\n main_pane = root;\n baseLevel.draw(gc);\n dynamicLevel.draw(gc);\n if(colDetector.checkCompletion(dynamicLevel, goalTiles)){\n stop();\n gc.clearRect(0,0,448,706);\n Menu m = new Menu(gc,root, gameScene);\n m.drawMenu();\n }\n }", "private void popupMenuAbout() {\n\t\t//\n\t\t// Display the dialog\n\t\t//\n\t\tAboutDialog aboutDialog = new AboutDialog(parent.getShell(), SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM);\n\t\taboutDialog.open();\n\t}", "public void setLevelInfo(){\n setTitle(\"\");\n Objects.requireNonNull(getSupportActionBar()).setElevation(0);\n// SET LEVEL TITLE\n String levelTitleString = (getString(R.string.level) + \" \" + String.valueOf(level));\n levelTitle.setText(levelTitleString);\n// todo: underline guessesleft\n guessesLeft = guessesLeft + 10;\n String guessesLeftString = (\"You have \" + String.valueOf(guessesLeft) + \" guesses.\");\n guessesLeftView.setText(guessesLeftString);\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "private void displayLessonSelectionDialog() {\n\t\tpauseMedia();\n\t\tint requestCode = onLargeScreen ? LessonSelectionDialog.SELECT_TO_CLASS\n\t\t\t\t: LessonSelectionDialog.SELECT_TO_LESSON;\n\t\tlessonSelectionDialog = LessonSelectionDialog.newInstance(\n\t\t\t\tLessonSelectionDialog.CLASS_LESSON_SELECT, requestCode);\n\t\tlessonSelectionDialog.setOnDialogResultListener(this, requestCode);\n\t\tlessonSelectionDialog.show(this.getSupportFragmentManager(),\n\t\t\t\t\"lessonSelectionDialog\");\n\t}", "public void options() {\n\n audio.playSound(LDSound.SMALL_CLICK);\n if (canViewOptions()) {\n Logger.info(\"HUD Presenter: options\");\n uiStateManager.setState(GameUIState.OPTIONS);\n }\n }", "void showUI(Player player) {\n\t\tString title = (this.range!=-1 ? \"BCL:\"+this.getOwnerName()+\"@\"+this.getLoc() : \"New \"+(this.isAdminChunkLoader()?\"Admin \":\"\")+\"BetterChunkLoader\");\n\t\tif (title.length()>32) {\n\t\t\ttitle=title.substring(0, 32);\n\t\t}\n\t\tInventory inventory = Bukkit.createInventory(this, 9, title);\n\n\t\taddInventoryOption(inventory, 0, Material.REDSTONE_TORCH_ON, \"Remove\");\n\t\t\n\t\tfor (byte i=0; i<5; i++) {\n\t\t\taddInventoryOption(inventory, i+2, Material.MAP, \"Size \"+this.sizeX(i)+(this.getRange()==i?\" [selected]\":\"\"));\n\t\t}\n\t\t\n\t\tplayer.openInventory(inventory);\n\t}", "@Override\n\tpublic void show() {\n\t\tGameView.VIEW.addDialog(this);\n\t\tsuper.show();\n\t}", "public LevelPicker(LEVEL level) {\n\t\tcircleImage = new ImageView(circleNotChoosen);\n\t\tfrogLevelImage= new ImageView(level.getUrl());\n\t\tthis.level= level;\n\t\tisCircleChoosen= false; //at the start the button is not choosen \n\t\t\n\t\tthis.setAlignment(Pos.CENTER);\n\t\tthis.setSpacing(20);\n\t\t\n\t\tthis.getChildren().add(frogLevelImage); //adding images to the vbox\n\t\tthis.getChildren().add(circleImage);\n\t\t\n\t\tthis.getChildren().add(setNormalInfoLabel(level.toString(), false));\n\t}", "private void displayLoader() {\n pDialog = new ProgressDialog(DangKyActivity.this);\n pDialog.setMessage(\"Vui lòng đợi trong giây lát...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "private void showHealthLevel()\n {\n showText(\"Health Level: \" + healthLevel, 120, 25);\n }", "public void display() {\n dialog.setVisible(true);\n }", "private void loadHUD() {\r\n\r\n\t\tstaticEntities.add(new ButtonEntity(game, \"Pause\", \"hud\",\r\n\t\t\t\"reset-button-idle.png;reset-button-clicked.png\", null, game\r\n\t\t\t\t.getParent().getWidth() - 100,\r\n\t\t\tgame.getParent().getHeight() - 70, 100, 50));\r\n\t\tstaticEntities.add(new ButtonEntity(game, \"Inventory\", \"hud\",\r\n\t\t\t\"inventory-button-idle.png;inventory-button-clicked.png\", null,\r\n\t\t\tgame.getParent().getWidth() - 200,\r\n\t\t\tgame.getParent().getHeight() - 70, 100, 50));\r\n\t}", "private void displayLoader() {\n pDialog = new ProgressDialog(AddReviewActivity.this);\n pDialog.setMessage(\"Adding Review...Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "private void dialogAbout() {\n\t\tGraphicalUserInterfaceAbout.start();\r\n\t}", "private void displayLoader() {\n pDialog = new ProgressDialog(RegisterActivity.this);\n pDialog.setMessage(\"Signing Up.. Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "public FullDetails() {\n initComponents();\n }", "@Override\n\tprotected Dialog onCreateDialog(int id) {\n\t\tDialog dialog = null;\n\t\tAlertDialog.Builder builder = null;\n\t\tswitch (id) {\n\t\tcase WordZapConstants.HUMAN_WIN_DIALOG:\n\t\t\tbuilder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setMessage(\"You won ! Get ready for the next level.\")\n\t\t\t\t\t.setCancelable(false)\n\t\t\t\t\t.setPositiveButton(\n\t\t\t\t\t\t\t\"Okay\",\n\t\t\t\t\t\t\tnew GameScreenDialogListener(this,\n\t\t\t\t\t\t\t\t\tWordZapConstants.HUMAN_WIN_DIALOG));\n\t\t\tdialog = builder.create();\n\t\t\tbreak;\n\t\tcase WordZapConstants.HUMAN_LOSE_DIALOG:\n\t\t\tbuilder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setMessage(\n\t\t\t\t\t\"You lost ! Get ready to play the same level again.\")\n\t\t\t\t\t.setCancelable(false)\n\t\t\t\t\t.setPositiveButton(\n\t\t\t\t\t\t\t\"Okay\",\n\t\t\t\t\t\t\tnew GameScreenDialogListener(this,\n\t\t\t\t\t\t\t\t\tWordZapConstants.HUMAN_LOSE_DIALOG));\n\t\t\tdialog = builder.create();\n\t\t\tbreak;\n\t\tcase WordZapConstants.DRAW_DIALOG:\n\t\t\tbuilder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setMessage(\n\t\t\t\t\t\"Game Drawn. Get ready to play the same level again.\")\n\t\t\t\t\t.setCancelable(false)\n\t\t\t\t\t.setPositiveButton(\n\t\t\t\t\t\t\t\"Okay\",\n\t\t\t\t\t\t\tnew GameScreenDialogListener(this,\n\t\t\t\t\t\t\t\t\tWordZapConstants.DRAW_DIALOG));\n\t\t\tdialog = builder.create();\n\t\t\tbreak;\n\n\t\tcase WordZapConstants.SHOW_LEVEL_DIALOG:\n\t\t\tbuilder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setMessage(\n\t\t\t\t\t\"Level \" + this.currentLevel.getLevelNumber() + \" \")\n\t\t\t\t\t.setCancelable(false)\n\t\t\t\t\t.setPositiveButton(\n\t\t\t\t\t\t\t\"Start\",\n\t\t\t\t\t\t\tnew GameScreenDialogListener(this,\n\t\t\t\t\t\t\t\t\tWordZapConstants.SHOW_LEVEL_DIALOG));\n\t\t\tdialog = builder.create();\n\t\t\tbreak;\n\t\t}\n\t\treturn dialog;\n\t}", "private void constructLevel(int level){\n gamePanel.removeAll();\n GridLayout layout = new GridLayout(grid.length,grid[0].length);\n gamePanel.setLayout(layout);\n gamePanel.setBackground(Color.BLACK);\n gamePanel.setFocusable(true);\n gamePanel.requestFocusInWindow();\n gamePanel.updateUI();\n }", "private void initDialog() {\n Window subWindow = new Window(\"Sub-window\");\n \n FormLayout nameLayout = new FormLayout();\n TextField code = new TextField(\"Code\");\n code.setPlaceholder(\"Code\");\n \n TextField description = new TextField(\"Description\");\n description.setPlaceholder(\"Description\");\n \n Button confirm = new Button(\"Save\");\n confirm.addClickListener(listener -> insertRole(code.getValue(), description.getValue()));\n\n nameLayout.addComponent(code);\n nameLayout.addComponent(description);\n nameLayout.addComponent(confirm);\n \n subWindow.setContent(nameLayout);\n \n // Center it in the browser window\n subWindow.center();\n\n // Open it in the UI\n UI.getCurrent().addWindow(subWindow);\n\t}", "public void display() {\n String box = \"\\n+--------------------------------------------+\\n\";\n String header = \"| \" + name;\n String lvlStat = \"Lv\" + level;\n for (int i=0; i<42-name.length()-lvlStat.length(); i++) {\n header += \" \";\n }\n header += lvlStat + \" |\\n\";\n System.out.println(box + header + \"| \" + getHealthBar() + \" |\" + box);\n }", "public void showVerifyTravelExpenseDialog() {\n\n\t\t\tverifyTravelExpenseDialogBox = new DialogBox(true);\n\t\t\tverifyTravelExpenseDialogBox.setGlassEnabled(true);\n\t\t\tverifyTravelExpenseDialogBox.setText(\"Comprobación de Viáticos.\");\n\n\t\t\tVerticalPanel vp = new VerticalPanel();\n\t\t\tvp.setSize(\"400px\", \"100px\");\n\t\t\tverifyTravelExpenseDialogBox.setWidget(vp);\n\n\t\t\tUiRequisitionCheekingCostsForm uiRequisitionCheekingCostsForm = new UiRequisitionCheekingCostsForm(getUiParams(), vp, bmoRequisition);\n\t\t\tuiRequisitionCheekingCostsForm.show();\n\n\t\t\tverifyTravelExpenseDialogBox.center();\n\t\t\tverifyTravelExpenseDialogBox.show();\n\t\t}", "public static void openChallengeMenu() {\r\n\t\tif(!STATUS.equals(Gamestatus.STOPPED)) return;\r\n\t\tgui.setMenu(new ChallengeMenu(), true);\r\n\t}", "private void init() {\n dominator = \"\";\n firstBlood = false;\n jLabel1.setIcon(new ImageIcon(getClass().getResource(\"/multiagent/resources/title.jpg\")));\n dialog = new ConfigurationDlg(this, true);\n setTitle(\"Game server\");\n agentList = new ArrayList<>();\n playerCount = 0;\n running = true;\n aborted = true;\n playersAgentsMap = new HashMap<>();\n iPlayerList = new HashMap<>();\n agentsOnSpawn = new String[][]{{\"random\", \"random\", \"random\"}, {\"random\", \"random\", \"random\"}, {\"random\", \"random\", \"random\"}};\n String selected = String.valueOf(dialog.getFieldDimension().getSelectedItem());\n String selected2 = String.valueOf(dialog.getTightnessField().getSelectedItem());\n playingField = new PlayingField(Integer.parseInt(dialog.getResourceField().getText()),\n Integer.parseInt(selected.substring(selected.indexOf(\"x\") + 1)),\n Integer.parseInt(selected2.substring(0, selected2.indexOf(\"%\"))),\n agentList,\n playerCount,\n Integer.parseInt(String.valueOf(dialog.getCountAgents().getSelectedItem())));\n setLocationRelativeTo(null);\n pack();\n }", "private void dialog() {\n\t\tGenericDialog gd = new GenericDialog(\"Bildart\");\n\t\t\n\t\tgd.addChoice(\"Bildtyp\", choices, choices[0]);\n\t\t\n\t\t\n\t\tgd.showDialog();\t// generiere Eingabefenster\n\t\t\n\t\tchoice = gd.getNextChoice(); // Auswahl uebernehmen\n\t\t\n\t\tif (gd.wasCanceled())\n\t\t\tSystem.exit(0);\n\t}", "private void displayPopUp(Parent root) {\n Scene scene = new Scene(root, 300, 200);\n Stage stage = new Stage();\n stage.initModality(Modality.APPLICATION_MODAL);\n stage.setScene(scene);\n stage.showAndWait();\n }", "public void viewOptions()\r\n {\r\n SetupScreen setupScreen = new SetupScreen();\r\n pushScreen(setupScreen);\r\n }", "public void buildAndShowMenuForm() {\n SimpleForm.Builder builder =\n SimpleForm.builder()\n .translator(MinecraftLocale::getLocaleString, session.locale())\n .title(\"gui.advancements\");\n\n List<String> rootAdvancementIds = new ArrayList<>();\n for (Map.Entry<String, GeyserAdvancement> advancement : storedAdvancements.entrySet()) {\n if (advancement.getValue().getParentId() == null) { // No parent means this is a root advancement\n builder.button(MessageTranslator.convertMessage(advancement.getValue().getDisplayData().getTitle(), session.locale()));\n rootAdvancementIds.add(advancement.getKey());\n }\n }\n\n if (rootAdvancementIds.isEmpty()) {\n builder.content(\"advancements.empty\");\n }\n\n builder.validResultHandler((response) -> {\n String id = rootAdvancementIds.get(response.clickedButtonId());\n if (!id.equals(\"\")) {\n if (id.equals(currentAdvancementCategoryId)) {\n // The server thinks we are already on this tab\n buildAndShowListForm();\n } else {\n // Send a packet indicating that we intend to open this particular advancement window\n ServerboundSeenAdvancementsPacket packet = new ServerboundSeenAdvancementsPacket(id);\n session.sendDownstreamPacket(packet);\n // Wait for a response there\n }\n }\n });\n\n session.sendForm(builder);\n }", "public NeedleholeDlg()\n \t{\n \t\tsuper( \"Needlehole Cherry Blossom\" );\n \t\tinit2();\n \t}", "public void display() {\r\n try {\r\n if( mdiForm.getFrame(CoeusGuiConstants.SPONSORHIERARCHY_BASE_WINDOW) == null ){\r\n mdiForm.putFrame(CoeusGuiConstants.SPONSORHIERARCHY_BASE_WINDOW, maintainSponsorHierarchyBaseWindow);\r\n mdiForm.getDeskTopPane().add(maintainSponsorHierarchyBaseWindow);\r\n maintainSponsorHierarchyBaseWindow.setSelected(true);\r\n maintainSponsorHierarchyBaseWindow.setVisible(true);\r\n }\r\n }catch (java.beans.PropertyVetoException propertyVetoException) {\r\n propertyVetoException.printStackTrace();\r\n }\r\n }", "public void createLevel(){\n for(LevelController rc: rooms ) {\n rc.loadContent();\n rc.setScreenListener(listener);\n rc.setCanvas(canvas);\n }\n }", "@Override\n\t\t\tpublic void onStart()\n\t\t\t{\n\t\t\t\tsuper.onStart();\n\t\t\t\tdialog = MessageDialog.createLoadingDialog(HelpActivity.this, \"Loadding\");\n\t\t\t\tdialog.show();\n\t\t\t}", "private void showAchievementsForm(Game game) {\n try {\n\n if (!game.isPopulated()) {\n List<Game> helperList = new ArrayList<>();\n helperList.add(game);\n AchievementsLoader task = new AchievementsLoader(txtKey.getText(), txtSteamId.getText(), txtLanguage.getText(), helperList);\n task.run();\n }\n\n if (game.getHasStats()) {\n\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/fxml/achievements.fxml\"));\n Scene scene = new Scene(fxmlLoader.load());\n scene.getStylesheets().add(\"dark.css\");\n\n AchievementsController achievementsController = fxmlLoader.<AchievementsController>getController();\n\n achievementsController.setAchievements(game);\n Stage stage = new Stage();\n stage.setTitle(game.getName());\n stage.setScene(scene);\n stage.show();\n } else {\n Alert alert = new Alert(AlertType.INFORMATION);\n alert.setTitle(SteamahApp.APP_TITLE);\n alert.setContentText(\"This game does not support achievements!\");\n alert.showAndWait();\n }\n\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public InfoDialog() {\r\n\t\tcreateContents();\r\n\t}", "@Override\n\tpublic void start() {\n\t\tsendOptionsDialogue(\"Achievement cape stand\", \"List requirements\",\n\t\t\t\t\"Max cape\", \"Completionist cape\", \"Trimmed completionist\");\n\t}", "public void show(GraphicsContext gc,AnchorPane root){\n new AnimationTimer(){ //basic game loop to handle for updates in the event\n public void handle(long time){\n main_pane = root;\n baseLevel.draw(gc);\n dynamicLevel.draw(gc);\n if(colDetector.checkCompletion(dynamicLevel, goalTiles)){\n stop();\n gc.clearRect(0,0,448,706);\n Menu m = new Menu(gc,root, gameScene);\n m.drawMenu();\n }\n }\n }.start();\n }", "private void initLevel() {\n addKeyListener(new TAdapter());\r\n addMouseListener(new MAdapter());\r\n\r\n setFocusable(true);\r\n setPreferredSize(new Dimension(Common.WIDTH, Common.HEIGHT));\r\n\r\n gameInit();\r\n }", "private void initialize() {\n\t\tChoiceScreen = new JFrame();\n\t\tChoiceScreen.setFont(new Font(\"Silom\", Font.PLAIN, 12));\n\t\tChoiceScreen.setType(Type.POPUP);\n\t\tChoiceScreen.setTitle(\"Bank of Programmers - Services\");\n\t\tChoiceScreen.getContentPane().setBackground(new Color(30, 144, 255));\n\t\tChoiceScreen.getContentPane().setLayout(null);\n\t\t\n\t\t\n\t\tJLabel lblBankNameLabel = new JLabel(\"BANK OF PROGRAMMERS\");\n\t\tlblBankNameLabel.setBounds(0, 0, 517, 52);\n\t\tlblBankNameLabel.setForeground(new Color(255, 255, 255));\n\t\tlblBankNameLabel.setFont(new Font(\"Silom\", Font.PLAIN, 40));\n\t\tlblBankNameLabel.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tChoiceScreen.getContentPane().add(lblBankNameLabel);\n\t\t\n\t\tJButton btnAtm = new JButton(\"ATM\");\n\t\tbtnAtm.setForeground(new Color(30, 144, 255));\n\t\tbtnAtm.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tChoiceScreen.dispose();\n\t\t\t\tATM atm = new ATM();\n\t\t\t\tatm.ATMLogIn.setVisible(true);\n\t\t\t}\n\t\t});\n\t\tbtnAtm.setFont(new Font(\"Silom\", Font.PLAIN, 22));\n\t\tbtnAtm.setBounds(89, 129, 337, 92);\n\t\tChoiceScreen.getContentPane().add(btnAtm);\n\t\t\n\t\tJButton btnBank = new JButton(\"BANK (Create an Account!)\");\n\t\tbtnBank.setForeground(new Color(30, 144, 255));\n\t\tbtnBank.setFont(new Font(\"Silom\", Font.PLAIN, 22));\n\t\tbtnBank.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tChoiceScreen.dispose();\n\t\t\t\tAccountTypes acty = new AccountTypes();\n\t\t\t\tacty.AccountType.setVisible(true);\n\t\t\t}\n\t\t});\n\t\tbtnBank.setBounds(89, 270, 337, 92);\n\t\tChoiceScreen.getContentPane().add(btnBank);\n\t\tChoiceScreen.getContentPane().setFocusTraversalPolicy(new FocusTraversalOnArray(new Component[]{lblBankNameLabel, btnAtm, btnBank}));\n\t\tChoiceScreen.setBounds(100, 100, 517, 475);\n\t\tChoiceScreen.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tDimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tChoiceScreen.setLocation(dim.width/2-ChoiceScreen.getSize().width/2, dim.height/2-ChoiceScreen.getSize().height/2);\n\t\t\n\t}", "public void populateUI() {\n // setup toggle button on click listener\n toggleButton.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n toggleExtension();\n }\n });\n\n // setup open details click listener\n this.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n budgetListener.showAccountDetails(refAcc);\n }\n });\n updateUI();\n }", "public void show_dialog_box (){\n //show the message of turning on the location\n Dialog dialog = new Dialog(this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.location_message_r);\n dialog.show();\n }", "public ChampionSelectGUI() {\n\t\tsetupPanel();\n\t\tsetupScroll();\n\t\tsetupCenterPanel();\n\t\tsetupBottomPanel();\n\t\tsetupSidePanels();\n\t\taddWindowListener(this);\n\t}", "private void Level1() {\n\t\tEngine eng = new Engine();\n\t\teng.Maingame();\n\t\tthis.setVisible(false);\n\t}", "public void open(){\n dialog.setLocation\n (parent.getLocation().x + 10, parent.getLocation().y + 10);\n dialog.setSize(PREF_SIZE);\n dialog.setResizable(false);\n dialog.setVisible(true);\n dialog.setResizable(true);\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tnew BriefDialog(mContext, game.key).show();\n\t\t\t}", "private void usernameTakenDialog() {\n Dialog dialog = new Dialog(\"Username taken\", cloudSkin, \"dialog\") {\n public void result(Object obj) {\n System.out.println(\"result \" + obj);\n }\n };\n dialog.text(\"This username has already been taken, try a new one.\");\n dialog.button(\"OK\", true);\n dialog.show(stage);\n }", "private void populateLevel() {\r\n\r\n\r\n\t\t// Setup Goal\r\n\t\tJsonValue goalVal = levelAssets.get(\"goal\");\r\n\t\tfloat gWidth = goalTile.getRegionWidth()/scale.x;\r\n\t\tfloat gHeight = goalTile.getRegionHeight()/scale.y;\r\n\t\tfloat gX = goalVal.get(\"pos\").getFloat(0) + gWidth / 2;\r\n\t\tfloat gY = goalVal.get(\"pos\").getFloat(1) + gHeight / 2;\r\n\t\tgoalDoor = new DoorModel(gX, gY, gWidth, gHeight);\r\n\t\tgoalDoor.setBodyType(BodyDef.BodyType.StaticBody);\r\n\t\tgoalDoor.setDensity(constants.get(\"goal\").getFloat(\"density\", 0));\r\n\t\tgoalDoor.setFriction(constants.get(\"goal\").getFloat(\"friction\", 0));\r\n\t\tgoalDoor.setRestitution(constants.get(\"goal\").getFloat(\"restitution\", 0));\r\n\t\tgoalDoor.setSensor(true);\r\n\t\tgoalDoor.setDrawScale(scale);\r\n\t\tgoalDoor.setTexture(goalTile);\r\n\t\tgoalDoor.setName(\"goal\");\r\n\t\taddObject(goalDoor);\r\n\t\taddObjectTo(goalDoor, LevelCreator.allTag);\r\n\r\n\t\t// Get default values\r\n\t\tJsonValue defaults = constants.get(\"defaults\");\r\n\t\tJsonValue objs = levelAssets.get(\"objects\");\r\n\r\n\t\t//group platform constants together for access in following for-loop\r\n\t\tTextureRegion[] xTexture = {lightTexture, darkTexture, allTexture,\r\n\t\t\tlightningLightTexture, lightningDarkTexture, lightningAllTexture,\r\n\t\t\trainLightTexture, rainDarkTexture, rainAllTexture,\r\n\t\t\t\tcrumbleLightTexture, crumbleDarkTexture, crumbleAllTexture};\r\n\r\n\t\tTextureRegion[] reducedXTexture = {lightTexture, darkTexture, allTexture,\r\n\t\t\t\tlightningLightTextureReduced, lightningDarkTextureReduced, lightningAllTextureReduced,\r\n\t\t\t\trainLightTextureReduced, rainDarkTextureReduced, rainAllTextureReduced,\r\n\t\t\t\tcrumbleLightTextureReduced, crumbleDarkTextureReduced, crumbleAllTextureReduced};\r\n\r\n\r\n\t\t// Setup platforms\r\n\t\tfor(int i=0; i < (objs != null ? objs.size : 0); i++)\r\n\t\t{\r\n\t\t\tJsonValue obj = objs.get(i);\r\n\r\n\t\t\t// Get platform attributes\r\n\t\t\tint platformType = obj.get(\"type\").asInt();\r\n\t\t\tint property = obj.get(\"property\") == null ? 0: obj.get(\"property\").asInt();\r\n\t\t\tJsonValue platformArgs = obj.get(\"positions\");\r\n\t\t\tJsonValue pathsArgs = obj.get(\"paths\");\r\n\r\n\t\t\tfor (int j = 0; j < platformArgs.size; j++) {\r\n\t\t\t\tfloat[] bounds = platformArgs.get(j).asFloatArray();\r\n\t\t\t\tfloat x = bounds[0], y = bounds[1], width = bounds[2], height = bounds[3];\r\n\t\t\t\tTextureRegion newXTexture;\r\n\t\t\t\tTextureRegion crumbleTexture = null;\r\n\t\t\t\tTexture originalTexture = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// temporary - need to refactor asset directory\r\n\t\t\t\t\tJsonValue assetName = obj.get(\"assetName\");\r\n\t\t\t\t\tint assetIndex = assetName.asInt();\r\n\t\t\t\t\tnewXTexture = new TextureRegion(tutorial_signs[assetIndex]);\r\n\t\t\t\t} catch(Exception e) {\r\n\t\t\t\t\tint platIdx = platformType-1+(property - 1)*3;\r\n\t\t\t\t\tint crumbleIdx = platIdx + 3;\r\n\t\t\t\t\tnewXTexture = new TextureRegion(xTexture[platIdx]);\r\n\t\t\t\t\toriginalTexture = newXTexture.getTexture();\r\n\t\t\t\t\t// For crumble animation\r\n\t\t\t\t\tif (platIdx > 5) {\r\n\t\t\t\t\t\tcrumbleTexture = new TextureRegion(xTexture[crumbleIdx]);\r\n//\t\t\t\t\t\tcrumbleTexture.setRegion(0, 0, width, height);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// If the platform size is the same as the spritesheet size\r\n\t\t\t\t\tif (originalTexture.getWidth() > 32 && width%(originalTexture.getWidth()/32) == 0) {\r\n\t\t\t\t\t\tnewXTexture = new TextureRegion(reducedXTexture[platIdx]);\r\n\t\t\t\t\t\toriginalTexture = newXTexture.getTexture();\r\n\t\t\t\t\t\tif (platIdx > 5) {\r\n\t\t\t\t\t\t\tcrumbleTexture = new TextureRegion(reducedXTexture[crumbleIdx]);\r\n//\t\t\t\t\t\t\tcrumbleTexture.setRegion(0, 0, width, height);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n//\t\t\t\t\tnewXTexture.setRegion(0, 0, width, height);\r\n\t\t\t\t}\r\n\t\t\t\tPlatformModel platformModel = new PlatformModel(bounds, platformType, property, newXTexture, scale,\r\n\t\t\t\t\t\tdefaults.getFloat( \"density\", 0.0f ), defaults.getFloat( \"friction\", 0.0f ) ,\r\n\t\t\t\t\t\tdefaults.getFloat( \"restitution\", 0.0f ), originalTexture, crumbleTexture);\r\n\t\t\t\tplatformModel.setTag(platformType);\r\n\t\t\t\tplatformModel.setProperty(property);\r\n\t\t\t\taddObject(platformModel);\r\n\t\t\t\taddObjectTo(platformModel, platformType);\r\n\t\t\t\t//TODO: Moving platforms\r\n\r\n\r\n\t\t\t\tif (pathsArgs != null) {\r\n\t\t\t\t\tfloat[] paths = pathsArgs.get(j).asFloatArray();\r\n\r\n\t\t\t\t\t//** Moving platform if > 1 path or different path from starting position\r\n\t\t\t\t\tif (hasValidPath(x, y, paths)) {\r\n\t\t\t\t\t\tplatformModel.setBodyType(BodyDef.BodyType.KinematicBody);\r\n\t\t\t\t\t\tmovingObjects.add(platformModel);\r\n\r\n\t\t\t\t\t\tPooledList<Vector2> pathList = new PooledList<>();\r\n\t\t\t\t\t\tfor (int k = 0; k < paths.length; k+=2) {\r\n\t\t\t\t\t\t\tpathList.add(new Vector2(paths[k], paths[k+1]));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tfloat velocity = 3;\r\n\r\n\t\t\t\t\t\tplatformModel.setGravityScale(0);\r\n\t\t\t\t\t\tplatformModel.setPaths(pathList);\r\n\t\t\t\t\t\tplatformModel.setVelocity(velocity);\r\n\r\n\t\t\t\t\t\tmovingObjects.add(platformModel);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// This world is heavier\r\n\t\tworld.setGravity( new Vector2(0,defaults.getFloat(\"gravity\",0)) );\r\n\r\n\t\t// Set level background index\r\n\t\tint backgroundTextureIndex = levelAssets.get(\"background\").asInt();\r\n\t\tbackgroundLightTexture = backgrounds[backgroundTextureIndex - 1];\r\n\t\tbackgroundDarkTexture = backgrounds[backgroundTextureIndex];\r\n\t\tbackgroundTexture = backgroundLightTexture;\r\n\r\n\t\t// Initialize background animations\r\n\t\tactualBackgroundTexture = backgroundTexture.getTexture();\r\n\t\tbackgroundEntirePixelWidth = actualBackgroundTexture.getWidth();\r\n\t\tbackgroundNumAnimFrames = (int)(backgroundEntirePixelWidth/backgroundFramePixelWidth);\r\n\t\tbackgroundAnimator = new FilmStrip(backgroundTexture,1, backgroundNumAnimFrames, backgroundNumAnimFrames);\r\n\t\tbackgroundAnimator.setFrame(0);\r\n\t\tbackgroundAnimeframe = 0;\r\n\t\tbackgroundOrigin = new Vector2(backgroundAnimator.getRegionWidth()/2.0f, backgroundAnimator.getRegionHeight()/2.0f);\r\n\r\n\t\t// Set level bounds\r\n\t\twidthUpperBound = levelAssets.get(\"dimensions\").getInt(0);\r\n\t\theightUpperBound = levelAssets.get(\"dimensions\").getInt(1);\r\n\r\n\t\t// Setup Somni\r\n\r\n\t\tJsonValue somniVal = levelAssets.get(\"somni\");\r\n\t\tfloat sWidth = somniTexture.getRegionWidth()/scale.x;\r\n\t\tfloat sHeight = somniTexture.getRegionHeight()/scale.y;\r\n\t\tfloat sX = somniVal.get(\"pos\").getFloat(0) + sWidth / 2;\r\n\t\tfloat sY = somniVal.get(\"pos\").getFloat(1) + sHeight / 2;\r\n\t\tsomni = new CharacterModel(constants.get(\"somni\"), sX, sY, sWidth, sHeight, platformController.somnif, CharacterModel.LIGHT);\r\n\t\tsomni.setDrawScale(scale);\r\n\t\tsomni.setTexture(somniIdleTexture);\r\n\t\tsomni.setFilterData(platformController.somnif);\r\n\t\tsomni.setActive(true);\r\n\t\taddObject(somni);\r\n\t\taddObjectTo(somni, LevelCreator.allTag);\r\n\r\n\r\n\t\t// Setup Phobia\r\n\r\n\t\tJsonValue phobiaVal = levelAssets.get(\"phobia\");\r\n\t\tfloat pWidth = phobiaTexture.getRegionWidth()/scale.x;\r\n\t\tfloat pHeight = phobiaTexture.getRegionHeight()/scale.y;\r\n\t\tfloat pX = phobiaVal.get(\"pos\").getFloat(0) + pWidth / 2;\r\n\t\tfloat pY = phobiaVal.get(\"pos\").getFloat(1) + pHeight / 2;\r\n\t\tphobia = new CharacterModel(constants.get(\"phobia\"), pX, pY, pWidth, pHeight, platformController.phobiaf, CharacterModel.DARK);\r\n\t\tphobia.setDrawScale(scale);\r\n\t\tphobia.setTexture(phobiaIdleTexture);\r\n\t\tphobia.setFilterData(platformController.phobiaf);\r\n\t\taddObject(phobia);\r\n\t\taddObjectTo(phobia, LevelCreator.allTag);\r\n\t\tphobia.setActive(true);\r\n\r\n\t\t// Setup Combined\r\n\r\n\t\tfloat cWidth = combinedTexture.getRegionWidth()/scale.x;\r\n\t\tfloat cHeight = combinedTexture.getRegionHeight()/scale.y;\r\n\r\n\t\tcombined = new CharacterModel(constants.get(\"combined\"), 0, 0, cWidth, cHeight, platformController.combinedf, CharacterModel.DARK);\r\n\t\tcombined.setDrawScale(scale);\r\n\t\tcombined.setTexture(somniPhobiaTexture);\r\n\t\t//combined.setTag();\r\n\t\tcombined.setFilterData(platformController.combinedf);\r\n\t\taddObject(combined);\r\n\t\taddObjectTo(combined, LevelCreator.allTag);\r\n\t\tcombined.setActive(true);\r\n\r\n\t\t//Remove combined\r\n\t\tobjects.remove(combined);\r\n\t\tsharedObjects.remove(combined);\r\n\t\tcombined.setActive(false);\r\n\r\n\t\taction = 0;\r\n\r\n\t\tPreferences prefs = GDXRoot.getPreferences();\r\n\t\tvolume = prefs.contains(\"volume\") ? prefs.getFloat(\"volume\") : defaults.getFloat(\"volume\",\r\n\t\t\t\t1.0f);\r\n//\t\tSystem.out.println(volume);\r\n\r\n\t\tplatformController.applyFilters(objects);\r\n\t}", "private void popupWindowOfOptions(View v) {\n \t \n \t\tOrderManager.clearOption();\n \t\t\n \t\tint nOrderBoardTextId = v.getId();\n \tOrder _Order = (Order) ResourceManager.get(nOrderBoardTextId);\n \tint nMenuDbId = _Order.MENU_ID;\n \tint nMenuResourceId = MenuManager.getResourceIdByDbId(nMenuDbId);\n \tMenu mMenu = MenuManager.getMenuByResourceId(nMenuResourceId);\n \t\n \tint nTempIdForCurrentOrder = IdManager.getRandomId();\n \tIdManager.setTemporaryId(nTempIdForCurrentOrder);\n \tResourceManager.put(nTempIdForCurrentOrder, _Order);\n \t\n try {\n \t\n \tint nPopupHeight = 760;\n \t\tint nPopupWith = 520;\n \t\n \tint nSubTitleHeight = 40;\n \tint nOptionListLayoutHeight = 210;\n \t\n \tString strMenuNameEng = mMenu.NAME_ENG;\n \tString strMenuNameOth = mMenu.NAME_OTH;\n \t\n \t// Popup layout\n LinearLayout popLayout = new LinearLayout(this);\n popLayout.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));\n popLayout.setGravity(Gravity.CENTER);\n popLayout.setBackgroundColor(0x22000000);\n \n \t // Inner layout\n \t LinearLayout innerLayout = new LinearLayout(this);\n \t innerLayout.setLayoutParams(new LayoutParams(nPopupWith-20,nPopupHeight-20));\n \t innerLayout.setPadding(10,10,10,10);\n \t innerLayout.setOrientation(LinearLayout.VERTICAL);\n \t innerLayout.setGravity(Gravity.CENTER);\n \t innerLayout.setBackgroundColor(0xddffffff);\n \t\t \n \t\t // title eng\n \t\t TextView tvTitleEng = new TextView(this);\n \t\t tvTitleEng.setGravity(Gravity.CENTER);\n \t\t tvTitleEng.setText(strMenuNameEng);\n \t\t tvTitleEng.setTextColor(0xff000000);\n \t\t tvTitleEng.setTextSize(23);\n \t\t tvTitleEng.setHeight(50);\n \t\t tvTitleEng.setWidth(470);\n \t\t \n \t\t // title oth\n \t\t TextView tvTitleOth = new TextView(this);\n \t\t tvTitleOth.setGravity(Gravity.TOP|Gravity.CENTER);\n \t\t tvTitleOth.setText(strMenuNameOth);\n \t\t tvTitleOth.setTextColor(0xff000000);\n \t\t tvTitleOth.setTextSize(13);\n \t\t tvTitleOth.setHeight(55);\n \t\t tvTitleOth.setWidth(470);\n \t\t \n \t\t // common option title\n \t\t TextView tvCO = new TextView(this);\n \t\t tvCO.setText(\"* Common Option\");\n \t\t tvCO.setPadding(10,0,0,0);\n \t\t tvCO.setTextSize(15);\n \t\t tvCO.setTextColor(0xff5f2d09);\n \t\t tvCO.setHeight(nSubTitleHeight);\n \t\t tvCO.setWidth(470);\n \t\t \n \t\t // common option layout\n \t\t ScrollView svCO = new ScrollView(this);\n \t\t svCO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t \n \t\t LinearLayout llCO = new LinearLayout(this);\n \t\t llCO.setLayoutParams(new LayoutParams(470,LayoutParams.WRAP_CONTENT));\n \t\t llCO.setPadding(15,10,10,10);\n \t\t llCO.setOrientation(LinearLayout.VERTICAL);\n \t\t llCO.setGravity(Gravity.TOP);\n \t\t \n \t\t showCommonOptions (mMenu, llCO);\n \t\t \t\n \t\t \tsvCO.addView(llCO);\n \t\t \t\n \t\t\t // specific option title\n \t\t\t \n \t\t TextView tvSO = new TextView(this);\n \t\t tvSO.setPadding(10,0,0,0);\n \t\t tvSO.setText(\"* Specific Option\");\n \t\t tvSO.setTextSize(15);\n \t\t tvSO.setTextColor(0xff5f2d09);\n \t\t tvSO.setHeight(nSubTitleHeight);\n \t\t tvSO.setWidth(470);\n \t \n \t\t ScrollView svSO = new ScrollView(this);\n \t\t svSO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t \n \t\t LinearLayout llSO = new LinearLayout(this);\n \t\t llSO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t llSO.setPadding(15,10,10,10);\n \t\t llSO.setOrientation(LinearLayout.VERTICAL);\n \t\t llSO.setGravity(Gravity.TOP);\n \t\n \t\t showSpecificOptions (mMenu, llSO);\n \t\t \n \t\t svSO.addView(llSO);\n \t\t \n \t\t // button group\n \t\t \n \t\t int nButtonHeight = 50;\n \t\t int nButtonWidth = 100;\n \t\t \n \t\t LinearLayout llButtonGroup = new LinearLayout(this);\n \t\t llButtonGroup.setLayoutParams(new LayoutParams(470,80));\n \t\t llButtonGroup.setPadding(10, 0, 10, 4);\n \t\t llButtonGroup.setOrientation(LinearLayout.HORIZONTAL);\n \t\t llButtonGroup.setGravity(Gravity.CENTER|Gravity.BOTTOM);\n \t\t \n \t\t // confirm button\n \t \n \t \tint nConfirmId = IdManager.getRandomId();\n \t\t Button btnConfirm = new Button(this);\n \t\t btnConfirm.setId(nConfirmId);\n \t\t btnConfirm.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnConfirm.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnConfirm.setText(CaptionManager.getCaption().CONFIRM);\n \t\t btnConfirm.setTextSize(13);\n \t\t \n \t\t // add options to an order\n \t\t btnConfirm.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \t\n \t\t\t \tOrder currentOrder = (Order)ResourceManager.get(IdManager.getTemporaryId());\n \t\t\t \t\n \t\t\t \tArrayList<Order> orderList = addOptionsToOrder(currentOrder);\n \t\t\t \tOrderManager.requestUpdateOptions(currentOrder,orderList);\n \t \t\t\t\tloadOrderBoard();\n \t \t\t\t\tOrderManager.clearOption();\n \t \t\t\t\t_PopupWindowOfOptions.dismiss();\n \t\t\t }\n \t\t });\n \t\t \n \t\t // cancel button\n \t\t Button btnCancel = new Button(this);\n \t\t btnCancel.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnCancel.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnCancel.setText(CaptionManager.getCaption().CANCEL);\n \t\t btnCancel.setTextSize(13);\n \t\t btnCancel.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \tOrderManager.clearOption();\n \t\t\t \t_PopupWindowOfOptions.dismiss();\n \t\t\t }\n \t\t });\n \t\t \n \t\t // detail button\n \t\t final int nTempId = 808080;\n \t\t Mapper.put(Integer.valueOf(nTempId), mMenu);\n \t\t \n \t\t Button btnDetail = new Button(this);\n \t\t btnDetail.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnDetail.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnDetail.setText(CaptionManager.getCaption().DETAIL);\n \t\t btnDetail.setTextSize(13);\n \t\t btnDetail.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \n \t\t\t \tMenu menu = (Menu)Mapper.get(Integer.valueOf(808080));\n \t\t\t \tint nMenuRscId = menu.RESOURCE_ID;\n \t\t\t \tpopupWindowDetail(nMenuRscId);\n \t\t\t }\n \t\t });\n \t\t\t \n \t llButtonGroup.addView(btnConfirm);\n \t llButtonGroup.addView(btnCancel);\n \t llButtonGroup.addView(btnDetail);\n \t \n \t\t innerLayout.addView(tvTitleEng);\n \t innerLayout.addView(tvTitleOth);\n \t innerLayout.addView(tvCO);\n \t innerLayout.addView(svCO);\n \t innerLayout.addView(tvSO);\n \t innerLayout.addView(svSO);\n \t innerLayout.addView(llButtonGroup);\n \t \n popLayout.addView(innerLayout);\n\n // show popup\n _PopupWindowOfOptions = new PopupWindow(popLayout, nPopupWith, nPopupHeight, true);\n _PopupWindowOfOptions.showAtLocation(popLayout, Gravity.CENTER, 0, 0);\n \t\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void callSetupDialog(JDialog jParent, MainWindow oMain) {\n AllometryParameterEdit oWindow = new AllometryParameterEdit(jParent, m_oManager, oMain, this);\n oWindow.pack();\n oWindow.setLocationRelativeTo(null);\n oWindow.setVisible(true);\n }", "private void initUI()\r\n\t{\r\n\t\tthis.label = new Label();\r\n\t\t\r\n\t\tthis.label.setText(\"This view is also saveable\");\r\n\t\t\r\n\t\tthis.label.setSizeUndefined();\r\n\t\tthis.add(this.label);\r\n\t\tthis.setSizeFull();\r\n\t}", "public void drawUI() {\n \n stroke(0);\n textSize(titleH/3);\n textAlign(CENTER, CENTER);\n rectMode(CORNER);\n \n noFill();\n rect(titleX, titleY, titleW, titleH);\n image(logo, 0, 0);\n fill(0);\n text(\"EPBox: Ordinering\", titleX, titleY, titleW, titleH-15);\n \n if (!informationSeen) {\n uielement.informationDialog(\"EPBox: Ordinering\", \"Velkommen til EPBox: Ordinering.\\n\\nHvis det er første gang du kører programmet, bedes du gå igennem opsætning af programmet.\\nMangler du hjælp til dette, kan du gå ind på de relevante menuer, eller konsultere brugsanvisningen.\", \"information\");\n informationSeen = true;\n }\n\n uielement.infoHelpBttnSTART(\"Hvis det er første gang du kører programmet, bedes du gå igennem opsætning af programmet.\\nMangler du hjælp til dette, kan du gå ind på de relevante menuer, eller konsultere brugsanvisningen.\");\n\n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.getContentPane().setBackground(SystemColor.menu);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\tframe.setBounds(100, 100, 1625, 875);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.setExtendedState(frame.getExtendedState() | JFrame.MAXIMIZED_BOTH);\r\n\t\t\r\n\t\tJLabel lblWelcomeToAlgonquin = new JLabel(\"Welcome to Algonquin College\");\r\n\t\tlblWelcomeToAlgonquin.setFont(new Font(\"Times New Roman\", Font.BOLD, 22));\r\n\t\tlblWelcomeToAlgonquin.setBounds(246, 35, 325, 33);\r\n\t\tframe.getContentPane().add(lblWelcomeToAlgonquin);\r\n\t\t\r\n\t\tJButton btnAddTimetable = new JButton(\"Add Timetable\");\r\n\t\tbtnAddTimetable.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tAddTimetable add = new AddTimetable();\r\n\t\t\t\tadd.main(null);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnAddTimetable.setBounds(337, 128, 153, 43);\r\n\t\tframe.getContentPane().add(btnAddTimetable);\r\n\t\t\r\n\t\tJButton btnNewButton = new JButton(\"Put a Notice\");\r\n\t\tbtnNewButton.setBounds(337, 250, 153, 43);\r\n\t\tframe.getContentPane().add(btnNewButton);\r\n\t\t\r\n\t\tJButton btnNewButton_1 = new JButton(\"Find a Room\");\r\n\t\tbtnNewButton_1.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tjava.awt.Desktop.getDesktop().browse(java.net.URI.create(\"http://lyceum.algonquincollege.com/roomfinder/\"));\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnNewButton_1.setBounds(337, 362, 153, 43);\r\n\t\tframe.getContentPane().add(btnNewButton_1);\r\n\t\t\r\n\t}", "public void status(){\n lblStats.setText(\"\"+level+\"L\");\n }", "@Override\n\tprotected void UpdateUI() {\n\t\tMaxFlowLevelDisplay(MaxFlowLevel);\n\t}", "public void showAchievements () {\n\t\tGPGAchievementController achController = new GPGAchievementController();\n\t\tachController.setAchievementDelegate(this);\n\t\tviewController.presentViewController(achController, true, null);\n\t}", "public void levels(View v) {\n\t // Do something in response to button\n\t\tIntent intent = new Intent(this, SelectLevel.class);\n\t startActivity(intent);\n\n\t}", "private void setDialog()\n {\n //this.setSize(350,500);\n this.setTitle(Constant.getTextBundle(\"ปฏิกิริยาต่อกัน\"));\n Toolkit thekit = this.getToolkit(); \n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n this.setLocation((screenSize.width-this.getSize().width)/2, (screenSize.height-this.getSize().height)/2);\n }", "public main() {\n initComponents();\n\n Timer();\n\n this.addKeyListener(this);\n this.setExtendedState(MAXIMIZED_BOTH);\n\n loader();\n this.jDialog11.setLocationRelativeTo(this.jDesktopPane);\n this.jDialog11.setVisible(true);\n//pantallaResolucion();\n\n }", "private void setup(){\n\t\t\n\t\t//set the dialog title\n\t\tsetText(LocaleText.get(\"createSPSSFileDialog\"));\n\t\t//create the status text\n\t\tstatusLabel = new Label();\n\t\t\n\t\t//create the buttons\n\t\tButton btnCancel = new Button(LocaleText.get(\"close\"), new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton btnCreate = new Button(LocaleText.get(\"createSPSSFileDialog\"), new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tcreateSPSSFile();\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton btnSave = new Button(LocaleText.get(\"save\"), new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tsave();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\t\t\n\t\t\n\t\t//update the languages in the form.\n\t\tFormHandler.updateLanguage(Context.getLocale(), Context.getLocale(), form);\n\t\t//add the languages to the language drop down\n\t\tfor(Locale l : form.getLocales())\n\t\t{\n\t\t\tlistBoxLanguages.addItem(l.getName());\n\t\t}\n\t\t\n\t\t//setup the text area\n\t\tspssText.setCharacterWidth(30);\n\t\tspssText.setPixelSize(300, 300);\n\t\t\n\t\t\n\t\tFlexCellFormatter formatter = table.getFlexCellFormatter();\n\t\t\n\t\t//now add stuff to the UI\n\t\tint row = 0;\n\t\ttable.setWidget(row, 0, new Label(LocaleText.get(\"language\")));\n\t\ttable.setWidget(row, 1, listBoxLanguages);\n\t\trow++;\n\t\ttable.setWidget(row, 0, spssText);\n\t\tformatter.setColSpan(row, 0, 2);\n\t\tformatter.setHeight(row, 0, \"300px\");\n\t\tformatter.setWidth(row, 0, \"300px\");\n\t\trow++;\n\t\ttable.setWidget(row, 0, statusLabel);\n\t\trow++;\n\t\ttable.setWidget(row, 0, btnCreate);\n\t\trow++;\n\t\ttable.setWidget(row, 0, btnSave);\n\t\ttable.setWidget(row, 1, btnCancel);\n\t\trow++;\n\t\ttable.setWidget(row, 0, appletHtml);\n\t\t\n\t\t\t\t\t\t\n\t\t//some random UI stuff to make everything nice and neat\n\t\tVerticalPanel panel = new VerticalPanel();\n\t\tFormUtil.maximizeWidget(panel);\n\t\tpanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);\n\t\tpanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);\n\t\tpanel.add(table);\n\t\t\n\t\tsetWidget(panel);\n\t\t\n\t\tsetWidth(\"200px\");\t\t\n\t}", "private void initiateUI()\n\t{\n\t\t//Set List\n\t\tListView list = (ListView) findViewById(R.id.rewards_list);\n\t\trAdapter = new RowAdapter();\n\t\tlist.setAdapter(rAdapter);\n\t\t//Set Score\n\t\trewardPointsTV.setText(Integer.toString(fileIO.rewardPoints));\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t// show level instructions\n\t\taddPopup(instructionsPopup);\n\t\tsetAlpha(1 * 60 * 5);\n\t\tsetFadeRate(1);\n\t}", "private void okEvent() {\n\t\tYAETMMainView.PRIVILEGE = (String)loginBox.getSelectedItem();\n\t\tshowMain();\n\t\tcloseDialog();\n\t}", "private void showAboutDialog() {\n\n view.aboutDialog();\n }", "public SimulatorHelpDialog() {\n super((Frame)null, true);\n initComponents();\n initialize();\n }", "private void showEndGameResults() {\n EndGameDialog endGameDialog = new EndGameDialog(this, stats, playerOne, playerTwo, (e) -> {\n dispose();\n\n this.start();\n });\n\n\n }", "public SetupScreen() \r\n { \r\n _userLabel = new LabelField(Ipoki._resources.getString(LBL_USER), DrawStyle.ELLIPSIS);\r\n add(_userLabel);\r\n _userEdit = new EditField(\"\", Ipoki._user, 20, Field.EDITABLE);\r\n add(_userEdit);\r\n _passLabel = new LabelField(Ipoki._resources.getString(LBL_PASSWORD), DrawStyle.ELLIPSIS);\r\n add(_passLabel);\r\n _passEdit = new PasswordEditField(\"\", Ipoki._pass, 20, Field.EDITABLE);\r\n add(_passEdit);\r\n _freqLabel = new LabelField(Ipoki._resources.getString(LBL_FREQ), DrawStyle.ELLIPSIS);\r\n add(_freqLabel);\r\n _freqEdit = new EditField(\"\", String.valueOf(Ipoki._freq), 20, Field.EDITABLE | EditField.FILTER_INTEGER);\r\n add(_freqEdit);\r\n }", "private void initJoin() {\n\n\t\tthis.setResizable(false);\n\t\tthis.setSize(400, 155);\n\t\tthis.setLocationRelativeTo(null);\n\t\tthis.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);\n\n\t\tJPanel panNom = addPannelName();\n\t\tJPanel panPass = addPannelPassword();\n\n\t\tJPanel content = new JPanel();\n\n\t\tcontent.add(panNom);\n\t\tcontent.add(panPass);\n\n\t\tJPanel control = new JPanel();\n\n\t\tJButton okBouton = addOKButton();\n\t\tJButton cancelButton = addCancelButton();\n\n\t\tcontrol.add(okBouton);\n\t\tcontrol.add(cancelButton);\n\n\t\tthis.getContentPane().add(content, BorderLayout.NORTH);\n\t\tthis.getContentPane().add(control, BorderLayout.SOUTH);\n\t}", "public void lendingPaneInit() {\n\t\tlendPane.getChildren().clear();\n\t\t\n Label lendPaneLabel = new Label(\"Lending\");\n lendPane.getChildren().add(lendPaneLabel);\n\t\t\n\t\tList<Tool> ownedTools = appUser.toolsICanLend();\n ArrayList<String> toolNames = new ArrayList<>();\n for (Tool tool: ownedTools) {\n \tif (tool.isLendable()) {\n \ttoolNames.add(tool.getToolID()+ \" : \"+tool.getToolName());\n \t}\n }\n \n HashMap<Integer, String> allUsers = conn.fetchAllUsers();\n \n ArrayList<String> usersNames = new ArrayList<>();\n for (Integer userID: allUsers.keySet()) {\n \tif(userID != appUser.getUserID()) {\n \tusersNames.add(userID+\" : \"+allUsers.get(userID));\n \t}\n }\n \n ComboBox<String> toolsDrop = new ComboBox<String>(FXCollections.observableArrayList(toolNames));\n ComboBox<String> usersDrop = new ComboBox<String>(FXCollections.observableArrayList(usersNames));\n\n Label toolReturnLabel = new Label(\"Return Date: \");\n DatePicker toolReturnDate = new DatePicker();\n\n HBox toolReturn = new HBox();\n toolReturn.getChildren().add(toolReturnLabel);\n toolReturn.getChildren().add(toolReturnDate);\n \n Button submitLendRequest = new Button();\n submitLendRequest.setText(\"Submit\");\n submitLendRequest.setOnAction(new EventHandler<ActionEvent>() {\n\n @Override\n public void handle(ActionEvent event) {\n \tString[] selectedTool = toolsDrop.getValue().split(\" \");\n \t\n \tTool toolToLend = appUser.getToolFromOwned(Integer.parseInt(selectedTool[0]));\n \t\n \tString[] selectedUser = usersDrop.getValue().split(\" \");\n \t\n \tUser userToLendTo = new User(Integer.parseInt(selectedUser[0]), conn);\n \t\n \tLocalDate returnDate = toolReturnDate.getValue();\n Date date = Date.valueOf(returnDate);\n \n \tappUser.lendTool(toolToLend, userToLendTo, date);\n \trefreshToolCollection(appUser.getToolCollection());\n \trefreshToolsOwned(appUser.getOwnedTools());\n \trefreshLogs(appUser.getLendingLogs(), conn.fetchAllUsers());\n \t\n \tlendingPaneInit();\n }\n });\n \n lendPane.getChildren().add(toolsDrop);\n lendPane.getChildren().add(usersDrop);\n lendPane.getChildren().add(toolReturn);\n lendPane.getChildren().add(submitLendRequest);\n\t}", "public abstract void initDialog();", "public void createLevel() {\n room = 1;\n currentLevelFinish = false;\n createRoom();\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tpDialog.show();\n\t\t}", "public static void getDataWithDialogs(ChampionSelectGUI t) {\n\t\tJDialog sND = createSummonerNameDialog(t);\n\t\tsND.setVisible(true);\n\t\tJDialog rD = createRegionDialog(t);\n\t\trD.setVisible(true);\n\t\tJDialog roleD = createRoleDialog(t);\n\t\troleD.setVisible(true);\n\t\tJDialog teamD = createTeamDialog(t);\n\t\tteamD.setVisible(true);\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tprogress = UserCenterDialog.onCreateDialog(this);\r\n\t\tcontext = this;\r\n\t\tshellRW = new RWSharedPreferences(context, \"addInfo\");\r\n\t\tinitDialog(NoticeActivityGroup.LOTNO);\r\n\t}", "public void start(Stage stage) {\n\t\tLabel chooseADifficulty = new Label(\"Please choose your difficulty preference\");\n\t\tchooseADifficulty.setMinWidth(300);\n\t\tchooseADifficulty.setAlignment(Pos.CENTER);\n\t\t\n\t\t//A combobox containing Strings, which acts as a drop down menu for the player to use. Easy, Medium\n\t\t//and Hard are the options available. getSelectionModel().selectFirst() automatically selects the\n\t\t//first option on the drop down menu, preventing Null Pointer Exceptions for if the player tried to\n\t\t//continue without selecting a difficulty.\n\t\tComboBox<String> difficultyChoices = new ComboBox<String>();\n\t\tdifficultyChoices.getItems().add(\"Easy\");\n\t\tdifficultyChoices.getItems().add(\"Medium\");\n\t\tdifficultyChoices.getItems().add(\"Hard\");\n\t\tdifficultyChoices.getSelectionModel().selectFirst();\n\t\t\n\t\t//A confirmation button that the player can use to progress from this screen.\n\t\tButton difficultyConfirm = new Button(\"Confirm\");\n\t\t\n\t\t//VBox places the nodes within itself one atop the other\n\t\tVBox difficultyVBox = new VBox(20,chooseADifficulty, difficultyChoices, difficultyConfirm);\n\t\tdifficultyVBox.setAlignment(Pos.CENTER);\n\t\t\n\t\t//The Group object is now set to use the VBox\n\t\tgroup = new Group(difficultyVBox);\n\t\t\n\t\t//The group is now prepared on the scene, with a window size of 300 by 300, with a background colour\n\t\t//of light grey. The scene is placed on the stage. The window cannot be resized and the title is set \n\t\t//to Hangman. It is then displayed to the player.\n\t\tscene = new Scene(group, 300,300, Color.LIGHTGREY);\n\t\tstage.setScene(scene);\n\t\tstage.setResizable(false);\n\t\tstage.setTitle(\"Hangman\");\n\t\tstage.show();\n\t\t\n\t\t//The drawnPieces double variable is set to 0.0, the statusMessageLabel variable has its value \n\t\t//removed and the finished boolean is set back to false, acting as a reset for each time the \n\t\t//player is returned to this part of the code, such as when they wish to start a new game.\n\t\tdrawnPieces = 0.0;\n\t\tstatusMessageLabel = new Label();\n\t\tfinished = false;\n\n\t\t//An eventHandler is created for the confirmation button created earlier\n\t\tdifficultyConfirm.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>(){\n\t\t\t@Override\n\t\t\tpublic void handle(MouseEvent e){\n\t\t\t\t//Clicking the button causes an Alert window to appear on the screen. It is stylised to\n\t\t\t\t//appear as a confirmation screen, as opposed to a warning or error screen. It uses the\n\t\t\t\t//selected option of the drop down menu to determine the message that is displayed to\n\t\t\t\t//the player.\n\t\t\t\tAlert confirmation = new Alert(AlertType.CONFIRMATION);\n\t\t\t\tconfirmation.setTitle(\"Start game?\");\n\t\t\t\tconfirmation.setHeaderText(\"Do you wish to start the game on \" + difficultyChoices.getValue() + \" difficulty?\");\n\n\t\t\t\t//The Alert window has two buttons, an OK button and a cancel button. This variable is\n\t\t\t\t//created to store which button was clicked on by the player.\n\t\t\t\tOptional<ButtonType> result = confirmation.showAndWait();\n\t\t\t\t\n\t\t\t\t//If the player clicked on the OK button, this if statement is used.\n\t\t\t\tif(result.get() == ButtonType.OK) {\n\n\t\t\t\t\t//A switch statement checks the choice selected from the drop down menu\n\t\t\t\t\tswitch(difficultyChoices.getValue()) {\n\t\t\t\t\t//Depending on which difficulty was chosen, the difficultyGuesses int variable is\n\t\t\t\t\t//set to the maximum amount of guesses that the player is allowed, and debug messages\n\t\t\t\t\t//are displayed on the console. If the player was somehow able to reach this point\n\t\t\t\t\t//without selecting one of the options, the program closes, to prevent any issues later.\n\t\t\t\t\tcase \"Easy\" : difficultyGuesses = 7;\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Picked Easy mode\");\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Medium\" : difficultyGuesses = 5;\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Picked Medium mode\");\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Hard\" : difficultyGuesses = 3;\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Picked Hard mode\");\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault \t : System.out.println(\"For some reason, we didn't get a difficulty setting.\");\n\t\t\t\t\t\t\t\t\tSystem.exit(1);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//Using the PrintWriter, a message is sent to the server. StartUpGame acts like a \n\t\t\t\t\t//keyword so that the server can access the right area of the code to use the \n\t\t\t\t\t//second parameter correctly.\n\t\t\t\t\tout.println(\"StartUpGame \" + difficultyGuesses);\n\t\t\t\t\t\n\t\t\t\t\t//A boolean is created and set to false. It is used as a crude way of waiting for a\n\t\t\t\t\t//response from the server. The while loop afterwards continues for as long as the\n\t\t\t\t\t//boolean remains false. When the correct message is received from the server, it\n\t\t\t\t\t//will set the boolean to true, which will end the while loop and continue with the\n\t\t\t\t\t//code afterwards. \n\t\t\t\t\tboolean connectionCheck = false;\n\t\t\t\t\twhile(!connectionCheck) {\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconnectionCheck = Boolean.parseBoolean(in.readLine());\n\t\t\t\t\t\t}catch(IOException ioe) {\n\t\t\t\t\t\t\t//If nothing is received, do nothing. The loop will continue as the boolean\n\t\t\t\t\t\t\t//remains false. May need to be refined in some way to determine whether no\n\t\t\t\t\t\t\t//message was received because the server's message hasn't arrived yet, or\n\t\t\t\t\t\t\t//because the connection has been completely lost and act accordingly.\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//The Alert window can now be closed\n\t\t\t\t\tconfirmation.close();\n\t\t\t\t\t\n\t\t\t\t\t//Call the game method, passing over the stage so that it can be redesigned\n\t\t\t\t\tgame(stage);\n\t\t\t\t}\n\t\t\t}\n\t\t});\t\t\n\t}", "@Override\n\tprotected void UpdateUI() {\n\t\tFineModulationDisplay(FineModulation);\n\t\tAutoGreaseDisplay(AutoGrease);\n\t\tQuickcouplerDisplay(Quickcoupler);\n\t\tRideControlDisplay(RideControl);\n\t\tBeaconLampDisplay(BeaconLamp);\n\t\tMirrorHeatDisplay(MirrorHeat);\n//\t\tFNKeyDisplay(ParentActivity.LockEntertainment);\n\t}", "private void initGUI() {\n statusLabel = new JLabel();\n add(statusLabel);\n updateStatus();\n }", "private void setUpDialoguebox() {\n\t\tinput = new CTS_GUI_Dialoguebox();\n\t\tinput.setTitle(\"Settings\");\n\t\tBorderPane pane = new BorderPane();\n\t\tLocalTime t = LocalTime.now();\n\t\tLocalDate d = LocalDate.now();\n\t\tuicontrols = new VBox(10);\n\t\tHBox box0 = new HBox(5);\n\t\tbox0.getChildren().addAll(new Label(\"Latitude: \"),new TextField(\"0\"));\n\t\tHBox box1 = new HBox(5);\n\t\tbox1.getChildren().addAll(new Label(\"Longitude: \"),new TextField(\"0\"));\n\t\tHBox box2 = new HBox(5);\n\t\tbox2.getChildren().addAll(new Label(\"Date: \"),new TextField(d.toString()));\n\t\tTextField time = new TextField(t.getHour() + \":\" + t.getMinute() + \":\" + (int) floor(t.getSecond()));\n\t\tHBox box3 = new HBox(5);\n\t\tbox3.getChildren().addAll(new Label(\"Time: \"),time);\n\t\t// Check boxes\n\t\tHBox box5 = new HBox(5);\n\t\tCheckBox c1 = new CheckBox(\"Plot Stars\");\n\t\tc1.setSelected(true);\n\t\tCheckBox c2 = new CheckBox(\"Plot DSOs\");\n\t\tc2.setSelected(true);\n\t\tCheckBox c3 = new CheckBox(\"Plot Constellations\");\n\t\tc3.setSelected(true);\n\t\tCheckBox c4 = new CheckBox(\"Plot Planets\");\n\t\tc4.setSelected(true);\n\t\tbox5.getChildren().addAll(c1,c2,c3,c4);\n\t\t// Color Picker\n\t\t// 0 = Star color, 1 = Low mag star, 2 = Very low mag star.\n\t\t// 3 = DSO, 4 = Sky background, 5 = Circle around sky background\n\t\t// 6 = Overall background, 7 = Lat/long txt color, 8 = Constellation line color.\n\t\tHBox box6 = new HBox(5);\n\t\tTextField colorSet = new TextField(\"255,255,255,1\");\n\t\tButton setcolorbutton = new Button(\"Submit Color\");\n\t\tbox6.getChildren().addAll(new Label(\"Color to Set: \"),colorSet,setcolorbutton,new Label(\"[PREVIEW COLOR]\"));\n\t\tsetcolorbutton.setOnAction((event) -> { colorPickerHander(); });\n MenuBar mainmenu = new MenuBar();\n Menu colorpickermenu = new Menu(\"Set Custom Colors\");\n String[] colorstrs = {\"Star Color\",\"Low Magnituide Star Color\",\"Very Low Magnituide Star Color\", \"Deep Space Object Color\",\"Sky Background Color\",\n \t\t\"Circle Around Sky Background Color\",\"Overall Background Color\", \"Latitude/Longitude Text Color\",\"Constellation Line Color\"};\n for(int x = 0; x < colorstrs.length; x++) {\n \tMenuItem opt = new MenuItem(colorstrs[x]);\n \tint id = x;\n \topt.setOnAction((event) -> { colorSetterId = id; });\n \tcolorpickermenu.getItems().add(opt);\n }\n \n ComboBox<String> consts = new ComboBox<>();\n HashMap<String, String> cdbs = controller.getModelConstellationDBs();\n\n for (String name : cdbs.keySet()) {\n consts.getItems().add(name);\n }\n HBox box7 = new HBox(5);\n box7.getChildren().addAll(new Label(\"Select Constellation Set\"), consts);\n \n consts.getSelectionModel().select(\"Western\");\n mainmenu.getMenus().addAll(colorpickermenu);\n\t\tHBox box4 = new HBox(5);\n\t\tButton but = new Button(\"Cancel\");\n\t\tbut.setPadding(new Insets(5));\n\t\tButton but2 = new Button(\"Submit\");\n\t\tbut2.setPadding(new Insets(5));\n\t\tbox4.getChildren().addAll(but,but2);\n\t\tuicontrols.getChildren().addAll(box0,box1,box2,box3,box5,box6,box7,box4);\n\t\tbut.setOnAction((event) -> { input.close(); });\n\t\tbut2.setOnAction((event) -> {\n\t\t\tuserSelectedConstellationFileName = cdbs.get(consts.getValue());\n\t\t\tlong i = validateInput();\n\t\t\tif (i == 0) {\n\t\t\t\tchartTheStars();\n\t\t\t\tinput.close();\n\t\t\t} else {\n\t\t\t\tGUIerrorout = new Alert(AlertType.ERROR, getGUIErrorMsg(i));\n\t\t\t\tGUIerrorout.showAndWait();\n\t\t\t}\n });\n\t\tpane.setTop(mainmenu);\n\t\tpane.setCenter(uicontrols);\n\t\tpane.setPadding(new Insets(10));\n\t\tScene scene = new Scene(pane, 520, 310);\n\t\tinput.setScene(scene);\n\t}", "private void InitUI() \n\t{\n\n\t\tRelativeLayout rel_abt = (RelativeLayout) rootView.findViewById(R.id.rel_abt);\n\t\tRelativeLayout rel_chgpass = (RelativeLayout) rootView.findViewById(R.id.rel_chgpass);\n\t\tRelativeLayout rel_tc = (RelativeLayout) rootView.findViewById(R.id.rel_tc);\n\t\tRelativeLayout rel_pp = (RelativeLayout) rootView.findViewById(R.id.rel_pp);\n\n\t\trel_abt.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\t\t});\n\n\t\trel_chgpass.setOnClickListener(new OnClickListener() \n\t\t{\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\t\t\t\n\t\t\t\n\t\t\t\tshowdialog();\n\n\t\t\t}\n\t\t});\n\n\t\trel_tc.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\t\t});\n\n\t\trel_pp.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t/*\n\t\t\t\tFragment fragment = new PrivacyPolicy();\n\t\t\t\tFragmentManager fmanager = getActivity().getSupportFragmentManager();\n\t\t\t\tFragmentTransaction ftans = fmanager.beginTransaction();\n\t\t\t\tftans.replace(R.id.frame_container, fragment);\n\t\t\t\tftans.commit();\n*/\n\t\t\t}\n\t\t});\n\n\t}", "public void display() \r\n {\r\n ((GrantsByPIForm) getControlledUI()).setVisible(true);\r\n }", "void levelanzeigen(){\n if(level==levelold){\n //TODO HARDWARE this.systeminterface.tab.setcolor(255,0,0);\n //TODO HARDWARE this.systeminterface.ledFeld.zahl(0,2,level);\n }else{\n //TODO HARDWARE this.systeminterface.ledFeld.setcolor(0,0,0);\n //TODO HARDWARE this.systeminterface.ledFeld.zahl(0,2,levelold);\n //TODO HARDWARE this.systeminterface.ledFeld.setcolor(255,0,0);\n //TODO HARDWARE this.systeminterface.ledFeld.zahl(0,2,level);\n levelold=level;\n }\n //TODO HARDWARE this.systeminterface.ledFeld.show();\n //TODO HARDWARE this.systeminterface.ledFeld.setRotation(1);\n }", "public SelectionDialog(HarmonyModel harmonyModel, Integer mode)\r\n\t{\r\n\t\tsuper((mode==SELECT ? \"Select\" : \"Remove\") + \" Links\");\r\n\t\tthis.harmonyModel = harmonyModel;\r\n\t\tthis.mode = mode;\r\n\t\t\r\n\t\t// Initialize the type filter\r\n\t\ttypeFilter = new OptionPane(\"Type\",new String[]{\"All\",\"User\",\"System\"});\r\n\t\ttypeFilter.setBorder(new EmptyBorder(0,20,0,0));\r\n\t\ttypeFilter.setSelectedButton(\"All\");\r\n\t\t\r\n\t\t// Initialize the focus filter\r\n\t\tfocusFilter = new OptionPane(\"Focus\",new String[]{\"All\",\"Focused\",\"Unfocused\"});\r\n\t\tfocusFilter.setBorder(new EmptyBorder(0,13,0,0));\r\n\t\tfocusFilter.setSelectedButton(mode==SELECT ? \"Focused\" : \"All\");\r\n\t\tfocusFilter.setEnabled(mode==DELETE);\r\n\r\n\t\t// Initialize the visibility filter\r\n\t\tvisibilityFilter = new OptionPane(\"Visibility\",new String[]{\"All\",\"Visible\",\"Hidden\"});\t\t\r\n\t\tvisibilityFilter.setSelectedButton(mode==SELECT ? \"Visible\" : \"All\");\r\n\t\tvisibilityFilter.setEnabled(mode==DELETE);\r\n\t\t\r\n\t\t// Create the info pane\r\n\t\tJPanel infoPane = new JPanel();\r\n\t\tinfoPane.setBorder(new CompoundBorder(new EmptyBorder(5,5,0,5),new CompoundBorder(new LineBorder(Color.gray),new EmptyBorder(5,5,5,5))));\r\n\t\tinfoPane.setLayout(new GridLayout(3,1));\r\n\t\tinfoPane.add(typeFilter);\r\n\t\tinfoPane.add(focusFilter);\r\n\t\tinfoPane.add(visibilityFilter);\r\n\t\t\r\n\t\t// Generate the main dialog pane\r\n\t\tJPanel pane = new JPanel();\r\n\t\tpane.setBorder(BorderFactory.createLineBorder(Color.black));\r\n\t\tpane.setLayout(new BorderLayout());\r\n\t\tpane.add(infoPane,BorderLayout.CENTER);\r\n\t\tpane.add(new ButtonPane(),BorderLayout.SOUTH);\r\n\t\t\r\n\t\t// Initialize the dialog parameters\r\n\t\tsetContentPane(pane);\r\n\t\tsetSize(200,250);\r\n\t\tpack();\r\n\t\tsetVisible(true);\r\n\t}", "public Object open() {\n // Create a new shell object and set the text for the dialog.\n Shell parent = getParent();\n shell = new Shell(parent, SWT.DIALOG_TRIM);\n shell.setText(\"Edit Colormaps\");\n\n // Setup all of the layouts and the controls.\n setup();\n\n // Open the shell to display the dialog.\n shell.open();\n\n // Wait until the shell is disposed.\n Display display = parent.getDisplay();\n while (!shell.isDisposed()) {\n if (!display.readAndDispatch())\n display.sleep();\n }\n\n return null;\n }" ]
[ "0.6603365", "0.62596005", "0.60160846", "0.5994502", "0.5910721", "0.5859198", "0.58276695", "0.5810434", "0.57785267", "0.57490927", "0.56942594", "0.56685597", "0.5655489", "0.5653668", "0.56487614", "0.564081", "0.5636723", "0.5612227", "0.5598999", "0.558557", "0.5564335", "0.5528488", "0.5527588", "0.5522856", "0.5510146", "0.54956234", "0.5487222", "0.5486679", "0.5482497", "0.5479773", "0.546601", "0.54606444", "0.546029", "0.5456866", "0.5452719", "0.5450397", "0.5445433", "0.5430159", "0.54212856", "0.5410051", "0.5402761", "0.5400751", "0.5393453", "0.53906006", "0.5389521", "0.53750914", "0.53749466", "0.53730553", "0.5372935", "0.5367035", "0.5366021", "0.5361057", "0.5360868", "0.5346358", "0.53374743", "0.5326301", "0.5323146", "0.53171605", "0.53047585", "0.5296738", "0.5294266", "0.529021", "0.52891964", "0.528601", "0.5283513", "0.5266681", "0.5260781", "0.52577233", "0.52568316", "0.52459216", "0.5240974", "0.5236678", "0.52349895", "0.5234618", "0.52337587", "0.5230652", "0.5230193", "0.522956", "0.5229168", "0.5222995", "0.52220404", "0.52114177", "0.5210533", "0.5207143", "0.5203806", "0.5201971", "0.52000415", "0.5196825", "0.5196649", "0.5195976", "0.5192182", "0.51830846", "0.5182844", "0.51810664", "0.5180902", "0.51803535", "0.51767796", "0.51761544", "0.5174604", "0.51731825" ]
0.74431723
0
Write a program that reads a number from the standard input, then draws a square like this: %%%%% % % % % % % % % %%%%% The square should have as many lines as the number was
public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Give me a number"); int userInput1 = sc.nextInt(); int a; int b; for (a = 0; a < userInput1; a++) { System.out.println(); for (b = 0; b < userInput1; b++) { if (b == 0 || b == (userInput1 -1) || a == 0 || a == (userInput1 -1)) { System.out.print("%"); } else { System.out.print(" "); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void drawNum(Graphics2D g, int pSize, int sqrSize, int numOfSqr, int font) {\r\n g.setColor(Color.BLACK);\r\n int line = ((pSize / numOfSqr) / numOfSqr);\r\n \r\n for(int i = 0; i <= sqrSize; i++) {\r\n for(int j = 0; j <= sqrSize; j++){\r\n String data = (\"\" + get());\r\n g.drawString(data, j * line + font, i * line + font * 2);\r\n }\r\n }\r\n }", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n System.out.print(\"Input a number: \");\n int number = scan.nextInt();\n if (number > 0) {\n while (number % 2 == 0) {\n System.out.print(2 + \" \");\n number /= 2;\n }\n\n for (int i = 3; i <= Math.sqrt(number); i += 2) {\n while (number % i == 0) {\n System.out.print(i + \" \");\n number /= i;\n }\n }\n if (number > 2)\n System.out.print(number);\n }\n }", "private static void drawSquare(Graphics2D g, int startX, int numSquare, int endLine, int pSize) {\r\n \r\n g.setColor(Color.BLACK);\r\n int width = (startX / numSquare);\r\n \r\n for(int i = 0; i < numSquare; i++) {\r\n g.drawLine(width * i + endLine, 0, width * i + endLine, pSize);\r\n g.drawLine(0, width * i + endLine, pSize, width * i + endLine);\r\n }\r\n \r\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter an integer: \");\r\n\t\tint number = sc.nextInt();\r\n\t\tfor(int i=0; i<number; i++) {\r\n\t\t\tfor(int j=0; j<number; j++) {\r\n\t\t\t\tSystem.out.print((j<i)? \" \" : \"*\");\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"\\n\");\r\n\t\t}\r\n\t}", "public static void main(String[] args){\n // create scanner to obtain input from the command line.\n Scanner input = new Scanner(System.in);\n\n int num1; // first number to take from the user.\n int square;\n int num2 = 100; // number to compare with first users input\n\n System.out.print(\"Enter the number please: \"); // it displays what should be entered\n num1 = input.nextInt(); // it takes the number from the user.\n\n square = num1 * num1; // square is defined\n\n if(square > num2)\n System.out.printf(\"%d > %d%n\", square, num2);\n\n if (square >= num2)\n System.out.printf(\"%d >= %d%n\", square, num2);\n if (square != num2)\n System.out.printf(\"%d != %d%n\", square, num2);\n\n if (square < num2)\n System.out.printf(\"%d < %d%n\", square, num2);\n\n\n\n\n }", "public static int Main()\n\t\t{\n\t\t\tint n;\n\t\t\tint i;\n\t\t\tint wl;\n\t\t\tint len = 0;\n\t\t\tint line = 0;\n\t\t\tString w = new String(new char[64]);\n\t\t\tString tempVar = ConsoleInput.scanfRead();\n\t\t\tif (tempVar != null)\n\t\t\t{\n\t\t\t\tn = Integer.parseInt(tempVar);\n\t\t\t}\n\t\t\tfor (int i = 1; i <= n; i++)\n\t\t\t{\n\t\t\t\tString tempVar2 = ConsoleInput.scanfRead();\n\t\t\t\tif (tempVar2 != null)\n\t\t\t\t{\n\t\t\t\t\tw = tempVar2.charAt(0);\n\t\t\t\t}\n\t\t\t\twl = w.length();\n\t\t\t\tif (line == 0)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.printf(\"%s\",w);\n\t\t\t\t\tlen = wl;\n\t\t\t\t\tline++;\n\t\t\t\t}\n\t\t\t\telse if (len + wl + 1 <= 80)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.printf(\" %s\",w);\n\t\t\t\t\tlen += wl + 1;\n\t\t\t\t}\n\t\t\t\telse if (len + wl + 1 > 80)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.printf(\"\\n%s\",w);\n\t\t\t\t\tlen = wl;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn 0;\n\t\t}", "public static void block(int input, int y) {\n int x;\n int z;\n int a;\n\n for (z = 0; z < y; z++) { //makes the number repeat for n number of lines\\\n line(input, y);\n\n }\n\n for (a = input; a > y; a--) {\n System.out.print(\" \");\n }\n for (x = 0; x < y - 1; x++) { //prints out \"-\" 2n-1 number of times depending on the number, after each number is printed 2n-1 times for n amount of lines\n System.out.print(\"--\");\n\n }\n System.out.println(\"-\");\n\n\n\n\n }", "public static void main(String[] args) {\n int n;\n int i = 1;\n Scanner sc= new Scanner(System.in);\n n = sc.nextInt();\n \n while(i<=n)\n {\n int spaces = 1;\n while(spaces<=n-i)\n {\n System.out.print(' ');\n spaces = spaces + 1;\n }\n int numb = 1;\n while(numb<=i)\n {\n System.out.print('*');\n numb = numb + 1;\n }\n int dec = i - 1;\n while(dec>=1)\n {\n System.out.print('*');\n dec = dec - 1;\n }\n System.out.println();\n i = i +1;\n }\t\n\t}", "public static void line(int input, int y) {\n int a;\n int x;\n for (a = input; a > y; a--) {//controls spacing, decrease spacing with each number increase\n System.out.print(\" \");\n }\n for (x = 0; x < y - 1; x++) {//controls the number of times that the number comes out, which will be 2n-1 when you include the System.out.println(y)\n System.out.print(y + \"\" + y);\n\n }\n System.out.println(y);\n\n }", "public static void main(String[] args) {\n\tScanner sc = new Scanner(System.in);\t\r\n\t\t\r\n\tint num = 0;\r\n\tint result = 0;\r\n\tint count = 0;\r\n\t\r\n//count starts at zero, as long as it is less than 5 add 1 to the current int value of count\r\n\tfor (count = 4; count < 5; count++)\r\n\t\t\r\n\t\tSystem.out.println(\"Please Enter a Number: \\n\\t(less than 46341)\");\r\n\t\tnum = sc.nextInt();\r\n\t\r\n//if the value of the user input int value in num is less than 46431 than do this arthimetic else the number is to large for \r\n//an int variable\r\n\t\tif (num < 46341) {\r\n\t\t\tresult = num * num;\r\n\t\t\tSystem.out.println(\"The resulting square root is: \\t\\t\" + result);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.err.println(\"Your number is to large\");\r\n\t\t}\r\n\t\t\t\t\r\n\t\tsc.close();\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\n System.out.println(\"Give me the number of the piramid's lines!\");\n Scanner scanner = new Scanner(System.in);\n int numberOfLines = scanner.nextInt();\n\n int numberOfZeros = numberOfLines-1;\n int numberOfAsterisks = 0;\n\n for (int i = 0; i < numberOfLines; i++) {\n numberOfAsterisks = i * 2 + 1;\n for (int j = 0; j < numberOfZeros; j++) {\n System.out.print(\" \");\n }\n for (int k = 0; k < numberOfAsterisks; k++) {\n System.out.print(\"*\");\n }\n numberOfZeros = numberOfZeros-1;\n System.out.println(\"\");\n }\n }", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n\n int stairs = 1;\n if (n > 0) {\n if (n > 1) {\n for (int j = 0; j < n; j++) {\n String s = \"\";\n for (int i = 0; i < n; i++) {\n if (i + stairs < n)\n s += \" \";\n else if (i < n)\n s += \"#\";\n }\n System.out.println(s);\n stairs++;\n }\n } else {\n System.out.println(\"#\");\n }\n }\n }", "private static void drawSquare(Graphics2D g, int pSize, int numOfSqr, int startX) {\r\n \r\n for(int i = 0; i < numOfSqr; i++) {\r\n g.setColor(Color.BLACK);\r\n g.fillRect(startX * i - numOfSqr, 0, numOfSqr, pSize);\r\n g.fillRect(0, startX * i - numOfSqr, pSize, numOfSqr);\r\n drawSquare(g, startX, numOfSqr, startX * i, pSize);\r\n \r\n }\r\n }", "public static void main(Graphics2D g, int pSize, int sqrSize, int currX, int currY) {\r\n \r\n int tempSize = Math.round(Math.round(Math.sqrt(sqrSize))); \r\n int font = (((pSize / tempSize) / tempSize) / 3);\r\n int startX = (pSize / tempSize); \r\n \r\n drawSquare(g, pSize, tempSize, startX);\r\n highlight(g, currX, currY, (startX / tempSize));\r\n g.setFont(new Font(\"Helvetica\", Font.BOLD, font + 10));\r\n drawNum(g, pSize, sqrSize, tempSize, font);\r\n System.out.println(get());\r\n System.out.println(font);\r\n System.out.println(tempSize);\r\n System.out.println(startX);\r\n \r\n }", "private static void printSquareNumbers() {\r\n\r\n\t\tBigInteger number = new BigInteger(Long.MAX_VALUE + \"\");\r\n\t\tBigInteger finish = number.add(new BigInteger(\"10\"));\r\n\r\n\t\tfor (number = new BigInteger(Long.MAX_VALUE + \"\"); number.compareTo(finish) <= 0; number = number\r\n\t\t\t\t.add(new BigInteger(\"1\"))) {\r\n\t\t\tSystem.out.println(number.multiply(number));\r\n\t\t}\r\n\r\n\t}", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "public static void main(String[] args) {\n\r\n Scanner scanner = new Scanner(System.in);\r\n\r\n System.out.println(\"How high a diamond would you like? Please enter a number:\");\r\n\r\n int dHeight = scanner.nextInt();\r\n\r\n String pyr = \"*\";\r\n\r\n for (int i = 0; i < ((dHeight-1)/2)+1; i++) {\r\n for (int j = 0; j < ((dHeight-1)/2) - i; j++) {\r\n System.out.print(\" \");\r\n }\r\n System.out.println(pyr);\r\n pyr = pyr + \"**\";\r\n }\r\n pyr = pyr.substring(1, pyr.length() - 1);\r\n\r\n for (int i = 0; i < ((dHeight - 1) / 2); i++) {\r\n for (int j = 0; j < i + 1; j++) {\r\n System.out.print(\" \");\r\n }\r\n pyr = pyr.substring(1, pyr.length() - 1);\r\n System.out.println(pyr);\r\n }\r\n\r\n System.out.println(\"How high a diamond would you like? Please enter a number:\");\r\n\r\n dHeight = scanner.nextInt();\r\n\r\n for (int i = 0; i < ((dHeight + 1) / 2); i++) {\r\n for (int j = 0; j < ((dHeight - 1) / 2) - i; j++) {\r\n System.out.print(\" \");\r\n }\r\n for (int k = 0; k < 2 * i + 1; k++) {\r\n System.out.print(\"*\");\r\n }\r\n System.out.println();\r\n }\r\n for (int i = 0; i < ((dHeight - 1) / 2); i++) {\r\n for (int j = 0; j < i + 1; j++) {\r\n System.out.print(\" \");\r\n }\r\n for (int k = 0; k < (dHeight - 2) - 2 * i; k++) {\r\n System.out.print(\"*\");\r\n }\r\n System.out.println();\r\n }\r\n }", "public static void main(String[] args) {\n\n\t\tScanner s = new Scanner(System.in);\n\t\t\n\t\t\n\t\tint input = 0;\n\t\tString ex = \"X\";\n\t\tString star = \"*\";\n\t\tString blank = \" \";\n\t\tint num = 0;\n\t\t\n\t\tinput = s.nextInt();\n\t\t\n\t\tnum = input;\n\t\t\n\t\tfor(int i = 0; i < num; i = i + 1) {\t\n\t\t\tfor(int x = 0; x < num; x = x + 1) {\n\t\t\t\tSystem.out.print(star);\n\t\t\t}\n\n\t\t\tfor(int y = 0; y < num; y = y + 1) {\n\t\t\t\tSystem.out.print(ex);\n\t\t\t}\n\n\t\t\tfor(int z = 0; z < num; z = z + 1) {\n\t\t\t\tSystem.out.print(star);\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < num; i = i + 1) {\t\n\t\t\tfor(int x = 0; x < num; x = x + 1) {\n\t\t\t\tSystem.out.print(blank);\n\t\t\t}\n\n\t\t\tfor(int y = 0; y < num; y = y + 1) {\n\t\t\t\tSystem.out.print(ex);\n\t\t\t}\n\n\t\t\tfor(int z = 0; z < num; z = z + 1) {\n\t\t\t\tSystem.out.print(ex);\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < num; i = i + 1) {\t\n\t\t\tfor(int x = 0; x < num; x = x + 1) {\n\t\t\t\tSystem.out.print(star);\n\t\t\t}\n\n\t\t\tfor(int y = 0; y < num; y = y + 1) {\n\t\t\t\tSystem.out.print(blank);\n\t\t\t}\n\n\t\t\tfor(int z = 0; z < num; z = z + 1) {\n\t\t\t\tSystem.out.print(star);\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\t\n\t\n\t}", "public static void main (String [] args){\n Scanner kb = new Scanner(in);\r\n int i = 0;\r\n while (i < 2){\r\n out.println(\"Enter an integer:\");\r\n int n = kb.nextInt();\r\n writeVertical(n);\r\n i++;\r\n }\r\n }", "private void paintNumbers() {\n\n g2d.setColor(_BOARDCOLOR);\n g2d.drawString(\"0\", 100, 150);\n g2d.drawString(\"1\", 200, 150);\n g2d.drawString(\"2\", 300, 150);\n g2d.drawString(\"3\", 400, 150);\n g2d.drawString(\"4\", 100, 250);\n g2d.drawString(\"5\", 200, 250);\n g2d.drawString(\"6\", 300, 250);\n g2d.drawString(\"7\", 400, 250);\n g2d.drawString(\"8\", 100, 350);\n g2d.drawString(\"9\", 200, 350);\n g2d.drawString(\"10\", 300, 350);\n g2d.drawString(\"11\", 400, 350);\n g2d.drawString(\"12\", 100, 450);\n g2d.drawString(\"13\", 200, 450);\n g2d.drawString(\"14\", 300, 450);\n g2d.drawString(\"15\", 400, 450);\n }", "public static int Main()\n\t{\n\t\tint m;\n\t\tint n;\n\t\tint a;\n\t\tint b;\n\t\tint r;\n\t\tint i;\n\t\tm = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\tn = m / 2;\n\t\tfor (a = 3; a <= n; a = a + 2)\n\t\t{\n\t\t\tr = Math.ceil(Math.sqrt(a)); //?a????\n\t\t\tfor (i = 2; i <= r; i++)\n\t\t\t{\n\t\t\t\tif ((a % i) == 0)\n\t\t\t\t{\n\t\t\t\t\tbreak; //??????\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tif (i == r + 1)\n\t\t\t\t{\n\t\t\t\t\tb = m - a;\n\t\t\t\t\tr = Math.ceil(Math.sqrt(b)); //?b????\n\t\t\t\t\tfor (i = 2; i <= r; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ((b % i) == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbreak; //??????\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\tif (i == r + 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.print(a);\n\t\t\t\t\t\t\tSystem.out.print(' ');\n\t\t\t\t\t\t\tSystem.out.print(b);\n\t\t\t\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public static void main(String[] args) {\n int m, n;\n Scanner scan = new Scanner(System.in);\n m = scan.nextInt();\n n = scan.nextInt();\n int count = 0;\n if ((m>=0 && n>=0) || n>=0) {\n for (int i = m; i <= n; i++) {\n if(i>=0){\n int tmp=(int)Math.sqrt(i);\n if(tmp*tmp==i){\n System.out.printf(\"%5d\",i);\n count++;\n if(count%10==0){\n System.out.println();\n }\n }\n }\n }\n System.out.println();\n System.out.printf(\"Tong so chinh phuong doan MN: \" + count);\n } else {\n System.out.println(\"fails\");\n }\n\n }", "public static void main(String[] args) {\n\nScanner s = new Scanner(System.in);\nSystem.out.print(\"Enter number:\"); \nint n=s.nextInt();\n for(int i=2; i < 10; i++)\n {\n System.out.println(n+\" * \"+i+\" = \"+n*i);\n\n\t}\nint num=111;\nfor(int j=2;j<10;j++)\n{\n\tSystem.out.println(num*j);\n}\n}", "private void printSquareAroundPoint(int x, int y)\n {\n // System.out.println();\n }", "public static int Main()\n\t{\n\t\t//cout << \"?????????n\" << endl;\n\t\tint n; //n????????a,b,c???,y??????x??????\n\t\tint a;\n\t\tint b;\n\t\tint c;\n\t\tint y;\n\t\tint x;\n\t\tint z;\n\t\tn = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\tfor (int i = 1; i <= n; i++) //n???\n\t\t{\n\t\t\tx = 0;\n\t\t\ty = 0;\n\t\t\ta = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\t\tb = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\t\tc = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\t\tif (b > c) //?b??c\n\t\t\t{\n\t\t\t\tz = c;\n\t\t\t\tc = b;\n\t\t\t\tb = z;\n\t\t\t}\n\t\t\tif ((a % 4 == 0 && a % 100 != 0) || (a % 400 == 0)) //????\n\t\t\t{\n\t\t\t\ty = 1;\n\t\t\t}\n\t\t\tfor (; b <= c - 1; b++) //??????\n\t\t\t{\n\t\t\t\tswitch (b)\n\t\t\t\t{\n\t\t\t\tcase 1 :\n\t\t\t\tcase 3 :\n\t\t\t\tcase 5 :\n\t\t\t\tcase 7 :\n\t\t\t\tcase 8 :\n\t\t\t\tcase 10 :\n\t\t\t\tcase 12 :\n\t\t\t\t\tx = x + 31;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4 :\n\t\t\t\tcase 6 :\n\t\t\t\tcase 9 :\n\t\t\t\tcase 11 :\n\t\t\t\t\tx = x + 30;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\tx = x + 28 + y;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (x % 7 == 0) //??????????\n\t\t\t{\n\t\t\t\tSystem.out.print(\"YES\");\n\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.print(\"NO\");\n\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}", "public static void main(String[] args) {\n int height;\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Nhập chiều cao hình tam giác\");\n height = scan.nextInt();\n for(int i = 1; i <= height; ++i) {\n for(int j = height; j >i; --j) \n System.out.print(\" \");\n for(int j = 1 ; j <= 2 * i - 1; ++j) \n System.out.print(\"*\");\n System.out.println(\"\");\n }\n }", "public static void main(String[] args) {\n // ***\n // *****\n // *******\n // *********\n // *******\n // *****\n // ***\n // *\n System.out.println(\"PROBLEM 1: \");\n int numOfLines = 9;\n int midLine = (numOfLines+1)/2;\n // upper part\n for (int i = 1; i <= midLine; i++){\n //space\n for (int s = 1; s<=(midLine-i); s++){\n System.out.print(\" \");\n }\n //star\n for (int j =1; j<=(i*2-1); j++){\n System.out.print(\"*\");\n }\n System.out.println();\n }\n //Lower part\n for(int i =1;i <=(midLine-1);i++) {\n\n\n //space\n for (int s = 1; s <= i; s++){\n System.out.print(\" \");\n }\n //star\n for (int j= 1; j<=(midLine-i)*2-1; j++){\n System.out.print(\"*\");\n }\n System.out.println();\n\n }\n\n\n// Problem 2\n// Given the number of rows, create a triangle with that many rows.\n// For example, if rows = 5 then\n// *\n// **\n// ***\n// ****\n// *****\n System.out.println(\"PROBLEM 2: \");\n\n System.out.println(\"Enter the number of line (odd numbers)\");\n Scanner input = new Scanner(System.in);\n int numberOfLines = input.nextInt();\n for (int i = 1; i <= numberOfLines; i++){\n //add stars\n for (int j =1; j<=i; j++){\n System.out.print(\"*\");\n }\n System.out.println();\n\n }\n\n // Problem 3\n // Using the celsius to fahrenheit conversion, product the following table\n // |Celsius|Fahrenheit|\n // | 0 | 32 |\n // | 1 | 33.8 |\n // | 2 | 35.6 |\n // | ... | ... |\n // | 30 | 86 |\n\n System.out.println(\"PROBLEM 3: \");\n\n int celsius = 0;\n double fahrenheit;\n System.out.println(\" | \"+\"celsius\"+\"|\"+\"fahrenheit\"+\"| \");\n\n while(celsius <=30 ) {\n fahrenheit = (9.0/5.0 * celsius) + 32;\n System.out.println(\" | \" + celsius + \" | \" + fahrenheit + \" | \");\n celsius++;\n }\n\n\n // Problem 4\n // Declare a variable x with any value. Determine if x is prime.\n //Dividing the number by 2 does gain us efficiency but how could we make it more efficient? Think about 25,\n // do you need to go up to 12.5? Could you stop at a lower number?\n System.out.println(\"PROBLEM 4: \");\n\n int remainder;\n boolean isPrime = true;\n int numberToCheck = 77;\n\n for (int i = 2; i <= numberToCheck /i; i++) {\n remainder = numberToCheck % i;\n\n\n if (remainder == 0) {\n\n isPrime = false;\n break;\n }\n }\n\n if (isPrime)\n System.out.println(numberToCheck + \" is a Prime numberToCheckber\");\n else\n System.out.println(numberToCheck + \" is not a Prime numberToCheckber\");\n\n\n // Problem 5\n // The Kalebnacci sequence begins with 2 and -1 as its first and second terms.\n // After these first two elements, each subsequent element is equal to twice the previous previous term minus\n // the previous term.\n // kaleb(0) = 2\n // kaleb(1) = -1\n // kaleb(n) = 2*kaleb(n-2) - kaleb(n-1)\n // Find the nth number in the sequence\n\n System.out.println(\"PROBLEM 5: \");\n\n int n = 8;\n int a = 2;\n int b = -1;\n int c;\n System.out.print(a + \" \" + b + \" \");\n for (int i =0; i<n;i++){\n c =2*a-b;\n System.out.print(c + \" \" );\n a=b;\n b=c;\n }\n\n }", "public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n int p=sc.nextInt();\n int q=sc.nextInt();\n long i=0;\n String S=null;\n String substring1=null;\n String substring2=null;\n long square=0;\n int fsquare=0;\n int ssquare=0;\n int sum=0;\n int v=0;\n for(i=p;i<=q;i++)\n {\n square=squar(i);\n S=Long.toString(square);\n \n if(square<=9)\n { S=0+S; }\n int length=S.length();\n int d=length/2;\n String lsquare=S.substring(0,d);\n String rsquare=S.substring(d);\n fsquare=Integer.parseInt(lsquare);\n ssquare=Integer.parseInt(rsquare);\n sum=fsquare+ssquare;\n if(sum==i)\n {\n System.out.print(i);\n System.out.print(\" \");\n v=1;\n } \n } \n if(v==0)\n {\n System.out.print(\"INVALID RANGE\");\n } \n \n }", "public static void main(String[] args) {\n\tScanner sc = new Scanner(System.in);\n\tSystem.out.println(\"Enter Any Number\");\n\tint n= sc.nextInt();\n\tsc.close();\n\t//to print table upto 10\n\tfor(int i=1;i<=10;i++) {\n\t\t//5*1=5\n\t\tSystem.out.println(n+\"*\"+i+\"=\"+(n*i));\n\t\t\n\t}\n}", "public static void main(String args[])\n {\n Scanner sc =new Scanner (System.in);\n int i=sc.nextInt();\n \n for (int j=1;j<=i;j++)\n System.out.println(\"*\");\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner (System.in);\n int n;\n for (int i = 0; i < 20; i++) {\n if (i%2 == 0) {\n System.out.print(\" \");\n }else{\n n = 2*i;\n System.out.println(\"Output: \" + n);\n }\n }\n }", "public static void main(String[] args) {\n\t\tshort rowNumber = 0;\n\t\tdo\n\t\t{\n\t\t\t// get input\n\t\t\trowNumber = Short.parseShort(JOptionPane.showInputDialog(\"Enter the number of rows: \"));\n\t\t\t\n\t\t\t// tell them if there is a problem\n\t\t\tif( rowNumber %2 != 1)\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error. Number of rows must be odd.\");\n\t\t}\n\t\twhile(rowNumber % 2 != 1);\n\t\t\n\t\t// draw the top\n\t\tfor(short row = 0; row < rowNumber / 2 + 1; row++)\n\t\t{\n\t\t\t\n\t\t\t// draw the spaces\n\t\t\tfor(short spaces = 0; spaces < (int)(rowNumber / 2) - row; spaces++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\t\n\t\t\t// draw the stars\n\t\t\tfor(short stars = 0; stars < row * 2 + 1; stars++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"*\");\n\t\t\t}\n\t\t\t\n\t\t\t// drop to next row\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\t// draw the bottom\n\t\tfor(short row = 0; row < rowNumber / 2; row++)\n\t\t{\n\t\t\t\n\t\t\t// draw the spaces\n\t\t\tfor(short spaces = 0; spaces < 1 + row; spaces++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\t\n\t\t\t}\n\t\t\t\n\t\t\t// draw the stars \n\t\t\tfor(short stars = 0; stars < Math.abs(row * 2 - rowNumber + 2); stars++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"*\");\n\t\t\t}\n\t\t\t\n\t\t\t// drop to next row\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\t// exit gracefully\n\t\tSystem.exit(0);\n\n\t}", "public static void box(){\n System.out.println(\" ********************* ********************* ********************* \");\n System.out.println(\" *** *** *** *** *** *** \");\n System.out.println(\" *** 1 *** *** 2 *** *** 3 *** \");\n System.out.println(\" *** *** *** *** *** *** \");\n System.out.println(\" ********************* ********************* ********************* \"); \n }", "public static void main (String[] args){\n Scanner s=new Scanner(System.in);\n int n=s.nextInt();\n if(n%2==1)\n {\n n=n/2;\n n++;\n }\n else\n {\n n=n/2;\n }\n for(int i=1;i<=n;i++)\n {\n for(int k=1;k<=i-1;k++)\n {\n System.out.print(\" \");\n }\n for(int j=1;j<=((2*n-1)-2*(i-1));j++)\n {\n if(j==1||j==((2*n-1)-2*(i-1)))\n System.out.print(\"*\");\n else\n System.out.print(\" \");\n }\n System.out.println();\n }\n for(int i=2;i<=n;i++)\n {\n for(int k=1;k<=n-i;k++)\n {\n System.out.print(\" \");\n }\n for(int j=1;j<i*2;j++)\n {\n if(j==1||j==(i*2-1))\n System.out.print(\"*\");\n else\n System.out.print(\" \");\n }\n System.out.println();\n }\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the rows\");\n\t\tint rowsnumber = sc.nextInt();\n\t\tint m = 1;\n\n\t\t// pyramid\n\t\tfor (int i = 0; i < rowsnumber; i++) {\n\t\t\tfor (int k = rowsnumber; k >= i; k--) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor (int j = 0; j <= i; j++) {\n\t\t\t\tSystem.out.print(m++ + \" \");\n\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\n\t\t// reverse pyramid\n\n\t\tfor (int i = 0; i < rowsnumber; i++) {\n\t\t\tfor (int k = 0; k <= i; k++) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor (int j = 0; j < rowsnumber - i; j++) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\t// right angle\n\t\tfor (int i = 0; i < rowsnumber; i++) {\n\t\t\tfor (int j = 0; j <= i; j++) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t// left side right angle\n\t\tfor (int i = 0; i < rowsnumber; i++) {\n\t\t\tfor (int k = 2 * (rowsnumber - i); k >= 0; k--) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor (int j = 0; j <= i; j++) {\n\t\t\t\tSystem.out.print(\"* \");\n\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tScanner s=new Scanner (System.in);\r\n\t\tint n=s.nextInt();\r\n\t\tfor(int i=0;i<n;i++)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<=2*n;j++)\r\n\t\t\t{\r\n\t\t\t\tif(i+j==n||j-i==n)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"&\");\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\t}", "private static void chaotic(int lines) {\n Random rand = new Random();\r\n //prints out a random amout of * from 1 to 5 for every line\r\n for (int i = 0; i < lines; i++) {\r\n int length = rand.nextInt(5) + 1;\r\n for(int o = 0; o < length; o++)\r\n System.out.print(\"* \");\r\n //new line to separate lines of *\r\n System.out.println(\"\");\r\n }\r\n }", "public static void main(String[] args) {\n\t\tint num = 0;\r\n\t\tSystem.out.printf(\"*을 출력할 라인의 수를 입력하세요.>\");\r\n\t\tScanner scanner = new Scanner(System.in);\r\n\t\tString tmp = scanner.nextLine();\r\n\t\tnum = Integer.parseInt(tmp);\r\n\t\tfor (int i = 0; i < num; i++) {\r\n\t\t\tfor (int j = 0; j <= i; j++) {\r\n\t\t\t\tSystem.out.printf(\"*\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString input = br.readLine();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!input.equals(\"#\")) {\n\t\t\tint[] arr = new int[2];\n\t\t\tchar[] inputs = input.toCharArray();\n\t\t\tfor (int i = 0; i < inputs.length - 1; i++) {\n\t\t\t\tarr[inputs[i] - '0']++;\n\t\t\t}\n\t\t\t\n\t\t\tsb.append(input.substring(0, input.length() - 1));\n\t\t\tif (inputs[inputs.length - 1] == 'e') {\n\t\t\t\tif (arr[1] % 2 == 1) {\n\t\t\t\t\tsb.append(1);\n\t\t\t\t} else {\n\t\t\t\t\tsb.append(0);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (arr[1] % 2 == 1) {\n\t\t\t\t\tsb.append(0);\n\t\t\t\t} else {\n\t\t\t\t\tsb.append(1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.append(System.lineSeparator());\n\t\t\tinput = br.readLine();\n\t\t}\n\t\t\n\t\tSystem.out.print(sb.toString());\n\t}", "public static void main(String[] args) {\n String s = \"\";\n Scanner scanner = new Scanner(System.in);\n int x = scanner.nextInt();\n switch (x) {\n case 1 : s = \"You have chosen a square\";\n break;\n case 2 : s = \"You have chosen a circle\";\n break;\n case 3 : s = \"You have chosen a triangle\";\n break;\n case 4 : s = \"You have chosen a rhombus\";\n break;\n default: s = \"There is no such shape!\";\n break;\n }\n System.out.println(s);\n }", "public static void tenthProgram() {\n\t\tfor(int i=1;i<=4;i++) {\n\t\t\tfor(int j=1;j<=i-1;j++) {\n\t\t\t\tSystem.out.print(\" \");\t\t\t\n\t\t\t}for(int k=1;k<=4;k++) {\n\t\t\t\tSystem.out.print(\"*\");\t\t\n\t\t\t}System.out.println();\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tint i=17;\n\t\tfor (int j = 1; j < 11; j++) {\n\t\t\tint result = (j * i);\n\t\t\tSystem.out.println(i+\"*\" + j + \"=\" + result);\n\n\t\t}\n//Based on user Input number\n\n\t\tSystem.out.println(\"Enter the number **** : \");\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tsc.close();\n\n\t\tfor (int mul = 1; mul <= 10; mul++) {\n\t\t\tint result = (mul * a);\n\t\t\tSystem.out.println(a + \"*\" + mul + \"=\" + result);\n\t\t}\n\n\t}", "public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\r\n\t\tint n=s.nextInt();\r\n\t\tint i,j,k;\r\n\t\tfor(i=1;i<=n;i++)\r\n\t\t{\r\n\t\t\tfor(j=1;j<=(2*i)+1;j++)\r\n\t\t\t{\r\n\t\t\t\tif(j==(i+1)) {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int loopEnd = scanner.nextInt();\n for(int i=1; i <= Math.round(Math.sqrt(loopEnd));i++){\n System.out.printf(\"%d \",i*i);\n }\n }", "@Test\n\tpublic void whenDrawSquare() {\n\t\tnew Paint().draw(new Square());\n\t\tStringBuilder expected = new StringBuilder()\n\t\t\t\t.append(\"+++++++\")\n\t\t\t\t.append(System.lineSeparator())\n\t\t\t\t.append(\"+++++++\")\n\t\t\t\t.append(System.lineSeparator())\n\t\t\t\t.append(\"+++++++\")\n\t\t\t\t.append(System.lineSeparator())\n\t\t\t\t.append(\"+++++++\")\n\t\t\t\t.append(System.lineSeparator());\n\t\tassertThat(new String(out.toByteArray()), is(expected.toString()));\n\t}", "private void drawSquare(int x, int y, Color color) {\r\n\t\t// sets the color to the passed in color.\r\n\t\tg.setColor(color);\r\n\t\t// draws a rectangle based on the given properties.\r\n\t\tg.fillRect(x * TetrisGame.SQUARE_LENGTH, y * TetrisGame.SQUARE_LENGTH,\r\n\t\t\t\t TetrisGame.SQUARE_LENGTH - 1,\r\n\t\t\t\t TetrisGame.SQUARE_LENGTH - 1);\r\n\t}", "public void square(int a) {\n\t\tSystem.out.println(a * a);\n\t}", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nSystem.out.println(\"Enter how many rows you want to print:- \");\r\nint strt=sc.nextInt();\r\nint i,a;\r\nfor(i=strt;i>=1;i--) {\r\n\tfor(a=1;a<=i;a++)\r\n\t{\r\n\t\tSystem.out.print(\" * \");\r\n}System.out.println();\r\n\t}\r\n\r\n}", "public static void main(String[] Args){\n Scanner n = new Scanner(System.in);\n int N = n.nextInt();\n int j = 1;\n int count = 1;\n while (j <= N){\n if ((3*count + 2) % 4 == 0){\n count++;\n }\n else {\n System.out.print(3*count + 2);\n System.out.print(\" \");\n j++;\n count++;\n }\n }\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint row = 0;\n\t\tint star = 1;\n\t\twhile (row < n) {\n\n\t\t\tint i = 0;\n\t\t\tint val = 1;\n\t\t\twhile (i < star) {\n\t\t\t\tSystem.out.print(val + \" \");\n\t\t\t\tval = ((row - i) * val) / (i + 1);\n\t\t\t\ti++;\n\t\t\t}\n\n\t\t\trow++;\n\t\t\tSystem.out.println();\n\t\t\tstar++;\n\n\t\t}\n\n\t}", "public static void main(String[] args) {\n\t\tint num=6;\n\t\tint square = squareNum(num);\n\t\tSystem.out.print(square);\n\n\t}", "private void call(int n) {\n // System.out.println(\"\\\"\" + n + \"\\\"\\t -> \\t\" + solution.numSquares(n));\n System.out.print(solution.numSquares(n) + \",\");\n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\r\n\t System.out.println(\"보고 싶은 구구단은?\");\r\n\t int num = scanner.nextInt();\r\n\t System.out.println(\"구구단 \"+num+\"단\");\r\n\t for(int i=1;i<=9;i++) {\r\n\t\t System.out.print(num+\"*\" +i+\"=\"+i*num+\"\\t\");\r\n\t }\r\n\t \r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tScanner value = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter a number:\");\n\t\tint num = value.nextInt(); \n\t\tvalue.close();\n\n\t\tif (checkperfectsquare(num)) \n\t\t\tSystem.out.print(num+ \" is a perfect square number\"); \n\t\telse\n\t\t\tSystem.out.print(num+ \" is not a perfect square number\"); \n\t }", "private void drawNumber(Font f,String s,int x,int y){\r\n // finds width of the string when drawn\r\n FontMetrics metrics=g.getFontMetrics(f);\r\n int n=(int)metrics.stringWidth(s); \r\n g.drawString(s,x-n/2,y); \r\n \r\n }", "public static void main(String[] args) {\nint n, num=1;\nScanner input = new Scanner(System.in);\nSystem.out.println(\"please enter the number of rows for the triangle :\");\nn = input.nextInt();\nSystem.out.println(\"floyd's triangle:\");\nfor(int i=1;i<=n;i++)\n{\nfor(int j=1;j<=i;j++)\t\n{\nSystem.out.print(num + \" \");\t\nnum++;\n}\nSystem.out.println();\n}\n\t\t\n\t}", "public void draw() {\n if (numSides <= 6) {\n System.out.println(\"- - - - - -\");\n \n for (int i = numSides - 2; i < numSides; i++) {\n System.out.print(\" | \");\n for (int j = 0; j < this.value ; j++) {\n if (value == 1) {\n System.out.print(\" \");\n }\n if (i % 2 == 0) {\n System.out.print(\"*\");\n } else {\n System.out.print(\" \");\n }\n if (value == 1) {\n System.out.print(\" \");\n }\n }\n }\n System.out.println(\"\");\n System.out.println(\"- - - - - -\");\n } else {\n print();\n }\n }", "public static int calculateSquare(int x) {\n int squareOfTheInt = x * x;\n return squareOfTheInt;\n //Write a method called `calculateSquareRoot` that takes an int as a parameter and returns the square root of that integer.\n private static double calculateSquareRoot ( int x){\n return Math.sqrt(x);\n }\n\n // Write a method called `toLowerCase` that takes a String as a parameter and returns the String in lower case.\n private static String toLowerCase (String string){\n return string.toLowerCase();\n }\n\n // Write a method called `isMultiple` that takes 2 int parameters and determines if the second is a multiple of the first.\n private static boolean isMultiple ( int x, int y){\n if (y % x == 0) {\n return true;\n }\n\n\n //Write a method called `prettyInteger` that takes an int as a parameter and prints the integer surrounded by asterisks\n private static void prettyInteger ( int x){\n for (int i = 0; i < x; i++) {\n System.out.print(\"*\");\n }\n System.out.print(x);\n for (int i = 0; i < x; i++) {\n System.out.print(\"*\");\n }\n }\n\n\n // Write a method called `random` that takes 2 ints as parameters and returns a random int within that range.\n private static int random ( int x, int y){\n int randomNum = (int) (Math.random() * ((x - 1) - y)) + y;\n return randomNum;\n }\n\n\n }", "public static void main(String[] args){ //main method required for every Java program\n \n Scanner myScanner = new Scanner(System.in); //calling the scanner construction\n int length = 0; //variable length\n int width = 0; //variable width\n System.out.print(\"Input your desired length: \"); //print statement\n \n while(true){ //beginning of infinite while loop\n if(myScanner.hasNextInt()){ //if statement, blocks until there is enough information\n length = myScanner.nextInt(); //user input\n if(length <= 80){ //if statement, if length is less than or equal to 80\n break; //exits the loop\n } //nested if statement\n else{ //else statement\n System.out.print(\"Invalid input. Please enter length again: \"); //print statement\n myScanner.nextLine(); //allows user to re-type input\n } //end of else statement\n } //end of if statement\n else{ //else statement, if not an integer\n System.out.print(\"Invalid input. Please enter an integer for length: \"); //print statement\n myScanner.nextLine(); //allows user to re-type input\n } //end of else statement\n } //end of infinite while loop\n \n System.out.print(\"Input your desired width: \"); //print statement\n \n while(true){ //while loop\n if(myScanner.hasNextInt()){ //if statement, blocks until there is enough information\n width = myScanner.nextInt(); //user input\n if(width < length){ //if statement, if width is less than length\n break; //exits the loop\n } //nested if statement\n else{ //else statement\n System.out.print(\"Invalid input. Please enter width again: \"); //print statement\n myScanner.nextLine(); //allows user to re-type input\n } //end of nested else statement\n } //end of if statement \n else{ //else statement, if not an integer\n System.out.print(\"Invalid input. Please enter an integer for width: \"); //print statement\n myScanner.nextLine(); //allows user to re-type input\n } //end of else statement\n } //end of infinite while loop\n int b = 0;\n for (int a = 0; a < width; a++){ //number of lines vertically\n for (b = 0; b < length; b++){ //number of lines horizontally\n if (b / width % 2 == 0){ //knowing what set to print\n if(a == b % width){ //if statement, width = length mod width input\n System.out.print(\"#\");\n } //end of if statement\n else if(width - 1 - a == b % width){ //else if statement, width input - 1 - width = length mod width input\n System.out.print(\"/\"); //print statement\n } //end of if statement\n else{ //else statement\n System.out.print(\" \"); //else print statement\n } //end of else statement\n } //end of if statement\n else{ //end of else statement\n if(a == b % width){ //if statement, width = length mod width input\n System.out.print(\"\\\\\"); //print statement\n } //end of if statement\n else if(width - 1 - a == b % width){ //else if statement, \n System.out.print(\"#\"); //print statement\n } //end of else if statement\n else{ //else statement\n System.out.print(\" \"); //print statement\n } //else statement\n } //end of else statement\n } //end of for loop\n System.out.println(); //print statement\n } //end of for loop\n \n \n \n \n }", "public static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\r\n\t\tint n=s.nextInt();\r\n\t\tdouble sqr=Math.sqrt(n);\r\n\t\tif(sqr%2==0)\r\n\t\t{\r\n\t\t\tSystem.out.println(n+\" is a perfect Square\");\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.out.println(n+\" is a not perfect Square\");\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int input = scanner.nextInt();\n int i =1;\n while(i*i <= input){\n System.out.println(i*i++);\n }\n }", "public static void drawRectangle(int x, int y,int width, int height){\n for (int i = 0; i < y; i++) {\n System.out.println();\n }\n for (int i = 1; i < width; i++) {\n System.out.print(\"*\");\n }\n System.out.println(\"*\");\n for (int i = 0; i < height; i++) {\n System.out.print(\"*\");\n for (int j = 2; j < width; j++) {\n System.out.print(\" \");\n }\n System.out.println(\"*\");\n }\n for (int i = 0; i < width; i++) {\n System.out.print(\"*\");\n }\n\n }", "public static void main(String[] args) {\nint i,space,rows,k=0;\n Scanner sc=new Scanner(System.in);\nSystem.out.print(\"Enter number of rows\");\nrows=sc.nextInt();\nfor(i=1;i<=rows;i++)\n{\n\tfor(space=1;space<=(rows-i);space++)\n\t{\n\t\tSystem.out.print(\" \");\n\t}\n\twhile(k !=(2*i-1))\n\t{\n\t\tSystem.out.print(\"* \");\n\t\tk++;\n\t}\n\tk=0;\n\tSystem.out.println();\n}\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint num = 0;\n\t\twhile (num < 1 || num > 9) {\n\t\t\tSystem.out.println(\"enter a number between 1 and 9\");\n\t\t\tnum = sc.nextInt();\n\t\t}\n\t\tfor (int i = 1; i <= num; i++) {\n\t\t\tfor (int j = 1; j <= num; j++) {\n\t\t\t\tSystem.out.print(i + \"*\" + j + \"=\" + (i * j));\n\t\t\t\tSystem.out.println(\" \");\n\t\t\t}\n\n\t\t}\n\n\t}", "public static void main(String[] args) {\nScanner Sc= new Scanner(System.in);\nSystem.out.printf(\"Nhap vao so N = \");\nint N = Sc.nextInt();\nint S=0,i;\nfor (i=1;i<=N;i++)\n S=S+(10*i+i);\nSystem.out.printf(\"\\n%d\",S);\n\n\t}", "public void draw_square(Graphics g) {\n\t\tg.setColor(blank);\n\t\tg.fillRect(x_origin, y_origin, square_size, square_size);\n\t\t\n\t\tg.setColor(Color.black);\n\t\tg.drawRect(x_origin, y_origin, square_size, square_size);\n\t\t\n\t\tFont font = new Font(\"Courier New\", Font.BOLD, square_size / 4);\n\t\tg.setFont(font);\n\t\tg.setColor(Color.black);\n\t\tg.drawString(str_id, x_origin + (square_size / 2), y_origin + (square_size / 2));\n\t}", "private void startGame() { \n \n int body = 0;\n int column = 0;\n int end = 0;\n int fill = 0;\n int increment = 2; \n int numPerSide = 0; \n int prefixIndex = 0;\n int row = 0; \n int start = 1; \n int userNum = 0; \n \n String lineContent = \"\";\n \n // Get user input\n System.out.println(\"FOR A PRETTY DIAMOND PATTERN,\");\n System.out.print(\"TYPE IN AN ODD NUMBER BETWEEN 5 AND 21? \");\n userNum = scan.nextInt();\n System.out.println(\"\");\n \n // Calcuate number of diamonds to be drawn on each side of screen\n numPerSide = (int) (LINE_WIDTH / userNum); \n\n end = userNum; \n \n // Begin loop through each row of diamonds\n for (row = 1; row <= numPerSide; row++) {\n \n // Begin loop through top and bottom halves of each diamond\n for (body = start; increment < 0 ? body >= end : body <= end; body += increment) {\n\n lineContent = \"\";\n \n // Add whitespace\n while (lineContent.length() < ((userNum - body) / 2)) {\n lineContent += \" \";\n }\n \n // Begin loop through each column of diamonds\n for (column = 1; column <= numPerSide; column++) {\n \n prefixIndex = 1;\n \n // Begin loop that fills each diamond with characters\n for (fill = 1; fill <= body; fill++) {\n \n // Right side of diamond\n if (prefixIndex > PREFIX.length()) {\n \n lineContent += SYMBOL; \n \n }\n // Left side of diamond\n else {\n \n lineContent += PREFIX.charAt(prefixIndex - 1);\n prefixIndex++;\n \n } \n \n } // End loop that fills each diamond with characters\n \n // Column finished\n if (column == numPerSide) {\n \n break;\n \n }\n // Column not finishd\n else {\n \n // Add whitespace\n while (lineContent.length() < (userNum * column + (userNum - body) / 2)) {\n lineContent += \" \";\n }\n \n } \n \n } // End loop through each column of diamonds\n \n System.out.println(lineContent);\n\n } // End loop through top and bottom half of each diamond\n\n if (start != 1) {\n\n start = 1;\n end = userNum;\n increment = 2; \n \n }\n else {\n \n start = userNum - 2;\n end = 1;\n increment = -2; \n row--;\n\n } \n\n } // End loop through each row of diamonds\n \n }", "public static void chaos(int numbLines) {\n for (int i = 0; i < numbLines; i++) {\n // create the random\n int randNumb = (int)(Math.random()*(5 - 1 + 1)) + 1;\n \n // create a random amount of astrics\n for (int j = 0; j < randNumb - 1; j++) {\n System.out.print(\"*\");\n }\n System.out.println(\"*\");\n }\n \n \n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Unesite broj redova: \");\n\t\tScanner sc = new Scanner(System.in);\n\t\tint m = sc.nextInt();\n\t\t\n\t\tSystem.out.println(\"Unesite broj kolona: \");\n\t\tScanner sc2 = new Scanner(System.in);\n\t\tint n= sc2.nextInt();\n\t\t\n\t\tfor (int i=0; i < m; i++) {\n\t\t\tfor (int j=0; j < n; j++) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t}\n\n}", "public static void main(String[] args) {\n \n int num = 5;\n\n for(int i=1; i<=num; i++){\n\n for (int x=1; x<=i; x++){\n System.out.print(\" \");\n }\n for(int y = i; y<=num; y++ ) System.out.print(\"*\");\n\n System.out.println();\n }\n }", "public String printVerticalLine(int number){\n int count = 0;\n StringJoiner joiner = new StringJoiner(\"\\n\");\n\n while (count < number){\n joiner.add(printAsterisk());\n count = count + 1;\n }\n return joiner.toString();\n }", "public static void Tables() {\n Scanner scanner = new Scanner(System.in);\n String userResponse;\n do {\n System.out.print(\"Enter an integer here:\");\n int userInteger = scanner.nextInt();\n System.out.println(\"Here is your table!\\n\" +\n \"number | squared | cubed\\n\" +\n \"------ | ------- | -----\");\n for (int i = 1; i <= userInteger; i++) {\n System.out.printf(\"%-6d | %-7d | %-5d%n\", i, i * i, i * i * i);\n }\n System.out.println(\"\\n\\nWould you like to continue (y/n): \");\n userResponse = scanner.next();\n } while (userResponse.equals(\"y\"));\n }", "public static void main(String[] args) throws IOException {\n BufferedReader f = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n StringTokenizer st = new StringTokenizer(f.readLine());\n int a = Integer.parseInt(st.nextToken());\n int b = Integer.parseInt(st.nextToken());\n int c = Integer.parseInt(st.nextToken());\n int d = Integer.parseInt(st.nextToken());\n int x = -1;\n int y = -1;\n for(int i = 1; i < 45000; i++) {\n if(i*(i-1)/2 == a) {\n x = i;\n }\n if(i*(i-1)/2 == d) {\n y = i;\n }\n }\n if(x == -1 || y == -1) {\n out.println(\"Impossible\");\n } else {\n if(x*y == b+c) {\n int w = c/x;\n int z = c%x;\n out.println(\"1\".repeat(w)+\"0\".repeat(x-z)+\"1\".repeat(z > 0 ? 1 : 0)+\"0\".repeat(z)+\"1\".repeat(y-w-(z > 0 ? 1 : 0)));\n } else {\n if(b+c > 0) {\n out.println(\"Impossible\");\n } else if(x == 1) {\n out.println(\"1\".repeat(y));\n } else if(y == 1) {\n out.println(\"0\".repeat(x));\n } else {\n out.println(\"Impossible\");\n }\n }\n }\n f.close();\n out.close();\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Iput the number of rows \");\n\t\tint row = sc.nextInt();\n\t\tfor (int i=1;i<=row;i++) {\n\t\t\tfor (int j=row;j>=i;j--) {\n\t\t\tSystem.out.print(\" \");\n\t\t\tfor(j=1;j<=i;j++) {\n\t\t\t\tSystem.out.print(\" *\");\n\t\t\t}\n\t\tSystem.out.println();\n\t\t\t}\n\t}\n\n}", "public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n \n System.out.println(\"Enter value\");\n int n = sc.nextInt();\n \n for (int rowCount = 1; rowCount <= n; rowCount++){\n for (int space = 1; space <=n-rowCount; space++){\n System.out.print(\" \");\n }\n for (int star = 1; star<=rowCount; star++ ){\n System.out.print(\"*\");\n }\n System.out.println(\" \");\n }\n \n \n \n }", "public static int Main()\n\t{\n\t\tint x;\n\t\tint y;\n\t\tint i;\n\t\tint j;\n\t\tx = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\ty = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\tfor (i = 1;x / i > 0;i = i * 2)\n\t\t{\n\t\t;\n\t\t}\n\t\tfor (j = 1;y / j > 0;j = j * 2)\n\t\t{\n\t\t;\n\t\t}\n\t\ti = i / 2;\n\t\tj = j / 2; //i,j????2?????\n\t\tif (i > j)\n\t\t{\n\t\t\tx = x * j / i;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ty = y * i / j;\n\t\t}\n\t\twhile (x != y)\n\t\t{\n\t\t\tx = x / 2;\n\t\t\ty = y / 2;\n\t\t}\n\t\tSystem.out.print(x);\n\n\n\n\n\n\n\t}", "include <stdio.h>\nint main(){\n int n,x = 0;\n scanf(\"%d\",&n);\n for(int i=1;i <= n;i++)\n {\n for(int c=1;c <= i;c++)\n {\n if(x == 0)\n {\n printf(\"*\");\n x = 1;\n }\n else\n {\n printf(\"#\");\n x = 0;\n }\n }\n printf(\"\\n\");\n }\n return 0;\n}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Welcome to the Squares and Cubes Table\");\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString choice = \"y\";\n\t\tString table = \"\";\n\t\twhile (choice.equalsIgnoreCase(\"y\")) {\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"Enter an integer: \");\n\t\t\tint numberCtrl = sc.nextInt();\n\n\t\t\tSystem.out.println(numberCtrl);\n\n\t\t\ttable = \"Number\tSquared\tCubed \\r\" \n\t\t\t\t\t+ \"======\t=======\t===== \\r\";\n\n\t\t\tfor (int i = 1; i < (numberCtrl + 1); i++) {\n\t\t\t\tString tableRow = i + \"\\t\" + i * i + \"\\t\" + i * i * i + \"\\n\";\n\n\t\t\t\ttable += tableRow;\n\t\t\t}\n\n\t\t\tSystem.out.println(table);\n\t\t\tSystem.out.print(\"Continue? (y/n): \");\n\t\t\tchoice = sc.next();\n\t\t}\n\t}", "public static void main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n\n System.out.println(\"Input first number: \");\n int inputNumber1 = scanner.nextInt();\n\n System.out.println(\"Input second number: \");\n int inputNumber2 = scanner.nextInt();\n\n System.out.println(inputNumber1 + \" x \" + inputNumber2 + \" = \" + inputNumber1 * inputNumber2);\n\n\n // 1.5 Write a Java program that takes a number as input and prints its multiplication table upto 10.\n\n System.out.println(\"Input a number: \");\n int number1 = scanner.nextInt();\n\n for (int i = 0; i < 10; i++) {\n System.out.println(number1 + \" x \" + (i + 1) + \" = \" + (number1 * (i + 1)));\n }\n\n // 1.6 print the area and perimeter of a circle.\n\n double radius = 7.5;\n\n double perimeter = 2 * Math.PI * radius;\n double area = Math.PI * radius * radius;\n\n System.out.println(\"Perimeter is = \" + perimeter);\n System.out.println(\"Area is = \" + area);\n\n // 1.7 Write a Java program to convert temperature from Fahrenheit to Celsius degree.\n\n System.out.println(\"Input a degree in Fahrenheit:\");\n\n double fahrenheit = scanner.nextDouble();\n\n double celsius = ((fahrenheit - 32) * 5 / 9);\n\n System.out.println(fahrenheit + \" degree Fahrenheit is equal to \" + celsius + \" in Celsius\");\n\n // 1.8 Write a Java program that reads a number in inches, converts it to meters.\n\n System.out.println(\"Input a value for inch: \");\n\n double inch = scanner.nextDouble();\n double meters = inch * 0.0254;\n\n System.out.println(inch + \" inch is \" + meters + \" meters\");\n\n // 1.9 Write a Java program to get a number from the user and print whether it is positive or negative.\n\n System.out.print(\"Input a number: \");\n\n int num = scanner.nextInt();\n\n if (num > 0) {\n System.out.println(\"Number is positive\");\n } else if (num < 0) {\n System.out.println(\"Number is negative\");\n } else {\n System.out.println(\"Number is zero\");\n }\n\n // 1.10 Take three numbers from the user and print the greatest number.\n\n System.out.print(\"Input the 1st number: \");\n int num1 = scanner.nextInt();\n\n System.out.println(\"Input the 2nd number: \");\n int num2 = scanner.nextInt();\n\n System.out.println(\"Input the 3rd number: \");\n int num3 = scanner.nextInt();\n\n if ((num1 > num2) && (num1 > num3))\n System.out.println(\"The greatest: \" + num1);\n\n if ((num2 > num1) && (num2 > num3))\n System.out.println(\"The greatest: \" + num2);\n\n if ((num3 > num1) && (num3 > num2))\n System.out.println(\"The greatest: \" + num3);\n\n // 1.11 Write a program in Java to input 5 numbers from the keyboard and find their sum and average.\n\n System.out.println(\"Input the 5 numbers : \");\n\n int num5, sum = 0;\n\n for (int i = 0; i < 5; i++) {\n num5 = scanner.nextInt();\n sum = sum + num5;\n }\n\n int average = sum / 5;\n System.out.println(\"The sum of 5 no is : \" + sum + \"\\nThe Average is : \" + average);\n\n // 1.12 Write a program Check Whether Number is Even or Odd\n\n System.out.println(\"Input: \");\n int num6 = scanner.nextInt();\n\n System.out.println(\"Input: \");\n int num7 = scanner.nextInt();\n\n if (num6 % 2 == 0) {\n System.out.println(\"Even\");\n }\n if (num7 % 2 == 0) {\n System.out.println(\"Even\");\n } else {\n System.out.println(\"Odd\");\n }\n }", "public static void main(String[] args) {\n\t\tScanner rec=new Scanner(System.in);\n\t\tSystem.out.println(\"Enter base number\");\n\t\tfloat base=rec.nextFloat();\n\t\tSystem.out.println(\"Enter height number\");\n\t\tfloat height=rec.nextFloat();\n\t\t \n\t\t float area=base*height;\n\t\tSystem.out.println(\"the area of rectangle is: \"+(area=base*height));\n\t\trec.close();\n\t}", "private static void task44() {\n System.out.print(\"Enter value: \");\n int n = scanInt();\n\n String str = n + \" + \" + n + \"\" + n + \" + \" + n + \"\" + n + \"\" + n;\n System.out.println(\"\\n\" + str);\n System.out.printf(\"%d + %d%d + %d%d%d\", n, n, n, n, n, n);\n }", "public static void main(String[] args) {\n\t\tint number;\r\n\t\t\r\n\t\t//Instantiates the Scanner\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\t\r\n\t\t//Prompts user to input a number\r\n\t\tSystem.out.print(\"Starting number: \");\r\n\t\tnumber = in.nextInt();\r\n\t\t\r\n\t\tSystem.out.print(number + \"\\t\"); //Starts the pattern by printing the input then adding a tab for formatting\r\n\t\twhile (number != 1) { //while the number does not equal 1 (because once it does equal one the program should end)\r\n\t\t\tif (number % 2 == 1) { //if number is odd\r\n\t\t\t\tnumber = number * 3 + 1; //multiplies the number by 3 then adds one to it and stores it back in the number variable\r\n\t\t\t\tSystem.out.print(number + \"\\t\"); //Prints out the number then adds a tab for formatting\r\n\t\t\t}\r\n\t\t\tif (number % 2 == 0) { //if number is even\r\n\t\t\t\tnumber /= 2; //divides number by 2 and stores it back in number variable\r\n\t\t\t\tSystem.out.print(number + \"\\t\"); //Prints out the number then adds a tab for formatting\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Closes Scanner\r\n\t\tin.close();\r\n\t}", "public static void main(String[] args) {\n\r\n\t\tSystem.out.println(\"1..........Numeros del 1 al 15\");\r\n\t\tSystem.out.println(\"2..........Numeros del 20 al 2\");\r\n\t\tSystem.out.println(\"3..........Tabla del 5\");\r\n\t\tSystem.out.println(\"4..........Multiplos de 6 rango 1-100\");\r\n\t\tSystem.out.println(\"5..........Multiplos de 3 y 7 entre rango introducido\");\r\n\t\tSystem.out.println(\"6..........Rectángulo\");\r\n\t\tSystem.out.println(\"7..........Rectángulo hueco\");\r\n\t\tSystem.out.println(\"8..........Muestra los divisores\");\r\n\t\tSystem.out.println(\"9..........¿Es primo?\");\r\n\t\tSystem.out.println(\"10.........¿Cuantos primos hay entre dos numeros?\");\r\n\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tint opcion = scan.nextInt();\r\n\r\n\t\tswitch (opcion) {\r\n\t\tcase 1:\r\n\t\t\tfor (int i = 1; i <= 15; i++) {\r\n\t\t\t\tSystem.out.println(i);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tcase 2:\r\n\t\t\tfor (int i = 20; i >= 2; i -= 2) {\r\n\t\t\t\tSystem.out.println(i);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tcase 3:\r\n\t\t\tfor (int i = 1; i <= 10; i++) {\r\n\t\t\t\tint prod;\r\n\t\t\t\tprod = 5 * i;\r\n\t\t\t\tSystem.out.println(\"5 * \" + i + \" = \" + prod);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tcase 4:\r\n\t\t\tfor (int i = 0; i <= 100; i++) {\r\n\t\t\t\tif (i % 6 == 0) {\r\n\t\t\t\t\tSystem.out.println(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tcase 5:\r\n\t\t\tSystem.out.println(\"introduce un numero\");\r\n\t\t\tint usub = scan.nextInt();\r\n\t\t\tfor (int i = 1; i <= usub; i++) {\r\n\t\t\t\tif (i % 3 == 0 && i % 7 == 0) {\r\n\t\t\t\t\tSystem.out.println(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tcase 6:\r\n\t\t\tSystem.out.println(\"escribe un numero\");\r\n\t\t\tint usubo = scan.nextInt();\r\n\t\t\tSystem.out.println(\"escribe otro numero\");\r\n\t\t\tint usuboc = scan.nextInt();\r\n\t\t\tfor (int i = 1; i <= usubo; i++) {\r\n\t\t\t\tfor (int j = 1; j <= usuboc; j++) {\r\n\t\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tcase 7:\r\n\t\t\tSystem.out.println(\"escribe un numero\");\r\n\t\t\tint usubb = scan.nextInt();\r\n\t\t\tfor (int a = 1; a <= usubb; a++) {\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t\tint usu = usubb - 2;\r\n\t\t\tfor (int i = 1; i <= usu; i++) {\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t\tfor (int j = 1; j <= usu; j++) {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t}\r\n\t\t\tfor (int b = 1; b <= usubb; b++) {\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t\tbreak;\r\n\r\n\t\tcase 8:\r\n\t\t\tSystem.out.println(\"introduce un numero\");\r\n\t\t\tint max = scan.nextInt();\r\n\t\t\tfor (int i = 1; i <= max; i++) {\r\n\t\t\t\tif (max % i == 0) {\r\n\t\t\t\t\tSystem.out.println(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tcase 9:\r\n\t\t\tint cont = 0;\r\n\t\t\tSystem.out.println(\"introduce un numero\");\r\n\t\t\tint prim = scan.nextInt();\r\n\t\t\tfor (int i = 1; i <= prim; i++) {\r\n\t\t\t\tif (prim % i == 0) {\r\n\t\t\t\t\tcont++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (cont <= 2) {\r\n\t\t\t\tSystem.out.println(\"es primo\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"no es primo\");\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tcase 10:\r\n\r\n\t\t\tint inicio = scan.nextInt();\r\n\t\t\tint fin = scan.nextInt();\r\n\t\t\tint contb = 0;\r\n\t\t\tif (inicio == 1 || fin == 1) {\r\n\t\t\t\tSystem.out.println(\"Staaaaaph, el 1 da error!!\");\r\n\t\t\t} else {\r\n\t\t\t\tfor (int x = inicio; x <= fin; x++) {\r\n\t\t\t\t\tif (esPrimo(x)) {\r\n\t\t\t\t\t\tcontb++;\r\n\t\t\t\t\t\tSystem.out.print(x + \" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t\tSystem.out.print(\"en total hay \" + contb + \" numeros primos entre \" + inicio + \" y \" + fin);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase 11:\r\n\t\t\t\r\n\t System.out.println( \"Empezamos...\" );\r\n\t for (int i=1 ; i<=20 ; i++ ) {\r\n\t System.out.println( \"Comenzada la vuelta\" );\r\n\t System.out.println( i );\r\n\t if (i==15) \r\n\t continue;\r\n\t System.out.println( \"Terminada esta vuelta\" );\r\n\t }\r\n\t System.out.println( \"Terminado\" );\r\n\t break;\r\n\t\tcase 12:\r\n\t\t\t\r\n\t System.out.println( \"Empezamos...\" );\r\n\t for (int i=1 ; i<=20 ; i++ ) {\r\n\t System.out.println( \"Comenzada la vuelta\" );\r\n\t System.out.println( i );\r\n\t if (i==11) \r\n\t break;\r\n\t System.out.println( \"Terminada esta vuelta\" );\r\n\t }\r\n\t System.out.println( \"Terminado\" );\r\n\t break;\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tint n = sc.nextInt();\r\n\t\tint m = sc.nextInt();\r\n\t\tint k = sc.nextInt();\r\n\t\tfor (int i = -1; i < n*k+1; i++) {\r\n\t\t\tif (i == -1 || i == n*k) {\r\n\t\t\t\tSystem.out.println(String.format(\"+%s +\",\" -\".repeat(m*k)));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.print(\"| \");\r\n\t\t\t\tfor (int j = 0; j < m*k*2; j+=2) {\r\n\t\t\t\t\tif (i % (2*k) < k && j % (k*4) < k*2 || i % (2*k) >= k && j % (k*4) >=k *2)\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tSystem.out.print(\"* \");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"|\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "int main()\n{\n int num;\n int q,r,sum;\n cin>>num;\n q=num/10;\n r=num%10;\n sum=q+r;\n cout<<\"Alice must go in path-\";\n cout<<sum;\n}", "public static void main(String args[])\n {\n \n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int f = n/100;\n int s = ((n/10)%10);\n int t = n%10;\n int r = (t*100)+(s*10)+f;\n System.out.println(r);\n }", "public static void main(String[] args) {\n double[] xCoordinates = new double[] {0.0, 0.5, 1.0};\n double[] yCoordinates = new double[] {0.0, Math.sqrt(3)/2, 0.0};\n int n = Integer.parseInt(args[0]);\n double length = 1.0;\n StdDraw.polygon(xCoordinates, yCoordinates);\n // this will create the outlined triangle\n // now we must call the sierpinksi triangle to actually fill it so \n // we use \n sierpinski(n, 0.5, 0, length/2);\n // the x coordinates will be at the midpoint of the base therefore x is x/2 and y remains zero. \n //length will also change because you are beginning the function from the middle of the triangle's base\n\t// WRITE YOUR CODE HERE \n }", "public void print() {\n\t\tcounter++;\n\t\tSystem.out.print(counter + \" \");\n\t\tfor (int i = 0; i < size; i++) {\n\t\t for (int j = 0; j < size; j++) {\n\t\t\t\tSystem.out.print(squares[j][i].getValue());\n\t\t }\n\t\t System.out.print(\"//\");\n\t\t}\n\t\tSystem.out.println();\n }", "public static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint t = Integer.parseInt(br.readLine());\n\t\twhile (t-- != 0) {\n\t\t\tint no = Integer.parseInt(br.readLine());\n\t\t\tfor (int i = 0;; i++) {\n\t\t\t\tif (no >= Math.pow(2, i) && no < Math.pow(2, i + 1)) {\n\t\t\t\t\tSystem.out.println((int) Math.pow(2, i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void ninethProgram() {\n\t\tfor(int i=1;i<=4;i++) {\n\t\t\tfor(int j=4-1;j>=i;j--) {\n\t\t\t\tSystem.out.print(\" \");\t\n\t\t\t}for(int k=1;k<=4;k++) {\n\t\t\t\tSystem.out.print(\"*\");\t\t\n\t\t\t}System.out.println();\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t Scanner input = new Scanner(System.in);\r\n\t\t \r\n\t\t System.out.print(\"Input number of rows: \");\r\n\t\t int num = input.nextInt();\r\n\t\t \r\n\t\t for(int i=1;i<=num;i++){\r\n\t\t\t for(int j=1;j<=i;j++){\r\n\t\t\t\t System.out.print(j);\r\n\t\t\t }\r\n\t\t\t System.out.println(\" \");\r\n\t\t }\r\n\t\t \r\n\t}", "public static void main(String[] args) {\nScanner s=new Scanner(System.in);\nint a=s.nextInt();\nint b[]=new int[a];\nint c[]=new int[a];\nfor (int i = 0; i < c.length; i++) {\n\tb[i]=s.nextInt();\n\tc[i]=s.nextInt();\n}for (int i = 0; i < c.length; i++) {int count=0;\n\tfor (int j = b[i]; j <= c[i]; j++) {\n\t\t\n\t\tif(IsSquare(j)){count++;}\n\t}System.out.println(count);\n}\n\t}", "public static void calculateSquareOfNumbers() {\n int[] squareArray = new int[10];\n int squareOfNumber = 0;\n for (int i = 0; i < squareArray.length; i++) {\n squareOfNumber = (i + 1) * (i + 1);\n squareArray[i] = squareOfNumber;\n System.out.println((i + 1) + \" \" + squareOfNumber);\n }\n }", "public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n\t\tint a = s.nextInt();\n\t\tint count=1;\n\t\tint n=1;\n\t\twhile(count!=a+1)\n\t\t{\n\t\t if((3*n+2)%4!=0)\n\t\t {\n\t\t System.out.print((3*n+2)+\" \");\n\t\t count+=1;\n\t\t \n\t\t }\n\t\t n+=1;\n\t\t}\n}", "public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint num = sc.nextInt();\n\t\tint num2 = num; \n\t\tStringBuilder sb = new StringBuilder();\n\t\tStringBuilder sb2 = new StringBuilder();\n\t\t\n\t\tfor(int i=1; i<=num; ++i) {\n\t\t\tsb.append(\"**\");\n\t\t\tsb2.append(\" \");\n\t\t}\n\n\t\tfor(int i=1; i<=num; ++i) {\n\t\t\tSystem.out.println(sb2.substring(0, num-i)+sb.substring(0, 2*i-1));\n\n\t\t\tif(i==num) {//마지막까지 별을 찍고 역순으로 별을 찍기위해 while문 돌리기.\n\t\t\t\tint j=num-1;\n\t\t\t\twhile(num2-->1) {\n\t\t\t\t\tSystem.out.println(sb2.substring(0, num-j)+sb.substring(0, 2*j-1));\n\t\t\t\t\tj--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void square(int a)\n {\n System.out.println(a*a);\n }", "public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int max = 0; // max length of string\n List<String> list = new ArrayList<>();\n \n while (s.hasNextLine()) {\n String line = s.nextLine();\n max = Math.max(max, line.length());\n list.add(line);\n }\n\n System.out.println(repeat('*', max + 2));\n\n // align left first\n boolean alignLeft = true;\n\n for (String str : list) {\n int whitespace = max - str.length();\n\n // even (easy) case: divide by 2\n if (whitespace % 2 == 0) {\n System.out.print('*' + repeat(' ', whitespace / 2));\n System.out.print(str);\n System.out.println(repeat(' ', whitespace / 2) + '*');\n }\n // odd (hard) case: alternate between aligning left and right\n else {\n if (alignLeft) {\n System.out.print('*' + repeat(' ', whitespace / 2));\n System.out.print(str);\n System.out.println(repeat(' ', whitespace / 2 + 1) + '*');\n }\n else {\n System.out.print('*' + repeat(' ', whitespace / 2 + 1));\n System.out.print(str);\n System.out.println(repeat(' ', whitespace / 2) + '*');\n }\n\n alignLeft = !alignLeft;\n }\n }\n\n System.out.println(repeat('*', max + 2));\n\n s.close();\n }", "public static void main(String[] args) {\n String hash = \"#\";\n String line = \"\";\n for (int l = 0; l < 5; l++) {\n for (int i = 0; i <= 9; i++) {\n if (i != 9) {\n if (i % 2 == 0) {\n line += hash;\n } else {\n line += \" \";\n }\n } else {\n line += \"\\n\";\n }\n }\n }\n System.out.println(line);\n }", "public static void main(String[] args){\n for(int i = 23; i <= 89; i++){\n System.out.print(i + \" \");\n if(i % 10 == 2)\n System.out.print(\"\\n\"); }\n }", "public void getSquareFeet(){\n System.out.println(\"Enter the number square feet to paint: \");\n this.squareFeet = INPUT.nextDouble();\n }", "private static Square createSquare(String[] input) {\r\n int px = Integer.parseInt(input[1]);\r\n int py = Integer.parseInt(input[2]);\r\n int vx = Integer.parseInt(input[3]);\r\n int vy = Integer.parseInt(input[4]);\r\n boolean isFilled = Boolean.parseBoolean(input[5]);\r\n int side = Integer.parseInt(input[6]);\r\n float r = (float) Integer.parseInt(input[7]) / 255.0f;\r\n float g = (float) Integer.parseInt(input[8]) / 255.0f;\r\n float b = (float) Integer.parseInt(input[9]) / 255.0f;\r\n int insertionTime = Integer.parseInt(input[10]);\r\n boolean isFlashing = Boolean.parseBoolean(input[11]);\r\n float r1 = (float) Integer.parseInt(input[12]) / 255.0f;\r\n float g1 = (float) Integer.parseInt(input[13]) / 255.0f;\r\n float b1 = (float) Integer.parseInt(input[14]) / 255.0f;\r\n return new Square(insertionTime, px, py, vx, vy, side, new Color(r, g, b, 1), isFilled,\r\n isFlashing, new Color(r1, g1, b1, 1));\r\n }" ]
[ "0.6543446", "0.6322312", "0.62852925", "0.621747", "0.6180442", "0.61263055", "0.61186576", "0.6072175", "0.60704505", "0.6031757", "0.60037655", "0.5957262", "0.5941718", "0.59223145", "0.59187734", "0.58773345", "0.58720887", "0.5807651", "0.57929206", "0.579008", "0.57784444", "0.5777957", "0.57698697", "0.57546127", "0.57462394", "0.57351243", "0.57327926", "0.5701662", "0.5690429", "0.56859124", "0.5681913", "0.56672096", "0.56493616", "0.5640251", "0.5635038", "0.56252927", "0.5599858", "0.5588884", "0.5585284", "0.5582636", "0.557962", "0.5570668", "0.556839", "0.5559097", "0.55580723", "0.5550895", "0.55488366", "0.5547515", "0.5544693", "0.552298", "0.5512515", "0.55093354", "0.5506688", "0.5495444", "0.5494813", "0.54881364", "0.54691404", "0.54684967", "0.54679877", "0.54667777", "0.5459984", "0.54581296", "0.5452306", "0.5449331", "0.54451054", "0.54431134", "0.5434935", "0.5432888", "0.5431102", "0.54270995", "0.5415077", "0.54123956", "0.541007", "0.5402085", "0.5400839", "0.53981906", "0.5395301", "0.5388478", "0.5377831", "0.53772503", "0.5374029", "0.53703046", "0.5362709", "0.5361534", "0.5354932", "0.5353935", "0.5351407", "0.53511584", "0.53446436", "0.5343971", "0.5342106", "0.5331937", "0.5331364", "0.53273404", "0.53202623", "0.5319528", "0.5319192", "0.5318453", "0.5317898", "0.53143543", "0.53069854" ]
0.0
-1
Test local bindings using local and HAJNDI lookups
public void testLocalBinding() throws Exception { getLog().debug("HAJndiTestCase.testLocalBinding()"); validateUrls(); // bind to node0 locally Context naming = getContext(NODE0_JNDI); naming.bind(LOCAL0_KEY, LOCAL0_VALUE); closeContext(naming); // lookup binding locally on Node0 - should succeed naming = getContext(NODE0_JNDI); String value = (String)lookup(naming, LOCAL0_KEY); closeContext(naming); assertEquals("lookup local binding on same server", LOCAL0_VALUE, value); // lookup binding locally on Node1 - should fail naming = getContext(NODE1_JNDI); value = (String)lookup(naming, LOCAL0_KEY); closeContext(naming); assertNull("lookup local binding on different server in cluster", value); // lookup binding using HA-JNDI on Node0 - should succeed naming = getContext(NODE0_HAJNDI); value = (String)lookup(naming, LOCAL0_KEY); closeContext(naming); assertEquals("lookup local binding on same server using HA-JNDI", LOCAL0_VALUE, value); // lookup binding using HA-JNDI on Node1 - should succeed naming = getContext(NODE1_HAJNDI); value = (String)lookup(naming, LOCAL0_KEY); closeContext(naming); assertEquals("lookup local binding on different server in cluster using HA-JNDI", LOCAL0_VALUE, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testHAJndiBinding()\n throws Exception\n {\n getLog().debug(\"HAJndiTestCase.testHAJndiBinding()\");\n validateUrls();\n \n // bind to node0 using HA-JNDI\n Context naming = getContext(NODE0_HAJNDI);\n naming.bind(GLOBAL0_KEY, GLOBAL0_VALUE);\n closeContext(naming);\n \n // lookup binding locally on Node0 - should fail\n naming = getContext(NODE0_JNDI);\n String value = (String)lookup(naming, GLOBAL0_KEY);\n closeContext(naming);\n assertNull(\"lookup HA-JNDI binding on same server using local JNDI\", value);\n \n // lookup binding locally on Node1 - should fail\n naming = getContext(NODE1_JNDI);\n value = (String)lookup(naming, GLOBAL0_KEY);\n closeContext(naming);\n assertNull(\"lookup HA-JNDI binding on different server in cluster using local JNDI\", value);\n \n // lookup binding using HA-JNDI on Node0 - should succeed\n naming = getContext(NODE0_HAJNDI);\n value = (String)lookup(naming, GLOBAL0_KEY);\n closeContext(naming);\n assertEquals(\"lookup HA-JNDI binding on same server using HA-JNDI\", GLOBAL0_VALUE, value);\n \n // lookup binding using HA-JNDI on Node1 - should succeed\n naming = getContext(NODE1_HAJNDI);\n value = (String)lookup(naming, GLOBAL0_KEY);\n closeContext(naming);\n assertEquals(\"lookup HA-JNDI binding on different server in cluster using HA-JNDI\", GLOBAL0_VALUE, value);\n \n }", "public void testEJBBinding()\n throws Exception\n {\n getLog().debug(\"HAJndiTestCase.testEJBBinding()\");\n validateUrls();\n \n // CalledHome EJB is contained in cross-server.jar and bound during deployment\n \n // lookup binding locally on Node0 - should succeed\n Context naming = getContext(NODE0_JNDI);\n CalledHome home = (CalledHome)lookup(naming, CALLED_HOME_KEY);\n if (home != null)\n { // ensure that EJB is operational \n CalledRemote remote = home.create();\n remote.remove();\n }\n closeContext(naming);\n assertNotNull(\"lookup EJB binding on same server using local JNDI\", home);\n \n // lookup binding locally on Node1 - should succeed\n naming = getContext(NODE1_JNDI);\n home = (CalledHome)lookup(naming, CALLED_HOME_KEY);\n if (home != null)\n { // ensure that EJB is operational \n CalledRemote remote = home.create();\n remote.remove();\n }\n closeContext(naming);\n assertNotNull(\"lookup EJB binding on different server in cluster using local JNDI\", home);\n \n // lookup binding using HA-JNDI on Node0 - should succeed\n naming = getContext(NODE0_HAJNDI);\n home = (CalledHome)lookup(naming, CALLED_HOME_KEY);\n if (home != null)\n { // ensure that EJB is operational \n CalledRemote remote = home.create();\n remote.remove();\n }\n closeContext(naming);\n assertNotNull(\"lookup EJB binding on same server using HA-JNDI\", home);\n \n // lookup binding using HA-JNDI on Node1 - should succeed\n naming = getContext(NODE1_HAJNDI);\n home = (CalledHome)lookup(naming, CALLED_HOME_KEY);\n if (home != null)\n { // ensure that EJB is operational \n CalledRemote remote = home.create();\n remote.remove();\n }\n closeContext(naming);\n assertNotNull(\"lookup EJB binding on different server in cluster using HA-JNDI\", home);\n\n }", "@Test\n public void testGetServerLocal() throws ApplicationException {\n CommunicationFactory instance = CommunicationFactory.getFactory();\n String expResult = bundle.getString(IPropertiesConstants.COMM_LOCAL_CONNECTOR);\n String result = instance.getServer(\"localhost\").getClass().getName();\n assertEquals(expResult, result);\n }", "@Override\n @Test(groups = {\"java:comp/env access\"})\n public void testJNDI00() throws Exception {\n super.testJNDI00();\n }", "protected abstract Object doLocalLookup( Name name )\n throws NamingException;", "@Test\n\tpublic void testBindClause() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query_bind.rq\", \"/tests/basic/query_bind.srx\", false);\n\t}", "public void bind(String name, Remote ref) throws RemoteException, AlreadyBoundException;", "public static void main(String[] args) throws NamingException {\n\n\n Properties p = new Properties();\n p.put(\"remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED\", \"false\");\n p.put(\"remote.connections\", \"one\");\n p.put(\"remote.connection.one.port\", \"8080\");\n p.put(\"remote.connection.one.host\", \"localhost\");\n p.put(\"remote.connection.one.username\", \"user\");\n p.put(\"remote.connection.one.password\", \"password\");\n\n p.put(\"remote.clusters\", \"ejb\");\n p.put(\"remote.cluster.ejb.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS\", \"false\"); \n p.put(\"remote.cluster.ejb.username\", \"user\");\n p.put(\"remote.cluster.ejb.password\", \"password\");\n \n EJBClientConfiguration cc = new PropertiesBasedEJBClientConfiguration(p);\n ContextSelector<EJBClientContext> selector = new ConfigBasedEJBClientContextSelector(cc);\n EJBClientContext.setSelector(selector);\n\n Properties props = new Properties();\n props.put(Context.URL_PKG_PREFIXES, \"org.jboss.ejb.client.naming\");\n InitialContext context = new InitialContext(props);\n\n final String rcal = \"ejb:/ejbtestcase/TestClusterBean!org.ing.ejb.ejbtestcase.TestClusterInf\";\n final TestClusterInf remote = (TestClusterInf) context.lookup(rcal);\n final String result = remote.sayHello(9);\n\n System.out.println(\"sayHello succeed: \" + result);\n\t\t\n\t}", "@Test\n\tpublic void testSingleSource_SetBinding() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\n\t\ttry (RepositoryConnection conn = fedxRule.getRepository().getConnection()) {\n\n\t\t\t// SELECT query\n\t\t\tTupleQuery tq = conn\n\t\t\t\t\t.prepareTupleQuery(\"SELECT ?person WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name }\");\n\t\t\ttq.setBinding(\"name\", l(\"Alan\"));\n\t\t\tTupleQueryResult tqr = tq.evaluate();\n\t\t\tList<BindingSet> res = Iterations.asList(tqr);\n\t\t\tassertContainsAll(res, \"person\", Sets.newHashSet(iri(\"http://example.org/\", \"a\")));\n\n\t\t\t// CONSTRUCT query\n\t\t\tGraphQuery gq = conn.prepareGraphQuery(\n\t\t\t\t\t\"CONSTRUCT { ?person <http://xmlns.com/foaf/0.1/name> ?name } WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name }\");\n\t\t\tgq.setBinding(\"name\", l(\"Alan\"));\n\t\t\tGraphQueryResult gqr = gq.evaluate();\n\t\t\tList<Statement> stmts = Iterations.asList(gqr);\n\t\t\tAssertions.assertEquals(1, stmts.size());\n\t\t\tAssertions.assertEquals(iri(\"http://example.org/\", \"a\"), stmts.get(0).getSubject());\n\n\t\t\t// BOOLEAN query\n\t\t\tBooleanQuery bq = conn.prepareBooleanQuery(\"ASK { ?person <http://xmlns.com/foaf/0.1/name> ?name }\");\n\t\t\tbq.setBinding(\"name\", l(\"non-existing-name\"));\n\t\t\tAssertions.assertEquals(false, bq.evaluate());\n\n\t\t}\n\n\t}", "public boolean isBound(String name)\n {\n try\n {\n InitialContext ctx = new InitialContext();\n Object ds = ctx.lookup(name);\n if (ds == null) {\n return false;\n }\n return true;\n }\n catch (NamingException e)\n {\n return false;\n } // end of catch\n \n }", "@Test\n public void testAZMQ() {\n try {\n if (ZMQ.context(1) != null) {\n System.out.println(\"ZMQ Binding successful\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n fail(\"Unable to bind ZMQ\");\n }\n }", "@Test\n\tvoid createInitialContext() throws Exception {\n\t\tSimpleNamingContextBuilder builder = SimpleNamingContextBuilder.emptyActivatedContextBuilder();\n\t\tString name = \"foo\";\n\t\tObject o = new Object();\n\t\tbuilder.bind(name, o);\n\t\t// Check it affects JNDI\n\t\tContext ctx = new InitialContext();\n\t\tassertThat(ctx.lookup(name) == o).isTrue();\n\t\t// Check it returns mutable contexts\n\t\tctx.unbind(name);\n\t\tInitialContext badCtx1 = new InitialContext();\n\t\tassertThatExceptionOfType(NamingException.class).isThrownBy(() ->\n\t\t\t\tbadCtx1.lookup(name));\n\n\t\t// Check the same call will work again, but the context is empty\n\t\tbuilder = SimpleNamingContextBuilder.emptyActivatedContextBuilder();\n\t\tInitialContext badCtx2 = new InitialContext();\n\t\tassertThatExceptionOfType(NamingException.class).isThrownBy(() ->\n\t\t\t\tbadCtx2.lookup(name));\n\t\tObject o2 = new Object();\n\t\tbuilder.bind(name, o2);\n\t\tassertThat(o2).isEqualTo(badCtx2.lookup(name));\n\t}", "@Test\n void bindToPort()\n {\n objectUnderTest\n .bind(ProxyAdapter.class).to(SimpleApplicationService.class)\n\n .start();\n\n //Assert\n var result = objectUnderTest.getDrivingAdapter(ProxyAdapter.class)\n .getPortList()\n .stream()\n .filter( element -> SimpleApplicationService.class.equals(element.getClass()) )\n .findFirst();\n\n assertTrue(result.isPresent());\n }", "@Test\n void conditionalBindToPort()\n {\n objectUnderTest\n .conditionalBind(() -> false, ProxyAdapter.class).to(SimpleApplicationService.class)\n .start();\n\n //Assert that no binding has been performed\n var result = objectUnderTest.getDrivingAdapter(ProxyAdapter.class);\n\n assertTrue(result.getPortList().isEmpty());\n }", "private void init() {\n System.out.println(\"Binding to RMIRegistry...\");\n String theName = getConfigManager().getString(\"REMOTE_NAME\");\n if (null != theName) {\n bind(theName, this);\n } else {\n LoggingServices.getCurrent().logMsg(getClass().getName(), \"init()\"\n , \"Could not find name to bind to in registry.\"\n , \"Make sure loyalty.cfg contains a RMIREGISTRY entry.\", LoggingServices.MAJOR);\n }\n }", "@Test\n\tpublic void notifiesOnLocalChatReceived() throws AlreadyBoundException, NotBoundException\n\t{\n\t\tClientPlayerManager.getSingleton().initiateLogin(\"X\", \"X\");\n\t\tClientPlayer p = ClientPlayerManager.getSingleton().finishLogin(1);\n\t\tp.setPosition(new Position(5,5));\n\t\t\n\t\tQualifiedObserver obs = EasyMock.createMock(QualifiedObserver.class);\n\t\tChatReceivedReport report = new ChatReceivedReport(\"message\", \"sender\", ChatType.Local);\n\t\tQualifiedObservableConnector.getSingleton().registerObserver(obs,\n\t\t\t\tChatReceivedReport.class);\n\t\tobs.receiveReport(EasyMock.eq(report));\n\t\tEasyMock.replay(obs);\n\n\t\tChatManager.getSingleton().sendChatToUI(\"message\", \"sender\", new Position(0,0), ChatType.Local);\n\n\t\tEasyMock.verify(obs);\n\t}", "@Test\n public void testClient() throws Exception {\n final CandidateProvider<InetSocketAddress> stunCandidateProvider = \n new DnsSrvCandidateProvider(\"_stun._udp.littleshoot.org\");\n /*\n new SrvCandidateProvider(srv, \"_stun._udp.littleshoot.org\", \n new InetSocketAddress(\"stun.littleshoot.org\", StunConstants.STUN_PORT));\n */\n // We do this a bunch of times because the server selection is random.\n for (int i = 0; i < 20; i++) {\n final UdpStunClient client = new UdpStunClient(\n stunCandidateProvider);\n final InetSocketAddress srflx = client.getServerReflexiveAddress();\n // System.out.println(\"Got address: \"+srflx);\n assertNotNull(\"Did not get server reflexive address\", srflx);\n }\n }", "private void initializeNamingContextBindings() throws NamingException {\r\n \t\t// get the reference to the SLEE container from JNDI\r\n \t\tSleeContainer container = SleeContainer.lookupFromJndi();\r\n \t\t// get the entities name\r\n \t\tString entityName = bootstrapContext.getEntityName();\r\n \r\n \t\tResourceAdaptorEntity resourceAdaptorEntity = ((ResourceAdaptorEntity) container\r\n \t\t\t\t.getResourceAdaptorEnitity(entityName));\r\n \t\tResourceAdaptorTypeID raTypeId = resourceAdaptorEntity\r\n \t\t\t\t.getInstalledResourceAdaptor().getRaType()\r\n \t\t\t\t.getResourceAdaptorTypeID();\r\n \r\n \t\t// Bind ACI Factory in JNDI\r\n \t\tacif = new HttpServletRaActivityContextInterfaceFactoryImpl(\r\n \t\t\t\tresourceAdaptorEntity.getServiceContainer(), entityName, this);\r\n \t\t// set the ActivityContextInterfaceFactory\r\n \t\tresourceAdaptorEntity.getServiceContainer()\r\n \t\t\t\t.getActivityContextInterfaceFactories().put(raTypeId, acif);\r\n \r\n \t\ttry {\r\n \t\t\tif (this.acif != null) {\r\n \t\t\t\t// parse the string =\r\n \t\t\t\t// java:slee/resources/http-servlet-ra/http-servlet-ra-acif\r\n \t\t\t\tString jndiName = ((ResourceAdaptorActivityContextInterfaceFactory) acif)\r\n \t\t\t\t\t\t.getJndiName();\r\n \t\t\t\tint begind = jndiName.indexOf(':');\r\n \t\t\t\tint toind = jndiName.lastIndexOf('/');\r\n \t\t\t\tString prefix = jndiName.substring(begind + 1, toind);\r\n \t\t\t\tString name = jndiName.substring(toind + 1);\r\n \t\t\t\tlogger.debug(\"========================== jndiName prefix =\"\r\n \t\t\t\t\t\t+ prefix + \"; jndiName = \" + name + \" ; ACIF: \" + acif\r\n \t\t\t\t\t\t+ \"=========================\");\r\n \t\t\t\tSleeContainer.registerWithJndi(prefix, name, this.acif);\r\n \t\t\t}\r\n \t\t} catch (IndexOutOfBoundsException e) {\r\n \t\t\t// not register with JNDI\r\n \t\t\tlogger.warn(e.getMessage(), e);\r\n \t\t}\r\n \r\n \t\t// Bind HttpServletResourceEntryPoint in JNDI. It will be the bridge\r\n \t\t// between\r\n \t\t// a designated HttpServlet and the RA\r\n \t\tresourceEntryPoint = new HttpServletResourceEntryPoint(entityName, this);\r\n \r\n \t\ttry {\r\n \t\t\tif (this.resourceEntryPoint != null) {\r\n \t\t\t\t// parse the string =\r\n \t\t\t\t// java:slee/resources/http-servlet-ra/http-servlet-resource-entry-point\r\n \t\t\t\tString jndiName = resourceEntryPoint.getJndiName();\r\n \t\t\t\tint begind = jndiName.indexOf(':');\r\n \t\t\t\tint toind = jndiName.lastIndexOf('/');\r\n \t\t\t\tString prefix = jndiName.substring(begind + 1, toind);\r\n \t\t\t\tString name = jndiName.substring(toind + 1);\r\n \t\t\t\tlogger.debug(\"========================== jndiName prefix =\"\r\n \t\t\t\t\t\t+ prefix + \"; jndiName = \" + name\r\n \t\t\t\t\t\t+ \" ; Resource Entry Point: \" + resourceEntryPoint\r\n \t\t\t\t\t\t+ \"=========================\");\r\n \t\t\t\tSleeContainer.registerWithJndi(prefix, name,\r\n \t\t\t\t\t\tthis.resourceEntryPoint);\r\n \t\t\t}\r\n \t\t} catch (IndexOutOfBoundsException e) {\r\n \t\t\t// not register with JNDI\r\n \t\t\tlogger.warn(e.getMessage(), e);\r\n \t\t}\r\n \r\n \t}", "public String checkShouKuanDan(String name) throws RemoteException {\n String url = \"rmi://localhost:1098/\";\n String out=\"\";\n try {\n Context namingContext = new InitialContext();\n PbbService serv = (PbbService) namingContext.lookup(\n url + \"HelloService1\");\n out=serv.checkShouKuanDan(name);\n }\n catch (NamingException e) {\n e.printStackTrace();\n }\n return out;\n }", "public static void main(String[] args) {\n\t\ttry {\r\n\t\t\tMyRemote service = (MyRemote) Naming.lookup(\"rmi://127.0.0.1:6600/remoteTest\");\r\n\t\t\tString s = service.sayHello();\r\n\t\t\tSystem.out.println(s);\r\n\t\t} catch (MalformedURLException | RemoteException | NotBoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "boolean initializeOrbEnvirement(String args[]){\n\t\t// create and initialize the ORB\n\t\tORB orb = ORB.init(args, null);\n\n\t\ttry {\n\t\t\t// get the root naming context\n\t\t\torg.omg.CORBA.Object objRef;\n\t\t\tobjRef = orb.resolve_initial_references(\"NameService\");\n\t\t\t// Use NamingContextExt instead of NamingContext. This is part of the Interoperable naming Service. \n\t\t\tnamingContextRef = NamingContextExtHelper.narrow(objRef);\n\t\t\treturn true;\n\t\t} catch (InvalidName e) {\n\t\t\tSystem.out.println(\"Failed to resolve NameService!\");\n\t\t\t//e.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "boolean testConnection(RemoteService service);", "public static void main(String[] args) throws NamingException {\n\t\tInitialContext ctx = new InitialContext();\n\t\tObject obj = ctx.lookup(\"ProjJSF2-ear/ProjJSF2-ejb/Test!services.TestRemote\");\n\t\tTestRemote tr = (TestRemote) obj;\n\t\ttr.Consommation();\n\t}", "protected void setupLocal() {}", "public void doBindService() {\n\r\n\t\tIntent serviceIntent = new Intent(MainActivity.this, LocalService.class);\r\n\r\n\t\tstartService(serviceIntent);\r\n\t\t// bindService(serviceIntent, mServiceConnection, 0);\r\n\t\tbindService(serviceIntent, mServiceConnection, BIND_AUTO_CREATE);\r\n\r\n\t\tmIsBound = true;\r\n\t}", "protected void doBind(SocketAddress localAddress) throws Exception {}", "public void bind() {\n }", "public String lookup( String lfn, String handle ) {\n String result = null;\n for( Iterator it = this.rcIterator(); it.hasNext() ; ){\n ReplicaCatalog catalog = (ReplicaCatalog) it.next();\n\n if( (result = catalog.lookup( lfn, handle )) != null ){\n return result;\n }\n }\n return result;\n\n }", "@Test // Support of dependency injection\n void bindToPortWithDrivenAdapter()\n {\n objectUnderTest\n .addToInfrastructure(JEXXA_DRIVEN_ADAPTER)\n .bind(ProxyAdapter.class).to(ApplicationServiceWithDrivenAdapters.class)\n .start();\n\n\n //Assert\n //Assert\n var result = objectUnderTest.getDrivingAdapter(ProxyAdapter.class)\n .getPortList()\n .stream()\n .filter( element -> ApplicationServiceWithDrivenAdapters.class.equals(element.getClass()) )\n .findFirst();\n\n assertTrue(result.isPresent());\n }", "public static void bind(String name, myRemoteInterface obj) throws AlreadyBoundException, RemoteException, IOException {\n\t\tString className = obj.getClass().getCanonicalName();\n\t\tString ip = null;\n\t\ttry {\n\t\t\tip = InetAddress.getLocalHost().getHostAddress();\n \n\t\t} catch (UnknownHostException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\tString nameWithSpace = Naming.parseHostPort(name);\n\t\tString args[] = nameWithSpace.split(\" \");\n\t\t\n\t\tRemoteObjectRef newRef = new RemoteObjectRef(ip, 9999,args[2] , className,\"bind\");\n\t\t\n\t\tObjectMap.insertIntoServerMap(args[2], obj);\n\t\t\n\t\tRegistryInterface stub = null;\n\t\t try{\n\t\t\t \n\t\t\t Class<?> stub_class = Class.forName(\"registry.Registry_stub\");\n\t\t\t stub = (RegistryInterface)Class.forName(\"registry.Registry_stub\").newInstance();\n\t\t\t if(stub_class != null){\n\t\t\t\t byte[] temp = downloadToServer(stub_class, newRef);\n\t\t\t }\n\t\t} catch (InstantiationException | IllegalAccessException\n\t\t\t\t| ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tstub.bind(name, newRef);\n\t\t\n\t}", "public <T> T lookup(String jndiName);", "public static void main(String[] args) {\n\n try {\n MyRemote service = new MyRemoteImp1();\n Naming.rebind(\"Remote Hello\", service);\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "@Test\n public void nameserversTest() {\n // TODO: test nameservers\n }", "@Test\n void testRegisterBinding() {\n final var queue = new Queue(\"test\");\n final var exchange = new TopicExchange(\"testExchange\");\n final var routingKey = \"routing-key\";\n\n final var binding = BindingBuilder.bind(queue).to(exchange).with(routingKey);\n\n // When we call registry method\n contextUtils.registerBinding(\"testBinding\", binding);\n\n // Then we expect the queue to be available in the context\n final var actual = context.getBean(\"testBinding\", Binding.class);\n assertNotNull(actual);\n assertEquals(binding.getExchange(), exchange.getName());\n assertEquals(binding.getRoutingKey(), routingKey);\n }", "public static void main(String[] args) throws NamingException {\n Logger.getLogger(\"org.xnio\").setLevel(Level.WARNING);\n Logger.getLogger(\"org.jboss.remoting\").setLevel(Level.WARNING);\n Logger.getLogger(\"org.jboss.ejb.client\").setLevel(Level.WARNING);\n\n // Create the JNDI InitialContext, configuring it for use with JBoss EJB\n Hashtable<String, String> jndiProperties = new Hashtable<>();\n jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY, \"org.wildfly.naming.client.WildFlyInitialContextFactory\");\n final Context context = new InitialContext(jndiProperties);\n\n /*\n * The app name is the application name of the deployed EJBs. This is typically the ear name without the .ear suffix.\n * However, the application name could be overridden in the application.xml of the EJB deployment on the server. Since\n * we haven't deployed the application as a .ear, the app name for us will be an empty string\n */\n final String appName = \"\";\n\n /*\n * This is the module name of the deployed EJBs on the server. This is typically the jar name of the EJB deployment,\n * without the .jar suffix, but can be overridden via the ejb-jar.xml. In this example, we have deployed the EJBs in a\n * jboss-shopping-cart-server.jar, so the module name is jboss-shopping-cart-server\n */\n final String moduleName = \"shopping-cart-server\";\n\n /*\n * JBoss EAP allows each deployment to have an (optional) distinct name. We haven't specified a distinct name for our EJB\n * deployment, so this is an empty string\n */\n final String distinctName = \"\";\n\n /*\n * The EJB name which by default is the simple class name of the bean implementation class\n */\n final String beanName = ShoppingCartBean.class.getSimpleName();\n\n /* The remote view fully qualified class name */\n final String viewClassName = ShoppingCart.class.getName();\n\n /* Lookup the remote interface of the shopping cart */\n String lookupName = \"ejb:\" + appName + \"/\" + moduleName + \"/\" + distinctName + \"/\" + beanName + \"!\" + viewClassName\n + \"?stateful\";\n final ShoppingCart cart = (ShoppingCart) context.lookup(lookupName);\n\n System.out.println(\"\\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\");\n System.out.println(\"Obtained the remote interface to the shopping cart\");\n\n /* invoke on the remote interface */\n System.out.println(\"Buying a \\\"\" + ACCESSORIES_2 + \"\\\"\");\n cart.buy(ACCESSORIES_2, 1);\n System.out.println(\"Buying another \\\"\" + ACCESSORIES_2 + \"\\\"\");\n cart.buy(ACCESSORIES_2, 1);\n\n System.out.println(\"Buying a \\\"\" + ACCESSORIES_1 + \"\\\"\");\n cart.buy(ACCESSORIES_1, 1);\n\n System.out.println(\"\\nPrint cart:\");\n Map<String, Integer> cartContents = cart.getCartContents();\n for (String product : cartContents.keySet()) {\n System.out.println(cartContents.get(product) + \" \" + product);\n }\n\n System.out.println(\"\\nCheckout\");\n cart.checkout();\n\n /* Try to access the cart after checkout */\n try {\n cart.getCartContents();\n System.err.println(\"ERROR: The cart should not be available after Checkout!\");\n } catch (NoSuchEJBException e) {\n System.out.println(\"Cart was correctly removed, as expected, after Checkout and is no longer available!\");\n }\n System.out.println(\"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\\n\");\n }", "protected Object localLookup( final Name name )\n throws NamingException\n {\n final Object value = doLocalLookup( name );\n\n // Call getObjectInstance for using any object factories\n try\n {\n final Name atom = name.getPrefix( 1 );\n return m_namespace.getObjectInstance( value, atom, this, getRawEnvironment() );\n }\n catch ( final Exception e )\n {\n final NamingException ne = new NamingException( \"getObjectInstance failed\" );\n ne.setRootCause( e );\n throw ne;\n }\n }", "protected abstract void bind();", "protected abstract void bind();", "public static void main(String args[]) {\n try {\n //Cria HelloImpl\n //Runtime.getRuntime().exec(\"rmiregistry 1010\");\n //Registry registry = LocateRegistry.getRegistry(2001);\n \tSystem.setProperty(\"java.rmi.server.hostname\",\"192.168.0.30\");\n Registry registry = LocateRegistry.createRegistry(2001);\n Implementation obj = new Implementation();\n registry.bind(\"HelloServer\", obj);\n System.out.println(\"Hello Server pronto.\");\n } catch (Exception e) {\n System.out.println(\"HelloServer erro \" + e.getMessage());\n }\n }", "@Disabled\n @Test\n void testRun_nameserverQueryInTestTld_notFound() {\n persistResource(FullFieldsTestEntityHelper.makeHost(\"ns1.cat.lol\", \"1.2.3.4\"));\n newWhoisHttpAction(\"/nameserver/ns1.cat.lol\").run();\n assertThat(response.getPayload()).isEqualTo(loadFile(\"whois_action_nameserver.txt\"));\n }", "@Override\n protected void doBind(SocketAddress localAddress) throws Exception {}", "public void testSetHost() {\n }", "@Test\n public void testValidateObjectLowersActiveFlagIfConnectionHasBeenBoundButAutoBindIsNotSet() {\n expect(conn.isBindAttempted()).andReturn(true);\n // we assume autoBind defaults to false (we'd rather not go through the\n // whole process of mocking up the connection manager again)\n conn.setActive(false);\n expectLastCall().once();\n replay(conn);\n assertFalse(factory.validateObject(conn));\n }", "@Test\n public void testWildflyOpenSSL() throws Throwable {\n assumeThat(hasWildfly).isTrue();\n assertThat(bindSocketFactory(Default))\n .describedAs(\"Sockets from mode \" + Default)\n .isIn(OpenSSL, Default_JSSE);\n }", "public interface AliveCheck extends Remote {\n public boolean isAlive() throws RemoteException;\n}", "private void registerBindings(){\t\t\n\t}", "private void registerBindings(){\t\t\n\t}", "public interface DictionaryService extends Remote{\n\t/**\n\t * \n\t * @param lookup\n\t * @return <result> OR <\"String not found\">\n\t * @throws RemoteException\n\t */\n\tpublic String lookup(String wordToSearch) throws RemoteException;\n\t\n}", "private Main startJndiServer() throws Exception {\n\t\tNamingServer namingServer = new NamingServer();\n\t\tNamingContext.setLocal(namingServer);\n\t\tMain namingMain = new Main();\n\t\tnamingMain.setInstallGlobalService(true);\n\t\tnamingMain.setPort( -1 );\n\t\tnamingMain.start();\n\t\treturn namingMain;\n\t}", "@Test\n public void testWithArgs()\n {\n String sServerName = this.getClass().getName().replace(\"lambda.Remote\", \"Remote\").replace(\"Tests\", \"\") + \"_WithArgs\";\n String sClassPath = m_fIncludeTestClassInServerClasspath ? null : createClassPathExcludingTestClasses();\n String sKindLambdaInvoke = Lambdas.isStaticLambdas() ? \"static\" : \"dynamic\";\n JavaModules module = m_fIncludeTestClassInServerClasspath ? JavaModules.automatic() : JavaModules.automatic().excluding(\"io\").adding(\"com.oracle.coherence.testing\").withClassPath(new ClassPath(sClassPath));\n\n if (sClassPath != null)\n {\n System.setProperty(\"java.class.path\", sClassPath);\n }\n startCacheServer(sServerName, \"io\", getCacheConfigPath(), m_propsForServer, true, sClassPath, module);\n try\n {\n NamedCache cache = CacheFactory.getCache(\"foo\");\n Integer NInc = 2;\n\n cache.put(1, 1);\n cache.invoke(1, entry -> entry.setValue((Integer) entry.getValue() + NInc));\n\n assertFalse(sKindLambdaInvoke + \" lambda invocation must not work\", m_fServerDynamicLambdasDisabled && (m_fServerDynamicLambdasDisabled != m_fIncludeTestClassInServerClasspath));\n assertEquals(3, cache.get(1));\n }\n catch (WrapperException e)\n {\n e.printStackTrace();\n assertTrue(sKindLambdaInvoke + \" lamdba invocation failed unexpectedly: \" + e, m_fServerDynamicLambdasDisabled && !m_fIncludeTestClassInServerClasspath);\n }\n catch (PortableException e)\n {\n e.printStackTrace();\n assertTrue(m_fPOF == true && m_fServerDynamicLambdasDisabled && !m_fIncludeTestClassInServerClasspath);\n }\n finally\n {\n stopCacheServer(sServerName);\n }\n }", "public interface RemoteContextListenerInterface extends Remote\n{\n /**\n * Called when an object has been added.\n * <p>\n * The binding of the newly added object can be obtained using <tt>evt.getNewBinding()</tt>.\n * @param evt NamingEvent; The nonnull event.\n * @see NamingEvent#OBJECT_ADDED\n * @throws RemoteException on network failure\n */\n public void objectAdded(NamingEvent evt) throws RemoteException;\n\n /**\n * Called when an object has been removed.\n * <p>\n * The binding of the newly removed object can be obtained using <tt>evt.getOldBinding()</tt>.\n * @param evt NamingEvent; The nonnull event.\n * @see NamingEvent#OBJECT_REMOVED\n * @throws RemoteException on network failure\n */\n public void objectRemoved(NamingEvent evt) throws RemoteException;\n\n /**\n * Called when an object has been renamed.\n * <p>\n * The binding of the renamed object can be obtained using <tt>evt.getNewBinding()</tt>. Its old binding (before the\n * rename) can be obtained using <tt>evt.getOldBinding()</tt>. One of these may be null if the old/new binding was\n * outside the scope in which the listener has registered interest.\n * @param evt NamingEvent; The nonnull event.\n * @see NamingEvent#OBJECT_RENAMED\n * @throws RemoteException on network failure\n */\n public void objectRenamed(NamingEvent evt) throws RemoteException;\n\n /**\n * Called when an object has been changed.\n * <p>\n * The binding of the changed object can be obtained using <tt>evt.getNewBinding()</tt>. Its old binding (before the\n * change) can be obtained using <tt>evt.getOldBinding()</tt>.\n * @param evt NamingEvent; The nonnull naming event.\n * @see NamingEvent#OBJECT_CHANGED\n * @throws RemoteException on network failure.\n */\n public void objectChanged(NamingEvent evt) throws RemoteException;\n\n /**\n * Called when a naming exception is thrown while attempting to fire a <tt>NamingEvent</tt>.\n * @param evt NamingExceptionEvent; The nonnull event.\n * @throws RemoteException on network exception\n * @throws RemoteException on network failure\n */\n void namingExceptionThrown(NamingExceptionEvent evt) throws RemoteException;\n}", "@Test\n public void testCOH9787()\n {\n // Test distributed scheme with local backing map\n COH9787Helper(\"COH9787-local-BM\");\n\n // Test distributed scheme with RWBM\n COH9787Helper(\"COH9787-RWBM-local-front\");\n }", "public static void main(String[] args) {\n System.out.println(\"Begin Server...\");\n\n\n\n try {\n Remote r = Naming.lookup(\"UniversalRegistry\");\n IUniversalRegistry iur = (IUniversalRegistry)r;\n\n //on ajoute des voitures dans le registre universel\n Voiture v1 = new Voiture(1);\n iur.bind(\"v1\",v1);\n Voiture v2 = new Voiture(2);\n iur.bind(\"v2\",v2);\n\n\n //On ajoute des voitures electrique dans le registre universel\n VoitureElectrique ve = new VoitureElectrique(4,0);\n iur.bind(\"ve\",ve);\n VoitureElectrique ve1 = new VoitureElectrique(4,1);\n iur.bind(\"ve1\",ve1);\n\n VoitureElectrique ve3 = new VoitureElectrique(4,1);\n iur.bind(\"ve3\",ve3);\n\n ClassTest classTest = new ClassTest();\n iur.bind(\"cl\",classTest);\n\n\n }\n\n catch(Exception e){\n e.printStackTrace();\n }\n\n\n\n }", "protected boolean bind(POPAccessPoint accesspoint) throws POPException {\n\n\t\tif (accesspoint == null || accesspoint.isEmpty()){\n\t\t\tPOPException.throwAccessPointNotAvailableException(accesspoint);\n\t\t}\n\t\t\n\t\tComboxFactoryFinder finder = ComboxFactoryFinder.getInstance();\n\t\t\n\t\tif (combox != null){\n\t\t\tcombox.close();\n\t\t}\n\t\tcombox = finder.findFactory(Configuration.DEFAULT_PROTOCOL)\n\t\t\t\t.createClientCombox(accesspoint);\n\t\t\n\t\tif (combox.connect(accesspoint, Configuration.CONNECTION_TIMEOUT)) {\n\n\t\t\tBindStatus bindStatus = new BindStatus();\n\t\t\tbindStatus(bindStatus);\n\t\t\tswitch (bindStatus.getCode()) {\n\t\t\tcase BindStatus.BIND_OK:\n\t\t\t\tthis.getOD().setPlatform(bindStatus.getPlatform());\n\t\t\t\tnegotiateEncoding(Configuration.SELECTED_ENCODING, bindStatus\n\t\t\t\t\t\t.getPlatform());\n\t\t\t\treturn true;\n\t\t\tcase BindStatus.BIND_FORWARD_SESSION:\n\t\t\tcase BindStatus.BIND_FORWARD_PERMANENT:\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} else {\n\t\t\tPOPException.throwObjectBindException(accesspoint);\n\t\t}\n\n\t\treturn true;\n\t}", "boolean hasRemoteHost();", "private int lookup_port (String host) throws LookupException\n , NameServerContactException{\n return Integer.parseInt(lookup(host)[1]);\n }", "abstract boolean fakeHostname();", "@Test\n public void testgetHost() {\n assertEquals(\"DinoHost\", session.getHost().getName());\n }", "public void testSSLSocketStringintInetAddressint() throws Exception {\n try {\n ServerSocket ss1 = new ServerSocket(0);\n ServerSocket ss2 = new ServerSocket(0);\n SSLSocket soc = new MySSLSocket(\"localhost\", ss1.getLocalPort(),\n InetAddress.getLocalHost(), ss2.getLocalPort());\n ss1.close();\n ss2.close();\n soc.close();\n } catch (IOException e) {\n }\n }", "public void bind(String name, Object obj)\r\n {\r\n if (logger.isInfoEnabled()) {\r\n logger.info(\"Static JNDI binding: [\" + name + \"] = [\" + jndiObjectToString(obj) + \"]\");\r\n }\r\n this.boundObjects.put(name, obj);\r\n }", "public boolean locate() {\n /**\n * Print IP address and port number for registry\n */\n System.out.println(\"Client: IP Address: \" + ipAddress);\n System.out.println(\"Client: Port number \" + portNumber);\n\n /**\n * Locate registry at IP address and port number\n */\n try {\n registry = LocateRegistry.getRegistry(ipAddress, portNumber);\n registry.list();\n } catch (RemoteException ex) {\n System.out.println(\"Client: Cannot locate registry\");\n System.out.println(\"Client: RemoteException: \" + ex.getMessage());\n registry = null;\n return false;\n }\n\n /**\n * Print result locating registry\n */\n if (registry != null) {\n System.out.println(\"Client: Registry located\");\n } else {\n System.out.println(\"Client: Cannot locate registry\");\n System.out.println(\"Client: Registry is null pointer\");\n return false;\n }\n\n /**\n * Bind gamemanager using registry\n */\n if (registry != null) {\n try {\n gm = (IGameManager) registry.lookup(bindingName);\n } catch (RemoteException ex) {\n System.out.println(\"Client: Cannot bind gamemanager\");\n System.out.println(\"Client: RemoteException: \" + ex.getMessage());\n gm = null;\n } catch (NotBoundException ex) {\n System.out.println(\"Client: Cannot bind gamemanager\");\n System.out.println(\"Client: NotBoundException: \" + ex.getMessage());\n gm = null;\n }\n }\n\n /**\n * Print result binding gamemanager\n */\n if (gm != null) {\n System.out.println(\"Client: Gamemanager bound\");\n } else {\n System.out.println(\"Client: Gamemanager is null pointer\");\n return false;\n }\n\n return true;\n }", "@Test\r\n public void testLookup() {\r\n AvlPuu puu = new AvlPuu();\r\n Noodi noodi = new Noodi(0,0);\r\n noodi.setMatkaJaljella(10);\r\n noodi.setTehtyMatka(0);\r\n PuuSolmu solmu = new PuuSolmu(noodi);\r\n puu.insert(noodi);\r\n assertTrue(puu.lookup(noodi)); \r\n }", "@Override\n\tpublic void bind() {\n\t\t\n\t}", "public boolean bind() {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tBindResult bindResult = this.c.bind(this.bindDN, this.password);\r\n\t\t} catch (LDAPException e1) {\r\n\t\t\tSystem.out.println(\"Failed to bind to directory.\");\r\n\t\t\te1.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Test\n public void testUnbindFromControllerStateOtherThanInstalled() throws Throwable\n {\n // Create a new key/value pair for binding into MC\n String name = \"MyObject\";\n Object value = new Object();\n\n // Construct BMDB, adding an unmet dependency\n BeanMetaDataBuilder bmdb = BeanMetaDataBuilder.createBuilder(name, value.getClass().getName());\n bmdb.addDependency(\"SomeDependencyThatDoesn'tExist\");\n\n // Install into MC, though because of the unmet dependency will not reach \"INSTALLED\" state\n try\n {\n getBootstrap().getKernel().getController().install(bmdb.getBeanMetaData(), value);\n }\n catch (Throwable e)\n {\n throw new RuntimeException(\"Could not install at name \\\"\" + name + \"\\\" value \" + value, e);\n }\n\n // Ensure that the install didn't completely succeed\n ControllerContext context = getBootstrap().getKernel().getController().getContext(name, null);\n TestCase.assertTrue(\"The test object should not be fully installed for this test\", !context.getState().equals(\n ControllerState.INSTALLED));\n\n // Unbind\n Ejb3RegistrarLocator.locateRegistrar().unbind(name);\n\n // Check that we've unbound\n boolean isUnbound = false;\n try\n {\n Ejb3RegistrarLocator.locateRegistrar().lookup(name);\n }\n catch (NotBoundException nbe)\n {\n isUnbound = true;\n }\n TestCase.assertTrue(\"The test object should be unbound\", isUnbound);\n\n }", "public void initializeNaming(File dbDir, int orbInitialPort) throws Exception\n {\n\t// NOTE: The TransientNameService reference is NOT HA.\n new TransientNameService((com.sun.corba.ee.spi.orb.ORB)orb);\n _logger.log(Level.FINE, \"POAProtocolMgr.initializeNaming: complete\");\n }", "@BeforeClass\n\tpublic static void setUp() throws RemoteException {\n\t\tSystem.out.println(\n\t\t\t\t\"----------------------------------------Test Recovery Setting up----------------------------------------\");\n\t\tSimpleDB.init(\"simpleDB\");\n\t\t// create a registry specific for the server on the default port\n\t\treg = LocateRegistry.createRegistry(DEFAULT_PORT);\n\t\t// and post the server entry in it\n\t\treg.rebind(BINDING_NAME, new RemoteDriverImpl());\n\t\tSystem.out.println(\n\t\t\t\t\"----------------------------------------Test Recovery Set Up done----------------------------------------\");\n\t}", "public interface NamingContextFactory {\n /**\n * Determine if this factory supports the given provider and name scheme. This method is called\n * when a JNDI operation is executed on an initial context to determine which provider should handle the operation.\n * <p>\n * A context factory should evaluate the provider's type to determine if the provider is compatible with the naming\n * scheme, and should not support producing contexts for unknown providers.\n *\n * @param namingProvider the naming provider which is handling this request, or {@code null} if it is local\n * @param nameScheme the JNDI name scheme, or {@code null} if no name scheme was given\n * @return {@code true} if this factory supports the given scheme, {@code false} otherwise\n */\n boolean supportsUriScheme(NamingProvider namingProvider, String nameScheme);\n\n /**\n * Create the root context for this naming scheme. The context should capture any locally relevant information,\n * such as the relevant local security or authentication context.\n *\n * @param namingProvider the naming provider which is handling this request, or {@code null} if it is local\n * @param nameScheme the scheme in the name, or {@code null} if there is no name URL scheme\n * @param env a copy of the environment which may be consumed directly by the provider (not {@code null})\n * @param providerEnvironment the provider environment (not {@code null})\n * @return the root context (must not be {@code null})\n * @throws NamingException if the root context creation failed for some reason\n */\n Context createRootContext(NamingProvider namingProvider, String nameScheme, FastHashtable<String, Object> env, ProviderEnvironment providerEnvironment) throws NamingException;\n}", "@Test\n public void testGetServerRemoto() throws ApplicationException {\n CommunicationFactory instance = CommunicationFactory.getFactory();\n String expResult = bundle.getString(IPropertiesConstants.COMM_REMOTE_CONNECTOR);\n String result = instance.getServer(\"cmcdell\").getClass().getName();\n assertEquals(expResult, result);\n }", "public void testSSLSocketInetAddressintInetAddressint() throws Exception {\n try {\n ServerSocket ss1 = new ServerSocket(0);\n ServerSocket ss2 = new ServerSocket(0);\n SSLSocket soc = new MySSLSocket(InetAddress.getLocalHost(), ss1\n .getLocalPort(), InetAddress.getLocalHost(), ss2\n .getLocalPort());\n ss1.close();\n ss2.close();\n soc.close();\n } catch (IOException e) {\n }\n }", "public native void __setLoopback( long __swiftObject, com.johnholdsworth.swiftbindings.SwiftHelloTest.TestListener loopback );", "private void rebind() {\n\t\tnotaryServers = Client.locateNotaries();\n\t\tconnectToUsers();\n\t\t//lookUpUsers();\n\n\t}", "private void lookUpUsers() {\n\t\ttry {\n\t\t\tString[] regList = Naming.list(\"//localhost:3000\");\n\t\t\tfor (String s : regList) {\n\t\t\t\tif (!s.contains(\"Notary\") && !s.contains(this.id)) {\n\t\t\t\t\tremoteUsers\n\t\t\t\t\t\t.put(s.replace(\"//localhost:3000/\", \"\"), (UserInterface) Naming.lookup(s));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (MalformedURLException | RemoteException | NotBoundException e) {\n\t\t\tSystem.err.println(\"ERROR looking up user\");\n\t\t}\n\t}", "@Test\n public void testIsConnected() throws MainException {\n System.out.println(\"isConnected\");\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n boolean expResult = true;\n boolean result = instance.isConnected();\n assertEquals(expResult, result);\n instance.disconnect();\n result = instance.isConnected();\n assertEquals(false, result);\n\n }", "public boolean findServerByHostName() {\n\t\tboolean success = false;\n\t\tthis.serverName = textUI.getString(\"What is the hostname of the server?\");\n\t\t\n\t\ttry {\n\t\t\tthis.serverAddress = NetworkLayer.getAdressByName(this.serverName); \n\t\t\tsuccess = true;\n\t\t} catch (UnknownHostException e) {\n\t\t\ttextUI.showError(\"Something went wrong while searching for host \" + this.serverName \n\t\t\t\t\t+ \": \" + e.getLocalizedMessage());\n\t\t} \n\t\t\n\t\treturn success;\n\t}", "boolean hasHost();", "boolean hasHost();", "public void testServiceAvailable() throws Exception {\r\n\t\tServiceReference serviceReference = \r\n\t\t\tgetContext().getServiceReference(\"org.osgi.service.jndi.JNDIProviderAdmin\");\r\n\t\tassertNotNull(\"JNDIProviderAdmin service was not published as expected\", serviceReference);\r\n\t\t\r\n\t\tJNDIProviderAdmin contextAdmin = \r\n\t\t\t(JNDIProviderAdmin) getContext().getService(serviceReference);\r\n\t\tassertNotNull(\"JNDIProviderAdmin service not available via factory\", contextAdmin);\r\n\t}", "@Test\n\tpublic void canReceiveLocalMessageValid() throws AlreadyBoundException, NotBoundException\n\t{\n\t\tClientPlayerManager.getSingleton().initiateLogin(\"X\", \"X\");\n\t\tClientPlayer p = ClientPlayerManager.getSingleton().finishLogin(1);\n\t\tp.setPosition(new Position(5,5));\n\t\t\n\t\tassertTrue(ChatManager.getSingleton().canReceiveLocalMessage(new Position(5,5)));\n\t\tassertTrue(ChatManager.getSingleton().canReceiveLocalMessage(new Position(0,5)));\n\t\tassertTrue(ChatManager.getSingleton().canReceiveLocalMessage(new Position(5,0)));\n\t\tassertTrue(ChatManager.getSingleton().canReceiveLocalMessage(new Position(0,0)));\n\t\tassertTrue(ChatManager.getSingleton().canReceiveLocalMessage(new Position(6,6)));\n\t\tassertTrue(ChatManager.getSingleton().canReceiveLocalMessage(new Position(10,10)));\n\t\tassertTrue(ChatManager.getSingleton().canReceiveLocalMessage(new Position(0,10)));\n\t\tassertTrue(ChatManager.getSingleton().canReceiveLocalMessage(new Position(10,0)));\n\t}", "public static void main(String[] args) throws RemoteException{\n \r\n Registry registry= LocateRegistry.createRegistry(5099); //registrar a nuestro cliente \r\n registry.rebind(\"hello\", new ObjectRemote());\r\n }", "public void bind(String name, Object obj) {\n\t\tif (log.isInfoEnabled()) {\n\t\t\tlog.info(\"Static JNDI binding: [\" + name + \"] = [\" + obj + \"]\");\n\t\t}\n\t\tthis.boundObjects.put(name, obj);\n\t}", "@Test\n public void testLocalCalls() throws Exception {\n MBeanServer server = MBeanJMXAdapter.mbeanServer;\n assertThatThrownBy(\n () -> server.createMBean(\"FakeClassName\", new ObjectName(\"GemFire\", \"name\", \"foo\")))\n .isInstanceOf(ReflectionException.class);\n\n MBeanJMXAdapter adapter = new MBeanJMXAdapter(mock(DistributedMember.class));\n assertThatThrownBy(() -> adapter.registerMBean(mock(DynamicMBean.class),\n new ObjectName(\"MockDomain\", \"name\", \"mock\"), false))\n .isInstanceOf(ManagementException.class);\n }", "@Test\r\n\tpublic void testBogus() {\n\t\tassertLookup(\"bogus.phony.fake.namespace\",\"bogus.phony.fake.namespace\");\r\n\t}", "private void applyBindings(Bindings bindings) {\n\t\tfor (Map.Entry<String, Object> binding : bindings.entrySet()) {\n\t\t\tluaState.pushJavaObject(binding.getValue());\n\t\t\tString variableName = binding.getKey();\n\t\t\tint lastDotIndex = variableName.lastIndexOf('.');\n\t\t\tif (lastDotIndex >= 0) {\n\t\t\t\tvariableName = variableName.substring(lastDotIndex + 1);\n\t\t\t}\n\t\t\tluaState.setGlobal(variableName);\n\t\t}\n\t}", "private boolean testJNIModule() {\n\t\tfor (Iterator i = getLibraries().iterator(); i.hasNext();) {\n\t\t\tLibrary lib = (Library) i.next();\n\t\t\tif (lib.getType().equals(Library.JNI))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public interface UserAccountHandlerRemoteHome extends EJBHome {\r\n\r\n String COMP_NAME = \"java:comp/env/ejb/UserAccountHandler\";\r\n\r\n String JNDI_NAME = \"ejb/UserAccountHandler\";\r\n\r\n UserAccountHandlerRemote create() throws CreateException, RemoteException;\r\n\r\n}", "public void testContextManager() throws Exception {\n System.out.println(\"testContextManager\");\n \n // init the session information\n ThreadsPermissionContainer permissions = new ThreadsPermissionContainer();\n SessionManager.init(permissions);\n UserStoreManager userStoreManager = new UserStoreManager();\n UserSessionManager sessionManager = new UserSessionManager(permissions,\n userStoreManager);\n LoginManager.init(sessionManager,userStoreManager);\n // instanciate the thread manager\n CoadunationThreadGroup threadGroup = new CoadunationThreadGroup(sessionManager,\n userStoreManager);\n \n // add a user to the session for the current thread\n RoleManager.getInstance();\n \n InterceptorFactory.init(permissions,sessionManager,userStoreManager);\n \n // add a new user object and add to the permission\n Set set = new HashSet();\n set.add(\"test\");\n UserSession user = new UserSession(\"test1\", set);\n permissions.putSession(new Long(Thread.currentThread().getId()),\n new ThreadPermissionSession(\n new Long(Thread.currentThread().getId()),user));\n \n \n NamingDirector.init(threadGroup);\n \n Context context = new InitialContext();\n \n context.bind(\"java:comp/env/test\",\"fred\");\n context.bind(\"java:comp/env/test2\",\"fred2\");\n \n if (!context.lookup(\"java:comp/env/test\").equals(\"fred\")) {\n fail(\"Could not retrieve the value for test\");\n }\n if (!context.lookup(\"java:comp/env/test2\").equals(\"fred2\")) {\n fail(\"Could not retrieve the value for test2\");\n }\n System.out.println(\"Creating the sub context\");\n Context subContext = context.createSubcontext(\"java:comp/env/test3/test3\");\n System.out.println(\"Adding the binding for bob to the sub context\");\n subContext.bind(\"bob\",\"bob\");\n System.out.println(\"Looking up the binding for bob on the sub context.\");\n Object value = subContext.lookup(\"bob\");\n System.out.println(\"Object type is : \" + value.getClass().getName());\n if (!value.equals(\"bob\")) {\n fail(\"Could not retrieve the value bob\");\n }\n if (!context.lookup(\"java:comp/env/test3/test3/bob\").equals(\"bob\")) {\n fail(\"Could not retrieve the value bob\");\n }\n \n ClassLoader loader = new URLClassLoader(new URL[0]);\n ClassLoader original = Thread.currentThread().getContextClassLoader();\n Thread.currentThread().setContextClassLoader(loader);\n NamingDirector.getInstance().initContext();\n \n context.bind(\"java:comp/env/test5\",\"fred5\");\n if (!context.lookup(\"java:comp/env/test5\").equals(\"fred5\")) {\n fail(\"Could not retrieve the value fred5\");\n }\n \n Thread.currentThread().setContextClassLoader(original);\n \n try{\n context.lookup(\"java:comp/env/test5\");\n fail(\"Failed retrieve a value that should not exist\");\n } catch (NameNotFoundException ex) {\n // ignore\n }\n \n Thread.currentThread().setContextClassLoader(loader);\n \n NamingDirector.getInstance().releaseContext();\n \n try{\n context.lookup(\"java:comp/env/test5\");\n fail(\"Failed retrieve a value that should not exist\");\n } catch (NameNotFoundException ex) {\n // ignore\n }\n Thread.currentThread().setContextClassLoader(original);\n System.out.println(\"Add value 1\");\n context.bind(\"basic\",\"basic\");\n System.out.println(\"Add value 2\");\n context.bind(\"basic2/bob\",\"basic2\");\n if (context.lookup(\"basic\") != null) {\n fail(\"Could not retrieve the basic value from the [\" + \n context.lookup(\"basic\") + \"]\");\n }\n if (context.lookup(\"basic2/bob\") != null) {\n fail(\"Could not retrieve the basic value from the JNDI [\" +\n context.lookup(\"basic2/bob\") + \"]\");\n }\n \n try {\n context.bind(\"java:network/env/test\",\"fred\");\n fail(\"This should have thrown as only relative urls can be used \" +\n \"JNDI\");\n } catch (NamingException ex) {\n // ignore\n }\n \n try {\n context.unbind(\"java:network/env/test\");\n fail(\"This should have thrown as only relative urls can be used \" +\n \"JNDI\");\n } catch (NamingException ex) {\n // ignore\n }\n context.rebind(\"basic\",\"test1\");\n context.rebind(\"basic2/bob\",\"test2\");\n \n if (context.lookup(\"basic\") != null) {\n fail(\"Could not retrieve the basic value from the JNDI\");\n }\n if (context.lookup(\"basic2/bob\") != null) {\n fail(\"Could not retrieve the basic value from the JNDI\");\n }\n \n context.unbind(\"basic\");\n context.unbind(\"basic2/bob\");\n \n try{\n context.lookup(\"basic2/bob\");\n fail(\"The basic bob value could still be found\");\n } catch (NameNotFoundException ex) {\n // ignore\n }\n \n NamingDirector.getInstance().shutdown();\n }", "public static void main(String args[]) throws Exception {\n\t\tLocateRegistry.createRegistry(1099);\n\t\tServer remote = new ServerImpl();\n\t\t//将远程服务对象绑定到指定JNDI。\n\t\tNaming.rebind(\"rmi://localhost:1099/HelloServiceImpl\", remote);\n\t}", "public void testGetHost() {\n }", "public void activate() throws IllegalStateException, NamingException {\n\t\tlog.info(\"Activating simple JNDI environment\");\n\t\tsynchronized (initializationLock) {\n\t\t\tif (!initialized) {\n\t\t\t\tif (NamingManager.hasInitialContextFactoryBuilder()) {\n\t\t\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\t\t\"Cannot activate SimpleNamingContextBuilder: there is already a JNDI provider registered. \" +\n\t\t\t\t\t\t\t\"Note that JNDI is a JVM-wide service, shared at the JVM system class loader level, \" +\n\t\t\t\t\t\t\t\"with no reset option. As a consequence, a JNDI provider must only be registered once per JVM.\");\n\t\t\t\t}\n\t\t\t\tNamingManager.setInitialContextFactoryBuilder(this);\n\t\t\t\tinitialized = true;\n\t\t\t}\n\t\t}\n\t\tactivated = this;\n\t}", "public void testSSLSocketInetAddressint() throws Exception {\n ServerSocket ss = new ServerSocket(0);\n SSLSocket soc = new MySSLSocket(InetAddress.getLocalHost(), ss\n .getLocalPort());\n ss.close();\n soc.close();\n }", "public static void main (String[] args) {\n try {\n //System.setSecurityManager (new RMISecurityManager());\n NERegistry reg = new NERegistry (\"localhost\", 5010);\n HelloInterface_Stub hello = (HelloInterface_Stub) reg.lookup(\"hello\");\n System.out.println (hello);\n System.out.println (\"Reference: \" + hello.getRemoteObjectReference ());\n \n String a;\n if (args.length == 0) a = null;\n else a = args[0];\n \n String theGreeting = hello.sayHello (a);\n\n System.out.println (theGreeting);\n }\n catch (Exception e)\n {\n // Bad things can happen to good people\n e.printStackTrace();\n }\n }", "private void doLocalCall() {\n\n // Create the intent used to identify the bound service\n final Intent boundIntent = new Intent(this, MyLocalBoundService.class);\n\n // Lets get a reference to it (asynchronously, hence the ServiceConnection object)\n bindService(boundIntent, new ServiceConnection() {\n @Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n // Let's call it!\n ((MyLocalBoundServiceContract) service).doSomething(10);\n // We're done. Free the reference to the service\n unbindService(this);\n }\n\n @Override\n public void onServiceDisconnected(ComponentName name) {\n // Called upon unbind, just in case we need some cleanup\n }\n }, Context.BIND_AUTO_CREATE);\n }", "public static void bind(String jndiName, Object obj) {\n\t\ttry {\n\t\t\tContext ctx = new InitialContext();\n\t\t\ttry {\n\t\t\t\tctx.unbind(jndiName);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// Ignore\n\t\t\t}\n\t\t\ttry {\n\t\t\t\t// Use alternative method for JBoss\n\t\t\t\tClass<?> nonSerializableFactory = Class.forName(\"org.jboss.naming.NonSerializableFactory\");\n\t\t\t\tMethod rebind = nonSerializableFactory.getMethod(\"rebind\", Context.class, String.class, Object.class);\n\t\t\t\trebind.invoke(null, ctx, jndiName, obj);\n\t\t\t} catch (Exception e) {\n\t\t\t\tctx.rebind(jndiName, obj);\n\t\t\t}\n\n\t\t\tlog.info(\"Bound \" + obj.getClass().getName() + \" to \" + jndiName);\n\t\t} catch (NamingException e) {\n\t\t\tlog.error(\"Error in JNDI binding\", e);\n\t\t}\n\t}", "public Namespace locateEntityBinding(String name, boolean local) {\n ActiveEntity ent = (entities == null)\n ? null : entities.getEntityBinding(name);\n if (ent != null) return entities;\n return (local || nameContext == null)\n ? null : nameContext.locateEntityBinding(name, local);\n }", "@Test\n\tpublic void testExecutes() throws java.rmi.AlreadyBoundException\n\t{\n\t\tClientPlayerManager pm = ClientPlayerManager.getSingleton();\n\t\tPlayersForTest john = PlayersForTest.JOHN;\n\t\tpm.initiateLogin(john.getPlayerName(), john.getPlayerPassword());\n\n\t\ttry\n\t\t{\n\t\t\tpm.finishLogin(john.getPlayerID());\n\t\t} catch (AlreadyBoundException | NotBoundException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tfail(\"Could not create this client's player from login\");\n\t\t}\n\n\t\tArrayList<ClientPlayerQuestState> quests = new ArrayList<ClientPlayerQuestState>();\n\t\tClientPlayerQuestState q = new ClientPlayerQuestState(42, \"title\",\n\t\t\t\t\"silly\", QuestStateEnum.AVAILABLE, 42, 4, false, null);\n\t\tquests.add(q);\n\t\tLevelRecord level = new LevelRecord(\"One\", 15, 0, 0);\n\t\tint knowledgePoints = 100;\n\n\t\tCommandKnowledgePointsChanged x = new CommandKnowledgePointsChanged(\n\t\t\t\tnew InitializeThisClientsPlayerMessage(quests, 0, knowledgePoints, level));\n\t\tx.execute();\n\n\t\tThisClientsPlayer player = ClientPlayerManager.getSingleton().getThisClientsPlayer();\n\t\tassertEquals(knowledgePoints , player.getKnowledgePoints());\n\t}", "public void testGetSimppHosts() throws Exception{\n String[] hosts = new String[] {\n \"1.0.0.0.3:100\",\"2.0.0.0.3:200\",\"3.0.0.0.3:300\"};\n \n DHTSettings.DHT_BOOTSTRAP_HOSTS.setValue(hosts);\n \n //only first hex counts\n KUID id = KUID.createWithHexString(\"03ED9650238A6C576C987793C01440A0EA91A1FB\");\n Contact localNode = ContactFactory.createLocalContact(Vendor.UNKNOWN, Version.ZERO, id, 0, false);\n PrivilegedAccessor.setValue(dhtContext.getRouteTable(), \"localNode\", localNode);\n \n bootstrapper.bootstrap();\n InetSocketAddress addr = (InetSocketAddress) bootstrapper.getSimppHost();\n String address = addr.getHostName();\n int port = addr.getPort();\n assertEquals(address+\":\"+port, hosts[0]);\n \n //change first hex. Should point to last elem of the list\n id = KUID.createWithHexString(\"F3ED9650238A6C576C987793C01440A0EA91A1FB\");\n localNode = ContactFactory.createLocalContact(Vendor.UNKNOWN, Version.ZERO, id, 0, false);\n PrivilegedAccessor.setValue(dhtContext.getRouteTable(), \"localNode\", localNode);\n addr = (InetSocketAddress) bootstrapper.getSimppHost();\n address = addr.getHostName();\n port = addr.getPort();\n assertEquals(address+\":\"+port, hosts[2]);\n }", "public static void main(String[] args) throws Exception {\n\t\tProperties props = new Properties();\n\t\tprops.put(Context.INITIAL_CONTEXT_FACTORY, \"org.apache.openejb.client.RemoteInitialContextFactory\");\n\t\tprops.put(Context.PROVIDER_URL, \"ejbd://127.0.0.1:4201\");\n\t\tContext ctx = new InitialContext(props);\n\n\t\t// Look up the stateless bean example\n\t\tExampleStateless stateless = (ExampleStateless) ctx.lookup(\"ExampleStatelessBeanRemote\");\n\t\t// Perform operation on the stateless bean\n\t\tString result = stateless.sayHello();\n\t\tSystem.out.println(result);\n\n\t\t// Look up the stateful session bean example\n\t\tExampleStateful stateful = (ExampleStateful) ctx.lookup(\"ExampleStatefulBeanRemote\");\n\t\t// Notice how each run of the client will have the same output\n\t\t// Because state of the bean is kept separately for each client run\n\t\tSystem.out.println(stateful.inc());\n\t\tSystem.out.println(stateful.inc());\n\t\tSystem.out.println(stateful.reset());\n\t\tSystem.out.println(stateful.inc());\n\n\t\t// Look up the stateless bean that operates with entity beans\n\t\tExampleEntities movies = (ExampleEntities) ctx.lookup(\"ExampleEntityBeansRemote\");\n\n\t\t// Add some data\n\t\tint d1 = movies.addDirector(\"Steven Spielberg\");\n\t\tmovies.addMovie(\"Jurassic Park\", d1);\n\t\tmovies.addMovie(\"E.T. the Extra-Terrestrial\", d1);\n\t\tint d2 = movies.addDirector(\"George Lucas\");\n\t\tmovies.addMovie(\"Star Wars\", d2);\n\t\tmovies.addMovie(\"Return of the Jedi\", d2);\n\n\t\t// List the data\n\t\t// Notice how the list grows with multiple client runs because directors / movies\n\t\t// have an extra integer as a primary key, and not the names\n\t\t// Also notice that stopping and restarting the EJB server does not forget\n\t\t// the data thanks to the persistence\n\t\tList<String> list = movies.getDirectors();\n\t\tfor (String d: list) {\n\t\t\tSystem.out.println(d);\n\t\t}\n\t\tlist = movies.getDirectorsWithMovies();\n\t\tfor (String d: list) {\n\t\t\tSystem.out.println(d);\n\t\t}\n\t}", "public void testGetEndPoint2() throws Exception {\n if(DEBUG_FLAG) System.out.println(\"entered testGetEndPoint2\");\n Ivorn ivorn = new Ivorn(\"ivo://org.test/org.astrogrid.registry.RegistryService\");\n String url = rs.getEndPointByIdentifier(ivorn);\n assertNotNull(url);\n assertTrue(url.startsWith(\"http\")); \n if(DEBUG_FLAG) System.out.println(\"url = \" + url);\n System.out.println(\"exiting testGetEndPoint2\");\n }", "boolean hasServerHello();" ]
[ "0.75068545", "0.68754846", "0.62349355", "0.60956144", "0.58463323", "0.5706347", "0.5549786", "0.5488362", "0.5479589", "0.5455096", "0.54035944", "0.5344541", "0.53100646", "0.52716756", "0.52529794", "0.5243526", "0.52359927", "0.52325225", "0.52243555", "0.5206952", "0.520594", "0.51769626", "0.51569515", "0.50769305", "0.5060196", "0.5059716", "0.5028599", "0.50248736", "0.50196147", "0.50159967", "0.49899143", "0.49839416", "0.496848", "0.4923498", "0.49179655", "0.49138784", "0.4886443", "0.4886443", "0.48695093", "0.48673573", "0.4856716", "0.48487693", "0.48448002", "0.48416823", "0.48208427", "0.48203966", "0.48203966", "0.48122397", "0.48083004", "0.480109", "0.47954538", "0.47820085", "0.47782373", "0.47718805", "0.47706342", "0.4754876", "0.47481143", "0.47451913", "0.4743786", "0.4740862", "0.47356063", "0.47318178", "0.4729322", "0.47293064", "0.4728328", "0.47267625", "0.47230923", "0.47199976", "0.47184566", "0.47181857", "0.47171843", "0.47158378", "0.47132167", "0.47091445", "0.4706767", "0.4703367", "0.4703367", "0.46907207", "0.46866393", "0.46856228", "0.46845558", "0.46845055", "0.46722046", "0.46721822", "0.46720526", "0.4659012", "0.46587053", "0.4655493", "0.4640756", "0.46345922", "0.46279582", "0.46278313", "0.4616401", "0.4610974", "0.4604181", "0.46040756", "0.46037793", "0.4601631", "0.45999315", "0.4595512" ]
0.81352776
0
Test HAJNDI bindings using local and HAJNDI lookups
public void testHAJndiBinding() throws Exception { getLog().debug("HAJndiTestCase.testHAJndiBinding()"); validateUrls(); // bind to node0 using HA-JNDI Context naming = getContext(NODE0_HAJNDI); naming.bind(GLOBAL0_KEY, GLOBAL0_VALUE); closeContext(naming); // lookup binding locally on Node0 - should fail naming = getContext(NODE0_JNDI); String value = (String)lookup(naming, GLOBAL0_KEY); closeContext(naming); assertNull("lookup HA-JNDI binding on same server using local JNDI", value); // lookup binding locally on Node1 - should fail naming = getContext(NODE1_JNDI); value = (String)lookup(naming, GLOBAL0_KEY); closeContext(naming); assertNull("lookup HA-JNDI binding on different server in cluster using local JNDI", value); // lookup binding using HA-JNDI on Node0 - should succeed naming = getContext(NODE0_HAJNDI); value = (String)lookup(naming, GLOBAL0_KEY); closeContext(naming); assertEquals("lookup HA-JNDI binding on same server using HA-JNDI", GLOBAL0_VALUE, value); // lookup binding using HA-JNDI on Node1 - should succeed naming = getContext(NODE1_HAJNDI); value = (String)lookup(naming, GLOBAL0_KEY); closeContext(naming); assertEquals("lookup HA-JNDI binding on different server in cluster using HA-JNDI", GLOBAL0_VALUE, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testLocalBinding()\n throws Exception\n {\n getLog().debug(\"HAJndiTestCase.testLocalBinding()\");\n validateUrls();\n \n // bind to node0 locally\n Context naming = getContext(NODE0_JNDI);\n naming.bind(LOCAL0_KEY, LOCAL0_VALUE);\n closeContext(naming);\n \n // lookup binding locally on Node0 - should succeed\n naming = getContext(NODE0_JNDI);\n String value = (String)lookup(naming, LOCAL0_KEY);\n closeContext(naming);\n assertEquals(\"lookup local binding on same server\", LOCAL0_VALUE, value);\n \n // lookup binding locally on Node1 - should fail\n naming = getContext(NODE1_JNDI);\n value = (String)lookup(naming, LOCAL0_KEY);\n closeContext(naming);\n assertNull(\"lookup local binding on different server in cluster\", value);\n \n // lookup binding using HA-JNDI on Node0 - should succeed\n naming = getContext(NODE0_HAJNDI);\n value = (String)lookup(naming, LOCAL0_KEY);\n closeContext(naming);\n assertEquals(\"lookup local binding on same server using HA-JNDI\", LOCAL0_VALUE, value);\n \n // lookup binding using HA-JNDI on Node1 - should succeed\n naming = getContext(NODE1_HAJNDI);\n value = (String)lookup(naming, LOCAL0_KEY);\n closeContext(naming);\n assertEquals(\"lookup local binding on different server in cluster using HA-JNDI\", LOCAL0_VALUE, value);\n }", "public void testEJBBinding()\n throws Exception\n {\n getLog().debug(\"HAJndiTestCase.testEJBBinding()\");\n validateUrls();\n \n // CalledHome EJB is contained in cross-server.jar and bound during deployment\n \n // lookup binding locally on Node0 - should succeed\n Context naming = getContext(NODE0_JNDI);\n CalledHome home = (CalledHome)lookup(naming, CALLED_HOME_KEY);\n if (home != null)\n { // ensure that EJB is operational \n CalledRemote remote = home.create();\n remote.remove();\n }\n closeContext(naming);\n assertNotNull(\"lookup EJB binding on same server using local JNDI\", home);\n \n // lookup binding locally on Node1 - should succeed\n naming = getContext(NODE1_JNDI);\n home = (CalledHome)lookup(naming, CALLED_HOME_KEY);\n if (home != null)\n { // ensure that EJB is operational \n CalledRemote remote = home.create();\n remote.remove();\n }\n closeContext(naming);\n assertNotNull(\"lookup EJB binding on different server in cluster using local JNDI\", home);\n \n // lookup binding using HA-JNDI on Node0 - should succeed\n naming = getContext(NODE0_HAJNDI);\n home = (CalledHome)lookup(naming, CALLED_HOME_KEY);\n if (home != null)\n { // ensure that EJB is operational \n CalledRemote remote = home.create();\n remote.remove();\n }\n closeContext(naming);\n assertNotNull(\"lookup EJB binding on same server using HA-JNDI\", home);\n \n // lookup binding using HA-JNDI on Node1 - should succeed\n naming = getContext(NODE1_HAJNDI);\n home = (CalledHome)lookup(naming, CALLED_HOME_KEY);\n if (home != null)\n { // ensure that EJB is operational \n CalledRemote remote = home.create();\n remote.remove();\n }\n closeContext(naming);\n assertNotNull(\"lookup EJB binding on different server in cluster using HA-JNDI\", home);\n\n }", "@Override\n @Test(groups = {\"java:comp/env access\"})\n public void testJNDI00() throws Exception {\n super.testJNDI00();\n }", "public static void main(String[] args) throws NamingException {\n\n\n Properties p = new Properties();\n p.put(\"remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED\", \"false\");\n p.put(\"remote.connections\", \"one\");\n p.put(\"remote.connection.one.port\", \"8080\");\n p.put(\"remote.connection.one.host\", \"localhost\");\n p.put(\"remote.connection.one.username\", \"user\");\n p.put(\"remote.connection.one.password\", \"password\");\n\n p.put(\"remote.clusters\", \"ejb\");\n p.put(\"remote.cluster.ejb.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS\", \"false\"); \n p.put(\"remote.cluster.ejb.username\", \"user\");\n p.put(\"remote.cluster.ejb.password\", \"password\");\n \n EJBClientConfiguration cc = new PropertiesBasedEJBClientConfiguration(p);\n ContextSelector<EJBClientContext> selector = new ConfigBasedEJBClientContextSelector(cc);\n EJBClientContext.setSelector(selector);\n\n Properties props = new Properties();\n props.put(Context.URL_PKG_PREFIXES, \"org.jboss.ejb.client.naming\");\n InitialContext context = new InitialContext(props);\n\n final String rcal = \"ejb:/ejbtestcase/TestClusterBean!org.ing.ejb.ejbtestcase.TestClusterInf\";\n final TestClusterInf remote = (TestClusterInf) context.lookup(rcal);\n final String result = remote.sayHello(9);\n\n System.out.println(\"sayHello succeed: \" + result);\n\t\t\n\t}", "@Test\n\tpublic void testBindClause() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query_bind.rq\", \"/tests/basic/query_bind.srx\", false);\n\t}", "@Test\n public void testGetServerLocal() throws ApplicationException {\n CommunicationFactory instance = CommunicationFactory.getFactory();\n String expResult = bundle.getString(IPropertiesConstants.COMM_LOCAL_CONNECTOR);\n String result = instance.getServer(\"localhost\").getClass().getName();\n assertEquals(expResult, result);\n }", "private void initializeNamingContextBindings() throws NamingException {\r\n \t\t// get the reference to the SLEE container from JNDI\r\n \t\tSleeContainer container = SleeContainer.lookupFromJndi();\r\n \t\t// get the entities name\r\n \t\tString entityName = bootstrapContext.getEntityName();\r\n \r\n \t\tResourceAdaptorEntity resourceAdaptorEntity = ((ResourceAdaptorEntity) container\r\n \t\t\t\t.getResourceAdaptorEnitity(entityName));\r\n \t\tResourceAdaptorTypeID raTypeId = resourceAdaptorEntity\r\n \t\t\t\t.getInstalledResourceAdaptor().getRaType()\r\n \t\t\t\t.getResourceAdaptorTypeID();\r\n \r\n \t\t// Bind ACI Factory in JNDI\r\n \t\tacif = new HttpServletRaActivityContextInterfaceFactoryImpl(\r\n \t\t\t\tresourceAdaptorEntity.getServiceContainer(), entityName, this);\r\n \t\t// set the ActivityContextInterfaceFactory\r\n \t\tresourceAdaptorEntity.getServiceContainer()\r\n \t\t\t\t.getActivityContextInterfaceFactories().put(raTypeId, acif);\r\n \r\n \t\ttry {\r\n \t\t\tif (this.acif != null) {\r\n \t\t\t\t// parse the string =\r\n \t\t\t\t// java:slee/resources/http-servlet-ra/http-servlet-ra-acif\r\n \t\t\t\tString jndiName = ((ResourceAdaptorActivityContextInterfaceFactory) acif)\r\n \t\t\t\t\t\t.getJndiName();\r\n \t\t\t\tint begind = jndiName.indexOf(':');\r\n \t\t\t\tint toind = jndiName.lastIndexOf('/');\r\n \t\t\t\tString prefix = jndiName.substring(begind + 1, toind);\r\n \t\t\t\tString name = jndiName.substring(toind + 1);\r\n \t\t\t\tlogger.debug(\"========================== jndiName prefix =\"\r\n \t\t\t\t\t\t+ prefix + \"; jndiName = \" + name + \" ; ACIF: \" + acif\r\n \t\t\t\t\t\t+ \"=========================\");\r\n \t\t\t\tSleeContainer.registerWithJndi(prefix, name, this.acif);\r\n \t\t\t}\r\n \t\t} catch (IndexOutOfBoundsException e) {\r\n \t\t\t// not register with JNDI\r\n \t\t\tlogger.warn(e.getMessage(), e);\r\n \t\t}\r\n \r\n \t\t// Bind HttpServletResourceEntryPoint in JNDI. It will be the bridge\r\n \t\t// between\r\n \t\t// a designated HttpServlet and the RA\r\n \t\tresourceEntryPoint = new HttpServletResourceEntryPoint(entityName, this);\r\n \r\n \t\ttry {\r\n \t\t\tif (this.resourceEntryPoint != null) {\r\n \t\t\t\t// parse the string =\r\n \t\t\t\t// java:slee/resources/http-servlet-ra/http-servlet-resource-entry-point\r\n \t\t\t\tString jndiName = resourceEntryPoint.getJndiName();\r\n \t\t\t\tint begind = jndiName.indexOf(':');\r\n \t\t\t\tint toind = jndiName.lastIndexOf('/');\r\n \t\t\t\tString prefix = jndiName.substring(begind + 1, toind);\r\n \t\t\t\tString name = jndiName.substring(toind + 1);\r\n \t\t\t\tlogger.debug(\"========================== jndiName prefix =\"\r\n \t\t\t\t\t\t+ prefix + \"; jndiName = \" + name\r\n \t\t\t\t\t\t+ \" ; Resource Entry Point: \" + resourceEntryPoint\r\n \t\t\t\t\t\t+ \"=========================\");\r\n \t\t\t\tSleeContainer.registerWithJndi(prefix, name,\r\n \t\t\t\t\t\tthis.resourceEntryPoint);\r\n \t\t\t}\r\n \t\t} catch (IndexOutOfBoundsException e) {\r\n \t\t\t// not register with JNDI\r\n \t\t\tlogger.warn(e.getMessage(), e);\r\n \t\t}\r\n \r\n \t}", "protected abstract Object doLocalLookup( Name name )\n throws NamingException;", "public String checkShouKuanDan(String name) throws RemoteException {\n String url = \"rmi://localhost:1098/\";\n String out=\"\";\n try {\n Context namingContext = new InitialContext();\n PbbService serv = (PbbService) namingContext.lookup(\n url + \"HelloService1\");\n out=serv.checkShouKuanDan(name);\n }\n catch (NamingException e) {\n e.printStackTrace();\n }\n return out;\n }", "public <T> T lookup(String jndiName);", "public static void main(String[] args) throws NamingException {\n Logger.getLogger(\"org.xnio\").setLevel(Level.WARNING);\n Logger.getLogger(\"org.jboss.remoting\").setLevel(Level.WARNING);\n Logger.getLogger(\"org.jboss.ejb.client\").setLevel(Level.WARNING);\n\n // Create the JNDI InitialContext, configuring it for use with JBoss EJB\n Hashtable<String, String> jndiProperties = new Hashtable<>();\n jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY, \"org.wildfly.naming.client.WildFlyInitialContextFactory\");\n final Context context = new InitialContext(jndiProperties);\n\n /*\n * The app name is the application name of the deployed EJBs. This is typically the ear name without the .ear suffix.\n * However, the application name could be overridden in the application.xml of the EJB deployment on the server. Since\n * we haven't deployed the application as a .ear, the app name for us will be an empty string\n */\n final String appName = \"\";\n\n /*\n * This is the module name of the deployed EJBs on the server. This is typically the jar name of the EJB deployment,\n * without the .jar suffix, but can be overridden via the ejb-jar.xml. In this example, we have deployed the EJBs in a\n * jboss-shopping-cart-server.jar, so the module name is jboss-shopping-cart-server\n */\n final String moduleName = \"shopping-cart-server\";\n\n /*\n * JBoss EAP allows each deployment to have an (optional) distinct name. We haven't specified a distinct name for our EJB\n * deployment, so this is an empty string\n */\n final String distinctName = \"\";\n\n /*\n * The EJB name which by default is the simple class name of the bean implementation class\n */\n final String beanName = ShoppingCartBean.class.getSimpleName();\n\n /* The remote view fully qualified class name */\n final String viewClassName = ShoppingCart.class.getName();\n\n /* Lookup the remote interface of the shopping cart */\n String lookupName = \"ejb:\" + appName + \"/\" + moduleName + \"/\" + distinctName + \"/\" + beanName + \"!\" + viewClassName\n + \"?stateful\";\n final ShoppingCart cart = (ShoppingCart) context.lookup(lookupName);\n\n System.out.println(\"\\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\");\n System.out.println(\"Obtained the remote interface to the shopping cart\");\n\n /* invoke on the remote interface */\n System.out.println(\"Buying a \\\"\" + ACCESSORIES_2 + \"\\\"\");\n cart.buy(ACCESSORIES_2, 1);\n System.out.println(\"Buying another \\\"\" + ACCESSORIES_2 + \"\\\"\");\n cart.buy(ACCESSORIES_2, 1);\n\n System.out.println(\"Buying a \\\"\" + ACCESSORIES_1 + \"\\\"\");\n cart.buy(ACCESSORIES_1, 1);\n\n System.out.println(\"\\nPrint cart:\");\n Map<String, Integer> cartContents = cart.getCartContents();\n for (String product : cartContents.keySet()) {\n System.out.println(cartContents.get(product) + \" \" + product);\n }\n\n System.out.println(\"\\nCheckout\");\n cart.checkout();\n\n /* Try to access the cart after checkout */\n try {\n cart.getCartContents();\n System.err.println(\"ERROR: The cart should not be available after Checkout!\");\n } catch (NoSuchEJBException e) {\n System.out.println(\"Cart was correctly removed, as expected, after Checkout and is no longer available!\");\n }\n System.out.println(\"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\\n\");\n }", "public static void main(String[] args) throws NamingException {\n\t\tInitialContext ctx = new InitialContext();\n\t\tObject obj = ctx.lookup(\"ProjJSF2-ear/ProjJSF2-ejb/Test!services.TestRemote\");\n\t\tTestRemote tr = (TestRemote) obj;\n\t\ttr.Consommation();\n\t}", "public static void main(String[] args) {\n\t\t\ntry {\n\t\t\t\n\t\t\t// Create Properties for JNDI InitialContext.\n\t\t\tProperties prop = new Properties();\n\t\t\tprop.put(Context.INITIAL_CONTEXT_FACTORY, org.jboss.naming.remote.client.InitialContextFactory.class.getName()); \n\t\t\tprop.put(Context.URL_PKG_PREFIXES, \"org.jboss.ejb.client.naming\");\n\t\t\tprop.put(Context.PROVIDER_URL, \"http-remoting://localhost:8080\");\n\t\t\tprop.put(\"jboss.naming.client.ejb.context\", true);\n\t\t\t\n\n\t\t\t// Create the JNDI InitialContext.\n\t\t\tContext context = new InitialContext(prop);\n\t\t\t\n\t\t\t// Formulate the full JNDI name for the Diary session bean.\n\t\t\tString appName = \"MarketDataAnalyser\";\n\t\t\tString moduleName = \"MarketDataAnalyserEJB\";\n\t\t\tString beanName = \"MarketDataAnalyserBean\";\n\t\t\tString packageName = \"market.dataanalyser.ejb\";\n\t\t\tString className = \"MarketDataAnalyserBeanRemote\";\n\t\t\t\n\t\t\t// Lookup the bean using the full JNDI name.\n\t\t\tString fullJndiName = String.format(\"%s/%s/%s!%s.%s\", appName, moduleName, beanName, packageName, className);\n\t\t\tSystem.out.println(fullJndiName);\n\t\t\tMarketDataAnalyserBeanRemote bean = (MarketDataAnalyserBeanRemote) context.lookup(fullJndiName);\n\n\t\t\tList<String> stockList=bean.listAllStocks();\n\t\t\t\n//\t\t\tfor(String elem: stockList){\n//\t\t\t\tSystem.out.println(elem);\n//\t\t\t}\n\t\t\tSystem.out.println(\"no. of elements: \"+stockList.size());\n\t\t\tNasdaq data=(Nasdaq)bean.fetchStockDetails(\"AACC\");\n\t\t\tSystem.out.println(data.toString());\n\t\t\t\n\t\t\tbean.fetchStockVariation(\"AACC\", 20110103, 20110113);\n\t\t\t//bean.IsArrowUp(\"AACC\");\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\tSystem.out.println(\"Exception: \" + ex.getMessage());\n\t\t}\n\t}", "@Test\n\tpublic void testSingleSource_SetBinding() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\n\t\ttry (RepositoryConnection conn = fedxRule.getRepository().getConnection()) {\n\n\t\t\t// SELECT query\n\t\t\tTupleQuery tq = conn\n\t\t\t\t\t.prepareTupleQuery(\"SELECT ?person WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name }\");\n\t\t\ttq.setBinding(\"name\", l(\"Alan\"));\n\t\t\tTupleQueryResult tqr = tq.evaluate();\n\t\t\tList<BindingSet> res = Iterations.asList(tqr);\n\t\t\tassertContainsAll(res, \"person\", Sets.newHashSet(iri(\"http://example.org/\", \"a\")));\n\n\t\t\t// CONSTRUCT query\n\t\t\tGraphQuery gq = conn.prepareGraphQuery(\n\t\t\t\t\t\"CONSTRUCT { ?person <http://xmlns.com/foaf/0.1/name> ?name } WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name }\");\n\t\t\tgq.setBinding(\"name\", l(\"Alan\"));\n\t\t\tGraphQueryResult gqr = gq.evaluate();\n\t\t\tList<Statement> stmts = Iterations.asList(gqr);\n\t\t\tAssertions.assertEquals(1, stmts.size());\n\t\t\tAssertions.assertEquals(iri(\"http://example.org/\", \"a\"), stmts.get(0).getSubject());\n\n\t\t\t// BOOLEAN query\n\t\t\tBooleanQuery bq = conn.prepareBooleanQuery(\"ASK { ?person <http://xmlns.com/foaf/0.1/name> ?name }\");\n\t\t\tbq.setBinding(\"name\", l(\"non-existing-name\"));\n\t\t\tAssertions.assertEquals(false, bq.evaluate());\n\n\t\t}\n\n\t}", "@Test\n public void testLookup() throws Exception\n {\n LdapDN dn = new LdapDN( \"cn=test,ou=system\" );\n Entry entry = service.getAdminSession().lookup( dn );\n \n assertNotNull( entry );\n \n // We should have 3 attributes\n assertEquals( 3, entry.size() ); \n \n // Check that all the user attributes are present\n assertEquals( \"test\", entry.get( \"cn\" ).getString() );\n assertEquals( \"sn_test\", entry.get( \"sn\" ).getString() );\n assertTrue( entry.contains( \"objectClass\", \"top\", \"person\" ) );\n }", "public void bind(String name, Remote ref) throws RemoteException, AlreadyBoundException;", "@Test\n public void testAZMQ() {\n try {\n if (ZMQ.context(1) != null) {\n System.out.println(\"ZMQ Binding successful\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n fail(\"Unable to bind ZMQ\");\n }\n }", "@Test\n public void testIsConnected() throws MainException {\n System.out.println(\"isConnected\");\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n boolean expResult = true;\n boolean result = instance.isConnected();\n assertEquals(expResult, result);\n instance.disconnect();\n result = instance.isConnected();\n assertEquals(false, result);\n\n }", "public String lookup( String lfn, String handle ) {\n String result = null;\n for( Iterator it = this.rcIterator(); it.hasNext() ; ){\n ReplicaCatalog catalog = (ReplicaCatalog) it.next();\n\n if( (result = catalog.lookup( lfn, handle )) != null ){\n return result;\n }\n }\n return result;\n\n }", "public static void main(String[] args) {\n\t\ttry {\r\n\t\t\tMyRemote service = (MyRemote) Naming.lookup(\"rmi://127.0.0.1:6600/remoteTest\");\r\n\t\t\tString s = service.sayHello();\r\n\t\t\tSystem.out.println(s);\r\n\t\t} catch (MalformedURLException | RemoteException | NotBoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public interface JNDINames {\n\n /** System configuration JNDI name. */\n public static final String SYS_CONFIG = \n \"hb.Config\";\n\n \n\n /**\n * Map<url, securityMode> related to pages migrated from old traffic system with custom security logic inside the old pages.\n * This Security-Mode will be used by security filter to apply the custome security logic on such URLs for backword\n * compatability\n */\n public static final String SEC_ROLE_SECURITY_MODE = \n \"hb.security.Role.SecurityMode\";\n}", "boolean testConnection(RemoteService service);", "@Test\n void bindToPort()\n {\n objectUnderTest\n .bind(ProxyAdapter.class).to(SimpleApplicationService.class)\n\n .start();\n\n //Assert\n var result = objectUnderTest.getDrivingAdapter(ProxyAdapter.class)\n .getPortList()\n .stream()\n .filter( element -> SimpleApplicationService.class.equals(element.getClass()) )\n .findFirst();\n\n assertTrue(result.isPresent());\n }", "@Test\n public void testgetHost() {\n assertEquals(\"DinoHost\", session.getHost().getName());\n }", "@Test\n public void testClient() throws Exception {\n final CandidateProvider<InetSocketAddress> stunCandidateProvider = \n new DnsSrvCandidateProvider(\"_stun._udp.littleshoot.org\");\n /*\n new SrvCandidateProvider(srv, \"_stun._udp.littleshoot.org\", \n new InetSocketAddress(\"stun.littleshoot.org\", StunConstants.STUN_PORT));\n */\n // We do this a bunch of times because the server selection is random.\n for (int i = 0; i < 20; i++) {\n final UdpStunClient client = new UdpStunClient(\n stunCandidateProvider);\n final InetSocketAddress srflx = client.getServerReflexiveAddress();\n // System.out.println(\"Got address: \"+srflx);\n assertNotNull(\"Did not get server reflexive address\", srflx);\n }\n }", "@Test\n public void nameserversTest() {\n // TODO: test nameservers\n }", "@Test\n\tvoid createInitialContext() throws Exception {\n\t\tSimpleNamingContextBuilder builder = SimpleNamingContextBuilder.emptyActivatedContextBuilder();\n\t\tString name = \"foo\";\n\t\tObject o = new Object();\n\t\tbuilder.bind(name, o);\n\t\t// Check it affects JNDI\n\t\tContext ctx = new InitialContext();\n\t\tassertThat(ctx.lookup(name) == o).isTrue();\n\t\t// Check it returns mutable contexts\n\t\tctx.unbind(name);\n\t\tInitialContext badCtx1 = new InitialContext();\n\t\tassertThatExceptionOfType(NamingException.class).isThrownBy(() ->\n\t\t\t\tbadCtx1.lookup(name));\n\n\t\t// Check the same call will work again, but the context is empty\n\t\tbuilder = SimpleNamingContextBuilder.emptyActivatedContextBuilder();\n\t\tInitialContext badCtx2 = new InitialContext();\n\t\tassertThatExceptionOfType(NamingException.class).isThrownBy(() ->\n\t\t\t\tbadCtx2.lookup(name));\n\t\tObject o2 = new Object();\n\t\tbuilder.bind(name, o2);\n\t\tassertThat(o2).isEqualTo(badCtx2.lookup(name));\n\t}", "@Test // Support of dependency injection\n void bindToPortWithDrivenAdapter()\n {\n objectUnderTest\n .addToInfrastructure(JEXXA_DRIVEN_ADAPTER)\n .bind(ProxyAdapter.class).to(ApplicationServiceWithDrivenAdapters.class)\n .start();\n\n\n //Assert\n //Assert\n var result = objectUnderTest.getDrivingAdapter(ProxyAdapter.class)\n .getPortList()\n .stream()\n .filter( element -> ApplicationServiceWithDrivenAdapters.class.equals(element.getClass()) )\n .findFirst();\n\n assertTrue(result.isPresent());\n }", "@Test\n public void testCOH9787()\n {\n // Test distributed scheme with local backing map\n COH9787Helper(\"COH9787-local-BM\");\n\n // Test distributed scheme with RWBM\n COH9787Helper(\"COH9787-RWBM-local-front\");\n }", "@Test\r\n public void testFind() throws Exception {\r\n Map props = new HashMap();\r\n// props.put(\"org.glassfish.ejb.embedded.glassfish.instance.root\",\r\n// \"/Applications/GlassFish/glassfishv3-webprofile/glassfish/domains/domain1\");\r\n props.put(EJBContainer.MODULES, new File[]{\r\n new File(\"web/WEB-INF/classes\"),\r\n new File(\"test/conf/\")\r\n });\r\n\r\n \r\n System.out.println(\"find\");\r\n String key = \"\";\r\n// EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\r\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer(props);\r\n LoginSessionBean instance = (LoginSessionBean)container.getContext().lookup(\"java:global/classes/LoginSessionBean\");\r\n Users expResult = null;\r\n Users result = instance.find(key);\r\n assertEquals(expResult, result);\r\n container.close();\r\n // TODO review the generated test code and remove the default call to fail.\r\n //fail(\"The test case is a prototype.\");\r\n }", "public boolean isBound(String name)\n {\n try\n {\n InitialContext ctx = new InitialContext();\n Object ds = ctx.lookup(name);\n if (ds == null) {\n return false;\n }\n return true;\n }\n catch (NamingException e)\n {\n return false;\n } // end of catch\n \n }", "@Test\n public void testConnect() throws MainException {\n System.out.println(\"connect\");\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n Connection result = instance.connect();\n assertNotNull(result);\n boolean expResult = true;\n assertEquals(instance.isConnected(), expResult);\n }", "public interface UserAccountHandlerRemoteHome extends EJBHome {\r\n\r\n String COMP_NAME = \"java:comp/env/ejb/UserAccountHandler\";\r\n\r\n String JNDI_NAME = \"ejb/UserAccountHandler\";\r\n\r\n UserAccountHandlerRemote create() throws CreateException, RemoteException;\r\n\r\n}", "private int lookup_port (String host) throws LookupException\n , NameServerContactException{\n return Integer.parseInt(lookup(host)[1]);\n }", "@Test\r\n public void testLookup() {\r\n AvlPuu puu = new AvlPuu();\r\n Noodi noodi = new Noodi(0,0);\r\n noodi.setMatkaJaljella(10);\r\n noodi.setTehtyMatka(0);\r\n PuuSolmu solmu = new PuuSolmu(noodi);\r\n puu.insert(noodi);\r\n assertTrue(puu.lookup(noodi)); \r\n }", "private String[] lookup(String host) throws LookupException, \n NameServerContactException {\n String reply = \"\";\n String message = ComsFormat.lookup + ComsFormat.separator + host;\n nameServer = new Server(ComsFormat.nameserver_hostname, \n ComsFormat.nameserver_ip, nameServerPort);\n\n\n try {\n reply = nameServer.send_message(message, ComsFormat.retry, \n ComsFormat.sendTimeout, ComsFormat.receiveTimeout);\n } catch (Exception e) {\n throw new NameServerContactException();\n }\n\n if (reply.equals(ComsFormat.lookupError)) {\n throw new LookupException(host);\n } \n\n return reply.split(ComsFormat.separator);\n }", "public interface DictionaryService extends Remote{\n\t/**\n\t * \n\t * @param lookup\n\t * @return <result> OR <\"String not found\">\n\t * @throws RemoteException\n\t */\n\tpublic String lookup(String wordToSearch) throws RemoteException;\n\t\n}", "public static void main(String args[]) {\n try {\n //Cria HelloImpl\n //Runtime.getRuntime().exec(\"rmiregistry 1010\");\n //Registry registry = LocateRegistry.getRegistry(2001);\n \tSystem.setProperty(\"java.rmi.server.hostname\",\"192.168.0.30\");\n Registry registry = LocateRegistry.createRegistry(2001);\n Implementation obj = new Implementation();\n registry.bind(\"HelloServer\", obj);\n System.out.println(\"Hello Server pronto.\");\n } catch (Exception e) {\n System.out.println(\"HelloServer erro \" + e.getMessage());\n }\n }", "@Disabled\n @Test\n void testRun_nameserverQueryInTestTld_notFound() {\n persistResource(FullFieldsTestEntityHelper.makeHost(\"ns1.cat.lol\", \"1.2.3.4\"));\n newWhoisHttpAction(\"/nameserver/ns1.cat.lol\").run();\n assertThat(response.getPayload()).isEqualTo(loadFile(\"whois_action_nameserver.txt\"));\n }", "boolean initializeOrbEnvirement(String args[]){\n\t\t// create and initialize the ORB\n\t\tORB orb = ORB.init(args, null);\n\n\t\ttry {\n\t\t\t// get the root naming context\n\t\t\torg.omg.CORBA.Object objRef;\n\t\t\tobjRef = orb.resolve_initial_references(\"NameService\");\n\t\t\t// Use NamingContextExt instead of NamingContext. This is part of the Interoperable naming Service. \n\t\t\tnamingContextRef = NamingContextExtHelper.narrow(objRef);\n\t\t\treturn true;\n\t\t} catch (InvalidName e) {\n\t\t\tSystem.out.println(\"Failed to resolve NameService!\");\n\t\t\t//e.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "@Test\n void conditionalBindToPort()\n {\n objectUnderTest\n .conditionalBind(() -> false, ProxyAdapter.class).to(SimpleApplicationService.class)\n .start();\n\n //Assert that no binding has been performed\n var result = objectUnderTest.getDrivingAdapter(ProxyAdapter.class);\n\n assertTrue(result.getPortList().isEmpty());\n }", "public static void bind(String name, myRemoteInterface obj) throws AlreadyBoundException, RemoteException, IOException {\n\t\tString className = obj.getClass().getCanonicalName();\n\t\tString ip = null;\n\t\ttry {\n\t\t\tip = InetAddress.getLocalHost().getHostAddress();\n \n\t\t} catch (UnknownHostException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\tString nameWithSpace = Naming.parseHostPort(name);\n\t\tString args[] = nameWithSpace.split(\" \");\n\t\t\n\t\tRemoteObjectRef newRef = new RemoteObjectRef(ip, 9999,args[2] , className,\"bind\");\n\t\t\n\t\tObjectMap.insertIntoServerMap(args[2], obj);\n\t\t\n\t\tRegistryInterface stub = null;\n\t\t try{\n\t\t\t \n\t\t\t Class<?> stub_class = Class.forName(\"registry.Registry_stub\");\n\t\t\t stub = (RegistryInterface)Class.forName(\"registry.Registry_stub\").newInstance();\n\t\t\t if(stub_class != null){\n\t\t\t\t byte[] temp = downloadToServer(stub_class, newRef);\n\t\t\t }\n\t\t} catch (InstantiationException | IllegalAccessException\n\t\t\t\t| ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tstub.bind(name, newRef);\n\t\t\n\t}", "private void init() {\n System.out.println(\"Binding to RMIRegistry...\");\n String theName = getConfigManager().getString(\"REMOTE_NAME\");\n if (null != theName) {\n bind(theName, this);\n } else {\n LoggingServices.getCurrent().logMsg(getClass().getName(), \"init()\"\n , \"Could not find name to bind to in registry.\"\n , \"Make sure loyalty.cfg contains a RMIREGISTRY entry.\", LoggingServices.MAJOR);\n }\n }", "public static void main(String[] args) {\n\n try {\n MyRemote service = new MyRemoteImp1();\n Naming.rebind(\"Remote Hello\", service);\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "public static void main(String[] args) throws Exception {\n\t\tProperties props = new Properties();\n\t\tprops.put(Context.INITIAL_CONTEXT_FACTORY, \"org.apache.openejb.client.RemoteInitialContextFactory\");\n\t\tprops.put(Context.PROVIDER_URL, \"ejbd://127.0.0.1:4201\");\n\t\tContext ctx = new InitialContext(props);\n\n\t\t// Look up the stateless bean example\n\t\tExampleStateless stateless = (ExampleStateless) ctx.lookup(\"ExampleStatelessBeanRemote\");\n\t\t// Perform operation on the stateless bean\n\t\tString result = stateless.sayHello();\n\t\tSystem.out.println(result);\n\n\t\t// Look up the stateful session bean example\n\t\tExampleStateful stateful = (ExampleStateful) ctx.lookup(\"ExampleStatefulBeanRemote\");\n\t\t// Notice how each run of the client will have the same output\n\t\t// Because state of the bean is kept separately for each client run\n\t\tSystem.out.println(stateful.inc());\n\t\tSystem.out.println(stateful.inc());\n\t\tSystem.out.println(stateful.reset());\n\t\tSystem.out.println(stateful.inc());\n\n\t\t// Look up the stateless bean that operates with entity beans\n\t\tExampleEntities movies = (ExampleEntities) ctx.lookup(\"ExampleEntityBeansRemote\");\n\n\t\t// Add some data\n\t\tint d1 = movies.addDirector(\"Steven Spielberg\");\n\t\tmovies.addMovie(\"Jurassic Park\", d1);\n\t\tmovies.addMovie(\"E.T. the Extra-Terrestrial\", d1);\n\t\tint d2 = movies.addDirector(\"George Lucas\");\n\t\tmovies.addMovie(\"Star Wars\", d2);\n\t\tmovies.addMovie(\"Return of the Jedi\", d2);\n\n\t\t// List the data\n\t\t// Notice how the list grows with multiple client runs because directors / movies\n\t\t// have an extra integer as a primary key, and not the names\n\t\t// Also notice that stopping and restarting the EJB server does not forget\n\t\t// the data thanks to the persistence\n\t\tList<String> list = movies.getDirectors();\n\t\tfor (String d: list) {\n\t\t\tSystem.out.println(d);\n\t\t}\n\t\tlist = movies.getDirectorsWithMovies();\n\t\tfor (String d: list) {\n\t\t\tSystem.out.println(d);\n\t\t}\n\t}", "abstract boolean fakeHostname();", "public interface AliveCheck extends Remote {\n public boolean isAlive() throws RemoteException;\n}", "String getJndiName();", "public static void main (String[] args) {\n try {\n //System.setSecurityManager (new RMISecurityManager());\n NERegistry reg = new NERegistry (\"localhost\", 5010);\n HelloInterface_Stub hello = (HelloInterface_Stub) reg.lookup(\"hello\");\n System.out.println (hello);\n System.out.println (\"Reference: \" + hello.getRemoteObjectReference ());\n \n String a;\n if (args.length == 0) a = null;\n else a = args[0];\n \n String theGreeting = hello.sayHello (a);\n\n System.out.println (theGreeting);\n }\n catch (Exception e)\n {\n // Bad things can happen to good people\n e.printStackTrace();\n }\n }", "public static void main(String[] args) throws RemoteException{\n \r\n Registry registry= LocateRegistry.createRegistry(5099); //registrar a nuestro cliente \r\n registry.rebind(\"hello\", new ObjectRemote());\r\n }", "public void testGetEndPoint2() throws Exception {\n if(DEBUG_FLAG) System.out.println(\"entered testGetEndPoint2\");\n Ivorn ivorn = new Ivorn(\"ivo://org.test/org.astrogrid.registry.RegistryService\");\n String url = rs.getEndPointByIdentifier(ivorn);\n assertNotNull(url);\n assertTrue(url.startsWith(\"http\")); \n if(DEBUG_FLAG) System.out.println(\"url = \" + url);\n System.out.println(\"exiting testGetEndPoint2\");\n }", "@Test\n void testRegisterBinding() {\n final var queue = new Queue(\"test\");\n final var exchange = new TopicExchange(\"testExchange\");\n final var routingKey = \"routing-key\";\n\n final var binding = BindingBuilder.bind(queue).to(exchange).with(routingKey);\n\n // When we call registry method\n contextUtils.registerBinding(\"testBinding\", binding);\n\n // Then we expect the queue to be available in the context\n final var actual = context.getBean(\"testBinding\", Binding.class);\n assertNotNull(actual);\n assertEquals(binding.getExchange(), exchange.getName());\n assertEquals(binding.getRoutingKey(), routingKey);\n }", "@Test\n\tpublic void sapHanaJDBCtest() {\n\t\tString model = \"sapHanaModel\";\n\t\timportHelper.importModelJDBC(PROJECT_NAME_JDBC, model, ConnectionProfileConstants.SAP_HANA, \"BQT1/TABLE/SMALLA,BQT1/TABLE/SMALLB\", false);\n\t\t\n\t\t// TODO temp till hana translator is not set automatically (updated checkImportedTablesInModel method)\n\t\tassertTrue(new ModelExplorer().containsItem(PROJECT_NAME_JDBC,model + \".xmi\", \"SMALLA\"));\n\t\tassertTrue(new ModelExplorer().containsItem(PROJECT_NAME_JDBC,model + \".xmi\", \"SMALLB\"));\n\t\t\n\t\tString vdb_name = \"Check_\" + model;\n\t\tVdbWizard.openVdbWizard()\n\t\t\t\t.setLocation(PROJECT_NAME_JDBC)\n\t\t\t\t.setName(vdb_name)\n\t\t\t\t.addModel(PROJECT_NAME_JDBC, model)\n\t\t\t\t.finish();\n\t\t\n\t\tVdbEditor.getInstance(vdb_name + \".vdb\").setModelTranslator(model + \".xmi\", model, \"hana\");\n\t\tVdbEditor.getInstance(vdb_name + \".vdb\").save();\n\t\t\n\t\tnew ModelExplorer().deployVdb(PROJECT_NAME_JDBC, vdb_name);\n\n\t\tTeiidJDBCHelper jdbcHelper = new TeiidJDBCHelper(teiidServer, vdb_name);\n\t\tString[] tables = new String[] { \"SMALLA\", \"SMALLB\" };\n\t\tfor (int i = 0; i < tables.length; i++) {\n\t\t\tString previewSQL = \"select * from \\\"\" + model + \"\\\".\\\"\" + tables[i] + \"\\\"\";\n\t\t\tassertTrue(jdbcHelper.isQuerySuccessful(previewSQL,true));\n\t\t}\t\t\n\t\t//checkImportedTablesInModel(model, \"SMALLA\", \"SMALLB\");\n\t}", "@Test\n public void testWildflyOpenSSL() throws Throwable {\n assumeThat(hasWildfly).isTrue();\n assertThat(bindSocketFactory(Default))\n .describedAs(\"Sockets from mode \" + Default)\n .isIn(OpenSSL, Default_JSSE);\n }", "@Test\r\n\tpublic void testBogus() {\n\t\tassertLookup(\"bogus.phony.fake.namespace\",\"bogus.phony.fake.namespace\");\r\n\t}", "public interface RemoteContextListenerInterface extends Remote\n{\n /**\n * Called when an object has been added.\n * <p>\n * The binding of the newly added object can be obtained using <tt>evt.getNewBinding()</tt>.\n * @param evt NamingEvent; The nonnull event.\n * @see NamingEvent#OBJECT_ADDED\n * @throws RemoteException on network failure\n */\n public void objectAdded(NamingEvent evt) throws RemoteException;\n\n /**\n * Called when an object has been removed.\n * <p>\n * The binding of the newly removed object can be obtained using <tt>evt.getOldBinding()</tt>.\n * @param evt NamingEvent; The nonnull event.\n * @see NamingEvent#OBJECT_REMOVED\n * @throws RemoteException on network failure\n */\n public void objectRemoved(NamingEvent evt) throws RemoteException;\n\n /**\n * Called when an object has been renamed.\n * <p>\n * The binding of the renamed object can be obtained using <tt>evt.getNewBinding()</tt>. Its old binding (before the\n * rename) can be obtained using <tt>evt.getOldBinding()</tt>. One of these may be null if the old/new binding was\n * outside the scope in which the listener has registered interest.\n * @param evt NamingEvent; The nonnull event.\n * @see NamingEvent#OBJECT_RENAMED\n * @throws RemoteException on network failure\n */\n public void objectRenamed(NamingEvent evt) throws RemoteException;\n\n /**\n * Called when an object has been changed.\n * <p>\n * The binding of the changed object can be obtained using <tt>evt.getNewBinding()</tt>. Its old binding (before the\n * change) can be obtained using <tt>evt.getOldBinding()</tt>.\n * @param evt NamingEvent; The nonnull naming event.\n * @see NamingEvent#OBJECT_CHANGED\n * @throws RemoteException on network failure.\n */\n public void objectChanged(NamingEvent evt) throws RemoteException;\n\n /**\n * Called when a naming exception is thrown while attempting to fire a <tt>NamingEvent</tt>.\n * @param evt NamingExceptionEvent; The nonnull event.\n * @throws RemoteException on network exception\n * @throws RemoteException on network failure\n */\n void namingExceptionThrown(NamingExceptionEvent evt) throws RemoteException;\n}", "public void testSetHost() {\n }", "private void registerBindings(){\t\t\n\t}", "private void registerBindings(){\t\t\n\t}", "public void testGetHost() {\n }", "public void initializeNaming(File dbDir, int orbInitialPort) throws Exception\n {\n\t// NOTE: The TransientNameService reference is NOT HA.\n new TransientNameService((com.sun.corba.ee.spi.orb.ORB)orb);\n _logger.log(Level.FINE, \"POAProtocolMgr.initializeNaming: complete\");\n }", "private void cleanNamingContextBindings() throws NamingException {\r\n \t\ttry {\r\n \t\t\tif (this.acif != null) {\r\n \t\t\t\t// parse the string\r\n \t\t\t\tString jndiName = ((ResourceAdaptorActivityContextInterfaceFactory) this.acif)\r\n \t\t\t\t\t\t.getJndiName();\r\n \t\t\t\t// remove \"java:\" prefix\r\n \t\t\t\tint begind = jndiName.indexOf(':');\r\n \t\t\t\tString javaJNDIName = jndiName.substring(begind + 1);\r\n \t\t\t\tlogger.debug(\"=================== JNDI name to unregister: \"\r\n \t\t\t\t\t\t+ javaJNDIName + \" ====================\");\r\n \t\t\t\tSleeContainer.unregisterWithJndi(javaJNDIName);\r\n \t\t\t\tlogger\r\n \t\t\t\t\t\t.debug(\"====================== JNDI name unregistered.==========================\");\r\n \t\t\t}\r\n \r\n \t\t\tif (this.resourceEntryPoint != null) {\r\n \t\t\t\t// parse the string =\r\n \t\t\t\tString jndiName = resourceEntryPoint.getJndiName();\r\n \t\t\t\t// remove \"java:\" prefix\r\n \t\t\t\tint begind = jndiName.indexOf(':');\r\n \t\t\t\tString javaJNDIName = jndiName.substring(begind + 1);\r\n \t\t\t\tlogger.debug(\"=================== JNDI name to unregister: \"\r\n \t\t\t\t\t\t+ javaJNDIName + \" ====================\");\r\n \t\t\t\tSleeContainer.unregisterWithJndi(javaJNDIName);\r\n \t\t\t\tlogger\r\n \t\t\t\t\t\t.debug(\"====================== JNDI name unregistered.==========================\");\r\n \t\t\t}\r\n \r\n \t\t} catch (IndexOutOfBoundsException e) {\r\n \t\t\tlogger.warn(e.getMessage(), e);\r\n \t\t}\r\n \t}", "public void testGetSimppHosts() throws Exception{\n String[] hosts = new String[] {\n \"1.0.0.0.3:100\",\"2.0.0.0.3:200\",\"3.0.0.0.3:300\"};\n \n DHTSettings.DHT_BOOTSTRAP_HOSTS.setValue(hosts);\n \n //only first hex counts\n KUID id = KUID.createWithHexString(\"03ED9650238A6C576C987793C01440A0EA91A1FB\");\n Contact localNode = ContactFactory.createLocalContact(Vendor.UNKNOWN, Version.ZERO, id, 0, false);\n PrivilegedAccessor.setValue(dhtContext.getRouteTable(), \"localNode\", localNode);\n \n bootstrapper.bootstrap();\n InetSocketAddress addr = (InetSocketAddress) bootstrapper.getSimppHost();\n String address = addr.getHostName();\n int port = addr.getPort();\n assertEquals(address+\":\"+port, hosts[0]);\n \n //change first hex. Should point to last elem of the list\n id = KUID.createWithHexString(\"F3ED9650238A6C576C987793C01440A0EA91A1FB\");\n localNode = ContactFactory.createLocalContact(Vendor.UNKNOWN, Version.ZERO, id, 0, false);\n PrivilegedAccessor.setValue(dhtContext.getRouteTable(), \"localNode\", localNode);\n addr = (InetSocketAddress) bootstrapper.getSimppHost();\n address = addr.getHostName();\n port = addr.getPort();\n assertEquals(address+\":\"+port, hosts[2]);\n }", "public static void bind(String jndiName, Object obj) {\n\t\ttry {\n\t\t\tContext ctx = new InitialContext();\n\t\t\ttry {\n\t\t\t\tctx.unbind(jndiName);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// Ignore\n\t\t\t}\n\t\t\ttry {\n\t\t\t\t// Use alternative method for JBoss\n\t\t\t\tClass<?> nonSerializableFactory = Class.forName(\"org.jboss.naming.NonSerializableFactory\");\n\t\t\t\tMethod rebind = nonSerializableFactory.getMethod(\"rebind\", Context.class, String.class, Object.class);\n\t\t\t\trebind.invoke(null, ctx, jndiName, obj);\n\t\t\t} catch (Exception e) {\n\t\t\t\tctx.rebind(jndiName, obj);\n\t\t\t}\n\n\t\t\tlog.info(\"Bound \" + obj.getClass().getName() + \" to \" + jndiName);\n\t\t} catch (NamingException e) {\n\t\t\tlog.error(\"Error in JNDI binding\", e);\n\t\t}\n\t}", "public static void main(String args[]) throws Exception {\n\t\tLocateRegistry.createRegistry(1099);\n\t\tServer remote = new ServerImpl();\n\t\t//将远程服务对象绑定到指定JNDI。\n\t\tNaming.rebind(\"rmi://localhost:1099/HelloServiceImpl\", remote);\n\t}", "protected abstract void bind();", "protected abstract void bind();", "public interface LookUpService1 {\n public void say();\n}", "public abstract boolean mo31194a(Context context, String str, Hashtable hashtable, TJConnectListener tJConnectListener);", "public static void main(String[] args) {\n System.out.println(\"Begin Server...\");\n\n\n\n try {\n Remote r = Naming.lookup(\"UniversalRegistry\");\n IUniversalRegistry iur = (IUniversalRegistry)r;\n\n //on ajoute des voitures dans le registre universel\n Voiture v1 = new Voiture(1);\n iur.bind(\"v1\",v1);\n Voiture v2 = new Voiture(2);\n iur.bind(\"v2\",v2);\n\n\n //On ajoute des voitures electrique dans le registre universel\n VoitureElectrique ve = new VoitureElectrique(4,0);\n iur.bind(\"ve\",ve);\n VoitureElectrique ve1 = new VoitureElectrique(4,1);\n iur.bind(\"ve1\",ve1);\n\n VoitureElectrique ve3 = new VoitureElectrique(4,1);\n iur.bind(\"ve3\",ve3);\n\n ClassTest classTest = new ClassTest();\n iur.bind(\"cl\",classTest);\n\n\n }\n\n catch(Exception e){\n e.printStackTrace();\n }\n\n\n\n }", "@Test\n public void testGIIFromSecondaryWhenDSMDetectsServerLive() throws Exception {\n server1.invoke(HAInterestTestCase::closeCache);\n server2.invoke(HAInterestTestCase::closeCache);\n server3.invoke(HAInterestTestCase::closeCache);\n\n PORT1 = server1.invoke(HAInterestTestCase::createServerCacheWithLocalRegion);\n PORT2 = server2.invoke(HAInterestTestCase::createServerCacheWithLocalRegion);\n PORT3 = server3.invoke(HAInterestTestCase::createServerCacheWithLocalRegion);\n\n server1.invoke(HAInterestTestCase::createEntriesK1andK2);\n server2.invoke(HAInterestTestCase::createEntriesK1andK2);\n server3.invoke(HAInterestTestCase::createEntriesK1andK2);\n\n createClientPoolCache(getName(), NetworkUtils.getServerHostName(server1.getHost()));\n\n VM backup1 = getBackupVM();\n VM backup2 = getBackupVM(backup1);\n backup1.invoke(HAInterestTestCase::stopServer);\n backup2.invoke(HAInterestTestCase::stopServer);\n verifyDeadAndLiveServers(2, 1);\n registerK1AndK2();\n verifyRefreshedEntriesFromServer();\n backup1.invoke(HAInterestTestCase::putK1andK2);\n backup1.invoke(HAInterestTestCase::startServer);\n verifyDeadAndLiveServers(1, 2);\n verifyRefreshedEntriesFromServer();\n }", "public void bind() {\n }", "@Test\n public void testWithArgs()\n {\n String sServerName = this.getClass().getName().replace(\"lambda.Remote\", \"Remote\").replace(\"Tests\", \"\") + \"_WithArgs\";\n String sClassPath = m_fIncludeTestClassInServerClasspath ? null : createClassPathExcludingTestClasses();\n String sKindLambdaInvoke = Lambdas.isStaticLambdas() ? \"static\" : \"dynamic\";\n JavaModules module = m_fIncludeTestClassInServerClasspath ? JavaModules.automatic() : JavaModules.automatic().excluding(\"io\").adding(\"com.oracle.coherence.testing\").withClassPath(new ClassPath(sClassPath));\n\n if (sClassPath != null)\n {\n System.setProperty(\"java.class.path\", sClassPath);\n }\n startCacheServer(sServerName, \"io\", getCacheConfigPath(), m_propsForServer, true, sClassPath, module);\n try\n {\n NamedCache cache = CacheFactory.getCache(\"foo\");\n Integer NInc = 2;\n\n cache.put(1, 1);\n cache.invoke(1, entry -> entry.setValue((Integer) entry.getValue() + NInc));\n\n assertFalse(sKindLambdaInvoke + \" lambda invocation must not work\", m_fServerDynamicLambdasDisabled && (m_fServerDynamicLambdasDisabled != m_fIncludeTestClassInServerClasspath));\n assertEquals(3, cache.get(1));\n }\n catch (WrapperException e)\n {\n e.printStackTrace();\n assertTrue(sKindLambdaInvoke + \" lamdba invocation failed unexpectedly: \" + e, m_fServerDynamicLambdasDisabled && !m_fIncludeTestClassInServerClasspath);\n }\n catch (PortableException e)\n {\n e.printStackTrace();\n assertTrue(m_fPOF == true && m_fServerDynamicLambdasDisabled && !m_fIncludeTestClassInServerClasspath);\n }\n finally\n {\n stopCacheServer(sServerName);\n }\n }", "private void lookUpUsers() {\n\t\ttry {\n\t\t\tString[] regList = Naming.list(\"//localhost:3000\");\n\t\t\tfor (String s : regList) {\n\t\t\t\tif (!s.contains(\"Notary\") && !s.contains(this.id)) {\n\t\t\t\t\tremoteUsers\n\t\t\t\t\t\t.put(s.replace(\"//localhost:3000/\", \"\"), (UserInterface) Naming.lookup(s));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (MalformedURLException | RemoteException | NotBoundException e) {\n\t\t\tSystem.err.println(\"ERROR looking up user\");\n\t\t}\n\t}", "@Test\n public void testGetServerRemoto() throws ApplicationException {\n CommunicationFactory instance = CommunicationFactory.getFactory();\n String expResult = bundle.getString(IPropertiesConstants.COMM_REMOTE_CONNECTOR);\n String result = instance.getServer(\"cmcdell\").getClass().getName();\n assertEquals(expResult, result);\n }", "private Main startJndiServer() throws Exception {\n\t\tNamingServer namingServer = new NamingServer();\n\t\tNamingContext.setLocal(namingServer);\n\t\tMain namingMain = new Main();\n\t\tnamingMain.setInstallGlobalService(true);\n\t\tnamingMain.setPort( -1 );\n\t\tnamingMain.start();\n\t\treturn namingMain;\n\t}", "@Test\n public void testUnbindFromControllerStateOtherThanInstalled() throws Throwable\n {\n // Create a new key/value pair for binding into MC\n String name = \"MyObject\";\n Object value = new Object();\n\n // Construct BMDB, adding an unmet dependency\n BeanMetaDataBuilder bmdb = BeanMetaDataBuilder.createBuilder(name, value.getClass().getName());\n bmdb.addDependency(\"SomeDependencyThatDoesn'tExist\");\n\n // Install into MC, though because of the unmet dependency will not reach \"INSTALLED\" state\n try\n {\n getBootstrap().getKernel().getController().install(bmdb.getBeanMetaData(), value);\n }\n catch (Throwable e)\n {\n throw new RuntimeException(\"Could not install at name \\\"\" + name + \"\\\" value \" + value, e);\n }\n\n // Ensure that the install didn't completely succeed\n ControllerContext context = getBootstrap().getKernel().getController().getContext(name, null);\n TestCase.assertTrue(\"The test object should not be fully installed for this test\", !context.getState().equals(\n ControllerState.INSTALLED));\n\n // Unbind\n Ejb3RegistrarLocator.locateRegistrar().unbind(name);\n\n // Check that we've unbound\n boolean isUnbound = false;\n try\n {\n Ejb3RegistrarLocator.locateRegistrar().lookup(name);\n }\n catch (NotBoundException nbe)\n {\n isUnbound = true;\n }\n TestCase.assertTrue(\"The test object should be unbound\", isUnbound);\n\n }", "public static void main(String[] args) \n throws IOException, GSSException {\n Oid krb5Oid = new Oid( \"1.2.840.113554.1.2.2\");\n \n // 1.2 Set Kerberos Properties\n System.setProperty( \"sun.security.krb5.debug\", \"true\");\n System.setProperty( \"java.security.auth.login.config\", \"./jaas.conf\");\n System.setProperty( \"javax.security.auth.useSubjectCredsOnly\", \"true\");\n \n // 2. Login to the KDC.\n LoginContext loginCtx = null;\n // \"KerberizedServer\" refers to a section of the JAAS configuration in the jaas.conf file.\n Subject subject = null;\n try {\n loginCtx = new LoginContext( \"KerberizedServer\");\n loginCtx.login();\n subject = loginCtx.getSubject();\n }\n catch (LoginException e) {\n System.err.println(\"Login failure : \" + e);\n System.exit(-1);\n }\n // Obtain the command-line arguments and parse the port number\n \n if (args.length != 1) {\n System.err.println(\"Usage: java <options> KerberizedServer <localPort>\");\n System.exit(-1);\n }\n \n // 3. Main Loop: handle connections from network clients.\n // 3.1. Startup service network connection.\n int localPort = Integer.parseInt(args[0]);\n\n // <1. NIO>\n Selector selector = SelectorProvider.provider().openSelector();\n \n // Create a new non-blocking server socket channel\n ServerSocketChannel serverChannel = ServerSocketChannel.open();\n serverChannel.configureBlocking(false);\n \n // Bind the server socket to the specified address and port\n InetSocketAddress isa = new InetSocketAddress(\"localhost\",localPort);\n serverChannel.socket().bind(isa);\n \n // Register the server socket channel, indicating an interest in \n // accepting new connections\n serverChannel.register(selector, SelectionKey.OP_ACCEPT);\n // </1. NIO>\n\n GSSContext clientContext = null;\n\n // selection key => context map.\n final HashMap<SelectionKey,GSSContext> clientToContext = new HashMap<SelectionKey,GSSContext>();\n\n System.out.println(\"start main listen loop..\");\n while(true) {\n\n selector.select();\n Iterator selectedKeys = selector.selectedKeys().iterator();\n while (selectedKeys.hasNext()) {\n final SelectionKey sk = (SelectionKey) selectedKeys.next();\n selectedKeys.remove();\n\n if (!sk.isValid()) {\n System.out.println(\"key is not valid; continuing.\");\n continue;\n }\n \n // Check what event is available and deal with it\n if (sk.isAcceptable()) {\n System.out.println(\"accepting connection from client.\");\n\n // For an accept to be pending the channel must be a server socket channel.\n ServerSocketChannel serverSocketChannel = (ServerSocketChannel) sk.channel();\n \n // Accept the connection and make it non-blocking\n SocketChannel socketChannel = serverSocketChannel.accept();\n socketChannel.configureBlocking(false);\n \n // Register the new SocketChannel with our Selector, indicating\n // we'd like to be notified when there's data waiting to be read\n socketChannel.register(selector, SelectionKey.OP_READ | SelectionKey.OP_WRITE);\n } else if (sk.isReadable()) {\n System.out.println(\"reading context from channel.\");\n final SocketChannel socketChannel = (SocketChannel) sk.channel();\n \n clientContext =\n Subject.doAs( subject, new PrivilegedAction<GSSContext>() {\n public GSSContext run() {\n try {\n GSSManager manager = GSSManager.getInstance();\n GSSContext context = manager.createContext( (GSSCredential) null);\n while (!context.isEstablished()) {\n System.out.println(\"KerberizedServer: context not yet established: accepting from client.\");\n \n ByteBuffer readBuffer = ByteBuffer.allocate(8192);\n readBuffer.clear();\n \n // Attempt to read off the channel\n int numRead = 0;\n try {\n numRead = socketChannel.read(readBuffer);\n if (numRead != -1) {\n readBuffer.flip();\n System.out.println(\"read: \" + numRead + \" bytes.\");\n byte[] bytes = new byte[8192];\n readBuffer.get(bytes,0,numRead);\n Hexdump.hexdump(System.out,bytes,0,numRead);\n context.acceptSecContext(bytes,0,numRead);\n }\n } catch (IOException e) {\n System.err.println(\"IOEXCEPTION: GIVING UP ON THIS CLIENT.\");\n // The remote forcibly closed the connection, cancel\n // the selection key and close the channel.\n clientToContext.remove(sk);\n sk.cancel();\n try {\n sk.channel().close();\n }\n catch (IOException ioe) {\n System.err.println(\"IoException trying to close socket.\");\n ioe.printStackTrace();\n }\n return null;\n }\n \n if (numRead == -1) {\n // Remote entity shut the socket down cleanly. Do the\n // same from our end and cancel the channel.\n System.out.println(\"removing key from clientToContext.\");\n clientToContext.remove(sk);\n try {\n sk.channel().close();\n }\n catch (IOException ioe) {\n System.err.println(\"IoException trying to close socket.\");\n ioe.printStackTrace();\n } \n sk.cancel();\n return null;\n }\n }\n System.out.println(\"returning context now.\");\n return context;\n }\n catch (GSSException e) {\n System.err.println(\"GSS EXCEPTION: GIVING UP ON THIS CLIENT.\");\n e.printStackTrace();\n clientToContext.remove(sk);\n try {\n sk.channel().close();\n }\n catch (IOException ioe) {\n System.err.println(\"IoException trying to close socket.\");\n ioe.printStackTrace();\n }\n sk.cancel();\n return null;\n }\n }\n }\n );\n System.out.println(\"done with client context-acceptance.\");\n if (clientContext != null) {\n clientToContext.put(sk,clientContext);\n System.out.println(\"KerberizedServer: Client authenticated: (principal: \" + clientContext.getSrcName() + \")\");\n // ..conduct business with client since it's authenticated and optionally encrypted too..\n \n \n }\n \n // dump current client->context mapping to console.\n System.out.println(\"===<current clients>===\");\n for (SelectionKey each : clientToContext.keySet()) {\n GSSContext eachContext = null;\n if ((eachContext = clientToContext.get(each)) != null) {\n System.out.println(\"client principal: \" + eachContext.getSrcName());\n }\n }\n System.out.println(\"===</current clients>===\");\n } else if (sk.isWritable()) {\n // .. write to client ..\n }\n }\n }\n\n }", "public void testInformixAddressDAO2() throws Exception {\r\n try {\r\n new InformixAddressDAO(\"unknown namespace\");\r\n fail(\"ConfigurationException expected\");\r\n } catch (ConfigurationException e) {\r\n //good\r\n }\r\n }", "@Test\n\tpublic void testSAPHostControl_BindingStub_3()\n\t\tthrows Exception {\n\t\tjavax.xml.rpc.Service service = null;\n\n\t\tSAPHostControl_BindingStub result = new SAPHostControl_BindingStub(service);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.UnsupportedClassVersionError: com/sap/managementconsole/soap/axis/saphostcontrol/SAPHostControl_BindingStub : Unsupported major.minor version 51.0\n\t\t// at java.lang.ClassLoader.defineClass1(Native Method)\n\t\t// at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)\n\t\t// at java.lang.ClassLoader.defineClass(ClassLoader.java:621)\n\t\t// at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)\n\t\t// at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)\n\t\t// at java.net.URLClassLoader.access$000(URLClassLoader.java:58)\n\t\t// at java.net.URLClassLoader$1.run(URLClassLoader.java:197)\n\t\t// at java.security.AccessController.doPrivileged(Native Method)\n\t\t// at java.net.URLClassLoader.findClass(URLClassLoader.java:190)\n\t\t// at java.lang.ClassLoader.loadClass(ClassLoader.java:306)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.UserDefinedClassLoader.loadClass(UserDefinedClassLoader.java:62)\n\t\t// at java.lang.ClassLoader.loadClass(ClassLoader.java:247)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionContextImpl.getClass(ExecutionContextImpl.java:99)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.SimpleTypeExpression.execute(SimpleTypeExpression.java:205)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.InstanceCreationExpression.execute(InstanceCreationExpression.java:425)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionRequest.execute(ExecutionRequest.java:286)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.communication.LocalExecutionClient$1.run(LocalExecutionClient.java:158)\n\t\t// at java.lang.Thread.run(Thread.java:695)\n\t\tassertNotNull(result);\n\t}", "public void setLookup(org.openejb.config.sys.Lookup lookup) {\n this._lookup = lookup;\n }", "public void setJndiName(String name)\n {\n _jndiName = name;\n }", "@Test\n\tpublic void testSAPHostControl_BindingStub_2()\n\t\tthrows Exception {\n\t\tjavax.xml.rpc.Service service = new Service();\n\n\t\tSAPHostControl_BindingStub result = new SAPHostControl_BindingStub(service);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.UnsupportedClassVersionError: com/sap/managementconsole/soap/axis/saphostcontrol/SAPHostControl_BindingStub : Unsupported major.minor version 51.0\n\t\t// at java.lang.ClassLoader.defineClass1(Native Method)\n\t\t// at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)\n\t\t// at java.lang.ClassLoader.defineClass(ClassLoader.java:621)\n\t\t// at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)\n\t\t// at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)\n\t\t// at java.net.URLClassLoader.access$000(URLClassLoader.java:58)\n\t\t// at java.net.URLClassLoader$1.run(URLClassLoader.java:197)\n\t\t// at java.security.AccessController.doPrivileged(Native Method)\n\t\t// at java.net.URLClassLoader.findClass(URLClassLoader.java:190)\n\t\t// at java.lang.ClassLoader.loadClass(ClassLoader.java:306)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.UserDefinedClassLoader.loadClass(UserDefinedClassLoader.java:62)\n\t\t// at java.lang.ClassLoader.loadClass(ClassLoader.java:247)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionContextImpl.getClass(ExecutionContextImpl.java:99)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.SimpleTypeExpression.execute(SimpleTypeExpression.java:205)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.InstanceCreationExpression.execute(InstanceCreationExpression.java:425)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionRequest.execute(ExecutionRequest.java:286)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.communication.LocalExecutionClient$1.run(LocalExecutionClient.java:158)\n\t\t// at java.lang.Thread.run(Thread.java:695)\n\t\tassertNotNull(result);\n\t}", "public interface NamingContextFactory {\n /**\n * Determine if this factory supports the given provider and name scheme. This method is called\n * when a JNDI operation is executed on an initial context to determine which provider should handle the operation.\n * <p>\n * A context factory should evaluate the provider's type to determine if the provider is compatible with the naming\n * scheme, and should not support producing contexts for unknown providers.\n *\n * @param namingProvider the naming provider which is handling this request, or {@code null} if it is local\n * @param nameScheme the JNDI name scheme, or {@code null} if no name scheme was given\n * @return {@code true} if this factory supports the given scheme, {@code false} otherwise\n */\n boolean supportsUriScheme(NamingProvider namingProvider, String nameScheme);\n\n /**\n * Create the root context for this naming scheme. The context should capture any locally relevant information,\n * such as the relevant local security or authentication context.\n *\n * @param namingProvider the naming provider which is handling this request, or {@code null} if it is local\n * @param nameScheme the scheme in the name, or {@code null} if there is no name URL scheme\n * @param env a copy of the environment which may be consumed directly by the provider (not {@code null})\n * @param providerEnvironment the provider environment (not {@code null})\n * @return the root context (must not be {@code null})\n * @throws NamingException if the root context creation failed for some reason\n */\n Context createRootContext(NamingProvider namingProvider, String nameScheme, FastHashtable<String, Object> env, ProviderEnvironment providerEnvironment) throws NamingException;\n}", "public void connect() { \t\n \tbindService(IChatService.class, apiConnection);\n }", "public void testContextManager() throws Exception {\n System.out.println(\"testContextManager\");\n \n // init the session information\n ThreadsPermissionContainer permissions = new ThreadsPermissionContainer();\n SessionManager.init(permissions);\n UserStoreManager userStoreManager = new UserStoreManager();\n UserSessionManager sessionManager = new UserSessionManager(permissions,\n userStoreManager);\n LoginManager.init(sessionManager,userStoreManager);\n // instanciate the thread manager\n CoadunationThreadGroup threadGroup = new CoadunationThreadGroup(sessionManager,\n userStoreManager);\n \n // add a user to the session for the current thread\n RoleManager.getInstance();\n \n InterceptorFactory.init(permissions,sessionManager,userStoreManager);\n \n // add a new user object and add to the permission\n Set set = new HashSet();\n set.add(\"test\");\n UserSession user = new UserSession(\"test1\", set);\n permissions.putSession(new Long(Thread.currentThread().getId()),\n new ThreadPermissionSession(\n new Long(Thread.currentThread().getId()),user));\n \n \n NamingDirector.init(threadGroup);\n \n Context context = new InitialContext();\n \n context.bind(\"java:comp/env/test\",\"fred\");\n context.bind(\"java:comp/env/test2\",\"fred2\");\n \n if (!context.lookup(\"java:comp/env/test\").equals(\"fred\")) {\n fail(\"Could not retrieve the value for test\");\n }\n if (!context.lookup(\"java:comp/env/test2\").equals(\"fred2\")) {\n fail(\"Could not retrieve the value for test2\");\n }\n System.out.println(\"Creating the sub context\");\n Context subContext = context.createSubcontext(\"java:comp/env/test3/test3\");\n System.out.println(\"Adding the binding for bob to the sub context\");\n subContext.bind(\"bob\",\"bob\");\n System.out.println(\"Looking up the binding for bob on the sub context.\");\n Object value = subContext.lookup(\"bob\");\n System.out.println(\"Object type is : \" + value.getClass().getName());\n if (!value.equals(\"bob\")) {\n fail(\"Could not retrieve the value bob\");\n }\n if (!context.lookup(\"java:comp/env/test3/test3/bob\").equals(\"bob\")) {\n fail(\"Could not retrieve the value bob\");\n }\n \n ClassLoader loader = new URLClassLoader(new URL[0]);\n ClassLoader original = Thread.currentThread().getContextClassLoader();\n Thread.currentThread().setContextClassLoader(loader);\n NamingDirector.getInstance().initContext();\n \n context.bind(\"java:comp/env/test5\",\"fred5\");\n if (!context.lookup(\"java:comp/env/test5\").equals(\"fred5\")) {\n fail(\"Could not retrieve the value fred5\");\n }\n \n Thread.currentThread().setContextClassLoader(original);\n \n try{\n context.lookup(\"java:comp/env/test5\");\n fail(\"Failed retrieve a value that should not exist\");\n } catch (NameNotFoundException ex) {\n // ignore\n }\n \n Thread.currentThread().setContextClassLoader(loader);\n \n NamingDirector.getInstance().releaseContext();\n \n try{\n context.lookup(\"java:comp/env/test5\");\n fail(\"Failed retrieve a value that should not exist\");\n } catch (NameNotFoundException ex) {\n // ignore\n }\n Thread.currentThread().setContextClassLoader(original);\n System.out.println(\"Add value 1\");\n context.bind(\"basic\",\"basic\");\n System.out.println(\"Add value 2\");\n context.bind(\"basic2/bob\",\"basic2\");\n if (context.lookup(\"basic\") != null) {\n fail(\"Could not retrieve the basic value from the [\" + \n context.lookup(\"basic\") + \"]\");\n }\n if (context.lookup(\"basic2/bob\") != null) {\n fail(\"Could not retrieve the basic value from the JNDI [\" +\n context.lookup(\"basic2/bob\") + \"]\");\n }\n \n try {\n context.bind(\"java:network/env/test\",\"fred\");\n fail(\"This should have thrown as only relative urls can be used \" +\n \"JNDI\");\n } catch (NamingException ex) {\n // ignore\n }\n \n try {\n context.unbind(\"java:network/env/test\");\n fail(\"This should have thrown as only relative urls can be used \" +\n \"JNDI\");\n } catch (NamingException ex) {\n // ignore\n }\n context.rebind(\"basic\",\"test1\");\n context.rebind(\"basic2/bob\",\"test2\");\n \n if (context.lookup(\"basic\") != null) {\n fail(\"Could not retrieve the basic value from the JNDI\");\n }\n if (context.lookup(\"basic2/bob\") != null) {\n fail(\"Could not retrieve the basic value from the JNDI\");\n }\n \n context.unbind(\"basic\");\n context.unbind(\"basic2/bob\");\n \n try{\n context.lookup(\"basic2/bob\");\n fail(\"The basic bob value could still be found\");\n } catch (NameNotFoundException ex) {\n // ignore\n }\n \n NamingDirector.getInstance().shutdown();\n }", "private static String[] getServerAddress(String p_78863_0_) {\n/* */ try {\n/* 87 */ String var1 = \"com.sun.jndi.dns.DnsContextFactory\";\n/* 88 */ Class.forName(\"com.sun.jndi.dns.DnsContextFactory\");\n/* 89 */ Hashtable<Object, Object> var2 = new Hashtable<>();\n/* 90 */ var2.put(\"java.naming.factory.initial\", \"com.sun.jndi.dns.DnsContextFactory\");\n/* 91 */ var2.put(\"java.naming.provider.url\", \"dns:\");\n/* 92 */ var2.put(\"com.sun.jndi.dns.timeout.retries\", \"1\");\n/* 93 */ InitialDirContext var3 = new InitialDirContext(var2);\n/* 94 */ Attributes var4 = var3.getAttributes(\"_minecraft._tcp.\" + p_78863_0_, new String[] { \"SRV\" });\n/* 95 */ String[] var5 = var4.get(\"srv\").get().toString().split(\" \", 4);\n/* 96 */ return new String[] { var5[3], var5[2] };\n/* */ }\n/* 98 */ catch (Throwable var6) {\n/* */ \n/* 100 */ return new String[] { p_78863_0_, Integer.toString(25565) };\n/* */ } \n/* */ }", "boolean hasHost();", "boolean hasHost();", "public TestNamingService() {\n }", "public void bind(String name, Object obj)\r\n {\r\n if (logger.isInfoEnabled()) {\r\n logger.info(\"Static JNDI binding: [\" + name + \"] = [\" + jndiObjectToString(obj) + \"]\");\r\n }\r\n this.boundObjects.put(name, obj);\r\n }", "@Test\n @Tag(\"CREATE\")\n @Tag(\"RESOURCE\")\n @DisplayName(\"Test HQL Query with Parameter Binding with Address 02\")\n public void testHQLQueryWithParameterBindingWithAddress02()\n {\n System.out.println(\"Programme Start\");\n long startTime = System.nanoTime();\n\n UuidUtilities utilities = new UuidUtilities();\n List<SBAddress02> addresses = null;\n\n try (Session session = HibernateUtil.getSessionFactory().openSession()) {\n Transaction transaction = null;\n try {\n transaction = session.beginTransaction();\n\n// Query query = session.createQuery(\"from SBAddress02 where address02Zip = '292000' or address02Zip = '2920013'\");\n// Query query = session.createQuery(\"from SBAddress02 where address02Zip = ? or address02Zip = ?\"); // No longer support\n Query query = session.createQuery(\"from SBAddress02 where address02Zip = ?1 or address02Zip = :searchParam\");\n// .setParameter(1,\"292000\")\n// .setParameter(\"searchParam\",\"2920013\");\n query.setParameter(1, \"292000\");\n query.setParameter(\"searchParam\", \"2920013\");\n\n addresses = query.list();\n\n transaction.commit();\n\n addresses.forEach(address -> System.out.println(\"Added Address : \" + address.getAddress02Street()));\n } catch (Exception e) {\n if (transaction != null) {\n transaction.rollback();\n }\n LOGGER.error(ExceptionUtils.getFullStackTrace(e));\n e.printStackTrace();\n }\n\n } catch (Throwable throwable) {\n LOGGER.error(ExceptionUtils.getFullStackTrace(throwable));\n throwable.printStackTrace();\n }\n\n System.out.println(\"Address : \" + addresses.size());\n\n long endTime = System.nanoTime();\n ELAPSED_TIME = endTime - startTime;\n System.out.println(\"Programme End\");\n\n }", "protected void setUp() \r\n {\n System.out.println(\"Setting up User Test !\");\r\n \t//lProps = new Properties();\t\r\n //lProps.put(Context.INITIAL_CONTEXT_FACTORY,lContextFactory);\r\n //lProps.put(Context.PROVIDER_URL,lURL);\r\n //lProps.put(Context.URL_PKG_PREFIXES,lPrefixes);\r\n try\r\n {\r\n lProps.list(System.out);\r\n lIC = new InitialContext(lProps);\r\n //sLog.debug(\"Created Initial Context\");\r\n System.out.println(\"Created Initial Context-looking for UserHome\");\r\n Object homeObj = lIC.lookup(lJndiName);\r\n System.out.println(\"got Object!\");\r\n lHome = (UserHome) PortableRemoteObject.narrow(homeObj,UserHome.class); \r\n \r\n //lSessionHome = (PJVTProducerSessionHome) lIC.lookup(lJndiName);\r\n \r\n System.out.println(\"User Home:\"+lHome.toString());\r\n \r\n }\r\n catch(Throwable t)\r\n {\r\n t.printStackTrace();\r\n }\r\n\t}", "private String lookup_ip (String host) throws LookupException\n , NameServerContactException{\n return lookup(host)[0];\n }", "public static void main ( String args [] )\n {\n // Variable deceleration\n String hostname = \"localhost\" ; // Default host to use\n \n // Override the default values for hostname if passed through command line.\n if ( args [0].length () != 0 ) { hostname = args [0] ; }\n \n try\n {\n // Set the system property for \"java.rmi.server.hostname\".\n System.setProperty ( \"java.rmi.server.hostname\", hostname ) ;\n \n // Initialize the interface to access all the remote functions.\n HelloServerImplementation registerObject = new HelloServerImplementation () ;\n\n // Declare registry variable\n Registry registry ;\n \n // This try catch is to make sure that the registry is created\n try \n {\n // Try to get the remote object Registry for the local host on the default registry port of 1099.\n registry = LocateRegistry.getRegistry() ;\n registry.list() ; // Fetch the names bounded to the registry\n }\n // Catch the exception where communication with the registry fails and create the registry.\n catch ( RemoteException e ) \n {\n // Create the registry on the default rmi port 1099\n System.out.println ( \"RMI registry cannot be located at port \" + Registry.REGISTRY_PORT ) ;\n registry = LocateRegistry.createRegistry ( Registry.REGISTRY_PORT ) ;\n System.out.println ( \"RMI registry created at port \" + Registry.REGISTRY_PORT ) ;\n }\n \n // Once the registry is successfully created, rebind the HelloServerInterface to the remote reference created above.\n registry.rebind ( \"HelloServerInterface\", registerObject ) ;\n System.out.println ( \"Callback Server ready.\" ) ;\n }\n // Catch the exception and provide the necessary information to the user. \n catch ( Exception e ) { System.out.println ( \"Exception: \" + e.getMessage () ) ; e.printStackTrace () ; }\n }", "public boolean existsHost(String name)\n {\n try\n {\n return (lookup(name)!=null); \n }\n catch (UnknownHostException e)\n {\n return false; \n }\n }", "public static void main(String[] args) {\n\n try {\n\n Registry registry = LocateRegistry.createRegistry( 1888);\n registry.rebind(\"YStudentServerImpl\", new YStudentServerImpl());\n\n\n }\n catch (Exception ex){\n System.err.println(\"YStudentServerImpl exeption\");\n ex.printStackTrace();\n }\n\n\n }", "String lookupKeyBasic(String key) throws CommunicationFailureException, TimeoutReachedException, NoSuccessorsExceptions;", "boolean hasRemoteHost();", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.connect(\"org.hsqldb.lib.HsqlByteArrayOutputStream\", false);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No environment definition 'org.hsqldb.lib.HsqlByteArrayOutputStream.env.properties' found\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }" ]
[ "0.7376937", "0.7140631", "0.63252604", "0.58584124", "0.5461786", "0.5449851", "0.5403583", "0.5336121", "0.5333056", "0.52344966", "0.522787", "0.52057946", "0.5180933", "0.5160618", "0.5147531", "0.5142823", "0.5125257", "0.5080429", "0.5034203", "0.5033064", "0.5021861", "0.5007407", "0.49983987", "0.49973541", "0.49924514", "0.49806753", "0.4977644", "0.4962873", "0.4955692", "0.4953892", "0.49506584", "0.49412188", "0.49354067", "0.49306926", "0.4929786", "0.49227533", "0.48991266", "0.48924652", "0.4880596", "0.487919", "0.48550394", "0.48484382", "0.4834275", "0.4826413", "0.47942263", "0.47835988", "0.47761863", "0.47720426", "0.4716377", "0.47066462", "0.47064352", "0.46986544", "0.46963075", "0.46942776", "0.46924767", "0.46740302", "0.46702158", "0.46684727", "0.46684727", "0.46628052", "0.46580565", "0.4657167", "0.4651873", "0.4651061", "0.4647313", "0.46462795", "0.46462795", "0.4638707", "0.46330765", "0.4632861", "0.46223918", "0.46223846", "0.46208006", "0.46204695", "0.46179098", "0.46016735", "0.4596793", "0.45904803", "0.4588938", "0.45884228", "0.45876798", "0.45867887", "0.457839", "0.45748714", "0.45659983", "0.45572677", "0.4553675", "0.45536524", "0.45536524", "0.45508808", "0.45473287", "0.454656", "0.45445862", "0.45421502", "0.4538382", "0.4538013", "0.45377955", "0.4537227", "0.4532252", "0.45303702" ]
0.8023777
0
Test EJB Bindings using local and HAJNDI lookups
public void testEJBBinding() throws Exception { getLog().debug("HAJndiTestCase.testEJBBinding()"); validateUrls(); // CalledHome EJB is contained in cross-server.jar and bound during deployment // lookup binding locally on Node0 - should succeed Context naming = getContext(NODE0_JNDI); CalledHome home = (CalledHome)lookup(naming, CALLED_HOME_KEY); if (home != null) { // ensure that EJB is operational CalledRemote remote = home.create(); remote.remove(); } closeContext(naming); assertNotNull("lookup EJB binding on same server using local JNDI", home); // lookup binding locally on Node1 - should succeed naming = getContext(NODE1_JNDI); home = (CalledHome)lookup(naming, CALLED_HOME_KEY); if (home != null) { // ensure that EJB is operational CalledRemote remote = home.create(); remote.remove(); } closeContext(naming); assertNotNull("lookup EJB binding on different server in cluster using local JNDI", home); // lookup binding using HA-JNDI on Node0 - should succeed naming = getContext(NODE0_HAJNDI); home = (CalledHome)lookup(naming, CALLED_HOME_KEY); if (home != null) { // ensure that EJB is operational CalledRemote remote = home.create(); remote.remove(); } closeContext(naming); assertNotNull("lookup EJB binding on same server using HA-JNDI", home); // lookup binding using HA-JNDI on Node1 - should succeed naming = getContext(NODE1_HAJNDI); home = (CalledHome)lookup(naming, CALLED_HOME_KEY); if (home != null) { // ensure that EJB is operational CalledRemote remote = home.create(); remote.remove(); } closeContext(naming); assertNotNull("lookup EJB binding on different server in cluster using HA-JNDI", home); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testHAJndiBinding()\n throws Exception\n {\n getLog().debug(\"HAJndiTestCase.testHAJndiBinding()\");\n validateUrls();\n \n // bind to node0 using HA-JNDI\n Context naming = getContext(NODE0_HAJNDI);\n naming.bind(GLOBAL0_KEY, GLOBAL0_VALUE);\n closeContext(naming);\n \n // lookup binding locally on Node0 - should fail\n naming = getContext(NODE0_JNDI);\n String value = (String)lookup(naming, GLOBAL0_KEY);\n closeContext(naming);\n assertNull(\"lookup HA-JNDI binding on same server using local JNDI\", value);\n \n // lookup binding locally on Node1 - should fail\n naming = getContext(NODE1_JNDI);\n value = (String)lookup(naming, GLOBAL0_KEY);\n closeContext(naming);\n assertNull(\"lookup HA-JNDI binding on different server in cluster using local JNDI\", value);\n \n // lookup binding using HA-JNDI on Node0 - should succeed\n naming = getContext(NODE0_HAJNDI);\n value = (String)lookup(naming, GLOBAL0_KEY);\n closeContext(naming);\n assertEquals(\"lookup HA-JNDI binding on same server using HA-JNDI\", GLOBAL0_VALUE, value);\n \n // lookup binding using HA-JNDI on Node1 - should succeed\n naming = getContext(NODE1_HAJNDI);\n value = (String)lookup(naming, GLOBAL0_KEY);\n closeContext(naming);\n assertEquals(\"lookup HA-JNDI binding on different server in cluster using HA-JNDI\", GLOBAL0_VALUE, value);\n \n }", "public void testLocalBinding()\n throws Exception\n {\n getLog().debug(\"HAJndiTestCase.testLocalBinding()\");\n validateUrls();\n \n // bind to node0 locally\n Context naming = getContext(NODE0_JNDI);\n naming.bind(LOCAL0_KEY, LOCAL0_VALUE);\n closeContext(naming);\n \n // lookup binding locally on Node0 - should succeed\n naming = getContext(NODE0_JNDI);\n String value = (String)lookup(naming, LOCAL0_KEY);\n closeContext(naming);\n assertEquals(\"lookup local binding on same server\", LOCAL0_VALUE, value);\n \n // lookup binding locally on Node1 - should fail\n naming = getContext(NODE1_JNDI);\n value = (String)lookup(naming, LOCAL0_KEY);\n closeContext(naming);\n assertNull(\"lookup local binding on different server in cluster\", value);\n \n // lookup binding using HA-JNDI on Node0 - should succeed\n naming = getContext(NODE0_HAJNDI);\n value = (String)lookup(naming, LOCAL0_KEY);\n closeContext(naming);\n assertEquals(\"lookup local binding on same server using HA-JNDI\", LOCAL0_VALUE, value);\n \n // lookup binding using HA-JNDI on Node1 - should succeed\n naming = getContext(NODE1_HAJNDI);\n value = (String)lookup(naming, LOCAL0_KEY);\n closeContext(naming);\n assertEquals(\"lookup local binding on different server in cluster using HA-JNDI\", LOCAL0_VALUE, value);\n }", "public interface UserAccountHandlerRemoteHome extends EJBHome {\r\n\r\n String COMP_NAME = \"java:comp/env/ejb/UserAccountHandler\";\r\n\r\n String JNDI_NAME = \"ejb/UserAccountHandler\";\r\n\r\n UserAccountHandlerRemote create() throws CreateException, RemoteException;\r\n\r\n}", "public static void main(String[] args) throws NamingException {\n\t\tInitialContext ctx = new InitialContext();\n\t\tObject obj = ctx.lookup(\"ProjJSF2-ear/ProjJSF2-ejb/Test!services.TestRemote\");\n\t\tTestRemote tr = (TestRemote) obj;\n\t\ttr.Consommation();\n\t}", "public static void main(String[] args) throws NamingException {\n\n\n Properties p = new Properties();\n p.put(\"remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED\", \"false\");\n p.put(\"remote.connections\", \"one\");\n p.put(\"remote.connection.one.port\", \"8080\");\n p.put(\"remote.connection.one.host\", \"localhost\");\n p.put(\"remote.connection.one.username\", \"user\");\n p.put(\"remote.connection.one.password\", \"password\");\n\n p.put(\"remote.clusters\", \"ejb\");\n p.put(\"remote.cluster.ejb.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS\", \"false\"); \n p.put(\"remote.cluster.ejb.username\", \"user\");\n p.put(\"remote.cluster.ejb.password\", \"password\");\n \n EJBClientConfiguration cc = new PropertiesBasedEJBClientConfiguration(p);\n ContextSelector<EJBClientContext> selector = new ConfigBasedEJBClientContextSelector(cc);\n EJBClientContext.setSelector(selector);\n\n Properties props = new Properties();\n props.put(Context.URL_PKG_PREFIXES, \"org.jboss.ejb.client.naming\");\n InitialContext context = new InitialContext(props);\n\n final String rcal = \"ejb:/ejbtestcase/TestClusterBean!org.ing.ejb.ejbtestcase.TestClusterInf\";\n final TestClusterInf remote = (TestClusterInf) context.lookup(rcal);\n final String result = remote.sayHello(9);\n\n System.out.println(\"sayHello succeed: \" + result);\n\t\t\n\t}", "public static void main(String[] args) throws NamingException {\n Logger.getLogger(\"org.xnio\").setLevel(Level.WARNING);\n Logger.getLogger(\"org.jboss.remoting\").setLevel(Level.WARNING);\n Logger.getLogger(\"org.jboss.ejb.client\").setLevel(Level.WARNING);\n\n // Create the JNDI InitialContext, configuring it for use with JBoss EJB\n Hashtable<String, String> jndiProperties = new Hashtable<>();\n jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY, \"org.wildfly.naming.client.WildFlyInitialContextFactory\");\n final Context context = new InitialContext(jndiProperties);\n\n /*\n * The app name is the application name of the deployed EJBs. This is typically the ear name without the .ear suffix.\n * However, the application name could be overridden in the application.xml of the EJB deployment on the server. Since\n * we haven't deployed the application as a .ear, the app name for us will be an empty string\n */\n final String appName = \"\";\n\n /*\n * This is the module name of the deployed EJBs on the server. This is typically the jar name of the EJB deployment,\n * without the .jar suffix, but can be overridden via the ejb-jar.xml. In this example, we have deployed the EJBs in a\n * jboss-shopping-cart-server.jar, so the module name is jboss-shopping-cart-server\n */\n final String moduleName = \"shopping-cart-server\";\n\n /*\n * JBoss EAP allows each deployment to have an (optional) distinct name. We haven't specified a distinct name for our EJB\n * deployment, so this is an empty string\n */\n final String distinctName = \"\";\n\n /*\n * The EJB name which by default is the simple class name of the bean implementation class\n */\n final String beanName = ShoppingCartBean.class.getSimpleName();\n\n /* The remote view fully qualified class name */\n final String viewClassName = ShoppingCart.class.getName();\n\n /* Lookup the remote interface of the shopping cart */\n String lookupName = \"ejb:\" + appName + \"/\" + moduleName + \"/\" + distinctName + \"/\" + beanName + \"!\" + viewClassName\n + \"?stateful\";\n final ShoppingCart cart = (ShoppingCart) context.lookup(lookupName);\n\n System.out.println(\"\\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\");\n System.out.println(\"Obtained the remote interface to the shopping cart\");\n\n /* invoke on the remote interface */\n System.out.println(\"Buying a \\\"\" + ACCESSORIES_2 + \"\\\"\");\n cart.buy(ACCESSORIES_2, 1);\n System.out.println(\"Buying another \\\"\" + ACCESSORIES_2 + \"\\\"\");\n cart.buy(ACCESSORIES_2, 1);\n\n System.out.println(\"Buying a \\\"\" + ACCESSORIES_1 + \"\\\"\");\n cart.buy(ACCESSORIES_1, 1);\n\n System.out.println(\"\\nPrint cart:\");\n Map<String, Integer> cartContents = cart.getCartContents();\n for (String product : cartContents.keySet()) {\n System.out.println(cartContents.get(product) + \" \" + product);\n }\n\n System.out.println(\"\\nCheckout\");\n cart.checkout();\n\n /* Try to access the cart after checkout */\n try {\n cart.getCartContents();\n System.err.println(\"ERROR: The cart should not be available after Checkout!\");\n } catch (NoSuchEJBException e) {\n System.out.println(\"Cart was correctly removed, as expected, after Checkout and is no longer available!\");\n }\n System.out.println(\"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\\n\");\n }", "@Override\n @Test(groups = {\"java:comp/env access\"})\n public void testJNDI00() throws Exception {\n super.testJNDI00();\n }", "public static void main(String[] args) throws Exception {\n\t\tProperties props = new Properties();\n\t\tprops.put(Context.INITIAL_CONTEXT_FACTORY, \"org.apache.openejb.client.RemoteInitialContextFactory\");\n\t\tprops.put(Context.PROVIDER_URL, \"ejbd://127.0.0.1:4201\");\n\t\tContext ctx = new InitialContext(props);\n\n\t\t// Look up the stateless bean example\n\t\tExampleStateless stateless = (ExampleStateless) ctx.lookup(\"ExampleStatelessBeanRemote\");\n\t\t// Perform operation on the stateless bean\n\t\tString result = stateless.sayHello();\n\t\tSystem.out.println(result);\n\n\t\t// Look up the stateful session bean example\n\t\tExampleStateful stateful = (ExampleStateful) ctx.lookup(\"ExampleStatefulBeanRemote\");\n\t\t// Notice how each run of the client will have the same output\n\t\t// Because state of the bean is kept separately for each client run\n\t\tSystem.out.println(stateful.inc());\n\t\tSystem.out.println(stateful.inc());\n\t\tSystem.out.println(stateful.reset());\n\t\tSystem.out.println(stateful.inc());\n\n\t\t// Look up the stateless bean that operates with entity beans\n\t\tExampleEntities movies = (ExampleEntities) ctx.lookup(\"ExampleEntityBeansRemote\");\n\n\t\t// Add some data\n\t\tint d1 = movies.addDirector(\"Steven Spielberg\");\n\t\tmovies.addMovie(\"Jurassic Park\", d1);\n\t\tmovies.addMovie(\"E.T. the Extra-Terrestrial\", d1);\n\t\tint d2 = movies.addDirector(\"George Lucas\");\n\t\tmovies.addMovie(\"Star Wars\", d2);\n\t\tmovies.addMovie(\"Return of the Jedi\", d2);\n\n\t\t// List the data\n\t\t// Notice how the list grows with multiple client runs because directors / movies\n\t\t// have an extra integer as a primary key, and not the names\n\t\t// Also notice that stopping and restarting the EJB server does not forget\n\t\t// the data thanks to the persistence\n\t\tList<String> list = movies.getDirectors();\n\t\tfor (String d: list) {\n\t\t\tSystem.out.println(d);\n\t\t}\n\t\tlist = movies.getDirectorsWithMovies();\n\t\tfor (String d: list) {\n\t\t\tSystem.out.println(d);\n\t\t}\n\t}", "public interface InvoiceEntityHome\n extends javax.ejb.EJBHome\n{\n public static final String COMP_NAME=\"java:comp/env/ejb/InvoiceEntity\";\n public static final String JNDI_NAME=\"ejb/InvoiceEntity\";\n\n public com.csr.billing.ejb.InvoiceEntity create(com.csr.billing.ejb.InvoiceDTO invoice)\n throws javax.ejb.CreateException,java.rmi.RemoteException;\n\n public java.util.Collection findAll()\n throws javax.ejb.FinderException,java.rmi.RemoteException;\n\n public com.csr.billing.ejb.InvoiceEntity findByPrimaryKey(java.lang.Integer pk)\n throws javax.ejb.FinderException,java.rmi.RemoteException;\n\n}", "public void bind(String name, Remote ref) throws RemoteException, AlreadyBoundException;", "@Test\n\tpublic void testBindClause() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query_bind.rq\", \"/tests/basic/query_bind.srx\", false);\n\t}", "@Test\r\n public void testFind() throws Exception {\r\n Map props = new HashMap();\r\n// props.put(\"org.glassfish.ejb.embedded.glassfish.instance.root\",\r\n// \"/Applications/GlassFish/glassfishv3-webprofile/glassfish/domains/domain1\");\r\n props.put(EJBContainer.MODULES, new File[]{\r\n new File(\"web/WEB-INF/classes\"),\r\n new File(\"test/conf/\")\r\n });\r\n\r\n \r\n System.out.println(\"find\");\r\n String key = \"\";\r\n// EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\r\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer(props);\r\n LoginSessionBean instance = (LoginSessionBean)container.getContext().lookup(\"java:global/classes/LoginSessionBean\");\r\n Users expResult = null;\r\n Users result = instance.find(key);\r\n assertEquals(expResult, result);\r\n container.close();\r\n // TODO review the generated test code and remove the default call to fail.\r\n //fail(\"The test case is a prototype.\");\r\n }", "public interface EjbReference extends NamedInformation, InjectionCapable {\n \n /** \n * Get the type of the EJB (Session, Entity or Message-Driven). \n * @return the type of the EJB.\n */\n public String getType();\n\n /**\n * Set the type of the EJB. Allowed values are Session, Entity or\n * Message-driven.\n * @param the type of the EJB.\n */\n public void setType(String type);\n\n /** \n * Gets the home classname of the referee EJB. \n * @return the class name of the EJB home.\n */\n public String getEjbHomeInterface();\n\n /** \n * Sets the local or remote home classname of the referee EJB. \n * @param the class name of the EJB home.\n */\n public void setEjbHomeInterface(String ejbHomeInterface);\n\n /** \n * Gets the local or remote interface classname of the referee EJB. \n * @return the classname of the EJB remote object.\n */\n public String getEjbInterface();\n\n /** \n * Sets the local or remote bean interface classname of the referee EJB. \n * @param the classname of the EJB remote object.\n */\n public void setEjbInterface(String ejbInterface);\n \n /** \n * Gets the link name of the reference. For use when linking to an EJB \n * within a J2EE application. \n * @return the link name.\n */\n public String getLinkName();\n\n /** \n * Sets the link name of the reference. For use when linking to an EJB \n * within a J2EE application. \n * @param the link name.\n */\n public void setLinkName(String linkName);\n \n /**\n * Tests if the reference to the referree EJB is through local or \n * remote interface\n * @return true if using the local interfaces\n */\n public boolean isLocal();\n \n /**\n * Sets whether the reference uses the local or remote interfaces of \n * the referring EJB\n * @param true if using the local interface\n */\n public void setLocal(boolean isLocal);\n \n /**\n * Set the referring bundle, i.e. the bundle within which this\n * EJB reference is declared. \n */\n public void setReferringBundleDescriptor(BundleDescriptor referringBundle);\n\n /**\n * Get the referring bundle, i.e. the bundle within which this\n * EJB reference is declared. \n */\n public BundleDescriptor getReferringBundleDescriptor();\n \n /**\n * Set the jndi name for this ejb reference\n */\n public void setJndiName(String jndiName);\n \n /**\n * @return the jndi name for this ejb reference\n */\n public String getJndiName();\n\n public boolean hasJndiName();\n\n public boolean hasLookupName();\n public String getLookupName();\n \n public EjbDescriptor getEjbDescriptor();\n public void setEjbDescriptor(EjbDescriptor descriptor);\n\n /**\n * @return true if the EJB reference is a 30 client view\n */\n public boolean isEJB30ClientView();\n\n}", "@Test // Support of dependency injection\n void bindToPortWithDrivenAdapter()\n {\n objectUnderTest\n .addToInfrastructure(JEXXA_DRIVEN_ADAPTER)\n .bind(ProxyAdapter.class).to(ApplicationServiceWithDrivenAdapters.class)\n .start();\n\n\n //Assert\n //Assert\n var result = objectUnderTest.getDrivingAdapter(ProxyAdapter.class)\n .getPortList()\n .stream()\n .filter( element -> ApplicationServiceWithDrivenAdapters.class.equals(element.getClass()) )\n .findFirst();\n\n assertTrue(result.isPresent());\n }", "public void test01_getEJBObject(){\n\n try{\n EJBObject object = ejbHandle.getEJBObject();\n assertNotNull( \"The EJBObject is null\", object );\n // Wait until isIdentical is working.\n //assertTrue(\"EJBObjects are not identical\", object.isIdentical(ejbObject));\n } catch (Exception e){\n fail(\"Received Exception \"+e.getClass()+ \" : \"+e.getMessage());\n }\n }", "@Test\n void bindToPort()\n {\n objectUnderTest\n .bind(ProxyAdapter.class).to(SimpleApplicationService.class)\n\n .start();\n\n //Assert\n var result = objectUnderTest.getDrivingAdapter(ProxyAdapter.class)\n .getPortList()\n .stream()\n .filter( element -> SimpleApplicationService.class.equals(element.getClass()) )\n .findFirst();\n\n assertTrue(result.isPresent());\n }", "public static void bind(String name, myRemoteInterface obj) throws AlreadyBoundException, RemoteException, IOException {\n\t\tString className = obj.getClass().getCanonicalName();\n\t\tString ip = null;\n\t\ttry {\n\t\t\tip = InetAddress.getLocalHost().getHostAddress();\n \n\t\t} catch (UnknownHostException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\tString nameWithSpace = Naming.parseHostPort(name);\n\t\tString args[] = nameWithSpace.split(\" \");\n\t\t\n\t\tRemoteObjectRef newRef = new RemoteObjectRef(ip, 9999,args[2] , className,\"bind\");\n\t\t\n\t\tObjectMap.insertIntoServerMap(args[2], obj);\n\t\t\n\t\tRegistryInterface stub = null;\n\t\t try{\n\t\t\t \n\t\t\t Class<?> stub_class = Class.forName(\"registry.Registry_stub\");\n\t\t\t stub = (RegistryInterface)Class.forName(\"registry.Registry_stub\").newInstance();\n\t\t\t if(stub_class != null){\n\t\t\t\t byte[] temp = downloadToServer(stub_class, newRef);\n\t\t\t }\n\t\t} catch (InstantiationException | IllegalAccessException\n\t\t\t\t| ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tstub.bind(name, newRef);\n\t\t\n\t}", "public interface ResearchApplicationRemoteHome extends javax.ejb.EJBHome {\n \n \n \n /**\n *\n */\n org.tgdb.model.researchapplication.ResearchApplicationRemote findByPrimaryKey(Integer key) throws javax.ejb.FinderException, java.rmi.RemoteException;\n\n java.util.Collection findByProject(int pid) throws javax.ejb.FinderException, java.rmi.RemoteException;\n\n org.tgdb.model.researchapplication.ResearchApplicationRemote create(java.lang.String name, java.lang.String comm, int pid, int raid, TgDbCaller caller) throws javax.ejb.CreateException, java.rmi.RemoteException;\n\n Collection findByName(String name) throws javax.ejb.FinderException, java.rmi.RemoteException;\n\n Collection findByKeyword(Keyword keyword, TgDbCaller caller) throws javax.ejb.FinderException, java.rmi.RemoteException;\n \n}", "public interface LocalHelloWorldHome extends EJBLocalHome {\n com.sunflower.ejb.LocalHelloWorld create() throws CreateException;\n}", "public static void main(String[] args) {\n\t\t\ntry {\n\t\t\t\n\t\t\t// Create Properties for JNDI InitialContext.\n\t\t\tProperties prop = new Properties();\n\t\t\tprop.put(Context.INITIAL_CONTEXT_FACTORY, org.jboss.naming.remote.client.InitialContextFactory.class.getName()); \n\t\t\tprop.put(Context.URL_PKG_PREFIXES, \"org.jboss.ejb.client.naming\");\n\t\t\tprop.put(Context.PROVIDER_URL, \"http-remoting://localhost:8080\");\n\t\t\tprop.put(\"jboss.naming.client.ejb.context\", true);\n\t\t\t\n\n\t\t\t// Create the JNDI InitialContext.\n\t\t\tContext context = new InitialContext(prop);\n\t\t\t\n\t\t\t// Formulate the full JNDI name for the Diary session bean.\n\t\t\tString appName = \"MarketDataAnalyser\";\n\t\t\tString moduleName = \"MarketDataAnalyserEJB\";\n\t\t\tString beanName = \"MarketDataAnalyserBean\";\n\t\t\tString packageName = \"market.dataanalyser.ejb\";\n\t\t\tString className = \"MarketDataAnalyserBeanRemote\";\n\t\t\t\n\t\t\t// Lookup the bean using the full JNDI name.\n\t\t\tString fullJndiName = String.format(\"%s/%s/%s!%s.%s\", appName, moduleName, beanName, packageName, className);\n\t\t\tSystem.out.println(fullJndiName);\n\t\t\tMarketDataAnalyserBeanRemote bean = (MarketDataAnalyserBeanRemote) context.lookup(fullJndiName);\n\n\t\t\tList<String> stockList=bean.listAllStocks();\n\t\t\t\n//\t\t\tfor(String elem: stockList){\n//\t\t\t\tSystem.out.println(elem);\n//\t\t\t}\n\t\t\tSystem.out.println(\"no. of elements: \"+stockList.size());\n\t\t\tNasdaq data=(Nasdaq)bean.fetchStockDetails(\"AACC\");\n\t\t\tSystem.out.println(data.toString());\n\t\t\t\n\t\t\tbean.fetchStockVariation(\"AACC\", 20110103, 20110113);\n\t\t\t//bean.IsArrowUp(\"AACC\");\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\tSystem.out.println(\"Exception: \" + ex.getMessage());\n\t\t}\n\t}", "@Test\n public void testUnbindFromControllerStateOtherThanInstalled() throws Throwable\n {\n // Create a new key/value pair for binding into MC\n String name = \"MyObject\";\n Object value = new Object();\n\n // Construct BMDB, adding an unmet dependency\n BeanMetaDataBuilder bmdb = BeanMetaDataBuilder.createBuilder(name, value.getClass().getName());\n bmdb.addDependency(\"SomeDependencyThatDoesn'tExist\");\n\n // Install into MC, though because of the unmet dependency will not reach \"INSTALLED\" state\n try\n {\n getBootstrap().getKernel().getController().install(bmdb.getBeanMetaData(), value);\n }\n catch (Throwable e)\n {\n throw new RuntimeException(\"Could not install at name \\\"\" + name + \"\\\" value \" + value, e);\n }\n\n // Ensure that the install didn't completely succeed\n ControllerContext context = getBootstrap().getKernel().getController().getContext(name, null);\n TestCase.assertTrue(\"The test object should not be fully installed for this test\", !context.getState().equals(\n ControllerState.INSTALLED));\n\n // Unbind\n Ejb3RegistrarLocator.locateRegistrar().unbind(name);\n\n // Check that we've unbound\n boolean isUnbound = false;\n try\n {\n Ejb3RegistrarLocator.locateRegistrar().lookup(name);\n }\n catch (NotBoundException nbe)\n {\n isUnbound = true;\n }\n TestCase.assertTrue(\"The test object should be unbound\", isUnbound);\n\n }", "public static void main(String[] args) {\n\n try {\n MyRemote service = new MyRemoteImp1();\n Naming.rebind(\"Remote Hello\", service);\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "@Test\n public void testGetServerLocal() throws ApplicationException {\n CommunicationFactory instance = CommunicationFactory.getFactory();\n String expResult = bundle.getString(IPropertiesConstants.COMM_LOCAL_CONNECTOR);\n String result = instance.getServer(\"localhost\").getClass().getName();\n assertEquals(expResult, result);\n }", "protected abstract Object doLocalLookup( Name name )\n throws NamingException;", "public interface TestSessionBeanLocal\n extends javax.ejb.EJBLocalObject\n{\n\n}", "private void initializeNamingContextBindings() throws NamingException {\r\n \t\t// get the reference to the SLEE container from JNDI\r\n \t\tSleeContainer container = SleeContainer.lookupFromJndi();\r\n \t\t// get the entities name\r\n \t\tString entityName = bootstrapContext.getEntityName();\r\n \r\n \t\tResourceAdaptorEntity resourceAdaptorEntity = ((ResourceAdaptorEntity) container\r\n \t\t\t\t.getResourceAdaptorEnitity(entityName));\r\n \t\tResourceAdaptorTypeID raTypeId = resourceAdaptorEntity\r\n \t\t\t\t.getInstalledResourceAdaptor().getRaType()\r\n \t\t\t\t.getResourceAdaptorTypeID();\r\n \r\n \t\t// Bind ACI Factory in JNDI\r\n \t\tacif = new HttpServletRaActivityContextInterfaceFactoryImpl(\r\n \t\t\t\tresourceAdaptorEntity.getServiceContainer(), entityName, this);\r\n \t\t// set the ActivityContextInterfaceFactory\r\n \t\tresourceAdaptorEntity.getServiceContainer()\r\n \t\t\t\t.getActivityContextInterfaceFactories().put(raTypeId, acif);\r\n \r\n \t\ttry {\r\n \t\t\tif (this.acif != null) {\r\n \t\t\t\t// parse the string =\r\n \t\t\t\t// java:slee/resources/http-servlet-ra/http-servlet-ra-acif\r\n \t\t\t\tString jndiName = ((ResourceAdaptorActivityContextInterfaceFactory) acif)\r\n \t\t\t\t\t\t.getJndiName();\r\n \t\t\t\tint begind = jndiName.indexOf(':');\r\n \t\t\t\tint toind = jndiName.lastIndexOf('/');\r\n \t\t\t\tString prefix = jndiName.substring(begind + 1, toind);\r\n \t\t\t\tString name = jndiName.substring(toind + 1);\r\n \t\t\t\tlogger.debug(\"========================== jndiName prefix =\"\r\n \t\t\t\t\t\t+ prefix + \"; jndiName = \" + name + \" ; ACIF: \" + acif\r\n \t\t\t\t\t\t+ \"=========================\");\r\n \t\t\t\tSleeContainer.registerWithJndi(prefix, name, this.acif);\r\n \t\t\t}\r\n \t\t} catch (IndexOutOfBoundsException e) {\r\n \t\t\t// not register with JNDI\r\n \t\t\tlogger.warn(e.getMessage(), e);\r\n \t\t}\r\n \r\n \t\t// Bind HttpServletResourceEntryPoint in JNDI. It will be the bridge\r\n \t\t// between\r\n \t\t// a designated HttpServlet and the RA\r\n \t\tresourceEntryPoint = new HttpServletResourceEntryPoint(entityName, this);\r\n \r\n \t\ttry {\r\n \t\t\tif (this.resourceEntryPoint != null) {\r\n \t\t\t\t// parse the string =\r\n \t\t\t\t// java:slee/resources/http-servlet-ra/http-servlet-resource-entry-point\r\n \t\t\t\tString jndiName = resourceEntryPoint.getJndiName();\r\n \t\t\t\tint begind = jndiName.indexOf(':');\r\n \t\t\t\tint toind = jndiName.lastIndexOf('/');\r\n \t\t\t\tString prefix = jndiName.substring(begind + 1, toind);\r\n \t\t\t\tString name = jndiName.substring(toind + 1);\r\n \t\t\t\tlogger.debug(\"========================== jndiName prefix =\"\r\n \t\t\t\t\t\t+ prefix + \"; jndiName = \" + name\r\n \t\t\t\t\t\t+ \" ; Resource Entry Point: \" + resourceEntryPoint\r\n \t\t\t\t\t\t+ \"=========================\");\r\n \t\t\t\tSleeContainer.registerWithJndi(prefix, name,\r\n \t\t\t\t\t\tthis.resourceEntryPoint);\r\n \t\t\t}\r\n \t\t} catch (IndexOutOfBoundsException e) {\r\n \t\t\t// not register with JNDI\r\n \t\t\tlogger.warn(e.getMessage(), e);\r\n \t\t}\r\n \r\n \t}", "public void ejbActivate() {\n testAllowedOperations(\"ejbActivate\");\n }", "public interface TestingEntityLocalHome extends javax.ejb.EJBLocalHome {\n \n \n \n /**\n *\n */\n test.TestingEntityLocal findByPrimaryKey(java.lang.String key) throws javax.ejb.FinderException;\n \n \n \n /**\n *\n */\n test.TestingEntityLocal create(java.lang.String key) throws javax.ejb.CreateException;\n\n TestingEntityLocal createTest1() throws CreateException;\n\n TestingEntityLocal createTest2(String a, int b) throws CreateException, IOException;\n\n String homeTestMethod1();\n\n String homeTestMethod2(String a, int b) throws Exception;\n\n Collection findByTest1() throws FinderException;\n \n \n}", "public boolean isBound(String name)\n {\n try\n {\n InitialContext ctx = new InitialContext();\n Object ds = ctx.lookup(name);\n if (ds == null) {\n return false;\n }\n return true;\n }\n catch (NamingException e)\n {\n return false;\n } // end of catch\n \n }", "public static void bind(String jndiName, Object obj) {\n\t\ttry {\n\t\t\tContext ctx = new InitialContext();\n\t\t\ttry {\n\t\t\t\tctx.unbind(jndiName);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// Ignore\n\t\t\t}\n\t\t\ttry {\n\t\t\t\t// Use alternative method for JBoss\n\t\t\t\tClass<?> nonSerializableFactory = Class.forName(\"org.jboss.naming.NonSerializableFactory\");\n\t\t\t\tMethod rebind = nonSerializableFactory.getMethod(\"rebind\", Context.class, String.class, Object.class);\n\t\t\t\trebind.invoke(null, ctx, jndiName, obj);\n\t\t\t} catch (Exception e) {\n\t\t\t\tctx.rebind(jndiName, obj);\n\t\t\t}\n\n\t\t\tlog.info(\"Bound \" + obj.getClass().getName() + \" to \" + jndiName);\n\t\t} catch (NamingException e) {\n\t\t\tlog.error(\"Error in JNDI binding\", e);\n\t\t}\n\t}", "@javax.ejb.Remote\npublic interface EjbApi\n{\n public String compute( String d1, String d2 );\n}", "public void ejbLoad() {\n }", "public void ejbLoad() {\n }", "@Override\n @Test(groups = {\"EJB access\"})\n public void testEJB00() throws Exception {\n super.testEJB00();\n }", "@Test\n void bindToAnnotatedPorts()\n {\n objectUnderTest\n .bind(ProxyAdapter.class).toAnnotation(ApplicationService.class)\n .start();\n\n //Assert\n var result = objectUnderTest.getDrivingAdapter(ProxyAdapter.class)\n .getPortList()\n .stream()\n .filter( element -> SimpleApplicationService.class.equals(element.getClass()) )\n .findFirst();\n\n assertTrue(result.isPresent());\n }", "protected void instantiateEJB() throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n if ( ejbRef() != null )\n return;\n\n com.hps.july.trailcom.beans.OpticalHopKey key = keyFromFields(initKey_hopid_hopsid);\n ejbRef = ejbHome().findByPrimaryKey(key);\n }", "public interface PersonLocal extends javax.ejb.EJBLocalObject {\r\n\t/**\r\n\t * Get accessor for persistent attribute: password\r\n\t */\r\n\tpublic java.lang.String getPassword();\r\n\t/**\r\n\t * Set accessor for persistent attribute: password\r\n\t */\r\n\tpublic void setPassword(java.lang.String newPassword);\r\n\t/**\r\n\t * Get accessor for persistent attribute: firstName\r\n\t */\r\n\tpublic java.lang.String getFirstName();\r\n\t/**\r\n\t * Set accessor for persistent attribute: firstName\r\n\t */\r\n\tpublic void setFirstName(java.lang.String newFirstName);\r\n\t/**\r\n\t * Get accessor for persistent attribute: lastName\r\n\t */\r\n\tpublic java.lang.String getLastName();\r\n\t/**\r\n\t * Set accessor for persistent attribute: lastName\r\n\t */\r\n\tpublic void setLastName(java.lang.String newLastName);\r\n\t/**\r\n\t * Get accessor for persistent attribute: emailAddress\r\n\t */\r\n\tpublic java.lang.String getEmailAddress();\r\n\t/**\r\n\t * Set accessor for persistent attribute: emailAddress\r\n\t */\r\n\tpublic void setEmailAddress(java.lang.String newEmailAddress);\r\n\t/**\r\n\t * This method was generated for supporting the relationship role named todo.\r\n\t * It will be deleted/edited when the relationship is deleted/edited.\r\n\t */\r\n\tpublic java.util.Collection getTodo();\r\n\t/**\r\n\t * This method was generated for supporting the relationship role named todo.\r\n\t * It will be deleted/edited when the relationship is deleted/edited.\r\n\t */\r\n\tpublic void setTodo(java.util.Collection aTodo);\r\n\t/**\r\n\t * This is our method to get all todos for one person\r\n\t */\r\n\tpublic java.util.Collection getTodos();\r\n\tpublic boolean isPasswordCorrect(String password);\r\n}", "public interface RemoteContextListenerInterface extends Remote\n{\n /**\n * Called when an object has been added.\n * <p>\n * The binding of the newly added object can be obtained using <tt>evt.getNewBinding()</tt>.\n * @param evt NamingEvent; The nonnull event.\n * @see NamingEvent#OBJECT_ADDED\n * @throws RemoteException on network failure\n */\n public void objectAdded(NamingEvent evt) throws RemoteException;\n\n /**\n * Called when an object has been removed.\n * <p>\n * The binding of the newly removed object can be obtained using <tt>evt.getOldBinding()</tt>.\n * @param evt NamingEvent; The nonnull event.\n * @see NamingEvent#OBJECT_REMOVED\n * @throws RemoteException on network failure\n */\n public void objectRemoved(NamingEvent evt) throws RemoteException;\n\n /**\n * Called when an object has been renamed.\n * <p>\n * The binding of the renamed object can be obtained using <tt>evt.getNewBinding()</tt>. Its old binding (before the\n * rename) can be obtained using <tt>evt.getOldBinding()</tt>. One of these may be null if the old/new binding was\n * outside the scope in which the listener has registered interest.\n * @param evt NamingEvent; The nonnull event.\n * @see NamingEvent#OBJECT_RENAMED\n * @throws RemoteException on network failure\n */\n public void objectRenamed(NamingEvent evt) throws RemoteException;\n\n /**\n * Called when an object has been changed.\n * <p>\n * The binding of the changed object can be obtained using <tt>evt.getNewBinding()</tt>. Its old binding (before the\n * change) can be obtained using <tt>evt.getOldBinding()</tt>.\n * @param evt NamingEvent; The nonnull naming event.\n * @see NamingEvent#OBJECT_CHANGED\n * @throws RemoteException on network failure.\n */\n public void objectChanged(NamingEvent evt) throws RemoteException;\n\n /**\n * Called when a naming exception is thrown while attempting to fire a <tt>NamingEvent</tt>.\n * @param evt NamingExceptionEvent; The nonnull event.\n * @throws RemoteException on network exception\n * @throws RemoteException on network failure\n */\n void namingExceptionThrown(NamingExceptionEvent evt) throws RemoteException;\n}", "@Remote\npublic interface PassengerStatefulEJBRemote {\n\n Passenger getPassenger();\n void createPassengers(String ssn, String firstName, String lastName, Integer frequentFlyerMiles, byte[] picture, Date dateOfBirth, PassengerType passengerType, Date lastFlight);\n void pickPassenger(long id);\n void setAddress(Address address);\n void addCreditCard(CreditCard creditCard);\n void addTicket(double price, Status status);\n void checkOut();\n}", "public void bind(String name, Object obj) {\n\t\tif (log.isInfoEnabled()) {\n\t\t\tlog.info(\"Static JNDI binding: [\" + name + \"] = [\" + obj + \"]\");\n\t\t}\n\t\tthis.boundObjects.put(name, obj);\n\t}", "public interface ModelManagerRemoteHome extends javax.ejb.EJBHome {\n \n \n \n /**\n *\n */\n org.tgdb.model.modelmanager.ModelManagerRemote create() throws javax.ejb.CreateException, java.rmi.RemoteException;\n \n \n}", "public static void main(String[] args) {\n\t\ttry {\r\n\t\t\tMyRemote service = (MyRemote) Naming.lookup(\"rmi://127.0.0.1:6600/remoteTest\");\r\n\t\t\tString s = service.sayHello();\r\n\t\t\tSystem.out.println(s);\r\n\t\t} catch (MalformedURLException | RemoteException | NotBoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public void bind(String name, Object obj)\r\n {\r\n if (logger.isInfoEnabled()) {\r\n logger.info(\"Static JNDI binding: [\" + name + \"] = [\" + jndiObjectToString(obj) + \"]\");\r\n }\r\n this.boundObjects.put(name, obj);\r\n }", "@Test\n void testRegisterBinding() {\n final var queue = new Queue(\"test\");\n final var exchange = new TopicExchange(\"testExchange\");\n final var routingKey = \"routing-key\";\n\n final var binding = BindingBuilder.bind(queue).to(exchange).with(routingKey);\n\n // When we call registry method\n contextUtils.registerBinding(\"testBinding\", binding);\n\n // Then we expect the queue to be available in the context\n final var actual = context.getBean(\"testBinding\", Binding.class);\n assertNotNull(actual);\n assertEquals(binding.getExchange(), exchange.getName());\n assertEquals(binding.getRoutingKey(), routingKey);\n }", "public interface ConectorLocalHome extends javax.ejb.EJBLocalHome {\n\t/**\n\t * Creates an instance from a key for Entity Bean: Conector\n\t */\n\t static final String JNDI_NAME=\"ejb/co/com/telefonica/atiempo/ejb/eb/ConectorLocalHome\";\n\t \n\tpublic co.com.telefonica.atiempo.ejb.eb.ConectorLocal create(\n\t\tjava.lang.Integer cod_conector)\n\t\tthrows javax.ejb.CreateException;\n\t/**\n\t * Finds an instance using a key for Entity Bean: Conector\n\t */\n\tpublic co.com.telefonica.atiempo.ejb.eb.ConectorLocal findByPrimaryKey(\n\t\tco.com.telefonica.atiempo.ejb.eb.ConectorKey primaryKey)\n\t\tthrows javax.ejb.FinderException;\n}", "public void bind() {\n }", "public ActiveEntity getEntityBinding(String name, boolean local) {\n ActiveEntity ent = (entities == null)\n ? null : entities.getEntityBinding(name);\n if (debug() && ent != null) \n debug(\"Binding found for \" + name + \" \" + ent.getClass().getName());\n return (local || ent != null || nameContext == null)\n ? ent : nameContext.getEntityBinding(name, local);\n }", "static void deployMockEJB() throws Exception {\r\n if (!mockEJBDeployed) {\r\n // deploy ejb's to MockContainer.\r\n MockContextFactory.setAsInitial();\r\n MockContainer mockContainer = new MockContainer(new InitialContext());\r\n // Instead of LoginRemote mock ejb containere returns MockLoginBean now.\r\n SessionBeanDescriptor beanDescriptor = new SessionBeanDescriptor(LoginRemoteHome.EJB_REF_NAME,\r\n LoginRemoteHome.class, LoginRemote.class, MockLoginBean.class);\r\n mockContainer.deploy(beanDescriptor);\r\n // change deployment status. To avoid unnecessary deployment.\r\n mockEJBDeployed = true;\r\n }\r\n }", "@Test\n void conditionalBindToPort()\n {\n objectUnderTest\n .conditionalBind(() -> false, ProxyAdapter.class).to(SimpleApplicationService.class)\n .start();\n\n //Assert that no binding has been performed\n var result = objectUnderTest.getDrivingAdapter(ProxyAdapter.class);\n\n assertTrue(result.getPortList().isEmpty());\n }", "protected abstract void bind();", "protected abstract void bind();", "@Test\n @Tag(\"CREATE\")\n @Tag(\"RESOURCE\")\n @DisplayName(\"Test HQL Query with Parameter Binding with Address 02\")\n public void testHQLQueryWithParameterBindingWithAddress02()\n {\n System.out.println(\"Programme Start\");\n long startTime = System.nanoTime();\n\n UuidUtilities utilities = new UuidUtilities();\n List<SBAddress02> addresses = null;\n\n try (Session session = HibernateUtil.getSessionFactory().openSession()) {\n Transaction transaction = null;\n try {\n transaction = session.beginTransaction();\n\n// Query query = session.createQuery(\"from SBAddress02 where address02Zip = '292000' or address02Zip = '2920013'\");\n// Query query = session.createQuery(\"from SBAddress02 where address02Zip = ? or address02Zip = ?\"); // No longer support\n Query query = session.createQuery(\"from SBAddress02 where address02Zip = ?1 or address02Zip = :searchParam\");\n// .setParameter(1,\"292000\")\n// .setParameter(\"searchParam\",\"2920013\");\n query.setParameter(1, \"292000\");\n query.setParameter(\"searchParam\", \"2920013\");\n\n addresses = query.list();\n\n transaction.commit();\n\n addresses.forEach(address -> System.out.println(\"Added Address : \" + address.getAddress02Street()));\n } catch (Exception e) {\n if (transaction != null) {\n transaction.rollback();\n }\n LOGGER.error(ExceptionUtils.getFullStackTrace(e));\n e.printStackTrace();\n }\n\n } catch (Throwable throwable) {\n LOGGER.error(ExceptionUtils.getFullStackTrace(throwable));\n throwable.printStackTrace();\n }\n\n System.out.println(\"Address : \" + addresses.size());\n\n long endTime = System.nanoTime();\n ELAPSED_TIME = endTime - startTime;\n System.out.println(\"Programme End\");\n\n }", "public static void main(String[] args) throws NamingException {\n InitialContext ic = new InitialContext();\n db = (DatabaseRemote) ic.lookup(DatabaseRemote.class.getName());\n Gui gui = new Gui(db);\n gui.setVisible(true);\n \n }", "private void registerBindings(){\t\t\n\t}", "private void registerBindings(){\t\t\n\t}", "public static void main(String[] args) throws NamingException {\n\r\n\t\tContext context = new InitialContext();\r\n\r\n\t\tfloat subfees = 50;\r\n\t\tString jndi = \"rnr.care-ear/rnr.care-ejb/EventManager!rnr.care.services.EventManagerRemote\";\r\n\r\n\t\tEventManagerRemote eventManagementRemote = (EventManagerRemote) context.lookup(jndi);\r\n\t\tString jndi1 = \"rnr.care-ear/rnr.care-ejb/UserManager!rnr.care.services.UserManagerRemote\";\r\n\t\tUserManagerRemote userManagementRemote = (UserManagerRemote) context.lookup(jndi1);\r\n\t\tString jndi2 = \"rnr.care-ear/rnr.care-ejb/ParticipationManagement!rnr.care.services.ParticipationManagementRemote\";\r\n\t\tParticipationManagementRemote participationManagementRemote = (ParticipationManagementRemote) context\r\n\t\t\t\t.lookup(jndi2);\r\n\r\n\tUser user = userManagementRemote.findUserById(1);\r\n\r\n\t\tEvent event = eventManagementRemote.findEventById(1);\r\n\r\n\t\t//participationManagementRemote.saveOrUpdateParticipation(6, 1, new Date,user , event);\r\n\t}", "@Remote\r\npublic interface AdministrarGestionarLocalesCentroComercialBORemote {\r\n\r\n /**\r\n * Metodo encargado de obtener los registros de LocalCentroComercial de la\r\n * base de datos\r\n *\r\n * @return Lista de LocalCentroComercial\r\n */\r\n public List<LocalCentroComercial> consultarLocalesCentroComercialRegistrados();\r\n\r\n /**\r\n * Metodo encargado de obtener los registros de LocalCentroComercial por\r\n * medio de parametros de busqueda\r\n *\r\n * @param filtros Parametros de busqueda\r\n * @return Lista de LocalCentroComercial\r\n */\r\n public List<LocalCentroComercial> consultarLocalesCentroComercialPorParametro(Map<String, String> filtros);\r\n\r\n /**\r\n * Metodo encargado de obtener un LocalCentroComercial por medio de su id\r\n *\r\n * @param idLocalCentroComercial Id del local\r\n * @return LocalCentroComercial identificado por el id dado\r\n */\r\n public LocalCentroComercial obtenerLocalCentroComercialPorID(BigInteger idLocalCentroComercial);\r\n\r\n /**\r\n * Metodo encargado de actualizar la informacion de un LocalCentroComercial\r\n *\r\n * @param localCentroComercial LocalCentroComercial a editar\r\n */\r\n public void actualizarInformacionLocalCentroComercial(LocalCentroComercial localCentroComercial);\r\n\r\n /**\r\n * Metodo encargado de registrar un LocalCentroComercial en la base de datos\r\n *\r\n * @param localCentroComercialNuevo LocalCentroComercial a registrar\r\n */\r\n public void almacenarNuevoLocalCentroComercialEnSistema(LocalCentroComercial localCentroComercialNuevo);\r\n\r\n /**\r\n * Metodo encargado de validar si el numero de local ya esta registradp\r\n *\r\n * @param numeroLocal Numero local\r\n * @return true -> no existe / false -> ya existe\r\n */\r\n public Boolean obtenerLocalPorNumeroLocal(String numeroLocal);\r\n}", "public <T> T lookup(String jndiName);", "public static void rebind(String name, myRemoteInterface obj) throws RemoteException, AlreadyBoundException {\n\t\n\t\tString className = obj.getClass().getCanonicalName();\n\t\tString ip = null;\n\t\ttry {\n\t\t\tip = InetAddress.getLocalHost().getHostAddress();\n \n\t\t} catch (UnknownHostException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\tString nameWithSpace = Naming.parseHostPort(name);\n\t\tString args[] = nameWithSpace.split(\" \");\n\t\t\n\t\tRemoteObjectRef newRef = new RemoteObjectRef(ip, 9999,args[2] , className,\"rebind\");\n\t\t\n\t\tObjectMap.insertIntoServerMap(args[2], obj);\n\t\t\n\t\tRegistryInterface stub = null;\n\t\t try{\n\t\t\t \n\t\t\t Class<?> stub_class = Class.forName(\"registry.Registry_stub\");\n\t\t\t stub = (RegistryInterface)Class.forName(\"registry.Registry_stub\").newInstance();\n\t\t\t if(stub_class != null){\n\t\t\t\t byte[] temp = downloadToServer(stub_class, newRef);\n\t\t\t }\n\t\t} catch (InstantiationException | IllegalAccessException\n\t\t\t\t| ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tstub.rebind(name, newRef);\n\t\t\n\t\t\n\t}", "protected void instantiateEJB() throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n if ( ejbRef() != null )\n return;\n\n com.hps.july.persistence.SuperRegionKey key = keyFromFields(initKey_supregid);\n ejbRef = ejbHome().findByPrimaryKey(key);\n }", "@Local\r\npublic interface AdministrativeEJBLocal extends AbstractSolaTransactionEJBLocal {\r\n\r\n List<ChangeStatusType> getChangeStatusTypes(String languageCode);\r\n\r\n List<BaUnitType> getBaUnitTypes(String languageCode);\r\n\r\n List<MortgageType> getMortgageTypes(String languageCode);\r\n\r\n List<RrrGroupType> getRRRGroupTypes(String languageCode);\r\n\r\n List<RrrType> getRRRTypes(String languageCode);\r\n\r\n BaUnit getBaUnitById(String id);\r\n\r\n Rrr getRrr(String id);\r\n\r\n BaUnit getBaUnitByCode(String nameFirstPart, String nameLastPart);\r\n\r\n BaUnit saveBaUnit(String serviceId, BaUnit baUnit);\r\n\r\n List<BaUnit> getBaUnitsByTransactionId(String transactionId);\r\n\r\n List<BaUnitRelType> getBaUnitRelTypes(String languageCode);\r\n\r\n BaUnit terminateBaUnit(String baUnitId, String serviceId);\r\n\r\n BaUnit cancelBaUnitTermination(String baUnitId);\r\n\r\n List<RrrLoc> getRrrLocsById(String locId);\r\n\r\n Moth saveMoth(Moth moth);\r\n\r\n Moth getMoth(String id);\r\n\r\n List<Moth> getMoths(String vdcCode, String mothLuj);\r\n\r\n Moth getMoth(String vdcCode, String mothLuj, String mothLujNumber);\r\n\r\n Loc saveLoc(Loc loc);\r\n\r\n Loc getLoc(String id);\r\n\r\n LocWithMoth getLocWithMoth(String id);\r\n\r\n BaUnit saveBaUnit(BaUnit baUnit);\r\n\r\n LocWithMoth getLocByPageNoAndMoth(LocSearchByMothParams searchParams);\r\n\r\n List<LocWithMoth> getLocListByPageNoAndMoth(LocSearchByMothParams searchParams);\r\n\r\n List<Loc> getLocList(String mothId);\r\n\r\n List<RestrictionReason> getRestrictionReasons(String languageCode);\r\n\r\n List<RestrictionReleaseReason> getRestrictionReleaseReasons(String languageCode);\r\n\r\n List<RestrictionOffice> getRestrictionOffices(String languageCode);\r\n\r\n List<OwnerType> getOwnerTypes(String languageCode);\r\n\r\n List<OwnershipType> getOwnershipTypes(String languageCode);\r\n\r\n List<TenancyType> getTenancyTypes(String languageCode);\r\n\r\n void deletePendingBaUnit(String baUnitId);\r\n\r\n List<Moth> searchMoths(MothSearchParams params);\r\n\r\n List<Moth> searchMothsByParts(String searchString);\r\n}", "public interface SimpleLogRemote extends javax.ejb.EJBObject, com.arexis.mugen.simplelog.SimpleLogRemoteBusiness {\n \n \n}", "boolean initializeOrbEnvirement(String args[]){\n\t\t// create and initialize the ORB\n\t\tORB orb = ORB.init(args, null);\n\n\t\ttry {\n\t\t\t// get the root naming context\n\t\t\torg.omg.CORBA.Object objRef;\n\t\t\tobjRef = orb.resolve_initial_references(\"NameService\");\n\t\t\t// Use NamingContextExt instead of NamingContext. This is part of the Interoperable naming Service. \n\t\t\tnamingContextRef = NamingContextExtHelper.narrow(objRef);\n\t\t\treturn true;\n\t\t} catch (InvalidName e) {\n\t\t\tSystem.out.println(\"Failed to resolve NameService!\");\n\t\t\t//e.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "public interface LookUpService1 {\n public void say();\n}", "@Test\n\tvoid createInitialContext() throws Exception {\n\t\tSimpleNamingContextBuilder builder = SimpleNamingContextBuilder.emptyActivatedContextBuilder();\n\t\tString name = \"foo\";\n\t\tObject o = new Object();\n\t\tbuilder.bind(name, o);\n\t\t// Check it affects JNDI\n\t\tContext ctx = new InitialContext();\n\t\tassertThat(ctx.lookup(name) == o).isTrue();\n\t\t// Check it returns mutable contexts\n\t\tctx.unbind(name);\n\t\tInitialContext badCtx1 = new InitialContext();\n\t\tassertThatExceptionOfType(NamingException.class).isThrownBy(() ->\n\t\t\t\tbadCtx1.lookup(name));\n\n\t\t// Check the same call will work again, but the context is empty\n\t\tbuilder = SimpleNamingContextBuilder.emptyActivatedContextBuilder();\n\t\tInitialContext badCtx2 = new InitialContext();\n\t\tassertThatExceptionOfType(NamingException.class).isThrownBy(() ->\n\t\t\t\tbadCtx2.lookup(name));\n\t\tObject o2 = new Object();\n\t\tbuilder.bind(name, o2);\n\t\tassertThat(o2).isEqualTo(badCtx2.lookup(name));\n\t}", "@Remote\npublic interface TripEJBRemote {\n\n public List<Trip> getAllTrips();\n\n public List<Location> getAllDestinations();\n\n Location getDestinationForName(String destinationName);\n\n Trip getTripForID(int id);\n\n void storeNewTrips(List<TripElement> lst);\n\n Flight findFlightById(int id);\n\n Location findLocationByCode(String code);\n\n List<Trip> getPossibleTrips(String destination, Date departureDate, Date arrivalDate, int numberOfPersons);\n\n Booking createBooking(double totalPrice, int nrOfTrips, PaymentType paymentType, Trip trip);\n\n List<String> getAllContintentDestinationsOfTrips();\n\n List<String> getAllContintentFromOfTrips();\n\n List<Location> getAllDestinationsOfTrips();\n\n List<Location> getAllFromOfTrips();\n\n List<Trip> getAllTripsFiltered(String toloc, String fromloc, String tocon, String fromcon);\n}", "public void ejbActivate() {\n }", "@Remote\r\npublic interface BonLivraisonManagerRemote\r\n extends BonLivraisonManager\r\n{\r\n\r\n\r\n}", "public interface SatlujRemoteHome\n extends EJBHome\n{\n\n public abstract SatlujRemote create()\n throws CreateException, RemoteException;\n}", "public interface ContactHome extends javax.ejb.EJBLocalHome {\n\t/**\n\t * Creates an instance from a key for Entity Bean: Contact\n\t */\n\tpublic com.vh.locker.ejb.Contact create(java.lang.Long id, java.lang.String name, java.lang.String nickName, java.lang.String phone, java.lang.String email, com.vh.locker.ejb.User anUser) throws javax.ejb.CreateException;\n\t\n /**\n\t * Finds an instance using a key for Entity Bean: Contact\n\t */\n\tpublic com.vh.locker.ejb.Contact findByPrimaryKey(java.lang.Long primaryKey) throws javax.ejb.FinderException;\n\tpublic java.util.Collection findByUser(java.lang.Long userId) throws javax.ejb.FinderException;\n}", "T bindTo(Object instance);", "public void initializeNaming(File dbDir, int orbInitialPort) throws Exception\n {\n\t// NOTE: The TransientNameService reference is NOT HA.\n new TransientNameService((com.sun.corba.ee.spi.orb.ORB)orb);\n _logger.log(Level.FINE, \"POAProtocolMgr.initializeNaming: complete\");\n }", "protected abstract void doLocalUnbind( Name name )\n throws NamingException;", "private void init() {\n System.out.println(\"Binding to RMIRegistry...\");\n String theName = getConfigManager().getString(\"REMOTE_NAME\");\n if (null != theName) {\n bind(theName, this);\n } else {\n LoggingServices.getCurrent().logMsg(getClass().getName(), \"init()\"\n , \"Could not find name to bind to in registry.\"\n , \"Make sure loyalty.cfg contains a RMIREGISTRY entry.\", LoggingServices.MAJOR);\n }\n }", "public interface Bitacora_peticionLocalHome extends javax.ejb.EJBLocalHome {\n\t/**\n\t * Creates an instance from a key for Entity Bean: Bitacora_peticion\n\t */\n\t static final String JNDI_NAME=\"ejb/co/com/telefonica/atiempo/ejb/eb/Bitacora_peticionLocalHome\";\n\tpublic co.com.telefonica.atiempo.ejb.eb.Bitacora_peticionLocal create(\n\t\tjava.lang.Long bipe_id)\n\t\tthrows javax.ejb.CreateException;\n\t/**\n\t * Finds an instance using a key for Entity Bean: Bitacora_peticion\n\t */\n\tpublic co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.ejb\n\t\t.eb\n\t\t.Bitacora_peticionLocal findByPrimaryKey(\n\t\tco.com.telefonica.atiempo.ejb.eb.Bitacora_peticionKey primaryKey)\n\t\tthrows javax.ejb.FinderException;\n\t/**\n\t * Creates an instance from a key for Entity Bean: Bitacora_peticion\n\t */\n\tpublic co.com.telefonica.atiempo.ejb.eb.Bitacora_peticionLocal create(\n\t\tjava.lang.Long bipe_id,\n\t\tjava.lang.Long usua_id,\n\t\tjava.sql.Timestamp bipe_fecha_inicio,\n\t\tco.com.telefonica.atiempo.ejb.eb.ActividadLocal argFk_acti_2_bipe,\n\t\tco.com.telefonica.atiempo.ejb.eb.PeticionLocal argFk_peticion)\n\t\tthrows javax.ejb.CreateException;\n\n\t/**\n\t * @param idActividad\n\t * @param object\n\t * @param idPeticion\n\t * @param idUsuario\n\t * @param date\n\t * @param object2\n\t * @param object3\n\t * @param esReversa\n\t * @return\n\t */\n\tpublic co.com.telefonica.atiempo.ejb.eb.Bitacora_peticionLocal create(\n\t\tLong idActividad,\n\t\tLong idCausa,\n\t\tLong peticion,\n\t\tLong usuaId,\n\t\tDate bipeFechaInicio,\n\t\tDate bipeFechaFin,\n\t\tString bipeObservacion,\n\t\tShort esReversa)\n\t\tthrows CreateException;\n\n\tpublic java.util.Collection findbyNumeroPeticion(java.lang.Long idPeticion) throws javax.ejb.FinderException;\n//\tpublic java.util.Collection findFechaFin(java.lang.Long idPeticion) throws javax.ejb.FinderException;\n//\n\tpublic java.util.Collection findByPetiOrden(java.lang.Long idPeticion) throws javax.ejb.FinderException;\n\tpublic Bitacora_peticionLocal findByPeticionActividad(java.lang.Long idPeticion, java.lang.Long idActividad) throws javax.ejb.FinderException;\n\tpublic Bitacora_peticionLocal findByPeticionActividadUsuario(java.lang.Long idPeticion, java.lang.Long idActividad, java.lang.Long idUsuario)\n\t\tthrows javax.ejb.FinderException;\n//\t//public Bitacora_peticionLocal findNumPeticionActividad(java.lang.Long numPeticion) throws javax.ejb.FinderException;\n//\tpublic java.util.Collection findByPeticionFechaTerminoNula(java.lang.Long nroPeticion) throws javax.ejb.FinderException;\n//\tpublic Bitacora_peticionLocal findObsPeticionActividad(java.lang.Long numeroPeticion, java.lang.Long numeroActividad)\n//\t\tthrows javax.ejb.FinderException;\n//\tpublic Bitacora_peticionLocal findByCodigoObservacionPeticion(java.lang.Long peticion) throws javax.ejb.FinderException;\n//\tpublic Bitacora_peticionLocal findByIdPeticionAndMdfTerminada(java.lang.Long idPeticion) throws javax.ejb.FinderException;\n//\t\n\tpublic java.util.Collection findbyPeticionRol(java.lang.Long idPeticion, java.lang.Long idRol) throws javax.ejb.FinderException;\n//\tpublic java.util.Collection findByPeticionActividadNoNula(java.lang.Long idPeticion, java.lang.Long idActividad) throws javax.ejb.FinderException;\n\tpublic java.util.Collection findByPeticionActividadCerrada(java.lang.Long petiNumero, java.lang.Long actId) throws javax.ejb.FinderException;\n\tpublic java.util.Collection findPreviuosActivity(java.lang.Long petiNumero)\n\t\tthrows javax.ejb.FinderException;\n\tpublic java.util.Collection findbypeticionfechafin(java.lang.Long idPeticion)\n\t\tthrows javax.ejb.FinderException;\n\tpublic java.util.Collection findByOpenAct(java.lang.Long idActividad)\n\t\tthrows javax.ejb.FinderException;\n\tpublic co.com.telefonica.atiempo.ejb.eb.Bitacora_peticionLocal findbyMaxActivity(java.lang.Long idPeticion, java.lang.Long idActividad) throws javax.ejb.FinderException;\n}", "public static void main(String[] args) {\n System.out.println(\"Begin Server...\");\n\n\n\n try {\n Remote r = Naming.lookup(\"UniversalRegistry\");\n IUniversalRegistry iur = (IUniversalRegistry)r;\n\n //on ajoute des voitures dans le registre universel\n Voiture v1 = new Voiture(1);\n iur.bind(\"v1\",v1);\n Voiture v2 = new Voiture(2);\n iur.bind(\"v2\",v2);\n\n\n //On ajoute des voitures electrique dans le registre universel\n VoitureElectrique ve = new VoitureElectrique(4,0);\n iur.bind(\"ve\",ve);\n VoitureElectrique ve1 = new VoitureElectrique(4,1);\n iur.bind(\"ve1\",ve1);\n\n VoitureElectrique ve3 = new VoitureElectrique(4,1);\n iur.bind(\"ve3\",ve3);\n\n ClassTest classTest = new ClassTest();\n iur.bind(\"cl\",classTest);\n\n\n }\n\n catch(Exception e){\n e.printStackTrace();\n }\n\n\n\n }", "public void ejbCreate() {\n\n }", "public String checkShouKuanDan(String name) throws RemoteException {\n String url = \"rmi://localhost:1098/\";\n String out=\"\";\n try {\n Context namingContext = new InitialContext();\n PbbService serv = (PbbService) namingContext.lookup(\n url + \"HelloService1\");\n out=serv.checkShouKuanDan(name);\n }\n catch (NamingException e) {\n e.printStackTrace();\n }\n return out;\n }", "@Remote\r\npublic interface HrJBorrowcontractFacadeRemote {\r\n\t/**\r\n\t * Perform an initial save of a previously unsaved HrJBorrowcontract entity.\r\n\t * All subsequent persist actions of this entity should use the #update()\r\n\t * method.\r\n\t * \r\n\t * @param entity\r\n\t * HrJBorrowcontract entity to persist\r\n\t * @throws RuntimeException\r\n\t * when the operation fails\r\n\t */\r\n\tpublic void save(HrJBorrowcontract entity);\r\n\t/**\r\n\t * \r\n\t * @param entity\r\n\t */\r\n\tpublic long save2(HrJBorrowcontract entity);\r\n\t/**\r\n\t * Delete a persistent HrJBorrowcontract entity.\r\n\t * \r\n\t * @param entity\r\n\t * HrJBorrowcontract entity to delete\r\n\t * @throws RuntimeException\r\n\t * when the operation fails\r\n\t */\r\n\tpublic void delete(HrJBorrowcontract entity);\r\n\r\n\t/**\r\n\t * Persist a previously saved HrJBorrowcontract entity and return it or a\r\n\t * copy of it to the sender. A copy of the HrJBorrowcontract entity\r\n\t * parameter is returned when the JPA persistence mechanism has not\r\n\t * previously been tracking the updated entity.\r\n\t * \r\n\t * @param entity\r\n\t * HrJBorrowcontract entity to update\r\n\t * @return HrJBorrowcontract the persisted HrJBorrowcontract entity\r\n\t * instance, may not be the same\r\n\t * @throws RuntimeException\r\n\t * if the operation fails\r\n\t */\r\n\tpublic HrJBorrowcontract update(HrJBorrowcontract entity);\r\n\t/**\r\n\t * \r\n\t * @param entity\r\n\t * @throws DataChangeException\r\n\t * @throws SQLException\r\n\t */\r\n\tpublic HrJBorrowcontract update2(HrJBorrowcontract entity)throws DataChangeException,SQLException;\r\n\tpublic HrJBorrowcontract findById(Long id);\r\n\r\n\t/**\r\n\t * Find all HrJBorrowcontract entities with a specific property value.\r\n\t * \r\n\t * @param propertyName\r\n\t * the name of the HrJBorrowcontract property to query\r\n\t * @param value\r\n\t * the property value to match\r\n\t * @return List<HrJBorrowcontract> found by query\r\n\t */\r\n\tpublic List<HrJBorrowcontract> findByProperty(String propertyName,\r\n\t\t\tObject value);\r\n\r\n\t/**\r\n\t * Find all HrJBorrowcontract entities.\r\n\t * \r\n\t * @return List<HrJBorrowcontract> all HrJBorrowcontract entities\r\n\t */\r\n\tpublic List<HrJBorrowcontract> findAll();\r\n\t/**\r\n\t * \r\n\t * @param entity\r\n\t */\r\n\tpublic void logicDelete(String strBorrowContractId,String user_id,String strOldUpdateTime)throws DataChangeException,SQLException;\r\n\t/**\r\n\t * \r\n\t * @param strBorrowContractId\r\n\t * @param user_id\r\n\t * @param strOldUpdateTime\r\n\t * @throws DataChangeException\r\n\t * @throws SQLException\r\n\t */\r\n\t\r\n\tpublic void repoet(String strBorrowContractId,String user_id,String strOldUpdateTime)\r\n throws DataChangeException ,SQLException;\r\n}", "public interface Pie2NriHome extends javax.ejb.EJBHome {\ncom.hps.july.arenda.billing.Pie2Nri create() throws javax.ejb.CreateException, java.rmi.RemoteException;\n}", "protected void instantiateEJB() throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n if ( ejbRef() != null )\n return;\n\n com.hps.july.persistence.CarKey key = keyFromFields(initKey_car);\n ejbRef = ejbHome().findByPrimaryKey(key);\n }", "@Override\n\tpublic void bind() {\n\t\t\n\t}", "@Test\n void invalidBindToPortAdapter()\n {\n var drivingAdapter = objectUnderTest\n .bind(ProxyAdapter.class);\n\n //Act /Assert\n assertThrows(PortConventionViolation.class, () -> drivingAdapter.to(SimpleApplicationServiceAdapter.class));\n }", "protected void instantiateEJB() throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n if ( ejbRef() != null )\n return;\n\n com.hps.july.persistence.SuperRegionAccKey key = keyFromFields(initKey_accessid);\n ejbRef = ejbHome().findByPrimaryKey(key);\n }", "public static void main(String args[]) throws Exception {\n\t\tLocateRegistry.createRegistry(1099);\n\t\tServer remote = new ServerImpl();\n\t\t//将远程服务对象绑定到指定JNDI。\n\t\tNaming.rebind(\"rmi://localhost:1099/HelloServiceImpl\", remote);\n\t}", "public void testDataSource(String dsName)\n {\n try\n {\n InitialContext ctx = new InitialContext();\n DataSource ds = (DataSource)ctx.lookup(dsName);\n if (ds == null) {\n throw new Exception(\"DataSource lookup was null\");\n }\n Connection c = ds.getConnection();\n if (c == null) {\n throw new Exception(\"Connection was null!!\");\n }\n DatabaseMetaData dmd = c.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"%\", null);\n c.close();\n } catch (Exception e)\n {\n throw new EJBException(e);\n }\n }", "public interface AInstalarTOALocalHome extends javax.ejb.EJBLocalHome {\n\t\n\tpublic static final String JNDI_NAME = \"ejb/co/com/telefonica/atiempo/vpistbba/actividades/df/instalacion/ejb/sb/AInstalarTOALocalHome\";\t\n\n\t/**\n\t * Creates a default instance of Session Bean: AInstalarTOA\n\t */\n\tpublic co.com.telefonica.atiempo.vpistbba.actividades.df.instalacion.ejb.sb.AInstalarTOALocal create()\n\t\tthrows javax.ejb.CreateException;\n}", "@Test\n public void testValidateObjectLowersActiveFlagIfConnectionHasBeenBoundButAutoBindIsNotSet() {\n expect(conn.isBindAttempted()).andReturn(true);\n // we assume autoBind defaults to false (we'd rather not go through the\n // whole process of mocking up the connection manager again)\n conn.setActive(false);\n expectLastCall().once();\n replay(conn);\n assertFalse(factory.validateObject(conn));\n }", "public interface EJBLocalHome {\n\n /**\n * <p>Remove an EJB object identified by its primary key.</p>\n *\n * <p>This method can only be used by local clients of an entity bean.\n * An attempt to call this method on a session bean will result in an EJBException.</p>\n *\n * @param primaryKey - The primary key\n * @exception RemoveException - Thrown if the enterprise Bean or the container does\n * not allow the client to remove the object.\n * @exception EJBException - Thrown when the method failed due to a system-level failure.\n */\n public void remove(java.lang.Object primaryKey)\n throws RemoveException, EJBException;\n}", "public interface EJBContainerProvider\n{\n /**\n * Called by the embeddable container bootstrap process to find a suitable embeddable container\n * implementation. An embeddable container provider may deem itself as appropriate for the\n * embeddable application if any of the following are true : The javax.ejb.embeddable.initial\n * property was included in the Map passed to createEJBContainer and the value of the property is\n * the provider's implementation class. No javax.ejb.embeddable.initial property was specified.\n * If a provider does not qualify as the provider for the embeddable application, it must return null.\n * \n * @param properties\n * @return EJBContainer instance or null\n * @throws EJBException\n */\n EJBContainer createEJBContainer(Map<?, ?> properties) throws EJBException;\n}", "public void rebind(String name, Object obj) throws NamingException {\n }", "public interface EmpSessionHome extends EJBHome {\n swforge.EmpSession create() throws RemoteException, CreateException;\n}", "public static void bind(ServiceBinder binder) {\n\t\t\n\t\tbinder.bind(CoreDAO.class,CoreDAOHibernate.class);\n\t\tbinder.bind(AuthorizingRealm.class, UserRealm.class).withId(UserRealm.class.getSimpleName());\n\t//\tbinder.bind(FederatedAccountService.class, DefaultHibernateFederatedAccountServiceImpl.class);\n\t\t\n//\t\tbinder.bind(FederatedAccountService.class, FederatedAccountServiceExample.class);\n//\t\tbinder.bind(AuthorizingRealm.class, FederatedAccountsAuthorizingRealm.class).withId(\n//\t\t\tFederatedAccountsAuthorizingRealm.class.getSimpleName());\n\t}", "protected void instantiateEJB() throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n if ( ejbRef() != null )\n return;\n\n com.hps.july.persistence.StoragePlaceKey key = keyFromFields(initKey_storageplace);\n ejbRef = ejbHome().findByPrimaryKey(key);\n }", "@Test\n\tpublic void oneToOneWithBind() {\n\t\tSystem.out.println(\"============oneToOneWithBind=========\");\n\t\tUser u = new User();\n\t\tAddress a = new Address();\n\t\tu.configMapping(oneToOne(), u.ID(), a.UID(), bind(u.ADDRESS(), a.USER()));\n\t\tList<User> users = Dao.queryForEntityList(User.class, select(), u.all(), \",\", a.all(), from(), u.table(), \",\",\n\t\t\t\ta.table(), \" where \", u.ID(), \"=\", a.UID());\n\t\tfor (User user : users) {\n\t\t\tSystem.out.println(user.getUserName());\n\t\t\tAddress address = user.getAddress();\n\t\t\tSystem.out.println(\"\\t\" + address.getAddressName());\n\t\t\tUser user2 = address.getUser();\n\t\t\tAssert.assertTrue(user == user2);\n\t\t}\n\t}", "public static void main(String[] args) throws RemoteException{\n \r\n Registry registry= LocateRegistry.createRegistry(5099); //registrar a nuestro cliente \r\n registry.rebind(\"hello\", new ObjectRemote());\r\n }", "private void bindObject() {\n }", "public interface AGenerarReciboLocalHome extends javax.ejb.EJBLocalHome {\n\t\n\tpublic static final String JNDI_NAME = \"ejb/co/com/telefonica/atiempo/vpistbba/actividades/df/configuracion/ejb/sb/AGenerarReciboLocalHome\";\n\t\n\t/**\n\t * Creates a default instance of Session Bean: AGenerarRecibo\n\t */\n\tpublic co.com.telefonica.atiempo.vpistbba.actividades.df.configuracion.ejb.sb.AGenerarReciboLocal create()\n\t\tthrows javax.ejb.CreateException;\n}", "protected void doBind(SocketAddress localAddress) throws Exception {}", "EJBObject getEJBObject() throws IllegalStateException;" ]
[ "0.70574963", "0.69752073", "0.63109845", "0.62803954", "0.6086298", "0.60516614", "0.5887876", "0.5830761", "0.5811091", "0.58084905", "0.5748611", "0.57158273", "0.5714634", "0.57065177", "0.57036203", "0.56892043", "0.5685127", "0.5543383", "0.55410516", "0.55333656", "0.55301654", "0.5505458", "0.5478788", "0.54388213", "0.5419328", "0.54192775", "0.5415198", "0.5412442", "0.537827", "0.5354082", "0.53529686", "0.53498256", "0.53498256", "0.5335098", "0.53295785", "0.5322501", "0.53095996", "0.5302808", "0.5257381", "0.52388763", "0.52312416", "0.5211441", "0.52098364", "0.51776606", "0.5133942", "0.51330346", "0.51288766", "0.51274353", "0.51243514", "0.51136404", "0.51136404", "0.5100793", "0.50939965", "0.5093405", "0.5093405", "0.50851274", "0.5084031", "0.5077182", "0.50667065", "0.5066541", "0.5066189", "0.50529224", "0.5037024", "0.50352526", "0.5029736", "0.50292057", "0.50289387", "0.50264585", "0.5022851", "0.50156915", "0.50150853", "0.5011866", "0.5011694", "0.50087446", "0.50022423", "0.49960256", "0.49948427", "0.49915332", "0.4990627", "0.49905095", "0.4990497", "0.49695987", "0.49676028", "0.49558568", "0.49483764", "0.4948249", "0.4942809", "0.4940048", "0.49390608", "0.49242416", "0.491914", "0.49024627", "0.49004748", "0.4895493", "0.48869058", "0.4885462", "0.48841974", "0.48834252", "0.48828295", "0.4875706" ]
0.8105287
0
do not add any urls to the context
private Context getAutoDiscoveryContext(boolean autoDisabled) throws Exception { Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces"); if (autoDisabled) env.put("jnp.disableDiscovery", "true"); Context naming = new InitialContext (env); return naming; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String getUrlContextPath() {\n return \"\";\n }", "@Override\n public boolean isContextPathInUrl() {\n return false;\n }", "@Override\n public boolean isContextPathInUrl() {\n return false;\n }", "@Override\n public boolean containsContext(HttpServletRequest request) {\n return false;\n }", "@Override\r\n public String getUrl()\r\n {\n return null;\r\n }", "private DIDURL(DID context) {\n\t\tthis(context, (DIDURL)null);\n\t}", "@Override\r\n\tpublic void getCurrentUrl() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void getUrl() {\n\r\n\t}", "@Override\n public String getContextPath() {\n return null;\n }", "@Override\n public String getContextPath() {\n return null;\n }", "@Override\r\n\tpublic String getUrl() {\n\t\treturn null;\r\n\t}", "private URLs() {\n }", "@Override\n\t\tpublic String getContextPath() {\n\t\t\treturn null;\n\t\t}", "public ArticleListWeb(Context context, String url) {\n\t\tsuper(context);\n\t\tmURL = url;\n\t\t\n\t\t\n\t}", "public boolean needContext() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isUsedInLinks() {\n\t\treturn false;\n\t}", "@Override\n\t\tpublic StringBuffer getRequestURL() {\n\t\t\treturn null;\n\t\t}", "public BathingSitesView(Context context) {\n super(context);\n init(context, null);\n }", "@Override\n\tpublic String getURL() {\n\t\treturn null;\n\t}", "@Override\n public Context getContext() {\n return null;\n }", "@Override\n\tpublic Void setContext(Context context) {\n\t\treturn null;\n\t}", "@Override\n public boolean shouldOverrideUrlLoading(WebView view, String url) {\n return false;\n }", "public AnnotateClueRunWithURLs() {\r\n\t}", "@Override\n\tpublic String getSiteUrl() {\n\t\treturn null;\n\t}", "public void clearLinks(){\r\n varContextObject=null; \r\n varContextFields=null; \r\n }", "protected abstract void requestNoCache(ActionContext context);", "public RequestUrlHandler() {\n // requestService = SpringContextHolder.getBean(ScfRequestService.class);\n }", "@Override\n\tpublic String[] getAuthorizedUrlPatterns() {\n\t\treturn null;\n\t}", "ControllerContext() {\n\t\t// do nothing\n\t}", "public TurbolinksView(Context context) {\n super(context);\n init();\n }", "@Override\r\n\tpublic Context getContext() {\n\t\treturn null;\r\n\t}", "private URLHelper() {\n\n }", "@Override\r\n public List<String> getMatchedURIs() {\n return null;\r\n }", "protected void loadUrlFromContext(String url) {\n Tab tab = getCurrentTab();\n WebView view = tab != null ? tab.getWebView() : null;\n // In case the user enters nothing.\n if (url != null && url.length() != 0 && tab != null && view != null) {\n url = UrlUtils.smartUrlFilter(url);\n if (!((BrowserWebView) view).getWebViewClient().\n shouldOverrideUrlLoading(view, url)) {\n loadUrl(tab, url);\n }\n }\n }", "public SitoWeb() {\r\n\t\tsuper();\r\n\t\turlBase = null;\r\n\t}", "protected UrlPattern() {\n }", "@Override\n public void onContext() {\n }", "@Override\n\tpublic boolean shouldOverrideUrlLoading(WebView view, String url)\n\t{\n\t\treturn false;\n\t}", "private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}", "private void processUrls(){\n // Strip quoted tweet URL\n if(quotedTweetId > 0){\n if(entities.urls.size() > 0 &&\n entities.urls.get(entities.urls.size() - 1)\n .expandedUrl.endsWith(\"/status/\" + String.valueOf(quotedTweetId))){\n // Match! Remove that bastard.\n entities.urls.remove(entities.urls.size() - 1);\n }\n }\n\n // Replace minified URLs\n for(Entities.UrlEntity entity : entities.urls){\n // Find the starting index for this URL\n entity.indexStart = text.indexOf(entity.minifiedUrl);\n // Replace text\n text = text.replace(entity.minifiedUrl, entity.displayUrl);\n // Find the last index for this URL\n entity.indexEnd = entity.indexStart + entity.displayUrl.length();\n }\n }", "public TestGenericWebXmlContextLoader() {\r\n\t\tsuper(\"/src/main/wepapp\", false);\r\n\t}", "@java.lang.Override\n public boolean hasUrl() {\n return instance.hasUrl();\n }", "@java.lang.Override\n public boolean hasUrl() {\n return instance.hasUrl();\n }", "protected void init()\n {\n context.setConfigured(false);\n ok = true;\n\n if (!context.getOverride())\n {\n processContextConfig(\"context.xml\", false);\n processContextConfig(getHostConfigPath(org.apache.catalina.startup.Constants.HostContextXml), false);\n }\n // This should come from the deployment unit\n processContextConfig(context.getConfigFile(), true);\n }", "MyRecyclerViewAdapterImage(Context context, ArrayList<String> home_url) {\n this.context = context;\n this.mInflater = LayoutInflater.from(context);\n this.home_url = home_url;\n }", "public static String getUrlList(Context context) {\n return CommonConstants.THEMOVIEDB_URL_LIST\n .replace(\"#sort#\",\n PreferenceManager.getDefaultSharedPreferences(context).getString(\n context.getString(R.string.key_pref_sort),\n CommonConstants.THEMOVIEDB_SORT_POPULARITY_DES)\n )\n .replace(\"#page#\", String.valueOf(((MainActivity) context).mPage));\n }", "boolean inStaticContext();", "@Override\n public WebResourceResponse shouldInterceptRequest(WebView view, String url) {\n if (url.contains(\"dc.services.visualstudio.com/\") || url.endsWith(\".png\") ||\n url.endsWith(\".ico\") || url.endsWith(\".css\")){\n Log.v(\"shouldInterceptRequest\", \" intercepted a request to: \" + url);\n return null;\n }\n return super.shouldInterceptRequest(view, url);\n }", "@Override\r\n\tpublic boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)\r\n\t\t\tthrows Exception {\n\t\tString aaa= request.getRequestURI();\r\n\t\tSystem.out.println(\"拦截器准备数据中----\");\r\n\t\tSystem.out.println(\"请求地址---\"+aaa+\";上下文---\"+request.getContextPath());\r\n\t\t\r\n\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public UrlEncapsulation() {\r\n\t\t\r\n\t\tthis(null\r\n\t\t\t\t, null, null, null, null\r\n\t\t\t\t, false, null, null, null, null, null, null, null);\r\n\t\t\r\n\t}", "protected abstract String getUrl();", "@Override\n public void resolveUrls(KeycloakUriBuilder authUrlBuilder) {\n }", "private void loadURLRequest() {\n if (news.getUrl() != null) {\n Intent loadNews = new Intent(itemView.getContext(), WebViewActivity.class);\n loadNews.putExtra(\"URL\", news.getUrl());\n loadNews.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n itemView.getContext().startActivity(loadNews);\n }\n }", "@Override\n public Result filter(FilterChain chain, Context context) {\n ninjaAppengineEnvironment.initOrSkip();\n\n return chain.next(context);\n\n }", "@Override\n\t\t\tpublic boolean shouldOverrideUrlLoading(WebView view, String url) {\n\t\t\t\treturn true;\n\t\t\t}", "@Override\r\n public URI getRequestUri() {\n return null;\r\n }", "@Override\n\t\tpublic String getRequestURI() {\n\t\t\treturn null;\n\t\t}", "private boolean getLinks() {\n return false;\n }", "@Override\n protected boolean shouldEncodeUrls() {\n return isShouldEncodeUrls();\n }", "public String getServerUrl()\n {\n return null;\n }", "@Override\npublic void get(String url) {\n\t\n}", "@Override\n\tpublic String getUrls() throws TException {\n try {\n return DBUtils.getExternWebSite();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return null;\n\t}", "protected void _initLinks() {\n\tpeopleLink = null;\n\tchangeLogDetailsesLink = null;\n}", "@Override\n\tpublic String getUrl()\n\t{\n\t\treturn url;\n\t}", "private final Map<String, String> getUrls(String themeDir, UrlBuilder urlBuilder) {\n // The urls that are accessible to the templates. \n // NB We are not using our menu object mechanism to build menus here, because we want the \n // view to control which links go where, and the link text and title.\n Map<String, String> urls = new HashMap<String, String>();\n \n urls.put(\"home\", urlBuilder.getHomeUrl());\n \n urls.put(\"about\", urlBuilder.getPortalUrl(Route.ABOUT));\n if (ContactMailServlet.getSmtpHostFromProperties() != null) {\n urls.put(\"contact\", urlBuilder.getPortalUrl(Route.CONTACT));\n }\n urls.put(\"search\", urlBuilder.getPortalUrl(Route.SEARCH)); \n urls.put(\"termsOfUse\", urlBuilder.getPortalUrl(Route.TERMS_OF_USE)); \n urls.put(\"login\", urlBuilder.getPortalUrl(Route.LOGIN)); \n urls.put(\"logout\", urlBuilder.getLogoutUrl()); \n urls.put(\"siteAdmin\", urlBuilder.getPortalUrl(Route.LOGIN)); \n \n urls.put(\"siteIcons\", urlBuilder.getPortalUrl(themeDir + \"/site_icons\"));\n return urls;\n }", "@Override\r\n\t\t\tpublic boolean shouldOverrideUrlLoading(WebView view, String url) {\n\t\t\t\treturn super.shouldOverrideUrlLoading(web, url);\r\n\t\t\t}", "@Override\n public void setPageContext(PageContext arg0) {\n \n }", "@Override\n\t\tpublic boolean shouldOverrideUrlLoading(WebView view, String url) {\n\t\t\treturn true;\n\t\t}", "@Override\n\tpublic String[] getRequestFilterIgnoreUrlPatterns() {\n\t\treturn aryIgnoreUrl;\n\t}", "@Override\n public boolean shouldOverrideUrlLoading(WebView view, String url) {\n\n return super.shouldOverrideUrlLoading(view, url);\n }", "@Override\n\tpublic void urlDecisionSetDefaultAttributes() {\n\t\t// TODO Add default attributes for decisions related to URL access\n\n\t}", "@Override\n\tpublic Collection<URL> getUrlsToFilter() {\n\t\tSet<URL> filterSet = new HashSet<URL>();\n\t\tString url=\"http://www.infoq.com/news/2012/11/Panel-WinRT-Answers;jsessionid=91AB81A159E85692E6F1199644E2053C \";\n\t\tfilterSet.add(URL.valueOf(url));\n\t\treturn filterSet;\n\t}", "public NewsContentUsecase(Context context) {\n this.context = context;\n dbOperator = new CacheOperator();\n }", "@PostConstruct\n private void checkUrl() {\n if (weatherServiceUrl.endsWith(\"/\")) {\n weatherServiceUrl = weatherServiceUrl.substring(0, weatherServiceUrl.length() - 1);\n }\n }", "@Override\n\tpublic void starctActivity(Context context) {\n\n\t}", "@Override\n\t\t\tpublic boolean shouldOverrideUrlLoading(WebView view, String url) {\n\t\t\t\treturn super.shouldOverrideUrlLoading(view, url);\n\t\t\t}", "@Override\n public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {\n\n return super.shouldOverrideUrlLoading(view, request);\n }", "@Override\n\tpublic void starctActivity(Context context) {\n\t\t\n\t}", "@Override\n\tpublic String buidWfsURL(WrapperFilter filter) {\n\t\treturn null;\n\t}", "public void setUrl(String tmp) {\n this.url = tmp;\n }", "@Override\r\n public UriBuilder getRequestUriBuilder() {\n return null;\r\n }", "public String getUrl(){\n return urlsText;\n }", "public void changeUrl() {\n url();\n }", "@Override\n\tpublic URL getServiceUrl()\n\t{\n\t\treturn null;\n\t}", "@Override\n\tpublic String[] getPublicUrlPatterns() {\n\t\treturn null;\n\t}", "public String getContextUrl() {\n String currentURL = driver.getCurrentUrl();\n return currentURL.substring(0, currentURL.lastIndexOf(\"/login\"));\n }", "public void cancelLoadUrl() {\n\t\t\n\t}", "@Override\n public String getRequestURI() {\n if (httpRequest instanceof HttpRequestImpl) {\n return strip(context, ((HttpRequestImpl) httpRequest).requestRawPath());\n }\n return strip(context, super.getRequestURI());\n }", "public String getUrl(){\n \treturn url;\n }", "public void resetReferenciado();", "Context context();", "Context context();", "@Override\n public String getBaseUri() {\n return null;\n }", "private ApplicationContext()\n\t{\n\t}", "public void referToSocialServices(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "public String getUrl() { return url; }", "String getRequestedUrl();", "public MockPageContext() {\n super();\n MockPageContext.init();\n }", "@Override\n public StringBuffer getRequestURL() {\n //StringBuffer requestURL = super.getRequestURL();\n //System.out.println(\"URL: \" + requestURL.toString());\n return this.requestURL;\n }", "@Override\n public boolean isAcceptableInContext(TemplateContextType context) {\n return true;\n }", "@Override\r\n public List<String> getMatchedURIs(boolean arg0) {\n return null;\r\n }" ]
[ "0.72363114", "0.7098782", "0.7098782", "0.6044824", "0.5951071", "0.588823", "0.584762", "0.57933134", "0.5780798", "0.5780798", "0.5769854", "0.5706524", "0.56262285", "0.5582713", "0.55821896", "0.5439203", "0.5400204", "0.539497", "0.53769803", "0.53678894", "0.5347959", "0.53229165", "0.52719814", "0.5266895", "0.52616316", "0.52209616", "0.52161235", "0.520614", "0.5205128", "0.52014154", "0.51845086", "0.5169507", "0.5161087", "0.51420856", "0.5138982", "0.5122654", "0.50895244", "0.5089524", "0.5088794", "0.50653696", "0.5065239", "0.50625217", "0.50625217", "0.50561833", "0.5052994", "0.504764", "0.5023986", "0.5019048", "0.50113755", "0.5005418", "0.49890256", "0.49887428", "0.4986964", "0.49792102", "0.4971366", "0.49593338", "0.49569908", "0.49466187", "0.49430707", "0.49376538", "0.49221545", "0.49188763", "0.49052456", "0.4904576", "0.49042785", "0.48996204", "0.48989752", "0.4894088", "0.489345", "0.48874515", "0.48754865", "0.485949", "0.48571378", "0.48537534", "0.48500982", "0.48493898", "0.484922", "0.48392147", "0.48352483", "0.48321414", "0.48294452", "0.48224574", "0.4815539", "0.4814852", "0.479759", "0.47894362", "0.47748402", "0.4774582", "0.47672468", "0.47612813", "0.47605366", "0.47605366", "0.47573176", "0.4751156", "0.4747706", "0.47463432", "0.4739958", "0.47354615", "0.4734598", "0.4722944", "0.4708667" ]
0.0
-1
TODO Autogenerated method stub manager.add(createComponent() .setInterface(IGUI.class.getName(), null) .setImplementation(GUI.class) );
@Override public void init(BundleContext context, DependencyManager manager) throws Exception { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void registerGui()\n {\n }", "public userinterface() {\n initComponents();\n }", "public interface IGUIFactory {\n Component label(String text);\n Component labelEmpty();\n Component fieldReadOnly(int length, String text);\n Component fieldEditable(int length, String text);\n Component fieldCalc(int length, String text, boolean readonly);\n Component button(String text);\n Component button(String text, ActionListener listener);\n Component button(ImageIcon image, ActionListener listener);\n Component password();\n Container panelEmpty();\n Container panel(LayoutManager manager);\n Container panelBordered();\n TablePanel tablePanel(IGUIEditor parent, Table table);\n TablePanel tablePanel(IGUIEditor parent, TableModel tableModel);\n Table table(TableModel tableModel);\n Component comboBoxFilled(Collection priorities);\n Component checkBox(String text);\n Component checkBox(String text, boolean flag);\n LayoutManager boxLayout(Container comp, int direction);\n LayoutManager gridLayout(int rows, int cols);\n Dimension size(int width, int height);\n JTabbedPane tabbedPane();\n JMenuItem menuItem(String text, Icon icon);\n JMenu menu(String text);\n JMenuBar menuBar();\n WindowEvent windowEvent(Window source, int id);\n}", "@Override\n public void initGUI() {\n\n }", "public orgGui() {\n initComponents();\n }", "void initUI();", "@Override\n\tpublic void addGui(Gui gui) {\n\t\t\n\t}", "private void createUIComponents() {\n bt1 = new JButton(\"Hola\");\n }", "@Override\r\n\tprotected void initUI() {\n\r\n\t}", "private GUI()\n {\n makeGUI();\n }", "public MyGUI() {\n \t super(\"Mastermind\");\n \t guiManager = new GUIManager();\n createMenuComponents();\n createMastermindComponents(this,2);\n \n }", "public Interface ()\n {\n initComponents ();\n }", "public Interface() {\n initComponents();\n }", "public Interface() {\n initComponents();\n }", "public Interface() {\n initComponents();\n }", "public UI() {\n initComponents();\n }", "public GUI() {\n\t\tinitComponents();\n\t}", "public User_Interface() {\n initComponents();\n }", "public void buildGui() {\n\t}", "@Override\n public void initGui()\n {\n super.initGui();\n }", "protected void setupUI() {\n\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "public mainUI() {\n initComponents();\n }", "private void initUI() {\n }", "public GUI() {\n initComponents();\n }", "public GUI() {\n initComponents();\n }", "public GUI() {\n }", "public Gui() {\n\t\tsuper();\n\t\tinitGUI();\n\t}", "private void createUIComponents() {\n }", "public interface GUI {\n\n /**\n * Adds a MouseListener to the GUI.\n * @param mouseListener added to the GUI.\n */\n void addMouseListener(MouseListener mouseListener);\n\n /**\n * Get list link button for other GUIs. \n * @return List of ButtonLink\n */\n List<ButtonLink> getBtnActionLinks();\n\n /**\n * Sets the link identifier of the GUI.\n * @param linkActionGUI link identifier.\n */\n void setMainAction(LinkActionGUI linkActionGUI);\n\n /**\n * Set the boundaries from a rectangle.\n * @param rectangle for borders.\n */\n void setBounds(Rectangle rectangle);\n\n /**\n * Set visibility of the GUI.\n * @param visible for visibility.\n */\n void setVisible(boolean visible);\n\n /**\n * Set background image.\n * @param path of image.\n */\n void setImageBackground(String path);\n\n /**\n * Set the border color and thickness.\n * @param color for border.\n * @param thickness for border.\n */\n void setBorder(Color color, int thickness);\n\n /**\n * Set visibility of the foreground panel of the GUI.\n * @param visible for visibility panel.\n */\n void setVisibleGlassPanel(Visibility visible);\n\n /**\n * Close the GUI and destroyed JFrame.\n */\n void close();\n\n}", "private InstructGui() {\n }", "private GUIMain() {\n\t}", "public GUI() {\n initComponents();\n }", "public Gui() {\n initComponents();\n }", "public gui() {\n initComponents();\n }", "public gui() {\n initComponents();\n }", "public AplicationGUI() {\n initComponents();\n }", "Gui getGui();", "@Override\npublic void setUIComponent(VirtualComponent c) {\n\t\n}", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "public RummyUI(){\n \n //Call method initComponents\n initComponents();\n \n }", "public PropsGUI() {\n initComponents();\n }", "public void setUIComponent(Component c) {}", "public ExecutantGui() {\n initComponents();\n }", "public User_gui() {\n initComponents();\n }", "public soal2GUI() {\n initComponents();\n }", "public ClientGUI() {\n initComponents();\n }", "public ClientGUI() {\n initComponents();\n }", "public abstract void initUiAndListener();", "public BridgingUI() {\n initComponents();\n initUserActions();\n }", "public adivinaGUI() {\n initComponents();\n }", "public ClienteGUI() {\n initComponents();\n }", "public InventoryGUI() {\n initComponents();\n }", "public guiProntuarioVirtual() {\n initComponents();\n \n }", "public Gui() { \n preInitComponents(); \n initComponents();\n postInitComponents(); \n setVisible(true);\n appInitialization();\n }", "public RagaiGUI() {\n initComponents();\n \n }", "private void registerUiNode() {\n }", "public MHTYGUI() {\n\t\t\tinitComponents();\n\t\t}", "public Test_GUI() {\n initComponents();\n }", "public BBDJPAAdminGUI() {\n initComponents();\n\n myInit();\n }", "@Override\n public Component getUiComponent() {\n return this;\n }", "void setGui(Gui gui);", "public uitax() {\n initComponents();\n }", "public UI() {\n initComponents();\n setResizable(false);\n }", "public DesktopGUI() {\n initComponents();\n }", "private void $$$setupUI$$$() {\n createUIComponents();\n overCounterForm = new JPanel();\n overCounterForm.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(16, 2, new Insets(30, 30, 30, 30), -1, -1));\n overCounterForm.setMinimumSize(new Dimension(450, 650));\n overCounterForm.setPreferredSize(new Dimension(450, 650));\n final com.intellij.uiDesigner.core.Spacer spacer1 = new com.intellij.uiDesigner.core.Spacer();\n overCounterForm.add(spacer1, new com.intellij.uiDesigner.core.GridConstraints(0, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n medicineicon.setHorizontalAlignment(10);\n medicineicon.setText(\"\");\n overCounterForm.add(medicineicon, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 2, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer2 = new com.intellij.uiDesigner.core.Spacer();\n overCounterForm.add(spacer2, new com.intellij.uiDesigner.core.GridConstraints(2, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer3 = new com.intellij.uiDesigner.core.Spacer();\n overCounterForm.add(spacer3, new com.intellij.uiDesigner.core.GridConstraints(12, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setHorizontalAlignment(10);\n label1.setText(\"Check Over-The-Counter Medication\");\n overCounterForm.add(label1, new com.intellij.uiDesigner.core.GridConstraints(3, 0, 1, 2, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer4 = new com.intellij.uiDesigner.core.Spacer();\n overCounterForm.add(spacer4, new com.intellij.uiDesigner.core.GridConstraints(14, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n prescriptionNameTextField = new JTextField();\n prescriptionNameTextField.setHorizontalAlignment(0);\n prescriptionNameTextField.setMargin(new Insets(5, 5, 5, 5));\n prescriptionNameTextField.setText(\"Prescription Name\");\n overCounterForm.add(prescriptionNameTextField, new com.intellij.uiDesigner.core.GridConstraints(7, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n enterMedicationDetailsManuallyButton = new JButton();\n enterMedicationDetailsManuallyButton.setMargin(new Insets(5, 14, 5, 14));\n enterMedicationDetailsManuallyButton.setText(\"Enter Medication Details Manually\");\n enterMedicationDetailsManuallyButton.setToolTipText(\"Brings up a form where you can fill up the details for the over-the-counter medication manually.\");\n overCounterForm.add(enterMedicationDetailsManuallyButton, new com.intellij.uiDesigner.core.GridConstraints(13, 0, 1, 2, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer5 = new com.intellij.uiDesigner.core.Spacer();\n overCounterForm.add(spacer5, new com.intellij.uiDesigner.core.GridConstraints(6, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer6 = new com.intellij.uiDesigner.core.Spacer();\n overCounterForm.add(spacer6, new com.intellij.uiDesigner.core.GridConstraints(4, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setEnabled(false);\n label2.setHorizontalAlignment(0);\n label2.setHorizontalTextPosition(0);\n label2.setText(\"Please provide the following information:\");\n overCounterForm.add(label2, new com.intellij.uiDesigner.core.GridConstraints(5, 0, 1, 2, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label3 = new JLabel();\n label3.setText(\"Name of prescription\");\n overCounterForm.add(label3, new com.intellij.uiDesigner.core.GridConstraints(7, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label4 = new JLabel();\n label4.setText(\"Barcode value\");\n overCounterForm.add(label4, new com.intellij.uiDesigner.core.GridConstraints(8, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n a13DigitsFormattedTextField = new JFormattedTextField();\n a13DigitsFormattedTextField.setHorizontalAlignment(0);\n a13DigitsFormattedTextField.setMargin(new Insets(5, 5, 5, 5));\n a13DigitsFormattedTextField.setText(\"13 digits\");\n overCounterForm.add(a13DigitsFormattedTextField, new com.intellij.uiDesigner.core.GridConstraints(8, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n manufacturerNameFormattedTextField = new JFormattedTextField();\n manufacturerNameFormattedTextField.setHorizontalAlignment(0);\n manufacturerNameFormattedTextField.setMargin(new Insets(5, 5, 5, 5));\n manufacturerNameFormattedTextField.setText(\"Manufacturer Name\");\n overCounterForm.add(manufacturerNameFormattedTextField, new com.intellij.uiDesigner.core.GridConstraints(9, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n formattedTextField3 = new JFormattedTextField();\n formattedTextField3.setMargin(new Insets(5, 5, 5, 5));\n overCounterForm.add(formattedTextField3, new com.intellij.uiDesigner.core.GridConstraints(10, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n numberOfTabletsInFormattedTextField = new JFormattedTextField();\n numberOfTabletsInFormattedTextField.setHorizontalAlignment(0);\n numberOfTabletsInFormattedTextField.setMargin(new Insets(5, 5, 5, 5));\n numberOfTabletsInFormattedTextField.setText(\"Number of tablets in packet\");\n overCounterForm.add(numberOfTabletsInFormattedTextField, new com.intellij.uiDesigner.core.GridConstraints(11, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label5 = new JLabel();\n label5.setText(\"Name of manufacturer\");\n overCounterForm.add(label5, new com.intellij.uiDesigner.core.GridConstraints(9, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label6 = new JLabel();\n label6.setText(\"Prescription strength\");\n overCounterForm.add(label6, new com.intellij.uiDesigner.core.GridConstraints(10, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label7 = new JLabel();\n label7.setText(\"Tablets in packet\");\n overCounterForm.add(label7, new com.intellij.uiDesigner.core.GridConstraints(11, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n cancelButton = new JButton();\n cancelButton.setMargin(new Insets(5, 14, 5, 14));\n cancelButton.setText(\"Cancel\");\n overCounterForm.add(cancelButton, new com.intellij.uiDesigner.core.GridConstraints(15, 0, 1, 2, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "public jinventario(){\n initComponents();\n }", "public UserInterface() {\n \t setTitle(\"The Cancer Specialist - Diagnostic Application\");\n initComponents();\n }", "public JavierGUI() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\t\tthis.setJavier(getJavier());\r\n\t\tbtnHome.doClick();\r\n\t}", "@Override\n\tpublic void setGui(LiveGui g) {\n\t\t\n\t}", "public History_GUI(){\n super();\n InitializeComponents();\n ConfigureWin();\n\n }", "private void buildGui() {\n nifty = screen.getNifty();\n nifty.setIgnoreKeyboardEvents(true);\n nifty.loadStyleFile(\"nifty-default-styles.xml\");\n nifty.loadControlFile(\"nifty-default-controls.xml\");\n nifty.addScreen(\"Option_Screen\", new ScreenBuilder(\"Options_Screen\") {\n {\n controller((ScreenController) app);\n layer(new LayerBuilder(\"background\") {\n {\n childLayoutCenter();;\n font(\"Interface/Fonts/zombie.fnt\");\n backgroundImage(\"Backgrounds/ZOMBIE1.jpg\");\n visibleToMouse(true);\n }\n });\n layer(new LayerBuilder(\"foreground\") {\n {\n childLayoutOverlay();\n font(\"Interface/Fonts/zombie.fnt\");\n\n panel(new PanelBuilder(\"Switch_Options\") {\n {\n childLayoutVertical();\n control(new ButtonBuilder(\"\", \"Display Settings\") {\n {\n marginTop(\"42%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n interactOnClick(\"goTo(Display_Settings)\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n /*control(new ButtonBuilder(\"\", \"Graphics Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Graphics_Extension)\");\n }\n });*/\n control(new ButtonBuilder(\"\", \"Sound Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Sound_Settings)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Leaderboard\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Leader_Board)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Logout\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Login_Screen)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Quit Game\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"quitGame()\");\n }\n });\n }\n });\n }\n });\n }\n }.build(nifty));\n nifty.addScreen(\"Graphics_Settings\", new ScreenBuilder(\"Graphics_Extension\") {\n {\n controller(settingsControl);\n layer(new LayerBuilder(\"background\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutCenter();\n backgroundImage(\"Backgrounds/ZOMBIE1.jpg\");\n visibleToMouse(true);\n }\n });\n layer(new LayerBuilder(\"foreground\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutOverlay();\n panel(new PanelBuilder(\"Settings\") {\n {\n childLayoutVertical();\n control(new ButtonBuilder(\"\", \"Display Settings\") {\n {\n marginTop(\"42%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Display_Settings)\");\n }\n });\n /*control(new ButtonBuilder(\"\", \"Graphics Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });*/\n control(new ButtonBuilder(\"\", \"Sound Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Sound_Settings)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Leaderboard\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Leader_Board)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Logout\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Login_Screen)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Quit Game\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"quitGame()\");\n }\n });\n }\n });\n }\n });\n layer(new LayerBuilder(\"Settings\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutVertical();\n panel(new PanelBuilder(\"Post_Water_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"15%\");\n control(new LabelBuilder(\"\", \"Post Water\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Post_Water_Button\") {\n {\n marginLeft(\"110%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Water_Reflections_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Water Reflections\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Water_Reflections_Button\") {\n {\n marginLeft(\"45%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Water_Ripples_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Water Ripples\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Water_Ripples_Button\") {\n {\n marginLeft(\"75%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Water_Specular_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Water Specular\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Water_Specular_Button\") {\n {\n marginLeft(\"59%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Water_Foam_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Water Foam\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Water_Foam_Button\") {\n {\n marginLeft(\"93%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Sky_Dome_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Sky Dome\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Sky_Dome_Button\") {\n {\n marginLeft(\"128%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Star_Motion_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Star Motion\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Star_Motion_Button\") {\n {\n marginLeft(\"106%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Cloud_Motion_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Cloud Motion\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Cloud_Motion_Button\") {\n {\n marginLeft(\"87%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Bloom_Light_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Bloom Lighting\") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new CheckboxBuilder(\"Bloom_Light_Button\") {\n {\n marginLeft(\"70%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Light_Scatter_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Light Scatter\") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new CheckboxBuilder(\"Light_Scatter_Button\") {\n {\n marginLeft(\"90%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Apply_Panel\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutHorizontal();\n marginLeft(\"43%\");\n marginTop(\"5%\");\n control(new ButtonBuilder(\"Apply_Button\", \"Apply Settings\") {\n {\n interactOnClick(\"applySettings()\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n }\n });\n }\n });\n }\n }.build(nifty));\n nifty.addScreen(\"Display_Screen\", new ScreenBuilder(\"Display_Settings\") {\n {\n controller(settingsControl);\n layer(new LayerBuilder(\"background\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutCenter();;\n backgroundImage(\"Backgrounds/ZOMBIE1.jpg\");\n visibleToMouse(true);\n }\n });\n layer(new LayerBuilder(\"foreground\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutOverlay();\n panel(new PanelBuilder(\"Settings\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutVertical();\n control(new ButtonBuilder(\"\", \"Display Settings\") {\n {\n marginTop(\"42%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n /*control(new ButtonBuilder(\"\", \"Graphics Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Graphics_Extension)\");\n }\n });*/\n control(new ButtonBuilder(\"\", \"Sound Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Sound_Settings)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Leaderboard\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Leader_Board)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Logout\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Login_Screen)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Quit Game\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"quitGame()\");\n }\n });\n }\n });\n }\n });\n layer(new LayerBuilder(\"Settings\") {\n {\n childLayoutVertical();\n panel(new PanelBuilder(\"Resolution_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"15%\");\n control(new LabelBuilder(\"\", \"Set Resolution\") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new ListBoxBuilder(\"Resolution_Opts\") {\n {\n marginLeft(\"4%\");\n marginBottom(\"10%\");\n displayItems(1);\n showVerticalScrollbar();\n hideHorizontalScrollbar();\n selectionModeSingle();\n width(\"10%\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Apply_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"45%\");\n marginTop(\"5%\");\n control(new ButtonBuilder(\"Apply_Button\", \"Apply Settings\") {\n {\n interactOnClick(\"displayApply()\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n }\n });\n }\n });\n }\n }.build(nifty));\n nifty.addScreen(\"Sound Settings\", new ScreenBuilder(\"#Sound_Settings\") {\n {\n controller(settingsControl);\n layer(new LayerBuilder(\"background\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutCenter();;\n backgroundImage(\"Backgrounds/ZOMBIE1.jpg\");\n visibleToMouse(true);\n }\n });\n layer(new LayerBuilder(\"foreground\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutOverlay();\n panel(new PanelBuilder(\"Settings\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutVertical();\n control(new ButtonBuilder(\"\", \"Display Settings\") {\n {\n marginTop(\"42%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Display_Settings)\");\n }\n });\n /*control(new ButtonBuilder(\"\", \"Graphics Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Graphics_Extension)\");\n }\n });*/\n control(new ButtonBuilder(\"\", \"Sound Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new ButtonBuilder(\"\", \"Leaderboard\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Leader_Board)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Logout\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Login_Screen)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Quit Game\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"quitGame()\");\n }\n });\n }\n });\n }\n });\n layer(new LayerBuilder(\"Settings\") {\n {\n childLayoutVertical();\n panel(new PanelBuilder(\"#Master_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"35%\");\n control(new LabelBuilder(\"\", \"Master Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Master_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"#Ambient_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"8%\");\n control(new LabelBuilder(\"\", \"Ambient Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Ambient_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"#Combat_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"8%\");\n control(new LabelBuilder(\"\", \"Combat Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Combat_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"#Dialog_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"8%\");\n control(new LabelBuilder(\"\", \"Dialog Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Dialog_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"#Footsteps_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"8%\");\n control(new LabelBuilder(\"\", \"Footsteps Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Footsteps_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Apply_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"45%\");\n marginTop(\"5%\");\n control(new ButtonBuilder(\"#Apply_Button\", \"Apply Settings\") {\n {\n interactOnClick(\"soundApply()\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n }\n });\n }\n });\n\n }\n }.build(nifty));\n }", "public AcudienteGUI() {\n initComponents();\n }", "private void createUIComponents() {\n editor = createEditor(project, document);\n splitter = new JBSplitter(0.4f);\n ((JBSplitter) splitter).setFirstComponent(editor.getComponent());\n// ((JBSplitter) splitter).setSecondComponent();\n }", "public CovidGUI(){\n initComponents();\n }", "public GUI() {\n app = new Aplikasi();\n initComponents();\n }", "public static ComponentUI createUI(JComponent x) {\n return new BasicMenuUI(); }", "public GUI_Edit_Tour(){\n init();\n }", "private void criaInterface() {\n\t\tColor azul = new Color(212, 212, 240);\n\n\t\tpainelMetadado.setLayout(null);\n\t\tpainelMetadado.setBackground(azul);\n\n\t\tmetadadoLabel = FactoryInterface.createJLabel(10, 3, 157, 30);\n\t\tpainelMetadado.add(metadadoLabel);\n\n\t\tbotaoAdicionar = FactoryInterface.createJButton(520, 3, 30, 30);\n\t\tbotaoAdicionar.setIcon(FactoryInterface.criarImageIcon(Imagem.ADICIONAR));\n\t\tbotaoAdicionar.setToolTipText(Sap.ADICIONAR.get(Sap.TERMO.get()));\n\t\tpainelMetadado.add(botaoAdicionar);\n\n\t\tbotaoEscolha = FactoryInterface.createJButton(560, 3, 30, 30);\n\t\tbotaoEscolha.setIcon(FactoryInterface.criarImageIcon(Imagem.VOLTAR_PRETO));\n\t\tbotaoEscolha.setToolTipText(Sap.ESCOLHER.get(Sap.TERMO.get()));\n\t\tbotaoEscolha.setEnabled(false);\n\t\tpainelMetadado.add(botaoEscolha);\n\n\t\talterarModo(false);\n\t\tatribuirAcoes();\n\t}", "protected void initializeGUI() {\n\n\t}", "private static void createAndShowGUI() {\n\t\tgui = new GUI();\n\t}", "public UICadMovel() {\n initComponents();\n }", "public UserInterface( final GameEngine pGameEngine )\n {\n\n\n this.aEngine = pGameEngine;\n this.createGUI();\n\n }", "public CreateAccount_GUI() {\n initComponents();\n }" ]
[ "0.75357085", "0.748855", "0.7450124", "0.7218649", "0.721136", "0.71179473", "0.70834196", "0.70763", "0.70641047", "0.70251423", "0.7007973", "0.70072794", "0.7001657", "0.7001657", "0.7001657", "0.69900143", "0.69331294", "0.6930151", "0.6911442", "0.6892338", "0.6868872", "0.68407005", "0.68407005", "0.68407005", "0.68407005", "0.68407005", "0.68407005", "0.68407005", "0.68407005", "0.68407005", "0.68407005", "0.68407005", "0.68407005", "0.68407005", "0.68407005", "0.68407005", "0.68407005", "0.68407005", "0.68407005", "0.6831848", "0.68312865", "0.68131685", "0.68131685", "0.67950946", "0.679029", "0.6777401", "0.67742765", "0.6774213", "0.6773592", "0.67631364", "0.67509115", "0.6739046", "0.6739046", "0.67281055", "0.67173785", "0.6688252", "0.6685352", "0.66802293", "0.66761464", "0.6664975", "0.6647143", "0.66383094", "0.66344786", "0.6634132", "0.6634132", "0.6617938", "0.6603617", "0.6602277", "0.6601397", "0.65898013", "0.65897506", "0.65787184", "0.6576848", "0.6561121", "0.6557355", "0.6556075", "0.65496814", "0.6539409", "0.6538879", "0.65381986", "0.65261525", "0.64963096", "0.64906", "0.64848214", "0.6483284", "0.64832085", "0.647927", "0.6478452", "0.6465924", "0.64637846", "0.64622074", "0.6458601", "0.645511", "0.64512956", "0.6433539", "0.642323", "0.6421714", "0.6419648", "0.6415363", "0.6413703", "0.64081705" ]
0.0
-1
TODO Autogenerated method stub
@Override public void actionPerformed(final ActionEvent e) { try { // JMenuItem itm = (JMenuItem)e.getSource(); } catch (Exception e2) { System.out.println("Button error"); } finally { // System.out.println(e.); System.out.println(e.getSource()); if (e.getActionCommand().compareTo("Close") == 0) { System.out.println("Close operation"); System.exit(0); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void destroy(BundleContext arg0, DependencyManager arg1) throws Exception { frame.dispose(); }
{ "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
String logPath_base = "/home/xiaohe/workspace/DATA/MeasureBaseTime/ldcc4Monpoly_buggy"; String logPath_base = "./test/pubapprove/Pub.log";
@Test public void test9MLog_Siebel_SingleRun() throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IOException, IllegalAccessException { String logPath_base = "/home/xiaohe/workspace/DATA/FakeData4TestingPerf/Pub_fake.log"; // Common.testLog_multiTimes(logPath_base, 5, true); //eager eval // Common.testLog_multiTimes(logPath_base, 1, false); //lazy eval // String logPath_base = "/home/xiaohe/workspace/DATA/ldccComplete_MonpolyStyle"; String[] args = new String[]{"./test/count/insert.sig", "./test/count/insert.fl", logPath_base}; Main.main(args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Path getLogFilePath();", "abstract protected String getLogFileName();", "private static void createLogFile() {\n try {\n String date = new Date().toString().replaceAll(\":\", \"-\");\n logFile = new FileWriter(\"bio-formats-test-\" + date + \".log\");\n TestLogger log = new TestLogger(logFile);\n LogTools.setLog(log);\n }\n catch (IOException e) { }\n }", "public void log(String logThis){\n\t\t\n\t\t DateFormat df = new SimpleDateFormat(\"MM/dd/yyyy HH:mm:ss\");\n\t Date today = Calendar.getInstance().getTime();\n\t String reportDate = df.format(today);\n\t\t\n\t\t\t{\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tFile log = new File(\"C:\\\\Users\\\\Student\\\\Downloads\\\\m1-java-capstone-vending-machine-A-Copy\\\\m1-java-capstone-vending-machine\\\\Log.txt\");\t\n\t\t\t\tBufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(log, true));\n\n\t\t bufferedWriter.write(reportDate + \"||\" + logThis);\n\t\t bufferedWriter.newLine();\n\n\t\t bufferedWriter.close();\n\t\t\t\t\n\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\t\n\t\t}\n\t\t\t\n\t}", "public String genLogFilePath() {\n\n\t\tString logFileName = generateFileName();\n\t\tString logFilePath = FileIoUtils.getLogFilePathPrefix(logFileName)\n\t\t\t\t+ \"/\" + logFileName;\n\t\treturn logFilePath;\n\n\t}", "public void saveToLog(String log){\n \n File logfile = new File(System.getProperty(\"user.home\"), \"db_logfile\" + DwenguinoBlocklyArduinoPlugin.startTimestamp + \".txt\");\n try {\n BufferedWriter bWriter = new BufferedWriter(new PrintWriter(logfile));\n bWriter.write(log);\n bWriter.flush();\n bWriter.close();\n \n } catch (IOException ex) {\n Logger.getLogger(DwenguinoBlocklyServer.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void setTimeStampedLogPath(String logPath) {\n\t\tm_timeStampedLogPath = logPath;\n\t}", "public void recordLog(){\r\n\t\tthis.finishLog(resourceFiles.getString(\"PathHepparIITestDirectory\") + \"/\" + TEST_FILE_NAME); \r\n\t}", "public static String getLogFilesPath() {\r\n return new File(TRACELOG).getAbsolutePath();\r\n }", "private void writeLog(){\n\t\tStringBuilder str = new StringBuilder();\r\n\t\tstr.append(System.currentTimeMillis() + \", \");\r\n\t\tstr.append(fileInfo.getCreator() + \", \");\r\n\t\tstr.append(fileInfo.getFileName() + \", \");\r\n\t\tstr.append(fileInfo.getFileLength() + \", \");\r\n\t\tstr.append(networkSize + \", \");\r\n\t\tstr.append(fileInfo.getN1() + \", \");\r\n\t\tstr.append(fileInfo.getK1() + \", \");\r\n\t\tstr.append(fileInfo.getN2() + \", \");\r\n\t\tstr.append(fileInfo.getK2() + \", \");\r\n\t\tstr.append(logger.getDiff(logger.topStart, logger.topEnd-Constants.TOPOLOGY_DISCOVERY_TIMEOUT)+ \", \");\r\n\t\tstr.append(logger.getDiff(logger.optStart, logger.optStop) + \", \");\r\n\t\tstr.append(logger.getDiff(logger.encryStart, logger.encryStop) + \", \");\r\n\t\tstr.append(logger.getDiff(logger.distStart, logger.distStop) + \"\\n\");\r\n\t\t\r\n\t\tString tmp=\"\t\";\r\n\t\tfor(Integer i : fileInfo.getKeyStorage())\r\n\t\t\ttmp += i + \",\";\r\n\t\ttmp += \"\\n\";\r\n\t\tstr.append(tmp);\r\n\t\t\r\n\t\ttmp=\"\t\";\r\n\t\tfor(Integer i : fileInfo.getFileStorage())\r\n\t\t\ttmp += i + \",\";\r\n\t\ttmp += \"\\n\";\r\n\t\tstr.append(tmp);\t\t\r\n\t\t//dataLogger.appendSensorData(LogFileName.FILE_CREATION, str.toString());\t\t\r\n\t\t\r\n\t\t// Topology Discovery\r\n\t\tstr.delete(0, str.length()-1);\r\n\t\tstr.append(Node.getInstance().getNodeId() + \", \");\t\t\t\r\n\t\tstr.append(\"TopologyDisc, \");\r\n\t\tstr.append(networkSize + \", \" + n1 + \", \" + k1 + \", \" + n2 + \", \" + k2 + \", \");\r\n\t\tstr.append(logger.topStart + \", \");\r\n\t\tstr.append(logger.getDiff(logger.topStart, logger.topEnd-Constants.TOPOLOGY_DISCOVERY_TIMEOUT ) + \", \");\r\n\t\tstr.append(\"\\n\");\t\t\t\t\r\n\t\t//dataLogger.appendSensorData(LogFileName.TIMES, str.toString());\r\n\t\t\r\n\t\t// Optimization\r\n\t\tstr.delete(0, str.length()-1);\r\n\t\tstr.append(Node.getInstance().getNodeId() + \", \");\t\t\t\r\n\t\tstr.append(\"Optimization, \");\r\n\t\tstr.append(networkSize + \", \" + n1 + \", \" + k1 + \", \" + n2 + \", \" + k2 + \", \");\r\n\t\tstr.append(logger.optStart + \", \");\r\n\t\tstr.append(logger.getDiff(logger.optStart, logger.optStop) + \", \");\r\n\t\tstr.append(\"\\n\");\r\n\t\t//dataLogger.appendSensorData(LogFileName.TIMES, str.toString());\t\t\r\n\t\t\r\n\t\t\r\n\t\t// File Distribution\r\n\t\tstr.delete(0, str.length()-1);\r\n\t\tstr.append(Node.getInstance().getNodeId() + \", \");\t\t\t\r\n\t\tstr.append(\"FileDistribution, \");\r\n\t\tstr.append(networkSize + \", \" + n1 + \", \" + k1 + \", \" + n2 + \", \" + k2 + \", \");\r\n\t\tstr.append(fileInfo.getFileLength() + \", \");\r\n\t\tstr.append(logger.distStart + \", \");\r\n\t\tstr.append(logger.getDiff(logger.distStart, logger.distStop) + \", \");\r\n\t\tstr.append(\"\\n\\n\");\r\n\t\t//dataLogger.appendSensorData(LogFileName.TIMES, str.toString());\t\t\r\n\t}", "void setLogFile(File log);", "public void detailTestPath() {\n // Get test run file\n File report_path = new File(System.getProperty(PATH) + TESTNG);\n // Check if the path exists\n if (!report_path.exists()) {\n System.out.println(SEE_THE_DETAIL_TEST__REPORT_ + System.getProperty(PATH) + LOGXML);\n // Get error log file\n File path = new File(System.getProperty(PATH) + ERROR_LOGLOGTXT);\n // If file exists then display error log file path\n if (path.exists()) {\n System.out.println(SEE_THE_DETAIL_ERROR__REPORT_ + System.getProperty(PATH) + ERROR_LOGLOGTXT);\n }\n }\n }", "public void writeLog(String log){\n //Create, if no files.\n if(!this.loggingFile.exists()){\n try {\n this.loggingFile.createNewFile();\n FileWriter fileWriter = new FileWriter(this.loggingFile, true);\n BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);\n bufferedWriter.write(log);\n bufferedWriter.newLine();\n bufferedWriter.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n //Open the file.\n else{\n try {\n synchronized (this.loggingFile) {\n FileWriter fileWriter = new FileWriter(this.loggingFile, true);\n BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);\n bufferedWriter.write(log);\n bufferedWriter.newLine();\n bufferedWriter.close();\n }\n }catch (IOException e){\n e.printStackTrace();\n }\n }\n\n }", "@DISPID(19)\r\n\t// = 0x13. The runtime will prefer the VTID if present\r\n\t@VTID(21)\r\n\tjava.lang.String logFilename();", "private void openLogFile()\r\n {\n try\r\n {\r\n GregorianCalendar gc = new GregorianCalendar();\r\n runTS = su.reformatDate(\"now\", null, DTFMT);\r\n logFile = new File(logDir + File.separator + runTS + \"_identifyFTPRequests_log.txt\");\r\n logWriter = new BufferedWriter(new FileWriter(logFile));\r\n String now = su.DateToString(gc.getTime(), DTFMT);\r\n writeToLogFile(\"identifyFTPRequests processing started at \" +\r\n now.substring(8, 10) + \":\" + now.substring(10, 12) + \".\" +\r\n now.substring(12, 14) + \" on \" + now.substring(6, 8) + \"/\" +\r\n now.substring(4, 6) + \"/\" + now.substring(0, 4));\r\n }\r\n catch (Exception ex)\r\n {\r\n System.out.println(\"Error opening log file: \" + ex.getMessage());\r\n System.exit(1);\r\n }\r\n }", "public File newLogFile() {\n File flog = null;\n try {\n this.logFileName = getTimestamp() + \".xml\";\n this.pathToLogFile = logFileFolder + logFileName;\n URL logURL = new URL(this.pathToLogFile);\n flog = new File(logURL.toURI());\n if (!flog.exists()) {\n flog.createNewFile();\n }\n } catch (Exception ex) {\n log.error(\"newLogFile :\"+ ex.getMessage());\n } finally{\n this.fLogFile = flog;\n return flog;\n }\n }", "private void logToFile() {\n }", "public void setCallLogsDatabaseFile(String path);", "public String getLog4jFilePath(){\r\n\t\t return rb.getProperty(\"log4jFilepath\");\r\n\t}", "private Path getDefaultLogsSessionDirectory(String sLogsDownloadPath)\n\t{\n\t\tPath sessionDirectory;\n\t\tString sCurrentIp = spotInfo.getUPMip();\t\t\n\t\ttry\n\t\t{\n\t\t\tsessionDirectory = Paths.get( sLogsDownloadPath, sCurrentIp+\"_\"+ EdtUtil.getDateTimeStamp( \"yyyy-MM-dd'T'HHmmss\" ) ); // The path is built with the download_path/target_unit_ip/timestamp/\n\t\t}\n\t\tcatch (RuntimeException e)\n\t\t{\n\t\t\tsessionDirectory = Paths.get( sLogsDownloadPath, sCurrentIp+\"_tmp\" );\n\t\t}\n\t\treturn sessionDirectory;\n\t}", "void storeLogMessage(String log)\n {\n logImage += log + \"\\n\";\n System.out.println(logImage);\n printFile(\"Log.txt\");\n }", "Object getRelativeToChangelogFile();", "private static void writeLog(String log) {\n\t\twriteLog(log, true);\n\t}", "public static void loadLogFile() throws Exception {\n ConfigManager cm = ConfigManager.getInstance();\n cm.add(\"accuracytests\" + File.separator + \"Logging.xml\");\n cm.add(\"Config.xml\");\n }", "private String generateFileName() {\n\t\t\n\t\treturn \"/tmp/logger.java_log\" + new Random().nextInt();\n\t}", "public static void writeToLog(String filename,String log)\r\n\t{\n\t\ttry \r\n\t\t{\r\n\t\t\tString str = log + \" at \" + new Date() + \"\\n\";\r\n\t\t\tFiles.write(Paths.get(\"log.log\"),str.getBytes(),StandardOpenOption.APPEND);\r\n\t\t\t/*PrintWriter out = new PrintWriter(f);\r\n\t\t\tout.append(log + \" at \" + new Date());\r\n\t\t\tout.flush();\r\n\t\t\tout.close();*/\r\n\t\t} \r\n\t\tcatch (FileNotFoundException e) \r\n\t\t{\r\n\t\t\tSystem.err.println(\"FNE: \" + e.getMessage());\r\n\t\t} \r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"IOE: \" + e.getMessage());\r\n\t\t}\r\n\t\t\r\n\t}", "public void dumpLog(String filename){\n }", "public String getSyslogPath() {\n return LoggerApplication.getInstance().getLogPath()+\"/db/\"+this.getName()+\"/\";\n }", "private void logInfo(){\n var f = new java.io.File(\".\");\n try {\n logger.info(\".=\" + f.getCanonicalPath());\n } catch (IOException e) {\n logger.error(\"Cannot get canonical path of .\");\n }\n logger.info(\"user.dir=\" + System.getProperty(\"user.dir\"));\n logger.info(\"isMacOSX = \"+ String.valueOf(isMacOSX()));\n }", "public void setCallLogsDatabasePath(String path);", "public void testLogAccuracy() {\r\n // log the message\r\n Exception cause = new Exception(\"some error\");\r\n String message = \"some message\";\r\n log.log(Level.ALL, cause, message);\r\n\r\n // check the result\r\n String result = AccuracyTestsHelper.getFileContent(FILE);\r\n assertTrue(result.indexOf(\"some message\") >= 0);\r\n assertTrue(result.indexOf(\"some error\") >= 0);\r\n }", "public Log(String fp)\n {\n this.filePath = fp;\n\n open();\n }", "public static void writeLogToFile(String log, String filePath) throws IOException {\n File file = new File(filePath);\n if (file.createNewFile() || file.exists()) {\n try (BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file)))) {\n String result = \"\";\n String line;\n while ((line = br.readLine()) != null) {\n result = String.format(\"%s%n%s\", result, line);\n }\n result = log + result;\n if (file.delete()) {\n try (FileOutputStream fos = new FileOutputStream(file)) {\n fos.write(result.getBytes());\n fos.flush();\n }\n }\n } catch (Exception e) {\n System.err.println(e.getMessage());\n }\n }\n }", "public static void appendLog(String log) {\n\t\tif (mTracker != null && mDebugLogFile) {\n\t\t\tmTracker.appendLog(log);\n\t\t}\n\t}", "public String getCallLogsDatabasePath();", "public Log()\n {\n filePath = String.format(\"log-%d.sl\", System.currentTimeMillis());\n\n open();\n }", "public void setLog(String log)\r\n\t{\r\n\t\tcombatLog = log;\r\n\t}", "protected String logFile(AggregatedJob job) {\n StringBuffer sb = new StringBuffer(32);\n if (mGlobalLog) {\n // the basename of the log file is derived from the dag name\n sb.append(this.mClusteredADag.getLabel());\n } else {\n // per seqexec job name\n sb.append(job.getName());\n }\n sb.append(this.SEQEXEC_PROGRESS_REPORT_SUFFIX);\n return sb.toString();\n }", "public void setLogFile(String logFile)\r\n\t{\r\n\t\tm_logFile = logFile;\r\n\t}", "public void setLogFile(String logFile) {\n this.logFile = logFile;\n }", "public void configLog()\n\t{\n\t\tlogConfigurator.setFileName(Environment.getExternalStorageDirectory() + File.separator + dataFileName);\n\t\t// Set the root log level\n\t\t//writerConfigurator.setRootLevel(Level.DEBUG);\n\t\tlogConfigurator.setRootLevel(Level.DEBUG);\n\t\t///writerConfigurator.setMaxFileSize(1024 * 1024 * 500);\n\t\tlogConfigurator.setMaxFileSize(1024 * 1024 * 1024);\n\t\t// Set log level of a specific logger\n\t\t//writerConfigurator.setLevel(\"org.apache\", Level.ERROR);\n\t\tlogConfigurator.setLevel(\"org.apache\", Level.ERROR);\n\t\tlogConfigurator.setImmediateFlush(true);\n\t\t//writerConfigurator.configure();\n\t\tlogConfigurator.configure();\n\n\t\t//gLogger = Logger.getLogger(this.getClass());\n\t\t//gWriter = \n\t\tgLogger = Logger.getLogger(\"vdian\");\n\t}", "@Override\r\n\tpublic void init(ServletConfig config) throws ServletException {\n\t\tsuper.init(config);\r\n\t\tString realPath = config.getServletContext().getRealPath(\"/\");\r\n\t\tString path = realPath + \"WEB-INF\"+ System.getProperty(\"file.separator\") +\"logs\"+ System.getProperty(\"file.separator\")+\"payments\"+ System.getProperty(\"file.separator\");\r\n\r\n\t\tthis.filePath = path;// this.getInitParameter(\"TMP_PATH\");\r\n\t\tlog.debug(\"Initializing payment log file at loc: \"+ this.filePath);\r\n\t}", "private Log() {\r\n readFile(\"Save.bin\",allLogs);\r\n readFile(\"Tag.bin\", allTags);\r\n readFile(\"Password.bin\", userInfo);\r\n }", "public void testParseLoggingWithApplicationTime() {\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset3.txt\");\n GcManager gcManager = new GcManager();\n gcManager.store(testFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"Max young space not calculated correctly.\", 1100288, jvmRun.getMaxYoungSpace());\n Assert.assertEquals(\"Max old space not calculated correctly.\", 1100288, jvmRun.getMaxOldSpace());\n Assert.assertEquals(\"NewRatio not calculated correctly.\", 1, jvmRun.getNewRatio());\n Assert.assertEquals(\"Event count not correct.\", 3, jvmRun.getEventTypes().size());\n Assert.assertFalse(JdkUtil.LogEventType.UNKNOWN.toString() + \" collector identified.\",\n jvmRun.getEventTypes().contains(LogEventType.UNKNOWN));\n Assert.assertEquals(\"Should not be any unidentified log lines.\", 0, jvmRun.getUnidentifiedLogLines().size());\n Assert.assertTrue(\"Log line not recognized as \" + JdkUtil.LogEventType.PAR_NEW.toString() + \".\",\n jvmRun.getEventTypes().contains(JdkUtil.LogEventType.PAR_NEW));\n Assert.assertTrue(\n \"Log line not recognized as \" + JdkUtil.LogEventType.APPLICATION_STOPPED_TIME.toString() + \".\",\n jvmRun.getEventTypes().contains(JdkUtil.LogEventType.APPLICATION_STOPPED_TIME));\n Assert.assertTrue(Analysis.INFO_NEW_RATIO_INVERTED + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.INFO_NEW_RATIO_INVERTED));\n }", "private void launchProcWithLogFile( String cmdLine, String task, String voicedir ) {\n \n Process proc = null;\n BufferedReader procStdout = null;\n String line = null;\n \n Date today;\n String output;\n SimpleDateFormat formatter;\n formatter = new SimpleDateFormat(\"yyyy.MM.dd-H:mm:ss\", new Locale(\"en\",\"US\"));\n today = new Date();\n output = formatter.format(today); \n String logFile = voicedir+\"hts/log-\"+output;\n \n System.out.println(\"\\nRunning: \"+ cmdLine);\n System.out.println(\"\\nThe training procedure can take several hours...\");\n System.out.println(\"Detailed information about the training status can be found in the logfile:\\n \" + logFile);\n System.out.println(\"\\nTraining voice: \" + db.getProp(db.VOICENAME));\n System.out.println(\"The following is general information about execution of training steps:\");\n // String[] cmd = null; // Java 5.0 compliant code\n \n try {\n FileWriter log = new FileWriter(logFile);\n //int numSteps = 1;\n /* Java 5.0 compliant code below. */\n /* Hook the command line to the process builder: */\n ProcessBuilder pb = new ProcessBuilder(cmdLine.split(\" \"));\n pb.directory(new File( db.getProp(db.ROOTDIR) ));\n pb.redirectErrorStream(true);\n /* Launch the process: */\n proc = pb.start();\n \n /* Collect process's combined stdout & stderr send it to System.out: */\n procStdout = new BufferedReader(\n new InputStreamReader(proc.getInputStream()));\n while ((line = procStdout.readLine()) != null) {\n \tif(line.contains(\"Start \"))\n System.out.println( \"\\nStep: \" + line );\n log.write(line+\"\\n\");\n }\n \n /* Wait and check the exit value */\n proc.waitFor();\n if ( proc.exitValue() != 0 ) {\n BufferedReader errReader = new BufferedReader(new InputStreamReader(proc.getErrorStream()));\n while ((line = errReader.readLine()) != null) {\n System.err.println(\"ERR> \"+line);\n }\n errReader.close();\n throw new RuntimeException( task + \" computation failed on file [\" + voicedir + \"]!\\n\"\n + \"Command line was: [\" + cmdLine + \"].\" );\n }\n log.close();\n }\n catch ( IOException e ) {\n throw new RuntimeException( task + \" computation provoked an IOException on file [\" + voicedir + \"].\", e );\n }\n catch ( InterruptedException e ) {\n throw new RuntimeException( task + \" computation interrupted on file [\" + voicedir + \"].\", e );\n }\n \n }", "public void createLogFile() {\n\t\tBufferedWriter out = null;\n\t\ttry {\n\t\t\tFile root = Environment.getExternalStorageDirectory();\n\t\t\tLog.e(\"SD CARD WRITE ERROR : \", \"SD CARD mounted and writable? \"\n\t\t\t\t\t+ root.canWrite());\n\t\t\tif (root.canWrite()) {\n\t\t\t\tFile gpxfile = new File(root, \"ReadConfigLog.txt\");\n\t\t\t\tFileWriter gpxwriter = new FileWriter(gpxfile);\n\t\t\t\tout = new BufferedWriter(gpxwriter);\n\t\t\t\tout.write(\"Hello world\");\n\t\t\t\t// out.close();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tLog.e(\"SD CARD READ ERROR : \", \"Problem reading SD CARD\");\n\t\t\tLog.e(\"SD CARD LOG ERROR : \", \"Please take logs using Logcat\");\n\t\t\tLog.e(\"<<<<<<<<<<WifiPreference>>>>>>>>>>>>\",\n\t\t\t\t\t\"Could not write file \" + e.getMessage());\n\t\t}\n\t}", "private String setFileName() {\n Calendar c = Calendar.getInstance();\n\n String LOG = \"\";\n\n LOG += c.get(Calendar.YEAR);\n\n if (c.get(Calendar.MONTH) < 10)\n LOG += \"0\";\n LOG += c.get(Calendar.MONTH) + 1;\n\n if (c.get(Calendar.DATE) < 10)\n LOG += \"0\";\n LOG += c.get(Calendar.DATE);\n\n if (c.get(Calendar.HOUR_OF_DAY) < 10)\n LOG += \"0\";\n LOG += c.get(Calendar.HOUR_OF_DAY);\n\n if (c.get(Calendar.MINUTE) < 10)\n LOG += \"0\";\n LOG += c.get(Calendar.MINUTE);\n\n LOG += \".csv\";\n\n return LOG;\n }", "public String getLogCollectionPath();", "public static void log(String message) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\n Timestamp timestamp = new Timestamp(System.currentTimeMillis());\n String log = sdf.format(timestamp) + \" - \" + message;\n System.out.println(log);\n try {\n writeLogToFile(log, LOG_FILE_PATH);\n } catch (IOException e) {\n System.err.println(e.getMessage());\n }\n }", "protected static String getFilename(String base) {\n //return Integer.toHexString(base.hashCode()) + \".map\";\n return base + \".map\";\n }", "@Override\n\tpublic String getLogFileName() {\n\t\treturn model.getLogFileName();\n\t}", "public void log(String txt);", "public void generateLogFile() {\n\t\tFileOperations operator = new FileOperations(path);\n\t\toperator.writeFile(buildLogContent());\n\t}", "@Test\n public void testLogDirWithDriveLetter() throws Exception {\n LocalDirsHandlerService localDirs = Mockito.mock(LocalDirsHandlerService.class);\n List<String> logDirs = new ArrayList<String>();\n logDirs.add(\"F:/nmlogs\");\n Mockito.when(localDirs.getLogDirsForRead()).thenReturn(logDirs);\n ApplicationIdPBImpl appId = Mockito.mock(ApplicationIdPBImpl.class);\n Mockito.when(appId.toString()).thenReturn(\"app_id_1\");\n ApplicationAttemptIdPBImpl appAttemptId = Mockito.mock(ApplicationAttemptIdPBImpl.class);\n Mockito.when(appAttemptId.getApplicationId()).thenReturn(appId);\n ContainerId containerId = Mockito.mock(ContainerIdPBImpl.class);\n Mockito.when(containerId.getApplicationAttemptId()).thenReturn(appAttemptId);\n List<File> logDirFiles = ContainerLogsUtils.getContainerLogDirs(containerId, localDirs);\n Assert.assertTrue((\"logDir lost drive letter \" + (logDirFiles.get(0))), ((logDirFiles.get(0).toString().indexOf(((\"F:\" + (File.separator)) + \"nmlogs\"))) > (-1)));\n }", "public void imprimir(String log){\n System.out.println(log);\n\n }", "private static void addToLog(String message) {\n\t\ttry {\n\t\t\tDateFormat df = new SimpleDateFormat(\"dd/MM/yy HH:mm:ss:SS\");\n\t\t\tDate dateobj = new Date();\n\t\t\tlog.write(df.format(dateobj) + \": \" + message + \"\\n\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Error With the Log File\");\n\t\t\tSystem.err.println(\"Exiting...\");\n\t\t\tSystem.exit(1);\n\t\t};\n\t}", "protected String getMyVarPath(String path){\n\t\treturn \"getVariableData('\"+VARNAME+\"', 'part1', '/nswomoxsd:receive/nswomoxsd:evt/\"+path+\"') \";\n\t}", "void log(String line);", "public static void main(String[] args) { \n\t\t \n\t\t String path =ResourceHelper.getResourcePath(\"src/main/resources/configfile/log4j.properties\"); \n\t\t System.out.println(path);\n\t }", "private static void findPath()\r\n {\r\n String temp_path = System.getProperty(\"user.dir\");\r\n char last = temp_path.charAt(temp_path.length() - 1);\r\n if(last == 'g')\r\n {\r\n path = \".\";\r\n }\r\n else\r\n {\r\n path = \"./bag\";\r\n }\r\n \r\n }", "void log(String source, String line);", "public void setLogStr(String logStr) {\n\t\tthis.logStr = logStr;\n\t}", "public void appendLog(String text) {\r\n\t\tFile logFile = new File(\"sdcard/\" + application.LOGFILENAME);\r\n\t\tif (!logFile.exists()) {\r\n\t\t\ttry {\r\n\t\t\t\tlogFile.createNewFile();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tBufferedWriter buf = new BufferedWriter(new FileWriter(logFile, true));\r\n\t\t\tCalendar calendar = Calendar.getInstance();\r\n\t\t\ttry {\r\n\t\t\t\tSystem.err.println(\"Logged Date-Time : \" + calendar.getTime().toLocaleString());\r\n\t\t\t} catch (Throwable e) {\r\n\t\t\t}\r\n\t\t\tbuf.append(\"Logged Date-Time : \" + calendar.getTime().toLocaleString());\r\n\t\t\tbuf.append(\"\\n\\n\");\r\n\t\t\tbuf.append(text);\r\n\t\t\tbuf.newLine();\r\n\t\t\tbuf.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public SecurityLog()\n {\n String fileName = \"Log.txt\";\n File output = new File(fileName);\n if(output.exists())\n readFile(fileName);\n }", "public static void main(String[] args) throws FileNotFoundException \r\n\t\t{\r\n\t\t\r\n\t\t\tdouble timestamp_difference ; \r\n\t\t{\r\n\t\t\ttry (BufferedReader br = new BufferedReader (new FileReader(\"C:\\\\mslog.txt\"))) \r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\" Captured Summary of the Microservices Log file located at C:\\\\mslog.txt is as below : \" );\r\n\t\t\t\t\tSystem.out.println(\" ************ Start of Log file Summary ************* \");\r\n\t\t\t\t\tSystem.out.println(\" Sr.No 1 - \" ); \r\n\t\t\t\t\t\r\n\t\t\t\t\tString sCurrentLine;\r\n\t\t\t \r\n\t\t\t String Search=\"(addClient:97900)\";\r\n\t\t\t while ((sCurrentLine = br.readLine()) != null) \r\n\t\t\t {\t \t\r\n\t\t\t \t \r\n\t\t\t \tif(sCurrentLine.contains(Search))\r\n\t\t\t {\t\t \r\n\t\t\t System.out.println(\" (addClient:97900) string found in log file where Name of service is = addClient & Request id is = 97900 \" ) ;\r\n\t\t\t }\r\n\t\t\t \t\r\n\t\t\t \t\r\n\t\t\t }\r\n\t\t\t { \r\n\t\t\t \t\tint count = 0;\r\n\t\t\t for (int i = 0; i <= 1 ; i++) {\r\n\t\t\t count++;\r\n\t\t\t \r\n\t\t\t }\r\n\t\t\t System.out.println( \" Sr.No 2 - Number of requests made to the service are = \" + count);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t\t\r\n\r\n\t\t\t }\t\r\n\t\t\t\r\n\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\t\r\n\t\t\t\tcatch (IOException e) {\r\n\t\t\t e.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\ttry (BufferedReader br1 = new BufferedReader (new FileReader(\"C:\\\\mslog.txt\"))) \r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t{\r\n\t\t\t String sCurrentLine;\r\n\t\t\t String Search1=\"2015-10-28T12:24:33,903\";\r\n\t\t\t while ((sCurrentLine = br1.readLine()) != null) \r\n\t\t\t {\r\n\t\t\t if(sCurrentLine.contains(Search1))\r\n\t\t\t {\r\n\t\t\t System.out.println(\" Sr.No 3 - Entry time stamp of Add Client Request (id-97900) found in logfile is = \" + Search1 );\r\n\t\t\t }\r\n\t\t\t \r\n\r\n\t\t\t }\r\n\t\t\t \r\n\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\t\r\n\t\t\t\tcatch (IOException e) {\r\n\t\t\t e.printStackTrace();\r\n\t\t\t }\r\n\t\t\t\t \r\n\t\t\t\r\n\t\t\ttry (BufferedReader br2 = new BufferedReader (new FileReader(\"C:\\\\mslog.txt\"))) \r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t{\r\n\t\t\t String sCurrentLine;\r\n\t\t\t String Search2=\"2015-10-28T12:24:34,002\";\r\n\t\t\t while ((sCurrentLine = br2.readLine()) != null) \r\n\t\t\t {\r\n\t\t\t if(sCurrentLine.contains(Search2))\r\n\t\t\t {\r\n\t\t\t System.out.println(\" Sr.No 4 - Exit time stamp of Add Client Request (id-97900) found in logfile is = \" + Search2 );\r\n\t\t\t }\r\n\t\t\t \r\n\r\n\t\t\t }\r\n\t\t\t \r\n\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\t\r\n\t\t\t\tcatch (IOException e) {\r\n\t\t\t e.printStackTrace();\r\n\t\t\t }\r\n\t\t\t\r\n\t\t\ttry (BufferedReader br3 = new BufferedReader (new FileReader(\"C:\\\\mslog.txt\"))) \r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t{\r\n\t\t\t String sCurrentLine;\r\n\t\t\t String Search3=\"33,903\";\t\t \r\n\t\t\t while ((sCurrentLine = br3.readLine()) != null) \r\n\t\t\t {\r\n\t\t\t if(sCurrentLine.contains(Search3))\r\n\t\t\t {\r\n\t\t\t System.out.println(\" Sr.No 5 - Entry time stamp (in seconds) of Add Client Request (id-97900) found in logfile is = \" + Search3 );\r\n\t\t\t //double secexit = Integer.parseInt(Search3);\r\n\t\t\t }\r\n\t\t\t \r\n\r\n\t\t\t }\r\n\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\t\r\n\t\t\t\tcatch (IOException e) {\r\n\t\t\t e.printStackTrace();\r\n\t\t\t }\r\n\t\t\t\r\n\t\t\t\r\n\t\t\ttry (BufferedReader br4 = new BufferedReader (new FileReader(\"C:\\\\mslog.txt\"))) \r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t{\r\n\t\t\t String sCurrentLine;\r\n\t\t\t String Search4=\"34,002\";\t\t \r\n\t\t\t while ((sCurrentLine = br4.readLine()) != null) \r\n\t\t\t {\r\n\t\t\t if(sCurrentLine.contains(Search4))\r\n\t\t\t {\r\n\t\t\t System.out.println(\" Sr.No 6 - Exit time stamp (in seconds) of Add Client Request (id-97900) found in logfile is = \" + Search4 );\r\n\t\t\t //double secentry = Integer.parseInt(Search4);\r\n\t\t\t }\r\n\t\t\t \r\n\r\n\t\t\t }\r\n\t\t\t \r\n\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\t\r\n\t\t\t\tcatch (IOException e) {\r\n\t\t\t e.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\r\n\t\t\t\r\n\t\t\ttimestamp_difference = ( 34002 - 33903 ) * 0.0001 ;\r\n\t\t\tSystem.out.println(\" Sr.No 7 - Maximum time required for Add Client request execution ( in seconds ) is = \" + timestamp_difference );\r\n\t\t\t\r\n\t\t\tSystem.out.println(\" ************ End of Log file Summary ************* \");\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public void findMatchingFiles()\n {\n\t\t\n\t\t//Get Server name from the log directory path\n\t\t\t\t\t\t\n\t\tString server = path.substring(0, path.length()-2);\n\t\tserver = server.substring(0,server.lastIndexOf(\"/\"));\n\t\tserver = server.substring(server.lastIndexOf(\"/\") + 1);\n\t\tSystem.out.println(\"Server Name is : \" + server);\n\t\t\t\t\t\t\n Map <String, String> logPatternMap = new HashMap<>(); // Map of log stash config and RegEx\n List<String> fileList = new ArrayList<>(); // List of All files in Log Dir\n List<String> logStashCommandList = new ArrayList<>(); // List of commands to be executed for log stashing files\n String placeholder = \"FILE_PATH\";\n logPatternMap = fetchPropertyFromFile();\n fileList = getAllLogFileNames();\n\n for (String file : fileList) {\n\n for (Map.Entry<String, String> entry : logPatternMap.entrySet()) {\n String fileName = entry.getKey();\n String pattern = entry.getValue();\n\n if (Pattern.matches(pattern,file))\n {\n System.out.println( \"Found a matching file : \" + pattern + \" : \" + file );\n File source = new File(\"/slog/templates/\" + fileName);\n File dest = new File(\"/slog/configs/\" + fileName);\n File logFile = new File(path + file);\n try {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n //copy files from template directory to configs directory\n\t\t\t\t\t\tFiles.copy(source.toPath(), dest.toPath()); \n System.out.println(\"Destination path is : \" + dest.getPath());\n\n //Replace contents of the config file to match log file paths\n\n BufferedReader reader = new BufferedReader(new FileReader(dest));\n String line = \"\", oldtext = \"\";\n while((line = reader.readLine()) != null)\n {\n oldtext += line + \"\\r\\n\";\n }\n reader.close();\n\n String replacedtext = oldtext.replaceAll(placeholder, logFile.getPath().toString());\n\n FileWriter writer = new FileWriter(dest);\n writer.write(replacedtext);\n writer.close();\n\n //Form LogStash command and Execute it\n\n String command = \"/slog/bin/logstash -f \" + dest.getPath() + \" < \" + path + file;\n String[] cmd = { \"/bin/sh\", \"-c\", command};\n Process process = Runtime.getRuntime().exec(cmd);\n try {\n BufferedReader out = new BufferedReader(new InputStreamReader(process.getErrorStream()));\n out.lines().forEach(System.out::println);\n process.waitFor();\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n //delete config file and log file after the work is done\n dest.delete();\n // logFile.delete();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n }\n }\n\n }", "private static void writeLog(String s) {\n if (logFile == null) createLogFile();\n LogTools.println(s);\n LogTools.flush();\n }", "public static String logaritName(double base) {\n\t\tif (base == Math.E)\n\t\t\treturn \"log\";\n\t\telse if (base == 10)\n\t\t\treturn \"log10\";\n\t\telse\n\t\t\treturn \"log\" + MathUtil.format(base);\n\t}", "private static void prepareLoggingSystemEnviroment() {\n\t\t// property configuration relies on this parameter\n\t\tSystem.setProperty(\"log.directory\", getLogFolder());\n\t\t//create the log directory if not yet existing:\n\t\t//removed code as log4j is now capable of doing that automatically\n\t}", "public void log(String str)\n\t{\n\t\tDate date = new Date();\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm\");\n\t\t\n\t\tString loggable = dateFormat.format(date) + \": \" + str;\n\t\t\n\t\t// Add it to the log\n\t\tthis.log.add(loggable);\n\t\t\n\t\t// Print it out, for now.\n\t\tSystem.out.println(loggable); \n\t}", "protected String getLogFile(final ClientInfo client) {\n final StringBuffer directory = getLogDirectory();\n final StringBuffer file = new StringBuffer();\n if (client.getParser() != null) {\n addNetworkDir(directory, file, client.getParser().getNetworkName());\n }\n file.append(sanitise(client.getNickname().toLowerCase()));\n return getPath(directory, file, client.getNickname());\n }", "public static File getLogDirectory() {\n\t\treturn LOG_DIRECTORY;\n\t}", "private Logger(String logFilePath) {\n\t\tif(TextUtils.isEmpty(logFilePath)) \n\t\t\tthrow new IllegalArgumentException(\"invalid parameter logFilePath.\");\n\t\tmLogFilePath = logFilePath;\n\t}", "private void addLog(String log) {\n LogHelper.addIdentificationLog(log);\n }", "public static void main(String[] args) throws FileNotFoundException {\n\n Logger file = new Logger(\"/home/vladimir/text.txt\");\n\n file.log(\"dikie sobaki\");\n file.end();\n\n\n }", "String getFilepath();", "private StringBuffer getLogDirectory() {\n final StringBuffer directory = new StringBuffer();\n directory.append(directoryProvider.get());\n if (directory.charAt(directory.length() - 1) != File.separatorChar) {\n directory.append(File.separatorChar);\n }\n return directory;\n }", "public String readWholeLog(String dateOfLog){\n String logLines=\"\";\n\n if(dateOfLog.equals(todaysDate)||dateOfLog.equals(\"\")) {\n if(logWriter==null){\n logLines+=readFile(dateOfLog,0);\n }else{\n closeLog();\n logLines+=readFile(dateOfLog,0);\n }\n }else{\n logLines+=readFile(dateOfLog,0);\n }\n return logLines;\n }", "private String getAbsoluteFilesPath() {\n\n //sdcard/Android/data/cucumber.cukeulator\n //File directory = getTargetContext().getExternalFilesDir(null);\n //return new File(directory,\"reports\").getAbsolutePath();\n return null;\n }", "public static String readLog() throws Exception {\n List<String> logsList = Files.readAllLines(new File(\"PhotoRenaming.log\").toPath());\n return String.join(\"\\n\", logsList);\n }", "private String readFromFileLogin() {\n String login=\"\";\n try (BufferedReader bufferedReader = new BufferedReader(new FileReader\n ((\".\\\\src\\\\pl\\\\camp\\\\it\\\\login\\\\log.txt\")))) {\n\n login = bufferedReader.readLine();\n\n } catch (IOException exc) {\n System.out.println(\"Błąd obsługi pliku!!! \" + exc.getMessage());\n }\n return login;\n }", "private void initLogConfig() {\n\t\t logConfigurator = new LogConfigurator();\n\t\t// Setting append log coudn't cover by a new log.\n\t\tlogConfigurator.setUseFileAppender(true);\n\t\t// Define a file path for output log.\n\t\tString filename = StorageUtils.getLogFile();\n\t\tLog.i(\"info\", filename);\n\t\t// Setting log output\n\t\tlogConfigurator.setFileName(filename);\n\t\t// Setting log's level\n\t\tlogConfigurator.setRootLevel(Level.DEBUG);\n\t\tlogConfigurator.setLevel(\"org.apache\", Level.ERROR);\n\t\tlogConfigurator.setFilePattern(\"%d %-5p [%c{2}]-[%L] %m%n\");\n\t\tlogConfigurator.setMaxFileSize(1024 * 1024 * 5);\n\t\t// Set up to use the cache first and then output to a file for a period\n\t\t// of time\n\t\tlogConfigurator.setImmediateFlush(false);\n\t\tlogConfigurator.setUseLogCatAppender(true);\n\t\t// logConfigurator.setResetConfiguration(true);\n\t\tlogConfigurator.configure();\n\t}", "protected void writeLog(String text){\n File logFile = new File(logFilePath);\n try {\n FileWriter fr = new FileWriter(logFile, true);\n fr.write(String.format(\"%s:\\t%s\\n\", getCurrentDate(), text));\n fr.close();\n } catch (IOException e){\n e.printStackTrace();\n }\n }", "public String getLog();", "private void printLog(String str)\n { printLog(str,Log.LEVEL_HIGH);\n }", "public void writeLog(){\n\t\ttry\n\t\t{\n\t\t\tFileWriter writer = new FileWriter(\"toptrumps.log\");\n\t\t\twriter.write(log);\n\t\t\twriter.close();\n\t\t\tSystem.out.println(\"log saved to toptrumps.log\");\n\t\t\t\n\t\t\tDataBaseCon.gameInfo(winName, countRounds, roundWins);\n\t\t\tDataBaseCon.numGames();\n\t\t\tDataBaseCon.humanWins();\n\t\t\tDataBaseCon.aIWins();\n\t\t\tDataBaseCon.avgDraws();\n\t\t\tDataBaseCon.maxDraws();\n\t\t\t\n\t\t} catch (IOException e)\n\t\t{\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public String getRunLog();", "private String toCompletePath(String fullRequest) {\n \n///Parse request for file path\nString requestLine[] = new String[] {\" \", \" \", \" \"};\n requestLine = fullRequest.split(\" \");\nString partialPath = requestLine[1];\n \n//If requested path is just \"/\" or \"\", don't return any path\n if(partialPath.length() <= 1) {\n noFileRequested = true;\n return null;\n }\n \nString completePath;\n//If using my Windows machine, the path is different than the school Linux machines\nif (Windows)\n completePath = \"C:/Users/Michelle/eclipse-workspace/P1\" + partialPath;\nelse\n completePath = \".\" + partialPath;\n \n return completePath;\n}", "protected String getFileNamePath()\n {\n String sep = System.getProperty(\"file.separator\", \"/\");\n// String path = System.getProperty(\"user.dir\", \".\");\n\n String filename = getPath() + sep + \"sec.dat\";\n\n return filename;\n }", "protected String getLogFile(final ChannelInfo channel) {\n final StringBuffer directory = getLogDirectory();\n final StringBuffer file = new StringBuffer();\n if (channel.getParser() != null) {\n addNetworkDir(directory, file, channel.getParser().getNetworkName());\n }\n file.append(sanitise(channel.getName().toLowerCase()));\n return getPath(directory, file, channel.getName());\n }", "private String baseLog(String ip, UserAgent userAgent, String url) {\n\n StringBuilder sb = new StringBuilder();\n sb.append(ip);\n sb.append(\" - - \");\n sb.append(df.format(new Date()));\n sb.append(url);\n sb.append(\"\\\"-\\\" \");\n sb.append(\"\\\"\");\n sb.append(userAgent.userAgent);\n sb.append(\"\\\"\");\n return sb.toString();\n }", "public String getTimeVariable(){ return common.timeDatapath; }", "public String get_log(){\n }", "private static String m14291b(File file, String str) {\n if (file == null || TextUtils.isEmpty(str)) {\n return null;\n }\n StringBuilder sb = new StringBuilder();\n sb.append(file.getAbsolutePath());\n sb.append(File.separator);\n sb.append(str);\n return sb.toString();\n }", "void setupFileLogging();", "LogFile(File file)\n {\n this.file = file;\n }", "@Test\n public void testCreateFilePath() {\n System.out.println(\"createFilePath with realistic path\");\n String path = System.getProperty(\"user.dir\")+fSeparator+\"MyDiaryBook\"\n +fSeparator+\"Users\"+fSeparator+\"Panagiwtis Georgiadis\"+fSeparator+\"Entries\"\n +fSeparator+\"Test1\";\n FilesDao instance = new FilesDao();\n boolean expResult = true;\n boolean result = instance.createFilePath(path);\n assertEquals(\"Some message\",expResult, result);\n }", "private static String getSSLConfigFileName(String base) {\n String testUniqueForkId = System.getProperty(\"test.unique.fork.id\");\n String fileSuffix = testUniqueForkId != null ? \"-\" + testUniqueForkId : \"\";\n return base + fileSuffix + \".xml\";\n }", "public abstract void logd(String str);", "public interface IPathConstant {\n\tString PROPERTY_FILEPATH=\"./src/main/resources/CommonData.properties\";\n\tString EXCELPATH=\"./src/test/resources/testdata.xlsx\";\n\tString JSONFILEPATH=\"\";\n\tString htmlPath=\"./extentReport\"+JavaUtility.getCurrentSystemDate()+\".html\";\n}" ]
[ "0.6806478", "0.63298875", "0.62279034", "0.6220929", "0.6076598", "0.60645914", "0.58959705", "0.5880994", "0.5834804", "0.57294005", "0.57278115", "0.57104635", "0.57080555", "0.5690685", "0.5642047", "0.5637518", "0.5597516", "0.55284584", "0.55094945", "0.55089694", "0.5469656", "0.54554933", "0.545476", "0.54454", "0.54375213", "0.54312325", "0.5422652", "0.54202306", "0.53842574", "0.53781515", "0.53509897", "0.53508866", "0.53140765", "0.5301378", "0.5291654", "0.5288085", "0.5284121", "0.5272892", "0.5272544", "0.5270062", "0.52596533", "0.5259346", "0.5253301", "0.5253129", "0.5249548", "0.5247127", "0.52393025", "0.5216292", "0.5215056", "0.52134776", "0.5205168", "0.5194319", "0.51920104", "0.51919526", "0.5191836", "0.5190423", "0.5189818", "0.5175314", "0.5153518", "0.51494735", "0.5136813", "0.51355803", "0.51177144", "0.5117491", "0.5111977", "0.5097767", "0.50832206", "0.5080082", "0.5068147", "0.50673217", "0.50578004", "0.5055969", "0.50509715", "0.50467837", "0.5046557", "0.5043814", "0.5042528", "0.50423616", "0.5042093", "0.5039746", "0.50320774", "0.5022706", "0.502228", "0.5018671", "0.5013922", "0.5008374", "0.50058806", "0.499695", "0.49955037", "0.49954554", "0.4995009", "0.4992082", "0.4990787", "0.49882728", "0.498678", "0.4984757", "0.4980137", "0.49771667", "0.4972088", "0.49672973" ]
0.5176242
57
No args constructor for use in serialization
public Employee() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "MyEncodeableWithoutPublicNoArgConstructor() {}", "public ObjectSerializationEncoder() {\n // Do nothing\n }", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "defaultConstructor(){}", "public Data() {}", "private SerializerFactory() {\n // do nothing\n }", "public JsonFactory() { this(null); }", "private SingleObject(){}", "public CompactSerializable() {\n }", "public Data() {\n \n }", "public Payload() {}", "void DefaultConstructor(){}", "public Data() {\n }", "public Data() {\n }", "private SingleObject()\r\n {\r\n }", "public CustomDateSerializer() {\n this(null);\n }", "public ClassOne(){\n\t\tthis.age = 55;\t\t// this value won't come while de-serialization.\n\t\tSystem.out.println (\"Default Constructor Running\");\n\t}", "private Instantiation(){}", "public Payload() {\n\t}", "O() { super(null); }", "protected abstract T _createEmpty(DeserializationContext ctxt);", "private SerializationUtils() {\n\n }", "Reproducible newInstance();", "private JsonUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "public MinecraftJson() {\n }", "public Constructor(){\n\t\t\n\t}", "public \n PipedObjectReader() \n {}", "private JsonUtils() {\n\t\tsuper();\n\t}", "private void __sep__Constructors__() {}", "public Pleasure() {\r\n\t\t}", "public AvroPerson() {}", "private SingleObject(){\n }", "public Pojo1110110(){\r\n\t}", "public NetworkData() {\n }", "public JSONBuilder() {\n\t\tthis(null, null);\n\t}", "public Member() {}", "@SuppressWarnings(\"unchecked\")\n\tpublic UserSerializer() {\n\t\tsuper();\n\t\tmapSerializer.putAll(BeanRetriever.getBean(\"mapSerializerStrategy\", Map.class));\n\t}", "public JSONLoader() {}", "private SerializationUtils() {\n\t\tthrow new AssertionError();\n\t}", "public WCSResponseSerializer()\r\n {\r\n }", "public Clade() {}", "public ClaseJson() {\n }", "private Sequence() {\n this(\"<Sequence>\", null, null);\n }", "public Item() {}", "protected AbstractReadablePacket() {\n this.constructor = createConstructor();\n }", "public Generic(){\n\t\tthis(null);\n\t}", "public MetaDataContract()\n {\n }", "public JobPayload()\n {\n \n }", "public SpeakerSerivceImpl() {\n\t\tSystem.out.println(\"No args in constructor\");\n\t}", "public Person() {}", "public Item(){}", "private Converter()\n\t{\n\t\tsuper();\n\t}", "public JSONUtils() {\n\t\tsuper();\n\t}", "public Value() {}", "private Message(){\n // default constructor\n }", "@objid (\"d5a0862c-6231-11e1-b31a-001ec947ccaf\")\n private ObjIdCollectionSerializer() {\n }", "private NaturePackage() {}", "public ParamJson() {\n\t\n\t}", "public InitialData(){}", "public PersonRecord() {}", "public LargeObjectAvro() {}", "protected abstract void construct();", "public D() {}", "@SuppressWarnings(\"unused\")\n public Item() {\n }", "private Item(){}", "private JSONHelper() {\r\n\t\tsuper();\r\n\t}", "public JAXBConverter() {\n\t}", "public Member() {\n //Empty constructor!\n }", "public AbstractBinaryInteraction() {\n\n\t}", "public FileObject() {\n\t}", "public BabbleValue() {}", "public StringData() {\n\n }", "private AggregDayLogSerializer() {\n\t throw new UnsupportedOperationException(\n\t \"This class can't be instantiated\");\n\t }", "public Mapping() { this(null); }", "public Postoj() {}", "public Node() {}", "public Node() {}", "public Node() {}", "public Node() {}", "public StudentRecord() {}", "@Override\n\tpublic Response construct() {\n\t\treturn null;\n\t}", "public Person()\n {\n //intentionally left empty\n }", "public XObject(){\r\n }", "public XObject(){\n }", "public TeeWriter() {\r\n ; // nothing to do\r\n }", "public ObjectUtils() {\n super();\n }", "public Value() {\n }", "public JsonField() {\n }", "public Identity()\n {\n super( Fields.ARGS );\n }", "MessageSerializer<T> create();", "public CSSTidier() {\n\t}", "public Value(){}", "private NewsWriter() {\n }", "public UE2_0_3Serializer(){\n\t\txstream = new XStream(/*new DomDriver()*/);\n\t}", "public SensorData() {\n\n\t}", "public Pasien() {\r\n }", "public Node() {\n\t}", "public LocalObject() {}", "@SuppressWarnings(\"unused\")\r\n\tprivate Person() {\r\n\t}", "public Book() {}", "public Item() {\n\t}" ]
[ "0.74630904", "0.7387007", "0.7210724", "0.7029566", "0.7018587", "0.6977819", "0.69339114", "0.6881743", "0.6739828", "0.6727297", "0.6717886", "0.67169136", "0.669586", "0.669586", "0.66750634", "0.66246814", "0.6604095", "0.6532946", "0.65235436", "0.6500072", "0.6466648", "0.64311725", "0.6420696", "0.63329536", "0.6331174", "0.63080406", "0.6303669", "0.6297327", "0.6289062", "0.62796336", "0.62715524", "0.6246891", "0.6236601", "0.6236527", "0.62337124", "0.621766", "0.62073123", "0.6205364", "0.62028056", "0.61931217", "0.61913615", "0.61901313", "0.6187056", "0.618604", "0.61813384", "0.61712974", "0.6168396", "0.61616594", "0.6159333", "0.61513215", "0.6150306", "0.6144834", "0.6137297", "0.61357254", "0.6134681", "0.61235094", "0.6122921", "0.61144346", "0.6113325", "0.6103046", "0.6093859", "0.6088237", "0.60865474", "0.60842085", "0.6079729", "0.6075916", "0.6066694", "0.6050046", "0.60495526", "0.60494757", "0.60476506", "0.6045192", "0.60441047", "0.6041579", "0.60395074", "0.6038388", "0.6038388", "0.6038388", "0.6038388", "0.6036713", "0.6032801", "0.6030977", "0.60247785", "0.6018193", "0.60155535", "0.60124946", "0.6011776", "0.60107607", "0.6008726", "0.60062283", "0.60036933", "0.5999471", "0.5998251", "0.5996513", "0.59922075", "0.5991442", "0.59912944", "0.5989887", "0.5989741", "0.598915", "0.59881556" ]
0.0
-1
interface defining methods for accessing content in a contentrepository. i guess this will only be used as part of the BranchAccess interface actually..
public interface CRAccess { /** * Returns the node for the given path - The path must be a simple canonical path. * (No filters, relative paths, etc.) */ Node getNode(String path); /** * Returns all nodes in the given path (e.g. /cmsblog/articles/ will return * { Node(/cmsblog), Node(/articles) } */ Node[] getNodesInPath(String path); NodeType getNodeType(String path); Node getParentNode(Node node); Node resolveNode(Node currentNodeContext, String ref); /** * Returns all direct children of the current node. */ Node[] getChildren(Node node); /* Node[] filterNode() */ /** * close the repository/transaction, if the repository is writable this will also commit the changes */ void close(); /** * @return <code>true</code> if the repository supports transactions, otherwhise return <code>false</code>. */ boolean supportsTransaction(); public <T extends CRAdapter> T getAdapter(Class<T> adapterInterface); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface ContentRepository {\n\n List<Content> findContentList(int bbsId, int pageNum, int perPage, int searchMode, String searchContent);\n\n long findContentCount(int bbsId, int searchMode, String searchContent);\n\n void saveContent(Content content);\n\n Content findContentById(int contentId);\n\n void updateContent(Content content);\n\n void deleteContent(int contentId, String userid);\n\n List<Content> getBbsNoticeThumnailList(int bbsId);\n\n}", "public abstract Object getContent();", "public interface ContentService {\n\n //前面四个方法都是后台的内容查询\n int add(Content content);\n\n PageInfo<Content> list(int categoryId, int page, int rows);\n\n int edit(Content content);\n\n int delete(String ids);\n\n //商城首页的大广告位查询\n // List<Content> selectByCategoryId(long cid);\n //缓存的写法\n String selectByCategoryId(long cid);\n\n}", "List<UserContentAccess> findContentAccess();", "public interface Content {\n}", "public interface WriteReadContentDAO\n extends ReadContentDAO {\n void putContent(EntryMetaData entry, String content);\n\n void deleteContent(EntryMetaData entry);\n\n void deleteAllContent(String workspace);\n\n void deleteAllContent(String workspace, String collection);\n\n void deleteAllRowsFromContent();\n}", "ContentLocator getContentLocator();", "public interface TResourceContentCache extends LeCrudRepository<TResourceContent, Long> {\r\n}", "public interface ContentDAOInterface<T> {\r\n // 根据站名获取广播词列表\r\n List<T> getContentList(String stationName, Object kind);\r\n\r\n // 增加广播词\r\n boolean insertContent(T content);\r\n\r\n // 修改广播词\r\n boolean modifyContent(T content);\r\n\r\n // 删除广播词\r\n boolean delContent(long id);\r\n}", "UserContentAccess findContentAccessForPath(@Param(\"path\") String path);", "public interface PhrasingContent extends ContentInterface {\r\n\r\n}", "public interface ContentRepository {\n /**\n * Stores content of a stream with the given name. Does not override the content with the same name.\n * Implementations can either rename the content and return the name; or throw an AlreadyExistentException\n *\n * @param is the content to store; the caller has to close the stream\n * @param name name to attach to the stored content on server\n * @param meta optional properties to be added next to the content\n * @return The name used to identify the stored content on server\n * @throws AlreadyExistentException if the implementation cannot support dynamic renaming of the content in case the name is already present\n * @throws java.io.IOException\n */\n String store(InputStream is, String name, Properties meta) throws AlreadyExistentException, IOException;\n}", "abstract String getContent();", "ContentFactory getContentFactory();", "@Accessor\npublic interface ContentAccessor {\n\n /**\n * the method retrieves all the parts of the page by url,\n * the returned parts are ordered by the slice number.\n * @param url the url used to search in the DB\n * @return a set holding the found record's.\n */\n @Query(\"SELECT * FROM content.pages WHERE URL = :url ORDER BY slice\")\n public Result<Slice> getAllByUrl(@Param(\"url\") String url);\n\n /**\n * the method returns the slice matching the provided parameters.\n * @param url the url used to search in the DB\n * @param slice the id of the slice we want to return\n * @return a set holding the found record\n */\n @Query(\"SELECT * FROM content.pages WHERE URL = :url And slice = :slice\")\n public Result<Slice> getPartByUrlAndPartNumber(@Param(\"url\") String url,@Param(\"slice\") int slice);\n}", "public interface ContentStoreIF {\n\n /**\n * INTERNAL: Returns true if the content store contains an entry with\n * the specified key.\n */\n boolean containsKey(int key) throws ContentStoreException;\n\n /**\n * INTERNAL: Gets the data value associated with the specified key.\n */\n ContentInputStream get(int key) throws ContentStoreException;\n \n /**\n * INTERNAL: Creates an entry for the specified data value.\n */\n int add(ContentInputStream data) throws ContentStoreException;\n \n /**\n * INTERNAL: Creates an entry for the specified data value.\n */\n int add(InputStream data, int length) throws ContentStoreException;\n\n /**\n * INTERNAL: Removes the entry associated with the key. If the key\n * is not present the call has no effect.\n *\n * @return true if the key was present; false otherwise\n */\n boolean remove(int key) throws ContentStoreException;\n\n /**\n * INTERNAL: Closes the content store. This allows all internal\n * resources to be released.\n */\n void close() throws ContentStoreException;\n \n}", "public interface ContentService {\n HmResult addContent(TbContent tbContent);\n List<TbContent> getContentListByCid(long cid);\n}", "public interface ContentService {\n /**\n * 添加内容\n * @param content\n * @return\n */\n TaotaoResult addContent(TbContent content);\n\n /**\n * 根据id查询内容\n * @param cid\n * @return\n */\n List<TbContent> getContentListByCid(long cid);\n}", "public interface ContentDAOSPI {\n\n\tpublic InputStream getInputStream(int id);\n\n\tpublic void setBytes(int i, byte[] bytes);\n\n}", "public interface VersionedContent {\n /**\n * Version of the content.\n */\n long version();\n\n /**\n * Actual content\n */\n String content();\n }", "public interface RepoDataView {\n}", "public interface TbContentService {\n public List getContentList(long id);\n}", "public interface AccessManager {\n\n /**\n * predefined action constants\n */\n public String READ_ACTION = javax.jcr.Session.ACTION_READ;\n public String REMOVE_ACTION = javax.jcr.Session.ACTION_REMOVE;\n public String ADD_NODE_ACTION = javax.jcr.Session.ACTION_ADD_NODE;\n public String SET_PROPERTY_ACTION = javax.jcr.Session.ACTION_SET_PROPERTY;\n\n public String[] READ = new String[] {READ_ACTION};\n public String[] REMOVE = new String[] {REMOVE_ACTION};\n\n /**\n * Determines whether the specified <code>permissions</code> are granted\n * on the item with the specified path.\n *\n * @param parentState The node state of the next existing ancestor.\n * @param relPath The relative path pointing to the non-existing target item.\n * @param actions An array of actions that need to be checked.\n * @return <code>true</code> if the actions are granted; otherwise <code>false</code>\n * @throws ItemNotFoundException if the target item does not exist\n * @throws RepositoryException if another error occurs\n */\n boolean isGranted(NodeState parentState, Path relPath, String[] actions) throws ItemNotFoundException, RepositoryException;\n\n /**\n * Determines whether the specified <code>permissions</code> are granted\n * on the item with the specified path.\n *\n * @param itemState\n * @param actions An array of actions that need to be checked.\n * @return <code>true</code> if the actions are granted; otherwise <code>false</code>\n * @throws ItemNotFoundException if the target item does not exist\n * @throws RepositoryException if another error occurs\n */\n boolean isGranted(ItemState itemState, String[] actions) throws ItemNotFoundException, RepositoryException;\n\n\n /**\n * Returns true if the existing item with the given <code>ItemId</code> can\n * be read.\n *\n * @param itemState\n * @return\n * @throws ItemNotFoundException\n * @throws RepositoryException\n */\n boolean canRead(ItemState itemState) throws ItemNotFoundException, RepositoryException;\n\n /**\n * Returns true if the existing item state can be removed.\n *\n * @param itemState\n * @return\n * @throws ItemNotFoundException\n * @throws RepositoryException\n */\n boolean canRemove(ItemState itemState) throws ItemNotFoundException, RepositoryException;\n\n /**\n * Determines whether the subject of the current context is granted access\n * to the given workspace.\n *\n * @param workspaceName name of workspace\n * @return <code>true</code> if the subject of the current context is\n * granted access to the given workspace; otherwise <code>false</code>.\n * @throws NoSuchWorkspaceException if a workspace with the given name does not exist.\n * @throws RepositoryException if another error occurs\n */\n boolean canAccess(String workspaceName) throws NoSuchWorkspaceException, RepositoryException;\n}", "@Mapper\npublic interface UserContentMapper {\n\t\n\t/**\n\t * Returns all content access entries.\n\t */\n\tList<UserContentAccess> findContentAccess();\n\t\n\t/**\n\t * Returns a user content access if the given content has previously been\n\t * entered to the registry.\n\t * @param path content path to get access entry for\n\t * @return content access entry or null\n\t */\n\tUserContentAccess findContentAccessForPath(@Param(\"path\") String path);\n\t\n\t/**\n\t * Find all content access entries that match the given path expression\n\t * regex.\n\t * @param pathExp regex to find content access entries\n\t * @return list of matching content access entries\n\t */\n\tList<UserContentAccess> findContentAccessByExp(@Param(\"pathExp\") String pathExp);\n\t\n\t/**\n\t * Find meta info on content entries in the DB saved by the given user in the last 24 hours.\n\t * The query does not differentiate between drafts and published content.\n\t * @param userId user id to check or null to check for anonymous saves\n\t * @return see {@link UserContentSaveAmount}\n\t */\n\tUserContentSaveAmount findSavedContentAmountForUserId(@Param(\"userId\") Integer userId);\n\t\n\t/**\n\t * Find single user content metadata by its internal id.\n\t * @param contentUid internal id\n\t * @return metadata of one content entry\n\t */\n\tUserContentMetadata findContentMetadataById(@Param(\"contentUid\") Long contentUid);\n\t\n\t/**\n\t * TODO\n\t * @param contentPath\n\t * @return\n\t */\n\tint countContentRegistryReferencesForPath(@Param(\"contentPath\") String contentPath);\n\t\n\t/**\n\t * TODO\n\t * @param accessId\n\t * @return\n\t */\n\tint countContentApprovedForAccessId(@Param(\"accessId\") long accessId);\n\t\n\t/**\n\t * TODO\n\t * @param accessId\n\t * @return\n\t */\n\tint countContentApprovableForAccessId(@Param(\"accessId\") long accessId);\n\t\n\t/**\n\t * Returns all content access entries that the given user (with their\n\t * associated roles) may approve.\n\t * @param approver approving user (usually the current user)\n\t * @return all content access entries where the given user has any approval\n\t * \t\t permission.\n\t */\n\tList<UserContentAccess> findContentAccessForApprover(@NonNull @Param(\"approver\") User approver);\n\t\n\t/**\n\t * TODO\n\t * @param accessId\n\t * @return\n\t */\n\tList<UserContentMetadata> findContentMetadataForAccessId(@Param(\"accessId\") Long accessId,\n\t\t\t\t\t\t\t\t\t\t\t \t\t \t\t @Param(\"statuses\") List<UserContentStatus> status);\n\t\n\t/**\n\t * TODO\n\t * @param accessId\n\t * @return\n\t */\n\tUserContentAccess findContentAccessById(@Param(\"accessId\") long accessId);\n\t\n\t/**\n\t * Find the current content uids for the given content path and language.\n\t * Returns the same entries as {@link #findContent(String, UserContentLanguage, boolean)},\n\t * but only returns the content UIDs.\n\t * @param contentPath content path to search for\n\t * @param contentLang content language to search for\n\t * @param userId id of current user\n\t * @param substituteUserDrafts true to substitute content for the users'\n\t * \t\t\t\t\t\t\t draft, if available;\n\t * \t\t\t\t\t\t\t false to only return approved content\n\t * @return list of matched user content UIDs\n\t */\n\tList<Long> findContentIdListForPath(@Param(\"contentPath\") String contentPath,\n\t\t\t\t\t\t\t \t \t\t@Param(\"contentLang\") UserContentLanguage contentLang,\n\t\t\t\t\t\t\t\t\t\t@Param(\"userId\") Integer userId,\n\t\t\t\t\t\t\t\t\t\t@Param(\"substituteUserDrafts\") boolean substituteUserDrafts);\n\t\n\t/**\n\t * Find all current content entries for the given content path\n\t * with given language.\n\t * @param contentPath content path to search for\n\t * @param contentLang content language to search for\n\t * @param userId user if of current user\n\t * @param substituteUserDrafts true to substitute content for the users'\n\t * \t\t\t\t\t\t\t draft, if available;\n\t * \t\t\t\t\t\t\t false to only return approved content.\n\t * \t\t\t\t\t\t\t if user is null, drafts can't be substituted\n\t * @return list of matched user contents\n\t */\n\tList<UserContent> findContent(@Param(\"contentPath\") String contentPath,\n\t\t\t\t\t\t\t\t @Param(\"contentLang\") UserContentLanguage contentLang,\n\t\t\t\t\t\t\t\t @Param(\"userId\") Integer userId,\n\t\t\t\t\t\t\t\t @Param(\"substituteUserDrafts\") boolean substituteUserDrafts);\n\t\n\t/**\n\t * Find a single user content by its ID.\n\t * @param contentUid id to find\n\t * @return user content, or null, if not found\n\t */\n\tUserContent findContentById(@Param(\"contentUid\") long contentUid);\n\t\n\t/**\n\t * Find published user content with the given history ID.\n\t * @param historyId find published content with this history id\n\t * @return user content with given history id\n\t */\n\tUserContent findContentForHistoryId(@Param(\"historyId\") long historyId);\n\t\n\t\n\t/**\n\t * Find given content by its' uid and all of its' history entries.\n\t * @param contentUid content entry id\n\t * @return list of content history starting with content entry with given id\n\t */\n\tList<UserContent> findContentHistory(\n\t\t\t@Param(\"contentUid\") long contentUid\n\t\t\t);\n\t\n\t\n\t/**\n\t * Find all past user content edits (one per content id).\n\t * @param userId user for whom to find the history for\n\t * @param contentPathExp only find content which matches the given path\n\t * \t\t\t\t\t\t expression\n\t * @param limit max amount of history entries\n\t * @return list of cms content history for given user\n\t */\n\tList<UserContentMetadata> findContentUserHistory(\n\t\t\t@Param(\"userId\") int userId,\n\t\t\t@Param(\"contentPathExp\") String contentPathExp,\n\t\t\t@Param(\"limit\") int limit\n\t\t\t);\n\t\n\t/**\n\t * Insert a new content to content_registry. If the given path is already\n\t * registered, the error is ignored.\n\t * @param contentPath content path to register\n\t * @param access list of applicable content access entries to save for the\n\t * \t\t\t\t content\n\t */\n\tvoid registerContent(@Param(\"contentPath\") String contentPath,\n\t\t\t\t\t\t @Param(\"access\") List<UserContentAccess> access);\n\t\n\t/**\n\t * TODO\n\t * @param contentPath\n\t */\n\tvoid deregisterContent(@Nullable @Param(\"contentPath\") String contentPath);\n\t\n\t/**\n\t * Insert a new content entry into the DB and update the given contents id.\n\t * @param content content to insert. id field is updated on insert.\n\t * @return number of rows inserted (always 1).\n\t */\n\tint insertContent(@Param(\"c\") UserContent content);\n\t\n\t/**\n\t * Update an existing content in the DB.\n\t * This only updates fields of {@link UserContent} that may be\n\t * changed.\n\t * @param content content to set\n\t * @return number of rows updated (<= 1).\n\t */\n\tint updateContent(@Param(\"c\") UserContent content);\n\t\n\t/**\n\t * Update the content entry with given ID to the given status.\n\t * @param contentUid content entry to update\n\t * @param approveUserId user ID of approver\n\t * @param status status to set\n\t * @return rows updated (0 or 1)\n\t */\n\tint updateContentStatus(@Param(\"contentUid\") long contentUid,\n\t\t\t\t\t\t\t@Param(\"approveUserId\") long approveUserId,\n\t\t\t\t\t\t\t@Param(\"status\") UserContentStatus status);\n\t\n\t/**\n\t * Update references of next and previous contents to the given IDs.\n\t * @param content content used to get previous and next content (to update)\n\t * @param prevNextId next ID at content.previousId is updated to this\n\t * @param nextPrevId previous ID at content.nextId is updated to this\n\t * @return no. of updated rows\n\t */\n\tint stitchContent(@Param(\"c\") UserContentMetadata content,\n\t\t\t\t\t @Param(\"prevNextId\") Long prevNextId,\n\t\t\t\t\t @Param(\"nextPrevId\") Long nextPrevId);\n\t\n\t/**\n\t * Find a previously stored draft for the given user/content/lang/order combination.\n\t * Since only one draft per content path/history id per user can be stored, only one entry is supported.\n\t * \n\t * TODO redo doc\n\t * @param contentPath content path to check for draft\n\t * @param historyId given history id from cms content (may reference approved content or draft)\n\t * @param prevId given previous id from cms content (may reference approved content or draft)\n\t * @param nextId given next id from cms content (may reference approved content or draft)\n\t * @param contentLang draft must be of this language (column content_lang)\n\t * @param userId draft must be of this user (column user_id)\n\t * @return user content metadata of the user's draft for content with given id, or null if no draft/content/user matched\n\t */\n\tUserContentMetadata findContentUserDraft(@Param(\"contentPath\") String contentPath,\n\t\t\t\t\t\t\t\t\t\t\t @Param(\"historyId\") Long historyId,\n\t\t\t\t\t\t\t\t\t\t\t @Param(\"prevId\") Long prevId,\n\t\t\t\t\t\t\t\t\t\t\t @Param(\"nextId\") Long nextId,\n\t\t\t\t\t\t\t\t\t\t\t @Param(\"contentLang\") UserContentLanguage contentLang,\n\t\t\t\t\t\t\t\t\t\t\t @Param(\"userId\") int userId);\n\t\n\t/**\n\t * Delete the content with given ID from the DB.\n\t * This actually deletes the entry.\n\t * @param id draft content UID\n\t * @return amount of deleted rows (0 or 1)\n\t */\n\tint deleteContent(@Param(\"id\") long id);\n\t\n\t/**\n\t * Delete the draft with given ID from the DB.\n\t * This actually deletes the entry.\n\t * @param id draft content UID\n\t * @return amount of deleted rows (0 or 1)\n\t */\n\tint deleteContentUserDraft(@Param(\"id\") long id);\n\t\n\t/**\n\t * Update the given content with the given content string and update save_dat.\n\t * Only drafts are affected.\n\t * @param contentUid the speicifc content to publish\n\t * @param content user content to get update values from (history id, save date, content string)\n\t * @return nr. of updated rows (0 or 1)\n\t */\n\tint updateContentDraft(@Param(\"contentUid\") long contentUid,\n\t\t\t\t\t \t @Param(\"content\") UserContent content);\n\t\n\t/**\n\t * Set the given contents' status to AWAITING_APPROVAL.\n\t * This means publishing the content without it being approved.\n\t * Important: callers must take care that the given content UID may be published by the user.\n\t * @param contentUid content entry to be updated\n\t * @return nr. of updated rows (0 or 1)\n\t */\n\tint updateContentPublish(@Param(\"contentUid\") long contentUid);\n\t\n\t/**\n\t * Set the given contents' status to DELETED and stitch together\n\t * previous and next content entries.\n\t * This means the content can in no way be viewed or edited anymore.\n\t * Important: callers must take care that the given content UID may be deleted by the user.\n\t * @param contentUid content entry to be updated\n\t * @return nr. of updated rows (0 or 1)\n\t */\n\tint updateContentDelete(@Param(\"contentUid\") long contentUid);\n\t\n\t/**\n\t * Insert a new file and return its generated id.\n\t * The inserted file is not active and may not be served.\n\t * @param contentPath content path this file belongs to\n\t * @param file user content file object used to get content type, path, user id.\n\t */\n\tvoid insertContentFile(@Param(\"contentPath\") String contentPath,\n\t\t\t\t\t\t @Param(\"file\") UserContentFile file);\n\t\n\t/**\n\t * Activate the given file id to be allowed to be served to other users than user_id.\n\t * @param id file id (previously inserted using {@link #insertContentFile(String, byte[], String, int)})\n\t * @param contentUid the content entry which contained the given file first\n\t * @param user current user (must be the same as inserting user)\n\t * @return nr. of updated rows (0 or 1)\n\t */\n\tint updateActivateContentFile(@Param(\"id\") long id,\n\t\t\t\t\t\t\t\t @Param(\"contentUid\") long contentUid,\n\t\t\t\t\t\t\t\t @Param(\"user\") UserIdentity user);\n\t\n\t/**\n\t * Deactivate the given file id when it has been removed from the given user content.\n\t * @param id file id (previously inserted using {@link #insertContentFile(String, byte[], String, int)} and activated using {@link #updateActivateContentFile(long, long, int)})\n\t * @param contentUid the content entry which removed the given file\n\t * @return nr. of updated rows (0 or 1)\n\t */\n\tint updateDeactivateContentFile(@Param(\"id\") long id,\n\t\t\t\t\t\t\t\t @Param(\"contentUid\") long contentUid);\n\t\n\n\t/**\n\t * Fully delete a content file entry from the database. Does not check for\n\t * activation state.\n\t * Note that this does not take care of the saved file on the filesystem.\n\t * @param id file id (previously inserted using {@link #insertContentFile(String, byte[], String, int)})\n\t * @return amount of deleted rows (0 or 1)\n\t */\n\tint deleteContentFile(@Param(\"id\") long id);\n\t\n\t/**\n\t * Find a single content file by its id.\n\t * @param id id of the file\n\t * @return {@link UserContentFile}\n\t */\n\tUserContentFile findContentFile(@Param(\"id\") long id);\n\t\n\t/**\n\t * Find all content files given the ids in the list.\n\t * @param ids list of file IDs (may not be empty or null)\n\t * @return list of files\n\t */\n\tList<UserContentFile> findContentFiles(@Param(\"ids\") List<Long> ids);\n\t\n\t/**\n\t * Find all files that are active in the context of the given content entry.\n\t * This also includes files that were activated in one of the contents'\n\t * changes (history).\n\t * @param contentUid contents' UID to check\n\t * @return list of all active file IDs for the given content\n\t */\n\tList<Long> findActiveContentFilesForContentUid(@Param(\"contentUid\") long contentUid);\n\n\t/**\n\t * Find all user uploaded files for the given content path that have never\n\t * been activated.\n\t * @param contentPath content path\n\t * @param user user identity (may be null for anonymous)\n\t * @return list of files uploaded but never activated\n\t */\n\tList<UserContentFile> findInactiveContentFilesForContentPathAndUser(@Param(\"contentPath\") String contentPath,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Param(\"user\") UserIdentity user);\n\t\n\t\n}", "public interface ContentService {\n\n public String getConteng(String logMsg);\n}", "public interface ContentSearchRepository extends ElasticsearchRepository<Content, Long> {\n}", "List<CMSObject> getNodeByPath(String path, ConnectionInfo connectionInfo) throws RepositoryAccessException;", "public interface UserContent {\n\n public String getURL();\n public String getID();\n\n public void setURL(String URL);\n public void setID(String ID);\n}", "public interface Repository {}", "abstract public Content createContent();", "abstract public InputStream retrieveContent( String path )\r\n throws Exception;", "public interface Repository {\n\n }", "public interface Repository {\n\n }", "public String getContent();", "public abstract List<String> getContent( );", "ExplorerContent getContentInScope( final Path path );", "public String getContent()\n/* */ {\n/* 1329 */ return this.content;\n/* */ }", "@Override\n\tpublic GetContentResponse listContents() {\n\t\tLOGGER.debug(\"LIST ALL CONTENTS\");\n\t\t\n\t\tClientConfig clientConfig = new ClientConfig();\n\t\t \n\t HttpAuthenticationFeature feature = HttpAuthenticationFeature.basic(env.getProperty(\"liferay.user.id\"), env.getProperty(\"liferay.user.key\"));\n\t clientConfig.register( feature) ;\n\t \n\t clientConfig.register(JacksonFeature.class);\n\t\t\n\t\tClient client = ClientBuilder.newClient(clientConfig);\n\t\tWebTarget webTarget = client.target(env.getProperty(\"liferay.api.rootpath\")).path(\"article-id/0/content-type/tagtest\");\n\t\t \n\t\tInvocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n\t\n\t\tResponse response = invocationBuilder.get();\n\t\t \n\t\tGetContentResponse content = response.readEntity(GetContentResponse.class);\n\t\t\n\t\t\n\t\n\t\t \n\t\tLOGGER.info(\"status::\"+response.getStatus());\n\t\t\n\t\t\n\t\t\n\t\tcontent.setStatusCode(200);\n\t\tcontent.setStatusMessage(\"Content List\");\n\t\n\t\treturn content;\n\t}", "public String getContentURL();", "public interface IRevisionRepository extends IAdaptable, IWorkbookComponent {\n\n /**\n * Gets the revision manager with corresponding resource ID. If no revision\n * manager is related to the specified resource ID, a new one will be\n * created with the specified content type.\n * \n * @param resourceId\n * the ID of the resource\n * @param contentType\n * the content type of the resource, see {@link IRevision} for\n * all available content types\n * @return the corresponding revision manager with the specified resource ID\n * @see IRevision\n * @see IRevisionManager\n */\n IRevisionManager getRevisionManager(String resourceId, String contentType);\n\n}", "protected abstract Content newContent();", "void registerContent(@Param(\"contentPath\") String contentPath,\n\t\t\t\t\t\t @Param(\"access\") List<UserContentAccess> access);", "public interface ContentsService {\n\n /**\n * Add the given data as a new media contents entry.\n *\n * @param name of the contents file to add\n * @param payload byte array to add\n */\n void addMediaContent(String name, byte[] payload);\n\n\n /**\n * Fetch the media content data for the given identifier.\n *\n * @param id predicate, used to resolve the media content to fetch\n *\n * @return the media object found, never {@code null}\n */\n Map<String, Object> getMediaContent(String id);\n}", "public abstract boolean manipulateRepositories();", "public interface ContentService extends KekeinfoEntityService<Long, Content>\n \n{\n\n\tpublic List<Content> listByType( String contentType)\n\t throws ServiceException;\n\n /**\n * Method responsible for storing content file for given Store.Files for given merchant store will be stored in\n * Infinispan.\n * \n * @param merchantStoreCode merchant store whose content images are being saved.\n * @param contentFile content image being stored\n * @throws ServiceException\n */\n void addContentFile(InputContentFile contentFile )\n throws ServiceException;\n\n \n /**\n * Method responsible for storing list of content image for given Store.Images for given merchant store will be stored in\n * Infinispan.\n * \n * @param merchantStoreCode merchant store whose content images are being saved.\n * @param contentImagesList list of content images being stored.\n * @throws ServiceException\n */\n void addContentFiles(List<InputContentFile> contentFilesList) throws ServiceException;\n \n \n /**\n * Method to remove given content image.Images are stored in underlying system based on there name.\n * Name will be used to search given image for removal\n * @param imageContentType\n * @param imageName\n * @param merchantStoreCode merchant store code\n * @throws ServiceException\n */\n public void removeFile(FileContentType fileContentType, String fileName) throws ServiceException;\n \n \n /**\n * Method to remove all images for a given merchant.It will take merchant store as an input and will\n * remove all images associated with given merchant store.\n * \n * @param merchantStoreCode\n * @throws ServiceException\n */\n public void removeFiles() throws ServiceException;\n \n /**\n * Method responsible for fetching particular content image for a given merchant store. Requested image will be\n * search in Infinispan tree cache and OutputContentImage will be sent, in case no image is found null will\n * returned.\n * \n * @param merchantStoreCode\n * @param imageName\n * @return {@link OutputContentImage}\n * @throws ServiceException\n */\n public OutputContentFile getContentFile(FileContentType fileContentType, String fileName )\n throws ServiceException;\n \n public InputStream getContentFileInputstream(FileContentType fileContentType, String fileName )\n throws ServiceException;\n \n \n /**\n * Method to get list of all images associated with a given merchant store.In case of no image method will return an empty list.\n * @param merchantStoreCode\n * @param imageContentType\n * @return list of {@link OutputContentImage}\n * @throws ServiceException\n */\n public List<OutputContentFile> getContentFiles(FileContentType fileContentType )\n throws ServiceException;\n\n\t\n List<String> getContentFilesNames(\n\t\t\tFileContentType fileContentType) throws ServiceException;\n\n /**\n * Add the store logo\n * @param merchantStoreCode\n * @param cmsContentImage\n * @throws ServiceException\n */\n\tvoid addLogo(InputContentFile cmsContentImage)\n\t\t\tthrows ServiceException;\n\n\t/**\n\t * Adds a property (option) image\n\t * @param merchantStoreId\n\t * @param cmsContentImage\n\t * @throws ServiceException\n\t */\n\tvoid addOptionImage(InputContentFile cmsContentImage)\n\t\t\tthrows ServiceException;\n\n\t\n\n}", "public interface EntityStoreManager {\n\n /**\n * Stores the given information of a website in database.\n *\n * @param data the object containing website information that has to be saved in database\n */\n void store(WebCrawlerData data);\n\n\n /**\n * Retrieves the information of given url from database.\n *\n * @param url the url of the website whose data has to be retrieved from the database\n * @return the object containing all the information related to the given url\n */\n WebCrawlerData retrieve(String url);\n\n\n /**\n * Returns the list of all websites from database along with their information.\n *\n * @return the list of all websites from database\n */\n List<WebCrawlerData> retrieveAllEntity();\n}", "@SuppressWarnings(value = \"all\")\npublic interface ContentService {\n /**\n * 参数列表:TbContent content\n * 返回值类型:TaotaoResult\n * @param content\n * @return TaotaoResult\n */\n TaotaoResult addContent(TbContent content);\n\n /**\n * 返回值类型:List<TbContent>\n * 参数列表:long categoryId\n */\n List<TbContent> getContentList(long categoryId);\n\n /**\n * 展示内容\n * @param categoryId\n * @param page\n * @param rows\n * @return EasyUIDataGridResult\n */\n EasyUIDataGridResult showContentList(long categoryId, Integer page, Integer rows);\n\n /**\n * 修改内容\n * @param content\n * @return TaotaoResult\n */\n TaotaoResult editContent(TbContent content);\n\n /**\n * 删除所选内容\n * @param ids\n */\n void deleteContentByIds(long ids);\n}", "public interface ContentItemMapper {\n int save(ContentItem contentItem);\n\n int update(ContentItem contentItem);\n\n int delete(ContentItem contentItem);\n\n List<ContentItem> findContentItems(int conId);\n}", "public abstract String getContentDescription();", "public interface IIndexerDAO {\n\t\n\t/**\n\t * Inizializzazione dell'indicizzatore.\n\t * @param dir La cartella locale contenitore dei dati persistenti.\n\t * @throws ApsSystemException In caso di errori.\n\t */\n\tpublic void init(File dir) throws ApsSystemException;\n\t\n\t/**\n\t * Aggiunge un contenuto nel db del motore di ricerca.\n * @param entity Il contenuto da aggiungere.\n\t * @throws ApsSystemException In caso di errori.\n\t */\n\tpublic void add(IApsEntity entity) throws ApsSystemException;\n\t\n\t/**\n * Cancella un documento indicizzato.\n * @param name Il nome del campo Field da utilizzare per recupero del documento.\n * @param value La chiave mediante il quale è stato indicizzato il documento.\n * @throws ApsSystemException In caso di errori.\n */\n public void delete(String name, String value) throws ApsSystemException;\n \n public void close();\n\t\n\tpublic void setLangManager(ILangManager langManager);\n \n\tpublic static final String FIELD_PREFIX = \"entity:\"; \n public static final String CONTENT_ID_FIELD_NAME = FIELD_PREFIX + \"id\";\n public static final String CONTENT_TYPE_FIELD_NAME = FIELD_PREFIX + \"type\";\n public static final String CONTENT_GROUP_FIELD_NAME = FIELD_PREFIX + \"group\";\n public static final String CONTENT_CATEGORY_FIELD_NAME = FIELD_PREFIX + \"category\";\n\tpublic static final String CONTENT_CATEGORY_SEPARATOR = \"/\";\n\tpublic static final String ATTACHMENT_FIELD_SUFFIX = \"_attachment\";\n\t\n}", "public interface CoOriginalContent \n{\n\t/**\n\t * Returns the original filename of the content.\n\t * Should return null if original input was from a stream.\n\t */\n\tpublic String getOriginalFileName();\n\t\n\t/**\n\t * Loads binary data from the InputStream until there is nothing left to\n\t * read.\n\t * Creation date: (2001-10-05 09:44:46)\n\t * @param: InputStream is The InputStream to read from. \n\t */\n\tpublic void load(InputStream is) throws IOException;\n\t\n\t/**\n\t * Reads all data from the file at location fileName.\n\t * Creation date: (2001-10-05 09:48:39)\n\t * @param: String fileName The path to the file to read from.\n\t */\t\n\tpublic void\tload(String fileName) throws IOException;\n\t\n\t/**\n\t * Stores the binary data in this CoOriginalContent on the\n\t * OutputStream.\n\t * Creation date: (2001-10-05 09:50:18)\n\t * @param: OutputStream os The stream to write to.\n\t */\n\tpublic void save(OutputStream os) throws IOException;\n\t\n\t/**\n\t * Stores the binary data in this CoOriginalContent to the\n\t * file at the location specified.\n\t * @param: String fileName The Path to the file to write to.\n\t */\n\t public void save(String fileName) throws IOException;\n}", "java.lang.String getContent();", "java.lang.String getContent();", "java.lang.String getContent();", "java.lang.String getContent();", "java.lang.String getContent();", "java.lang.String getContent();", "public String getContent() throws SearchResultException;", "List<CMSObject> getNodeById(String id, ConnectionInfo connectionInfo) throws RepositoryAccessException;", "@Repository\npublic interface TbContentDao extends BaseDao<TbContent> {\n\n}", "public interface CollabService {\n\n /**\n * Requesting a lease of for a content path.\n * \n * @param page page path where this content is located in\n * @param uid page edit session ID requesting the lease\n * @param path path of the content to be leased\n * @param userId ID of the requesting user\n * @throws UserNotFoundException if the user data has not been created on this\n * instance yet\n * @throws RejectedException if the lease cannot be granted\n */\n void lease(String page, String uid, String path, String userId) throws UserNotFoundException, RejectedException;\n\n /**\n * Return a previously granted lease.\n * \n * @param page page path where the lease applied\n * @param uid page edit session ID requesting the release\n * @throws UserNotFoundException if the user data has not been created on this\n * instance yet\n */\n void release(String page, String uid) throws UserNotFoundException;\n\n /**\n * Capturing that a page edit session of a user is terminated.\n * \n * @param page page path where the page edit session was active on\n * @param uid page edit session ID to terminate\n */\n void exit(String page, String uid);\n\n /**\n * Processes a content change on a page.\n * \n * @param page page path where the change occurred\n * @param paths content paths which got modified\n * @param refreshPaths the paths within the page content which should get\n * refreshed\n */\n void update(String page, Collection<String> paths, Collection<String> refreshPaths);\n\n /**\n * Inquiring if content is available for lease.\n * \n * @param page page containing the content\n * @param uid page edit session ID inquiring about the lease\n * @param path path of the content to be potentially leased\n * @return if the content is either available for lease, or the active lease\n * belongs to the same user\n */\n boolean mayLease(String page, String uid, String path);\n\n /**\n * Tracks a new user active on this page.\n * \n * @param page page where the user is active on\n * @param userId ID of the new user\n * @param uid new page edit session ID for this user\n */\n void addUser(String page, String userId, String uid);\n\n /**\n * Provides the currently active users on a page.\n * \n * @param page page for which to return the users\n * @return display names of all current users on this page\n */\n Set<String> getUsers(String page);\n\n /**\n * Get all active lease on a page for other page edit session IDs.\n * \n * @param page page for which to return the leases\n * @param excludeUid page edit session ID for which not to return any lease.\n * This should be the requesting session's ID.\n * @return mapping between leased content paths and their lease owner's display\n * name\n */\n Map<String, String> getLeases(String page, String excludeUid);\n\n /**\n * Retrieve update history for a page after a given minimum time.\n * \n * @param page page for which to return the updates\n * @param minTime will only return updates newer than this timestamp\n * @return list of all newer updates on this page\n */\n List<Update> getUpdates(String page, long minTime);\n\n /**\n * Checks if the extension has collected data about a specific page.\n * \n * @param page path of the page\n * @return if any collaboration data has been collected for this page\n */\n boolean hasPage(String page);\n\n /**\n * Returns the display name for a user ID.\n * \n * @param userId ID of the user\n * @return display name of the user\n */\n String getUserName(String userId);\n\n}", "public interface ContentCache extends DataCache {\r\n String getValue(String code, Locale locale);\r\n\r\n Boolean containsLocale(Locale locale);\r\n\r\n Boolean containsCodeForLocale(String code, Locale locale);\r\n\r\n Map<String, Map<String, String>> getCachedData();\r\n}", "public T getContent();", "public void LoadContent(){\n }", "public interface Repository extends MarkerInterface {\n}", "public interface INewsContentModel extends IBaseModel {\n\n void loadData(String channelID, String channelName, String page);\n\n}", "public interface Data {\n\n String getContent();\n\n}", "public interface IDataBaseRepository {\r\n\r\n /**\r\n * Get DataBase object\r\n *\r\n * @return obj\r\n */\r\n //DataBase getDataBase();\r\n\r\n /**\r\n * Save new clothes\r\n *\r\n * @param clothes obj\r\n */\r\n void save(Clothes clothes);\r\n\r\n /**\r\n * Delete clothes\r\n *\r\n * @param clothes obj\r\n */\r\n void delete(Clothes clothes);\r\n\r\n /**\r\n * Update clothes\r\n *\r\n * @param oldClothes obj\r\n * @param newClothes ojb\r\n */\r\n void update(Clothes oldClothes, Clothes newClothes);\r\n\r\n /**\r\n * Get all clothes\r\n *\r\n * @return list\r\n */\r\n List<Clothes> getAll();\r\n\r\n /**\r\n * Get all clothes by type of the office\r\n *\r\n * @param officeType obj\r\n * @return list\r\n */\r\n List<Clothes> getByOffice(OfficeType officeType);\r\n\r\n /**\r\n * Get clothes by ID\r\n *\r\n * @param id int\r\n * @return clothes obj\r\n */\r\n Clothes getById(int id);\r\n\r\n}", "public interface Data {\n String getContent();\n}", "public interface Repository {\n\n /**\n * Creates the matrix instance.\n *\n * @param path the path to storage file.\n * @param delimiter the delimiter to parse the data from file.\n * @throws RepositoryException if error happens during execution.\n */\n void createMatrix(String path, String delimiter) throws\n RepositoryException;\n\n /**\n * Determines the business rules that applies to the matrix.\n *\n * @param specification the concrete specification that query different\n * types of actions.\n * @return the 2-d array of integers that main diagonal was filled by\n * provided values.\n * @throws RepositoryException if error happens during execution.\n */\n int[][] query(Specification specification) throws RepositoryException;\n\n /**\n * Saves the last result obtained after executing the any method\n * that fill the main diagonal.\n *\n * @param path the path to storage file.\n * @throws RepositoryException if error happens during execution.\n */\n void saveLastResult(String path) throws RepositoryException;\n}", "public IContentContext getContentContext(\n )\n {return contents.getContentContext();}", "public interface ContentCategoryService {\n HmResult addConentCategory(long parentId, String name);\n public List<EasyUITreeNode> getContentCatList(long parentId);\n}", "public interface SEOObjectDAO<T extends SEOObject> {\n public T getForPrettyURLString(AreaRlm areaRlm, Portfolio portfolio, ContentType contentType, String prettyUrlString);\n}", "public Content createContent();", "public interface BranchContract {\n interface Presenter extends BasePresenter {\n void loadBranchStoryAll(boolean isSelect,int level);\n void loadBranchStoryJoin(BranchStoryJoinEntity entity);\n void searchBranchNews(SearchListEntity name);\n }\n\n interface View extends BaseView {\n void onLoadBranchStoryAllSuccess(ArrayList<BranchStoryAllEntity> entities);\n void onLoadBranchStoryJoin();\n void getBranchNewsSuccess(ArrayList<SearchNewListEntity> searchNewLists);\n }\n}", "@Override\n public ContentHandle get(int index) {\n return storage.getArtifactByContentId(contentIds.get(index)).getContent();\n }", "List<UserContentAccess> findContentAccessByExp(@Param(\"pathExp\") String pathExp);", "abstract public boolean isVisible(CodeRepository other);", "List<WorkList<Content>> getMyContentList();", "@Repository\r\npublic interface TbContentCategoryDao extends BaseTreeDao<TbContentCategory> {\r\n\r\n}", "public interface PdfBookMasterRepository {\n String savePdfMaster(InputStream inputStream,String fileName,Map<String,String> metadata);\n byte[] readPdfMaster(String id);\n boolean deletePdfMaster(String id);\n}", "public interface AccountMovementRepository extends Closeable {\r\n\r\n\t/**\r\n\t * @return All data about account movements from repository.\r\n\t * @throws Exception If the data cannot be read (a source does not exists).\r\n\t */\r\n\tCollection<AccountMovement> readAll() throws Exception;\r\n}", "private String getPageContent(SlingHttpServletRequest request, String pagePath) {\n\n\t\tfinal int DEFAULT_PORT = 80;\n\t\tfinal String JCR_CONTENT_LOCATION = \"/_jcr_content/content.html\";\n\t\tfinal int TIMEOUT = 5000;\n\t\tfinal String HTTP_404_ERROR_RESPONSE = \"404\";\n\n\t\tResourceResolver resourceResolver = request.getResource().getResourceResolver();\n\t\tResource resource = resourceResolver.getResource(pagePath);\n\n\t\tif (resource != null) {\n\n\t\t\tString content = null;\n\n\t\t\t// Create a HttpClient object\n\t\t\t\n\t\t\tHttpClient client = new HttpClient();\n\t\t\t\n\t\t\t// Establish a connection within 5 seconds\n\t\t\tclient.getHttpConnectionManager().getParams().setConnectionTimeout(TIMEOUT);\n\n\t\t\tString url;\n\t\t\tif (request.getRemotePort() == DEFAULT_PORT) {\n\t\t\t\turl = \"http://\" + request.getServerName() + pagePath + JCR_CONTENT_LOCATION;\n\t\t\t} else {\n\t\t\t\turl = \"http://\" + request.getServerName() + \":\" + request.getServerPort() + pagePath\n\t\t\t\t + JCR_CONTENT_LOCATION;\n\t\t\t}\n\n\t\t\t// If user is working on author instance, there is gonna be a 404 code because of the credentials\n\t\t\tHttpMethod method = new GetMethod(url);\n\n\t\t\ttry {\n\t\t\t\tclient.executeMethod(method);\n\t\t\t\tif (method.getStatusCode() == HttpStatus.SC_OK\n\t\t\t\t && !StringUtils.containsIgnoreCase(method.getResponseBodyAsString(), \"http 404\")) {\n\t\t\t\t\tcontent = method.getResponseBodyAsString();\n\t\t\t\t\tcontent = content + \"<!-- Path of the content : \" + pagePath + \" -->\";\n\t\t\t\t} else {\n\t\t\t\t\tlog.info(\"Error 404 - Resource is not available\");\n\t\t\t\t\tcontent = HTTP_404_ERROR_RESPONSE;\n\t\t\t\t}\n\t\t\t} catch (HttpException e) {\n\t\t\t\tlog.error(e.getMessage(), e);\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.error(e.getMessage(), e);\n\t\t\t}\n\n\t\t\t// Clean up the connection resources\n\t\t\tmethod.releaseConnection();\n\n\t\t\t// Return the content\n\t\t\treturn content;\n\t\t} else {\n\t\t\tlog.info(\"Error 404 - Resource is not available\");\n\t\t\treturn HTTP_404_ERROR_RESPONSE;\n\t\t}\n\t}", "ISObject loadContent(ISObject sobj);", "private DataFetcherResult<NodeContent> baseNodeFetcher(DataFetchingEnvironment env) {\n\t\tContentDao contentDao = Tx.get().contentDao();\n\t\tGraphQLContext gc = env.getContext();\n\t\tHibProject project = env.getSource();\n\t\tHibNode node = project.getBaseNode();\n\t\tgc.requiresPerm(node, READ_PERM, READ_PUBLISHED_PERM);\n\t\tList<String> languageTags = getLanguageArgument(env);\n\t\tContainerType type = getNodeVersion(env);\n\n\t\tHibNodeFieldContainer container = contentDao.findVersion(node, gc, languageTags, type);\n\t\treturn NodeTypeProvider.createNodeContentWithSoftPermissions(env, gc, node, languageTags, type, container);\n\t}", "public interface MemoryRepoEngineAPI<\n TContent extends ContentAPI,\n TArea extends AreaAPI<TContent>,\n TCommit extends MemoryCommitAPI<TCommit>,\n TSearchQuery extends MemorySearchQueryAPI<TCommit>,\n TSearchResults extends MemorySearchResultsAPI<TCommit, TSearchQuery>,\n TRepo extends MemoryRepoAPI<TContent, TArea, TCommit>\n >\n extends RepoEngineAPI<\n TContent,\n TArea,\n TCommit,\n TSearchQuery,\n TSearchResults,\n TRepo\n >\n{\n /**\n * Creates a repo that is associated with this repo engine.\n *\n * @return The Repo that has been created and is now associated with this engine.\n */\n TRepo createRepo();\n\n /**\n * Creates a new commit.\n *\n * @return A new commit.\n */\n TCommit createCommit();\n\n /**\n * Creates a new content area.\n *\n * @param areaSupplier The user specified factory method for the specific type of content area to create.\n * @return A new content area.\n */\n default TArea createArea(AreaFactory<TContent, TArea> areaSupplier)\n {\n return areaSupplier.createArea();\n }\n\n /**\n * A factory method for an area to use for snapshots.\n * This is used when we are committing content and the snapshot is used for the {@link MemoryCommit#snapshot}.\n *\n * @return A new empty area for snapshots.\n */\n ByteArrayAreaAPI createSnapshotArea();\n\n /**\n * Creates a new instance of the content with the given bytes.\n *\n * @param bytes The bytes to use for the content.\n * @param contentFactory The user supplied content factory to use.\n * @return A new instance of the content for the given bytes.\n */\n TContent createContent(byte[] bytes, ContentFactory<TContent> contentFactory);\n\n /**\n * Commit the given content to the repo.\n * The commit is registered as a new commit root because it has no parents and there is no branch pointing at it.\n *\n * @param contentAreaToCommit The content area to commit to the repo.\n * @param message The commit message.\n * @param commitTags The commit tags to add to this commit. This allows an arbitrary amount of information to be associated with this commit. See {@link CommitTags} for helper methods here. Any {@link StringAreaAPI} can be used here.\n * @param repo The repo to commit the content area to.\n * @param byteArrayIndex The byte array index to use when creating snap-shots for the content.\n * @param clock The clock to use for generating the timestamp for the commit.\n * @return The commit for this content area.\n */\n TCommit commit(TArea contentAreaToCommit, String message, StringAreaAPI commitTags, TRepo repo, ByteArrayIndex byteArrayIndex, ClockAPI<? extends TimestampAPI> clock);\n\n /**\n * Commit the given content to the repo.\n * The commit is registered as a new commit root because it has no parents and there is no branch pointing at it.\n * It tracks the given commit as the parent.\n *\n * @param contentAreaToCommit The content area to commit to the repo.\n * @param message The commit message.\n * @param commitTags The commit tags to add to this commit. This allows an arbitrary amount of information to be associated with this commit. See {@link CommitTags} for helper methods here. Any {@link StringAreaAPI} can be used here.\n * @param repo The repo to commit the content area to.\n * @param byteArrayIndex The byte array index to use when creating snap-shots for the content.\n * @param clock The clock to use for generating the timestamp for the commit.\n * @param parentCommit The parent commit that we want to make this commit from.\n * @return The commit for this content area.\n */\n TCommit commit(TArea contentAreaToCommit, String message, StringAreaAPI commitTags, TRepo repo, ByteArrayIndex byteArrayIndex, ClockAPI<? extends TimestampAPI> clock, TCommit parentCommit);\n\n /**\n * Commit the given content to the repo.\n * The commit is registered as a new commit root because it has no parents and there is no branch pointing at it.\n * It tracks the given commit as the parent.\n *\n * @param contentAreaToCommit The content area to commit to the repo.\n * @param message The commit message.\n * @param commitTags The commit tags to add to this commit. This allows an arbitrary amount of information to be associated with this commit. See {@link CommitTags} for helper methods here. Any {@link StringAreaAPI} can be used here.\n * @param repo The repo to commit the content area to.\n * @param byteArrayIndex The byte array index to use when creating snap-shots for the content.\n * @param clock The clock to use for generating the timestamp for the commit.\n * @param firstParentCommit The parent commit that we want to make this commit from.\n * @param otherParentCommits The other parents to have in addition to the first parent commit.\n * @return The commit for this content area.\n */\n TCommit commit(TArea contentAreaToCommit, String message, StringAreaAPI commitTags, TRepo repo, ByteArrayIndex byteArrayIndex, ClockAPI<? extends TimestampAPI> clock, TCommit firstParentCommit, List<TCommit> otherParentCommits);\n\n /**\n * Commit the given content to the repo.\n *\n * @param contentAreaToCommit The content area to commit to the repo.\n * @param branchName The name of the branch to commit to. The branch is created if it doesn't already exist.\n * @param message The commit message.\n * @param commitTags The commit tags to add to this commit. This allows an arbitrary amount of information to be associated with this commit. See {@link CommitTags} for helper methods here. Any {@link StringAreaAPI} can be used here.\n * @param repo The repo to commit the content area to.\n * @param byteArrayIndex The byte array index to use when creating snap-shots for the content.\n * @param clock The clock to use for generating the timestamp for the commit.\n * @return The commit for this content area.\n */\n TCommit commitToBranch(TArea contentAreaToCommit, String branchName, String message, StringAreaAPI commitTags, TRepo repo, ByteArrayIndex byteArrayIndex, ClockAPI<? extends TimestampAPI> clock);\n\n /**\n * Constructs a new commit for the given content.\n * This does not put it into the repo.\n * The calling method should decide what to do with the commit. Usually putting it into the repo.\n *\n * @param contentAreaToCommit The content area to commit to the repo.\n * @param message The commit message.\n * @param commitTags The commit tags to add to this commit. This allows an arbitrary amount of information to be associated with this commit. See {@link CommitTags} for helper methods here. Any {@link StringAreaAPI} can be used here.\n * @param byteArrayIndex The byte array index to use when creating snap-shots for the content.\n * @param clock The clock to use for generating the timestamp for the commit.\n * @return The commit for this content area.\n */\n TCommit constructCommit(TArea contentAreaToCommit, String message, StringAreaAPI commitTags, ByteArrayIndex byteArrayIndex, ClockAPI<? extends TimestampAPI> clock);\n\n /**\n * Checks out the content for the given commit into the given content area.\n *\n * @param commit The commit to check out.\n * @param repo The repo to check out from.\n * @param areaToUpdate The area to update with the content for the commit.\n * @param contentFactory The content factory to use when populating the content area.\n */\n void checkoutIntoArea(TCommit commit, TRepo repo, TArea areaToUpdate, ContentFactory<TContent> contentFactory);\n\n /**\n * Checks out the content for the given commit into a new content area.\n *\n * @param commit The commit to check out.\n * @param repo The repo to check out from.\n * @param areaFactory The user specified factory method for the specific type of content area to create.\n * @param contentFactory The content factory to use when populating the content area.\n * @return A new content area with the content from the checkout.\n */\n TArea checkout(TCommit commit, TRepo repo, AreaFactory<TContent, TArea> areaFactory, ContentFactory<TContent> contentFactory);\n\n /**\n * Creates a new byte array index that can be used for providing Value-Equality semantics for the byte arrays we have in the repo.\n *\n * @return A new byte array index to use.\n */\n ByteArrayIndex createByteArrayIndex();\n\n /**\n * Creates a new clock for creating timestamps.\n *\n * @return A new clock for creating timestamps.\n */\n ClockAPI<? extends TimestampAPI> createClock();\n\n /**\n * Gets the latest commit for the branch with the given name.\n *\n * @param branchName The name of the branch to get the latest commit for.\n * @param repo The repo to get the commit from.\n * @return The latest commit for the given branch. Null if there is no branch with the given name.\n */\n TCommit getLatestCommitForBranch(String branchName, TRepo repo);\n\n /**\n * Gets the set of branch names in the repo.\n * The set is a snapshot of the names that currently exist for the repo.\n *\n * @param repo The repo to get the branch names from.\n * @return The set of branch names in the repo. If there are no branches in the repo then an empty set is returned. The set returned is unmodifiable so that you have a snapshot of the branches at this point in time.\n */\n Set<String> getBranchNames(TRepo repo);\n\n /**\n * Gets the set of tag names in the repo.\n * The set is a snapshot of the names that currently exist for the repo.\n *\n * @param repo The repo to get the tag names from.\n * @return The set of tag names in the repo. If there are no tags in the repo then an empty set is returned. The set returned is unmodifiable so that you have a snapshot of the tags at this point in time.\n */\n Set<String> getTagNames(TRepo repo);\n\n /**\n * Tags the commit with the given name.\n * This tag name can be used to reference a specific commit in the history, independently of the branches.\n *\n * @param repo The repo to tag the commit in.\n * @param commit The commit to tag with a name.\n * @param tagName The name of the tag to give to this commit.\n */\n void tagCommit(TRepo repo, TCommit commit, String tagName);\n\n /**\n * Gets the commit with the given tag name.\n *\n * @param repo The repo to get the tagged commit from.\n * @param tagName The name of the tagged commit.\n * @return The commit with the given tag name. Null if there is no tag with this name.\n */\n TCommit getCommitForTag(TRepo repo, String tagName);\n\n /**\n * Removes the tag with the given name from the repo.\n *\n * @param repo The repo to remove the tag from.\n * @param tagName The name of the tag to remove. If this tag doesn't exist then nothing happens.\n */\n void removeTag(TRepo repo, String tagName);\n\n /**\n * Optimizes the timestamps for the repo.\n * This process might re-base epochs and timestamps to better reuse epochs.\n *\n * @param repo The repo to optimize the timestamps in.\n */\n void optimizeTimestamps(TRepo repo);\n\n /**\n * Computes a difference between the given areas.\n * The areas could have come from anywhere.\n *\n * @param fromArea The first area to find differences from.\n * @param toArea The second area to find differences to.\n * @param differenceHandler The handler to use for {@link DifferenceAPI}s between {@link AreaAPI}s of {@link ContentAPI}.\n * @return The differences between the given areas.\n */\n DifferenceAPI computeDifferenceBetweenAreas(AreaAPI<? extends TContent> fromArea, AreaAPI<? extends TContent> toArea, DifferenceHandlerAPI<? extends DifferenceEngineAPI> differenceHandler);\n\n /**\n * Computes a difference between the given commits.\n * It is assumed that the commits come from this repo.\n *\n * @param fromCommit The first commit to find differences from.\n * @param toCommit The second commit to find differences to.\n * @param differenceHandler The handler to use for {@link DifferenceAPI}s between {@link AreaAPI}s of {@link ContentAPI}.\n * @param repo The repo to check out from.\n * @param areaFactory The user specified factory method for the specific type of content area to create.\n * @param contentFactory The content factory to use when populating the content area.\n * @return The differences between the given commits.\n */\n DifferenceAPI computeDifferenceBetweenCommits(TCommit fromCommit, TCommit toCommit, DifferenceHandlerAPI<? extends DifferenceEngineAPI> differenceHandler, TRepo repo, AreaFactory<TContent, TArea> areaFactory, ContentFactory<TContent> contentFactory);\n\n /**\n * Computes a difference between the given branches.\n *\n * @param fromBranchName The first branch to find differences from.\n * @param toBranchName The second branch to find differences to.\n * @param differenceHandler The handler to use for {@link DifferenceAPI}s between {@link AreaAPI}s of {@link ContentAPI}.\n * @param repo The repo to check out from.\n * @param areaFactory The user specified factory method for the specific type of content area to create.\n * @param contentFactory The content factory to use when populating the content area.\n * @return The differences between the given branches.\n */\n DifferenceAPI computeDifferenceBetweenBranches(String fromBranchName, String toBranchName, DifferenceHandlerAPI<? extends DifferenceEngineAPI> differenceHandler, TRepo repo, AreaFactory<TContent, TArea> areaFactory, ContentFactory<TContent> contentFactory);\n\n /**\n * Computes a comparison between the given areas.\n * The areas could have come from anywhere.\n *\n * @param fromArea The first area to find comparisons from.\n * @param toArea The second area to find comparisons to.\n * @param comparisonHandler The handler to use for {@link ComparisonAPI}s between {@link AreaAPI}s of {@link ContentAPI}.\n * @return The comparisons between the given areas.\n */\n ComparisonAPI computeComparisonBetweenAreas(AreaAPI<? extends TContent> fromArea, AreaAPI<? extends TContent> toArea, ComparisonHandlerAPI<? extends ComparisonEngineAPI> comparisonHandler);\n\n /**\n * Computes a comparison between the given commits.\n * It is assumed that the commits come from this repo.\n *\n * @param fromCommit The first commit to find comparisons from.\n * @param toCommit The second commit to find comparisons to.\n * @param comparisonHandler The handler to use for {@link ComparisonAPI}s between {@link AreaAPI}s of {@link ContentAPI}.\n * @param repo The repo to check out from.\n * @param areaFactory The user specified factory method for the specific type of content area to create.\n * @param contentFactory The content factory to use when populating the content area.\n * @return The comparisons between the given commits.\n */\n ComparisonAPI computeComparisonBetweenCommits(TCommit fromCommit, TCommit toCommit, ComparisonHandlerAPI<? extends ComparisonEngineAPI> comparisonHandler, TRepo repo, AreaFactory<TContent, TArea> areaFactory, ContentFactory<TContent> contentFactory);\n\n /**\n * Computes a comparison between the given branches.\n *\n * @param fromBranchName The first branch to find comparisons from.\n * @param toBranchName The second branch to find comparisons to.\n * @param comparisonHandler The handler to use for {@link ComparisonAPI}s between {@link AreaAPI}s of {@link ContentAPI}.\n * @param repo The repo to check out from.\n * @param areaFactory The user specified factory method for the specific type of content area to create.\n * @param contentFactory The content factory to use when populating the content area.\n * @return The comparisons between the given branches.\n */\n ComparisonAPI computeComparisonBetweenBranches(String fromBranchName, String toBranchName, ComparisonHandlerAPI<? extends ComparisonEngineAPI> comparisonHandler, TRepo repo, AreaFactory<TContent, TArea> areaFactory, ContentFactory<TContent> contentFactory);\n\n /**\n * A factory method to create the specific search query to use.\n *\n * @param searchQueryDefinition The definition of the search query that is being created.\n * @return A new search query.\n */\n TSearchQuery createSearchQuery(SearchQueryDefinitionAPI searchQueryDefinition);\n\n /**\n * Prepares a reusable search query from the given search definition.\n * This search query can be thought of as the compiled/prepared search query.\n * The same search query can be run for multiple repo's without needing to recompute the search query each time.\n *\n * @param searchQueryDefinition The definition of the search to perform.\n * @return The query for the search. This query can be evaluated multiple times on different repos. The query needs to be evaluated to get the results.\n */\n TSearchQuery prepareSearchQuery(SearchQueryDefinitionAPI searchQueryDefinition);\n\n /**\n * A factory method to create the specific search results that are needed.\n *\n * @param searchQuery The search query to reuse for this search.\n * @return New search results.\n */\n TSearchResults createSearchResults(TSearchQuery searchQuery);\n\n /**\n * Searches for commits that match the given search query.\n * Use this when you want to reuse the search query\n *\n * @param searchQuery The search query to reuse for this search.\n * @param overrideParameters Parameters to override the defaults of the search query with. Pass null to use the parameters in the search query.\n * @param repo The repo to search in.\n * @param areaFactory The user specified factory method for the specific type of content area to create.\n * @param contentFactory The content factory to use when populating the content area.\n * @return The query for the search. This query can be evaluated multiple times on different repos. The query needs to be evaluated to get the results.\n */\n TSearchResults searchWithQuery(TSearchQuery searchQuery, SearchParametersAPI overrideParameters, TRepo repo, AreaFactory<TContent, TArea> areaFactory, ContentFactory<TContent> contentFactory);\n\n /**\n * Merges one branch into another.\n * The merge handler is used to resolve any merge conflicts if there are any.\n *\n * @param destinationBranchName The branch that we should merge into.\n * @param sourceBranchName The branch that we should merge from.\n * @param message The commit message to use for the merge.\n * @param commitTags The commit tags to add to this commit. This allows an arbitrary amount of information to be associated with this commit. See {@link CommitTags} for helper methods here. Any {@link StringAreaAPI} can be used here.\n * @param mergeHandler The handler to use for dealing with the merge logic.\n * @param comparisonHandler The handler to use for comparing content between content areas.\n * @param differenceHandler The handler to use for finding differences between content areas.\n * @param repo The repo that we are working on.\n * @param areaFactory The factory to use for creating content areas for the repo.\n * @param contentFactory The factory to use for extracting content from the areas.\n * @param byteArrayIndex The byte array index to use when creating snap-shots for the content.\n * @param clock The clock to use for generating the timestamp for the commit.\n * @return The commit that was performed for the merge.\n */\n TCommit mergeIntoBranchFromAnotherBranch(String destinationBranchName, String sourceBranchName, String message, StringAreaAPI commitTags, MergeHandlerAPI<? extends MergeEngineAPI> mergeHandler, ComparisonHandlerAPI<? extends ComparisonEngineAPI> comparisonHandler, DifferenceHandlerAPI<? extends DifferenceEngineAPI> differenceHandler, TRepo repo, AreaFactory<TContent, TArea> areaFactory, ContentFactory<TContent> contentFactory, ByteArrayIndex byteArrayIndex, ClockAPI<? extends TimestampAPI> clock);\n\n /**\n * Merges a commit into a branch.\n * The merge handler is used to resolve any merge conflicts if there are any.\n *\n * @param destinationBranchName The branch that we should merge into.\n * @param sourceCommit The commit that we should merge from.\n * @param message The commit message to use for the merge.\n * @param commitTags The commit tags to add to this commit. This allows an arbitrary amount of information to be associated with this commit. See {@link CommitTags} for helper methods here. Any {@link StringAreaAPI} can be used here.\n * @param mergeHandler The handler to use for dealing with the merge logic.\n * @param comparisonHandler The handler to use for comparing content between content areas.\n * @param differenceHandler The handler to use for finding differences between content areas.\n * @param repo The repo that we are working on.\n * @param areaFactory The factory to use for creating content areas for the repo.\n * @param contentFactory The factory to use for extracting content from the areas.\n * @param byteArrayIndex The byte array index to use when creating snap-shots for the content.\n * @param clock The clock to use for generating the timestamp for the commit.\n * @return The commit that was performed for the merge.\n */\n TCommit mergeIntoBranchFromCommit(String destinationBranchName, TCommit sourceCommit, String message, StringAreaAPI commitTags, MergeHandlerAPI<? extends MergeEngineAPI> mergeHandler, ComparisonHandlerAPI<? extends ComparisonEngineAPI> comparisonHandler, DifferenceHandlerAPI<? extends DifferenceEngineAPI> differenceHandler, TRepo repo, AreaFactory<TContent, TArea> areaFactory, ContentFactory<TContent> contentFactory, ByteArrayIndex byteArrayIndex, ClockAPI<? extends TimestampAPI> clock);\n\n /**\n * Merges a branch into a commit.\n * The merge handler is used to resolve any merge conflicts if there are any.\n *\n * @param destinationCommit The commit that we should merge into.\n * @param sourceBranchName The branch that we should merge from.\n * @param message The commit message to use for the merge.\n * @param commitTags The commit tags to add to this commit. This allows an arbitrary amount of information to be associated with this commit. See {@link CommitTags} for helper methods here. Any {@link StringAreaAPI} can be used here.\n * @param mergeHandler The handler to use for dealing with the merge logic.\n * @param comparisonHandler The handler to use for comparing content between content areas.\n * @param differenceHandler The handler to use for finding differences between content areas.\n * @param repo The repo that we are working on.\n * @param areaFactory The factory to use for creating content areas for the repo.\n * @param contentFactory The factory to use for extracting content from the areas.\n * @param byteArrayIndex The byte array index to use when creating snap-shots for the content.\n * @param clock The clock to use for generating the timestamp for the commit.\n * @return The commit that was performed for the merge.\n */\n TCommit mergeIntoCommitFromBranch(TCommit destinationCommit, String sourceBranchName, String message, StringAreaAPI commitTags, MergeHandlerAPI<? extends MergeEngineAPI> mergeHandler, ComparisonHandlerAPI<? extends ComparisonEngineAPI> comparisonHandler, DifferenceHandlerAPI<? extends DifferenceEngineAPI> differenceHandler, TRepo repo, AreaFactory<TContent, TArea> areaFactory, ContentFactory<TContent> contentFactory, ByteArrayIndex byteArrayIndex, ClockAPI<? extends TimestampAPI> clock);\n\n /**\n * Merges a commit into another commit.\n * The merge handler is used to resolve any merge conflicts if there are any.\n *\n * @param destinationCommit The commit that we should merge into.\n * @param sourceCommit The commit that we should merge from.\n * @param message The commit message to use for the merge.\n * @param commitTags The commit tags to add to this commit. This allows an arbitrary amount of information to be associated with this commit. See {@link CommitTags} for helper methods here. Any {@link StringAreaAPI} can be used here.\n * @param mergeHandler The handler to use for dealing with the merge logic.\n * @param comparisonHandler The handler to use for comparing content between content areas.\n * @param differenceHandler The handler to use for finding differences between content areas.\n * @param repo The repo that we are working on.\n * @param areaFactory The factory to use for creating content areas for the repo.\n * @param contentFactory The factory to use for extracting content from the areas.\n * @param byteArrayIndex The byte array index to use when creating snap-shots for the content.\n * @param clock The clock to use for generating the timestamp for the commit.\n * @return The commit that was performed for the merge.\n */\n TCommit mergeCommits(TCommit destinationCommit, TCommit sourceCommit, String message, StringAreaAPI commitTags, MergeHandlerAPI<? extends MergeEngineAPI> mergeHandler, ComparisonHandlerAPI<? extends ComparisonEngineAPI> comparisonHandler, DifferenceHandlerAPI<? extends DifferenceEngineAPI> differenceHandler, TRepo repo, AreaFactory<TContent, TArea> areaFactory, ContentFactory<TContent> contentFactory, ByteArrayIndex byteArrayIndex, ClockAPI<? extends TimestampAPI> clock);\n\n\n /**\n * Creates a new branch with the given name and makes it point at the given commit.\n * If the repo already has a branch with this name then it is updated to point at this commit.\n *\n * @param commit The commit where the new branch should be created.\n * @param branchName The name of the branch to create at the commit.\n * @param repo The repo to update with the new branch.\n */\n void createBranchAtCommit(TCommit commit, String branchName, TRepo repo);\n\n /**\n * Removes the branch with the given name from the repo.\n *\n * @param repo The repo to remove the branch from.\n * @param branchName The name of the branch to remove.\n */\n void removeBranch(TRepo repo, String branchName);\n\n /**\n * Casts or clones the given area to the specific type required by this repo handler.\n *\n * @param areaToCastOrClone The area to cast if it is already the required type or to clone if it is a different area type.\n * @param areaFactory The factory method to use for creating the specific area that we want.\n * @param contentFactory The factory method to use for creating the specific content that we want.\n * @param byteArrayIndex The byte array index to use that allows us to re-use byte arrays that we have seen before in the repo.\n * @return A compatible area for the repo handler which is either a cast of the same instance or a completely new clone of it if it is an incompatible type.\n */\n TArea castOrCloneArea(AreaAPI<? extends ContentAPI> areaToCastOrClone, AreaFactory<TContent, TArea> areaFactory, ContentFactory<TContent> contentFactory, ByteArrayIndex byteArrayIndex);\n}", "public interface INodeFileCabin {\r\n /**\r\n * Get Documents According to TransID or DataFlow\r\n * @param tIDorDataFlow String TRANS_ID or DATAFLOW_NAME\r\n * @param isTransID true if TransID, false if DataFlow\r\n * @return ClsNodeDocument[] FILE_CONTENT\r\n */\r\n public ClsNodeDocument[] GetDocuments (String tIDorDataFlow, boolean isTransID);\r\n\r\n /**\r\n * Get Documents According to Names in ClsNodeDocument[]\r\n * @param searchDocs ClsNodeDocument[] Search Criteria\r\n * @return ClsNodeDocument[] FILE_CONTENT\r\n */\r\n public ClsNodeDocument[] GetDocuments (ClsNodeDocument[] searchDocs);\r\n\r\n /**\r\n * Get Documents According to TransID and DataFlow\r\n * @param transID String TRANS_ID\r\n * @param dataFlow String DATAFLOW_NAME\r\n * @return ClsNodeDocument[] FILE_CONTENT\r\n */\r\n public ClsNodeDocument[] GetDocuments (String transID, String dataFlow);\r\n\r\n /**\r\n * Get Documents According to TransID and DataFlow\r\n * @param transID String TRANS_ID\r\n * @param dataFlow String DATAFLOW_NAME\r\n * @param searchDocs ClsNodeDocument[] FILE_NAME\r\n * @return ClsNodeDocument[] FILE_CONTENT\r\n */\r\n public ClsNodeDocument[] GetDocuments (String transID, String dataFlow, ClsNodeDocument[] searchDocs);\r\n\r\n /**\r\n * Get Documents According to TransID and DataFlow\r\n * @param transID String TRANS_ID\r\n * @param dataFlow String DATAFLOW_NAME\r\n * @param operation String OPERATION_NAME\r\n * @param searchDocs ClsNodeDocument[] FILE_NAME\r\n * @return ClsNodeDocument[] FILE_CONTENT\r\n */\r\n public ClsNodeDocument[] GetDocuments (String transID, String dataFlow,String[] operationArr, ClsNodeDocument[] searchDocs);\r\n /**\r\n * Upload Documents to the Database\r\n * @param docs Documents to be upload (required)\r\n * @param transID String TRANS_ID (optional, although strongly recommended)\r\n * @param status String STATUS (optional)\r\n * @param dataFlow String DATAFLOW_NAME (optional)\r\n * @param submitURL String SUBMIT_URL (optional)\r\n * @param token String SUBMIT_TOKEN (optional)\r\n * @param submitted Date SUBMIT_DATE (optional)\r\n * @param submittedTS Timestamp SUBMIT_DATE (optional)\r\n * @return boolean true if successful, false otherwise\r\n */\r\n public boolean UploadDocuments (ClsNodeDocument[] docs, String transID, String status, String dataFlow, String submitURL, String token, Date submitted, Timestamp submittedTS, String user);\r\n\r\n /**\r\n * Upload Documents to the Database\r\n * @param docs Documents to be upload (required)\r\n * @param transID String TRANS_ID (optional, although strongly recommended)\r\n * @param status String STATUS (optional)\r\n * @param dataFlow String DATAFLOW_NAME (optional)\r\n * @param submitURL String SUBMIT_URL (optional)\r\n * @param token String SUBMIT_TOKEN (optional)\r\n * @param submitted Date SUBMIT_DATE (optional)\r\n * @param submittedTS Timestamp SUBMIT_DATE (optional)\r\n * @return boolean true if successful, false otherwise\r\n */\r\n public boolean UploadHugeDocuments (ClsNodeDocument[] docs, String transID, String status, String dataFlow, String submitURL, String token, Date submitted, Timestamp submittedTS, String user);\r\n\t// WI 22695\r\n /**\r\n * Upload Documents to the Database without delete the temp file\r\n * @param docs Documents to be upload (required)\r\n * @param transID String TRANS_ID (optional, although strongly recommended)\r\n * @param status String STATUS (optional)\r\n * @param dataFlow String DATAFLOW_NAME (optional)\r\n * @param submitURL String SUBMIT_URL (optional)\r\n * @param token String SUBMIT_TOKEN (optional)\r\n * @param submitted Date SUBMIT_DATE (optional)\r\n * @param submittedTS Timestamp SUBMIT_DATE (optional)\r\n * @return boolean true if successful, false otherwise\r\n */\r\n public boolean UploadHugeDocumentsWithoutDelete (ClsNodeDocument[] docs, String transID, String status, String dataFlow, String submitURL, String token, Date submitted, Timestamp submittedTS, String user);\r\n /**\r\n * Query Documents\r\n * @param transID String TRANS_ID\r\n * @param dataFlow String DATAFLOW_NAME\r\n * @param names String[] Search Names\r\n * @return XmlDocument Return Result, null if no documents found\r\n */\r\n public XmlDocument QueryDocs (String transID, String dataFlow, String[] names);\r\n\r\n /**\r\n * Search Documents\r\n * @param docName String\r\n * @param transID String\r\n * @param domainName String\r\n * @param opName String\r\n * @param start Date\r\n * @param end Date\r\n * @return Document[]\r\n */\r\n public Document[] SearchDocuments (String docName, String transID, String domainName, String opName, Date start, Date end, String[] adminDomains, String version_no);\r\n\r\n /**\r\n * Get Unique Operations\r\n * @param domains String[] Domains Admin has rights to, null for all operations\r\n * @return String[]\r\n */\r\n public String[] GetOperationNames (String[] domains);\r\n\r\n /**\r\n * Get Document\r\n * @param fileID int\r\n * @return Document\r\n */\r\n public Document GetDocument (int fileID);\r\n\r\n /**\r\n * Get Document\r\n * @param fileID int\r\n * @return Document\r\n * The content of Document object is the temporary file path, not real data\r\n */\r\n public Document GetHugeDocument (int fileID);\r\n\r\n /**\r\n * Remove Documents\r\n * @param fileIDs int[]\r\n * @return boolean\r\n */\r\n public boolean RemoveDocuments (int[] fileIDs);\r\n\r\n /**\r\n * Remove Documents\r\n * @param transID String\r\n * @param names String[]\r\n * @return boolean\r\n */\r\n public boolean RemoveDocuments (String transID, String[] names);\r\n\r\n /**\r\n * Get Document Transanction ID\r\n * @param fileID int\r\n * @return Document\r\n */\r\n public String GetDocumentTransactionID (int fileID);\r\n\r\n /**\r\n * SaveDocument\r\n * @param fileID\r\n * @param transID\r\n * @param fileName\r\n * @param fileType\r\n * @param status\r\n * @param dataFlow\r\n * @param submitURL\r\n * @param submitToken\r\n * @param submitDate\r\n * @param content\r\n * @param user\r\n * @return String\r\n */\r\n public String SaveDocument (int fileID, String transID, String fileName, String fileType, String status, String dataFlow,\r\n String submitURL, String submitToken, Date submitDate, byte[] content, String user);\r\n\r\n /**\r\n * SaveDocument\r\n * @param fileID\r\n * @param documentID\r\n * @param transID\r\n * @param fileName\r\n * @param fileType\r\n * @param status\r\n * @param dataFlow\r\n * @param submitURL\r\n * @param submitToken\r\n * @param submitDate\r\n * @param content\r\n * @param user\r\n * @return String\r\n */\r\n public String SaveDocument (int fileID, String documentID,String transID, String fileName, String fileType, String status, String dataFlow,\r\n String submitURL, String submitToken, Date submitDate, byte[] content, String user);\r\n}", "List<CMSObject> getNodeByPath(String path, Object session) throws RepositoryAccessException;", "public interface IRepository {\n}", "UserContent findContentById(@Param(\"contentUid\") long contentUid);", "public Contents getContents(\n )\n {return contents;}", "boolean open( RepositoryObjectReference object );", "public interface NoteTagRepository extends MyRepository<NoteTag, Long> {\n\n NoteTag findByContent(String content);\n\n}", "List<Content> getContentListForApproval();", "public interface Protocol {\n /** The name of the extension point. */\n public final static String X_POINT_ID = Protocol.class.getName();\n\n /** Returns the {@link Content} for a url.\n * @throws IOException for any errors.\n */\n Content getContent(String url) throws ProtocolException;\n}", "String getContent();", "String getContent();", "String getContent();", "String getContent();", "String getContent();" ]
[ "0.71414727", "0.6629079", "0.6532903", "0.6529204", "0.65197873", "0.6438873", "0.63234705", "0.6243153", "0.6220012", "0.6214223", "0.6212275", "0.6199011", "0.6132083", "0.6088723", "0.6081969", "0.6079818", "0.6070921", "0.60368854", "0.6030175", "0.59989136", "0.59882784", "0.5973398", "0.5939108", "0.59359777", "0.592864", "0.59245515", "0.59137", "0.5864472", "0.58543205", "0.58139783", "0.5797603", "0.5791185", "0.5791185", "0.5782902", "0.5780562", "0.5741351", "0.5715272", "0.5702329", "0.5701958", "0.5693287", "0.56882834", "0.5674574", "0.56724966", "0.5660407", "0.56442976", "0.5642771", "0.56222767", "0.56216156", "0.5619601", "0.5612135", "0.56051797", "0.5604217", "0.5604217", "0.5604217", "0.5604217", "0.5604217", "0.5604217", "0.5603713", "0.5600875", "0.5597415", "0.55768144", "0.5574642", "0.5562863", "0.5562095", "0.5544342", "0.5543465", "0.5537871", "0.5522241", "0.5520691", "0.5513804", "0.54955", "0.5492371", "0.54897684", "0.5489706", "0.54753184", "0.54740083", "0.54713976", "0.54691577", "0.5467397", "0.5463864", "0.5450559", "0.5450419", "0.5444203", "0.54432255", "0.54408187", "0.5434436", "0.5425898", "0.5423945", "0.5411668", "0.5407759", "0.5407391", "0.5405602", "0.5405431", "0.53979015", "0.5392103", "0.53919595", "0.53919595", "0.53919595", "0.53919595", "0.53919595" ]
0.6762008
1
Returns the node for the given path The path must be a simple canonical path. (No filters, relative paths, etc.)
Node getNode(String path);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DataNode getNode(String path) {\n return dataTree.getNode(path);\n }", "Node getSingleNode(String path)\n throws ProcessingException;", "CMSObject getFirstNodeByPath(String path, ConnectionInfo connectionInfo) throws RepositoryAccessException;", "@Override\r\n\tpublic Node getNode(String absPath) throws PathNotFoundException,\r\n\t\t\tRepositoryException {\n\t\treturn null;\r\n\t}", "CMSObject getFirstNodeByPath(String path, Object session) throws RepositoryAccessException;", "void createNode(String path);", "public CatalogNode getNode(String node);", "public synchronized Node getSingleNode(String path)\n throws ProcessingException {\n Node result = null;\n\n path = this.createPath(path);\n\n try {\n result = DOMUtil.getSingleNode(data, path, this.xpathProcessor);\n if (result != null) result = result.cloneNode(true);\n } catch (javax.xml.transform.TransformerException localException) {\n throw new ProcessingException(\"TransformerException: \" + localException, localException);\n }\n\n return result;\n }", "Node get(URI uri);", "public IContentNode getChild(String path);", "protected Reference queryNode(final String nodePath) {\n\n\t\ttry {\n\t\t\tQuery query = new Query(Constants.QUERY_LANG_LUCENE, String.format(\"PATH:\\\"%s\\\"\", nodePath));\n\n\t\t\tNode[] result = repositoryService.get(new Predicate(null, STORE, query));\n\t\t\tif((result != null) && (result.length == 1)) {\n\t\t\t\treturn result[0].getReference();\n\t\t\t}\n\n\t\t} catch (RemoteException e) {\n\t\t\tif(LOG.isDebugEnabled()) {\n\t\t\t\tLOG.debug(String.format(\"Failed to query node: \\\"%s\\\"\", nodePath), e);\n\t\t\t}\n\t\t}\n\n\n\t\treturn null;\n\t}", "Node getNode();", "static Node findPath(Node r, String[] path) {\n try {\n return NodeOp.findPath(r, path);\n } catch (NodeNotFoundException ex) {\n return ex.getClosestNode();\n }\n }", "String getValueOfNode(String path)\n throws ProcessingException;", "private Node getNode(String resource)\r\n {\r\n return Node.getNode(resource);\r\n }", "public static Node getSingleNode(Node node, String path) throws UMROException {\r\n NodeList nodeList = getMultipleNodes(node, path);\r\n if (nodeList.getLength() == 0) {\r\n throw new UMROException(\"Did not find any nodes for path \" + path);\r\n }\r\n if (nodeList.getLength() > 1) {\r\n throw new UMROException(\"Found \" + nodeList.getLength() + \" but expected only one node for path \" + path);\r\n }\r\n return nodeList.item(0);\r\n }", "public Node(String name, String path) {\n this.name = name;\n this.path = path;\n }", "public Node getNode();", "Object get(Node node);", "public JodeList xPathFind(String path) {\n return new XPath(path).find(this);\n }", "public DefaultMutableTreeNode getRequestedNode()\n {\n // Reset node to be displayed\n displayNode = root;\n \n // Iterate trough the path array\n for (int i = 0; i < pathArray.length; i++)\n {\n if (displayNode.getDepth() > 1)\n {\n displayNode = (DefaultMutableTreeNode)\n displayNode.getChildAt(pathArray[i]);\n }\n }\n \n // Return node to be displayed\n return displayNode;\n }", "public XMLElement getChild(String path)\n/* */ {\n/* 563 */ if (path.indexOf('/') != -1) {\n/* 564 */ return getChildRecursive(PApplet.split(path, '/'), 0);\n/* */ }\n/* 566 */ int childCount = getChildCount();\n/* 567 */ for (int i = 0; i < childCount; i++) {\n/* 568 */ XMLElement kid = getChild(i);\n/* 569 */ String kidName = kid.getName();\n/* 570 */ if ((kidName != null) && (kidName.equals(path))) {\n/* 571 */ return kid;\n/* */ }\n/* */ }\n/* 574 */ return null;\n/* */ }", "CMSObject getFirstNodeByName(String name, Object session) throws RepositoryAccessException;", "public AbstractConfigNode find(@Nonnull String path)\n throws ConfigurationException {\n path = path.trim();\n Preconditions.checkArgument(!Strings.isNullOrEmpty(path));\n if (path.startsWith(ConfigurationSettings.NODE_SEARCH_SEPERATOR)) {\n return configuration.find(path);\n }\n\n if (path.equals(\".\")) {\n return this;\n } else if (path\n .startsWith(\".\" + ConfigurationSettings.NODE_SEARCH_SEPERATOR)) {\n // Remove the ./ in the beginning\n path = path.substring(2);\n path = String.format(\"%s/%s\", getName(), path);\n }\n\n List<String> stack =\n ConfigUtils.getResolvedPath(path, getConfiguration().getSettings(),\n this);\n if (stack != null && !stack.isEmpty()) {\n String node = stack.get(0);\n if (node.compareTo(getName()) != 0 &&\n node.compareTo(ConfigurationSettings.NODE_PARENT_TERM) != 0) {\n stack.add(0, getName());\n }\n return find(stack, 0);\n }\n return null;\n }", "public Node getXMLNode(Document document, String parentPath, String subPath)\n\t{\n\t\tNode node = null;\n\t\ttry{\n\t\t\tif (subPath.contains(\"(\") && subPath.contains(\")\"))\n\t\t\t{\n\t\t\t\tString attribute = subPath.substring(subPath.indexOf(\"(\") + 1, subPath.indexOf(\")\"));\n\t\t\t\tif (parentPath == null || parentPath.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tnode = document.selectSingleNode(subPath.substring(0, subPath.indexOf(\"(\")));\n\t\t\t\t\treturn node;\n\t\t\t\t}\n\t\t\t\tList<Element> elements = document.selectNodes(parentPath);\n\t\t\t\tfor (Element element : elements)\n\t\t\t\t{\n\t\t\t\t\tif ( subPath.indexOf(\"(\") == 0 )\n\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t//if the SourcePath is FIRST_NODE, then return the first node\n\t\t\t\t\t\t//if the Element Value is what the sourcepath contains, then return the Element\n\t\t\t\t\t\tif (attribute.equals(\"FIRST_NODE\") || (element.attributeValue(attribute.substring(0, attribute.indexOf(\"=\"))).trim().equals(attribute.substring(attribute.indexOf(\"=\")+1))))\n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tnode = element.selectSingleNode(subPath.substring(subPath.indexOf(\"/\")+1));\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tnode = element.selectSingleNode(subPath.substring(0, subPath.indexOf(\"(\")));\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\telse node = document.selectSingleNode(combineXPath(parentPath, subPath));\n\t\t}catch(Exception e)\n\t\t{\n\t\t\tlogger.warn(\"Get Node Failed \\t\" + parentPath + subPath + e.getMessage());\n\t\t}\n\t\t\t\t\n\t\treturn node;\n\t}", "N getNode(int id);", "CMSObject getFirstNodeByName(String name, ConnectionInfo connectionInfo) throws RepositoryAccessException;", "void pathFound(Node node);", "public Node get_node(String node) {\n return this.nodes.get(node);\n }", "public abstract Node getNode();", "String getDisplayableNodePath(String nodePath, boolean fallbackToHomePage) throws GWTJahiaServiceException;", "private Node getNode(String nodeId,\n String relativeFolderPath) {\n\n List<String> include = null;\n List<String> fields = null;\n\n NodeEntry result = nodesApi.getNode(nodeId, include, relativeFolderPath, fields).getBody();\n LOGGER.info(\"Got node {}\", result.getEntry());\n return result.getEntry();\n }", "public Node getNode(Reference ref, Presentation presentation);", "List<Node> getNode(String str);", "public synchronized String getValueOfNode(String path)\n throws ProcessingException {\n String value = null;\n\n path = this.createPath(path); // correct path\n value = DOMUtil.getValueOf(data, path, this.xpathProcessor);\n\n return value;\n }", "public Node getNode(String key) {\n \ttmp = first;\n \tint i;\n \tfor (i=0;i<len;i++) {\n \t\tif (tmp.key == key) {\n \t\t\treturn tmp;\n \t\t}\n \t\ttmp = tmp.getNext();\n \t}\n \treturn null;\n }", "public Optional<T> get(String path) {\n List<String> components = getPathComponents(path);\n\n MatchTreeNode<T> node = tree.getLongestMatchingNode(components);\n if (node == null) {\n return Optional.empty();\n }\n\n T value;\n if (isExactlyMatchingPath(node, path, components)) {\n // exact match:\n value = node.value();\n if (value == null) {\n value = bestValue(node.parent());\n }\n } else {\n value = bestValue(node);\n }\n\n if (value == null) {\n return Optional.empty();\n }\n\n return Optional.of(value);\n }", "public IMNode getNodeWithAutoCreate(PartialPath path) throws StorageGroupNotSetException {\n String[] nodeNames = path.getNodes();\n IMNode cur = root;\n IMNode child;\n boolean hasStorageGroup = false;\n for (int i = 1; i < nodeNames.length; i++) {\n child = cur.getChild(nodeNames[i]);\n if (child == null) {\n if (hasStorageGroup) {\n child = cur.addChild(nodeNames[i], new InternalMNode(cur, nodeNames[i]));\n } else {\n throw new StorageGroupNotSetException(path.getFullPath());\n }\n } else if (child.isStorageGroup()) {\n hasStorageGroup = true;\n }\n\n cur = child;\n }\n return cur;\n }", "public NodeT getNode(String key) {\n return nodeTable.get(key);\n }", "public Jode xPathTraverse(String path) {\n return new XPath(path).traverse(this);\n }", "private Node getNode(String nodeName)\r\n\t{\r\n\t return nodeMap.get(nodeName);\r\n\t}", "public Node getNode(String nodeName) {\n\t\t\t\n\t\tfor(Node n : nodes)\n\t\t{\n\t\t\tif(n.getName().equals(nodeName.toUpperCase()))\n\t\t\t\treturn n;\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "@AutoEscape\n\tpublic String getNode_1();", "public FileSystemEntry getEntry(String path);", "public String getNode() {\n return node;\n }", "CMSObject getFirstNodeById(String id, Object session) throws RepositoryAccessException;", "java.lang.String getXpath();", "public MyNode findMyNode(Node node){\r\n\t\treturn nodesMap.get(node);\r\n\t}", "public MatchTreeNode<T> getLongestMatchingNode(List<String> path) {\n MatchTreeNode<T> node = root;\n\n for (String name : path) {\n MatchTreeNode<T> child = node.child(name);\n if (child == null) {\n break;\n }\n node = child;\n }\n\n return node;\n }", "CMSObject getFirstNodeById(String id, ConnectionInfo connectionInfo) throws RepositoryAccessException;", "TreeNode getTreeNode();", "public Node getNode(String nodeName)\n\t{\n\t\tfor(Node n : nodes)\n\t\t\tif(n.getName().toLowerCase().trim().equals(nodeName.toLowerCase().trim()))\n\t\t\t\treturn n;\n\t\t\n\t\treturn null;\n\t}", "public static String getPath(NodeInfo node) {\n if (node == null) {\n return \"\";\n }\n String pre;\n NodeInfo parent = node.getParent();\n // System.err.println(\"node = \" + node + \" parent = \" + parent);\n \n switch (node.getNodeKind()) {\n case Type.DOCUMENT:\n return \"/\";\n case Type.ELEMENT:\n if (parent == null) {\n return node.getDisplayName();\n } else {\n pre = getPath(parent);\n if (pre.equals(\"/\")) {\n return '/' + node.getDisplayName();\n } else {\n return pre + '/' + node.getDisplayName() + '[' + getNumberSimple(node) + ']';\n }\n }\n case Type.ATTRIBUTE:\n return getPath(parent) + \"/@\" + node.getDisplayName();\n case Type.TEXT:\n pre = getPath(parent);\n return (pre.equals(\"/\") ? \"\" : pre) +\n \"/text()[\" + getNumberSimple(node) + ']';\n case Type.COMMENT:\n pre = getPath(parent);\n return (pre.equals(\"/\") ? \"\" : pre) +\n \"/comment()[\" + getNumberSimple(node) + ']';\n case Type.PROCESSING_INSTRUCTION:\n pre = getPath(parent);\n return (pre.equals(\"/\") ? \"\" : pre) +\n \"/processing-instruction()[\" + getNumberSimple(node) + ']';\n case Type.NAMESPACE:\n String test = node.getLocalPart();\n if (test.equals(\"\")) {\n // default namespace: need a node-test that selects unnamed nodes only\n test = \"*[not(local-name()]\";\n }\n return getPath(parent) + \"/namespace::\" + test;\n default:\n return \"\";\n }\n }", "default Object get(String path) {\n return get(path, null);\n }", "@Override\n public Node getNode() throws ItemNotFoundException, ValueFormatException,\n RepositoryException {\n return null;\n }", "@AutoEscape\n\tpublic String getNode_2();", "private String extractNodeInfo(String path) {\n\t try {\n\t\t\tInputStream is = new FileInputStream(path);\n\t\t\tint len = is.available();\n\t\t\tbyte[] bytes = new byte[len];\n\t\t\tis.read(bytes);\n\t\t\treturn new String(bytes).trim();\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 null;\n\t}", "@Override\n public final JsonNode findPath(String fieldName)\n {\n JsonNode value = findValue(fieldName);\n if (value == null) {\n return MissingNode.getInstance();\n }\n return value;\n }", "public TSTNode<E> getNode(String key) {\n return getNode(key, rootNode);\n }", "public String nodePath() {\r\n String path;\r\n if (this.parent == null) {\r\n path = \"(\" + this.nodeType + \"|\" + this.dataType + \"|\" + this.data + \")\";\r\n } else {\r\n path = this.parent.nodePath() + \" (\" + this.nodeType + \"|\" + this.dataType + \"|\" + this.data + \")\";\r\n }\r\n return path;\r\n }", "private Node getNode(String name) {\n for(Iterator<Node> i = nodes.iterator(); i.hasNext();) {\n Node n = i.next();\n if(n.getName().equalsIgnoreCase(name)){\n return n;\n };\n }\n return null;\n }", "public DirectoryTreeNode getItemGivenPath(IDirectory parentDir, String path) {\r\n // Set file to null as default\r\n DirectoryTreeNode item = null;\r\n\r\n // Check if the path is the root\r\n if (path.equals(\"/\")) {\r\n return this.rootDir;\r\n // If a full path is provided, get the file associated to the path\r\n } else if (path.startsWith(\"/\")) {\r\n item = this.getItemGivenFullPath(path);\r\n // If it is a relative path, get the file associated to the path\r\n } else if (path.contains(\"/\")) {\r\n item = this.getItemGivenRelativePath(parentDir, path);\r\n // If it the file name itself, get the file from the directory tree\r\n } else {\r\n item = this.getItem(path, parentDir);\r\n }\r\n\r\n // Return the item\r\n return item;\r\n }", "List<CMSObject> getNodeByPath(String path, Object session) throws RepositoryAccessException;", "public String getNode()\n {\n return node;\n }", "public Node getNode (){\n if (_node == null){\n Label label = new Label(_value);\n label.setFont(DEFAULT_FONT);\n _node = label;\n }\n return _node;\n }", "List<CMSObject> getNodeByPath(String path, ConnectionInfo connectionInfo) throws RepositoryAccessException;", "public Node getOne(int identifier) throws SQLException, NodeNotFoundException {\n var statement = connection.prepareStatement(\"SELECT identifier, x, y, parentx, parenty, status, owner, description FROM nodes WHERE identifier = ?\");\n statement.setInt(1, identifier);\n var result = statement.executeQuery();\n try {\n if (result.next()) {\n return new Node(\n result.getInt(\"identifier\"),\n result.getInt(\"x\"),\n result.getInt(\"y\"),\n result.getInt(\"parentx\"),\n result.getInt(\"parenty\"),\n result.getString(\"status\"),\n result.getString(\"owner\"),\n result.getString(\"description\")\n );\n } else {\n throw new NodeNotFoundException();\n }\n }\n finally {\n statement.close();\n result.close();\n }\n }", "public CircosNode getNode(String id){\n\t\tfor(int i = 0; i < nodes.size(); i++){\n\t\t\tif(nodes.get(i).getID().equals(id)){\n\t\t\t\treturn nodes.get(i);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureNode getNode(int index);", "java.lang.String getEntryNode();", "OperationNode getNode();", "@Override\n\tpublic Object getNodeInfo(String path) {\n\t\treentrantReadWriteLock.readLock().lock();\n\t\tObject obj = null;\n\t\ttry {\n\t\t\tbyte[] tmpByteData = zookeeper.getData(path, false,\n\t\t\t\t\tnew Stat());\n\t\t\t\n\t\t\tobj = SomeUtil.byteToJson(tmpByteData);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"获取跟节点数据异常!\", e);\n\t\t} finally {\n\t\t\treentrantReadWriteLock.readLock().unlock();\n\t\t}\n\t\treturn obj;\n\t}", "Path getPath();", "public String getNode() {\n return node;\n }", "private List<TreeNode> translatePath(List path, TreeNode node) {\n \n // TODO: Find the correct node given two identical paths. \n // For example suppose we have two paths Classes/String and Classes/String.\n // This method will always translate to the first path, regardless of the\n // actual path given.\n \n List tail = new ArrayList();\n tail.addAll(path);\n Object target = tail.remove(0);\n \n if (!node.toString().equals(target.toString())) {\n return null;\n }\n \n List<TreeNode> newPath = new ArrayList<TreeNode>();\n newPath.add(node);\n \n // no more nodes to find, just return this one\n if (tail.isEmpty()) return newPath;\n \n Enumeration e = node.children();\n while(e.hasMoreElements()) {\n TreeNode child = (TreeNode)e.nextElement();\n List nodes = translatePath(tail, child);\n if (nodes != null) {\n newPath.addAll(nodes);\n return newPath;\n }\n }\n \n // the path was not found under this subtree\n return null;\n }", "CtPath getPath();", "public Node getNodeByCache(String label)\r\n\t{\r\n\t\treturn cacheNodes.get(label);\r\n\t}", "@SuppressFBWarnings({\"NP_NULL_PARAM_DEREF\", \"DM_DEFAULT_ENCODING\", \"NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE\"})\n public Tree getTreeFromFile(String path) {\n FileInputStream fileInputStream = null;\n try {\n fileInputStream = new FileInputStream(path);\n } catch (FileNotFoundException e) {\n \n }\n\n BufferedReader r = new BufferedReader(new InputStreamReader(fileInputStream));\n TreeParser tp = new TreeParser(r);\n\n String f = Paths.get(path).getFileName().toString();\n return tp.tokenize(f);\n }", "@SuppressWarnings(\"unchecked\")\n public static <NODE extends BaseComponent> NODE findNode(BaseComponent root, Class<NODE> nodeClass, String path,\n boolean create, MatchMode matchMode) {\n String[] pcs = path.split(\"\\\\\\\\\");\n BaseComponent node = null;\n \n try {\n for (String pc : pcs) {\n if (pc.isEmpty()) {\n continue;\n }\n \n BaseComponent parent = node == null ? root : node;\n node = null;\n int index = matchMode == MatchMode.INDEX || matchMode == MatchMode.AUTO ? NumberUtils.toInt(pc, -1) : -1;\n MatchMode mode = matchMode != MatchMode.AUTO ? matchMode\n : index >= 0 ? MatchMode.INDEX : MatchMode.CASE_INSENSITIVE;\n List<BaseComponent> children = parent.getChildren();\n int size = children.size();\n \n if (mode == MatchMode.INDEX) {\n \n if (index < 0) {\n index = size;\n }\n \n int deficit = index - size;\n \n if (!create && deficit >= 0) {\n return null;\n }\n \n while (deficit-- >= 0) {\n parent.addChild(nodeClass.newInstance());\n }\n node = children.get(index);\n \n } else {\n for (BaseComponent child : children) {\n String label = BeanUtils.getProperty(child, \"label\");\n \n if (mode == MatchMode.CASE_SENSITIVE ? pc.equals(label) : pc.equalsIgnoreCase(label)) {\n node = child;\n break;\n }\n }\n \n if (node == null) {\n if (!create) {\n return null;\n }\n node = nodeClass.newInstance();\n parent.addChild(node);\n BeanUtils.setProperty(node, \"label\", pc);\n }\n }\n \n if (node == null) {\n break;\n }\n }\n } catch (Exception e) {\n throw MiscUtil.toUnchecked(e);\n }\n \n return (NODE) node;\n }", "private int\ngetNodeIndex(final SoNode node)\n//\n////////////////////////////////////////////////////////////////////////\n{\n int i;\n\n // Search from bottom up for node in path, since details are\n // usually examined near the bottom\n for (i = ( SoFullPath.cast ( path)).getLength() - 1; i >= 0; i--)\n if (path.getNode(i) == node)\n return i;\n\n//#ifdef DEBUG\n SoDebugError.post(\"SoPickedPoint::getNodeIndex\",\n \"Node \"+node+\" is not found in path\");\n//#endif /* DEBUG */\n\n return -1;\n}", "public String getNodeValue ();", "TreeNode returnNode(TreeNode node);", "Path getPathFromNodeTo(Node destination);", "public abstract TreeNode getNode(int i);", "public GraphNode getNode(String key) {\n\treturn nodes.get(key);\n }", "private JsonNode get(String path) throws ResponseProcessingException {\n JsonNode rootNode = null;\n\n WebTarget webTarget = target.path(path);\n Invocation.Builder builder = webTarget.request(MediaType.APPLICATION_JSON_TYPE);\n Response restResponse = builder.get();\n\n Response.StatusType responseInfo = restResponse.getStatusInfo();\n if (responseInfo.getFamily() == Response.Status.Family.SUCCESSFUL) {\n InputStream inputStream = (InputStream) restResponse.getEntity();\n\n // Convert the input stream to a string\n ByteArrayOutputStream result = new ByteArrayOutputStream();\n byte[] buffer = new byte[1024];\n int length = 0;\n String json = null;\n try {\n while ((length = inputStream.read(buffer)) != -1) {\n result.write(buffer, 0, length);\n }\n json = result.toString(StandardCharsets.UTF_8.name());\n } catch (UnsupportedEncodingException exEnc) {\n throw new ResponseProcessingException(restResponse, \"Invalid character encoding for response stream.\");\n } catch (IOException exIO) {\n throw new ResponseProcessingException(restResponse, \"Failed to read from the response stream.\");\n }\n\n\n // Parse the JSON to an object\n try {\n ObjectMapper mapper = new ObjectMapper();\n rootNode = mapper.readTree(json);\n } catch (IOException exIO) {\n throw new ResponseProcessingException(restResponse, \"Failed to parse JSON response body.\");\n }\n\n } else {\n throw new ResponseProcessingException(restResponse, \"GET operation was unsuccessful\");\n }\n\n return rootNode;\n }", "RenderedOp getNode(Long id) throws RemoteException;", "public DotGraphNode getNode(String name) {\n if (name == null) {\n return null;\n }\n\n DotGraphNode node = nodes.get(name);\n if (node == null) {\n node = new DotGraphNode(name);\n nodes.put(name, node);\n }\n return node;\n }", "private Node getNode(String n1)\n\t{\n\t\tif (n1 == null) throw new RuntimeException(\"Attempt to add null node\");\n\t\tif (nodes.containsKey(n1)) return nodes.get(n1);\n\t\tnodes.put(n1, new Node(n1));\n\t\treturn nodes.get(n1);\n\t}", "public WSLNode getNode(String node) {\n\t\tif(name.equals(node)) return this;\n\n\t\tif(children == null) return null;\n\n\t\tfor(int i=0; i<children.size(); i++) {\n\t\t\tWSLNode n = ((WSLNode) children.elementAt(i)).getNode(node);\n\t\t\tif(n!=null) return n;\n\t\t}\n\n\t\treturn null;\n\t}", "@AutoEscape\n\tpublic String getNode_3();", "public Entry getEntry(String aPath)\n {\n if(getRepo()==null) return null;\n \n // Handle root special\n if(aPath.equals(\"/\")) return new Entry(null, aPath);\n \n // Get repository index and entry for path\n DirCache index = getIndex(); String path = aPath.substring(1);\n DirCacheEntry entry = index.getEntry(aPath.substring(1));\n boolean isDir = entry==null && index.getEntriesWithin(path).length>0;\n if(entry==null && !isDir) return null;\n \n // Create file for path and index entry\n return new Entry(entry, aPath);\n }", "public IStorageGroupMNode getStorageGroupNodeByPath(PartialPath path) throws MetadataException {\n String[] nodes = path.getNodes();\n if (nodes.length == 0 || !nodes[0].equals(root.getName())) {\n throw new IllegalPathException(path.getFullPath());\n }\n IMNode cur = root;\n for (int i = 1; i < nodes.length; i++) {\n cur = cur.getChild(nodes[i]);\n if (cur == null) {\n break;\n }\n if (cur.isStorageGroup()) {\n return cur.getAsStorageGroupMNode();\n }\n }\n throw new StorageGroupNotSetException(path.getFullPath());\n }", "@Override\r\n\tpublic CacheTreeNode getOneRootNode(String key) {\n\t\treturn searchTreeNode(key);\r\n\t}", "public Path getPath();", "private RMNode getRMNode(final String nodeId) {\n if (nodeId == null || nodeId.isEmpty()) {\n throw new NotFoundException(\"nodeId, \" + nodeId + \", is empty or null\");\n }\n NodeId nid = NodeId.fromString(nodeId);\n RMContext rmContext = this.rm.getRMContext();\n RMNode ni = rmContext.getRMNodes().get(nid);\n if (ni == null) {\n ni = rmContext.getInactiveRMNodes().get(nid);\n if (ni == null) {\n throw new NotFoundException(\"nodeId, \" + nodeId + \", is not found\");\n }\n }\n return ni;\n }", "UserContentAccess findContentAccessForPath(@Param(\"path\") String path);", "CommunicationLink getNodeByName(String name)\n {\n return getNodeById(Objects.hash(name));\n }", "public Jode single(String nodeName) {\n return children().single(nodeName);\n }", "TaskNode getNode(Task task);" ]
[ "0.7316234", "0.725683", "0.67015123", "0.6692475", "0.66598874", "0.65019387", "0.64543474", "0.6401733", "0.63798577", "0.6353384", "0.6333291", "0.6317757", "0.61833197", "0.6168581", "0.61402154", "0.6099104", "0.60972816", "0.60396534", "0.59408134", "0.5917095", "0.58960783", "0.5893593", "0.58041906", "0.5799275", "0.5797473", "0.5755861", "0.5724483", "0.57109827", "0.5671857", "0.567167", "0.56628895", "0.56380534", "0.56301147", "0.5605452", "0.559016", "0.55730015", "0.55678153", "0.55623966", "0.5556659", "0.55409306", "0.5539168", "0.5530818", "0.5529089", "0.5516053", "0.54788107", "0.5476501", "0.5476479", "0.54741085", "0.5471648", "0.54615813", "0.54593414", "0.54366523", "0.5429725", "0.5403028", "0.5402614", "0.5397389", "0.5391002", "0.53747636", "0.53654605", "0.53613335", "0.53548646", "0.53546953", "0.5347886", "0.5335876", "0.53301585", "0.53248215", "0.53203547", "0.5308172", "0.53053844", "0.52858377", "0.52786607", "0.52739227", "0.5268068", "0.52601194", "0.5258555", "0.52579844", "0.52562815", "0.52549446", "0.5254198", "0.5254191", "0.524573", "0.524437", "0.5243343", "0.5241946", "0.52393085", "0.5220266", "0.52141863", "0.52136683", "0.52135175", "0.5213134", "0.5208415", "0.520159", "0.5200075", "0.5182907", "0.5180173", "0.51397914", "0.51373464", "0.5137106", "0.51356417", "0.5129432" ]
0.8249254
0
Returns all direct children of the current node.
Node[] getChildren(Node node);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Node> getChildren() {\r\n\t\t\tchildren.reset();\r\n\t\t\treturn children;\r\n\t\t}", "public Iterator<ParseTreeNode> children() {\r\n if ((_children == null) || (_children.size() == 0)) {\r\n return NULL_ITERATOR;\r\n }\r\n return _children.iterator();\r\n }", "public Node[] getChildren() {\n\t\treturn children.toArray(new Node[0]);\n\t}", "List<Node<T>> children();", "public Vector<GraphicalLatticeElement> getChildren() {\n\t\tVector<GraphicalLatticeElement> children = new Vector<GraphicalLatticeElement>();\n\t\tif (childrenEdges != null)\n\t\t\tfor (int i = 0; i < childrenEdges.size(); i++) {\n\t\t\t\tEdge edge = childrenEdges.elementAt(i);\n\t\t\t\tchildren.add(edge);\n\t\t\t\tchildren.add(edge.getDestination());\n\t\t\t}\n\t\t\n\t\treturn children;\n\t}", "public @NonNull List<@NonNull Node<@Nullable T>> getChildren() {\n return Collections.unmodifiableList(this.children);\n }", "public List<TreeNode> getChildren ()\r\n {\r\n if (logger.isFineEnabled()) {\r\n logger.fine(\"getChildren of \" + this);\r\n }\r\n\r\n return children;\r\n }", "protected final synchronized Iterator<T> children() {\n if( children == null ) {\n children = Collections.emptyList();\n }\n \n return children.iterator();\n }", "public JodeList children() {\n return new JodeList(node.getChildNodes());\n }", "public ArrayList<Node> getChildren() {\n return children;\n }", "public ArrayList<Node> getChildren() { return this.children; }", "public List<PafDimMember> getChildren() {\r\n\t\t\r\n\t\tList<PafDimMember> childList = null;\r\n\t\t\r\n\t\t// If no children are found, return empty array list\r\n\t\tif (children == null) {\r\n\t\t\tchildList = new ArrayList<PafDimMember>();\r\n\t\t} else {\r\n\t\t\t// Else, return pointer to children\r\n\t\t\tchildList = children;\r\n\t\t}\r\n\t\treturn childList;\r\n\t}", "public Node[] getChildren(){\n return children.values().toArray(new Node[0]);\n }", "@Override\n public List<TreeNode<N>> children() {\n return Collections.unmodifiableList(children);\n }", "public ArrayList<Node> getChildren(){\n return children;\n }", "public Node[] getChildren(){return children;}", "public Vector getChildren()\r\n\t{\r\n\t\treturn m_children;\r\n\t}", "@Override\n\tpublic List<Node> chilren() {\n\t\treturn children;\n\t}", "public Enumeration enumerateChildren() {\n return this.children.elements();\n }", "public Vector<Node> getChildren(){\n\t\t Vector<Node> children = new Vector<>(0);\n\t\t Iterator<Link> l= myLinks.iterator();\n\t\t\twhile(l.hasNext()){\n\t\t\t\tLink temp=l.next();\n\t\t\t\tif(temp.getM().equals(currNode))\n\t\t\t\t children.add(temp.getN());\n\t\t\t\tif(temp.getN().equals(currNode))\n\t\t\t\t children.add(temp.getM());\n\t\t\t}\n\t\treturn children;\n\t}", "Collection<DendrogramNode<T>> getChildren();", "public ArrayList<LexiNode> getChilds(){\n\t\treturn childs;\n\t}", "public JodeList children(String nodeName) {\n return this.children().filter(nodeName);\n }", "public List<TreeNode> getChildren() {\n\t\treturn children;\n\t}", "public List<EntityHierarchyItem> children() {\n return this.innerProperties() == null ? null : this.innerProperties().children();\n }", "public Enumeration<Node> children() { return null; }", "@Override\r\n\tpublic List<TreeNode> getChildren() {\n\t\tif(this.children==null){\r\n\t\t\treturn new ArrayList<TreeNode>();\r\n\t\t}\r\n\t\treturn this.children;\r\n\t}", "@Override\n\tpublic TreeNode[] getChildren() {\n\t\treturn this.children ;\n\t}", "public abstract List<Node> getChildNodes();", "public ParseTree[] getChildren() {\n\t\treturn children;\n\t}", "@Nonnull\n Iterable<? extends T> getChildren();", "public Vector getChildren() {\n return this.children;\n }", "public LinkedList<Node> getChildren() { \r\n LinkedList<Node> nodes = new LinkedList<>();\r\n for(int i=0;i<=size;i++)\r\n nodes.add(children[i]);\r\n return nodes;\r\n }", "public java.util.List<BinomialTree<KEY, ITEM>> children()\n\t{\n\t\treturn _children;\n\t}", "public List<TreeNode> getChildrenNodes();", "public List<Element> getChildElements() {\n return getChildNodes().stream().filter(n -> n instanceof Element)\n .map(n -> (Element) n).collect(Collectors.toUnmodifiableList());\n }", "public List<String> children() {\n return this.children;\n }", "public ResultMap<BaseNode> listChildren();", "public List<FileNode> getChildren() {\r\n return this.children;\r\n }", "@JsProperty\n NodeList getChildNodes();", "public Collection<ChildType> getChildren();", "public Collection<VisualLexiconNode> getChildren() {\n \t\treturn children;\n \t}", "@Override\n\tpublic Set<HtmlTag> getChildren()\n\t{\n\t\tImmutableSet.Builder<HtmlTag> childrenBuilder = ImmutableSet.builder();\n\t\tfor(TreeNode<? extends HtmlTag> child : node.getChildren())\n\t\t{\n\t\t\tchildrenBuilder.add(child.getValue());\n\t\t}\n\t\treturn childrenBuilder.build();\n\t}", "private List<SimpleNode> getChildren(SimpleNode node) {\n Class<?> nodeType = node.getClass();\n List<SimpleNode> children = new ArrayList<>();\n for (int i = 0; i < node.jjtGetNumChildren(); i++) {\n children.addAll(flatten(node.jjtGetChild(i), nodeType));\n }\n return children;\n }", "public ArrayList<Node> getChildren() {\n if (children != null) return children;\n children = new ArrayList<>();\n for (Move m : state.getLegalMoves()) {\n Node child = new Node(this, m);\n children.add(child);\n }\n return children;\n }", "@NotNull\n @Override\n public TreeElement[] getChildren() {\n return callChildren(this, navigationItem);\n }", "public SeleniumQueryObject children() {\n\t\treturn ChildrenFunction.children(this, elements);\n\t}", "@DISPID(4)\n\t// = 0x4. The runtime will prefer the VTID if present\n\t@VTID(10)\n\tcom.gc.IList children();", "@NotNull\n public abstract JBIterable<T> children(@NotNull T root);", "public List<NamespaceNode> getChildNodes() {\n return childNodes;\n }", "public Collection<BaseGenerator> \n getChildren() \n {\n return Collections.unmodifiableCollection(pChildren.values());\n }", "public ArrayList getChildren()\n {\n return children;\n }", "public final FxNodeCursor iterateChildren() {\n FxNode n = currentNode();\n if (n == null) throw new IllegalStateException(\"No current node\");\n if (n.isArray()) { // false since we have already returned START_ARRAY\n return new FxArrayCursor((FxArrayNode) n, this);\n }\n if (n.isObject()) {\n return new FxObjectCursor((FxObjNode) n, this);\n }\n throw new IllegalStateException(\"Current node of type \"+n.getClass().getName());\n }", "public XMLElement[] getChildren()\n/* */ {\n/* 532 */ int childCount = getChildCount();\n/* 533 */ XMLElement[] kids = new XMLElement[childCount];\n/* 534 */ this.children.copyInto(kids);\n/* 535 */ return kids;\n/* */ }", "public ListNode[] getChildren(){\n\t\tListNode[] ret = new ListNode[length()];\n\t\tListNode temp = firstNode;\n\t\tfor(int i = 0; i < ret.length && temp != null; i++){\n\t\t\tret[i] = temp;\n\t\t\ttemp = temp.getNextNode();\n\t\t}\n\n\t\treturn ret;\n\t}", "private List<Node<E>> getChildrenForNode(Node<E> node) {\n ArrayList<Node<E>> list = new ArrayList<>();\n for (Node<E> child : node.getChilden()) {\n list.add(child);\n }\n return list;\n }", "public ArrayList<BTreeNode<E>> getChildren() {\n\t\treturn children;\n\t}", "@Override\r\n\tpublic List<Node> getChildren() {\r\n\t\treturn null;\r\n\t}", "public List<String> getChildren() {\n\t\treturn null;\n\t}", "public List<XML2JSONObject> getChildren() {\r\n return _childs;\r\n }", "public static ArrayList<Node> getAllChildren(Node node) {\r\n ArrayList<Node> list = new ArrayList<Node>();\r\n if (node == null)\r\n return list;\r\n\r\n for (Node child = node.getFirstChild(); child != null; child = child.getNextSibling()) {\r\n list.add(child);\r\n }\r\n\r\n return list;\r\n }", "public String[] listChildren()\n/* */ {\n/* 519 */ int childCount = getChildCount();\n/* 520 */ String[] outgoing = new String[childCount];\n/* 521 */ for (int i = 0; i < childCount; i++) {\n/* 522 */ outgoing[i] = getChild(i).getName();\n/* */ }\n/* 524 */ return outgoing;\n/* */ }", "@Override\n public LinkedList<ApfsElement> getChildren() {\n return this.children;\n }", "public ArrayList<Node> getList(){\n \treturn this.children;\n }", "public Enumeration children()\n {\n return new Enumeration(){\n int i = 0;\n public boolean hasMoreElements()\n {\n return i < mChildren.length;\n }\n\n public Object nextElement()\n {\n return mChildren[i++];\n }\n };\n }", "public AST[] getChildren()\r\n {\n \tif (children == null) {\r\n \t\tList<AST> temp = new java.util.ArrayList<AST>();\r\n \t\ttemp.addAll(fields);\r\n \t\ttemp.addAll(predicates);\r\n \t\ttemp.addAll(constructors);\r\n \t\ttemp.addAll(methods);\r\n \t\tchildren = (AST[]) temp.toArray(new AST[0]);\r\n \t}\r\n \treturn children;\r\n }", "public ArrayList<ExpandableListItems_Child> getChildren()\n {\n return children;\n }", "public List<GuiElementBase> getChildren()\n\t\t{ return Collections.unmodifiableList(children); }", "@SuppressWarnings(\"unchecked\")\r\n public synchronized List<TreeNode> getChildrenCopy ()\r\n {\r\n if (logger.isFineEnabled()) {\r\n logger.fine(\"getChildrenCopy of \" + this);\r\n }\r\n\r\n return new ArrayList(children);\r\n }", "public List<RealObject> getChildren();", "public ArrayList<PiptDataElement> getChildren()\n {\n\treturn children;\n }", "public List<ChronologElement> getChildren() {\r\n return children;\r\n }", "public String getChildren() {\n return children;\n }", "public LinkedList<ApfsElement> getChildren() {\n return this.ApfsChildren;\n }", "public List<IContentNode> getChilds(int start, int limit);", "public Iterator<String> listChildren(T node){\n\t\tT target = node;\n\t\tSet<Edge<T,E>> alledges = this.graph.getEdges(target);\n\t\tList<String> children = new ArrayList<String>();\n\t\tfor(Edge<T, E> e : alledges) {\n\t\t\tchildren.add(e.getChild()+\"(\"+e.getName()+\")\");\n\t\t}\n\t\tCollections.sort(children);\n\t\tIterator<String> itr = children.iterator();\n\t\treturn itr;\n\t}", "public java.util.List<Node> getChildren(String... args) throws ChildNotFoundException {\n\t\tjava.util.List<Node> children = new ArrayList<Node>();\n\t\tfor(Node node : selected_nodes) {\n\t\t\ttry {\n\t\t\t\tchildren.addAll(node.getChildren(args));\n\t\t\t} catch (ChildNotFoundException e) {}\n\t\t}\n\t\tif(children.isEmpty()) {\n\t\t\tthrow new ChildNotFoundException(\"No children found with that path\");\n\t\t}\n\t\treturn children;\n\t}", "public Object[] getFilteredChildren() {\n\t\treturn getFilteredChildren(txTableViewer);\n\t}", "public String getChildren() {\n\t\treturn children;\n\t}", "public Human[] getChildren() {\n return children;\n }", "public List<IDirectory> getAllChildDir() {\n return this.children;\n }", "@SuppressWarnings(\"unchecked\")\n public Iterator<Post> getChildren() {\n if(this.resource != null) {\n java.util.List<Resource> childrenList = IteratorUtils.toList(this.resource.getChildren().iterator());\n Iterator<Resource> reverseChildren = new ReverseListIterator(childrenList);\n return ResourceUtil.adaptTo(reverseChildren, Post.class);\n } else {\n return null;\n }\n }", "protected String[] doListChildren()\n {\n return (String[])m_children.toArray( new String[ m_children.size() ] );\n }", "public Iterator<Resource> listChildren() {\n return Collections.<Resource>emptyList().iterator();\n }", "public List<HtmlMap<T>> getChildren()\n\t{\n\t\treturn m_children;\n\t}", "public Vector getChildren() {\n return null;\n }", "abstract public Collection<? extends IZipNode> getChildren();", "public Set<VfsFile> getChildren()\n {\n return children;\n }", "public List<PlanNode> getChildren() {\n return childrenView;\n }", "public List<MagicPattern> getChildren() {\n\t\treturn children;\n\t}", "public static Stream<Node> childNodesOf(@Nonnull final Node node) {\n\t\treturn streamOf(node.getChildNodes());\n\t}", "public List<AST> getChildNodes ();", "@objid (\"808c084f-1dec-11e2-8cad-001ec947c8cc\")\n public final List<GmNodeModel> getChildren() {\n return new ArrayList<>(this.children);\n }", "public ObjectList<DynamicModelPart> getChildren() {\n return this.children;\n }", "public JodeList children(Predicate<Jode> filter) {\n return this.children().filter(filter);\n }", "public List<? extends Resource> getChildren() {\n\t\tLOGGER.debug(\"Get Children \");\n\t\tfinal Iterator<Content> children = content.listChildren().iterator();\n\t\treturn ImmutableList.copyOf(new PreemptiveIterator<SparseMiltonContentResource>() {\n\n\t\t\t\t\tprivate SparseMiltonContentResource resource;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected boolean internalHasNext() {\n\t\t\t\t\t\twhile (children.hasNext()) {\n\t\t\t\t\t\t\tContent n = children.next();\n\t\t\t\t\t\t\tif (n != null) {\n\t\t\t\t\t\t\t\tresource = new SparseMiltonContentResource(n\n\t\t\t\t\t\t\t\t\t\t.getPath(), session, n);\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresource = null;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected SparseMiltonContentResource internalNext() {\n\t\t\t\t\t\treturn resource;\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t}", "public String[] getChildList() {\n if (this.children == null) {\n return this.pointsByChild.keySet().toArray(new String[this.pointsByChild.size()]);\n } else {\n return this.children.clone();\n }\n }", "protected abstract List<T> getChildren();", "public Set<Taxon> getChildren() {\n\t\treturn children;\n\t}", "public List<PlanNode> removeAllChildren() {\n if (this.children.isEmpty()) {\n return new ArrayList<PlanNode>(0);\n }\n List<PlanNode> copyOfChildren = new ArrayList<PlanNode>(this.children);\n for (Iterator<PlanNode> childIter = this.children.iterator(); childIter.hasNext();) {\n PlanNode child = childIter.next();\n childIter.remove();\n child.parent = null;\n }\n return copyOfChildren;\n }" ]
[ "0.735594", "0.73132205", "0.72658867", "0.7254831", "0.72487277", "0.7197666", "0.7164588", "0.7156731", "0.7117548", "0.7099871", "0.7076718", "0.70727277", "0.7027059", "0.6964467", "0.6950562", "0.6932694", "0.6921966", "0.6898111", "0.6895065", "0.6889812", "0.6887624", "0.68561447", "0.68557805", "0.68437076", "0.6827205", "0.68007827", "0.6793587", "0.67823434", "0.67766666", "0.6773175", "0.6749893", "0.67215496", "0.6709675", "0.6709437", "0.66972744", "0.66838485", "0.66827375", "0.66736645", "0.6670223", "0.6659587", "0.6629057", "0.66208637", "0.6591502", "0.6578314", "0.6562507", "0.6546847", "0.6511965", "0.6495772", "0.6494089", "0.64912987", "0.64781594", "0.64742446", "0.64454603", "0.6443354", "0.642961", "0.64281976", "0.64149153", "0.63527405", "0.63520855", "0.6349355", "0.63370466", "0.6322521", "0.632223", "0.6317818", "0.63145477", "0.63031465", "0.62695813", "0.62664366", "0.6263615", "0.6249957", "0.6199201", "0.61984175", "0.6197584", "0.6193919", "0.61896706", "0.6176868", "0.6169041", "0.61668926", "0.6162344", "0.6149883", "0.61445427", "0.61374515", "0.6133118", "0.6121119", "0.61169595", "0.6097906", "0.60962033", "0.6088627", "0.60739887", "0.60696495", "0.60653925", "0.60617435", "0.60477823", "0.60470766", "0.6040227", "0.60238683", "0.6021741", "0.6009183", "0.5977918", "0.59617615" ]
0.6344899
60
/ Node[] filterNode() close the repository/transaction, if the repository is writable this will also commit the changes
void close();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void filter(Node<Context> node) {\n if (node != null && node.parent != null) {\n Node<Context> parent = tree.getNode(node.parent);\n FilterInfo filterInfo = new FilterInfo(parent, node);\n filterStack.add(filterInfo);\n filter(filterInfo);\n tree.openNode(MODEL_BROWSER_ROOT, () -> tree.selectNode(MODEL_BROWSER_ROOT));\n }\n }", "@Override\n public void close()\n {\n GitUtil.release(treeWalk);\n }", "public void filterNodes(String filter) {\n\n\n tree_graphs.getChildren().clear();\n populate(universe, filter, this.showNodes, this.showEdges,\n this.showHyperEdges);\n\n\n tree_nodes.getChildren().clear();\n for (INode node : universe.getNodes()) {\n if (node.getID().contains(filter)) {\n parseNode(node, tree_nodes, filter);\n }\n }\n\n }", "public void commit() {\n\t\ttry {\n\t\t\tTransformer transformer = TransformerFactory.newInstance().newTransformer();\n\t\t\tDOMSource domSource = new DOMSource(document);\n\t\t\tStreamResult streamResult = new StreamResult(new File(fileName));\n\t\t\ttransformer.transform(domSource, streamResult);\n\t\t\t//Reload nodes list\n\t\t\tnodes = document.getDocumentElement().getChildNodes();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic void closeRepository() {\n\t\tif(connection!=null){\n\t\t\ttry {\n\t\t\t\tconnection.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\t\n\n\t}", "@Override\n\tpublic void close() {\n\t\trepository.shutDown();\n\t}", "void nodeUpdated(Node n) throws RepositoryException;", "public void removeNodeFilter (INodeFilter filter);", "public void commit() throws IOException, InterruptedException, InvalidLoadOptionException {\n if (filterColumnToValueMappingForDelete.size() != 0) {\n closeDelete();\n }\n if (filterColumnToValueMappingForUpdate.size() != 0 && !ifRowsDeleted()) {\n closeUpdate();\n }\n }", "void checkpoint(Node node) throws RepositoryException;", "void commit(IDevTree tree, Map options) throws IOException;", "public static void checkinNodes() throws RepositoryException {\n Set<Node> checkedOutNodes = getCheckedoutNodes();\n for (Iterator<Node> itr = checkedOutNodes.iterator(); itr.hasNext(); ) {\n Node element = itr.next();\n JcrVersionUtil.checkin(element);\n itr.remove();\n }\n }", "public void addNodeFilter (INodeFilter filter);", "public void close() throws RemoteException {\r\n tx.commit();\r\n }", "public Record applyMappedFilter()\n {\n Record recOTACodes = new OTACodes(this.getRecordOwner());\n Record recOTACodeTable = ((ReferenceField)recOTACodes.getField(OTACodes.OTA_CODE_TABLE_ID)).getReferenceRecord();\n recOTACodeTable.setKeyArea(OTACodeTable.NAME_CODE_KEY);\n recOTACodes.addListener(new SubFileFilter(recOTACodeTable));\n recOTACodes.addListener(new CompareFileFilter(OTACodes.DELETION_DATE, (String)null, FileListener.EQUALS, null, false));\n recOTACodeTable.getField(OTACodeTable.NAME_CODE).setString(this.getTableNames(false));\n try {\n if (!recOTACodeTable.seek(DBConstants.EQUALS))\n return null; // Error!\n } catch (DBException e) {\n recOTACodes.free(); // Frees both \n e.printStackTrace();\n return null;\n }\n return recOTACodes;\n }", "private void closeDirtyConnection() {\n\t\ttry {\n\t\t\tif (dirtyConnection != null) {\n\t\t\t\tdirtyConnection.close();\n\t\t\t}\n\t\t} catch (DatabaseException e) {\n\t\t} finally {\n\t\t\tdirtyConnection = null;\n\t\t}\n\t}", "@Override\r\n\tpublic void closeMe()\r\n\t{\r\n\t\t// stop listening to node changes\r\n\r\n\t\t// and let the parent close\r\n\t\tsuper.closeMe();\r\n\t}", "public void filter(boolean onRepository, int type) {\r\n\t\t\r\n\t\tList changes = null;\r\n\t\tif (!onRepository) {\r\n\t\t\t// filter from ontChangeTT\r\n\t\t\tchanges = this.ontChanges;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// filter from repChangeTT\r\n\t\t\tchanges = this.repChanges;\t\t\t\r\n\t\t}\r\n\t\t// iterate through changes and remove any that match type\r\n\t\tfor (Iterator iter = new ArrayList(changes).iterator(); iter.hasNext();) {\r\n\t\t\tSwoopChange swc = (SwoopChange) iter.next();\r\n\t\t\tif (swc.isRedundant && type==this.REDUNDANT_CHANGE) changes.remove(swc);\r\n\t\t\telse if (swc.isOnRepository && type==this.REPOSITORY_CHANGE) changes.remove(swc);\r\n\t\t\telse if (!swc.isOnRepository && type==this.LOCAL_CHANGE) changes.remove(swc);\r\n\t\t}\r\n\t\t\r\n\t\t// sort changes??\r\n\t\t\r\n\t\t// refresh UI of target after adding changes\r\n\t\tif (!onRepository) this.refreshOntTreeTable();\r\n\t\telse {\r\n\t\t\t// add (new) repChanges to newCommit node directly\r\n\t\t\tnewCommitNode.children = new Vector();\r\n\t\t\tfor (Iterator iter = changes.iterator(); iter.hasNext();) {\r\n\t\t\t\tSwoopChange swc = (SwoopChange) iter.next();\r\n\t\t\t\tTreeTableNode swcNode = new TreeTableNode(swc);\r\n\t\t\t\tnewCommitNode.addChild(swcNode);\t\r\n\t\t\t}\r\n\t\t\tthis.refreshRepTreeTable(true);\r\n\t\t}\t\t\r\n\t}", "public void close() {\n if( nodeDepth != 0 ) throw new IllegalStateException( \"There are still open nodes\" );\n \n out.println( \"</map>\" );\n out.flush();\n out.close();\n }", "public static void compressFilteredRepository(Repository repo, boolean filter) {\n // Get a temporary root for the compressed repository\n RepoFile newRoot = RepoFile.make(new File(FileUtils.getTempDir(), \"newRoot\"));\n \n logger.info(\"Beginning filtered repository compression...\");\n int count = 0;\n int total = repo.getProjectCount();\n Random random = null;\n double max = REPO_SUBSET_RATE.getValue();\n if (filter) {\n random = new Random();\n }\n // Go through every project and compress it\n for (RepoProject project : repo.getProjects()) {\n // Make sure the project has at least one file\n IFileSet files = project.getFileSet();\n if (files.getJavaFileCount() > 0 && (!filter || (random.nextDouble() < max))) {\n logger.info(\"Processing project \" + ++count + \" of \" + total);\n ZipOutputStream zos = null;\n try {\n zos = new ZipOutputStream(new FileOutputStream(newRoot.rebaseFile(project.getProjectRoot()).getChildFile(\"project.zip\")));\n// zos.setLevel(9);\n // Add the properties file\n FileInputStream fis = null;\n // Messy, but only want the entire writing to fail if the output stream has issues\n try {\n fis = new FileInputStream(project.getProperties().toFile());\n } catch (IOException e) {\n logger.log(Level.SEVERE, \"Unable to open file: \" + project.getProperties().toString(), e);\n fis = null;\n }\n if (fis != null) {\n try {\n zos.putNextEntry(new ZipEntry(project.getProperties().getName()));\n FileUtils.writeStreamToStream(fis, zos);\n } finally {\n FileUtils.close(fis);\n }\n // Add the individual files\n for (IJavaFile file : files.getFilteredJavaFiles()) {\n RepoFile rFile = file.getFile();\n try {\n fis = new FileInputStream(rFile.toFile());\n } catch (IOException e) {\n logger.log(Level.SEVERE, \"Unable to open file: \" + rFile.toString());\n }\n if (fis != null) {\n try {\n zos.putNextEntry(new ZipEntry(\"content/\" + rFile.getRelativePath()));\n FileUtils.writeStreamToStream(fis, zos);\n } finally {\n FileUtils.close(fis);\n }\n }\n }\n }\n } catch (IOException e) {\n logger.log(Level.SEVERE, \"Unable to write project zip.\", e);\n } finally {\n FileUtils.close(zos);\n }\n } else {\n logger.info(\"Skipping project \" + ++count + \" of \" + total);\n }\n }\n \n // Compress the repository\n FileUtils.zipFile(newRoot.toFile(), COMPRESSED_FILTERED_REPO_FILE.asOutput());\n \n // Clean temp files\n FileUtils.cleanTempDir();\n }", "@Override\n\tpublic void commit() {\n\n\t}", "public synchronized void fecharRepositorio(){\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif( diretorioEmMemoria != null){\r\n\t\t\t\tdiretorioEmMemoria.close();\r\n\t\t\t\tdiretorioEmMemoria = null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif( diretorioEmDisco != null){\r\n\t\t\t\tdiretorioEmDisco.close();\r\n\t\t\t\tdiretorioEmDisco = null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public abstract boolean manipulateRepositories();", "void filterChanged(String filter) {\n if (filter.isEmpty()) {\n treeView.setRoot(rootTreeItem);\n } else {\n TreeItem<FilePath> filteredRoot = createTreeRoot();\n filter(rootTreeItem, filter, filteredRoot);\n treeView.setRoot(filteredRoot);\n }\n }", "void readOnlyTransaction();", "private static synchronized void writeTransaction( StmTransaction transaction ) {\n\n // Check for conflicts.\n for ( AbstractVersionedItem versionedItem : transaction.versionedItemsRead ) {\n versionedItem.ensureNotWrittenByOtherTransaction();\n }\n\n // Set the revision number to a committed value.\n transaction.targetRevisionNumber.set( lastCommittedRevisionNumber.incrementAndGet() );\n\n }", "public void writeNode(BTreeNode node) throws IOException {\n\t\tif (useCache) {\n\t\t\tif (cache.indexOf(node) == -1) {\n\t\t\t\tcache.add(node);\n\t\t\t}\n\t\t} else {\n\t\t\tfile.write(node);\n\t\t}\n\t}", "public void commit() {\n\t\tif (commit) {\n\t\t\t// Récupérer le path du JSON\n\t\t\tSystem.out.println(ClassLoader.getSystemResource(jsonFile));\n\t\t\tURL url = ClassLoader.getSystemResource(jsonFile);\n\t\t\t// On ouvre un flux d'écriture vers le fichier JSON\n\t\t\ttry (OutputStream ops = new FileOutputStream(Paths.get(url.toURI()).toFile())) {\n\t\t\t\t// Ecriture du fichier JSON avec formatage\n\t\t\t\t// (WithDefaultPrettyPrinter)\n\t\t\t\tobjectMapper.writerWithDefaultPrettyPrinter().writeValue(ops, database);\n\t\t\t\tlogger.info(\"OK - fichier JSON mis à jour \" + jsonFile);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tlogger.info(\"KO - FILE_NOT_FOUND\" + jsonFile);\n\t\t\t\tthrow new DataRepositoryException(\"KO - FILE_NOT_FOUND\", e);\n\t\t\t} catch (IOException e) {\n\t\t\t\tlogger.info(\"KO - I/O ERROR\" + jsonFile);\n\t\t\t\tthrow new DataRepositoryException(\"KO - I/O ERROR\", e);\n\t\t\t} catch (URISyntaxException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void commitTx() {\n \n }", "@Override\n public void commit() {\n }", "public synchronized void close() throws IOException {\n\t\tif (journalWriter == null) {\n\t\t\treturn; // already closed\n\t\t}\n\t\tfor (Entry entry : new ArrayList<Entry>(lruEntries.values())) {\n\t\t\tif (entry.currentEditor != null) {\n\t\t\t\tentry.currentEditor.abort();\n\t\t\t}\n\t\t}\n\t\ttrimToSize();\n\t\tjournalWriter.close();\n\t\tjournalWriter = null;\n\t}", "protected void openRemove(AlssLrtaSearchNode node)\n {\n //If not null\n if(node!=null)\n {\n //If the node exists in open\n AlssLrtaSearchNode alsn = this.open_id.get(node.getNode().getId());\n if(alsn == null)\n return;\n //Remove the node from open_time\n MaAlssLrtaSearchNode maNode = (MaAlssLrtaSearchNode)node;\n Map<Integer,AlssLrtaSearchNode> set = this.open_time.get(node.getNode().getId());\n set.remove(maNode.getTime());\n\n //If this node was the last one in the map\n if(set.size() ==0) {\n this.open_time.remove(node.getNode().getId());\n //Remove from others\n super.openRemove(node);\n return;\n }\n\n\n //If the node is the node of the open_id - replace it\n if(((MaAlssLrtaSearchNode)alsn).getTime() == ((MaAlssLrtaSearchNode)node).getTime())\n {\n //Remove from others\n super.openRemove(node);\n\n for(AlssLrtaSearchNode node2: set.values())\n {\n this.open_id.put(node2.getNode().getId(),node2);\n return;\n }\n\n }\n super.openRemoveNoId(node);\n\n }\n\n }", "@Override\n abstract public void commitPendingXmlChanges();", "public synchronized void close(boolean suspend) throws RepositoryException {\r\n if (mState == SUSPENDED) {\r\n // If suspended, attempting to close again will likely deadlock.\r\n return;\r\n }\r\n\r\n if (suspend) {\r\n for (TransactionScope<?> scope : mAllScopes.keySet()) {\r\n // Lock scope but don't release it. This prevents other threads\r\n // from beginning work during shutdown, which will likely fail\r\n // along the way.\r\n scope.getLock().lock();\r\n }\r\n }\r\n\r\n mState = suspend ? SUSPENDED : CLOSED;\r\n\r\n for (TransactionScope<?> scope : mAllScopes.keySet()) {\r\n scope.close();\r\n }\r\n\r\n mAllScopes.clear();\r\n mLocalScope.remove();\r\n }", "public void writeNode() throws IOException {\n // seek to end of file\n file.seek(offset);\n // write offset data\n file.writeLong(offset);\n // write numKeys data\n file.writeLong(numKeys);\n // write children offset\n for (int i = 0; i < children.length; i++){\n file.writeLong(children[i]);\n }\n // write key data\n for (int i = 0; i < keys.length; i++){\n if (keys[i] == null){\n file.writeLong(-1);\n file.writeInt(0);\n }\n else{\n file.writeLong(keys[i].getKey());\n file.writeInt(keys[i].getFrequency());\n }\n }\n\n //The node has been updated -- move it to the front of the cache\n if (cache != null){\n cache.addObject(this);\n }\n\n\n }", "public Object visit(ProcessInstanceFilter filter, Object context)\n {\n if (filter.isIncludingSubprocesses())\n {\n return new Node(new HashSet(filter.getOids()), null);\n }\n else\n {\n return new Node(null, new HashSet(filter.getOids()));\n }\n }", "void flushBf()\n {\n if (components.contains(Component.FILTER))\n {\n File path = descriptor.fileFor(Component.FILTER);\n try (SeekableByteChannel fos = Files.newByteChannel(path.toPath(), StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING, StandardOpenOption.WRITE);\n DataOutputStreamPlus stream = new BufferedDataOutputStreamPlus(fos))\n {\n // bloom filter\n BloomFilter.serializer.serialize((BloomFilter) bf, stream);\n stream.flush();\n SyncUtil.sync((FileChannel) fos);\n }\n catch (IOException e)\n {\n throw new FSWriteError(e, path);\n }\n }\n }", "private NodeRecordFilter makeNodeNameFilterHandler() {\n\t\tfinal WindowReference windowReference = _mainWindowReference;\n\t\t\n\t\tfinal JTextField nodeFilterField = (JTextField)windowReference.getView( \"NodeFilterField\" );\n\t\tfinal NodeRecordNameFilter nameFilter = new NodeRecordNameFilter();\n\t\t\n\t\tfinal FreshProcessor nodeFilterProcessor = new FreshProcessor();\n\t\tnodeFilterField.getDocument().addDocumentListener( new DocumentListener() {\n\t\t\t public void changedUpdate( final DocumentEvent event ) {\n\t\t\t\t\tnodeFilterProcessor.post( new NodeNameFilterOperation( nodeFilterField.getText(), nameFilter) );\n\t\t\t }\n\t\t\t public void insertUpdate( final DocumentEvent event ) {\n\t\t\t\t\tnodeFilterProcessor.post( new NodeNameFilterOperation( nodeFilterField.getText(), nameFilter) );\n\t\t\t }\n\t\t\t public void removeUpdate( final DocumentEvent event ) {\n\t\t\t\t\tnodeFilterProcessor.post( new NodeNameFilterOperation( nodeFilterField.getText(), nameFilter) );\n\t\t\t }\n\t\t});\n\t\t\n\t\t\n\t\tfinal JButton clearButton = (JButton)windowReference.getView( \"NodeNameFilterClearButton\" );\n\t\tclearButton.addActionListener( new ActionListener() {\n\t\t\tpublic void actionPerformed( final ActionEvent event ) {\n\t\t\t\tnodeFilterField.setText( \"\" );\n\t\t\t}\n\t\t});\n\t\t\n\t\treturn nameFilter;\n\t}", "public void commit () throws IOException {\n log.info(\"Internal committing index ... \");\n this.writer().commit();\n commitCounter = 0;\n this.closeReader();\n }", "private void commitTransaction(GraphTraversalSource g) {\n if (graphFactory.isSupportingTransactions()) {\n g.tx().commit();\n }\n }", "void commit() {\r\n tx.commit();\r\n tx = new Transaction();\r\n }", "public Buffer execute(Transaction tx) {\n if (!isRunAllowed()) {\n return null;\n }\n\n SortedIndex<Buffer, Buffer> index = hawtDBFile.getRepositoryIndex(tx, repositoryName, false);\n if (index == null) {\n return null;\n }\n\n Iterator<Map.Entry<Buffer, Buffer>> it = index.iterator();\n // scan could potentially be running while we are shutting down so check for that\n while (it.hasNext() && isRunAllowed()) {\n Map.Entry<Buffer, Buffer> entry = it.next();\n Buffer keyBuffer = entry.getKey();\n\n String key;\n try {\n key = codec.unmarshallKey(keyBuffer);\n } catch (IOException e) {\n throw new RuntimeException(\"Error unmarshalling key: \" + keyBuffer, e);\n }\n if (key != null) {\n LOG.trace(\"getKey [{}]\", key);\n keys.add(key);\n }\n }\n return null;\n }", "public void testIsCheckedOut() throws RepositoryException, NotExecutableException {\n Node n = testRootNode.addNode(nodeName1);\n NodeImpl testNode = (NodeImpl) n.addNode(nodeName2);\n testRootNode.save();\n\n Principal principal = getReadOnlyPrincipal(getHelper());\n changeReadPermission(principal, n, false);\n changeReadPermission(principal, testNode, true);\n\n Session readOnly = getHelper().getReadOnlySession();\n try {\n NodeImpl tn = (NodeImpl) readOnly.getItem(testNode.getPath());\n assertTrue(tn.isCheckedOut());\n\n n.addMixin(mixVersionable);\n testRootNode.save();\n n.checkin();\n\n assertFalse(tn.isCheckedOut());\n } finally {\n readOnly.logout();\n // reset the denied read-access\n n.checkout();\n changeReadPermission(principal, n, true);\n }\n }", "@Transactional\n public abstract void updateNode(OnmsNode node);", "public boolean commit() {\n\t\tif (blocks.size() <= 1) return false;\n\n\t\tHashMap<String, Integer> pairMap = new HashMap<String, Integer>();\n\t\tHashMap<Integer, Integer> countMap = new HashMap<Integer, Integer>();\n\n\t\tListIterator<Transaction> iterator = blocks.listIterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tTransaction block = iterator.next();\n\t\t\tpairMap.putAll((Map<? extends String, ? extends Integer>) block.getNameValue());\n\t\t}\n\n\t\tfor (Entry<String, Integer> entry : pairMap.entrySet()) {\n\t\t\tInteger value = entry.getValue();\n\t\t\tif(countMap.get(value) == null){\n\t\t\t\tcountMap.put(value, new Integer(1));\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcountMap.put(value, new Integer(countMap.get(value) + 1));\n\t\t\t}\n\t\t\tpairMap.put(entry.getKey(),entry.getValue());\n\t\t}\t\t\n\n\t\tblocks = new LinkedList<Transaction>();\n\t\tblocks.add(new Transaction(pairMap, countMap));\n\n\t\treturn true;\n\t}", "public Jode single(Predicate<Jode> filter) {\n return children().single(filter);\n }", "public Document commitEditableInstance()\n throws WorkflowException, MappingException, RepositoryException, RemoteException;", "public void commit() {\n\t\tcommitted = true;\n\t}", "void processAfterLocking(MutableCachedNode modifiedNode,\n SaveContext context) throws Exception;", "@Override\n public abstract void apply(PersistentFileTransaction transaction);", "public void treeClosed(SrvSession sess, TreeConnection tree) {\n }", "public void commitTransactionBlock() throws SQLException {\n masterNodeConnection.commit();\n masterNodeConnection.setAutoCommit(true);\n }", "public void transactionComplete(TransactionId tid, boolean commit)\n throws IOException {\n // some code goes here\n // not necessary for proj1\n\n \t\n \t//commit, flush the pages\n \tif(commit){\n \t\tfor(PageId pageId : bufferedPages.keySet()){\n \t\t\tPage page = bufferedPages.get(pageId).page;\n \t\t\t//dirty page\n \t\t\tif(page.isDirty() != null && tid.equals(page.isDirty())){\n \t\t\t\tflushPage(pageId);\n \t\t\t\tpage.setBeforeImage();\n \t\t\t}\n\n if (page.isDirty() == null) {\n page.setBeforeImage();\n }\n \t\t\t\n \t\t}\n \t}\n \telse{\n \t\tfor(PageId pageId : bufferedPages.keySet()){\n \t\t\tPage page = bufferedPages.get(pageId).page;\n \t\t\t//dirty page, revert changes\n \t\t\tif(page.isDirty() != null && tid.equals(page.isDirty())){\n \t\t\t\tNode n = bufferedPages.get(pageId);\n \t\t\t\tn.page = page.getBeforeImage();\n \t\t\t\tbufferedPages.put(pageId, n);\n // updateLruWithNewNode(pageId, page.getBeforeImage());\n \t\t\t}\n \t\t\t\n \t\t}\n \t}\n \t\n \t//release the lock\n \tlockManager.releaseAllTransactionLocks(tid);\n \tcurrentTransactions.remove(tid);\n \t\n }", "public void commit();", "public void filterEdges(String filter) {\n\n\n tree_graphs.getChildren().clear();\n populate(universe, filter, this.showNodes, this.showEdges,\n this.showHyperEdges);\n\n\n tree_edges.getChildren().clear();\n for (IEdge edge : universe.getEdges()) {\n if (edge.toString().contains(filter)) {\n parseEdge(edge, tree_edges, filter);\n }\n }\n\n }", "void execute(final ReadWriteTransaction readWriteTransaction);", "Ack saveFilter(ID branchId, boolean shared, String name, String type, JsonNode parameters);", "@Override\n public synchronized boolean deleteNode(Node n){\n if((n.getNodes().size() > 0)) {\n return false;\n }\n //delete all node-tags\n for(Tag t : n.getTags()){\n removeNodeTag(n,t);\n }\n boolean dbResult = dbHandler.deleteNode(n.getID());\n if(dbResult) {\n this.allNodes.remove(n);\n return true;\n }\n else {\n return false;\n }\n }", "public void closeTransaction(){\n\t\ttr.rollback();\n\t\ttr = null;\n\t}", "public static void close() {\n HashMap<String, Transaction> map = instance.getTransactions();\n for (Transaction transaction : map.values()) {\n transaction.destroy();\n }\n map.clear();\n instance.transactions.remove();\n }", "public void commit() {\n }", "protected final void closeStream(SrvSession sess, TreeConnection tree, NetworkFile stream)\n throws IOException {\n\n // Debug\n \n if ( Debug.EnableInfo && hasDebug())\n Debug.println(\"DB closeStream() file=\" + stream.getFullName() + \", stream=\" + stream.getStreamName() +\n \", fid/stid=\" + stream.getFileId() + \"/\" + stream.getStreamId());\n \n // Access the JDBC context\n\n DBDeviceContext dbCtx = (DBDeviceContext) tree.getContext();\n\n // Close the file\n\n dbCtx.getFileLoader().closeFile(sess, stream);\n\n // Access the JDBC file\n \n DBNetworkFile jdbcFile = null;\n \n if ( stream instanceof DBNetworkFile) {\n \n // Access the JDBC file\n \n jdbcFile = (DBNetworkFile) stream;\n\n // Decrement the open file count\n \n FileState fstate = jdbcFile.getFileState();\n\n // Check if the file state is valid, if not then check the main file state cache\n\n if ( fstate == null) {\n \n // Check the main file state cache\n \n fstate = getFileState(stream.getFullName(), dbCtx, false);\n }\n else {\n \n // Decrement the open file count for this file\n \n fstate.decrementOpenCount();\n }\n\n // Check if we have a valid file state\n \n if ( fstate != null) {\n \n // Update the cached file size\n \n FileInfo finfo = (FileInfo) fstate.findAttribute(FileState.FileInformation);\n if ( finfo != null && stream.getWriteCount() > 0) {\n \n // Update the file size\n \n finfo.setSize(jdbcFile.getFileSize());\n \n // Update the modified date/time\n \n finfo.setModifyDateTime(jdbcFile.getModifyDate());\n\n // DEBUG\n \n if ( Debug.EnableInfo && hasDebug())\n Debug.println(\" Stream size=\" + jdbcFile.getFileSize() + \", modifyDate=\" + jdbcFile.getModifyDate());\n }\n }\n }\n else\n Debug.println(\"closeFile() Not DBNetworkFile file=\" + stream);\n \n // Check if the stream was opened for write access, if so then update the stream size\n \n if ( stream.getGrantedAccess() != NetworkFile.READONLY && stream.isDirectory() == false &&\n stream.getWriteCount() > 0) {\n \n // DEBUG\n \n if ( Debug.EnableInfo && hasDebug())\n Debug.println(\" Update stream size=\" + stream.getFileSize());\n \n // Get the current date/time\n \n long modifiedTime = 0L;\n if ( stream.hasModifyDate())\n modifiedTime = stream.getModifyDate();\n else\n modifiedTime = System.currentTimeMillis();\n\n // Check if the modified time is earlier than the file creation date/time\n \n if ( stream.hasCreationDate() && modifiedTime < stream.getCreationDate()) {\n \n // Use the creation date/time for the modified date/time\n \n modifiedTime = stream.getCreationDate();\n \n // DEBUG\n \n if ( Debug.EnableInfo && hasDebug())\n Debug.println(\"Close stream using creation date/time for modified date/time\");\n }\n \n // Update the in-memory stream information\n \n FileState parent = getFileState(stream.getFullName(), dbCtx, false);\n StreamInfo sInfo = null;\n \n if ( parent != null) {\n \n // Check if the stream list has been loaded\n \n StreamInfoList streamList = loadStreamList(parent, null, dbCtx, false);\n if ( streamList != null) {\n \n // Find the stream information\n \n sInfo = streamList.findStream(stream.getStreamName());\n if ( sInfo != null) {\n \n // Update the stream size\n \n sInfo.setSize(stream.getFileSize());\n \n // DEBUG\n \n if ( Debug.EnableInfo && hasDebug())\n Debug.println(\"Updated stream file size\");\n }\n }\n }\n\n // Update the file details for the file stream in the database\n \n try {\n\n // Check if the file strea, details are valid\n \n if ( sInfo == null) {\n \n // Create the stream information\n \n sInfo = new StreamInfo();\n \n sInfo.setSize(stream.getFileSize());\n sInfo.setStreamId(stream.getStreamId());\n }\n \n // Set the modify date/time for the stream\n \n sInfo.setModifyDateTime(System.currentTimeMillis());\n\n // Update the stream details\n \n dbCtx.getDBInterface().setStreamInformation(stream.getDirectoryId(), stream.getFileId(), stream.getStreamId(), sInfo);\n }\n catch (DBException ex) {\n }\n }\n }", "public void testNodeRemoved() throws Exception\n {\n final CountDownLatch readerCanRead = new CountDownLatch(1);\n final CountDownLatch readerDone = new CountDownLatch(1);\n final CountDownLatch writerDone = new CountDownLatch(1);\n\n cache.put(FQN, KEY, VALUE);\n assertEquals(VALUE, cache.get(FQN, KEY));\n\n // start a writer thread and a transaction\n\n Thread writerThread = new Thread(new Runnable()\n {\n public void run()\n {\n try\n {\n TransactionManager tx = startTransaction();\n\n // change VALUE in a transaction\n cache.removeNode(FQN);\n\n // notify the reading thread\n readerCanRead.countDown();\n\n readerDone.await();\n\n tx.commit();\n }\n catch (AssertionError e)\n {\n writerError = e;\n }\n catch (Throwable t)\n {\n t.printStackTrace();\n writerFailed = true;\n }\n finally\n {\n readerCanRead.countDown();\n writerDone.countDown();\n }\n }\n }, \"WRITER\");\n writerThread.start();\n\n try\n {\n // wait until the writer thread changes the value in a transaction,\n // but it did not yet commit or roll back.\n readerCanRead.await();\n\n // I shouldn't be able to see the \"dirty\" value\n assertEquals(\"2nd thread cannot see uncommitted changes\", VALUE, cache.get(FQN, KEY));\n }\n catch (TimeoutException good)\n {\n // ignore; means worked as it should\n }\n finally\n {\n readerDone.countDown();\n }\n\n // wait for the writer to finish\n writerDone.await();\n\n assertNull(\"Node was removed\", cache.getNode(FQN));\n\n // If any assertion failed, throw on the AssertionFailedError\n\n if (writerError != null)\n {\n throw writerError;\n }\n\n if (writerFailed)\n {\n fail(\"The writer thread exited incorrectly. Watch the log for previous stack traces\");\n }\n\n }", "public GlBuffer commit(){\n return commit(true);\n }", "private void persistUserDataIfNeeded() throws IOException {\n int amountdatasets = 0;\n for (Transaction t : buffer) {\n amountdatasets += t.getDatasets().size();\n }\n //more than 5 datasets in write buffer --> write committed transactions\n if (amountdatasets >= 5) {\n Set<Transaction> todelete = new HashSet<>();\n\n //only one thread at a time should enter this block\n synchronized (this) {\n// System.out.println(\"thread \" + Thread.currentThread().getId() + \" entered persistUserDataIfNeeded sync block\");\n for (Transaction t : buffer) {\n if (t.isCommitted()) {\n for (UserData data : t.getDatasets()) {\n persistData(data);\n }\n todelete.add(t);\n }\n }\n\n //here the deletion happens. Comment out if Abnahme is n�rgeling... :)\n for (Transaction t : todelete) {\n System.out.println(\"removing transaction \" + t.getId() + \" from buffer\");\n buffer.remove(t);\n }\n// System.out.println(\"thread \" + Thread.currentThread().getId() + \" left persistUserDataIfNeeded sync block\");\n }\n }\n }", "R commit(C change);", "private void updateToFile(PQNode node) throws Exception{\n List<PQNode> nodes = retrieveWholeFile(node.getPqIndex());\n int replaceIndex = node.getPqIndex()-bufStart;\n\n nodes.set(replaceIndex,node);\n int fileId = (node.getPqIndex()-1)/ENTRY_BLOCK_SIZE;\n File file = new File(DIRECTORY + getMapFileName(NAME_PATTERN, fileId));\n storeToFile(file,nodes, false);\n }", "@Override\n\tpublic int commit() {\n\t\treturn 0;\n\t}", "private Object writeReplace () {\n return new java.io.Serializable () {\n /** serial version UID */\n static final long serialVersionUID=-3874531277726540941L;\n\n private void writeObject (ObjectOutputStream oos) throws IOException {\n TopManager.getDefault ().getRepository ().writeExternal (oos);\n }\n\n private void readObject (ObjectInputStream ois)\n throws IOException, ClassNotFoundException {\n TopManager.getDefault ().getRepository ().readExternal (ois);\n }\n\n /** @return the default pool */\n public Object readResolve () {\n return TopManager.getDefault ().getRepository ();\n }\n };\n }", "@Override\n public void close() throws IOException {\n flushCurrentIndexBlock();\n\n // logger.info(\"Performing final merge\");\n // try {\n //Bin finalMergeBin = geometricParts.getAllShards();\n //doMerge(finalMergeBin, getNextIndexShardFolder(finalMergeBin.size + 1));\n // check point is updated by the merge op.\n\n // } catch (IOException ex) {\n // Logger.getLogger(GeometricRetrieval.class.getName()).log(Level.SEVERE, null, ex);\n //}\n\n }", "private void close() {\n\t\t\tassert this.sendLock.writeLock().isHeldByCurrentThread();\n\t\t\tthis.dead = true;\n\t\t\tStoreRequest s = writesByRows.remove(this.row);\n\t\t\t// This request was THE only request for its row\n\t\t\tassert this == s;\n\t\t\tlogger.fine(this.toString() + \" sent on \" + new Date(System.currentTimeMillis()) + \" and not replanned\");\n\t\t}", "public JodeList children(Predicate<Jode> filter) {\n return this.children().filter(filter);\n }", "public void commit() {\n doCommit();\n }", "public void commitChanges()\n {\n }", "@Override\n public void abortTx() {\n \tfor (VBox vbox : overwrittenAncestorWriteSet) {\n \t // revert the in-place entry that had overwritten\n \t vbox.inplace = vbox.inplace.next;\n \t}\n \n this.orec.version = OwnershipRecord.ABORTED;\n for (OwnershipRecord mergedLinear : linearNestedOrecs) {\n mergedLinear.version = OwnershipRecord.ABORTED;\n }\n \tfor (ParallelNestedTransaction mergedTx : mergedTxs) {\n \t mergedTx.orec.version = OwnershipRecord.ABORTED;\n \t}\n \t\n\t// give the read set arrays, which were used exclusively by this nested or its children, back to the thread pool\n\tCons<VBox[]> parentArrays = this.getRWParent().bodiesRead;\n\tCons<VBox[]> myArrays = this.bodiesRead;\n\twhile (myArrays != parentArrays) {\n\t returnToPool(myArrays.first());\n\t myArrays = myArrays.rest();\n\t}\n\t\n \tbodiesRead = null;\n \tboxesWritten = null;\n \tboxesWrittenInPlace = null;\n \tperTxValues = null;\n \toverwrittenAncestorWriteSet = null;\n \tmergedTxs = null;\n \tlinearNestedOrecs = null;\n \tcurrent.set(this.getParent());\n }", "public void resetStore() {\n try {\n db.close();\n uncommited = null;\n uncommitedDeletes = null;\n autoCommit = true;\n bloom = new BloomFilter();\n utxoCache = new LRUCache(openOutCache, 0.75f);\n } catch (IOException e) {\n log.error(\"Exception in resetStore.\", e);\n }\n\n File f = new File(filename);\n if (f.isDirectory()) {\n for (File c : f.listFiles())\n c.delete();\n }\n openDB();\n }", "public void floodTransaction(Transaction tx){\n // Perform checks\n if(!isTransactionOnBlockchain(tx)){\n if(!areOutputsSpent(tx)){\n if(!isTransactionAlreadySeen(tx)){\n // Add to this nodes transactions\n allTransactions.add(tx);\n\n // If enough transaction are present to mine a block do so\n if(allTransactions.size() == BLOCK_SIZE){\n // Create a new block using the hash from the last block on the current blockchain\n Block blockToAdd = new Block(currentBlockchain.blockChain.get(currentBlockchain.blockChain.size()-1).hash);\n\n // For each transaction this node has seen, add it to the block\n for (Transaction transaction : allTransactions) {\n blockToAdd.addTransaction(transaction);\n }\n \n\n // Mine the block and add it to the current blockchain\n if (blockToAdd.mineBlock(Blockchain.DIFFICULTY)){\n currentBlockchain.blockChain.add(blockToAdd);\n }\n \n // Remove transactions in block from other nodes transaction list\n for(Iterator<Transaction> iterator = allTransactions.iterator();iterator.hasNext();){\n Transaction t = iterator.next();\n iterator.remove();\n }\n \n \n }\n\n // Relay to other nodes\n for (Node node : nearbyNodes) {\n node.floodTransaction(tx);\n }\n }\n }\n }\n }", "void commit();", "void commit();", "public void forceCommitTx()\n{\n}", "public void close() {\n if (stmt == null) {\n return;\n }\n\n try {\n commit();\n } catch (HandledException ex) {\n Exceptions.ignore(ex);\n }\n\n safeClose();\n context.unregister(this);\n }", "private void filter(TreeItem<FilePath> root, String filter, TreeItem<FilePath> filteredRoot) {\n\n for (TreeItem<FilePath> child : root.getChildren()) {\n\n TreeItem<FilePath> filteredChild = new TreeItem<>(child.getValue());\n filteredChild.setExpanded(true);\n\n filter(child, filter, filteredChild);\n\n if (!filteredChild.getChildren().isEmpty() || isMatch(filteredChild.getValue(),\n filter)) {\n filteredRoot.getChildren().add(filteredChild);\n }\n\n }\n }", "@Test\r\n\tpublic void testCommit()\r\n\t\tthrows Exception\r\n\t{\r\n\t\ttry{\r\n\t\t\ttestAdminCon.begin();\r\n\t\t\ttestAdminCon.add(john, email, johnemail,dirgraph);\r\n\t\r\n\t\t\tassertTrue(\"Uncommitted update should be visible to own connection\",\r\n\t\t\t\t\ttestAdminCon.hasStatement(john, email, johnemail, false, dirgraph));\r\n\t\t\tassertFalse(\"Uncommitted update should only be visible to own connection\",\r\n\t\t\t\t\ttestReaderCon.hasStatement(john, email, johnemail, false, dirgraph));\r\n\t\t\tassertThat(testWriterCon.size(), is(equalTo(0L)));\r\n\t\r\n\t\t\ttestAdminCon.commit();\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tlogger.debug(e.getMessage());\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\tif(testAdminCon.isActive())\r\n\t\t\t\ttestAdminCon.rollback();\r\n\t\t}\r\n\t\tassertThat(testWriterCon.size(), is(equalTo(1L)));\r\n\t\tassertTrue(\"Repository should contain statement after commit\",\r\n\t\t\t\ttestAdminCon.hasStatement(john, email, johnemail, false, dirgraph));\r\n\t\tassertTrue(\"Committed update will be visible to all connection\",\r\n\t\t\t\ttestReaderCon.hasStatement(john, email, johnemail, false, dirgraph));\r\n\t}", "void commit() {\n }", "public void close() throws IOException, InterruptedException {\n closeTxnBatch();\n closeConnection();\n closed = true;\n }", "public void commit() {\n tryCommit(true);\n }", "public static void ensureCheckoutNode(Node n) {\n try {\n if (!n.isCheckedOut() || (n.isNew() && !checkedOutNodes.get().contains(n))) {\n log.debug(\"***** checking out node: {}\", n);\n }\n \n // Checking out an already checked-out node is a no-op.\n JcrVersionUtil.checkout(n);\n checkedOutNodes.get().add(n);\n } catch (RepositoryException e) {\n throw new MetadataRepositoryException(\"Unable to checkout node: \" + n, e);\n }\n }", "public void openTheTransaction() {\n openTransaction();\n }", "public void testUnlockFile() throws Exception {\n System.out.print(\".. Testing giving up a lock on a file ..\");\n String filesystem = \"VSS \" + workingDirectory + File.separator + \"Work\";\n Node filesystemNode = new Node(new ExplorerOperator().repositoryTab().getRootNode(), filesystem);\n Node testNode = new Node( filesystemNode, \"test [Current]\");\n Node B_FileNode = new Node( filesystemNode, \"test [Current]|B_File [Current]\");\n new Action(VERSIONING_MENU + \"|\" + CHECK_OUT, CHECK_OUT).perform(B_FileNode);\n Thread.sleep(2000);\n new Action(VERSIONING_MENU + \"|\" + REFRESH, REFRESH).perform(testNode); // Until issue #27726 gets fixed.\n B_FileNode = new Node( filesystemNode, \"test [Current]|B_File [Current] (\" + userName + \")\");\n new Action(VERSIONING_MENU + \"|\" + UNDO_CHECK_OUT, UNDO_CHECK_OUT).perform(B_FileNode);\n Thread.sleep(2000);\n new Action(VERSIONING_MENU + \"|\" + REFRESH, REFRESH).perform(testNode); // Until issue #27726 gets fixed.\n B_FileNode = new Node( filesystemNode, \"test [Current]|B_File [Current]\");\n File B_File = new File(workingDirectory + File.separator + \"Work\" + File.separator + \"test\" + File.separator + \"B_File.java\");\n if (B_File.canWrite()) captureScreen(\"Error: B_File.java remained read-write after undo check out.\");\n System.out.println(\". done !\");\n }", "public void testModifyFile() throws Exception {\n System.out.print(\".. Testing file modification ..\");\n String filesystem = \"VSS \" + workingDirectory + File.separator + \"Work\";\n Node filesystemNode = new Node(new ExplorerOperator().repositoryTab().getRootNode(), filesystem);\n Node A_FileNode = new Node( filesystemNode, \"A_File [Current] (\" + userName + \")\");\n BufferedWriter writer = new BufferedWriter(new FileWriter(workingDirectory + File.separator + \"Work\" + File.separator + \"A_File.java\"));\n writer.write(\"/** This is testing A_File.java file.\\n */\\n public class Testing_File {\\n int i;\\n }\\n\");\n writer.flush();\n writer.close();\n new OpenAction().perform(A_FileNode);\n new Action(VERSIONING_MENU + \"|\" + REFRESH, REFRESH).perform(A_FileNode);\n Thread.sleep(5000);\n A_FileNode = new Node( filesystemNode, \"A_File [Locally Modified] (\" + userName + \")\");\n System.out.println(\". done !\");\n }", "public void commitWriter () {\n try {\n writer.commit();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Test\n\tpublic void testHasUnsavedChangesModifiedFile() throws Exception {\n\t\tIRodinFile rodinFile = createRodinFile(\"P/x.test\");\n\t\tRodinTestRoot root = (RodinTestRoot) rodinFile.getRoot();\n\t\tcreateNEPositive(root, \"foo\", null);\n\t\tassertUnsavedChanges(rodinFile, true);\n\n\t\t// Should report the same after closing the file.\n\t\trodinFile.close();\n\t\tassertUnsavedChanges(rodinFile, true);\n\t}", "private void closeDelete() throws IOException, InterruptedException {\n for (Map.Entry<String, Map<String, Set<String>>> path : this.filterColumnToValueMappingForDelete\n .entrySet()) {\n deleteExecution(path.getKey());\n createEmptyMetadataFile(path.getKey());\n }\n }", "void updateBranch(Commit newt) {\n String nextBranch = null;\n Commit theNext = null;\n File parent = new File(\".gitlet/current\");\n for (File file : parent.listFiles()) {\n nextBranch = file.getName();\n }\n try {\n File getHead = new File(\".gitlet/heads/\" + nextBranch);\n FileOutputStream fieOut = new FileOutputStream(getHead);\n ObjectOutputStream obetOut = new ObjectOutputStream(fieOut);\n obetOut.writeObject(newt);\n } catch (IOException e) {\n System.out.println(\"Didn't work.\");\n }\n try {\n File hideous = new File(\".gitlet/current/\" + nextBranch);\n FileOutputStream ieOut = new FileOutputStream(hideous);\n ObjectOutputStream betOut = new ObjectOutputStream(ieOut);\n betOut.writeObject(newt);\n } catch (IOException e) {\n System.out.println(\"Didn't work.\");\n }\n }", "public abstract boolean deleteOrphans();", "public interface CRAccess {\n\n\t/**\n\t * Returns the node for the given path - The path must be a simple canonical path.\n\t * (No filters, relative paths, etc.)\n\t */\n\tNode getNode(String path);\n\n\t/**\n\t * Returns all nodes in the given path (e.g. /cmsblog/articles/ will return\n\t * { Node(/cmsblog), Node(/articles) }\n\t */\n\tNode[] getNodesInPath(String path);\n\t\n\tNodeType getNodeType(String path);\n\n\tNode getParentNode(Node node);\n\n\tNode resolveNode(Node currentNodeContext, String ref);\n\t\n\t/**\n\t * Returns all direct children of the current node.\n\t */\n\tNode[] getChildren(Node node);\n\t\n\t/* Node[] filterNode() */\n\t\n\t/**\n\t * close the repository/transaction, if the repository is writable this will also commit the changes\n\t */\n\tvoid close();\n\t\n\t/**\n\t * @return <code>true</code> if the repository supports transactions, otherwhise return <code>false</code>.\n\t */\n\tboolean supportsTransaction();\n\t\n\tpublic <T extends CRAdapter> T getAdapter(Class<T> adapterInterface);\n}", "public void flushAndClose() throws TxnBatchFailure, TxnFailure, CommitFailure,\n IOException, InterruptedException {\n flush(false);\n close();\n }", "public void Close() throws IOException, ClassNotFoundException {\n\t\tsaveBlock(); \n\t\tmergeAllIndex();\n\t\tsaveToken();\n\t\tdocIdx.close();\n\t}", "@Override\n public void commit() throws HeuristicMixedException, HeuristicRollbackException, IllegalStateException,\n RollbackException, SecurityException, SystemException {\n assertActiveTransaction();\n try {\n getTransaction().commit();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n txns.set(null);\n }\n\n }", "public void tearDown() throws RepositoryException {\n graph.shutdown();\n\n }", "@Override\npublic void close() throws IOException, JoinsException, SortException, IndexException {\n\t\n}" ]
[ "0.5453291", "0.5449816", "0.5241585", "0.51938945", "0.51675564", "0.5136316", "0.5018615", "0.49888092", "0.49835652", "0.4939826", "0.48711765", "0.47953182", "0.47564924", "0.46887833", "0.46741706", "0.46722662", "0.46567765", "0.46286532", "0.46172297", "0.46152562", "0.46135995", "0.46091652", "0.4603046", "0.46024153", "0.45814884", "0.45686677", "0.45677525", "0.4566373", "0.4557433", "0.4554542", "0.45312044", "0.45278797", "0.45245332", "0.45225108", "0.45094028", "0.45086804", "0.45023945", "0.4497731", "0.449377", "0.44933817", "0.44893572", "0.44654822", "0.44634804", "0.44617695", "0.44598287", "0.4450382", "0.4445173", "0.44442964", "0.44430092", "0.44399986", "0.44394216", "0.44390035", "0.4437578", "0.4437198", "0.4432891", "0.4428107", "0.44269443", "0.44253296", "0.4422295", "0.44171757", "0.44116306", "0.44089592", "0.44028696", "0.439526", "0.43858564", "0.4384823", "0.43827957", "0.43759254", "0.43650043", "0.4358779", "0.43531004", "0.43493775", "0.4347578", "0.43431553", "0.43343377", "0.43197143", "0.43165198", "0.43143487", "0.43143487", "0.43130174", "0.43083298", "0.4307301", "0.43025616", "0.43009654", "0.42936817", "0.42880458", "0.42865568", "0.42864394", "0.42851305", "0.42612463", "0.42571288", "0.42569152", "0.42442974", "0.42345917", "0.42286268", "0.42273435", "0.42268017", "0.42263266", "0.42247733", "0.42240223", "0.4212603" ]
0.0
-1
write your code here
public static void main(String[] args) { Scanner keyboard = new Scanner(System.in); System.out.println("Enter the name of your favorite city"); System.out.println("I will display the number of characters in the city name"); System.out.println("I will also diplay the city name in both uppercase and lowercase and give you the first character in the name of the city"); String city = keyboard.nextLine(); int characters = city.length(); System.out.println("Number of characters: " + characters); System.out.println("City name in Uppercase characters: " + city.toUpperCase()); System.out.println("City name in Lowercase characters: " + city.toLowerCase()); System.out.println("First character in the name of the city: " + city.charAt(0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void logic(){\r\n\r\n\t}", "public static void generateCode()\n {\n \n }", "@Override\n\tprotected void logic() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "void pramitiTechTutorials() {\n\t\n}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void ganar() {\n // TODO implement here\n }", "public static void main(String[] args) {\n // write your code here - this is called comment and it always starts with double slash\n // and comlier will ignore this because of the // sign.\n // I am gonna say hello\n // JAVA IS CASE SENSITIVE LANGUAGE\n // System and system are very different things in java\n //Hello AND hello are different for java\n // System.out.println(\"Hello Batch 15!\");\n // System.out.println(\"I am still here.\");\n // System.out.println(\"I love Java.\");\n\n // Write a program to display your information.\n // When you run it, it should have this outcome.\n // I am your name here\n // I am from batch 15\n // I am from your city here\n // I love Java\n\n System.out.println(\"I am Sevim.\");\n System.out.println(\"I am from Batch 15.\");\n System.out.println(\"I'm from New Jersey.\");\n System.out.println(\"I love Java.\");\n\n\n\n }", "CD withCode();", "private stendhal() {\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}", "public void genCode(CodeFile code) {\n\t\t\n\t}", "public void hello(){\n\t\t\r\n \t\r\n\t\t\r\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void baocun() {\n\t\t\n\t}", "public void mo38117a() {\n }", "public void furyo ()\t{\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "public void themesa()\n {\n \n \n \n \n }", "Programming(){\n\t}", "@Override\n\tvoid output() {\n\t\t\n\t}", "private void yy() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "void rajib () {\n\t\t \n\t\t System.out.println(\"Rajib is IT Eng\");\n\t }", "private void kk12() {\n\n\t}", "public void edit() {\n\t\tSystem.out.println(\"编写java笔记\");\r\n\t}", "public static void main(String[] args) {\n\t// write your code here\n }", "private static void ThridUmpireReview() {\n\t\tSystem.out.println(\" Umpier Reviews the Score Board\");\n\t\t \n\t\t\n\t}", "@Override\r\n\t\tpublic void doDomething() {\r\n\t\t\tSystem.out.println(\"I am here\");\r\n\t\t\t\r\n\t\t}", "protected void mo6255a() {\n }", "public void gen(CodeSeq code, ICodeEnv env) {\n\r\n\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "public void working()\n {\n \n \n }", "@Override\n\tprotected void postRun() {\n\n\t}", "public void perder() {\n // TODO implement here\n }", "public void smell() {\n\t\t\n\t}", "protected void execute() {\n\t\t\n\t}", "public void mo55254a() {\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void orgasm() {\n\t\t\n\t}", "public void cocinar(){\n\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "@Override\n\tprotected void interr() {\n\t}", "public void run() {\n\t\t\t\t\n\t\t\t}", "protected void execute() {\n\n\n \n }", "@Override\n public void execute() {\n \n \n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\r\n\tpublic void crawl_data() {\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "@Override\r\n\tpublic void code() {\n\t\tus.code();\r\n\t\tSystem.out.println(\"我会java...\");\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "protected void display() {\n\r\n\t}", "private void sout() {\n\t\t\n\t}", "private static void oneUserExample()\t{\n\t}", "public void nhapdltextlh(){\n\n }", "public void miseAJour();", "protected void additionalProcessing() {\n\t}", "private void sub() {\n\n\t}", "@Override\n\tpublic void view() {\n\t\t\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void engine() {\r\n\t\t// TODO Auto-generated method stub\t\t\r\n\t}", "@Override\r\n\tpublic void code() {\n\t\tSystem.out.println(\"我会C语言....\");\r\n\t}", "void mo67924c();", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "@Override\r\n public void run() {\n basicEditor.createEdge(); // replaced Bibianas method with Moritz Roidl, Orthodoxos Kipouridis\r\n }", "public void mo5382o() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "public void mo3376r() {\n }", "public static void main(String[] args)\r\n {\n System.out.println(\"Mehedi Hasan Nirob\");\r\n //multiple line comment\r\n /*\r\n At first printing my phone number\r\n then print my address \r\n then print my university name\r\n */\r\n System.out.println(\"01736121659\\nJamalpur\\nDhaka International University\");\r\n \r\n }", "void kiemTraThangHopLi() {\n }", "public void skystonePos5() {\n }", "public final void cpp() {\n }", "public final void mo51373a() {\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"This is the main class of this project\");\r\n\t\tSystem.out.println(\"how about this\");\r\n\r\n\t\t\r\n\t\tSystem.out.println(\"new push\");\r\n\r\n\t\t//how to update this line\r\n\t\t\r\n\t\tSystem.out.println(\"hello there\");\r\n\r\n\t\tSystem.out.println(\"zen me shuoXXXXXXXXXXXKKKKkKKKKKKXXXXXXXX\");\r\n\r\n\t\tSystem.out.println(\"eventually we succeeded!\");\r\n\t\t//wa!!!\r\n\t\t\r\n\r\n\r\n\t\t//hen shu fu !\r\n\t\t\r\n\t\t//it is a good day\r\n\t\t\r\n\t\t//testing\r\n\r\n\t\t\r\n\t\tSystem.out.println(\"hope it works\");\r\n\t\t\r\n\r\n\t\t\r\n\r\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}" ]
[ "0.61019534", "0.6054925", "0.58806974", "0.58270746", "0.5796887", "0.56999695", "0.5690986", "0.56556827", "0.5648637", "0.5640487", "0.56354505", "0.56032085", "0.56016207", "0.56006724", "0.5589654", "0.5583692", "0.55785793", "0.55733466", "0.5560209", "0.55325305", "0.55133164", "0.55123806", "0.55114794", "0.5500045", "0.5489272", "0.5482718", "0.5482718", "0.5477585", "0.5477585", "0.54645246", "0.5461012", "0.54548836", "0.5442613", "0.5430592", "0.5423748", "0.5419415", "0.5407118", "0.54048806", "0.5399331", "0.539896", "0.5389593", "0.5386248", "0.5378453", "0.53751254", "0.5360644", "0.5357343", "0.5345515", "0.53441405", "0.5322276", "0.5318302", "0.53118485", "0.53118485", "0.53085434", "0.530508", "0.53038436", "0.5301922", "0.5296964", "0.52920514", "0.52903354", "0.5289583", "0.5287506", "0.52869135", "0.5286737", "0.5286737", "0.5286737", "0.5286737", "0.5286737", "0.5286737", "0.5286737", "0.52859664", "0.52849185", "0.52817136", "0.52791214", "0.5278664", "0.5278048", "0.5276269", "0.52728665", "0.5265451", "0.526483", "0.526005", "0.5259683", "0.52577406", "0.5257731", "0.5257731", "0.52560073", "0.5255759", "0.5255707", "0.5250705", "0.5246863", "0.5243053", "0.52429926", "0.5242727", "0.52396125", "0.5239378", "0.5232576", "0.5224529", "0.52240705", "0.52210563", "0.52203166", "0.521787", "0.52172214" ]
0.0
-1
/ I tried experimenting and making my own, and updating it when needed but it just caused issues.
public void updateUI(final Color foreground) { setUI(new BasicTabbedPaneUI() { @Override protected boolean shouldRotateTabRuns(int i) { return false; } @Override protected void installDefaults() { super.installDefaults(); highlight = foreground; lightHighlight = foreground; shadow = foreground; darkShadow = foreground; focus = foreground; // Nice 3 pixel border, although it uses ugly blue ): this.contentBorderInsets.top = 3; this.contentBorderInsets.left = 3; this.contentBorderInsets.right = 3; this.contentBorderInsets.bottom = 3; this.selectedTabPadInsets.bottom = 0; } BasicStroke underLineStroke = new BasicStroke(2); @Override protected void paintTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) { super.paintTabBorder(g, tabPlacement, tabIndex, x, y, w, h, isSelected); if (isSelected) { Graphics2D g2d = (Graphics2D) g.create(); super.paintTabBorder(g2d, tabPlacement, tabIndex, x, y, w, h, isSelected); g2d.setStroke(underLineStroke); g2d.drawLine(x + 1, y + h - 1, x + w - 1, y + h - 1); g2d.dispose(); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private stendhal() {\n\t}", "private void m50366E() {\n }", "protected boolean func_70814_o() { return true; }", "public abstract void mo56925d();", "@Override\n public void func_104112_b() {\n \n }", "void mo57278c();", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public void method_4270() {}", "private Rekenhulp()\n\t{\n\t}", "void mo57277b();", "@Override\n\tprotected void interr() {\n\t}", "private void m50367F() {\n }", "private void kk12() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "void mo60893b();", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "public abstract void mo27385c();", "public abstract void mo27386d();", "public abstract void mo70713b();", "private final zzgy zzgb() {\n }", "public final void mo51373a() {\n }", "private void strin() {\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 }", "public void mo38117a() {\n }", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "static void feladat9() {\n\t}", "public abstract void mo6549b();", "@Override\n\tprotected void update() {\n\t\t\n\t}", "void mo21073d();", "public void mo21877s() {\n }", "private NativeSupport() {\n\t}", "private PrngFixes() {\n }", "private static void cajas() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "private void poetries() {\n\n\t}", "private void init() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "void mo119582b();", "public void m23075a() {\n }", "private void initialize() {\n\t\t\n\t}", "void mo21072c();", "void mo72113b();", "public abstract String mo118046b();", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "void mo80457c();", "void mo21076g();", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public final void mo91715d() {\n }", "private MetallicityUtils() {\n\t\t\n\t}", "void m1864a() {\r\n }", "public void mo21779D() {\n }", "void mo41083a();", "protected boolean func_70041_e_() { return false; }", "@Override\n protected void init() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "public abstract String mo41079d();", "private FlyWithWings(){\n\t\t\n\t}", "public abstract String mo9239aw();", "public void mo21787L() {\n }", "void mo72114c();", "void mo41086b();", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo21785J() {\n }", "static void feladat7() {\n\t}", "public void mo21782G() {\n }", "public void mo4359a() {\n }", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "public abstract String mo13682d();", "void mo67924c();", "static void feladat4() {\n\t}", "private Util() { }", "public void mo12628c() {\n }", "@Override\n public int describeContents() { return 0; }", "void mo88524c();", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "private CanonizeSource() {}", "private void level7() {\n }", "public abstract void mo42331g();", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n protected void initialize() {\n\n \n }", "protected MetadataUGWD() {/* intentionally empty block */}", "private Unescaper() {\n\n\t}", "void mo80455b();", "public abstract void mo30696a();", "public void mo21825b() {\n }", "@Override\n public void init() {\n\n }" ]
[ "0.56092554", "0.56060123", "0.55422246", "0.54617727", "0.541649", "0.54072064", "0.54018015", "0.5391522", "0.53715944", "0.5368258", "0.53659767", "0.5351038", "0.53289133", "0.5301466", "0.52875775", "0.5263252", "0.5263252", "0.52610683", "0.52586937", "0.5257999", "0.5254805", "0.5249786", "0.52244174", "0.5211518", "0.52013755", "0.5189819", "0.5189819", "0.5189819", "0.5189819", "0.5189819", "0.5189819", "0.51881117", "0.5174362", "0.5170907", "0.5169914", "0.51665395", "0.51665074", "0.5165367", "0.5149279", "0.5148895", "0.5148654", "0.51472366", "0.51425105", "0.51407146", "0.5139546", "0.5138546", "0.5130427", "0.51297", "0.5127372", "0.5126614", "0.5120392", "0.5115045", "0.5102603", "0.50995123", "0.5093386", "0.5092453", "0.50917095", "0.5091459", "0.5090643", "0.5085191", "0.5083187", "0.50815654", "0.5080598", "0.5077271", "0.5077271", "0.5077271", "0.5077271", "0.5077271", "0.50743634", "0.5074253", "0.50687665", "0.50654227", "0.5064542", "0.5063924", "0.5063727", "0.5062786", "0.50625974", "0.5060346", "0.50586194", "0.505237", "0.50517976", "0.5049436", "0.50477684", "0.50444216", "0.5041414", "0.5038197", "0.50353694", "0.5031887", "0.50309604", "0.50309604", "0.5030475", "0.50301015", "0.5029918", "0.5015593", "0.50149393", "0.5014113", "0.50108415", "0.50071067", "0.500598", "0.49951822", "0.49947813" ]
0.0
-1
public List listMappingBrand(long productId);
public List<VehicleBrand> listBrandByProduct(long productId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"/brand/{brand}\")\n public List<ProductDto> getProductsByBrand(\n @PathVariable(\"brand\") String brand\n ){\n return productService.getProductsByBrand(brand);\n }", "public List<Product> findByBrand (ProductBrand brand);", "List<CatalogItem> getAllCatalogItemsByBrand(Long brand_id);", "@Override\n\tpublic List<Brand> listBrand() {\n\t\treturn goodsDao.listBrand();\n\t}", "@ModelAttribute(\"brandList\")\r\n\tpublic List<BrandTO> getBrand(){\r\n\t\treturn searchService.getAllBrand();\r\n\t}", "@Override\r\n\tpublic List<Brand> selectBrand() {\n\t\treturn gd.selectBrand();\r\n\t}", "public Product findByBrand(String brand);", "public List<Brands> LoadBrandsById(int BrandId) {\n Brands brands = null;\n List<Brands> brandsList = new ArrayList<>();\n try {\n Connection connection = DBConnection.getConnectionToDatabase();\n // String sql = \"SELECT * FROM `humusam_root`.`Users` WHERE UserEmail=\" + email;\n String sql = \"SELECT * FROM `brands` WHERE BrandId=\" + BrandId;\n Statement statment = connection.createStatement();\n ResultSet set = statment.executeQuery(sql);\n ListBrands(brandsList, set);\n } catch (SQLException exception) {\n System.out.println(\"sqlException in Application in LoadAllBrands Section : \" + exception);\n exception.printStackTrace();\n }\n\n return brandsList;\n }", "@Override\n\tpublic void getAllByBrandName() {\n\t\tfor (int i = 0; i < dto.length; i++) {\n\t\t\tSystem.out.println(dto[i].getBrandName());\n\t\t}\n\n\t}", "public Integer getBrandId() {\n return brandId;\n }", "public Integer getBrandId() {\n return brandId;\n }", "public Integer getBrandId() {\r\n return brandId;\r\n }", "public Short getBrandId() {\n return brandId;\n }", "@Override\r\n\tpublic List<Mobile> searchProduct(int prodId) {\n\t\tQuery queryOne=entitymanager.createQuery(\"FROM Mobile where mobileId=:mobile_id\");\r\n\t\tqueryOne.setParameter(\"mobile_id\", prodId);\r\n\t\tList<Mobile> myProd=queryOne.getResultList();\r\n\t\treturn myProd;\r\n\t}", "public String getBrandId() {\n\t\treturn brandId;\n\t}", "public String getBrand() {\n\treturn brands;\r\n}", "public List<Car> findCarsByBrand(String brand){\r\n return repository.findCarsByBrand(brand);\r\n }", "@Test\n public void listBrandsTest() throws ApiException {\n List<BrandReq> response = api.listBrands();\n // TODO: test validations\n }", "public void setBrandId(Integer brandId) {\r\n this.brandId = brandId;\r\n }", "public List<String> dispProduct(String id);", "public List<String> getAllBrands() {\n ArrayList<String> alData = new ArrayList<>();\n // Select All Query\n String selectQuery = \"SELECT \" + KEY_BRAND_NAME + \" FROM \" + REGISTER_TABLE;\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n DataBaseHelper dataBaseHelper = new DataBaseHelper();\n\n dataBaseHelper.set_brand_name(cursor.getString(0));\n alData.add(dataBaseHelper.get_brand_name());\n //uncomment below if we want to get all these details\n //dataBaseHelper.set_brand_id(cursor.getString(1));\n //dataBaseHelper.set_model_name(cursor.getString(2));\n //dataBaseHelper.set_model_id(cursor.getString(3));\n // Adding data to list\n //dataBaseHelperList.add(dataBaseHelper);\n } while (cursor.moveToNext());\n }\n\n // return recent list\n return alData;\n }", "public void setBrandId(Integer brandId) {\n this.brandId = brandId;\n }", "public void setBrandId(Integer brandId) {\n this.brandId = brandId;\n }", "@Override\n\tpublic List<AfterBrandGclass> findAfterBrandList() {\n\t\tString sql=\" select brand_id brandId,brand_name_s brandName from tb_brand where is_display=0\";\n\t\treturn this.queryList(sql, new Object[]{}, new BeanPropertyRowMapper(AfterBrandGclass.class));\n\t}", "@Test\n public void getBrandTest() throws ApiException {\n Integer brandId = null;\n Brand response = api.getBrand(brandId);\n // TODO: test validations\n }", "@Query(value = \"SELECT * FROM merchant_product WHERE product_id=?1\",nativeQuery = true)\n public List<MerchantProduct> getMerchantFromProductId(String productId);", "public ArrayList<Brand> getBrandList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<Brand> list = new ArrayList<Brand>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblBrand.class);\n\t\t\tList<TblBrand> brands = cr.list();\n\t\t\tif (brands.size() > 0){\n\t\t\t\tfor (Iterator<TblBrand> iterator = brands.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblBrand tblgroupsupplier = iterator.next();\n\t\t\t\t\tBrand groupsupplier = new Brand();\n\t\t\t\t\tgroupsupplier.convertFromTable(tblgroupsupplier);\n\t\t\t\t\tlist.add(groupsupplier);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}", "public void setBrandId(Short brandId) {\n this.brandId = brandId;\n }", "@Transactional\n public List<Product> productList(String category, String color, String power,\n String weight, String minimumPrice, String maximumPrice, String brand) {\n getMinPrice(minimumPrice, maximumPrice);\n return productDao.getFiltredProductList(category, power, minPrice, maxPrice, brand, color, weight);\n }", "List<Product> getAllProducts();", "List<Product> getAllProducts();", "List<Product> getAllProducts();", "@GetMapping(\"/sysadm/product\")\n public String showAllProduct() {\n return \"admin/sysadm/productList\";\n }", "@GetMapping(\"/all/id\")\n public List<String> getAllId(){\n return productService.getAllId();\n }", "public String getBrand() {\n return brand;\n }", "public String getBrand() {\n return brand;\n }", "public String getBrand() {\n return brand;\n }", "public String getBrand() {\n return brand;\n }", "@Override\n public String getBrand() {\n return brand;\n }", "List<Product> getProductsList();", "public String getBrand() {\n\t\treturn Brand;\n\t}", "public List<com.vjshop.entity.TProductCategoryBrand> fetchByBrands(Long... values) {\n return fetch(TProductCategoryBrand.T_PRODUCT_CATEGORY_BRAND.BRANDS, values);\n }", "public Set<ProductBarcode> getProducts();", "public java.util.List<ProductSpecificationMapping> findAll();", "public void setBrand(String brand) {\n this.brand = brand;\n }", "public void setBrand(String brand) {\n this.brand = brand;\n }", "public interface BrandService {\n public Pagination getBrandListWithPage(WebParam map);\n\n public List<WebResultMap> getBrandList(WebParam map);\n\n public void addBrand(WebParam map);\n\n public int deleteBrandById(WebParam map);\n\n public int deleteBrandByIds(WebParam map);\n\n public int updateBrandByKey(WebParam map);\n\n public WebResultMap getBrandById(WebParam map);\n}", "@Override\n public SearchResult queryBrandShopProduct(String brandId, String pageIndex, String pageSize, String userLv, String price, String size, String colorId, String tagId, String categoryId, String order, String postArea, String imei,String channnelType) throws Exception {\n SearchResult searchResult=aspBizSerchService.queryBrandProductList(\"\", pageIndex, pageSize, tagId, brandId, price, colorId, size, categoryId, order, userLv, postArea, imei, \"2.9.16\",channnelType);\n// brandShop.setResult(searchResult);\n \n return searchResult;\n }", "@Test\n public void listProductsTest() throws ApiException {\n ParamEffective effective = null;\n String updatedSince = null;\n String brand = null;\n ParamProductCategory productCategory = null;\n Integer page = null;\n Integer pageSize = null;\n \n ResponseBankingProductList response = api.listProducts( effective, updatedSince, brand, productCategory, page, pageSize );\n response.toString();\n // TODO: test validations\n }", "@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}", "List<CatalogItem> getAllCatalogItemsFiltered(Long brand_id, Long type_id);", "List<Car> getByBrandAndColor(String brand, String color);", "@GetMapping(\"/product/{id}\")\n\tpublic Product getProductById(@PathVariable(\"id\") Long id);", "public interface ProductBrandCommon {\n\n /**\n * SQL statement that filter product brand by its description or id.\n */\n String FIND_BY_PRODUCT_BRAND_SQL = \"select productBrand from ProductBrand productBrand \" +\n \"where productBrand.productBrandId like concat('%', :productBrand, '%') \" +\n \"or upper(productBrand.productBrandDescription) like concat('%', upper(:productBrand), '%')\";\n\n /**\n * SQL statement that filter product brand by its description and show own brand only.\n */\n String FIND_BY_PRODUCT_BRAND_AND_OWN_BRAND_SQL = \"select productBrand from ProductBrand productBrand \" +\n \"where (productBrand.productBrandId like concat('%', :productBrand, '%') \" +\n \"or upper(productBrand.productBrandDescription) like concat('%', upper(:productBrand), '%')) \" +\n \"and productBrand.productBrandTier.productBrandTierCode <> :productBrandTierCode\";\n\n /**\n * SQL statement that filter product brands by brand description or id and brand tier name.\n */\n String FIND_BY_PRODUCT_BRAND_AND_BRAND_TIER_SQL = \"select productBrand from ProductBrand productBrand \" +\n \"where (productBrand.productBrandId like concat('%', :productBrand, '%') \" +\n \"or upper(productBrand.productBrandDescription) like concat('%', upper(:productBrand), '%')) \" +\n \"and upper(productBrand.productBrandTier.productBrandName) like concat('%', upper(:brandTier),'%')\";\n\n /**\n * SQL statement that filter product brands by brand description or id and brand tier name and show own brand only.\n */\n String FIND_BY_PRODUCT_BRAND_AND_BRAND_TIER_AND_OWN_BRAND_SQL =\n \"select productBrand from ProductBrand productBrand join productBrand.productBrandTier brandTier \" +\n \"where (productBrand.productBrandId like concat('%', :productBrand, '%') \" +\n \"or upper(productBrand.productBrandDescription) like concat('%', upper(:productBrand), '%')) \" +\n \"and upper(brandTier.productBrandName) like concat('%', upper(:brandTier),'%') \" +\n \"and brandTier.productBrandTierCode <> :productBrandTierCode\";\n\n\t/**\n\t * SQL statement that filter product brands by brand description or id.\n\t */\n\tString FIND_BY_PRODUCT_BRAND_AND_DESCRIPTION_SQL =\n\t\t\t\"from ProductBrand productBrand \" +\n\t\t\t\t\t\"where (productBrand.productBrandId like concat('%', :id, '%') \" +\n\t\t\t\t\t\"or upper(productBrand.productBrandDescription) like concat('%', upper(:desciption), '%')) \";\n\n /**\n * SQL statement that filter brands by productBrandId.\n */\n String FIND_BY_BRAND_ID_SQL = \"select productBrand from ProductBrand productBrand \" +\n \"where productBrand.productBrandId like concat('%', :productBrandId, '%')\";\n\n /**\n * SQL statement that filter brands by productBrandId and productBrandDescription.\n */\n String FIND_BY_PRODUCT_BRAND_ID_AND_BRAND_DESCRIPTION_SQL = \"select productBrand from ProductBrand productBrand \" +\n \"where productBrand.productBrandId like concat('%', :productBrandId, '%') \" +\n \"and upper(productBrand.productBrandDescription) like concat('%', upper(:productBrandDescription), '%')\";\n\n\n String FIND_BY_BRAND_DESCRIPTION_EXCEPT_ITSELF_SQL = \"select productBrand from ProductBrand productBrand \" +\n \"where upper(TRIM(productBrand.productBrandDescription)) = upper(:productBrandDescription) \" +\n \"and productBrand.productBrandId != :productBrandId\";\n\n\n}", "List<Car> findByBrand(@NonNull String brand);", "List<Car> getByBrandAndModel(String brand, String model);", "public String getBrand() {\n\t\treturn brand;\n\t}", "public interface IBrandService {\r\n\r\n List<Brand> getAllBrand();\r\n}", "@GetMapping(\"/getproduct\")\n\t\tpublic List<Product> getAllProduct() {\n\t\t\tlogger.info(\"products displayed\");\n\t\t\treturn productService.getAllProduct();\n\t\t}", "public List<Product> getProducts();", "public List<Product> getProducts();", "List<Product> getProductByCategory(String category) throws DataBaseException;", "List<Product> getProductsByCategory(String category);", "public void setBrand(String brand) {\n\t\tthis.brand = brand;\n\t}", "@GetMapping(\"/buildingFoodProduct\")\n @ResponseBody\n public List<BuildingFoodProduct> getBuildingFoodProduct() {\n return repository.findAll();\n }", "public List<Brand> getBrands(String name) throws IOException {\n return getBrands(name,25,0);\n }", "@GetMapping(value = \"/api/customer/brand/{brand_id}\")\n public ResponseEntity<List<CustomerDTO>> getCustomerByBrandId(@PathVariable Long brand_id) throws NoSuchBrandException, NoSuchCustomerException, NoSuchTestdriveException {\n Set<Customer> customers= customerService.getCustomerByBrandId(brand_id);\n\n Link link = linkTo(methodOn(CustomerController.class).getAllCustomers()).withSelfRel();\n\n List<CustomerDTO> customerDTOS = new ArrayList<>();\n for (Customer entity : customers) {\n Link selfLink = new Link(link.getHref() + \"/\" + entity.getId()).withSelfRel();\n CustomerDTO dto = new CustomerDTO(entity, selfLink);\n customerDTOS.add(dto);\n }\n\n return new ResponseEntity<>(customerDTOS, HttpStatus.OK);\n }", "public String productList(ProductDetails p);", "public interface ProductsMapper {\n\n List<Product_Info> queryPhoneList();\n\n Product_Info PhoneDetails(String productId);\n}", "public List<productmodel> getproductbyname(String name);", "@Override\r\n\tpublic HashMap<String, Object> selectProductById(String productId) {\n\t\tHashMap<String, Object> map = new HashMap<>();\r\n\t\tmap.put(\"product\", dao.selectProductById(productId));\r\n\t\tmap.put(\"optionList\", dao.selectOptionById(productId));\r\n\t\treturn map;\r\n\t}", "@Override\n public List<ProductPojo> getProductTypeFavouritesList(Map<String, Object> params) {\n return yourFavouritesDetaildao.getProductTypeFavouritesList(params);\n }", "public List<Product> searchProducts(ProductDTO product) {\n String SQL_SEARCH_QUERY=prepareSql(product);\n List<Product> productList=new ArrayList<>();\n Product p;\n List<Object[]> objList=entityManager.createNativeQuery(SQL_SEARCH_QUERY).getResultList();\n for(Object[] o: objList) {\n p=new Product();\n p.setCategory(new Category());\n p.setId(((BigInteger)o[0]).longValue());\n p.setName(o[1].toString());\n p.setPrice(((BigInteger) o[2]).longValue());\n p.setQuantity((Integer) o[3]);\n p.setVolume(((BigInteger) o[4]).longValue());\n p.setWeight(((BigInteger) o[5]).longValue());\n p.getCategory().setId(((BigInteger) o[6]).longValue());\n productList.add(p);\n }\n return productList;\n }", "public String getBrandCode() {\n return brandCode;\n }", "List<ProductItem> findByProduct_Id(Long productId);", "List<ProductDto> getProducts();", "@RoutingWith(\"master\")\n\t@RequestMapping(\"/findAllProductM\")\n\tpublic String findAllProductM(){\n\t\tproductService.findAllProductM();\n\t\treturn \"master\";\n\t}", "@Test\n public void listProductsTest() throws ApiException {\n String effective = null;\n String updatedSince = null;\n String brand = null;\n String productCategory = null;\n Integer page = null;\n Integer pageSize = null;\n ResponseBankingProducts response = api.listProducts(effective, updatedSince, brand, productCategory, page, pageSize);\n\n // TODO: test validations\n }", "List<Car> findByBrand(String brand);", "@GetMapping(\"/product/ratings\")\n\tpublic List<Product> getProductsByRatingsAndCategoryAndFeatured(){\n\t\tList<Product> list = productRepository.getProductsByRatingsAndCategoryAndFeatured(\"MOBILE\",true);\n\t\treturn list;\n\t}", "public void SetBrand(String br) {\n Brand = br;\n }", "List<Product> retrieveProducts();", "@GetMapping(\"/findAllProduct\")\n @ResponseBody\n public ResponseEntity<List<ProductEntity>> findAllProduct() {\n List<ProductEntity> productResponse = productService.viewProduct();\n return new ResponseEntity<>(productResponse, HttpStatus.OK);\n }", "public void setBrand(String brands) {\n\tthis.brands = brands;\r\n}", "@GetMapping(\"/product/{productid}\") \nprivate Products getProducts(@PathVariable(\"productid\") int productid) \n{ \nreturn productsService.getProductsById(productid); \n}", "@RequestMapping(\"/index\")\r\n\tpublic ModelAndView index(@RequestParam(value = \"productId\", required = false) String productId,\r\n Map<String, Object> map) {\r\n\t\tif(!StringUtils.isEmpty(productId)) {\r\n\t\t\tProductInfo productInfo = productService.findByProductId(productId);\r\n\t\t\tmap.put(\"productInfo\", productInfo);\r\n\t\t}\r\n\t\t\r\n\t\t// Query all the product category\r\n List<ProductCategory> categoryList = categoryService.findAll();\r\n map.put(\"categoryList\", categoryList);\r\n map.put(\"defaultImage\", defaultImageUrl);\r\n\r\n return new ModelAndView(\"product/index\", map);\r\n\t}", "@Override\n public List<ProductPojo> getProductFavouritesList(Map<String, Object> params) {\n return yourFavouritesDetaildao.getProductFavouritesList(params);\n }", "public long getLoyaltyBrandId() {\n return loyaltyBrandId;\n }", "@GetMapping(\"/product\") \nprivate List<Products> getAllProducts() \n{ \nreturn ProductsService.getAllProducts(); \n}", "@Test\n public void getBrandAppsTest() throws ApiException {\n Integer brandId = null;\n List<BrandApp> response = api.getBrandApps(brandId);\n // TODO: test validations\n }", "List<Product> list();", "@GetMapping(\"/product\")\n public String productList(Model model) {\n List<Product> productList = sportyShoesService.getProductList();\n model.addAttribute(\"productList\", productList);\n model.addAttribute(\"appName\", appName);\n return \"product\";\n }", "public ArrayList displayBrandDetailsImpl(Bwfl_permit_tracking_action act){\n\n\n\t\t\tArrayList list = new ArrayList();\n\t\t\tConnection con = null;\n\t\t\tPreparedStatement ps = null;\n\t\t\tResultSet rs = null;\n\t\t\tint j = 1;\n\t\t\tString selQr = null;\n\t\t\tString filter = \"\";\n\n\n\t\t\ttry {\n\t\t\t\tcon = ConnectionToDataBase.getConnection();\n\n\t\t\t\t \n\t\t\t\tselQr = \" SELECT distinct a.fk_id, a.district_id, a.brand_id, a.pckg_id, a.etin,a.scanning_fee, a.no_of_cases, a.no_of_bottle_per_case, \"+\n\t\t\t\t\t\t\" a.pland_no_of_bottles, a.import_fee, (a.duty+a.add_duty)as duty, a.add_duty, a.special_fee, a.cr_date, \"+\n\t\t\t\t\t\t\" b.import_fee as tot_import_fee, (b.duty+b.add_duty) as tot_duty, \" +\n\t\t\t\t\t\t\" b.add_duty as tot_adduty, b.special_fee as tot_spcl_fee, \" +\n\t\t\t\t\t\t\" br.brand_name, br.liquor_category, pk.package_name, pk.quantity \"+\n\t\t\t\t\t\t\" FROM bwfl_license.import_permit_dtl_20_21 a, bwfl_license.import_permit_20_21 b, \"+\n\t\t\t\t\t\t\" distillery.brand_registration_20_21 br, distillery.packaging_details_20_21 pk \"+\n\t\t\t\t\t\t\" WHERE a.fk_id=b.id AND a.district_id=b.district_id AND a.login_type=b.login_type AND a.app_id=b.app_id \"+\n\t\t\t\t\t\t\" AND br.brand_id=a.brand_id and br.brand_id=pk.brand_id_fk and a.pckg_id=pk.package_id \"+\n\t\t\t\t\t\t\" AND a.app_id=\"+act.getAppId()+\" \" +\n\t\t\t\t\t\t\" ORDER BY a.fk_id \";\n\n\t\t\t\tps = con.prepareStatement(selQr);\n\t\t\t\t//System.out.println(\"brand query---------------\" + selQr);\n\t\t\t\trs = ps.executeQuery();\n\n\t\t\t\twhile (rs.next()) {\n\n\t\t\t\t\tBwfl_permit_tracking_dt dt = new Bwfl_permit_tracking_dt();\n\n\t\t\t\t\tdt.setSrNo(j);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tdt.setBrandId_dt(rs.getInt(\"brand_id\"));\n\t\t\t\t\tdt.setBrandName_dt(rs.getString(\"brand_name\"));\n\t\t\t\t\tdt.setSize_dt(rs.getInt(\"no_of_bottle_per_case\"));\n\t\t\t\t\tdt.setEtinNo_dt(rs.getString(\"etin\"));\n\t\t\t\t\tdt.setPckgID_dt(rs.getInt(\"pckg_id\"));\n\t\t\t\t\tdt.setPckgType_dt(rs.getString(\"package_name\"));\n\t\t\t\t\tdt.setNmbrOfBox_dt(rs.getInt(\"no_of_cases\"));\n\t\t\t\t\tdt.setNmbrOfBtl_dt(rs.getInt(\"pland_no_of_bottles\"));\n\t\t\t\t\tdt.setDuty_dt(rs.getDouble(\"duty\"));\n\t\t\t\t\tdt.setAddDuty_dt(rs.getDouble(\"add_duty\"));\n\t\t\t\t\tdt.setImportFees_dt(rs.getDouble(\"import_fee\"));\n\t\t\t\t\tdt.setSpecialfees_dt(rs.getDouble(\"special_fee\"));\n\t\t\t\t\tdt.setQuantity_dt(rs.getInt(\"quantity\"));\n\t\t\t\t\tdt.setLiquorCatgry_dt(rs.getInt(\"liquor_category\"));\n\t\t\t\t\tdt.setScanning_fee(rs.getDouble(\"scanning_fee\"));\n\n\t\t\t\t\tact.setTotalDuty(rs.getDouble(\"tot_duty\"));\n\t\t\t\t\tact.setTotalAddDuty(rs.getDouble(\"tot_adduty\"));\n\t\t\t\t\tact.setTotalImportFee(rs.getDouble(\"tot_import_fee\"));\n\t\t\t\t\tact.setTotalSpecialFee(rs.getDouble(\"tot_spcl_fee\"));\n\t\t\t\t\tact.setTotal_scanning_fee(act.getTotal_scanning_fee()+rs.getDouble(\"scanning_fee\"));\n\n\n\t\t\t\t\tj++;\n\t\t\t\t\tlist.add(dt);\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,new FacesMessage(e.getMessage(), e.getMessage()));\n\t\t\t\te.printStackTrace();\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (ps != null)\n\t\t\t\t\t\tps.close();\n\t\t\t\t\tif (rs != null)\n\t\t\t\t\t\trs.close();\n\t\t\t\t\tif (con != null)\n\t\t\t\t\t\tcon.close();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn list;\n\n\t\t\n\t\t}", "public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}", "List<Product> getProductsByCategoryId(Serializable categoryId);", "public List<Product> findAll();", "@Mapper\npublic interface ProductMapper {\n\t@Select({\n\t\t\t\"select id, name, introduce, number, price, stock, is_deleted, create_time, update_time\" +\n\t\t\t\t\t\" from product where is_deleted and id = #{id} limit 1\"\n\t})\n\t@Results({\n\t\t\t@Result(column = \"id\", property = \"id\"),\n\t\t\t@Result(column = \"name\", property = \"name\"),\n\t\t\t@Result(column = \"introduce\", property = \"introduce\"),\n\t\t\t@Result(column = \"number\", property = \"number\"),\n\t\t\t@Result(column = \"price\", property = \"price\"),\n\t\t\t@Result(column = \"stock\", property = \"stock\"),\n\t\t\t@Result(column = \"is_deleted\", property = \"isDeleted\"),\n\t\t\t@Result(column = \"create_time\", property = \"createTime\"),\n\t\t\t@Result(column = \"update_time\", property = \"updateTime\")\n\t})\n\tProduct selectByPrimaryKey(@Param(\"id\") Long id);\n}", "public HashMap<String, ProductDTO> displayProductInWishlist() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\treturn WishlistDaoImpl.wlist ;\n\t}", "List<Product> getAllProducts() throws DataBaseException;", "public String getDeviceBrand() {\n return deviceBrand;\n }" ]
[ "0.74077964", "0.7150493", "0.7060274", "0.7051083", "0.6743362", "0.6619758", "0.6590122", "0.6532283", "0.65069413", "0.64611", "0.64611", "0.645247", "0.639144", "0.6292883", "0.6281303", "0.61315805", "0.61036175", "0.6100217", "0.60850346", "0.6084735", "0.60740674", "0.60462064", "0.60462064", "0.60458106", "0.60443854", "0.60389394", "0.60357416", "0.6019347", "0.59541863", "0.5948765", "0.5948765", "0.5948765", "0.594663", "0.59278244", "0.5915913", "0.5915913", "0.5915913", "0.5915913", "0.58995855", "0.58611804", "0.58519965", "0.5851552", "0.58432007", "0.58390826", "0.58280534", "0.58280534", "0.5819676", "0.5819235", "0.57982814", "0.5779521", "0.57788515", "0.5774953", "0.5753164", "0.57315016", "0.57254547", "0.5725451", "0.57238144", "0.5714633", "0.5668411", "0.5667435", "0.5667435", "0.56567883", "0.565553", "0.5640939", "0.5640458", "0.5636202", "0.5629602", "0.56288576", "0.56132066", "0.56065327", "0.5586463", "0.5581294", "0.5575563", "0.5573794", "0.55728436", "0.55687225", "0.5563863", "0.55615085", "0.55528295", "0.55500215", "0.55441916", "0.55377054", "0.5528069", "0.5503167", "0.5495588", "0.5495428", "0.54828125", "0.5472857", "0.5471175", "0.54613596", "0.5460358", "0.54562193", "0.5445822", "0.5440836", "0.54284906", "0.5421577", "0.54182607", "0.5416163", "0.541006", "0.5404503" ]
0.8824216
0
perhaps maybe instantiate a game with multiple sets of players
public Game createGame(int numberOfPlayers) { return new Game(numberOfPlayers); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void createPlayers() {\n\t\tcomputer1 = new ComputerSpeler();\n\t\tspeler = new PersoonSpeler();\n//\t\tif (Main.getNumberOfPlayers() >= 3) { \n//\t\t\tSpeler computer2 = new ComputerSpeler();\n//\t\t}\n//\t\tif (Main.getNumberOfPlayers() == 4) {\n//\t\t\tSpeler computer3 = new ComputerSpeler();\n//\t\t}\n\n\n\t}", "private void createPlayers() {\n // create human player first\n Player human = new Player(\"Player 1\", true);\n players.add(human);\n \n // create remaining AI Players\n for (int i = 0; i < numAIPlayers; i++) {\n Player AI = new Player(\"AI \" + (i + 1), false);\n players.add(AI);\n }\n }", "private void createPlayers() {\n\t\t//Randomize roles\n\t\tArrayList<AdventurerEnum> randomisedRoles = getRandomisedRoles();\n\t\tfor(int i=0; i<numPlayers; i++) \n\t\t\tcreateOnePlayer(randomisedRoles.get(i), i+1);\n\t}", "private void createPlayers() {\n\tGlobal.camera_player1 = new Camera(new OrthographicCamera());\n\tGlobal.camera_player2 = new Camera(new OrthographicCamera());\n\tGlobal.camera_ui = new OrthographicCamera();\n\tGlobal.player1 = new Plane(Global.player1_respawn.x,\n\t\tGlobal.player1_respawn.y, 0, new Planetype(PlaneTypes.F35),\n\t\tEntityType.PLAYER1);\n\tGlobal.player2 = new Plane(Global.player2_respawn.x,\n\t\tGlobal.player2_respawn.y, 0, new Planetype(PlaneTypes.F35),\n\t\tEntityType.PLAYER2);\n }", "private void initPlayers() {\n this.playerOne = new Player(1, 5, 6);\n this.playerTwo = new Player(2, 0, 1);\n this.currentPlayer = playerOne;\n\n }", "private void setupPlayers() {\n\t\tuserData=(UserData) Main.currentStage.getUserData();\n\t\tnumberPlayers=userData.getNumberPlayers();\n\t\tplayerNames=userData.getPlayerNames();\n\t\tcurrentPlayer=userData.getFirstPlayer();\n\t\tlb_currentplayername.setText(playerNames[currentPlayer]);\n\t\tplayers =new Player[4];\n\t\tfor(int i=0;i<4;i++) {\n\t\t\tif(i<numberPlayers) {\n\t\t\t\tplayers[i]=new Player(playerNames[i], false, i) {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void rollDices() {\n\t\t\t\t\t\trotatedDice1();\n\t\t\t\t\t\trotatedDice2();\n\t\t\t\t\t\t//waiting for player choose what way to go then handler that choice\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t\telse {\n\t\t\t\tplayers[i]=new Player(playerNames[i], true, i) {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void rollDices() {\n\t\t\t\t\t\trotatedDice1();\n\t\t\t\t\t\trotatedDice2();\n\t\t\t\t\t\t//randomchoice and next player rolldice\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t\tswitch (i) {\n\t\t\t\tcase 0:{\n\t\t\t\t\tplayers[i].setHorseColor(yh0, yh1, yh2, yh3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 1:{\n\t\t\t\t\tplayers[i].setHorseColor(bh0, bh1, bh2, bh3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 2:{\n\t\t\t\t\tplayers[i].setHorseColor(rh0, rh1, rh2, rh3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 3:{\n\t\t\t\t\tplayers[i].setHorseColor(gh0, gh1, gh2, gh3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void createPlayers() {\n\t\t\n\t\twhite = new Player(Color.WHITE);\n\t\twhite.initilizePieces();\n\t\tcurrentTurn = white;\n\t\t\n\t\tblack = new Player(Color.BLACK);\n\t\tblack.initilizePieces();\n\t}", "public void createPlayer() {\n ColorPicker colorPicker = new ColorPicker();\n\n for (Player player : players) {\n if (player.getColor() == color(0, 0, 0) || (player.hasName() == false)) {\n pickColor(player, colorPicker);\n return;\n }\n }\n\n // if (ENABLE_SOUND) {\n // sfx.moveToGame();\n // }\n\n state = GameState.PLAY_GAME;\n\n // Spawn players\n int index = 0;\n for (int i=players.size()-1; i>=0; i--) {\n String dir = directions.get(index); // Need to add players in reverse so that when they respawn, they move in the right direction\n players.get(i).setSpawn(spawns.get(dir)).setDirection(dir);\n index++;\n }\n\n // Update game state only if all players have name and color\n}", "public static void startGame() {\r\n\t\tfor (MovingUnit mu : _players) {\r\n\t\t\t((WinningInterface) mu).startUnit();\r\n\t\t}\r\n\t}", "void createNewGame(Player player);", "public void initializePlayers(){\r\n allPlayers = new ArrayList<Player>();\r\n currentPlayerIndex = 0;\r\n Player redPlayer = new Player(1, new Location(2, 2), Color.RED);\r\n Player bluePlayer = new Player(2, new Location(4, 2), Color.BLUE);\r\n Player whitePlayer = new Player(3, new Location(2, 4), Color.WHITE);\r\n Player yellowPlayer = new Player(4, new Location(4, 4), Color.YELLOW);\r\n allPlayers.add(redPlayer);\r\n allPlayers.add(bluePlayer);\r\n allPlayers.add(whitePlayer);\r\n allPlayers.add(yellowPlayer);\r\n }", "private void initializePlayers()\n\t{\n\t\tfor(Player player : playerList)\n\t\t{\n\t\t\t// Distribute personality cards\n\t\t\tplayer.setPersonalityCard(board.getPersonalityCardDeck().pickTopCard());\n\t\t\t\n\t\t\t// Distribute money\n\t\t\tboard.getBankAccount().transfertAmountTo(player, nbGoldStartPerPlayer, false);\n\t\t\t\n\t\t\t// Distribute minions\n\t\t\tfor(int i = 0; i < nbMinionsPerPlayer; i++)\n\t\t\t{\n\t\t\t\tplayer.addMinion(new Minion());\n\t\t\t}\n\t\t\t\n\t\t\t// Distribute buildings\n\t\t\tfor(int i = 0; i < nbBuildingsPerPlayer; i++)\n\t\t\t{\n\t\t\t\tplayer.addBuilding(new Building());\n\t\t\t}\n\t\t}\n\n\t\t// Distribute player cards\n\t\tfor(int i = 0; i < nbInitCards; i++)\n\t\t{\n\t\t\tfor(Player player : playerList)\n\t\t\t{\n\t\t\t\tplayer.getPlayerCardDeck().addCard(board.getPlayerCardDeck().pickTopCard());\n\t\t\t}\n\t\t}\n\t}", "public void startGame(){\n\n AgentAddress coordinatorAddressPre = getAgentWithRole(\"investment_game\", \"tout_le_monde\", \"coordinator\");\n\n if (coordinatorAddressPre==null){\n Coordinator coordinator = new Coordinator();\n\n launchAgent(coordinator);\n\n pause(1000);\n }\n\n Set<Player> players = new HashSet<Player>();\n Player primaryPlayer = null;\n\n //now launch all human player avatar agents, each of them will be initialized as agent having a GUI frame\n Iterator<GameSpecification.PlayerSpecification> playerSpecs = gameSpecification.getPlayerSpecifications().iterator();\n\n int launchedHumanPlayers = 0;\n\n while (playerSpecs.hasNext()){\n GameSpecification.PlayerSpecification spec = playerSpecs.next();\n\n if (spec instanceof GameSpecification.HumanPlayerSpecification){\n\n HumanPlayerAvatar humanPlayerAvatar = new HumanPlayerAvatar(spec.getName());\n\n launchAgent(humanPlayerAvatar,true);\n\n players.add(humanPlayerAvatar);\n\n launchedHumanPlayers++;\n\n if (null == primaryPlayer){\n primaryPlayer=humanPlayerAvatar;\n }\n\n }\n }\n\n //launch computer player agents. If no human players have been launched, the first computer player will display a GUI frame.\n playerSpecs = gameSpecification.getPlayerSpecifications().iterator();\n\n boolean first = true;\n\n while (playerSpecs.hasNext()){\n GameSpecification.PlayerSpecification spec = playerSpecs.next();\n\n if (spec instanceof GameSpecification.ComputerPlayerSpecification){\n\n ChooseAmountStrategy chooseAmountStrategy = ((GameSpecification.ComputerPlayerSpecification) spec).getChooseAmountStrategy();\n\n SelectOpponentStrategy selectOpponentStrategy = ((GameSpecification.ComputerPlayerSpecification) spec).getSelectOpponentStrategy();\n \n ComputerPlayer computerPlayer = new ComputerPlayer(spec.getName(),spec.getPictureFileName(), chooseAmountStrategy, selectOpponentStrategy);\n\n chooseAmountStrategy.setPlayer(computerPlayer);\n\n selectOpponentStrategy.setPlayer(computerPlayer);\n\n launchAgent(computerPlayer, launchedHumanPlayers == 0 && first);\n\n players.add(computerPlayer);\n\n if (null == primaryPlayer){\n primaryPlayer=computerPlayer;\n }\n\n first = false;\n\n }\n }\n\n //request new game from coordinator\n AgentAddress coordinatorAddress;\n\n while((coordinatorAddress = getAgentWithRole(\"investment_game\",\"tout_le_monde\",\"coordinator\"))==null){\n pause(750);\n }\n\n String requestGameSpec = \"<new_game> <for> \"+gameSpecification.getPlayerSpecifications().size()+\" <players> <having> \"+gameSpecification.getRounds()+\" <rounds> <invite> 0 <computer_players>\";\n\n ActMessage reply = (ActMessage)sendMessageWithRoleAndWaitForReply(coordinatorAddress,new ActMessage(\"request_game\",requestGameSpec),\"jeromes_assistant\");\n\n if (reply.getAction().equals(\"game_initialized\")){\n\n final String gameId = reply.getContent();\n\n //let players join the game\n Iterator<Player> playerIterator = players.iterator();\n\n while (playerIterator.hasNext()){\n\n final Player player = playerIterator.next();\n final boolean isPrimaryPlayer = player.equals(primaryPlayer);\n\n new Thread(){\n @Override\n public void run() {\n player.joinGame(gameId,isPrimaryPlayer,player.getPicturePath());\n }\n }.start();\n\n }\n }else{\n //TODO throw Exception\n }\n\n }", "public static void InitGame(ArrayList<Player> players) {\n PlayersLoop.setPlayers(players);\n _gameWindow.getBoard().makePlayersLayer();\n PlayersLoop.setCurrentPlayer(players.get(0));\n Dice.Reset();\n // todo Dice player order \n\n }", "public Game(Player[] players) {\r\n this.players = new ArrayList<>();\r\n this.players.addAll(Arrays.asList(players));\r\n dealer = new Dealer();\r\n this.players.add(dealer);\r\n nbRound = 1;\r\n\r\n String title = \"Nouvelle partie avec \";\r\n for (int i = 0; i < this.players.size(); i++) {\r\n title += this.players.get(i).getName() + \", \";\r\n }\r\n Logger.write(title);\r\n\r\n // launch the first round.\r\n round();\r\n }", "public void setUpPlayers() {\n this.players.add(new Player(\"Diogo\"));\n this.players.add(new Player(\"Hayden\"));\n this.players.add(new Player(\"Gogo\"));\n }", "private synchronized void startNewGame(List<ClientInfo> players) {\n\t\tClientServerHandler clientServerHandler = new ClientServerHandler(players);\n\t\tfor (ClientInfo player : players) {\n\t\t\tplayersInGame.add(player);\n\t\t}\n\t\texecutor.submit(clientServerHandler);\n\t}", "private void createPlayers(LogicEngine in_logicEngine)\r\n\t{\n\t\tfor(int i=0 ; i < 4 ;i++)\r\n\t\t{\r\n\t\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/tinyship.png\",(LogicEngine.rect_Screen.getWidth()/2) - (32*i) + 64,50,20);\r\n\t\t\tship.i_animationFrame=0;\r\n\t\t\tship.i_animationFrameSizeWidth=16;\r\n\t\t\tship.i_animationFrameSizeHeight=16;\r\n\t\t\tship.allegiance = GameObject.ALLEGIANCES.PLAYER;\r\n\t\t\tship.collisionHandler = new PlayerCollision(ship);\r\n\t\t\tship.stepHandlers.add(new PlayerStep(i,ship));\r\n\t\t\tship.shotHandler = new StraightLineShot(\"data/\"+GameRenderer.dpiFolder+\"/bullet.png\",7.0f,new Vector2d(0,9));\r\n\t\t\t\r\n\t\t\tship.stepHandlers.add(new AnimateRollStep());\r\n\t\t\t\t\r\n\t\t\tship.str_name = \"player\";\r\n\t\t\t\r\n\t\t\tship.c_Color = new Color(1.0f,1.0f,1.0f,1.0f);\r\n\t\t\t\r\n\t\t\tship.v.setMaxForce(3);\r\n\t\t\tship.v.setMaxVel(20.0);\r\n\t\t\tin_logicEngine.objectsPlayers.add(ship);\r\n\t\t\t\r\n\t\t\t//double firing speed on hell\r\n\t\t\tif(Difficulty.isHard())\r\n\t\t\t\tship.shootEverySteps = (int) (ship.shootEverySteps * 0.75); \r\n\t\t\t\r\n\t\t\t//for each advantage if it is enabled apply it\r\n\t\t\tfor(int j=Advantage.b_advantages.length-1 ;j>=0;j--)\r\n\t\t\t\tif(Advantage.b_advantages[j])\r\n\t\t\t\t\tAdvantage.applyAdvantageToShip(j,ship,i,in_logicEngine);\r\n\t\t\t\r\n\t\t}\r\n\t}", "private Game (String[] args) {\n numTotalPlayers = Integer.valueOf(args[2]); \n try {\n numComputerPlayers = Integer.parseInt(args[3]);\n } catch (ArrayIndexOutOfBoundsException e) {\n numComputerPlayers = 0;\n System.out.println(\"No computer players enabled.\");\n }\n numHumanPlayers = numTotalPlayers - numComputerPlayers;\n board = Board.getInstance(args[0], args[1]);\n view = View.getInstance();\n }", "public void startGame() {\n int numberOFPlayers = view.askForNumberOfPlayers();\n\n // adding dealer...\n players.add(dealer);\n //...and players to 'players' ArrayList\n for (int i = 1; i < numberOFPlayers; i++) {\n players.add(new RegularPlayer(i + 1));\n }\n\n // dealing cards to players\n dealer.dealCardsToPlayers(players);\n // Game\n while (!(players.size() == 1)) {\n\n for (int i = 0; i < players.size(); i++) {\n\n // printowanie ilości kart kazdego z graczy dla testów\n if (checkGameStatus()) {\n try {\n // display no of cards for each player\n for (Player player : players) {\n view.print(\"Player \" + player.getPlayerId() + \" no of cards: \" + player.getCardsCount());\n }\n\n round(players.get(i), players);\n } catch (IndexOutOfBoundsException e) {\n continue;\n }\n } else {\n break;\n }\n }\n }\n }", "public Game()\r\n\t{\r\n\t\tthis.players = new Player[Config.PlayerLimit];\r\n\t\tthis.resetGame();\r\n\t}", "private void getPlayers() {\r\n\t\tSystem.out.println(\"How Many Players: \");\r\n\t\tpnum = getNumber(1, 3);\r\n\r\n\t\tfor(int i=0; i < pnum; i++){\r\n\t\t\tSystem.out.println(\"What is player \" + (i + 1) + \"'s name? \");\r\n\t\t\tString name = sc.next();\r\n\t\t\tboolean dupe = true;\r\n\t\t\twhile(dupe){\r\n\t\t\t\tint samecounter = 0;\r\n\t\t\t\tfor(Player p : players){\r\n\t\t\t\t\tif(name.equals(p.getName())){\r\n\t\t\t\t\t\tsamecounter += 1;\r\n\t\t\t\t\t\tSystem.out.println(\"Name is the same as another players. Please choose another name: \");\r\n\t\t\t\t\t\tname = sc.next();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(samecounter == 0){\r\n\t\t\t\t\tdupe = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tplayers.add(new Player(name));\r\n\r\n\t\t}\r\n\t}", "public void newGame(String p1, String p2, int stonesInEachPit) {\n\t\toriginalCount = stonesInEachPit;\n\t\tfor (int i = 0; i < board.length; i++) {\n\t\t\tif (i == 6 || i == 13) {\n\t\t\t\tboard[i] = 0; \n\t\t\t} else {\n\t\t\t\tboard[i] = originalCount;\n\t\t\t}\n\t\t}\n\t\tplayer1 = new Player(p1,1);\n\t\tplayer2 = new Player(p2,2);\n\t\tcurrentPlayer = player1;\n\t\t//printBoard();\n\t\tSystem.out.println(\"It is now \" + currentPlayer.getName() + \"'s turn\");\n\t}", "public void createPlayers() {\r\n\t\tPlayerList playerlist = new PlayerList();\r\n\t\tPlayer p = new Player();\r\n\t\tfor (int x = 0; x <= players; x++) {\r\n\t\t\tplayerlist.createPlayer(p);\r\n\t\t}\r\n\r\n\t\tScanner nameScanner = new Scanner(System.in);\r\n\r\n\t\tfor (int createdPlayers = 1; createdPlayers < players; createdPlayers++) {\r\n\t\t\tSystem.out.println(\"Enter next player's name:\");\r\n\t\t\tplayerlist.namePlayer(createdPlayers, nameScanner.nextLine());\r\n\t\t}\r\n\t\tnameScanner.close();\r\n\t}", "public void GameStart()\n\t\t{\n\t\t\tplayers_in_game++;\n\t\t}", "public Tournament(){\n simplePlayer = new SimpleFakeGinRummyPlayer(new ParamList(new double[]{}));\n\n knockOnGinPlayer = new EnsembleHandEvalPlayer(ParamList.getRandomParamList(1), new DeadwoodHandEvaluator());\n knockOnGinPlayer.setKnockDecider(new KnockOnGinKnockDecider() );\n knockOnGinPlayer.setDrawDecider(new MeldOnlyDrawDecider());\n\n ExperimentalRuns.fixTwoStageKnockDecider101();\n // paramOfTunedTwoStagePlayer.set(ParamList.TS_KNOCK_THRESHOLD_EARLY, 0);\n // paramOfTunedTwoStagePlayer.set(ParamList.TS_KNOCK_THRESHOLD_LATE, 0);\n // paramOfTunedTwoStagePlayer.set(ParamList.TS_KNOCK_MIDDLE, 6);\n ParamList.setFixedValue(ParamList.TS_DRAW_MIDDLE, 14);\n ParamList paramOfTunedTwoStagePlayer = ParamList.getRandomParamList(1);\n System.out.println(paramOfTunedTwoStagePlayer);\n tunedTwoStagePlayer = new IndexEnsembleHandEvalPlayer(paramOfTunedTwoStagePlayer, new DeadwoodHandEvaluator());\n tunedTwoStagePlayer.setKnockDecider(new TwoStageKnockDecider(paramOfTunedTwoStagePlayer) );\n tunedTwoStagePlayer.setDrawDecider(new MeldOnlyDrawDecider());\n tunedTwoStagePlayer.setDrawDecider(new TwoStageDrawDecider(paramOfTunedTwoStagePlayer));\n\n resultSimpleVsKnockGin = 0;\n resultKnockGinVsTwoStage = 0;\n resultTwoStageVsSimple = 0;\n\n numGamePerPair = 2000;\n\n }", "public void playGame() {\n\t\tdo {\n\t\t\tSystem.out.print(\"How many people are playing (1-5)? \");\n\t\t\tusers = kb.nextInt();\n\n\t\t} while (users > 5 || users < 0);\n\n\t\tplayer = new Player[users];\n\t\tdeck = new Deck();\n\n\t\tfor (int i = 0; i < users; i++) {\n\t\t\tSystem.out.print(\"What is player \" + (i + 1) + \"'s name? \");\n\t\t\tString name;\n\t\t\tname = kb.next();\n\t\t\tplayer[i] = new Player();\n\t\t\tplayer[i].setName(name);\n\t\t}\n\t}", "private void startMultiPlayerGame() {\n Intent intent = Games.RealTimeMultiplayer.getSelectOpponentsIntent(getApiClient(), 1, 1);\n startActivityForResult(intent, RC_SELECT_PLAYERS);\n }", "private void createAllGames() {\n\t\t// Create a melee game for each melee arena\n\t\tmeleeArenaManager.loadArenas();\n\t\tmeleeArenaManager.getArenas().forEach(meleeArena -> {\n\t\t\tMeleeGame game = new MeleeGame(meleeArena);\n\t\t\tmeleeGameManager.addGame(meleeArena.getName(), game, new PerMapLegacyLobby(game, PlayerProfile::restore, Melee.MELEE_CHAT_PREFIX));\n\t\t});\n\t\t\n\t\t// Create a rabbit game for each rabbit arena\n\t\trabbitArenaManager.loadArenas();\n\t\trabbitArenaManager.getArenas().forEach(rabbitArena -> {\n\t\t\tRabbitGame game = new RabbitGame(rabbitArena);\n\t\t\trabbitGameManager.addGame(rabbitArena.getName(), game, new PerMapLegacyLobby(game, PlayerProfile::restore, Melee.RABBIT_CHAT_PREFIX));\n\t\t});\n\t\t\n\t\t// Log out what games were created\n\t\tString meleeGamesList = meleeGameManager.getGamesList().stream()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .map(game -> game.getArena().getName())\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .collect(Collectors.joining(\", \"));\n\t\tgetLogger().info(\"Created Melee Games for arenas : \" + meleeGamesList);\n\n\t\tString rabbitGamesList = rabbitGameManager.getGamesList().stream()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .map(game -> game.getArena().getName())\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .collect(Collectors.joining(\", \"));\n\t\tgetLogger().info(\"Created Rabbit Games for arenas : \" + rabbitGamesList);\n\t}", "private void createHumanPlayer() {\n humanPlayer = new Player(\"USER\");\n players[0] = humanPlayer;\n }", "public void setPlayers(){\n System.out.println();\n System.out.println(\"First, please enter the number of players:\");\n Scanner sc = new Scanner(System.in);\n int number;\n\n while(true){\n try {\n number = sc.nextInt();\n if(number > maxPlayer || number < minPlayer){\n System.out.println(\"Please enter a number between \" + minPlayer + \" and \" + maxPlayer+ \":\");\n continue;\n }\n } catch (InputMismatchException e){\n System.out.println(\"Invalid input! Please enter a number between \" + minPlayer + \" and \" + maxPlayer + \":\");\n sc.next();\n continue;\n }\n players = new ArrayList<>(number);\n for(int i = 0; i < number; i ++){\n players.add(new Player(\"Player \" + (i + 1)));\n }\n setNames();\n return;\n }\n }", "private Game(Player player1, Player player2){\n\t\tplayer1.setGame(this);\n\t\tplayer2.setGame(this);\n\n\t\t//todo: We should be satisfied we only having turnManager not also Player array\n\t\tplayers = new Player[]{player1, player2};\n\n\t\tturnManager.addPlayer(player2); // want player2 to start, so add it first.\n\t\t//todo: we should want player1 to start because that's more logical.\n\t\tturnManager.addPlayer(player1);\n\n\t\t//Create Dealer\n\t\tdealer = new Dealer();\n\n\t\t// First Card\n\t\tUnoCard firstCard = getNextCard();\n\t\tplayedCards().add(firstCard);\n\n\t\tdealer.spreadOut(players);\n\t\t\n\t\tisOver = false;\n\t\t// Start the turn.\n\t\tturnManager.startTurn();\n\t}", "public Game(){\n player = new Player(createRooms());\n parser = new Parser(); \n }", "public void InitGame(){\n System.out.format(\"New game initiated ...\");\n Game game = new Game(client_List);\n SetGame(game);\n }", "public void setUpPlayers(){\n\t\tTreeMap<String,Integer> turnsDetails = new TreeMap<>();\n\t\tint e = 0;\n\t\tfor(Player i : allplayers) {\n\t\t\ti.fillHand();\n\t\t\tturnsDetails.put(i.getFirstLetter()+String.valueOf(e),e);\n\t\t\te++;\n\t\t}\n\t\t// populate the turn list\n //entryset returns a set view of mappings contained\n\t\tfor(Map.Entry<String,Integer> i : turnsDetails.entrySet())\n\t\t\tturns.add(i.getValue());\n\t}", "private boolean createPlayers(){\n if(validatePlayerSettings()){\n ArrayList<Color> colors = createColorArray();\n\n // Player 1\n Main.PLAYER.add(new Player(P1text.getText(), colors.get(0)));\n // Player or AI\n if (P2label.getText().contains(\"PLAYER\")){\n Main.PLAYER.add(new Player(P2text.getText(), colors.get(1)));\n }\n else if (P2label.getText().contains(\"AI\")){\n Main.PLAYER.add(new AI(P2text.getText(), colors.get(1)));\n }\n // Player or AI 3\n if (P3label.getText().contains(\"PLAYER\")){\n Main.PLAYER.add(new Player(P3text.getText(), colors.get(2)));\n }\n else if (P3label.getText().contains(\"AI\")){\n Main.PLAYER.add(new AI(P3text.getText(), colors.get(2)));\n }\n // Player or AI 4\n if (P4label.getText().contains(\"PLAYER\")){\n Main.PLAYER.add(new Player(P4text.getText(), colors.get(3)));\n }\n else if (P4label.getText().contains(\"AI\")){\n Main.PLAYER.add(new AI(P4text.getText(), colors.get(3)));\n }\n // Player or AI 5\n if (P5label.getText().contains(\"PLAYER\")){\n Main.PLAYER.add(new Player(P5text.getText(), colors.get(4)));\n }\n else if (P5label.getText().contains(\"AI\")){\n Main.PLAYER.add(new AI(P5text.getText(), colors.get(4)));\n }\n // Player or AI 6\n if (P6label.getText().contains(\"PLAYER\")){\n Main.PLAYER.add(new Player(P6text.getText(), colors.get(5)));\n }\n else if (P6label.getText().contains(\"AI\")){\n Main.PLAYER.add(new AI(P6text.getText(), colors.get(5)));\n }\n return true;\n }\n else{\n DebugLabel.setText(\"All players must have different colors and names!\");\n return false;\n }\n }", "public void setPlayers(Player[] players) {\n this.players = players;\n }", "public Game(String id){\n this.id = id;\n players = new ArrayList<>();\n }", "public static void initialize()\n\t{\n\n\t\tint[] actualPlayers = new int[4]; // indices of the existing players\n\t\tint index = 0;\n\t\tfor (int i = 0; i < 5; i++)\n\t\t{\n\t\t\tif (players[i].exist)\n\t\t\t\tactualPlayers[index++] = i;\n\t\t}\n\n\t\tif (playerNum == 4)\n\t\t{\n\t\t\tplayers[2].x = 16;\n\t\t\tplayers[2].y = 30;\n\t\t\tplayers[1].x = 16;\n\t\t\tplayers[1].y = 10;\n\t\t\tplayers[3].x = 37;\n\t\t\tplayers[3].y = 10;\n\t\t\tplayers[4].x = 37;\n\t\t\tplayers[4].y = 30;\n\t\t}\n\t\telse if (playerNum == 2)\n\t\t{\t\t\t\n\t\t\tplayers[actualPlayers[0]].x = 16;\n\t\t\tplayers[actualPlayers[0]].y = 20;\n\t\t\tplayers[actualPlayers[1]].x = 37;\n\t\t\tplayers[actualPlayers[1]].y = 20;\t\t\t \n\t\t}\n\t\telse if (playerNum == 3)\n\t\t{\n\t\t\tplayers[actualPlayers[0]].x = 16;\n\t\t\tplayers[actualPlayers[0]].y = 20;\n\t\t\tplayers[actualPlayers[1]].x = 37;\n\t\t\tplayers[actualPlayers[1]].y = 10;\n\t\t\tplayers[actualPlayers[2]].x = 37;\n\t\t\tplayers[actualPlayers[2]].y = 30;\t\n\t\t}\n\n\t\tfor (int i = 0; i < 5; i++)\n\t\t{\n\t\t\tplayers[i].square = new boolean[HEIGHT + 2][WIDTH + 2];\n\t\t\tif (players[i].exist)\n\t\t\t{\n\t\t\t\tplayers[i].alive = true;\n\t\t\t\tplayers[i].square[players[i].y][players[i].x] = true;\n\t\t\t}\n\t\t\tplayers[i].dir = 'a'; // 'a' means no direction yet\n\t\t}\n\n\t\tstarting = false;\n\n\t}", "private Set<SteamUserNode> bindGames(Set<SteamUserNode> players) {\n\t\tString dest = \"http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?\" +\r\n\t\t\t\t\"key=%s&steamid=%d&include_appinfo=1&include_played_free_games=1&format=json\";\r\n\t\tString response = \"\";\r\n\t\tfor (SteamUserNode p : players) {\r\n\t\t\ttry {\r\n\t\t\t\tthis.apiCalls += 1;\r\n\t\t\t\tString query = String.format(dest, key, p.getId());\r\n\t\t\t\tURL url = new URL(query);\r\n\t\t\t\tHttpURLConnection con = (HttpURLConnection) url.openConnection();\r\n\t\t\t\tcon.setRequestMethod(\"GET\");\r\n\t\t\t\tcon.setConnectTimeout(3000);\r\n\t\t\t\tcon.connect();\r\n\t\t\t\tint respCode = con.getResponseCode();\r\n\t\t\t\tif (respCode != 200)\r\n\t\t\t\t\tSystem.out.println(\"Status code: \" + respCode + \"\\nFor request: \" + query);\r\n\t\t\t\telse {\r\n\t\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(con.getInputStream()));\r\n\t\t\t\t\tresponse = reader.lines().collect(Collectors.joining());\r\n\t\t\t\t\tint numGames = new JSONObject(response).getJSONObject(\"response\").getInt(\"game_count\");\r\n\t\t\t\t\tif (numGames > 0) {\r\n\t\t\t\t\t\tJSONArray ownedGames = new JSONObject(response).getJSONObject(\"response\").getJSONArray(\"games\");\r\n\t\t\t\t\t\tfor (int i=0;i<ownedGames.length();++i) {\r\n\t\t\t\t\t\t\tJSONObject g = ownedGames.getJSONObject(i);\r\n\t\t\t\t\t\t\tlong appId = g.getLong(\"appid\");\r\n\t\t\t\t\t\t\tString name = g.getString(\"name\");\r\n\t\t\t\t\t\t\tString logoHash = g.getString(\"img_logo_url\");\r\n\t\t\t\t\t\t\tint playForever = g.getInt(\"playtime_forever\");\r\n\t\t\t\t\t\t\tint play2Wks = g.has(\"playtime_2weeks\") ? g.getInt(\"playtime_2weeks\") : 0;\r\n\t\t\t\t\t\t\tPlayedGame game = new PlayedGame(appId, name, logoHash, play2Wks, playForever);\r\n\t\t\t\t\t\t\tp.addPlayedGame(game);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (!knownGames.contains(game)) {\r\n\t\t\t\t\t\t\t\tknownGames.add((SteamGame) game);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (localWrite) {\r\n\t\t\t\t\t\t\tjsonWriter.writeOwnedGames(response, p);\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} catch (JSONException jse) {\r\n\t\t\t\tSystem.err.println(jse.getMessage());\r\n\t\t\t\tSystem.out.println(response);\r\n\t\t\t} catch (MalformedURLException mue) {\r\n\t\t\t\t//once again, this better not happen...\r\n\t\t\t\tSystem.err.println(mue.getMessage());\r\n\t\t\t} catch (IOException ioe) {\r\n\t\t\t\tSystem.err.println(ioe.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn players;\r\n\t}", "public void startGame() {\n\t\t\n\t\tPlayer p1;\n\t\tPlayer p2;\n\t\t\n\t\tif(player1.getSelectionModel().getSelectedItem().equals(_HUMAN)) {\n\t\t\tp1 = new Human(1, main);\n\t\t}\n\t\telse {\n\t\t\tString difficulty = player1Diff.getSelectionModel().getSelectedItem();\n\t\t\t\n\t\t\tint diff = difficulty.equals(_DIFFICULTY1) ? 1 : difficulty.equals(_DIFFICULTY2) ? 2 : 3;\n\t\t\t\n\t\t\tp1 = new AI(1, diff, main);\n\t\t}\n\t\t\n\t\t\n\t\tif(player2.getSelectionModel().getSelectedItem().equals(_HUMAN)) {\n\t\t\tp2 = new Human(2, main);\n\t\t}\n\t\telse {\n\t\t\tString difficulty = player2Diff.getSelectionModel().getSelectedItem();\n\t\t\t\n\t\t\tint diff = difficulty.equals(_DIFFICULTY1) ? 1 : difficulty.equals(_DIFFICULTY2) ? 2 : 3;\n\t\t\t\n\t\t\tp2 = new AI(2, diff, main);\n\t\t}\n\t\t\n\t\t\n\t\tmain.startGame(p1, p2);\n\t\t\n\t}", "public void initiateGame() {\n Collections.shuffle(players);\n Collections.shuffle(categories);\n for (Category c : categories) {\n c.shuffleChallenges();\n }\n }", "@Test\n public void startPlayTest2() {\n GenericStandardDeckGame g = new GenericStandardDeckGame();\n List<Card> deck = g.getDeck();\n int players = 4;\n int current = 0;\n g.startPlay(players, deck);\n for (Card c : deck) {\n assertTrue(g.getPlayers().get(current).contains(c));\n current++;\n if (current == players) {\n current = 0;\n }\n }\n }", "private void createSetOfPlayers(List<ImgPath.Color> colors, boolean auto, AutoplayMode autoMode) {\n int i = 0;\n for (ImgPath.Color c : ImgPath.Color.values()) {\n this.players[i] = new Player(c, auto, autoMode);\n this.players[i].setPIndex(i);\n //System.out.println(\"Player \"+c.name()+\" created.\");\n for(int j=0; j<4; j++){\n this.players[i].setXY(j);\n }\n if (colors.contains(c)) {\n this.players[i].setActive(true);\n this.xPlayers.add(i);\n }\n i++;\n }\n }", "Game() {\n _randomSource = new Random();\n\n _players = new Player[2];\n _input = new BufferedReader(new InputStreamReader(System.in));\n _players[0] = new HumanPlayer(BP, this);\n _players[1] = new MachinePlayer(WP, this);\n _playing = false;\n }", "public void setupComputerPlayers() {\r\n\t\tif(models == null) models = new ModelFactory(this, options);\r\n\t\tCPUFactory factory = new CPUFactory(this);\r\n\t\tint cpuIndex = 0;\r\n\t\tfor(int i = 0; i < getNumPlayers(); i++) {\r\n\t\t\tboolean isCPU = i >= getNumPlayers() - getNumNPC();\r\n\t\t\tif(isCPU) {\r\n\t\t\t\tPlayer current = players.get(i);\r\n\t\t\t\tcurrent.setComputerPlayer(factory.getComputerPlayer(current, cpuTypes.get(cpuIndex++)));\r\n\t\t\t}\r\n\t\t} \r\n\t}", "@Test\n\tpublic void testgetPlayers() {\n\t\tList<Character> characters = new ArrayList<Character>();\n\t\tcharacters.add(new Character(\"Miss Scarlet\", Color.red, new Point(7,24), \"assets/cards/character/MissScarlet.jpg\"));\n\t\tcharacters.add(new Character(\"Colonel Mustard\", Color.yellow, new Point(0,17),\"assets/cards/character/ColonelMustard.jpg\"));\n\t\tcharacters.add(new Character(\"Mrs. White\", Color.white, new Point(9,0), \"assets/cards/character/MrsWhite.jpg\"));\n\t\tcharacters.add(new Character(\"The Reverend Green\", Color.green, new Point(14,0),\"assets/cards/character/MrGreen.jpg\"));\n\t\tcharacters.add(new Character(\"Mrs. Peacock\", Color.blue, new Point(23,6), \"assets/cards/character/MrsPeacock.jpg\"));\n\t\tcharacters.add(new Character(\"Professor Plum\", Color.pink, new Point(23,19),\"assets/cards/character/ProfessorPlum.jpg\"));\n\t\tPlayer p = new Player(\"Chris\");\n\t\tcharacters.get(1).setPlayer(p);\t\t\n\t\tBoard b = new Board(characters);\n\t\tassertTrue(b.getPlayers().contains(p));\n\t\tassertTrue(b.getPlayers().size() ==1);\n\t\t\n\t}", "public void setGame(int numPlayers) {\r\n\t\tif (numPlayers > MAX_PLAYERS || numPlayers < 1) {\r\n\t\t\tSystem.out.println(\"Too many players. Please choose a number 1-8.\");\r\n\t\t}\r\n\t\t//Set up gameDeck\r\n\t\tScanner scanner = new Scanner(System.in);\r\n\t\tthis.gameDeck = new Deck();\r\n\t\tgameDeck.shuffle();\r\n\t\t//Set up players and empty board\r\n\t\tthis.numPlayers = numPlayers;\r\n\t\tboard = new ArrayList<Card>();\r\n\t\tplayers = new ArrayList<Player>();\r\n\t\tfor (int i = 0; i < numPlayers; i++) {\r\n\t\t\tSystem.out.println(\"Please enter player name: \");\r\n\t\t\tString name = scanner.nextLine();\r\n\t\t\tplayers.add(new Player(name));\r\n\t\t}\r\n\t\tscanner.close();\r\n\t}", "public static void StartGame(ArrayList<String> names) {\n for (String name : names) {\n Player player = new Player();\n player.Name = name;\n player.Color = new Color(0,0,0);\n players.add(player);\n }\n generateColor();\n // Read XML\n readXML();\n GameRunning = true;\n trackDices=false;\n dicesEqual=0;\n gameboard=new GameBoard();\n gameboard.initGame();\n }", "private void loadPlayers() {\r\n this.passive_players.clear();\r\n this.clearRoster();\r\n //Map which holds the active and passive players' list\r\n Map<Boolean, List<PlayerFX>> m = ServiceHandler.getInstance().getDbService().getPlayersOfTeam(this.team.getID())\r\n .stream().map(PlayerFX::new)\r\n .collect(Collectors.partitioningBy(x -> x.isActive()));\r\n this.passive_players.addAll(m.get(false));\r\n m.get(true).stream().forEach(E -> {\r\n //System.out.println(\"positioning \"+E.toString());\r\n PlayerRosterPosition pos = this.getPlayerPosition(E.getCapnum());\r\n if (pos != null) {\r\n pos.setPlayer(E);\r\n }\r\n });\r\n }", "private void createSetOfPlayers(List<ImgPath.Color> colors, List<Boolean> auto, List<AutoplayMode> autoMode) {\n int i = 0;\n for (ImgPath.Color c : ImgPath.Color.values()) {\n this.players[i] = new Player(c, auto.get(i), autoMode.get(i));\n this.players[i].setPIndex(i);\n //System.out.println(\"Player \"+c.name()+\" created.\");\n for(int j=0; j<4; j++){\n this.players[i].setXY(j);\n }\n if (colors.contains(c)) {\n this.players[i].setActive(true);\n this.xPlayers.add(i);\n }\n i++;\n }\n }", "private void enterMultiPlayerMode(Game game) {\n initSubSystems(game);\n }", "public void setPlayerGrid(){\n\t\tplayerGrid = new Grid(true);\n\t\tsetShips(playerGrid,playerBattleShipsList,0);//2\n\t}", "public static void set_players(){\n\t\tif(TossBrain.compselect.equals(\"bat\")){\n\t\t\tbat1=PlayBrain1.myteam[0];\n\t\t\tbat2=PlayBrain1.myteam[1];\n\t\t\tStriker=bat1;\n\t\t\tNonStriker=bat2;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\tbat1=PlayBrain1.oppteam[0];\n\t\t\t\tbat2=PlayBrain1.oppteam[1];\n\t\t\t\tStriker=bat1;\n\t\t\t\tNonStriker=bat2;\n\n\t\t\t\t}\n\t}", "public void startGameSession() {\n\t\tfor (GamePlayer player : listOfPlayers) {\n\t\t\tif (player != null) {\n\t\t\t\t// set to first lap\n\t\t\t\tplayer.currentLap = 1;\n\t\t\t}\n\t\t}\n\t}", "public void initialiseMatch(int numberOfPlayers) {\n\n maxPlayer = numberOfPlayers;\n List<Worker> list = new ArrayList<>();\n\n Board board = new Board();\n setBoard(board);\n\n for (int i = 0; i < numberOfPlayers; i++) {\n onlinePlayers.add(new Player());\n }\n for (PlayerInterface playerInterface : onlinePlayers) {\n for (int i = 0; i < 2; i++, counterId++) {\n Worker worker = new Worker(counterId);\n worker.setColor(color.get(0));\n worker.setPlayerWorker(playerInterface);\n list.add(worker);\n }\n color.remove(0);\n stateList.add(new AddNickname(playerInterface, this));\n playerInterface.setWorkerRef(list);\n playerInterface.setBoard(board);\n list.clear();\n }\n initialiseGodList();\n\n }", "public void initiateTwoPlayers() {\n spaceShips.add(new SpaceShip(250, 700, friendlyBullets, \"spaceship_blue_30x30.png\", \"bullet_blue_20x30.png\", \"heart_blue_13x13.png\", 50, Bullets.BulletType.NORMAL, 0));\n spaceShips.add(new SpaceShip(500, 700, friendlyBullets, \"green_spaceship_30x30.png\", \"bullet_green_20x30.png\", \"heart_green_13x13.png\", 730, Bullets.BulletType.NORMAL, 0));\n\n playerOne = new Player(KeyboardEvent.KEY_UP, KeyboardEvent.KEY_DOWN, KeyboardEvent.KEY_LEFT, KeyboardEvent.KEY_RIGHT, KeyboardEvent.KEY_SPACE, spaceShips.get(0));\n playerTwo = new Player(KeyboardEvent.KEY_W, KeyboardEvent.KEY_S, KeyboardEvent.KEY_A, KeyboardEvent.KEY_D, KeyboardEvent.KEY_T, spaceShips.get(1));\n\n versus = false;\n init(); // TODO: 13/02/2019 passar nr de player\n\n }", "public CastleWarsGame(Collection<Player> players) {\n\t\tthis.players = players;\n\t\tinit();\n\t\tWorld.sendGlobalMessage(\"@dre@[Castle-Wars] -> A new game has just begun.\", true);\n\t\tSystem.out.println(\"Game started\");\n\t}", "private void addPlayers(@NotNull MapHandler map, @NotNull NewGameDto newGameDto) {\n ComparableTuple<Integer, Stack<SpawnTile>> result = analyseMap(map);\n flagCount = result.key;\n Stack<SpawnTile> spawnTiles = result.value;\n if (!spawnTiles.isEmpty()) {\n for (PlayerDto player : newGameDto.players) {\n SpawnTile spawnTile = spawnTiles.pop();\n if (player.id == newGameDto.userId) {\n user = new Player(spawnTile.getX(), spawnTile.getY(), Direction.NORTH, map, new ComparableTuple<>(GameGraphics.mainPlayerName + \" (you)\", player.color), player.id);\n user.setDock(spawnTile.getSpawnNumber());\n players.add(user);\n } else {\n IPlayer onlinePlayer = new OnlinePlayer(spawnTile.getX(), spawnTile.getY(), Direction.NORTH, map, new ComparableTuple<>(player.name, player.color), player.id);\n onlinePlayer.setDock(spawnTile.getSpawnNumber());\n players.add(onlinePlayer);\n }\n }\n } else {\n for (int i = 0; i < playerCount; i++) {\n NonPlayer nonPlayer = new NonPlayer(i, 0, Direction.NORTH, map, new ComparableTuple<>(\"blue\", Color.BLUE));\n nonPlayer.setDock(i);\n players.add(nonPlayer);\n }\n }\n }", "public void play() {\n Player playerOne = preparePlayer(getUserName(scanner, validator, shipsGameText.getMessage(\"show.player.one\"), null));\n Player currentPlayer = playerOne;\n ShipsGameBoard playerOneGameBoard = new ShipsGameBoard(playerOne, playerOneFleet);\n ShipsGameBoard playerOneCheckBoard = new ShipsGameBoard(playerOne, playerOneFleetToCheck);\n playerOneCheckBoard.setup();\n\n TreeMap<Character, Integer> lettersAndDigits = lettersAndDigits(playerOneGameBoard.getLength());\n ShipCreator threeMastShipCreatorPlayerOne = new ShipCreator(THREE_MASTS_SHIP,\n null,\n playerOne,\n ShipGameBoardMark.THREE_MASTS,\n playerOneGameBoard,\n playerOneShipsGameLogic);\n\n playerOneGameBoard.print();\n shipsDeployment(playerOneGameBoard,\n lettersAndDigits,\n threeMastShipCreatorPlayerOne,\n playerOneShipsGameLogic,\n playerOneFleet,\n NUMBER_OF_SHIPS);\n\n// playerOneShipsGameLogic.clearConsole();\n\n Player playerTwo = preparePlayer(getUserName(scanner, validator, shipsGameText.getMessage(\"show.player.two\"), playerOne.getName()));\n ShipsGameBoard playerTwoGameBoard = new ShipsGameBoard(playerTwo, playerTwoFleet);\n ShipsGameBoard playerTwoCheckBoard = new ShipsGameBoard(playerTwo, playerTwoFleetToCheck);\n playerTwoCheckBoard.setup();\n\n ShipCreator threeMastShipCreatorPlayerTwo = new ShipCreator(THREE_MASTS_SHIP,\n null,\n playerTwo,\n ShipGameBoardMark.THREE_MASTS,\n playerTwoGameBoard,\n playerTwoShipsGameLogic);\n\n playerTwoGameBoard.print();\n shipsDeployment(playerTwoGameBoard,\n lettersAndDigits,\n threeMastShipCreatorPlayerTwo,\n playerTwoShipsGameLogic,\n playerTwoFleet,\n NUMBER_OF_SHIPS);\n\n\n boolean isAWinner = false;\n do {\n int userRow;\n int userCol;\n// playerOneGameBoard.clearConsole();\n showCurrentPlayerBoards(playerOne, currentPlayer, playerOneGameBoard, playerTwoGameBoard, playerOneCheckBoard,\n playerTwoCheckBoard, shipsGameText);\n System.out.println(shipsGameText.getMessage(\"show.witch.player.move\", currentPlayer.getName()));\n\n System.out.println(shipsGameText.getMessage(\"show.input.row\", Integer.toString(playerOneGameBoard.getLength())));\n userRow = getPlayerRowChoice(scanner, validator, playerOneGameBoard.getLength());\n\n System.out.println(shipsGameText.getMessage(\"show.input.col\",\n Character.toString(playerOneGameBoard.generateLastLetterOfColumn('A', playerOneGameBoard.getLength()))));\n userCol = convertLetterToDigit(lettersAndDigits, getPlayerColChoice(scanner, validator,\n lettersAndDigits));\n\n if (currentPlayer.equals(playerOne)) {\n if (playerTwoShipsGameLogic.checkForHit(userRow, userCol)) {\n playerOneShipsGameLogicToCheck.changeMastStatus(userRow, userCol, playerOne, ShipGameBoardMark.HIT_BUT_NOT_SUNK);\n playerTwoShipsGameLogic.changeMastStatus(userRow, userCol, playerTwo, ShipGameBoardMark.HIT_BUT_NOT_SUNK);\n if (playerTwoShipsGameLogic.checkShipForStatusChange(userRow, userCol)) {\n playerTwoShipsGameLogic.changeShipStatusToSunk(userRow, userCol, playerTwo);\n playerOneShipsGameLogicToCheck.changeShipStatusToSinkOnCheckBoard(playerTwoFleet, playerOne);\n System.out.println(shipsGameText.getMessage(\"show.player.sunk.ship\"));\n System.out.println(shipsGameText.getMessage(\"show.player.checkboard\", currentPlayer.getName()));\n playerOneCheckBoard.print();\n System.out.println(shipsGameText.getMessage(\"show.player.gameboard\", playerTwo.getName()));\n playerTwoGameBoard.print();\n } else {\n System.out.println(shipsGameText.getMessage(\"show.player.hit.ship\", playerOne.getName()));\n }\n } else {\n System.out.println(shipsGameText.getMessage(\"show.player.miss\"));\n playerOneShipsGameLogicToCheck.changeMastStatus(userRow, userCol, playerOne, ShipGameBoardMark.MISS);\n playerTwoShipsGameLogic.changeMastStatus(userRow, userCol, playerTwo, ShipGameBoardMark.MISS);\n }\n\n// if (playerTwoShipsGameLogic.checkShipForStatusChange(userRow, userCol)) {\n// playerTwoShipsGameLogic.changeShipStatusToSunk(userRow, userCol, playerTwo);\n// playerOneShipsGameLogicToCheck.changeShipStatusToSinkOnCheckBoard(playerTwoFleet, playerOne);\n// System.out.println(shipsGameText.getMessage(\"show.player.sunk.ship\"));\n// System.out.println(shipsGameText.getMessage(\"show.player.checkboard\", currentPlayer.getName()));\n// playerOneCheckBoard.print();\n// System.out.println(shipsGameText.getMessage(\"show.player.gameboard\", playerTwo.getName()));\n// playerTwoGameBoard.print();\n// }\n\n\n if (playerTwoShipsGameLogic.isPlayerLoose()) {\n System.out.println(shipsGameText.getMessage(\"show.player.win\", playerOne.getName()));\n isAWinner = true;\n }\n\n } else {\n if (playerOneShipsGameLogic.checkForHit(userRow, userCol)) {\n playerTwoShipsGameLogicToCheck.changeMastStatus(userRow, userCol, playerTwo, ShipGameBoardMark.HIT_BUT_NOT_SUNK);\n playerOneShipsGameLogic.changeMastStatus(userRow, userCol, playerOne, ShipGameBoardMark.HIT_BUT_NOT_SUNK);\n if (playerOneShipsGameLogic.checkShipForStatusChange(userRow, userCol)) {\n playerOneShipsGameLogic.changeShipStatusToSunk(userRow, userCol, playerOne);\n playerTwoShipsGameLogicToCheck.changeShipStatusToSinkOnCheckBoard(playerOneFleet, playerTwo);\n System.out.println(shipsGameText.getMessage(\"show.player.sunk.ship\"));\n System.out.println(shipsGameText.getMessage(\"show.player.checkboard\", currentPlayer.getName()));\n playerTwoCheckBoard.print();\n System.out.println(shipsGameText.getMessage(\"show.player.gameboard\", playerOne.getName()));\n playerOneGameBoard.print();\n }\n else {\n System.out.println(shipsGameText.getMessage(\"show.player.hit.ship\", playerOne.getName()));\n }\n } else {\n playerTwoShipsGameLogicToCheck.changeMastStatus(userRow, userCol, playerOne,\n ShipGameBoardMark.MISS);\n playerOneShipsGameLogic.changeMastStatus(userRow, userCol, playerOne, ShipGameBoardMark.MISS);\n System.out.println(shipsGameText.getMessage(\"show.player.miss\"));\n }\n if (playerOneShipsGameLogic.isPlayerLoose()) {\n System.out.println(shipsGameText.getMessage(\"show.player.win\", playerTwo.getName()));\n isAWinner = true;\n }\n }\n\n currentPlayer = swapPlayers(playerOne, currentPlayer, playerTwo);\n }\n while (!isAWinner);\n }", "private void initializePlayers(int playerNumber)\r\n\t{\n\t\tHumanPlayer humanPlayer = new HumanPlayer(\"HumanPlayer\");\r\n\t\tplayerList.add(humanPlayer);\r\n\t\tfor ( int i = 0; i < playerNumber-1; ++i )\r\n\t\t{\r\n\t\t\tAIPlayer aiPlayer = new AIPlayer(\"Computer Player \" + (i+1));\r\n\t\t\tplayerList.add(aiPlayer);\r\n\t\t}\r\n\t}", "public static void initial()\n\t{\n\t\tscoreteam1 = 0; scoreteam2 = 0;\n\t\tdelayed = 0;\n\t\tplayers = new Player[5];\n\t\tfor (int i = 0; i < 5; i++) \n\t\t{\n\t\t\tplayers[i] = new Player();\n\t\t}\n\n\t\t// finding how many players there are (2, 3, or 4) and initializing status\n\t\tplayerNum = 0;\n\t\tfor (int i = 0; i < 5; i++)\n\t\t{\n\t\t\tif (Selection.exist[i])\n\t\t\t{\n\t\t\t\tplayerNum++;\n\t\t\t}\n\t\t\tplayers[i].exist = Selection.exist[i]; \n\t\t\tplayers[i].ai = Selection.ai[i];\n\t\t\tplayers[i].name = Selection.name[i];\t\t \n\t\t}\n\n\n\t\tplayers[3].keyDown = KeyEvent.VK_SEMICOLON;\n\t\tplayers[3].keyLeft = KeyEvent.VK_L;\n\t\tplayers[3].keyRight = KeyEvent.VK_QUOTE;\n\t\tplayers[3].keyUp = KeyEvent.VK_P;\n\t\tplayers[2].keyDown = KeyEvent.VK_H;\n\t\tplayers[2].keyLeft = KeyEvent.VK_G;\n\t\tplayers[2].keyRight = KeyEvent.VK_J;\n\t\tplayers[2].keyUp = KeyEvent.VK_Y;\n\t\tplayers[1].keyDown = KeyEvent.VK_S;\n\t\tplayers[1].keyLeft = KeyEvent.VK_A;\n\t\tplayers[1].keyRight = KeyEvent.VK_D;\n\t\tplayers[1].keyUp = KeyEvent.VK_W;\n\t\tplayers[4].keyDown = KeyEvent.VK_DOWN;\n\t\tplayers[4].keyLeft = KeyEvent.VK_LEFT;\n\t\tplayers[4].keyRight = KeyEvent.VK_RIGHT;\n\t\tplayers[4].keyUp = KeyEvent.VK_UP;\n\t\tplayers[1].color = Color.red;\n\t\tplayers[3].color = Color.green;\n\n\t\tif (Selection.team)\n\t\t{\n\t\t\tplayers[2].color = Color.red;\n\t\t\tplayers[4].color = Color.green;\n\t\t} \n\t\telse\n\t\t{\n\t\t\tplayers[2].color = Color.blue;\n\t\t\tplayers[4].color = Color.yellow;\n\t\t}\n\n\t}", "public void createStartingPlayers(CFrame frame) {\r\n\t\tSet<String> passableActions = new HashSet<String>();\r\n\t\tint playerNumber = Integer.parseInt(frame.getSidePanel().getButtons().getButton(\"start\", null));\r\n\t\tString name =\"\", charr;\r\n\t\tMap<String, String> pc = new HashMap<String, String>();\r\n\t\t\r\n\t\tframe.getSidePanel().getText().setText(\"Please select a character\\nand enter your name\\n\");\r\n\t\tfor(int i =0;i<playerNumber;i++){\r\n\t\t\tString test = frame.getSidePanel().getButtons().getButton(\"characterSelect\", passableActions);\r\n\r\n\t\t\tString Playercharacter[] = test.split(\",\");\r\n\t\t\tname= Playercharacter[0];\r\n\t\t\tcharr= Playercharacter[1];\r\n\t\t\tpassableActions.add(charr);\r\n\t\t\t\r\n\t\t\tpc.put(charr, name);\r\n\r\n\t\t\tSystem.out.println(\"Output: \" + name+\" : \"+charr);\r\n\t\t}\r\n\t\t\r\n\t\tfor(BoardObject object: boardObjects){\r\n\t\t\tSystem.out.println(object.getName() +\" \"+passableActions);\r\n\t\t\tif(object instanceof Character && passableActions.contains(object.getName())){\r\n\t\t\t\tSystem.out.println(object.getName());\r\n\t\t\t\t((Character) object).setAsPlayer(true);\r\n\t\t\t\t((Character) object).setPlayerName(pc.get(object.getName()));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tdeck.deal(players(), players().size());\r\n\r\n\t\t//Testing allocation\r\n\t\tfor(Character c: players())\r\n\t\t\tSystem.out.println(c.getName() + \": \" + c.playerName());\r\n\t}", "void initializeGame() {\n // Initialize players\n // Put the pieces on the board\n }", "public static void main(String[] args) {\r\n\t\t // SET UP: user input versus a heuristic monte carlo simulator vs a random player\r\n\t\t{\r\n\t\t\tPlayer[] players = new Player[]{new Player(\"user\", DecisionType.SCANNER), new Player(\"monte carlo\", DecisionType.HEURISTIC_MONTE_CARLO_10000), new Player(\"random\", DecisionType.RANDOM)};\r\n\t\t\tScanner scanner = new Scanner(System.in);\r\n\t\t\tplayers[0].setScanner(scanner);\r\n\r\n\t\t\tGame game = new Game(players, true, false);\r\n\t\t\tint numRounds = 10;\r\n\t\t\tfor (int i = 0; i < numRounds; i++) {\r\n\t\t\t\tgame.startNewRound();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// SET UP: three players (three user input players)\r\n//\t\t{\r\n//\t\t\tPlayer[] players = new Player[]{new Player(\"1\", DecisionType.SCANNER), new Player(\"2\", DecisionType.SCANNER), new Player(\"3\", DecisionType.SCANNER)};\r\n//\t\t\tScanner scanner = new Scanner(System.in);\r\n//\t\t\tplayers[0].setScanner(scanner);\r\n//\t\t\tplayers[1].setScanner(scanner);\r\n//\t\t\tplayers[2].setScanner(scanner);\r\n//\r\n//\t\t\tGame game = new Game(players, true, false);\r\n//\t\t\tint numRounds = 10;\r\n//\t\t\tfor (int i = 0; i < numRounds; i++) {\r\n//\t\t\t\tgame.startNewRound();\r\n//\t\t\t}\r\n//\t\t}\r\n\r\n\t\t// SET UP: a heuristic monte carlo player vs a monte carlo player vs a random player\r\n//\t\t{\r\n//\t\t\tPlayer[] players = new Player[]{new Player(\"heuristic monte carlo\", DecisionType.HEURISTIC_MONTE_CARLO_10000), new Player(\"monte carlo\", DecisionType.MONTE_CARLO_10000), new Player(\"random\", DecisionType.RANDOM)};\r\n//\t\t\tGame game = new Game(players, true, false);\r\n//\t\t\tint numRounds = 10;\r\n//\t\t\tfor (int i = 0; i < numRounds; i++) {\r\n//\t\t\t\tgame.startNewRound();\r\n//\t\t\t}\r\n//\t\t}\r\n\r\n\t\t// SET UP: three random players\r\n//\t\t{\r\n//\t\t\tPlayer[] players = new Player[]{new Player(\"1\", DecisionType.RANDOM), new Player(\"2\", DecisionType.RANDOM), new Player(\"3\", DecisionType.RANDOM)};\r\n//\t\t\tGame game = new Game(players, true, false);\r\n//\t\t\tint numRounds = 10;\r\n//\t\t\tfor (int i = 0; i < numRounds; i++) {\r\n//\t\t\t\tgame.startNewRound();\r\n//\t\t\t}\r\n//\t\t}\r\n\t}", "@Override\r\n public void allPlayersCreateDeck() {\r\n // Loop through all players and call createNewDeck\r\n for (int i = 0; i < this.players.size(); i++) {\r\n this.playerCreateNewDeck(i);\r\n }\r\n }", "public void executeNewGame(int gridsize, Player[] players) {\r\n players[0].setPlayerType(Player.NETWORK);\r\n players[1].setPlayerType(Player.HUMAN);\r\n for (int i = 2; i < players.length; i++) {\r\n if (players[i].getPlayerType() != Player.DISABLED) {\r\n players[i].setPlayerType(Player.NETWORK);\r\n }\r\n }\r\n game.gmvBeginNewGame(gridsize, players);\r\n nui.closeWindow();\r\n game.setNI(this);\r\n }", "public Game populateGames(String name);", "public synchronized void startGame() {\n PreGameState preGameState = new PreGameState();\n pickTeamState = preGameState.startGame(players);\n state = State.PICK_TEAM;\n teamSelection = new HashSet<>();\n }", "public void play() {\n List<String> playersData = getGameInput().getPlayersData();\n for (int id = 0; id < playersData.size() / Constants.DATAENTITY; id++) {\n getHeroes().add(getHeroFactory().getHero(\n playersData.get(id * Constants.DATAENTITY),\n Integer.parseInt(\n playersData.get(\n id * Constants.DATAENTITY\n + Constants.INDEXPOSX)),\n Integer.parseInt(\n playersData.get(\n id * Constants.DATAENTITY\n + Constants.INDEXPOSY)),\n id));\n }\n // We create the angels and add them to angels list.\n List<Integer> numOfAngels = getGameInput().getNumOfAngels();\n List<String> angelsData = getGameInput().getAngelsData();\n for (int i = 0; i < angelsData.size() / Constants.DATAENTITY; i++) {\n getAngels().add(getAngelsFactory().getAngel(\n angelsData.get(i * Constants.DATAENTITY),\n Integer.parseInt(\n angelsData.get(\n i * Constants.DATAENTITY\n + Constants.INDEXPOSX)),\n Integer.parseInt(\n angelsData.get(\n i * Constants.DATAENTITY\n + Constants.INDEXPOSY))));\n }\n\n getUtl().prepareAdmins();\n\n int angelCounter = 0; // To iterate through all angels only once.\n // We start the actual game.\n for (int i = 0; i < getMovements().size(); i++) { // For every round.\n\n getUtl().printRound(i + 1); // We start printing from round 1...\n\n for (int j = 0; j < getHeroes().size(); j++) {\n /* Apply overtime ability if the case and then hero chooses\n * strategy and moves if he is not rooted. Lastly we decrease\n * the amount of rounds that a hero must be affected by. */\n if (!getHeroes().get(j).isDead()) {\n if (getHeroes().get(j).isAffectedByAoT()) {\n getUtl().applyAoT(getHeroes().get(j));\n }\n if (!getHeroes().get(j).isRooted()) {\n getHeroes().get(j).chooseStrategy();\n getHeroes().get(j).move(getMovements().get(i).get(j));\n }\n if (getHeroes().get(j).isAffectedByAoT()) {\n getHeroes().get(j).setAffectedByAoTRounds(\n getHeroes().get(j).getAffectedByAoTRounds()\n - 1);\n }\n }\n }\n\n // Check if there are any players on the same terrain.\n for (int j = 0; j < getHeroes().size(); j++) {\n for (int k = 0; k < getHeroes().size(); k++) {\n if (k == j) {\n continue; // So a hero doesn't fight himself.\n }\n if ((getHeroes().get(j).getPosX()\n == getHeroes().get(k).getPosX())\n && (getHeroes().get(j).getPosY()\n == getHeroes().get(k).getPosY())) {\n // If they are both alive, fight.\n if (!getHeroes().get(j).isDead()\n && !getHeroes().get(k).isDead()) {\n getUtl().fight(getHeroes().get(k),\n getHeroes().get(j), getMap());\n }\n }\n }\n }\n\n // Selecting the angels that appear on round i\n for (int j = 0; j < numOfAngels.get(i); j++) {\n getUtl().spawnAngel(getAngels().get(angelCounter));\n for (int k = 0; k < getHeroes().size(); k++) {\n /* Checking if the selected angel and player k are on the\n * same terrain. */\n if (getAngels().get(angelCounter).getPosX()\n == getHeroes().get(k).getPosX()\n && (getAngels().get(angelCounter).getPosY()\n == getHeroes().get(k).getPosY())) {\n getUtl().affectHeroByAngel(\n getAngels().get(angelCounter),\n getHeroes().get(k));\n }\n }\n angelCounter++;\n }\n\n // When round is complete, everyone can fight again\n for (AbstractHero hero : getHeroes()) {\n hero.setFought(false);\n }\n getUtl().getOutput().add(\"\\n\");\n }\n printResults();\n }", "public void setUpGame() {\n\t\tGameID = sql.getTheCurrentGameID() + 1;\r\n\t\tSystem.err.println(GameID);\r\n\t\ttheModel.shuffleDeck();\r\n\t\ttheModel.createPlayers();\r\n\t\ttheModel.displayTopCard();\r\n\t\t// theModel.chooseFirstActivePlayer();\r\n\t}", "public Player(Game game){\r\n this.game = game;\r\n }", "public GamePlayerManager(int players, int ai){\n playerAmount = players;\n aiAmount = ai;\n colorArray[0] = \"RED\";\n colorArray[1] = \"BLUE\";\n colorArray[2] = \"YELLOW\";\n colorArray[3] = \"GREEN\";\n colorArray[4] = \"WHITE\";\n colorArray[5] = \"BLACK\";\n colorArray[6] = \"CYAN\";\n colorArray[7] = \"ORANGE\";\n colorArray[8] = \"MAGENTA\";\n colorArray[9] = \"PINK\";\n }", "public void setUp() throws ClassNotFoundException, InstantiationException, IllegalAccessException {\r\n \t\r\n players = new ArrayList<>();\r\n Scanner scanner = new Scanner(System.in);\r\n \r\n System.out.println(\"How many players?\");\r\n \r\n // Instead of using nextInt(), since that messes with the following nextLine, we will just convert from string to int. \r\n playerNum = Integer.parseInt(scanner.nextLine());\r\n \r\n playerBank = new int[playerNum];\r\n for (int i = 0; i < playerNum; i++) {\r\n System.out.println(\"What is Player \" + (i + 1) + \"'s name?\");\r\n System.out.println(\"Current options are Folchi, Matt, Justin, and Chris.\");\r\n \r\n // If-chain statement that handles all types of players\r\n // Reflection portion of code\r\n // The \"program2.\" is tacked onto any valid input so reflection works\r\n \r\n String input = scanner.nextLine();\r\n \r\n try {\r\n PlayerIf player = (PlayerIf) Class.forName(\"project2.Player\" + input).newInstance();\r\n player.setName(input);\r\n players.add(player);\r\n } catch (InstantiationException e) {\r\n \t\t\t\t\t// TODO Auto-generated catch block\r\n \t\t\t\t\te.printStackTrace();\r\n \t\t\t\t} catch (IllegalAccessException e) {\r\n \t\t\t\t\t// TODO Auto-generated catch block\r\n \t\t\t\t\te.printStackTrace();\r\n \t\t\t\t} catch (ClassNotFoundException e) {\r\n \t\t\t\t\tPlayerIf player = (PlayerIf) Class.forName(\"project2.SamplePlayer\").newInstance();\r\n player.setName(input);\r\n players.add(player);\r\n \t\t\t\t}\r\n \r\n playerBank[i] = 100;\r\n }\r\n \r\n scanner.close();\r\n }", "void createGame(User playerOne, User playerTwo) throws RemoteException;", "WarGame(Player newPlayer, int numOfPlayers) {\n Deck deckOfCards = new Deck();\n this.numOfPlayers = numOfPlayers;\n\n players = new WarPlayer[numOfPlayers];\n lastCards = new Card[numOfPlayers];\n this.newPlayer = newPlayer;\n\n for (int i = 0; i < players.length; i++) {\n players[i] = new WarPlayer();\n }\n\n //the distribution of cards (in the 3 players case it will be uneven so some cards won't be used\n int cardsPerPlayer = deckOfCards.numOfCards() / numOfPlayers;\n for (WarPlayer player : players) {\n for (int j = 0; j < cardsPerPlayer; j++) {\n Card nextCard = deckOfCards.getNextCard();\n player.receiveCard(nextCard);\n }\n }\n }", "public void makePlayers(LinkedList<String> playerNames){\n\n for(String s : playerNames) {\n if(s.contains(\"[B0T]\")){\n players.add(new AIPlayer(s));\n }else {\n players.add(new Player(s));\n }\n }\n\n //RANDOM DISTRIBUTION OF TERRITORIES AND TROOPS\n //The territory list is always randomized in the DefaultWorldMap class\n for(Territory terry : genericWorldMap.getAllTerritories()){\n players.peek().addTerritory(terry); //Adding current territory to current player\n terry.setOwner(players.peek().getName()); //Setting owner of territory to current player\n players.add(players.pop()); //Sending current player to the back of the queue\n }\n\n Collections.shuffle(players);//Players are initialized and order is randomized.\n\n //Putting troops in all player's territories\n for (Player player: players){\n player.setupPlayer(playerNames.size());\n }\n currentPlayer = players.pop();//Establish the first player to go\n }", "public Game newGame( String player ) throws IllegalArgumentException{\n Game game = new Game();\n game.setPlayer( playersRepository.getByLogin( player )\n .orElseThrow( () -> new IllegalArgumentException( \"This player doesn't exists\" ) ) );\n game.setGuessedNumber( new Random( System.currentTimeMillis() ).ints( 0 , 9 )\n .distinct()\n .limit( 4 )\n .boxed()\n .map( String::valueOf )\n .collect( Collectors.joining( \"\" ) ) );\n return gamesRepository.saveAndFlush( game );\n }", "public void setPlayers(ArrayList<Player> players) {\n this.players = players;\n }", "public void setPlayers(int numPlayersHuman, int strat1, int strat2, int strat3, int strat4) {\n\t\t\n\t\t\n\t\t\n\t\tif (!(numPlayersHuman == 0)) {\n\t\t\tfor (int i = 0; i < numPlayersHuman; i++){this.playerList.add(new HumanPlayer());}\n\t\t}\n\t\t\tif (strat1 > 0) {\n\t\t\t\tfor (int i = 0; i < strat1; i++) {\n\t\t\t\t\t//this.playerList.add(new Strategy1));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (strat2 > 0) {\n\t\t\t\tfor (int i = 0; i < strat1; i++) {\n\t\t\t\t\tthis.playerList.add(new Strategy3());\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (strat3 > 0) {\n\t\t\t\tfor (int i = 0; i < strat1; i++) {\n\t\t\t\t\tthis.playerList.add(new Strategy2());\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (strat4 > 0) {\n\t\t\t\tfor (int i = 0; i < strat1; i++) {\n\t\t\t\t\t//this.playerList.add(new Strategy4());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.startOrder();\n\t}", "public AbstractGameMode(GameMap map)\n\t{\n\t\tgameMap = map;\n\t\tghosts = new Ghost[getNumberGhosts()];\n\t\tplayer1Modifier = 0.25f;\n\t\tplayer2Modifier = 0.25f;\n\t\tfor(int i = 0; i < getNumberGhosts(); i++)\n\t\t{\n\t\t\tspawnGhost(i, GameMap.SPAWNER);\n\t\t}\n\t\tplayer1 = new Player(\"Player 1\", 130, 2 + 32 + 11 * 16);\n\t\tplayer2 = new Player(\"Player 2\", 130, 2 + 32 + 14 * 16);\n\t}", "public Game() {\n whitePlayer = new AwfulAIPlayer(Colour.WHITE, board);\n blackPlayer = new HumanPlayer(Colour.BLACK, board);\n\n sharedBoard = new CompositeBitBoard(whitePlayer.getOccupied(), blackPlayer.getOccupied());\n }", "public Game() {\r\n\t\tcards = new ArrayList<Card>();\r\n\t\tfor (int i = 0; i < NBCARDS; i++) {\r\n\t\t\tcards.add(new Card());\r\n\t\t}\r\n\t\tplayers = new ArrayList<Player>();\r\n\t\tfor (int i = 0; i < NBPLAYER; i++) {\r\n\t\t\tplayers.add(new Player(i + 1));\r\n\t\t}\r\n\t}", "public void newGame() {\n // this.dungeonGenerator = new TowerDungeonGenerator();\n this.dungeonGenerator = cfg.getGenerator();\n\n Dungeon d = dungeonGenerator.generateDungeon(cfg.getDepth());\n Room[] rooms = d.getRooms();\n\n String playername = JOptionPane.showInputDialog(null, \"What's your name ?\");\n if (playername == null) playername = \"anon\";\n System.out.println(playername);\n\n this.player = new Player(playername, rooms[0], 0, 0);\n player.getCurrentCell().setVisible(true);\n rooms[0].getCell(0, 0).setEntity(player);\n\n frame.showGame();\n frame.refresh(player.getCurrentRoom().toString());\n frame.setHUD(player.getGold(), player.getStrength(), player.getCurrentRoom().getLevel());\n }", "public static void playTournament(ArrayList<MazePlayer> players) {\n\t playTournament(players,5,10,10,100);\n }", "void createPlayer(Player player);", "public Game() {\n\t\tusers = new ArrayList<>();\n\t\ttmpTeam = new UserTeam();\n\t\tcore = new Core();\n\t\tmarket = new Market(core);\n\t}", "public void start(){\n int numberOfPlayers = Integer.parseInt(JOptionPane.showInputDialog(\"How many players\"));\n player1 = new Player(JOptionPane.showInputDialog(\"What is your name?\"));\n if(numberOfPlayers == 1){\n player2 = new Player(\"Computer\");\n }\n else if(numberOfPlayers == 2){\n player2 = new Player(JOptionPane.showInputDialog(\"What is the second player name?\"));\n }\n\n }", "public void preparePlayer1()\n {\n Player1 p1 = new Player1();\n addObject(p1, 200, 600);\n }", "public TTT_GamePlay() {\r\n\t\tArrays.fill(p1, 0);\r\n\t\tArrays.fill(p2, 0);\r\n\t\tArrays.fill(selectedCells, false);\r\n\t\tthis.board = new int[9];\r\n\t\tthis.player = player1;\r\n\t\twin = false;\r\n\t}", "@Override\n protected void initGame() {\n getGameWorld().setEntityFactory(new PlatformerFactory());\n getGameWorld().setLevelFromMap(\"Platformergame1.json\");\n\n // Sets spawnloction of the player\n player = getGameWorld().spawn(\"player\", 50, 50);\n }", "public void createGame()\n {\n //call Client Controller's setState method with\n //a parameter of new ClientLobbyState()\n clientController.startMultiPlayerGame(\"GameLobby\");\n }", "public void playCvC() {\n isAI[0] = true;\n isAI[1] = true;\n players[0] = new AI();\n players[1] = new AI();\n playerShips[0] = players[0].getShipList();\n playerShips[1] = players[1].getShipList();\n grids[0] = new Grid();\n grids[1] = new Grid();\n currentPlayer = 0;\n playGame();\n }", "private void startGame()\n {\n player_count = game_inter.getPlayerCount();\n if(player_count < 2 || player_count > 4)\n {\n game_inter.rejectGame(\"Illegal number of players to play: \" + player_count);\n System.exit(1);\n }\n // accept and get the order of player\n player_id = game_inter.getPlayerOrder();\n if(player_id == -1)\n {\n game_inter.rejectGame(\"Connection Error\");\n System.exit(1);\n }\n\n // organize user panels\n organizePanels();\n // if player is server, establish cards; else wait card order and adjust them\n if(player_id == 0)\n establishCards();\n else\n {\n String[] messages = game_inter.getRemoteMessage();\n placeCards(messages);\n }\n //then cycle the game\n\n Runnable r = new Runnable(){public void run(){ cycleGame(); }};\n Thread th = new Thread(r);\n th.start();\n //System.exit(0);\n }", "Game() {\n this.id = new Random(100).nextInt();\n this.board = new ArrayList<>();\n for (int i = 0; i < NUMBER_OF_ALL_HOUSES_AND_KALAHS; i++) {\n // Add Kalah on n-th position and 2*n-1 position\n if (i == NUMBER_OF_HOUSES || i == NUMBER_OF_ALL_HOUSES_AND_KALAHS - 1) {\n this.board.add(new Pit(0));\n }\n this.board.add(new Pit(NUMBER_OF_SEEDS));\n }\n }", "public void startGame() {\n\n // Initialize both players\n players[0] = new Player(\"Paras\", true);\n players[1] = new Player(\"Computer\", false);\n\n // Initialize ChessBoard\n board = new ChessBoard(8);\n movesPlayed = new ArrayList<>();\n\n // Keep playing game until GameStatus is BLACK_WIN or WHITE_WIN\n while (true) {\n\n processTurn(players[0]);\n if (this.status == GameStatus.WHITE_WIN) {\n System.out.println(\"P1 win!\");\n break;\n }\n\n processTurn(players[1]);\n if (this.status == GameStatus.BLACK_WIN) {\n System.out.println(\"P2 win!\");\n break;\n }\n }\n\n }", "public Player() { \n grid = new Cell[GRID_DIMENSIONS][GRID_DIMENSIONS]; //size of grid\n for (int i = 0; i < GRID_DIMENSIONS; i++) {\n for (int j = 0; j < GRID_DIMENSIONS; j++) {\n grid[i][j] = new Cell(); //creating all Cells for a new grid\n }\n }\n \n fleet = new LinkedList<Boat>(); //number of boats in fleet\n for (int i = 0; i < NUM_BOATS; i++) {\n Boat temp = new Boat(BOAT_LENGTHS[i]); \n fleet.add(temp);\n }\n shipsSunk = new LinkedList<Boat>();\n }", "PlayerGroup createPlayerGroup();", "@Test\n public void shouldBeAbleToInitializeWithPieces() {\n Player p1 = new Player(ChessPieceColor.WHITE, position);\n Player p2 = new Player(ChessPieceColor.BLACK, position);\n for (int i = 0; i < position.getSize(); i++) {\n Assert.assertNotNull(position.getPieceAtPosition(i, 0)); // Regular pieces\n Assert.assertNotNull(position.getPieceAtPosition(i, 1)); // Pawns\n Assert.assertNotNull(position.getPieceAtPosition(i, 7)); // Regular pieces\n Assert.assertNotNull(position.getPieceAtPosition(i, 6)); // Pawns\n }\n }", "public static void playTournament(\n\t\t ArrayList<MazePlayer> players,\n\t\t int width, int depth, \n\t\t int reps, int steps) {\n\t System.out.println(\"Playing tournament!\");\n\n\t int[][] winners = new int[players.size()][players.size()];\n\t for (MazePlayer p1:players)\n\t\t for (MazePlayer p2:players)\n\t\t if (!p1.equals(p2))\n\t\t for (int k=0;k<reps;k++){\n\t\t\t MazeGame g = new MazeGame(width,depth);\n\t\t\t g.addPlayer(p1);\n\t\t\t g.addPlayer(p2);\n\n\t\t\t for(int i=0;i<steps;i++){\n\t\t\t\t\tif (MazeGame.debugging) System.out.println(\"\\n\\n************\\nround \"+i);\n\t\t\t\t\tif (MazeGame.debugging) System.out.println(g.theBoard.drawBoard(g.playerPosition,g.jewelPosition));\n\t\t\t\t for (MazePlayer p: g.player.values()){\n\t\t\t\t\t\t Direction d = p.nextMove(g.playerPosition,g.jewelPosition,g.theBoard);\n\t\t\t\t\t\t g.movePlayer(p,d);\n\t\t\t\t\t }\n\t\t\t }\n\t\t\t int scoreDiff = g.score.get(p1.name)-g.score.get(p2.name);\n\t\t\t System.out.println(p1.name+\" vs \"+p2.name+\" = \"+scoreDiff);\n\t\t\t if (scoreDiff>0){\n\t\t\t\t winners[players.indexOf(p1)][players.indexOf(p2)] += 1;\n\t\t\t }\n\t\t\t else {\n\t\t\t\t winners[players.indexOf(p2)][players.indexOf(p1)] += 1;\t\t\t \n\t\t\t }\n\t\t }\n\t System.out.println(\"Results\");\n\t for (int i=0;i<players.size();i++){\n\t\t int sum=0;\n\t\t for(int j=0;j<players.size();j++){\n\t\t\t sum += winners[i][j];\n\t\t\t System.out.print(\"\\t\"+winners[i][j]);\n\t\t }\n\t\t System.out.println(\"\\t\"+sum+\"\\t\"+players.get(i).name);\n\t }\n\t for (int j=0;j<players.size();j++){\n\t\t int losses=0;\n\t\t for (int i=0;i<players.size();i++) {\n\t\t\t losses += winners[i][j];\n\t\t }\n\t\t System.out.print(\"\\t\"+losses);\n\t }\n\t System.out.println();\n }", "@Test\n public void startPlayTest1() {\n GenericStandardDeckGame g = new GenericStandardDeckGame(3);\n assertEquals(g.getPlayers().size(), 3);\n }" ]
[ "0.7457084", "0.7406598", "0.7298536", "0.72274625", "0.7090563", "0.706996", "0.6988246", "0.6968099", "0.6948556", "0.69469494", "0.6890672", "0.68711567", "0.68644845", "0.6863001", "0.6847125", "0.6840681", "0.67723966", "0.67638385", "0.67563325", "0.6737281", "0.6731066", "0.66589737", "0.66570556", "0.6597901", "0.6595326", "0.6583719", "0.6577439", "0.6571482", "0.6562454", "0.6558123", "0.6555712", "0.6546138", "0.65399104", "0.65357107", "0.6529236", "0.6525436", "0.6521492", "0.6516617", "0.6516051", "0.65141976", "0.6510664", "0.6503466", "0.6500373", "0.6487944", "0.648414", "0.6475098", "0.64662176", "0.6458952", "0.64559394", "0.6447056", "0.6431635", "0.64123625", "0.6402728", "0.64003736", "0.63950855", "0.6393328", "0.63928646", "0.6392121", "0.63877475", "0.6387497", "0.6387212", "0.6384587", "0.63816404", "0.63748497", "0.6365175", "0.6364522", "0.6358206", "0.63569385", "0.63546157", "0.63536966", "0.6350029", "0.63461083", "0.633263", "0.6328896", "0.63240206", "0.63221514", "0.6320609", "0.631566", "0.6308427", "0.6306962", "0.6306449", "0.6303783", "0.6302742", "0.6295195", "0.62943023", "0.6283981", "0.62832046", "0.62828857", "0.628052", "0.62767303", "0.62688184", "0.626659", "0.62639844", "0.62571305", "0.6249467", "0.6248646", "0.6246925", "0.6244789", "0.62439996", "0.6242189", "0.62381923" ]
0.0
-1
Convenience method to check both if a required family, as well as an asset in that family exists.
public <T extends Asset> boolean exists(String id, Class<T> family) { if (!this.registeredFamily(family)) { return false; } return this.getFamily(family).contains(id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isSetFamilyAssets() {\n return EncodingUtils.testBit(__isset_bitfield, __FAMILYASSETS_ISSET_ID);\n }", "public boolean isFamily(String familyId);", "boolean hasAsset();", "private boolean isFamilyInsurance(final InsuranceExtraFacility insuranceExtra)\r\n {\r\n return insuranceExtra.getInsuranceExcessWaiver().getPrice() != null\r\n && insuranceExtra.getInsuranceType() == InsuranceType.FAMILY;\r\n }", "public static boolean hasAsset(Asset asset) {\n \t\treturn hasAsset(asset.getId());\n \t}", "boolean containsRequirementFor(AResourceType type);", "public static boolean isValidFamily( String family )\n {\n return validFamilies.contains( family );\n }", "public static boolean isFamily( String family )\n {\n return isOs( family, null, null, null );\n }", "boolean hasCampaignAsset();", "boolean isApplicableForAllAssetTypes();", "Reservation checkReservationByFamilyName(String familyName);", "boolean hasManufacturer();", "private boolean belongsTo(Thing thing, List<Gender> genders) {\n if (genders == null || genders.size() == 0) {\n return true;\n }\n\n for (Gender gender : genders) {\n if (thing.getGender().equals(gender.getGenderEn())) {\n return true;\n }\n }\n return false;\n }", "public boolean isSetFamilyIncome() {\n return EncodingUtils.testBit(__isset_bitfield, __FAMILYINCOME_ISSET_ID);\n }", "boolean hasPropType();", "private boolean hasRequirements() {\n \t\tif (checkHasRequirements) {\n \t\t\thasRequirements = pullRequired(requiredInput, false);\n \t\t\tcheckHasRequirements = false;\n \t\t}\n \t\treturn hasRequirements;\n \t}", "boolean hasResourceType();", "public boolean isAmendmentExists(Amendment amendment);", "public abstract boolean exists();", "IRequirement and(IRequirement requirement);", "public boolean isAssetValid(T asset);", "public abstract boolean doesExist();", "boolean hasGoodsType();", "@Override\r\n\tpublic boolean check(FamilyMember f) {\r\n\t\tif(unlimited){\r\n\t\t\treturn this.familiarValueCheck(f)&&this.actionArea.check(f);\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn this.familiarValueCheck(f)&&this.actionArea.check(f)&&this.getFamiliarIn().isEmpty();\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n\tpublic boolean hasResource(ResourcePackType p_195764_1_, ResourceLocation p_195764_2_) {\n\t\treturn false;\n\t}", "boolean hasReqardTypeThree();", "boolean hasResource();", "boolean isApplicableForAssetType(final AssetType assetType);", "@Override\n\tpublic boolean isExists(AbilityFlavorText entity) {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic <S extends Employee> boolean exists(Example<S> arg0) {\n\t\treturn false;\r\n\t}", "Boolean nodeMeetsRequirements(PathFindingNode node, PathFindingRequirements requirements);", "public boolean hasFamily2() {\n return fieldSetFlags()[7];\n }", "boolean isHasResources();", "public boolean isSatisfiedBy(Object obj) {\n for (Class<?> klass : _klasses) {\n if (obj != null && klass.isAssignableFrom(obj.getClass())) {\n return true;\n }\n }\n return false;\n }", "boolean hasEntity();", "boolean hasEntity();", "private static void checkIfFound(final Object toCheck, final String path) {\n if (toCheck == null) {\n resourceNotFound(path);\n }\n if (toCheck instanceof String s && s.isEmpty()) {\n resourceNotFound(path);\n }\n if (toCheck instanceof File f && !f.exists()) {\n resourceNotFound(path);\n }\n }", "public boolean ifExists(String isbn13) {\r\n\t\treturn false;\r\n\r\n\t}", "@Override\n\tpublic boolean mealExists(Meal meal) {\n\t\treturn false;\n\t}", "boolean hasExists();", "public boolean fExists(){\n \n try(ObjectInputStream ois = new ObjectInputStream(new FileInputStream(file))){\n \n }\n catch (FileNotFoundException e){\n System.out.println(\"File not found\");\n return false;\n }\n catch (IOException e){\n System.out.println(\"Another exception\");\n return false;\n }\n\n return true;\n }", "private boolean isValid(){\n\n Set<ResourceSingle> checkSet = new HashSet<>();\n return shelves.stream()\n .map(Shelf::getCurrentType)\n .filter(Objects::nonNull)\n .allMatch(checkSet::add);\n }", "public boolean matches(FontData fd) {\r\n\t\treturn fd.getName().equals(name) && fd.getHeight() == height && fd.getStyle() == style;\r\n\t}", "boolean exists();", "boolean exists();", "@Override\n\tprotected boolean isSupportedByEntity(final Action action, final String entity) {\n\t\treturn action.getName().equals(\"occupy\");\n\t}", "public boolean hasFather() {\n\t\treturn !fathers.isEmpty();\n\t}", "@Override\n public boolean isExists(Buyer buyer) {\n return false;\n }", "boolean hasCar();", "public boolean has(String itemName);", "boolean hasUses();", "@Override\n public boolean impliedPartExists() {\n return true;\n }", "public synchronized boolean hasFriendRequest(FriendRequest req) {\n \t\treturn indexOfFriendRequest(req) != -1;\n \t}", "boolean hasHasAlcoholSpecimanType();", "boolean existsInManifest(Path path);", "public static boolean hasAsset(MD5Key key) {\n \t\treturn assetMap.containsKey(key) || assetIsInPersistentCache(key) || assetHasLocalReference(key);\n \t}", "public boolean validateRequirement_OnlyOneRequirementSubtype(Requirement requirement, DiagnosticChain diagnostics, Map<Object, Object> context) {\n\t\treturn requirement.OnlyOneRequirementSubtype(diagnostics, context);\n\t}", "private boolean isAttributeDefined(String attrName)\n {\n return getAttributes().get(attrName) != null;\n }", "private boolean contains(Bundle bundle, ScopeUpdateImpl scopeUpdate) {\n\t\treturn parent == null ? contains0(bundle, scopeUpdate) : parent.contains(bundle, scopeUpdate);\n\t}", "private boolean canHaveAsPatientFile(PatientFile creator) {\n\n\t\treturn creator != null;\n\t}", "boolean hasIngredientsFor(Drink drink);", "boolean isSatisfiableFor(AResourceType type, int amount) ;", "private boolean doesFileExist(String qualifiedFileName) throws FileNotFoundException {\n\t\t\n\t\t// First get a path object to where the file is.\n\t\t\n\t\tPath inWhichFolder = Paths.get(qualifiedFileName);\n\t\t\n\t\tboolean isFilePresent = (Files.exists(inWhichFolder) && Files.isReadable(inWhichFolder) && !Files.isDirectory(inWhichFolder));\n\t\t\n\t\tif (!isFilePresent) {\n\t\t\tthrow new FileNotFoundException(String.format(\"The file you specified '%s' does not exist or cannot be found!\", qualifiedFileName));\n\t\t\t\n\t\t}\n\t\t\n\t\t// If we're here then we should have a file that can be opened and read.\n\t\t\n\t\treturn isFilePresent;\n\t\t\n\t}", "@Override\n\tpublic boolean exists(String arg0) {\n\t\treturn false;\n\t}", "public boolean list_exists(Context context) {\n File file = context.getFileStreamPath(\"ingredientes\");\n if (file == null || !file.exists()) {\n return false;\n }\n return true;\n }", "private boolean isAvailable() {\n\t\tfor (int i = 0; i < lawsuitsAsClaimant.size(); i++) {\n\t\t\tif (lawsuitsAsClaimant.get(i).isActive()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check lawsuits as Defendant\n\t\tfor (int i = 0; i < lawsuitsAsDefendant.size(); i++) {\n\t\t\tif (lawsuitsAsDefendant.get(i).isActive()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean hasParty( EAIMMCtxtIfc theCtxt, com.dosmil_e.mall.core.ifc.MallPartyIfc theParty) throws EAIException;", "public abstract boolean hasSkill(Skill skill);", "public abstract boolean isNatureExist(long id);", "private boolean existsSubResource()\r\n {\r\n return ((subResource_ != null) && subResource_.exists());\r\n }", "public boolean check(ItemStack item) {\n return item != null && item.getType() == material && item.hasItemMeta() && item.getItemMeta().hasDisplayName() && item.getItemMeta().getDisplayName().equals(displayName);\n }", "public boolean checkContain(Hero h) {\r\n return team.contains(h);\r\n }", "public boolean isSetFamilyControl() {\n return EncodingUtils.testBit(__isset_bitfield, __FAMILYCONTROL_ISSET_ID);\n }", "public boolean hasImage(){\n //return true or false\n return mImageResource != NO_IMAGE_PROVIDED;\n }", "boolean isRequired();", "boolean isRequired();", "boolean isRequired();", "public boolean attributeExists(String aname) {\n for (String s : attributes) {\n if (aname.equals(s))\n return true;\n }\n return false;\n }", "private boolean checkAttributes(ExportPkg ep, ImportPkg ip) {\n /* Mandatory attributes */\n if (!ip.checkMandatory(ep.mandatory)) {\n return false;\n }\n /* Predefined attributes */\n if (!ip.okPackageVersion(ep.version) ||\n (ip.bundleSymbolicName != null &&\n !ip.bundleSymbolicName.equals(ep.bpkgs.bundle.symbolicName)) ||\n !ip.bundleRange.withinRange(ep.bpkgs.bundle.version)) {\n return false;\n }\n /* Other attributes */\n for (Iterator i = ip.attributes.entrySet().iterator(); i.hasNext(); ) {\n Map.Entry e = (Map.Entry)i.next();\n String a = (String)ep.attributes.get(e.getKey());\n if (a == null || !a.equals(e.getValue())) {\n return false;\n }\n }\n return true;\n }", "public boolean exists( Conge conge ) ;", "@Override\r\n\tpublic boolean beneficiaryExists(Beneficiary beneficiary) {\n\t\tif(beneficiary.getBeneficiaryAccNo() !=0) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn false;\t\r\n\t}", "boolean hasOccupation();", "boolean hasOccupation();", "boolean hasOccupation();", "boolean hasOccupation();", "boolean hasOccupation();", "public boolean hasAttribute(String name)\n/* */ {\n/* 1234 */ return findAttribute(name) != null;\n/* */ }", "protected boolean arff_exists() {\n\t\tFile tmpDir = new File(arff_path + \"\\\\\" + taskdata_name + \".arff\");\n\t\treturn tmpDir.exists();\n\t}", "public boolean exists()\n\t{\n\n\t\treturn true;\n\t}", "boolean hasProduces();", "private boolean alreadyHasWeapon(Actor actor) {\n\t\tboolean hasWeapon = false;\n\t\t\n\t\tList<Item> inventory = actor.getInventory();\n\t\t\n\t\tfor (int x = 0; x < inventory.size(); x++) {\n\t\t\tif (inventory.get(x) instanceof Weapon) {\n\t\t\t\thasWeapon = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn hasWeapon;\n\t}", "@Override\n public boolean isValid() {\n if(width < 0){\n return false;\n }\n\n if(height < 0){\n return false;\n }\n\n //no null objects\n if(origin == null){\n return false;\n }\n\n if(color == null){\n return false;\n }\n\n //if texture doesn't exist, sprite is not buildable\n if(!Gdx.files.internal(texture).exists()){\n Gdx.app.log(TAG, \"Texture cannot be found: \" + texture);\n return false;\n }\n\n return true;\n }", "public abstract boolean exists() throws AccessException;", "public boolean exists(String arg0) {\n\t\treturn false;\n\t}", "public boolean exists(String arg0) {\n\t\treturn false;\n\t}", "public boolean exists(String arg0) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isSatisfied(Object arg0, Object arg1, OValContext arg2,\n\t\t\tValidator arg3) throws OValException {\n\t\treturn false;\n\t}", "public boolean isExplicitForeignCheckRequired();", "public boolean isOwnerKnown() {\n\t\tif (owner == null && possibleOwners.size() == 1)\n\t\t\towner = possibleOwners.get(0);\n\t\t\t\n\t\treturn (owner == null);\n\t}", "protected void checkScopePermission(Set<String> scopes, Set<String> requiredScopes) {\n\t\tfor (String requiredScope : requiredScopes) {\n\t\t\tif (!scopes.contains(requiredScope)) {\n\t\t\t\tthrow new ScopeMissingException(requiredScope);\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.6586042", "0.6296603", "0.6051889", "0.5883376", "0.57603556", "0.57001626", "0.5541006", "0.5528344", "0.552759", "0.5473102", "0.5454707", "0.5435595", "0.51442087", "0.51317334", "0.51301193", "0.51151294", "0.51053566", "0.5102705", "0.5100583", "0.50937736", "0.5091143", "0.50680274", "0.50381166", "0.50313157", "0.5019653", "0.50092465", "0.4998538", "0.49957898", "0.49692848", "0.49305347", "0.49000856", "0.4893392", "0.487175", "0.48708573", "0.48266518", "0.48266518", "0.4821266", "0.48168972", "0.4799954", "0.47859925", "0.47801194", "0.47764257", "0.47587505", "0.47538185", "0.47538185", "0.47495258", "0.47482467", "0.47470605", "0.47413456", "0.47321397", "0.47191414", "0.4699512", "0.46994704", "0.4694701", "0.46766987", "0.46729115", "0.4670326", "0.4669572", "0.465562", "0.465296", "0.46501228", "0.46423104", "0.4642161", "0.46398428", "0.46391177", "0.46290958", "0.46214062", "0.46205682", "0.4620078", "0.4618135", "0.46146145", "0.46003562", "0.45875978", "0.45874164", "0.4586426", "0.4586426", "0.4586426", "0.45844242", "0.4583265", "0.45809817", "0.457181", "0.45662794", "0.45662794", "0.45662794", "0.45662794", "0.45662794", "0.45641023", "0.45594555", "0.4559007", "0.4552776", "0.45522538", "0.45483738", "0.45443538", "0.45436037", "0.45436037", "0.45436037", "0.45424712", "0.45405185", "0.45357734", "0.45342198" ]
0.68586814
0
should no applicable family exist, register a family of the type of asset created note that registering families implicitly BEFORE loading assets is to be preferred, as families can then contain multiple shared subclasses of an asset type this behaviour is disabled in safe mode
public <T extends Asset> void load(T asset, String key, Class<T> type) { if (AssetManager.UNSAFE && this.getFamily(type) == null) { Engine.Log.warning("[ASSETMANAGER] unsafe asset family creation with family type '" + type.getSimpleName() + "'"); this.registerFamily(new AssetFamily<>(type)); } AssetFamily<T> family = this.getFamily(type); family.put(key, asset); asset.key(key); Engine.Log.info("[ASSETMANAGER] [LOADING] asset " + key + " in family " + type.getSimpleName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public <T extends Asset> boolean exists(String id, Class<T> family)\n {\n if (!this.registeredFamily(family))\n {\n return false;\n }\n\n return this.getFamily(family).contains(id);\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 FamilyType getBaseTypeFromFamilyType(FamilyType type) {\n switch (type) {\n case ARTIX7:\n return FamilyType.ARTIX7;\n case ARTIX7L:\n return FamilyType.ARTIX7;\n case ASPARTAN2E:\n return FamilyType.SPARTAN2E;\n case ASPARTAN3:\n return FamilyType.SPARTAN3;\n case ASPARTAN3A:\n return FamilyType.SPARTAN3A;\n case ASPARTAN3ADSP:\n return FamilyType.SPARTAN3ADSP;\n case ASPARTAN3E:\n return FamilyType.SPARTAN3E;\n case ASPARTAN6:\n return FamilyType.SPARTAN6;\n case KINTEX7:\n return FamilyType.KINTEX7;\n case KINTEX7L:\n return FamilyType.KINTEX7;\n case QARTIX7:\n return FamilyType.ARTIX7;\n case QKINTEX7:\n return FamilyType.KINTEX7;\n case QRVIRTEX:\n return FamilyType.VIRTEX;\n case QRVIRTEX2:\n return FamilyType.VIRTEX2;\n case QRVIRTEX4:\n return FamilyType.VIRTEX4;\n case QRVIRTEX5:\n return FamilyType.VIRTEX5;\n case QRVIRTEX6:\n return FamilyType.VIRTEX6;\n case QRVIRTEX7:\n return FamilyType.VIRTEX7;\n case QSPARTAN6:\n return FamilyType.SPARTAN6;\n case QSPARTAN6L:\n return FamilyType.SPARTAN6;\n case QVIRTEX:\n return FamilyType.VIRTEX;\n case QVIRTEX2:\n return FamilyType.VIRTEX2;\n case QVIRTEX2P:\n return FamilyType.VIRTEX2P;\n case QVIRTEX4:\n return FamilyType.VIRTEX4;\n case QVIRTEX5:\n return FamilyType.VIRTEX5;\n case QVIRTEX6:\n return FamilyType.VIRTEX6;\n case QVIRTEX7:\n return FamilyType.VIRTEX7;\n case QVIRTEXE:\n return FamilyType.VIRTEXE;\n case SPARTAN2:\n return FamilyType.SPARTAN2;\n case SPARTAN2E:\n return FamilyType.SPARTAN2E;\n case SPARTAN3:\n return FamilyType.SPARTAN3;\n case SPARTAN3A:\n return FamilyType.SPARTAN3A;\n case SPARTAN3ADSP:\n return FamilyType.SPARTAN3ADSP;\n case SPARTAN3E:\n return FamilyType.SPARTAN3E;\n case SPARTAN6:\n return FamilyType.SPARTAN6;\n case SPARTAN6L:\n return FamilyType.SPARTAN6;\n case VIRTEX:\n return FamilyType.VIRTEX;\n case VIRTEX2:\n return FamilyType.VIRTEX2;\n case VIRTEX2P:\n return FamilyType.VIRTEX2P;\n case VIRTEX4:\n return FamilyType.VIRTEX4;\n case VIRTEX5:\n return FamilyType.VIRTEX5;\n case VIRTEX6:\n return FamilyType.VIRTEX6;\n case VIRTEX6L:\n return FamilyType.VIRTEX6;\n case VIRTEX7:\n return FamilyType.VIRTEX7;\n case VIRTEX7L:\n return FamilyType.VIRTEX7;\n case VIRTEXE:\n return FamilyType.VIRTEXE;\n default:\n return null;\n }\n }", "Builder addIsFamilyFriendly(String value);", "protected abstract void registerSuperTypes();", "public String createFamily(String name);", "public <T> void addFamily(Family f) {\n\t\tassert f != null;\n\t\tMap<String, Object> parameters = new HashMap<>();\n\t\tparameters.put(\"name\", f.getName());\n\t\tsession.query(GraphQueries.ADD_FAMILY, parameters);\n\t}", "boolean registerType(SpawnType spawnType);", "public void setFamily(String family) {\n this.family = family;\n }", "private static void registerBiomes(Biome biome, Type... types) {\n if(UniversalConfig.biomes_can_generate.get()) {\n BiomeManager.addBiome(BiomeManager.BiomeType.WARM, new BiomeManager.BiomeEntry(biome, 5));\n BiomeManager.addBiome(BiomeManager.BiomeType.ICY, new BiomeManager.BiomeEntry(biome, 5));\n BiomeManager.addBiome(BiomeManager.BiomeType.COOL, new BiomeManager.BiomeEntry(biome, 5));\n BiomeDictionary.addTypes(biome, types);\n BiomeManager.addSpawnBiome(biome);\n }\n\n\n }", "Builder addIsFamilyFriendly(Boolean value);", "ILitePackFamily getFamily();", "@Override\n\tpublic void getAllFamilies() {\n\n\t}", "public static void registerTypeface(@NonNull Typeface typeface, @Nullable Object tag) {\n checkNotNull(typeface, \"typeface\");\n\n synchronized (TypefaceManager.class) {\n checkArgument(!typefaces.contains(typeface), \"This typeface is already registered\");\n\n if (tag != null) {\n checkArgument(!tags.containsKey(tag), \"This tag is already taken\");\n\n tags.put(tag, typeface);\n typeface.tag = tag;\n }\n\n sorted = false;\n typefaces.add(typeface);\n }\n }", "@Override\n public void onDiscovery(String typeName, ClassLoader classLoader, JavaModule module, boolean loaded) {\n }", "void registerSelf(EntityType<?>... entityTypes);", "private void scanAndRegisterTypes() throws Exception {\n ScannedClassLoader scl = ScannedClassLoader.getSystemScannedClassLoader();\n // search annotations\n Iterator<Metadata> it = scl.getAll(MetadataType.class, Metadata.class); //CellFactorySPI.class);\n logger.log(Level.INFO, \"[Metadata Service] about to search classloader\");\n while (it.hasNext()) {\n Metadata metadata = it.next();\n logger.log(Level.INFO, \"[Metadata Service] using system scl, scanned type:\" + metadata.simpleName());\n registerMetadataType(metadata);\n }\n }", "public interface IGameAsset {\n\t\n\t/**\n\t * abstract method for load all game's resources in startup time.\n\t */\n\tpublic void load();\n\n\t/**\n\t * Dispose the resources in game asset when exiting game\n\t */\n\tpublic void dispose();\n\t\n\t/**\n\t * load a bitmap font by font file (*.fnt) and font image file\n\t * @param fileFont font\n\t * @param fileImage font image\n\t * @return\n\t */\n\tpublic BitmapFont loadBitmapFont(String fileFont, String fileImage);\n\t/**\n\t * Load a Music by filepath name\n\t * @param fileName music filepath to load.\n\t * @param isLoop set audio is looping\n\t * @param volumn the Volumn (0f -> 1f)\n\t * @return the Music\n\t */\n\tpublic Music loadMusic(String fileName, boolean isLoop, float volumn);\n\t/**\n\t * Load Music by filepath name\n\t * @param fileName music filepath to load.\n\t * @return\n\t */\n\tpublic Music loadMusic(String fileName);\n\t/**\n\t * Load a Music by filepath name\n\t * @param fileName music filepath to load.\n\t * @param volumn the Volumn (0f -> 1f)\n\t * @return\n\t */\n\tpublic Music loadMusic(String fileName, float volume);\n\t/**\n\t * Load a Sound from filepath\n\t * @param file File to load\n\t * @return the Sound\n\t */\n\tpublic Sound loadSound(String file);\n\n\t/**\n\t * Load a shader from shader-vs and shader-fs from file path\n\t * @param vsProcess\n\t * @param fsProcess\n\t * @return ShaderProgram\n\t */\n\tpublic ShaderProgram loadShader(String vsProcess, String fsProcess);\n\n\t/**\n\t * Load a Model for object 3D from file path\n\t * @param filepath\n\t * @return\n\t */\n\tpublic StillModel loadModel(String filepath);\n\t/**\n\t * Load texture from file path\n\t * @param file File to load\n\t * @return The texture\n\t */\n\tpublic Texture loadTexture(String file, Format format, boolean useMipMap);\n\n//\t/**abstract method for load TextureRegion\n//\t * @param filepath File to load\n//\t * @param format format of texture\n//\t * @param useMipMap\n//\t * @param rec \n//\t * @return\n//\t */\n//\tTextureRegion loadTextureRegion(String filepath, Format format,\n//\t\t\tboolean useMipMap, Rectangle rec);\n\n\t/**abstract method for load TextureRegion\n\t * @param texture texture of TextureRegion\n\t * @param rec rectangle used to specify the region on texture\n\t * @return\n\t */\n\tpublic TextureRegion loadTextureRegion(Texture texture, Rectangle rec);\n\t/**\n\t * load a bitmap font by font file (*.fnt) and font image file\n\t * @param fileFont font\n\t * @param fileImage font image\n\t * @param flip Flip the font for axis-y down\n\t * @return\n\t */\n\tpublic BitmapFont loadBitmapFont(String fileFont, String fileImage, boolean flip);\n\n\tpublic TextureRegion loadTextureRegion(Texture t);\n\n\tTextureRegion loadTextureRegion(String textureFile, Rectangle rec);\n\n\tTextureRegion loadTextureRegion(String textureFile);\n\n\tTexture loadTexture(String filepath);\n\n\tBitmapFont loadBitmapFont(String fileFont);\n\n\tShaderProgram loadShader(String vsFilePath);\n}", "public abstract void register();", "public void preLoadContent(AssetManager manager) {\n\t\tif (worldAssetState != AssetState.EMPTY) {\n\t\t\treturn;\n\t\t}\n\n\t\tworldAssetState = AssetState.LOADING;\n\n\t\tmanager.load(KOI_TEXTURE, Texture.class);\n\t\tassets.add(KOI_TEXTURE);\n\n\t\tmanager.load(ENEMY_TEXTURE, Texture.class);\n\t\tassets.add(ENEMY_TEXTURE);\n\n\t\tmanager.load(LILY_TEXTURE, Texture.class);\n\t\tassets.add(LILY_TEXTURE);\n\t\t\n\t\tmanager.load(LILY_TEXTURE_N, Texture.class);\n\t\tassets.add(LILY_TEXTURE_N);\n\t\t\n\t\tmanager.load(LILY_TEXTURE_S, Texture.class);\n\t\tassets.add(LILY_TEXTURE_S);\n\n\t\tmanager.load(LANTERN_TEXTURE, Texture.class);\n\t\tassets.add(LANTERN_TEXTURE);\n\n\t\tmanager.load(LIGHTING_TEXTURE, Texture.class);\n\t\tassets.add(LIGHTING_TEXTURE);\n\n\t\tmanager.load(SHADOW_TEXTURE, Texture.class);\n\t\tassets.add(SHADOW_TEXTURE);\n\n\t\tmanager.load(GOAL_TEXTURE, Texture.class);\n\t\tassets.add(GOAL_TEXTURE);\n\n\t\tmanager.load(EARTH_FILE,Texture.class);\n\t\tassets.add(EARTH_FILE);\n\n\t\tmanager.load(EARTH_FILE_D,Texture.class);\n\t\tassets.add(EARTH_FILE_D);\n\t\tmanager.load(EARTH_FILE_N,Texture.class);\n\t\tassets.add(EARTH_FILE_N);\n\t\tmanager.load(EARTH_FILE_S,Texture.class);\n\t\tassets.add(EARTH_FILE_S);\n\t\tmanager.load(SHORE_FILE,Texture.class);\n\t\tassets.add(SHORE_FILE);\n\n\t\tmanager.load(ROCK_FILE_D,Texture.class);\n\t\tassets.add(ROCK_FILE_D);\n\t\tmanager.load(ROCK_FILE_N,Texture.class);\n\t\tassets.add(ROCK_FILE_N);\n\t\tmanager.load(ROCK_FILE_S,Texture.class);\n\t\tassets.add(ROCK_FILE_S);\n\n\t\tmanager.load(WHIRLPOOL_TEXTURE, Texture.class);\n\t\tassets.add(WHIRLPOOL_TEXTURE);\n\t\t\n\t\tmanager.load(ENERGYBAR_TEXTURE, Texture.class);\n\t\tassets.add(ENERGYBAR_TEXTURE);\n\n\t\tmanager.load(UI_FLOWER, Texture.class);\n\t\tassets.add(UI_FLOWER);\n\n\t\tmanager.load(OVERLAY, Texture.class);\n\t\tassets.add(OVERLAY);\n\n\t\tmanager.load(BACKGROUND_FILE_N, Texture.class);\n\t\tassets.add(BACKGROUND_FILE_N);\n\n\t\tmanager.load(BACKGROUND_FILE_D, Texture.class);\n\t\tassets.add(BACKGROUND_FILE_D);\n\n\t\tmanager.load(BACKGROUND_FILE_S, Texture.class);\n\t\tassets.add(BACKGROUND_FILE_S);\n\t\t\n\t\t\n\n\t\tmanager.load(OVERLAY_FILE, Texture.class);\n\t\tassets.add(OVERLAY_FILE);\n\n\t\tmanager.load(KOI_ARROW, Texture.class);\n\t\tassets.add(KOI_ARROW);\n\t\tmanager.load(WHIRL_ARROW, Texture.class);\n\t\tassets.add(WHIRL_ARROW);\n\t\t\n\t\tmanager.load(TUTORIAL_TEXTURE1, Texture.class);\n\t\tassets.add(TUTORIAL_TEXTURE1);\n\t\tmanager.load(TUTORIAL_TEXTURE2, Texture.class);\n\t\tassets.add(TUTORIAL_TEXTURE2);\n\t\tmanager.load(TUTORIAL_TEXTURE3, Texture.class);\n\t\tassets.add(TUTORIAL_TEXTURE3);\n\t\tmanager.load(TUTORIAL_TEXTURE4, Texture.class);\n\t\tassets.add(TUTORIAL_TEXTURE4);\n\t\tmanager.load(TUTORIAL_TEXTURE5, Texture.class);\n\t\tassets.add(TUTORIAL_TEXTURE5);\n\t\tmanager.load(TUTORIAL_TEXTURE6, Texture.class);\n\t\tassets.add(TUTORIAL_TEXTURE6);\n\t\t\n\t\tmanager.load(HELP_TEXTURE, Texture.class);\n\t\tassets.add(HELP_TEXTURE);\n\t\t\n\n\t\treferenceC.a = 0f;\n\n\t\t// Load the font\n\t\tFreetypeFontLoader.FreeTypeFontLoaderParameter size2Params = new FreetypeFontLoader.FreeTypeFontLoaderParameter();\n\t\tsize2Params.fontFileName = FONT_FILE;\n\t\tsize2Params.fontParameters.size = FONT_SIZE;\n\t\tmanager.load(FONT_FILE, BitmapFont.class, size2Params);\n\t\tassets.add(FONT_FILE);\n\n\t\tFreetypeFontLoader.FreeTypeFontLoaderParameter size3Params = new FreetypeFontLoader.FreeTypeFontLoaderParameter();\n\t\tsize3Params.fontFileName = FONT_FILE2;\n\t\tsize3Params.fontParameters.size = FONT_SIZE2;\n\t\tmanager.load(FONT_FILE2, BitmapFont.class, size3Params);\n\t\tassets.add(FONT_FILE2);\n\t\t\n\t\t\n\t}", "Get<K, C> addFamily(String family);", "public boolean isSetFamilyAssets() {\n return EncodingUtils.testBit(__isset_bitfield, __FAMILYASSETS_ISSET_ID);\n }", "public static void initLoaderType() {\r\n boolean autoaddBoolean = GrouperLoaderConfig.retrieveConfig().propertyValueBoolean(\"loader.autoadd.typesAttributes\", true);\r\n\r\n if (!autoaddBoolean) {\r\n return;\r\n }\r\n\r\n GrouperSession grouperSession = null;\r\n\r\n try {\r\n\r\n grouperSession = GrouperSession.startRootSession(false);\r\n\r\n GrouperSession.callbackGrouperSession(grouperSession, new GrouperSessionHandler() {\r\n\r\n public Object callback(GrouperSession grouperSession)\r\n throws GrouperSessionException {\r\n try {\r\n \r\n GroupType loaderType = GroupType.createType(grouperSession, \"grouperLoader\", false);\r\n\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderType\", false);\r\n \r\n loaderType.addAttribute(grouperSession,\"grouperLoaderDbName\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderScheduleType\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderQuery\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderQuartzCron\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderIntervalSeconds\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderPriority\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderAndGroups\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderGroupTypes\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderGroupsLike\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderGroupQuery\", false);\r\n\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderDisplayNameSyncBaseFolderName\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderDisplayNameSyncLevels\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderDisplayNameSyncType\", false);\r\n\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderFailsafeUse\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderMaxGroupPercentRemove\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderMaxOverallPercentGroupsRemove\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderMaxOverallPercentMembershipsRemove\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderMinGroupSize\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderMinManagedGroups\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderFailsafeSendEmail\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderMinGroupNumberOfMembers\", false);\r\n loaderType.addAttribute(grouperSession,\"grouperLoaderMinOverallNumberOfMembers\", false);\r\n \r\n } catch (Exception e) {\r\n throw new RuntimeException(e.getMessage(), e);\r\n } finally {\r\n GrouperSession.stopQuietly(grouperSession);\r\n }\r\n return null;\r\n }\r\n\r\n });\r\n\r\n //register the hook if not already\r\n GroupTypeTupleIncludeExcludeHook.registerHookIfNecessary(true);\r\n \r\n } catch (Exception e) {\r\n throw new RuntimeException(\"Problem adding loader type/attributes\", e);\r\n }\r\n\r\n }", "public Family(){\n super();\n }", "public interface IAssetManager {\n\n}", "private void registerGlow()\n {\n try {\n Field f = Enchantment.class.getDeclaredField(\"acceptingNew\");\n f.setAccessible(true);\n f.set(null, true);\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n try {\n GlowEnchantment glow = new GlowEnchantment(70);\n Enchantment.registerEnchantment(glow);\n }\n catch (IllegalArgumentException e){\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }", "public void registerVariants(){\n\t\tModelResourceLocation[] variants = new ModelResourceLocation[metaNames.length];\r\n\t\tfor(int i = 0; i < metaNames.length; i++){\r\n\t\t\tvariants[i] = new ModelResourceLocation(ElementsMod.MODID + \":\" + getNameFromDamage(i), \"inventory\");\r\n\t\t}\r\n\t\tModelBakery.registerItemVariants(ItemManager.apple, variants);\r\n\t}", "public void register(WorldGenKawaiiBaseWorldGen.WorldGen gen)\r\n\t{\t\r\n\t\tif (!this.Enabled) return; \r\n\t\tGameRegistry.registerBlock(this, this.getUnlocalizedName());\r\n\t\t\r\n\t\tString saplingName = name + \".sapling\";\r\n\t\tSapling = new ItemKawaiiSeed(saplingName, SaplingToolTip, this);\r\n\t\tSapling.OreDict = SaplingOreDict;\r\n\t\tSapling.MysterySeedWeight = SeedsMysterySeedWeight;\r\n\t\tSapling.register();\r\n\r\n\t\tString fruitName = name + \".fruit\";\r\n\t\tif (FruitEdible)\r\n\t\t{\r\n\t\t\tItemKawaiiFood fruit = new ItemKawaiiFood(fruitName, FruitToolTip, FruitHunger, FruitSaturation, FruitPotionEffets);\r\n\t\t\tFruit = fruit;\r\n\t\t\tfruit.OreDict = FruitOreDict;\r\n\t\t\t\r\n\t\t\tfruit.register();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tItemKawaiiIngredient fruit = new ItemKawaiiIngredient(fruitName, FruitToolTip);\r\n\t\t\tFruit = fruit;\r\n\t\t\tfruit.OreDict = FruitOreDict;\r\n\t\t\t\r\n\t\t\tfruit.register();\r\n\t\t}\r\n\t\t\r\n\t\tif (gen.weight > 0)\r\n\t\t{\r\n\t\t\tgen.generator = new WorldGenKawaiiTree(this);\r\n\t\t\tModWorldGen.WorldGen.generators.add(gen);\r\n\t\t}\r\n\r\n\t\tModBlocks.AllTrees.add(this);\t\t\r\n\t}", "public void registerWorldChunkManager() {\n\t\tthis.worldChunkMgr = new WorldChunkManagerHell(BiomeGenBase.sky, 0.5F, 0.0F);\n\t\tthis.dimensionId = 1;\n\t\tthis.hasNoSky = true;\n\t}", "public <K, V> void registerInheritableEntity(Class<K> clazz, ICapabilityConstructor<?, V, V> constructor) {\n checkNotBaked();\n capabilityConstructorsEntitySuper.add(\n Pair.<Class<?>, ICapabilityConstructor<?, ?, ?>>of(clazz, constructor));\n\n if (!registeredEntityEventListener) {\n registeredEntityEventListener = true;\n MinecraftForge.EVENT_BUS.register(new EntityEventListener());\n }\n }", "private static Typeface createTypeface(int style) {\n for (String family : FAMILIES) {\n Typeface tf = Typeface.create(family, style);\n if (tf.getStyle() == style) {\n return tf;\n }\n }\n return null;\n }", "public interface IAssetFontView {\n\n Context getContext();\n void setTypeface(Typeface typeFace);\n}", "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}", "public void create(AssetType type) {\n entityManager.persist(type);\n return;\n }", "public void registerWorldChunkManager()\n\t{\n\t\tthis.worldChunkMgr = new WorldChunkMangerHeaven(worldObj.getSeed(), terrainType);\n\t\tthis.hasNoSky = false;\n\t}", "private Asset() {\r\n super(IAsset.TYPE_ID);\r\n }", "String getFamily();", "String getFamily();", "public String createAssetClass(AssetClass assetClass_);", "synchronized private void tryRegisterPlugin(String name, Class<IKomorebiPlugin> pluginClass){\r\n\t\t\r\n\t\t// check status\r\n\t\tKomorebiPluginStatus pStatus = pluginClass.getAnnotation(KomorebiPluginStatus.class);\r\n\t\tif(pStatus != null){\r\n\t\t\tif(pStatus.disabled()){\r\n\t\t\t\tLogger.getLogger(LOGGER_NAME).info(\"Plugin '\"+pluginClass.getName()+\"' is disabled.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// check if configuration consumer is correctly implemented\r\n\t\ttry{\r\n\t\t\tConstructor<IKomorebiPlugin> c = pluginClass.getConstructor();\r\n\t\t\tIKomorebiPlugin pi = c.newInstance();\r\n\t\t\tif(pi.isConfigConsumer() && !IKomorebiConfigurationConsumer.class.isAssignableFrom(pluginClass)){\r\n\t\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' does not adhere to defined standards (configuration consumer) and will be omitted.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}catch(NoSuchMethodException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' does not adhere to defined standards (default constructor) and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(InvocationTargetException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(IllegalAccessException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(InstantiationException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(IKomorebiStorage.class.isAssignableFrom(pluginClass)){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).info(\"Registered storage PlugIn '\"+pluginClass.getName()+\"'\");\r\n\t\t\tif(!pluginRegister.containsKey(PluginType.STORAGE)){\r\n\t\t\t\t// if submap does not already exist it has to be created\r\n\t\t\t\tpluginRegister.put(PluginType.STORAGE, new HashMap<String, Class<IKomorebiPlugin>>());\r\n\t\t\t}\r\n\t\t\tpluginRegister.get(PluginType.STORAGE).put(name, pluginClass);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn;\r\n\t}", "@Override\n\tpublic void getFamilyById(int id) {\n\n\t}", "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 }", "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}", "public void registerMetamodels(ResourceSet rs, IbexExecutable executable) throws IOException {\r\n\t\t\r\n\t\t// Set correct workspace root\r\n\t\tsetWorkspaceRootDirectory(rs);\r\n\t\t\r\n\t\t// Load and register source and target metamodels\r\n\t\tEPackage familiesPack = null;\r\n\t\tEPackage personsPack = null;\r\n\t\tEPackage benchmarxfamiliestopersonsPack = null;\r\n\t\t\r\n\t\tif(executable instanceof FWD_OPT) {\r\n\t\t\tResource res = executable.getResourceHandler().loadResource(\"platform:/resource/Persons/model/Persons.ecore\");\r\n\t\t\tpersonsPack = (EPackage) res.getContents().get(0);\r\n\t\t\trs.getResources().remove(res);\r\n\t\t\t\r\n\t\t\tres = executable.getResourceHandler().loadResource(\"platform:/resource/BenchmarxFamiliesToPersons/model/BenchmarxFamiliesToPersons.ecore\");\r\n\t\t\tbenchmarxfamiliestopersonsPack = (EPackage) res.getContents().get(0);\r\n\t\t\trs.getResources().remove(res);\r\n\t\t}\r\n\t\t\t\t\r\n\t\tif(executable instanceof BWD_OPT) {\r\n\t\t\tResource res = executable.getResourceHandler().loadResource(\"platform:/resource/Families/model/Families.ecore\");\r\n\t\t\tfamiliesPack = (EPackage) res.getContents().get(0);\r\n\t\t\trs.getResources().remove(res);\r\n\t\t\t\r\n\t\t\tres = executable.getResourceHandler().loadResource(\"platform:/resource/BenchmarxFamiliesToPersons/model/BenchmarxFamiliesToPersons.ecore\");\r\n\t\t\tbenchmarxfamiliestopersonsPack = (EPackage) res.getContents().get(0);\r\n\t\t\trs.getResources().remove(res);\r\n\t\t}\r\n\r\n\t\tif(familiesPack == null)\r\n\t\t\tfamiliesPack = FamiliesPackageImpl.init();\r\n\t\t\t\t\r\n\t\tif(personsPack == null)\r\n\t\t\tpersonsPack = PersonsPackageImpl.init();\r\n\t\t\r\n\t\tif(benchmarxfamiliestopersonsPack == null) {\r\n\t\t\tbenchmarxfamiliestopersonsPack = BenchmarxFamiliesToPersonsPackageImpl.init();\r\n\t\t\trs.getPackageRegistry().put(\"platform:/resource/BenchmarxFamiliesToPersons/model/BenchmarxFamiliesToPersons.ecore\", BenchmarxFamiliesToPersonsPackage.eINSTANCE);\r\n\t\t\trs.getPackageRegistry().put(\"platform:/plugin/BenchmarxFamiliesToPersons/model/BenchmarxFamiliesToPersons.ecore\", BenchmarxFamiliesToPersonsPackage.eINSTANCE);\r\n\t\t}\r\n\t\t\t\r\n\t\trs.getPackageRegistry().put(\"platform:/resource/Families/model/Families.ecore\", familiesPack);\r\n\t rs.getPackageRegistry().put(\"platform:/plugin/Families/model/Families.ecore\", familiesPack);\t\r\n\t\t\t\r\n\t\trs.getPackageRegistry().put(\"platform:/resource/Persons/model/Persons.ecore\", personsPack);\r\n\t\trs.getPackageRegistry().put(\"platform:/plugin/Persons/model/Persons.ecore\", personsPack);\r\n\t}", "Map<String, TypeInformation<?>> getFamilyInfo(String family) {\n\t\treturn familyMap.get(family);\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 }", "@Override\n\tpublic void registerWorldChunkManager() {\n\t\tworldChunkMgr = new zei_WorldChunkManagerZeitgeist(giants, worldObj);\n\t\tworldType = 99;\n\t\thasNoSky = false;\n\t}", "public Family getFamily() {\r\n return pic_.getFamily();\r\n }", "DatastoreMetadataFactory<EntityMetadata, Discriminator> getMetadataFactory();", "public HashMap<String,HashSet<String>> loadTypes(String commonTypeInstanceFile) throws Exception;", "boolean isApplicableForAllAssetTypes();", "@Override\n public void preInit(FMLPreInitializationEvent event)\n {\n EntityRegistry.registerModEntity(new ResourceLocation(ModInfo.MOD_ID, \"goomba\"), EntityGoomba.class, ModInfo.MOD_ID + \":goomba\", 0, MarioMod2.INSTANCE, 128, 1, false);\n EntityRegistry.registerModEntity(new ResourceLocation(ModInfo.MOD_ID, \"koopa\"), EntityKoopa.class, ModInfo.MOD_ID + \":koopa\", 1, MarioMod2.INSTANCE, 128, 1, false);\n EntityRegistry.registerModEntity(new ResourceLocation(ModInfo.MOD_ID, \"fireball\"), EntityFireball.class, ModInfo.MOD_ID + \":fireball\", 2, MarioMod2.INSTANCE, 64, 1, true);\n }", "public abstract void createSprites() throws FileNotFoundException;", "public boolean isFamily(String familyId);", "@Override\n protected String resourceName() {\n return AvailabilityForItemResource.FAMILY;\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 void setDetector() {\n\n try {\n AssetManager assetManager = getAssets();\n String[] fileList = assetManager.list(modelPath);\n String modelType = dlaasD.ReturnModelType(assetManager, modelPath);\n\n if (fileList.length != 0) {\n\n if (modelType.equals(\"mobilenet_1\")) {\n detector = new MobileNet(rs, assetManager, modelPath);\n } else {\n\n detector = new MobileNetSSD(rs, assetManager, modelPath);\n }\n } else {\n if (modelType.equals(\"mobilenet_1\")) {\n String modelDir = Environment.getExternalStorageDirectory().getPath() + \"/\" + modelPath;\n detector = new MobileNet(rs, assetManager, modelDir);\n } else {\n String modelDir = Environment.getExternalStorageDirectory().getPath() + \"/\" + modelPath;\n detector = new MobileNetSSD(rs, assetManager, modelDir);\n }\n\n }\n } catch (IOException e) {\n Log.d(\"onFindModule: \", e.toString());\n e.printStackTrace();\n }\n }", "private void AddMetaRegistrationInformation(Registration reg) {\n }", "default AssetType getAssetType() {\n throw new UnsupportedOperationException();\n }", "void registerFallback(EntityApiProvider<A, C> fallbackProvider);", "public void setFamilyInfo(FamilyInfo[] familyInfo) {\n this.familyInfo = familyInfo;\n }", "private void settypeface() {\n }", "public void setFamily(Vertex family) {\n\t\tthis.family = family;\n\t}", "public EntityRegister() {\r\n\t\tObjectifyService.register(Empleado.class);\r\n\t\tObjectifyService.register(Empresa.class);\r\n\t\tObjectifyService.register(Regimen.class);\r\n\t\tObjectifyService.register(Factura.class);\r\n\t\tObjectifyService.register(DeduccionInfonavit.class);\r\n\t\tregistrar(DeduccionAusentismo.class);\r\n\t\tObjectifyService.register(Pago.class);\r\n\t\tregistrar(Emisor.class);\r\n\t\tregistrar(DatosEmisor.class);\r\n\t\tregistrar(Catalogos.class);\r\n\t\tregistrar(EntTipoPercepcion.class);\r\n\t\tregistrar(EntTipoDeduccion.class);\r\n\t\tregistrar(TipoRegimenContratacion.class);\r\n\t\tregistrar(CatalogosContabilidadPropia.class);\r\n\t\tregistrar(ContabilidadPropiaTipoPercepcion.class);\r\n\t\tregistrar(ContabilidadPropiaTipoDeduccion.class);\r\n\t\tregistrar(IndicadorNomina.class);\r\n\t\tregistrar(PercepcionHorasExtra.class);\r\n\t\tregistrar(PercepcionPrimaSeguroDeVida.class);\r\n\t\tregistrar(PercepcionCuotaSindical.class);\r\n\t\tregistrar(PercepcionSubsidiosIncapacidad.class);\r\n\t\tregistrar(PercepcionPrimaDominical.class);\r\n\t\tregistrar(PrimaRiesgoDeTrabajo.class);\r\n\r\n\t\tObjectifyService.register(TarifaSubsidio.class);\r\n\t\tObjectifyService.register(TarifaTrabajoRealizado.class);\r\n\t\tObjectifyService.register(TarifaSemanal.class);\r\n\t\tObjectifyService.register(TarifaDecenal.class);\r\n\t\tObjectifyService.register(TarifaQuincenal.class);\r\n\t\tObjectifyService.register(TarifaMensual.class);\r\n\t\tObjectifyService.register(Perfil.class);\r\n\t\tObjectifyService.register(RegistroBitacora.class);\r\n\t\tregistrar(ContadorEmpleados.class);\r\n\t\tregistrar(Conceptos.class);\r\n\t\tregistrar(Serial.class);\r\n\t\tregistrar(Imagen.class);\r\n\t\tregistrar(FacturaRenglon.class);\r\n\r\n\t\tregistrar(Municipio.class);\r\n\t\tregistrar(CFDINominaAsimilado.class);\r\n\t\tregistrar(NominaIASRenglon.class);\r\n\t\tregistrar(ListaDeClasesDeProdServ.class);\r\n\t\tregistrar(TrabajadorIAS.class);\r\n\t\tregistrar(FacturaVTT.class);\r\n\t\tregistrar(ConjuntoIAS.class);\r\n\t}", "@Override\n\tprotected void addTags(HolderLookup.Provider provider) {\n\t\ttag(ConventionalBiomeTags.DESERT);\n\t\ttag(ConventionalBiomeTags.SAVANNA);\n\t\ttag(ConventionalBiomeTags.FOREST);\n\t\ttag(ConventionalBiomeTags.MUSHROOM);\n\t\ttag(ConventionalBiomeTags.UNDERGROUND);\n\t\ttag(ConventionalBiomeTags.MESA);\n\t\ttag(ConventionalBiomeTags.MOUNTAIN);\n\t\ttag(ConventionalBiomeTags.PLAINS);\n\t\ttag(ConventionalBiomeTags.BEACH);\n\t\ttag(ConventionalBiomeTags.SWAMP);\n\t\ttag(ConventionalBiomeTags.JUNGLE);\n\t\ttag(ConventionalBiomeTags.TREE_CONIFEROUS);\n\t\ttag(ConventionalBiomeTags.CLIMATE_COLD);\n\t\ttag(ConventionalBiomeTags.SNOWY);\n\t\ttag(BotaniaTags.Biomes.MARIMORPHOSIS_DESERT_BONUS).addTag(ConventionalBiomeTags.DESERT).addTag(ConventionalBiomeTags.SAVANNA);\n\t\ttag(BotaniaTags.Biomes.MARIMORPHOSIS_FOREST_BONUS).addTag(ConventionalBiomeTags.FOREST);\n\t\ttag(BotaniaTags.Biomes.MARIMORPHOSIS_FUNGAL_BONUS).addTag(ConventionalBiomeTags.MUSHROOM).addTag(ConventionalBiomeTags.UNDERGROUND);\n\t\ttag(BotaniaTags.Biomes.MARIMORPHOSIS_MESA_BONUS).addTag(ConventionalBiomeTags.MESA).addTag(ConventionalBiomeTags.SAVANNA);\n\t\ttag(BotaniaTags.Biomes.MARIMORPHOSIS_MOUNTAIN_BONUS).addTag(ConventionalBiomeTags.MOUNTAIN);\n\t\ttag(BotaniaTags.Biomes.MARIMORPHOSIS_PLAINS_BONUS).addTag(ConventionalBiomeTags.PLAINS).addTag(ConventionalBiomeTags.BEACH);\n\t\ttag(BotaniaTags.Biomes.MARIMORPHOSIS_SWAMP_BONUS).addTag(ConventionalBiomeTags.SWAMP).addTag(ConventionalBiomeTags.JUNGLE);\n\t\ttag(BotaniaTags.Biomes.MARIMORPHOSIS_TAIGA_BONUS).addTag(ConventionalBiomeTags.TREE_CONIFEROUS).addTag(ConventionalBiomeTags.CLIMATE_COLD).addTag(ConventionalBiomeTags.SNOWY);\n\t}", "@SuppressWarnings(\"unused\")\n public static CallSite bsm_newBackSpecies(MethodHandles.Lookup lookup, MethodType type, String name, String owner, String genericName) throws Throwable {\n Class<?> frontClass = ClassLoader.getSystemClassLoader().loadClass(owner);\n return new ConstantCallSite(createBackSpecies(lookup, type, frontClass, genericName));\n }", "public void spawn(boolean type)\n\t{\n\t\tif (type)\n\t\t{\n\t\t\triver[findEmpty()] = new Bear();\n\t\t}\n\t\telse\n\t\t{\n\t\t\triver[findEmpty()] = new Fish();\n\t\t}\n\t}", "public void loadGraphicAssets(int deviceType) {\n\t\tif (loaded) {\n\t\t\t// skip as already loaded\n\t\t\t//Log.d(TAG, \"already loaded...\");\n\t\t}\n\t\telse {\n\t\t\tassetFolder = mobileAssetFolder;\n\t\t\t//TODO\n\t\t\t/*\n\t\t\t * rem'd for getting app to store...\n\t\t\t * -testing\n\t\t\t * \n\t\t\tif (deviceType == FFScreen.MOBILE) {\n\t\t\t\tassetFolder = mobileAssetFolder;\n\t\t\t}\n\t\t\telse if (deviceType == FFScreen.TABLET) {\n\t\t\t\tassetFolder = tabletAssetFolder;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// deviceType == NO_DEVICE, fallback\n\t\t\t\tassetFolder = mobileAssetFolder;\n\t\t\t}\n\t\t\t*/\n\t\t\tsetAssetFolders();\n\t\t\tgraphicsLoader();\n\t\t}\t\t\n\t}", "boolean hasAsset();", "public static void registerBlockEntities()\n\t{\n\t}", "private void addToOutOfTypeSystemData(String typeName, Attributes attrs)\n throws XCASParsingException {\n if (this.outOfTypeSystemData != null) {\n FSData fsData = new FSData();\n fsData.type = typeName;\n fsData.indexRep = null; // not indexed\n String attrName, attrValue;\n for (int i = 0; i < attrs.getLength(); i++) {\n attrName = attrs.getQName(i);\n attrValue = attrs.getValue(i);\n if (attrName.startsWith(reservedAttrPrefix)) {\n if (attrName.equals(XCASSerializer.ID_ATTR_NAME)) {\n fsData.id = attrValue;\n } else if (attrName.equals(XCASSerializer.CONTENT_ATTR_NAME)) {\n this.currentContentFeat = attrValue;\n } else if (attrName.equals(XCASSerializer.INDEXED_ATTR_NAME)) {\n fsData.indexRep = attrValue;\n } else {\n fsData.featVals.put(attrName, attrValue);\n }\n } else {\n fsData.featVals.put(attrName, attrValue);\n }\n }\n this.outOfTypeSystemData.fsList.add(fsData);\n this.currentOotsFs = fsData;\n // Set the state; we're ready to accept the \"content\" feature,\n // if one is specified\n this.state = OOTS_CONTENT_STATE;\n }\n }", "public static ArrayList<FamilyType> getAvailableFamilies() {\n ArrayList<FamilyType> allFamilies = new ArrayList<FamilyType>();\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n FamilyType type = PartNameTools.getFamilyTypeFromFamilyName(partFamily);\n if (type != null) allFamilies.add(type);\n }\n\n return allFamilies;\n }", "abstract public void loadSprite();", "private void registerAllKnownModules() throws ModulesFactoryException\n\t{\n\t\tfor(MODULE_TYPE m: MODULE_TYPE.values() )\n\t\t{\n\t\t\tthis.allocator.registerModule(ModulesFactory.getModule(m));\n\t\t}\n\t}", "@Override\n\t\t\t\t\tpublic void beginLoad(int type) {\n\n\t\t\t\t\t}", "public void add(String name, FileHandle font) {\n if (contains(name)) {\n return;\n }\n generators.put(name, new FreeTypeFontGenerator(font));\n }", "public AssetClass findAssetClassByName(String name_);", "@Override\n\tpublic boolean supports(Class<?> clazz) {\n\t\treturn _ImageCarrier.class.isAssignableFrom(clazz);\n\t}", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n\n\n super.onCreate(savedInstanceState);\n\n\n mTfRegular = Typeface.createFromAsset(getAssets(), \"OpenSans-Regular.ttf\");\n mTfLight = Typeface.createFromAsset(getAssets(), \"OpenSans-Light.ttf\");\n\n\n }", "public interface EnemyShipPartsFactory {\n ESWeapon addESGun();\n ESEngine addESEngine();\n}", "private Path createMobStoreFile(String family) throws IOException {\n return createMobStoreFile(HBaseConfiguration.create(), family);\n }", "public static void loadCreatures() {\r\n\t \tregisterEntity(EntityZertum.class, \"Zertum\", 0);\r\n\t \tEntityRegistry.addSpawn(EntityZertum.class, 10, 2, 5, EnumCreatureType.creature);\r\n\t \tregisterEntity(EntityRedZertum.class, \"RedZertum\", 1);\r\n\t \tEntityRegistry.addSpawn(EntityRedZertum.class, 10, 3, 6, EnumCreatureType.creature);\r\n\t \tregisterEntity(EntityDestroZertum.class, \"DestroZertum\", 2);\r\n\t \tEntityRegistry.addSpawn(EntityDestroZertum.class, 10, 3, 6, EnumCreatureType.creature);\r\n\t \tregisterEntity(EntityJakan.class, \"Jakan\", 3);\r\n\t \tEntityRegistry.addSpawn(EntityJakan.class, 10, 3, 6, EnumCreatureType.creature);\r\n\t \tregisterEntity(EntityJakanPrime.class, \"JakanPrime\", 4);\r\n\t \tEntityRegistry.addSpawn(EntityJakanPrime.class, 10, 3, 6, EnumCreatureType.creature);\r\n\t}", "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 }", "@Override\n\tprotected void customizeRegistration(Dynamic registration) {\n\tsuper.customizeRegistration(registration);\n\t}", "public void register(GameObject gameObject) {\r\n\t\tsuper.register((Object)gameObject);\r\n\t}", "void registerInstantiating (ClassType c) {\r\n if (instantiating_classes == null) \r\n instantiating_classes = new ClassList ();\r\n else if (instantiating_classes.contains (c)) \r\n return;\r\n\r\n instantiating_classes.add (c);\r\n }", "public interface FsBundle {\n Type getType();\n\n Path getPath();\n\n /**\n * All files inside the bundle, all paths are relative to its root and sorted.\n */\n List<Path> getFiles();\n\n String getVendor();\n\n String getId();\n\n Optional<String> getVersion();\n\n String getArchiveName();\n\n default Path getArchivePath(Path archivesDir) {\n return archivesDir\n .resolve(getVendor())\n .resolve(getArchiveName() + ARCHIVE_EXTENSION);\n }\n\n default URI getDownloadUrl(URI bundlesRepository) {\n String repo = bundlesRepository.toString();\n String repoSlash = repo.endsWith(\"/\") ? repo : repo + \"/\";\n return URI.create(repoSlash + getVendor() + \"/\" + getArchiveName() + ARCHIVE_EXTENSION);\n }\n\n default Path getMetadataPath() {\n return getPath().resolve(METADATA_FILE);\n }\n\n default Path getTemplatePath() {\n return getPath().resolve(TEMPLATE_FILE);\n }\n}", "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}", "@Test\n @Ignore\n public void testRegistration() {\n ROIAwareWarpDescriptor.register();\n ScaleDescriptor.register();\n AffineDescriptor.register();\n }", "@Override\r\n\tprotected void initLoad() {\n\r\n\t}", "public String getFamily()\n {\n return _family;\n }", "private static void check(TypeDescriptor<?> descriptor, Class<?> type, String key, boolean checkRegistered) \n throws VilException {\n if (null != descriptor) {\n String msg = ArtifactFactory.checkReplacement(descriptor.getTypeClass(), type);\n if (null != msg) {\n throw new VilException(msg, VilException.ID_ALREADY_REGISTERED);\n }\n if (checkRegistered && type.equals(descriptor.getTypeClass())) {\n throw new VilException(\"type '\" + key + \"' is already registered\", \n VilException.ID_ALREADY_REGISTERED);\n }\n if (!descriptor.getTypeClass().isAssignableFrom(type)) {\n throw new VilException(\"type replacement requires subtype relationship\", \n VilException.ID_TYPE_INCOMPATIBILITY);\n }\n }\n }", "private void registerTypeSystemsWithCasManager() throws Exception {\n CasManager manager = cpeFactory.getResourceManager().getCasManager();\n\n ProcessingResourceMetaData crMetaData = collectionReader.getProcessingResourceMetaData();\n if (crMetaData != null) {\n manager.addMetaData(crMetaData);\n }\n if (collectionReader instanceof CollectionReader) {\n CasInitializer casIni = ((CollectionReader) collectionReader).getCasInitializer();\n if (casIni != null && casIni.getProcessingResourceMetaData() != null) {\n manager.addMetaData(casIni.getProcessingResourceMetaData());\n }\n } else if (collectionReader instanceof CasDataCollectionReader) {\n CasDataInitializer casIni = ((CasDataCollectionReader) collectionReader)\n .getCasDataInitializer();\n if (casIni != null && casIni.getCasInitializerMetaData() != null) {\n manager.addMetaData(casIni.getCasInitializerMetaData());\n }\n }\n for (int i = 0; i < annotatorList.size(); i++) {\n ProcessingContainer container = (ProcessingContainer) annotatorList.get(i);\n if (container.getStatus() == Constants.CAS_PROCESSOR_DISABLED) {\n continue; // skip over disabled CasProcessors\n }\n if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),\n \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE,\n \"UIMA_CPM_checkout_cp_from_container__FINEST\",\n new Object[] { Thread.currentThread().getName(), container.getName() });\n }\n CasProcessor processor = container.getCasProcessor();\n try {\n if (processor instanceof AnalysisEngineImplBase) {\n // Integrated AEs already have added their metadata to the CasManager during\n // their initialization, so we don't need to do it again.\n // (Exception: when running from \"old\" CPM interface - where AEs are created outside\n // and passed in, the AE may not share a ResourceManager with the CPE. In that case\n // we DO need to register its metadata.)\n if (((AnalysisEngine) processor).getResourceManager() == cpeFactory\n .getResourceManager()) {\n continue;\n }\n }\n ProcessingResourceMetaData md = processor.getProcessingResourceMetaData();\n\n if (md != null) {\n manager.addMetaData(md);\n }\n } finally {\n container.releaseCasProcessor(processor);\n }\n }\n for (int i = 0; i < consumerList.size(); i++) {\n ProcessingContainer container = (ProcessingContainer) consumerList.get(i);\n if (container.getStatus() == Constants.CAS_PROCESSOR_DISABLED) {\n continue; // skip over disabled CasProcessors\n }\n\n if (UIMAFramework.getLogger().isLoggable(Level.FINE)) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.FINE, this.getClass().getName(),\n \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE,\n \"UIMA_CPM_checkout_cp_from_container__FINEST\",\n new Object[] { Thread.currentThread().getName(), container.getName() });\n }\n\n CasProcessor processor = container.getCasProcessor();\n try {\n if (processor instanceof AnalysisEngineImplBase) {\n // (Exception: when running from \"old\" CPM interface - where AEs are created outside\n // and passed in, the AE may not share a ResourceManager with the CPE. In that case\n // we DO need to register its metadata.)\n if (((AnalysisEngine) processor).getResourceManager() == cpeFactory\n .getResourceManager()) {\n continue;\n }\n }\n ProcessingResourceMetaData md = processor.getProcessingResourceMetaData();\n\n if (md != null) {\n manager.addMetaData(md);\n }\n } finally {\n container.releaseCasProcessor(processor);\n }\n }\n }", "@Override\n\tpublic void registerRecipes() {\n\n\t\tItemStack block, ingot;\n\n\t\tfor (MetalType metal : MetalType.VALUES) {\n\n\t\t\tblock = this.createItemStack(metal, 1);\n\t\t\tingot = BrItems.ingotMetals.createItemStack(metal, 1);\n\n\t\t\tGameRegistry.addShapelessRecipe(block, ingot, ingot, ingot, ingot, ingot, ingot, ingot, ingot, ingot);\n\t\t\tingot.stackSize = 9;\n\t\t\tGameRegistry.addShapelessRecipe(ingot, block);\n\t\t}\n\n\t\t// Ludicrite block. Because.\n\n\t\tfinal ItemStack ludicriteBlock = this.createItemStack(MetalType.Ludicrite, 1);\n\n\t\tGameRegistry.addRecipe(new ShapedOreRecipe(ludicriteBlock, \"BPB\", \"ENE\", \"BPB\",\n\t\t\t\t'N', Items.NETHER_STAR, 'P', Items.ENDER_PEARL, 'E', Blocks.EMERALD_BLOCK,\n\t\t\t\t'B', BigReactors.CONFIG.recipeBlutoniumIngotName));\n\n\t\tif (OreDictionaryHelper.doesOreNameExist(\"blockEnderium\")) {\n\n\t\t\t// Ok, how about some ludicrous shit here. Enderium and blaze rods. Have fun, bucko.\n\t\t\tGameRegistry.addRecipe(new ShapedOreRecipe(ludicriteBlock, \"BRB\", \"E E\", \"BRB\",\n\t\t\t\t\t'B', BigReactors.CONFIG.recipeBlutoniumIngotName, 'R', Items.BLAZE_ROD, 'E', \"blockEnderium\"));\n\t\t}\n\t}", "public interface ITexturable<T extends AbstractElement> extends IElement<T> {\n /**\n * Sets the background image for an element\n */\n default T background(ResourceUrn urn) {\n get(ImageCmp.class).ifPresentOrElse(bgCmp -> {\n var texture = Assets.get(urn, Texture.class);\n if (texture.isEmpty())\n logger().warn(\"Failed to find texture {} for element {}\", urn, name());\n else\n bgCmp.setTexture(texture.get());\n }, () -> {\n var bgCmp = new ImageCmp(cast());\n var texture = Assets.get(urn, Texture.class);\n if (texture.isEmpty())\n logger().warn(\"Failed to find texture {} for element {}\", urn, name());\n else\n bgCmp.setTexture(texture.get());\n add(bgCmp);\n });\n return cast();\n }\n\n /**\n * Sets the background texture to the texture with the given name\n */\n default T background(Name name) {\n return background(new ResourceUrn(new Name(\"engine\"), new Name(\"textures\"), name));\n }\n\n}", "public <T extends Entity> void registerEntity(Class<T> clazz, ICapabilityConstructor<?, T, T> constructor) {\n checkNotBaked();\n List<ICapabilityConstructor<?, ? extends Entity, ? extends Entity>> constructors = capabilityConstructorsEntity.get(clazz);\n if (constructors == null) {\n constructors = Lists.newArrayList();\n capabilityConstructorsEntity.put(clazz, constructors);\n }\n constructors.add(constructor);\n\n if (!registeredEntityEventListener) {\n registeredEntityEventListener = true;\n MinecraftForge.EVENT_BUS.register(new EntityEventListener());\n }\n }", "@Override\n public void addLoaders(WorldLoader wl, WorldInfo info) {\n }", "public static void registerFluids() {\n\t\tfluidWormSaliva = createFluid(\"fluid_worm_saliva\", \"mb:blocks/fluid_worm_saliva\", true, 10, 1, 1500, false,\n\t\t\t\tfluid -> new FluidWormSaliva(fluid, new MaterialLiquid(MapColor.adobeColor))).setLuminosity(200);\n\t\t\n\t\tfluidWormBlood = createFluid(\"fluid_worm_blood\", \"mb:blocks/fluid_worm_blood\", true, 10, 1, 1500, false,\n\t\t\t\tfluid -> new FluidWormBlood(fluid, new MaterialLiquid(MapColor.adobeColor)));\n\t\t\n\t\tfluidTempWormBlood = createFluid(\"fluid_temp_worm_blood\", \"mb:blocks/fluid_worm_blood\", true, 10, 1, 1500, false,\n\t\t\t\tfluid -> new FluidTempWormBlood(fluid, new MaterialLiquid(MapColor.adobeColor)));\n\t\tGameRegistry.registerTileEntity(TileEntityTempWormBlood.class, Reference.MOD_ID + \":tileEntityTempWormBlood\");\n\n\t\t\n\t\tfluidWormAcid = createFluid(\"fluid_worm_acid\", \"mb:blocks/fluid_worm_acid\", true, 10, 1, 1500, false,\n\t\t\t\tfluid -> new FluidWormAcid(fluid, new MaterialLiquid(MapColor.adobeColor))).setLuminosity(200);\n\n\t\tfluidTempWormAcid = createFluid(\"fluid_temp_worm_acid\", \"mb:blocks/fluid_worm_acid\", true, 10, 1, 1500, false,\n\t\t\t\tfluid -> new FluidTempWormAcid(fluid, new MaterialLiquid(MapColor.adobeColor))).setLuminosity(200);\n\n\t\tgasWormGas = createFluid(\"gas_worm_gas\", \"mb:blocks/gas_worm_gas\", true, 10, -10000, 100, true,\n\t\t\t\tfluid -> new GasWormGas(fluid, new MaterialLiquid(MapColor.adobeColor)));\n\t}", "@Override\n public void setTypeface() {\n mAppNameTxt.setTypeface(Typeface.createFromAsset(getContext().getAssets(),\n CUSTOM_FONTS_ROOT + CUSTOM_FONT_NAME));\n }", "public void registerRenders() {\n }" ]
[ "0.5477647", "0.54150534", "0.5289556", "0.528526", "0.5222143", "0.5215128", "0.5203781", "0.51529324", "0.5062926", "0.50567544", "0.50539696", "0.5031431", "0.4976729", "0.49538806", "0.49299422", "0.4880265", "0.48594898", "0.48320243", "0.4812971", "0.48021254", "0.4792489", "0.47850206", "0.47810686", "0.47741422", "0.47710446", "0.47520304", "0.47469205", "0.47459826", "0.4740617", "0.47395927", "0.4732263", "0.4711066", "0.4705054", "0.46843722", "0.46721843", "0.4671067", "0.4667467", "0.4667467", "0.46611658", "0.4654391", "0.4648559", "0.46339956", "0.46311706", "0.46250334", "0.46082664", "0.45983645", "0.45970422", "0.4569156", "0.45668113", "0.45527184", "0.4551534", "0.45507511", "0.4547847", "0.45389497", "0.45337614", "0.45326853", "0.45268157", "0.45045596", "0.44998327", "0.44891036", "0.4480162", "0.4478949", "0.44747275", "0.44745836", "0.4469517", "0.4459103", "0.4453454", "0.44489732", "0.44365716", "0.4433505", "0.44214246", "0.44205138", "0.4416669", "0.44107282", "0.44089806", "0.4407092", "0.4406803", "0.44001788", "0.43900985", "0.43891573", "0.4382915", "0.43812227", "0.43799317", "0.4375116", "0.43717593", "0.43679798", "0.43651828", "0.43645653", "0.43636948", "0.43621966", "0.4358634", "0.43575284", "0.43568173", "0.4355642", "0.43417895", "0.43410182", "0.43384972", "0.4336144", "0.43347567", "0.4327363" ]
0.57826203
0
Send back the received message to the remote peer.
@Override public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) { transferredBytes.addAndGet(((ChannelBuffer) e.getMessage()) .readableBytes()); logger.info("收到消息: "+e.getMessage()); e.getChannel().write(e.getMessage()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Message sendReceive(Message msg) throws IOException {\r\n\t\treturn this.sendReceive(msg, port, addr);\r\n\t}", "synchronized void sendMessage(Message message) throws IOException {\n socketOutput.reset();\n socketOutput.writeObject(message);\n socketOutput.flush();\n }", "private void returnToSender(ClientMessage m) {\n\n if (m.returnToSender) {\n // should never happen!\n // System.out.println(\"**** Returning to sender says EEK\");\n return;\n }\n\n // System.out.println(\"**** Returning to sender says her I go!\");\n m.returnToSender = true;\n forward(m, true);\n }", "void receiveFromServer(PlayerMessage playerMessage) throws RemoteException;", "public void sendMsg(){\r\n\t\tsuper.getPPMsg(send);\r\n\t}", "public void sendMessage(String message){\n\t if (mOut != null && !mOut.checkError()) {\n\t mOut.println(message+\"\\n\");\n\t mOut.flush();\n\t }\n\t }", "public Reply end_sendMessage(Ice.AsyncResult __iresult)\n {\n IceInternal.OutgoingAsync __result = IceInternal.OutgoingAsync.check(__iresult, this, __sendMessage_name);\n try\n {\n if(!__result.__wait())\n {\n try\n {\n __result.throwUserException();\n }\n catch(Ice.UserException __ex)\n {\n throw new Ice.UnknownUserException(__ex.ice_name(), __ex);\n }\n }\n IceInternal.BasicStream __is = __result.startReadParams();\n Reply __ret = null;\n __ret = Reply.__read(__is, __ret);\n __result.endReadParams();\n return __ret;\n }\n finally\n {\n if(__result != null)\n {\n __result.cacheMessageBuffers();\n }\n }\n }", "private void sendReceiveRes(){\n\t}", "@Override\n public void sendMessage(Message m) {\n commSender.sendMessage(m);\n }", "public void sendMessage(String message) {\n\t\tsocketTextOut.println(message);\n\t\tsocketTextOut.flush();\n\t}", "@Override\n public void send(String message) {\n\n out.println(message);\n out.flush();\n\n }", "public void send(Message message) {\r\n channel.writeAndFlush(message);\r\n }", "public void sendMessage(String message) {\r\n\r\n synchronized (this) {\r\n //count++;\r\n if (mBufferOut != null && !mBufferOut.checkError()) {\r\n Log.i(TAG, \"message: \" + message);\r\n mBufferOut.print(message);\r\n mBufferOut.flush();\r\n }\r\n }\r\n }", "@Override\n public void sendMessage(Message<JsonPayload> message) throws IOException {\n System.out.println(\"Trying to send a message...\");\n outputMessageStream.write(message.getContent().getJson());\n outputMessageStream.newLine();\n outputMessageStream.flush();\n socket.shutdownOutput();\n }", "public synchronized Message sendReceive(Message msg, int port,\r\n\t\t\tInetAddress host) throws IOException {\r\n\r\n\t\tthis.sendTo(msg, port, host);\r\n\t\tMessage res = this.receive();\r\n\r\n\t\treturn res;\r\n\t}", "public void send(Message msg);", "public void sendMessage(String message){\n pw.print(message);\n pw.flush();\n }", "public int sendMsg () {\n\t\tSimpleMessage msg;\n\t\t\n\t\tmsg = router.poll(); // Get message at the head of router\n\t\t\n\t\t//Get sender and receiver to pass it to the transport layer\n\t\tNode sender = msg.sender;\n\t\tNode receiver = msg.receiver;\n\t\t\n\t\t// Send message\t\t\n\t\t((Transport)sender.getProtocol(FastConfig.getTransport(pid))).\n\t\tsend(\n\t\t\tsender,\n\t\t\treceiver,\n\t\t\tmsg,\n\t\t\tpid);\n\t\t\t\t\n\t\treturn msg.size;\n\t}", "public void sendMessage(common.messages.KVMessage msg) throws IOException {\r\n\t\tbyte[] msgBytes = msg.getMsgBytes();\r\n\t\toutput.write(msgBytes, 0, msgBytes.length);\r\n\t\toutput.flush();\r\n\t\tlogger.debug(\"SEND \\t<\" \r\n\t\t\t\t+ clientSocket.getInetAddress().getHostAddress() + \":\" \r\n\t\t\t\t+ clientSocket.getPort() + \">: '\" \r\n\t\t\t\t+ msg.getMsg() +\"'\");\r\n }", "void sendMessage(String msg) {\n\t\ttry {\n\t\t\tout.writeObject(msg);\n\t\t\tout.flush();\n\t\t\tSystem.out.println(\"Sending to client => \" + msg);\n\t\t} catch (IOException ioException) {\n\t\t\tioException.printStackTrace();\n\t\t}\n\t}", "public void tellServer(String message)\n\t{\n\t\ttoServer.println(message);\n\t\ttoServer.flush();\n\t}", "public void sendMessage(byte[] message) {\n\t\ttry {\n\t\t\ttoBeSent.put(message);\n\t\t} catch (InterruptedException e) { }\n\t}", "public void sendMessage(Message message) {\n if (accepted || !ended || message.type.equals(\"register\") || message.type.equals(\"lobby\")) {\n message.packetNum = packetNum;\n ByteBuffer buffer = ByteBuffer.wrap(SerializationUtils.serialize(message));\n SocketAddress addr = null;\n try {\n addr = client.getLocalAddress();\n log(\"sending [\" + message + \"] to \" + addr);\n client.write(buffer);\n reconciliation.add(message);\n packetNum++;\n } catch (IOException e) {\n error(\"Failed to send message to:\" + addr);\n e.printStackTrace();\n }\n }\n }", "public void relay(Message msg) throws IOException {\n if (Destination.BROADCAST.name().equals(msg.getDestination())) {\n bradcast(msg);\n return;\n }\n usersConnected.get(msg.getDestination()).sendMessage(msg);\n }", "public void send (final TCNetworkMessage message) {\n if (channelSessionID == ((DSOMessageBase)message).getLocalSessionID()) {\n super.send(message); \n } else {\n logger.info(\"Drop old message: \"+ ((DSOMessageBase)message).getMessageType() + \" Expected \"+ channelSessionID + \" but got \" + ((DSOMessageBase)message).getLocalSessionID());\n }\n }", "public static void SendAndReceive() throws IOException {\n\t\t\tbyte[]buffer = new byte[BUFFER_SIZE];\n\n\t\t\t/* Create remote endpoint */\n\t\t\tSocketAddress remoteBindPoint = new InetSocketAddress(IP, PORT);\n\n\t\t\t/* Create datagram packet for sending message */\n\t\t\tDatagramPacket sendPacket = new DatagramPacket(MSG.getBytes(), MSG.length(), remoteBindPoint);\n\n\t\t\t/* Create datagram packet for receiving echoed message */\n\t\t\tDatagramPacket receivePacket = new DatagramPacket(buffer, buffer.length);\n\n\t\t\t/* Send and receive message*/\n\t\t\tsocket.send(sendPacket);\n\t\t\t//System.out.println(\"SAR\");\n\t\t\tsocket.receive(receivePacket);\n\n\t\t\t/* Compare sent and received message */\n\t\t\tString receivedString = new String(receivePacket.getData(), receivePacket.getOffset(), receivePacket.getLength());\n\t\t\tif (receivedString.compareTo(MSG) == 0)\n\t\t\t\tSystem.out.printf(\"%d bytes sent and received\\n\", receivePacket.getLength());\n\t\t\telse\n\t\t\t\tSystem.out.printf(\"Sent and received msg not equal!\\n\");\n\n\n\t\t}", "public void sendMessage(CommMessage resultMsg) throws IOException\r\n\t{\r\n\t\tfinal AsyncCallback callback;\r\n\t\tsynchronized (callbacks)\r\n\t\t{\r\n\t\t\t//receive the resulting message\r\n\t\t\tcallback = (AsyncCallback) callbacks.remove(resultMsg.getXID());\r\n\t\t}\r\n\t\tif (callback != null)\r\n\t\t{\r\n\t\t\tcallback.result(resultMsg);\r\n\t\t}\r\n\t}", "private void sendMessage(String message){\n\t\ttry{\n\t\t\toutput.writeObject(\"Punk Ass Server: \" + message);\n\t\t\toutput.flush();\n\t\t\tshowMessage(\"\\nPunk Ass Server: \" + message); \n\t\t}catch(IOException ioe){\n\t\t\tchatWindow.append(\"\\n Message not sent, try again or typing something else\");\n\t\t\t\n\t\t}\n\t\t\n\t}", "public synchronized void send() throws RemoteException {\n\n if (this.temperatureQueue.isEmpty()) {\n //logger.log(Level.INFO, \"Nothing to send, bailing.\");\n return;\n }\n\n for (TemperatureMessage message : this.temperatureQueue) {\n // TODO\n // lookup the node and deliver the message.\n\n TemperatureNode destinationNode = owner.lookupNode(message.getDestination());\n if (destinationNode == null) {\n // Classic comment; this should never happen.\n System.out.println(\"Refusing to send to null node \" + message.getDestination());\n return;\n }\n destinationNode.sendMeasurement(message);\n this.owner.incrementVectorClock();\n //System.out.println(this.owner.ID() + \"Sent a message to \" + destinationNode.ID());\n\n }\n\n temperatureQueue.clear();\n }", "@Override\n public void run() {\n if (this.clientInterfaceTCP.getConnected())\n this.clientInterfaceTCP.sendString(this.messageToSend);\n }", "void passMessageToReceiver(String ccid, byte[] serializedMessage);", "public void sendMessage(ChatMessage msg) {\n\t\ttry {\n\t\t\tsOutput.writeObject(msg);\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.print(\"\\n\\tException writing to destination: \\n\\t\\t\" + e\n\t\t\t\t\t+ \"\\n\\tIf error persists, terminate connection and reconnect.\");\n\t\t}\n\t}", "public void send(String message){\n\t\ttry {\n\t\t\tSystem.out.println(\"Sende Nachricht \" + message);\n\t\t\tout.reset();\n\t\t\tout.writeObject(message);\n\t\t\tout.flush();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void sendMessage(String msg) {\n\t\ttry {\n\t\t\tout.writeObject(msg);\n\t\t\tout.flush();\n\t\t\tSystem.out.println(\"Sending to server => \" + msg);\n\t\t} catch (IOException ioException) {\n\t\t\tioException.printStackTrace();\n\t\t}\n\t}", "public void fromMicroServer() throws Exception {\n \tbyte[] buf = new byte[1024];\n\t\tDatagramPacket dp = new DatagramPacket(buf, 1024);\n\t\ttry{\n\t\t\ttoMicroServer.receive(dp);\n\t\t\trecieve = true;\n\t\t}\n\t\tcatch (IOException e){\n\t\t\tSystem.out.println(\"Connection timed out, retrying...\");\n\t\t\trecieve = false;\n\t\t\treturn;\n\t\t}\n str = new String(dp.getData(), 0, dp.getLength());\n\t\tSystem.out.printf(\"Child about to send message: %s \\n\", str);\n\n }", "void sendMessage(Message m) throws IOException {\n String msg = m.toString();\n\n buffer = msg.getBytes(\"Windows-1256\");\n toServer = new DatagramPacket(buffer, buffer.length,\n InetAddress.getByName(sendGroup), port);\n if (m.getType() == Message.DATA) {\n manager.mManager.addMessage(m);\n }\n\n System.out.println(getName() + \"-->\" + m);\n serverSocket.send(toServer);\n }", "public static void Send(Message message)\n\t{\n\t\ttry\n\t\t{\n\t\t\t_sendBuf = toByteArray(message);\n\n\t\t\t//dc message\n\t\t\tif (message.getRecipient().equalsIgnoreCase(\"\") &&\n\t\t\t\tmessage.getMessage().equalsIgnoreCase(\"%BYE%\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent BYE\");\n\t\t\t\t_socket.getOutputStream().write(Message.BYE);\n\t\t\t}\n\t\t\t//lobby message\n\t\t\telse if (message.getRecipient().equalsIgnoreCase(\"\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent LOBBY\");\n\t\t\t\t_socket.getOutputStream().write(Message.LOBBY);\n\t\t\t}\n\t\t\t//search request\n\t\t\telse if (message.getRecipient().equalsIgnoreCase(\"all\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent SEARCH\");\n\t\t\t\t_socket.getOutputStream().write(Message.SEARCH);\n\t\t\t}\n\t\t\t//answer request\n\t\t\telse if (message.getRecipient().equalsIgnoreCase(\"server\") &&\n\t\t\t\t\t message.getOrigin().equalsIgnoreCase(\"none\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent CHOICE\");\n\t\t\t\t_socket.getOutputStream().write(Message.CHOICE);\n\t\t\t}\n\t\t\t//whisper message\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent WHISPER\");\n\t\t\t\t_socket.getOutputStream().write(Message.WHISPER);\n\t\t\t}\n\t\t\t_socket.getOutputStream().write(_sendBuf);\n\t\t\t_socket.getOutputStream().flush();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public void sendMessage(Message<M> message) {\n long vertexId = message.getReceiver();\n Queue<Message<M>> sendQueue = sendQueues.get(vertexId);\n if (sendQueue == null) {\n sendQueue = new LinkedList<>();\n sendQueues.put(vertexId, sendQueue);\n }\n\n Message<M> initial = sendQueue.peek();\n if (combiner != null && initial != null) {\n initial = sendQueue.poll();\n M value = combiner.combine(initial.getValue(), message.getValue());\n message.setValue(value);\n }\n sendQueue.offer(message);\n\n if (sendQueue.size() > sendThreshold) {\n sendMessages(sendQueue);\n }\n }", "protected void sendMessage(\n byte[] msg,\n int seq,\n InetAddress peerAddress,\n int peerPort,\n String peerProtocol,\n boolean retry)\n throws IOException {\n // Via is not included in the request so silently drop the reply.\n if (peerPort == -1) {\n if (LogWriter.needsLogging) {\n this.stack.logWriter.logMessage(\n getClass().getName() + \":sendMessage: Dropping reply!\");\n }\n throw new IOException(\"Receiver port not set \");\n } else {\n if (LogWriter.needsLogging) {\n this.stack.logWriter.logMessage(\n getClass().getName()\n + \":sendMessage \"\n + peerAddress.getHostAddress()\n + \"/\"\n + peerPort\n + \"\\n\"\n + new String(msg));\n this.stack.logWriter.logMessage(\"*******************\\n\");\n }\n }\n if (peerProtocol.compareToIgnoreCase(\"UDP\") == 0) {\n DatagramPacket reply =\n new DatagramPacket(msg, msg.length, peerAddress, peerPort);\n \n try {\n DatagramSocket sock;\n if (stack.udpFlag) {\n sock = ((UDPMessageProcessor) messageProcessor).sock;\n \n } else {\n // bind to any interface and port.\n sock = stack.getNetworkLayer().createDatagramSocket();\n }\n // PC 2.0 add logging statement for all SIP messages \n // sent fom the socket\n \t\t\tthis.stack.logWriter.logInfo(\"<<<<< TX:\\tLength = \" + msg.length \n \t \t\t+ \"\\nSent from IP|Port=\" + myAddress + \"|\" + myPort \n \t \t\t+ \"\\nTo IP|Port=\" + peerAddress + \"|\" + peerPort\n \t \t\t+ \"\\nSequencer=\" + seq\n \t \t\t+ \"\\nTransport=\" + peerProtocol\n \t \t\t+ \"\\n[\" + new String(msg, 0, msg.length) + \"]\");\n \t\t\tsock.send(reply);\n if (!stack.udpFlag)\n sock.close();\n } catch (IOException ex) {\n throw ex;\n } catch (Exception ex) {\n InternalErrorHandler.handleException(ex);\n }\n \n } else {\n // Use TCP to talk back to the sender.\n Socket outputSocket =\n stack.ioHandler.sendBytes(\n peerAddress,\n peerPort,\n \"tcp\",\n msg,\n retry);\n OutputStream myOutputStream = outputSocket.getOutputStream();\n myOutputStream.write(msg, 0, msg.length);\n myOutputStream.flush();\n\t // The socket is cached (dont close it!);\n }\n }", "public void receiveMessage(String message) throws RemoteException;", "public void sendBack(SelectionKey key, String message) {\r\n\t\tsocketChannel = (SocketChannel) key.channel(); \r\n\t\tmessage += \"\\r\\n\";\r\n\t\tbuffer = CharBuffer.wrap(message);\r\n\t\twhile (buffer.hasRemaining()) {\r\n\t\t\ttry {\r\n\t\t\t\tsocketChannel.write(Charset.defaultCharset().encode(buffer));\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\tLong x = System.nanoTime();\r\n\t\tserviceTime = x - pollTime;\r\n\t\tresponseTime = x - currentJob.queueEntranceTime;\r\n\t\ttimeInSystem = x - currentJob.timeOfArrival;\r\n\t\t\r\n\t\ttimes.add(myNumber + \"\\t\" + type + \"\\t\" + queueTime + \"\\t\" + workerTime +\"\\t\" + processingTime +\"\\t\" + serviceTime +\"\\t\" + responseTime +\"\\t\" + timeInSystem );\r\n\t\tnumOfRequests.incrementAndGet();\r\n\t\tmyNumOfRequests++;\r\n\t}", "public void sendMessage()\r\n {\r\n MessageScreen messageScreen = new MessageScreen(_lastMessageSent);\r\n pushScreen(messageScreen);\r\n }", "private void sendServerMessage() throws NoSuchAlgorithmException, \n IOException {\n if (mRemoteClientMessage == null) {\n throw new IOException(\"Remote client message was null in sendServerMessage.\");\n } else if (mRemoteClientMessage.blindedFriends == null) {\n throw new IOException(\"Remove client message blinded friends is null in sendServerMessage.\");\n }\n\n // This can't return null because byteStringsToArrays only returns null\n // when passed null, and we already checked that ClientMessage.blindedFriends\n // isn't null.\n ArrayList<byte[]> remoteBlindedItems;\n remoteBlindedItems = Crypto.byteStringsToArrays(mRemoteClientMessage.blindedFriends);\n\n // Calculate responses that appear in the ServerMessage.\n ServerReplyTuple srt;\n try { \n srt = mServerPSI.replyToBlindedItems(remoteBlindedItems);\n } catch (NoSuchAlgorithmException e) {\n Log.wtf(TAG, \"No such algorithm in replyToBlindedItems: \" + e);\n setExchangeStatus(Status.ERROR);\n setErrorMessage(\"PSI subsystem is broken, NoSuchAlgorithmException\");\n throw e;\n } catch (IllegalArgumentException e) {\n Log.wtf(TAG, \"Null passed to replyToBlindedItems on serverPSI? \" + e);\n setExchangeStatus(Status.ERROR);\n setErrorMessage(\"Bad argument to server PSI subsystem. (null remoteBlindedItems?)\");\n throw e;\n }\n\n // Format and create ServerMessage.\n ArrayList<ByteString> doubleBlindedStrings = Crypto.byteArraysToStrings(srt.doubleBlindedItems);\n ArrayList<ByteString> hashedBlindedStrings = Crypto.byteArraysToStrings(srt.hashedBlindedItems);\n ServerMessage sm = new ServerMessage.Builder() \n .doubleBlindedFriends(doubleBlindedStrings)\n .hashedBlindedFriends(hashedBlindedStrings)\n .build(); \n\n // Write out the ServerMessage.\n boolean success = lengthValueWrite(out, sm);\n if (!success) {\n setExchangeStatus(Status.ERROR);\n setErrorMessage(\"Length/value write of server message failed.\");\n throw new IOException(\"Length/value write of server message failed, but exception is hidden (see Exchange.java)\");\n }\n }", "public void sendResponse(){\n\n //DropItPacket dropPkt = new DropItPacket(Constants.PONG.toString());\n // Send out a dropit Packet\n Channel channel = e.getChannel();\n ChannelFuture channelFuture = Channels.future(e.getChannel());\n ChannelEvent responseEvent = new DownstreamMessageEvent(channel, channelFuture, packet, channel.getRemoteAddress());\n// System.out.println(\"===== sending to\" + channel.getRemoteAddress().toString());\n try{\n ctx.sendDownstream(responseEvent);\n }catch (Exception ex){\n System.out.println(\"Node: \" + fileServer.getNode().getPort() + \" sending to\"+\n channel.getRemoteAddress().toString() +\"failed! \" + ex.toString());\n }\n }", "@Override\n\tprotected void doReceiveMessage(Message msg) {\n\t\tdeliverMessage(msg);\n\t}", "public void send(String message) throws IOException {\r\n OutputStream stream = socket.getOutputStream();\r\n PrintWriter writer = new PrintWriter(stream);\r\n writer.println(message);\r\n writer.flush();\r\n }", "protected void sendMessage(byte[] msg, InetAddress peerAddress,\n int peerPort, boolean reConnect) throws IOException {\n // Via is not included in the request so silently drop the reply.\n if (logger.isLoggingEnabled(LogLevels.TRACE_INFO)\n && this.sipStack.isLogStackTraceOnMessageSend()) {\n logger.logStackTrace(StackLogger.TRACE_INFO);\n }\n if (peerPort == -1) {\n if (logger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) {\n logger.logDebug(\n getClass().getName() + \":sendMessage: Dropping reply!\");\n }\n throw new IOException(\"Receiver port not set \");\n } else {\n if (logger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) {\n logger.logDebug(\n \"sendMessage \" + peerAddress.getHostAddress() + \"/\"\n + peerPort + \"\\n\" + \"messageSize = \"\n + msg.length + \" message = \" + new String(msg));\n logger.logDebug(\"*******************\\n\");\n }\n }\n try {\n sipStack.ioHandler.sendBytes(null, peerAddress, peerPort, Transport.UDP, msg, false);\n } catch (IOException ex) {\n throw ex;\n } catch (Exception ex) {\n InternalErrorHandler.handleException(ex);\n }\n }", "private void send(byte[] message)\n\t\t\tthrows IOException\n\t{\n\t\tchannel.basicPublish(BUNGEECORD_QUEUE, \"\", null, message);\n\t}", "@Override\r\n\tpublic void run() {\r\n\t\ttry {\r\n\t\t\tthis.inputStream = socket.getInputStream();\r\n\t\t\tthis.outputStream = socket.getOutputStream();\r\n\t\t\t// Get the peer that is asking me for fragments.\r\n\t\t\tpeerState = torrentClient.getPeerStateList().getByAddress(\r\n\t\t\t\t\tsocket.getInetAddress().getHostAddress(), socket.getPort());\r\n\t\t\t// read handhake\r\n\t\t\tbyte[] received = new byte[68];\r\n\t\t\tinputStream.read(received);\r\n\t\t\t//Parse the handshake received\r\n\t\t\tHandsake handshakeMessage = Handsake\r\n\t\t\t\t\t.parseStringToHandsake(new String(received));\r\n\t\t\t// validate hash\r\n\t\t\tString torrentHash = new String(torrentClient.getMetainf()\r\n\t\t\t\t\t.getInfo().getInfoHash());\r\n\t\t\t//if the received handshake is correct send my handshake\r\n\t\t\tif (Handsake.isValidHandsakeForBitTorrentProtocol(handshakeMessage,\r\n\t\t\t\t\ttorrentHash)) {\r\n\t\t\t\t// send handshake\r\n\t\t\t\tHandsake handShakeToSend = new Handsake(torrentHash,\r\n\t\t\t\t\t\tthis.torrentClient.getPeerId());\r\n\t\t\t\tthis.outputStream.write(handShakeToSend.getBytes());\r\n\t\t\t\t// enviar bitfield\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.sendBitfield();\r\n\t\t\t\t\t// leer\r\n\t\t\t\t\tPeerProtocolMessage message = this.readNormalMessage();\r\n\t\t\t\t\t// Check if I have received an interested message\r\n\t\t\t\t\tif (message.getType().equals(\r\n\t\t\t\t\t\t\tPeerProtocolMessage.Type.INTERESTED)) {\r\n\t\t\t\t\t\tif (this.peerState != null) {\r\n\t\t\t\t\t\t\tpeerState = torrentClient.getPeerStateList()\r\n\t\t\t\t\t\t\t\t\t.getByAddress(\r\n\t\t\t\t\t\t\t\t\t\t\tsocket.getInetAddress()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getHostAddress(),\r\n\t\t\t\t\t\t\t\t\t\t\tsocket.getPort());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//Set the peer status\r\n\t\t\t\t\t\tif (this.peerState != null) {\r\n\t\t\t\t\t\t\tthis.peerState.setPeer_interested(true);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// send unchoke to the peer\r\n\t\t\t\t\t\tthis.outputStream.write(new UnChokeMsg().getBytes());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//set the peer status\r\n\t\t\t\t\t\tif (this.peerState != null) {\r\n\t\t\t\t\t\t\tthis.peerState.setAm_choking(false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Continue receiveing messages if the message type is Keep_alive, Request or Have.\r\n\t\t\t\t\t\tboolean continueReading = true;\r\n\t\t\t\t\t\twhile (continueReading) {\r\n\t\t\t\t\t\t\tmessage = this.readNormalMessage();\r\n\t\t\t\t\t\t\tcontinueReading = processMessage(message);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// if I have not received interested send unchoke\r\n\t\t\t\t\t\tthis.outputStream.write(new ChokeMsg().getBytes());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} catch (IOException ioe) {\r\n\t\t\t\t\tioe.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// close connection\r\n\t\t\tthis.inputStream.close();\r\n\t\t\tthis.outputStream.close();\r\n\t\t\tsocket.close();\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\tSystem.out.println(\"Sending thread closed\");\r\n\t\t\te.printStackTrace();\r\n\t\t\ttry {\r\n\t\t\t\tthis.inputStream.close();\r\n\t\t\t\tthis.outputStream.close();\r\n\t\t\t\tsocket.close();\r\n\t\t\t} catch (IOException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void sendMessage(String message) {\n\t\tmediator.send(message, this);\r\n\t}", "public void send(ECPacket message)\n\t{\n\t\tif (FMLCommonHandler.instance().getEffectiveSide().isClient())\n\t\t{\n\t\t\tthis.sendToServer(message);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.sendToAll(message);\n\t\t}\n\t}", "public void sendMessage(String message) {\n\t\ttry {\n\t\t\tout.writeUTF(message);\n\t\t\tserver.CommunicationLog.info(\"Sent:\" + message + \" to \" + clientSocket.getInetAddress().toString());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void blockingReceiveSenderSide() throws OOBException {\n \t}", "public synchronized void send(String message) {\n writer.println(message);\n writer.flush();\n }", "public void receiveMessage() throws IOException {\n String inputLine;\n while (true) {\n inputLine = inputStream.readLine();\n if (inputLine != null && !inputLine.equals(\"\")){\n if (!inputLine.equals(\"Host: closing\")) {\n network.appendMessage(inputLine);\n } else {\n network.appendMessage(\"Server has been closed! Restart the \"\n + \"server!\");\n waitForServer();\n }\n }\n }\n }", "public void sendMessage(GameMessage message) {\n\t\ttry {\n\t\t\toos.writeObject(message);\n\t\t} catch(Exception e) {\n\t\t\ttable.printMsg(\"Unable to send message to the server. Connection will be terminated.\");\n\t\t\ttable.printMsg(\"Try to Connect again.\");\n\t\t\ttry {\n\t\t\t\tsock.close();\n\t\t\t} catch(Exception ee) {\n\t\t\t\t// doing nothing\n\t\t\t}\n\t\t\tsock = null;\n\t\t\ttable.repaint();\n\t\t\tSystem.out.println(\"Unable to send message to the server.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic void receive(String message) {\n\t\tgetReceiveArea().append(message + \"\\n\");\n\t}", "void send(String message);", "public void send() {\n try {\n String message = _gson.toJson(this);\n byte[] bytes = message.getBytes(\"UTF-8\");\n int length = bytes.length;\n\n _out.writeInt(length);\n _out.write(bytes);\n \n } catch (IOException ex) {\n Logger.getLogger(ResponseMessage.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void sendMessage(String msg) {\n try {\n out.write(msg);\n out.newLine();\n out.flush();\n \n } catch (IOException e) {\n \tshutdown();\n e.printStackTrace();\n }\n }", "public void sendMsgToClient() {\n\n try {\n\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())), true);\n\n Log.d(TAG, \"The transmitted data:\" + msg);\n\n writer.println(msg);\n\n } catch (Exception e) {\n\n e.printStackTrace();\n\n }\n\n }", "public void sendRawMessage ( UUID sender , String message ) {\n\t\texecute ( handle -> handle.sendRawMessage ( sender , message ) );\n\t}", "void sendMessage(ChatMessage msg) {\n\t\ttry {\n\t\t\tsOutput.writeObject(msg);\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tdisplay(\"Não foi possível enviar a mesagem !!!\");\n\t\t}\n\t}", "public void sendMessage( MessagingV2 friend )\n {\n if( msg.length() == 0 )\n System.err.println( \"There is no message to send\" );\n else\n {\n System.out.println( user + \", your message has been sent\" );\n friend.receiveMessage( msg, user );\n msg = \"\";\n }\n }", "void send();", "private void sendMessage(ChatMessage msg) throws IOException {\n try {\n sOutput.writeObject(msg);\n } catch (IOException e) {\n sOutput.close();\n sInput.close();\n e.printStackTrace();\n }\n //sOutput.flush();\n }", "public boolean send(IMCMessage m) {\n\t\tm.setTimestamp(System.currentTimeMillis() / 1000.0);\n\t\treturn trans.sendMessage(remoteHost, remotePort, m);\n\t}", "@Override\n public void receiveMessage(Message m) {\n commReceiver.receiveMessage(m);\n }", "public void sendMessage(Message message) {\r\n\t\tObjectOutputStream out;\r\n\t\ttry {\r\n\t\t\tout = new ObjectOutputStream(client.getSocket().getOutputStream());\r\n\t\t\tout.writeObject(message);\r\n\t\t\tout.flush();\r\n\t\t} catch (IOException e) {\r\n\t\t\texceptionLogger.writeException(Level.SEVERE,\r\n\t\t\t\t\tMessages.getString(\"Controller.IOExceptionNachricht\")); //$NON-NLS-1$\r\n\t\t}\r\n\t}", "private void sendMessageToClient(String message) {\n try {\n outputStream.writeObject(message);\n outputStream.flush();\n } catch (IOException e) {\n System.out.println(\"Erreur lors de l'envoi du message au client\");\n }\n }", "@Override\n\tpublic void sendMessage(Message message) {\n\t\tterminal.println(\"Sending Message to: \" + message.getUserTo());\n\t\tDatagramPacket packet = null;\n\t\tString routerDestination = table.getRouterToSendTo(message.getUserTo());\n\t\tRouter routerToSendTo = null;\n\t\tfor(Router routerToSend: listOfRouters) {\n\t\t\tif(routerToSend.getName().equals(routerDestination)) {\n\t\t\t\trouterToSendTo = routerToSend;\n\t\t\t}\n\t\t}\n\n\t\tif(routerToSendTo == null) {\n\t\t\tterminal.println(\"User not found on network.\");\n\t\t}\telse {\n\t\t\t/*\n\t\t\t * need to change the message to include the router that needs to receive the message as well!!!!!!!!!!!!!!\n\t\t\t */\n\t\t\tInetSocketAddress dstAddress = new InetSocketAddress(DEFAULT_DST_NODE, routerToSendTo.getPort());\n\t\t\tpacket = message.toDatagramPacket();\n\t\t\tpacket.setSocketAddress(dstAddress);\n\t\t\ttry {\n\t\t\t\tsocket.send(packet);\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void sendMessage(NetMessage message) {\n ClientDirector.getDataManager().sendMessage(message);\n }", "private void sendMessageToClient(String messageToClient){\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n output.println(\"\\n\" + \"Server: \" + messageToClient);\n output.flush();\n }\n });\n }", "public void messageReceived() {\n\tTrackedMessage.accumulateMap(TrackedMessage.unmapType(\n\t\tTrackedMessage.messagesRecieved, this.getClass()), this\n\t\t.getMessageType(), 1);\n\tTrackedMessage.accumulateMap(TrackedMessage.unmapType(\n\t\tTrackedMessage.bytesRecieved, this.getClass()), this\n\t\t.getMessageType(), TrackedMessage.objectSize(this));\n }", "private synchronized void sendToClient(PrintWriter pw, String message)\n {\n pw.write(message + \"\\n\");\n pw.flush();\n }", "public void sendMessage(String msg) {\n\t\tplayer.sendMessage(msg);\n\t}", "void received() throws ImsException;", "public void sendMessageToClient(String msg) throws IOException {\r\n\t\tif (this.clientSocket == null || this.out == null)\r\n\t\t\tthrow new SocketException(\"socket does not exist\");\r\n\t\t\r\n\t\tthis.out.writeObject(msg);\r\n\t}", "public void sendMessage(String message) {\n try {\n bos.write(message);\n bos.newLine();\n bos.flush();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void sendMessage(String message) {\n\t\tSystem.out.println(\"DEBUG : response sent by server = \" + message);\n\t\tprinter.println(message);\n\t}", "void sendMessage(ZMQ.Socket socket);", "public void send() {\n\t}", "public GetFreeMessage send()\n throws Exception\n {\n return (GetFreeMessage)super.send();\n }", "private void receiveServerMessage() throws IOException {\n mRemoteServerMessage = lengthValueRead(in, ServerMessage.class);\n if (mRemoteServerMessage == null) {\n setExchangeStatus(Status.ERROR);\n setErrorMessage(\"Remote server message was not received.\");\n throw new IOException(\"Remote server message was not received.\");\n }\n }", "@Override\n\tpublic void sendMessage() {\n\t\t\n\t}", "@Override\n\tpublic void send(String msg) {\n\t\t\n\t\t\n\t\n\t}", "public void sendMessage(String message) {\n\n\t\tif (mOut != null && !mOut.checkError()) {\n\n\t\t\t// If encryption connection has been made\n\n\t\t\tif (diffieHellmanModule.isConnected()) {\n\t\t\t\tmessage = diffieHellmanModule.encryptString(message);\n\t\t\t}\n\n\t\t\tmOut.println(message);\n\t\t\tmOut.flush();\n\t\t}\n\t}", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n Log.i(TAG, \"From: \" + remoteMessage.getFrom());\n sendOnChannel1();\n sendOnChannel2();\n if (remoteMessage == null)\n return;\n\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null) {\n Log.e(TAG, \"Notification Body: \" + remoteMessage.getNotification().getBody());\n // handleNotification(remoteMessage.getNotification().getBody());\n // sendMyBroadCast(remoteMessage.getNotification().getBody());\n }\n\n // Check if message contains a data payload.\n if (remoteMessage.getData().size() > 0) {\n Log.e(TAG, \"Data Payload: \" + remoteMessage.getData().toString());\n\n try {\n JSONObject json = new JSONObject(remoteMessage.getData().toString());\n // handleDataMessage(json);\n // sendMyBroadCast(remoteMessage.getData().toString());\n } catch (Exception e) {\n Log.e(TAG, \"Exception: \" + e.getMessage());\n }\n }\n }", "private void receive(GossipMessage message, Host from, short sourceProto, int channelId) {\n logger.trace(\"Received {} from {}\", message, from);\n\n if (received.contains(message.getMid())) {\n eagerPushPeers.remove(from);\n lazyPushPeers.add(from);\n\n //send prune\n sendMessage(new LazyMessage(message.getSender(), message.getMid(), myself, sourceProto), message.getSender());\n } else {\n triggerNotification(new DeliverNotification(message.getMid(), message.getSender(), message.getContent()));\n\n received.add(message.getMid());\n\n eagerPush(message, myself, sourceProto, channelId);\n lazyPush(message, sourceProto);\n\n eagerPushPeers.add(message.getSender());\n lazyPushPeers.remove(message.getSender());\n\n //opcional optimize\n }\n\n }", "public void sendMessage(String message) {\r\n sendMessageAsByte(message.getBytes());\r\n }", "void send() throws ImsException;", "protected void sendMessage(String msg) {\n message = msg; \n newMessage = true;\n }", "public void sendMessage(ChatMessage msg) {\n\t\ttry {\n\t\t\tsOutput.writeObject(msg);\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tdisplay(\"Exception writing to server: \" + e);\n\t\t}\n\t}", "public void send(Address from, String message);", "public void send(String result) {\n streamOut.println(result);\n //streamOut.flush();\n\n }", "public void sendFromMessageQueue() throws IOException {\n Date canSendDate = new Date(lastReceiveMsgDate.getTime() + 2000);\n if (canSendDate.before(new Date())) {\n String msg = messageQueue.poll();\n if (msg == null)\n return;\n\n output.writeBytes(msg + \"\\n\");\n }\n }", "public void sendMessage(Message msg) {\n network.sendAsync(msg);\n }", "@Override\n\tpublic void Send(String message) {\n\t\tgetReceiveArea().append(\"我:\"+message + \"\\n\");\n\t\tgetMediator().sendMessage(getName(), message);\n\t}", "public synchronized void bufferMessage() throws Exception\r\n {\r\n\r\n System.out.println(\"BUFFER: Message from future round received. Buffering message.\");\r\n // Wait until node moves to next round.\r\n wait();\r\n\r\n }", "void finish(Channel channel, Object msg);" ]
[ "0.61328286", "0.6014188", "0.6004637", "0.59806585", "0.57989764", "0.5792529", "0.5753108", "0.57511383", "0.57277125", "0.5688639", "0.56716776", "0.56504434", "0.56433773", "0.5628804", "0.562855", "0.5628314", "0.56228876", "0.56135815", "0.5609065", "0.56021047", "0.5602027", "0.5587906", "0.55804825", "0.5560335", "0.55521584", "0.5536189", "0.5530972", "0.55284643", "0.55195236", "0.5512694", "0.5511708", "0.55077493", "0.55059826", "0.5504637", "0.5486864", "0.54803824", "0.5461346", "0.54521537", "0.5450941", "0.5432668", "0.54316425", "0.5427115", "0.541879", "0.54170114", "0.5414936", "0.5404763", "0.54019743", "0.5382481", "0.5380042", "0.5377289", "0.53772724", "0.5368511", "0.53675973", "0.53669524", "0.536579", "0.53592736", "0.5357312", "0.5335305", "0.5334532", "0.53330314", "0.53327405", "0.5331772", "0.53287745", "0.5324257", "0.5323471", "0.5313232", "0.5305952", "0.53006476", "0.530028", "0.5298822", "0.52985764", "0.52957124", "0.5289819", "0.5288109", "0.5287054", "0.5285279", "0.52822727", "0.52818215", "0.5280066", "0.52799034", "0.5276123", "0.5273629", "0.52693176", "0.5268304", "0.5265061", "0.52611035", "0.5251389", "0.52508307", "0.5250226", "0.5246712", "0.5246099", "0.5246081", "0.5243016", "0.524176", "0.5240663", "0.5238814", "0.5232378", "0.5228791", "0.5224056", "0.5223617" ]
0.53226846
65
Close the connection when an exception is raised.
@Override public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) { logger.error("Unexpected exception from downstream.", e.getCause()); e.getChannel().close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void close() throws Exception {\r\n if (connection != null){\r\n connection.close();\r\n }\r\n }", "@Override\r\n\tpublic void close()\r\n {\r\n\t\ttry\r\n {\r\n\t connection.close();\r\n }\r\n\t\tcatch (final SQLException e)\r\n {\r\n\t\t\t// Ignore, shutting down anyway\r\n }\r\n }", "public void connectionClose() {\n try {\n conn.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void closeConnection(){\n try {\n connection.close();\n } catch (SQLException ex) {\n System.out.println(\"SQLException in closeConnection()\");\n }\n }", "private synchronized void closeConnection() {\n/* 212 */ if (this.conn != null) {\n/* 213 */ this.log.debug(\"Closing connection\");\n/* */ try {\n/* 215 */ this.conn.close();\n/* 216 */ } catch (IOException iox) {\n/* 217 */ if (this.log.isDebugEnabled()) {\n/* 218 */ this.log.debug(\"I/O exception closing connection\", iox);\n/* */ }\n/* */ } \n/* 221 */ this.conn = null;\n/* */ } \n/* */ }", "private void closeConnection() {\r\n try {\r\n socket.close();\r\n } catch (IOException ex) {\r\n // Ex on close\r\n }\r\n }", "private void close() {\n\t\ttry {\n\t\t\tif (conn != null) {\n\t\t\t\tconn.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlog(e);\n\t\t} finally {\n\t\t\tisConnected = false;\n\t\t}\n\t}", "public void disconnect()\r\n\t{\r\n\t\ttry {\r\n\t\t\tconnection_.close();\r\n\t\t} catch (IOException e) {} // How can closing a connection fail?\r\n\t\t\r\n\t}", "public void close()\r\n {\r\n try\r\n {\r\n connection.close();\r\n } catch(SQLException exception)\r\n {\r\n LOG.log(Level.SEVERE, \"\", exception);\r\n }\r\n }", "private void closeConnection() {\n\t\t_client.getConnectionManager().shutdown();\n\t}", "void close()\n {\n DisconnectInfo disconnectInfo = connection.getDisconnectInfo();\n if (disconnectInfo == null)\n {\n disconnectInfo = connection.setDisconnectInfo(\n new DisconnectInfo(connection, DisconnectType.UNKNOWN, null, null));\n }\n\n // Determine if this connection was closed by a finalizer.\n final boolean closedByFinalizer =\n ((disconnectInfo.getType() == DisconnectType.CLOSED_BY_FINALIZER) &&\n socket.isConnected());\n\n\n // Make sure that the connection reader is no longer running.\n try\n {\n connectionReader.close(false);\n }\n catch (final Exception e)\n {\n debugException(e);\n }\n\n try\n {\n outputStream.close();\n }\n catch (final Exception e)\n {\n debugException(e);\n }\n\n try\n {\n socket.close();\n }\n catch (final Exception e)\n {\n debugException(e);\n }\n\n if (saslClient != null)\n {\n try\n {\n saslClient.dispose();\n }\n catch (final Exception e)\n {\n debugException(e);\n }\n finally\n {\n saslClient = null;\n }\n }\n\n debugDisconnect(host, port, connection, disconnectInfo.getType(),\n disconnectInfo.getMessage(), disconnectInfo.getCause());\n if (closedByFinalizer && debugEnabled(DebugType.LDAP))\n {\n debug(Level.WARNING, DebugType.LDAP,\n \"Connection closed by LDAP SDK finalizer: \" + toString());\n }\n disconnectInfo.notifyDisconnectHandler();\n }", "public void close () throws IOException , GateException {\n try{\n conn.close();\n }\n catch (SQLException e){\n log.error(\"Problem closing database connection\", e);\n System.exit(5);\n }\n\n }", "public static void closeConnection() {\n\t\ttry {\n\t\t\tcon.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error al cerrar la conexion.\");\n\t\t}\n\t}", "public void closeConnection() {\n //It's important to close the connection when you are done with it\n try {\n connection.close();\n DriverManager.getConnection(JDBC_URL + \";shutdown=true\"); // shut Derby down, See: https://db.apache.org/derby/papers/DerbyTut/embedded_intro.html#shutdown\n } catch (SQLException ignore) {\n LOGGER.log(Level.SEVERE, \"Unable to close DB connection due to error {0}\", ignore.getMessage());\n\n // Alternative: Cascade the original exception (or rewrap it as a more specific exception)\n // Here, we just log it \n }\n }", "private void closeConnection(){\n report(\"Close connection\");\n try{\n if(socket != null && !socket.isClosed()) {\n report(\"Client: Close socket\");\n socket.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n report(\"End\");\n }", "public void closeConnection() {\n if (conn != null) {\n try {\n conn.close();\n } catch (SQLException sqlEx) {\n dbg(\"closeConnection-->SQLException raised while closing conn =\" + sqlEx.getMessage());\n }\n }\n }", "public void closeConnection(){\r\n if (connection != null)\r\n try{\r\n log.info(\"close connection\");\r\n connection.close();\r\n }\r\n catch (SQLException e){\r\n log.error(e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }", "private void closeConnection(Throwable cause) {\n log.debug(\"Closing connection\", cause);\n\n setState(SessionState.DISCONNECTING, cause);\n this.client.disconnect().onComplete(this::disconnectCompleted);\n }", "public static void closeConnection() {\n if(connection != null) {\n try {\n connection.close();\n connection = null;\n }\n catch (Exception e) \n { \n e.printStackTrace(); \n }\n }\n }", "public void closeConnection() throws Exception {\n\t\ttry {\n\t\t\tclient.close();\n\t\t\tis.close();\n\t\t\tisr.close();\n\t\t\tbr.close();\n\t\t\tSystem.out.println(\"Connection is closed\");\n\t\t\tgetConnection();\n\t\t} catch (IOException ex) {\n\t\t\tLogger.getLogger(ServerTCP.class.getName()).log(Level.SEVERE, null, ex);\n\t\t}\n\n\t}", "private void closeConnection () {\n\t\ttry {\n\t\t\tconnection.close();\n\t\t\tconnection = null;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void closeConnection() {\n\t\ttry {\n\t\t\tsocket.close();\n\t\t} catch (IOException e) {\n\t\t\tlogger.warning(\"problem closing socket connection with JSON-RPC server at \" + serverIP + \":\" + serverPort);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void close() {\n if (conn != null) {\n try {\n conn.close();\n } catch (SQLException e) {\n logger.error(\"Failed to close the connection.\");\n }\n }\n }", "public void close() {\n try {\n connect.close();\n } catch (SQLException ex) {\n System.err.println(\"Error while closing db connection\" + ex.toString());\n }\n }", "public void closeConnection() {\n try {\n if (connection != null) {\n connection.close();\n connection = null;\n }\n } catch (Exception e) {\n System.out.print(e.getMessage());\n }\n }", "protected void close() {\n\t\tthis.connection.close();\n\t\tthis.connection = null;\n\t}", "public void close() {\n if (connection == null) {\n LOGGER.error(\"DB : Uninitialized DB Connection.\");\n return;\n }\n\n try {\n if (connection.isClosed()) {\n LOGGER.warn(\"Connection is already closed.\");\n return;\n }\n connection.close();\n } catch (SQLException e) {\n LOGGER.error(\"Error closing the connection.\", e);\n }\n\n }", "public void closeConnection() {\n System.out.println(\"Closing connection\");\n\n try {\n reader.close();\n \n if (connectionSocket != null) {\n connectionSocket.close();\n connectionSocket = null;\n }\n System.out.println(\"Connection closed\");\n } catch (IOException e) {\n System.out.println(\"IOException at closeConnection()\");\n } catch (NullPointerException e) {\n System.out.println(\"NullPointerException at closeConnection()\");\n } catch (Exception e) {\n System.out.println(\"Exception at closeConnection()\");\n System.out.println(e.toString());\n }\n }", "public void closeConnection() {\n try {\n socket.close();\n oStream.close();\n } catch (Exception e) { }\n }", "private void closeConnection(final String reason) {\n closeConnection(new VertxException(reason).fillInStackTrace());\n }", "abstract public void closeConnection();", "public void closeConnection() {\n try {\n if ( clientSocket != null ) {\n clientSocket.close();\n }\n } catch ( IOException e ) {\n logger.error( \"Error closing sokcet to client \" + getId(), e );\n }\n }", "private void closeConnection () {\n setConnection (null);\n }", "private void releaseConnection() {\n try {\n con.close();\n } catch (SQLException ex) {\n throw new EJBException(\"releaseConnection: \" + ex.getMessage());\n }\n }", "public void closeConnection() {\n try {\n con.close();\n } catch (SQLException e) {\n System.err.println(e.getMessage());\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic void close() {\n\t \t if (conn != null) {\r\n\t \t\t try {\r\n\t \t\t\t conn.close();\r\n\t \t\t } catch (Exception e) {\r\n\t \t\t\t e.printStackTrace();\r\n\t \t\t }\r\n\t \t }\r\n\t}", "public void closeConnection();", "private void closeConnection() {\n\t\t\tSystem.out.println(\"\\nTerminating connection \" + myConID + \"\\n\");\n\t\t\ttry {\n\t\t\t\toutput.close(); // close output stream\n\t\t\t\tinput.close(); // close input stream\n\t\t\t\tconnection.close(); // close socket\n\t\t\t} catch (IOException ioException) {\n\t\t\t\tSystem.out.println(\"Exception occured in closing connection\"\n\t\t\t\t\t\t+ ioException);\n\t\t\t}\n\t\t}", "protected void connectionClosed() {}", "private void endConnection(){\n\t\tif(this.connection != null){\n\t\t\ttry {\n\t\t\t\tthis.connection.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public static void close() {\n\t\ttry {\n\t\t\tconn.close();\n\t\t} catch(Exception e) {\n\t\t\tPvPTeleport.instance.getLogger().info(e.getMessage());\n\t\t}\n\n\t}", "private void closeConnection()\n\t{\n\t\tif(result != null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tresult.close();\n\t\t\t\tresult = null;\n\t\t\t}\n\t\t\tcatch(Exception ignore){}\n\t\t}\n\t\tif(con != null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tcon.close();\n\t\t\t\tcon = null;\n\t\t\t}\n\t\t\tcatch(Exception ignore){}\n\t\t}\n\t}", "public void closeConnection() {\n client.close();\n System.out.println(\"Connection to db closed.\");\n }", "public void close() {\n\n\t\tdebug();\n\n\t\tif (isDebug == true) {\n\t\t\tlog.debug(\"=== CLOSE === \");\n\t\t}\n\n\t\ttry {\n\n\t\t\tif (connection != null) {\n\n\t\t\t\tlog.debug(\"Antes Connection Close\");\n\t\t\t\tconnection.close();\n\t\t\t\tlog.debug(\"Pos Connection Close\");\n\t\t\t}\n\n\t\t\tif (m_dbConn != null) {\n\t\t\t\tm_dbConn.close();\n\t\t\t}\n\n\t\t\tif (isDebug == true) {\n\t\t\t\tlog.debug(\"Connection Close\");\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tlog.debug(\"ERRO Connection Close\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tconnection = null;\n\t\tm_dbConn = null;\n\n\t}", "public void closeConnection() {\n try {\n dis.close();\n dos.close();\n socket.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void closeConnection()\n\t{\n\t\ttry\n\t\t{\n\t\t\tconnect.close();\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void closeConnection() {\n if (this.connection != null && this.connected) {\n try {\n this.connection.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n }", "public void closeConnection() {\r\n\t\ttry {\r\n\t\t\tthis.store.close();\r\n\t\t} catch (MessagingException e) {\r\n\t\t\tLog.error(e.getStackTrace().toString());\r\n\t\t}\r\n\t}", "public void closeConnection() {\r\n if (getConnection() != null && StringUtil.isNotBlank(config.getDataSource())\r\n /*&& this.conn.getConnection() instanceof PooledConnection */) {\r\n LOG.ok(\"Close the pooled connection\");\r\n dispose();\r\n }\r\n }", "public void closeConnection() {\n\t\tif (conn != null) {\n\t\t\ttry {\n\t\t\t\tconn.close();\n\t\t\t} catch(SQLException se){\n\t\t\t\tse.printStackTrace();\n\t\t\t}\n\t\t} \n\t}", "private void connectionClosed() {\n if (this.state != SessionState.DISCONNECTING) {\n // this came unexpected\n connectionClosed(new VertxException(\"Connection closed\"));\n }\n }", "public void close() throws IOException {\n try {\n _connection.close();\n } catch (SQLException e) {\n String msg = \"Failed to close database connection.\";\n _logger.warn(msg, e);\n }\n super.close(); //close the /dev/null that ncml gave us\n }", "public void closeConnection()\n {\n try{\n if(statement!=null)\n connection.close();\n }catch(SQLException se){\n System.out.println(\"Close statement ex:\"+ se.getMessage());\n }// do nothing\n try{\n if(connection!=null)\n connection.close();\n }catch(SQLException se){\n System.out.println(\"Close connection ex:\"+ se.getMessage());\n }//end finally try\n }", "protected static void closeConnection(Connection connection) throws ConnectionFailedException {\r\n try {\r\n if (!connection.isClosed()) { // If connection is not closed\r\n connection.close();\r\n }\r\n } catch (SQLException e) {\r\n // Something went wrong with the connection\r\n throw new ConnectionFailedException();\r\n }\r\n }", "public void closeConnection() throws SQLException;", "void close() throws Exception;", "void close() throws Exception;", "public void closeConnection() {\n\t\ttry{\n\t\t\tif(this.connection!=null)\n\t\t\t\tthis.connection.close();\n\t\t}catch(SQLException se){\n\t\t\tse.printStackTrace();\n\t\t}\n\t}", "private void closeConnection(Connection connection, String signature) throws LateDeliverablesProcessingException {\r\n try {\r\n connection.close();\r\n } catch (SQLException e) {\r\n throw Helper.logException(log, signature, new LateDeliverablesProcessingException(\r\n \"Fails to close connection.\", e));\r\n }\r\n }", "private void closeConnection() {\n try {\n fromClient.close();\n toClient.close();\n client.close();\n } catch (IOException e) {\n System.err.println(\"Unable to close connection:\" + e.getMessage());\n }\n }", "public void closeConnection() {\n try {\n stdIn.close();\n socketIn.close();\n socketOut.close();\n }\n catch(IOException e) {\n e.printStackTrace();\n }\n }", "public synchronized void close() throws SQLException {\n/* 204 */ if (this.physicalConn != null) {\n/* 205 */ this.physicalConn.close();\n/* */ \n/* 207 */ this.physicalConn = null;\n/* */ } \n/* */ \n/* 210 */ if (this.connectionEventListeners != null) {\n/* 211 */ this.connectionEventListeners.clear();\n/* */ \n/* 213 */ this.connectionEventListeners = null;\n/* */ } \n/* */ }", "private void closeConnection() throws IOException {\n\t\tclientSocket.close();\n\t}", "public void closeConnection() {\n try {\n String token = conn.toString();\n conn.close();\n log.info(\"Database Connection Closed. ID: {} \", token);\n } catch (Exception e) {\n log.error(\"Error closing the database connection. \\n Trace: {}\", ExceptionUtilities.stacktraceToString(e));\n }\n }", "public void closeConnection() {\n\t\ttry {\n\t\t\tconn.close();\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"ERROR: cannot close connection to local database\");\n\t\t}\n\t}", "public void closeConnection(Connection conn) throws SQLException;", "public void close() {\n\t\ttry {\n\t\t\tconn.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void close() {\n if (mLeakedException != null) {\n getConnectionManager().shutdown();\n mLeakedException = null;\n }\n }", "public void closeConnection() {\n this.session.close();\n }", "public void closeCon(){\r\n\t\ttry\r\n\t\t{\r\n\t\t\tmyConnection.close();\r\n\r\n\t\t}\r\n\r\n\t\tcatch (SQLException e )\r\n\t\t{\r\n\t\t\tSystem.out.println(\"something went wrong with closing DB connection\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void close() {\n connection.close();\n running = false;\n }", "@Override\n\tpublic final void close() throws SailException {\n\t\tconnectionLock.writeLock().lock();\n\n\t\ttry {\n\t\t\tif (isOpen) {\n\t\t\t\ttry {\n\t\t\t\t\tforceCloseActiveOperations();\n\n\t\t\t\t\tif (txnActive) {\n\t\t\t\t\t\tlogger.warn(\"Rolling back transaction due to connection close\",\n\t\t\t\t\t\t\t\tdebugEnabled ? new Throwable() : null);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// Use internal method to avoid deadlock: the public\n\t\t\t\t\t\t\t// rollback method will try to obtain a connection lock\n\t\t\t\t\t\t\trollbackInternal();\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\ttxnActive = false;\n\t\t\t\t\t\t\ttxnPrepared = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcloseInternal();\n\t\t\t\t} finally {\n\t\t\t\t\tisOpen = false;\n\t\t\t\t\tsailBase.connectionClosed(this);\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\t// Release the exclusive lock. Any threads waiting to obtain a\n\t\t\t// non-exclusive read lock will get one and then fail with an\n\t\t\t// IllegalStateException, because the connection is no longer open.\n\t\t\tconnectionLock.writeLock().unlock();\n\t\t}\n\t}", "public void closeConnection() {\n\t\ttry {\n\t\t\tif (conn != null) {\n\t\t\t\tconn.close();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t}\n\t\tconn = null;\n\t}", "void close_Connection(){\n\t\ttry{\n\t\t\toutfile.close();\n\t\t\tcon.close();\n\t\t\tSystem.out.println(\"MYSQL is disconnected\");\n\t\t//Catch SQL exception\t\t\n\t\t}catch(SQLException sqle){ \n\t\t\tsqle.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t//Catch I/O exception\t\n\t\tcatch(IOException ioe){ \n\t\t\tioe.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\t\t\n\t}", "protected void closeConnection(RepositoryConnection connection)\n throws RepositoryException {\n }", "public static void closeConnection(){\r\n\t\tif(connection != null)\r\n\t\t\ttry {\r\n\t\t\t\tconnection.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t}", "final public void closeConnection() throws IOException {\n\n readyToStop = true;\n closeAll();\n }", "public void close() {\n if (closed) {\n return;\n }\n try {\n disconnect();\n } catch (Exception e) {\n throw new IOError(e);\n }\n closed = true;\n }", "@Override\r\n\tpublic void closeConnection() {\n\t\t\r\n\t}", "public void close() {\n try {\n closeConnection(socket);\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }", "@Override\n public void close() throws Exception {\n }", "public void disconnect() {\n\t\tif (_connection != null) {\n\t\t\ttry {\n\t\t\t\twhile (!_connection.isClosed()) {\n\t\t\t\t\t_connection.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) { /* ignore close errors */\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void closeConnection()\n\t{\n\t\ttry\n\t\t{\n\t\t\tdatabaseConnection.close();\n\t\t}\n\t\tcatch (SQLException currentSQLError)\n\t\t{\n\t\t\tdisplaySQLErrors(currentSQLError);\n\t\t}\n\t}", "public void ExitConection(){\n try {\n resultSet.close();\n preparedStatement.close();\n conection.close();\n } catch (Exception e) {\n// MessageEmergent(\"Fail ExitConection(): \"+e.getMessage());\n }\n }", "public void cleanup(){\n try{\n if (this._connection != null){\n this._connection.close ();\n }//end if\n }catch (SQLException e){\n // ignored.\n }//end try\n }", "public void disconnect() throws Exception\n {\n if(!connected)\n return;\n connectionSocket.close();\n reader.close();\n writer.close();\n listenerTimer.cancel();\n connected = false;\n\n }", "void close() throws Exception;", "public void closeConnection() throws SQLException {\n conn.close();\r\n }", "public void shutdown() throws DatabaseAccessException {\n\t\ttry {\n\t\t\tthis.connection.close();\n\t\t} catch (SQLException e) {\n\t\t\tthrow new DatabaseAccessException(Failure.CONNECTION);\n\t\t}\n\t}", "@Override\n public void closeConnection() {\n\n System.out.println(\"[CLIENT] Closing socket connection...\");\n try {\n socket.close();\n in.close();\n out.close();\n System.out.println(\"[CLIENT] Closed socket connection.\");\n } catch (IOException e) {\n System.out.println(\"[CLIENT] Error occurred when closing socket\");\n }\n System.exit(0);\n\n }", "private void closeConnection() {\n try {\n bufferedWriter.close();\n } catch (IOException e) {\n System.err.println(\"Cannot close connection to MS SQL DB\");\n e.printStackTrace();\n }\n System.out.println(\"Close connection to MS SQL DB\");\n }", "@Override\n public final void close() throws IOException {\n close(new MongoDbException(\"Connection closed.\"));\n }", "public void close(Connection connection) throws SQLException {\n\n try { connection.close(); }\n catch (SQLException e) { throw e; }\n }", "@Override\n public synchronized void close() throws IOException {\n disconnect(false);\n }", "public void releaseConnection() {\r\n\t\tif (conn != null) {\r\n\t\t\ttry {\r\n\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException ex) {\r\n\t\t\t\tSystem.out.println(\"Exception closing connection: \" + ex);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void connectionClosed(final Throwable cause) {\n if (log.isDebugEnabled()) {\n log.debug(\"Connection closed\", cause);\n } else {\n log.info(\"Connection closed: \" + (cause != null ? cause.getMessage() : \"<unknown>\"));\n }\n\n if (this.client != null) {\n this.client.exceptionHandler(null);\n this.client.publishHandler(null);\n this.client.closeHandler(null);\n this.client.subscribeCompletionHandler(null);\n this.client.publishCompletionHandler(null);\n this.client.publishCompletionExpirationHandler(null);\n this.client.publishCompletionUnknownPacketIdHandler(null);\n this.client = null;\n }\n setState(SessionState.DISCONNECTED, cause);\n }", "public void closeSession() throws ConnectionException {\n\t\tif (!(stateMachine.getCurrent().getClass() == SessionValid.class)) {\n\t\t\tthrow new ConnectionException(\"Illegal connection state: \"\n\t\t\t\t\t+ stateMachine.getCurrent().getClass().getSimpleName());\n\t\t}\n\n\t\tstateMachine.doTransition(new CloseSession(managedSystemSessionId,\n\t\t\t\tmessageQueue.getSequenceNumber()));\n\t}", "@Override\n public void closeConnection() throws SQLException{\n getConnection().close();\n }", "@Override\n\tpublic void closeConnection() {\n\t\t\n\t}", "public void pgClose() {\n\t\ttry {\n\t\t\tconn.close();\n\t\t\tSystem.out.println(\"Connection closed\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.err.println(\"Connection could not be closed ĘC SQLexception\");\n\t\t}\n\t\t\n\t}", "public static void closeConnection() throws SQLException, IOException, JSchException {\n PropertiesLoader loader = new PropertiesLoader();\n int localPort = Integer.parseInt(loader.loadProperty().getProperty(\"localPort\"));\n if (connection != null) {\n connection.close();\n }\n if (session != null) {\n session.delPortForwardingL(localPort);\n session.disconnect();\n }\n }" ]
[ "0.7704999", "0.76463586", "0.73903507", "0.73521256", "0.7350661", "0.7295211", "0.7225442", "0.7179988", "0.71199733", "0.7105953", "0.708345", "0.7079227", "0.70501345", "0.70449096", "0.7011599", "0.70075023", "0.7004892", "0.6974568", "0.6963415", "0.69564366", "0.6952796", "0.69337857", "0.6933656", "0.69323766", "0.6924903", "0.6915388", "0.68879485", "0.68808776", "0.68659776", "0.6848343", "0.6832983", "0.6820896", "0.6818761", "0.68134516", "0.67919874", "0.6791807", "0.6787328", "0.6771483", "0.6770194", "0.6755082", "0.67524767", "0.6750426", "0.6745384", "0.6743759", "0.6732872", "0.6728082", "0.6715504", "0.6708956", "0.6704755", "0.6697451", "0.6684012", "0.6674213", "0.66715837", "0.66694164", "0.6669001", "0.6668211", "0.6668211", "0.66631955", "0.6657815", "0.6648441", "0.6639282", "0.66371655", "0.66196084", "0.66079843", "0.6607654", "0.6566321", "0.65584666", "0.6552014", "0.65495235", "0.6547116", "0.65428567", "0.6542436", "0.65362877", "0.65291065", "0.65252155", "0.6524055", "0.6515227", "0.6513205", "0.65050036", "0.64879924", "0.64862925", "0.64824253", "0.64808714", "0.647113", "0.64706975", "0.64667535", "0.6462458", "0.6455907", "0.64507675", "0.644379", "0.6442512", "0.6442068", "0.64375013", "0.6436077", "0.6434716", "0.6427553", "0.6422623", "0.64200526", "0.6419986", "0.64170223", "0.6412645" ]
0.0
-1
/ TODO: replace with a proper table of builtins
public boolean isBuiltinSort() { return equals(Sort.BUILTIN_BOOL) || equals(Sort.BUILTIN_INT) || equals(Sort.BUILTIN_STRING) || equals(Sort.BUILTIN_FLOAT) /* LTL builtin sorts */ // || sort.equals(Sort.SHARP_LTL_FORMULA) || equals(Sort.BUILTIN_PROP) || equals(Sort.BUILTIN_MODEL_CHECKER_STATE) || equals(Sort.BUILTIN_MODEL_CHECK_RESULT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void init_builtins() {\n\n variables.put(\"nil\", List.nil);\n\n variables.put(\"show\", new Function(\"show\", 0) {\n public Expression call(List list, Map<String,Expression> variables) {\n if (!checkArity(list, variables))\n return List.nil;\n\n System.out.println(\" show special 0 builtin\");\n System.out.println(\" cons non-special 2 builtin\");\n System.out.println(\" car non-special 1 builtin\");\n System.out.println(\" cdr non-special 1 builtin\");\n System.out.println(\" quote special 1 builtin\");\n System.out.println(\" list non-special -1 builtin\");\n System.out.println(\" append non-special -1 builtin\");\n System.out.println(\" length non-special 1 builtin\");\n System.out.println(\" + non-special 2 builtin\");\n System.out.println(\" - non-special 2 builtin\");\n System.out.println(\" * non-special 2 builtin\");\n System.out.println(\" / non-special 2 builtin\");\n System.out.println(\" = non-special 2 builtin\");\n System.out.println(\" /= non-special 2 builtin\");\n System.out.println(\" < non-special 2 builtin\");\n System.out.println(\" > non-special 2 builtin\");\n System.out.println(\" <= non-special 2 builtin\");\n System.out.println(\" >= non-special 2 builtin\");\n System.out.println(\" null non-special 1 builtin\");\n System.out.println(\" atom non-special 1 builtin\");\n System.out.println(\" listp non-special 1 builtin\");\n System.out.println(\" integerp non-special 1 builtin\");\n System.out.println(\" cond special -1 builtin\");\n return List.nil;\n }\n });\n\n\n variables.put(\"quote\", new Function(\"quote\", 1) {\n public Expression call(List list, Map<String,Expression> variables) {\n if (!checkArity(list, variables))\n return List.nil;\n return list.getCar();\n }\n });\n\n variables.put(\"list\", new Function(\"list\", -1) {\n public Expression call(List list, Map<String,Expression> variables) {\n if (!checkArity(list, variables) || list == null)\n return List.nil;\n return list.evaluate_elements(variables);\n }\n });\n\n variables.put(\"null\", new Function(\"null\", 1) {\n public Expression call(List list, Map<String,Expression> variables) {\n if (!checkArity(list, variables))\n return List.nil;\n if (list.getCar() == List.nil)\n return Number.t;\n else\n return List.nil;\n }\n });\n\n variables.put(\"atom\", new Function(\"atom\", 1) {\n public Expression call(List list, Map<String,Expression> variables) {\n if (!checkArity(list, variables))\n return List.nil;\n if (list.getCar() == List.nil)\n return Number.t;\n if (list.length() == 1)\n if (list.getCar().evaluate(variables) instanceof Atom)\n return Number.t;\n return List.nil;\n }\n });\n\n variables.put(\"listp\", new Function(\"listp\", 1) {\n public Expression call(List list, Map<String,Expression> variables) {\n if (!checkArity(list, variables))\n return List.nil;\n if (list.length() == 1)\n if(list.getCar().evaluate(variables) instanceof List)\n return Number.t;\n return List.nil;\n }\n });\n\n variables.put(\"integerp\", new Function(\"integerp\", 1) {\n public Expression call(List list, Map<String,Expression> variables) {\n if (!checkArity(list, variables))\n return List.nil;\n if (list.length() == 1) {\n Expression test = list.getCar().evaluate(variables);\n if (test instanceof Number)\n return Number.t;\n }\n return List.nil;\n }\n });\n\n variables.put(\"cons\", new Function(\"cons\", 2) {\n public Expression call(List list, Map<String,Expression> variables) {\n if (!checkArity(list, variables))\n return List.nil;\n\n Expression cdr = list.getCdr().getCar().evaluate(variables);\n if (cdr instanceof List) {\n List consed = new List(list.getCar().evaluate(variables));\n if (cdr != List.nil)\n consed.append((List) cdr);\n return consed;\n }\n System.out.println(\"cons's 2nd argument is non-list\");\n return List.nil;\n }\n });\n\n variables.put(\"car\", new Function(\"car\", 1) {\n public Expression call(List list, Map<String,Expression> variables) {\n if (list == List.nil)\n return List.nil;\n if (!checkArity(list, variables))\n return List.nil;\n\n Expression car = list.getCar().evaluate(variables);\n if (car instanceof List)\n return ((List) car).getCar();\n return List.nil;\n }\n });\n\n variables.put(\"cdr\", new Function(\"cdr\", 1) {\n public Expression call(List list, Map<String,Expression> variables) {\n if (list == List.nil)\n return List.nil;\n if (!checkArity(list, variables))\n return List.nil;\n\n Expression car = list.getCar().evaluate(variables);\n if (car instanceof List)\n return ((List) car).getCdr();\n return List.nil;\n }\n });\n\n variables.put(\"length\", new Function(\"length\", 1) {\n public Expression call(List list, Map<String,Expression> variables) {\n if (!checkArity(list, variables))\n return List.nil;\n\n Expression car = list.getCar().evaluate(variables);\n if (!(car instanceof List)) {\n System.out.println(\"length given a non-list or an impure list (dotted pair at end of list)\");\n return List.nil;\n }\n return new Number(((List) car).length());\n }\n });\n\n variables.put(\"append\", new Function(\"append\", -1) {\n public Expression call(List list, Map<String,Expression> variables) {\n if (!checkArity(list, variables) || list == null || list == List.nil)\n return List.nil;\n list = list.evaluate_elements(variables);\n\n try {\n return List.chain_append(list);\n }\n catch (List.AppendGivenNonListException e) {\n return List.nil;\n }\n }\n });\n\n variables.put(\"+\", new Function(\"+\", 2) {\n public Expression call(List list, Map<String,Expression> variables) {\n if (!checkArity(list, variables) || list == null || list == List.nil)\n return List.nil;\n list = list.evaluate_elements(variables);\n try {\n return ((Number) list.getCar()).add((Number) list.getCdr().getCar());\n } catch (ClassCastException e) {\n System.out.println(\"builtin arithmetic rel op given non-number\");\n return List.nil;\n }\n }\n });\n\n variables.put(\"-\", new Function(\"-\", 2) {\n public Expression call(List list, Map<String,Expression> variables) {\n if (!checkArity(list, variables) || list == null || list == List.nil)\n return List.nil;\n list = list.evaluate_elements(variables);\n try {\n return ((Number) list.getCar()).subtract((Number) list.getCdr().getCar());\n } catch (ClassCastException e) {\n System.out.println(\"builtin arithmetic rel op given non-number\");\n return List.nil;\n }\n }\n });\n\n variables.put(\"*\", new Function(\"*\", 2) {\n public Expression call(List list, Map<String,Expression> variables) {\n if (!checkArity(list, variables) || list == null || list == List.nil)\n return List.nil;\n list = list.evaluate_elements(variables);\n try {\n return ((Number) list.getCar()).mult((Number) list.getCdr().getCar());\n } catch (ClassCastException e) {\n System.out.println(\"builtin arithmetic rel op given non-number\");\n return List.nil;\n }\n }\n });\n\n variables.put(\"/\", new Function(\"/\", 2) {\n public Expression call(List list, Map<String,Expression> variables) {\n if (!checkArity(list, variables) || list == null || list == List.nil)\n return List.nil;\n list = list.evaluate_elements(variables);\n try {\n return ((Number) list.getCar()).div((Number) list.getCdr().getCar());\n } catch (ClassCastException e) {\n System.out.println(\"builtin arithmetic rel op given non-number\");\n return List.nil;\n }\n }\n });\n\n variables.put(\"=\", new Function(\"=\", 2) {\n public Expression call(List list, Map<String,Expression> variables) {\n if (!checkArity(list, variables) || list == null || list == List.nil)\n return List.nil;\n list = list.evaluate_elements(variables);\n try {\n return ((Number) list.getCar()).equal((Number) list.getCdr().getCar());\n } catch (ClassCastException e) {\n System.out.println(\"builtin arithmetic rel op given non-number\");\n return List.nil;\n }\n }\n });\n\n variables.put(\"/=\", new Function(\"/=\", 2) {\n public Expression call(List list, Map<String,Expression> variables) {\n if (!checkArity(list, variables) || list == null || list == List.nil)\n return List.nil;\n list = list.evaluate_elements(variables);\n try {\n return ((Number) list.getCar()).notEqual((Number) list.getCdr().getCar());\n } catch (ClassCastException e) {\n System.out.println(\"builtin arithmetic rel op given non-number\");\n return List.nil;\n }\n }\n });\n\n variables.put(\"<\", new Function(\"<\", 2) {\n public Expression call(List list, Map<String,Expression> variables) {\n if (!checkArity(list, variables) || list == null || list == List.nil)\n return List.nil;\n list = list.evaluate_elements(variables);\n try {\n return ((Number) list.getCar()).lessThan((Number) list.getCdr().getCar());\n } catch (ClassCastException e) {\n System.out.println(\"builtin arithmetic rel op given non-number\");\n return List.nil;\n }\n }\n });\n\n variables.put(\">\", new Function(\">\", 2) {\n public Expression call(List list, Map<String,Expression> variables) {\n if (!checkArity(list, variables) || list == null || list == List.nil)\n return List.nil;\n list = list.evaluate_elements(variables);\n try {\n return ((Number) list.getCar()).greaterThan((Number) list.getCdr().getCar());\n } catch (ClassCastException e) {\n System.out.println(\"builtin arithmetic rel op given non-number\");\n return List.nil;\n }\n }\n });\n\n variables.put(\"<=\", new Function(\"<=\", 2) {\n public Expression call(List list, Map<String,Expression> variables) {\n if (!checkArity(list, variables) || list == null || list == List.nil)\n return List.nil;\n list = list.evaluate_elements(variables);\n try {\n return ((Number) list.getCar()).lessThanOrEqual((Number) list.getCdr().getCar());\n } catch (ClassCastException e) {\n System.out.println(\"builtin arithmetic rel op given non-number\");\n return List.nil;\n }\n }\n });\n\n variables.put(\">=\", new Function(\">=\", 2) {\n public Expression call(List list, Map<String,Expression> variables) {\n if (!checkArity(list, variables) || list == null || list == List.nil)\n return List.nil;\n list = list.evaluate_elements(variables);\n try {\n return ((Number) list.getCar()).greaterThanOrEqual((Number) list.getCdr().getCar());\n } catch (ClassCastException e) {\n System.out.println(\"builtin arithmetic rel op given non-number\");\n return List.nil;\n }\n }\n });\n\n variables.put(\"cond\", new Function(\"cond\", -1) {\n public Expression call(List list, Map<String,Expression> variables) {\n if (list == List.nil || list == null)\n return List.nil;\n if (list.getCar() == List.nil)\n return List.nil;\n \n return Function.chain_cond(list, variables);\n }\n });\n }", "void mo57277b();", "void mo28306a();", "void mo28194a();", "void mo41086b();", "void mo12634a();", "void mo119582b();", "void mo41083a();", "void mo38026a();", "public boolean isBuiltin() {\n return builtin;\n }", "void mo72113b();", "void mo80455b();", "void mo80452a();", "void mo80457c();", "void mo105476a();", "void mo84655a();", "void mo119581a();", "void mo12637b();", "void mo12638c();", "void mo57278c();", "void mo22249a();", "void mo57275a();", "void mo98969a();", "public abstract void mo27386d();", "void mo69874a();", "void mo21076g();", "public abstract String mo13682d();", "void mo9693a();", "public abstract String mo118046b();", "public abstract int mo9754s();", "void mo21074e();", "public abstract String mo41079d();", "void mo54405a();", "public abstract int mo9747l();", "public abstract void mo27385c();", "void mo60892a();", "public abstract Object mo26777y();", "void m8367a();", "void mo12143a();", "void mo17012c();", "void mo72111a();", "void mo37810a();", "private static void init () {\r\n\t\t// make sure they all have non-null entries\r\n\t\tName undef = new Name(\"undef\", 'u');\r\n\t\tArrays.fill(op_names, undef);\r\n\t\tArrays.fill(fn_names, undef);\r\n\t\tArrays.fill(cfn_names, undef);\r\n\t\tArrays.fill(rs_names, undef);\r\n\t\tArrays.fill(rt_names, undef);\r\n\r\n\t\tfor (int n = 0; n < 32; n++)\r\n\t\t\treg_nums[n] = \"$\".concat(Integer.toString(n));\r\n\r\n\t\top_names[OP_SPECIAL] = new Name(\"**spec\");\r\n\t\top_names[OP_REGIMM] = new Name(\"**regimm\");\r\n\t\top_names[OP_J] = new Name(\"j\", 'J');\r\n\t\top_names[OP_JAL] = new Name(\"jal\", 'J');\r\n\t\top_names[OP_BEQ] = new Name(\"beq\", 'r');\r\n\t\top_names[OP_BNE] = new Name(\"bne\", 'r');\r\n\t\top_names[OP_BLEZ] = new Name(\"blez\", 'r');\r\n\t\top_names[OP_BGTZ] = new Name(\"bgtz\", 'r');\r\n\t\top_names[OP_ADDIU] = new Name(\"addiu\", 'b');\r\n\t\top_names[OP_SLTI] = new Name(\"slti\", 'b');\r\n\t\top_names[OP_SLTIU] = new Name(\"sltiu\", 'b');\r\n\t\top_names[OP_ANDI] = new Name(\"andi\", 'b');\r\n\t\top_names[OP_ORI] = new Name(\"ori\", 'b');\r\n\t\top_names[OP_XORI] = new Name(\"xori\", 'b');\r\n\t\top_names[OP_LUI] = new Name(\"lui\", 'I');\r\n\t\top_names[OP_COP1] = new Name(\"**cop1\");\r\n\t\top_names[OP_SPEC2] = new Name(\"**spec2\");\r\n\t\top_names[OP_LB] = new Name(\"lb\", 'l');\r\n\t\top_names[OP_LH] = new Name(\"lh\", 'l');\r\n\t\top_names[OP_LWL] = new Name(\"lwl\", 'l');\r\n\t\top_names[OP_LW] = new Name(\"lw\", 'l');\r\n\t\top_names[OP_LBU] = new Name(\"lbu\", 'l');\r\n\t\top_names[OP_LHU] = new Name(\"lhu\", 'l');\r\n\t\top_names[OP_LWR] = new Name(\"lwr\", 'l');\r\n\t\top_names[OP_SB] = new Name(\"sb\", 's');\r\n\t\top_names[OP_SH] = new Name(\"sh\", 's');\r\n\t\top_names[OP_SWL] = new Name(\"swl\", 's');\r\n\t\top_names[OP_SW] = new Name(\"sw\", 's');\r\n\t\top_names[OP_SWR] = new Name(\"swr\", 's');\r\n\t\top_names[OP_LWC1] = new Name(\"lwc1\", 'L');\r\n\t\top_names[OP_SWC1] = new Name(\"swc1\", 'S');\r\n\r\n\t\tfn_names[FN_SLL] = new Name(\"sll\");\r\n\t\tfn_names[FN_SRL] = new Name(\"srl\");\r\n\t\tfn_names[FN_SRA] = new Name(\"sra\");\r\n\t\tfn_names[FN_SLLV] = new Name(\"sllv\");\r\n\t\tfn_names[FN_SRLV] = new Name(\"srlv\");\r\n\t\tfn_names[FN_SRAV] = new Name(\"srav\");\r\n\t\tfn_names[FN_JR] = new Name(\"jr\", 'j');\r\n\t\tfn_names[FN_JALR] = new Name(\"jalr\", 'j');\r\n\t\tfn_names[FN_MOVN] = new Name(\"movn\", 'u');\r\n\t\tfn_names[FN_SYSCALL] = new Name(\"**sys\");\r\n\t\tfn_names[FN_BREAK] = new Name(\"**break\");\r\n\t\tfn_names[FN_MFHI] = new Name(\"mfhi\");\r\n\t\tfn_names[FN_MFLO] = new Name(\"mflo\");\r\n\t\tfn_names[FN_MULT] = new Name(\"mult\");\r\n\t\tfn_names[FN_MULTU] = new Name(\"multu\");\r\n\t\tfn_names[FN_DIV] = new Name(\"div\");\r\n\t\tfn_names[FN_DIVU] = new Name(\"divu\");\r\n\t\tfn_names[FN_ADDU] = new Name(\"addu\", 'B');\r\n\t\tfn_names[FN_SUBU] = new Name(\"subu\", 'B');\r\n\t\tfn_names[FN_AND] = new Name(\"and\", 'B');\r\n\t\tfn_names[FN_OR] = new Name(\"or\", 'B');\r\n\t\tfn_names[FN_XOR] = new Name(\"xor\", 'B');\r\n\t\tfn_names[FN_NOR] = new Name(\"nor\", 'B');\r\n\t\tfn_names[FN_SLT] = new Name(\"slt\", 'B');\r\n\t\tfn_names[FN_SLTU] = new Name(\"sltu\", 'B');\r\n\r\n\t\trs_names[RS_MF] = new Name(\"mfc1\", '6');\r\n\t\trs_names[RS_CF] = new Name(\"cfc1\", '4');\r\n\t\trs_names[RS_MT] = new Name(\"mtc1\", '5');\r\n\t\trs_names[RS_CT] = new Name(\"ctc1\");\r\n\t\trs_names[RS_BC] = new Name(\"bc1\");\r\n\t\trs_names[RS_FMT_SINGLE] = new Name(\"**fmts\");\r\n\t\trs_names[RS_FMT_DOUBLE] = new Name(\"**fmtd\");\r\n\t\trs_names[RS_FMT_WORD] = new Name(\"**fmtw\");\r\n\r\n\t\tcfn_names[CFN_ADD_D] = new Name(\"add\", '3');\r\n\t\tcfn_names[CFN_SUB_D] = new Name(\"sub\", '3');\r\n\t\tcfn_names[CFN_MUL_D] = new Name(\"mul\", '3');\r\n\t\tcfn_names[CFN_DIV_D] = new Name(\"div\", '3');\r\n\t\tcfn_names[CFN_MOV_D] = new Name(\"mov\", '2'); // 2?\r\n\t\tcfn_names[CFN_NEG_D] = new Name(\"neg\", '2');\r\n\t\tcfn_names[CFN_CVTS] = new Name(\"cvts\", '2'); // all type 2\r\n\t\tcfn_names[CFN_CVTD] = new Name(\"cvtd\", '2');\r\n\t\tcfn_names[CFN_CVTW] = new Name(\"cvtw\", '2');\r\n\t\tcfn_names[CFN_FC_ULT] = new Name(\"ult\", 'c');\r\n\t\tcfn_names[CFN_FC_EQ] = new Name(\"eq\", 'c'); // all type c\r\n\t\tcfn_names[CFN_FC_LT] = new Name(\"lt\", 'c');\r\n\t\tcfn_names[CFN_FC_LE] = new Name(\"le\", 'c');\r\n\r\n\t\trt_names[RT_BLTZ] = new Name(\"bltz\", 'v');\r\n\t\trt_names[RT_BGEZ] = new Name(\"bgez\", 'v');\r\n\t\trt_names[RT_BLTZAL] = new Name(\"bltzal\", 'v');\r\n\t\trt_names[RT_BGEZAL] = new Name(\"bgezal\", 'v');\r\n\t}", "void mo88521a();", "public String getFunctions();", "void m1864a() {\r\n }", "void mo67923b();", "void mo88523b();", "void mo21073d();", "void mo72114c();", "void mo67920a();", "public interface C2950c {\n /* renamed from: a */\n int mo9690a(int i, int i2);\n\n /* renamed from: a */\n int mo9691a(String str, String str2, float f);\n\n /* renamed from: a */\n int mo9692a(String[] strArr, int i);\n\n /* renamed from: a */\n void mo9693a();\n\n /* renamed from: a */\n void mo9694a(float f, float f2);\n\n /* renamed from: a */\n void mo9695a(float f, float f2, float f3, float f4, float f5);\n\n /* renamed from: a */\n void mo9696a(float f, float f2, int i);\n\n /* renamed from: a */\n void mo9697a(String str);\n\n /* renamed from: a */\n void mo9698a(String str, float f);\n\n /* renamed from: a */\n void mo9699a(String str, String str2, boolean z);\n\n /* renamed from: a */\n void mo9700a(String str, boolean z);\n\n /* renamed from: a */\n void mo9701a(boolean z);\n\n /* renamed from: b */\n int mo9702b(String str, String str2, float f);\n\n /* renamed from: b */\n void mo9703b(float f, float f2);\n\n /* renamed from: b */\n void mo9704b(float f, float f2, int i);\n\n /* renamed from: c */\n void mo9705c(float f, float f2);\n}", "public abstract void mo30696a();", "@Test\n public void testCategoryMethod2() {\n String contents = \"Object.&toString\"; // candidates available from Class, Object and DefaultGroovyMethods\n assertKnown(contents, \"toString\", \"org.codehaus.groovy.runtime.DefaultGroovyMethods\", \"toString\", DeclarationKind.METHOD);\n }", "void mo21072c();", "public abstract void mo27464a();", "void mo1943l();", "public abstract int mo9797a();", "public interface C5951a {\n /* renamed from: e */\n void mo12651e(String str, String str2, Object... objArr);\n\n /* renamed from: i */\n void mo12652i(String str, String str2, Object... objArr);\n\n void printErrStackTrace(String str, Throwable th, String str2, Object... objArr);\n\n /* renamed from: w */\n void mo12654w(String str, String str2, Object... objArr);\n }", "public abstract int mo9732a();", "void mo56163g();", "@Test\n public void testDistBuiltins()\n {\n String sName = \"dist-builtins\";\n generateEvents(sName);\n checkEvents(false, true);\n BackingMapListener.INSTANCE.asssertBuiltIns(sName);\n }", "void mo13368a();", "void mo60893b();", "public interface C4740t {\n /* renamed from: a */\n void mo25261a(Context context);\n\n /* renamed from: a */\n boolean mo25262a(int i);\n\n /* renamed from: a */\n boolean mo25263a(String str, String str2, boolean z, int i, int i2, int i3, boolean z2, C4619b bVar, boolean z3);\n\n /* renamed from: b */\n byte mo25264b(int i);\n\n /* renamed from: c */\n boolean mo25265c();\n\n /* renamed from: c */\n boolean mo25266c(int i);\n}", "void mo67924c();", "public abstract String mo41086i();", "void mo17023d();", "public abstract void mo6549b();", "public abstract void mo42331g();", "public interface sym {\n /* terminals */\n public static final int SHORT = 47;\n public static final int ANDEQ = 94;\n public static final int IMPLEMENTS = 4;\n public static final int CONST = 27;\n public static final int BITNOT = 68;\n public static final int STRICTFP = 35;\n public static final int NOTEQ = 74;\n public static final int PLUSEQ = 90;\n public static final int RBRACK = 60;\n public static final int CATCH = 20;\n public static final int COMMA = 62;\n public static final int RBRACE = 58;\n public static final int THROW = 22;\n public static final int RPAREN = 56;\n public static final int LBRACK = 59;\n public static final int ANDAND = 75;\n public static final int NUMERO = 101;\n public static final int OROR = 76;\n public static final int DOUBLE = 51;\n public static final int LBRACE = 57;\n public static final int TRANSIENT = 32;\n public static final int LPAREN = 55;\n public static final int XOREQ = 96;\n public static final int PROTECTED = 37;\n public static final int FALSE = 54;\n public static final int NOT = 67;\n public static final int COMENTARIO = 102;\n public static final int FINAL = 29;\n public static final int FLOAT = 49;\n public static final int URSHIFTEQ = 45;\n public static final int PACKAGE = 25;\n public static final int MOD = 86;\n public static final int CLASS = 2;\n public static final int SUPER = 34;\n public static final int ABSTRACT = 28;\n public static final int TRUE = 53;\n public static final int NATIVE = 30;\n public static final int PLUS = 79;\n public static final int LONG = 50;\n public static final int QUESTION = 69;\n public static final int WHILE = 17;\n public static final int EQUAL = 64;\n public static final int EXTENDS = 3;\n public static final int INTERFACE = 5;\n public static final int CHAR = 46;\n public static final int BOOLEAN = 44;\n public static final int SWITCH = 16;\n public static final int DO = 11;\n public static final int FOR = 14;\n public static final int RSHIFTEQ = 99;\n public static final int GREATER = 65;\n public static final int DIV = 82;\n public static final int VOID = 40;\n public static final int MULT = 81;\n public static final int PUBLIC = 36;\n public static final int RETURN = 15;\n public static final int ELSE = 13;\n public static final int TRY = 19;\n public static final int GTEQ = 73;\n public static final int BREAK = 7;\n public static final int DOT = 63;\n public static final int INT = 48;\n public static final int THROWS = 23;\n public static final int EQEQ = 71;\n public static final int NULL = 41;\n public static final int EOF = 0;\n public static final int SEMICOLON = 61;\n public static final int THIS = 42;\n public static final int DEFAULT = 10;\n public static final int MULTEQ = 92;\n public static final int IMPORT = 24;\n public static final int MINUS = 80;\n public static final int LTEQ = 72;\n public static final int OR = 84;\n public static final int URSHIFT = 89;\n public static final int error = 1;\n public static final int SYNCHRONIZED = 31;\n public static final int DIVEQ = 93;\n public static final int LSHIFTEQ = 98;\n public static final int FINALLY = 21;\n public static final int CONTINUE = 9;\n public static final int IF = 12;\n public static final int INSTANCEOF = 43;\n public static final int ID = 100;\n public static final int MODEQ = 97;\n public static final int MINUSMINUS = 78;\n public static final int COLON = 70;\n public static final int ASSERT = 18;\n public static final int OREQ = 95;\n public static final int VOLATILE = 33;\n public static final int PLUSPLUS = 77;\n public static final int CASE = 8;\n public static final int NEW = 6;\n public static final int RSHIFT = 88;\n public static final int STRING = 52;\n public static final int LESS = 66;\n public static final int BYTE = 26;\n public static final int AND = 83;\n public static final int PRIVATE = 38;\n public static final int STATIC = 39;\n public static final int LSHIFT = 87;\n public static final int XOR = 85;\n public static final int MINUSEQ = 91;\n}", "public void parseFunctions(){\n\t\t\n\t}", "public String getMode() { return \"FUNC\"; }", "public abstract String mo11611b();", "void mo56161e();", "void mo17021c();", "void m8368b();", "public void func_70295_k_() {}", "void mo5017a();", "public abstract String mo9239aw();", "public interface Symbols {\n /* terminals */\n public static final int BAG = 68;\n public static final int RETRIEVE = 93;\n public static final int AS = 34;\n public static final int TIMES = 13;\n public static final int LCURLY = 54;\n public static final int TYPE = 58;\n public static final int LEAVESBY = 91;\n public static final int LOWEREQUALS = 33;\n public static final int LAZY_FAILURE = 97;\n public static final int CLOSEUNIQUEBY = 90;\n public static final int NAME = 7;\n public static final int ENUM = 70;\n public static final int FORSOME = 41;\n public static final int CATCH = 114;\n public static final int DATEPREC = 109;\n public static final int COMMA = 29;\n public static final int VIRTUAL = 99;\n public static final int RANDOM = 110;\n public static final int DOUBLE_LITERAL = 4;\n public static final int SUM = 48;\n public static final int THROW = 116;\n public static final int JOIN = 28;\n public static final int RPAREN = 19;\n public static final int ON_NAVIGATE = 106;\n public static final int STRUCT = 69;\n public static final int NOT_MATCH_STRING = 23;\n public static final int LPAREN = 18;\n public static final int NOW = 108;\n public static final int INTEGER_LITERAL = 2;\n public static final int NOT = 24;\n public static final int VIEW = 98;\n public static final int INSTANCE = 73;\n public static final int DIFFERENT = 21;\n public static final int DATE_LITERAL = 6;\n public static final int MIN = 43;\n public static final int THEN = 65;\n public static final int EXTERNAL = 67;\n public static final int RECORD = 57;\n public static final int SEROID = 120;\n public static final int REVERSE = 107;\n public static final int ON_UPDATE = 103;\n public static final int LOWER = 31;\n public static final int INSERTCOPY = 83;\n public static final int BOOLEAN_LITERAL = 5;\n public static final int TEMPORAL = 80;\n public static final int CLASS = 71;\n public static final int SEED = 101;\n public static final int IMPLEMENT = 95;\n public static final int MODULO = 17;\n public static final int UNIQUEREF = 47;\n public static final int PLUS = 10;\n public static final int FORALL = 42;\n public static final int DIVIDE = 14;\n public static final int EXISTS = 49;\n public static final int GREATEREQUALS = 32;\n public static final int WHILE = 84;\n public static final int UNION = 16;\n public static final int DELETE = 77;\n public static final int EXTENDS = 72;\n public static final int MODULE = 53;\n public static final int INTERFACE = 117;\n public static final int ASSIGN = 61;\n public static final int RSQUARE = 52;\n public static final int FOR = 86;\n public static final int DO = 85;\n public static final int SCHEMADEF = 96;\n public static final int MATCH_STRING = 22;\n public static final int GREATER = 30;\n public static final int RANGEAS = 119;\n public static final int MAX = 44;\n public static final int RETURN = 60;\n public static final int TRY = 113;\n public static final int ELSE = 66;\n public static final int DOTDOT = 50;\n public static final int BREAK = 87;\n public static final int DOT = 26;\n public static final int PERMANENT = 79;\n public static final int AVG = 45;\n public static final int TRANSACTION_ABORT = 112;\n public static final int STRING_LITERAL = 3;\n public static final int EOF = 0;\n public static final int SEMICOLON = 8;\n public static final int INTERSECT = 15;\n public static final int LSQUARE = 51;\n public static final int WHERE = 27;\n public static final int COUNT = 25;\n public static final int LOCAL = 81;\n public static final int IMPORT = 56;\n public static final int IS = 59;\n public static final int UNIQUE = 46;\n public static final int IN = 36;\n public static final int OR = 39;\n public static final int error = 1;\n public static final int HYPHEN = 11;\n public static final int LEAVESUNIQUEBY = 92;\n public static final int FINALLY = 115;\n public static final int CONTINUE = 88;\n public static final int INSTANCEOF = 74;\n public static final int IF = 64;\n public static final int CONTAINS = 37;\n public static final int COLON = 9;\n public static final int SUBTRACT = 12;\n public static final int CREATE = 78;\n public static final int DEREF = 62;\n public static final int FOREACH = 63;\n public static final int REF = 75;\n public static final int ON_DELETE = 104;\n public static final int DESEROID = 121;\n public static final int CLOSEBY = 89;\n public static final int RENAME = 122;\n public static final int UPDATE = 94;\n public static final int INSERT = 82;\n public static final int OBJECTS = 100;\n public static final int AND = 40;\n public static final int SESSION = 76;\n public static final int ON_RETRIEVE = 102;\n public static final int GROUPAS = 35;\n public static final int ON_NEW = 105;\n public static final int ORDERBY = 38;\n public static final int DISTINCT = 118;\n public static final int RCURLY = 55;\n public static final int EQUALS = 20;\n public static final int TRANSACTION_CAPABLE = 111;\n}", "void mo10148a();", "void mo7350a();", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public abstract void mo42329d();", "public abstract boolean mo9737c();", "public abstract int mo41077c();", "interface C1069a {\n /* renamed from: a */\n C1000w mo7300a(int i);\n\n /* renamed from: a */\n void mo7301a(int i, int i2);\n\n /* renamed from: a */\n void mo7302a(int i, int i2, Object obj);\n\n /* renamed from: a */\n void mo7303a(C1070b bVar);\n\n /* renamed from: b */\n void mo7304b(int i, int i2);\n\n /* renamed from: b */\n void mo7305b(C1070b bVar);\n\n /* renamed from: c */\n void mo7306c(int i, int i2);\n\n /* renamed from: d */\n void mo7308d(int i, int i2);\n }", "public abstract void mo102899a();", "int mo98209b();", "public abstract void mo42330e();", "void mo7353b();", "public abstract void mo70713b();", "void mo4833b();", "public abstract int mo4375b();", "String getInizializedFunctionName();", "boolean mo1835a();", "C7904c mo24084a();", "public interface C2604b {\n /* renamed from: a */\n void mo1886a(String str, String str2);\n\n /* renamed from: a */\n boolean mo1887a(String str);\n\n /* renamed from: b */\n String mo1888b(String str, String str2, String str3, String str4);\n }", "boolean mo23707a();", "public abstract String mo10149a();" ]
[ "0.6280959", "0.5994707", "0.58380616", "0.5826048", "0.57758707", "0.5772488", "0.573424", "0.5697496", "0.5689293", "0.56815994", "0.5675532", "0.564546", "0.56333095", "0.5623611", "0.5606999", "0.55946934", "0.55921847", "0.55881745", "0.5586405", "0.55740863", "0.5572022", "0.55618995", "0.5559022", "0.55520886", "0.55406916", "0.5539434", "0.5537027", "0.5536125", "0.55315727", "0.55304897", "0.5526208", "0.5513056", "0.54996395", "0.5498657", "0.5497076", "0.5492967", "0.54820484", "0.54792595", "0.54761386", "0.5475097", "0.5468899", "0.54675823", "0.5464548", "0.54602593", "0.54530597", "0.54478", "0.54441357", "0.54412216", "0.54363555", "0.54305834", "0.54209536", "0.54145235", "0.5413127", "0.53961426", "0.5394797", "0.5391655", "0.5385446", "0.5384704", "0.5378094", "0.53713536", "0.5369261", "0.5367632", "0.53668773", "0.5362847", "0.53613", "0.5354153", "0.5346293", "0.53442484", "0.53382957", "0.5336468", "0.5333253", "0.5326393", "0.53258383", "0.5324382", "0.532433", "0.5317315", "0.53128576", "0.5311832", "0.5306109", "0.5302244", "0.5300134", "0.52988106", "0.52926594", "0.52834654", "0.52822924", "0.52775633", "0.5277527", "0.52742696", "0.5274099", "0.5272606", "0.52627194", "0.5258631", "0.5257519", "0.5253317", "0.5247158", "0.5246063", "0.52402264", "0.52309924", "0.52276486", "0.52267605", "0.5220423" ]
0.0
-1
/ todo reciver image is there
@Override public void onDataChange(DataSnapshot dataSnapshot) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onRxImage(String name, ImageMessage image) {\n\t\t\n\t}", "@Override\n public void run() {\n try {\n Drawable drawable = Drawable.createFromStream(new URL(image_path).openStream(), \"\");\n\n Message message = Message.obtain();\n message.obj = drawable;\n handler.sendMessage(message);\n } catch (MalformedURLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void readImages() {\n\t\t\n\t}", "java.lang.String getImage();", "boolean hasImageByHandler();", "@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 }", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();", "public String getImage() { return image; }", "public void isImagePresent() {\r\n\t\t\t\r\n\t\t}", "String getImage();", "private void getNewImage() {\n try {\n URL imageUrl = new URL(path);\n URLConnection uc = imageUrl.openConnection();\n\n InputStream is = uc.getInputStream();\n BufferedInputStream bis = new BufferedInputStream(is);\n\n ByteArrayOutputStream buffer = new ByteArrayOutputStream();\n int current;\n while ((current = bis.read()) != -1) {\n buffer.write((byte) current);\n }\n final byte[] data = buffer.toByteArray();\n // enqueue UI update as a priority\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n public void run() {\n view.setImageBitmap(BitmapFactory.decodeByteArray(\n data, 0, data.length));\n }\n });\n // update database while that is queueing\n ContentValues values = new ContentValues();\n values.put(MovieEntry.COLUMN_POSTER, data);\n context.getContentResolver().update(MovieEntry.buildMovieUriWithId(movieId),\n values, null, null);\n } catch (Exception E) {\n Log.i(TAG, E.toString());\n E.printStackTrace();\n }\n }", "@Override\n public void run() {\n Bitmap bmp = getURLimage(imageUrl);\n Message msg = new Message();\n msg.what = 0;\n msg.obj = bmp;\n handle.sendMessage(msg);\n }", "private void handleImage(byte[] b) throws IOException {\n Log.i(\"ScrencapHandler\",\"handleImage\");\n long utime = System.currentTimeMillis();\n byte[] unixTime = toByteArray(utime);\n int start = b.length - unixTime.length - 1; //-1 for the seqnum\n for (int i = 0; i < unixTime.length; i++) {\n b[start + i] = unixTime[i];\n }\n\n if (jitterControl.channelIsFree()) {\n int seq = jitterControl.sendt(utime, b.length);\n\n // Add seq number.\n b[b.length - 1] = (byte) seq;\n\n // Send out the data to the network.\n Log.i(\"ScrencapHandler\",\"Send out the data to the network\");\n mWebkeyVisitor.send(b);\n }\n }", "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 }", "com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByHandlerOrBuilder();", "@Override\n protected String getRequestedImage(HttpServletRequest req) {\n\treturn null;\n }", "private void sendImage(Uri selectedImageUri) {\n\t\t\n\t}", "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 }", "java.lang.String getImagePath();", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tBitmap bitmap = getImageFromLocal(imgPath);\n\t\t\t\tif (bitmap == null) {\n\t\t\t\t\tloadImgByNet(handler, imgUrl, imgPath);\n\t\t\t\t} else {\n\t\t\t\t\tMessage msg = handler.obtainMessage();\n\t\t\t\t\tmsg.obj = bitmap;\n\t\t\t\t\tmsg.what = IMG_FROM_LOCAL;\n\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t}\n\t\t\t}", "@Override\n protected Map<String, DataPart> getByteData()\n {\n Map<String, DataPart> params = new HashMap<>();\n long imagename = System.currentTimeMillis();\n params.put(Keys.message, new DataPart(imagename + \".png\", getFileDataFromDrawable(bitmap)));\n return params;\n }", "private boolean isImageGiven(){\n return captureImage.getDrawable() != null;\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if(resultCode == RESULT_OK && requestCode ==200){\n Uri uri_img=data.getData();\n try{\n assert uri_img != null;\n InputStream input_img = updateView.getContext().getContentResolver().openInputStream(uri_img);\n DecodeImage_stream = BitmapFactory.decodeStream(input_img);\n chooseImage.setImageBitmap(DecodeImage_stream);\n }catch (FileNotFoundException f){\n Log.d(\"add new file not found:\",f.getMessage());\n }\n }\n }", "@Override\n\tpublic void requestImageReceived(CatchoomImage image)\n\t{\n\t\t\n//\t\tstartActivity(new Intent(RecognitionOnlyActivity.this, MainActivityVedio.class));\n\t\t\n\t\tBitmap bitmap = image.toBitmap();\n\t\t\n\t\tBitmap bitmapone = getBitmapFromAsset(\"accendo_logo.png\");\n\t\t\n\t\t/*if (bitmap.getWidth() == bitmapone.getWidth() && bitmap.getHeight() == bitmapone.getHeight())\n\t\t{*/\n\t int[] pixels1 = new int[bitmap.getWidth() * bitmap.getHeight()];\n\t int[] pixels2 = new int[bitmapone.getWidth() * bitmapone.getHeight()];\n\t bitmap.getPixels(pixels1, 0, bitmap.getWidth(), 0, 0, bitmap.getWidth(), bitmap.getHeight());\n\t bitmapone.getPixels(pixels2, 0, bitmapone.getWidth(), 0, 0, bitmapone.getWidth(), bitmapone.getHeight());\n\t if (!Arrays.equals(pixels1, pixels2)) \n\t {\n\t resultUrl=\"http://www.accendotechnologies.com/\";\n\t startActivity(new Intent(RecognitionOnlyActivity.this, VideoActivity.class));\n\t }\n\t else \n\t {\n\t \tresultUrl=\"\";\n\t }\n//\t } else\n//\t {\n//\t \tresultUrl=\"\";\n//\t }\n//\t\t\n\t\t\n\t\n\t\t\n//\t\tString imageName = image.toString();\n//\t\tString[] splitName = imageName.split(\"@\", imageName.length());\n//\t\tToast.makeText(getApplicationContext(), \"Image Name is \"+splitName[1], Toast.LENGTH_LONG).show();\n//\t\tf = new File(Environment.getExternalStorageDirectory()+\"/\"+splitName[1]+\".jpg\");\n//\t\ttry\n//\t\t{\n//\t\t\tFileOutputStream fout = new FileOutputStream(f);\n//\t\t\tbitmap.compress(Bitmap.CompressFormat.JPEG, 100, fout); \n//\t\t\tfout.flush();\n//\t\t\tfout.close();\n//\t\t}catch(Exception e)\n//\t\t{\n//\t\t\te.printStackTrace();\n//\t\t}\n//\t\t\n//\t\tImageAsync imasc = new ImageAsync();\n//\t\timasc.execute(f.toString());\n//\t\t\n//\t\tbitmap.recycle();\n//\t\t\n\t\t\n\t\t\n\n\t\t\n//\t\tmCloudRecognition.searchWithImage(COLLECTION_TOKEN,image);\n//\t\tstartActivity(new Intent(RecognitionOnlyActivity.this, MainActivityVedio.class));\n\t\t/**\n\t\t * chary\n\t\t * Need to write service code to send image.\n\t\t */\n\t\t\n\t}", "@Override\n\tvoid postarFoto() {\n\n\t}", "String getImagePath();", "String getImagePath();", "private void KirimImage(){\n try {\n DatagramSocket clientsocket=new DatagramSocket(portimage);\n byte[] receivedata = new byte[92024];\n DatagramPacket kirim = new DatagramPacket(receivedata, receivedata.length);\n clientsocket.receive(kirim); \n byte[] buff = kirim.getData();\n \n String pesan = new String(buff, 0, buff.length);\n pesan=pesan.trim();\n// System.out.println(\"pesan = \" + pesan);\n \n if (pesan.equalsIgnoreCase(\"stop\")) {\n clientsocket.close();\n System.exit(0);\n } else {\n InputStream in = new ByteArrayInputStream(buff);\n BufferedImage img = ImageIO.read(in);\n ImageIO.write(img, \"jpg\", new File(\"D:\\\\NikokMenerima.jpg\"));\n ImageIcon set = new ImageIcon(img);\n Images.setIcon(set);\n clientsocket.close(); }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void storeImage(Boolean hasImage){\n if (hasImage) {\r\n RequestQueue queue = Volley.newRequestQueue(getBaseContext());\r\n final String command = getString(R.string.server_address) + \"/\" + getString(R.string.get_image_server)\r\n + \"username=\" + username;\r\n// Request a string response from the provided URL.\r\n StringRequest stringRequest = new StringRequest(Request.Method.GET, command,\r\n new Response.Listener<String>() {\r\n @Override\r\n public void onResponse(String response) {\r\n // Display the first 500 characters of the response string.\r\n //Log.d(\"ddd\", \"command :\" + command);\r\n //Log.d(\"ddd\", \"writing :\" + response);\r\n loadImageInGUI(response);\r\n Utility.writeOnPreferences(activity, \"image\", response);\r\n Utility.reloadActivity(activity);\r\n\r\n }\r\n }, new Response.ErrorListener() {\r\n @Override\r\n public void onErrorResponse(VolleyError error) {\r\n //Log.d(\"aaa\", error.toString());\r\n }\r\n\r\n });\r\n\r\n// Add the request to the RequestQueue.\r\n queue.add(stringRequest);\r\n }\r\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByTransform();", "@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n long imagename = System.currentTimeMillis();\n params.put(\"pic\", new DataPart(imagename + \".jpg\", getFileDataFromDrawable(bitmap)));\n return params;\n }", "private byte[] getImage(){\n byte image[] = null;\n try {\n if(isImageGiven()) {\n image = getImageBytes();\n }\n }catch (IOException e){\n Toast.makeText(this,\"Error in Creating the image \"+e, Toast.LENGTH_SHORT).show();\n }\n return image;\n }", "private void setPhotoAttcher() {\n\n }", "@Override\r\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\r\n\t\t\r\n\t\tif(resultCode!=RESULT_OK){\r\n\t\t\tSystem.out.println(\"error\");\r\n\t\t}if(requestCode==SLE_PH){\r\n\t\t\tif(imageuri!=null){\r\n\t\t\t\ttry {\r\n\t\t\t\t\tis= getContentResolver().openInputStream(imageuri);\r\n\t\t\t\t\tBitmap bm=BitmapFactory.decodeStream(is);\r\n\t\t\t\t\tBitmap bm2= toRoundBitmap(bm);\r\n\t\t\t\t\tself_headimg.setImageBitmap(bm2);\r\n\t\t\t\t\tsaveMyBitmap(bm2);\r\n\t\t\t\t\tpath=Environment.getExternalStorageDirectory()+\"/head.png\";\r\n\t\t\t\t\tmyApplication my=(myApplication) Main_Activity.this.getApplication();\r\n//\t\t\t\t\tToast.makeText(Main_Activity.this, \"\"+my.getUser_name(), Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\tNetUtil.uploadDataByHttpClientFile(Main_Activity.this,f);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}}", "public void imageSaveControl(byte[] readByte, SocketChannel client,int userNumber){\n\t\ttry{\n\t\t\tString dirtyResult = new String(readByte,\"ISO-8859-1\");\n\t\t\tif(dirtyResult.contains(\"ULMImg\")){\t\t\t\t\t\t\n\t\t\t\tSystem.out.println(\"userNumber = \" + userNumber);\n\t\t\t\tUsers[userNumber].setIsFile(true);\n\t\t\t\tint l = (\"ULMImg\" + c.STATEND).length();\n\t\t\t\tint position = dirtyResult.indexOf(\"ULMImg\");\n\t\t\t\tString remain = dirtyResult.substring(position + l);\n\t\t\t\tif(remain.length() > 0){\n\t\t\t\t\tSystem.out.println(\"^^^^^\");\n\t\t\t\t\tbyte [] remains = remain.getBytes(\"ISO-8859-1\");\n\t\t\t\t\tsaveImage(userNumber,remains);\n\t\t\t\t\tbyte another[] = dirtyResult.substring(0,position).getBytes(\"ISO-8859-1\");\n\t\t\t\t\tif(another.length > 0){\n\t\t\t\t\t\tprepareParse(another,client,userNumber);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(dirtyResult.contains(\"SMImgD\")){\t\t\t\t\n\t\t\t\tUsers[userNumber].setIsFile(false);\n\t\t\t\tUsers[userNumber].setIsFileSended(true);\n\t\t\t\tint l = (\"SMImgD\" + c.STATEND).length();\n\t\t\t\tint position = dirtyResult.indexOf(\"SMImgD\");\n\t\t\t\tString remain = dirtyResult.substring(0,position);\n\t\t\t\tif(remain.length() > 0){\n\t\t\t\t\tSystem.out.println(\"vvvvv\");\n\t\t\t\t\tbyte [] remains = remain.getBytes(\"ISO-8859-1\");\n\t\t\t\t\tsaveImage(userNumber,remains);\n\t\t\t\t\tbyte another[] = dirtyResult.substring(position + l).getBytes(\"ISO-8859-1\");\n\t\t\t\t\tif(another.length > 0){\n\t\t\t\t\t\tprepareParse(another,client,userNumber);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(Users[userNumber].imgTempNum != -1){\t\t\t\t\t\t//image can't be null\n\t\t\t\t\tSystem.out.println(\"imagesize:\" + imgTemps[Users[userNumber].imgTempNum].getTempLength());\n\t\t\t\t\ttry{\t\t\t\t\t\t\t\t\t\t\t\t\t//save to disk\n\t\t\t\t\t\tFile fWrite = new File(c.imagepath + Users[userNumber].getId() + \".PNG\");\n\t\t\t\t\t\tFileOutputStream out = new FileOutputStream(fWrite);\n\t\t\t\t\t\tout.write(imgTemps[Users[userNumber].imgTempNum].getNewFiles(),0,imgTemps[Users[userNumber].imgTempNum].getTempLength());\n\t\t\t\t\t\tout.close();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\tSystem.out.println(e);\n\t\t\t\t\t\tif(c.debug){\te.printStackTrace();}\n\t\t\t\t\t}\n\t\t\t\t\timgTemps[Users[userNumber].imgTempNum].userNumber = -1;\n\t\t\t\t\timgTemps[Users[userNumber].imgTempNum].newFiles = null;\t\n\t\t\t\t\timgTemps[Users[userNumber].imgTempNum].setTempLength(0);\n\t\t\t\t}\n\t\t\t\tUsers[userNumber].setIsFile(false);\n\t\t\t\tUsers[userNumber].setIsFileSended(true);\n\t\t\t\tString result = \"setIsFileSended;true\";\n\t\t\t\tc.sendInforBack(client,result);\n\t\t\t}\n\n\t\t\tif(Users[userNumber].getIsFile()){\t\t\t\t\t\t\t\t\n\t\t\t\tif((!dirtyResult.contains(\"ULMImg\")) && (!dirtyResult.contains(\"SMImgD\"))) {\n\t\t\t\t\tsaveImage(userNumber,readByte);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(e);\n\t\t\tif(c.debug){\te.printStackTrace();}\n\t\t}\n\t}", "@Override\r\n\tpublic void completed(HttpResponse message) {\n\t\tsuper.completed(message);\r\n\t\tif (message.getEntity().getContentType().getValue().equals(\"image/jpeg\")) {\r\n\t\t\ttry {\r\n\t\t\t\tByteArrayOutputStream output = new ByteArrayOutputStream();\r\n\t\t\t\tImageIO.write(ImageIO.read(message.getEntity().getContent()), \"jpeg\", output);\r\n\t\t\t\tTreeMap<String, byte[]> map = new TreeMap<String, byte[]>();\r\n\t\t\t\tmap.put(bundle.getHeaders().get(\"Video-Stream\").toString(), output.toByteArray());\r\n\t\t\t\tpublisher.addToReadQueue(ProtocolHelper.unmarshel(map));\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tlogger.error(e.getMessage());\r\n\t\t\t}\r\n\t\t} \r\n\t}", "@Override\n public void receivedImage(byte[] image) {\n synchronized(_imageListeners) {\n if (_imageListeners.isEmpty()) return;\n }\n \n try {\n final int imageSeq = _imageSeq.incrementAndGet();\n \n // Figure out how many pieces into which to fragment the image\n final int totalIdx = (image.length - 1) / UdpConstants.MAX_PAYLOAD_SIZE + 1;\n \n // Transmit each piece in a separate packet\n for (int pieceIdx = 0; pieceIdx < totalIdx; ++pieceIdx) {\n \n // Compute the length of this piece\n int pieceLen = (pieceIdx + 1 < totalIdx) ? UdpConstants.MAX_PAYLOAD_SIZE : image.length - pieceIdx*UdpConstants.MAX_PAYLOAD_SIZE;\n \n // Send to all listeners\n synchronized(_imageListeners) {\n for (SocketAddress il : _imageListeners.keySet()) {\n // Construct message\n // TODO: find a more efficient way to handle this serialization\n Response resp = new Response(_ticketCounter.incrementAndGet(), il);\n resp.stream.writeUTF(UdpConstants.COMMAND.CMD_SEND_IMAGE.str);\n resp.stream.writeInt(imageSeq);\n resp.stream.writeInt(totalIdx);\n resp.stream.writeInt(pieceIdx);\n\n resp.stream.writeInt(pieceLen);\n resp.stream.write(image, pieceIdx*UdpConstants.MAX_PAYLOAD_SIZE, pieceLen);\n\n _udpServer.respond(resp);\n }\n }\n }\n } catch (IOException e) {\n throw new RuntimeException(\"Failed to serialize image\");\n }\n }", "public void crearRutaImgPublicacion(){\n \n servletContext=(ServletContext) contexto.getExternalContext().getContext();\n String ruta=\"\";\n //Ruta real hasta la carpeta uploads\n ruta=servletContext.getRealPath(\"/upload/\");\n //Obtener el codigo del usuario de la sesion actual\n //este es utilizado para ubicar la carpeta que le eprtenece\n String codUsuario=String.valueOf(new SessionLogica().obtenerUsuarioSession().getCodUsuario());\n //Concatenamiento de directorios internos\n ruta+=File.separatorChar+\"img\"+File.separatorChar+\"post\"+File.separatorChar+codUsuario+File.separatorChar+\"all\"+File.separatorChar;\n //Asignacion de la ruta creada\n this.rutaImgPublicacion=ruta;\n }", "@Override\r\n public void sendInfo() {\n System.out.println(\"发送带图片和文字的信息\");\r\n }", "File resolveImage(Box box);", "@Override\n public void run()\n {\n System.out.println(\"Image receiver waiting\");\n int port = 55550;\n //Try with resources to auto close socket and streams.\n try (ServerSocket serverSocket = new ServerSocket(port);\n Socket socket = serverSocket.accept();\n InputStream inputStream = socket.getInputStream())\n {\n //Init the array size array.\n byte[] arraySize = new byte[4];\n\n\n //Read the array size.\n //noinspection ResultOfMethodCallIgnored\n inputStream.read(arraySize);\n //Get the size of the image.\n int imageSize = ByteBuffer.wrap(arraySize).asIntBuffer().get();\n\n //Create the exact sized image array.\n byte[] imageArray = new byte[imageSize];\n\n //Read the image bytes to the image array.\n //noinspection ResultOfMethodCallIgnored\n inputStream.read(imageArray);\n\n //Create the image from the image bytes.\n BufferedImage image = ImageIO.read(new ByteArrayInputStream(imageArray));\n\n //Put the image into the cache.\n imageCache.put(key, image);\n System.out.println(\"Image receiver complete.\");\n } catch (IOException e)\n {\n System.out.println(\"Error in image receiver.\");\n System.out.println(e.getMessage());\n }\n }", "public interface ImagePathCallback {\n\n File createPhotoFile();\n}", "public abstract String getFotoPath();", "private void getUserImage(){\r\n \t//setProgressBarIndeterminateVisibility(true);\r\n \t\r\n \tusername=null;\r\n \tfor(int i=0; i<senderList.size(); i++) {\t// kovetkezo felhasznalo kepe\r\n \t\tString str=senderList.get(i);\r\n \t\tif (!userImage.containsKey(str)) {\r\n \t\t\tusername=str;\r\n \t\t\tbreak;\r\n \t\t}\r\n \t}\r\n \t\r\n \tif (username==null) return;\r\n \t\r\n\t String url = \"ImageDownload?size=medium&username=\" + username +\r\n\t \t\t\t\t\t\t \"&ssid=\" + UserInfo.getSSID();\r\n\t downloadUserImage = new HttpGetByteConnection(url, mHandler, TASK_GETUSERIMAGE);\r\n\t downloadUserImage.start();\r\n }", "public boolean hasImage() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean baseToImg() {\n\t\tList<Image> imgList = imageRepository.findAll();\n\t\tfor (Image img : imgList) {\n\t\t\tString base = img.getSource();\n\t\t\tFiles file = new Files(img.getSaegimId(), \"jpg\");\n\t\t\tfile = fileRepository.save(file);\n\t\t\tLong fileId = file.getId();\n\t\t\t\n\t\t\tBase64ToImgDecoder.decoder(base, dir + fileId + '.' + \"jpg\");\n\t\t}\n\t\treturn true;\n\t}", "public void run() {\nif(i[0] ==le.size()){\n i[0]=0;}\n File file = new File(\"/var/www/html/PawsAndClaws/web/bundles/uploads/brochures/\" + le.get( i[0]).getBrochure());\n\n Image it = new Image(file.toURI().toString(), 500, 310, false, false);\n eventspicture.setImage(it);\n i[0]++;\n }", "private void reanderImage(ImageData data) {\n \n }", "public Image getCrotchetRest();", "private void sendImage() {\n try{\n BufferedImage img = ImageIO.read(new File(\"D:\\\\Faiz.jpg\"));\n ByteArrayOutputStream images = new ByteArrayOutputStream();\n ImageIO.write(img, \"jpg\", images);\n// ImageIcon set = new ImageIcon(img);\n// serverLabel.setIcon(set);\n// images.flush();\n //memastikan paket dikirim\n byte[] buffer = images.toByteArray();\n \n DatagramSocket serverS = new DatagramSocket(); \n InetAddress IpAddress = InetAddress.getByName(add_server);\n System.out.println(buffer.length);\n\n DatagramPacket packet = new DatagramPacket(buffer, buffer.length, IpAddress, port_sever);\n\n serverS.send(packet);\n serverS.close();\n }\n catch(Exception e){\n System.out.println(e);\n }\n }", "private void getSampleImage() {\n\t\t_helpingImgPath = \"Media\\\\\"+_camType.toString()+_downStream.toString()+_camProfile.toString()+\".bmp\";\n//\t\tswitch( _downStream ){\n//\t\tcase DownstreamPage.LEVER_NO_DOWNSTREAM:\n//\t\t\tswitch ( _camProfile )\n//\t\t\t{\n//\t\t\tcase CamProfilePage.LEVER_BEAD_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.LEVER_DOUBLE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.LEVER_GROOVE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.LEVER_OUTER_CAM:\n//\t\t\t\tbreak;\t\n//\t\t\t}\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.LEVER_CRANK:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.LEVER_FOUR_JOIN:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.LEVER_PUSHER_TUGS:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.CAMS_CRANK:\n//\t\t\tswitch ( _camProfile )\n//\t\t\t{\n//\t\t\tcase CamProfilePage.SLIDER_BEAD_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.SLIDER_DOUBLE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.SLIDER_GROOVE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.SLIDER_OUTER_CAM:\n//\t\t\t\tbreak;\n//\t\t\t}\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.CAMS_DOUBLE_SLIDE:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.CAMS_NO_DOWNSTREAM:\n//\t\t\tbreak;\n//\t\t}\n\t\t\n\t}", "public void imagepackets(String quality) {\t\t// error or free\r\n\tint k;\r\n\tModem modem = setmodem(10000, 2000); // creates and initializes modem\r\n\r\n\tFileOutputStream fout = makefile(\"image\", \".jpeg\");\t// opening file to store input data\r\n\r\n\tString img; \r\n\t \r\n\tif (quality == \"error\")\r\n\t\timg = imgerror;\r\n\telse img = imgfree;\r\n\t \r\n\tmodem.open(\"ithaki\");\r\n\t\r\n\tfor ( ; ; ) { //// it's for emptying the initial message\r\n\t\ttry {\r\n\t\tk=modem.read();\r\n\t\tif (k==-1){ break;}\r\n\t \r\n\t\t\tSystem.out.print((char)k);\r\n\t \r\n\t\t} catch (Exception x) {\r\n\t\t\tbreak;\r\n\t \r\n\t\t}\r\n\t \r\n\t}\r\n\t\r\n\tfor (int i = 0; i<1; i++){\t\r\n\t\t\r\n\t\tmodem.write(img.getBytes()); \r\n\r\n\t\tfor ( ; ; ) { //// it's for reading the characters\r\n\t\t\r\n\t\t\ttry {\r\n\t\t \r\n\t\t\t\tk=modem.read();\r\n\t\t\t\tif (k==-1){fout.write(\"\\r\\n\".getBytes()); break;}\r\n\t \r\n\t\t\t\tSystem.out.print((char)k);\r\n\t \r\n\t\t\t\tfout.write(k);\r\n\t \r\n\t\t\t} catch (Exception x) {\r\n\t\t\t\tbreak;\r\n\t \r\n\t\t\t}\r\n\t \r\n\t\t}\r\n\t \r\n\t }\r\n\tmodem.close();\r\n }", "public String getImage()\n {\n return image;\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void complete(String key,\n\t\t\t\t\t\t\t\t\t\t\t\t\t ResponseInfo info, JSONObject response) {\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"上传图片成功了\");\n\t\t\t\t\t\t\t\t\tSystem.out.println(key + \" \" + info\n\t\t\t\t\t\t\t\t\t\t\t+ \" \" + response);\n\n\t\t\t\t\t\t\t\t\tfromToMessage.message = RequestUrl.QiniuHttp + imgFileKey;\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"图片在服务器上的位置是:\"+fromToMessage.message);\n\t\t\t\t\t\t\t\t\tMessageDao.getInstance().updateMsgToDao(fromToMessage);\n\t\t\t\t\t\t\t\t\t//发送新消息给服务器\n\t\t\t\t\t\t\t\t\tHttpManager.newMsgToServer(sp.getString(\"connecTionId\", \"\"),\n\t\t\t\t\t\t\t\t\t\t\tfromToMessage, new NewMessageResponseHandler(fromToMessage));\n\t\t\t\t\t\t\t\t}", "public Image getBassClef();", "private void downloadPoster() {\n\n try {\n // Downloading the image from URL\n URL url = new URL(Constants.MOVIE_MEDIA_URL + cbPosterQuality.getSelectionModel().getSelectedItem().getKey() + movie.getPosterURL());\n Image image = new Image(url.toExternalForm(), true);\n\n // Adding the image to the ImageView\n imgPoster.setImage(image);\n\n // Adding the ImageView to the custom made ImageViewPane\n imageViewPane.setImageView(imgPoster);\n\n // Binding the image download progress to the progress indicator\n imageProgressIndicator.visibleProperty().bind(image.progressProperty().lessThan(1));\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n }", "boolean hasImagePath();", "public void retrieveDetailedImage(){\n //Build request for raw JSON data\n ImageRequest imageRequest = new ImageRequest(currentBook.thumbnail, new Response.Listener<Bitmap>() {\n @Override\n public void onResponse(Bitmap image) {\n //Image is returned\n mBackgroundImage.setImageBitmap(image);\n mBookImage.setImageBitmap(image); // Sets cover in case book was called from context where no cover provided\n }\n }, 5000, 5000, ImageView.ScaleType.CENTER, Bitmap.Config.RGB_565,\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n //Print error\n ErrorUtils.errorDialog(BookDetailsActivity.this, \"Could not connect to the server\", \"Could not connect to the server at this time, please try again later.\");\n }\n });\n //Start the JSON request\n queue.add(imageRequest);\n }", "String getItemImage();", "public String getImage() {\n return image;\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 }", "@Override\r\n public void onResponse(String response) {\n loadImageInGUI(response);\r\n Utility.writeOnPreferences(activity, \"image\", response);\r\n Utility.reloadActivity(activity);\r\n\r\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 }", "public int getImage();", "private void saveImageToLocalStore(Bitmap finalBitmap) {\n Calendar cal = Calendar.getInstance();\n //--------------\n File direct = new File(Environment.getExternalStorageDirectory() + \"/NDS images\");\n\n if (!direct.exists()) {\n direct = new File(\"/NDS images\");\n direct.mkdirs();\n }\n final String filename = \"NDS_img_\" + cal.getTimeInMillis() + \".png\";\n\n File file = new File(Environment.getExternalStorageDirectory() + File.separator\n + \"/NDS images/\", filename);\n if (file.exists()) {\n file.delete();\n\n }\n //--\n\n // File file = new File(directory+\"/Boo_images/\", filename);\n if (file.exists()) file.delete();\n try {\n FileOutputStream out = new FileOutputStream(file);\n finalBitmap.compress(Bitmap.CompressFormat.PNG, 100, out);\n out.flush();\n out.close();\n //---\n String path_0 = Environment.getExternalStorageDirectory() + File.separator\n + \"/NDS images/\" + filename;\n String filename_to_up = path_0.substring(path_0.lastIndexOf(\"/\") + 1);\n if (!editText.getText().toString().isEmpty()) {\n //addCaptionToSuggestionMedia(path_0, filename_to_up, \"image\", MYRemoteId, (editText.getTag().toString().isEmpty()) ? \"0\" : editText.getTag().toString());\n //addCaptionToSuggestionMedia(path_0, filename_to_up, \"audio\", MYRemoteId, (editText.getTag().toString().isEmpty()) ? \"0\" : editText.getTag().toString());\n path_000 = path_0;\n filename_000 = filename_to_up;\n myRemoteId_000 = MYRemoteId;\n SuggestionBoxId_000 = (editText.getTag().toString().isEmpty()) ? \"0\" : editText.getTag().toString();\n //-000000000000000000000000-----Image to send-----------------------------------------\n mediaType_000 = \"image\";\n image_tag.setTag(filename_to_up);\n image_tag.setVisibility(View.VISIBLE);\n video_tag.setVisibility(View.GONE);\n audio_tag.setVisibility(View.GONE);\n textSuggestion.setVisibility(View.GONE);\n File imgFile = new File(path_0);\n if (imgFile.exists()) {\n try {\n final BitmapFactory.Options options = new BitmapFactory.Options();\n options.inSampleSize = 2;\n Bitmap bm = BitmapFactory.decodeFile(path_0, options);\n //Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath());\n // Log.w(\"myPath\", path);\n //--Adjust imagte before final display haha!---------\n\n\n //---\n Bitmap srcBmp = bm;\n Bitmap dstBmp = null;\n //---Cropping for small display--\n try {\n if (srcBmp.getWidth() >= srcBmp.getHeight()) {\n try {\n dstBmp = Bitmap.createBitmap(srcBmp, srcBmp.getWidth() - srcBmp.getHeight(), 0, srcBmp.getHeight(), srcBmp.getHeight());\n //Log.w(\"cropped yes\",\"good\");\n } catch (RuntimeException shhh) {\n\n }\n } else {\n try {\n dstBmp = Bitmap.createBitmap(srcBmp, 0, srcBmp.getHeight() - srcBmp.getWidth(), srcBmp.getWidth(), srcBmp.getWidth());\n //Log.w(\"cropped yes\",\"good\");\n } catch (RuntimeException shhh) {\n\n }\n }\n\n\n //-----------------\n Drawable d = new BitmapDrawable(getResources(), dstBmp);\n edixt_image.setImageDrawable(d);\n\n // edixt_image.setImageBitmap(dstBmp);\n edixt_image.setTag(path_0);\n } catch (RuntimeException shhh) {\n\n }\n\n\n } catch (Exception vb) {\n\n }\n\n //-------------\n\n\n //----------------\n }\n\n //---------0000000000000000000000000000000000000000000000000000000000000000000000000000000000\n } else {\n Toast.makeText(Suggestion_box_suggest.this, \"Choose or type in receipient\", Toast.LENGTH_SHORT).show();\n }\n galleryAddPic();\n deleteLatestPicture();\n //-------------------------------------------\n } catch (Exception e) {\n e.printStackTrace();\n\n\n Log.w(\"DirImage\", \"failed!\" + e.toString());\n Toast.makeText(Suggestion_box_suggest.this, \"Image not saved! Not enough space!\" + e.toString(), Toast.LENGTH_SHORT).show();\n }\n }", "void mo60904b(AvatarImageWithVerify avatarImageWithVerify);", "public boolean hasImageByHandler() {\n return ((bitField0_ & 0x00001000) == 0x00001000);\n }", "public String getImage() {\n\t\treturn null;\n\t}", "@Override\n\t\t\tpublic void onBizSuccess(String responseDescription, JSONObject data, String flag) {\n\t\t\t\ttry {\n\t\t\t\t\tString image_url = data.getString(\"image_url\");\n\t\t\t\t\tImageUtil.drawImageFromUri(image_url, img);\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "public interface CaptureImgService {\n\n String captureImg(HttpServletRequest re, String url, String size) throws IOException;\n}", "private void sendImage(byte[] arr){\n MediaManager.get().upload(arr).option(\"tags\", ConnectionUtils.IMAGE_TAG).callback(new UploadCallback() {\n @Override\n public void onStart(String requestId) {\n MessageUtils.toast(ImageActivity.this, \"Uploading Image!\", 0);\n }\n\n @Override\n public void onProgress(String requestId, long bytes, long totalBytes) {\n }\n\n @Override\n public void onSuccess(String requestId, Map resultData) {\n MessageUtils.toast(ImageActivity.this, \"Image Uploaded!\", 0);\n mImageView.setImageURI(null);\n mParent.setVisibility(View.VISIBLE);\n }\n\n @Override\n public void onError(String requestId, ErrorInfo error) {\n MessageUtils.toast(ImageActivity.this, error.getDescription(), 1);\n mParent.setVisibility(View.VISIBLE);\n }\n\n @Override\n public void onReschedule(String requestId, ErrorInfo error) {\n }\n }).dispatch();\n }", "protected abstract Image loadImage();", "private void showImageDetail() {\n }", "public abstract Image getImage();", "public abstract Image getImage();", "public interface ImageReader {\n}", "void imReady();", "private void enhanceImage(){\n }", "public void Func_imagefile(){\n\n\t\tswf_env.containImg = true;\n\n\n\t\tthis.value = new SWFValue(\"Func\");\n\n\t\tString path = this.getAtt(\"path\", \".\");\n\t\tString filename = this.getAtt(\"default\");\n\t\tString type = \"auto\";\n\t\tvalue.instanceName = \"img\"+ Integer.toString(swf_env.instanceID);\n\t\tvalue.data = \"\";\n\t\tvalue.imgpath = path + \"/\" + filename;\n\t\tvalue.inter_imgpath = path + \"/\" + filename;\n\t\tvalue.inter_name = \"intimg\" + Integer.toString(swf_env.interactionImgNUM);\n\t\tvalue.tmp = \"tmp\" + Integer.toString(swf_env.interactionImgNUM);\n\t\tvalue.lnum = Integer.toString(swf_env.visibleflag_counter);\n\n\n\t\tif(!path.startsWith(\"/\")) {\n\t\t\tString basedir = GlobalEnv.getBaseDir();\n\t\t\tLog.out(\"basedir= \" +basedir);\n\t\t\tif(basedir != null && basedir != \"\") {\n\t\t\t\tpath = basedir + path;\n\t\t\t}\n\t\t}\n\n\t\tString filepath = path + \"/\" + filename;\n\n\n\t\tsetDecoration1();\n\t\tvalue.margin = margin;\n\n\n\t\tSystem.out.println(\"filepath = \"+filepath);\n\t\tint img = swf_env.open_image_file(type, filepath);\n\t\tvalue.img = img;\n\n\t\tdata_width = swf_env.get_value(\"imagewidth\", img);\n\t\tdata_height = swf_env.get_value(\"imageheight\", img);\n\t\tSystem.out.println(\"imagesize: \"+data_width+\" \"+data_height);\n\t\twidth = data_width + margin * 2;\n\t\theight = data_height + margin * 2;\n\n\n\t\tsetDecoration2();\n\n\t\tif(data_width > width){\n\t\t\tint original_width = data_width;\n\t\t\tdata_width = width - margin * 2;\n\t\t\tint scale = data_width / original_width;\n\t\t\tdata_height = data_height * scale;\n\t\t\theight = data_height + margin * 2;\n\t\t}\n\t\tif(data_height > height){\n\t\t\tint original_height = data_height;\n\t\t\tdata_height = height - margin * 2;\n\t\t\tint scale = data_height / original_height;\n\t\t\tdata_width = data_width * scale;\n\t\t\twidth = data_width + margin * 2;\n\t\t}\n\n\t\tvalue.data_width = data_width;\n\t\tvalue.data_height = data_height;\n\t\tvalue.width = width;\n\t\tvalue.height = height;\n\t\t//morya wrote\n\t\tvalue.int_w = width;\n\t\tvalue.int_h = height;\n\n\n\t\tsetDecoration3();\n\n\t\tswf_env.tmp_width = width;\n\t\tswf_env.tmp_height = height;\n\n\n\t\tswf_env.instanceID++;\n\n\t}", "boolean saveImage(Image img) {\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void run() {\n\t\ttry {\n\n\n\t\t\tBitmap result = ImageService.getImage(ac,urlparams);\n\t\t\tLog.i(\"tan8\",\"url\"+urlparams);\n\t\t\tMessage ms = Message.obtain();\n\t\t\tms.what = what;\n\t\t\tms.obj = result;\n\t\t\tif (handler != null) {\n\t\t\t\thandler.sendMessage(ms);\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void onImageAvailable(android.media.ImageReader r15) {\n /*\n r14 = this;\n com.android.camera.imageprocessor.FrameProcessor r0 = com.android.camera.imageprocessor.FrameProcessor.this\n java.lang.Object r0 = r0.mAllocationLock\n monitor-enter(r0)\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0172 }\n android.renderscript.Allocation r1 = r1.mOutputAllocation // Catch:{ all -> 0x0172 }\n if (r1 != 0) goto L_0x0011\n monitor-exit(r0) // Catch:{ all -> 0x0172 }\n return\n L_0x0011:\n android.media.Image r15 = r15.acquireLatestImage() // Catch:{ IllegalStateException -> 0x0170 }\n if (r15 != 0) goto L_0x0019\n monitor-exit(r0) // Catch:{ all -> 0x0172 }\n return\n L_0x0019:\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n boolean r1 = r1.mIsActive // Catch:{ IllegalStateException -> 0x0170 }\n if (r1 != 0) goto L_0x0026\n r15.close() // Catch:{ IllegalStateException -> 0x0170 }\n monitor-exit(r0) // Catch:{ all -> 0x0172 }\n return\n L_0x0026:\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n r2 = 1\n r1.mIsAllocationEverUsed = r2 // Catch:{ IllegalStateException -> 0x0170 }\n android.media.Image$Plane[] r1 = r15.getPlanes() // Catch:{ IllegalStateException -> 0x0170 }\n r3 = 0\n r1 = r1[r3] // Catch:{ IllegalStateException -> 0x0170 }\n java.nio.ByteBuffer r1 = r1.getBuffer() // Catch:{ IllegalStateException -> 0x0170 }\n android.media.Image$Plane[] r4 = r15.getPlanes() // Catch:{ IllegalStateException -> 0x0170 }\n r5 = 2\n r4 = r4[r5] // Catch:{ IllegalStateException -> 0x0170 }\n java.nio.ByteBuffer r11 = r4.getBuffer() // Catch:{ IllegalStateException -> 0x0170 }\n byte[] r4 = r14.yvuBytes // Catch:{ IllegalStateException -> 0x0170 }\n if (r4 == 0) goto L_0x0062\n int r4 = r14.width // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r6 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r6 = r6.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r6 = r6.getWidth() // Catch:{ IllegalStateException -> 0x0170 }\n if (r4 != r6) goto L_0x0062\n int r4 = r14.height // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r6 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r6 = r6.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r6 = r6.getHeight() // Catch:{ IllegalStateException -> 0x0170 }\n if (r4 == r6) goto L_0x009e\n L_0x0062:\n android.media.Image$Plane[] r4 = r15.getPlanes() // Catch:{ IllegalStateException -> 0x0170 }\n r4 = r4[r3] // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r4.getRowStride() // Catch:{ IllegalStateException -> 0x0170 }\n r14.stride = r4 // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r4 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r4 = r4.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r4.getWidth() // Catch:{ IllegalStateException -> 0x0170 }\n r14.width = r4 // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r4 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r4 = r4.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r4.getHeight() // Catch:{ IllegalStateException -> 0x0170 }\n r14.height = r4 // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r14.stride // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r6 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r6 = r6.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r6 = r6.getHeight() // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r4 * r6\n r14.ySize = r4 // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r14.ySize // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r4 * 3\n int r4 = r4 / r5\n byte[] r4 = new byte[r4] // Catch:{ IllegalStateException -> 0x0170 }\n r14.yvuBytes = r4 // Catch:{ IllegalStateException -> 0x0170 }\n L_0x009e:\n com.android.camera.imageprocessor.FrameProcessor r4 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n java.util.ArrayList r4 = r4.mPreviewFilters // Catch:{ IllegalStateException -> 0x0170 }\n java.util.Iterator r12 = r4.iterator() // Catch:{ IllegalStateException -> 0x0170 }\n r13 = r3\n L_0x00a9:\n boolean r4 = r12.hasNext() // Catch:{ IllegalStateException -> 0x0170 }\n if (r4 == 0) goto L_0x0128\n java.lang.Object r4 = r12.next() // Catch:{ IllegalStateException -> 0x0170 }\n r5 = r4\n com.android.camera.imageprocessor.filter.ImageFilter r5 = (com.android.camera.imageprocessor.filter.ImageFilter) r5 // Catch:{ IllegalStateException -> 0x0170 }\n boolean r4 = r5.isFrameListener() // Catch:{ IllegalStateException -> 0x0170 }\n if (r4 == 0) goto L_0x00f0\n com.android.camera.imageprocessor.FrameProcessor r4 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor$ListeningTask r4 = r4.mListeningTask // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r6 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r6 = r6.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r8 = r6.getWidth() // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r6 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r6 = r6.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r9 = r6.getHeight() // Catch:{ IllegalStateException -> 0x0170 }\n int r10 = r14.stride // Catch:{ IllegalStateException -> 0x0170 }\n r6 = r1\n r7 = r11\n boolean r4 = r4.setParam(r5, r6, r7, r8, r9, r10) // Catch:{ IllegalStateException -> 0x0170 }\n if (r4 == 0) goto L_0x0121\n com.android.camera.imageprocessor.FrameProcessor r4 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.os.Handler r4 = r4.mListeningHandler // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r5 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor$ListeningTask r5 = r5.mListeningTask // Catch:{ IllegalStateException -> 0x0170 }\n r4.post(r5) // Catch:{ IllegalStateException -> 0x0170 }\n goto L_0x0121\n L_0x00f0:\n com.android.camera.imageprocessor.FrameProcessor r4 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r4 = r4.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r4.getWidth() // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r6 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r6 = r6.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r6 = r6.getHeight() // Catch:{ IllegalStateException -> 0x0170 }\n int r7 = r14.stride // Catch:{ IllegalStateException -> 0x0170 }\n int r8 = r14.stride // Catch:{ IllegalStateException -> 0x0170 }\n r5.init(r4, r6, r7, r8) // Catch:{ IllegalStateException -> 0x0170 }\n boolean r4 = r5 instanceof com.android.camera.imageprocessor.filter.BeautificationFilter // Catch:{ IllegalStateException -> 0x0170 }\n if (r4 == 0) goto L_0x0118\n java.lang.Boolean r4 = new java.lang.Boolean // Catch:{ IllegalStateException -> 0x0170 }\n r4.<init>(r3) // Catch:{ IllegalStateException -> 0x0170 }\n r5.addImage(r1, r11, r3, r4) // Catch:{ IllegalStateException -> 0x0170 }\n goto L_0x0120\n L_0x0118:\n java.lang.Boolean r4 = new java.lang.Boolean // Catch:{ IllegalStateException -> 0x0170 }\n r4.<init>(r2) // Catch:{ IllegalStateException -> 0x0170 }\n r5.addImage(r1, r11, r3, r4) // Catch:{ IllegalStateException -> 0x0170 }\n L_0x0120:\n r13 = r2\n L_0x0121:\n r1.rewind() // Catch:{ IllegalStateException -> 0x0170 }\n r11.rewind() // Catch:{ IllegalStateException -> 0x0170 }\n goto L_0x00a9\n L_0x0128:\n com.android.camera.imageprocessor.FrameProcessor r2 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n boolean r2 = r2.mIsFirstIn // Catch:{ IllegalStateException -> 0x0170 }\n if (r2 == 0) goto L_0x014e\n com.android.camera.imageprocessor.FrameProcessor r2 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n boolean r2 = r2.mIsVideoOn // Catch:{ IllegalStateException -> 0x0170 }\n if (r2 == 0) goto L_0x014e\n com.android.camera.imageprocessor.FrameProcessor r2 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n boolean r2 = r2.isFrameListnerEnabled() // Catch:{ IllegalStateException -> 0x0170 }\n if (r2 == 0) goto L_0x014e\n com.android.camera.imageprocessor.FrameProcessor r2 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n r2.mIsFirstIn = r3 // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r2 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.CaptureModule r2 = r2.mModule // Catch:{ IllegalStateException -> 0x0170 }\n r2.startMediaRecording() // Catch:{ IllegalStateException -> 0x0170 }\n L_0x014e:\n if (r13 == 0) goto L_0x016d\n byte[] r2 = r14.yvuBytes // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r1.remaining() // Catch:{ IllegalStateException -> 0x0170 }\n r1.get(r2, r3, r4) // Catch:{ IllegalStateException -> 0x0170 }\n byte[] r1 = r14.yvuBytes // Catch:{ IllegalStateException -> 0x0170 }\n int r2 = r14.ySize // Catch:{ IllegalStateException -> 0x0170 }\n int r3 = r11.remaining() // Catch:{ IllegalStateException -> 0x0170 }\n r11.get(r1, r2, r3) // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.os.Handler r1 = r1.mOutingHandler // Catch:{ IllegalStateException -> 0x0170 }\n r1.post(r14) // Catch:{ IllegalStateException -> 0x0170 }\n L_0x016d:\n r15.close() // Catch:{ IllegalStateException -> 0x0170 }\n L_0x0170:\n monitor-exit(r0) // Catch:{ all -> 0x0172 }\n return\n L_0x0172:\n r14 = move-exception\n monitor-exit(r0) // Catch:{ all -> 0x0172 }\n throw r14\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.camera.imageprocessor.FrameProcessor.ProcessingTask.onImageAvailable(android.media.ImageReader):void\");\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByTransformOrBuilder();", "@Override\r\n\t\tprotected String doInBackground(String... params) {\n\t\t\tString filePath = doFileUpload(params[1]);\r\n\t\t\tif(filePath!=null){\r\n\t\t\t\tString abd = imService.updateImage(params[0], filePath);\r\n\t\t\t\tLog.e(\"IMAGE TAG\",\" \"+abd);\r\n\t\t\t}\r\n\t\t\t//String abd = imService.updateImage(params[0], params[1]);\r\n\t\t\t//Log.e(\"IMAGE TAG\",\" \"+abd);\r\n\t\t\treturn params[1];\r\n\t\t}", "public BufferedImage getImage() {\n/* 81 */ return this.bufImg;\n/* */ }", "private void manuallyPushImageToImageReader(){\n mImageReader = VNCUtility.createImageReader(this);\n mImageReader.setOnImageAvailableListener(new ImageReader.OnImageAvailableListener() {\n @Override\n public void onImageAvailable(ImageReader reader) {\n Log.d(TAG, \"NEW IMAGE AVAILABLE\");\n\n DisplayMetrics metrics = getResources().getDisplayMetrics();\n\n\n Image image = reader.acquireLatestImage();\n VNCUtility.printReaderFormat(image.getFormat());\n Log.d(TAG, \"IMAGE FORMAT: \" + image.getFormat());\n final Image.Plane[] planes = image.getPlanes();\n final ByteBuffer buffer = planes[0].getBuffer();\n int pixelStride = planes[0].getPixelStride();\n int rowStride = planes[0].getRowStride();\n int rowPadding = rowStride - pixelStride * mWidth;\n int w = mWidth + rowPadding / pixelStride;\n Bitmap bmp = Bitmap.createBitmap(mWidth, mHeight, Bitmap.Config.RGB_565);\n bmp.copyPixelsFromBuffer(buffer);\n mBmp = bmp;\n\n Thread t = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n //saveScreen(mBmp);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }\n });\n t.start();\n\n image.close();\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mImageView.setImageBitmap(mBmp);\n }\n });\n\n\n /*\n Image img = reader.acquireLatestImage();\n Image.Plane[] planes = img.getPlanes();\n int width = img.getWidth();\n int height = img.getHeight();\n int pixelStride = planes[0].getPixelStride();\n int rowStride = planes[0].getRowStride();\n int rowPadding = rowStride - pixelStride * width;\n ByteBuffer buffer = planes[0].getBuffer();\n byte[] data = new byte[buffer.capacity()];\n buffer.get(data);\n\n for(int i = 10000; i < 100; i++){\n Log.d(TAG, getColourForInt(data[i]));\n }\n\n int offset = 0;\n Bitmap bitmap = Bitmap.createBitmap(metrics, width, height, Bitmap.Config.ARGB_8888);\n for (int i = 0; i < height; ++i) {\n for (int j = 0; j < width; ++j) {\n int pixel = 0;\n pixel |= (buffer.get(offset) & 0xff) << 16; // R\n pixel |= (buffer.get(offset + 1) & 0xff) << 8; // G\n pixel |= (buffer.get(offset + 2) & 0xff); // B\n pixel |= (buffer.get(offset + 3) & 0xff) << 24; // A\n bitmap.setPixel(j, i, pixel);\n offset += pixelStride;\n }\n offset += rowPadding;\n }\n mBmp = bitmap;\n img.close();\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mImageView.setImageBitmap(mBmp);\n }\n });\n */\n }\n }, null);\n Surface surface = mImageReader.getSurface();\n if(surface == null){\n Log.d(TAG, \"SURFACE IS NULL\");\n }\n else{\n Log.d(TAG, \"SURFACE IS NOT NULL\");\n Canvas canvas = surface.lockCanvas(null);\n\n int[] ints = new int[mWidth * mHeight];\n for (int i = 0; i < mWidth * mHeight; i++) {\n ints[i] = Color.MAGENTA;//0x00FF0000;\n }\n\n //final Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, ints.length);\n Bitmap bitmap = Bitmap.createBitmap(ints, mWidth, mHeight, Bitmap.Config.RGB_565);\n //canvas.drawARGB(255, 255, 0, 255);\n canvas.drawBitmap(bitmap,0,0,null);\n surface.unlockCanvasAndPost(canvas);\n }\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 234 && data != null && data.getData() != null) {\n filePath = data.getData();\n Uri uri = data.getData();\n try {\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), uri);\n ImageView imageView = findViewById(R.id.displayPicture);\n imageView.setImageBitmap(bitmap);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n }", "void mo60902a(AvatarImageWithVerify avatarImageWithVerify);", "public ObjectImage getObjectImage ()\r\n {\r\n return recoverable_.getObjectImage ();\r\n }", "public String getThumbnail();", "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 }", "public boolean hasImage() { return ImageResource != NO_IMAGE_PROVIDED; }", "public Image call() throws IOException;", "public String getImage() {\n\t\treturn image;\n\t}", "public String getImage() {\n\t\treturn image;\n\t}", "private void updateFingerprintImage(FingerprintImage fi) {\n\n try {\n byte[] fpBmp = null;\n Bitmap bitmap;\n if (fi == null || (fpBmp = fi.convert2Bmp()) == null || (bitmap = BitmapFactory.decodeByteArray(fpBmp, 0, fpBmp.length)) == null) {\n //loger.addRecordToLog(\"updateFingerprintImage sin huella \");\n bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.sinhuella);\n }\n mHandler.sendMessage(mHandler.obtainMessage(MSG_UPDATE_IMAGE, bitmap));\n\n } catch (Exception e) {\n\n //loger.addRecordToLog(\"Exception updateFingerprintImage : \" + e.getMessage());\n\n //mFingerprintImage.setImageResource( R.drawable.errornuevahuella );\n\n //e.printStackTrace();\n\n }\n\n }", "public boolean hasImageByHandler() {\n return ((bitField0_ & 0x00004000) == 0x00004000);\n }", "@Override\n public void handleMessage(Message msg) {\n super.handleMessage(msg);\n if(msg.what == 0){\n setImageBitmap((Bitmap)msg.obj);\n }\n }", "public abstract void photoMessage(Message m);", "public void catchImage(String data) {\n\t\tsetPicturePreview(data);\n\n\t}", "@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 }" ]
[ "0.6543443", "0.6529935", "0.64242303", "0.6401229", "0.63923854", "0.63131726", "0.6312957", "0.6248635", "0.62461007", "0.6216664", "0.6187365", "0.61812395", "0.6159431", "0.6138128", "0.60913837", "0.608955", "0.6069279", "0.60671", "0.6051938", "0.6046808", "0.5986636", "0.597085", "0.59510964", "0.59385663", "0.5932595", "0.5917195", "0.5917195", "0.59168327", "0.5907839", "0.58822167", "0.5877584", "0.58673126", "0.58635336", "0.58615595", "0.5858646", "0.58494055", "0.58214587", "0.5810407", "0.5798736", "0.57985437", "0.579802", "0.5794122", "0.5791772", "0.5789374", "0.5784055", "0.57784015", "0.5771698", "0.5768396", "0.5768051", "0.5767659", "0.57661515", "0.57646286", "0.5760547", "0.5759371", "0.57522786", "0.57377326", "0.57346934", "0.57304317", "0.5730026", "0.57251", "0.57238215", "0.5717926", "0.56950414", "0.5692801", "0.5691382", "0.5685101", "0.5682342", "0.5669217", "0.56646", "0.56574273", "0.5656516", "0.5655915", "0.5655082", "0.5654459", "0.5654459", "0.5652572", "0.56439054", "0.5640892", "0.5637881", "0.56364346", "0.56204426", "0.5614402", "0.5612766", "0.56100714", "0.5609517", "0.560753", "0.56034327", "0.56030035", "0.56004643", "0.5589429", "0.55834836", "0.5577758", "0.55727756", "0.5572099", "0.5572099", "0.5567611", "0.5566686", "0.5564305", "0.55620193", "0.556126", "0.5561246" ]
0.0
-1
goto_fullscreen(new ImageFullScreen()); / MaterialAlertDialogBuilder Mbuilder = new MaterialAlertDialogBuilder(holder.context); View Mview = LayoutInflater.from(holder.context).inflate(R.layout.full_scren_dioloag, null, false); MaterialToolbar toolbar = Mview.findViewById(R.id.DioloagToolbarID); PhotoView photoView = Mview.findViewById(R.id.PhotoViewID); Mbuilder.setView(Mview); AlertDialog alertDialog = Mbuilder.create(); alertDialog.show(); / FullSceenImageBottomSheed fullSceenImageBottomSheed = new FullSceenImageBottomSheed(MessageModalList.getMessage()); fullSceenImageBottomSheed.show(((AppCompatActivity) holder.context).getSupportFragmentManager(), "open"); / MaterialAlertDialogBuilder Mbuilder = new MaterialAlertDialogBuilder(holder.context, android.R.style.Theme_Black_NoTitleBar_Fullscreen); View Mview = LayoutInflater.from(holder.context).inflate(R.layout.full_screenimage_bottomsheeed, null, false); PhotoView photoVie = Mview.findViewById(R.id.PhotoView); Mbuilder.setView(Mview); Picasso.with(holder.context).load(MessageModalList.getMessage()).into(photoVie); AlertDialog alertDialog = Mbuilder.create(); alertDialog.show();
@Override public void onClick(View view) { final Dialog dialog = new Dialog(holder.context, android.R.style.Theme_Black_NoTitleBar_Fullscreen); dialog.setContentView(R.layout.full_screenimage_bottomsheeed); PhotoView photoView = dialog.findViewById(R.id.PhotoView); Picasso.with(holder.context).load(MessageModalList.getMessage()).into(photoView); dialog.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void onClick(View view) {\n\r\n\r\n\r\n final Dialog dialog = new Dialog(holder.context, android.R.style.Theme_Black_NoTitleBar_Fullscreen);\r\n\r\n dialog.setContentView(R.layout.full_screenimage_bottomsheeed);\r\n\r\n PhotoView photoView = dialog.findViewById(R.id.PhotoView);\r\n Picasso.with(holder.context).load(MessageModalList.getMessage()).into(photoView);\r\n dialog.show();\r\n }", "@Override\r\n public void onClick(View view) {\n\r\n\r\n\r\n final Dialog dialog = new Dialog(holder.context, android.R.style.Theme_Black_NoTitleBar_Fullscreen);\r\n\r\n dialog.setContentView(R.layout.full_screenimage_bottomsheeed);\r\n\r\n PhotoView photoView = dialog.findViewById(R.id.PhotoView);\r\n Picasso.with(holder.context).load(MessageModalList.getMessage()).into(photoView);\r\n dialog.show();\r\n }", "private void inflateDialogResume() {\n showCustomToast(getString(R.string.loading_resume),Toast.LENGTH_SHORT);\n final ImagePopup imagePopup = new ImagePopup(getActivity());\n //imagePopup.setWindowHeight(800);\n imagePopup.setFullScreen(true);\n imagePopup.setBackgroundColor(Color.WHITE);\n //imagePopup.setWindowWidth(650);\n imagePopup.setImageOnClickClose(true);\n if(employeeResume!=\" \"){\n imagePopup.initiatePopupWithPicasso(employeeResume);\n }else{\n imagePopup.initiatePopup(getResources().getDrawable(R.drawable.error));\n }\n imagePopup.viewPopup();\n /*AlertDialog.Builder imageDialog = new AlertDialog.Builder(getActivity());\n //ImageView showImage = new ImageView(getActivity());\n //imageDialog.setTitle(\"Resume\");\n View dialogLayout = getLayoutInflater().inflate(R.layout.dialog_resume, null);\n ImageView imageView = dialogLayout.findViewById(R.id.imageViewDialogResume);\n imageView.setImageURI(Uri.parse(employeeProfilePhoto));\n imageDialog.setView(dialogLayout);\n imageDialog.show();*/\n\n\n }", "public void handleMessage(Message msg) {\n int what = msg.what;\n if (what == 0x01) { //update\n int i = 1;\n text_dialog = (TextView) mAlertDialog.findViewById(R.id.display_dialog);\n text_Title = (TextView) mAlertDialog.findViewById(R.id.display_title);\n btn_ok = (Button) mAlertDialog.findViewById(R.id.btn_ok);\n btn_dele = (Button) mAlertDialog.findViewById(R.id.btn_dele);\n List<String> mdata = new ArrayList<String>();\n text_Title.setGravity(Gravity.CENTER);\n text_dialog.setMovementMethod(new ScrollingMovementMethod());\n // text_dialog.setText();\n\n if(cursor.moveToFirst()){\n do{\n if(cursor.getString(cursor.getColumnIndex(\"title\")).equals(data.get(Position))){\n text_Title.setText(cursor.getString(cursor.getColumnIndex(\"title\")));\n\n String context = cursor.getString(cursor.getColumnIndex(\"context\"));\n String path = cursor.getString(cursor.getColumnIndex(\"path\"));\n\n Log.d(TAG, \"主文的内容是: \"+ context);\n Log.d(TAG, \"图片的路径是: \" + path);\n String[] sourceStrArray = context.split(\"test\");\n String[] sourcePath = path.split(\"####\");\n\n text_dialog.append(sourceStrArray[0]);\n Pattern p = Pattern.compile(\"test\");\n Matcher m = p.matcher(context);\n while (m.find()) {\n\n\n ContentResolver cr = getActivity().getContentResolver();\n Bitmap bitmap = null;\n //将对象存入Bitmap中\n // bitmap = BitmapFactory.decodeStream(cr.openInputStream(uri));\n //bitmap = getLoacalBitmap(\"/storage/emulated/0/DCIM/Camera/IMG20170512173710.jpg\");\n bitmap = getLoacalBitmap(sourcePath[i]);\n int imgWidth = bitmap.getWidth();\n int imgHeight = bitmap.getHeight();\n double partion = imgWidth*1.0/imgHeight;\n double sqrtLength = Math.sqrt(partion*partion + 1);\n //新的缩略图大小\n double newImgW = 320*(partion / sqrtLength);\n double newImgH = 320*(1 / sqrtLength);\n float scaleW = (float) (newImgW/imgWidth);\n float scaleH = (float) (newImgH/imgHeight);\n Log.d(TAG, \"imgHeight: \"+newImgH);\n Matrix mx = new Matrix();\n //对原图片进行缩放\n mx.postScale(scaleW, scaleH);\n bitmap = Bitmap.createBitmap(bitmap, 0, 0, imgWidth, imgHeight, mx, true);\n ImageSpan imageSpan = new ImageSpan(getActivity(),bitmap);\n SpannableString spannableString = new SpannableString(\"test\");\n spannableString.setSpan(imageSpan, 0, spannableString.length(), SpannableString.SPAN_MARK_MARK);\n text_dialog.append(\"\\n\");\n text_dialog.append(spannableString);\n text_dialog.append(\"\\n\");\n text_dialog.append(sourceStrArray[i]);\n i++;\n\n }\n// int contexttimes = appearNumber(context,\"test\");\n// int pathtimes = appearNumber(path,\"####\");\n// pathtimes = pathtimes - 1;\n\n//\n// for (int i = 0; i < sourceStrArray.length; i ++){\n//\n// Log.d(TAG, \"sourceStrArray: \" +sourceStrArray[i]);\n// }\n// for (int i = 0; i < sourcePath.length; i ++){\n//\n// Log.d(TAG, \"sourcePath: \" +sourcePath[i]);\n// }\n// Log.d(TAG, \"主文的test出现的次数: \"+contexttimes);\n// Log.d(TAG, \"图片的路径出现的次数: \"+pathtimes);\n\n }\n\n\n\n }while(cursor.moveToNext());\n\n\n }\n\n\n btn_ok.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n text_dialog.setText(\"\");\n mAlertDialog.cancel();\n }\n });\n btn_dele.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n text_dialog.append(\"\");\n mAlertDialog.cancel();\n\n\n\n }\n });\n\n if(mAlertDialog.isShowing()){\n MyHandler.sendEmptyMessageDelayed(0,1000);\n }\n }else {\n // mAlertDialog.cancel();\n }\n }", "@Override\r\n\tprotected Dialog onCreateDialog(int id) {\n\t\tswitch (id) {\r\n case DIALOG_SELF:\r\n \treturn new AlertDialog.Builder(PhotoImagePagerActivity.this, AlertDialog.THEME_HOLO_LIGHT)\r\n .setTitle(\"选项\")\r\n .setItems(R.array.dialog_self, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int which) {\r\n \tif (which == 0)\r\n \t{\r\n \t\t// 设置活动封面\r\n \t\tMap<String, String> params = new HashMap<String, String>();\r\n \t\tparams.put(\"event_id\", String.valueOf(event_id));\r\n \t\tparams.put(\"event_pic_width\", String.valueOf(UDisplayWidth.getPosterPicWidth(PhotoImagePagerActivity.this)));\r\n \t\tparams.put(\"pic_id\", String.valueOf(pic_id));\r\n \t\t\r\n \t\tmDataLoader.postData(UConstants.SETTING_PIC_URL, params, PhotoImagePagerActivity.this, new HDataListener() {\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 onFinish(String source) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\tGson gson = new Gson();\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tTempModel mTempModel = gson.fromJson(source, new TypeToken<TempModel>(){}.getType());\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif (mTempModel != null)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tToast.makeText(PhotoImagePagerActivity.this, mTempModel.message, Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\t\t\t\t\t\tDDBOpenHelper mDdbOpenHelper = DDBOpenHelper.getInstance(PhotoImagePagerActivity.this);\r\n\t\t\t\t\t\t\t\t\t\tmDdbOpenHelper.updateLocalEventModel(mTempModel.event);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\tToast.makeText(PhotoImagePagerActivity.this, \"数据解析出错\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t} catch (JsonSyntaxException e) {\r\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tToast.makeText(PhotoImagePagerActivity.this, \"数据解析出错\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void onFail(String msg) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\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}\r\n\t\t\t\t\t\t});\r\n \t}\r\n \telse if (which == 1)\r\n \t{\r\n \t\t// 设置删除图片\r\n \t\tMap<String, String> params = new HashMap<String, String>();\r\n \t\tparams.put(\"pic_id\", String.valueOf(pic_id));\r\n \t\tparams.put(\"method\", \"delete\");\r\n \t\t\r\n \t\tmDataLoader.postData(UConstants.DELETE_PIC_URL, params, PhotoImagePagerActivity.this, new HDataListener() {\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 onFinish(String source) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void onFail(String msg) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n \t}\r\n \telse if (which == 2)\r\n \t{\r\n \t\t// 保存图片到本地\r\n \t\tmFinalBitmap.display(downloadImageView, big_pic_url);\r\n \t}\r\n }\r\n })\r\n .create();\r\n case DIALOG_OTHER:\r\n \treturn new AlertDialog.Builder(PhotoImagePagerActivity.this, AlertDialog.THEME_HOLO_LIGHT)\r\n .setTitle(\"选项\")\r\n .setItems(R.array.dialog_other, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int which) {\r\n \tif (which == 0)\r\n \t{\r\n \t\tmFinalBitmap.display(downloadImageView, big_pic_url);\r\n \t}\r\n }\r\n })\r\n .create();\r\n }\r\n return null;\r\n\t}", "@Override\n public void onClick(View view) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(AboutUsActivity.this);\n\n View view1 = LayoutInflater.from(getApplicationContext()).inflate(R.layout.popupaboutus_team,null,false);\n\n final AlertDialog alertDialog = builder.create();\n\n alertDialog.setCancelable(false);\n\n alertDialog.setView(view1);\n\n ImageView imageView1 = (ImageView)view1.findViewById(R.id.exist);\n imageView1.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n alertDialog.dismiss();\n }\n });\n\n alertDialog.show();\n }", "@Override\n public void onClick(View view) {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(context);\n LayoutInflater layoutInflater = LayoutInflater.from(context);\n View alertDialogView = layoutInflater.inflate(R.layout.alertdialog_photo, null);\n ImageView imageView = alertDialogView.findViewById(R.id.controlImage);\n byte[] decode = Base64.decode(\n arrayList.get(getAdapterPosition()).getUrl(),\n Base64.DEFAULT\n );\n Bitmap bitmap = BitmapFactory.decodeByteArray(decode,0,decode.length);\n imageView.setImageBitmap(bitmap);\n alertDialog.setView(alertDialogView).show();\n }", "public AlertDialog createSimpleDialog(String mensaje, String titulo, final String typ) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n LayoutInflater inflater = getActivity().getLayoutInflater();\n\n View v = inflater.inflate(R.layout.dialog_monitoring_info, null);\n builder.setView(v);\n\n TextView tvTitle = (TextView) v.findViewById(R.id.tv_title_dialog);\n TextView tvDescription = (TextView) v.findViewById(R.id.tv_description_dialog);\n\n tvTitle.setText(titulo);\n tvTitle.setCompoundDrawables(ContextCompat.getDrawable(v.getContext(), R.drawable.ic_question), null, null, null);\n tvDescription.setText(mensaje);\n\n builder.setPositiveButton(getResources().getString(R.string.info_dialog_option_accept),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n if (typ.equals(\"REGIST\")){\n MonitoringRegistrationFormFragment fragment = new MonitoringRegistrationFormFragment();\n Bundle params = new Bundle();\n params.putString(\"AREA\", area);\n params.putString(\"OPCION\", \"N\");\n fragment.setArguments(params);\n\n getActivity().getSupportFragmentManager().popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);\n\n getActivity().getSupportFragmentManager().beginTransaction()\n .replace(R.id.monitoring_principal_context, fragment)\n .commit();\n }\n else {\n AdminUserFormFragment fragment = new AdminUserFormFragment();\n getActivity().getSupportFragmentManager().popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);\n getActivity().getSupportFragmentManager().beginTransaction()\n .replace(R.id.transaction_principal_context, fragment)\n .commit();\n }\n }\n },300);\n }\n })\n .setNegativeButton(getResources().getString(R.string.info_dialog_option_cancel),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n builder.create().dismiss();\n if (typ.equals(\"REGIST\")){\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent intent = new Intent(getActivity(), MonitorMenuActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n startActivity(intent);\n getActivity().finish();\n }\n },300);\n }\n else {\n getActivity().finish();\n }\n }\n });\n\n return builder.create();\n }", "private void initPopupMoodView(){\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getActivity());\n alertDialogBuilder.setCancelable(false);\n\n LayoutInflater layoutInflaterInput = LayoutInflater.from(getActivity());\n popupView = layoutInflaterInput.inflate(R.layout.popup_mood, null);\n imHappy = popupView.findViewById(R.id.mood_happy);\n imNeutral = popupView.findViewById(R.id.mood_neutral);\n imSad = popupView.findViewById(R.id.mood_sad);\n\n alertDialogBuilder.setView(popupView);\n final AlertDialog alertDialog = alertDialogBuilder.create();\n alertDialog.show();\n\n imHappy.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // set\n imMood.setImageResource(R.drawable.happy_64);\n alertDialog.dismiss();\n }\n });\n\n imNeutral.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // set\n imMood.setImageResource(R.drawable.neutral_64);\n alertDialog.dismiss();\n }\n });\n\n imSad.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // set\n imMood.setImageResource(R.drawable.sad_64);\n alertDialog.dismiss();\n }\n });\n }", "@Override\n public void onClick(View v) {\n MainActivity mainActivity = (MainActivity) getActivity();\n DatabaseHelper dbHelper = new DatabaseHelper(mainActivity);\n taskforshopphoto = dbHelper.getTaskInfo(String.valueOf(Shared.SelectedTask.ID));\n if (taskforshopphoto.PhotoID != null) {\n Dialog settingsDialog = new Dialog(getActivity());\n settingsDialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);\n View viewDialog = getActivity().getLayoutInflater().inflate(R.layout.image_layout, null);\n settingsDialog.setContentView(viewDialog);\n ImageView imgShop = (ImageView) viewDialog.findViewById(R.id.ShopImage);\n Bitmap bmp = BitmapFactory.decodeFile(taskforshopphoto.PhotoID);\n\n imgShop.setImageBitmap(bmp);\n settingsDialog.show();\n } else {\n Toast.makeText(getActivity(), \" No Shop photo\", Toast.LENGTH_LONG).show();\n }\n }", "private void filepickerDialog(){\n View view = LayoutInflater.from(getContext()).inflate(R.layout.filepicker_dailog, null);\n filePicker = (ImageView) view.findViewById(R.id.file_picker);\n cameraPicker = (ImageView) view.findViewById(R.id.camera_picker);\n final MaterialDialog.Builder builder = new MaterialDialog.Builder(getContext());\n builder.title(\"Upload\");\n builder.negativeText(android.R.string.cancel);\n builder.positiveText(android.R.string.ok);\n builder.onNegative(new MaterialDialog.SingleButtonCallback() {\n @Override\n public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {\n builder.autoDismiss(true);\n }\n });\n builder.customView(view,false);\n builder.show();\n cameraPicker.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if (cameraIntent.resolveActivity(getContext().getPackageManager()) != null) {\n // Create the File where the photo should go\n File photoFile = Helper.createImageFile();\n // Continue only if the File was successfully created\n if (photoFile != null) {\n cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(photoFile));\n startActivityForResult(cameraIntent, ReqCodeImage);\n builder.dismissListener(new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(DialogInterface dialogInterface) {\n dialogInterface.dismiss();\n }\n });\n }\n }\n }\n });\n filePicker.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Helper.filePicker(ReqCode, NoticeFragment.this);\n builder.dismissListener(new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(DialogInterface dialogInterface) {\n dialogInterface.dismiss();\n }\n });\n }\n });\n }", "public AlertDialog.Builder initCommonDialogPage(Context c,String str,Boolean isError){\n LayoutInflater inflater = (LayoutInflater) c.getSystemService( c.LAYOUT_INFLATER_SERVICE);\n final AlertDialog.Builder nameBuilder = new AlertDialog.Builder(c);\n View alertDiaView = inflater.inflate(R.layout.common_dialog_box,null);\n nameBuilder.setView(alertDiaView);\n\n txtVw = (TextView) alertDiaView.findViewById(R.id.textView27);\n bgBVw = (ImageView) alertDiaView.findViewById(R.id.bgBVw);\n iconvVw = (ImageView) alertDiaView.findViewById(R.id.iconvVw);\n txtTitle =(TextView) alertDiaView.findViewById(R.id.txtTitle);\n\n\n\n if(isError) {\n txtTitle.setText(R.string.error_dialogbox_title);\n txtVw.setText(str);\n iconvVw.setImageDrawable(c.getResources().getDrawable(R.drawable.icons8_error));\n nameBuilder.setPositiveButton(R.string.customaletdialog_initCommonDialogPage_posbtn, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n }\n\n if(!isError){\n txtTitle.setText(R.string.common_sucessful);\n txtVw.setText(str);\n iconvVw.setImageDrawable(c.getResources().getDrawable(R.drawable.icons8_ok));\n }\n\n nameBuilder.setNegativeButton(R.string.customaletdialog_initCommonDialogPage_negbtn, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }\n });\n\n\n\n return nameBuilder;\n }", "@Override\n public void dialogClick(Dialog dialog, View v) {\n switch (v.getId()) {\n case R.id.tv_in_the_to_xiangce:\n dialog.dismiss();\n if (photoList == null)\n photoList = new ArrayList<Map<String, Object>>();\n else\n photoList.clear();\n Intent in = new Intent(getApplicationContext(),\n AddImgFragmentActivity01.class);\n in.putExtra(\"selectedList\", photoList);\n in.putExtra(\"maxImg\", maxImg);\n startActivityForResult(in, 1);\n overridePendingTransition(R.anim.right_in, R.anim.left_out);\n break;\n\n case R.id.tv_in_the_to_xiangji:\n dialog.dismiss();\n if (photoList == null)\n photoList = new ArrayList<Map<String, Object>>();\n else\n photoList.clear();\n startXiangJi();\n break;\n\n case R.id.tv_cancel:\n dialog.dismiss();\n break;\n\n default:\n break;\n }\n }", "public void openDialog(){\n DialogforTheboysHeroImage dialogforTheboysHeroImage = new DialogforTheboysHeroImage();\n dialogforTheboysHeroImage.show(getSupportFragmentManager(), \"Heros info\");\n }", "public void showAlertDialog(String dialogTitle, String dialogMessage, String btnTextPositive, String btnTextNegative) {\n try {\n final AlertDialog.Builder alertDialog = new AlertDialog.Builder(\n ctx);\n // Setting Dialog Title\n alertDialog.setTitle(dialogTitle);\n // Setting Dialog Message\n alertDialog.setMessage(dialogMessage);\n alertDialog.setCancelable(false);\n // Setting Icon to Dialog\n /*alertDialog.setIcon(R.drawable.tick);*/\n // Setting OK Button\n alertDialog.setPositiveButton(btnTextPositive\n , new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // Write your code here to execute after dialog closed\n // utils.compare_UpdatePreferenceInt(ctx, JsonTags.MMR_33.name(), 1);\n // updateResultToServer();\n mCallBack.onChangeText(utils.BUTTON_NEXT, true);\n utils.showToast(ctx, getResources().getString(R.string.txtManualPass));\n TestController testController = TestController.getInstance(getActivity());\n testController.onServiceResponse(true,\"TouchScreen\", ConstantTestIDs.MIC_ID);\n testController.onServiceResponse(true,\"Speaker\", ConstantTestIDs.SPEAKER_ID);\n mStartRecording = true;\n mImgViewMicPlay.setImageDrawable(getResources().getDrawable(R.drawable.ic_speaker_blue_svg_128));\n nextButtonHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n nextButtonHandler.removeCallbacksAndMessages(null);\n onNextPress();\n }\n }, 2000);\n }\n });\n alertDialog.setNegativeButton(btnTextNegative, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n mCallBack.onChangeText(utils.BUTTON_NEXT, true);\n utils.showToast(ctx, getResources().getString(R.string.txtManualFail));\n TestController testController = TestController.getInstance(getActivity());\n testController.onServiceResponse(false,\"Mic\", ConstantTestIDs.MIC_ID);\n testController.onServiceResponse(false,\"Speaker\", ConstantTestIDs.SPEAKER_ID);\n //utils.compare_UpdatePreferenceInt(ctx, JsonTags.MMR_33.name(), 0);\n // updateResultToServer();\n mStartRecording = true;\n mImgViewMicRecord.setVisibility(View.VISIBLE);\n mImgViewMicRecord.getDrawable().setColorFilter(getResources().getColor(R.color.blue), PorterDuff.Mode.MULTIPLY);\n mImgViewMicPlay.setVisibility(View.GONE);\n nextButtonHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n nextButtonHandler.removeCallbacksAndMessages(null);\n onNextPress();\n }\n }, 2000);\n }\n });\n\n // Showing Alert Message\n alertDialog.show();\n } catch (Exception e) {\n logException(e, \"MicManualFragment_showAlertDialog()\");\n }\n\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(R.string.dialog_fire_missiles)\n .setPositiveButton(R.string.fire, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n return builder.create();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_menu, container, false);\n\n\n imgconsult = (ImageView)v.findViewById(R.id.imgClipBoard);\n imgsiringa = (ImageView)v.findViewById(R.id.imgsiringa);\n imgChat = (ImageView)v.findViewById(R.id.imgChat);\n\n imgChat.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Toast.makeText(getActivity(), \"tela chat\", Toast.LENGTH_SHORT).show();\n startActivity(new Intent(getActivity(),ChatTab.class));\n }\n });\n\n imgconsult.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n //Toast\n Context context = getActivity();\n CharSequence text = \"marcarConsulta\";\n int duraton = Toast.LENGTH_LONG;\n Toast toast = Toast.makeText(context,text,duraton);\n //toast.setGravity(Gravity.TOP,0,0);\n toast.show();\n\n //Dialog\n AlertDialog.Builder mBuilder = new AlertDialog.Builder(getActivity(),R.style.MyCustomDialog);\n View mView = getLayoutInflater().inflate(R.layout.activity_dialog_cad_consulta,null);\n mBuilder.setView(mView);\n final AlertDialog dialog = mBuilder.create();\n dialog.show();\n\n }\n });\n\n imgsiringa.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n //Toast\n Context context = getActivity();\n CharSequence text = \"Marca Vacina\";\n int duraton = Toast.LENGTH_LONG;\n Toast toast = Toast.makeText(context,text,duraton);\n //toast.setGravity(Gravity.,0,0);\n toast.show();\n\n //Dialog\n AlertDialog.Builder mBuilder = new AlertDialog.Builder(getActivity(),R.style.MyCustomDialog);\n View mView = getLayoutInflater().inflate(R.layout.fragment_cad_vacina,null);\n mBuilder.setView(mView);\n final AlertDialog dialog = mBuilder.create();\n dialog.show();\n }\n });\n\n return v;\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setMessage(R.string.dialog_internet_eng_text).setPositiveButton\n (R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n System.exit(1);\n /*\n Intent homeIntent= new Intent(getContext(), MainCardActivity.class);\n homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(homeIntent);\n */\n }\n });\n return builder.create();\n }", "public void onClick(View v) {\n\t\t\tfinal Dialog dialog = new Dialog(v.getContext());\n\t\t\tdialog.requestWindowFeature(Window.FEATURE_NO_TITLE); \n\t dialog.setContentView(R.layout.image_dialog);\n\t ImageView imgDialog = (ImageView) dialog.findViewById(R.id.ImageViewGallery01);\n\t imgDialog.setTag(imgUrl);\n\t imgDialog.setScaleType(ImageView.ScaleType.FIT_XY);\n\t imageLoader.DisplayImage(imgUrl, InfoPoiDetail.this, imgDialog);\n\t \n\t imgDialog.setOnClickListener(new View.OnClickListener() {\n\t\t\t\t\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}\n\t\t\t});\n\t dialog.setTitle(\"\");\n\t dialog.setCancelable(true);\n\t android.view.WindowManager.LayoutParams lp=dialog.getWindow().getAttributes();\n\n\t lp.flags=\n\t \tandroid.view.WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS | \n\t \tandroid.view.WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;\n\n\t dialog.getWindow().setAttributes(lp);\n\t dialog.show();\n//\t stopProgress();\n\t\t}", "public void showPopUp(View view) {\n\n menuDialog.setContentView(R.layout.menupopup);\n menuDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n\n TextView txtUserName = (TextView) menuDialog.getWindow().findViewById(R.id.textview_UserName);\n txtUserName.setText(userName);\n // Download User Image from Firebase and show it to User.\n\n final long ONE_MEGABYTE = 1024 * 1024;\n downloadImageStorageReference.getBytes(ONE_MEGABYTE).addOnSuccessListener(new OnSuccessListener<byte[]>() {\n @Override\n public void onSuccess(byte[] bytes) {\n bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length);\n imageView_UserPhoto.setImageBitmap(bitmap);\n }\n });\n imageView_UserPhoto = menuDialog.getWindow().findViewById(R.id.imageview_UserImage);\n\n if(bitmap != null) {\n imageView_UserPhoto.setImageBitmap(bitmap);\n }else {\n imageView_UserPhoto.setImageResource(R.drawable.userimage_default);\n }\n\n\n menuDialog.show();\n }", "private void updateDetailGUI() {\n\t\t\t\t\t\t\tlogo.setImageUrl(place.gallery.get(0));\n\t\t\t\t\t\t\tnomePosto.setText(place.nome);\n\t\t\t\t\t\t\tdescrizione.setText(place.description);\n\t\t\t\t\t\t\tnumtelefono.setText(place.telefono);\n\t\t\t\t\t\t\twebsite.setText(place.website);\n\t\t\t\t\t\t\tcitta.setText(place.cittą);\n\t\t\t\t\t\t\tSmartImageView image_detail;\n\t\t\t\t\t\t\tif (place.gallery.size() > 1) {\n\t\t\t\t\t\t\t\tLinearLayout.LayoutParams imagesLayout = new LinearLayout.LayoutParams(\n\t\t\t\t\t\t\t\t\t\tLayoutParams.WRAP_CONTENT,\n\t\t\t\t\t\t\t\t\t\tLayoutParams.WRAP_CONTENT);\n\t\t\t\t\t\t\t\timagesLayout.setMargins(5, 0, 5, 0);\n\t\t\t\t\t\t\t\tfor (int i = 1; i < place.gallery.size(); i++) {\n\t\t\t\t\t\t\t\t\timage_detail = new SmartImageView(\n\t\t\t\t\t\t\t\t\t\t\tDetPlaActivity.this);\n\t\t\t\t\t\t\t\t\timage_detail.setLayoutParams(imagesLayout);\n\t\t\t\t\t\t\t\t\timage_detail\n\t\t\t\t\t\t\t\t\t\t\t.setScaleType(ScaleType.CENTER_CROP);\n\t\t\t\t\t\t\t\t\timage_detail.getLayoutParams().width = 200;\n\t\t\t\t\t\t\t\t\timage_detail.setImageUrl(place.gallery\n\t\t\t\t\t\t\t\t\t\t\t.get(i));\n\t\t\t\t\t\t\t\t\tfinal int index_id_dialog = i;\n\t\t\t\t\t\t\t\t\timage_detail\n\t\t\t\t\t\t\t\t\t\t\t.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated\n\t\t\t\t\t\t\t\t\t\t\t\t\t// method stub\n\t\t\t\t\t\t\t\t\t\t\t\t\tDialogImage dialog = DialogImage\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.newInstance(place.gallery\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get(index_id_dialog)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toString());\n\t\t\t\t\t\t\t\t\t\t\t\t\tdialog.show(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetFragmentManager(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTools.TAG_DIALOG_IMAGE);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tgallery.addView(image_detail);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tgalleryContainer.setVisibility(View.GONE);\n\t\t\t\t\t\t\t\tgallery.setVisibility(View.GONE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbtnMappa.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\tString url = \"http://maps.google.com/maps?\"\n\t\t\t\t\t\t\t\t\t\t\t+ \"daddr=\" + place.lat + \",\"\n\t\t\t\t\t\t\t\t\t\t\t+ place.longit;\n\t\t\t\t\t\t\t\t\tIntent mapIntent = new Intent(\n\t\t\t\t\t\t\t\t\t\t\tIntent.ACTION_VIEW, Uri.parse(url));\n\t\t\t\t\t\t\t\t\tstartActivity(mapIntent);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}", "@OnLongClick(R.id.fragApod_image)\n public boolean onLongClickImage(){\n\n //Si es un video no lo puede poner en favoritos\n if(isVideo){ return true; }\n\n //Si no existe la foto en la lista de favoritos, se puede agregar\n if(apodDataSource.getApod(modelApod.getTitle(),modelApod.getDate()) == null) {\n new AlertDialog.Builder(getActivity())\n .setTitle(getString(R.string.fragments_msgAddToFavorites))\n .setMessage(String.format(getString(R.string.fragments_msgQuestionAdd), modelApod.getTitle()))\n .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //Guardamos el objeto Apod en la base de datos\n long result = apodDataSource.saveApod(modelApod);\n if(result != -1) {\n Toast.makeText(getActivity(), getString(R.string.fragments_msgSuccessfullyAdded),\n Toast.LENGTH_SHORT).show();\n }\n }\n }).setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n }\n }).setCancelable(false).create().show();\n }\n else{\n Toast.makeText(getActivity(), getString(R.string.fragments_msgAlreadyExist),Toast.LENGTH_SHORT).show();\n }\n return true;\n }", "private void showDialog(){\n AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = this.getLayoutInflater();\n View dialogView= inflater.inflate(R.layout.dialog_after_share, null);\n dialogBuilder.setView(dialogView);\n\n //Show the dialog\n final AlertDialog alert = dialogBuilder.show();\n alert.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n alert.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);\n alert.setCancelable(false);\n TextView okTV = dialogView.findViewById(R.id.ok1);\n\n okTV.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n alert.hide();\n }\n });\n }", "private void showdialog()\n\t{\n\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\t\tLayoutInflater inflater = getActivity().getLayoutInflater();\n\t\t\n\t\tView convertView = (View) inflater.inflate(R.layout.changepass_dialog, null);\t\t\t\n\t\t\n\t\tfinal EditText old_pass = (EditText) convertView.findViewById(R.id.old_pass);\n\t\tfinal EditText new_pass = (EditText) convertView.findViewById(R.id.new_pass);\n\t\tTextView pass_changed = (TextView) convertView.findViewById(R.id.pass_changed);\n\t\tImageView close_btn = (ImageView) convertView.findViewById(R.id.chng_pass_close);\n\t\t\n\t\tpass_changed.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) \n\t\t\t{\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tchange_pass(Singleton.user_id, old_pass.getText().toString(), new_pass.getText().toString(), \n\t\t\t\t\t\tnew_pass.getText().toString());\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tclose_btn.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) \n\t\t\t{\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\n\t\t\t\talert.dismiss();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tbuilder.setView(convertView);\n\t\talert = builder.create();\n\t\t\n\t\tWindow window = alert.getWindow();\n\t\tWindowManager.LayoutParams lp = window.getAttributes();\t\t\n\t\t//lp.copyFrom(window.getAttributes());\n\t\twindow.setGravity(Gravity.CENTER);\n\n\t\t// This makes the dialog take up the full width\n\n\t\t/*lp.width = WindowManager.LayoutParams.MATCH_PARENT;\n\t\tlp.height = WindowManager.LayoutParams.WRAP_CONTENT;\n\t\tlp.gravity = Gravity.CENTER;*/\n\t\t\n\t\tlp.x = 100; // The new position of the X coordinates\n lp.y = 100; // The new position of the Y coordinates\n lp.width = 300; // Width\n lp.height = 100; // Height\n // lp.alpha = 0.7f; // Transparency\n\n\t\twindow.setAttributes(lp);\n\t\talert.show();\n\t}", "@Override\n\t\t\t\t\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tDialogImage dialog = DialogImage\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.newInstance(place.gallery\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get(index_id_dialog)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toString());\n\t\t\t\t\t\t\t\t\t\t\t\t\tdialog.show(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetFragmentManager(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTools.TAG_DIALOG_IMAGE);\n\t\t\t\t\t\t\t\t\t\t\t\t}", "private void mostrarDialogoCargar(){\n materialDialog = new MaterialDialog.Builder(this)\n .title(\"Validando datos\")\n .content(\"Por favor espere\")\n .progress(true, 0)\n .contentGravity(GravityEnum.CENTER)\n .widgetColorRes(R.color.colorPrimary)\n .show();\n\n materialDialog.setCancelable(false);\n materialDialog.setCanceledOnTouchOutside(false);\n }", "@Override\n public void onClick(View v) {\n Admin_MainActivity mainActivity = (Admin_MainActivity) getActivity();\n DatabaseHelper dbHelper = new DatabaseHelper(mainActivity);\n taskforshopphoto=dbHelper.getTaskInfo(String.valueOf(Shared.SelectedTask.ID));\n if(taskforshopphoto.PhotoID!=null) {\n Dialog settingsDialog = new Dialog(getActivity());\n settingsDialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);\n View viewDialog = getActivity().getLayoutInflater().inflate(R.layout.image_layout, null);\n settingsDialog.setContentView(viewDialog);\n ImageView imgShop = (ImageView) viewDialog.findViewById(R.id.ShopImage);\n Bitmap bmp = BitmapFactory.decodeFile(taskforshopphoto.PhotoID);\n\n imgShop.setImageBitmap(bmp);\n settingsDialog.show();\n }\n else {\n if (Shared.SelectedTask.ShopPhoto != null) {\n // Toast.makeText(getActivity(), \" No Shop photo\", Toast.LENGTH_LONG).show();\n Dialog settingsDialog = new Dialog(getActivity());\n View viewDialog = getActivity().getLayoutInflater().inflate(R.layout.image_layout, null);\n settingsDialog.setContentView(viewDialog);\n ImageView imgShop = (ImageView) viewDialog.findViewById(R.id.ShopImage);\n UrlImageViewHelper.setUrlDrawable(imgShop, \"http://sunsigns.blob.core.windows.net/cdn/Images/ShopImages/\" + Shared.SelectedTask.ShopPhoto,R.drawable.image_loading);\n settingsDialog.show();\n // try {\n // URL url = new URL(\"http://sunsigns.blob.core.windows.net/cdn/Images/ShopImages/\" + Shared.SelectedTask.ShopPhoto);\n //try this url = \"http://0.tqn.com/d/webclipart/1/0/5/l/4/floral-icon-5.jpg\"\n /* HttpGet httpRequest = null;\n\n httpRequest = new HttpGet(url.toURI());\n\n HttpClient httpclient = new DefaultHttpClient();\n HttpResponse response = (HttpResponse) httpclient\n .execute(httpRequest);\n\n HttpEntity entity = response.getEntity();\n BufferedHttpEntity b_entity = new BufferedHttpEntity(entity);\n InputStream input = b_entity.getContent();\n\n Bitmap bitmap = BitmapFactory.decodeStream(input);\n\n imgShop.setImageBitmap(bitmap);\n settingsDialog.show();*/\n // } catch (Exception e) {\n // e.printStackTrace();\n // }\n }\n else\n {\n Toast.makeText(getActivity(), \" No Shop photo\", Toast.LENGTH_LONG).show();\n }\n }\n\n }", "private void showDialogPolygon1() {\n LayoutInflater inflater = getLayoutInflater();\n CardView cardView = (CardView) getLayoutInflater().inflate(R.layout.dialog_root,null);\n LinearLayout root = (LinearLayout) cardView.findViewById(R.id.linearLayout_root);\n //inflate each row that should be contained in the dialog box\n View rowAmount = inflater.inflate(R.layout.row_amount,null);\n View rowTelephone = inflater.inflate(R.layout.row_telephone,null);\n View rowText = inflater.inflate(R.layout.row_text,null);\n View rowButtons = inflater.inflate(R.layout.row_buttons,null);\n //add each row to the root\n root.addView(rowAmount);\n root.addView(rowTelephone);\n root.addView(rowText);\n root.addView(rowButtons);\n\n customDialog = new Dialog(getActivity());\n customDialog.requestWindowFeature(Window.FEATURE_NO_TITLE); // before\n customDialog.setContentView(cardView);\n customDialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));\n customDialog.setCancelable(true);\n\n\n final EditText editTextAmount = customDialog.findViewById(R.id.edit_text_amount);\n final EditText editTextNumber = customDialog.findViewById(R.id.edit_text_mobileNumber);\n ImageButton imageButton = customDialog.findViewById(R.id.selec_contact_ImageBtn);\n imageButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n contactPicker();\n }\n });\n\n\n ((Button) customDialog.findViewById(R.id.bt_okay)).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent hoverIntent = new HoverParameters.Builder(getActivity())\n .request(\"e0d94aec\")\n .style(R.style.BaseTheme)\n .extra(\"MobileNumber\", editTextNumber.getText().toString())\n .extra(\"Amount\", editTextAmount.getText().toString())\n .buildIntent();\n startActivityForResult(hoverIntent, 0);\n }\n\n });\n\n ((Button) customDialog.findViewById(R.id.bt_cancel)).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n customDialog.dismiss();\n }\n });\n\n\n customDialog.show();\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n//\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\r\n\t\tsetContentView(R.layout.newsoperationlay);\r\n imageLoader = ImageLoader.getInstance();\r\n\t\tgetActionBar().hide();\r\n\t\tIntent intent = getIntent();\r\n\t\t\r\n\t\treturnbutton = (LinearLayout)findViewById(R.id.newsopreturn);\r\n\t\tnewoperation = (ImageButton)findViewById(R.id.newsxuanxiang);\r\n\t\thistorymessage = (RelativeLayout)findViewById(R.id.historymessage);\r\n\t\tmessageset = (RelativeLayout)findViewById(R.id.messageset);\r\n\t\txinwengroup_view = (ImageView) findViewById(R.id.xinwengroupimg);\r\n\t\txinwengroup_text = (TextView) findViewById(R.id.xinwengrouptext);\r\n\t\txinwengroup_text.setText(intent.getStringExtra(\"descripe\").toString());\r\n//\t\tPicasso.with(this)\r\n//\t\t .load(intent.getStringExtra(\"url\").toString())\r\n//\t\t .into(xinwengroup_view);\r\n\t\timageLoader.displayImage(intent.getStringExtra(\"url\").toString(), xinwengroup_view,App.options_error);\r\n\t\t\r\n\t\treturnbutton.setOnClickListener(this);\r\n\t\tnewoperation.setOnClickListener(this);\r\n\t\thistorymessage.setOnClickListener(this);\r\n\t\tmessageset.setOnClickListener(this);\r\n\t\t\r\n\t\tpopupShareView =NewsOperation.this.getLayoutInflater().inflate(R.layout.newsoperationdetaillay, null);\r\n\t\ttopLinearLayout = (LinearLayout) popupShareView.findViewById(R.id.news_top_share);\r\n\t\tpopupShareView.setOnClickListener(new OnClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tpopupShareWindow.dismiss();\r\n\t\t\t}\r\n\t\t});\r\n//\t\txuanxiangpopupShareView =NewsOperation.this.getLayoutInflater().inflate(R.layout.newsxianxiangdetaillay, null);\r\n//\t\txuanxiangtopLinearLayout = (LinearLayout) xuanxiangpopupShareView.findViewById(R.id.news_top_xuan);\r\n\t\tnewsexpect = (Button)popupShareView.findViewById(R.id.newstoreceive);\r\n\t\tnewsrefuse = (Button)popupShareView.findViewById(R.id.newsrefudereceive);\r\n\t\tnewscancel = (Button)popupShareView.findViewById(R.id.receivecancel);\r\n\t\tnewscancel.setOnClickListener(this);\r\n//\t\txuanxiangpopupShareView.setOnClickListener(new OnClickListener() {\r\n//\t\t\t@Override\r\n//\t\t\tpublic void onClick(View v) {\r\n//\t\t\t\txuanxiangpopupShareWindow.dismiss();\r\n//\t\t\t}\r\n//\t\t});\r\n\t}", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {\n View dialogView = (View) View.inflate(getApplicationContext(), R.layout.activity_image_view, null);\n AlertDialog.Builder dlg = new AlertDialog.Builder(ImageGridActivity.this);\n ImageView ivPoster = (ImageView) dialogView.findViewById(R.id.image_view);\n ivPoster.setImageResource(posterID[position]);\n\n // Log.i(\"이미지아이디\", ((ImageView) view.findViewById(R.id.grid_item_image)).getResources()));\n dlg.setTitle(movies[position]);\n // dlg.setIcon(R.drawable.ic_launcher);\n dlg.setView(dialogView);\n dlg.setNegativeButton(\"닫기\", null);\n dlg.show();\n /* Toast.makeText( getApplicationContext(),\n ((TextView)view.findViewById(R.id.grid_item_label)).getText()\n ,Toast.LENGTH_SHORT\n\n ).show();*/\n }", "public void clicProgramme(final ADiffusion movie, int imageOrWeb) {\n final Dialog dialog = new Dialog(MainActivity.this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.dialogbox);\n //dialog.setTitle(\"Programme\");\n\n\n // set the custom dialog components - text, image and button\n TextView text = (TextView) dialog.findViewById(R.id.titredialogbox);\n text.setText(movie.getTitre());\n\n WebView webview = (WebView) dialog.findViewById(R.id.webview);\n webview.setVisibility(View.INVISIBLE);\n final ImageView image = (ImageView) dialog.findViewById(R.id.imagedialogbox);\n image.setVisibility(View.VISIBLE);\n Picasso.with(getApplicationContext()).load(movie.getPhoto()).into(image);\n final String url = movie.getUrlDiff();\n final String titre = movie.getTitre();\n\n Button dialogButton = (Button) dialog.findViewById(R.id.dialogButtonClose);\n // if button is clicked, close the custom dialog\n dialogButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n ImageButton buttonimdb = (ImageButton) dialog.findViewById(R.id.buttonimdb);\n buttonimdb.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ImageView image = (ImageView) dialog.findViewById(R.id.imagedialogbox);\n image.setVisibility(View.INVISIBLE);\n WebView webview = (WebView) dialog.findViewById(R.id.webview);\n webview.setVisibility(View.VISIBLE);\n webview.setWebViewClient(new WebViewClient());\n webview.getSettings().setJavaScriptEnabled(true);\n webview.loadUrl(TV7JAPI.ENTETE_IMDB+titre);\n }\n });\n\n ImageButton buttont7j = (ImageButton) dialog.findViewById(R.id.buttont7j);\n buttont7j.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ImageView image = (ImageView) dialog.findViewById(R.id.imagedialogbox);\n image.setVisibility(View.INVISIBLE);\n WebView webview = (WebView) dialog.findViewById(R.id.webview);\n webview.setVisibility(View.VISIBLE);\n webview.setWebViewClient(new WebViewClient());\n webview.getSettings().setJavaScriptEnabled(true);\n webview.loadUrl(TV7JAPI.ENTETE_TV7+url);\n }\n });\n\n ImageButton buttontelerama = (ImageButton) dialog.findViewById(R.id.buttontelerama);\n buttontelerama.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ImageView image = (ImageView) dialog.findViewById(R.id.imagedialogbox);\n image.setVisibility(View.INVISIBLE);\n WebView webview = (WebView) dialog.findViewById(R.id.webview);\n webview.setVisibility(View.VISIBLE);\n webview.setWebViewClient(new WebViewClient());\n webview.getSettings().setJavaScriptEnabled(true);\n webview.loadUrl(TV7JAPI.ENTETE_TELERAMA+titre);\n }\n });\n\n\n dialog.show();\n\n }", "private void showCustomDialog(VisitorModel visitor) {\n ViewGroup viewGroup = ((MainActivity)context).findViewById(android.R.id.content);\n\n //then we will inflate the custom alert dialog xml that we created\n View dialogView = LayoutInflater.from(context).inflate(R.layout.my_dialog, viewGroup, false);\n\n TextView btnUnfollow = dialogView.findViewById(R.id.btn_unfollow);\n TextView btnCancel = dialogView.findViewById(R.id.btn_cancel);\n TextView txtUsername = dialogView.findViewById(R.id.txt_username);\n TextView txtAvatar = dialogView.findViewById(R.id.txt_avatar);\n CircleImageView imgAvatar = dialogView.findViewById(R.id.img_avatar);\n\n txtAvatar.setText(GlobalFunc.getFirstLetter(visitor.username));\n txtUsername.setText(visitor.username);\n\n //Now we need an AlertDialog.Builder object\n AlertDialog.Builder builder = new AlertDialog.Builder(context, R.style.myDialogForUnVisit);\n //setting the view of the builder to our custom view that we already inflated\n builder.setView(dialogView);\n\n //finally creating the alert dialog and displaying it\n AlertDialog alertDialog = builder.create();\n alertDialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);\n alertDialog.show();\n\n btnUnfollow.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n unVisit(visitor);\n alertDialog.hide();\n }\n });\n\n btnCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n alertDialog.hide();\n }\n });\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\r\n unbinder = ButterKnife.bind(this, rootView);\r\n img1.setOnLongClickListener(new View.OnLongClickListener() {\r\n @Override\r\n public boolean onLongClick(View v) {\r\n showDialog();\r\n return false;\r\n }\r\n });\r\n\r\n return rootView;\r\n\r\n\r\n }", "private void showPopuopForOustanding() {\n String languageCode = Utility.getInstance().getLanguage(getActivity());\n Utility.getInstance().setLanguage(getActivity(), languageCode);\n Utility.getInstance().localisation(getActivity(), languageCode);\n dialog = new Dialog(mContext);\n if (!dialog.isShowing()) {\n dialog.setCancelable(false);\n dialog.getWindow().addFlags(Window.FEATURE_NO_TITLE);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));\n dialog.setContentView(R.layout.outstanding_popup);\n textview_notFound = dialog.findViewById(R.id.textview_notFound);\n imageviewOutsnadingProfile = dialog.findViewById(R.id.imageviewOutsnadingProfile);\n textviewOustandingId = dialog.findViewById(R.id.textviewOustandingId);\n textviewOustandingName = dialog.findViewById(R.id.textviewOustandingName);\n textviewOustandingAmount = dialog.findViewById(R.id.textviewOustandingAmount);\n relativelayoutOustandingProfile = dialog.findViewById(R.id.relativelayoutProfile);\n edittextoustandingcustomerName = dialog.findViewById(R.id.edittextoustandingcustomerName);\n imageviewMicOustanding = dialog.findViewById(R.id.imageviewMicOustanding);\n ImageView imageviewCross = dialog.findViewById(R.id.imageviewCross);\n\n imageviewCross.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n dialog.dismiss();\n dialog.dismiss();\n if (textToSpeech != null) {\n textToSpeech.stop();\n }\n imageviewDevitMic.setColorFilter(getResources().getColor(android.R.color.white), PorterDuff.Mode.SRC_IN);\n imageviewMicCredit.setColorFilter(getResources().getColor(android.R.color.white), PorterDuff.Mode.SRC_IN);\n imageviewOustMic.setColorFilter(getResources().getColor(android.R.color.white), PorterDuff.Mode.SRC_IN);\n }\n });\n\n imageviewMicOustanding.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n edittextoustandingcustomerName.requestFocus();\n speechToTextFuncVoice(mContext, edittextoustandingcustomerName, 1, imageviewMicOustanding, 1);\n }\n });\n\n\n CardView cardviewOk = dialog.findViewById(R.id.cardviewOk);\n cardviewOk.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n dialog.dismiss();\n dialog.dismiss();\n if (textToSpeech != null) {\n textToSpeech.stop();\n }\n imageviewDevitMic.setColorFilter(getResources().getColor(android.R.color.white), PorterDuff.Mode.SRC_IN);\n imageviewMicCredit.setColorFilter(getResources().getColor(android.R.color.white), PorterDuff.Mode.SRC_IN);\n imageviewOustMic.setColorFilter(getResources().getColor(android.R.color.white), PorterDuff.Mode.SRC_IN);\n }\n });\n\n edittextoustandingcustomerName.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n Log.e(TAG, \"onTextChanged: \");\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n Log.e(TAG, \"onTextChanged: \");\n if (dialog.isShowing()) {\n if(Utility.getInstance().isOnline(mContext)) {\n checkOustandingData(s.toString(), true);\n }else {\n Toast.makeText(mContext,getString(R.string.please_check_internet),Toast.LENGTH_SHORT).show();\n }\n }\n }\n });\n\n if (!dialog.isShowing()) {\n String languageCode2 = Utility.getInstance().getLanguage(getActivity());\n Utility.getInstance().setLanguage(getActivity(), languageCode2);\n Utility.getInstance().localisation(getActivity(), languageCode2);\n dialog.show();\n/* Window window = dialog.getWindow();\n window.setLayout(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);*/\n dialog.getWindow().setGravity(Gravity.TOP | Gravity.RIGHT);\n WindowManager.LayoutParams layoutParams = dialog.getWindow().getAttributes();\n layoutParams.x = 100; // right margin\n layoutParams.y = 170; // top margin\n dialog.getWindow().setAttributes(layoutParams);\n // e.g. bottom + left margins:\n dialog.getWindow().setGravity(Gravity.BOTTOM | Gravity.LEFT);\n WindowManager.LayoutParams layoutParams1 = dialog.getWindow().getAttributes();\n layoutParams1.x = 100; // left margin\n layoutParams1.y = 170; // bottom margin\n dialog.getWindow().setAttributes(layoutParams1);\n }\n }\n }", "private void showbadgedialog() {\n final LayoutInflater li = LayoutInflater.from(mContext);\n //Creating a view to get the dialog box\n View confirmDialog = li.inflate(R.layout.dialog_badges, null);\n // number=session.getMobileNumber();\n //Initizliaing confirm button fo dialog box and edittext of dialog box\n final Button buttonconfirm = (Button) confirmDialog.findViewById(R.id.buttonConfirm);\n\n\n AlertDialog.Builder alert = new AlertDialog.Builder(mContext);\n\n alert.setView(confirmDialog);\n\n final AlertDialog alertDialog = alert.create();\n alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n alertDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n\n alertDialog.show();\n\n //On the click of the confirm button from alert dialog\n buttonconfirm.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n alertDialog.dismiss();\n }\n });\n\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\r\n\r\n // Inflate the layout to use as dialog or embedded fragment\r\n view=inflater.inflate(R.layout.detailednews, container, false);\r\n TextView tvTitle=(TextView) view.findViewById(R.id.detailedNewstitle);\r\n TextView tvContent=(TextView)view.findViewById(R.id.detailedcontent);\r\n TextView tvDate=(TextView) view.findViewById(R.id.detaileddate);\r\n NetworkImageView imageView=(NetworkImageView) view.findViewById(R.id.detailedicon);\r\n\r\n\r\n String title= getArguments().getString(\"title\");\r\n String date= getArguments().getString(\"date\");\r\n String content= getArguments().getString(\"content\");\r\n String imageurl=getArguments().getString(\"url\");\r\n\r\n //setting the values\r\n\r\n loadImage = CustomVolleyRequest.getInstance(context).getImageLoader();\r\n loadImage.get(imageurl, ImageLoader.getImageListener(imageView, R.drawable.ic_holder, android.R.drawable.ic_dialog_alert));\r\n\r\n tvTitle.setText(title);\r\n tvContent.setText(content);\r\n tvDate.setText(date);\r\n imageView.setImageUrl(imageurl,loadImage);\r\n\r\n //return the view that is going to be inflated in the fragment\r\n return view;\r\n}", "public void showPopUp(View v) {\n int n = (int) v.getTag();\n\n // Переход на FullScreenImageActivity\n Intent intent = new Intent(getActivity(), FullScreenImageActivity.class);\n\n intent.putExtra(\"Bitmap\", product.getImages());\n intent.putExtra(\"position\", n);\n\n // Передаем в FullScreenImageActivity bitmap картинки и стартуем\n// intent.putExtra(\"Bitmap\", product.getImage(n));\n\n startActivity(intent);\n }", "private final void m90472b() {\n if (isAttached() && getContext() != null) {\n Context context = getContext();\n if (context == null) {\n C32569u.m150511a();\n }\n AlertDialog.C0155a aVar = new AlertDialog.C0155a(context);\n aVar.setTitle(getString(R.string.u4));\n aVar.setMessage(getString(R.string.u3));\n aVar.setPositiveButton(getString(R.string.u2), new DialogInterface$OnClickListenerC17913e(this));\n aVar.setNegativeButton(getString(R.string.u1), new DialogInterface$OnClickListenerC17914f(this));\n AlertDialog create = aVar.create();\n C32569u.m150513a((Object) create, \"AlertDialog.Builder(cont… }\\n\\n }.create()\");\n if (create != null) {\n create.show();\n create.setCanceledOnTouchOutside(true);\n create.setOnCancelListener(new DialogInterface$OnCancelListenerC17915g(this));\n create.mo1499a(-1).setTypeface(null, 1);\n }\n }\n }", "private void createAlert() {\n ImageView image = new ImageView(this);\n image.setImageResource(zunder.ebs.zunderapp.R.drawable.qr);\n\n myWallet = new MyWallet();\n setPrivateKey(myWallet.searchWallet());\n\n createQR = new CreateQR(700, 700);\n try {\n KeyPair pair = KeyPair.fromSecretSeed(getPrivateKey());\n setPublicKey(pair.getAccountId());\n try {\n Bitmap bitmap = createQR.encodeAsBitmap(getPublicKey());\n image.setImageBitmap(bitmap);\n } catch (WriterException e) {\n e.printStackTrace();\n }\n }catch (Exception e){\n e.getMessage();\n }\n\n\n\n AlertDialog.Builder builder =\n new AlertDialog.Builder(this).\n setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n }).\n setView(image);\n builder.create().show();\n }", "@Nullable\r\n @Override\r\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fullscreendialogfragment, container, false);\r\n img = view.findViewById(R.id.img);\r\n //set the imageview\r\n Picasso.get().load(getArguments().getString(\"url\")).into(img);\r\n return view;\r\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(this.m)\n .setPositiveButton(R.string.donesuccess, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // onFailure();\n onLoginFailed(m);\n }\n });\n return builder.create();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n LayoutInflater inflater = getActivity().getLayoutInflater();\n // Pass null as the parent view because its going in the dialog layout.\n View view = inflater.inflate(R.layout.dialog_image_chooser, null);\n\n View cameraView = view.findViewById(R.id.action_camera);\n View galleryView = view.findViewById(R.id.action_gallery);\n\n cameraView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Send the camera click event back to the host activity.\n mListener.onDialogCameraClick(ImageChooserDialogFragment.this);\n // Dismiss the dialog fragment.\n dismiss();\n }\n });\n\n galleryView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Send the gallery click event back to the host activity.\n mListener.onDialogGalleryClick(ImageChooserDialogFragment.this);\n // Dismiss the dialog fragment.\n dismiss();\n }\n });\n\n // Create an AlertDialog.Builder and set the layout.\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setView(view);\n\n return builder.create();\n }", "public void onCreate(Bundle bundle) {\n super.onCreate(bundle);\n setContentView((int) R.layout.activity_message);\n this.recyclerView = (RecyclerView) findViewById(R.id.recycler_view);\n this.recyclerView.setHasFixedSize(true);\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);\n linearLayoutManager.setStackFromEnd(true);\n this.recyclerView.setLayoutManager(linearLayoutManager);\n this.username = (AppCompatTextView) findViewById(R.id.title);\n this.btn_send = (AppCompatImageButton) findViewById(R.id.btn_send);\n this.text_send = (AppCompatEditText) findViewById(R.id.text_send);\n this.img_view = (PhotoView) findViewById(R.id.img_preview);\n this.btn_doc = (AppCompatImageButton) findViewById(R.id.btn_doc);\n this.apiService = (APIService) Client.getClient(\"https://fcm.googleapis.com/\").create(APIService.class);\n this.layout = new LinearLayout(this);\n this.layout.setOrientation(LinearLayout.VERTICAL);\n this.layout.setGravity(17);\n this.layoutInflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);\n this.customview = this.layoutInflater.inflate(R.layout.img_doc_dialog, (ViewGroup) null);\n this.img = (AppCompatButton) this.customview.findViewById(R.id.img);\n this.pdf = (AppCompatButton) this.customview.findViewById(R.id.pdf);\n this.cancel = (AppCompatTextView) this.customview.findViewById(R.id.cancel);\n this.popupWindow = new PopupWindow(this.customview, -1, -1);\n this.recyclerView.setVisibility(View.VISIBLE);\n this.img_view.setVisibility(View.GONE);\n this.intent = getIntent();\n this.dbname = this.intent.getStringExtra(\"path\");\n this.profile_url = this.intent.getStringExtra(Scopes.PROFILE);\n this.department = this.intent.getStringExtra(\"department\");\n this.semester = this.intent.getStringExtra(\"semester\");\n this.name = this.intent.getStringExtra(\"cname\");\n this.fuser = FirebaseAuth.getInstance().getCurrentUser();\n this.username.setText(getIntent().getStringExtra(\"name\"));\n this.btn_send.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n DiscussionActivity.this.recyclerView.setVisibility(View.VISIBLE);\n DiscussionActivity.this.img_view.setVisibility(View.GONE);\n String obj = DiscussionActivity.this.text_send.getText().toString();\n if (!obj.equals(\"\")) {\n DiscussionActivity discussionActivity = DiscussionActivity.this;\n discussionActivity.sendMessage(discussionActivity.fuser.getUid(), obj);\n } else {\n Toast.makeText(DiscussionActivity.this, \"You Can't send empty message.\", Toast.LENGTH_SHORT).show();\n }\n DiscussionActivity.this.text_send.setText(\"\");\n }\n });\n this.btn_doc.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n DiscussionActivity.this.showOptions();\n }\n });\n readMessage(this.fuser.getUid());\n }", "public void initiatePopupWindow(View v) {\n try {\n //We need to get the instance of the LayoutInflater, use the context of this activity\n LayoutInflater inflater = (LayoutInflater) Activity_Lesson_Unit_Point_Display_FlashCardActivity.this\n .getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n //Inflate the view from a predefined XML layout\n\n View view = inflater.inflate(R.layout.popup_screen,\n (ViewGroup) findViewById(R.id.popup_element));\n RelativeLayout layout = view.findViewById(R.id.popup_element);\n int width = 650;\n int height = 600;\n width = layout.getWidth();\n height = layout.getHeight();\n //Instantiate grid view\n gridView = view.findViewById(R.id.scroll_grid);\n //Instantiate grid adapter\n// scrollAdapter = new ScrollGridCardAdapter(FlashCardActivity.this,gja_questions,knownList,donknowList,skipList,getScreenSize());\n scrollAdapter = new ScrollGridCardAdapter(Activity_Lesson_Unit_Point_Display_FlashCardActivity.this,questionList,getScreenSize());\n //Setting Adapter to gridview\n gridView.setAdapter(scrollAdapter);\n // create a 300px width and 570px height PopupWindow\n pw = new PopupWindow(view, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n // display the popup in the center\n pw.showAtLocation(v, Gravity.CENTER, 0, 0);\n if (android.os.Build.VERSION.SDK_INT > 20) {\n pw.setElevation(10);\n }\n// TextView mResultText = (TextView) layout.findViewById(R.id.server_status_text);\n Button cancelButton = (Button) view.findViewById(R.id.pop_close_button);\n cancelButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n pw.dismiss();\n// disableEnableViews(myrlayout);\n mHideRunnable.run();\n }\n });\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void alertDialog(int title, int message, int icon) {\n tst_Message.cancel();\n tst_Message = null;\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(title);\n builder.setMessage(message);\n builder.setIcon(icon);\n builder.setPositiveButton(R.string.dialog_pos_btn, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n reset();\n }\n });\n builder.show();\n }", "@Override\n public void onClick(View v)\n {\n AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(new ContextThemeWrapper(activity, R.style.AppTheme));\n dialogBuilder.setView(viewConfirmDialog);\n AlertDialog alertDialog= dialogBuilder.create();\n Window windowAlert = alertDialog.getWindow();\n WindowManager.LayoutParams layoutConfirmDialog = new WindowManager.LayoutParams();\n layoutConfirmDialog.copyFrom(windowAlert.getAttributes());\n layoutConfirmDialog.width = 320;\n layoutConfirmDialog.height = 320;\n alertDialog.getWindow().setAttributes(layoutConfirmDialog);\n dismissAlertDialog();\n components.alertDialog = alertDialog;\n alertDialog.show();\n\n }", "private void startMealToDatabaseAlert() {\n AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this);\n TextView dialogTitle = new TextView(this);\n int blackValue = Color.parseColor(\"#000000\");\n dialogTitle.setText(R.string.title_dialog_meal);\n dialogTitle.setGravity(Gravity.CENTER_HORIZONTAL);\n dialogTitle.setPadding(0, 30, 0, 0);\n dialogTitle.setTextSize(25);\n dialogTitle.setTextColor(blackValue);\n dialogBuilder.setCustomTitle(dialogTitle);\n View dialogView = getLayoutInflater().inflate(R.layout.dialog_add_meal, null);\n\n this.startEditTexts(dialogView);\n this.startLocationSpinner(dialogView);\n this.startAddPhotoButton(dialogView);\n this.startMealDialogButtonListeners(dialogBuilder);\n\n dialogBuilder.setView(dialogView);\n AlertDialog permission_dialog = dialogBuilder.create();\n permission_dialog.show();\n }", "private void loadLocalImageConfirm()\n {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())\n .setCancelable(true).setTitle(\"Load\").setMessage(\"Load image?\");\n\n builder.setPositiveButton(R.string.open_local, new DialogInterface.OnClickListener()\n {\n @Override\n public void onClick(DialogInterface dialog, int which)\n {\n ((MainActivity) getActivity()).loadLocalImage();\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 }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n\n dialog = new Dialog(this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.rating_dilogue);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));\n\n final ImageView ivZoomedImage = (ImageView) dialog.findViewById(R.id.fullscreen_image_dilogue);\n\n\n Picasso.with(this).setIndicatorsEnabled(false);\n\n\n Picasso.with(this)\n .load(R.drawable.ratings_test)\n .into(ivZoomedImage);\n\n dialog.getWindow().setLayout(WindowManager.LayoutParams.WRAP_CONTENT, WindowManager.LayoutParams.WRAP_CONTENT);\n dialog.show();\n\n return true;\n } else if (id == R.id.action_phone) {\n Intent i = new Intent(Intent.ACTION_DIAL, Uri.parse(\"tel:977014274837\"));\n startActivity(i);\n\n return true;\n }\n\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n\n ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(\n this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);\n drawer.setDrawerListener(toggle);\n toggle.syncState();\n\n fragmentTransaction.commit();\n\n\n return super.onOptionsItemSelected(item);\n }", "private AlertDialog cargando() {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n LayoutInflater inflater = getLayoutInflater();\n\n @SuppressLint(\"InflateParams\") View v = inflater.inflate(R.layout.loading, null);\n\n\n builder.setView(v);\n builder.setCancelable(false);\n\n return builder.create();\n\n }", "@Override\n\t\t\t\t\t\tpublic void onClick(View InputFragmentView) {\n\t\t\t\t\t\t\tfinal Dialog dialog = new Dialog(getActivity());\n\t\t\t\t\t\t\tdialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\t\t\t\t\t\tdialog.setContentView(R.layout.custom_dialog_image);\n\t\t\t\t\t\t\tdialog.getWindow().setBackgroundDrawable(new ColorDrawable\n\t\t\t\t\t\t\t\t\t(android.graphics.Color.TRANSPARENT));\n\n\t\t\t\t\t\t\timageView_close = (ImageView) dialog.findViewById(R.id.imageView_close);\n\t\t\t\t\t\t\timageView_close.setImageResource(R.drawable.patientlookuptablestart);\n\t\t\t\t\t\t\ttable_img = (ImageView) dialog.findViewById(R.id.table_img);\n\t\t\t\t\t\t\ttable_img.setVisibility(View.GONE);\n\t\t\t\t\t\t\tButton cadbtnNext = (Button) dialog.findViewById(R.id.cadbtnNext);\n\t\t\t\t\t\t\tcadbtnNext.setBackgroundResource(R.drawable.simulnextbt);\n\t\t\t\t\t\t\tcadbtnNext.setOnClickListener(new View.OnClickListener() {\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onClick(\n\t\t\t\t\t\t\t\t\t\t\t\tView InputFragmentView) {\n\t\t\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t\t\t\ttextHead.setText(\"TESTING\");\n\t\t\t\t\t\t\t\t\t\t\ttextFlu.setText(R.string.patienttesting);\n\t\t\t\t\t\t\t\t\t\t\ttextFlu.startAnimation(animation);\n\t\t\t\t\t\t\t\t\t\t\ttableflu.setVisibility(View.VISIBLE);\n\n\t\t\t\t\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t\t\t\t\t * set image computation for\n\t\t\t\t\t\t\t\t\t\t\t * adamImage X = (Chills=Yes, Runny\n\t\t\t\t\t\t\t\t\t\t\t * Nose=No, Headache=Mild, Fever=No)\n\t\t\t\t\t\t\t\t\t\t\t */\n\n\t\t\t\t\t\t\t\t\t\t\tlookupbt.setVisibility(View.INVISIBLE);\n\t\t\t\t\t\t\t\t\t\t\tadamImage.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\t\t\t\t\tadamImage.setBackgroundResource(R.drawable.nextbtred);\n\t\t\t\t\t\t\t\t\t\t\tadamImage.setOnClickListener(new View.OnClickListener() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onClick(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tView InputFragmentView) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (InputFragmentView == adamImage) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcase2();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextButton = 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextButton++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcase2();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tdialog.show();\n\t\t\t\t\t\t}", "@Override\n public void onPositive(MaterialDialog materialDialog) {\n Intent intent = new Intent(ProductDetailImageActivity.this, CameraActivity.class);\n intent.putExtra(EXTRA_ZUOZHENG_IMAGE, isZuozhengImage);\n intent.putExtra(EXTRA_IMAGE_INDEX, index);\n startActivityForResult(intent, REQUEST_TAKE_PICTURE);\n }", "private void mDialogShow() {\n alertDialog = new AlertDialog.Builder(this).create();\n alertDialog.setTitle(\"CyanMobile Warning!\");\n alertDialog.setMessage(\"Enable Pie Menu App Toggle to use this!\");\n alertDialog.setButton(DialogInterface.BUTTON_POSITIVE,\n getResources().getString(com.android.internal.R.string.ok),\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n updateValues();\n return;\n }\n });\n \n alertDialog.show();\n }", "public void showOptions() {\n this.popupWindow.showAtLocation(this.layout, 17, 0, 0);\n this.customview.findViewById(R.id.dialog).setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n DiscussionActivity.this.popupWindow.dismiss();\n }\n });\n this.pdf.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n DiscussionActivity discussionActivity = DiscussionActivity.this;\n discussionActivity.type = \"pdf\";\n discussionActivity.showPdfChooser();\n DiscussionActivity.this.popupWindow.dismiss();\n }\n });\n this.img.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n DiscussionActivity discussionActivity = DiscussionActivity.this;\n discussionActivity.type = ContentTypes.EXTENSION_JPG_1;\n discussionActivity.showImageChooser();\n DiscussionActivity.this.popupWindow.dismiss();\n }\n });\n this.cancel.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n DiscussionActivity.this.popupWindow.dismiss();\n }\n });\n }", "@Override\n public void onClick(View v) {\n repeat = \"\";\n if(groupName_array.length == 0){//如果沒有group\n title = \"您還沒有加入任何群組\";\n }else{\n title = \"選擇群組\";\n }\n new AlertDialog.Builder(editBeacon.this)\n .setTitle(title)\n .setMultiChoiceItems(\n groupName_array,\n group_select,\n new DialogInterface.OnMultiChoiceClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which, boolean isChecked) {\n // TODO Auto-generated method stub\n\n }\n })\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // TODO Auto-generated method stub\n\n horizontalList_group=new ArrayList<>();//初始化\n\n for (int i = 0; i < group_select.length; i++) {\n if (group_select[i]) { //如果選擇的是true(被勾選)\n groupIdSelect.append(Integer.toString(groupId_array[i])).append(\",\");\n //連接stringbuffer eventIdSelect(這是一段傳給Php的stringbuffer) }\n horizontalList_group.add(groupName_array[i]);\n\n }\n }\n\n horizontalAdapter_group=new HorizontalAdapter(horizontalList_group);\n LinearLayoutManager horizontalLayoutManagaer\n = new LinearLayoutManager(editBeacon.this, LinearLayoutManager.HORIZONTAL, false);\n horizontal_recycler_view_group.setLayoutManager(horizontalLayoutManagaer);\n horizontal_recycler_view_group.setAdapter(horizontalAdapter_group);\n\n\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // TODO Auto-generated method stub\n\n }\n }).show();\n\n\n }", "private void showDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n\n// 2. Chain together various setter methods to set the dialog characteristics\n builder.setMessage(\"Click the right dismiss button\")\n .setTitle(\"Do you hear, it? Isn't it great?\");\n\n\n builder.setPositiveButton(\"Left\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n audioServiceBinder.stopAudio();\n String deviceId = mDurationTimeEditText.getText().toString();\n new MyTurnIsOver().execute(deviceId);\n }\n });\n builder.setNegativeButton(\"Right\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n showDialog();\n }\n });\n\n// 3. Get the <code><a href=\"/reference/android/app/AlertDialog.html\">AlertDialog</a></code> from <code><a href=\"/reference/android/app/AlertDialog.Builder.html#create()\">create()</a></code>\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(getArguments().getString(\"title\"))\n .setMessage(getArguments().getString(\"message\"))\n .setCancelable(false)\n .setPositiveButton(R.string.OK, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // FIRE ZE MISSILES!\n // call callback method\n // mListener.onInfoDialogOKClick(InfoDialog.this);\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public void alertDialogBasico() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n\r\n // 2. Encadenar varios métodos setter para ajustar las características del diálogo\r\n builder.setMessage(R.string.dialog_message);\r\n\r\n\r\n builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n\r\n }\r\n });\r\n\r\n\r\n builder.show();\r\n\r\n }", "public void showCustomDialog() {\n ViewGroup viewGroup = root.findViewById(((ViewGroup)getView().getParent()).getId());\n\n //then we will inflate the custom alert dialog xml that we created\n final View dialogView = LayoutInflater.from(getContext()).inflate(R.layout.change_icon_dialogue_box, viewGroup, false);\n\n\n\n Button close=(Button)dialogView.findViewById(R.id.buttonOk);\n\n\n\n //Now we need an AlertDialog.Builder object\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n\n //setting the view of the builder to our custom view that we already inflated\n builder.setView(dialogView);\n\n //finally creating the alert dialog and displaying it\n final AlertDialog alertDialog = builder.create();\n alertDialog.show();\n close.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n alertDialog.cancel();\n }\n });\n\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(\"Limite mensal excedido! Na versão gratuita, o limite máximo de publicação de caronas mensais é 4 (quatro), atualize para a versão Pro e tenha publicações ilimitadas...\")\n .setPositiveButton(\"Ir\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n String url = \"https://play.google.com/store/apps/details?id=com.xetelas.nova\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n getContext().startActivity(i);\n }\n })\n .setNegativeButton(\"Voltar\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n public void onClick(View v) {\n DialogFragment fragment = ExpandedImageDialogFragment.newInstance(note);\n fragment.show(mActivity.getFragmentManager(), \"expandedimagefragment\");\n }", "private void openPopupMold(final int position, String start_dt, String end_dt, final String KEY) {\n final Dialog dialog = new Dialog(CompositeActivity.this, R.style.Theme_AppCompat_DayNight_Dialog_Alert);\n View dialogView;\n\n if (KEY.equals(\"WK\")) {\n dialogView = LayoutInflater.from(CompositeActivity.this).inflate(R.layout.change_worker, null);\n dialog.setCancelable(false);\n dialog.setContentView(dialogView);\n StaffType = dialog.findViewById(R.id.StaffType);\n StaffType.setText(compositeMasterArrayList.get(position).getStaffTp());\n dialog.findViewById(R.id.rll2).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n popupWorker(StaffType);\n }\n });\n\n\n } else {\n dialogView = LayoutInflater.from(CompositeActivity.this).inflate(R.layout.change_mold, null);\n dialog.setCancelable(false);\n dialog.setContentView(dialogView);\n }\n\n final TextView ngaystart, giostart, Used;\n ngaystart = dialog.findViewById(R.id.ngaystart);\n giostart = dialog.findViewById(R.id.giostart);\n\n final TextView ngayend, gioend;\n ngayend = dialog.findViewById(R.id.ngayend);\n gioend = dialog.findViewById(R.id.gioend);\n Used = dialog.findViewById(R.id.Used);\n tvid = dialog.findViewById(R.id.tvid);\n tvid.setText(compositeMasterArrayList.get(position).getCode());\n\n if (compositeMasterArrayList.get(position).getUseYn().equals(\"Y\")) {\n Used.setText(\"USE\");\n } else {\n Used.setText(\"UNUSE\");\n }\n dialog.findViewById(R.id.im1).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n openCameraScan();\n }\n });\n\n dialog.findViewById(R.id.confirm).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (tvid.getText().toString().length() != 0) {\n //so sanh 2 ngay duoc chon\n Date dsend = new Date();\n Date dstart = new Date();\n\n try {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n dstart = sdf.parse(ngaystart.getText().toString() + \" \" + giostart.getText().toString());\n dsend = sdf.parse(ngayend.getText().toString() + \" \" + gioend.getText().toString());\n\n } catch (ParseException ex) {\n Log.e(\"rrr\", ex.getMessage());\n }\n\n if (dsend.after(dstart)) {\n\n String us = Used.getText().toString();\n String keyus = \"\";\n if (us.equals(\"USE\")) {\n keyus = \"Y\";\n } else {\n keyus = \"N\";\n }\n if (KEY.equals(\"WK\")) {\n showDialog();\n modifyProcessMachineWK(KEY,compositeMasterArrayList.get(position).getPmId(),keyus,ngaystart.getText().toString() + \" \" + giostart.getText().toString(),ngayend.getText().toString() + \" \" + gioend.getText().toString());\n } else {\n showDialog();\n modifyProcessMachine(KEY,compositeMasterArrayList.get(position).getPmId(),keyus,ngaystart.getText().toString() + \" \" + giostart.getText().toString(),ngayend.getText().toString() + \" \" + gioend.getText().toString());\n }\n\n } else {\n AlertError.alertError(\"Start day was bigger than end day. That is wrong\", CompositeActivity.this);\n }\n\n } else {\n tvid.setError(\"Please input here!\");\n }\n\n }\n });\n\n dialog.findViewById(R.id.rl2).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n openPpUse(Used);\n }\n });\n\n final String yy, MM, dd, hh, mm, ss, yye, MMe, dde, hhe, mme, sse;\n if (start_dt.length() == 19) {\n yy = start_dt.substring(0, 4);\n MM = start_dt.substring(5, 7);\n dd = start_dt.substring(8, 10);\n hh = start_dt.substring(11, 13);\n mm = start_dt.substring(14, 16);\n ss = start_dt.substring(17, 19);\n } else {\n AlertError.alertError(\"Format date incorrect.\", CompositeActivity.this);\n return;\n }\n if (end_dt.length() == 19) {\n yye = end_dt.substring(0, 4);\n MMe = end_dt.substring(5, 7);\n dde = end_dt.substring(8, 10);\n hhe = end_dt.substring(11, 13);\n mme = end_dt.substring(14, 16);\n sse = end_dt.substring(17, 19);\n } else {\n AlertError.alertError(\"Format date incorrect.\", CompositeActivity.this);\n return;\n }\n ngaystart.setText(yy + \"-\" + MM + \"-\" + dd);\n ngayend.setText(yye + \"-\" + MMe + \"-\" + dde);\n giostart.setText(hh + \":\" + mm + \":\" + ss);\n gioend.setText(hhe + \":\" + mme + \":\" + sse);\n\n ngaystart.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialogDay(ngaystart);\n }\n });\n giostart.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialogHour(giostart, hh, mm);\n }\n });\n ngayend.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialogDay(ngayend);\n }\n });\n gioend.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialogHour(gioend, hhe, mme);\n }\n });\n\n dialog.findViewById(R.id.btclose).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n dialog.cancel();\n }\n });\n\n dialog.show();\n }", "public BaseDialog create()\n {\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n // instantiate the dialog with the custom Theme\n final BaseDialog dialog = new BaseDialog(context, R.style.Dialog);\n\n View layout = inflater.inflate(R.layout.view_shared_basedialog, null);\n\n //set the dialog's image\n this.icon = (ImageView) layout.findViewById(R.id.view_shared_basedialog_icon);\n\n if (this.imageResource > 0 || this.imageUrl != null)\n {\n this.icon.setVisibility(View.VISIBLE);\n if (this.imageResource > 0)\n {\n this.icon.setBackgroundResource(this.imageResource);\n }\n else\n {\n// TextureRender.getInstance().setBitmap(this.imageUrl, this.icon, R.drawable.no_data_error_image);\n }\n }\n else\n {\n this.icon.setVisibility(View.GONE);\n }\n\n // set check box's text and default value\n this.checkLayout = layout.findViewById(R.id.view_shared_basedialog_checkbox_layout);\n this.checkBox = (CheckBox) layout.findViewById(R.id.view_shared_basedialog_checkbox);\n this.checkBoxTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_checkbox_text);\n\n if (!TextUtils.isEmpty(this.checkBoxText))\n {\n this.checkLayout.setVisibility(View.VISIBLE);\n this.checkBoxTextView.setText(this.checkBoxText);\n this.checkBox.setChecked(checkBoxDefaultState);\n }\n else\n {\n this.checkLayout.setVisibility(View.GONE);\n }\n\n // set the dialog main title and sub title\n this.maintitleTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_maintitle_textview);\n this.subtitleTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_subtitle_textview);\n this.titleDivideTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_titledivide_textview);\n if (!TextUtils.isEmpty(title1))\n {\n this.maintitleTextView.setText(title1);\n if (this.title1BoldAndBig)\n {\n this.maintitleTextView.setTypeface(null, Typeface.BOLD);\n this.maintitleTextView.setTextSize(17);\n }\n\n this.maintitleTextView.setVisibility(View.VISIBLE);\n }\n else\n {\n this.maintitleTextView.setVisibility(View.GONE);\n }\n\n if (!TextUtils.isEmpty(title2))\n {\n this.subtitleTextView.setText(title2);\n this.subtitleTextView.setVisibility(View.VISIBLE);\n }\n else\n {\n this.subtitleTextView.setVisibility(View.GONE);\n }\n this.titleDivideTextView.setVisibility(View.GONE);\n\n // set the confirm button\n this.positiveButton = ((Button) layout.findViewById(R.id.view_shared_basedialog_positivebutton));\n if (!TextUtils.isEmpty(positiveButtonText))\n {\n this.positiveButton.setText(positiveButtonText);\n this.positiveButton.setVisibility(View.VISIBLE);\n if (positiveButtonClickListener != null)\n {\n this.positiveButton.setOnClickListener(new View.OnClickListener()\n {\n public void onClick(View v)\n {\n positiveButtonClickListener.onClick(dialog, DialogInterface.BUTTON_POSITIVE);\n if (checkBox.isChecked()&&onCheckBoxListener!=null)\n {\n onCheckBoxListener.checkedOperation();\n }\n }\n });\n }\n }\n else\n {\n // if no confirm button just set the visibility to GONE\n this.positiveButton.setVisibility(View.GONE);\n }\n\n // set the cancel button\n this.negativeButton = ((Button) layout.findViewById(R.id.view_shared_basedialog_negativebutton));\n if (!TextUtils.isEmpty(negativeButtonText))\n {\n this.negativeButton.setText(negativeButtonText);\n this.negativeButton.setVisibility(View.VISIBLE);\n if (negativeButtonClickListener != null)\n {\n this.negativeButton.setOnClickListener(new View.OnClickListener()\n {\n public void onClick(View v)\n {\n negativeButtonClickListener.onClick(dialog, DialogInterface.BUTTON_NEGATIVE);\n }\n });\n }\n }\n else\n {\n // if no confirm button just set the visibility to GONE\n this.negativeButton.setVisibility(View.GONE);\n }\n\n // set button's background\n this.buttonDivideTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_buttondivide_textview);\n if (!TextUtils.isEmpty(negativeButtonText) && !TextUtils.isEmpty(negativeButtonText))\n {\n this.buttonDivideTextView.setVisibility(View.VISIBLE);\n this.positiveButton.setBackgroundResource(R.drawable.view_shared_corner_round_rightbottom);\n this.negativeButton.setBackgroundResource(R.drawable.view_shared_corner_round_leftbottom);\n }\n else\n {\n this.buttonDivideTextView.setVisibility(View.GONE);\n this.positiveButton.setBackgroundResource(R.drawable.view_shared_corner_round_bottom);\n this.negativeButton.setBackgroundResource(R.drawable.view_shared_corner_round_bottom);\n }\n\n // set the content message\n this.contentLayout = layout.findViewById(R.id.view_shared_basedialog_content_layout);\n if (!TextUtils.isEmpty(message))\n {\n this.contentTextView = ((TextView) layout.findViewById(R.id.view_shared_basedialog_content_textview));\n this.contentTextView.setText(message);\n this.contentTextView.setMovementMethod(ScrollingMovementMethod.getInstance());\n }\n else if (contentView != null)\n {\n // if no message set\n // add the contentView to the dialog body\n ((ViewGroup) this.contentLayout).removeAllViews();\n ((ViewGroup) this.contentLayout).addView(contentView, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));\n }\n else\n {\n this.contentLayout.setVisibility(View.GONE);\n }\n\n int[] params = Utils.getLayoutParamsForHeroImage();\n dialog.setContentView(layout, new ViewGroup.LayoutParams(params[0]*4/5, ViewGroup.LayoutParams.MATCH_PARENT));\n return dialog;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootview= inflater.inflate(R.layout.fragment_new_group, container, false);\n backArrow=rootview.findViewById(R.id.backArrow);\n createButton=rootview.findViewById(R.id.createButton);\n\n backArrow.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n MyGroupsFragment myGroupsFragment=new MyGroupsFragment();\n FragmentManager fragmentManager = getActivity().getSupportFragmentManager();\n FragmentTransaction fragmentTransaction=fragmentManager.beginTransaction();\n fragmentTransaction.replace(R.id.myGroupsPlaceHolder, myGroupsFragment);\n fragmentTransaction.addToBackStack(null);\n fragmentTransaction.commit();\n }\n });\n\n createButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n final Dialog dialog = new Dialog(getContext());\n dialog.setContentView(R.layout.alert_dailogbox);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n\n TextView alertDailogTitle = (TextView) dialog.findViewById(R.id.alertDailogTitle);\n alertDailogTitle.setText(getText(R.string.success));\n\n TextView alertDailogMessage = (TextView) dialog.findViewById(R.id.alertDailogDescription);\n alertDailogMessage.setText(getText(R.string.feedback_success));\n\n FloatingActionButton doneButton = (FloatingActionButton) dialog.findViewById(R.id.done_button);\n doneButton.setBackgroundTintList(ColorStateList.valueOf(Color\n .parseColor(\"#32BDD2\")));\n doneButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n MyGroupsFragment myGroupsFragment=new MyGroupsFragment();\n FragmentManager fragmentManager=getFragmentManager();\n FragmentTransaction fragmentTransaction=fragmentManager.beginTransaction();\n fragmentTransaction.replace(R.id.myGroupsPlaceHolder,myGroupsFragment);\n fragmentTransaction.addToBackStack(null);\n fragmentTransaction.commit();\n }\n });\n\n dialog.show();\n }\n });\n return rootview;\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n//mneu ininializacia\n\n initFabMenu();\n // activity1.setContentView(R.layout.hashiv_list_item);//kpcnum enq razmetkain(maketin)\n\n//------------------\n txt_player1 = findViewById(R.id.txt_player1);\n txt_player2 = findViewById(R.id.txt_player2);\n txt_player3 = findViewById(R.id.txt_player3);\n txt_player4 = findViewById(R.id.txt_player4);\n\n igrok1_D = findViewById(R.id.igrok1_D);\n igrok2_D = findViewById(R.id.igrok2_D);\n igrok3_D = findViewById(R.id.igrok3_D);\n igrok4_D = findViewById(R.id.igrok4_D);\n//--------------------------------------------------------------------------\n //anjatum enq dileri D tarern userneri anunneri motic\n igrok2_D.setVisibility(View.INVISIBLE);\n igrok3_D.setVisibility(View.INVISIBLE);\n igrok4_D.setVisibility(View.INVISIBLE);\n\n resultLayout = findViewById(R.id.ResultLayout);\n // createNewLineHashiv();\n//_____________________________________________________________________\n//__________________________ Diler dialog _____________________________\n dialog_diler = new Dialog(this);//stexcum enq dialog\n dialog_diler.requestWindowFeature(Window.FEATURE_NO_TITLE);//anjatum enq vernagirn\n dialog_diler.setContentView(R.layout.xaxacoxneri_anunner);//kpcnum enq razmetkain(maketin)\n\n\n dialog_newGame = new Dialog(this);//stexcum enq dialog\n dialog_newGame.requestWindowFeature(Window.FEATURE_NO_TITLE);//anjatum enq vernagirn\n dialog_newGame.setContentView(R.layout.new_game_dialog);//kpcnum enq razmetkain(maketin)\n\n //dialog-i foni hetevn lini tapancik\n // dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n//asum enq dialogi mej inch ka et chaperov el lini dilaogn\n// dialog.getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT,\n// WindowManager.LayoutParams.MATCH_PARENT);\n// dialog.setCancelable(false);//nazad knopkan anjatum enq\n\n//ays toxn anhrajesht e vorpeszi verevi aj ankyuni pakman x-n normal dur ekac ereva\n dialog_diler.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n\n\n//-----------------\n imgeViw_close_diler_dialog = dialog_diler.findViewById(R.id.ImgeViw_closeX);\n imgBtn_Ok = dialog_diler.findViewById(R.id.imgBtn_Ok);\n edtTxt_igrok1 = dialog_diler.findViewById(R.id.edtTxt_igrok1);\n edtTxt_igrok2 = dialog_diler.findViewById(R.id.edtTxt_igrok2);\n edtTxt_igrok3 = dialog_diler.findViewById(R.id.edtTxt_igrok3);\n edtTxt_igrok4 = dialog_diler.findViewById(R.id.edtTxt_igrok4);\n//---------------\n//ays toxn anhrajesht e vorpeszi verevi aj ankyuni pakman x-n normal dur ekac ereva\n dialog_newGame.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n\n imgeViw_close_diler_newGame = dialog_newGame.findViewById(R.id.ImgeViw_closeX);\n imgBtn_Ok_newGame = dialog_newGame.findViewById(R.id.imgBtn_Ok);\n//_____________________________________________________________________\n newGame();\n //hashivneri zangvavnern enq inicializacnum\n hashiv_Zangvac_kom1 = new ArrayList<>();\n hashiv_Zangvac_kom2 = new ArrayList<>();\n\n//------------------------------ RecyvleView --------------------------\n// mer stexcac klas-i ekzemplyar enq stexcum\n recyclerViewItem_ArrayList = new ArrayList<>();\n recyclerView = findViewById(R.id.recyclerView_hashiv);\n//arajin toxn enq stanum hashivneri\n recyclerViewItem_ArrayList.add(new RecyclerViewItem(0, null));\n recyclerViewItem_ArrayList.add(new RecyclerViewItem(0, null));\n recyclerViewItem_ArrayList.add(new RecyclerViewItem(0, \"0\"));\n\n // ays toxn petq e vor RecyclerView-n amboxj arraylistn chatni hishoxutyun ayl mi\n// masn, vor heraxosn chkaxi, tvyal depqum asum enq vor fiqsac size- uni\n recyclerView.setHasFixedSize(true);\n//adapteri inicializaci enq anum, vorin talis enq mer koxmic sarqac arrayList` recyclerViewItem-n\n adapter = new RecyclerViewAdapter(recyclerViewItem_ArrayList,\n MainActivity.this);\n//aysex layouti pahern e, karevor che\n layoutManager = new LinearLayoutManager(this);\n//inicializaciaic heto LayoutManager-n u adapter-n texadrum enq mer recyclerView hamar\n recyclerView.setAdapter(adapter);\n//nuyn elementic 3 hat-ov mi toxi vra, GridLayoutManager-axyusaki tesqov\n recyclerView.setLayoutManager(new GridLayoutManager(this, 3));\n// recyclerView.setLayoutManager(layoutManager);\n//_____________________________________________________________________\n//_____________________________________________________________________\n//----------------------------DB -RecyvleView Strart-------------------\n// recyclerView_hashiv = findViewById(R.id.recyclerView_hashiv);\n\n//----------------------------------------DB-------------------------------------------------\n//----------------------------------@ndamen@ ays toxov db linum e----------------------------\n//-----------------------------------------------------------------------------------------\n//inicializacia enq anum mer koxmic sarqac clasi ekzempliar\n//talis enq mer koxmic sarqac clasn CarsAppDatabase, ev talis enq voch db-in anun`\n// \"CarsDB\", voch te mek table-i\n// hashivsAppDatabase = Room.databaseBuilder(getApplicationContext(),\n// HashivAppDatabase.class, \"CarsDB\")\n// .build();\n////-----------------------------------------------------------------------------------------\n////-----------------------------------------------------------------------------------------\n////-----------------------------------------------------------------------------------------\n////-----------------------------------------------------------------------------------------\n////stexcum enq nor objekt` mer nerqim ev private clasi, arajin dimumn e mer kodum background\n//// potokin (AsyncTask), vortex stanum enq bolor tvyalnern db-ic ev cuyc talis ekranin\n// new GetAllHashivnerAsyncTask().execute();\n////-----------------------------------------------------------------------------\n// hashivnerAdapter = new HashivAdapter(this, hashivArrayList, MainActivity.this);\n// RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());\n// recyclerView_hashiv.setLayoutManager(mLayoutManager);\n// recyclerView_hashiv.setItemAnimator(new DefaultItemAnimator());\n// recyclerView_hashiv.setAdapter(hashivnerAdapter);\n////----------------------------DB -RecyvleView End----------------------\n////_____________________________________________________________________\n////-----------------------------------------------------\n////--------------------------------------------------------------------------\n// }\n// //-------------------------------------------------------------------------------------------\n////-----------------------------------------------------------------------------------------\n////-----------------------ays metodum e texi unenum AlertDialog-i mijocov add, edit ev\n//// delete-i realizacian\n// public void addAndEditHashiv(final boolean isUpdate, final BloteNote bloteNote, final int position){\n// LayoutInflater layoutInflaterAndroid = LayoutInflater.from(getApplicationContext());\n////layout_add_car.xml-i 1-textview-n ev 2 EditText-ern darnalu en dialogBox-i razmetken\n// View view = layoutInflaterAndroid.inflate(R.layout.layout_add_car, null);\n//\n// AlertDialog.Builder alertDialogBuilderUserInput = new AlertDialog.Builder(MainActivity.this);\n// alertDialogBuilderUserInput.setView(view);\n//\n//\n// // createCar(nameEditText.getText().toString(), priceEditText.getText().toString());\n//\n//\n// TextView newCarTitle = view.findViewById(R.id.newCarTitle);\n// final EditText nameEditText = view.findViewById(R.id.nameEditText);\n// final EditText priceEditText = view.findViewById(R.id.priceEditText);\n////vernagri @ntrutyun te vorn e linleu vernagirn\n// newCarTitle.setText(!isUpdate ? \"Add Car\" : \"Edit Car\");\n////-----------------------------------------------------------------\n// if (isUpdate && bloteNote != null) {\n// nameEditText.setText(bloteNote.getKom2());\n// priceEditText.setText(bloteNote.getKom2());\n// }\n//\n// alertDialogBuilderUserInput\n// .setCancelable(false)\n// .setPositiveButton(isUpdate ? \"Update\" : \"Save\", new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialogBox, int id) {\n//\n// }\n// })//negativ button-i sexman realizacian\n// .setNegativeButton(isUpdate ? \"Delete\" : \"Cancel\",\n// new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialogBox, int id) {\n// //kam jnjel\n// if (isUpdate) {\n//\n// deleteHashiv(bloteNote, position);\n// } else {\n// //dialogBox-n cancel anel\n// dialogBox.cancel();\n//\n// }\n//\n// }\n// });\n//\n////kanchum ev cuyc enq talis alertDialog-n\n// final AlertDialog alertDialog = alertDialogBuilderUserInput.create();\n// alertDialog.show();\n////et alertDialog-i positiv knokpan e sexmvel\n// alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(new View.OnClickListener() {\n// @Override//positiv knopkai sexman realizacian\n// public void onClick(View v) {\n////ete datark e nameEditText-n\n// if (TextUtils.isEmpty(nameEditText.getText().toString())) {\n// Toast.makeText(MainActivity.this, \"Enter bloteNote name!\", Toast.LENGTH_SHORT).show();\n// return;\n////ete datark e priceEditText-n\n// } else if (TextUtils.isEmpty(priceEditText.getText().toString())) {\n// Toast.makeText(MainActivity.this, \"Enter bloteNote price!\", Toast.LENGTH_SHORT).show();\n// return;\n// } else { //h.d. pakel dialogn\n// alertDialog.dismiss();\n// }\n// //---\n////voroshum e updateCar() in te createCar() kanchi\n// if (isUpdate && bloteNote != null) {\n//\n// updateHashiv(nameEditText.getText().toString(), priceEditText.getText().toString(), position);\n// } else {\n// createHashiv(nameEditText.getText().toString(), priceEditText.getText().toString(), position);\n//// createHashiv(nameEditText.getText().toString(), priceEditText.getText().toString());\n// }\n// }\n// });\n// }\n// //------------------------------------------------------------------------------------------\n// private void deleteHashiv(BloteNote bloteNote, int position){\n//\n// hashivArrayList.remove(position);\n//\n// new DeleteHashivAsyncTask().execute(bloteNote);\n//\n// }\n//\n// private void updateHashiv(String kom1, String kom2, int position){\n//\n// BloteNote bloteNote = hashivArrayList.get(position);\n//\n// bloteNote.setKom1(kom1);\n// bloteNote.setKom2(kom2);\n//\n// new UpdateHashivAsyncTask().execute(bloteNote);\n//\n// hashivArrayList.set(position, bloteNote);\n//\n//\n// }\n// //-------------------------------stecxel nor tox db-i table-um---------------------------\n//// private void createHashiv(String kom1, String kom2){\n// private void createHashiv(String kom1, String kom2, int position){\n//\n////kanchum enq (zugaher patokum ashxatox) CreateCarAsyncTask clasin, vorin talis enq\n//// nor stexcac BlotNote clasi ekzempliar, id chenq poxancum (ayn avtomat e), miayn name ev price\n// new CreateHashivAsyncTask().execute(new BloteNote(0, kom1, kom2, \"0\"));\n//\n// }\n// //---------------------------------------------------------------------------------\n////---------------------------------------------------------------------------------\n////---------------------- background potoki realizacia -----------------------------\n//// stexcum enq mer nerqin clas, vorn jarangum e AsyncTask-ic, vorn voch mi parametr chi\n//// veradarcnum (<Void, Void, Void> <Params, Progress, Result>) ete petq lini xaxerum, ays\n//// 3 -ov karox enq Userin cuyc tal progressbari mijocov progrress-n talov, kam verjum result-i\n//// mijocov ardyunq cuyc talov.\n//// ayn kanchvum e onCreate()-metodum\n// private class GetAllHashivnerAsyncTask extends AsyncTask<Void, Void, Void> {\n//\n// // zugaher potoki (background potokum) anhrajesht amboxch gorcoxutyunn texi e unenum ays metodum\n// @Override\n// protected Void doInBackground(Void... voids) {\n////zugaher potokum amboxch infon kardum enq db-ic ev pahum arrayList-i mej\n// hashivArrayList.addAll(hashivsAppDatabase.getHashivDAO().getAllHashivner());\n// return null;\n// }\n//\n// //sa AsyncTask-i verjin result metodn e, vorn kanchvum e doInBackground-ic heto,\n//// men use ayn nra hamar, qani vor mez anhrajesht e db-i het avarteluc heto miayn infon\n//// artacel recicleView view-i vra\n// @Override\n// protected void onPostExecute(Void aVoid) {\n// super.onPostExecute(aVoid);\n////asum enq adapterin vor texi e unecel tvyalneri popoxutyun vorpeszi\n//// recicleView view-n obnovlyatca lini\n// hashivnerAdapter.notifyDataSetChanged();\n// }\n// }\n//\n// //-----------------------------------------------------------------------------\n////---------------------- background potoki realizacia nor tvyal db-um grelu jamanak,\n//// vortex potokin tlis enq mutqayin tvyal car tipi clasi ekzempliar,\n//// ays clasn kanchvum e CreateCar() metodum\n// private class CreateHashivAsyncTask extends AsyncTask<BloteNote, Void, Void> {\n//\n//\n// @Override\n// protected Void doInBackground(BloteNote... blot_hashiv) {\n//// HashivAdapter\n// // final BloteNote bloteNote = blot_hashiv.get(position);\n//\n// long id = hashivsAppDatabase.getHashivDAO().addHashiv(\n// blot_hashiv[0] );\n//\n// BloteNote blotHashiv = hashivsAppDatabase.getHashivDAO().getHashiv(id);\n//\n// if (blotHashiv != null) {\n//\n// hashivArrayList.add(0, blotHashiv);\n//\n//\n// }\n// return null;\n// }\n////sa AsyncTask-i verjin result metodn e, vorn kanchvum e doInBackground-ic heto,\n//// men use ayn nra hamar, qani vor mez anhrajesht e db-i het avarteluc heto miayn infon\n//// artacel recicleView view-i vra\n// @Override\n// protected void onPostExecute(Void aVoid) {\n// super.onPostExecute(aVoid);\n////asum enq adapterin vor texi e unecel tvyalneri popoxutyun vorpeszi\n//// recicleView view-n obnovlyatca lini\n// hashivnerAdapter.notifyDataSetChanged();\n// }\n// }\n// //nmanakerp tes verevi clasneri komentn\n////---------------------------------------------------------------------------------------\n// private class UpdateHashivAsyncTask extends AsyncTask<BloteNote, Void, Void> {\n//\n// @Override\n// protected void onPostExecute(Void aVoid) {\n// super.onPostExecute(aVoid);\n//\n// hashivnerAdapter.notifyDataSetChanged();\n// }\n// //sa AsyncTask-i verjin result metodn e, vorn kanchvum e doInBackground-ic heto,\n//// men use ayn nra hamar, qani vor mez anhrajesht e db-i het avarteluc heto miayn infon\n//// artacel recicleView view-i vra\n// @Override\n// protected Void doInBackground(BloteNote... blot_hashiv) {\n////asum enq adapterin vor texi e unecel tvyalneri popoxutyun vorpeszi\n//// recicleView view-n obnovlyatca lini\n// hashivsAppDatabase.getHashivDAO().updateHashiv(blot_hashiv[0]);\n//\n// return null;\n// }\n// }\n// //nmanakerp tes verevi clasneri komentn\n////----------------------------------------------------------------------------------\n// private class DeleteHashivAsyncTask extends AsyncTask<BloteNote, Void, Void> {\n//\n// @Override\n// protected void onPostExecute(Void aVoid) {\n// super.onPostExecute(aVoid);\n//\n// hashivnerAdapter.notifyDataSetChanged();\n// }\n////sa AsyncTask-i verjin result metodn e, vorn kanchvum e doInBackground-ic heto,\n//// men use ayn nra hamar, qani vor mez anhrajesht e db-i het avarteluc heto miayn infon\n//// artacel recicleView view-i vra\n// @Override\n// protected Void doInBackground(BloteNote... blot_hashiv) {\n////asum enq adapterin vor texi e unecel tvyalneri popoxutyun vorpeszi\n//// recicleView view-n obnovlyatca lini\n// hashivsAppDatabase.getHashivDAO().deleteHashiv(blot_hashiv[0]);\n//\n// return null;\n// }\n//-------------------------------------------------------------------------\n//-------------------------------------------------------------------------\n//--------------------- listView-i realizacnum enq onClick-n -------------------------\n\n// recyclerView.setOnClickListener(new View.OnClickListener(){\n// @Override\n// public void onClick(View v) {\n// Car car = carArrayList.get(position);\n//\n// car.setName(name);\n// car.setPrice(price);\n//\n//\n// carArrayList.set(position, car);\n// }\n\n// @Override\n// public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n// //------------------------------------- Toast ----------------------------------------------\n// parent.setVisibility(view.GONE);//listview-i visibility- false enq anum\n//// // listView-i yuraqanchyur dashtn mek view-e\n// view.setVisibility(view.GONE);//click-i t darcnum enq antesaneli view-eric mekn\n//\n// }\n// });\n// listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n// @Override\n// public void onItemClick(AdapterView<?> parent, View view, int position, long id)\n// {\n//// parent.setVisibility(view.GONE);//listview-i visibility- false enq anum\n// // listView-i yuraqanchyur dashtn mek view-e\n//// view.setVisibility(view.GONE);//click-i t darcnum enq antesaneli view-eric mekn\n////------------------------------------------------------------------------------------------\n////------------------------------------- Toast ----------------------------------------------\n// Toast.makeText(MainActivity.this, \"duq sexmel eq:\"+ position+\" toxin\",\n// Toast.LENGTH_SHORT).show();\n// }\n// });\n//\n }", "@RequiresApi(api = Build.VERSION_CODES.N)\n @Override\n public void onClick(View view) {\n Dialog cameraOrGallery = Utils.getBasicDialog(PrescriptionActivity.this, R.layout.dialog_camera_or_gallery);\n cameraOrGallery.getWindow().setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n cameraOrGallery.getWindow().setBackgroundDrawable(ContextCompat.getDrawable(PrescriptionActivity.this, R.drawable.rounded_corners));\n cameraOrGallery.getWindow().setGravity(Gravity.CENTER);\n cameraOrGallery.show();\n\n cameraOrGallery.findViewById(R.id.prescription_use_camera).setOnClickListener(view1 -> {\n // ask for permission\n letUserUseTheCamera();\n // getCameraAccessPermission();\n cameraOrGallery.dismiss();\n\n //upload the image\n //return to activity\n });\n cameraOrGallery.findViewById(R.id.prescription_use_gallery).setOnClickListener(view1 -> {\n letUserChooseImage();\n cameraOrGallery.dismiss();\n });\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(coverPhotoName!=null){\n\t\t\t\t\tDisplayImageOptions options = new DisplayImageOptions.Builder()\n\t\t\t\t\t.showImageOnLoading(R.drawable.ic_stub)\n\t\t\t\t\t.showImageForEmptyUri(R.drawable.ic_empty)\n\t\t\t\t\t.showImageOnFail(R.drawable.ic_error)\n\t\t\t\t\t.cacheInMemory(true)\n\t\t\t\t\t.cacheOnDisk(true)\n\t\t\t\t\t.considerExifParams(true)\n\t\t\t\t\t.displayer(new FadeInBitmapDisplayer(1000))\n\t\t\t\t\t.build();\n\t\t\t\t\tString url = \"http://www1.kitchengardens.in/sites/default/files/\"+coverPhotoName;\n\t\t\t\t\tgetScreenMetrics();\n\t\t\t\t\tImageAlertFragment imageFragment=new ImageAlertFragment(url,options,animateFirstListener,gardenName.split(\" Profile\")[0]+\" Cover Photo\",\"\",screenWidth,screenHeight);\n\t\t\t\t\timageFragment.setCancelable(true);\n\t\t\t\t\timageFragment.show(getFragmentManager(), \"\");\n\t\t\t\t}\n\t\t\t}", "@SuppressWarnings(\"deprecation\")\n\t\tprivate void alertDialog(String msg) \n\t\t{\n\t\t\tAlertDialog alertDialog = new AlertDialog.Builder(LoginScreenActivity.this).create();\n\t alertDialog.setTitle(\"StyleZ\");\n\t alertDialog.setMessage(msg);\n\t alertDialog.setButton(\"OK\", new DialogInterface.OnClickListener() \n\t {\n\t public void onClick(DialogInterface dialog, int which) {\n\t \t\n\t // Write your code here to execute after dialog closed\n\t dialog.dismiss();\n\t \n\t if(strstatus.equals(\"success\"))\n\t {\n\t Intent i=new Intent(LoginScreenActivity.this,StyleZTab.class);\n\t startActivity(i);\n\t finish();\n\t }\n\t else\n\t {\n\t \t imgviewloginon.setVisibility(View.GONE);\n\t imgviewloginoff.setVisibility(View.VISIBLE);\n\t }\n\t }\n\t });\n\t alertDialog.show();\n\t\t}", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n Objects.requireNonNull(getDialog().getWindow())\n .getAttributes().windowAnimations = R.style.DialogAnimation2;\n Objects.requireNonNull(getDialog().getWindow()).setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n }\n View view = inflater.inflate(R.layout.fragment_fragment__levels, container, false);\n msj = view.findViewById(R.id.tv_msj_level_modal);\n msj2 = view.findViewById(R.id.tv_msj_level_modal2);\n Typeface custom_font = Typeface.createFromAsset(getActivity().getAssets(), \"fonts/font.ttf\");\n msj.setTypeface(custom_font);\n msj2.setTypeface(custom_font);\n pp1 = view.findViewById(R.id.iv1pp);\n pp0_5 = view.findViewById(R.id.iv0_5pp);\n ll1 = view.findViewById(R.id.iv1ll);\n ll0_5 = view.findViewById(R.id.iv0_5ll);\n note_button = view.findViewById(R.id.iv2);\n note_image = view.findViewById(R.id.image_skin);\n switch_autoplay = view.findViewById(R.id.switch_autoplay);\n avBar= view.findViewById(R.id.seekBar_av);\n tv_FD=view.findViewById(R.id.tv_fd);\n /*TextView tv1 = view.findViewById(R.id.tvsped);\n TextView tv2 = view.findViewById(R.id.tvsped2);\n TextView tv3 = view.findViewById(R.id.tvsped3);\n TextView tv4 = view.findViewById(R.id.tvsped4);*/\n TextView tv5 = view.findViewById(R.id.title_apear);\n tvRush = view.findViewById(R.id.tvrush);\n tvJudge = view.findViewById(R.id.tv_judge);\n TextView title3 = view.findViewById(R.id.tv_msj_level_modal3);\n title3.setTypeface(custom_font);\n tv5.setTypeface(custom_font);\n //tvRush.setTypeface(custom_font);\n tvJudge.setTypeface(custom_font);\n switch_autoplay.setTypeface(custom_font);\n tvRush.setOnClickListener(v -> {\n ParamsSong.rush += 0.1f;\n if (ParamsSong.rush > 1.5f) {\n ParamsSong.rush = 0.8f;\n }\n songList.playSoundPool(songList.spSelect);\n setTxtRush();\n });\n switch_autoplay.setChecked(ParamsSong.autoplay);\n switch_autoplay.setOnCheckedChangeListener((buttonView, isChecked) -> ParamsSong.autoplay = isChecked);\n tvJudge.setOnClickListener(v -> {\n ParamsSong.judgment = (ParamsSong.judgment + 1) % 7;\n setTxtJudge();\n songList.playSoundPool(songList.spSelect);\n });\n setTxtJudge();\n setTxtRush();\n\n\n pp1.setOnClickListener(v -> {\n velocity += 1;\n changeVelocity();\n songList.playSoundPool(songList.spSelect);\n\n });\n\n pp0_5.setOnClickListener(v -> {\n velocity += 0.5f;\n songList.playSoundPool(songList.spSelect);\n changeVelocity();\n });\n\n ll1 = view.findViewById(R.id.iv1ll);\n ll1.setOnClickListener(v -> {\n velocity -= 1;\n songList.playSoundPool(songList.spSelect);\n changeVelocity();\n });\n ll0_5.setOnClickListener(v -> {\n velocity -= 0.5f;\n songList.playSoundPool(songList.spSelect);\n changeVelocity();\n });\n tv_FD.setOnClickListener(v->{\n ParamsSong.FD=!ParamsSong.FD;\n setFD();\n });\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n skins = NoteSkin.arraySkin(getContext());\n indexNS = ParamsSong.skinIndex;\n setImageNS();\n }\n avBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {\n @Override\n public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n int av=progress*10;\n ParamsSong.av=av;\n if (av==0){\n msj.setText(\"AV OFF\");\n msj2.setText(\"Velocity \" + ParamsSong.speed);\n\n }\n else {\n setAv();\n\n }\n }\n\n @Override\n public void onStartTrackingTouch(SeekBar seekBar) {}\n @Override\n public void onStopTrackingTouch(SeekBar seekBar) { }\n });\n note_button.setOnClickListener(v -> changeNS());\n note_image.setOnClickListener(v -> changeNS());\n\n if (ParamsSong.av>0){\n avBar.setProgress(ParamsSong.av/10);\n setAv();\n }else{\n changeVelocity();}\n setFD();\n return view;\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\n\n\n\n\n\t\t\t/*\ttry\n\t\t\t\t{\n\n\t\t\t\tdbengine.open();\n\t\t\t\tString Noti_textWithMsgServerID=dbengine.fetchNoti_textFromtblNotificationMstr();\n\t\t\t\tdbengine.close();\n\t\t\t\t//System.out.println(\"Sunil Tty Noti_textWithMsgServerID :\"+Noti_textWithMsgServerID);\n\t\t\t\tif(!Noti_textWithMsgServerID.equals(\"Null\"))\n\t\t\t\t{\n\t\t\t\tStringTokenizer token = new StringTokenizer(String.valueOf(Noti_textWithMsgServerID), \"_\");\n\n\t\t\t\tMsgServerID= Integer.parseInt(token.nextToken().trim());\n\t\t\t\tNoti_text= token.nextToken().trim();\n\n\n\t\t\t\tif(Noti_text.equals(\"\") || Noti_text.equals(\"Null\"))\n\t\t\t\t{\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\n\n\n\t\t\t\t\t final AlertDialog builder = new AlertDialog.Builder(ProductOrderEntry.this).create();\n\n\n\t\t\t\t\t\tLayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\t\t\t View openDialog = inflater.inflate(R.layout.custom_dialog, null);\n\t\t\t\t openDialog.setBackgroundColor(Color.parseColor(\"#ffffff\"));\n\n\t\t\t\t builder.setCancelable(false);\n\t\t\t\t \tTextView header_text=(TextView)openDialog. findViewById(R.id.txt_header);\n\t\t\t\t \tfinal TextView msg=(TextView)openDialog. findViewById(R.id.msg);\n\n\t\t\t\t\t\tfinal Button ok_but=(Button)openDialog. findViewById(R.id.but_yes);\n\t\t\t\t\t\tfinal Button cancel=(Button)openDialog. findViewById(R.id.but_no);\n\n\t\t\t\t\t\tcancel.setVisibility(View.GONE);\n\t\t\t\t\t header_text.setText(ProductOrderEntry.this.getResources().getString(R.string.AlertDialogHeaderMsg));\n\t\t\t\t\t msg.setText(Noti_text);\n\n\t\t\t\t\t \tok_but.setText(ProductOrderEntry.this.getResources().getString(R.string.AlertDialogOkButton));\n\n\t\t\t\t\t\t\tbuilder.setView(openDialog,0,0,0,0);\n\n\t\t\t\t\t ok_but.setOnClickListener(new OnClickListener()\n\t\t\t\t\t {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View arg0)\n\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\tlong syncTIMESTAMP = System.currentTimeMillis();\n\t\t\t\t\t\t\t\t\tDate dateobj = new Date(syncTIMESTAMP);\n\t\t\t\t\t\t\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd-MM-yyyy HH:mm:ss\",Locale.ENGLISH);\n\t\t\t\t\t\t\t\t\tString Noti_ReadDateTime = df.format(dateobj);\n\n\t\t\t\t\t\t\t\t\tdbengine.open();\n\t\t\t\t\t\t\t\t\tdbengine.updatetblNotificationMstr(MsgServerID,Noti_text,0,Noti_ReadDateTime,3);\n\t\t\t\t\t\t\t\t\tdbengine.close();\n\n\t\t\t\t\t\t\t\t\ttry\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tdbengine.open();\n\t\t\t\t\t\t\t\t\t int checkleftNoti=dbengine.countNumberOFNotificationtblNotificationMstr();\n\t\t\t\t\t\t\t\t\t if(checkleftNoti>0)\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t \tString Noti_textWithMsgServerID=dbengine.fetchNoti_textFromtblNotificationMstr();\n\t\t\t\t\t\t\t\t\t\t\t\t//System.out.println(\"Sunil Tty Noti_textWithMsgServerID :\"+Noti_textWithMsgServerID);\n\t\t\t\t\t\t\t\t\t\t\t\tif(!Noti_textWithMsgServerID.equals(\"Null\"))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tStringTokenizer token = new StringTokenizer(String.valueOf(Noti_textWithMsgServerID), \"_\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tMsgServerID= Integer.parseInt(token.nextToken().trim());\n\t\t\t\t\t\t\t\t\t\t\t\t\tNoti_text= token.nextToken().trim();\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tdbengine.close();\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(Noti_text.equals(\"\") || Noti_text.equals(\"Null\"))\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t msg.setText(Noti_text);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tbuilder.dismiss();\n\t\t\t\t\t\t\t\t\t\t}\n\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\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t finally\n\t\t\t\t\t\t {\n\t\t\t\t\t\t \tdbengine.close();\n\n\t\t\t\t\t\t }\n\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\n\n\n\t\t\t\t\t \tbuilder.show();\n\n\n\n\n\n\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(Exception e)\n\t\t\t\t{\n\n\t\t\t\t}\n*/\n\n\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dialog_genre, container, false);\n\n imageView = (ImageView) view.findViewById(R.id.image_exit);\n imageView1 = (ImageView) view.findViewById(R.id.imageView1);\n imageView2 = (ImageView) view.findViewById(R.id.imageView2);\n imageView3 = (ImageView) view.findViewById(R.id.image_genre);\n imageView4 = (ImageView) view.findViewById(R.id.imageView4);\n imageView5 = (ImageView) view.findViewById(R.id.image_position);\n imageView6 = (ImageView) view.findViewById(R.id.imageView6);\n imageView7 = (ImageView) view.findViewById(R.id.imageView7);\n imageView8 = (ImageView) view.findViewById(R.id.imageView8);\n\n\n\n imageView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dismiss();\n }\n });\n\n\n imageView1.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (mSelectedListener != null) {\n mSelectedListener.onGenreSelected(0);\n }\n dismiss();\n }\n });\n\n imageView2.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (mSelectedListener != null) {\n mSelectedListener.onGenreSelected(1);\n }\n dismiss();\n }\n });\n\n imageView3.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (mSelectedListener != null) {\n mSelectedListener.onGenreSelected(2);\n }\n dismiss();\n }\n });\n\n imageView4.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (mSelectedListener != null) {\n mSelectedListener.onGenreSelected(3);\n }\n dismiss();\n }\n });\n\n imageView5.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (mSelectedListener != null) {\n mSelectedListener.onGenreSelected(4);\n }\n dismiss();\n }\n });\n\n imageView6.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (mSelectedListener != null) {\n mSelectedListener.onGenreSelected(5);\n }\n dismiss();\n }\n });\n\n imageView7.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (mSelectedListener != null) {\n mSelectedListener.onGenreSelected(6);\n }\n dismiss();\n }\n });\n\n imageView8.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (mSelectedListener != null) {\n mSelectedListener.onGenreSelected(7);\n }\n dismiss();\n }\n });\n\n return view;\n }", "@Override\n public void onClick(View view) {\n final Dialog dialog = new Dialog(context);\n dialog.setTitle(\"FIRE ASSISTANCE\");\n dialog.setContentView(R.layout.zdialog_fire);\n\n WindowManager.LayoutParams lp1 = new WindowManager.LayoutParams();\n lp1.copyFrom(dialog.getWindow().getAttributes());\n lp1.width = WindowManager.LayoutParams.MATCH_PARENT;\n lp1.height = WindowManager.LayoutParams.WRAP_CONTENT;\n lp1.gravity = Gravity.CENTER;\n\n dialog.getWindow().setAttributes(lp1);\n\n fire1 = (LinearLayout) dialog.findViewById(R.id.fire1);\n fire2 = (LinearLayout) dialog.findViewById(R.id.fire2);\n fire3 = (LinearLayout) dialog.findViewById(R.id.fire3);\n fire4 = (LinearLayout) dialog.findViewById(R.id.fire4);\n fire5 = (LinearLayout) dialog.findViewById(R.id.fire5);\n fire6 = (LinearLayout) dialog.findViewById(R.id.fire6);\n\n fireRanked1 = (TextView) dialog.findViewById(R.id.fireRank1);\n fireRanked2 = (TextView) dialog.findViewById(R.id.fireRank2);\n fireRanked3 = (TextView) dialog.findViewById(R.id.fireRank3);\n fireRanked4 = (TextView) dialog.findViewById(R.id.fireRank4);\n fireRanked5 = (TextView) dialog.findViewById(R.id.fireRank5);\n fireRanked6 = (TextView) dialog.findViewById(R.id.fireA);\n\n fireRanked1.setText(agencyNameFire[0] + \"\" + statusFire[0]);\n fireRanked2.setText(agencyNameFire[1] + \"\" + statusFire[1]);\n fireRanked3.setText(agencyNameFire[2] + \"\" + statusFire[2]);\n fireRanked4.setText(agencyNameFire[3] + \"\" + statusFire[3]);\n fireRanked5.setText(agencyNameFire[4] + \"\" + statusFire[4]);\n fireRanked6.setText(agencyNameFire[5]);\n\n fire1.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n callDialog(contLandlineFire[0].toString(), contCpFire[0].toString(), regFire[0], \"Fire\");\n\n }\n });\n\n fire2.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n callDialog(contLandlineFire[1].toString(), contCpFire[1].toString(), regFire[1], \"Fire\");\n\n }\n });\n\n fire3.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n callDialog(contLandlineFire[2].toString(), contCpFire[2].toString(), regFire[2], \"Fire\");\n\n }\n });\n\n fire4.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n callDialog(contLandlineFire[3].toString(), contCpFire[3].toString(), regFire[3], \"Fire\");\n\n }\n });\n\n fire5.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n callDialog(contLandlineFire[4].toString(), contCpFire[4].toString(), regFire[4], \"Fire\");\n\n }\n });\n fire6.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n callDialog(contLandlineCrime[5].toString(), contCpCrime[5].toString(), \"L0LucU9RMgOtV1MwVCGUR6oyhy62\", \"Fire\");\n\n }\n });\n\n // set the custom dialog components - text, image and button\n\n dialog.show();\n\n }", "@Override\n public void onClick(View view) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n builder.setTitle(\"Add an item\");\n // I'm using fragment here so I'm using getView() to provide ViewGroup\n // but you can provide here any other instance of ViewGroup from your Fragment / Activity\n View viewInflated = LayoutInflater.from(getContext()).inflate(R.layout.add_post_dialog, (ViewGroup) getView(), false);\n // Set up the input\n final EditText titleText = (EditText) viewInflated.findViewById(R.id.add_post_title);\n final EditText nameText = (EditText) viewInflated.findViewById(R.id.add_post_name);\n final EditText descText = (EditText) viewInflated.findViewById(R.id.add_post_description);\n final EditText priceText = (EditText) viewInflated.findViewById(R.id.add_post_price);\n final Spinner conditionSpinner = (Spinner) viewInflated.findViewById(R.id.add_post_spinner);\n final ImageView imageView = (ImageView) viewInflated.findViewById(R.id.add_post_image);\n\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(getContext(), R.array.conditions_array, R.layout.support_simple_spinner_dropdown_item);\n adapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n conditionSpinner.setAdapter(adapter);\n imagePicker = new ImagePicker(PostingsListFragment.this);\n imagePicker.setImagePickerCallback(new ImagePickerCallback(){\n @Override\n public void onImagesChosen(List<ChosenImage> images) {\n // Display images\n String url = images.get(0).getThumbnailPath();\n imageView.setImageURI(Uri.parse(url));\n setUrl(url);\n }\n\n @Override\n public void onError(String message) {\n // Do error handling\n }\n }\n );\n// imagePicker.allowMultiple(); // Default is false\n// imagePicker.shouldGenerateMetadata(false); // Default is true\n// imagePicker.shouldGenerateThumbnails(false); // Default is true\n\n imageView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n imagePicker.pickImage();\n }\n });\n\n builder.setView(viewInflated);\n\n // Set up the buttons\n builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n final DatabaseReference mPostsRef = FirebaseDatabase.getInstance().getReference(\"posts\");\n final String key = mPostsRef.push().getKey();\n String localurl = getUrl();\n Uri file = Uri.fromFile(new File(localurl));\n StorageReference riversRef = mStorageRef.child(\"images/\" + key + \".jpg\");\n\n riversRef.putFile(file)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n // Get a URL to the uploaded content\n Uri downloadUrl = taskSnapshot.getDownloadUrl();\n //Log.d(\"asd\", downloadUrl.toString());\n Post p = new Post(String.valueOf(downloadUrl),\n titleText.getText().toString(),\n descText.getText().toString(),\n Double.parseDouble(priceText.getText().toString()),\n conditionSpinner.getSelectedItem().toString(),\n nameText.getText().toString());\n\n\n Map<String, Object> postValues = p.toMap();\n Map<String,Object> childUpdates = new HashMap<>();\n childUpdates.put(key, postValues);\n mPostsRef.updateChildren(childUpdates);\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n // Handle unsuccessful uploads\n // ...\n }\n });\n }\n });\n builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n\n builder.show();\n\n }", "private void showImageUpload() {\n\n //Showing dialog\n\n final Dialog dialog = new Dialog(UserHomeActivity.this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.useruploadimage);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n dialog.show();\n\n\n //Hooks\n // backButton = dialog.findViewById(R.id.backButton);\n\n //User will click on back button\n/* backButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n dialog.dismiss();\n }\n });*/\n\n\n submitUserImage = dialog.findViewById(R.id.submitUserQuoteandJokes);\n uploadUserImageView = dialog.findViewById(R.id.uploadImage);\n imageType = dialog.findViewById(R.id.typeDetails);\n\n\n userUploadContent = dialog.findViewById(R.id.shareAndUploadJokesAndQuote);\n\n\n //getting the url from upload image\n uploadUserImageView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n //calling choose picture\n\n choosePicture();\n\n }\n });\n\n\n\n userUploadContent.setText(\"Upload Jokes and Quotes\");\n\n // Uncheck or reset the radio buttons initially\n\n imageType.clearCheck();\n\n\n // Add the Listener to the RadioGroup\n imageType.setOnCheckedChangeListener(\n new RadioGroup\n .OnCheckedChangeListener() {\n @Override\n\n // The flow will come here when\n // any of the radio buttons in the radioGroup\n // has been clicked\n\n // Check which radio button has been clicked\n public void onCheckedChanged(RadioGroup group,\n int checkedId) {\n // Get the selected Radio Button\n RadioButton\n radioButton\n = (RadioButton) group\n .findViewById(checkedId);\n }\n });\n\n\n\n\n //Submit image user\n submitUserImage.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n //checking internet Connectivity\n\n InternetConnectivityCheck connectivityCheck = new InternetConnectivityCheck();\n\n if (connectivityCheck.isNetworkAvailable(UserHomeActivity.this)) {\n\n // When submit button is clicked,\n // Ge the Radio Button which is set\n // If no Radio Button is set, -1 will be returned\n\n int selectedId = imageType.getCheckedRadioButtonId();\n\n if (selectedId == -1) {\n Toast.makeText(UserHomeActivity.this,\n \"Please select the type\",\n Toast.LENGTH_SHORT)\n .show();\n } else if (imageUri == null) {\n\n Toast.makeText(UserHomeActivity.this,\n \"Image would not be empty\",\n Toast.LENGTH_SHORT)\n .show();\n\n } else {\n RadioButton radioButton\n = (RadioButton) imageType\n .findViewById(selectedId);\n\n //Calling method to upload image\n\n updateImage(resultUri, radioButton.getText().toString(),dialog);\n\n }\n }\n else{\n\n Toast.makeText(UserHomeActivity.this, \"Network error\", Toast.LENGTH_SHORT).show();\n }\n\n }\n\n });\n\n\n }", "private void loadCloudImageConfirm()\n {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())\n .setCancelable(true).setTitle(\"Load\").setMessage(\"Load image?\");\n\n builder.setPositiveButton(R.string.open_cloud, new DialogInterface.OnClickListener()\n {\n @Override\n public void onClick(DialogInterface dialog, int which)\n {\n getImagesList();\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 }", "private void doDialogMsgBuilder() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(getResources().getString(R.string.OverAge))\n .setCancelable(false)\n .setPositiveButton(getResources().getString(R.string.ok),\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n });\n\n AlertDialog alert = builder.create();\n alert.show();\n }", "public void showAlert2(){\n ImportingOCR.this.runOnUiThread(new Runnable() {\n public void run() {\n AlertDialog.Builder builder = new AlertDialog.Builder(ImportingOCR.this);\n builder.setTitle(\"Validating faild\");\n\n builder.setMessage(\"This check already exists in database please try another one.\")\n .setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Intent intent = new Intent(ImportingOCR.this, ImportingOCR.class);\n intent.putExtra(\"personid\", personid);\n intent.putExtra(\"amount\", amount);\n intent.putExtra(\"date\", date);\n intent.putExtra(\"username\", uploader);\n startActivity(intent);\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n dialog.dismiss();\n return;\n }\n });\n }", "public void OnDeleteRecipe (View View)\n {\n \t\tImageView darkenScreen = (ImageView) findViewById(R.id.darkenScreen);\n \t\tLayoutParams darkenParams = darkenScreen.getLayoutParams();\n \t\tdarkenParams.height = 1000;\n \t\tdarkenParams.width = 1000;\n \t\tdarkenScreen.setLayoutParams(darkenParams);\n \t\t//make the popup\n \t\tLinearLayout layout = new LinearLayout(this);\n \t\tLayoutInflater inflater = LayoutInflater.from(this);\n \t\tpopUp = new PopupWindow(inflater.inflate(R.layout.popup_delete_recipe, null, false),300,150,true);\n \t\tpopUp.showAtLocation(layout, Gravity.CENTER, 0, 0);\n \t\t\n \t\t//Log.d(\"what\", \"what\");\n \t\t//popUp.update(50, 50, 300, 80);\n \t\t\n \n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = requireActivity().getLayoutInflater();\n final View view = inflater.inflate(R.layout.on_click_dialog, null);\n builder.setView(view);\n\n\n\n\n\n\n\n\n return builder.create();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View vi = inflater.inflate(R.layout.fragment_fees, container, false);\n\n\n infobtn = (ImageView)vi.findViewById(R.id.infobtn);\n\n infobtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n new MaterialDialog.Builder(getActivity())\n .title(\"Consultation fees\")\n .content(\"This fees is indicative and might vary. \\n NOTE:Fees is payable at clinic. There are NO charges for booking an appointment.\")\n .positiveText(\"DISMISS\")\n .negativeText(\"\")\n .show();\n }\n });\n\n\n return vi;\n }", "@OnClick(R.id.btnConfirm)\n public void onConfirmClicked(){\n new MaterialAlertDialogBuilder(getActivity(), R.style.MaterialAlertDialog_MaterialComponents_Title_Icon)\n .setTitle(R.string.dialog_confirm_title)\n .setMessage(R.string.card_message_demo_small)\n .setPositiveButton(R.string.dialog_confirm, (dialog, which) -> Toast.makeText(getActivity(),\n R.string.message_action_success, Toast.LENGTH_LONG).show())\n .setNegativeButton(R.string.dialog_cancel, null)\n .show();\n\n }", "public void initiateReportWindow(View v) {\n\n cur_questionNo=tv_Qid.getText().toString();\n String[] s = { \"QUASTION\", \"ANSWER\", \"ADL_INFO\", \"GRP_INFO\",\"REV_INFO\",\"OTHERS\"};\n final ArrayAdapter<String> adp = new ArrayAdapter<String>(Activity_Lesson_Unit_Point_Display_FlashCardActivity.this,\n android.R.layout.simple_dropdown_item_1line, s);\n\n LayoutInflater factory = LayoutInflater.from(this);\n final View view = factory.inflate(R.layout.activity_alert_report, null);\n //View view = infl.inflate(R.layout.activity_alert_report, null);\n final android.app.AlertDialog alertDialog = new android.app.AlertDialog.Builder(Activity_Lesson_Unit_Point_Display_FlashCardActivity.this,R.style.NewDialog).create();\n\n TextView txt_question_id= (TextView) view.findViewById(R.id.txt_question_id);\n txt_question_id.setText(cur_questionNo);\n final EditText txt_reportMessage= (EditText) view.findViewById(R.id.txt_reportMessage);\n sp_report=view.findViewById(R.id.sp_report);\n //sp_report.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));\n sp_report.setAdapter(adp);\n ImageView iv_close= (ImageView) view.findViewById(R.id.iv_close);\n alertDialog.setView(view);\n\n\n Button btn_report= (Button) view.findViewById(R.id.btn_report);\n\n btn_report.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n //txt_reportMessage.setText(\"CourseId:\"+courseid+\", SubjectId:\"+subjectId+\", PaperId:\"+paperid+\", ChapterId:\"+paperid);\n new AsyncCheckInternet(Activity_Lesson_Unit_Point_Display_FlashCardActivity.this,new INetStatus(){\n @Override\n public void inetSatus(Boolean netStatus) {\n if(netStatus){\n HashMap<String,String> hmap=new HashMap<>();\n hmap.put(\"QUASTION_ID\",cur_questionNo);\n hmap.put(\"COURSE_ID\",courseid);\n hmap.put(\"SUBJECT_ID\",subjectid);\n hmap.put(\"PAPER_ID\",paperid);\n hmap.put(\"CHAPTER_ID\",paperid);\n hmap.put(\"ACTIVITY_TYPE\",\"FLASH_CARD\");\n hmap.put(\"ISSUE_TYPE\",sp_report.getSelectedItem().toString());\n report_message=txt_reportMessage.getText().toString();\n hmap.put(\"ISSUE_MESSAGE\",report_message);\n hmap.put(\"REPORTED_BY\",studentid);\n\n new BagroundTask(URLClass.hosturl +\"insert_report.php\",hmap, Activity_Lesson_Unit_Point_Display_FlashCardActivity.this, new IBagroundListener() {\n\n @Override\n public void bagroundData(String json) {\n if(json.equalsIgnoreCase(\"Report_NOT_Inserted\")){\n Toast.makeText(getApplicationContext(),\"Report not submitted,please try again..\",Toast.LENGTH_SHORT).show();\n }else {\n alertDialog.cancel();\n Toast.makeText(getApplicationContext(),\"Report submitted,Thank you for your feedback..\",Toast.LENGTH_SHORT).show();\n }\n }\n }).execute();\n }else {\n Toast.makeText(getApplicationContext(),\"No internet,Please Check Your Connection\",Toast.LENGTH_SHORT).show();\n }\n }\n }).execute();\n }\n });\n iv_close.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n alertDialog.cancel();\n }\n });\n alertDialog.show();\n\n }", "@Override\n public void onClick(View v) {\n TextView dialogSubjetName = (TextView)mDialog.findViewById(R.id.dialog_subject_name);\n TextView dialogSubjetId = (TextView)mDialog.findViewById(R.id.dialog_subject_id);\n Button btnPlayQuizz = (Button)mDialog.findViewById(R.id.btn_play);\n Button btnPlayTest = (Button)mDialog.findViewById(R.id.btn_test);\n ImageView dialogSubjectIcon = (ImageView)mDialog.findViewById(R.id.img_subject_icon);\n dialogSubjetName.setText(mData.get(viewHolder.getAdapterPosition()).getName());\n dialogSubjetId.setText(mData.get(viewHolder.getAdapterPosition()).getId().toUpperCase());\n Glide.with(mContext).load(mData.get(viewHolder.getAdapterPosition()).getIcon()).into(dialogSubjectIcon);\n mDialog.show();\n btnPlayQuizz.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n QuizzSession.resetSesstion();\n Intent intent = new Intent(mContext, PlayActivity.class);\n QuizzSession.SUBJECT_ID = mData.get(viewHolder.getAdapterPosition()).getId();\n QuizzSession.QUIZZ_TIME = QuizzSession.DONT_SET_TIME;\n QuizzSession.SUBJECT_NAME = mData.get(viewHolder.getAdapterPosition()).getName();\n QuizzSession.NUM_OF_QUESTIONS = QuizzSession.ALL_QUESTIONS;\n QuizzSession.QUIZZ_CATEGORY = QuizzSession.QUIZZ;\n mContext.startActivity(intent);\n }\n });\n btnPlayTest.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n QuizzSession.resetSesstion();\n Intent intent = new Intent(mContext, PlayActivity.class);\n QuizzSession.SUBJECT_ID = mData.get(viewHolder.getAdapterPosition()).getId();\n QuizzSession.QUIZZ_TIME = QuizzSession.TEST_TIME;\n QuizzSession.SUBJECT_NAME = mData.get(viewHolder.getAdapterPosition()).getName();\n QuizzSession.NUM_OF_QUESTIONS = QuizzSession.NUM_QUESTIONS_FOR_TEST;\n QuizzSession.QUIZZ_CATEGORY = QuizzSession.TEST;\n mContext.startActivity(intent);\n }\n });\n\n }", "public void onButtonShowPopupWindowClick(View view) {\n LayoutInflater inflater = (LayoutInflater)\n getActivity().getSystemService(LAYOUT_INFLATER_SERVICE);\n View popupView = inflater.inflate(R.layout.dialog_list_view, null);\n rv_see_All = (RecyclerView) popupView.findViewById(R.id.rv_see_all);\n\n\n rv_see_All.setLayoutManager(new LinearLayoutManager(getActivity()));\n LinearLayoutManager linearLayoutManager_house = new LinearLayoutManager(getActivity());\n\n ArrayList<String> categoryID= new ArrayList<>();\n\n ArrayList<String> arrayList = new ArrayList<>();\n arrayList.addAll(Arrays.asList(seeAllArray));\n categoryID.addAll(Arrays.asList(categoryId));\n\n\n arrayList.remove(0);\n arrayList.remove(0);\n arrayList.remove(0);\n arrayList.remove(0);\n arrayList.remove(0);\n\n categoryID.remove(0);\n categoryID.remove(0);\n categoryID.remove(0);\n categoryID.remove(0);\n categoryID.remove(0);\n\n /* seeAllAdapter = new SeeAllAdapter(getActivity(), arrayList,categoryID);\n seeAllAdapter.setClickListener(this);\n rv_see_All.setAdapter(seeAllAdapter);\n*/\n\n // create the popup window\n int width = LinearLayout.LayoutParams.WRAP_CONTENT;\n int height = LinearLayout.LayoutParams.WRAP_CONTENT;\n boolean focusable = true; // lets taps outside the popup also dismiss it\n popupWindow = new PopupWindow(popupView, width, height, focusable);\n // show the popup window\n // which view you pass in doesn't matter, it is only used for the window tolken\n popupWindow.showAtLocation(view, Gravity.BOTTOM, 0, 0);\n }", "@Override\n public void onClick(View v) {\n AlertDialog.Builder alertdialogbuilder = new AlertDialog.Builder(implicitintent.this);\n alertdialogbuilder.setCancelable(false);\n alertdialogbuilder.setMessage(\"Are you sure want to navigate ?\");\n alertdialogbuilder.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), \"Clicked No\", Toast.LENGTH_LONG).show();\n }\n });\n\n alertdialogbuilder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n Intent ii = new Intent(getApplicationContext(), candidateslist.class);\n startActivity(ii);\n }\n });\n alertdialogbuilder.setIcon(R.mipmap.midfing);\n AlertDialog ad = alertdialogbuilder.create();\n ad.setTitle(\"Tussi Jaare ho ?\");\n ad.show();\n\n\n }", "private void openPickAlert(int i) {\n String[] name = {\"TAKE A PHOTO\", \"CHOOSE FROM GALLERY\"};\n int[] icons = {R.drawable.ic_menu_camera, R.drawable.ic_menu_gallery};\n CommonUtils.getInstance(ProfileScreenActivity.this).openDialog(this, name, icons, new OnBottomDialogItemListener() {\n @Override\n public void onItemClick(View view, int position, int type, Object t) {\n switch (type) {\n case GlobalValues.ClickOperations.APAPTER_BOTTOM_DIALOG_CLICK:\n switch (position) {\n case 0:\n openCamera();\n break;\n case 1:\n openGallerypicker();\n break;\n }\n break;\n }\n }\n });\n\n }", "@Override\n public void onClick(View v) {\n LayoutInflater factory = LayoutInflater.from(getApplicationContext());\n final View alertDialogView = factory.inflate(R.layout.alertdialogperso, null);\n\n //Création de l'AlertDialog\n AlertDialog.Builder adb = new AlertDialog.Builder(this);\n\n //On affecte la vue personnalisé que l'on a crée à notre AlertDialog\n adb.setView(alertDialogView);\n\n //On donne un titre à l'AlertDialog\n adb.setTitle(\"Titre de notre boite de dialogue\");\n\n //On modifie l'icône de l'AlertDialog pour le fun ;)\n adb.setIcon(android.R.drawable.ic_dialog_alert);\n\n //On affecte un bouton \"OK\" à notre AlertDialog et on lui affecte un évènement\n adb.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n\n //Lorsque l'on cliquera sur le bouton \"OK\", on récupère l'EditText correspondant à notre vue personnalisée (cad à alertDialogView)\n EditText et = (EditText)alertDialogView.findViewById(R.id.EditText1);\n mood.setmCommentary(et.getText().toString());\n preferences.edit().putString(\"commentary\", mood.getmCommentary()).apply();\n String commentary = getPreferences(MODE_PRIVATE).getString(\"commentary\", null);\n\n Gson gson = new Gson();\n String json = gson.toJson(mood);\n preferences.edit().putString(\"mood\",gson.toJson(mood)).apply();\n\n\n\n\n\n\n //On affiche dans un Toast le texte contenu dans l'EditText de notre AlertDialog\n Toast.makeText(getApplicationContext(), et.getText(), Toast.LENGTH_SHORT).show();\n } });\n\n //On crée un bouton \"Annuler\" à notre AlertDialog et on lui affecte un évènement\n adb.setNegativeButton(\"Annuler\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n //Lorsque l'on cliquera sur annuler on quittera l'application\n finish();\n } });\n adb.show();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_me, container, false);\n ButterKnife.bind(this, view);\n user = FirebaseAuth.getInstance().getCurrentUser();\n if (user != null){\n// retrieve user profile from Firebase\n String name = user.getDisplayName();\n username.setText(name);\n String email = user.getEmail();\n email_address.setText(email);\n Uri photoUrl = user.getPhotoUrl();\n Picasso.with(getActivity()).load(photoUrl).into(photo);\n photo.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n Log.d(\"me\", \"photo\");\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(\"Please choose\");\n final String[] chioces = {\"Take a photo from camera\", \"Upload a photo from Gallery\"};\n builder.setItems(chioces, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n switch (i){\n case 0:\n if (checkSelfPermission(MeFragment.this.getActivity(), Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {\n requestPermissions(new String[] { Manifest.permission.CAMERA},\n CAMERA_PERMISSION_CODE);\n return;\n }\n File image = new File(getActivity().getExternalCacheDir(), \"photo.jpg\");\n try {\n if (image.exists()) {\n image.delete();\n image.createNewFile();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n photoUri = FileProvider.getUriForFile(getActivity(), getActivity().getPackageName() + \".fileprovider\", image);\n Intent camera_intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n camera_intent.putExtra(MediaStore.EXTRA_OUTPUT, photoUri);\n startActivityForResult(camera_intent, CAMERA_REQUEST_CODE);\n break;\n case 1:\n if (checkSelfPermission(MeFragment.this.getActivity(), Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED\n && checkSelfPermission(MeFragment.this.getActivity(), Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n requestPermissions(new String[] { Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE},\n GALLERY_PERMISSION_CODE);\n return;\n }\n Intent gallery_intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(gallery_intent, GALLERY_REQUEST_CODE);\n break;\n }\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }\n });\n\n signoutbtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n FirebaseAuth.getInstance().signOut();\n Intent sign_out_intent = new Intent(MeFragment.this.getActivity(), MainActivity.class);\n startActivity(sign_out_intent);\n MeFragment.this.getActivity().finish();\n }\n });\n\n resetpwd.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(\"Please reter your new password\");\n final EditText et = new EditText(MeFragment.this.getActivity());\n builder.setView(et);\n builder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n String new_pwd = et.getText().toString().trim();\n if (TextUtils.isEmpty(new_pwd)){\n Toast.makeText(MeFragment.this.getActivity(), \"The new password cannot be null\", Toast.LENGTH_SHORT).show();\n }\n else{\n user.updatePassword(new_pwd)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n// Toast.makeText(MeFragment.this.getActivity(), \"User password updated.\", Toast.LENGTH_SHORT).show();\n Log.d(\"MeFragment\", \"User password updated.\");\n }\n else{\n// Toast.makeText(MeFragment.this.getActivity(), \"update error \", Toast.LENGTH_SHORT).show();\n Log.d(\"MeFragment\", \"update error\");\n }\n }\n });\n FirebaseAuth.getInstance().signOut();\n Intent sign_out_intent = new Intent(MeFragment.this.getActivity(), MainActivity.class);\n startActivity(sign_out_intent);\n MeFragment.this.getActivity().finish();\n }\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.cancel();\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }\n });\n }\n else{\n photo.setImageResource(R.drawable.noimage);\n resetpwd.setVisibility(View.INVISIBLE);\n username.setText(\"Please Login first\");\n ic_mood.setVisibility(View.INVISIBLE);\n ic_email.setVisibility(View.INVISIBLE);\n profile.setText(\"\");\n signoutbtn.setText(\"Log in\");\n signoutbtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent login_intent = new Intent(MeFragment.this.getActivity(), Login.class);\n startActivity(login_intent);\n MeFragment.this.getActivity().finish();\n }\n });\n }\n return view;\n }", "public void openFeedbackDialog(String desc, String increment, int pictype, final String colour, final int score){\n LayoutInflater inflater = LayoutInflater.from(this);\n View view = inflater.inflate(R.layout.dialog_feedback, null);\n\n //initialise the elements\n TextView descTxt = view.findViewById(R.id.dialogFeedbackDesc);\n TextView points = view.findViewById(R.id.increment);\n Button okBtn = view.findViewById(R.id.DialogFeedbackBtn);\n ConstraintLayout dialogBg = view.findViewById(R.id.feedbackDialogBg);\n ImageView pic = view.findViewById(R.id.icon);\n\n descTxt.setText(desc); //set the description\n dialogBg.setBackgroundColor(Color.parseColor(colour));\n pic.setImageResource(pictype);\n points.setText(increment);\n\n //create the dialog\n final AlertDialog alertDialog = new AlertDialog.Builder(this)\n .setView(view)\n .create();\n\n okBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(CyberSimThree.this, CyberSimFour.class);\n intent.putExtra(\"score\", score);\n startActivity(intent);\n\n }\n });\n\n alertDialog.show();\n\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View rootView = inflater.inflate(R.layout.fragment_message_dialog, null);\n msg = rootView.findViewById(R.id.msg);\n submit = rootView.findViewById(R.id.msg_submit);\n final int code = getTargetRequestCode();\n builder.setView(rootView);\n builder.setTitle(\"Enter a message:\");\n\n submit.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View view) {\n\n sendResult(code);\n dismiss();\n\n\n }\n\n });\n\n return builder.create();\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsetContentView(R.layout.set_bg_menu);\r\n\r\n\t\t\t\tfinal Integer[] mImageIds = { R.drawable.onef1,\r\n\t\t\t\t\t\tR.drawable.onef2, R.drawable.one2finish };\r\n\r\n\t\t\t\t// res = getResources();\r\n\r\n\t\t\t\tGridView gridView01 = (GridView) findViewById(R.id.GridView01);\r\n\t\t\t\tgridView01.setAdapter(new ImageAdapter(BackgroundChange.this,\r\n\t\t\t\t\t\t85, 85, mImageIds, res)); // �]�w image ���f\r\n\t\t\t\tgridView01.setOnItemClickListener(new OnItemClickListener() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\r\n\t\t\t\t\t\t\tfinal int position, long id) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\tfinal PopupWindow popWin = new PopupWindow(\r\n\t\t\t\t\t\t\t\tBackgroundChange.this);\r\n\t\t\t\t\t\t// �w�q PopupWindow ���t�� ImageView\r\n\t\t\t\t\t\tImageView iv = new ImageView(BackgroundChange.this);\r\n\t\t\t\t\t\t// �b ImageView ���]�w�ϼ�\r\n\t\t\t\t\t\tiv.setImageDrawable(getResources().getDrawable(\r\n\t\t\t\t\t\t\t\tmImageIds[position]));\r\n\r\n\t\t\t\t\t\tAlertDialog alert = null;\r\n\r\n\t\t\t\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(\r\n\t\t\t\t\t\t\t\tBackgroundChange.this);\r\n\t\t\t\t\t\tbuilder.setTitle(\"�D���I���˦�\");\r\n\t\t\t\t\t\tbuilder.setView(iv);\r\n\t\t\t\t\t\tbuilder.setCancelable(true);\r\n\r\n\t\t\t\t\t\tbuilder.setPositiveButton(\"�T�w\",\r\n\t\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\r\n\t\t\t\t\t\t\t\t\t\t\tint which) {\r\n\r\n\t\t\t\t\t\t\t\t\t\tSharedPreferences preferences = getSharedPreferences(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"clickDate\", 0);\r\n\t\t\t\t\t\t\t\t\t\tSharedPreferences.Editor editor = preferences\r\n\t\t\t\t\t\t\t\t\t\t\t\t.edit();\r\n\t\t\t\t\t\t\t\t\t\teditor.putInt(\"backgroundMain\",\r\n\t\t\t\t\t\t\t\t\t\t\t\tmImageIds[position]);\r\n\t\t\t\t\t\t\t\t\t\teditor.commit();\r\n\r\n\t\t\t\t\t\t\t\t\t\t// bgColor = mImageIds[position];\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tbuilder.setNegativeButton(\"���\",\r\n\t\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\r\n\t\t\t\t\t\t\t\t\t\t\tint which) {\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\talert = builder.create();\r\n\t\t\t\t\t\talert.show();\r\n\r\n\t\t\t\t\t\tView layout = (View) findViewById(R.id.layout1);\r\n\t\t\t\t\t\tlayout.setBackgroundDrawable(getResources()\r\n\t\t\t\t\t\t\t\t.getDrawable(mImageIds[position]));\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t}", "@SuppressWarnings(\"deprecation\")\n\t@SuppressLint(\"NewApi\")\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tdialog = new Dialog(this);\n\t\tWindow dialogWindow = dialog.getWindow();\n\t\tWindowManager.LayoutParams dlp = dialogWindow.getAttributes();\n\t\tdialogWindow.setGravity(Gravity.CENTER);\n\n\t\tWindowManager wm = (WindowManager) this\n\t\t\t\t.getSystemService(Context.WINDOW_SERVICE);\n\n\t\tint width = wm.getDefaultDisplay().getWidth();\n\t\tint height = wm.getDefaultDisplay().getHeight();\n\n\t\tdlp.width = width * 4 / 5; // 宽度\n\t\tdlp.height = width * 7 / 20; // 高度\n\t\tdlp.alpha = (float) 1.;\n\n\t\tsetContentView(R.layout.shake);\n\t\tRelativeLayout rll_border = (RelativeLayout) findViewById(R.id.shake_border);\n\t\tRelativeLayout rll = (RelativeLayout) findViewById(R.id.head_shake);\n\t\tRelativeLayout rll_main = (RelativeLayout) findViewById(R.id.shake_main);\n\t\tshakeIcon = (ImageView) findViewById(R.id.img_shake_icon);\n\t\tshakeIcon.setOnClickListener(this);\n\t\tImageView shakebowl = (ImageView) findViewById(R.id.img_shake_bowl);\n\t\tImageView shakecate = (ImageView) findViewById(R.id.img_shake_cake);\n\t\tImageView back = (ImageView) findViewById(R.id.img_shake_back);\n\t\tback.setOnClickListener(this);\n\t\tImageView bottom = (ImageView) findViewById(R.id.img_shake_bottom);\n\t\tView v = (View) findViewById(R.id.view_shake_space);\n\n\t\tBitmap bm = BitmapFactory.decodeResource(getResources(),\n\t\t\t\tR.drawable.shake_background);\n\t\tBitmap bm1 = Bitmap.createBitmap(bm, 0, 0, width,\n\t\t\t\theight - rll.getLayoutParams().height);\n\t\tDrawable bd = new BitmapDrawable(getResources(), bm1);\n\t\trll_main.setBackgroundDrawable(bd);\n\n\t\tv.getLayoutParams().height = width / 8;\n\n\t\tshakeIcon.getLayoutParams().height = width * 13 / 36;\n\t\tshakeIcon.getLayoutParams().width = width * 13 / 36;\n\t\tshakeIcon.setImageResource(R.drawable.shake_icon2);\n\n\t\trll_border.setBackgroundResource(R.drawable.shake_border);\n\t\tRelativeLayout.LayoutParams lp = (LayoutParams) rll_border\n\t\t\t\t.getLayoutParams();\n\t\tlp.height = width / 2;\n\t\tlp.width = width / 2;\n\n\t\tbottom.setBackgroundResource(R.drawable.shake_bottom);\n\t\tbottom.getLayoutParams().height = width / 3;\n\n\t\tshakebowl.getLayoutParams().height = width * 12 / 36;\n\t\tshakebowl.getLayoutParams().width = width * 12 / 36;\n\t\tshakebowl.setImageResource(R.drawable.shake_bowl);\n\t\tshakebowl.bringToFront();\n\n\t\tshakecate.getLayoutParams().height = width * 12 / 36;\n\t\tshakecate.getLayoutParams().width = width * 12 / 36;\n\t\tshakecate.setImageResource(R.drawable.shake_cake);\n\t\t// 将控件至于上层\n\t\tshakecate.bringToFront();\n\t}", "private void showAddImageDialog() {\n new AddImageDialog()\n .show(this, new AddImageDialog.OnCompleteListener() {\n @Override\n public void onImageAdded(Item item) {\n inflateViewForItem(item);\n }\n\n @Override\n public void onError(String error) {\n new MaterialAlertDialogBuilder(MainActivity.this)\n .setTitle(\"Error\")\n .setMessage(error)\n .show();\n }\n });\n }", "public void SHOW_CUSTOM_DIALOG_HESO(View v) {\n\t\tdialog_heso = new Dialog_HESO(TAB_THONGTIN_HOSO.this);\n\t\tdialog_heso.show();\n\t\tWindowManager.LayoutParams lp = new WindowManager.LayoutParams();\n\t\tlp.copyFrom(dialog_heso.getWindow().getAttributes());\n\t\tlp.width = Tht_Screen.get_screen_width_percent(TAB_THONGTIN_HOSO.this, 90);\n\t\tlp.height = Tht_Screen.get_screen_heigth_percent(TAB_THONGTIN_HOSO.this, 90);\n\t\tdialog_heso.getWindow().setAttributes(lp);\n\t\tARR_MAU_HESO = mdb.get_ARR_HESO(Variables.DNV.MaDV);\n\t\tmAdapter_HESO = new Lst_HESO(ARR_MAU_HESO, TAB_THONGTIN_HOSO.this);\n\t\tDialog_HESO.lv_HESO.setAdapter(mAdapter_HESO);\n\t\tDialog_HESO.tv_PT_TT.setText(getString(R.string.PT_TT)+String.valueOf(Variables.HSCT_CHON.PT_TT));\n\t\tDialog_HESO.tv_PT_C.setText(getString(R.string.PT_C)+String.valueOf(Variables.HSCT_CHON.PT_C));\n\t\tDialog_HESO.tv_PT_TL.setText(getString(R.string.PT_TL)+String.valueOf(Variables.HSCT_CHON.PT_TL));\n\t\tDialog_HESO.tv_PT_K.setText(getString(R.string.PT_K)+String.valueOf(Variables.HSCT_CHON.PT_K));\n\t\tDialog_HESO.tv_PT_VAT.setText(getString(R.string.PT_VAT)+String.valueOf(Variables.HSCT_CHON.PT_VAT));\n\t\tDialog_HESO.tv_PT_NC.setText(getString(R.string.PT_NC)+String.valueOf(Variables.HSCT_CHON.PT_NC)+\" %\");\n\t\tDialog_HESO.tv_PT_C1.setText(getString(R.string.PT_C1)+String.valueOf(Variables.HSCT_CHON.PT_C1));\n\t\tDialog_HESO.tv_PT_NC1.setText(getString(R.string.PT_NC1)+String.valueOf(Variables.HSCT_CHON.PT_NC1)+\" %\");\n\t\t\n\n\t}", "void showPopuopForPurchaseAndPurchasePaid(int flowpurchaseReceivedOrPaid) {\n this.flowpurchaseReceivedOrPaid = flowpurchaseReceivedOrPaid;\n String languageCode = Utility.getInstance().getLanguage(getActivity());\n Utility.getInstance().setLanguage(getActivity(), languageCode);\n Utility.getInstance().localisation(getActivity(), languageCode);\n dialog = new Dialog(mContext);\n if (!dialog.isShowing()) {\n dialog.setCancelable(false);\n /* dialog.getWindow().addFlags(Window.FEATURE_NO_TITLE);*/\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));\n dialog.setContentView(R.layout.popup_purchase_received_paid);\n TextView textviewTitle = dialog.findViewById(R.id.textviewTitle);\n editextPurchaseSupplierName = dialog.findViewById(R.id.editextPurchaseSupplierName);\n ImageView imageviewMicSupplierName = dialog.findViewById(R.id.imageviewMicSupplierName);\n edittextPurchaseAmount = dialog.findViewById(R.id.edittextPurchaseAmount);\n ImageView imageviewMicPurchaseAmount = dialog.findViewById(R.id.imageviewMicPurchaseAmount);\n edittextPurchasePurpose = dialog.findViewById(R.id.edittextPurchasePurpose);\n ImageView imageviewMicPurchasePurpose = dialog.findViewById(R.id.imageviewMicPurchasePurpose);\n edittextPuchaseDate = dialog.findViewById(R.id.edittextPuchaseDate);\n imageviewMicSaveCancel = dialog.findViewById(R.id.imageviewMicSaveCancel);\n ImageView imageviewPurchaseDate = dialog.findViewById(R.id.imageviewPurchaseDate);\n CardView cardviewPurchaseCancel = dialog.findViewById(R.id.cardviewPurchaseCancel);\n CardView cardviewPurchaseOk = dialog.findViewById(R.id.cardviewPurchaseOk);\n ImageView imageviewCross = dialog.findViewById(R.id.imageviewCross);\n ImageView imageviewMicSaveCancel = dialog.findViewById(R.id.imageviewMicSaveCancel);\n imageviewSOutsnadingProfile = dialog.findViewById(R.id.imageviewOutsnadingProfile);\n textviewSOustandingId = dialog.findViewById(R.id.textviewOustandingId);\n textviewSOustandingName = dialog.findViewById(R.id.textviewOustandingName);\n textviewSOustandingAmount = dialog.findViewById(R.id.textviewOustandingAmount);\n relativelayoutSOustandingProfile = dialog.findViewById(R.id.relativelayoutProfile);\n textview_notFound = dialog.findViewById(R.id.textview_notFound);\n TextView textviewamount = dialog.findViewById(R.id.textviewsaleReport);\n\n textviewSOustandingAmount.setVisibility(View.GONE);\n\n setClickPuchaseElements(imageviewMicSupplierName, editextPurchaseSupplierName, getString(R.string.please_tell_supplier_name), 1);\n if (flowpurchaseReceivedOrPaid == 1) {\n setClickPuchaseElements(imageviewMicPurchaseAmount, edittextPurchaseAmount, getString(R.string.please_tell_purchase_amount), 2);\n setClickPuchaseElements(imageviewMicPurchasePurpose, edittextPurchasePurpose, getString(R.string.please_tell_purchase_purpose), 1);\n\n } else {\n setClickPuchaseElements(imageviewMicPurchaseAmount, edittextPurchaseAmount, getString(R.string.please_tell_paid_amount), 2);\n setClickPuchaseElements(imageviewMicPurchasePurpose, edittextPurchasePurpose, getString(R.string.please_tell_amount_paid_purpose), 1);\n\n }\n setClickPuchaseElements(imageviewMicSaveCancel, null, getString(R.string.please_say_save_or_cancel), 1);\n int currentMonth = dob_currentDate.get(Calendar.MONTH) + 1;\n edittextPuchaseDate.setText(dob_currentDate.get(Calendar.DAY_OF_MONTH) + \"/\" + currentMonth + \"/\" + dob_currentDate.get(dob_currentDate.YEAR));\n if (flowpurchaseReceivedOrPaid == 1) {\n textviewTitle.setText(getString(R.string.menu_purchase));\n } else {\n textviewTitle.setText(getString(R.string.menu_purchasePaid));\n textviewamount.setText(getString(R.string.menu_purchasePaid));\n// textviewSOustandingId.setVisibility(View.INVISIBLE);\n }\n\n textWatcherPurchaseSupplierName = new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n if (editextPurchaseSupplierName.hasFocus()) {\n if (dialog.isShowing()) {\n //checkOustandingData(s.toString(), true);\n if (Utility.getInstance().isOnline(mContext)) {\n checkSupplierData(s.toString(), true);\n }\n }\n }\n }\n };\n\n\n editextPurchaseSupplierName.addTextChangedListener(textWatcherPurchaseSupplierName);\n/* editextPurchaseSupplierName.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n Log.e(TAG, \"onTextChanged: \");\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n Log.e(TAG, \"onTextChanged: \");\n if (dialog.isShowing()) {\n //checkOustandingData(s.toString(), true);\n checkSupplierData(s.toString(), true);\n }\n }\n });*/\n\n cardviewPurchaseCancel.setOnClickListener(v -> {\n if (dialog != null) {\n dialog.dismiss();\n if (textToSpeech != null) {\n textToSpeech.stop();\n }\n speak(getString(R.string.transaction_cancelled), \"\");\n Toast.makeText(mContext, \"\" + getString(R.string.transaction_cancelled), Toast.LENGTH_SHORT).show();\n }\n });\n\n cardviewPurchaseOk.setOnClickListener(v -> {\n boolean valueStatus = validatePuchase();\n if (valueStatus) {\n createPurchaseRequest(flowpurchaseReceivedOrPaid);\n }\n });\n\n imageviewCross.setOnClickListener(v -> {\n if (dialog != null) {\n dialog.dismiss();\n if (textToSpeech != null) {\n textToSpeech.stop();\n }\n }\n });\n\n imageviewPurchaseDate.setOnClickListener(v -> {\n edittextPuchaseDate.setError(null);\n DatePickerDialog datePickerDialog = new DatePickerDialog(mContext, new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {\n month = month + 1;\n edittextPuchaseDate.setText(dayOfMonth + \"/\" + month + \"/\" + year);\n boolean valueStatus = validatePuchase();\n if (valueStatus) {\n speak(getString(R.string.please_say_save_or_cancel), \"\");\n new Handler().postDelayed(() -> {\n speechToTextFuncVoiceForPurchase(mContext, null, 3, imageviewMicSaveCancel, 2);\n }, 3000);\n }\n }\n }, dob_currentDate.get(dob_currentDate.YEAR), dob_currentDate.get(Calendar.MONTH), dob_currentDate.get(Calendar.DAY_OF_MONTH));\n// datePickerDialog.setTitle(\"Select Date\");\n datePickerDialog.getDatePicker().setMaxDate(System.currentTimeMillis());\n datePickerDialog.show();\n });\n\n\n if (!dialog.isShowing()) {\n String languageCode2 = Utility.getInstance().getLanguage(getActivity());\n Utility.getInstance().setLanguage(getActivity(), languageCode2);\n Utility.getInstance().localisation(getActivity(), languageCode2);\n dialog.show();\n\n\n/* WindowManager.LayoutParams params = dialog.getWindow().getAttributes(); // change this to your dialog.\n\n params.y = -100; // Here is the param to set your dialog position. Same with params.x\n dialog.getWindow().setAttributes(params);*/\n\n dialog.getWindow().setGravity(Gravity.TOP | Gravity.RIGHT);\n WindowManager.LayoutParams layoutParams = dialog.getWindow().getAttributes();\n layoutParams.x = 100; // right margin\n layoutParams.y = 170; // top margin\n dialog.getWindow().setAttributes(layoutParams);\n // e.g. bottom + left margins:\n dialog.getWindow().setGravity(Gravity.BOTTOM | Gravity.LEFT);\n WindowManager.LayoutParams layoutParams1 = dialog.getWindow().getAttributes();\n layoutParams1.x = 100; // left margin\n layoutParams1.y = 170; // bottom margin\n dialog.getWindow().setAttributes(layoutParams1);\n\n\n/* Window window = dialog.getWindow();\n\n\n\n window.setLayout(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT);*/\n }\n/* speak(getString(R.string.please_tell_supplier_name), \"\");\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n editextPurchaseSupplierName.requestFocus();\n speechToTextFuncVoiceForPurchase(mContext, editextPurchaseSupplierName, 1, imageviewMicSupplierName, 2);\n }\n }, 3000);*/\n\n }\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n dialog.dismiss();\n //Display err toast msg\n Toast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_SHORT).show();\n }", "@Override\n\t\t\t\t\t\tpublic void onShow(DialogInterface dialog) {\n\t\t\t\t\t\t\tButton b = alert.getButton(AlertDialog.BUTTON_POSITIVE);\n\t\t\t\t\t\t\tb.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t//dist,date,empId,spmandi,spretailer,spactivity,rem\n\t\t\t\t\t\t\t\t\tif(new ConnectionDetector(context).isConnectingToInternet()){\n\t\t\t\t\t\t\t\t\t\tMyspinner sp1 = (Myspinner)districtlist.getSelectedItem();\n\t\t\t\t\t\t\t\t\t\tMyspinner sp2 = (Myspinner)mandilist.getSelectedItem();\n\t\t\t\t\t\t\t\t\t\tMyspinner sp3 = (Myspinner)retailerslist.getSelectedItem();\n\t\t\t\t\t\t\t\t\t\tMyspinner sp4 = (Myspinner)activitieslist.getSelectedItem();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(districtlist.getSelectedItemPosition()!=0\n\t\t\t\t\t\t\t\t\t\t\t\t&& mandilist.getSelectedItemPosition()!=0\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& retailerslist.getSelectedItemPosition()!=0\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& activitieslist.getSelectedItemPosition()!=0){\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\tString date = new SimpleDateFormat(\"yyyy-MM-dd\").format(dt);\n\t\t\t\t\t\t\t\t\t\t\t\tArrayList<String> id = new GetData(context, db).getVillageId(villages.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\tif(id.size()>0 && id.get(0).length()>0){\n\t\t\t\t\t\t\t\t\t\t\t\t\tnew CreateActivity().execute(sp1.getValue(),date,get.getAllLogin().get(0).get(\"empid\"),sp2.getValue(),sp3.getValue(),sp4.getValue(),remarks.getText().toString(), id.get(0), villages.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\tnew CreateActivity().execute(sp1.getValue(),date,get.getAllLogin().get(0).get(\"empid\"),sp2.getValue(),sp3.getValue(),sp4.getValue(),remarks.getText().toString(), \"0\", villages.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\talert.dismiss();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\t\t\t\t\t\t\te.getMessage();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\tif(districtlist.getSelectedItemPosition()==0){\n\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"Please Select District\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\tif(mandilist.getSelectedItemPosition()==0){\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"Please Select Mandi\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(retailerslist.getSelectedItemPosition()==0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"Please Select Retailer\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(activitieslist.getSelectedItemPosition()==0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"Please Select Activity\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"No Network Found\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}", "@Override\n\tprotected Dialog onCreateDialog(int id)\n\t{\n\t\tif(id == DLG_ABOUT)\n\t\t{\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setMessage(R.string.app_about);\n\t\t\tbuilder.setPositiveButton(\"返回\", new DialogInterface.OnClickListener(){\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface p1, int p2)\n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO: Implement this method\n\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t);\n\t\treturn builder.create();\n\t\t}\n\t\t\n\t\tif(id == DLG_HELP)\n\t\t{\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setMessage(R.string.app_help);\n\t\t\tbuilder.setPositiveButton(\"返回\", new DialogInterface.OnClickListener(){\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface p1, int p2)\n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO: Implement this method\n\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t);\n\t\t\treturn builder.create();\n\t\t}\n\t\t\n\t\tif(id == DLG_UNPACKER)\n\t\t{\n\t\t\tView view = ViewTool.getView(this,R.layout.dlg_unpack);\n\t\t\tfinal EditText edit_png = (EditText) view.findViewById(R.id.edit_pngpath);\n\t\t\tfinal EditText edit_undir = (EditText) view.findViewById(R.id.edit_undir);\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\t\t\n\t\t\tbuilder.setView(view);\n\t\t\tbuilder.setPositiveButton(\"确定\", new DialogInterface.OnClickListener(){\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface p1, int p2)\n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO: Implement this method\n UnPacker unpacker = new UnPacker();\n\t\t String path_png = edit_png.getText().toString();\n\t\t String path_atlas = null;\n\t\t String path_output = edit_undir.getText().toString();\n\t\t int index = path_png.lastIndexOf('.');\n\t\t if(index>0){\n\t\t\t path_atlas = path_png.substring(0,index)+\".atlas\";\n\t\t }\n\t\t unpacker.unPNG( path_atlas,path_png, path_output);\n\t\t Toast.makeText(MainActivity.this,\"解包完成\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t);\n\t\t\tbuilder.setNegativeButton(\"返回\", new DialogInterface.OnClickListener(){\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface p1, int p2)\n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO: Implement this method\n\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t);\n\t\t\treturn builder.create();\n\t\t}\n\t\t\n\t\t\n\t\treturn super.onCreateDialog(id);\n\t}", "@Override\n public void onItemClick(View view, Medal obj, int position) {\n TextView txt;\n final Dialog dialog = new Dialog(getContext());\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); // before\n dialog.setContentView(R.layout.popup_medals);\n txt = dialog.findViewById(R.id.titlePop);\n txt.setText(obj.title);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));\n dialog.setCancelable(true);\n dialog.show();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n //return super.onCreateDialog(savedInstanceState); // TODO: should we call it?\n final String title = getArguments().getString(\"TITLE\");\n final String msg = getArguments().getString(\"MESSAGE\");\n final String pos = getArguments().getString(\"POS\");\n final String neg = getArguments().getString(\"NEG\");\n final String neu = getArguments().getString(\"NEU\");\n // TODO - this is just an int... what about other ... Parcelable\n final int idx = getArguments().getInt(\"IDX\");\n final int iconid = getArguments().getInt(\"ICON_ID\");\n final float textsize = getArguments().getFloat(\"MSGSIZE\");\n\n if (savedInstanceState != null) {\n tag = savedInstanceState.getString(\"TAG\");\n }\n\n final DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialogInterface, int clickedButton) {\n ConfirmListener act = (ConfirmListener) getActivity();\n act.processConfirmation(clickedButton, tag, idx);\n }\n };\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())\n .setTitle(title)\n .setMessage(msg);\n if (iconid != 0 && getResources().getResourceTypeName(iconid).equals(\"drawable\")) {\n // this must be a R.drawable.id, otherwise crash!\n // android.content.res.Resources$NotFoundException:\n builder.setIcon(iconid);\n }\n if (pos != null) {\n builder.setPositiveButton(pos, listener);\n }\n if (neg != null) {\n builder.setNegativeButton(neg, listener);\n }\n if (neu != null) {\n builder.setNeutralButton(neu, listener);\n }\n\n dialog = builder.create();\n if (textsize != 0) {\n dialog.show(); // need to call this to be able to get the TextView as non-null pointer\n TextView tv = (TextView) dialog.findViewById(android.R.id.message);\n if (tv != null) {\n tv.setTextSize(textsize);\n }\n }\n return dialog;\n }" ]
[ "0.7814558", "0.7814558", "0.7048143", "0.66966665", "0.6647987", "0.65345275", "0.65177727", "0.6447382", "0.64410526", "0.6435211", "0.639624", "0.63600504", "0.6304592", "0.6303391", "0.626747", "0.6233411", "0.623258", "0.62148005", "0.6205551", "0.6191584", "0.61913395", "0.61897963", "0.6183164", "0.6178009", "0.6172442", "0.616631", "0.61467403", "0.6143533", "0.6135771", "0.6127054", "0.6111882", "0.61092484", "0.6093972", "0.60930455", "0.60711616", "0.6035079", "0.6032329", "0.60046387", "0.599382", "0.5989965", "0.5986768", "0.59862405", "0.59809935", "0.59639806", "0.59438866", "0.59311944", "0.5918949", "0.59114754", "0.59092736", "0.5908773", "0.5902149", "0.5890311", "0.5886123", "0.587347", "0.587003", "0.58613974", "0.5854707", "0.5853821", "0.58511764", "0.584442", "0.5843525", "0.58426344", "0.5841872", "0.5837676", "0.58311313", "0.5822351", "0.5821948", "0.58209926", "0.5815817", "0.5811934", "0.58094835", "0.58074284", "0.58032244", "0.5798285", "0.57968533", "0.5791725", "0.5773705", "0.57672125", "0.57670176", "0.5763391", "0.57623726", "0.5759509", "0.5756768", "0.5752087", "0.5748633", "0.574464", "0.572918", "0.5727547", "0.5724826", "0.57220185", "0.5721074", "0.57203174", "0.5718628", "0.5716532", "0.57133406", "0.5709925", "0.5709903", "0.5702786", "0.5695603", "0.5694651" ]
0.76242924
2
/ MaterialAlertDialogBuilder Mbuilder = new MaterialAlertDialogBuilder(holder.context); View Mview = LayoutInflater.from(holder.context).inflate(R.layout.full_scren_dioloag, null, false); MaterialToolbar toolbar = Mview.findViewById(R.id.DioloagToolbarID); MaterialTextView time = Mview.findViewById(R.id.ImageTimeDetails); PhotoView photoView = Mview.findViewById(R.id.PhotoViewID); Picasso.with(holder.context).load(MessageModalList.getMessage()).into(photoView); time.setText(MessageModalList.getTime()); Mbuilder.setView(Mview); AlertDialog alertDialog = Mbuilder.create(); alertDialog.show(); goto_fullscreen(new ImageFullScreen());
@Override public void onClick(View view) { final Dialog dialog = new Dialog(holder.context, android.R.style.Theme_Black_NoTitleBar_Fullscreen); dialog.setContentView(R.layout.full_screenimage_bottomsheeed); PhotoView photoView = dialog.findViewById(R.id.PhotoView); Picasso.with(holder.context).load(MessageModalList.getMessage()).into(photoView); dialog.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void onClick(View view) {\r\n\r\n\r\n final Dialog dialog = new Dialog(holder.context, android.R.style.Theme_Black_NoTitleBar_Fullscreen);\r\n\r\n dialog.setContentView(R.layout.full_screenimage_bottomsheeed);\r\n\r\n PhotoView photoView = dialog.findViewById(R.id.PhotoView);\r\n Picasso.with(holder.context).load(MessageModalList.getMessage()).into(photoView);\r\n dialog.show();\r\n\r\n }", "public void handleMessage(Message msg) {\n int what = msg.what;\n if (what == 0x01) { //update\n int i = 1;\n text_dialog = (TextView) mAlertDialog.findViewById(R.id.display_dialog);\n text_Title = (TextView) mAlertDialog.findViewById(R.id.display_title);\n btn_ok = (Button) mAlertDialog.findViewById(R.id.btn_ok);\n btn_dele = (Button) mAlertDialog.findViewById(R.id.btn_dele);\n List<String> mdata = new ArrayList<String>();\n text_Title.setGravity(Gravity.CENTER);\n text_dialog.setMovementMethod(new ScrollingMovementMethod());\n // text_dialog.setText();\n\n if(cursor.moveToFirst()){\n do{\n if(cursor.getString(cursor.getColumnIndex(\"title\")).equals(data.get(Position))){\n text_Title.setText(cursor.getString(cursor.getColumnIndex(\"title\")));\n\n String context = cursor.getString(cursor.getColumnIndex(\"context\"));\n String path = cursor.getString(cursor.getColumnIndex(\"path\"));\n\n Log.d(TAG, \"主文的内容是: \"+ context);\n Log.d(TAG, \"图片的路径是: \" + path);\n String[] sourceStrArray = context.split(\"test\");\n String[] sourcePath = path.split(\"####\");\n\n text_dialog.append(sourceStrArray[0]);\n Pattern p = Pattern.compile(\"test\");\n Matcher m = p.matcher(context);\n while (m.find()) {\n\n\n ContentResolver cr = getActivity().getContentResolver();\n Bitmap bitmap = null;\n //将对象存入Bitmap中\n // bitmap = BitmapFactory.decodeStream(cr.openInputStream(uri));\n //bitmap = getLoacalBitmap(\"/storage/emulated/0/DCIM/Camera/IMG20170512173710.jpg\");\n bitmap = getLoacalBitmap(sourcePath[i]);\n int imgWidth = bitmap.getWidth();\n int imgHeight = bitmap.getHeight();\n double partion = imgWidth*1.0/imgHeight;\n double sqrtLength = Math.sqrt(partion*partion + 1);\n //新的缩略图大小\n double newImgW = 320*(partion / sqrtLength);\n double newImgH = 320*(1 / sqrtLength);\n float scaleW = (float) (newImgW/imgWidth);\n float scaleH = (float) (newImgH/imgHeight);\n Log.d(TAG, \"imgHeight: \"+newImgH);\n Matrix mx = new Matrix();\n //对原图片进行缩放\n mx.postScale(scaleW, scaleH);\n bitmap = Bitmap.createBitmap(bitmap, 0, 0, imgWidth, imgHeight, mx, true);\n ImageSpan imageSpan = new ImageSpan(getActivity(),bitmap);\n SpannableString spannableString = new SpannableString(\"test\");\n spannableString.setSpan(imageSpan, 0, spannableString.length(), SpannableString.SPAN_MARK_MARK);\n text_dialog.append(\"\\n\");\n text_dialog.append(spannableString);\n text_dialog.append(\"\\n\");\n text_dialog.append(sourceStrArray[i]);\n i++;\n\n }\n// int contexttimes = appearNumber(context,\"test\");\n// int pathtimes = appearNumber(path,\"####\");\n// pathtimes = pathtimes - 1;\n\n//\n// for (int i = 0; i < sourceStrArray.length; i ++){\n//\n// Log.d(TAG, \"sourceStrArray: \" +sourceStrArray[i]);\n// }\n// for (int i = 0; i < sourcePath.length; i ++){\n//\n// Log.d(TAG, \"sourcePath: \" +sourcePath[i]);\n// }\n// Log.d(TAG, \"主文的test出现的次数: \"+contexttimes);\n// Log.d(TAG, \"图片的路径出现的次数: \"+pathtimes);\n\n }\n\n\n\n }while(cursor.moveToNext());\n\n\n }\n\n\n btn_ok.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n text_dialog.setText(\"\");\n mAlertDialog.cancel();\n }\n });\n btn_dele.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n text_dialog.append(\"\");\n mAlertDialog.cancel();\n\n\n\n }\n });\n\n if(mAlertDialog.isShowing()){\n MyHandler.sendEmptyMessageDelayed(0,1000);\n }\n }else {\n // mAlertDialog.cancel();\n }\n }", "private void inflateDialogResume() {\n showCustomToast(getString(R.string.loading_resume),Toast.LENGTH_SHORT);\n final ImagePopup imagePopup = new ImagePopup(getActivity());\n //imagePopup.setWindowHeight(800);\n imagePopup.setFullScreen(true);\n imagePopup.setBackgroundColor(Color.WHITE);\n //imagePopup.setWindowWidth(650);\n imagePopup.setImageOnClickClose(true);\n if(employeeResume!=\" \"){\n imagePopup.initiatePopupWithPicasso(employeeResume);\n }else{\n imagePopup.initiatePopup(getResources().getDrawable(R.drawable.error));\n }\n imagePopup.viewPopup();\n /*AlertDialog.Builder imageDialog = new AlertDialog.Builder(getActivity());\n //ImageView showImage = new ImageView(getActivity());\n //imageDialog.setTitle(\"Resume\");\n View dialogLayout = getLayoutInflater().inflate(R.layout.dialog_resume, null);\n ImageView imageView = dialogLayout.findViewById(R.id.imageViewDialogResume);\n imageView.setImageURI(Uri.parse(employeeProfilePhoto));\n imageDialog.setView(dialogLayout);\n imageDialog.show();*/\n\n\n }", "@Override\r\n\tprotected Dialog onCreateDialog(int id) {\n\t\tswitch (id) {\r\n case DIALOG_SELF:\r\n \treturn new AlertDialog.Builder(PhotoImagePagerActivity.this, AlertDialog.THEME_HOLO_LIGHT)\r\n .setTitle(\"选项\")\r\n .setItems(R.array.dialog_self, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int which) {\r\n \tif (which == 0)\r\n \t{\r\n \t\t// 设置活动封面\r\n \t\tMap<String, String> params = new HashMap<String, String>();\r\n \t\tparams.put(\"event_id\", String.valueOf(event_id));\r\n \t\tparams.put(\"event_pic_width\", String.valueOf(UDisplayWidth.getPosterPicWidth(PhotoImagePagerActivity.this)));\r\n \t\tparams.put(\"pic_id\", String.valueOf(pic_id));\r\n \t\t\r\n \t\tmDataLoader.postData(UConstants.SETTING_PIC_URL, params, PhotoImagePagerActivity.this, new HDataListener() {\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 onFinish(String source) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\tGson gson = new Gson();\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tTempModel mTempModel = gson.fromJson(source, new TypeToken<TempModel>(){}.getType());\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif (mTempModel != null)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tToast.makeText(PhotoImagePagerActivity.this, mTempModel.message, Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\t\t\t\t\t\tDDBOpenHelper mDdbOpenHelper = DDBOpenHelper.getInstance(PhotoImagePagerActivity.this);\r\n\t\t\t\t\t\t\t\t\t\tmDdbOpenHelper.updateLocalEventModel(mTempModel.event);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\tToast.makeText(PhotoImagePagerActivity.this, \"数据解析出错\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t} catch (JsonSyntaxException e) {\r\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tToast.makeText(PhotoImagePagerActivity.this, \"数据解析出错\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void onFail(String msg) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\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}\r\n\t\t\t\t\t\t});\r\n \t}\r\n \telse if (which == 1)\r\n \t{\r\n \t\t// 设置删除图片\r\n \t\tMap<String, String> params = new HashMap<String, String>();\r\n \t\tparams.put(\"pic_id\", String.valueOf(pic_id));\r\n \t\tparams.put(\"method\", \"delete\");\r\n \t\t\r\n \t\tmDataLoader.postData(UConstants.DELETE_PIC_URL, params, PhotoImagePagerActivity.this, new HDataListener() {\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 onFinish(String source) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void onFail(String msg) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n \t}\r\n \telse if (which == 2)\r\n \t{\r\n \t\t// 保存图片到本地\r\n \t\tmFinalBitmap.display(downloadImageView, big_pic_url);\r\n \t}\r\n }\r\n })\r\n .create();\r\n case DIALOG_OTHER:\r\n \treturn new AlertDialog.Builder(PhotoImagePagerActivity.this, AlertDialog.THEME_HOLO_LIGHT)\r\n .setTitle(\"选项\")\r\n .setItems(R.array.dialog_other, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int which) {\r\n \tif (which == 0)\r\n \t{\r\n \t\tmFinalBitmap.display(downloadImageView, big_pic_url);\r\n \t}\r\n }\r\n })\r\n .create();\r\n }\r\n return null;\r\n\t}", "@Override\n public void onClick(View view) {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(context);\n LayoutInflater layoutInflater = LayoutInflater.from(context);\n View alertDialogView = layoutInflater.inflate(R.layout.alertdialog_photo, null);\n ImageView imageView = alertDialogView.findViewById(R.id.controlImage);\n byte[] decode = Base64.decode(\n arrayList.get(getAdapterPosition()).getUrl(),\n Base64.DEFAULT\n );\n Bitmap bitmap = BitmapFactory.decodeByteArray(decode,0,decode.length);\n imageView.setImageBitmap(bitmap);\n alertDialog.setView(alertDialogView).show();\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\n\n\n\n\n\t\t\t/*\ttry\n\t\t\t\t{\n\n\t\t\t\tdbengine.open();\n\t\t\t\tString Noti_textWithMsgServerID=dbengine.fetchNoti_textFromtblNotificationMstr();\n\t\t\t\tdbengine.close();\n\t\t\t\t//System.out.println(\"Sunil Tty Noti_textWithMsgServerID :\"+Noti_textWithMsgServerID);\n\t\t\t\tif(!Noti_textWithMsgServerID.equals(\"Null\"))\n\t\t\t\t{\n\t\t\t\tStringTokenizer token = new StringTokenizer(String.valueOf(Noti_textWithMsgServerID), \"_\");\n\n\t\t\t\tMsgServerID= Integer.parseInt(token.nextToken().trim());\n\t\t\t\tNoti_text= token.nextToken().trim();\n\n\n\t\t\t\tif(Noti_text.equals(\"\") || Noti_text.equals(\"Null\"))\n\t\t\t\t{\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\n\n\n\t\t\t\t\t final AlertDialog builder = new AlertDialog.Builder(ProductOrderEntry.this).create();\n\n\n\t\t\t\t\t\tLayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\t\t\t View openDialog = inflater.inflate(R.layout.custom_dialog, null);\n\t\t\t\t openDialog.setBackgroundColor(Color.parseColor(\"#ffffff\"));\n\n\t\t\t\t builder.setCancelable(false);\n\t\t\t\t \tTextView header_text=(TextView)openDialog. findViewById(R.id.txt_header);\n\t\t\t\t \tfinal TextView msg=(TextView)openDialog. findViewById(R.id.msg);\n\n\t\t\t\t\t\tfinal Button ok_but=(Button)openDialog. findViewById(R.id.but_yes);\n\t\t\t\t\t\tfinal Button cancel=(Button)openDialog. findViewById(R.id.but_no);\n\n\t\t\t\t\t\tcancel.setVisibility(View.GONE);\n\t\t\t\t\t header_text.setText(ProductOrderEntry.this.getResources().getString(R.string.AlertDialogHeaderMsg));\n\t\t\t\t\t msg.setText(Noti_text);\n\n\t\t\t\t\t \tok_but.setText(ProductOrderEntry.this.getResources().getString(R.string.AlertDialogOkButton));\n\n\t\t\t\t\t\t\tbuilder.setView(openDialog,0,0,0,0);\n\n\t\t\t\t\t ok_but.setOnClickListener(new OnClickListener()\n\t\t\t\t\t {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View arg0)\n\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\tlong syncTIMESTAMP = System.currentTimeMillis();\n\t\t\t\t\t\t\t\t\tDate dateobj = new Date(syncTIMESTAMP);\n\t\t\t\t\t\t\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd-MM-yyyy HH:mm:ss\",Locale.ENGLISH);\n\t\t\t\t\t\t\t\t\tString Noti_ReadDateTime = df.format(dateobj);\n\n\t\t\t\t\t\t\t\t\tdbengine.open();\n\t\t\t\t\t\t\t\t\tdbengine.updatetblNotificationMstr(MsgServerID,Noti_text,0,Noti_ReadDateTime,3);\n\t\t\t\t\t\t\t\t\tdbengine.close();\n\n\t\t\t\t\t\t\t\t\ttry\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tdbengine.open();\n\t\t\t\t\t\t\t\t\t int checkleftNoti=dbengine.countNumberOFNotificationtblNotificationMstr();\n\t\t\t\t\t\t\t\t\t if(checkleftNoti>0)\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t \tString Noti_textWithMsgServerID=dbengine.fetchNoti_textFromtblNotificationMstr();\n\t\t\t\t\t\t\t\t\t\t\t\t//System.out.println(\"Sunil Tty Noti_textWithMsgServerID :\"+Noti_textWithMsgServerID);\n\t\t\t\t\t\t\t\t\t\t\t\tif(!Noti_textWithMsgServerID.equals(\"Null\"))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tStringTokenizer token = new StringTokenizer(String.valueOf(Noti_textWithMsgServerID), \"_\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tMsgServerID= Integer.parseInt(token.nextToken().trim());\n\t\t\t\t\t\t\t\t\t\t\t\t\tNoti_text= token.nextToken().trim();\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tdbengine.close();\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(Noti_text.equals(\"\") || Noti_text.equals(\"Null\"))\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t msg.setText(Noti_text);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tbuilder.dismiss();\n\t\t\t\t\t\t\t\t\t\t}\n\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\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t finally\n\t\t\t\t\t\t {\n\t\t\t\t\t\t \tdbengine.close();\n\n\t\t\t\t\t\t }\n\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\n\n\n\t\t\t\t\t \tbuilder.show();\n\n\n\n\n\n\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(Exception e)\n\t\t\t\t{\n\n\t\t\t\t}\n*/\n\n\n\t}", "private void showdialog()\n\t{\n\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\t\tLayoutInflater inflater = getActivity().getLayoutInflater();\n\t\t\n\t\tView convertView = (View) inflater.inflate(R.layout.changepass_dialog, null);\t\t\t\n\t\t\n\t\tfinal EditText old_pass = (EditText) convertView.findViewById(R.id.old_pass);\n\t\tfinal EditText new_pass = (EditText) convertView.findViewById(R.id.new_pass);\n\t\tTextView pass_changed = (TextView) convertView.findViewById(R.id.pass_changed);\n\t\tImageView close_btn = (ImageView) convertView.findViewById(R.id.chng_pass_close);\n\t\t\n\t\tpass_changed.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) \n\t\t\t{\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tchange_pass(Singleton.user_id, old_pass.getText().toString(), new_pass.getText().toString(), \n\t\t\t\t\t\tnew_pass.getText().toString());\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tclose_btn.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) \n\t\t\t{\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\n\t\t\t\talert.dismiss();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tbuilder.setView(convertView);\n\t\talert = builder.create();\n\t\t\n\t\tWindow window = alert.getWindow();\n\t\tWindowManager.LayoutParams lp = window.getAttributes();\t\t\n\t\t//lp.copyFrom(window.getAttributes());\n\t\twindow.setGravity(Gravity.CENTER);\n\n\t\t// This makes the dialog take up the full width\n\n\t\t/*lp.width = WindowManager.LayoutParams.MATCH_PARENT;\n\t\tlp.height = WindowManager.LayoutParams.WRAP_CONTENT;\n\t\tlp.gravity = Gravity.CENTER;*/\n\t\t\n\t\tlp.x = 100; // The new position of the X coordinates\n lp.y = 100; // The new position of the Y coordinates\n lp.width = 300; // Width\n lp.height = 100; // Height\n // lp.alpha = 0.7f; // Transparency\n\n\t\twindow.setAttributes(lp);\n\t\talert.show();\n\t}", "public AlertDialog.Builder initCommonDialogPage(Context c,String str,Boolean isError){\n LayoutInflater inflater = (LayoutInflater) c.getSystemService( c.LAYOUT_INFLATER_SERVICE);\n final AlertDialog.Builder nameBuilder = new AlertDialog.Builder(c);\n View alertDiaView = inflater.inflate(R.layout.common_dialog_box,null);\n nameBuilder.setView(alertDiaView);\n\n txtVw = (TextView) alertDiaView.findViewById(R.id.textView27);\n bgBVw = (ImageView) alertDiaView.findViewById(R.id.bgBVw);\n iconvVw = (ImageView) alertDiaView.findViewById(R.id.iconvVw);\n txtTitle =(TextView) alertDiaView.findViewById(R.id.txtTitle);\n\n\n\n if(isError) {\n txtTitle.setText(R.string.error_dialogbox_title);\n txtVw.setText(str);\n iconvVw.setImageDrawable(c.getResources().getDrawable(R.drawable.icons8_error));\n nameBuilder.setPositiveButton(R.string.customaletdialog_initCommonDialogPage_posbtn, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n }\n\n if(!isError){\n txtTitle.setText(R.string.common_sucessful);\n txtVw.setText(str);\n iconvVw.setImageDrawable(c.getResources().getDrawable(R.drawable.icons8_ok));\n }\n\n nameBuilder.setNegativeButton(R.string.customaletdialog_initCommonDialogPage_negbtn, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }\n });\n\n\n\n return nameBuilder;\n }", "private void showbadgedialog() {\n final LayoutInflater li = LayoutInflater.from(mContext);\n //Creating a view to get the dialog box\n View confirmDialog = li.inflate(R.layout.dialog_badges, null);\n // number=session.getMobileNumber();\n //Initizliaing confirm button fo dialog box and edittext of dialog box\n final Button buttonconfirm = (Button) confirmDialog.findViewById(R.id.buttonConfirm);\n\n\n AlertDialog.Builder alert = new AlertDialog.Builder(mContext);\n\n alert.setView(confirmDialog);\n\n final AlertDialog alertDialog = alert.create();\n alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n alertDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n\n alertDialog.show();\n\n //On the click of the confirm button from alert dialog\n buttonconfirm.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n alertDialog.dismiss();\n }\n });\n\n }", "@Override\n public void onClick(View v) {\n MainActivity mainActivity = (MainActivity) getActivity();\n DatabaseHelper dbHelper = new DatabaseHelper(mainActivity);\n taskforshopphoto = dbHelper.getTaskInfo(String.valueOf(Shared.SelectedTask.ID));\n if (taskforshopphoto.PhotoID != null) {\n Dialog settingsDialog = new Dialog(getActivity());\n settingsDialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);\n View viewDialog = getActivity().getLayoutInflater().inflate(R.layout.image_layout, null);\n settingsDialog.setContentView(viewDialog);\n ImageView imgShop = (ImageView) viewDialog.findViewById(R.id.ShopImage);\n Bitmap bmp = BitmapFactory.decodeFile(taskforshopphoto.PhotoID);\n\n imgShop.setImageBitmap(bmp);\n settingsDialog.show();\n } else {\n Toast.makeText(getActivity(), \" No Shop photo\", Toast.LENGTH_LONG).show();\n }\n }", "private void mostrarDialogoCargar(){\n materialDialog = new MaterialDialog.Builder(this)\n .title(\"Validando datos\")\n .content(\"Por favor espere\")\n .progress(true, 0)\n .contentGravity(GravityEnum.CENTER)\n .widgetColorRes(R.color.colorPrimary)\n .show();\n\n materialDialog.setCancelable(false);\n materialDialog.setCanceledOnTouchOutside(false);\n }", "public void showAlertDialog(String dialogTitle, String dialogMessage, String btnTextPositive, String btnTextNegative) {\n try {\n final AlertDialog.Builder alertDialog = new AlertDialog.Builder(\n ctx);\n // Setting Dialog Title\n alertDialog.setTitle(dialogTitle);\n // Setting Dialog Message\n alertDialog.setMessage(dialogMessage);\n alertDialog.setCancelable(false);\n // Setting Icon to Dialog\n /*alertDialog.setIcon(R.drawable.tick);*/\n // Setting OK Button\n alertDialog.setPositiveButton(btnTextPositive\n , new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // Write your code here to execute after dialog closed\n // utils.compare_UpdatePreferenceInt(ctx, JsonTags.MMR_33.name(), 1);\n // updateResultToServer();\n mCallBack.onChangeText(utils.BUTTON_NEXT, true);\n utils.showToast(ctx, getResources().getString(R.string.txtManualPass));\n TestController testController = TestController.getInstance(getActivity());\n testController.onServiceResponse(true,\"TouchScreen\", ConstantTestIDs.MIC_ID);\n testController.onServiceResponse(true,\"Speaker\", ConstantTestIDs.SPEAKER_ID);\n mStartRecording = true;\n mImgViewMicPlay.setImageDrawable(getResources().getDrawable(R.drawable.ic_speaker_blue_svg_128));\n nextButtonHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n nextButtonHandler.removeCallbacksAndMessages(null);\n onNextPress();\n }\n }, 2000);\n }\n });\n alertDialog.setNegativeButton(btnTextNegative, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n mCallBack.onChangeText(utils.BUTTON_NEXT, true);\n utils.showToast(ctx, getResources().getString(R.string.txtManualFail));\n TestController testController = TestController.getInstance(getActivity());\n testController.onServiceResponse(false,\"Mic\", ConstantTestIDs.MIC_ID);\n testController.onServiceResponse(false,\"Speaker\", ConstantTestIDs.SPEAKER_ID);\n //utils.compare_UpdatePreferenceInt(ctx, JsonTags.MMR_33.name(), 0);\n // updateResultToServer();\n mStartRecording = true;\n mImgViewMicRecord.setVisibility(View.VISIBLE);\n mImgViewMicRecord.getDrawable().setColorFilter(getResources().getColor(R.color.blue), PorterDuff.Mode.MULTIPLY);\n mImgViewMicPlay.setVisibility(View.GONE);\n nextButtonHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n nextButtonHandler.removeCallbacksAndMessages(null);\n onNextPress();\n }\n }, 2000);\n }\n });\n\n // Showing Alert Message\n alertDialog.show();\n } catch (Exception e) {\n logException(e, \"MicManualFragment_showAlertDialog()\");\n }\n\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(R.string.dialog_fire_missiles)\n .setPositiveButton(R.string.fire, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n return builder.create();\n }", "@Override\n public void onClick(View view) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(AboutUsActivity.this);\n\n View view1 = LayoutInflater.from(getApplicationContext()).inflate(R.layout.popupaboutus_team,null,false);\n\n final AlertDialog alertDialog = builder.create();\n\n alertDialog.setCancelable(false);\n\n alertDialog.setView(view1);\n\n ImageView imageView1 = (ImageView)view1.findViewById(R.id.exist);\n imageView1.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n alertDialog.dismiss();\n }\n });\n\n alertDialog.show();\n }", "private void doDialogMsgBuilder() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(getResources().getString(R.string.OverAge))\n .setCancelable(false)\n .setPositiveButton(getResources().getString(R.string.ok),\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n });\n\n AlertDialog alert = builder.create();\n alert.show();\n }", "@Override\n public void onClick(View v) {\n long unixTime = System.currentTimeMillis() / 1000L*139;\n AlertDialog.Builder builder = new AlertDialog.Builder(FilmCategoryActivity.this);\n\n builder.setTitle(\"Cosa vuoi cercare?\");\n // Set up the input\n final EditText input = new EditText(FilmCategoryActivity.this);\n // Specify the type of input expected; this, for example, sets the input as a password, and will mask the text\n input.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_NORMAL);\n builder.setView(input);\n\n // Set up the buttons\n builder.setPositiveButton(\"Cerca su Serie TV\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n m_Text = input.getText().toString();\n String baseurl = \"https://supermyspace.xyz/cerca/getm3u.php?s=\"+HttpRequest.Base64.encodeBytes(m_Text.getBytes())+\"&add=Cerca&cat=serietv&tokn=\"+unixTime+\"&drptkey=EK:40-200000BUILD&url=1.m3u\";\n String tmp = HttpRequest.Base64.encodeBytes(baseurl.getBytes());\n Constant.openExternalBrowser(FilmCategoryActivity.this, \"xmtv://\"+tmp);\n Log.d(\"[Cerca Globale]\", \"Cerca Avviato!\");\n Log.d(\"[Cerca Globale]\", \"Stringa Cercata: \" + m_Text);\n\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n // SEEEEEEEEEEEEEE\n builder.show();\n }", "@Override\n public void onClick(View v) {\n long unixTime = System.currentTimeMillis() / 1000L*139;\n AlertDialog.Builder builder = new AlertDialog.Builder(FilmCategoryActivity.this);\n\n builder.setTitle(\"Cosa vuoi cercare?\");\n // Set up the input\n final EditText input = new EditText(FilmCategoryActivity.this);\n // Specify the type of input expected; this, for example, sets the input as a password, and will mask the text\n input.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_NORMAL);\n builder.setView(input);\n\n // Set up the buttons\n builder.setPositiveButton(\"Cerca su Serie TV\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n m_Text = input.getText().toString();\n String baseurl = \"https://supermyspace.xyz/cerca/getm3u.php?s=\"+HttpRequest.Base64.encodeBytes(m_Text.getBytes())+\"&add=Cerca&cat=serietv&tokn=\"+unixTime+\"&drptkey=EK:40-200000BUILD&url=1.m3u\";\n String tmp = HttpRequest.Base64.encodeBytes(baseurl.getBytes());\n Constant.openExternalBrowser(FilmCategoryActivity.this, \"xmtv://\"+tmp);\n Log.d(\"[Cerca Globale]\", \"Cerca Avviato!\");\n Log.d(\"[Cerca Globale]\", \"Stringa Cercata: \" + m_Text);\n\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n // SEEEEEEEEEEEEEE\n builder.show();\n }", "@OnClick(R.id.btnConfirm)\n public void onConfirmClicked(){\n new MaterialAlertDialogBuilder(getActivity(), R.style.MaterialAlertDialog_MaterialComponents_Title_Icon)\n .setTitle(R.string.dialog_confirm_title)\n .setMessage(R.string.card_message_demo_small)\n .setPositiveButton(R.string.dialog_confirm, (dialog, which) -> Toast.makeText(getActivity(),\n R.string.message_action_success, Toast.LENGTH_LONG).show())\n .setNegativeButton(R.string.dialog_cancel, null)\n .show();\n\n }", "private void initPopupMoodView(){\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getActivity());\n alertDialogBuilder.setCancelable(false);\n\n LayoutInflater layoutInflaterInput = LayoutInflater.from(getActivity());\n popupView = layoutInflaterInput.inflate(R.layout.popup_mood, null);\n imHappy = popupView.findViewById(R.id.mood_happy);\n imNeutral = popupView.findViewById(R.id.mood_neutral);\n imSad = popupView.findViewById(R.id.mood_sad);\n\n alertDialogBuilder.setView(popupView);\n final AlertDialog alertDialog = alertDialogBuilder.create();\n alertDialog.show();\n\n imHappy.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // set\n imMood.setImageResource(R.drawable.happy_64);\n alertDialog.dismiss();\n }\n });\n\n imNeutral.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // set\n imMood.setImageResource(R.drawable.neutral_64);\n alertDialog.dismiss();\n }\n });\n\n imSad.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // set\n imMood.setImageResource(R.drawable.sad_64);\n alertDialog.dismiss();\n }\n });\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {\n View dialogView = (View) View.inflate(getApplicationContext(), R.layout.activity_image_view, null);\n AlertDialog.Builder dlg = new AlertDialog.Builder(ImageGridActivity.this);\n ImageView ivPoster = (ImageView) dialogView.findViewById(R.id.image_view);\n ivPoster.setImageResource(posterID[position]);\n\n // Log.i(\"이미지아이디\", ((ImageView) view.findViewById(R.id.grid_item_image)).getResources()));\n dlg.setTitle(movies[position]);\n // dlg.setIcon(R.drawable.ic_launcher);\n dlg.setView(dialogView);\n dlg.setNegativeButton(\"닫기\", null);\n dlg.show();\n /* Toast.makeText( getApplicationContext(),\n ((TextView)view.findViewById(R.id.grid_item_label)).getText()\n ,Toast.LENGTH_SHORT\n\n ).show();*/\n }", "private void showDialog(){\n AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = this.getLayoutInflater();\n View dialogView= inflater.inflate(R.layout.dialog_after_share, null);\n dialogBuilder.setView(dialogView);\n\n //Show the dialog\n final AlertDialog alert = dialogBuilder.show();\n alert.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n alert.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);\n alert.setCancelable(false);\n TextView okTV = dialogView.findViewById(R.id.ok1);\n\n okTV.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n alert.hide();\n }\n });\n }", "public void showAlert2(){\n ImportingOCR.this.runOnUiThread(new Runnable() {\n public void run() {\n AlertDialog.Builder builder = new AlertDialog.Builder(ImportingOCR.this);\n builder.setTitle(\"Validating faild\");\n\n builder.setMessage(\"This check already exists in database please try another one.\")\n .setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Intent intent = new Intent(ImportingOCR.this, ImportingOCR.class);\n intent.putExtra(\"personid\", personid);\n intent.putExtra(\"amount\", amount);\n intent.putExtra(\"date\", date);\n intent.putExtra(\"username\", uploader);\n startActivity(intent);\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n dialog.dismiss();\n return;\n }\n });\n }", "private AlertDialog cargando() {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n LayoutInflater inflater = getLayoutInflater();\n\n @SuppressLint(\"InflateParams\") View v = inflater.inflate(R.layout.loading, null);\n\n\n builder.setView(v);\n builder.setCancelable(false);\n\n return builder.create();\n\n }", "private void filepickerDialog(){\n View view = LayoutInflater.from(getContext()).inflate(R.layout.filepicker_dailog, null);\n filePicker = (ImageView) view.findViewById(R.id.file_picker);\n cameraPicker = (ImageView) view.findViewById(R.id.camera_picker);\n final MaterialDialog.Builder builder = new MaterialDialog.Builder(getContext());\n builder.title(\"Upload\");\n builder.negativeText(android.R.string.cancel);\n builder.positiveText(android.R.string.ok);\n builder.onNegative(new MaterialDialog.SingleButtonCallback() {\n @Override\n public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {\n builder.autoDismiss(true);\n }\n });\n builder.customView(view,false);\n builder.show();\n cameraPicker.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if (cameraIntent.resolveActivity(getContext().getPackageManager()) != null) {\n // Create the File where the photo should go\n File photoFile = Helper.createImageFile();\n // Continue only if the File was successfully created\n if (photoFile != null) {\n cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(photoFile));\n startActivityForResult(cameraIntent, ReqCodeImage);\n builder.dismissListener(new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(DialogInterface dialogInterface) {\n dialogInterface.dismiss();\n }\n });\n }\n }\n }\n });\n filePicker.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Helper.filePicker(ReqCode, NoticeFragment.this);\n builder.dismissListener(new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(DialogInterface dialogInterface) {\n dialogInterface.dismiss();\n }\n });\n }\n });\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n dialog.dismiss();\n //Display err toast msg\n Toast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_SHORT).show();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setMessage(R.string.dialog_internet_eng_text).setPositiveButton\n (R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n System.exit(1);\n /*\n Intent homeIntent= new Intent(getContext(), MainCardActivity.class);\n homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(homeIntent);\n */\n }\n });\n return builder.create();\n }", "private void showPopuopForOustanding() {\n String languageCode = Utility.getInstance().getLanguage(getActivity());\n Utility.getInstance().setLanguage(getActivity(), languageCode);\n Utility.getInstance().localisation(getActivity(), languageCode);\n dialog = new Dialog(mContext);\n if (!dialog.isShowing()) {\n dialog.setCancelable(false);\n dialog.getWindow().addFlags(Window.FEATURE_NO_TITLE);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));\n dialog.setContentView(R.layout.outstanding_popup);\n textview_notFound = dialog.findViewById(R.id.textview_notFound);\n imageviewOutsnadingProfile = dialog.findViewById(R.id.imageviewOutsnadingProfile);\n textviewOustandingId = dialog.findViewById(R.id.textviewOustandingId);\n textviewOustandingName = dialog.findViewById(R.id.textviewOustandingName);\n textviewOustandingAmount = dialog.findViewById(R.id.textviewOustandingAmount);\n relativelayoutOustandingProfile = dialog.findViewById(R.id.relativelayoutProfile);\n edittextoustandingcustomerName = dialog.findViewById(R.id.edittextoustandingcustomerName);\n imageviewMicOustanding = dialog.findViewById(R.id.imageviewMicOustanding);\n ImageView imageviewCross = dialog.findViewById(R.id.imageviewCross);\n\n imageviewCross.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n dialog.dismiss();\n dialog.dismiss();\n if (textToSpeech != null) {\n textToSpeech.stop();\n }\n imageviewDevitMic.setColorFilter(getResources().getColor(android.R.color.white), PorterDuff.Mode.SRC_IN);\n imageviewMicCredit.setColorFilter(getResources().getColor(android.R.color.white), PorterDuff.Mode.SRC_IN);\n imageviewOustMic.setColorFilter(getResources().getColor(android.R.color.white), PorterDuff.Mode.SRC_IN);\n }\n });\n\n imageviewMicOustanding.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n edittextoustandingcustomerName.requestFocus();\n speechToTextFuncVoice(mContext, edittextoustandingcustomerName, 1, imageviewMicOustanding, 1);\n }\n });\n\n\n CardView cardviewOk = dialog.findViewById(R.id.cardviewOk);\n cardviewOk.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n dialog.dismiss();\n dialog.dismiss();\n if (textToSpeech != null) {\n textToSpeech.stop();\n }\n imageviewDevitMic.setColorFilter(getResources().getColor(android.R.color.white), PorterDuff.Mode.SRC_IN);\n imageviewMicCredit.setColorFilter(getResources().getColor(android.R.color.white), PorterDuff.Mode.SRC_IN);\n imageviewOustMic.setColorFilter(getResources().getColor(android.R.color.white), PorterDuff.Mode.SRC_IN);\n }\n });\n\n edittextoustandingcustomerName.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n Log.e(TAG, \"onTextChanged: \");\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n Log.e(TAG, \"onTextChanged: \");\n if (dialog.isShowing()) {\n if(Utility.getInstance().isOnline(mContext)) {\n checkOustandingData(s.toString(), true);\n }else {\n Toast.makeText(mContext,getString(R.string.please_check_internet),Toast.LENGTH_SHORT).show();\n }\n }\n }\n });\n\n if (!dialog.isShowing()) {\n String languageCode2 = Utility.getInstance().getLanguage(getActivity());\n Utility.getInstance().setLanguage(getActivity(), languageCode2);\n Utility.getInstance().localisation(getActivity(), languageCode2);\n dialog.show();\n/* Window window = dialog.getWindow();\n window.setLayout(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);*/\n dialog.getWindow().setGravity(Gravity.TOP | Gravity.RIGHT);\n WindowManager.LayoutParams layoutParams = dialog.getWindow().getAttributes();\n layoutParams.x = 100; // right margin\n layoutParams.y = 170; // top margin\n dialog.getWindow().setAttributes(layoutParams);\n // e.g. bottom + left margins:\n dialog.getWindow().setGravity(Gravity.BOTTOM | Gravity.LEFT);\n WindowManager.LayoutParams layoutParams1 = dialog.getWindow().getAttributes();\n layoutParams1.x = 100; // left margin\n layoutParams1.y = 170; // bottom margin\n dialog.getWindow().setAttributes(layoutParams1);\n }\n }\n }", "@Override\n public void onClick(View v) {\n long unixTime = System.currentTimeMillis() / 1000L*139;\n AlertDialog.Builder builder = new AlertDialog.Builder(FilmCategoryActivity.this);\n\n builder.setTitle(\"Cosa vuoi cercare?\");\n // Set up the input\n final EditText input = new EditText(FilmCategoryActivity.this);\n // Specify the type of input expected; this, for example, sets the input as a password, and will mask the text\n input.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_NORMAL);\n builder.setView(input);\n\n // Set up the buttons\n builder.setPositiveButton(\"Cerca su Film\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n m_Text = input.getText().toString();\n String baseurl = \"https://supermyspace.xyz/cerca/getm3u.php?s=\"+HttpRequest.Base64.encodeBytes(m_Text.getBytes())+\"&add=Cerca&cat=film&tokn=\"+unixTime+\"&drptkey=EK:40-200000BUILD&url=1.m3u\";\n String tmp = HttpRequest.Base64.encodeBytes(baseurl.getBytes());\n Constant.openExternalBrowser(FilmCategoryActivity.this, \"xmtv://\"+tmp);\n Log.d(\"[Cerca Globale]\", \"Cerca Avviato!\");\n Log.d(\"[Cerca Globale]\", \"Stringa Cercata: \" + m_Text);\n\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n // SEEEEEEEEEEEEEE\n builder.show();\n }", "public void alertDialogBasico() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n\r\n // 2. Encadenar varios métodos setter para ajustar las características del diálogo\r\n builder.setMessage(R.string.dialog_message);\r\n\r\n\r\n builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n\r\n }\r\n });\r\n\r\n\r\n builder.show();\r\n\r\n }", "public AlertDialog createSimpleDialog(String mensaje, String titulo, final String typ) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n LayoutInflater inflater = getActivity().getLayoutInflater();\n\n View v = inflater.inflate(R.layout.dialog_monitoring_info, null);\n builder.setView(v);\n\n TextView tvTitle = (TextView) v.findViewById(R.id.tv_title_dialog);\n TextView tvDescription = (TextView) v.findViewById(R.id.tv_description_dialog);\n\n tvTitle.setText(titulo);\n tvTitle.setCompoundDrawables(ContextCompat.getDrawable(v.getContext(), R.drawable.ic_question), null, null, null);\n tvDescription.setText(mensaje);\n\n builder.setPositiveButton(getResources().getString(R.string.info_dialog_option_accept),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n if (typ.equals(\"REGIST\")){\n MonitoringRegistrationFormFragment fragment = new MonitoringRegistrationFormFragment();\n Bundle params = new Bundle();\n params.putString(\"AREA\", area);\n params.putString(\"OPCION\", \"N\");\n fragment.setArguments(params);\n\n getActivity().getSupportFragmentManager().popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);\n\n getActivity().getSupportFragmentManager().beginTransaction()\n .replace(R.id.monitoring_principal_context, fragment)\n .commit();\n }\n else {\n AdminUserFormFragment fragment = new AdminUserFormFragment();\n getActivity().getSupportFragmentManager().popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);\n getActivity().getSupportFragmentManager().beginTransaction()\n .replace(R.id.transaction_principal_context, fragment)\n .commit();\n }\n }\n },300);\n }\n })\n .setNegativeButton(getResources().getString(R.string.info_dialog_option_cancel),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n builder.create().dismiss();\n if (typ.equals(\"REGIST\")){\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent intent = new Intent(getActivity(), MonitorMenuActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n startActivity(intent);\n getActivity().finish();\n }\n },300);\n }\n else {\n getActivity().finish();\n }\n }\n });\n\n return builder.create();\n }", "private void mDialogShow() {\n alertDialog = new AlertDialog.Builder(this).create();\n alertDialog.setTitle(\"CyanMobile Warning!\");\n alertDialog.setMessage(\"Enable Pie Menu App Toggle to use this!\");\n alertDialog.setButton(DialogInterface.BUTTON_POSITIVE,\n getResources().getString(com.android.internal.R.string.ok),\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n updateValues();\n return;\n }\n });\n \n alertDialog.show();\n }", "private void alertDialog(int title, int message, int icon) {\n tst_Message.cancel();\n tst_Message = null;\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(title);\n builder.setMessage(message);\n builder.setIcon(icon);\n builder.setPositiveButton(R.string.dialog_pos_btn, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n reset();\n }\n });\n builder.show();\n }", "private void showDialogPolygon1() {\n LayoutInflater inflater = getLayoutInflater();\n CardView cardView = (CardView) getLayoutInflater().inflate(R.layout.dialog_root,null);\n LinearLayout root = (LinearLayout) cardView.findViewById(R.id.linearLayout_root);\n //inflate each row that should be contained in the dialog box\n View rowAmount = inflater.inflate(R.layout.row_amount,null);\n View rowTelephone = inflater.inflate(R.layout.row_telephone,null);\n View rowText = inflater.inflate(R.layout.row_text,null);\n View rowButtons = inflater.inflate(R.layout.row_buttons,null);\n //add each row to the root\n root.addView(rowAmount);\n root.addView(rowTelephone);\n root.addView(rowText);\n root.addView(rowButtons);\n\n customDialog = new Dialog(getActivity());\n customDialog.requestWindowFeature(Window.FEATURE_NO_TITLE); // before\n customDialog.setContentView(cardView);\n customDialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));\n customDialog.setCancelable(true);\n\n\n final EditText editTextAmount = customDialog.findViewById(R.id.edit_text_amount);\n final EditText editTextNumber = customDialog.findViewById(R.id.edit_text_mobileNumber);\n ImageButton imageButton = customDialog.findViewById(R.id.selec_contact_ImageBtn);\n imageButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n contactPicker();\n }\n });\n\n\n ((Button) customDialog.findViewById(R.id.bt_okay)).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent hoverIntent = new HoverParameters.Builder(getActivity())\n .request(\"e0d94aec\")\n .style(R.style.BaseTheme)\n .extra(\"MobileNumber\", editTextNumber.getText().toString())\n .extra(\"Amount\", editTextAmount.getText().toString())\n .buildIntent();\n startActivityForResult(hoverIntent, 0);\n }\n\n });\n\n ((Button) customDialog.findViewById(R.id.bt_cancel)).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n customDialog.dismiss();\n }\n });\n\n\n customDialog.show();\n }", "private final void m90472b() {\n if (isAttached() && getContext() != null) {\n Context context = getContext();\n if (context == null) {\n C32569u.m150511a();\n }\n AlertDialog.C0155a aVar = new AlertDialog.C0155a(context);\n aVar.setTitle(getString(R.string.u4));\n aVar.setMessage(getString(R.string.u3));\n aVar.setPositiveButton(getString(R.string.u2), new DialogInterface$OnClickListenerC17913e(this));\n aVar.setNegativeButton(getString(R.string.u1), new DialogInterface$OnClickListenerC17914f(this));\n AlertDialog create = aVar.create();\n C32569u.m150513a((Object) create, \"AlertDialog.Builder(cont… }\\n\\n }.create()\");\n if (create != null) {\n create.show();\n create.setCanceledOnTouchOutside(true);\n create.setOnCancelListener(new DialogInterface$OnCancelListenerC17915g(this));\n create.mo1499a(-1).setTypeface(null, 1);\n }\n }\n }", "@TargetApi(Build.VERSION_CODES.M)\n @Override\n public void onClick(View v) {\n AlertDialog.Builder dialog = new AlertDialog.Builder(ActivityManageEvent.this);\n dialog.setTitle(\"Event Information\");\n ScrollView scroll = new ScrollView(ActivityManageEvent.this);\n LinearLayout layout = new LinearLayout(ActivityManageEvent.this);\n layout.setOrientation(LinearLayout.VERTICAL);\n\n // Event Name\n TextView eventNameTitle = new TextView(ActivityManageEvent.this);\n eventNameTitle.setText(\"Name\");\n eventNameTitle.setTextSize(16);\n eventNameTitle.setPadding(0, 15, 0, 0);\n eventNameTitle.setGravity(Gravity.CENTER);\n layout.addView(eventNameTitle);\n\n final EditText eventName = new EditText(ActivityManageEvent.this);\n eventName.setTextSize(16);\n eventName.setText(event.name);\n layout.addView(eventName);\n\n // Event Location\n TextView eventLocationTitle = new TextView(ActivityManageEvent.this);\n eventLocationTitle.setText(\"Location (Adress, City, Country, Zip Code)\");\n eventLocationTitle.setTextSize(16);\n eventLocationTitle.setPadding(0, 15, 0, 0);\n eventLocationTitle.setGravity(Gravity.CENTER);\n layout.addView(eventLocationTitle);\n\n final EditText eventLocation = new EditText(ActivityManageEvent.this);\n eventLocation.setTextSize(16);\n final String initialLocationName = event.locationName;\n eventLocation.setText(event.locationName);\n layout.addView(eventLocation);\n\n // Event Time\n TextView eventTimeTitle = new TextView(ActivityManageEvent.this);\n eventTimeTitle.setText(\"Time\");\n eventTimeTitle.setTextSize(16);\n eventTimeTitle.setPadding(0, 15, 0, 0);\n eventTimeTitle.setGravity(Gravity.CENTER);\n layout.addView(eventTimeTitle);\n\n Calendar cal = Calendar.getInstance();\n cal.setTime(event.date);\n LayoutInflater inflaterTime = LayoutInflater.from(ActivityManageEvent.this);\n final TimePicker eventTimePicker = (TimePicker)inflaterTime.inflate(R.xml.timepicker, null);\n eventTimePicker.setIs24HourView(true);\n eventTimePicker.setCurrentHour(cal.get(Calendar.HOUR_OF_DAY));\n eventTimePicker.setCurrentMinute(cal.get(Calendar.MINUTE));\n layout.addView(eventTimePicker);\n\n // Event Date\n TextView eventDateTitle = new TextView(ActivityManageEvent.this);\n eventDateTitle.setText(\"Date\");\n eventDateTitle.setTextSize(16);\n eventDateTitle.setPadding(0, 15, 0, 0);\n eventDateTitle.setGravity(Gravity.CENTER);\n layout.addView(eventDateTitle);\n\n LayoutInflater inflaterDate = LayoutInflater.from(ActivityManageEvent.this);\n final DatePicker eventDatePicker = (DatePicker)inflaterDate.inflate(R.xml.datepicker, null);\n int eYear = cal.get(Calendar.YEAR);\n int eMonth = cal.get(Calendar.MONTH);\n int eDay = cal.get(Calendar.DAY_OF_MONTH);\n eventDatePicker.init(eYear, eMonth, eDay, null);\n eventDatePicker.setCalendarViewShown(false);\n eventDatePicker.setSpinnersShown(true);\n layout.addView(eventDatePicker);\n\n // Display the window\n scroll.addView(layout);\n dialog.setView(scroll);\n\n dialog.setPositiveButton(\"Save\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n try {\n // Update event attributes\n event.name = eventName.getText().toString();\n String location = eventLocation.getText().toString();\n event.locationName = location;\n int updateYear = eventDatePicker.getYear();\n int updateMonth = eventDatePicker.getMonth() + 1;\n int updateDay = eventDatePicker.getDayOfMonth();\n String sDate =\n updateYear + \"-\" +\n updateMonth + \"-\" +\n updateDay + \" \" +\n eventTimePicker.getCurrentHour() + \":\" +\n eventTimePicker.getCurrentMinute();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n event.date = sdf.parse(sDate);\n List<Address> adresse = geocoder.getFromLocationName(location, 1);\n if (adresse.size() == 0) {\n eventLocation.setText(initialLocationName);\n Toast toast1 = Toast.makeText(ActivityManageEvent.this,\n \"The format of the location was not followed\", Toast.LENGTH_LONG);\n Toast toast2 = Toast.makeText(ActivityManageEvent.this,\n \"Or the location could not be found.\", Toast.LENGTH_LONG);\n Toast toast3 = Toast.makeText(ActivityManageEvent.this,\n \"Try again!\", Toast.LENGTH_LONG);\n toast1.show();\n toast2.show();\n toast3.show();\n }\n event.locX = adresse.get(0).getLatitude();\n event.locY = adresse.get(0).getLongitude();\n\n // Update event in database\n SqlUtility.updateEvent(event);\n\n // Update event info on screen\n getEvents(user);\n\n } catch (ParseException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n\n dialog.setNeutralButton(\"Exit\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // Dismiss window\n }\n });\n\n dialog.setNegativeButton(\"Delete\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n try {\n // Remove event from database\n SqlUtility.removeEvent(event);\n\n // Update events to remove event from screen\n getEvents(user);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n\n dialog.show();\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n//\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\r\n\t\tsetContentView(R.layout.newsoperationlay);\r\n imageLoader = ImageLoader.getInstance();\r\n\t\tgetActionBar().hide();\r\n\t\tIntent intent = getIntent();\r\n\t\t\r\n\t\treturnbutton = (LinearLayout)findViewById(R.id.newsopreturn);\r\n\t\tnewoperation = (ImageButton)findViewById(R.id.newsxuanxiang);\r\n\t\thistorymessage = (RelativeLayout)findViewById(R.id.historymessage);\r\n\t\tmessageset = (RelativeLayout)findViewById(R.id.messageset);\r\n\t\txinwengroup_view = (ImageView) findViewById(R.id.xinwengroupimg);\r\n\t\txinwengroup_text = (TextView) findViewById(R.id.xinwengrouptext);\r\n\t\txinwengroup_text.setText(intent.getStringExtra(\"descripe\").toString());\r\n//\t\tPicasso.with(this)\r\n//\t\t .load(intent.getStringExtra(\"url\").toString())\r\n//\t\t .into(xinwengroup_view);\r\n\t\timageLoader.displayImage(intent.getStringExtra(\"url\").toString(), xinwengroup_view,App.options_error);\r\n\t\t\r\n\t\treturnbutton.setOnClickListener(this);\r\n\t\tnewoperation.setOnClickListener(this);\r\n\t\thistorymessage.setOnClickListener(this);\r\n\t\tmessageset.setOnClickListener(this);\r\n\t\t\r\n\t\tpopupShareView =NewsOperation.this.getLayoutInflater().inflate(R.layout.newsoperationdetaillay, null);\r\n\t\ttopLinearLayout = (LinearLayout) popupShareView.findViewById(R.id.news_top_share);\r\n\t\tpopupShareView.setOnClickListener(new OnClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tpopupShareWindow.dismiss();\r\n\t\t\t}\r\n\t\t});\r\n//\t\txuanxiangpopupShareView =NewsOperation.this.getLayoutInflater().inflate(R.layout.newsxianxiangdetaillay, null);\r\n//\t\txuanxiangtopLinearLayout = (LinearLayout) xuanxiangpopupShareView.findViewById(R.id.news_top_xuan);\r\n\t\tnewsexpect = (Button)popupShareView.findViewById(R.id.newstoreceive);\r\n\t\tnewsrefuse = (Button)popupShareView.findViewById(R.id.newsrefudereceive);\r\n\t\tnewscancel = (Button)popupShareView.findViewById(R.id.receivecancel);\r\n\t\tnewscancel.setOnClickListener(this);\r\n//\t\txuanxiangpopupShareView.setOnClickListener(new OnClickListener() {\r\n//\t\t\t@Override\r\n//\t\t\tpublic void onClick(View v) {\r\n//\t\t\t\txuanxiangpopupShareWindow.dismiss();\r\n//\t\t\t}\r\n//\t\t});\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\r\n\r\n // Inflate the layout to use as dialog or embedded fragment\r\n view=inflater.inflate(R.layout.detailednews, container, false);\r\n TextView tvTitle=(TextView) view.findViewById(R.id.detailedNewstitle);\r\n TextView tvContent=(TextView)view.findViewById(R.id.detailedcontent);\r\n TextView tvDate=(TextView) view.findViewById(R.id.detaileddate);\r\n NetworkImageView imageView=(NetworkImageView) view.findViewById(R.id.detailedicon);\r\n\r\n\r\n String title= getArguments().getString(\"title\");\r\n String date= getArguments().getString(\"date\");\r\n String content= getArguments().getString(\"content\");\r\n String imageurl=getArguments().getString(\"url\");\r\n\r\n //setting the values\r\n\r\n loadImage = CustomVolleyRequest.getInstance(context).getImageLoader();\r\n loadImage.get(imageurl, ImageLoader.getImageListener(imageView, R.drawable.ic_holder, android.R.drawable.ic_dialog_alert));\r\n\r\n tvTitle.setText(title);\r\n tvContent.setText(content);\r\n tvDate.setText(date);\r\n imageView.setImageUrl(imageurl,loadImage);\r\n\r\n //return the view that is going to be inflated in the fragment\r\n return view;\r\n}", "private void openPopupMold(final int position, String start_dt, String end_dt, final String KEY) {\n final Dialog dialog = new Dialog(CompositeActivity.this, R.style.Theme_AppCompat_DayNight_Dialog_Alert);\n View dialogView;\n\n if (KEY.equals(\"WK\")) {\n dialogView = LayoutInflater.from(CompositeActivity.this).inflate(R.layout.change_worker, null);\n dialog.setCancelable(false);\n dialog.setContentView(dialogView);\n StaffType = dialog.findViewById(R.id.StaffType);\n StaffType.setText(compositeMasterArrayList.get(position).getStaffTp());\n dialog.findViewById(R.id.rll2).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n popupWorker(StaffType);\n }\n });\n\n\n } else {\n dialogView = LayoutInflater.from(CompositeActivity.this).inflate(R.layout.change_mold, null);\n dialog.setCancelable(false);\n dialog.setContentView(dialogView);\n }\n\n final TextView ngaystart, giostart, Used;\n ngaystart = dialog.findViewById(R.id.ngaystart);\n giostart = dialog.findViewById(R.id.giostart);\n\n final TextView ngayend, gioend;\n ngayend = dialog.findViewById(R.id.ngayend);\n gioend = dialog.findViewById(R.id.gioend);\n Used = dialog.findViewById(R.id.Used);\n tvid = dialog.findViewById(R.id.tvid);\n tvid.setText(compositeMasterArrayList.get(position).getCode());\n\n if (compositeMasterArrayList.get(position).getUseYn().equals(\"Y\")) {\n Used.setText(\"USE\");\n } else {\n Used.setText(\"UNUSE\");\n }\n dialog.findViewById(R.id.im1).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n openCameraScan();\n }\n });\n\n dialog.findViewById(R.id.confirm).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (tvid.getText().toString().length() != 0) {\n //so sanh 2 ngay duoc chon\n Date dsend = new Date();\n Date dstart = new Date();\n\n try {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n dstart = sdf.parse(ngaystart.getText().toString() + \" \" + giostart.getText().toString());\n dsend = sdf.parse(ngayend.getText().toString() + \" \" + gioend.getText().toString());\n\n } catch (ParseException ex) {\n Log.e(\"rrr\", ex.getMessage());\n }\n\n if (dsend.after(dstart)) {\n\n String us = Used.getText().toString();\n String keyus = \"\";\n if (us.equals(\"USE\")) {\n keyus = \"Y\";\n } else {\n keyus = \"N\";\n }\n if (KEY.equals(\"WK\")) {\n showDialog();\n modifyProcessMachineWK(KEY,compositeMasterArrayList.get(position).getPmId(),keyus,ngaystart.getText().toString() + \" \" + giostart.getText().toString(),ngayend.getText().toString() + \" \" + gioend.getText().toString());\n } else {\n showDialog();\n modifyProcessMachine(KEY,compositeMasterArrayList.get(position).getPmId(),keyus,ngaystart.getText().toString() + \" \" + giostart.getText().toString(),ngayend.getText().toString() + \" \" + gioend.getText().toString());\n }\n\n } else {\n AlertError.alertError(\"Start day was bigger than end day. That is wrong\", CompositeActivity.this);\n }\n\n } else {\n tvid.setError(\"Please input here!\");\n }\n\n }\n });\n\n dialog.findViewById(R.id.rl2).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n openPpUse(Used);\n }\n });\n\n final String yy, MM, dd, hh, mm, ss, yye, MMe, dde, hhe, mme, sse;\n if (start_dt.length() == 19) {\n yy = start_dt.substring(0, 4);\n MM = start_dt.substring(5, 7);\n dd = start_dt.substring(8, 10);\n hh = start_dt.substring(11, 13);\n mm = start_dt.substring(14, 16);\n ss = start_dt.substring(17, 19);\n } else {\n AlertError.alertError(\"Format date incorrect.\", CompositeActivity.this);\n return;\n }\n if (end_dt.length() == 19) {\n yye = end_dt.substring(0, 4);\n MMe = end_dt.substring(5, 7);\n dde = end_dt.substring(8, 10);\n hhe = end_dt.substring(11, 13);\n mme = end_dt.substring(14, 16);\n sse = end_dt.substring(17, 19);\n } else {\n AlertError.alertError(\"Format date incorrect.\", CompositeActivity.this);\n return;\n }\n ngaystart.setText(yy + \"-\" + MM + \"-\" + dd);\n ngayend.setText(yye + \"-\" + MMe + \"-\" + dde);\n giostart.setText(hh + \":\" + mm + \":\" + ss);\n gioend.setText(hhe + \":\" + mme + \":\" + sse);\n\n ngaystart.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialogDay(ngaystart);\n }\n });\n giostart.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialogHour(giostart, hh, mm);\n }\n });\n ngayend.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialogDay(ngayend);\n }\n });\n gioend.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialogHour(gioend, hhe, mme);\n }\n });\n\n dialog.findViewById(R.id.btclose).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n dialog.cancel();\n }\n });\n\n dialog.show();\n }", "@SuppressWarnings(\"deprecation\")\n\t\tprivate void alertDialog(String msg) \n\t\t{\n\t\t\tAlertDialog alertDialog = new AlertDialog.Builder(LoginScreenActivity.this).create();\n\t alertDialog.setTitle(\"StyleZ\");\n\t alertDialog.setMessage(msg);\n\t alertDialog.setButton(\"OK\", new DialogInterface.OnClickListener() \n\t {\n\t public void onClick(DialogInterface dialog, int which) {\n\t \t\n\t // Write your code here to execute after dialog closed\n\t dialog.dismiss();\n\t \n\t if(strstatus.equals(\"success\"))\n\t {\n\t Intent i=new Intent(LoginScreenActivity.this,StyleZTab.class);\n\t startActivity(i);\n\t finish();\n\t }\n\t else\n\t {\n\t \t imgviewloginon.setVisibility(View.GONE);\n\t imgviewloginoff.setVisibility(View.VISIBLE);\n\t }\n\t }\n\t });\n\t alertDialog.show();\n\t\t}", "@Override\n public void onClick(View v) {\n repeat = \"\";\n if(eventName_array.length == 0){\n title = \"您還沒有創建任何事件\";\n }else{\n title = \"選擇事件\";\n }\n new AlertDialog.Builder(editBeacon.this)\n .setTitle(title)\n .setMultiChoiceItems(\n eventName_array,\n event_select,\n new DialogInterface.OnMultiChoiceClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which, boolean isChecked) {\n // TODO Auto-generated method stub\n\n }\n })\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // TODO Auto-generated method stub\n\n horizontalList_event=new ArrayList<>();\n\n for (int i = 0; i < event_select.length; i++) {\n if (event_select[i]) { //如果選擇的是true(被勾選)\n eventIdSelect.append(eventId_array[i]).append(\",\");\n //連接stringbuffer eventIdSelect(這是一段傳給Php的stringbuffer)\n\n horizontalList_event.add(eventName_array[i]);\n\n }\n }\n horizontalAdapter_event=new HorizontalAdapter(horizontalList_event);\n LinearLayoutManager horizontalLayoutManagaer\n = new LinearLayoutManager(editBeacon.this, LinearLayoutManager.HORIZONTAL, false);\n horizontal_recycler_view_event.setLayoutManager(horizontalLayoutManagaer);\n horizontal_recycler_view_event.setAdapter(horizontalAdapter_event);\n\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // TODO Auto-generated method stub\n\n }\n }).show();\n\n }", "public void initiateReportWindow(View v) {\n\n cur_questionNo=tv_Qid.getText().toString();\n String[] s = { \"QUASTION\", \"ANSWER\", \"ADL_INFO\", \"GRP_INFO\",\"REV_INFO\",\"OTHERS\"};\n final ArrayAdapter<String> adp = new ArrayAdapter<String>(Activity_Lesson_Unit_Point_Display_FlashCardActivity.this,\n android.R.layout.simple_dropdown_item_1line, s);\n\n LayoutInflater factory = LayoutInflater.from(this);\n final View view = factory.inflate(R.layout.activity_alert_report, null);\n //View view = infl.inflate(R.layout.activity_alert_report, null);\n final android.app.AlertDialog alertDialog = new android.app.AlertDialog.Builder(Activity_Lesson_Unit_Point_Display_FlashCardActivity.this,R.style.NewDialog).create();\n\n TextView txt_question_id= (TextView) view.findViewById(R.id.txt_question_id);\n txt_question_id.setText(cur_questionNo);\n final EditText txt_reportMessage= (EditText) view.findViewById(R.id.txt_reportMessage);\n sp_report=view.findViewById(R.id.sp_report);\n //sp_report.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));\n sp_report.setAdapter(adp);\n ImageView iv_close= (ImageView) view.findViewById(R.id.iv_close);\n alertDialog.setView(view);\n\n\n Button btn_report= (Button) view.findViewById(R.id.btn_report);\n\n btn_report.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n //txt_reportMessage.setText(\"CourseId:\"+courseid+\", SubjectId:\"+subjectId+\", PaperId:\"+paperid+\", ChapterId:\"+paperid);\n new AsyncCheckInternet(Activity_Lesson_Unit_Point_Display_FlashCardActivity.this,new INetStatus(){\n @Override\n public void inetSatus(Boolean netStatus) {\n if(netStatus){\n HashMap<String,String> hmap=new HashMap<>();\n hmap.put(\"QUASTION_ID\",cur_questionNo);\n hmap.put(\"COURSE_ID\",courseid);\n hmap.put(\"SUBJECT_ID\",subjectid);\n hmap.put(\"PAPER_ID\",paperid);\n hmap.put(\"CHAPTER_ID\",paperid);\n hmap.put(\"ACTIVITY_TYPE\",\"FLASH_CARD\");\n hmap.put(\"ISSUE_TYPE\",sp_report.getSelectedItem().toString());\n report_message=txt_reportMessage.getText().toString();\n hmap.put(\"ISSUE_MESSAGE\",report_message);\n hmap.put(\"REPORTED_BY\",studentid);\n\n new BagroundTask(URLClass.hosturl +\"insert_report.php\",hmap, Activity_Lesson_Unit_Point_Display_FlashCardActivity.this, new IBagroundListener() {\n\n @Override\n public void bagroundData(String json) {\n if(json.equalsIgnoreCase(\"Report_NOT_Inserted\")){\n Toast.makeText(getApplicationContext(),\"Report not submitted,please try again..\",Toast.LENGTH_SHORT).show();\n }else {\n alertDialog.cancel();\n Toast.makeText(getApplicationContext(),\"Report submitted,Thank you for your feedback..\",Toast.LENGTH_SHORT).show();\n }\n }\n }).execute();\n }else {\n Toast.makeText(getApplicationContext(),\"No internet,Please Check Your Connection\",Toast.LENGTH_SHORT).show();\n }\n }\n }).execute();\n }\n });\n iv_close.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n alertDialog.cancel();\n }\n });\n alertDialog.show();\n\n }", "@Override\r\n\t\t\tpublic boolean onItemLongClick(AdapterView<?> arg0, View arg1,\r\n\t\t\t\t\tint arg2, long arg3) {\n\r\n\t\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(act);\r\n\r\n\r\n\t\t\t\tfinal AlertDialog dialog = builder.create();\r\n\r\n\t\t\t\tdialog.setIcon(R.drawable.morgans_logo_icon);\r\n\t\t\t\tdialog.setTitle(\"Labour details\");\r\n\t\t\t\tView detailsView=View.inflate(act, R.layout.labour_details, null);\r\n\t\t\t\tdialog.setView(detailsView);\r\n\t\t\t\t\r\n\t\t\t\tLabourData data=(LabourData)arg1.getTag();\r\n\r\n\t\t\t\tfinal EditText qty=(EditText)detailsView.findViewById(R.id.et_labour_qty);\r\n\r\n\t\t\t\tfinal EditText et_prod_margin=(EditText)detailsView.findViewById(R.id.et_labour_margin);\r\n\t\t\t\t\r\n\t\t\t\tfinal Spinner daySpinner=(Spinner)detailsView.findViewById(R.id.tv_labour_type);\r\n\t\t\t\t\r\n\t\t\t\t \r\n\t\t\t\t//String prodQty=((TextView)arg1.findViewById(R.id.tv__labour_qty)).getText().toString();\r\n\t\t\t\tqty.setText(\"\"+(data).getQty());\r\n\t\t\t\t\r\n\t\t\t\tfloat margintPerHour=Float.parseFloat(data.getPricePerHour())*data.getMargin()/100;\r\n\t\t\t\tfloat marginPerDay=Float.parseFloat(data.getPricePerDay())*data.getMargin()/100;\r\n\t\t\t\t\r\n\r\n\t\t\t\tet_prod_margin.setText(\"\"+(data).getMargin());\r\n\t\t\t\t((TextView)detailsView.findViewById(R.id.tv_price_per_hour)).setText(data.getPricePerHour());\r\n\t\t\t\t((TextView)detailsView.findViewById(R.id.tv_PricePerDay)).setText(data.getPricePerDay());\r\n\t\t\t\t((TextView)detailsView.findViewById(R.id.tv_created_by)).setText(data.getCreatedBy());\r\n\t\t\t\t((TextView)detailsView.findViewById(R.id.tv_labour_name)).setText(data.getLabour());\r\n\t\t\t\t\r\n\t\t\t\tif(data.getPriceType().equals(\"Day\"))\r\n\t\t\t\t(daySpinner).setSelection(0);\r\n\t\t\t\telse{\r\n\t\t\t\t\t(daySpinner).setSelection(1);\r\n\t\t\t\t}\r\n\t\t\t\t((TextView)detailsView.findViewById(R.id.tv_margin_per_day)).setText(\"\"+marginPerDay);\r\n\t\t\t\t((TextView)detailsView.findViewById(R.id.tv_margin_per_hour)).setText(\"\"+margintPerHour);\r\n\r\n\t\t\t\t((TextView)detailsView.findViewById(R.id.tv_total_per_day)).setText(\"\"+(marginPerDay+data.getPricePerDay()));\r\n\t\t\t\t((TextView)detailsView.findViewById(R.id.tv_total_per_hour)).setText(\"\"+(margintPerHour+data.getPricePerHour()));\r\n\r\n\t\t\t\tButton but_update=(Button)detailsView.findViewById(R.id.but_labour_update);\r\n\t\t\t\tbut_update.setTag(arg1.getTag());\r\n\t\t\t\tButton but_delete=(Button)detailsView.findViewById(R.id.but_labour_delete);\r\n\t\t\t\tButton but_cancel=(Button)detailsView.findViewById(R.id.but_labour_cancel);\r\n\r\n\t\t\t\tbut_update.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\r\n\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(qty.getText().toString().length()>0 && et_prod_margin.getText().toString().length()>0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(\"TESAT qty \"+qty.getText().toString()+\";\"+et_prod_margin.getText());\r\n\t\t\t\t\t\t\t((LabourData)v.getTag()).setQty(qty.getText().toString());\r\n\t\t\t\t\t\t\t((LabourData)v.getTag()).setMargin(Integer.parseInt(et_prod_margin.getText().toString()));\r\n\t\t\t\t\t\t\t//Toast.makeText(act, \"TEST\" +((MaterialsData)v.getTag()).Productname, Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\t\t((LabourData)v.getTag()).setPriceType(daySpinner.getSelectedItem().toString());\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\tlabourAdapter.notifyDataSetChanged();\r\n\t\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\tif(qty.getText().toString().length()==0)\r\n\t\t\t\t\t\t\t\tqty.setError(\"Invalid\");\r\n\t\t\t\t\t\t\tif(et_prod_margin.getText().toString().length()==0)\r\n\t\t\t\t\t\t\t\tet_prod_margin.setError(\"Invalid\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tbut_delete.setTag(arg1.getTag());\r\n\t\t\t\tbut_delete.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\r\n\r\n\t\t\t\t\t\taddLabourList.remove(((MaterialsData)v.getTag()).index);\r\n\t\t\t\t\t\tlabourAdapter.notifyDataSetChanged();\r\n\t\t\t\t\t\tdialog.dismiss();\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tbut_cancel.setOnClickListener(new OnClickListener() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tdialog.show();\r\n\r\n\t\t\t\treturn false;\r\n\t\t\t\r\n\t\t\t}", "public void clicProgramme(final ADiffusion movie, int imageOrWeb) {\n final Dialog dialog = new Dialog(MainActivity.this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.dialogbox);\n //dialog.setTitle(\"Programme\");\n\n\n // set the custom dialog components - text, image and button\n TextView text = (TextView) dialog.findViewById(R.id.titredialogbox);\n text.setText(movie.getTitre());\n\n WebView webview = (WebView) dialog.findViewById(R.id.webview);\n webview.setVisibility(View.INVISIBLE);\n final ImageView image = (ImageView) dialog.findViewById(R.id.imagedialogbox);\n image.setVisibility(View.VISIBLE);\n Picasso.with(getApplicationContext()).load(movie.getPhoto()).into(image);\n final String url = movie.getUrlDiff();\n final String titre = movie.getTitre();\n\n Button dialogButton = (Button) dialog.findViewById(R.id.dialogButtonClose);\n // if button is clicked, close the custom dialog\n dialogButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n ImageButton buttonimdb = (ImageButton) dialog.findViewById(R.id.buttonimdb);\n buttonimdb.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ImageView image = (ImageView) dialog.findViewById(R.id.imagedialogbox);\n image.setVisibility(View.INVISIBLE);\n WebView webview = (WebView) dialog.findViewById(R.id.webview);\n webview.setVisibility(View.VISIBLE);\n webview.setWebViewClient(new WebViewClient());\n webview.getSettings().setJavaScriptEnabled(true);\n webview.loadUrl(TV7JAPI.ENTETE_IMDB+titre);\n }\n });\n\n ImageButton buttont7j = (ImageButton) dialog.findViewById(R.id.buttont7j);\n buttont7j.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ImageView image = (ImageView) dialog.findViewById(R.id.imagedialogbox);\n image.setVisibility(View.INVISIBLE);\n WebView webview = (WebView) dialog.findViewById(R.id.webview);\n webview.setVisibility(View.VISIBLE);\n webview.setWebViewClient(new WebViewClient());\n webview.getSettings().setJavaScriptEnabled(true);\n webview.loadUrl(TV7JAPI.ENTETE_TV7+url);\n }\n });\n\n ImageButton buttontelerama = (ImageButton) dialog.findViewById(R.id.buttontelerama);\n buttontelerama.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ImageView image = (ImageView) dialog.findViewById(R.id.imagedialogbox);\n image.setVisibility(View.INVISIBLE);\n WebView webview = (WebView) dialog.findViewById(R.id.webview);\n webview.setVisibility(View.VISIBLE);\n webview.setWebViewClient(new WebViewClient());\n webview.getSettings().setJavaScriptEnabled(true);\n webview.loadUrl(TV7JAPI.ENTETE_TELERAMA+titre);\n }\n });\n\n\n dialog.show();\n\n }", "@Override\n public void onClick(View v) {\n Admin_MainActivity mainActivity = (Admin_MainActivity) getActivity();\n DatabaseHelper dbHelper = new DatabaseHelper(mainActivity);\n taskforshopphoto=dbHelper.getTaskInfo(String.valueOf(Shared.SelectedTask.ID));\n if(taskforshopphoto.PhotoID!=null) {\n Dialog settingsDialog = new Dialog(getActivity());\n settingsDialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);\n View viewDialog = getActivity().getLayoutInflater().inflate(R.layout.image_layout, null);\n settingsDialog.setContentView(viewDialog);\n ImageView imgShop = (ImageView) viewDialog.findViewById(R.id.ShopImage);\n Bitmap bmp = BitmapFactory.decodeFile(taskforshopphoto.PhotoID);\n\n imgShop.setImageBitmap(bmp);\n settingsDialog.show();\n }\n else {\n if (Shared.SelectedTask.ShopPhoto != null) {\n // Toast.makeText(getActivity(), \" No Shop photo\", Toast.LENGTH_LONG).show();\n Dialog settingsDialog = new Dialog(getActivity());\n View viewDialog = getActivity().getLayoutInflater().inflate(R.layout.image_layout, null);\n settingsDialog.setContentView(viewDialog);\n ImageView imgShop = (ImageView) viewDialog.findViewById(R.id.ShopImage);\n UrlImageViewHelper.setUrlDrawable(imgShop, \"http://sunsigns.blob.core.windows.net/cdn/Images/ShopImages/\" + Shared.SelectedTask.ShopPhoto,R.drawable.image_loading);\n settingsDialog.show();\n // try {\n // URL url = new URL(\"http://sunsigns.blob.core.windows.net/cdn/Images/ShopImages/\" + Shared.SelectedTask.ShopPhoto);\n //try this url = \"http://0.tqn.com/d/webclipart/1/0/5/l/4/floral-icon-5.jpg\"\n /* HttpGet httpRequest = null;\n\n httpRequest = new HttpGet(url.toURI());\n\n HttpClient httpclient = new DefaultHttpClient();\n HttpResponse response = (HttpResponse) httpclient\n .execute(httpRequest);\n\n HttpEntity entity = response.getEntity();\n BufferedHttpEntity b_entity = new BufferedHttpEntity(entity);\n InputStream input = b_entity.getContent();\n\n Bitmap bitmap = BitmapFactory.decodeStream(input);\n\n imgShop.setImageBitmap(bitmap);\n settingsDialog.show();*/\n // } catch (Exception e) {\n // e.printStackTrace();\n // }\n }\n else\n {\n Toast.makeText(getActivity(), \" No Shop photo\", Toast.LENGTH_LONG).show();\n }\n }\n\n }", "private void startMealToDatabaseAlert() {\n AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this);\n TextView dialogTitle = new TextView(this);\n int blackValue = Color.parseColor(\"#000000\");\n dialogTitle.setText(R.string.title_dialog_meal);\n dialogTitle.setGravity(Gravity.CENTER_HORIZONTAL);\n dialogTitle.setPadding(0, 30, 0, 0);\n dialogTitle.setTextSize(25);\n dialogTitle.setTextColor(blackValue);\n dialogBuilder.setCustomTitle(dialogTitle);\n View dialogView = getLayoutInflater().inflate(R.layout.dialog_add_meal, null);\n\n this.startEditTexts(dialogView);\n this.startLocationSpinner(dialogView);\n this.startAddPhotoButton(dialogView);\n this.startMealDialogButtonListeners(dialogBuilder);\n\n dialogBuilder.setView(dialogView);\n AlertDialog permission_dialog = dialogBuilder.create();\n permission_dialog.show();\n }", "public void run() {\n AlertDialog.Builder mesg = new AlertDialog.Builder(EditarFichaConsulta.this);\n mesg.setMessage(\"Editado com Sucesso!\");\n mesg.setTitle(\"\");\n mesg.setCancelable(false);\n mesg.setNeutralButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n //mesg.setIcon(android.R.drawable.ic_dialog_alert);\n mesg.show();\n // onLoginFailed();\n progressDialog.dismiss();\n }", "private void ShowRetrievedErrorPopupDialog(){\n ShowWhaitSpinner();\n //there is an error, show popup message\n Context context;\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n builder.setMessage(R.string.error_message_download_resources)\n .setCancelable(false)\n .setPositiveButton(R.string.ok_button, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n startActivity(new Intent(getContext(), MainActivity.class));\n }\n });\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n\n }", "@Override\n public void onClick(View v) {\n repeat = \"\";\n if(groupName_array.length == 0){//如果沒有group\n title = \"您還沒有加入任何群組\";\n }else{\n title = \"選擇群組\";\n }\n new AlertDialog.Builder(editBeacon.this)\n .setTitle(title)\n .setMultiChoiceItems(\n groupName_array,\n group_select,\n new DialogInterface.OnMultiChoiceClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which, boolean isChecked) {\n // TODO Auto-generated method stub\n\n }\n })\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // TODO Auto-generated method stub\n\n horizontalList_group=new ArrayList<>();//初始化\n\n for (int i = 0; i < group_select.length; i++) {\n if (group_select[i]) { //如果選擇的是true(被勾選)\n groupIdSelect.append(Integer.toString(groupId_array[i])).append(\",\");\n //連接stringbuffer eventIdSelect(這是一段傳給Php的stringbuffer) }\n horizontalList_group.add(groupName_array[i]);\n\n }\n }\n\n horizontalAdapter_group=new HorizontalAdapter(horizontalList_group);\n LinearLayoutManager horizontalLayoutManagaer\n = new LinearLayoutManager(editBeacon.this, LinearLayoutManager.HORIZONTAL, false);\n horizontal_recycler_view_group.setLayoutManager(horizontalLayoutManagaer);\n horizontal_recycler_view_group.setAdapter(horizontalAdapter_group);\n\n\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // TODO Auto-generated method stub\n\n }\n }).show();\n\n\n }", "private void showCustomDialog(VisitorModel visitor) {\n ViewGroup viewGroup = ((MainActivity)context).findViewById(android.R.id.content);\n\n //then we will inflate the custom alert dialog xml that we created\n View dialogView = LayoutInflater.from(context).inflate(R.layout.my_dialog, viewGroup, false);\n\n TextView btnUnfollow = dialogView.findViewById(R.id.btn_unfollow);\n TextView btnCancel = dialogView.findViewById(R.id.btn_cancel);\n TextView txtUsername = dialogView.findViewById(R.id.txt_username);\n TextView txtAvatar = dialogView.findViewById(R.id.txt_avatar);\n CircleImageView imgAvatar = dialogView.findViewById(R.id.img_avatar);\n\n txtAvatar.setText(GlobalFunc.getFirstLetter(visitor.username));\n txtUsername.setText(visitor.username);\n\n //Now we need an AlertDialog.Builder object\n AlertDialog.Builder builder = new AlertDialog.Builder(context, R.style.myDialogForUnVisit);\n //setting the view of the builder to our custom view that we already inflated\n builder.setView(dialogView);\n\n //finally creating the alert dialog and displaying it\n AlertDialog alertDialog = builder.create();\n alertDialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);\n alertDialog.show();\n\n btnUnfollow.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n unVisit(visitor);\n alertDialog.hide();\n }\n });\n\n btnCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n alertDialog.hide();\n }\n });\n }", "private void showAddDetailsDialog() {\n\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(getActivity());\n AlertDialog dialog = alertDialog.create();\n\n if (dialog.getWindow() != null) {\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);\n }\n\n View view = LayoutInflater.from(getActivity()).inflate(R.layout.add_student_details_layout, null);\n dialog.setView(view);\n\n final EditText studentIDText = view.findViewById(R.id.studentIDText);\n final EditText studentNameText = view.findViewById(R.id.studentNameText);\n final EditText fatherNameText = view.findViewById(R.id.fatherNameText);\n final EditText phoneText = view.findViewById(R.id.phoneText);\n final EditText emailText = view.findViewById(R.id.emailText);\n final MaterialSpinner standardDropdown = view.findViewById(R.id.standardDropdown);\n final MaterialSpinner sectionDropdown = view.findViewById(R.id.sectionDropdown);\n\n //just in case,, error is to be generated\n studentIDLayout = view.findViewById(R.id.studentIDInputLayout);\n studentNameLayout = view.findViewById(R.id.studentNameInputLayout);\n fatherNameLayout = view.findViewById(R.id.fatherNameInputLayout);\n phoneLayout = view.findViewById(R.id.phoneInputLayout);\n emailLayout = view.findViewById(R.id.emailInputLayout);\n genderErrorText = view.findViewById(R.id.genderErrorText);\n\n final RadioButton maleRadio = view.findViewById(R.id.maleRadio);\n final RadioButton femaleRadio = view.findViewById(R.id.femaleRadio);\n\n final CardView addDetailsCard = view.findViewById(R.id.addDetailsButton);\n final CardView closeCard = view.findViewById(R.id.closeButton);\n\n final String[] arrStandard = getResources().getStringArray(R.array.standard_array);\n standard = arrStandard[0];\n if (standardDropdown != null) {\n standardDropdown.setItems(arrStandard);\n standardDropdown.setOnItemSelectedListener((MaterialSpinner.OnItemSelectedListener<String>) (view12, position, id, item) -> standard = item);\n }\n\n final String[] arrSection = getResources().getStringArray(R.array.section_array);\n section = arrSection[0];\n if (sectionDropdown != null) {\n sectionDropdown.setItems(arrSection);\n sectionDropdown.setOnItemSelectedListener((MaterialSpinner.OnItemSelectedListener<String>) (view12, position, id, item) -> section = item);\n }\n\n if (addDetailsCard != null) {\n addDetailsCard.setOnClickListener(view1 -> {\n studentID = studentIDText.getText().toString();\n studentName = studentNameText.getText().toString();\n fatherName = fatherNameText.getText().toString();\n phone = phoneText.getText().toString();\n\n List<School> schools = db.schoolDao().getAll();\n int school = -1;\n if (schools.size() > 0)\n school = schools.get(0).getId();\n\n email = emailText.getText().toString();\n\n if (maleRadio != null && femaleRadio != null) {\n if (maleRadio.isChecked()) {\n gender = \"M\";\n } else if (femaleRadio.isChecked()) {\n gender = \"F\";\n }\n }\n\n //input validation\n if (isInputValid()) {\n try {\n SchoolAPI.getInstance(getContext()).addStudentDetails(studentID, studentName, school, email, phone, this.standard, section, gender, fatherName, dialog, db);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n });\n }\n\n if (closeCard != null) {\n Log.d(TAG, \"close card!!\");\n closeCard.setOnClickListener(view1 -> {\n Log.d(TAG, \"card closed\");\n dialog.dismiss();\n });\n }\n\n dialog.setCancelable(false);\n dialog.show();\n }", "public void showPopUp(View view) {\n\n menuDialog.setContentView(R.layout.menupopup);\n menuDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n\n TextView txtUserName = (TextView) menuDialog.getWindow().findViewById(R.id.textview_UserName);\n txtUserName.setText(userName);\n // Download User Image from Firebase and show it to User.\n\n final long ONE_MEGABYTE = 1024 * 1024;\n downloadImageStorageReference.getBytes(ONE_MEGABYTE).addOnSuccessListener(new OnSuccessListener<byte[]>() {\n @Override\n public void onSuccess(byte[] bytes) {\n bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length);\n imageView_UserPhoto.setImageBitmap(bitmap);\n }\n });\n imageView_UserPhoto = menuDialog.getWindow().findViewById(R.id.imageview_UserImage);\n\n if(bitmap != null) {\n imageView_UserPhoto.setImageBitmap(bitmap);\n }else {\n imageView_UserPhoto.setImageResource(R.drawable.userimage_default);\n }\n\n\n menuDialog.show();\n }", "private void showAlert() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setTitle(\"Info..\");\r\n builder.setMessage(\"Your password reset email has been sent!\\n\" +\r\n \"\\n\" +\r\n \"We have sent a password reset email to your email address:\\n\" +\r\n \"\\n\" +\r\n input_email.getText().toString()+\"\\n\" +\r\n \"\\n\" +\r\n \"Please check your inbox to continue.\");\r\n\r\n builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n dialog.dismiss();\r\n finish();\r\n }\r\n });\r\n /* builder.setNegativeButton(\"cancel\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n dialog.dismiss();\r\n }\r\n });*/\r\n // create and show the alert dialog\r\n AlertDialog dialog = builder.create();\r\n dialog.show();\r\n }", "public void run() {\n AlertDialog.Builder mesg = new AlertDialog.Builder(EditarFichaConsulta.this);\n mesg.setMessage(\"Houve algum erro por favor, tente mais tarde!\");\n mesg.setTitle(\"\");\n mesg.setCancelable(false);\n mesg.setNeutralButton(\"Tentar Novamente\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n editarDados();\n }\n });\n mesg.setPositiveButton(\"Cancelar\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n //mesg.setIcon(android.R.drawable.ic_dialog_alert);\n mesg.show();\n // onLoginFailed();\n progressDialog.dismiss();\n }", "public void OnDeleteRecipe (View View)\n {\n \t\tImageView darkenScreen = (ImageView) findViewById(R.id.darkenScreen);\n \t\tLayoutParams darkenParams = darkenScreen.getLayoutParams();\n \t\tdarkenParams.height = 1000;\n \t\tdarkenParams.width = 1000;\n \t\tdarkenScreen.setLayoutParams(darkenParams);\n \t\t//make the popup\n \t\tLinearLayout layout = new LinearLayout(this);\n \t\tLayoutInflater inflater = LayoutInflater.from(this);\n \t\tpopUp = new PopupWindow(inflater.inflate(R.layout.popup_delete_recipe, null, false),300,150,true);\n \t\tpopUp.showAtLocation(layout, Gravity.CENTER, 0, 0);\n \t\t\n \t\t//Log.d(\"what\", \"what\");\n \t\t//popUp.update(50, 50, 300, 80);\n \t\t\n \n }", "@Override\n public void onClick(View v) {\n LayoutInflater factory = LayoutInflater.from(getApplicationContext());\n final View alertDialogView = factory.inflate(R.layout.alertdialogperso, null);\n\n //Création de l'AlertDialog\n AlertDialog.Builder adb = new AlertDialog.Builder(this);\n\n //On affecte la vue personnalisé que l'on a crée à notre AlertDialog\n adb.setView(alertDialogView);\n\n //On donne un titre à l'AlertDialog\n adb.setTitle(\"Titre de notre boite de dialogue\");\n\n //On modifie l'icône de l'AlertDialog pour le fun ;)\n adb.setIcon(android.R.drawable.ic_dialog_alert);\n\n //On affecte un bouton \"OK\" à notre AlertDialog et on lui affecte un évènement\n adb.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n\n //Lorsque l'on cliquera sur le bouton \"OK\", on récupère l'EditText correspondant à notre vue personnalisée (cad à alertDialogView)\n EditText et = (EditText)alertDialogView.findViewById(R.id.EditText1);\n mood.setmCommentary(et.getText().toString());\n preferences.edit().putString(\"commentary\", mood.getmCommentary()).apply();\n String commentary = getPreferences(MODE_PRIVATE).getString(\"commentary\", null);\n\n Gson gson = new Gson();\n String json = gson.toJson(mood);\n preferences.edit().putString(\"mood\",gson.toJson(mood)).apply();\n\n\n\n\n\n\n //On affiche dans un Toast le texte contenu dans l'EditText de notre AlertDialog\n Toast.makeText(getApplicationContext(), et.getText(), Toast.LENGTH_SHORT).show();\n } });\n\n //On crée un bouton \"Annuler\" à notre AlertDialog et on lui affecte un évènement\n adb.setNegativeButton(\"Annuler\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n //Lorsque l'on cliquera sur annuler on quittera l'application\n finish();\n } });\n adb.show();\n }", "public void showCustomDialog() {\n ViewGroup viewGroup = root.findViewById(((ViewGroup)getView().getParent()).getId());\n\n //then we will inflate the custom alert dialog xml that we created\n final View dialogView = LayoutInflater.from(getContext()).inflate(R.layout.change_icon_dialogue_box, viewGroup, false);\n\n\n\n Button close=(Button)dialogView.findViewById(R.id.buttonOk);\n\n\n\n //Now we need an AlertDialog.Builder object\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n\n //setting the view of the builder to our custom view that we already inflated\n builder.setView(dialogView);\n\n //finally creating the alert dialog and displaying it\n final AlertDialog alertDialog = builder.create();\n alertDialog.show();\n close.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n alertDialog.cancel();\n }\n });\n\n }", "@Override\n public void onClick(View v)\n {\n AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(new ContextThemeWrapper(activity, R.style.AppTheme));\n dialogBuilder.setView(viewConfirmDialog);\n AlertDialog alertDialog= dialogBuilder.create();\n Window windowAlert = alertDialog.getWindow();\n WindowManager.LayoutParams layoutConfirmDialog = new WindowManager.LayoutParams();\n layoutConfirmDialog.copyFrom(windowAlert.getAttributes());\n layoutConfirmDialog.width = 320;\n layoutConfirmDialog.height = 320;\n alertDialog.getWindow().setAttributes(layoutConfirmDialog);\n dismissAlertDialog();\n components.alertDialog = alertDialog;\n alertDialog.show();\n\n }", "public static void setDialogViewMessage(Context context, AlertDialog.Builder alert, String message1, String message2){\n// Log.e(\"setDialogViewMessage\", \"setDialogViewMessage\");\n LinearLayout ll=new LinearLayout(context);\n LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(\n LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n\n layoutParams.setMargins(20, 10, 20, 10);\n\n ll.setOrientation(LinearLayout.VERTICAL);\n ll.setLayoutParams(layoutParams);\n TextView messageView1 = new TextView(context);\n TextView messageView2 = new TextView(context);\n TextView messageView3 = new TextView(context);\n messageView1.setLayoutParams(layoutParams);\n messageView2.setLayoutParams(layoutParams);\n messageView3.setLayoutParams(layoutParams);\n messageView1.setText(message1);\n messageView2.setText(message2);\n PackageInfo pInfo = null;\n String version = \"\";\n try {\n pInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);\n version = pInfo.versionName;\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n }\n\n messageView3.setText(\"Card Safe Version \" + version);\n ll.addView(messageView1);\n ll.addView(messageView2);\n ll.addView(messageView3);\n alert.setView(ll);\n\n }", "private void loadCloudImageConfirm()\n {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())\n .setCancelable(true).setTitle(\"Load\").setMessage(\"Load image?\");\n\n builder.setPositiveButton(R.string.open_cloud, new DialogInterface.OnClickListener()\n {\n @Override\n public void onClick(DialogInterface dialog, int which)\n {\n getImagesList();\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 }", "@Override\r\n\t\tpublic void onClick(View v) {\n\t\t\tAlertDialog.Builder builder=new AlertDialog.Builder(getActivity());\t\r\n\t\t\tbuilder.setTitle(\"Version 1.0\")\r\n\t\t\t.setMessage(\"With the App User Easily get the Work and directly Interact with Admin.\");\r\n\t\tbuilder.setNegativeButton(\"CLOSE\", new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int which) {\r\n // Write your code here to execute after dialog closed\r\n Toast.makeText(getActivity().getApplicationContext(), \"You clicked on CLOSE\", Toast.LENGTH_SHORT).show();\r\n }\r\n });\r\n \r\n // Showing Alert Message\r\n builder.show();\r\n\t\t}", "private void takeAttendance() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n LayoutInflater inflater = getLayoutInflater();\n View view = inflater.inflate(R.layout.popup_take_attendance, null);\n builder.setView(view);\n\n imgvQR = findViewById(R.id.qrCodeImg);\n classPeriod = findViewById(R.id.unitPeriod);\n classDate = findViewById(R.id.classunitName);\n className = findViewById(R.id.classDate);\n\n hours_per_unit = getResources().getStringArray(R.array.unit_periods);\n classPeriod.setAdapter(new ArrayAdapter(this, android.R.layout.simple_spinner_item, hours_per_unit));\n\n builder.setPositiveButton(\"SEND\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n// generate unique qr code for the class and send to the email.\n\n String dataemails = getIntent().getStringExtra(\"emails\");\n\n String aname = className.getText().toString().trim();\n String bdate = classDate.getText().toString().trim();\n String cperiod = classPeriod.getSelectedItem().toString().trim();\n\n Students stud_student = new Students();\n stud_student.setStudent_class_name(aname);\n stud_student.setStudent_class_date(Date.valueOf(bdate));\n stud_student.setStudent_class_period(Time.valueOf(cperiod));\n\n if (aname.isEmpty() || bdate.isEmpty() || cperiod.isEmpty()) {\n Toast.makeText(ViewLecClass.this, \"fill empty fields\", Toast.LENGTH_SHORT).show();\n } else {\n\n /**\n * generate qr code per class selection with specific data\n * **/\n String datasent = \"Class : \" + aname + \", Date : \" + bdate + \", Period : \" + cperiod ;\n MultiFormatWriter multiFormatWriter = new MultiFormatWriter();\n try {\n Log.d(TAG, \"onClick: LOADING THE QR POINT REACHED\");\n BitMatrix bitMatrix = multiFormatWriter.encode(datasent, BarcodeFormat.QR_CODE,200,200);\n BarcodeEncoder barcodeEncoder = new BarcodeEncoder();\n Bitmap bitmap = barcodeEncoder.createBitmap(bitMatrix);\n imgvQR.setImageBitmap(bitmap);\n } catch (WriterException e) {\n e.printStackTrace();\n }\n\n /**\n * send email to the student emails..\n * obtain email names from the recycler adapter class\n *\n * **/\n// send email to the emails on recycler view. or in database for the class\n try {\n Log.d(TAG, \"onClick: EMAIL POINT REACHED\");\n Intent emailIntent = new Intent(Intent.ACTION_SEND_MULTIPLE);\n emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[] {dataemails});\n if (URI != null) {\n emailIntent.putExtra(Intent.EXTRA_STREAM, URI);\n }\n startActivity(Intent.createChooser(emailIntent, \"SENDING EMAIL.\"));\n\n } catch (Throwable t) {\n Toast.makeText(ViewLecClass.this, \"PROCESS FAILURE. RETRY!\", Toast.LENGTH_SHORT).show();\n }\n\n /**\n * save the data: date, unit data, indivual emails\n * **/\n// save all this data to db, date, , unitid, unit name, period hours, plus each individual email sent with it\n if (firebaseAuth.getCurrentUser() != null) {\n dateReference = FirebaseDatabase.getInstance().getReference();\n dateReference.child(\"LECTURERS\").child(firebaseAuth.getCurrentUser().getUid()).child(\"CLASSES\")\n .child(\"SENTEMAILS\").setValue(stud_student, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n if (databaseError == null) {\n Log.d(TAG, \"onComplete: DATA SAVING POINT\");\n Toast.makeText(ViewLecClass.this, \"DATA SAVED SUCCESSFULLY\", Toast.LENGTH_SHORT).show();\n finish();\n } else {\n Toast.makeText(ViewLecClass.this, \"failed\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n }\n\n }\n }).setNegativeButton(\"CANCEL\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n// startActivity(new Intent(ViewLecClass.this, ViewLecClass.class));\n finish();\n }\n });\n }", "public void onCreate(Bundle bundle) {\n super.onCreate(bundle);\n setContentView((int) R.layout.activity_message);\n this.recyclerView = (RecyclerView) findViewById(R.id.recycler_view);\n this.recyclerView.setHasFixedSize(true);\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);\n linearLayoutManager.setStackFromEnd(true);\n this.recyclerView.setLayoutManager(linearLayoutManager);\n this.username = (AppCompatTextView) findViewById(R.id.title);\n this.btn_send = (AppCompatImageButton) findViewById(R.id.btn_send);\n this.text_send = (AppCompatEditText) findViewById(R.id.text_send);\n this.img_view = (PhotoView) findViewById(R.id.img_preview);\n this.btn_doc = (AppCompatImageButton) findViewById(R.id.btn_doc);\n this.apiService = (APIService) Client.getClient(\"https://fcm.googleapis.com/\").create(APIService.class);\n this.layout = new LinearLayout(this);\n this.layout.setOrientation(LinearLayout.VERTICAL);\n this.layout.setGravity(17);\n this.layoutInflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);\n this.customview = this.layoutInflater.inflate(R.layout.img_doc_dialog, (ViewGroup) null);\n this.img = (AppCompatButton) this.customview.findViewById(R.id.img);\n this.pdf = (AppCompatButton) this.customview.findViewById(R.id.pdf);\n this.cancel = (AppCompatTextView) this.customview.findViewById(R.id.cancel);\n this.popupWindow = new PopupWindow(this.customview, -1, -1);\n this.recyclerView.setVisibility(View.VISIBLE);\n this.img_view.setVisibility(View.GONE);\n this.intent = getIntent();\n this.dbname = this.intent.getStringExtra(\"path\");\n this.profile_url = this.intent.getStringExtra(Scopes.PROFILE);\n this.department = this.intent.getStringExtra(\"department\");\n this.semester = this.intent.getStringExtra(\"semester\");\n this.name = this.intent.getStringExtra(\"cname\");\n this.fuser = FirebaseAuth.getInstance().getCurrentUser();\n this.username.setText(getIntent().getStringExtra(\"name\"));\n this.btn_send.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n DiscussionActivity.this.recyclerView.setVisibility(View.VISIBLE);\n DiscussionActivity.this.img_view.setVisibility(View.GONE);\n String obj = DiscussionActivity.this.text_send.getText().toString();\n if (!obj.equals(\"\")) {\n DiscussionActivity discussionActivity = DiscussionActivity.this;\n discussionActivity.sendMessage(discussionActivity.fuser.getUid(), obj);\n } else {\n Toast.makeText(DiscussionActivity.this, \"You Can't send empty message.\", Toast.LENGTH_SHORT).show();\n }\n DiscussionActivity.this.text_send.setText(\"\");\n }\n });\n this.btn_doc.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n DiscussionActivity.this.showOptions();\n }\n });\n readMessage(this.fuser.getUid());\n }", "public void alertForOuitMessage() {\n final AlertDialog.Builder builder = new AlertDialog.Builder(context);\n final AlertDialog alert = builder.create();\n alert.getWindow().getAttributes().windowAnimations = R.style.alertAnimation;\n View view = alert.getLayoutInflater().inflate(R.layout.quiz_quit_alert, null);\n TextView title1 = (TextView) view.findViewById(R.id.title1);\n title1.setText(context.getString(R.string.quiz_quit_are));\n title1.setTypeface(VodafoneRg);\n TextView title2 = (TextView) view.findViewById(R.id.title2);\n title2.setText(context.getString(R.string.quiz_quit_progress));\n title2.setTypeface(VodafoneRg);\n TextView quiz_text = (TextView) view.findViewById(R.id.quit_text);\n quiz_text.setTypeface(VodafoneRg);\n LinearLayout quit_layout = (LinearLayout) view.findViewById(R.id.quit_layout);\n alert.setCustomTitle(view);\n TextView quit_icon = (TextView) view.findViewById(R.id.quit_icon);\n quit_icon.setTypeface(materialdesignicons_font);\n quit_icon.setText(Html.fromHtml(\"&#xf425;\"));\n quit_layout.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n alert.dismiss();\n finish();\n }\n });\n alert.show();\n }", "@Override\n protected Dialog onCreateDialog(int id) {\n if ((id == VM_RESPONSE_ERROR) || (id == VM_NOCHANGE_ERROR) ||\n (id == VOICEMAIL_DIALOG_CONFIRM)) {\n \n AlertDialog.Builder b = new AlertDialog.Builder(this);\n \n int msgId;\n int titleId = R.string.error_updating_title;\n switch (id) {\n case VOICEMAIL_DIALOG_CONFIRM:\n msgId = R.string.vm_changed;\n titleId = R.string.voicemail;\n // Set Button 2\n b.setNegativeButton(R.string.close_dialog, this);\n break;\n case VM_NOCHANGE_ERROR:\n // even though this is technically an error,\n // keep the title friendly.\n msgId = R.string.no_change;\n titleId = R.string.voicemail;\n // Set Button 2\n b.setNegativeButton(R.string.close_dialog, this);\n break;\n case VM_RESPONSE_ERROR:\n msgId = R.string.vm_change_failed;\n // Set Button 1\n b.setPositiveButton(R.string.close_dialog, this);\n break;\n default:\n msgId = R.string.exception_error;\n // Set Button 3, tells the activity that the error is\n // not recoverable on dialog exit.\n b.setNeutralButton(R.string.close_dialog, this);\n break;\n }\n \n b.setTitle(getText(titleId));\n b.setMessage(getText(msgId));\n b.setCancelable(false);\n AlertDialog dialog = b.create();\n \n // make the dialog more obvious by bluring the background.\n dialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);\n \n return dialog;\n }\n \n return null;\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View rootView = inflater.inflate(R.layout.fragment_message_dialog, null);\n msg = rootView.findViewById(R.id.msg);\n submit = rootView.findViewById(R.id.msg_submit);\n final int code = getTargetRequestCode();\n builder.setView(rootView);\n builder.setTitle(\"Enter a message:\");\n\n submit.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View view) {\n\n sendResult(code);\n dismiss();\n\n\n }\n\n });\n\n return builder.create();\n }", "public void CustomAlertSave2(String msg) {\n\t\tfinal Dialog dialog = new Dialog(context);\r\n\t\t// hide to default title for Dialog\r\n\t\tdialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\r\n\t\t// inflate the layout dialog_layout.xml and set it as contentView\r\n\t\tLayoutInflater inflater = (LayoutInflater) context\r\n\t\t\t\t.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\r\n\t\tView view = inflater.inflate(R.layout.dialog_layout, null, false);\r\n\t\tdialog.setCanceledOnTouchOutside(true);\r\n\t\tdialog.setContentView(view);\r\n\t\tdialog.getWindow().setBackgroundDrawable(new ColorDrawable(0));\r\n\t\tTextView txtTitle = (TextView) dialog\r\n\t\t\t\t.findViewById(R.id.txt_alert_message);\r\n\t\ttxtTitle.setText(msg);\r\n\r\n\t\tButton btn_ok = (Button) dialog.findViewById(R.id.btn_ok);\r\n\t\tbtn_ok.setOnClickListener(new android.view.View.OnClickListener() {\r\n\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tdialog.dismiss();\r\n\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t\tdialog.show();\r\n\t}", "private void showAlertDialog() {\n new AlertDialog.Builder(getActivity())\n .setMessage(R.string.feedback_sharing_data_alert)\n .setCancelable(false)\n .setPositiveButton(R.string.ok, (dialog, which) -> {\n sendFeedback();\n })\n .show();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(\"Limite mensal excedido! Na versão gratuita, o limite máximo de publicação de caronas mensais é 4 (quatro), atualize para a versão Pro e tenha publicações ilimitadas...\")\n .setPositiveButton(\"Ir\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n String url = \"https://play.google.com/store/apps/details?id=com.xetelas.nova\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n getContext().startActivity(i);\n }\n })\n .setNegativeButton(\"Voltar\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "private void createAlert() {\n ImageView image = new ImageView(this);\n image.setImageResource(zunder.ebs.zunderapp.R.drawable.qr);\n\n myWallet = new MyWallet();\n setPrivateKey(myWallet.searchWallet());\n\n createQR = new CreateQR(700, 700);\n try {\n KeyPair pair = KeyPair.fromSecretSeed(getPrivateKey());\n setPublicKey(pair.getAccountId());\n try {\n Bitmap bitmap = createQR.encodeAsBitmap(getPublicKey());\n image.setImageBitmap(bitmap);\n } catch (WriterException e) {\n e.printStackTrace();\n }\n }catch (Exception e){\n e.getMessage();\n }\n\n\n\n AlertDialog.Builder builder =\n new AlertDialog.Builder(this).\n setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n }).\n setView(image);\n builder.create().show();\n }", "@Override\n\t\t\t\t\t\tpublic void onShow(DialogInterface dialog) {\n\t\t\t\t\t\t\tButton b = alert.getButton(AlertDialog.BUTTON_POSITIVE);\n\t\t\t\t\t\t\tb.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t//dist,date,empId,spmandi,spretailer,spactivity,rem\n\t\t\t\t\t\t\t\t\tif(new ConnectionDetector(context).isConnectingToInternet()){\n\t\t\t\t\t\t\t\t\t\tMyspinner sp1 = (Myspinner)districtlist.getSelectedItem();\n\t\t\t\t\t\t\t\t\t\tMyspinner sp2 = (Myspinner)mandilist.getSelectedItem();\n\t\t\t\t\t\t\t\t\t\tMyspinner sp3 = (Myspinner)retailerslist.getSelectedItem();\n\t\t\t\t\t\t\t\t\t\tMyspinner sp4 = (Myspinner)activitieslist.getSelectedItem();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(districtlist.getSelectedItemPosition()!=0\n\t\t\t\t\t\t\t\t\t\t\t\t&& mandilist.getSelectedItemPosition()!=0\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& retailerslist.getSelectedItemPosition()!=0\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& activitieslist.getSelectedItemPosition()!=0){\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\tString date = new SimpleDateFormat(\"yyyy-MM-dd\").format(dt);\n\t\t\t\t\t\t\t\t\t\t\t\tArrayList<String> id = new GetData(context, db).getVillageId(villages.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\tif(id.size()>0 && id.get(0).length()>0){\n\t\t\t\t\t\t\t\t\t\t\t\t\tnew CreateActivity().execute(sp1.getValue(),date,get.getAllLogin().get(0).get(\"empid\"),sp2.getValue(),sp3.getValue(),sp4.getValue(),remarks.getText().toString(), id.get(0), villages.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\tnew CreateActivity().execute(sp1.getValue(),date,get.getAllLogin().get(0).get(\"empid\"),sp2.getValue(),sp3.getValue(),sp4.getValue(),remarks.getText().toString(), \"0\", villages.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\talert.dismiss();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\t\t\t\t\t\t\te.getMessage();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\tif(districtlist.getSelectedItemPosition()==0){\n\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"Please Select District\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\tif(mandilist.getSelectedItemPosition()==0){\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"Please Select Mandi\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(retailerslist.getSelectedItemPosition()==0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"Please Select Retailer\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(activitieslist.getSelectedItemPosition()==0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"Please Select Activity\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"No Network Found\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}", "@Override\n public void onItemClick(View view, Medal obj, int position) {\n TextView txt;\n final Dialog dialog = new Dialog(getContext());\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); // before\n dialog.setContentView(R.layout.popup_medals);\n txt = dialog.findViewById(R.id.titlePop);\n txt.setText(obj.title);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));\n dialog.setCancelable(true);\n dialog.show();\n }", "public void onClick(View v) {\n\t\t\tfinal Dialog dialog = new Dialog(v.getContext());\n\t\t\tdialog.requestWindowFeature(Window.FEATURE_NO_TITLE); \n\t dialog.setContentView(R.layout.image_dialog);\n\t ImageView imgDialog = (ImageView) dialog.findViewById(R.id.ImageViewGallery01);\n\t imgDialog.setTag(imgUrl);\n\t imgDialog.setScaleType(ImageView.ScaleType.FIT_XY);\n\t imageLoader.DisplayImage(imgUrl, InfoPoiDetail.this, imgDialog);\n\t \n\t imgDialog.setOnClickListener(new View.OnClickListener() {\n\t\t\t\t\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}\n\t\t\t});\n\t dialog.setTitle(\"\");\n\t dialog.setCancelable(true);\n\t android.view.WindowManager.LayoutParams lp=dialog.getWindow().getAttributes();\n\n\t lp.flags=\n\t \tandroid.view.WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS | \n\t \tandroid.view.WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;\n\n\t dialog.getWindow().setAttributes(lp);\n\t dialog.show();\n//\t stopProgress();\n\t\t}", "@Override\n public void dialogClick(Dialog dialog, View v) {\n switch (v.getId()) {\n case R.id.tv_in_the_to_xiangce:\n dialog.dismiss();\n if (photoList == null)\n photoList = new ArrayList<Map<String, Object>>();\n else\n photoList.clear();\n Intent in = new Intent(getApplicationContext(),\n AddImgFragmentActivity01.class);\n in.putExtra(\"selectedList\", photoList);\n in.putExtra(\"maxImg\", maxImg);\n startActivityForResult(in, 1);\n overridePendingTransition(R.anim.right_in, R.anim.left_out);\n break;\n\n case R.id.tv_in_the_to_xiangji:\n dialog.dismiss();\n if (photoList == null)\n photoList = new ArrayList<Map<String, Object>>();\n else\n photoList.clear();\n startXiangJi();\n break;\n\n case R.id.tv_cancel:\n dialog.dismiss();\n break;\n\n default:\n break;\n }\n }", "public static void showAlert(String message, Activity context) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n builder.setMessage(message).setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n\n }\n });\n try {\n builder.show();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "private void updateDetailGUI() {\n\t\t\t\t\t\t\tlogo.setImageUrl(place.gallery.get(0));\n\t\t\t\t\t\t\tnomePosto.setText(place.nome);\n\t\t\t\t\t\t\tdescrizione.setText(place.description);\n\t\t\t\t\t\t\tnumtelefono.setText(place.telefono);\n\t\t\t\t\t\t\twebsite.setText(place.website);\n\t\t\t\t\t\t\tcitta.setText(place.cittą);\n\t\t\t\t\t\t\tSmartImageView image_detail;\n\t\t\t\t\t\t\tif (place.gallery.size() > 1) {\n\t\t\t\t\t\t\t\tLinearLayout.LayoutParams imagesLayout = new LinearLayout.LayoutParams(\n\t\t\t\t\t\t\t\t\t\tLayoutParams.WRAP_CONTENT,\n\t\t\t\t\t\t\t\t\t\tLayoutParams.WRAP_CONTENT);\n\t\t\t\t\t\t\t\timagesLayout.setMargins(5, 0, 5, 0);\n\t\t\t\t\t\t\t\tfor (int i = 1; i < place.gallery.size(); i++) {\n\t\t\t\t\t\t\t\t\timage_detail = new SmartImageView(\n\t\t\t\t\t\t\t\t\t\t\tDetPlaActivity.this);\n\t\t\t\t\t\t\t\t\timage_detail.setLayoutParams(imagesLayout);\n\t\t\t\t\t\t\t\t\timage_detail\n\t\t\t\t\t\t\t\t\t\t\t.setScaleType(ScaleType.CENTER_CROP);\n\t\t\t\t\t\t\t\t\timage_detail.getLayoutParams().width = 200;\n\t\t\t\t\t\t\t\t\timage_detail.setImageUrl(place.gallery\n\t\t\t\t\t\t\t\t\t\t\t.get(i));\n\t\t\t\t\t\t\t\t\tfinal int index_id_dialog = i;\n\t\t\t\t\t\t\t\t\timage_detail\n\t\t\t\t\t\t\t\t\t\t\t.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated\n\t\t\t\t\t\t\t\t\t\t\t\t\t// method stub\n\t\t\t\t\t\t\t\t\t\t\t\t\tDialogImage dialog = DialogImage\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.newInstance(place.gallery\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get(index_id_dialog)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toString());\n\t\t\t\t\t\t\t\t\t\t\t\t\tdialog.show(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetFragmentManager(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTools.TAG_DIALOG_IMAGE);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tgallery.addView(image_detail);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tgalleryContainer.setVisibility(View.GONE);\n\t\t\t\t\t\t\t\tgallery.setVisibility(View.GONE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbtnMappa.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\tString url = \"http://maps.google.com/maps?\"\n\t\t\t\t\t\t\t\t\t\t\t+ \"daddr=\" + place.lat + \",\"\n\t\t\t\t\t\t\t\t\t\t\t+ place.longit;\n\t\t\t\t\t\t\t\t\tIntent mapIntent = new Intent(\n\t\t\t\t\t\t\t\t\t\t\tIntent.ACTION_VIEW, Uri.parse(url));\n\t\t\t\t\t\t\t\t\tstartActivity(mapIntent);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}", "private void showDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n\n// 2. Chain together various setter methods to set the dialog characteristics\n builder.setMessage(\"Click the right dismiss button\")\n .setTitle(\"Do you hear, it? Isn't it great?\");\n\n\n builder.setPositiveButton(\"Left\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n audioServiceBinder.stopAudio();\n String deviceId = mDurationTimeEditText.getText().toString();\n new MyTurnIsOver().execute(deviceId);\n }\n });\n builder.setNegativeButton(\"Right\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n showDialog();\n }\n });\n\n// 3. Get the <code><a href=\"/reference/android/app/AlertDialog.html\">AlertDialog</a></code> from <code><a href=\"/reference/android/app/AlertDialog.Builder.html#create()\">create()</a></code>\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "public void openFeedbackDialog(String desc, String increment, int pictype, final String colour, final int score){\n LayoutInflater inflater = LayoutInflater.from(this);\n View view = inflater.inflate(R.layout.dialog_feedback, null);\n\n //initialise the elements\n TextView descTxt = view.findViewById(R.id.dialogFeedbackDesc);\n TextView points = view.findViewById(R.id.increment);\n Button okBtn = view.findViewById(R.id.DialogFeedbackBtn);\n ConstraintLayout dialogBg = view.findViewById(R.id.feedbackDialogBg);\n ImageView pic = view.findViewById(R.id.icon);\n\n descTxt.setText(desc); //set the description\n dialogBg.setBackgroundColor(Color.parseColor(colour));\n pic.setImageResource(pictype);\n points.setText(increment);\n\n //create the dialog\n final AlertDialog alertDialog = new AlertDialog.Builder(this)\n .setView(view)\n .create();\n\n okBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(CyberSimThree.this, CyberSimFour.class);\n intent.putExtra(\"score\", score);\n startActivity(intent);\n\n }\n });\n\n alertDialog.show();\n\n }", "private MaterialAlertDialogBuilder getBackButtonAlertBuilder(){\n MaterialAlertDialogBuilder dialogBuilder = new MaterialAlertDialogBuilder(getContext());\n dialogBuilder.setCancelable(true)\n .setMessage(\"Your changes will be lost. Do you want to continue?\")\n .setNegativeButton(\"Cancel\", (dialog, which) -> {\n dialog.cancel();})\n .setPositiveButton(\"Continue\", (dialog, which) -> {\n mViewModel.resetLiveData();\n getDialog().dismiss();})\n .create();\n return dialogBuilder;\n }", "public void crearAlertDialog(final ArrayList<CustomListView> args, final CustomAdapterListView adap, final boolean dosisyhoraSeteada) {\n LayoutInflater lin = LayoutInflater.from(getActivity());\n View dosisYhora = lin.inflate(R.layout.dosis_y_hora, null);\n AlertDialog.Builder alertDialogB = new AlertDialog.Builder(getActivity());\n alertDialogB.setView(dosisYhora);\n String[] separated ;\n final TimePicker timePick = (TimePicker) dosisYhora.findViewById(R.id.pickHora);\n //final NumberPicker numPick = (NumberPicker) dosisYhora.findViewById(R.id.pickDosis);\n //numPick.setMinValue(1);\n //numPick.setMaxValue(20);\n //numPick.setWrapSelectorWheel(false);\n //numPick.setValue(1);\n if (dosisyhoraSeteada) {\n final String currentDosis = args.get(posicionItemdeLista).getDosis();\n final float currdosis = Float.parseFloat(currentDosis);\n final String currentTurno = args.get(posicionItemdeLista).getTurno();\n separated = currentTurno.split(\":\");\n timePick.setCurrentHour(Integer.parseInt(separated[0]));\n timePick.setCurrentMinute(Integer.parseInt(separated[1]));\n // TODO aca debería pasarle los valores que tenian seteados del turno y la dosis.\n //ar.com.kerbrum.kerbrum.NumPicker.setValue(currdosis);\n\n }\n alertDialogB\n .setCancelable(true)\n .setPositiveButton(\"Ok\",\n new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n\n }\n })\n .setNegativeButton(\"Cancelar\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n\n final AlertDialog alertDialogDosisHora = alertDialogB.create();\n alertDialogDosisHora.show();\n alertDialogDosisHora.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n float floatNumPick = ar.com.kerbrum.kerbrum.NumPicker.getValue();\n final String strDosis = Float.toString(floatNumPick);\n final String strTurno = timePick.getCurrentHour() + \":\" + timePick.getCurrentMinute();\n\n if (strDosis == \"0.0\") {\n Toast error = Toast.makeText(getActivity(), \"Tenes que agregar por le menos 0.25 de dosis\", Toast.LENGTH_SHORT);\n error.show();\n\n } else {\n if (dosisyhoraSeteada) {\n\n //Pedirle al objeto custom la hroa y dosis la dibujas a partir de aca\n\n modificarDosisYhora(args, adap, posicionItemdeLista, strDosis, strTurno);\n adap.notifyDataSetChanged();\n Toast toastModificacion = Toast.makeText(getActivity(), \"Modificaste la configuración de este medicamento para tomar \" + strDosis + \" dosis a las: \" + strTurno, Toast.LENGTH_LONG);\n toastModificacion.show();\n alertDialogDosisHora.dismiss();\n\n\n } else {\n setDosisyHora(args, adap, strDosis, strTurno);\n //setDosisYHora(); en este metodo tnees que crear el nuevo objeto customlist view y agregarlo al array /add\n adap.notifyDataSetChanged();\n Toast toastSeteoDosis = Toast.makeText(getActivity(), \"Configuraste este medicamento para tomar \" + strDosis + \" dosis a las: \" + strTurno, Toast.LENGTH_LONG);\n toastSeteoDosis.show();\n alertDialogDosisHora.dismiss();\n\n }\n }\n }\n });\n\n }", "void showPopuopForPurchaseAndPurchasePaid(int flowpurchaseReceivedOrPaid) {\n this.flowpurchaseReceivedOrPaid = flowpurchaseReceivedOrPaid;\n String languageCode = Utility.getInstance().getLanguage(getActivity());\n Utility.getInstance().setLanguage(getActivity(), languageCode);\n Utility.getInstance().localisation(getActivity(), languageCode);\n dialog = new Dialog(mContext);\n if (!dialog.isShowing()) {\n dialog.setCancelable(false);\n /* dialog.getWindow().addFlags(Window.FEATURE_NO_TITLE);*/\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));\n dialog.setContentView(R.layout.popup_purchase_received_paid);\n TextView textviewTitle = dialog.findViewById(R.id.textviewTitle);\n editextPurchaseSupplierName = dialog.findViewById(R.id.editextPurchaseSupplierName);\n ImageView imageviewMicSupplierName = dialog.findViewById(R.id.imageviewMicSupplierName);\n edittextPurchaseAmount = dialog.findViewById(R.id.edittextPurchaseAmount);\n ImageView imageviewMicPurchaseAmount = dialog.findViewById(R.id.imageviewMicPurchaseAmount);\n edittextPurchasePurpose = dialog.findViewById(R.id.edittextPurchasePurpose);\n ImageView imageviewMicPurchasePurpose = dialog.findViewById(R.id.imageviewMicPurchasePurpose);\n edittextPuchaseDate = dialog.findViewById(R.id.edittextPuchaseDate);\n imageviewMicSaveCancel = dialog.findViewById(R.id.imageviewMicSaveCancel);\n ImageView imageviewPurchaseDate = dialog.findViewById(R.id.imageviewPurchaseDate);\n CardView cardviewPurchaseCancel = dialog.findViewById(R.id.cardviewPurchaseCancel);\n CardView cardviewPurchaseOk = dialog.findViewById(R.id.cardviewPurchaseOk);\n ImageView imageviewCross = dialog.findViewById(R.id.imageviewCross);\n ImageView imageviewMicSaveCancel = dialog.findViewById(R.id.imageviewMicSaveCancel);\n imageviewSOutsnadingProfile = dialog.findViewById(R.id.imageviewOutsnadingProfile);\n textviewSOustandingId = dialog.findViewById(R.id.textviewOustandingId);\n textviewSOustandingName = dialog.findViewById(R.id.textviewOustandingName);\n textviewSOustandingAmount = dialog.findViewById(R.id.textviewOustandingAmount);\n relativelayoutSOustandingProfile = dialog.findViewById(R.id.relativelayoutProfile);\n textview_notFound = dialog.findViewById(R.id.textview_notFound);\n TextView textviewamount = dialog.findViewById(R.id.textviewsaleReport);\n\n textviewSOustandingAmount.setVisibility(View.GONE);\n\n setClickPuchaseElements(imageviewMicSupplierName, editextPurchaseSupplierName, getString(R.string.please_tell_supplier_name), 1);\n if (flowpurchaseReceivedOrPaid == 1) {\n setClickPuchaseElements(imageviewMicPurchaseAmount, edittextPurchaseAmount, getString(R.string.please_tell_purchase_amount), 2);\n setClickPuchaseElements(imageviewMicPurchasePurpose, edittextPurchasePurpose, getString(R.string.please_tell_purchase_purpose), 1);\n\n } else {\n setClickPuchaseElements(imageviewMicPurchaseAmount, edittextPurchaseAmount, getString(R.string.please_tell_paid_amount), 2);\n setClickPuchaseElements(imageviewMicPurchasePurpose, edittextPurchasePurpose, getString(R.string.please_tell_amount_paid_purpose), 1);\n\n }\n setClickPuchaseElements(imageviewMicSaveCancel, null, getString(R.string.please_say_save_or_cancel), 1);\n int currentMonth = dob_currentDate.get(Calendar.MONTH) + 1;\n edittextPuchaseDate.setText(dob_currentDate.get(Calendar.DAY_OF_MONTH) + \"/\" + currentMonth + \"/\" + dob_currentDate.get(dob_currentDate.YEAR));\n if (flowpurchaseReceivedOrPaid == 1) {\n textviewTitle.setText(getString(R.string.menu_purchase));\n } else {\n textviewTitle.setText(getString(R.string.menu_purchasePaid));\n textviewamount.setText(getString(R.string.menu_purchasePaid));\n// textviewSOustandingId.setVisibility(View.INVISIBLE);\n }\n\n textWatcherPurchaseSupplierName = new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n if (editextPurchaseSupplierName.hasFocus()) {\n if (dialog.isShowing()) {\n //checkOustandingData(s.toString(), true);\n if (Utility.getInstance().isOnline(mContext)) {\n checkSupplierData(s.toString(), true);\n }\n }\n }\n }\n };\n\n\n editextPurchaseSupplierName.addTextChangedListener(textWatcherPurchaseSupplierName);\n/* editextPurchaseSupplierName.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n Log.e(TAG, \"onTextChanged: \");\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n Log.e(TAG, \"onTextChanged: \");\n if (dialog.isShowing()) {\n //checkOustandingData(s.toString(), true);\n checkSupplierData(s.toString(), true);\n }\n }\n });*/\n\n cardviewPurchaseCancel.setOnClickListener(v -> {\n if (dialog != null) {\n dialog.dismiss();\n if (textToSpeech != null) {\n textToSpeech.stop();\n }\n speak(getString(R.string.transaction_cancelled), \"\");\n Toast.makeText(mContext, \"\" + getString(R.string.transaction_cancelled), Toast.LENGTH_SHORT).show();\n }\n });\n\n cardviewPurchaseOk.setOnClickListener(v -> {\n boolean valueStatus = validatePuchase();\n if (valueStatus) {\n createPurchaseRequest(flowpurchaseReceivedOrPaid);\n }\n });\n\n imageviewCross.setOnClickListener(v -> {\n if (dialog != null) {\n dialog.dismiss();\n if (textToSpeech != null) {\n textToSpeech.stop();\n }\n }\n });\n\n imageviewPurchaseDate.setOnClickListener(v -> {\n edittextPuchaseDate.setError(null);\n DatePickerDialog datePickerDialog = new DatePickerDialog(mContext, new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {\n month = month + 1;\n edittextPuchaseDate.setText(dayOfMonth + \"/\" + month + \"/\" + year);\n boolean valueStatus = validatePuchase();\n if (valueStatus) {\n speak(getString(R.string.please_say_save_or_cancel), \"\");\n new Handler().postDelayed(() -> {\n speechToTextFuncVoiceForPurchase(mContext, null, 3, imageviewMicSaveCancel, 2);\n }, 3000);\n }\n }\n }, dob_currentDate.get(dob_currentDate.YEAR), dob_currentDate.get(Calendar.MONTH), dob_currentDate.get(Calendar.DAY_OF_MONTH));\n// datePickerDialog.setTitle(\"Select Date\");\n datePickerDialog.getDatePicker().setMaxDate(System.currentTimeMillis());\n datePickerDialog.show();\n });\n\n\n if (!dialog.isShowing()) {\n String languageCode2 = Utility.getInstance().getLanguage(getActivity());\n Utility.getInstance().setLanguage(getActivity(), languageCode2);\n Utility.getInstance().localisation(getActivity(), languageCode2);\n dialog.show();\n\n\n/* WindowManager.LayoutParams params = dialog.getWindow().getAttributes(); // change this to your dialog.\n\n params.y = -100; // Here is the param to set your dialog position. Same with params.x\n dialog.getWindow().setAttributes(params);*/\n\n dialog.getWindow().setGravity(Gravity.TOP | Gravity.RIGHT);\n WindowManager.LayoutParams layoutParams = dialog.getWindow().getAttributes();\n layoutParams.x = 100; // right margin\n layoutParams.y = 170; // top margin\n dialog.getWindow().setAttributes(layoutParams);\n // e.g. bottom + left margins:\n dialog.getWindow().setGravity(Gravity.BOTTOM | Gravity.LEFT);\n WindowManager.LayoutParams layoutParams1 = dialog.getWindow().getAttributes();\n layoutParams1.x = 100; // left margin\n layoutParams1.y = 170; // bottom margin\n dialog.getWindow().setAttributes(layoutParams1);\n\n\n/* Window window = dialog.getWindow();\n\n\n\n window.setLayout(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT);*/\n }\n/* speak(getString(R.string.please_tell_supplier_name), \"\");\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n editextPurchaseSupplierName.requestFocus();\n speechToTextFuncVoiceForPurchase(mContext, editextPurchaseSupplierName, 1, imageviewMicSupplierName, 2);\n }\n }, 3000);*/\n\n }\n }", "public void alert(String txtMsg, final String action, final View btn_view)\n {\n LayoutInflater inflator = LayoutInflater.from(BookingDetailsActivity.this);\n final View yourCustomView = inflator.inflate(R.layout.custom_dialog, null);\n //endregion\n\n //region (2) init dialogue\n final AlertDialog dialog = new AlertDialog.Builder(BookingDetailsActivity.this)\n .setTitle(\"Do you want to proceed ?\")//replace w \"txtMsg\"\n .setView(yourCustomView)\n .create();\n //endregion\n\n //region (3) set onClicks for custom dialog btns\n yourCustomView.findViewById(R.id.btn_yes).setOnClickListener(new View.OnClickListener()\n {\n @Override\n public void onClick(View view)\n {\n switch (action)\n {\n case \"save\":\n SaveAppoint(btn_view);\n break;\n case \"cancel\":\n CancelAppoint(btn_view);\n break;\n }\n }\n });\n yourCustomView.findViewById(R.id.btn_no).setOnClickListener(new View.OnClickListener()\n {\n @Override\n public void onClick(View view)\n {\n dialog.dismiss();\n }\n });\n //endregion\n\n //region (4) Display dialogue\n dialog.show();\n //endregion\n }", "public void onClick(DialogInterface dialog, int which) {\n\t\t\t\t \t LinearLayout main = (LinearLayout) findViewById(R.id.top_layover); \n\t\t\t\t \t main.setBackgroundColor(0xff0099cc);\n\t\t\t\t \t LinearLayout shell = (LinearLayout) findViewById(R.id.bottom_layover); \n\t\t\t\t \t shell.setBackgroundColor(0xff0099cc);\n\t\t\t\t // Write your code here to execute after dialog\n\t\t\t\t Toast.makeText(getApplicationContext(),\n\t\t\t\t \"Declined\", Toast.LENGTH_SHORT)\n\t\t\t\t .show();\n\t\t\t\t dialog.cancel();\n\t\t\t\t }", "public void showMessage(){\n\n myComments = comments.getText().toString().trim();\n\n System.out.println(\"comments...\"+myComments);\n\n AlertDialog.Builder a_builder = new AlertDialog.Builder(this,AlertDialog.THEME_HOLO_LIGHT);\n\n a_builder.setMessage(\"Do you want refer as diagnostic\")\n .setCancelable(false)\n .setNegativeButton(\"Yes\",new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n// dialog.cancel();\n// showReferDiag();\n\n Intent intent = new Intent(DoctorTodaysAppointment.this,DoctorReferDiagnostic.class);\n intent.putExtra(\"refer\",\"Yes\");\n intent.putExtra(\"pid\",patientId);\n intent.putExtra(\"aid\",appointmentId);\n intent.putExtra(\"name\",patientname);\n intent.putExtra(\"reason\",myComments);\n intent.putExtra(\"mobile\",doctorMobile);\n intent.putExtra(\"id\",doctorId);\n intent.putExtra(\"prescription\",encodedPrescriptionImage);\n startActivity(intent);\n// Toast.makeText(getApplicationContext(),\"Yes\",Toast.LENGTH_SHORT).show();\n }\n })\n .setPositiveButton(\"No\",new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n Intent intent = new Intent(DoctorTodaysAppointment.this,DoctorReferDiagnostic.class);\n intent.putExtra(\"refer\",\"No\");\n intent.putExtra(\"pid\",patientId);\n intent.putExtra(\"aid\",appointmentId);\n intent.putExtra(\"name\",patientname);\n intent.putExtra(\"reason\",myComments);\n intent.putExtra(\"mobile\",doctorMobile);\n intent.putExtra(\"id\",doctorId);\n intent.putExtra(\"prescription\",\"\");\n startActivity(intent);\n }\n });\n AlertDialog alert = a_builder.create();\n alert.setTitle(\"Refer as Diagnostic\");\n alert.show();\n\n }", "public void createfirstQRMessage() {\n\n dialog = new Dialog(getActivity());\n dialog.setContentView(R.layout.first_scan_message);\n Button yes_btn = dialog.findViewById(R.id.btnYes);\n Button no_btn = dialog.findViewById(R.id.btnNo);\n yes_btn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n GeneralUtils.progressDialog(getActivity(), \"checking\");\n createProductTagApiCall();\n recent = true;\n\n }\n });\n no_btn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n onNO();\n }\n });\n dialog.show();\n\n }", "private void popupCalibratingDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(R.string.motion_calibrating);\n builder.setCancelable(false);\n builder.setMessage(R.string.motion_calibrating_message);\n\n calibratingDialog = builder.create();\n calibratingDialog.show();\n }", "public void onItemClick(AdapterView<?> arg0, View arg1, int index,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t final int idex = index;\n\t\t\t\t final long position = arg3;\n\t\t\t\t final AlertDialog dlg2 = new AlertDialog.Builder(PropagandaListActivity.this).create();\n\t\t\t\t\tdlg2.show();\t\t\t\t\t\n\t\t\t\t\tdlg2.getWindow().setContentView(R.layout.dialog_new);\n\t\t\t\t\tButton confirm =(Button)dlg2.findViewById(R.id.button_confirm);\n\t\t\t\t\tButton cancel =(Button)dlg2.findViewById(R.id.button_cancel);\n\t\t\t\t\tTextView tv = (TextView)dlg2.findViewById(R.id.notice_message);\n\t\t\t\t\ttv.setTextSize(16);\n\t\t\t\t\ttv.setText(MainActivity.resources.getString(R.string.propagandalist_toast1)+GameData.pro[index].money+MainActivity.resources.getString(R.string.propagandalist_toast2));\n\t\t\t\t confirm.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tConnection.sendMessage(GameProtocol.\n\t\t\t\t\t\t\t\t\tCONNECTION_SEND_JointAdvocacy_Req,\n\t\t\t\t\t\t\t\t\tConstructData.Join_JointAdvocacy_Req(GameData.pro[idex].id,0));//8宣传列表\n\t\t\t\t\t\t\tdlg2.dismiss();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t cancel.setOnClickListener(new OnClickListener() {\n\t\t\t\t \t\n\t\t\t\t \t \n\t\t\t\t \tpublic void onClick(View v) {\n\t\t\t\t \t\t// TODO Auto-generated method stub\n\t\t\t\t \t\t\n\t\t\t\t \t\tdlg2.dismiss();\n\t\t\t\t \t}\n\t\t\t\t });\n/*\t\t\t\t \n\t\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(PropagandaListActivity.mContext);\n\t\t\t\tbuilder.setMessage(MainActivity.resources.getString(R.string.propagandalist_toast1)+GameData.pro[index].money+MainActivity.resources.getString(R.string.propagandalist_toast2))\n\t\t\t\t .setPositiveButton(MainActivity.resources.getString(R.string.dialog_ok), new DialogInterface.OnClickListener(){\t\t\t\t \t \n\t\t\t\t\t\t\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tConnection.sendMessage(GameProtocol.\n\t\t\t\t\t\t\t\t\tCONNECTION_SEND_JointAdvocacy_Req,\n\t\t\t\t\t\t\t\t\tConstructData.Join_JointAdvocacy_Req(GameData.pro[idex].id));//8宣传列表\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t}})\n\t\t\t\t .setNegativeButton(MainActivity.resources.getString(R.string.dialog_return), new DialogInterface.OnClickListener(){\n\n\t\t\t\t\t\t \n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t}} );\n\t\t\t\tbuilder.create().show();*/\n\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t\n\t\t\t}", "static void errorNotification(Context context,String exception) {\n AlertDialog.Builder errorDialogBox= new AlertDialog.Builder(context);\n errorDialogBox.setTitle(\"Exception\");\n errorDialogBox.setMessage(exception);\n errorDialogBox.setNeutralButton(android.R.string.ok,new DialogInterface.OnClickListener(){\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n //Activates the dialog box\n AlertDialog errorDialog = errorDialogBox.create();\n errorDialog.show();\n\n }", "private void notifyUiApiFailure() {\n\n if (stillAlive()) {\n\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(getActivity());\n View convertView = getActivity().getLayoutInflater().inflate(R.layout.api_error_alert_title, null);\n alertDialog.setCustomTitle(convertView);\n\n alertDialog.setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n\n // Set the line color\n Dialog d = alertDialog.show();\n int dividerId = d.getContext().getResources().getIdentifier(\"android:id/titleDivider\", null, null);\n View divider = d.findViewById(dividerId);\n divider.setBackground(new ColorDrawable(Color.parseColor(\"#00274c\")));\n }\n }", "private void loadLocalImageConfirm()\n {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())\n .setCancelable(true).setTitle(\"Load\").setMessage(\"Load image?\");\n\n builder.setPositiveButton(R.string.open_local, new DialogInterface.OnClickListener()\n {\n @Override\n public void onClick(DialogInterface dialog, int which)\n {\n ((MainActivity) getActivity()).loadLocalImage();\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 }", "public void dialog_action() {\n\n mContent = (LinearLayout) dialog.findViewById(R.id.linearLayout);\n mSignature = new signature(getApplicationContext(), null);\n mSignature.setBackgroundColor(Color.WHITE);\n // Dynamically generating Layout through java code\n mContent.addView(mSignature, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);\n mClear = (Button) dialog.findViewById(R.id.clear);\n mGetSign = (Button) dialog.findViewById(R.id.getsign);\n mGetSign.setEnabled(false);\n mCancel = (Button) dialog.findViewById(R.id.cancel);\n view = mContent;\n\n mClear.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n Log.v(\"tag\", \"Panel Cleared\");\n mSignature.clear();\n mGetSign.setEnabled(false);\n }\n });\n mGetSign.setOnClickListener(new View.OnClickListener() {\n\n public void onClick(View v) {\n\n Timestamp timestamp = new Timestamp(System.currentTimeMillis());\n String dates = sdf.format(timestamp);\n\n pic_name = \"TTD \" + dates;\n StoredPath = DIRECTORY + pic_name + \".JPEG\";\n Log.e(\"tag\", \"DATES :\"+dates);\n\n Log.e(\"tag\", \"Directory\" + StoredPath);\n view.setDrawingCacheEnabled(true);\n mSignature.save(view, StoredPath);\n\n dialog.dismiss();\n Toast.makeText(getApplicationContext(), \"Berhasil Disimpan\", Toast.LENGTH_SHORT).show();\n // Calling the same class\n recreate();\n\n }\n });\n mCancel.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n Log.v(\"tag\", \"Panel Dibatalkan\");\n dialog.dismiss();\n // Calling the same class\n recreate();\n }\n });\n dialog.show();\n }", "@android.support.annotation.NonNull\n public android.app.Dialog onCreateDialog(android.os.Bundle r12) {\n /*\n r11 = this;\n r10 = 2;\n r9 = 1;\n r8 = 0;\n r1 = com.whatsapp.DialogToastActivity.f;\n r0 = com.whatsapp.App.as;\n r2 = r11.getArguments();\n r3 = z;\n r3 = r3[r9];\n r2 = r2.getString(r3);\n r0 = r0.b(r2);\n r2 = r11.getContext();\n r2 = r0.a(r2);\n r3 = r11.getArguments();\n r4 = z;\n r4 = r4[r8];\n r3 = r3.getParcelableArrayList(r4);\n r4 = r0.m();\n if (r4 != 0) goto L_0x0037;\n L_0x0031:\n r0 = r0.c();\n if (r0 == 0) goto L_0x0079;\n L_0x0037:\n r0 = r3.get(r8);\n r0 = (android.net.Uri) r0;\n r0 = a(r0);\n r4 = r3.size();\n if (r4 != r9) goto L_0x005c;\n L_0x0047:\n r4 = android.text.TextUtils.isEmpty(r0);\n if (r4 != 0) goto L_0x005c;\n L_0x004d:\n r4 = 2131231276; // 0x7f08022c float:1.8078628E38 double:1.052968157E-314;\n r5 = new java.lang.Object[r10];\n r5[r8] = r0;\n r5[r9] = r2;\n r0 = r11.getString(r4, r5);\n if (r1 == 0) goto L_0x0077;\n L_0x005c:\n r0 = com.whatsapp.App.az;\n r4 = 2131296277; // 0x7f090015 float:1.8210466E38 double:1.0530002716E-314;\n r5 = r3.size();\n r6 = new java.lang.Object[r10];\n r7 = r3.size();\n r7 = java.lang.Integer.valueOf(r7);\n r6[r8] = r7;\n r6[r9] = r2;\n r0 = r0.a(r4, r5, r6);\n L_0x0077:\n if (r1 == 0) goto L_0x00b9;\n L_0x0079:\n r0 = r3.get(r8);\n r0 = (android.net.Uri) r0;\n r0 = a(r0);\n r4 = r3.size();\n if (r4 != r9) goto L_0x009e;\n L_0x0089:\n r4 = android.text.TextUtils.isEmpty(r0);\n if (r4 != 0) goto L_0x009e;\n L_0x008f:\n r4 = 2131230935; // 0x7f0800d7 float:1.8077937E38 double:1.0529679883E-314;\n r5 = new java.lang.Object[r10];\n r5[r8] = r0;\n r5[r9] = r2;\n r0 = r11.getString(r4, r5);\n if (r1 == 0) goto L_0x00b9;\n L_0x009e:\n r0 = com.whatsapp.App.az;\n r1 = 2131296266; // 0x7f09000a float:1.8210444E38 double:1.053000266E-314;\n r4 = r3.size();\n r5 = new java.lang.Object[r10];\n r6 = r3.size();\n r6 = java.lang.Integer.valueOf(r6);\n r5[r8] = r6;\n r5[r9] = r2;\n r0 = r0.a(r1, r4, r5);\n L_0x00b9:\n r1 = new android.support.v7.app.AlertDialog$Builder;\n r2 = r11.getActivity();\n r1.<init>(r2);\n r2 = r11.getContext();\n r0 = com.whatsapp.a28.b(r0, r2);\n r0 = r1.setMessage(r0);\n r1 = 2131231861; // 0x7f080475 float:1.8079815E38 double:1.052968446E-314;\n r2 = new com.whatsapp.aec;\n r2.<init>(r11, r3);\n r0 = r0.setPositiveButton(r1, r2);\n r1 = 2131230884; // 0x7f0800a4 float:1.8077833E38 double:1.052967963E-314;\n r2 = 0;\n r0 = r0.setNegativeButton(r1, r2);\n r0 = r0.create();\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.whatsapp.DocumentPickerActivity.SendDocumentsConfirmationDialogFragment.onCreateDialog(android.os.Bundle):android.app.Dialog\");\n }", "public void openDialog(){\n DialogforTheboysHeroImage dialogforTheboysHeroImage = new DialogforTheboysHeroImage();\n dialogforTheboysHeroImage.show(getSupportFragmentManager(), \"Heros info\");\n }", "public void initiatePopupWindow(View v) {\n try {\n //We need to get the instance of the LayoutInflater, use the context of this activity\n LayoutInflater inflater = (LayoutInflater) Activity_Lesson_Unit_Point_Display_FlashCardActivity.this\n .getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n //Inflate the view from a predefined XML layout\n\n View view = inflater.inflate(R.layout.popup_screen,\n (ViewGroup) findViewById(R.id.popup_element));\n RelativeLayout layout = view.findViewById(R.id.popup_element);\n int width = 650;\n int height = 600;\n width = layout.getWidth();\n height = layout.getHeight();\n //Instantiate grid view\n gridView = view.findViewById(R.id.scroll_grid);\n //Instantiate grid adapter\n// scrollAdapter = new ScrollGridCardAdapter(FlashCardActivity.this,gja_questions,knownList,donknowList,skipList,getScreenSize());\n scrollAdapter = new ScrollGridCardAdapter(Activity_Lesson_Unit_Point_Display_FlashCardActivity.this,questionList,getScreenSize());\n //Setting Adapter to gridview\n gridView.setAdapter(scrollAdapter);\n // create a 300px width and 570px height PopupWindow\n pw = new PopupWindow(view, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n // display the popup in the center\n pw.showAtLocation(v, Gravity.CENTER, 0, 0);\n if (android.os.Build.VERSION.SDK_INT > 20) {\n pw.setElevation(10);\n }\n// TextView mResultText = (TextView) layout.findViewById(R.id.server_status_text);\n Button cancelButton = (Button) view.findViewById(R.id.pop_close_button);\n cancelButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n pw.dismiss();\n// disableEnableViews(myrlayout);\n mHideRunnable.run();\n }\n });\n\n } catch (Exception e) {\n e.printStackTrace();\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 }", "public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n Toast.makeText(getApplicationContext(),\"MineSweeper!!\",\n Toast.LENGTH_SHORT).show();\n }", "private void showErrorDialog(){\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n builder.setTitle(getString(R.string.booking_not_created));\n builder.setMessage(getString(R.string.customer_already_has_active_booking_error));\n builder.setIcon(R.drawable.ic_error_black_24dp);\n builder.setCancelable(false);\n // When users confirms dialog, close the activity\n builder.setPositiveButton(android.R.string.ok, (dialog, which) -> {\n // Close the Activity..\n finish();\n });\n\n AlertDialog dialog = builder.create();\n dialog.setCanceledOnTouchOutside(false);\n dialog.show();\n\n // Change button colors\n Button positiveButton = dialog.getButton(AlertDialog.BUTTON_POSITIVE);\n positiveButton.setTextColor(getColor(R.color.colorPrimary));\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(this.m)\n .setPositiveButton(R.string.donesuccess, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // onFailure();\n onLoginFailed(m);\n }\n });\n return builder.create();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View vi = inflater.inflate(R.layout.fragment_fees, container, false);\n\n\n infobtn = (ImageView)vi.findViewById(R.id.infobtn);\n\n infobtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n new MaterialDialog.Builder(getActivity())\n .title(\"Consultation fees\")\n .content(\"This fees is indicative and might vary. \\n NOTE:Fees is payable at clinic. There are NO charges for booking an appointment.\")\n .positiveText(\"DISMISS\")\n .negativeText(\"\")\n .show();\n }\n });\n\n\n return vi;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\r\n unbinder = ButterKnife.bind(this, rootView);\r\n img1.setOnLongClickListener(new View.OnLongClickListener() {\r\n @Override\r\n public boolean onLongClick(View v) {\r\n showDialog();\r\n return false;\r\n }\r\n });\r\n\r\n return rootView;\r\n\r\n\r\n }" ]
[ "0.7587857", "0.6986386", "0.69305164", "0.6781267", "0.66476715", "0.64886016", "0.64631593", "0.64524144", "0.642714", "0.64186627", "0.6402899", "0.64001787", "0.6397438", "0.6363978", "0.6339949", "0.6269892", "0.6269892", "0.6267987", "0.62447673", "0.6236391", "0.6231438", "0.62280667", "0.6220017", "0.6206671", "0.62063444", "0.6205006", "0.62045676", "0.62011206", "0.6198272", "0.61982715", "0.61974084", "0.6194409", "0.6186261", "0.6184901", "0.6170344", "0.6168014", "0.6158476", "0.61576194", "0.6136997", "0.61357254", "0.6123517", "0.61142087", "0.6111666", "0.6108381", "0.6106549", "0.60986173", "0.60983497", "0.60969275", "0.6086643", "0.60833436", "0.60820854", "0.60739464", "0.607298", "0.6069947", "0.605387", "0.6053533", "0.60476595", "0.60451096", "0.6041098", "0.60391444", "0.60321134", "0.6027728", "0.60272825", "0.6026541", "0.60148907", "0.6008529", "0.6008306", "0.6007367", "0.6003611", "0.59996516", "0.5993393", "0.5984784", "0.59826124", "0.59736514", "0.5970585", "0.5967212", "0.59657645", "0.59643954", "0.5957485", "0.59553003", "0.59528303", "0.5942667", "0.5935284", "0.5933879", "0.59328425", "0.5923369", "0.59222305", "0.59137595", "0.5911146", "0.5910412", "0.5899748", "0.5898321", "0.5895569", "0.58917093", "0.58770925", "0.5871504", "0.5869695", "0.58581084", "0.585209" ]
0.77404404
1
/ MaterialAlertDialogBuilder Mbuilder = new MaterialAlertDialogBuilder(holder.context); View Mview = LayoutInflater.from(holder.context).inflate(R.layout.full_scren_dioloag, null, false); MaterialToolbar toolbar = Mview.findViewById(R.id.DioloagToolbarID); MaterialTextView time = Mview.findViewById(R.id.ImageTimeDetails); PhotoView photoView = Mview.findViewById(R.id.PhotoViewID); Picasso.with(holder.context).load(MessageModalList.getMessage()).into(photoView); time.setText(MessageModalList.getTime()); Mbuilder.setView(Mview); AlertDialog alertDialog = Mbuilder.create(); alertDialog.show(); goto_fullscreen(new ImageFullScreen());
@Override public void onClick(View view) { final Dialog dialog = new Dialog(holder.context, android.R.style.Theme_Black_NoTitleBar_Fullscreen); dialog.setContentView(R.layout.full_screenimage_bottomsheeed); PhotoView photoView = dialog.findViewById(R.id.PhotoView); Picasso.with(holder.context).load(MessageModalList.getMessage()).into(photoView); dialog.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void onClick(View view) {\r\n\r\n\r\n final Dialog dialog = new Dialog(holder.context, android.R.style.Theme_Black_NoTitleBar_Fullscreen);\r\n\r\n dialog.setContentView(R.layout.full_screenimage_bottomsheeed);\r\n\r\n PhotoView photoView = dialog.findViewById(R.id.PhotoView);\r\n Picasso.with(holder.context).load(MessageModalList.getMessage()).into(photoView);\r\n dialog.show();\r\n\r\n }", "public void handleMessage(Message msg) {\n int what = msg.what;\n if (what == 0x01) { //update\n int i = 1;\n text_dialog = (TextView) mAlertDialog.findViewById(R.id.display_dialog);\n text_Title = (TextView) mAlertDialog.findViewById(R.id.display_title);\n btn_ok = (Button) mAlertDialog.findViewById(R.id.btn_ok);\n btn_dele = (Button) mAlertDialog.findViewById(R.id.btn_dele);\n List<String> mdata = new ArrayList<String>();\n text_Title.setGravity(Gravity.CENTER);\n text_dialog.setMovementMethod(new ScrollingMovementMethod());\n // text_dialog.setText();\n\n if(cursor.moveToFirst()){\n do{\n if(cursor.getString(cursor.getColumnIndex(\"title\")).equals(data.get(Position))){\n text_Title.setText(cursor.getString(cursor.getColumnIndex(\"title\")));\n\n String context = cursor.getString(cursor.getColumnIndex(\"context\"));\n String path = cursor.getString(cursor.getColumnIndex(\"path\"));\n\n Log.d(TAG, \"主文的内容是: \"+ context);\n Log.d(TAG, \"图片的路径是: \" + path);\n String[] sourceStrArray = context.split(\"test\");\n String[] sourcePath = path.split(\"####\");\n\n text_dialog.append(sourceStrArray[0]);\n Pattern p = Pattern.compile(\"test\");\n Matcher m = p.matcher(context);\n while (m.find()) {\n\n\n ContentResolver cr = getActivity().getContentResolver();\n Bitmap bitmap = null;\n //将对象存入Bitmap中\n // bitmap = BitmapFactory.decodeStream(cr.openInputStream(uri));\n //bitmap = getLoacalBitmap(\"/storage/emulated/0/DCIM/Camera/IMG20170512173710.jpg\");\n bitmap = getLoacalBitmap(sourcePath[i]);\n int imgWidth = bitmap.getWidth();\n int imgHeight = bitmap.getHeight();\n double partion = imgWidth*1.0/imgHeight;\n double sqrtLength = Math.sqrt(partion*partion + 1);\n //新的缩略图大小\n double newImgW = 320*(partion / sqrtLength);\n double newImgH = 320*(1 / sqrtLength);\n float scaleW = (float) (newImgW/imgWidth);\n float scaleH = (float) (newImgH/imgHeight);\n Log.d(TAG, \"imgHeight: \"+newImgH);\n Matrix mx = new Matrix();\n //对原图片进行缩放\n mx.postScale(scaleW, scaleH);\n bitmap = Bitmap.createBitmap(bitmap, 0, 0, imgWidth, imgHeight, mx, true);\n ImageSpan imageSpan = new ImageSpan(getActivity(),bitmap);\n SpannableString spannableString = new SpannableString(\"test\");\n spannableString.setSpan(imageSpan, 0, spannableString.length(), SpannableString.SPAN_MARK_MARK);\n text_dialog.append(\"\\n\");\n text_dialog.append(spannableString);\n text_dialog.append(\"\\n\");\n text_dialog.append(sourceStrArray[i]);\n i++;\n\n }\n// int contexttimes = appearNumber(context,\"test\");\n// int pathtimes = appearNumber(path,\"####\");\n// pathtimes = pathtimes - 1;\n\n//\n// for (int i = 0; i < sourceStrArray.length; i ++){\n//\n// Log.d(TAG, \"sourceStrArray: \" +sourceStrArray[i]);\n// }\n// for (int i = 0; i < sourcePath.length; i ++){\n//\n// Log.d(TAG, \"sourcePath: \" +sourcePath[i]);\n// }\n// Log.d(TAG, \"主文的test出现的次数: \"+contexttimes);\n// Log.d(TAG, \"图片的路径出现的次数: \"+pathtimes);\n\n }\n\n\n\n }while(cursor.moveToNext());\n\n\n }\n\n\n btn_ok.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n text_dialog.setText(\"\");\n mAlertDialog.cancel();\n }\n });\n btn_dele.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n text_dialog.append(\"\");\n mAlertDialog.cancel();\n\n\n\n }\n });\n\n if(mAlertDialog.isShowing()){\n MyHandler.sendEmptyMessageDelayed(0,1000);\n }\n }else {\n // mAlertDialog.cancel();\n }\n }", "private void inflateDialogResume() {\n showCustomToast(getString(R.string.loading_resume),Toast.LENGTH_SHORT);\n final ImagePopup imagePopup = new ImagePopup(getActivity());\n //imagePopup.setWindowHeight(800);\n imagePopup.setFullScreen(true);\n imagePopup.setBackgroundColor(Color.WHITE);\n //imagePopup.setWindowWidth(650);\n imagePopup.setImageOnClickClose(true);\n if(employeeResume!=\" \"){\n imagePopup.initiatePopupWithPicasso(employeeResume);\n }else{\n imagePopup.initiatePopup(getResources().getDrawable(R.drawable.error));\n }\n imagePopup.viewPopup();\n /*AlertDialog.Builder imageDialog = new AlertDialog.Builder(getActivity());\n //ImageView showImage = new ImageView(getActivity());\n //imageDialog.setTitle(\"Resume\");\n View dialogLayout = getLayoutInflater().inflate(R.layout.dialog_resume, null);\n ImageView imageView = dialogLayout.findViewById(R.id.imageViewDialogResume);\n imageView.setImageURI(Uri.parse(employeeProfilePhoto));\n imageDialog.setView(dialogLayout);\n imageDialog.show();*/\n\n\n }", "@Override\r\n\tprotected Dialog onCreateDialog(int id) {\n\t\tswitch (id) {\r\n case DIALOG_SELF:\r\n \treturn new AlertDialog.Builder(PhotoImagePagerActivity.this, AlertDialog.THEME_HOLO_LIGHT)\r\n .setTitle(\"选项\")\r\n .setItems(R.array.dialog_self, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int which) {\r\n \tif (which == 0)\r\n \t{\r\n \t\t// 设置活动封面\r\n \t\tMap<String, String> params = new HashMap<String, String>();\r\n \t\tparams.put(\"event_id\", String.valueOf(event_id));\r\n \t\tparams.put(\"event_pic_width\", String.valueOf(UDisplayWidth.getPosterPicWidth(PhotoImagePagerActivity.this)));\r\n \t\tparams.put(\"pic_id\", String.valueOf(pic_id));\r\n \t\t\r\n \t\tmDataLoader.postData(UConstants.SETTING_PIC_URL, params, PhotoImagePagerActivity.this, new HDataListener() {\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 onFinish(String source) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\tGson gson = new Gson();\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tTempModel mTempModel = gson.fromJson(source, new TypeToken<TempModel>(){}.getType());\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif (mTempModel != null)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tToast.makeText(PhotoImagePagerActivity.this, mTempModel.message, Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\t\t\t\t\t\tDDBOpenHelper mDdbOpenHelper = DDBOpenHelper.getInstance(PhotoImagePagerActivity.this);\r\n\t\t\t\t\t\t\t\t\t\tmDdbOpenHelper.updateLocalEventModel(mTempModel.event);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\tToast.makeText(PhotoImagePagerActivity.this, \"数据解析出错\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t} catch (JsonSyntaxException e) {\r\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tToast.makeText(PhotoImagePagerActivity.this, \"数据解析出错\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void onFail(String msg) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\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}\r\n\t\t\t\t\t\t});\r\n \t}\r\n \telse if (which == 1)\r\n \t{\r\n \t\t// 设置删除图片\r\n \t\tMap<String, String> params = new HashMap<String, String>();\r\n \t\tparams.put(\"pic_id\", String.valueOf(pic_id));\r\n \t\tparams.put(\"method\", \"delete\");\r\n \t\t\r\n \t\tmDataLoader.postData(UConstants.DELETE_PIC_URL, params, PhotoImagePagerActivity.this, new HDataListener() {\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 onFinish(String source) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void onFail(String msg) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n \t}\r\n \telse if (which == 2)\r\n \t{\r\n \t\t// 保存图片到本地\r\n \t\tmFinalBitmap.display(downloadImageView, big_pic_url);\r\n \t}\r\n }\r\n })\r\n .create();\r\n case DIALOG_OTHER:\r\n \treturn new AlertDialog.Builder(PhotoImagePagerActivity.this, AlertDialog.THEME_HOLO_LIGHT)\r\n .setTitle(\"选项\")\r\n .setItems(R.array.dialog_other, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int which) {\r\n \tif (which == 0)\r\n \t{\r\n \t\tmFinalBitmap.display(downloadImageView, big_pic_url);\r\n \t}\r\n }\r\n })\r\n .create();\r\n }\r\n return null;\r\n\t}", "@Override\n public void onClick(View view) {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(context);\n LayoutInflater layoutInflater = LayoutInflater.from(context);\n View alertDialogView = layoutInflater.inflate(R.layout.alertdialog_photo, null);\n ImageView imageView = alertDialogView.findViewById(R.id.controlImage);\n byte[] decode = Base64.decode(\n arrayList.get(getAdapterPosition()).getUrl(),\n Base64.DEFAULT\n );\n Bitmap bitmap = BitmapFactory.decodeByteArray(decode,0,decode.length);\n imageView.setImageBitmap(bitmap);\n alertDialog.setView(alertDialogView).show();\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\n\n\n\n\n\t\t\t/*\ttry\n\t\t\t\t{\n\n\t\t\t\tdbengine.open();\n\t\t\t\tString Noti_textWithMsgServerID=dbengine.fetchNoti_textFromtblNotificationMstr();\n\t\t\t\tdbengine.close();\n\t\t\t\t//System.out.println(\"Sunil Tty Noti_textWithMsgServerID :\"+Noti_textWithMsgServerID);\n\t\t\t\tif(!Noti_textWithMsgServerID.equals(\"Null\"))\n\t\t\t\t{\n\t\t\t\tStringTokenizer token = new StringTokenizer(String.valueOf(Noti_textWithMsgServerID), \"_\");\n\n\t\t\t\tMsgServerID= Integer.parseInt(token.nextToken().trim());\n\t\t\t\tNoti_text= token.nextToken().trim();\n\n\n\t\t\t\tif(Noti_text.equals(\"\") || Noti_text.equals(\"Null\"))\n\t\t\t\t{\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\n\n\n\t\t\t\t\t final AlertDialog builder = new AlertDialog.Builder(ProductOrderEntry.this).create();\n\n\n\t\t\t\t\t\tLayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\t\t\t View openDialog = inflater.inflate(R.layout.custom_dialog, null);\n\t\t\t\t openDialog.setBackgroundColor(Color.parseColor(\"#ffffff\"));\n\n\t\t\t\t builder.setCancelable(false);\n\t\t\t\t \tTextView header_text=(TextView)openDialog. findViewById(R.id.txt_header);\n\t\t\t\t \tfinal TextView msg=(TextView)openDialog. findViewById(R.id.msg);\n\n\t\t\t\t\t\tfinal Button ok_but=(Button)openDialog. findViewById(R.id.but_yes);\n\t\t\t\t\t\tfinal Button cancel=(Button)openDialog. findViewById(R.id.but_no);\n\n\t\t\t\t\t\tcancel.setVisibility(View.GONE);\n\t\t\t\t\t header_text.setText(ProductOrderEntry.this.getResources().getString(R.string.AlertDialogHeaderMsg));\n\t\t\t\t\t msg.setText(Noti_text);\n\n\t\t\t\t\t \tok_but.setText(ProductOrderEntry.this.getResources().getString(R.string.AlertDialogOkButton));\n\n\t\t\t\t\t\t\tbuilder.setView(openDialog,0,0,0,0);\n\n\t\t\t\t\t ok_but.setOnClickListener(new OnClickListener()\n\t\t\t\t\t {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View arg0)\n\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\tlong syncTIMESTAMP = System.currentTimeMillis();\n\t\t\t\t\t\t\t\t\tDate dateobj = new Date(syncTIMESTAMP);\n\t\t\t\t\t\t\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd-MM-yyyy HH:mm:ss\",Locale.ENGLISH);\n\t\t\t\t\t\t\t\t\tString Noti_ReadDateTime = df.format(dateobj);\n\n\t\t\t\t\t\t\t\t\tdbengine.open();\n\t\t\t\t\t\t\t\t\tdbengine.updatetblNotificationMstr(MsgServerID,Noti_text,0,Noti_ReadDateTime,3);\n\t\t\t\t\t\t\t\t\tdbengine.close();\n\n\t\t\t\t\t\t\t\t\ttry\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tdbengine.open();\n\t\t\t\t\t\t\t\t\t int checkleftNoti=dbengine.countNumberOFNotificationtblNotificationMstr();\n\t\t\t\t\t\t\t\t\t if(checkleftNoti>0)\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t \tString Noti_textWithMsgServerID=dbengine.fetchNoti_textFromtblNotificationMstr();\n\t\t\t\t\t\t\t\t\t\t\t\t//System.out.println(\"Sunil Tty Noti_textWithMsgServerID :\"+Noti_textWithMsgServerID);\n\t\t\t\t\t\t\t\t\t\t\t\tif(!Noti_textWithMsgServerID.equals(\"Null\"))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tStringTokenizer token = new StringTokenizer(String.valueOf(Noti_textWithMsgServerID), \"_\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tMsgServerID= Integer.parseInt(token.nextToken().trim());\n\t\t\t\t\t\t\t\t\t\t\t\t\tNoti_text= token.nextToken().trim();\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tdbengine.close();\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(Noti_text.equals(\"\") || Noti_text.equals(\"Null\"))\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t msg.setText(Noti_text);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tbuilder.dismiss();\n\t\t\t\t\t\t\t\t\t\t}\n\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\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t finally\n\t\t\t\t\t\t {\n\t\t\t\t\t\t \tdbengine.close();\n\n\t\t\t\t\t\t }\n\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\n\n\n\t\t\t\t\t \tbuilder.show();\n\n\n\n\n\n\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(Exception e)\n\t\t\t\t{\n\n\t\t\t\t}\n*/\n\n\n\t}", "private void showdialog()\n\t{\n\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\t\tLayoutInflater inflater = getActivity().getLayoutInflater();\n\t\t\n\t\tView convertView = (View) inflater.inflate(R.layout.changepass_dialog, null);\t\t\t\n\t\t\n\t\tfinal EditText old_pass = (EditText) convertView.findViewById(R.id.old_pass);\n\t\tfinal EditText new_pass = (EditText) convertView.findViewById(R.id.new_pass);\n\t\tTextView pass_changed = (TextView) convertView.findViewById(R.id.pass_changed);\n\t\tImageView close_btn = (ImageView) convertView.findViewById(R.id.chng_pass_close);\n\t\t\n\t\tpass_changed.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) \n\t\t\t{\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tchange_pass(Singleton.user_id, old_pass.getText().toString(), new_pass.getText().toString(), \n\t\t\t\t\t\tnew_pass.getText().toString());\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tclose_btn.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) \n\t\t\t{\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\n\t\t\t\talert.dismiss();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tbuilder.setView(convertView);\n\t\talert = builder.create();\n\t\t\n\t\tWindow window = alert.getWindow();\n\t\tWindowManager.LayoutParams lp = window.getAttributes();\t\t\n\t\t//lp.copyFrom(window.getAttributes());\n\t\twindow.setGravity(Gravity.CENTER);\n\n\t\t// This makes the dialog take up the full width\n\n\t\t/*lp.width = WindowManager.LayoutParams.MATCH_PARENT;\n\t\tlp.height = WindowManager.LayoutParams.WRAP_CONTENT;\n\t\tlp.gravity = Gravity.CENTER;*/\n\t\t\n\t\tlp.x = 100; // The new position of the X coordinates\n lp.y = 100; // The new position of the Y coordinates\n lp.width = 300; // Width\n lp.height = 100; // Height\n // lp.alpha = 0.7f; // Transparency\n\n\t\twindow.setAttributes(lp);\n\t\talert.show();\n\t}", "public AlertDialog.Builder initCommonDialogPage(Context c,String str,Boolean isError){\n LayoutInflater inflater = (LayoutInflater) c.getSystemService( c.LAYOUT_INFLATER_SERVICE);\n final AlertDialog.Builder nameBuilder = new AlertDialog.Builder(c);\n View alertDiaView = inflater.inflate(R.layout.common_dialog_box,null);\n nameBuilder.setView(alertDiaView);\n\n txtVw = (TextView) alertDiaView.findViewById(R.id.textView27);\n bgBVw = (ImageView) alertDiaView.findViewById(R.id.bgBVw);\n iconvVw = (ImageView) alertDiaView.findViewById(R.id.iconvVw);\n txtTitle =(TextView) alertDiaView.findViewById(R.id.txtTitle);\n\n\n\n if(isError) {\n txtTitle.setText(R.string.error_dialogbox_title);\n txtVw.setText(str);\n iconvVw.setImageDrawable(c.getResources().getDrawable(R.drawable.icons8_error));\n nameBuilder.setPositiveButton(R.string.customaletdialog_initCommonDialogPage_posbtn, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n }\n\n if(!isError){\n txtTitle.setText(R.string.common_sucessful);\n txtVw.setText(str);\n iconvVw.setImageDrawable(c.getResources().getDrawable(R.drawable.icons8_ok));\n }\n\n nameBuilder.setNegativeButton(R.string.customaletdialog_initCommonDialogPage_negbtn, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }\n });\n\n\n\n return nameBuilder;\n }", "private void showbadgedialog() {\n final LayoutInflater li = LayoutInflater.from(mContext);\n //Creating a view to get the dialog box\n View confirmDialog = li.inflate(R.layout.dialog_badges, null);\n // number=session.getMobileNumber();\n //Initizliaing confirm button fo dialog box and edittext of dialog box\n final Button buttonconfirm = (Button) confirmDialog.findViewById(R.id.buttonConfirm);\n\n\n AlertDialog.Builder alert = new AlertDialog.Builder(mContext);\n\n alert.setView(confirmDialog);\n\n final AlertDialog alertDialog = alert.create();\n alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n alertDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n\n alertDialog.show();\n\n //On the click of the confirm button from alert dialog\n buttonconfirm.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n alertDialog.dismiss();\n }\n });\n\n }", "@Override\n public void onClick(View v) {\n MainActivity mainActivity = (MainActivity) getActivity();\n DatabaseHelper dbHelper = new DatabaseHelper(mainActivity);\n taskforshopphoto = dbHelper.getTaskInfo(String.valueOf(Shared.SelectedTask.ID));\n if (taskforshopphoto.PhotoID != null) {\n Dialog settingsDialog = new Dialog(getActivity());\n settingsDialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);\n View viewDialog = getActivity().getLayoutInflater().inflate(R.layout.image_layout, null);\n settingsDialog.setContentView(viewDialog);\n ImageView imgShop = (ImageView) viewDialog.findViewById(R.id.ShopImage);\n Bitmap bmp = BitmapFactory.decodeFile(taskforshopphoto.PhotoID);\n\n imgShop.setImageBitmap(bmp);\n settingsDialog.show();\n } else {\n Toast.makeText(getActivity(), \" No Shop photo\", Toast.LENGTH_LONG).show();\n }\n }", "private void mostrarDialogoCargar(){\n materialDialog = new MaterialDialog.Builder(this)\n .title(\"Validando datos\")\n .content(\"Por favor espere\")\n .progress(true, 0)\n .contentGravity(GravityEnum.CENTER)\n .widgetColorRes(R.color.colorPrimary)\n .show();\n\n materialDialog.setCancelable(false);\n materialDialog.setCanceledOnTouchOutside(false);\n }", "public void showAlertDialog(String dialogTitle, String dialogMessage, String btnTextPositive, String btnTextNegative) {\n try {\n final AlertDialog.Builder alertDialog = new AlertDialog.Builder(\n ctx);\n // Setting Dialog Title\n alertDialog.setTitle(dialogTitle);\n // Setting Dialog Message\n alertDialog.setMessage(dialogMessage);\n alertDialog.setCancelable(false);\n // Setting Icon to Dialog\n /*alertDialog.setIcon(R.drawable.tick);*/\n // Setting OK Button\n alertDialog.setPositiveButton(btnTextPositive\n , new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // Write your code here to execute after dialog closed\n // utils.compare_UpdatePreferenceInt(ctx, JsonTags.MMR_33.name(), 1);\n // updateResultToServer();\n mCallBack.onChangeText(utils.BUTTON_NEXT, true);\n utils.showToast(ctx, getResources().getString(R.string.txtManualPass));\n TestController testController = TestController.getInstance(getActivity());\n testController.onServiceResponse(true,\"TouchScreen\", ConstantTestIDs.MIC_ID);\n testController.onServiceResponse(true,\"Speaker\", ConstantTestIDs.SPEAKER_ID);\n mStartRecording = true;\n mImgViewMicPlay.setImageDrawable(getResources().getDrawable(R.drawable.ic_speaker_blue_svg_128));\n nextButtonHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n nextButtonHandler.removeCallbacksAndMessages(null);\n onNextPress();\n }\n }, 2000);\n }\n });\n alertDialog.setNegativeButton(btnTextNegative, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n mCallBack.onChangeText(utils.BUTTON_NEXT, true);\n utils.showToast(ctx, getResources().getString(R.string.txtManualFail));\n TestController testController = TestController.getInstance(getActivity());\n testController.onServiceResponse(false,\"Mic\", ConstantTestIDs.MIC_ID);\n testController.onServiceResponse(false,\"Speaker\", ConstantTestIDs.SPEAKER_ID);\n //utils.compare_UpdatePreferenceInt(ctx, JsonTags.MMR_33.name(), 0);\n // updateResultToServer();\n mStartRecording = true;\n mImgViewMicRecord.setVisibility(View.VISIBLE);\n mImgViewMicRecord.getDrawable().setColorFilter(getResources().getColor(R.color.blue), PorterDuff.Mode.MULTIPLY);\n mImgViewMicPlay.setVisibility(View.GONE);\n nextButtonHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n nextButtonHandler.removeCallbacksAndMessages(null);\n onNextPress();\n }\n }, 2000);\n }\n });\n\n // Showing Alert Message\n alertDialog.show();\n } catch (Exception e) {\n logException(e, \"MicManualFragment_showAlertDialog()\");\n }\n\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(R.string.dialog_fire_missiles)\n .setPositiveButton(R.string.fire, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n return builder.create();\n }", "@Override\n public void onClick(View view) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(AboutUsActivity.this);\n\n View view1 = LayoutInflater.from(getApplicationContext()).inflate(R.layout.popupaboutus_team,null,false);\n\n final AlertDialog alertDialog = builder.create();\n\n alertDialog.setCancelable(false);\n\n alertDialog.setView(view1);\n\n ImageView imageView1 = (ImageView)view1.findViewById(R.id.exist);\n imageView1.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n alertDialog.dismiss();\n }\n });\n\n alertDialog.show();\n }", "private void doDialogMsgBuilder() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(getResources().getString(R.string.OverAge))\n .setCancelable(false)\n .setPositiveButton(getResources().getString(R.string.ok),\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n });\n\n AlertDialog alert = builder.create();\n alert.show();\n }", "@Override\n public void onClick(View v) {\n long unixTime = System.currentTimeMillis() / 1000L*139;\n AlertDialog.Builder builder = new AlertDialog.Builder(FilmCategoryActivity.this);\n\n builder.setTitle(\"Cosa vuoi cercare?\");\n // Set up the input\n final EditText input = new EditText(FilmCategoryActivity.this);\n // Specify the type of input expected; this, for example, sets the input as a password, and will mask the text\n input.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_NORMAL);\n builder.setView(input);\n\n // Set up the buttons\n builder.setPositiveButton(\"Cerca su Serie TV\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n m_Text = input.getText().toString();\n String baseurl = \"https://supermyspace.xyz/cerca/getm3u.php?s=\"+HttpRequest.Base64.encodeBytes(m_Text.getBytes())+\"&add=Cerca&cat=serietv&tokn=\"+unixTime+\"&drptkey=EK:40-200000BUILD&url=1.m3u\";\n String tmp = HttpRequest.Base64.encodeBytes(baseurl.getBytes());\n Constant.openExternalBrowser(FilmCategoryActivity.this, \"xmtv://\"+tmp);\n Log.d(\"[Cerca Globale]\", \"Cerca Avviato!\");\n Log.d(\"[Cerca Globale]\", \"Stringa Cercata: \" + m_Text);\n\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n // SEEEEEEEEEEEEEE\n builder.show();\n }", "@Override\n public void onClick(View v) {\n long unixTime = System.currentTimeMillis() / 1000L*139;\n AlertDialog.Builder builder = new AlertDialog.Builder(FilmCategoryActivity.this);\n\n builder.setTitle(\"Cosa vuoi cercare?\");\n // Set up the input\n final EditText input = new EditText(FilmCategoryActivity.this);\n // Specify the type of input expected; this, for example, sets the input as a password, and will mask the text\n input.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_NORMAL);\n builder.setView(input);\n\n // Set up the buttons\n builder.setPositiveButton(\"Cerca su Serie TV\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n m_Text = input.getText().toString();\n String baseurl = \"https://supermyspace.xyz/cerca/getm3u.php?s=\"+HttpRequest.Base64.encodeBytes(m_Text.getBytes())+\"&add=Cerca&cat=serietv&tokn=\"+unixTime+\"&drptkey=EK:40-200000BUILD&url=1.m3u\";\n String tmp = HttpRequest.Base64.encodeBytes(baseurl.getBytes());\n Constant.openExternalBrowser(FilmCategoryActivity.this, \"xmtv://\"+tmp);\n Log.d(\"[Cerca Globale]\", \"Cerca Avviato!\");\n Log.d(\"[Cerca Globale]\", \"Stringa Cercata: \" + m_Text);\n\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n // SEEEEEEEEEEEEEE\n builder.show();\n }", "@OnClick(R.id.btnConfirm)\n public void onConfirmClicked(){\n new MaterialAlertDialogBuilder(getActivity(), R.style.MaterialAlertDialog_MaterialComponents_Title_Icon)\n .setTitle(R.string.dialog_confirm_title)\n .setMessage(R.string.card_message_demo_small)\n .setPositiveButton(R.string.dialog_confirm, (dialog, which) -> Toast.makeText(getActivity(),\n R.string.message_action_success, Toast.LENGTH_LONG).show())\n .setNegativeButton(R.string.dialog_cancel, null)\n .show();\n\n }", "private void initPopupMoodView(){\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getActivity());\n alertDialogBuilder.setCancelable(false);\n\n LayoutInflater layoutInflaterInput = LayoutInflater.from(getActivity());\n popupView = layoutInflaterInput.inflate(R.layout.popup_mood, null);\n imHappy = popupView.findViewById(R.id.mood_happy);\n imNeutral = popupView.findViewById(R.id.mood_neutral);\n imSad = popupView.findViewById(R.id.mood_sad);\n\n alertDialogBuilder.setView(popupView);\n final AlertDialog alertDialog = alertDialogBuilder.create();\n alertDialog.show();\n\n imHappy.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // set\n imMood.setImageResource(R.drawable.happy_64);\n alertDialog.dismiss();\n }\n });\n\n imNeutral.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // set\n imMood.setImageResource(R.drawable.neutral_64);\n alertDialog.dismiss();\n }\n });\n\n imSad.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // set\n imMood.setImageResource(R.drawable.sad_64);\n alertDialog.dismiss();\n }\n });\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {\n View dialogView = (View) View.inflate(getApplicationContext(), R.layout.activity_image_view, null);\n AlertDialog.Builder dlg = new AlertDialog.Builder(ImageGridActivity.this);\n ImageView ivPoster = (ImageView) dialogView.findViewById(R.id.image_view);\n ivPoster.setImageResource(posterID[position]);\n\n // Log.i(\"이미지아이디\", ((ImageView) view.findViewById(R.id.grid_item_image)).getResources()));\n dlg.setTitle(movies[position]);\n // dlg.setIcon(R.drawable.ic_launcher);\n dlg.setView(dialogView);\n dlg.setNegativeButton(\"닫기\", null);\n dlg.show();\n /* Toast.makeText( getApplicationContext(),\n ((TextView)view.findViewById(R.id.grid_item_label)).getText()\n ,Toast.LENGTH_SHORT\n\n ).show();*/\n }", "private void showDialog(){\n AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = this.getLayoutInflater();\n View dialogView= inflater.inflate(R.layout.dialog_after_share, null);\n dialogBuilder.setView(dialogView);\n\n //Show the dialog\n final AlertDialog alert = dialogBuilder.show();\n alert.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n alert.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);\n alert.setCancelable(false);\n TextView okTV = dialogView.findViewById(R.id.ok1);\n\n okTV.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n alert.hide();\n }\n });\n }", "public void showAlert2(){\n ImportingOCR.this.runOnUiThread(new Runnable() {\n public void run() {\n AlertDialog.Builder builder = new AlertDialog.Builder(ImportingOCR.this);\n builder.setTitle(\"Validating faild\");\n\n builder.setMessage(\"This check already exists in database please try another one.\")\n .setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Intent intent = new Intent(ImportingOCR.this, ImportingOCR.class);\n intent.putExtra(\"personid\", personid);\n intent.putExtra(\"amount\", amount);\n intent.putExtra(\"date\", date);\n intent.putExtra(\"username\", uploader);\n startActivity(intent);\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n dialog.dismiss();\n return;\n }\n });\n }", "private AlertDialog cargando() {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n LayoutInflater inflater = getLayoutInflater();\n\n @SuppressLint(\"InflateParams\") View v = inflater.inflate(R.layout.loading, null);\n\n\n builder.setView(v);\n builder.setCancelable(false);\n\n return builder.create();\n\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n dialog.dismiss();\n //Display err toast msg\n Toast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_SHORT).show();\n }", "private void filepickerDialog(){\n View view = LayoutInflater.from(getContext()).inflate(R.layout.filepicker_dailog, null);\n filePicker = (ImageView) view.findViewById(R.id.file_picker);\n cameraPicker = (ImageView) view.findViewById(R.id.camera_picker);\n final MaterialDialog.Builder builder = new MaterialDialog.Builder(getContext());\n builder.title(\"Upload\");\n builder.negativeText(android.R.string.cancel);\n builder.positiveText(android.R.string.ok);\n builder.onNegative(new MaterialDialog.SingleButtonCallback() {\n @Override\n public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {\n builder.autoDismiss(true);\n }\n });\n builder.customView(view,false);\n builder.show();\n cameraPicker.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if (cameraIntent.resolveActivity(getContext().getPackageManager()) != null) {\n // Create the File where the photo should go\n File photoFile = Helper.createImageFile();\n // Continue only if the File was successfully created\n if (photoFile != null) {\n cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(photoFile));\n startActivityForResult(cameraIntent, ReqCodeImage);\n builder.dismissListener(new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(DialogInterface dialogInterface) {\n dialogInterface.dismiss();\n }\n });\n }\n }\n }\n });\n filePicker.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Helper.filePicker(ReqCode, NoticeFragment.this);\n builder.dismissListener(new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(DialogInterface dialogInterface) {\n dialogInterface.dismiss();\n }\n });\n }\n });\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setMessage(R.string.dialog_internet_eng_text).setPositiveButton\n (R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n System.exit(1);\n /*\n Intent homeIntent= new Intent(getContext(), MainCardActivity.class);\n homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(homeIntent);\n */\n }\n });\n return builder.create();\n }", "private void showPopuopForOustanding() {\n String languageCode = Utility.getInstance().getLanguage(getActivity());\n Utility.getInstance().setLanguage(getActivity(), languageCode);\n Utility.getInstance().localisation(getActivity(), languageCode);\n dialog = new Dialog(mContext);\n if (!dialog.isShowing()) {\n dialog.setCancelable(false);\n dialog.getWindow().addFlags(Window.FEATURE_NO_TITLE);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));\n dialog.setContentView(R.layout.outstanding_popup);\n textview_notFound = dialog.findViewById(R.id.textview_notFound);\n imageviewOutsnadingProfile = dialog.findViewById(R.id.imageviewOutsnadingProfile);\n textviewOustandingId = dialog.findViewById(R.id.textviewOustandingId);\n textviewOustandingName = dialog.findViewById(R.id.textviewOustandingName);\n textviewOustandingAmount = dialog.findViewById(R.id.textviewOustandingAmount);\n relativelayoutOustandingProfile = dialog.findViewById(R.id.relativelayoutProfile);\n edittextoustandingcustomerName = dialog.findViewById(R.id.edittextoustandingcustomerName);\n imageviewMicOustanding = dialog.findViewById(R.id.imageviewMicOustanding);\n ImageView imageviewCross = dialog.findViewById(R.id.imageviewCross);\n\n imageviewCross.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n dialog.dismiss();\n dialog.dismiss();\n if (textToSpeech != null) {\n textToSpeech.stop();\n }\n imageviewDevitMic.setColorFilter(getResources().getColor(android.R.color.white), PorterDuff.Mode.SRC_IN);\n imageviewMicCredit.setColorFilter(getResources().getColor(android.R.color.white), PorterDuff.Mode.SRC_IN);\n imageviewOustMic.setColorFilter(getResources().getColor(android.R.color.white), PorterDuff.Mode.SRC_IN);\n }\n });\n\n imageviewMicOustanding.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n edittextoustandingcustomerName.requestFocus();\n speechToTextFuncVoice(mContext, edittextoustandingcustomerName, 1, imageviewMicOustanding, 1);\n }\n });\n\n\n CardView cardviewOk = dialog.findViewById(R.id.cardviewOk);\n cardviewOk.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n dialog.dismiss();\n dialog.dismiss();\n if (textToSpeech != null) {\n textToSpeech.stop();\n }\n imageviewDevitMic.setColorFilter(getResources().getColor(android.R.color.white), PorterDuff.Mode.SRC_IN);\n imageviewMicCredit.setColorFilter(getResources().getColor(android.R.color.white), PorterDuff.Mode.SRC_IN);\n imageviewOustMic.setColorFilter(getResources().getColor(android.R.color.white), PorterDuff.Mode.SRC_IN);\n }\n });\n\n edittextoustandingcustomerName.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n Log.e(TAG, \"onTextChanged: \");\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n Log.e(TAG, \"onTextChanged: \");\n if (dialog.isShowing()) {\n if(Utility.getInstance().isOnline(mContext)) {\n checkOustandingData(s.toString(), true);\n }else {\n Toast.makeText(mContext,getString(R.string.please_check_internet),Toast.LENGTH_SHORT).show();\n }\n }\n }\n });\n\n if (!dialog.isShowing()) {\n String languageCode2 = Utility.getInstance().getLanguage(getActivity());\n Utility.getInstance().setLanguage(getActivity(), languageCode2);\n Utility.getInstance().localisation(getActivity(), languageCode2);\n dialog.show();\n/* Window window = dialog.getWindow();\n window.setLayout(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);*/\n dialog.getWindow().setGravity(Gravity.TOP | Gravity.RIGHT);\n WindowManager.LayoutParams layoutParams = dialog.getWindow().getAttributes();\n layoutParams.x = 100; // right margin\n layoutParams.y = 170; // top margin\n dialog.getWindow().setAttributes(layoutParams);\n // e.g. bottom + left margins:\n dialog.getWindow().setGravity(Gravity.BOTTOM | Gravity.LEFT);\n WindowManager.LayoutParams layoutParams1 = dialog.getWindow().getAttributes();\n layoutParams1.x = 100; // left margin\n layoutParams1.y = 170; // bottom margin\n dialog.getWindow().setAttributes(layoutParams1);\n }\n }\n }", "@Override\n public void onClick(View v) {\n long unixTime = System.currentTimeMillis() / 1000L*139;\n AlertDialog.Builder builder = new AlertDialog.Builder(FilmCategoryActivity.this);\n\n builder.setTitle(\"Cosa vuoi cercare?\");\n // Set up the input\n final EditText input = new EditText(FilmCategoryActivity.this);\n // Specify the type of input expected; this, for example, sets the input as a password, and will mask the text\n input.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_NORMAL);\n builder.setView(input);\n\n // Set up the buttons\n builder.setPositiveButton(\"Cerca su Film\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n m_Text = input.getText().toString();\n String baseurl = \"https://supermyspace.xyz/cerca/getm3u.php?s=\"+HttpRequest.Base64.encodeBytes(m_Text.getBytes())+\"&add=Cerca&cat=film&tokn=\"+unixTime+\"&drptkey=EK:40-200000BUILD&url=1.m3u\";\n String tmp = HttpRequest.Base64.encodeBytes(baseurl.getBytes());\n Constant.openExternalBrowser(FilmCategoryActivity.this, \"xmtv://\"+tmp);\n Log.d(\"[Cerca Globale]\", \"Cerca Avviato!\");\n Log.d(\"[Cerca Globale]\", \"Stringa Cercata: \" + m_Text);\n\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n // SEEEEEEEEEEEEEE\n builder.show();\n }", "private void mDialogShow() {\n alertDialog = new AlertDialog.Builder(this).create();\n alertDialog.setTitle(\"CyanMobile Warning!\");\n alertDialog.setMessage(\"Enable Pie Menu App Toggle to use this!\");\n alertDialog.setButton(DialogInterface.BUTTON_POSITIVE,\n getResources().getString(com.android.internal.R.string.ok),\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n updateValues();\n return;\n }\n });\n \n alertDialog.show();\n }", "public AlertDialog createSimpleDialog(String mensaje, String titulo, final String typ) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n LayoutInflater inflater = getActivity().getLayoutInflater();\n\n View v = inflater.inflate(R.layout.dialog_monitoring_info, null);\n builder.setView(v);\n\n TextView tvTitle = (TextView) v.findViewById(R.id.tv_title_dialog);\n TextView tvDescription = (TextView) v.findViewById(R.id.tv_description_dialog);\n\n tvTitle.setText(titulo);\n tvTitle.setCompoundDrawables(ContextCompat.getDrawable(v.getContext(), R.drawable.ic_question), null, null, null);\n tvDescription.setText(mensaje);\n\n builder.setPositiveButton(getResources().getString(R.string.info_dialog_option_accept),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n if (typ.equals(\"REGIST\")){\n MonitoringRegistrationFormFragment fragment = new MonitoringRegistrationFormFragment();\n Bundle params = new Bundle();\n params.putString(\"AREA\", area);\n params.putString(\"OPCION\", \"N\");\n fragment.setArguments(params);\n\n getActivity().getSupportFragmentManager().popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);\n\n getActivity().getSupportFragmentManager().beginTransaction()\n .replace(R.id.monitoring_principal_context, fragment)\n .commit();\n }\n else {\n AdminUserFormFragment fragment = new AdminUserFormFragment();\n getActivity().getSupportFragmentManager().popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);\n getActivity().getSupportFragmentManager().beginTransaction()\n .replace(R.id.transaction_principal_context, fragment)\n .commit();\n }\n }\n },300);\n }\n })\n .setNegativeButton(getResources().getString(R.string.info_dialog_option_cancel),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n builder.create().dismiss();\n if (typ.equals(\"REGIST\")){\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent intent = new Intent(getActivity(), MonitorMenuActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n startActivity(intent);\n getActivity().finish();\n }\n },300);\n }\n else {\n getActivity().finish();\n }\n }\n });\n\n return builder.create();\n }", "public void alertDialogBasico() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n\r\n // 2. Encadenar varios métodos setter para ajustar las características del diálogo\r\n builder.setMessage(R.string.dialog_message);\r\n\r\n\r\n builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n\r\n }\r\n });\r\n\r\n\r\n builder.show();\r\n\r\n }", "private void alertDialog(int title, int message, int icon) {\n tst_Message.cancel();\n tst_Message = null;\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(title);\n builder.setMessage(message);\n builder.setIcon(icon);\n builder.setPositiveButton(R.string.dialog_pos_btn, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n reset();\n }\n });\n builder.show();\n }", "private void showDialogPolygon1() {\n LayoutInflater inflater = getLayoutInflater();\n CardView cardView = (CardView) getLayoutInflater().inflate(R.layout.dialog_root,null);\n LinearLayout root = (LinearLayout) cardView.findViewById(R.id.linearLayout_root);\n //inflate each row that should be contained in the dialog box\n View rowAmount = inflater.inflate(R.layout.row_amount,null);\n View rowTelephone = inflater.inflate(R.layout.row_telephone,null);\n View rowText = inflater.inflate(R.layout.row_text,null);\n View rowButtons = inflater.inflate(R.layout.row_buttons,null);\n //add each row to the root\n root.addView(rowAmount);\n root.addView(rowTelephone);\n root.addView(rowText);\n root.addView(rowButtons);\n\n customDialog = new Dialog(getActivity());\n customDialog.requestWindowFeature(Window.FEATURE_NO_TITLE); // before\n customDialog.setContentView(cardView);\n customDialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));\n customDialog.setCancelable(true);\n\n\n final EditText editTextAmount = customDialog.findViewById(R.id.edit_text_amount);\n final EditText editTextNumber = customDialog.findViewById(R.id.edit_text_mobileNumber);\n ImageButton imageButton = customDialog.findViewById(R.id.selec_contact_ImageBtn);\n imageButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n contactPicker();\n }\n });\n\n\n ((Button) customDialog.findViewById(R.id.bt_okay)).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent hoverIntent = new HoverParameters.Builder(getActivity())\n .request(\"e0d94aec\")\n .style(R.style.BaseTheme)\n .extra(\"MobileNumber\", editTextNumber.getText().toString())\n .extra(\"Amount\", editTextAmount.getText().toString())\n .buildIntent();\n startActivityForResult(hoverIntent, 0);\n }\n\n });\n\n ((Button) customDialog.findViewById(R.id.bt_cancel)).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n customDialog.dismiss();\n }\n });\n\n\n customDialog.show();\n }", "private final void m90472b() {\n if (isAttached() && getContext() != null) {\n Context context = getContext();\n if (context == null) {\n C32569u.m150511a();\n }\n AlertDialog.C0155a aVar = new AlertDialog.C0155a(context);\n aVar.setTitle(getString(R.string.u4));\n aVar.setMessage(getString(R.string.u3));\n aVar.setPositiveButton(getString(R.string.u2), new DialogInterface$OnClickListenerC17913e(this));\n aVar.setNegativeButton(getString(R.string.u1), new DialogInterface$OnClickListenerC17914f(this));\n AlertDialog create = aVar.create();\n C32569u.m150513a((Object) create, \"AlertDialog.Builder(cont… }\\n\\n }.create()\");\n if (create != null) {\n create.show();\n create.setCanceledOnTouchOutside(true);\n create.setOnCancelListener(new DialogInterface$OnCancelListenerC17915g(this));\n create.mo1499a(-1).setTypeface(null, 1);\n }\n }\n }", "@TargetApi(Build.VERSION_CODES.M)\n @Override\n public void onClick(View v) {\n AlertDialog.Builder dialog = new AlertDialog.Builder(ActivityManageEvent.this);\n dialog.setTitle(\"Event Information\");\n ScrollView scroll = new ScrollView(ActivityManageEvent.this);\n LinearLayout layout = new LinearLayout(ActivityManageEvent.this);\n layout.setOrientation(LinearLayout.VERTICAL);\n\n // Event Name\n TextView eventNameTitle = new TextView(ActivityManageEvent.this);\n eventNameTitle.setText(\"Name\");\n eventNameTitle.setTextSize(16);\n eventNameTitle.setPadding(0, 15, 0, 0);\n eventNameTitle.setGravity(Gravity.CENTER);\n layout.addView(eventNameTitle);\n\n final EditText eventName = new EditText(ActivityManageEvent.this);\n eventName.setTextSize(16);\n eventName.setText(event.name);\n layout.addView(eventName);\n\n // Event Location\n TextView eventLocationTitle = new TextView(ActivityManageEvent.this);\n eventLocationTitle.setText(\"Location (Adress, City, Country, Zip Code)\");\n eventLocationTitle.setTextSize(16);\n eventLocationTitle.setPadding(0, 15, 0, 0);\n eventLocationTitle.setGravity(Gravity.CENTER);\n layout.addView(eventLocationTitle);\n\n final EditText eventLocation = new EditText(ActivityManageEvent.this);\n eventLocation.setTextSize(16);\n final String initialLocationName = event.locationName;\n eventLocation.setText(event.locationName);\n layout.addView(eventLocation);\n\n // Event Time\n TextView eventTimeTitle = new TextView(ActivityManageEvent.this);\n eventTimeTitle.setText(\"Time\");\n eventTimeTitle.setTextSize(16);\n eventTimeTitle.setPadding(0, 15, 0, 0);\n eventTimeTitle.setGravity(Gravity.CENTER);\n layout.addView(eventTimeTitle);\n\n Calendar cal = Calendar.getInstance();\n cal.setTime(event.date);\n LayoutInflater inflaterTime = LayoutInflater.from(ActivityManageEvent.this);\n final TimePicker eventTimePicker = (TimePicker)inflaterTime.inflate(R.xml.timepicker, null);\n eventTimePicker.setIs24HourView(true);\n eventTimePicker.setCurrentHour(cal.get(Calendar.HOUR_OF_DAY));\n eventTimePicker.setCurrentMinute(cal.get(Calendar.MINUTE));\n layout.addView(eventTimePicker);\n\n // Event Date\n TextView eventDateTitle = new TextView(ActivityManageEvent.this);\n eventDateTitle.setText(\"Date\");\n eventDateTitle.setTextSize(16);\n eventDateTitle.setPadding(0, 15, 0, 0);\n eventDateTitle.setGravity(Gravity.CENTER);\n layout.addView(eventDateTitle);\n\n LayoutInflater inflaterDate = LayoutInflater.from(ActivityManageEvent.this);\n final DatePicker eventDatePicker = (DatePicker)inflaterDate.inflate(R.xml.datepicker, null);\n int eYear = cal.get(Calendar.YEAR);\n int eMonth = cal.get(Calendar.MONTH);\n int eDay = cal.get(Calendar.DAY_OF_MONTH);\n eventDatePicker.init(eYear, eMonth, eDay, null);\n eventDatePicker.setCalendarViewShown(false);\n eventDatePicker.setSpinnersShown(true);\n layout.addView(eventDatePicker);\n\n // Display the window\n scroll.addView(layout);\n dialog.setView(scroll);\n\n dialog.setPositiveButton(\"Save\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n try {\n // Update event attributes\n event.name = eventName.getText().toString();\n String location = eventLocation.getText().toString();\n event.locationName = location;\n int updateYear = eventDatePicker.getYear();\n int updateMonth = eventDatePicker.getMonth() + 1;\n int updateDay = eventDatePicker.getDayOfMonth();\n String sDate =\n updateYear + \"-\" +\n updateMonth + \"-\" +\n updateDay + \" \" +\n eventTimePicker.getCurrentHour() + \":\" +\n eventTimePicker.getCurrentMinute();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n event.date = sdf.parse(sDate);\n List<Address> adresse = geocoder.getFromLocationName(location, 1);\n if (adresse.size() == 0) {\n eventLocation.setText(initialLocationName);\n Toast toast1 = Toast.makeText(ActivityManageEvent.this,\n \"The format of the location was not followed\", Toast.LENGTH_LONG);\n Toast toast2 = Toast.makeText(ActivityManageEvent.this,\n \"Or the location could not be found.\", Toast.LENGTH_LONG);\n Toast toast3 = Toast.makeText(ActivityManageEvent.this,\n \"Try again!\", Toast.LENGTH_LONG);\n toast1.show();\n toast2.show();\n toast3.show();\n }\n event.locX = adresse.get(0).getLatitude();\n event.locY = adresse.get(0).getLongitude();\n\n // Update event in database\n SqlUtility.updateEvent(event);\n\n // Update event info on screen\n getEvents(user);\n\n } catch (ParseException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n\n dialog.setNeutralButton(\"Exit\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // Dismiss window\n }\n });\n\n dialog.setNegativeButton(\"Delete\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n try {\n // Remove event from database\n SqlUtility.removeEvent(event);\n\n // Update events to remove event from screen\n getEvents(user);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n\n dialog.show();\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n//\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\r\n\t\tsetContentView(R.layout.newsoperationlay);\r\n imageLoader = ImageLoader.getInstance();\r\n\t\tgetActionBar().hide();\r\n\t\tIntent intent = getIntent();\r\n\t\t\r\n\t\treturnbutton = (LinearLayout)findViewById(R.id.newsopreturn);\r\n\t\tnewoperation = (ImageButton)findViewById(R.id.newsxuanxiang);\r\n\t\thistorymessage = (RelativeLayout)findViewById(R.id.historymessage);\r\n\t\tmessageset = (RelativeLayout)findViewById(R.id.messageset);\r\n\t\txinwengroup_view = (ImageView) findViewById(R.id.xinwengroupimg);\r\n\t\txinwengroup_text = (TextView) findViewById(R.id.xinwengrouptext);\r\n\t\txinwengroup_text.setText(intent.getStringExtra(\"descripe\").toString());\r\n//\t\tPicasso.with(this)\r\n//\t\t .load(intent.getStringExtra(\"url\").toString())\r\n//\t\t .into(xinwengroup_view);\r\n\t\timageLoader.displayImage(intent.getStringExtra(\"url\").toString(), xinwengroup_view,App.options_error);\r\n\t\t\r\n\t\treturnbutton.setOnClickListener(this);\r\n\t\tnewoperation.setOnClickListener(this);\r\n\t\thistorymessage.setOnClickListener(this);\r\n\t\tmessageset.setOnClickListener(this);\r\n\t\t\r\n\t\tpopupShareView =NewsOperation.this.getLayoutInflater().inflate(R.layout.newsoperationdetaillay, null);\r\n\t\ttopLinearLayout = (LinearLayout) popupShareView.findViewById(R.id.news_top_share);\r\n\t\tpopupShareView.setOnClickListener(new OnClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tpopupShareWindow.dismiss();\r\n\t\t\t}\r\n\t\t});\r\n//\t\txuanxiangpopupShareView =NewsOperation.this.getLayoutInflater().inflate(R.layout.newsxianxiangdetaillay, null);\r\n//\t\txuanxiangtopLinearLayout = (LinearLayout) xuanxiangpopupShareView.findViewById(R.id.news_top_xuan);\r\n\t\tnewsexpect = (Button)popupShareView.findViewById(R.id.newstoreceive);\r\n\t\tnewsrefuse = (Button)popupShareView.findViewById(R.id.newsrefudereceive);\r\n\t\tnewscancel = (Button)popupShareView.findViewById(R.id.receivecancel);\r\n\t\tnewscancel.setOnClickListener(this);\r\n//\t\txuanxiangpopupShareView.setOnClickListener(new OnClickListener() {\r\n//\t\t\t@Override\r\n//\t\t\tpublic void onClick(View v) {\r\n//\t\t\t\txuanxiangpopupShareWindow.dismiss();\r\n//\t\t\t}\r\n//\t\t});\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\r\n\r\n // Inflate the layout to use as dialog or embedded fragment\r\n view=inflater.inflate(R.layout.detailednews, container, false);\r\n TextView tvTitle=(TextView) view.findViewById(R.id.detailedNewstitle);\r\n TextView tvContent=(TextView)view.findViewById(R.id.detailedcontent);\r\n TextView tvDate=(TextView) view.findViewById(R.id.detaileddate);\r\n NetworkImageView imageView=(NetworkImageView) view.findViewById(R.id.detailedicon);\r\n\r\n\r\n String title= getArguments().getString(\"title\");\r\n String date= getArguments().getString(\"date\");\r\n String content= getArguments().getString(\"content\");\r\n String imageurl=getArguments().getString(\"url\");\r\n\r\n //setting the values\r\n\r\n loadImage = CustomVolleyRequest.getInstance(context).getImageLoader();\r\n loadImage.get(imageurl, ImageLoader.getImageListener(imageView, R.drawable.ic_holder, android.R.drawable.ic_dialog_alert));\r\n\r\n tvTitle.setText(title);\r\n tvContent.setText(content);\r\n tvDate.setText(date);\r\n imageView.setImageUrl(imageurl,loadImage);\r\n\r\n //return the view that is going to be inflated in the fragment\r\n return view;\r\n}", "private void openPopupMold(final int position, String start_dt, String end_dt, final String KEY) {\n final Dialog dialog = new Dialog(CompositeActivity.this, R.style.Theme_AppCompat_DayNight_Dialog_Alert);\n View dialogView;\n\n if (KEY.equals(\"WK\")) {\n dialogView = LayoutInflater.from(CompositeActivity.this).inflate(R.layout.change_worker, null);\n dialog.setCancelable(false);\n dialog.setContentView(dialogView);\n StaffType = dialog.findViewById(R.id.StaffType);\n StaffType.setText(compositeMasterArrayList.get(position).getStaffTp());\n dialog.findViewById(R.id.rll2).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n popupWorker(StaffType);\n }\n });\n\n\n } else {\n dialogView = LayoutInflater.from(CompositeActivity.this).inflate(R.layout.change_mold, null);\n dialog.setCancelable(false);\n dialog.setContentView(dialogView);\n }\n\n final TextView ngaystart, giostart, Used;\n ngaystart = dialog.findViewById(R.id.ngaystart);\n giostart = dialog.findViewById(R.id.giostart);\n\n final TextView ngayend, gioend;\n ngayend = dialog.findViewById(R.id.ngayend);\n gioend = dialog.findViewById(R.id.gioend);\n Used = dialog.findViewById(R.id.Used);\n tvid = dialog.findViewById(R.id.tvid);\n tvid.setText(compositeMasterArrayList.get(position).getCode());\n\n if (compositeMasterArrayList.get(position).getUseYn().equals(\"Y\")) {\n Used.setText(\"USE\");\n } else {\n Used.setText(\"UNUSE\");\n }\n dialog.findViewById(R.id.im1).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n openCameraScan();\n }\n });\n\n dialog.findViewById(R.id.confirm).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (tvid.getText().toString().length() != 0) {\n //so sanh 2 ngay duoc chon\n Date dsend = new Date();\n Date dstart = new Date();\n\n try {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n dstart = sdf.parse(ngaystart.getText().toString() + \" \" + giostart.getText().toString());\n dsend = sdf.parse(ngayend.getText().toString() + \" \" + gioend.getText().toString());\n\n } catch (ParseException ex) {\n Log.e(\"rrr\", ex.getMessage());\n }\n\n if (dsend.after(dstart)) {\n\n String us = Used.getText().toString();\n String keyus = \"\";\n if (us.equals(\"USE\")) {\n keyus = \"Y\";\n } else {\n keyus = \"N\";\n }\n if (KEY.equals(\"WK\")) {\n showDialog();\n modifyProcessMachineWK(KEY,compositeMasterArrayList.get(position).getPmId(),keyus,ngaystart.getText().toString() + \" \" + giostart.getText().toString(),ngayend.getText().toString() + \" \" + gioend.getText().toString());\n } else {\n showDialog();\n modifyProcessMachine(KEY,compositeMasterArrayList.get(position).getPmId(),keyus,ngaystart.getText().toString() + \" \" + giostart.getText().toString(),ngayend.getText().toString() + \" \" + gioend.getText().toString());\n }\n\n } else {\n AlertError.alertError(\"Start day was bigger than end day. That is wrong\", CompositeActivity.this);\n }\n\n } else {\n tvid.setError(\"Please input here!\");\n }\n\n }\n });\n\n dialog.findViewById(R.id.rl2).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n openPpUse(Used);\n }\n });\n\n final String yy, MM, dd, hh, mm, ss, yye, MMe, dde, hhe, mme, sse;\n if (start_dt.length() == 19) {\n yy = start_dt.substring(0, 4);\n MM = start_dt.substring(5, 7);\n dd = start_dt.substring(8, 10);\n hh = start_dt.substring(11, 13);\n mm = start_dt.substring(14, 16);\n ss = start_dt.substring(17, 19);\n } else {\n AlertError.alertError(\"Format date incorrect.\", CompositeActivity.this);\n return;\n }\n if (end_dt.length() == 19) {\n yye = end_dt.substring(0, 4);\n MMe = end_dt.substring(5, 7);\n dde = end_dt.substring(8, 10);\n hhe = end_dt.substring(11, 13);\n mme = end_dt.substring(14, 16);\n sse = end_dt.substring(17, 19);\n } else {\n AlertError.alertError(\"Format date incorrect.\", CompositeActivity.this);\n return;\n }\n ngaystart.setText(yy + \"-\" + MM + \"-\" + dd);\n ngayend.setText(yye + \"-\" + MMe + \"-\" + dde);\n giostart.setText(hh + \":\" + mm + \":\" + ss);\n gioend.setText(hhe + \":\" + mme + \":\" + sse);\n\n ngaystart.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialogDay(ngaystart);\n }\n });\n giostart.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialogHour(giostart, hh, mm);\n }\n });\n ngayend.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialogDay(ngayend);\n }\n });\n gioend.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialogHour(gioend, hhe, mme);\n }\n });\n\n dialog.findViewById(R.id.btclose).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n dialog.cancel();\n }\n });\n\n dialog.show();\n }", "@SuppressWarnings(\"deprecation\")\n\t\tprivate void alertDialog(String msg) \n\t\t{\n\t\t\tAlertDialog alertDialog = new AlertDialog.Builder(LoginScreenActivity.this).create();\n\t alertDialog.setTitle(\"StyleZ\");\n\t alertDialog.setMessage(msg);\n\t alertDialog.setButton(\"OK\", new DialogInterface.OnClickListener() \n\t {\n\t public void onClick(DialogInterface dialog, int which) {\n\t \t\n\t // Write your code here to execute after dialog closed\n\t dialog.dismiss();\n\t \n\t if(strstatus.equals(\"success\"))\n\t {\n\t Intent i=new Intent(LoginScreenActivity.this,StyleZTab.class);\n\t startActivity(i);\n\t finish();\n\t }\n\t else\n\t {\n\t \t imgviewloginon.setVisibility(View.GONE);\n\t imgviewloginoff.setVisibility(View.VISIBLE);\n\t }\n\t }\n\t });\n\t alertDialog.show();\n\t\t}", "@Override\n public void onClick(View v) {\n repeat = \"\";\n if(eventName_array.length == 0){\n title = \"您還沒有創建任何事件\";\n }else{\n title = \"選擇事件\";\n }\n new AlertDialog.Builder(editBeacon.this)\n .setTitle(title)\n .setMultiChoiceItems(\n eventName_array,\n event_select,\n new DialogInterface.OnMultiChoiceClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which, boolean isChecked) {\n // TODO Auto-generated method stub\n\n }\n })\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // TODO Auto-generated method stub\n\n horizontalList_event=new ArrayList<>();\n\n for (int i = 0; i < event_select.length; i++) {\n if (event_select[i]) { //如果選擇的是true(被勾選)\n eventIdSelect.append(eventId_array[i]).append(\",\");\n //連接stringbuffer eventIdSelect(這是一段傳給Php的stringbuffer)\n\n horizontalList_event.add(eventName_array[i]);\n\n }\n }\n horizontalAdapter_event=new HorizontalAdapter(horizontalList_event);\n LinearLayoutManager horizontalLayoutManagaer\n = new LinearLayoutManager(editBeacon.this, LinearLayoutManager.HORIZONTAL, false);\n horizontal_recycler_view_event.setLayoutManager(horizontalLayoutManagaer);\n horizontal_recycler_view_event.setAdapter(horizontalAdapter_event);\n\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // TODO Auto-generated method stub\n\n }\n }).show();\n\n }", "public void initiateReportWindow(View v) {\n\n cur_questionNo=tv_Qid.getText().toString();\n String[] s = { \"QUASTION\", \"ANSWER\", \"ADL_INFO\", \"GRP_INFO\",\"REV_INFO\",\"OTHERS\"};\n final ArrayAdapter<String> adp = new ArrayAdapter<String>(Activity_Lesson_Unit_Point_Display_FlashCardActivity.this,\n android.R.layout.simple_dropdown_item_1line, s);\n\n LayoutInflater factory = LayoutInflater.from(this);\n final View view = factory.inflate(R.layout.activity_alert_report, null);\n //View view = infl.inflate(R.layout.activity_alert_report, null);\n final android.app.AlertDialog alertDialog = new android.app.AlertDialog.Builder(Activity_Lesson_Unit_Point_Display_FlashCardActivity.this,R.style.NewDialog).create();\n\n TextView txt_question_id= (TextView) view.findViewById(R.id.txt_question_id);\n txt_question_id.setText(cur_questionNo);\n final EditText txt_reportMessage= (EditText) view.findViewById(R.id.txt_reportMessage);\n sp_report=view.findViewById(R.id.sp_report);\n //sp_report.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));\n sp_report.setAdapter(adp);\n ImageView iv_close= (ImageView) view.findViewById(R.id.iv_close);\n alertDialog.setView(view);\n\n\n Button btn_report= (Button) view.findViewById(R.id.btn_report);\n\n btn_report.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n //txt_reportMessage.setText(\"CourseId:\"+courseid+\", SubjectId:\"+subjectId+\", PaperId:\"+paperid+\", ChapterId:\"+paperid);\n new AsyncCheckInternet(Activity_Lesson_Unit_Point_Display_FlashCardActivity.this,new INetStatus(){\n @Override\n public void inetSatus(Boolean netStatus) {\n if(netStatus){\n HashMap<String,String> hmap=new HashMap<>();\n hmap.put(\"QUASTION_ID\",cur_questionNo);\n hmap.put(\"COURSE_ID\",courseid);\n hmap.put(\"SUBJECT_ID\",subjectid);\n hmap.put(\"PAPER_ID\",paperid);\n hmap.put(\"CHAPTER_ID\",paperid);\n hmap.put(\"ACTIVITY_TYPE\",\"FLASH_CARD\");\n hmap.put(\"ISSUE_TYPE\",sp_report.getSelectedItem().toString());\n report_message=txt_reportMessage.getText().toString();\n hmap.put(\"ISSUE_MESSAGE\",report_message);\n hmap.put(\"REPORTED_BY\",studentid);\n\n new BagroundTask(URLClass.hosturl +\"insert_report.php\",hmap, Activity_Lesson_Unit_Point_Display_FlashCardActivity.this, new IBagroundListener() {\n\n @Override\n public void bagroundData(String json) {\n if(json.equalsIgnoreCase(\"Report_NOT_Inserted\")){\n Toast.makeText(getApplicationContext(),\"Report not submitted,please try again..\",Toast.LENGTH_SHORT).show();\n }else {\n alertDialog.cancel();\n Toast.makeText(getApplicationContext(),\"Report submitted,Thank you for your feedback..\",Toast.LENGTH_SHORT).show();\n }\n }\n }).execute();\n }else {\n Toast.makeText(getApplicationContext(),\"No internet,Please Check Your Connection\",Toast.LENGTH_SHORT).show();\n }\n }\n }).execute();\n }\n });\n iv_close.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n alertDialog.cancel();\n }\n });\n alertDialog.show();\n\n }", "@Override\r\n\t\t\tpublic boolean onItemLongClick(AdapterView<?> arg0, View arg1,\r\n\t\t\t\t\tint arg2, long arg3) {\n\r\n\t\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(act);\r\n\r\n\r\n\t\t\t\tfinal AlertDialog dialog = builder.create();\r\n\r\n\t\t\t\tdialog.setIcon(R.drawable.morgans_logo_icon);\r\n\t\t\t\tdialog.setTitle(\"Labour details\");\r\n\t\t\t\tView detailsView=View.inflate(act, R.layout.labour_details, null);\r\n\t\t\t\tdialog.setView(detailsView);\r\n\t\t\t\t\r\n\t\t\t\tLabourData data=(LabourData)arg1.getTag();\r\n\r\n\t\t\t\tfinal EditText qty=(EditText)detailsView.findViewById(R.id.et_labour_qty);\r\n\r\n\t\t\t\tfinal EditText et_prod_margin=(EditText)detailsView.findViewById(R.id.et_labour_margin);\r\n\t\t\t\t\r\n\t\t\t\tfinal Spinner daySpinner=(Spinner)detailsView.findViewById(R.id.tv_labour_type);\r\n\t\t\t\t\r\n\t\t\t\t \r\n\t\t\t\t//String prodQty=((TextView)arg1.findViewById(R.id.tv__labour_qty)).getText().toString();\r\n\t\t\t\tqty.setText(\"\"+(data).getQty());\r\n\t\t\t\t\r\n\t\t\t\tfloat margintPerHour=Float.parseFloat(data.getPricePerHour())*data.getMargin()/100;\r\n\t\t\t\tfloat marginPerDay=Float.parseFloat(data.getPricePerDay())*data.getMargin()/100;\r\n\t\t\t\t\r\n\r\n\t\t\t\tet_prod_margin.setText(\"\"+(data).getMargin());\r\n\t\t\t\t((TextView)detailsView.findViewById(R.id.tv_price_per_hour)).setText(data.getPricePerHour());\r\n\t\t\t\t((TextView)detailsView.findViewById(R.id.tv_PricePerDay)).setText(data.getPricePerDay());\r\n\t\t\t\t((TextView)detailsView.findViewById(R.id.tv_created_by)).setText(data.getCreatedBy());\r\n\t\t\t\t((TextView)detailsView.findViewById(R.id.tv_labour_name)).setText(data.getLabour());\r\n\t\t\t\t\r\n\t\t\t\tif(data.getPriceType().equals(\"Day\"))\r\n\t\t\t\t(daySpinner).setSelection(0);\r\n\t\t\t\telse{\r\n\t\t\t\t\t(daySpinner).setSelection(1);\r\n\t\t\t\t}\r\n\t\t\t\t((TextView)detailsView.findViewById(R.id.tv_margin_per_day)).setText(\"\"+marginPerDay);\r\n\t\t\t\t((TextView)detailsView.findViewById(R.id.tv_margin_per_hour)).setText(\"\"+margintPerHour);\r\n\r\n\t\t\t\t((TextView)detailsView.findViewById(R.id.tv_total_per_day)).setText(\"\"+(marginPerDay+data.getPricePerDay()));\r\n\t\t\t\t((TextView)detailsView.findViewById(R.id.tv_total_per_hour)).setText(\"\"+(margintPerHour+data.getPricePerHour()));\r\n\r\n\t\t\t\tButton but_update=(Button)detailsView.findViewById(R.id.but_labour_update);\r\n\t\t\t\tbut_update.setTag(arg1.getTag());\r\n\t\t\t\tButton but_delete=(Button)detailsView.findViewById(R.id.but_labour_delete);\r\n\t\t\t\tButton but_cancel=(Button)detailsView.findViewById(R.id.but_labour_cancel);\r\n\r\n\t\t\t\tbut_update.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\r\n\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(qty.getText().toString().length()>0 && et_prod_margin.getText().toString().length()>0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(\"TESAT qty \"+qty.getText().toString()+\";\"+et_prod_margin.getText());\r\n\t\t\t\t\t\t\t((LabourData)v.getTag()).setQty(qty.getText().toString());\r\n\t\t\t\t\t\t\t((LabourData)v.getTag()).setMargin(Integer.parseInt(et_prod_margin.getText().toString()));\r\n\t\t\t\t\t\t\t//Toast.makeText(act, \"TEST\" +((MaterialsData)v.getTag()).Productname, Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\t\t((LabourData)v.getTag()).setPriceType(daySpinner.getSelectedItem().toString());\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\tlabourAdapter.notifyDataSetChanged();\r\n\t\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\tif(qty.getText().toString().length()==0)\r\n\t\t\t\t\t\t\t\tqty.setError(\"Invalid\");\r\n\t\t\t\t\t\t\tif(et_prod_margin.getText().toString().length()==0)\r\n\t\t\t\t\t\t\t\tet_prod_margin.setError(\"Invalid\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tbut_delete.setTag(arg1.getTag());\r\n\t\t\t\tbut_delete.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\r\n\r\n\t\t\t\t\t\taddLabourList.remove(((MaterialsData)v.getTag()).index);\r\n\t\t\t\t\t\tlabourAdapter.notifyDataSetChanged();\r\n\t\t\t\t\t\tdialog.dismiss();\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tbut_cancel.setOnClickListener(new OnClickListener() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tdialog.show();\r\n\r\n\t\t\t\treturn false;\r\n\t\t\t\r\n\t\t\t}", "public void clicProgramme(final ADiffusion movie, int imageOrWeb) {\n final Dialog dialog = new Dialog(MainActivity.this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.dialogbox);\n //dialog.setTitle(\"Programme\");\n\n\n // set the custom dialog components - text, image and button\n TextView text = (TextView) dialog.findViewById(R.id.titredialogbox);\n text.setText(movie.getTitre());\n\n WebView webview = (WebView) dialog.findViewById(R.id.webview);\n webview.setVisibility(View.INVISIBLE);\n final ImageView image = (ImageView) dialog.findViewById(R.id.imagedialogbox);\n image.setVisibility(View.VISIBLE);\n Picasso.with(getApplicationContext()).load(movie.getPhoto()).into(image);\n final String url = movie.getUrlDiff();\n final String titre = movie.getTitre();\n\n Button dialogButton = (Button) dialog.findViewById(R.id.dialogButtonClose);\n // if button is clicked, close the custom dialog\n dialogButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n ImageButton buttonimdb = (ImageButton) dialog.findViewById(R.id.buttonimdb);\n buttonimdb.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ImageView image = (ImageView) dialog.findViewById(R.id.imagedialogbox);\n image.setVisibility(View.INVISIBLE);\n WebView webview = (WebView) dialog.findViewById(R.id.webview);\n webview.setVisibility(View.VISIBLE);\n webview.setWebViewClient(new WebViewClient());\n webview.getSettings().setJavaScriptEnabled(true);\n webview.loadUrl(TV7JAPI.ENTETE_IMDB+titre);\n }\n });\n\n ImageButton buttont7j = (ImageButton) dialog.findViewById(R.id.buttont7j);\n buttont7j.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ImageView image = (ImageView) dialog.findViewById(R.id.imagedialogbox);\n image.setVisibility(View.INVISIBLE);\n WebView webview = (WebView) dialog.findViewById(R.id.webview);\n webview.setVisibility(View.VISIBLE);\n webview.setWebViewClient(new WebViewClient());\n webview.getSettings().setJavaScriptEnabled(true);\n webview.loadUrl(TV7JAPI.ENTETE_TV7+url);\n }\n });\n\n ImageButton buttontelerama = (ImageButton) dialog.findViewById(R.id.buttontelerama);\n buttontelerama.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ImageView image = (ImageView) dialog.findViewById(R.id.imagedialogbox);\n image.setVisibility(View.INVISIBLE);\n WebView webview = (WebView) dialog.findViewById(R.id.webview);\n webview.setVisibility(View.VISIBLE);\n webview.setWebViewClient(new WebViewClient());\n webview.getSettings().setJavaScriptEnabled(true);\n webview.loadUrl(TV7JAPI.ENTETE_TELERAMA+titre);\n }\n });\n\n\n dialog.show();\n\n }", "@Override\n public void onClick(View v) {\n Admin_MainActivity mainActivity = (Admin_MainActivity) getActivity();\n DatabaseHelper dbHelper = new DatabaseHelper(mainActivity);\n taskforshopphoto=dbHelper.getTaskInfo(String.valueOf(Shared.SelectedTask.ID));\n if(taskforshopphoto.PhotoID!=null) {\n Dialog settingsDialog = new Dialog(getActivity());\n settingsDialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);\n View viewDialog = getActivity().getLayoutInflater().inflate(R.layout.image_layout, null);\n settingsDialog.setContentView(viewDialog);\n ImageView imgShop = (ImageView) viewDialog.findViewById(R.id.ShopImage);\n Bitmap bmp = BitmapFactory.decodeFile(taskforshopphoto.PhotoID);\n\n imgShop.setImageBitmap(bmp);\n settingsDialog.show();\n }\n else {\n if (Shared.SelectedTask.ShopPhoto != null) {\n // Toast.makeText(getActivity(), \" No Shop photo\", Toast.LENGTH_LONG).show();\n Dialog settingsDialog = new Dialog(getActivity());\n View viewDialog = getActivity().getLayoutInflater().inflate(R.layout.image_layout, null);\n settingsDialog.setContentView(viewDialog);\n ImageView imgShop = (ImageView) viewDialog.findViewById(R.id.ShopImage);\n UrlImageViewHelper.setUrlDrawable(imgShop, \"http://sunsigns.blob.core.windows.net/cdn/Images/ShopImages/\" + Shared.SelectedTask.ShopPhoto,R.drawable.image_loading);\n settingsDialog.show();\n // try {\n // URL url = new URL(\"http://sunsigns.blob.core.windows.net/cdn/Images/ShopImages/\" + Shared.SelectedTask.ShopPhoto);\n //try this url = \"http://0.tqn.com/d/webclipart/1/0/5/l/4/floral-icon-5.jpg\"\n /* HttpGet httpRequest = null;\n\n httpRequest = new HttpGet(url.toURI());\n\n HttpClient httpclient = new DefaultHttpClient();\n HttpResponse response = (HttpResponse) httpclient\n .execute(httpRequest);\n\n HttpEntity entity = response.getEntity();\n BufferedHttpEntity b_entity = new BufferedHttpEntity(entity);\n InputStream input = b_entity.getContent();\n\n Bitmap bitmap = BitmapFactory.decodeStream(input);\n\n imgShop.setImageBitmap(bitmap);\n settingsDialog.show();*/\n // } catch (Exception e) {\n // e.printStackTrace();\n // }\n }\n else\n {\n Toast.makeText(getActivity(), \" No Shop photo\", Toast.LENGTH_LONG).show();\n }\n }\n\n }", "private void startMealToDatabaseAlert() {\n AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this);\n TextView dialogTitle = new TextView(this);\n int blackValue = Color.parseColor(\"#000000\");\n dialogTitle.setText(R.string.title_dialog_meal);\n dialogTitle.setGravity(Gravity.CENTER_HORIZONTAL);\n dialogTitle.setPadding(0, 30, 0, 0);\n dialogTitle.setTextSize(25);\n dialogTitle.setTextColor(blackValue);\n dialogBuilder.setCustomTitle(dialogTitle);\n View dialogView = getLayoutInflater().inflate(R.layout.dialog_add_meal, null);\n\n this.startEditTexts(dialogView);\n this.startLocationSpinner(dialogView);\n this.startAddPhotoButton(dialogView);\n this.startMealDialogButtonListeners(dialogBuilder);\n\n dialogBuilder.setView(dialogView);\n AlertDialog permission_dialog = dialogBuilder.create();\n permission_dialog.show();\n }", "public void run() {\n AlertDialog.Builder mesg = new AlertDialog.Builder(EditarFichaConsulta.this);\n mesg.setMessage(\"Editado com Sucesso!\");\n mesg.setTitle(\"\");\n mesg.setCancelable(false);\n mesg.setNeutralButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n //mesg.setIcon(android.R.drawable.ic_dialog_alert);\n mesg.show();\n // onLoginFailed();\n progressDialog.dismiss();\n }", "private void ShowRetrievedErrorPopupDialog(){\n ShowWhaitSpinner();\n //there is an error, show popup message\n Context context;\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n builder.setMessage(R.string.error_message_download_resources)\n .setCancelable(false)\n .setPositiveButton(R.string.ok_button, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n startActivity(new Intent(getContext(), MainActivity.class));\n }\n });\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n\n }", "@Override\n public void onClick(View v) {\n repeat = \"\";\n if(groupName_array.length == 0){//如果沒有group\n title = \"您還沒有加入任何群組\";\n }else{\n title = \"選擇群組\";\n }\n new AlertDialog.Builder(editBeacon.this)\n .setTitle(title)\n .setMultiChoiceItems(\n groupName_array,\n group_select,\n new DialogInterface.OnMultiChoiceClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which, boolean isChecked) {\n // TODO Auto-generated method stub\n\n }\n })\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // TODO Auto-generated method stub\n\n horizontalList_group=new ArrayList<>();//初始化\n\n for (int i = 0; i < group_select.length; i++) {\n if (group_select[i]) { //如果選擇的是true(被勾選)\n groupIdSelect.append(Integer.toString(groupId_array[i])).append(\",\");\n //連接stringbuffer eventIdSelect(這是一段傳給Php的stringbuffer) }\n horizontalList_group.add(groupName_array[i]);\n\n }\n }\n\n horizontalAdapter_group=new HorizontalAdapter(horizontalList_group);\n LinearLayoutManager horizontalLayoutManagaer\n = new LinearLayoutManager(editBeacon.this, LinearLayoutManager.HORIZONTAL, false);\n horizontal_recycler_view_group.setLayoutManager(horizontalLayoutManagaer);\n horizontal_recycler_view_group.setAdapter(horizontalAdapter_group);\n\n\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // TODO Auto-generated method stub\n\n }\n }).show();\n\n\n }", "private void showCustomDialog(VisitorModel visitor) {\n ViewGroup viewGroup = ((MainActivity)context).findViewById(android.R.id.content);\n\n //then we will inflate the custom alert dialog xml that we created\n View dialogView = LayoutInflater.from(context).inflate(R.layout.my_dialog, viewGroup, false);\n\n TextView btnUnfollow = dialogView.findViewById(R.id.btn_unfollow);\n TextView btnCancel = dialogView.findViewById(R.id.btn_cancel);\n TextView txtUsername = dialogView.findViewById(R.id.txt_username);\n TextView txtAvatar = dialogView.findViewById(R.id.txt_avatar);\n CircleImageView imgAvatar = dialogView.findViewById(R.id.img_avatar);\n\n txtAvatar.setText(GlobalFunc.getFirstLetter(visitor.username));\n txtUsername.setText(visitor.username);\n\n //Now we need an AlertDialog.Builder object\n AlertDialog.Builder builder = new AlertDialog.Builder(context, R.style.myDialogForUnVisit);\n //setting the view of the builder to our custom view that we already inflated\n builder.setView(dialogView);\n\n //finally creating the alert dialog and displaying it\n AlertDialog alertDialog = builder.create();\n alertDialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);\n alertDialog.show();\n\n btnUnfollow.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n unVisit(visitor);\n alertDialog.hide();\n }\n });\n\n btnCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n alertDialog.hide();\n }\n });\n }", "private void showAddDetailsDialog() {\n\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(getActivity());\n AlertDialog dialog = alertDialog.create();\n\n if (dialog.getWindow() != null) {\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);\n }\n\n View view = LayoutInflater.from(getActivity()).inflate(R.layout.add_student_details_layout, null);\n dialog.setView(view);\n\n final EditText studentIDText = view.findViewById(R.id.studentIDText);\n final EditText studentNameText = view.findViewById(R.id.studentNameText);\n final EditText fatherNameText = view.findViewById(R.id.fatherNameText);\n final EditText phoneText = view.findViewById(R.id.phoneText);\n final EditText emailText = view.findViewById(R.id.emailText);\n final MaterialSpinner standardDropdown = view.findViewById(R.id.standardDropdown);\n final MaterialSpinner sectionDropdown = view.findViewById(R.id.sectionDropdown);\n\n //just in case,, error is to be generated\n studentIDLayout = view.findViewById(R.id.studentIDInputLayout);\n studentNameLayout = view.findViewById(R.id.studentNameInputLayout);\n fatherNameLayout = view.findViewById(R.id.fatherNameInputLayout);\n phoneLayout = view.findViewById(R.id.phoneInputLayout);\n emailLayout = view.findViewById(R.id.emailInputLayout);\n genderErrorText = view.findViewById(R.id.genderErrorText);\n\n final RadioButton maleRadio = view.findViewById(R.id.maleRadio);\n final RadioButton femaleRadio = view.findViewById(R.id.femaleRadio);\n\n final CardView addDetailsCard = view.findViewById(R.id.addDetailsButton);\n final CardView closeCard = view.findViewById(R.id.closeButton);\n\n final String[] arrStandard = getResources().getStringArray(R.array.standard_array);\n standard = arrStandard[0];\n if (standardDropdown != null) {\n standardDropdown.setItems(arrStandard);\n standardDropdown.setOnItemSelectedListener((MaterialSpinner.OnItemSelectedListener<String>) (view12, position, id, item) -> standard = item);\n }\n\n final String[] arrSection = getResources().getStringArray(R.array.section_array);\n section = arrSection[0];\n if (sectionDropdown != null) {\n sectionDropdown.setItems(arrSection);\n sectionDropdown.setOnItemSelectedListener((MaterialSpinner.OnItemSelectedListener<String>) (view12, position, id, item) -> section = item);\n }\n\n if (addDetailsCard != null) {\n addDetailsCard.setOnClickListener(view1 -> {\n studentID = studentIDText.getText().toString();\n studentName = studentNameText.getText().toString();\n fatherName = fatherNameText.getText().toString();\n phone = phoneText.getText().toString();\n\n List<School> schools = db.schoolDao().getAll();\n int school = -1;\n if (schools.size() > 0)\n school = schools.get(0).getId();\n\n email = emailText.getText().toString();\n\n if (maleRadio != null && femaleRadio != null) {\n if (maleRadio.isChecked()) {\n gender = \"M\";\n } else if (femaleRadio.isChecked()) {\n gender = \"F\";\n }\n }\n\n //input validation\n if (isInputValid()) {\n try {\n SchoolAPI.getInstance(getContext()).addStudentDetails(studentID, studentName, school, email, phone, this.standard, section, gender, fatherName, dialog, db);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n });\n }\n\n if (closeCard != null) {\n Log.d(TAG, \"close card!!\");\n closeCard.setOnClickListener(view1 -> {\n Log.d(TAG, \"card closed\");\n dialog.dismiss();\n });\n }\n\n dialog.setCancelable(false);\n dialog.show();\n }", "public void showPopUp(View view) {\n\n menuDialog.setContentView(R.layout.menupopup);\n menuDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n\n TextView txtUserName = (TextView) menuDialog.getWindow().findViewById(R.id.textview_UserName);\n txtUserName.setText(userName);\n // Download User Image from Firebase and show it to User.\n\n final long ONE_MEGABYTE = 1024 * 1024;\n downloadImageStorageReference.getBytes(ONE_MEGABYTE).addOnSuccessListener(new OnSuccessListener<byte[]>() {\n @Override\n public void onSuccess(byte[] bytes) {\n bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length);\n imageView_UserPhoto.setImageBitmap(bitmap);\n }\n });\n imageView_UserPhoto = menuDialog.getWindow().findViewById(R.id.imageview_UserImage);\n\n if(bitmap != null) {\n imageView_UserPhoto.setImageBitmap(bitmap);\n }else {\n imageView_UserPhoto.setImageResource(R.drawable.userimage_default);\n }\n\n\n menuDialog.show();\n }", "private void showAlert() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setTitle(\"Info..\");\r\n builder.setMessage(\"Your password reset email has been sent!\\n\" +\r\n \"\\n\" +\r\n \"We have sent a password reset email to your email address:\\n\" +\r\n \"\\n\" +\r\n input_email.getText().toString()+\"\\n\" +\r\n \"\\n\" +\r\n \"Please check your inbox to continue.\");\r\n\r\n builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n dialog.dismiss();\r\n finish();\r\n }\r\n });\r\n /* builder.setNegativeButton(\"cancel\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n dialog.dismiss();\r\n }\r\n });*/\r\n // create and show the alert dialog\r\n AlertDialog dialog = builder.create();\r\n dialog.show();\r\n }", "public void run() {\n AlertDialog.Builder mesg = new AlertDialog.Builder(EditarFichaConsulta.this);\n mesg.setMessage(\"Houve algum erro por favor, tente mais tarde!\");\n mesg.setTitle(\"\");\n mesg.setCancelable(false);\n mesg.setNeutralButton(\"Tentar Novamente\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n editarDados();\n }\n });\n mesg.setPositiveButton(\"Cancelar\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n //mesg.setIcon(android.R.drawable.ic_dialog_alert);\n mesg.show();\n // onLoginFailed();\n progressDialog.dismiss();\n }", "public void OnDeleteRecipe (View View)\n {\n \t\tImageView darkenScreen = (ImageView) findViewById(R.id.darkenScreen);\n \t\tLayoutParams darkenParams = darkenScreen.getLayoutParams();\n \t\tdarkenParams.height = 1000;\n \t\tdarkenParams.width = 1000;\n \t\tdarkenScreen.setLayoutParams(darkenParams);\n \t\t//make the popup\n \t\tLinearLayout layout = new LinearLayout(this);\n \t\tLayoutInflater inflater = LayoutInflater.from(this);\n \t\tpopUp = new PopupWindow(inflater.inflate(R.layout.popup_delete_recipe, null, false),300,150,true);\n \t\tpopUp.showAtLocation(layout, Gravity.CENTER, 0, 0);\n \t\t\n \t\t//Log.d(\"what\", \"what\");\n \t\t//popUp.update(50, 50, 300, 80);\n \t\t\n \n }", "@Override\n public void onClick(View v) {\n LayoutInflater factory = LayoutInflater.from(getApplicationContext());\n final View alertDialogView = factory.inflate(R.layout.alertdialogperso, null);\n\n //Création de l'AlertDialog\n AlertDialog.Builder adb = new AlertDialog.Builder(this);\n\n //On affecte la vue personnalisé que l'on a crée à notre AlertDialog\n adb.setView(alertDialogView);\n\n //On donne un titre à l'AlertDialog\n adb.setTitle(\"Titre de notre boite de dialogue\");\n\n //On modifie l'icône de l'AlertDialog pour le fun ;)\n adb.setIcon(android.R.drawable.ic_dialog_alert);\n\n //On affecte un bouton \"OK\" à notre AlertDialog et on lui affecte un évènement\n adb.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n\n //Lorsque l'on cliquera sur le bouton \"OK\", on récupère l'EditText correspondant à notre vue personnalisée (cad à alertDialogView)\n EditText et = (EditText)alertDialogView.findViewById(R.id.EditText1);\n mood.setmCommentary(et.getText().toString());\n preferences.edit().putString(\"commentary\", mood.getmCommentary()).apply();\n String commentary = getPreferences(MODE_PRIVATE).getString(\"commentary\", null);\n\n Gson gson = new Gson();\n String json = gson.toJson(mood);\n preferences.edit().putString(\"mood\",gson.toJson(mood)).apply();\n\n\n\n\n\n\n //On affiche dans un Toast le texte contenu dans l'EditText de notre AlertDialog\n Toast.makeText(getApplicationContext(), et.getText(), Toast.LENGTH_SHORT).show();\n } });\n\n //On crée un bouton \"Annuler\" à notre AlertDialog et on lui affecte un évènement\n adb.setNegativeButton(\"Annuler\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n //Lorsque l'on cliquera sur annuler on quittera l'application\n finish();\n } });\n adb.show();\n }", "public void showCustomDialog() {\n ViewGroup viewGroup = root.findViewById(((ViewGroup)getView().getParent()).getId());\n\n //then we will inflate the custom alert dialog xml that we created\n final View dialogView = LayoutInflater.from(getContext()).inflate(R.layout.change_icon_dialogue_box, viewGroup, false);\n\n\n\n Button close=(Button)dialogView.findViewById(R.id.buttonOk);\n\n\n\n //Now we need an AlertDialog.Builder object\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n\n //setting the view of the builder to our custom view that we already inflated\n builder.setView(dialogView);\n\n //finally creating the alert dialog and displaying it\n final AlertDialog alertDialog = builder.create();\n alertDialog.show();\n close.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n alertDialog.cancel();\n }\n });\n\n }", "@Override\n public void onClick(View v)\n {\n AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(new ContextThemeWrapper(activity, R.style.AppTheme));\n dialogBuilder.setView(viewConfirmDialog);\n AlertDialog alertDialog= dialogBuilder.create();\n Window windowAlert = alertDialog.getWindow();\n WindowManager.LayoutParams layoutConfirmDialog = new WindowManager.LayoutParams();\n layoutConfirmDialog.copyFrom(windowAlert.getAttributes());\n layoutConfirmDialog.width = 320;\n layoutConfirmDialog.height = 320;\n alertDialog.getWindow().setAttributes(layoutConfirmDialog);\n dismissAlertDialog();\n components.alertDialog = alertDialog;\n alertDialog.show();\n\n }", "public static void setDialogViewMessage(Context context, AlertDialog.Builder alert, String message1, String message2){\n// Log.e(\"setDialogViewMessage\", \"setDialogViewMessage\");\n LinearLayout ll=new LinearLayout(context);\n LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(\n LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n\n layoutParams.setMargins(20, 10, 20, 10);\n\n ll.setOrientation(LinearLayout.VERTICAL);\n ll.setLayoutParams(layoutParams);\n TextView messageView1 = new TextView(context);\n TextView messageView2 = new TextView(context);\n TextView messageView3 = new TextView(context);\n messageView1.setLayoutParams(layoutParams);\n messageView2.setLayoutParams(layoutParams);\n messageView3.setLayoutParams(layoutParams);\n messageView1.setText(message1);\n messageView2.setText(message2);\n PackageInfo pInfo = null;\n String version = \"\";\n try {\n pInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);\n version = pInfo.versionName;\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n }\n\n messageView3.setText(\"Card Safe Version \" + version);\n ll.addView(messageView1);\n ll.addView(messageView2);\n ll.addView(messageView3);\n alert.setView(ll);\n\n }", "private void loadCloudImageConfirm()\n {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())\n .setCancelable(true).setTitle(\"Load\").setMessage(\"Load image?\");\n\n builder.setPositiveButton(R.string.open_cloud, new DialogInterface.OnClickListener()\n {\n @Override\n public void onClick(DialogInterface dialog, int which)\n {\n getImagesList();\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 }", "@Override\r\n\t\tpublic void onClick(View v) {\n\t\t\tAlertDialog.Builder builder=new AlertDialog.Builder(getActivity());\t\r\n\t\t\tbuilder.setTitle(\"Version 1.0\")\r\n\t\t\t.setMessage(\"With the App User Easily get the Work and directly Interact with Admin.\");\r\n\t\tbuilder.setNegativeButton(\"CLOSE\", new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int which) {\r\n // Write your code here to execute after dialog closed\r\n Toast.makeText(getActivity().getApplicationContext(), \"You clicked on CLOSE\", Toast.LENGTH_SHORT).show();\r\n }\r\n });\r\n \r\n // Showing Alert Message\r\n builder.show();\r\n\t\t}", "private void takeAttendance() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n LayoutInflater inflater = getLayoutInflater();\n View view = inflater.inflate(R.layout.popup_take_attendance, null);\n builder.setView(view);\n\n imgvQR = findViewById(R.id.qrCodeImg);\n classPeriod = findViewById(R.id.unitPeriod);\n classDate = findViewById(R.id.classunitName);\n className = findViewById(R.id.classDate);\n\n hours_per_unit = getResources().getStringArray(R.array.unit_periods);\n classPeriod.setAdapter(new ArrayAdapter(this, android.R.layout.simple_spinner_item, hours_per_unit));\n\n builder.setPositiveButton(\"SEND\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n// generate unique qr code for the class and send to the email.\n\n String dataemails = getIntent().getStringExtra(\"emails\");\n\n String aname = className.getText().toString().trim();\n String bdate = classDate.getText().toString().trim();\n String cperiod = classPeriod.getSelectedItem().toString().trim();\n\n Students stud_student = new Students();\n stud_student.setStudent_class_name(aname);\n stud_student.setStudent_class_date(Date.valueOf(bdate));\n stud_student.setStudent_class_period(Time.valueOf(cperiod));\n\n if (aname.isEmpty() || bdate.isEmpty() || cperiod.isEmpty()) {\n Toast.makeText(ViewLecClass.this, \"fill empty fields\", Toast.LENGTH_SHORT).show();\n } else {\n\n /**\n * generate qr code per class selection with specific data\n * **/\n String datasent = \"Class : \" + aname + \", Date : \" + bdate + \", Period : \" + cperiod ;\n MultiFormatWriter multiFormatWriter = new MultiFormatWriter();\n try {\n Log.d(TAG, \"onClick: LOADING THE QR POINT REACHED\");\n BitMatrix bitMatrix = multiFormatWriter.encode(datasent, BarcodeFormat.QR_CODE,200,200);\n BarcodeEncoder barcodeEncoder = new BarcodeEncoder();\n Bitmap bitmap = barcodeEncoder.createBitmap(bitMatrix);\n imgvQR.setImageBitmap(bitmap);\n } catch (WriterException e) {\n e.printStackTrace();\n }\n\n /**\n * send email to the student emails..\n * obtain email names from the recycler adapter class\n *\n * **/\n// send email to the emails on recycler view. or in database for the class\n try {\n Log.d(TAG, \"onClick: EMAIL POINT REACHED\");\n Intent emailIntent = new Intent(Intent.ACTION_SEND_MULTIPLE);\n emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[] {dataemails});\n if (URI != null) {\n emailIntent.putExtra(Intent.EXTRA_STREAM, URI);\n }\n startActivity(Intent.createChooser(emailIntent, \"SENDING EMAIL.\"));\n\n } catch (Throwable t) {\n Toast.makeText(ViewLecClass.this, \"PROCESS FAILURE. RETRY!\", Toast.LENGTH_SHORT).show();\n }\n\n /**\n * save the data: date, unit data, indivual emails\n * **/\n// save all this data to db, date, , unitid, unit name, period hours, plus each individual email sent with it\n if (firebaseAuth.getCurrentUser() != null) {\n dateReference = FirebaseDatabase.getInstance().getReference();\n dateReference.child(\"LECTURERS\").child(firebaseAuth.getCurrentUser().getUid()).child(\"CLASSES\")\n .child(\"SENTEMAILS\").setValue(stud_student, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n if (databaseError == null) {\n Log.d(TAG, \"onComplete: DATA SAVING POINT\");\n Toast.makeText(ViewLecClass.this, \"DATA SAVED SUCCESSFULLY\", Toast.LENGTH_SHORT).show();\n finish();\n } else {\n Toast.makeText(ViewLecClass.this, \"failed\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n }\n\n }\n }).setNegativeButton(\"CANCEL\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n// startActivity(new Intent(ViewLecClass.this, ViewLecClass.class));\n finish();\n }\n });\n }", "public void alertForOuitMessage() {\n final AlertDialog.Builder builder = new AlertDialog.Builder(context);\n final AlertDialog alert = builder.create();\n alert.getWindow().getAttributes().windowAnimations = R.style.alertAnimation;\n View view = alert.getLayoutInflater().inflate(R.layout.quiz_quit_alert, null);\n TextView title1 = (TextView) view.findViewById(R.id.title1);\n title1.setText(context.getString(R.string.quiz_quit_are));\n title1.setTypeface(VodafoneRg);\n TextView title2 = (TextView) view.findViewById(R.id.title2);\n title2.setText(context.getString(R.string.quiz_quit_progress));\n title2.setTypeface(VodafoneRg);\n TextView quiz_text = (TextView) view.findViewById(R.id.quit_text);\n quiz_text.setTypeface(VodafoneRg);\n LinearLayout quit_layout = (LinearLayout) view.findViewById(R.id.quit_layout);\n alert.setCustomTitle(view);\n TextView quit_icon = (TextView) view.findViewById(R.id.quit_icon);\n quit_icon.setTypeface(materialdesignicons_font);\n quit_icon.setText(Html.fromHtml(\"&#xf425;\"));\n quit_layout.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n alert.dismiss();\n finish();\n }\n });\n alert.show();\n }", "public void onCreate(Bundle bundle) {\n super.onCreate(bundle);\n setContentView((int) R.layout.activity_message);\n this.recyclerView = (RecyclerView) findViewById(R.id.recycler_view);\n this.recyclerView.setHasFixedSize(true);\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);\n linearLayoutManager.setStackFromEnd(true);\n this.recyclerView.setLayoutManager(linearLayoutManager);\n this.username = (AppCompatTextView) findViewById(R.id.title);\n this.btn_send = (AppCompatImageButton) findViewById(R.id.btn_send);\n this.text_send = (AppCompatEditText) findViewById(R.id.text_send);\n this.img_view = (PhotoView) findViewById(R.id.img_preview);\n this.btn_doc = (AppCompatImageButton) findViewById(R.id.btn_doc);\n this.apiService = (APIService) Client.getClient(\"https://fcm.googleapis.com/\").create(APIService.class);\n this.layout = new LinearLayout(this);\n this.layout.setOrientation(LinearLayout.VERTICAL);\n this.layout.setGravity(17);\n this.layoutInflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);\n this.customview = this.layoutInflater.inflate(R.layout.img_doc_dialog, (ViewGroup) null);\n this.img = (AppCompatButton) this.customview.findViewById(R.id.img);\n this.pdf = (AppCompatButton) this.customview.findViewById(R.id.pdf);\n this.cancel = (AppCompatTextView) this.customview.findViewById(R.id.cancel);\n this.popupWindow = new PopupWindow(this.customview, -1, -1);\n this.recyclerView.setVisibility(View.VISIBLE);\n this.img_view.setVisibility(View.GONE);\n this.intent = getIntent();\n this.dbname = this.intent.getStringExtra(\"path\");\n this.profile_url = this.intent.getStringExtra(Scopes.PROFILE);\n this.department = this.intent.getStringExtra(\"department\");\n this.semester = this.intent.getStringExtra(\"semester\");\n this.name = this.intent.getStringExtra(\"cname\");\n this.fuser = FirebaseAuth.getInstance().getCurrentUser();\n this.username.setText(getIntent().getStringExtra(\"name\"));\n this.btn_send.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n DiscussionActivity.this.recyclerView.setVisibility(View.VISIBLE);\n DiscussionActivity.this.img_view.setVisibility(View.GONE);\n String obj = DiscussionActivity.this.text_send.getText().toString();\n if (!obj.equals(\"\")) {\n DiscussionActivity discussionActivity = DiscussionActivity.this;\n discussionActivity.sendMessage(discussionActivity.fuser.getUid(), obj);\n } else {\n Toast.makeText(DiscussionActivity.this, \"You Can't send empty message.\", Toast.LENGTH_SHORT).show();\n }\n DiscussionActivity.this.text_send.setText(\"\");\n }\n });\n this.btn_doc.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n DiscussionActivity.this.showOptions();\n }\n });\n readMessage(this.fuser.getUid());\n }", "@Override\n protected Dialog onCreateDialog(int id) {\n if ((id == VM_RESPONSE_ERROR) || (id == VM_NOCHANGE_ERROR) ||\n (id == VOICEMAIL_DIALOG_CONFIRM)) {\n \n AlertDialog.Builder b = new AlertDialog.Builder(this);\n \n int msgId;\n int titleId = R.string.error_updating_title;\n switch (id) {\n case VOICEMAIL_DIALOG_CONFIRM:\n msgId = R.string.vm_changed;\n titleId = R.string.voicemail;\n // Set Button 2\n b.setNegativeButton(R.string.close_dialog, this);\n break;\n case VM_NOCHANGE_ERROR:\n // even though this is technically an error,\n // keep the title friendly.\n msgId = R.string.no_change;\n titleId = R.string.voicemail;\n // Set Button 2\n b.setNegativeButton(R.string.close_dialog, this);\n break;\n case VM_RESPONSE_ERROR:\n msgId = R.string.vm_change_failed;\n // Set Button 1\n b.setPositiveButton(R.string.close_dialog, this);\n break;\n default:\n msgId = R.string.exception_error;\n // Set Button 3, tells the activity that the error is\n // not recoverable on dialog exit.\n b.setNeutralButton(R.string.close_dialog, this);\n break;\n }\n \n b.setTitle(getText(titleId));\n b.setMessage(getText(msgId));\n b.setCancelable(false);\n AlertDialog dialog = b.create();\n \n // make the dialog more obvious by bluring the background.\n dialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);\n \n return dialog;\n }\n \n return null;\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View rootView = inflater.inflate(R.layout.fragment_message_dialog, null);\n msg = rootView.findViewById(R.id.msg);\n submit = rootView.findViewById(R.id.msg_submit);\n final int code = getTargetRequestCode();\n builder.setView(rootView);\n builder.setTitle(\"Enter a message:\");\n\n submit.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View view) {\n\n sendResult(code);\n dismiss();\n\n\n }\n\n });\n\n return builder.create();\n }", "private void showAlertDialog() {\n new AlertDialog.Builder(getActivity())\n .setMessage(R.string.feedback_sharing_data_alert)\n .setCancelable(false)\n .setPositiveButton(R.string.ok, (dialog, which) -> {\n sendFeedback();\n })\n .show();\n }", "public void CustomAlertSave2(String msg) {\n\t\tfinal Dialog dialog = new Dialog(context);\r\n\t\t// hide to default title for Dialog\r\n\t\tdialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\r\n\t\t// inflate the layout dialog_layout.xml and set it as contentView\r\n\t\tLayoutInflater inflater = (LayoutInflater) context\r\n\t\t\t\t.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\r\n\t\tView view = inflater.inflate(R.layout.dialog_layout, null, false);\r\n\t\tdialog.setCanceledOnTouchOutside(true);\r\n\t\tdialog.setContentView(view);\r\n\t\tdialog.getWindow().setBackgroundDrawable(new ColorDrawable(0));\r\n\t\tTextView txtTitle = (TextView) dialog\r\n\t\t\t\t.findViewById(R.id.txt_alert_message);\r\n\t\ttxtTitle.setText(msg);\r\n\r\n\t\tButton btn_ok = (Button) dialog.findViewById(R.id.btn_ok);\r\n\t\tbtn_ok.setOnClickListener(new android.view.View.OnClickListener() {\r\n\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tdialog.dismiss();\r\n\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t\tdialog.show();\r\n\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(\"Limite mensal excedido! Na versão gratuita, o limite máximo de publicação de caronas mensais é 4 (quatro), atualize para a versão Pro e tenha publicações ilimitadas...\")\n .setPositiveButton(\"Ir\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n String url = \"https://play.google.com/store/apps/details?id=com.xetelas.nova\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n getContext().startActivity(i);\n }\n })\n .setNegativeButton(\"Voltar\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "private void createAlert() {\n ImageView image = new ImageView(this);\n image.setImageResource(zunder.ebs.zunderapp.R.drawable.qr);\n\n myWallet = new MyWallet();\n setPrivateKey(myWallet.searchWallet());\n\n createQR = new CreateQR(700, 700);\n try {\n KeyPair pair = KeyPair.fromSecretSeed(getPrivateKey());\n setPublicKey(pair.getAccountId());\n try {\n Bitmap bitmap = createQR.encodeAsBitmap(getPublicKey());\n image.setImageBitmap(bitmap);\n } catch (WriterException e) {\n e.printStackTrace();\n }\n }catch (Exception e){\n e.getMessage();\n }\n\n\n\n AlertDialog.Builder builder =\n new AlertDialog.Builder(this).\n setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n }).\n setView(image);\n builder.create().show();\n }", "@Override\n\t\t\t\t\t\tpublic void onShow(DialogInterface dialog) {\n\t\t\t\t\t\t\tButton b = alert.getButton(AlertDialog.BUTTON_POSITIVE);\n\t\t\t\t\t\t\tb.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t//dist,date,empId,spmandi,spretailer,spactivity,rem\n\t\t\t\t\t\t\t\t\tif(new ConnectionDetector(context).isConnectingToInternet()){\n\t\t\t\t\t\t\t\t\t\tMyspinner sp1 = (Myspinner)districtlist.getSelectedItem();\n\t\t\t\t\t\t\t\t\t\tMyspinner sp2 = (Myspinner)mandilist.getSelectedItem();\n\t\t\t\t\t\t\t\t\t\tMyspinner sp3 = (Myspinner)retailerslist.getSelectedItem();\n\t\t\t\t\t\t\t\t\t\tMyspinner sp4 = (Myspinner)activitieslist.getSelectedItem();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(districtlist.getSelectedItemPosition()!=0\n\t\t\t\t\t\t\t\t\t\t\t\t&& mandilist.getSelectedItemPosition()!=0\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& retailerslist.getSelectedItemPosition()!=0\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& activitieslist.getSelectedItemPosition()!=0){\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\tString date = new SimpleDateFormat(\"yyyy-MM-dd\").format(dt);\n\t\t\t\t\t\t\t\t\t\t\t\tArrayList<String> id = new GetData(context, db).getVillageId(villages.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\tif(id.size()>0 && id.get(0).length()>0){\n\t\t\t\t\t\t\t\t\t\t\t\t\tnew CreateActivity().execute(sp1.getValue(),date,get.getAllLogin().get(0).get(\"empid\"),sp2.getValue(),sp3.getValue(),sp4.getValue(),remarks.getText().toString(), id.get(0), villages.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\tnew CreateActivity().execute(sp1.getValue(),date,get.getAllLogin().get(0).get(\"empid\"),sp2.getValue(),sp3.getValue(),sp4.getValue(),remarks.getText().toString(), \"0\", villages.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\talert.dismiss();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\t\t\t\t\t\t\te.getMessage();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\tif(districtlist.getSelectedItemPosition()==0){\n\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"Please Select District\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\tif(mandilist.getSelectedItemPosition()==0){\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"Please Select Mandi\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(retailerslist.getSelectedItemPosition()==0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"Please Select Retailer\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(activitieslist.getSelectedItemPosition()==0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"Please Select Activity\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"No Network Found\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}", "@Override\n public void onItemClick(View view, Medal obj, int position) {\n TextView txt;\n final Dialog dialog = new Dialog(getContext());\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); // before\n dialog.setContentView(R.layout.popup_medals);\n txt = dialog.findViewById(R.id.titlePop);\n txt.setText(obj.title);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));\n dialog.setCancelable(true);\n dialog.show();\n }", "public void onClick(View v) {\n\t\t\tfinal Dialog dialog = new Dialog(v.getContext());\n\t\t\tdialog.requestWindowFeature(Window.FEATURE_NO_TITLE); \n\t dialog.setContentView(R.layout.image_dialog);\n\t ImageView imgDialog = (ImageView) dialog.findViewById(R.id.ImageViewGallery01);\n\t imgDialog.setTag(imgUrl);\n\t imgDialog.setScaleType(ImageView.ScaleType.FIT_XY);\n\t imageLoader.DisplayImage(imgUrl, InfoPoiDetail.this, imgDialog);\n\t \n\t imgDialog.setOnClickListener(new View.OnClickListener() {\n\t\t\t\t\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}\n\t\t\t});\n\t dialog.setTitle(\"\");\n\t dialog.setCancelable(true);\n\t android.view.WindowManager.LayoutParams lp=dialog.getWindow().getAttributes();\n\n\t lp.flags=\n\t \tandroid.view.WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS | \n\t \tandroid.view.WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;\n\n\t dialog.getWindow().setAttributes(lp);\n\t dialog.show();\n//\t stopProgress();\n\t\t}", "@Override\n public void dialogClick(Dialog dialog, View v) {\n switch (v.getId()) {\n case R.id.tv_in_the_to_xiangce:\n dialog.dismiss();\n if (photoList == null)\n photoList = new ArrayList<Map<String, Object>>();\n else\n photoList.clear();\n Intent in = new Intent(getApplicationContext(),\n AddImgFragmentActivity01.class);\n in.putExtra(\"selectedList\", photoList);\n in.putExtra(\"maxImg\", maxImg);\n startActivityForResult(in, 1);\n overridePendingTransition(R.anim.right_in, R.anim.left_out);\n break;\n\n case R.id.tv_in_the_to_xiangji:\n dialog.dismiss();\n if (photoList == null)\n photoList = new ArrayList<Map<String, Object>>();\n else\n photoList.clear();\n startXiangJi();\n break;\n\n case R.id.tv_cancel:\n dialog.dismiss();\n break;\n\n default:\n break;\n }\n }", "public static void showAlert(String message, Activity context) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n builder.setMessage(message).setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n\n }\n });\n try {\n builder.show();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "private void updateDetailGUI() {\n\t\t\t\t\t\t\tlogo.setImageUrl(place.gallery.get(0));\n\t\t\t\t\t\t\tnomePosto.setText(place.nome);\n\t\t\t\t\t\t\tdescrizione.setText(place.description);\n\t\t\t\t\t\t\tnumtelefono.setText(place.telefono);\n\t\t\t\t\t\t\twebsite.setText(place.website);\n\t\t\t\t\t\t\tcitta.setText(place.cittą);\n\t\t\t\t\t\t\tSmartImageView image_detail;\n\t\t\t\t\t\t\tif (place.gallery.size() > 1) {\n\t\t\t\t\t\t\t\tLinearLayout.LayoutParams imagesLayout = new LinearLayout.LayoutParams(\n\t\t\t\t\t\t\t\t\t\tLayoutParams.WRAP_CONTENT,\n\t\t\t\t\t\t\t\t\t\tLayoutParams.WRAP_CONTENT);\n\t\t\t\t\t\t\t\timagesLayout.setMargins(5, 0, 5, 0);\n\t\t\t\t\t\t\t\tfor (int i = 1; i < place.gallery.size(); i++) {\n\t\t\t\t\t\t\t\t\timage_detail = new SmartImageView(\n\t\t\t\t\t\t\t\t\t\t\tDetPlaActivity.this);\n\t\t\t\t\t\t\t\t\timage_detail.setLayoutParams(imagesLayout);\n\t\t\t\t\t\t\t\t\timage_detail\n\t\t\t\t\t\t\t\t\t\t\t.setScaleType(ScaleType.CENTER_CROP);\n\t\t\t\t\t\t\t\t\timage_detail.getLayoutParams().width = 200;\n\t\t\t\t\t\t\t\t\timage_detail.setImageUrl(place.gallery\n\t\t\t\t\t\t\t\t\t\t\t.get(i));\n\t\t\t\t\t\t\t\t\tfinal int index_id_dialog = i;\n\t\t\t\t\t\t\t\t\timage_detail\n\t\t\t\t\t\t\t\t\t\t\t.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated\n\t\t\t\t\t\t\t\t\t\t\t\t\t// method stub\n\t\t\t\t\t\t\t\t\t\t\t\t\tDialogImage dialog = DialogImage\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.newInstance(place.gallery\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get(index_id_dialog)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toString());\n\t\t\t\t\t\t\t\t\t\t\t\t\tdialog.show(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetFragmentManager(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTools.TAG_DIALOG_IMAGE);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tgallery.addView(image_detail);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tgalleryContainer.setVisibility(View.GONE);\n\t\t\t\t\t\t\t\tgallery.setVisibility(View.GONE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbtnMappa.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\tString url = \"http://maps.google.com/maps?\"\n\t\t\t\t\t\t\t\t\t\t\t+ \"daddr=\" + place.lat + \",\"\n\t\t\t\t\t\t\t\t\t\t\t+ place.longit;\n\t\t\t\t\t\t\t\t\tIntent mapIntent = new Intent(\n\t\t\t\t\t\t\t\t\t\t\tIntent.ACTION_VIEW, Uri.parse(url));\n\t\t\t\t\t\t\t\t\tstartActivity(mapIntent);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}", "private void showDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n\n// 2. Chain together various setter methods to set the dialog characteristics\n builder.setMessage(\"Click the right dismiss button\")\n .setTitle(\"Do you hear, it? Isn't it great?\");\n\n\n builder.setPositiveButton(\"Left\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n audioServiceBinder.stopAudio();\n String deviceId = mDurationTimeEditText.getText().toString();\n new MyTurnIsOver().execute(deviceId);\n }\n });\n builder.setNegativeButton(\"Right\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n showDialog();\n }\n });\n\n// 3. Get the <code><a href=\"/reference/android/app/AlertDialog.html\">AlertDialog</a></code> from <code><a href=\"/reference/android/app/AlertDialog.Builder.html#create()\">create()</a></code>\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "public void openFeedbackDialog(String desc, String increment, int pictype, final String colour, final int score){\n LayoutInflater inflater = LayoutInflater.from(this);\n View view = inflater.inflate(R.layout.dialog_feedback, null);\n\n //initialise the elements\n TextView descTxt = view.findViewById(R.id.dialogFeedbackDesc);\n TextView points = view.findViewById(R.id.increment);\n Button okBtn = view.findViewById(R.id.DialogFeedbackBtn);\n ConstraintLayout dialogBg = view.findViewById(R.id.feedbackDialogBg);\n ImageView pic = view.findViewById(R.id.icon);\n\n descTxt.setText(desc); //set the description\n dialogBg.setBackgroundColor(Color.parseColor(colour));\n pic.setImageResource(pictype);\n points.setText(increment);\n\n //create the dialog\n final AlertDialog alertDialog = new AlertDialog.Builder(this)\n .setView(view)\n .create();\n\n okBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(CyberSimThree.this, CyberSimFour.class);\n intent.putExtra(\"score\", score);\n startActivity(intent);\n\n }\n });\n\n alertDialog.show();\n\n }", "private MaterialAlertDialogBuilder getBackButtonAlertBuilder(){\n MaterialAlertDialogBuilder dialogBuilder = new MaterialAlertDialogBuilder(getContext());\n dialogBuilder.setCancelable(true)\n .setMessage(\"Your changes will be lost. Do you want to continue?\")\n .setNegativeButton(\"Cancel\", (dialog, which) -> {\n dialog.cancel();})\n .setPositiveButton(\"Continue\", (dialog, which) -> {\n mViewModel.resetLiveData();\n getDialog().dismiss();})\n .create();\n return dialogBuilder;\n }", "public void crearAlertDialog(final ArrayList<CustomListView> args, final CustomAdapterListView adap, final boolean dosisyhoraSeteada) {\n LayoutInflater lin = LayoutInflater.from(getActivity());\n View dosisYhora = lin.inflate(R.layout.dosis_y_hora, null);\n AlertDialog.Builder alertDialogB = new AlertDialog.Builder(getActivity());\n alertDialogB.setView(dosisYhora);\n String[] separated ;\n final TimePicker timePick = (TimePicker) dosisYhora.findViewById(R.id.pickHora);\n //final NumberPicker numPick = (NumberPicker) dosisYhora.findViewById(R.id.pickDosis);\n //numPick.setMinValue(1);\n //numPick.setMaxValue(20);\n //numPick.setWrapSelectorWheel(false);\n //numPick.setValue(1);\n if (dosisyhoraSeteada) {\n final String currentDosis = args.get(posicionItemdeLista).getDosis();\n final float currdosis = Float.parseFloat(currentDosis);\n final String currentTurno = args.get(posicionItemdeLista).getTurno();\n separated = currentTurno.split(\":\");\n timePick.setCurrentHour(Integer.parseInt(separated[0]));\n timePick.setCurrentMinute(Integer.parseInt(separated[1]));\n // TODO aca debería pasarle los valores que tenian seteados del turno y la dosis.\n //ar.com.kerbrum.kerbrum.NumPicker.setValue(currdosis);\n\n }\n alertDialogB\n .setCancelable(true)\n .setPositiveButton(\"Ok\",\n new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n\n }\n })\n .setNegativeButton(\"Cancelar\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n\n final AlertDialog alertDialogDosisHora = alertDialogB.create();\n alertDialogDosisHora.show();\n alertDialogDosisHora.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n float floatNumPick = ar.com.kerbrum.kerbrum.NumPicker.getValue();\n final String strDosis = Float.toString(floatNumPick);\n final String strTurno = timePick.getCurrentHour() + \":\" + timePick.getCurrentMinute();\n\n if (strDosis == \"0.0\") {\n Toast error = Toast.makeText(getActivity(), \"Tenes que agregar por le menos 0.25 de dosis\", Toast.LENGTH_SHORT);\n error.show();\n\n } else {\n if (dosisyhoraSeteada) {\n\n //Pedirle al objeto custom la hroa y dosis la dibujas a partir de aca\n\n modificarDosisYhora(args, adap, posicionItemdeLista, strDosis, strTurno);\n adap.notifyDataSetChanged();\n Toast toastModificacion = Toast.makeText(getActivity(), \"Modificaste la configuración de este medicamento para tomar \" + strDosis + \" dosis a las: \" + strTurno, Toast.LENGTH_LONG);\n toastModificacion.show();\n alertDialogDosisHora.dismiss();\n\n\n } else {\n setDosisyHora(args, adap, strDosis, strTurno);\n //setDosisYHora(); en este metodo tnees que crear el nuevo objeto customlist view y agregarlo al array /add\n adap.notifyDataSetChanged();\n Toast toastSeteoDosis = Toast.makeText(getActivity(), \"Configuraste este medicamento para tomar \" + strDosis + \" dosis a las: \" + strTurno, Toast.LENGTH_LONG);\n toastSeteoDosis.show();\n alertDialogDosisHora.dismiss();\n\n }\n }\n }\n });\n\n }", "void showPopuopForPurchaseAndPurchasePaid(int flowpurchaseReceivedOrPaid) {\n this.flowpurchaseReceivedOrPaid = flowpurchaseReceivedOrPaid;\n String languageCode = Utility.getInstance().getLanguage(getActivity());\n Utility.getInstance().setLanguage(getActivity(), languageCode);\n Utility.getInstance().localisation(getActivity(), languageCode);\n dialog = new Dialog(mContext);\n if (!dialog.isShowing()) {\n dialog.setCancelable(false);\n /* dialog.getWindow().addFlags(Window.FEATURE_NO_TITLE);*/\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));\n dialog.setContentView(R.layout.popup_purchase_received_paid);\n TextView textviewTitle = dialog.findViewById(R.id.textviewTitle);\n editextPurchaseSupplierName = dialog.findViewById(R.id.editextPurchaseSupplierName);\n ImageView imageviewMicSupplierName = dialog.findViewById(R.id.imageviewMicSupplierName);\n edittextPurchaseAmount = dialog.findViewById(R.id.edittextPurchaseAmount);\n ImageView imageviewMicPurchaseAmount = dialog.findViewById(R.id.imageviewMicPurchaseAmount);\n edittextPurchasePurpose = dialog.findViewById(R.id.edittextPurchasePurpose);\n ImageView imageviewMicPurchasePurpose = dialog.findViewById(R.id.imageviewMicPurchasePurpose);\n edittextPuchaseDate = dialog.findViewById(R.id.edittextPuchaseDate);\n imageviewMicSaveCancel = dialog.findViewById(R.id.imageviewMicSaveCancel);\n ImageView imageviewPurchaseDate = dialog.findViewById(R.id.imageviewPurchaseDate);\n CardView cardviewPurchaseCancel = dialog.findViewById(R.id.cardviewPurchaseCancel);\n CardView cardviewPurchaseOk = dialog.findViewById(R.id.cardviewPurchaseOk);\n ImageView imageviewCross = dialog.findViewById(R.id.imageviewCross);\n ImageView imageviewMicSaveCancel = dialog.findViewById(R.id.imageviewMicSaveCancel);\n imageviewSOutsnadingProfile = dialog.findViewById(R.id.imageviewOutsnadingProfile);\n textviewSOustandingId = dialog.findViewById(R.id.textviewOustandingId);\n textviewSOustandingName = dialog.findViewById(R.id.textviewOustandingName);\n textviewSOustandingAmount = dialog.findViewById(R.id.textviewOustandingAmount);\n relativelayoutSOustandingProfile = dialog.findViewById(R.id.relativelayoutProfile);\n textview_notFound = dialog.findViewById(R.id.textview_notFound);\n TextView textviewamount = dialog.findViewById(R.id.textviewsaleReport);\n\n textviewSOustandingAmount.setVisibility(View.GONE);\n\n setClickPuchaseElements(imageviewMicSupplierName, editextPurchaseSupplierName, getString(R.string.please_tell_supplier_name), 1);\n if (flowpurchaseReceivedOrPaid == 1) {\n setClickPuchaseElements(imageviewMicPurchaseAmount, edittextPurchaseAmount, getString(R.string.please_tell_purchase_amount), 2);\n setClickPuchaseElements(imageviewMicPurchasePurpose, edittextPurchasePurpose, getString(R.string.please_tell_purchase_purpose), 1);\n\n } else {\n setClickPuchaseElements(imageviewMicPurchaseAmount, edittextPurchaseAmount, getString(R.string.please_tell_paid_amount), 2);\n setClickPuchaseElements(imageviewMicPurchasePurpose, edittextPurchasePurpose, getString(R.string.please_tell_amount_paid_purpose), 1);\n\n }\n setClickPuchaseElements(imageviewMicSaveCancel, null, getString(R.string.please_say_save_or_cancel), 1);\n int currentMonth = dob_currentDate.get(Calendar.MONTH) + 1;\n edittextPuchaseDate.setText(dob_currentDate.get(Calendar.DAY_OF_MONTH) + \"/\" + currentMonth + \"/\" + dob_currentDate.get(dob_currentDate.YEAR));\n if (flowpurchaseReceivedOrPaid == 1) {\n textviewTitle.setText(getString(R.string.menu_purchase));\n } else {\n textviewTitle.setText(getString(R.string.menu_purchasePaid));\n textviewamount.setText(getString(R.string.menu_purchasePaid));\n// textviewSOustandingId.setVisibility(View.INVISIBLE);\n }\n\n textWatcherPurchaseSupplierName = new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n if (editextPurchaseSupplierName.hasFocus()) {\n if (dialog.isShowing()) {\n //checkOustandingData(s.toString(), true);\n if (Utility.getInstance().isOnline(mContext)) {\n checkSupplierData(s.toString(), true);\n }\n }\n }\n }\n };\n\n\n editextPurchaseSupplierName.addTextChangedListener(textWatcherPurchaseSupplierName);\n/* editextPurchaseSupplierName.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n Log.e(TAG, \"onTextChanged: \");\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n Log.e(TAG, \"onTextChanged: \");\n if (dialog.isShowing()) {\n //checkOustandingData(s.toString(), true);\n checkSupplierData(s.toString(), true);\n }\n }\n });*/\n\n cardviewPurchaseCancel.setOnClickListener(v -> {\n if (dialog != null) {\n dialog.dismiss();\n if (textToSpeech != null) {\n textToSpeech.stop();\n }\n speak(getString(R.string.transaction_cancelled), \"\");\n Toast.makeText(mContext, \"\" + getString(R.string.transaction_cancelled), Toast.LENGTH_SHORT).show();\n }\n });\n\n cardviewPurchaseOk.setOnClickListener(v -> {\n boolean valueStatus = validatePuchase();\n if (valueStatus) {\n createPurchaseRequest(flowpurchaseReceivedOrPaid);\n }\n });\n\n imageviewCross.setOnClickListener(v -> {\n if (dialog != null) {\n dialog.dismiss();\n if (textToSpeech != null) {\n textToSpeech.stop();\n }\n }\n });\n\n imageviewPurchaseDate.setOnClickListener(v -> {\n edittextPuchaseDate.setError(null);\n DatePickerDialog datePickerDialog = new DatePickerDialog(mContext, new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {\n month = month + 1;\n edittextPuchaseDate.setText(dayOfMonth + \"/\" + month + \"/\" + year);\n boolean valueStatus = validatePuchase();\n if (valueStatus) {\n speak(getString(R.string.please_say_save_or_cancel), \"\");\n new Handler().postDelayed(() -> {\n speechToTextFuncVoiceForPurchase(mContext, null, 3, imageviewMicSaveCancel, 2);\n }, 3000);\n }\n }\n }, dob_currentDate.get(dob_currentDate.YEAR), dob_currentDate.get(Calendar.MONTH), dob_currentDate.get(Calendar.DAY_OF_MONTH));\n// datePickerDialog.setTitle(\"Select Date\");\n datePickerDialog.getDatePicker().setMaxDate(System.currentTimeMillis());\n datePickerDialog.show();\n });\n\n\n if (!dialog.isShowing()) {\n String languageCode2 = Utility.getInstance().getLanguage(getActivity());\n Utility.getInstance().setLanguage(getActivity(), languageCode2);\n Utility.getInstance().localisation(getActivity(), languageCode2);\n dialog.show();\n\n\n/* WindowManager.LayoutParams params = dialog.getWindow().getAttributes(); // change this to your dialog.\n\n params.y = -100; // Here is the param to set your dialog position. Same with params.x\n dialog.getWindow().setAttributes(params);*/\n\n dialog.getWindow().setGravity(Gravity.TOP | Gravity.RIGHT);\n WindowManager.LayoutParams layoutParams = dialog.getWindow().getAttributes();\n layoutParams.x = 100; // right margin\n layoutParams.y = 170; // top margin\n dialog.getWindow().setAttributes(layoutParams);\n // e.g. bottom + left margins:\n dialog.getWindow().setGravity(Gravity.BOTTOM | Gravity.LEFT);\n WindowManager.LayoutParams layoutParams1 = dialog.getWindow().getAttributes();\n layoutParams1.x = 100; // left margin\n layoutParams1.y = 170; // bottom margin\n dialog.getWindow().setAttributes(layoutParams1);\n\n\n/* Window window = dialog.getWindow();\n\n\n\n window.setLayout(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT);*/\n }\n/* speak(getString(R.string.please_tell_supplier_name), \"\");\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n editextPurchaseSupplierName.requestFocus();\n speechToTextFuncVoiceForPurchase(mContext, editextPurchaseSupplierName, 1, imageviewMicSupplierName, 2);\n }\n }, 3000);*/\n\n }\n }", "public void alert(String txtMsg, final String action, final View btn_view)\n {\n LayoutInflater inflator = LayoutInflater.from(BookingDetailsActivity.this);\n final View yourCustomView = inflator.inflate(R.layout.custom_dialog, null);\n //endregion\n\n //region (2) init dialogue\n final AlertDialog dialog = new AlertDialog.Builder(BookingDetailsActivity.this)\n .setTitle(\"Do you want to proceed ?\")//replace w \"txtMsg\"\n .setView(yourCustomView)\n .create();\n //endregion\n\n //region (3) set onClicks for custom dialog btns\n yourCustomView.findViewById(R.id.btn_yes).setOnClickListener(new View.OnClickListener()\n {\n @Override\n public void onClick(View view)\n {\n switch (action)\n {\n case \"save\":\n SaveAppoint(btn_view);\n break;\n case \"cancel\":\n CancelAppoint(btn_view);\n break;\n }\n }\n });\n yourCustomView.findViewById(R.id.btn_no).setOnClickListener(new View.OnClickListener()\n {\n @Override\n public void onClick(View view)\n {\n dialog.dismiss();\n }\n });\n //endregion\n\n //region (4) Display dialogue\n dialog.show();\n //endregion\n }", "public void onClick(DialogInterface dialog, int which) {\n\t\t\t\t \t LinearLayout main = (LinearLayout) findViewById(R.id.top_layover); \n\t\t\t\t \t main.setBackgroundColor(0xff0099cc);\n\t\t\t\t \t LinearLayout shell = (LinearLayout) findViewById(R.id.bottom_layover); \n\t\t\t\t \t shell.setBackgroundColor(0xff0099cc);\n\t\t\t\t // Write your code here to execute after dialog\n\t\t\t\t Toast.makeText(getApplicationContext(),\n\t\t\t\t \"Declined\", Toast.LENGTH_SHORT)\n\t\t\t\t .show();\n\t\t\t\t dialog.cancel();\n\t\t\t\t }", "public void showMessage(){\n\n myComments = comments.getText().toString().trim();\n\n System.out.println(\"comments...\"+myComments);\n\n AlertDialog.Builder a_builder = new AlertDialog.Builder(this,AlertDialog.THEME_HOLO_LIGHT);\n\n a_builder.setMessage(\"Do you want refer as diagnostic\")\n .setCancelable(false)\n .setNegativeButton(\"Yes\",new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n// dialog.cancel();\n// showReferDiag();\n\n Intent intent = new Intent(DoctorTodaysAppointment.this,DoctorReferDiagnostic.class);\n intent.putExtra(\"refer\",\"Yes\");\n intent.putExtra(\"pid\",patientId);\n intent.putExtra(\"aid\",appointmentId);\n intent.putExtra(\"name\",patientname);\n intent.putExtra(\"reason\",myComments);\n intent.putExtra(\"mobile\",doctorMobile);\n intent.putExtra(\"id\",doctorId);\n intent.putExtra(\"prescription\",encodedPrescriptionImage);\n startActivity(intent);\n// Toast.makeText(getApplicationContext(),\"Yes\",Toast.LENGTH_SHORT).show();\n }\n })\n .setPositiveButton(\"No\",new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n Intent intent = new Intent(DoctorTodaysAppointment.this,DoctorReferDiagnostic.class);\n intent.putExtra(\"refer\",\"No\");\n intent.putExtra(\"pid\",patientId);\n intent.putExtra(\"aid\",appointmentId);\n intent.putExtra(\"name\",patientname);\n intent.putExtra(\"reason\",myComments);\n intent.putExtra(\"mobile\",doctorMobile);\n intent.putExtra(\"id\",doctorId);\n intent.putExtra(\"prescription\",\"\");\n startActivity(intent);\n }\n });\n AlertDialog alert = a_builder.create();\n alert.setTitle(\"Refer as Diagnostic\");\n alert.show();\n\n }", "public void createfirstQRMessage() {\n\n dialog = new Dialog(getActivity());\n dialog.setContentView(R.layout.first_scan_message);\n Button yes_btn = dialog.findViewById(R.id.btnYes);\n Button no_btn = dialog.findViewById(R.id.btnNo);\n yes_btn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n GeneralUtils.progressDialog(getActivity(), \"checking\");\n createProductTagApiCall();\n recent = true;\n\n }\n });\n no_btn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n onNO();\n }\n });\n dialog.show();\n\n }", "private void popupCalibratingDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(R.string.motion_calibrating);\n builder.setCancelable(false);\n builder.setMessage(R.string.motion_calibrating_message);\n\n calibratingDialog = builder.create();\n calibratingDialog.show();\n }", "public void onItemClick(AdapterView<?> arg0, View arg1, int index,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t final int idex = index;\n\t\t\t\t final long position = arg3;\n\t\t\t\t final AlertDialog dlg2 = new AlertDialog.Builder(PropagandaListActivity.this).create();\n\t\t\t\t\tdlg2.show();\t\t\t\t\t\n\t\t\t\t\tdlg2.getWindow().setContentView(R.layout.dialog_new);\n\t\t\t\t\tButton confirm =(Button)dlg2.findViewById(R.id.button_confirm);\n\t\t\t\t\tButton cancel =(Button)dlg2.findViewById(R.id.button_cancel);\n\t\t\t\t\tTextView tv = (TextView)dlg2.findViewById(R.id.notice_message);\n\t\t\t\t\ttv.setTextSize(16);\n\t\t\t\t\ttv.setText(MainActivity.resources.getString(R.string.propagandalist_toast1)+GameData.pro[index].money+MainActivity.resources.getString(R.string.propagandalist_toast2));\n\t\t\t\t confirm.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tConnection.sendMessage(GameProtocol.\n\t\t\t\t\t\t\t\t\tCONNECTION_SEND_JointAdvocacy_Req,\n\t\t\t\t\t\t\t\t\tConstructData.Join_JointAdvocacy_Req(GameData.pro[idex].id,0));//8宣传列表\n\t\t\t\t\t\t\tdlg2.dismiss();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t cancel.setOnClickListener(new OnClickListener() {\n\t\t\t\t \t\n\t\t\t\t \t \n\t\t\t\t \tpublic void onClick(View v) {\n\t\t\t\t \t\t// TODO Auto-generated method stub\n\t\t\t\t \t\t\n\t\t\t\t \t\tdlg2.dismiss();\n\t\t\t\t \t}\n\t\t\t\t });\n/*\t\t\t\t \n\t\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(PropagandaListActivity.mContext);\n\t\t\t\tbuilder.setMessage(MainActivity.resources.getString(R.string.propagandalist_toast1)+GameData.pro[index].money+MainActivity.resources.getString(R.string.propagandalist_toast2))\n\t\t\t\t .setPositiveButton(MainActivity.resources.getString(R.string.dialog_ok), new DialogInterface.OnClickListener(){\t\t\t\t \t \n\t\t\t\t\t\t\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tConnection.sendMessage(GameProtocol.\n\t\t\t\t\t\t\t\t\tCONNECTION_SEND_JointAdvocacy_Req,\n\t\t\t\t\t\t\t\t\tConstructData.Join_JointAdvocacy_Req(GameData.pro[idex].id));//8宣传列表\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t}})\n\t\t\t\t .setNegativeButton(MainActivity.resources.getString(R.string.dialog_return), new DialogInterface.OnClickListener(){\n\n\t\t\t\t\t\t \n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t}} );\n\t\t\t\tbuilder.create().show();*/\n\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t\n\t\t\t}", "static void errorNotification(Context context,String exception) {\n AlertDialog.Builder errorDialogBox= new AlertDialog.Builder(context);\n errorDialogBox.setTitle(\"Exception\");\n errorDialogBox.setMessage(exception);\n errorDialogBox.setNeutralButton(android.R.string.ok,new DialogInterface.OnClickListener(){\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n //Activates the dialog box\n AlertDialog errorDialog = errorDialogBox.create();\n errorDialog.show();\n\n }", "private void notifyUiApiFailure() {\n\n if (stillAlive()) {\n\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(getActivity());\n View convertView = getActivity().getLayoutInflater().inflate(R.layout.api_error_alert_title, null);\n alertDialog.setCustomTitle(convertView);\n\n alertDialog.setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n\n // Set the line color\n Dialog d = alertDialog.show();\n int dividerId = d.getContext().getResources().getIdentifier(\"android:id/titleDivider\", null, null);\n View divider = d.findViewById(dividerId);\n divider.setBackground(new ColorDrawable(Color.parseColor(\"#00274c\")));\n }\n }", "private void loadLocalImageConfirm()\n {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())\n .setCancelable(true).setTitle(\"Load\").setMessage(\"Load image?\");\n\n builder.setPositiveButton(R.string.open_local, new DialogInterface.OnClickListener()\n {\n @Override\n public void onClick(DialogInterface dialog, int which)\n {\n ((MainActivity) getActivity()).loadLocalImage();\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 }", "public void dialog_action() {\n\n mContent = (LinearLayout) dialog.findViewById(R.id.linearLayout);\n mSignature = new signature(getApplicationContext(), null);\n mSignature.setBackgroundColor(Color.WHITE);\n // Dynamically generating Layout through java code\n mContent.addView(mSignature, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);\n mClear = (Button) dialog.findViewById(R.id.clear);\n mGetSign = (Button) dialog.findViewById(R.id.getsign);\n mGetSign.setEnabled(false);\n mCancel = (Button) dialog.findViewById(R.id.cancel);\n view = mContent;\n\n mClear.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n Log.v(\"tag\", \"Panel Cleared\");\n mSignature.clear();\n mGetSign.setEnabled(false);\n }\n });\n mGetSign.setOnClickListener(new View.OnClickListener() {\n\n public void onClick(View v) {\n\n Timestamp timestamp = new Timestamp(System.currentTimeMillis());\n String dates = sdf.format(timestamp);\n\n pic_name = \"TTD \" + dates;\n StoredPath = DIRECTORY + pic_name + \".JPEG\";\n Log.e(\"tag\", \"DATES :\"+dates);\n\n Log.e(\"tag\", \"Directory\" + StoredPath);\n view.setDrawingCacheEnabled(true);\n mSignature.save(view, StoredPath);\n\n dialog.dismiss();\n Toast.makeText(getApplicationContext(), \"Berhasil Disimpan\", Toast.LENGTH_SHORT).show();\n // Calling the same class\n recreate();\n\n }\n });\n mCancel.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n Log.v(\"tag\", \"Panel Dibatalkan\");\n dialog.dismiss();\n // Calling the same class\n recreate();\n }\n });\n dialog.show();\n }", "@android.support.annotation.NonNull\n public android.app.Dialog onCreateDialog(android.os.Bundle r12) {\n /*\n r11 = this;\n r10 = 2;\n r9 = 1;\n r8 = 0;\n r1 = com.whatsapp.DialogToastActivity.f;\n r0 = com.whatsapp.App.as;\n r2 = r11.getArguments();\n r3 = z;\n r3 = r3[r9];\n r2 = r2.getString(r3);\n r0 = r0.b(r2);\n r2 = r11.getContext();\n r2 = r0.a(r2);\n r3 = r11.getArguments();\n r4 = z;\n r4 = r4[r8];\n r3 = r3.getParcelableArrayList(r4);\n r4 = r0.m();\n if (r4 != 0) goto L_0x0037;\n L_0x0031:\n r0 = r0.c();\n if (r0 == 0) goto L_0x0079;\n L_0x0037:\n r0 = r3.get(r8);\n r0 = (android.net.Uri) r0;\n r0 = a(r0);\n r4 = r3.size();\n if (r4 != r9) goto L_0x005c;\n L_0x0047:\n r4 = android.text.TextUtils.isEmpty(r0);\n if (r4 != 0) goto L_0x005c;\n L_0x004d:\n r4 = 2131231276; // 0x7f08022c float:1.8078628E38 double:1.052968157E-314;\n r5 = new java.lang.Object[r10];\n r5[r8] = r0;\n r5[r9] = r2;\n r0 = r11.getString(r4, r5);\n if (r1 == 0) goto L_0x0077;\n L_0x005c:\n r0 = com.whatsapp.App.az;\n r4 = 2131296277; // 0x7f090015 float:1.8210466E38 double:1.0530002716E-314;\n r5 = r3.size();\n r6 = new java.lang.Object[r10];\n r7 = r3.size();\n r7 = java.lang.Integer.valueOf(r7);\n r6[r8] = r7;\n r6[r9] = r2;\n r0 = r0.a(r4, r5, r6);\n L_0x0077:\n if (r1 == 0) goto L_0x00b9;\n L_0x0079:\n r0 = r3.get(r8);\n r0 = (android.net.Uri) r0;\n r0 = a(r0);\n r4 = r3.size();\n if (r4 != r9) goto L_0x009e;\n L_0x0089:\n r4 = android.text.TextUtils.isEmpty(r0);\n if (r4 != 0) goto L_0x009e;\n L_0x008f:\n r4 = 2131230935; // 0x7f0800d7 float:1.8077937E38 double:1.0529679883E-314;\n r5 = new java.lang.Object[r10];\n r5[r8] = r0;\n r5[r9] = r2;\n r0 = r11.getString(r4, r5);\n if (r1 == 0) goto L_0x00b9;\n L_0x009e:\n r0 = com.whatsapp.App.az;\n r1 = 2131296266; // 0x7f09000a float:1.8210444E38 double:1.053000266E-314;\n r4 = r3.size();\n r5 = new java.lang.Object[r10];\n r6 = r3.size();\n r6 = java.lang.Integer.valueOf(r6);\n r5[r8] = r6;\n r5[r9] = r2;\n r0 = r0.a(r1, r4, r5);\n L_0x00b9:\n r1 = new android.support.v7.app.AlertDialog$Builder;\n r2 = r11.getActivity();\n r1.<init>(r2);\n r2 = r11.getContext();\n r0 = com.whatsapp.a28.b(r0, r2);\n r0 = r1.setMessage(r0);\n r1 = 2131231861; // 0x7f080475 float:1.8079815E38 double:1.052968446E-314;\n r2 = new com.whatsapp.aec;\n r2.<init>(r11, r3);\n r0 = r0.setPositiveButton(r1, r2);\n r1 = 2131230884; // 0x7f0800a4 float:1.8077833E38 double:1.052967963E-314;\n r2 = 0;\n r0 = r0.setNegativeButton(r1, r2);\n r0 = r0.create();\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.whatsapp.DocumentPickerActivity.SendDocumentsConfirmationDialogFragment.onCreateDialog(android.os.Bundle):android.app.Dialog\");\n }", "public void openDialog(){\n DialogforTheboysHeroImage dialogforTheboysHeroImage = new DialogforTheboysHeroImage();\n dialogforTheboysHeroImage.show(getSupportFragmentManager(), \"Heros info\");\n }", "public void initiatePopupWindow(View v) {\n try {\n //We need to get the instance of the LayoutInflater, use the context of this activity\n LayoutInflater inflater = (LayoutInflater) Activity_Lesson_Unit_Point_Display_FlashCardActivity.this\n .getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n //Inflate the view from a predefined XML layout\n\n View view = inflater.inflate(R.layout.popup_screen,\n (ViewGroup) findViewById(R.id.popup_element));\n RelativeLayout layout = view.findViewById(R.id.popup_element);\n int width = 650;\n int height = 600;\n width = layout.getWidth();\n height = layout.getHeight();\n //Instantiate grid view\n gridView = view.findViewById(R.id.scroll_grid);\n //Instantiate grid adapter\n// scrollAdapter = new ScrollGridCardAdapter(FlashCardActivity.this,gja_questions,knownList,donknowList,skipList,getScreenSize());\n scrollAdapter = new ScrollGridCardAdapter(Activity_Lesson_Unit_Point_Display_FlashCardActivity.this,questionList,getScreenSize());\n //Setting Adapter to gridview\n gridView.setAdapter(scrollAdapter);\n // create a 300px width and 570px height PopupWindow\n pw = new PopupWindow(view, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n // display the popup in the center\n pw.showAtLocation(v, Gravity.CENTER, 0, 0);\n if (android.os.Build.VERSION.SDK_INT > 20) {\n pw.setElevation(10);\n }\n// TextView mResultText = (TextView) layout.findViewById(R.id.server_status_text);\n Button cancelButton = (Button) view.findViewById(R.id.pop_close_button);\n cancelButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n pw.dismiss();\n// disableEnableViews(myrlayout);\n mHideRunnable.run();\n }\n });\n\n } catch (Exception e) {\n e.printStackTrace();\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 }", "public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n Toast.makeText(getApplicationContext(),\"MineSweeper!!\",\n Toast.LENGTH_SHORT).show();\n }", "private void showErrorDialog(){\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n builder.setTitle(getString(R.string.booking_not_created));\n builder.setMessage(getString(R.string.customer_already_has_active_booking_error));\n builder.setIcon(R.drawable.ic_error_black_24dp);\n builder.setCancelable(false);\n // When users confirms dialog, close the activity\n builder.setPositiveButton(android.R.string.ok, (dialog, which) -> {\n // Close the Activity..\n finish();\n });\n\n AlertDialog dialog = builder.create();\n dialog.setCanceledOnTouchOutside(false);\n dialog.show();\n\n // Change button colors\n Button positiveButton = dialog.getButton(AlertDialog.BUTTON_POSITIVE);\n positiveButton.setTextColor(getColor(R.color.colorPrimary));\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(this.m)\n .setPositiveButton(R.string.donesuccess, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // onFailure();\n onLoginFailed(m);\n }\n });\n return builder.create();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View vi = inflater.inflate(R.layout.fragment_fees, container, false);\n\n\n infobtn = (ImageView)vi.findViewById(R.id.infobtn);\n\n infobtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n new MaterialDialog.Builder(getActivity())\n .title(\"Consultation fees\")\n .content(\"This fees is indicative and might vary. \\n NOTE:Fees is payable at clinic. There are NO charges for booking an appointment.\")\n .positiveText(\"DISMISS\")\n .negativeText(\"\")\n .show();\n }\n });\n\n\n return vi;\n }", "@Override\n public void onClick(View view) {\n final Dialog dialog = new Dialog(context);\n dialog.setTitle(\"FIRE ASSISTANCE\");\n dialog.setContentView(R.layout.zdialog_fire);\n\n WindowManager.LayoutParams lp1 = new WindowManager.LayoutParams();\n lp1.copyFrom(dialog.getWindow().getAttributes());\n lp1.width = WindowManager.LayoutParams.MATCH_PARENT;\n lp1.height = WindowManager.LayoutParams.WRAP_CONTENT;\n lp1.gravity = Gravity.CENTER;\n\n dialog.getWindow().setAttributes(lp1);\n\n fire1 = (LinearLayout) dialog.findViewById(R.id.fire1);\n fire2 = (LinearLayout) dialog.findViewById(R.id.fire2);\n fire3 = (LinearLayout) dialog.findViewById(R.id.fire3);\n fire4 = (LinearLayout) dialog.findViewById(R.id.fire4);\n fire5 = (LinearLayout) dialog.findViewById(R.id.fire5);\n fire6 = (LinearLayout) dialog.findViewById(R.id.fire6);\n\n fireRanked1 = (TextView) dialog.findViewById(R.id.fireRank1);\n fireRanked2 = (TextView) dialog.findViewById(R.id.fireRank2);\n fireRanked3 = (TextView) dialog.findViewById(R.id.fireRank3);\n fireRanked4 = (TextView) dialog.findViewById(R.id.fireRank4);\n fireRanked5 = (TextView) dialog.findViewById(R.id.fireRank5);\n fireRanked6 = (TextView) dialog.findViewById(R.id.fireA);\n\n fireRanked1.setText(agencyNameFire[0] + \"\" + statusFire[0]);\n fireRanked2.setText(agencyNameFire[1] + \"\" + statusFire[1]);\n fireRanked3.setText(agencyNameFire[2] + \"\" + statusFire[2]);\n fireRanked4.setText(agencyNameFire[3] + \"\" + statusFire[3]);\n fireRanked5.setText(agencyNameFire[4] + \"\" + statusFire[4]);\n fireRanked6.setText(agencyNameFire[5]);\n\n fire1.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n callDialog(contLandlineFire[0].toString(), contCpFire[0].toString(), regFire[0], \"Fire\");\n\n }\n });\n\n fire2.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n callDialog(contLandlineFire[1].toString(), contCpFire[1].toString(), regFire[1], \"Fire\");\n\n }\n });\n\n fire3.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n callDialog(contLandlineFire[2].toString(), contCpFire[2].toString(), regFire[2], \"Fire\");\n\n }\n });\n\n fire4.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n callDialog(contLandlineFire[3].toString(), contCpFire[3].toString(), regFire[3], \"Fire\");\n\n }\n });\n\n fire5.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n callDialog(contLandlineFire[4].toString(), contCpFire[4].toString(), regFire[4], \"Fire\");\n\n }\n });\n fire6.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n callDialog(contLandlineCrime[5].toString(), contCpCrime[5].toString(), \"L0LucU9RMgOtV1MwVCGUR6oyhy62\", \"Fire\");\n\n }\n });\n\n // set the custom dialog components - text, image and button\n\n dialog.show();\n\n }" ]
[ "0.7587195", "0.69863147", "0.69295305", "0.6780604", "0.66468865", "0.6488932", "0.6463582", "0.6452248", "0.64272046", "0.6417779", "0.6403257", "0.64006793", "0.63972294", "0.636366", "0.6340146", "0.62710786", "0.62710786", "0.6267634", "0.62443596", "0.62356687", "0.6231332", "0.62286913", "0.621961", "0.6207239", "0.6206222", "0.62049574", "0.6204495", "0.6202247", "0.6198698", "0.61984825", "0.619841", "0.6194467", "0.61861193", "0.61852807", "0.6170434", "0.61673844", "0.61574656", "0.61570644", "0.613721", "0.6135392", "0.612407", "0.6114431", "0.6111851", "0.610802", "0.6105552", "0.60987604", "0.60980445", "0.60967404", "0.6086962", "0.6083872", "0.608187", "0.60751075", "0.60732555", "0.60688806", "0.60547686", "0.6052681", "0.6047517", "0.60453016", "0.60405344", "0.60391706", "0.60317665", "0.6027392", "0.6027007", "0.6026477", "0.60155886", "0.6009507", "0.60080725", "0.6007607", "0.6002718", "0.5999875", "0.5992172", "0.5984747", "0.59819204", "0.5974207", "0.5970163", "0.59680635", "0.5965303", "0.5964319", "0.5957223", "0.5954554", "0.5952268", "0.5942598", "0.59362924", "0.593282", "0.5932796", "0.59233457", "0.59219444", "0.59138775", "0.5911011", "0.59089196", "0.5900035", "0.58981997", "0.5894615", "0.58918875", "0.58766186", "0.58717394", "0.5870024", "0.58574563", "0.5851309" ]
0.77396816
0
/ todo delete for sender
private void delete_message_sender(final int position, final MessageHolder messageHolder){ Mprogress.setTitle("Wait for a moment ..."); Mprogress.setMessage("Please wait for delete message"); Mprogress.setCanceledOnTouchOutside(false); Mprogress.show(); DatabaseReference MessageRoot = FirebaseDatabase.getInstance().getReference(); MessageRoot.child("Message").child(userMessageListModals.get(position).getFrom()) .child(userMessageListModals.get(position).getTo()) .child(userMessageListModals.get(position).getMessage_Id()) .removeValue() .addOnCompleteListener(new OnCompleteListener<Void>() { @Override public void onComplete(@NonNull Task<Void> task) { if(task.isSuccessful()){ userMessageListModals.remove(position); notifyDataSetChanged(); Mprogress.dismiss(); } else { Toast.makeText(messageHolder.context, task.getException().getMessage(), Toast.LENGTH_LONG).show(); Mprogress.dismiss(); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void delete(int msg);", "public void delete(int singerId);", "@Override\n\tpublic void delete(BatimentoCardiaco t) {\n\t\t\n\t}", "public void deleteReply() {\n\r\n\t}", "@Override\n\tpublic void delete(CorsoDiLaurea corso) {\n\t\t\n\t}", "private void deleteByCustomUserAndTypeAndTargetId(CustomUser customUserReceiver, int type,\n Long targetId) {\n Long requestNotiId = this.notificationRepository\n .deleteByCustomUserAndTypeAndTargetId(customUserReceiver, type, targetId);\n if (requestNotiId.compareTo(0L) > 0) {\n this.log.debug(\"Delete notification {} successfully\", requestNotiId);\n }\n }", "@Override\r\n\tpublic void delete(FollowUp followup) {\n\t\t\r\n\t}", "@Override\n\tpublic void delete(Pedido arg0) {\n\n\t}", "@Override\n\tpublic void delete(Note e) {\n\t\t\n\t}", "@FXML\n\tprivate void deleteSelected(ActionEvent event) {\n\t\tint selectedIndex = taskList.getSelectionModel().getSelectedIndex();\n\t\tString task = taskList.getItems().get(selectedIndex);\n\t\ttaskList.getSelectionModel().clearSelection();\n\t\ttaskList.getItems().remove(task);\n\t\tchatView.setText(\"\");\n\t\ttaskList.getItems().removeAll();\n\t\tString task_split[] = task.split(\" \", 2);\n\t\tString removeTask = task_split[1];\n\t\tif (task.contains(\"due by\")) {\n\t\t\tString[] taskDate = task_split[1].split(\"\\\\s+\");\n\t\t\tSystem.out.println(taskDate);\n\t\t\tString end = taskDate[taskDate.length - 3];\n\t\t\tSystem.out.println(end);\n\t\t\tremoveTask = task_split[1].substring(0, task_split[1].indexOf(end)).trim();\n\t\t\tSystem.out.println(removeTask);\n\n\t\t}\n\t\tclient.removeTask(removeTask.replace(\"\\n\", \"\"));\n\t}", "public void deleteMessage(Integer tid, int rank);", "int deleteByExample(TbMessageExample example);", "public void deleteChatRoom(ChatRoom cr);", "@Override\n\tpublic void delete(Pessoa arg0) {\n\t\t\n\t}", "int deleteByPrimaryKey(Integer massageId);", "private void delete(ActionEvent e){\r\n if (client != null){\r\n ConfirmBox.display(\"Confirm Deletion\", \"Are you sure you want to delete this entry?\");\r\n if (ConfirmBox.response){\r\n Client.deleteClient(client);\r\n AlertBox.display(\"Delete Client\", \"Client Deleted Successfully\");\r\n // Refresh view\r\n refresh();\r\n \r\n }\r\n }\r\n }", "private void delete() {\n\n\t}", "@FXML\n\tpublic void deleteUser(ActionEvent e) {\n\t\tint i = userListView.getSelectionModel().getSelectedIndex();\n//\t\tUser deletMe = userListView.getSelectionModel().getSelectedItem();\n//\t\tuserList.remove(deletMe); this would work too just put the admin warning\n\t\tdeleteUser(i);\n\t}", "@Override\n\tpublic void delete(CelPhone celphone) {\n\t\t\n\t}", "private Delete() {}", "private Delete() {}", "int deleteByExample(PrivateMessageExample example);", "private void deleteTodoMenu(User u) {\n\t\t\n\t}", "@Override\n\tpublic void deleteItem(Object toDelete) {}", "private void delete_message_reciver(final int position, final MessageHolder messageHolder){\r\n\r\n Mprogress.setTitle(\"Wait for a moment ...\");\r\n Mprogress.setMessage(\"Please wait for delete message\");\r\n Mprogress.setCanceledOnTouchOutside(false);\r\n Mprogress.show();\r\n\r\n DatabaseReference MessageRoot = FirebaseDatabase.getInstance().getReference();\r\n MessageRoot.child(\"Message\").child(userMessageListModals.get(position).getTo())\r\n .child(userMessageListModals.get(position).getFrom())\r\n .child(userMessageListModals.get(position).getMessage_Id())\r\n .removeValue()\r\n .addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n if(task.isSuccessful()){\r\n userMessageListModals.remove(position);\r\n notifyDataSetChanged();\r\n Mprogress.dismiss();\r\n }\r\n else {\r\n Toast.makeText(messageHolder.context, task.getException().getMessage(), Toast.LENGTH_SHORT).show();\r\n Mprogress.dismiss();\r\n }\r\n }\r\n });\r\n\r\n }", "int deleteByExample(TbComEqpModelExample example);", "@Override\r\n\tpublic void k_delete(String MF_NO) {\n\t\t\r\n\t}", "@Override\n\tpublic void delete(Phone phone) {\n\t\t\n\t}", "@Override\n\tpublic void delete(Phone phone) {\n\t\t\n\t}", "@Override\r\n\tpublic int delete(ActionContext arg0) throws Exception {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic void onDeletionNotice(long directMessageId, long userId) {\n\n\t}", "@Override\r\n\tpublic void delete(int eno) {\n\r\n\t}", "@Override\n\tpublic Integer delete(ReplyDTO dto) {\n\t\treturn mapper.delete(dto);\n\t}", "@Override\r\n\tpublic String delete() {\n\t\treturn \"delete\";\r\n\t}", "@Override\n\tpublic void delete(String arg0) {\n\t\t\n\t}", "void deleteButton_actionPerformed(ActionEvent e) {\n doDelete();\n }", "@Override\n\tpublic boolean delete(Message entity) throws SQLException {\n\t\treturn false;\n\t}", "@Override\n\tpublic void delete(Client obj) {\n\t\t\n\t}", "@Override\n\tpublic boolean delete(String email) {\n\t\treturn false;\n\t}", "@Override\n\tpublic int delete(Utente input) throws Exception {\n\t\treturn 0;\n\t}", "@RequestMapping(value = \"/mensajes/deleteDestino/{destino}\", method = RequestMethod.DELETE)\n\tpublic ResponseEntity<Void> deleteByDestino(@PathVariable String destino){\n\t\tList<Mensaje> mensajeBorrar = chatDAO.findByDestino(destino);\n\t\tchatDAO.deleteAll(mensajeBorrar);\n\t\treturn new ResponseEntity<Void>(HttpStatus.OK);\n\t}", "@Override\n\tpublic void delete(GalaxyNote galaxynote) {\n\t\t\n\t}", "@FXML public void deleteBT_handler(ActionEvent e) {\n\t\tif(list.getSelectionModel().getSelectedIndex() == -1) {\n\t\t\tAlert error = new Alert(AlertType.ERROR, \"Nothing Selected.\\nPlease select correctly or add new User\", ButtonType.OK);\n\t error.showAndWait();\n\t\t}\n\t\telse {\n\t\t\tAlert warning = new Alert(AlertType.WARNING,\"Delete this User from list?\", ButtonType.YES, ButtonType.NO);\n\t warning.showAndWait();\n\t if(warning.getResult() == ButtonType.NO){\n\t return;\n\t }\n\t\n\t int idx = list.getSelectionModel().getSelectedIndex();\n\t if(list.getSelectionModel().getSelectedItem().getUserName().equals(\"stock\")) {\n\t \tAlert error = new Alert(AlertType.ERROR, \"You can't delete stock username\", ButtonType.OK);\n\t error.showAndWait();\n\t \treturn;\n\t }\n\t obs.remove(idx);\n\t mgUsr.arrList.remove(idx);\n\t\t}\n\t}", "@Override\n\tpublic void delete(Iphone iphone) {\n\t\t\n\t}", "@Override\n\tpublic void delete(Translator entity) {\n\t\t\n\t}", "public void delete() {\n\n\t}", "@Override\n\tpublic String deleteMsg(long id,CustomerUser user) throws Exception {\n\t\tCustomerMessage entity = msgDao.queryById(id);\n\t\tmsgDao.delete(entity);\n\t\treturn \"success\";\n\t}", "boolean notifyDelete(InetAddress address, ContentEntry recording);", "private void delete_message_everyone(final int position, final MessageHolder messageHolder){\r\n\r\n Mprogress.setTitle(\"Wait for a moment ...\");\r\n Mprogress.setMessage(\"Please wait for delete message\");\r\n Mprogress.setCanceledOnTouchOutside(false);\r\n Mprogress.show();\r\n\r\n DatabaseReference MessageRoot = FirebaseDatabase.getInstance().getReference();\r\n MessageRoot.child(\"Message\").child(userMessageListModals.get(position).getTo())\r\n .child(userMessageListModals.get(position).getFrom())\r\n .child(userMessageListModals.get(position).getMessage_Id())\r\n .removeValue()\r\n .addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n if(task.isSuccessful()){\r\n MessageRoot.child(\"Message\").child(userMessageListModals.get(position).getFrom())\r\n .child(userMessageListModals.get(position).getTo())\r\n .child(userMessageListModals.get(position).getMessage_Id())\r\n .removeValue()\r\n .addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n\r\n if(task.isSuccessful()){\r\n /// todo finial task\r\n userMessageListModals.remove(position);\r\n notifyDataSetChanged();\r\n Mprogress.dismiss();\r\n }\r\n else {\r\n Toast.makeText(messageHolder.context, task.getException().getMessage(), Toast.LENGTH_SHORT).show();\r\n\r\n Mprogress.dismiss();\r\n }\r\n\r\n }\r\n });\r\n }\r\n else {\r\n Toast.makeText(messageHolder.context,task.getException().getMessage(), Toast.LENGTH_LONG).show();\r\n Mprogress.dismiss();\r\n }\r\n }\r\n });\r\n }", "public Order delete(Order order);", "@Override\n\tpublic void delete(ComplitedOrderInfo arg0) {\n\t\t\n\t}", "public boolean deleteMessageBySender(User sender, int mid) {\n boolean deleteResult = false;\n String sql = \"DELETE FROM message WHERE mid = ? AND sender = ?\";\n \ttry {\t\t\t\n this.statement = connection.prepareStatement(sql);\n this.statement.setInt(1, mid); \n this.statement.setString(2, sender.getUserName());\n this.statement.executeUpdate();\n deleteResult = true;\n this.statement.close();\n\t}\n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return deleteResult; \n }", "@Override\n\tpublic void delete(Object entidade) {\n\t\t\n\t}", "void onDelete();", "public void delete(){\r\n\r\n }", "public void targetDeleted(long tid) throws RemoteException {\n\n\t\tlogger.create().block(\"targetDeleted\").info().level(1).msg(\n\t\t\t\t\"Adding deleteTarget request to update queue for tid: \" + tid).send();\n\n\t}", "public boolean delete(Reminder reminder);", "private void delete() {\n\t\tComponents.questionDialog().message(\"Are you sure?\").callback(answeredYes -> {\n\n\t\t\t// if confirmed, delete the current product PropertyBox\n\t\t\tdatastore.delete(TARGET, viewForm.getValue());\n\t\t\t// Notify the user\n\t\t\tNotification.show(\"Product deleted\", Type.TRAY_NOTIFICATION);\n\n\t\t\t// navigate back\n\t\t\tViewNavigator.require().navigateBack();\n\n\t\t}).open();\n\t}", "void delete(UnsubscribeRequest request);", "public String deleteMessage(Integer id ){\n repo.deleteById(id);\n return \"Mensaje Eliminado\" + id;\n }", "public void delete(Personne Send ,Personne Receive) throws SQLException {\n\t\t\tString req = \"DELETE FROM DemandeAmis WHERE Pers_Demande = ? \"\n\t\t\t\t\t+ \"AND Pers_Receive =?\";\n\t\t\tPreparedStatement ps = DBConfig.getInstance().getConn().prepareStatement(req);\n\t\t\tps.setString(1, Send.getNomComptePers());\n\t\t\tps.setString(2, Receive.getNomComptePers());\n\t\t\tps.executeUpdate();\n\t\t}", "public void deleteTask(Integer tid);", "@DefaultMessage(\"Pressing commit will delete the current record from the database\")\n @Key(\"gen.deleteMessage\")\n String gen_deleteMessage();", "@Override\n\tpublic void deleteCreator(CreatorDTO creator) {\n\t\t\n\t}", "void delete(String receiptHandle);", "MessageResource deleteMensaje(Integer mensID) throws NoPermissionException;", "public void delete(Context ctx){\n\t\t\tChildInteraction cDb = new ChildInteraction(ctx);\t// for writing to the db\n\t\t\tfor(String key : numbers.keySet())\t\t\t\t\t// for all the numbers\n\t\t\t\tcDb.DeleteChild(key, text);\t\t\t\t\t\t// delete the entry in the db\n\t\t\tcMessages.remove(this);\t\t\t\t\t\t\t\t// remove this from cMessages\n\t\t\tcDb.Cleanup();\t\t\t\t\t\t\t\t\t\t// cleanup\n\t\t}", "@Override\r\n\tpublic void deleteMessage(Integer id) {\n\t\tString sql=\"delete from message where id=?\";\r\n\t\ttry {\r\n\t\t\tupdate(conn, sql, id);\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void deleteAlarm(String content) {\n TodoItem item = mydb.getEntry(content);\r\n\r\n Intent intent = new Intent(toSend);\r\n intent.setClass(this, AlarmReciver.class);\r\n intent.putExtra(\"what\", content);\r\n PendingIntent sender = PendingIntent.getBroadcast(\r\n MyService.this, mydb.searchID(content)*998 + item.getToDoYear()*3 + item.getToDoHour()*6 + item.getToDoMonth()*2 + item.getToDoDay()*86, intent, 0);\r\n\r\n Log.i(\"---delete alarm\",content);\r\n // And cancel the alarm.\r\n AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE);\r\n am.cancel(sender);\r\n }", "@Override\r\n\tpublic void delete(Usuario t) {\n\t\t\r\n\t}", "public void delete() {\n\n }", "@DELETE\n\t@Produces(\"text/plain\")\n\tpublic String onDelete() {\n\t\tmsg = null;\n\t\treturn \"Message deleted.\\n\";\n\t}", "int deleteByExample(SmsCleanBagLineExample example);", "void eliminarPedido(UUID idPedido);", "int deleteByExample(OfUserWechatExample example);", "static void delete(User user, String content, MessageChannel chan) {\n if(!content.equalsIgnoreCase(\"!delete\"))\n return;\n\n // TODO: migrate pairs to some kind of model type\n Pair<Long, Long> requestIdPair = new ImmutablePair<>(chan.getIdLong(), user.getIdLong());\n Pair<Long, Long> messageIdPair = postController.getLastRequestResponseByUser().get(requestIdPair);\n if(messageIdPair != null) {\n chan.deleteMessageById(messageIdPair.getLeft()).queue(\n aVoid -> {\n chan.deleteMessageById(messageIdPair.getRight()).queue(); // don't care whether this fails\n chan.sendMessage(\"S-sorry!\").queue();\n },\n throwable -> chan.sendMessage(\"I can't seem to find what your latest request here was... maybe it's already gone?\").queue());\n }\n else {\n chan.sendMessage(\"I don't remember what your latest request here was, I apologize!\").queue();\n }\n }", "public void deleteItem(int index) {\n messages.remove(index);\n notifyItemRemoved(index);\n }", "@Override\n\tpublic void delete() {\n\n\t}", "@Override\n public void deleteTodo(final int position) {\n new AlertDialog.Builder(this)\n .setIcon(R.drawable.ic_warning_red_24dp)\n .setTitle(R.string.delete_todo_title)\n .setMessage(getString(R.string.delete_body_message)\n + todos.get(position).getTitle() + \"'\")\n .setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n todos.remove(position);\n Toast.makeText(MainActivity.this, \"Deleted\", Toast.LENGTH_SHORT).show();\n adapter.notifyDataSetChanged();\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n }).show();\n }", "public static void deletedCommand(Task t) {\n UI.line();\n System.out.println(\"\\tNoted. I've removed this Task:\");\n System.out.println(\"\\t\" + t.toString());\n int count = 0;\n for (Object ignored : Tasks) {\n count++;\n }\n System.out.println(\"\\tNow you have \" + count + \" tasks in the list.\");\n UI.line();\n }", "public void delete()\n {\n call(\"Delete\");\n }", "void deleteTransmission(Transmission transmission, SiteUser siteUser);", "@Override\n public void delete(Usuario usuario) {\n }", "public void delete(int uslActionId, int banHistoryId);", "int deleteByExample(AlertQueueExample example);", "@Override\r\n\tpublic boolean delete(Moteur obj) {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic void excluir(Telefone vo) throws Exception {\n\t\t\r\n\t}", "@Override\r\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdb.delete(SmsHelper.TB_NAME, MyHelper.ID+ \"=\" + id, null);\r\n\t\t\t\t\t\t\tupdateList();\r\n\t\t\t\t\t\t}", "public void eliminarMensaje(InfoMensaje m) throws Exception;", "@Override\n public void deleteSms() {\n Uri uri = Uri.parse(\"content://sms/\");\n Cursor cursor = presenter.getContext().getContentResolver().query(uri, null, null, null, null);\n if (cursor.moveToFirst()) {\n String messageId = cursor.getString(0);\n presenter.getContext().getContentResolver().delete(Uri.parse(\"content://sms/\" + messageId), null, null);\n }\n }", "@Override\n\tpublic void delete(Unidade obj) {\n\n\t}", "public void delete(SmsAgendaGrupoPk pk) throws SmsAgendaGrupoDaoException;", "private void deleteMail(long position0){\n\t\tint position = (int) position0;\n\n\t\tArrayList<String> messages_to_delete = new ArrayList<String>();\n\t\tmessages_to_delete.clear(); //TESTING\n\t\tmessages_to_delete.add(Integer.toString(messages_array.get(position).id));\n\t\tString str = Integer.toString(messages_array.get(position).id);\n\t\tcounter2++;\n\t\tLog.d(\"ID is at:\", str);\n\t\tInbox inb = new Inbox();\n\n\t\tString request = inb.TrashMessages(2, selectedAccount.sessionID, messages_to_delete);\n\n Log.d(\"SelectMessage.DeleteMail\", \"Request String\"+request);\n\t\tServerRequest sRequest = new ServerRequest(selectedAccount.server, Inbox.url, request);\n\t\tAsyncServer s = new AsyncServer();\n\t\t//s.addListener(this);\n\t\ttry {\n\t\t\ts.execute(sRequest);\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "int deleteByExample(TSubjectInfoExample example);", "public void delete(MainItemOrdered mainItemOrdered);", "@Override\n public int delete( J34SiscomexOrigemDi j34SiscomexOrigemDi ) {\n return super.doDelete(j34SiscomexOrigemDi);\n }", "public void borrarTodosTripulantes();", "@Override\n\tpublic void delete(long orderId) {\n\t\t\n\t}", "@Override\r\n\tpublic void delete(Player t) {\n\r\n\t}", "@Override\n\tpublic void delete(long memberId) {\n\t\t\n\t}" ]
[ "0.7009996", "0.6820593", "0.6811978", "0.67498547", "0.66499454", "0.66108567", "0.6604867", "0.659847", "0.65966815", "0.6588967", "0.65679103", "0.6548853", "0.6529134", "0.6455464", "0.64542824", "0.6421359", "0.6417027", "0.63890475", "0.63870746", "0.6371986", "0.6371986", "0.637031", "0.63662064", "0.63658154", "0.6353363", "0.6341628", "0.6339289", "0.63390744", "0.63390744", "0.63311136", "0.6322536", "0.6311442", "0.63075095", "0.62973", "0.62953126", "0.62757254", "0.62552565", "0.62547237", "0.6249184", "0.6242259", "0.62303704", "0.6230304", "0.6229832", "0.6221797", "0.6213411", "0.62125564", "0.62109625", "0.62108284", "0.6199495", "0.61950284", "0.619458", "0.6185131", "0.61844206", "0.61745125", "0.61730886", "0.61608666", "0.6155578", "0.6147811", "0.6146537", "0.61456543", "0.61377823", "0.6127588", "0.6127233", "0.61248404", "0.6124795", "0.61213064", "0.61115885", "0.6109582", "0.610545", "0.61038387", "0.6100902", "0.60957086", "0.6093057", "0.6090577", "0.60896456", "0.6087026", "0.60869074", "0.60802007", "0.6075111", "0.607036", "0.6063539", "0.60618746", "0.60609484", "0.60564107", "0.60531086", "0.6050546", "0.6045388", "0.6045199", "0.604174", "0.6038803", "0.6037352", "0.6035238", "0.60312533", "0.6030991", "0.6029575", "0.6028891", "0.602862", "0.60282904", "0.6018832", "0.60069805" ]
0.6685147
4
/ todo delete for sender / todo delete for reciver
private void delete_message_reciver(final int position, final MessageHolder messageHolder){ Mprogress.setTitle("Wait for a moment ..."); Mprogress.setMessage("Please wait for delete message"); Mprogress.setCanceledOnTouchOutside(false); Mprogress.show(); DatabaseReference MessageRoot = FirebaseDatabase.getInstance().getReference(); MessageRoot.child("Message").child(userMessageListModals.get(position).getTo()) .child(userMessageListModals.get(position).getFrom()) .child(userMessageListModals.get(position).getMessage_Id()) .removeValue() .addOnCompleteListener(new OnCompleteListener<Void>() { @Override public void onComplete(@NonNull Task<Void> task) { if(task.isSuccessful()){ userMessageListModals.remove(position); notifyDataSetChanged(); Mprogress.dismiss(); } else { Toast.makeText(messageHolder.context, task.getException().getMessage(), Toast.LENGTH_SHORT).show(); Mprogress.dismiss(); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void delete(int msg);", "@Override\n\tpublic void delete(BatimentoCardiaco t) {\n\t\t\n\t}", "public void deleteReply() {\n\r\n\t}", "@Override\n\tpublic void delete(CorsoDiLaurea corso) {\n\t\t\n\t}", "@Override\n\tpublic void delete(Pedido arg0) {\n\n\t}", "@Override\n\tpublic void delete(Note e) {\n\t\t\n\t}", "public void delete(int singerId);", "@FXML\n\tprivate void deleteSelected(ActionEvent event) {\n\t\tint selectedIndex = taskList.getSelectionModel().getSelectedIndex();\n\t\tString task = taskList.getItems().get(selectedIndex);\n\t\ttaskList.getSelectionModel().clearSelection();\n\t\ttaskList.getItems().remove(task);\n\t\tchatView.setText(\"\");\n\t\ttaskList.getItems().removeAll();\n\t\tString task_split[] = task.split(\" \", 2);\n\t\tString removeTask = task_split[1];\n\t\tif (task.contains(\"due by\")) {\n\t\t\tString[] taskDate = task_split[1].split(\"\\\\s+\");\n\t\t\tSystem.out.println(taskDate);\n\t\t\tString end = taskDate[taskDate.length - 3];\n\t\t\tSystem.out.println(end);\n\t\t\tremoveTask = task_split[1].substring(0, task_split[1].indexOf(end)).trim();\n\t\t\tSystem.out.println(removeTask);\n\n\t\t}\n\t\tclient.removeTask(removeTask.replace(\"\\n\", \"\"));\n\t}", "@Override\n\tpublic Integer delete(ReplyDTO dto) {\n\t\treturn mapper.delete(dto);\n\t}", "private void deleteByCustomUserAndTypeAndTargetId(CustomUser customUserReceiver, int type,\n Long targetId) {\n Long requestNotiId = this.notificationRepository\n .deleteByCustomUserAndTypeAndTargetId(customUserReceiver, type, targetId);\n if (requestNotiId.compareTo(0L) > 0) {\n this.log.debug(\"Delete notification {} successfully\", requestNotiId);\n }\n }", "private void delete_message_sender(final int position, final MessageHolder messageHolder){\r\n\r\n Mprogress.setTitle(\"Wait for a moment ...\");\r\n Mprogress.setMessage(\"Please wait for delete message\");\r\n Mprogress.setCanceledOnTouchOutside(false);\r\n Mprogress.show();\r\n\r\n DatabaseReference MessageRoot = FirebaseDatabase.getInstance().getReference();\r\n MessageRoot.child(\"Message\").child(userMessageListModals.get(position).getFrom())\r\n .child(userMessageListModals.get(position).getTo())\r\n .child(userMessageListModals.get(position).getMessage_Id())\r\n .removeValue()\r\n .addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n if(task.isSuccessful()){\r\n userMessageListModals.remove(position);\r\n notifyDataSetChanged();\r\n Mprogress.dismiss();\r\n }\r\n else {\r\n Toast.makeText(messageHolder.context, task.getException().getMessage(), Toast.LENGTH_LONG).show();\r\n Mprogress.dismiss();\r\n }\r\n }\r\n });\r\n\r\n\r\n }", "public boolean delete(Reminder reminder);", "@Override\n\tpublic void delete(CelPhone celphone) {\n\t\t\n\t}", "@Override\n\tpublic void delete(Phone phone) {\n\t\t\n\t}", "@Override\n\tpublic void delete(Phone phone) {\n\t\t\n\t}", "public void deleteChatRoom(ChatRoom cr);", "int deleteByExample(TbMessageExample example);", "@Override\n\tpublic void onDeletionNotice(long directMessageId, long userId) {\n\n\t}", "private void deleteTodoMenu(User u) {\n\t\t\n\t}", "private void handleDeletePressed() {\n if (mCtx == Context.CREATE) {\n finish();\n return;\n }\n\n DialogFactory.deletion(this, getString(R.string.dialog_note), () -> {\n QueryService.awaitInstance(service -> deleteNote(service, mNote.id()));\n }).show();\n }", "@RequestMapping(value = \"/mensajes/deleteDestino/{destino}\", method = RequestMethod.DELETE)\n\tpublic ResponseEntity<Void> deleteByDestino(@PathVariable String destino){\n\t\tList<Mensaje> mensajeBorrar = chatDAO.findByDestino(destino);\n\t\tchatDAO.deleteAll(mensajeBorrar);\n\t\treturn new ResponseEntity<Void>(HttpStatus.OK);\n\t}", "boolean notifyDelete(InetAddress address, ContentEntry recording);", "void delete(String receiptHandle);", "@Override\r\n\tpublic void delete(FollowUp followup) {\n\t\t\r\n\t}", "public void deleteMessage(Integer tid, int rank);", "private void delete() {\n\n\t}", "@Override\n\tpublic void deleteItem(Object toDelete) {}", "@RequestMapping(value = \"/mensajes/deleteByIdAndDestino/{id}/{destino}\", method = RequestMethod.DELETE)\n\t\tpublic ResponseEntity<Void> deleteByIdAndDestino(@PathVariable int id, @PathVariable String destino){\n\t\t\tMensaje mensajeBorrar = chatDAO.findById(id);\n\t\t\tchatDAO.delete(mensajeBorrar);\n\t\t\treturn new ResponseEntity<Void>(HttpStatus.OK);\n\t\t}", "@Override\n\tpublic void delete(Client obj) {\n\t\t\n\t}", "void onDelete();", "public void deleteTask(Integer tid);", "@Override\n\tpublic void onDeleteTas(Tas tas) {\n\t\t\n\t}", "@Override\r\n\tpublic void delete(int eno) {\n\r\n\t}", "@Override\n\tpublic void delete(GalaxyNote galaxynote) {\n\t\t\n\t}", "@Override\n public void deleteTodo(final int position) {\n new AlertDialog.Builder(this)\n .setIcon(R.drawable.ic_warning_red_24dp)\n .setTitle(R.string.delete_todo_title)\n .setMessage(getString(R.string.delete_body_message)\n + todos.get(position).getTitle() + \"'\")\n .setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n todos.remove(position);\n Toast.makeText(MainActivity.this, \"Deleted\", Toast.LENGTH_SHORT).show();\n adapter.notifyDataSetChanged();\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n }).show();\n }", "int deleteByExample(TbComEqpModelExample example);", "private void delete(ActionEvent e){\r\n if (client != null){\r\n ConfirmBox.display(\"Confirm Deletion\", \"Are you sure you want to delete this entry?\");\r\n if (ConfirmBox.response){\r\n Client.deleteClient(client);\r\n AlertBox.display(\"Delete Client\", \"Client Deleted Successfully\");\r\n // Refresh view\r\n refresh();\r\n \r\n }\r\n }\r\n }", "public void borrarTodosTripulantes();", "public void delete(Personne Send ,Personne Receive) throws SQLException {\n\t\t\tString req = \"DELETE FROM DemandeAmis WHERE Pers_Demande = ? \"\n\t\t\t\t\t+ \"AND Pers_Receive =?\";\n\t\t\tPreparedStatement ps = DBConfig.getInstance().getConn().prepareStatement(req);\n\t\t\tps.setString(1, Send.getNomComptePers());\n\t\t\tps.setString(2, Receive.getNomComptePers());\n\t\t\tps.executeUpdate();\n\t\t}", "private Delete() {}", "private Delete() {}", "public void removerTodos() {\n\t\t\n\t}", "public Order delete(Order order);", "@Override\r\n\tpublic void k_delete(String MF_NO) {\n\t\t\r\n\t}", "@Override\r\n public int delete(Uri uri, String ignored1, String[] ignored2){\r\n int count = db.delete(\r\n DATABASE_TABLE,\r\n COLUMN_TASKID+\"=?\",\r\n new String[]{Long.toString(ContentUris.parseId(uri))}\r\n );\r\n\r\n if(count>0)\r\n getContext().getContentResolver().notifyChange(uri, null);\r\n\r\n return count;\r\n }", "int deleteByPrimaryKey(Integer massageId);", "private void delete_message_everyone(final int position, final MessageHolder messageHolder){\r\n\r\n Mprogress.setTitle(\"Wait for a moment ...\");\r\n Mprogress.setMessage(\"Please wait for delete message\");\r\n Mprogress.setCanceledOnTouchOutside(false);\r\n Mprogress.show();\r\n\r\n DatabaseReference MessageRoot = FirebaseDatabase.getInstance().getReference();\r\n MessageRoot.child(\"Message\").child(userMessageListModals.get(position).getTo())\r\n .child(userMessageListModals.get(position).getFrom())\r\n .child(userMessageListModals.get(position).getMessage_Id())\r\n .removeValue()\r\n .addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n if(task.isSuccessful()){\r\n MessageRoot.child(\"Message\").child(userMessageListModals.get(position).getFrom())\r\n .child(userMessageListModals.get(position).getTo())\r\n .child(userMessageListModals.get(position).getMessage_Id())\r\n .removeValue()\r\n .addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n\r\n if(task.isSuccessful()){\r\n /// todo finial task\r\n userMessageListModals.remove(position);\r\n notifyDataSetChanged();\r\n Mprogress.dismiss();\r\n }\r\n else {\r\n Toast.makeText(messageHolder.context, task.getException().getMessage(), Toast.LENGTH_SHORT).show();\r\n\r\n Mprogress.dismiss();\r\n }\r\n\r\n }\r\n });\r\n }\r\n else {\r\n Toast.makeText(messageHolder.context,task.getException().getMessage(), Toast.LENGTH_LONG).show();\r\n Mprogress.dismiss();\r\n }\r\n }\r\n });\r\n }", "@DELETE\n\t@Produces(\"text/plain\")\n\tpublic String onDelete() {\n\t\tmsg = null;\n\t\treturn \"Message deleted.\\n\";\n\t}", "@Override\n\tpublic void deleteCreator(CreatorDTO creator) {\n\t\t\n\t}", "@Override\n\tpublic void delete(Pessoa arg0) {\n\t\t\n\t}", "@Override\r\n\tpublic int delete(ActionContext arg0) throws Exception {\n\t\treturn 0;\r\n\t}", "public void deleteAlarm(String content) {\n TodoItem item = mydb.getEntry(content);\r\n\r\n Intent intent = new Intent(toSend);\r\n intent.setClass(this, AlarmReciver.class);\r\n intent.putExtra(\"what\", content);\r\n PendingIntent sender = PendingIntent.getBroadcast(\r\n MyService.this, mydb.searchID(content)*998 + item.getToDoYear()*3 + item.getToDoHour()*6 + item.getToDoMonth()*2 + item.getToDoDay()*86, intent, 0);\r\n\r\n Log.i(\"---delete alarm\",content);\r\n // And cancel the alarm.\r\n AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE);\r\n am.cancel(sender);\r\n }", "public void delete() {\n\n\t}", "@Override\n\tpublic String deleteMsg(long id,CustomerUser user) throws Exception {\n\t\tCustomerMessage entity = msgDao.queryById(id);\n\t\tmsgDao.delete(entity);\n\t\treturn \"success\";\n\t}", "public void onReceive(final String delId) {\n //Toast.makeText(getApplicationContext(),\"onReceive\",Toast.LENGTH_LONG).show();\n\n String action = getIntent().getAction();\n if(\"Delete\".equals(action)) {// to execute delete option\n //Toast.makeText(getApplicationContext(), \"Delete\", Toast.LENGTH_LONG).show();\n gHelper = new DbHelperGoal(this.getBaseContext());\n dataBase = gHelper.getWritableDatabase();\n Cursor mCursor = dataBase.rawQuery(\"SELECT * FROM \"+ DbHelperGoal.TABLE_NAME + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + delId, null);\n if (mCursor.moveToFirst()) {\n do{\n keyIndex = Integer.valueOf(delId);\n final String delGoal = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.GOAL_TITLE)), delAmount = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.CURRENCY)) + \" \" + mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.AMOUNT));\n final String delDate = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.DAY)) + \"-\" + monStr.get(mCursor.getInt(mCursor.getColumnIndex(DbHelperGoal.MONTH)) - 1) + \"-\" + mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.YEAR));\n build = new AlertDialog.Builder(GoalDisActivity.this);\n build.setTitle(\"Delete \" + delGoal + \" \" + delDate + \"of amount \" + delAmount);\n build.setMessage(\"Do you want to delete ?\");\n build.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), delGoal + \" \" + delDate + \" of amount \" + delAmount + \" \" + \" is deleted.\", Toast.LENGTH_LONG).show();\n dataBase.delete(DbHelperGoal.TABLE_NAME, DbHelperGoal.KEY_ID + \"=\" + keyIndex, null);\n myGoalNotifyMgr = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n myGoalNotifyMgr.cancel(keyIndex);\n displayData();\n dialog.cancel();\n }\n });\n build.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n //AlertDialog alert = build.create();\n alert = build.create();\n alert.show();\n }while (mCursor.moveToNext());\n }else{\n build = new AlertDialog.Builder(GoalDisActivity.this);\n build.setMessage(\"Sorry, the data might have been moved or deleted.\");\n build.setNegativeButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n alert = build.create();\n alert.show();\n }\n } else if(\"Pay\".equals(action)){\n //Toast.makeText(getApplicationContext(), \"Contribute\", Toast.LENGTH_LONG).show();\n //onContribute(delId);\n LayoutInflater li = LayoutInflater.from(GoalDisActivity.this);\n View promptsPaymentView = li.inflate(R.layout.payment_layout, null);\n build = new AlertDialog.Builder(GoalDisActivity.this);\n build.setTitle(\"Payment\");\n build.setMessage(\"Please Enter payment amount\");\n build.setView(promptsPaymentView);\n PayValue = (EditText) promptsPaymentView.findViewById(R.id.PaymentEnter1);\n //PayValue.isFocused();\n PayValue.setFocusableInTouchMode(true);\n PayValue.setFocusable(true);\n PayValue.requestFocus();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.showSoftInput(PayValue, InputMethodManager.SHOW_IMPLICIT);\n build.setPositiveButton(\"Ok\",new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n check = 0; val = 0;\n moneyValue = \"0\"; dbExpAmount = \"0\";\n\n dataBase = gHelper.getWritableDatabase();\n Cursor mCursor = dataBase.rawQuery(\"SELECT * FROM \"+ DbHelperGoal.TABLE_NAME+\" WHERE \"+DbHelperGoal.KEY_ID+\" = \"+ delId , null);\n if (mCursor.moveToFirst()) {\n do {\n moneyValue = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.ALT_PAYMENT));\n dbExpAmount = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.AMOUNT));\n check = mCursor.getFloat(mCursor.getColumnIndex(DbHelperGoal.ALT_EXPENSE));\n } while (mCursor.moveToNext());\n Toast.makeText(getApplication(), \"Money Paid:\" + moneyValue, Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(getApplication(), \"Money not Paid:\" + delId, Toast.LENGTH_LONG).show();\n }\n val = Float.valueOf(PayValue.getText().toString())+ Float.valueOf(moneyValue);\n if(val-check <= Float.valueOf(dbExpAmount) && val-check >= 0) {// within the Target Amount\n String strSQL = \"UPDATE \" + DbHelperGoal.TABLE_NAME + \" SET \" + DbHelperGoal.ALT_PAYMENT + \"=\" + String.valueOf(val) + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + delId;\n dataBase.execSQL(strSQL);\n ContentValues values = new ContentValues();\n values.put(DbHelperGoal.ALT_PAYMENT, String.valueOf(val));\n Toast.makeText(getApplication(), PayValue.getText().toString() + \" added\", Toast.LENGTH_SHORT).show();\n //PayValue.setText(\"\");\n myGoalNotifyMgr = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n myGoalNotifyMgr.cancel(keyIndex);\n displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }else if(val-check > Float.valueOf(dbExpAmount) && val-check >= 0){// if client collects extra amount for that goal, the Target amount extends\n build2 = new AlertDialog.Builder(GoalDisActivity.this);\n build2.setTitle(\"Confirmation\");\n build2.setMessage(\"The Payment Amount is exceeding the Target Amount. Do you want to increment the Target amount to the new value?\");\n build2.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n String strSQL = \"UPDATE \" + DbHelperGoal.TABLE_NAME + \" SET \" + DbHelperGoal.AMOUNT + \"=\" + String.valueOf(val - check) + \",\" + DbHelperGoal.ALT_PAYMENT + \"=\" + String.valueOf(val) + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + delId;\n dataBase.execSQL(strSQL);\n Toast.makeText(getApplication(), PayValue.getText().toString(), Toast.LENGTH_SHORT).show();\n //PayValue.setText(\"\");\n myGoalNotifyMgr = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n myGoalNotifyMgr.cancel(keyIndex);\n displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n build2.setNeutralButton(\"No, only Savings\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n String strSQL = \"UPDATE \" + DbHelperGoal.TABLE_NAME + \" SET \" + DbHelperGoal.ALT_PAYMENT + \"=\" + String.valueOf(val) + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + delId;\n dataBase.execSQL(strSQL);\n Toast.makeText(getApplication(), PayValue.getText().toString(), Toast.LENGTH_SHORT).show();\n //PayValue.setText(\"\");\n myGoalNotifyMgr = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n myGoalNotifyMgr.cancel(keyIndex);\n displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n\n build2.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplication(), \"Payment Cancelled\", Toast.LENGTH_SHORT).show();\n //displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n\n alert2 = build2.create();\n alert2.show();\n alert2.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n\n }else{\n Toast.makeText(getApplication(),\"Sorry, the amount is beyond the Target Amount\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n build.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplication(), \"Payment Cancelled\", Toast.LENGTH_SHORT).show();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n alert = build.create();\n alert.show();\n alert.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n } else if(\"Extend\".equals(action)) {\n Toast.makeText(getApplicationContext(), \"Extend\", Toast.LENGTH_LONG).show();\n onUpdate(delId);\n }\n }", "int deleteByExample(PrivateMessageExample example);", "public static void deletedCommand(Task t) {\n UI.line();\n System.out.println(\"\\tNoted. I've removed this Task:\");\n System.out.println(\"\\t\" + t.toString());\n int count = 0;\n for (Object ignored : Tasks) {\n count++;\n }\n System.out.println(\"\\tNow you have \" + count + \" tasks in the list.\");\n UI.line();\n }", "public void delete(MainItemOrdered mainItemOrdered);", "@Override\n\tpublic void delete(ComplitedOrderInfo arg0) {\n\t\t\n\t}", "@Override\r\n\tpublic void excluir(Telefone vo) throws Exception {\n\t\t\r\n\t}", "private void deleteNoteOnFirebaseManager(Note note){\n firebase.deleteNoteOnDB(note, unused -> {\n Toast.makeText(this, R.string.note_deletion_success, Toast.LENGTH_LONG).show();\n finish();\n }, e -> {\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n });\n }", "public Integer DeletarTodos(){\n\n //REMOVENDO OS REGISTROS CADASTRADOS\n return databaseUtil.GetConexaoDataBase().delete(\"tb_log\",\"log_ID = log_ID\",null);\n\n }", "public void delete(){\r\n\r\n }", "@Override\r\n\tpublic String delete() {\n\t\treturn \"delete\";\r\n\t}", "public void delete(Context ctx){\n\t\t\tChildInteraction cDb = new ChildInteraction(ctx);\t// for writing to the db\n\t\t\tfor(String key : numbers.keySet())\t\t\t\t\t// for all the numbers\n\t\t\t\tcDb.DeleteChild(key, text);\t\t\t\t\t\t// delete the entry in the db\n\t\t\tcMessages.remove(this);\t\t\t\t\t\t\t\t// remove this from cMessages\n\t\t\tcDb.Cleanup();\t\t\t\t\t\t\t\t\t\t// cleanup\n\t\t}", "@Override\n\tpublic void delete(long orderId) {\n\t\t\n\t}", "@Override\n\tpublic Item delete() {\n\t\treadAll();\n\t\tLOGGER.info(\"\\n\");\n\t\t//user can select either to delete a customer from system with either their id or name\n\t\tLOGGER.info(\"Do you want to delete record by Item ID\");\n\t\tlong id = util.getLong();\n\t\titemDAO.deleteById(id);\n\t\t\t\t\n\t\t\t\t\n\t\treturn null;\n\t}", "@Override\n\tpublic void delete(Iphone iphone) {\n\t\t\n\t}", "public void delete(T ob) throws ToDoListException;", "@Override\r\n\tpublic void delete(Usuario t) {\n\t\t\r\n\t}", "@Override\n\tpublic void onDeleteRoomDone(RoomEvent arg0) {\n\t\t\n\t}", "MessageResource deleteMensaje(Integer mensID) throws NoPermissionException;", "public int delete(o dto);", "@Override\n\tpublic int delete(Utente input) throws Exception {\n\t\treturn 0;\n\t}", "public void delete() {\n\n }", "void deleteButton_actionPerformed(ActionEvent e) {\n doDelete();\n }", "int deleteByExample(SmsCleanBagLineExample example);", "@Override\n\tpublic void delete(Integer transactionId) {\n\n\t}", "@Override\n\tpublic void delete(Object entidade) {\n\t\t\n\t}", "private static boolean deleteOrMarkDeleted(SQLiteDatabase db, boolean doDelete, long topicId,\n int fromId, int toId, List<Integer> list, boolean markAsHard) {\n int affected = 0;\n db.beginTransaction();\n String messageSelector;\n if (list != null) {\n StringBuilder sb = new StringBuilder();\n for (int i : list) {\n sb.append(\",\");\n sb.append(i);\n }\n sb.deleteCharAt(0);\n messageSelector = COLUMN_NAME_SEQ + \" IN (\" + sb.toString() + \")\";\n } else {\n ArrayList<String> parts = new ArrayList<>();\n if (fromId > 0) {\n parts.add(COLUMN_NAME_SEQ + \">=\" + fromId);\n }\n if (toId != -1) {\n parts.add(COLUMN_NAME_SEQ + \"<\" + toId);\n }\n messageSelector = TextUtils.join(\" AND \", parts);\n }\n\n if (!TextUtils.isEmpty(messageSelector)) {\n messageSelector = \" AND \" + messageSelector;\n }\n\n try {\n if (!doDelete) {\n // Mark sent messages as deleted\n ContentValues values = new ContentValues();\n values.put(COLUMN_NAME_STATUS, markAsHard ? BaseDb.STATUS_DELETED_HARD : BaseDb.STATUS_DELETED_SOFT);\n affected = db.update(TABLE_NAME, values, COLUMN_NAME_TOPIC_ID + \"=\" + topicId +\n messageSelector +\n \" AND \" + COLUMN_NAME_STATUS + \"=\" + BaseDb.STATUS_SYNCED, null);\n }\n // Unsent messages are deleted.\n affected += db.delete(TABLE_NAME, COLUMN_NAME_TOPIC_ID + \"=\" + topicId +\n messageSelector +\n // Either delete all messages or just unsent+draft messages.\n (doDelete ? \"\" : \" AND \" + COLUMN_NAME_STATUS + \"<=\" + BaseDb.STATUS_QUEUED), null);\n db.setTransactionSuccessful();\n } catch (SQLException ex) {\n Log.d(TAG, \"Delete failed\", ex);\n } finally {\n db.endTransaction();\n }\n return affected > 0;\n }", "@Override\n public void delete(Usuario usuario) {\n }", "@FXML public void deleteBT_handler(ActionEvent e) {\n\t\tif(list.getSelectionModel().getSelectedIndex() == -1) {\n\t\t\tAlert error = new Alert(AlertType.ERROR, \"Nothing Selected.\\nPlease select correctly or add new User\", ButtonType.OK);\n\t error.showAndWait();\n\t\t}\n\t\telse {\n\t\t\tAlert warning = new Alert(AlertType.WARNING,\"Delete this User from list?\", ButtonType.YES, ButtonType.NO);\n\t warning.showAndWait();\n\t if(warning.getResult() == ButtonType.NO){\n\t return;\n\t }\n\t\n\t int idx = list.getSelectionModel().getSelectedIndex();\n\t if(list.getSelectionModel().getSelectedItem().getUserName().equals(\"stock\")) {\n\t \tAlert error = new Alert(AlertType.ERROR, \"You can't delete stock username\", ButtonType.OK);\n\t error.showAndWait();\n\t \treturn;\n\t }\n\t obs.remove(idx);\n\t mgUsr.arrList.remove(idx);\n\t\t}\n\t}", "@Override\n\tpublic void delete(String arg0) {\n\t\t\n\t}", "public void deleteTask() {\r\n int selected = list.getSelectedIndex();\r\n if (selected >= 0) {\r\n Task task = myTodo.getTaskByIndex(selected + 1);\r\n myTodo.getTodo().remove(task.getHashKey());\r\n playSound(\"click.wav\");\r\n }\r\n todoListGui();\r\n }", "@Override\n\tpublic boolean eliminarTodos() {\n\t\treturn false;\n\t}", "static void delete(User user, String content, MessageChannel chan) {\n if(!content.equalsIgnoreCase(\"!delete\"))\n return;\n\n // TODO: migrate pairs to some kind of model type\n Pair<Long, Long> requestIdPair = new ImmutablePair<>(chan.getIdLong(), user.getIdLong());\n Pair<Long, Long> messageIdPair = postController.getLastRequestResponseByUser().get(requestIdPair);\n if(messageIdPair != null) {\n chan.deleteMessageById(messageIdPair.getLeft()).queue(\n aVoid -> {\n chan.deleteMessageById(messageIdPair.getRight()).queue(); // don't care whether this fails\n chan.sendMessage(\"S-sorry!\").queue();\n },\n throwable -> chan.sendMessage(\"I can't seem to find what your latest request here was... maybe it's already gone?\").queue());\n }\n else {\n chan.sendMessage(\"I don't remember what your latest request here was, I apologize!\").queue();\n }\n }", "public void targetDeleted(long tid) throws RemoteException {\n\n\t\tlogger.create().block(\"targetDeleted\").info().level(1).msg(\n\t\t\t\t\"Adding deleteTarget request to update queue for tid: \" + tid).send();\n\n\t}", "void delete(UnsubscribeRequest request);", "@Override\n\tpublic boolean delete(int rno) {\n\t\treturn replyMapper.delete(rno)>0?true:false;\n\t}", "protected abstract void doDelete();", "private void deleteMail(long position0){\n\t\tint position = (int) position0;\n\n\t\tArrayList<String> messages_to_delete = new ArrayList<String>();\n\t\tmessages_to_delete.clear(); //TESTING\n\t\tmessages_to_delete.add(Integer.toString(messages_array.get(position).id));\n\t\tString str = Integer.toString(messages_array.get(position).id);\n\t\tcounter2++;\n\t\tLog.d(\"ID is at:\", str);\n\t\tInbox inb = new Inbox();\n\n\t\tString request = inb.TrashMessages(2, selectedAccount.sessionID, messages_to_delete);\n\n Log.d(\"SelectMessage.DeleteMail\", \"Request String\"+request);\n\t\tServerRequest sRequest = new ServerRequest(selectedAccount.server, Inbox.url, request);\n\t\tAsyncServer s = new AsyncServer();\n\t\t//s.addListener(this);\n\t\ttry {\n\t\t\ts.execute(sRequest);\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@FXML\n\tpublic void deleteUser(ActionEvent e) {\n\t\tint i = userListView.getSelectionModel().getSelectedIndex();\n//\t\tUser deletMe = userListView.getSelectionModel().getSelectedItem();\n//\t\tuserList.remove(deletMe); this would work too just put the admin warning\n\t\tdeleteUser(i);\n\t}", "@Override\n\tprotected List<Message> validateDelete(Long id) {\n\t\treturn null;\n\t}", "@Delete\n Single<Integer> delete(Motivator motivator);", "@Override\n\tpublic void delete() {\n\n\t}", "public void eliminarMensaje(InfoMensaje m) throws Exception;", "@Override\n\tpublic void delete(Translator entity) {\n\t\t\n\t}", "public void delete()\n {\n call(\"Delete\");\n }", "@Delete\n void delete(Task... task);", "public int delete(Uri uri, String selection, String[] selectionArgs) \n\t{\n\t\tint retVal = 0;\n\t\t\n\t\tif(selection.equals(delete_all)) // delete all in DHT\n\t\t{\n\t\t \tretVal = sqliteDB.delete(tableName, null, null);\n\t\t \t\n\t\t \tMessage.sendMessage(MessageType.GDelReqMessage,delete_all,myAVDnum,null,chord.mysucc.portNum);\n\t\t \t\n\t\t \tsynchronized (_GDel_Lock) \n\t\t \t{\n\t\t \t\ttry\n\t\t \t\t{\n\t\t \t\t\t_GDel_Lock.wait();\n\t\t \t\t}\n\t\t \t\tcatch(InterruptedException iex)\n\t\t \t\t{\n\t\t \t\t\tiex.printStackTrace();\n\t\t \t\t}\n\t\t \t\tretVal = _GDel_Lock.rows_affected;\n\t\t \t\tLog.d(\"window_shopper\",\"All peers have deleted\");\n\t\t\t}\n\t\t}\n\t\telse if(selection.equals(delete_mine)) // delete all of mine\n\t\t{\n\t \tretVal = sqliteDB.delete(tableName,null, null);\n\t\t}\n\t\telse // delete_particular\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t * find owner of key\n\t\t\t\t */\n\t\t\t\tLog.v(\"window_shopper\",\"deleting::\"+selection);\n\t\t\t\tString queryArgs[]={selection};\n\t\t\t\tString hashedKey = ChordMaster.genHash(selection);\n\t\t\t\tnode owner = chord.getOwner(hashedKey);\n\t\t\t\t\n\t\t\t\tif(owner.avdNum.equals(myAVDnum)) // i am owner\n\t\t\t\t{\n\t\t\t\t\tretVal = sqliteDB.delete(tableName,\"key=?\",queryArgs);\n\t\t\t\t\t// need to delete replications as well\n\t\t\t\t\tMessage.sendMessage(MessageType.objectDelReplicaMessage,delete_particular,myAVDnum,selection,chord.mysucc.portNum);\n\t\t\t\t}\n\t\t\t\telse // i am not the owner\n\t\t\t\t\tMessage.sendMessage(MessageType.objectDelReqMessage,delete_particular,myAVDnum,selection,owner.portNum);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tsynchronized (_delObj_Lock)\n\t\t\t\t{\n\t\t\t\t\ttry\n \t\t\t\t{\n \t\t\t\t\tLog.v(\"window_shopper\",\"Waiting for del operations to complete!\");\n \t\t\t\t\t_delObj_Lock.wait();\n \t\t\t\t}\n \t\t\t\tcatch(InterruptedException iex)\n \t\t\t\t{\n \t\t\t\t\tiex.printStackTrace();\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tretVal = _delObj_Lock.rows_affected;\n \t\t\t\tif(retVal == OBJECT_DOES_NOT_EXIST)\n \t\t\t\t\tLog.v(\"window_shopper\",\"CANNOT DELETE OBJ DOES NOT EXIST\"+retVal); \t\t\t\t\t\n \t\t\t\telse\n \t\t\t\t\tLog.v(\"window_shopper\",\"The delete operation was successful\"+retVal);\n \t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tcatch(NoSuchAlgorithmException nex)\n\t\t\t{\n\t\t\t\tnex.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn retVal;\n\t}" ]
[ "0.6807264", "0.6674898", "0.66321635", "0.6539378", "0.64879817", "0.6477159", "0.6415725", "0.6382478", "0.6366548", "0.6362554", "0.6307629", "0.62969863", "0.62653", "0.62367606", "0.62367606", "0.6218708", "0.6218456", "0.6217758", "0.62045836", "0.62016875", "0.61982507", "0.61777794", "0.6170189", "0.61450475", "0.6136249", "0.61331356", "0.61241627", "0.6112669", "0.6110946", "0.6103691", "0.60962194", "0.60869116", "0.6085832", "0.6085007", "0.6083637", "0.6082723", "0.60791", "0.60788924", "0.607795", "0.60651016", "0.60651016", "0.6052383", "0.60441965", "0.60419023", "0.6032057", "0.6027417", "0.60260063", "0.60045964", "0.600231", "0.5997412", "0.59973246", "0.59947324", "0.599368", "0.5992248", "0.5991384", "0.59888184", "0.5972661", "0.597142", "0.5971208", "0.59611887", "0.5960641", "0.59600854", "0.59551954", "0.59545356", "0.5953555", "0.59363884", "0.59347", "0.5932883", "0.5930265", "0.59292376", "0.59275764", "0.59251475", "0.59215593", "0.59175164", "0.5913876", "0.59091663", "0.5895596", "0.58828795", "0.58794475", "0.5877587", "0.5877226", "0.58674717", "0.5867371", "0.586592", "0.5865067", "0.58650047", "0.5864896", "0.58603495", "0.58565056", "0.5847226", "0.5843188", "0.58425814", "0.58424973", "0.58419937", "0.58419526", "0.5838012", "0.58337575", "0.58330554", "0.5828896", "0.58281755" ]
0.6162058
23
/ todo delete for reciver / todo remove for everyone
private void delete_message_everyone(final int position, final MessageHolder messageHolder){ Mprogress.setTitle("Wait for a moment ..."); Mprogress.setMessage("Please wait for delete message"); Mprogress.setCanceledOnTouchOutside(false); Mprogress.show(); DatabaseReference MessageRoot = FirebaseDatabase.getInstance().getReference(); MessageRoot.child("Message").child(userMessageListModals.get(position).getTo()) .child(userMessageListModals.get(position).getFrom()) .child(userMessageListModals.get(position).getMessage_Id()) .removeValue() .addOnCompleteListener(new OnCompleteListener<Void>() { @Override public void onComplete(@NonNull Task<Void> task) { if(task.isSuccessful()){ MessageRoot.child("Message").child(userMessageListModals.get(position).getFrom()) .child(userMessageListModals.get(position).getTo()) .child(userMessageListModals.get(position).getMessage_Id()) .removeValue() .addOnCompleteListener(new OnCompleteListener<Void>() { @Override public void onComplete(@NonNull Task<Void> task) { if(task.isSuccessful()){ /// todo finial task userMessageListModals.remove(position); notifyDataSetChanged(); Mprogress.dismiss(); } else { Toast.makeText(messageHolder.context, task.getException().getMessage(), Toast.LENGTH_SHORT).show(); Mprogress.dismiss(); } } }); } else { Toast.makeText(messageHolder.context,task.getException().getMessage(), Toast.LENGTH_LONG).show(); Mprogress.dismiss(); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removerTodos() {\n\t\t\n\t}", "private void deleteTodoMenu(User u) {\n\t\t\n\t}", "public void removeByTodoId(long todoId);", "public boolean delete(Reminder reminder);", "private void delete() {\n\n\t}", "public void delete(T ob) throws ToDoListException;", "@Override\n\tpublic void delete(CorsoDiLaurea corso) {\n\t\t\n\t}", "private Delete() {}", "private Delete() {}", "public void borrarTodosTripulantes();", "@Override\n\tpublic boolean eliminarTodos() {\n\t\treturn false;\n\t}", "public void deleteTask(Integer tid);", "public Integer DeletarTodos(){\n\n //REMOVENDO OS REGISTROS CADASTRADOS\n return databaseUtil.GetConexaoDataBase().delete(\"tb_log\",\"log_ID = log_ID\",null);\n\n }", "@Override\n\tpublic void delete(Note e) {\n\t\t\n\t}", "public void delete(int singerId);", "public void delete() {\n\n\t}", "public void deleteParticipacao(Integer id) {\n participacaoRepository.deleteById(id);\n //listClient();\n \n}", "public abstract void delete(int msg);", "public void delete(){\r\n\r\n }", "protected abstract void doDelete();", "@Override\n\tpublic void delete(BatimentoCardiaco t) {\n\t\t\n\t}", "public boolean deleteAllOfUserAndNote(Integer idu, Integer idn);", "public Todo remove(long todoId) throws NoSuchTodoException;", "void deleteTask(int id);", "private void deleteNoteOnFirebaseManager(Note note){\n firebase.deleteNoteOnDB(note, unused -> {\n Toast.makeText(this, R.string.note_deletion_success, Toast.LENGTH_LONG).show();\n finish();\n }, e -> {\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n });\n }", "public void delete() {\n\n }", "@Override\r\n\tpublic void deletes(String did) {\n\t\tdao.deletes(did);\r\n\t}", "public void deleteTask() {\r\n int selected = list.getSelectedIndex();\r\n if (selected >= 0) {\r\n Task task = myTodo.getTaskByIndex(selected + 1);\r\n myTodo.getTodo().remove(task.getHashKey());\r\n playSound(\"click.wav\");\r\n }\r\n todoListGui();\r\n }", "public void delete();", "public void delete();", "public void delete();", "public void delete();", "public void delete();", "public void delete();", "public void deleteToDoList(Context context, ToDoList toDoList) {\n\n // delete from database\n ToDoListDbHelper toDoListDbHelper = new ToDoListDbHelper(context);\n toDoListDbHelper.delete(toDoList);\n\n // delete from list of lists\n toDoListList.remove(toDoList);\n }", "@Override\r\n\tpublic void delete(Usuario t) {\n\t\t\r\n\t}", "@FXML\n\tprivate void deleteSelected(ActionEvent event) {\n\t\tint selectedIndex = taskList.getSelectionModel().getSelectedIndex();\n\t\tString task = taskList.getItems().get(selectedIndex);\n\t\ttaskList.getSelectionModel().clearSelection();\n\t\ttaskList.getItems().remove(task);\n\t\tchatView.setText(\"\");\n\t\ttaskList.getItems().removeAll();\n\t\tString task_split[] = task.split(\" \", 2);\n\t\tString removeTask = task_split[1];\n\t\tif (task.contains(\"due by\")) {\n\t\t\tString[] taskDate = task_split[1].split(\"\\\\s+\");\n\t\t\tSystem.out.println(taskDate);\n\t\t\tString end = taskDate[taskDate.length - 3];\n\t\t\tSystem.out.println(end);\n\t\t\tremoveTask = task_split[1].substring(0, task_split[1].indexOf(end)).trim();\n\t\t\tSystem.out.println(removeTask);\n\n\t\t}\n\t\tclient.removeTask(removeTask.replace(\"\\n\", \"\"));\n\t}", "boolean deleteMyNote(MyNoteDto usernote);", "public static void deletedCommand(Task t) {\n UI.line();\n System.out.println(\"\\tNoted. I've removed this Task:\");\n System.out.println(\"\\t\" + t.toString());\n int count = 0;\n for (Object ignored : Tasks) {\n count++;\n }\n System.out.println(\"\\tNow you have \" + count + \" tasks in the list.\");\n UI.line();\n }", "@Override\r\n\tpublic void delete(int eno) {\n\r\n\t}", "private void deletion(String pids) {\n\t\tDeletions(pids);\n\t\t\n\t}", "@Delete\n void delete(Task... task);", "@Override\n\tpublic void delete(Pedido arg0) {\n\n\t}", "@Override\n\tpublic void delete(Integer deptno) {\n\t\t\n\t}", "public void MarkForDeletion();", "@Override\n\tpublic void delete(int id) {\n\t\t\n\t}", "@Override\n\tpublic void delete(int id) {\n\t\t\n\t}", "@Override\n\tpublic void delete(int id) {\n\t\t\n\t}", "@Override\n\tpublic void delete(int id) {\n\t\t\n\t}", "@Override\n\tpublic int delete(Utente input) throws Exception {\n\t\treturn 0;\n\t}", "private ArrayList<String> doDelete(){\n \t\tUserBean user = (UserBean) Util.loadDataFromLocate(this.getContext(), \"user\");\n \t\tString mobile = user.getPhone();\n \t\tString password = user.getPassword();\n \n \t\tjson = \"\";\n //\t\tString apiName = \"ad_delete\";\n \t\tArrayList<String> list = new ArrayList<String>();\n \t\tlist.add(\"mobile=\" + mobile);\n \t\tString password1 = Communication.getMD5(password);\n \t\tpassword1 += Communication.apiSecret;\n \t\tString userToken = Communication.getMD5(password1);\n \t\tlist.add(\"userToken=\" + userToken);\n \t\tlist.add(\"adId=\" + detail.getValueByKey(GoodsDetail.EDATAKEYS.EDATAKEYS_ID));\n \t\tlist.add(\"rt=1\");\n \t\t\n \t\treturn list;\t\t\n \t}", "@Override\r\n public void remove() {\n ArrayList<String>Lines=new ArrayList<>();\r\n String Path = \"/home/yara/Documents/4year/OODP/Task.txt\";\r\n \r\n String RID=id.getText();\r\n String Taskname = name.getText();\r\n String startDate = date_start.getText();\r\n String EndDate = date_finish.getText();\r\n String LocalStatus = status.getText();\r\n String MemberID = MemberId.getText();\r\n \r\n Lines.add(RID);\r\n Lines.add(Taskname);\r\n Lines.add(startDate);\r\n Lines.add(EndDate);\r\n Lines.add(LocalStatus);\r\n Lines.add(MemberID);\r\n \r\n FileFacade facade = new FileFacade();\r\n facade.remove(Path, Lines);\r\n \r\n }", "@Override\n\tpublic void delete(String id) {\n\t\t\n\t}", "@Override\n\tpublic void delete(String id) {\n\t\t\n\t}", "@Override\r\n\tpublic void delete(FollowUp followup) {\n\t\t\r\n\t}", "int deleteByExample(EpermissionDOExample example);", "@Override\n\tpublic void delete(GalaxyNote galaxynote) {\n\t\t\n\t}", "@Override\n public void delete(Usuario usuario) {\n }", "@Override\n\tpublic void delete(Phone phone) {\n\t\t\n\t}", "@Override\n\tpublic void delete(Phone phone) {\n\t\t\n\t}", "@Override\r\n\tpublic void delete(String id) {\n\r\n\t}", "@Override\n\tpublic void delete(String arg0) {\n\t\t\n\t}", "public void removeByTodoText(String todoText);", "public boolean delete(int userId);", "int deleteByExample(ChronicCheckExample example);", "public void deleteReply() {\n\r\n\t}", "void deleteTask(ReadOnlyTask target) throws UniqueTaskList.TaskNotFoundException;", "@Override\n public void delete(int id) {\n }", "@Override\n\tpublic void delete(int id) {\n\t}", "public void deleteChatRoom(ChatRoom cr);", "public void deleteTask(String item){\n SQLiteDatabase db = this.getWritableDatabase();\n db.execSQL(\"DELETE FROM ToDo where task='\"+item+\"'\");\n }", "@Override\n\tpublic void delete(Pessoa arg0) {\n\t\t\n\t}", "void delete(User user);", "void delete(User user);", "@Override\r\n\tpublic void delete(int id) {\n\t\t\r\n\t}", "public void delete(int id);", "int deleteByExample(TaskExample example);", "public void delete(MainItemOrdered mainItemOrdered);", "@Override\r\n\tpublic void delete(String id) {\n\t\t\r\n\t}", "@Override\n\tpublic void delete(String id) {\n\n\t}", "@Override\n\tpublic void delete() {\n\n\t}", "@DELETE\n @Path(\"/remove\")\n public void delete() {\n System.out.println(\"DELETE invoked\");\n }", "public void delUtente(int id);", "public void deleteToDo(View view) {\n View parent = (View) view.getParent();\n TextView taskTextView = (TextView) parent.findViewById(R.id.task_title);\n String task = String.valueOf(taskTextView.getText());\n SQLiteDatabase db = OpenDB.getWritableDatabase();\n db.delete(AccessData.ToDoEntry.table,\n AccessData.ToDoEntry.todo_title + \" = ?\",\n new String[]{task});\n db.close();\n updateUI();\n }", "private void discoverDelete(RoutingContext rctx) {\n rctx.response().end(new ObjectBuilder().build());\n }", "public void delete(User user)throws Exception;", "@Override\n\tpublic Item delete() {\n\t\treadAll();\n\t\tLOGGER.info(\"\\n\");\n\t\t//user can select either to delete a customer from system with either their id or name\n\t\tLOGGER.info(\"Do you want to delete record by Item ID\");\n\t\tlong id = util.getLong();\n\t\titemDAO.deleteById(id);\n\t\t\t\t\n\t\t\t\t\n\t\treturn null;\n\t}", "public static void delTask(ArrayList<Task> taskList) {\n // String response; // String variable for the user's input\n String prompt = \"delete\"; // initializing the type of prompt to the user\n int index = promptIndex(taskList, prompt); // prompting, receiving, and error checking the user's input\n if (index != -1) { // if there was not an invalid index value\n taskList.remove(index); // remove the element at this index\n }\n System.out.print(\"\\n\"); // printing a newline for formatting \n pause(); // pausing the screen\n }", "@Override\r\n\tpublic void del(Integer id) {\n\t\t\r\n\t}", "@Override\n\tpublic void delete(CelPhone celphone) {\n\t\t\n\t}", "public void delete(User usuario);", "public void removeByTodoInteger(int todoInteger);", "void delete(long idToDelete);", "public void removeTask(ToDoTask t) {\n database.removeTask(t);\n Toast.makeText(this, String.format(getResources().getString(R.string.list_remove_toast),\n t.getTask()), Toast.LENGTH_LONG).show();\n }", "public void delete()\n {\n call(\"Delete\");\n }", "public int delete(o dto);", "boolean deleteTask(Task task);", "@Exclude\n public abstract void delete();", "public void deleteTodo(Long todoId) {\n todoRepository.deleteById(todoId);\n }", "int deleteByExample(ComplainNoteDOExample example);", "@Override\n\tpublic void delete(long id) {\n\t\t\n\t}" ]
[ "0.72638535", "0.7049469", "0.6832296", "0.6747201", "0.67331016", "0.66863006", "0.66745394", "0.66560924", "0.66560924", "0.6652048", "0.6621522", "0.65678024", "0.65303063", "0.6497892", "0.64847064", "0.64766955", "0.6463279", "0.6455291", "0.6431725", "0.6415732", "0.64139116", "0.6411367", "0.63860756", "0.6371342", "0.6370647", "0.63696605", "0.63577867", "0.6348986", "0.63350093", "0.63350093", "0.63350093", "0.63350093", "0.63350093", "0.63350093", "0.6331245", "0.6330958", "0.6327805", "0.630731", "0.6250398", "0.62469786", "0.62469065", "0.6245684", "0.62454516", "0.62374616", "0.62369925", "0.6236576", "0.6236576", "0.6236576", "0.6236576", "0.62299776", "0.62198395", "0.62162787", "0.62103784", "0.62103784", "0.62071055", "0.6206583", "0.6203791", "0.620289", "0.6199635", "0.6199635", "0.6197045", "0.6194318", "0.61934143", "0.61919934", "0.6184066", "0.6183422", "0.61770254", "0.61767215", "0.6173446", "0.61712754", "0.6169749", "0.6166834", "0.6163569", "0.6163569", "0.6162831", "0.6161447", "0.6161401", "0.61510074", "0.6148698", "0.614725", "0.61456", "0.6138948", "0.6136834", "0.6134728", "0.6133529", "0.6132314", "0.6130608", "0.6129724", "0.61292005", "0.61289334", "0.61278814", "0.61239386", "0.610759", "0.61067593", "0.6104985", "0.61026156", "0.60955507", "0.6092981", "0.60923207", "0.6087399", "0.6086743" ]
0.0
-1
/ todo remove for everyone
@Override public int getItemCount() { return userMessageListModals.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void remove () {}", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "void remove();", "void remove();", "void remove();", "void remove();", "void remove();", "public void remove() {\r\n //\r\n }", "void remove(User user) throws AccessControlException;", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "Object remove();", "public void remove(){\n }", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n public void removeAddedBy(CsldUser toRemove) {\n }", "@Override\r\n\t\tpublic void remove() {\r\n\t\t\t// YOU DO NOT NEED TO WRITE THIS\r\n\t\t}", "public void remove() {\n\t }", "public void remove() {\n\t }", "public void remove() {\n\t }", "public void supprimerInaccessibles(){\n grammaireCleaner.nettoyNonAccGramm();\n setChanged();\n notifyObservers(\"3\");\n }", "public void remove() {\n\t}", "public void remove() {\n\t}", "public void remove() {\n\n }", "@Override\n\tpublic void remove() { }", "@Override\n\tpublic void removeUser(int id) {\n\t\t\n\t}", "public void remover(Usuario u) {\n listaUse.remove(u);\n\n }", "public void removerTodos() {\n\t\t\n\t}", "int removeUser(User user);", "@Override\n\t\t\t\tpublic void remove() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "@Override\n\tpublic void excluir() {\n\t\t\n\t}", "CratePrize removeEditingUser(Player player);", "private void remove() {\n disableButtons();\n clientgui.getClient().sendDeleteEntity(cen);\n cen = Entity.NONE;\n }", "@Override\n public void remove() {\n }", "@Override\n protected void remover(Funcionario funcionario) {\n\n }", "public void removeMotorista() {\n\t\tConector con = new Conector();\r\n\t\tString params[] = new String[2];\r\n\r\n\t\tparams[0] = \"op=8\";\r\n\t\tparams[1] = \"email=\" + usuario;\r\n\r\n\t\tcon.sendHTTP(params);\r\n\t}", "@Override\n public void remove(int no) throws Exception {\n \n }", "protected abstract void removeRequest ();", "public void remove(){\r\n // Does Nothing\r\n }", "public void removed() {\n }", "public final void remove () {\r\n }", "@Override\r\n\t\tpublic void remove() {\n\r\n\t\t}", "void removeFeature(FriendPresence friendPresence);", "void removeFromGame() {\n\t\t// remove from game\n\t\t//only for multi-player\n\t}", "@Override\n public void remove() {\n }", "public Object remove();", "void supprimerTopo(String user, Integer topoId);", "void remove(int id);", "public void removeUser(String username);", "void remove(String name) throws Exception;", "private void enviarRequisicaoRemover() {\n servidor.removerPalito(nomeJogador);\n atualizarPalitos();\n }", "public void removeFriendList(FriendList list);", "@Override\n\tpublic void eliminar() {\n\t\t\n\t}", "public static void Remover(ChatSkeleton user) {\n for (Grupo b : ListaOnline.getGrupos()) {\r\n for (Usuario u : b.getGrupo()) {\r\n if (u.equals(user.getUser())) {\r\n b.getGrupo().remove(user.getUser());\r\n }\r\n }\r\n }\r\n\r\n for (ChatSkeleton u : ListaOnline.getTodos()) {\r\n if (u.equals(user)) {\r\n ListaOnline.getTodos().remove(user);\r\n }\r\n }\r\n }", "@Override\r\n\t\t\tpublic void eliminar() {\n\r\n\t\t\t}", "public void maybeRemove(RemoveRandom r, ObjectContainer container, ClientContext context);", "private void removeUser(int index) {\n ensureUserIsMutable();\n user_.remove(index);\n }", "private void removePrivilegedUser(ActionEvent actionEvent) {\n if (removeUserMenu.getSelectionModel().getSelectedItem() != null) {\n for (User user : server.getUser()) {\n if (user.getName().equals(removeUserMenu.getSelectionModel().getSelectedItem())) {\n selectedRemoveUser = user;\n }\n }\n // remove selected user from channel as privileged\n channel.withoutPrivilegedUsers(selectedRemoveUser);\n // update removeMenu\n removeUserMenu.getItems().clear();\n for (User user : server.getUser()) {\n if (user.getPrivileged().contains(channel)) {\n removeUserMenu.getItems().add(user.getName());\n }\n }\n // update addMenu\n addUserMenu.getItems().clear();\n for (User user : server.getUser()) {\n if (!user.getPrivileged().contains(channel)) {\n addUserMenu.getItems().add(user.getName());\n }\n }\n channelPrivilegedUserUpdate();\n }\n }", "public static void scriptDelete() {\n List<BeverageEntity> beverages = (List<BeverageEntity>) adminFacade.getAllBeverages();\n for (int i = 0; i < beverages.size(); i++) {\n System.out.println(\"delete : \" + beverages.get(i));\n adminFacade.removeBeverage(beverages.get(i));\n }\n List<DecorationEntity> decos = (List<DecorationEntity>) adminFacade.getAllDecorations();\n for (int i = 0; i < decos.size(); i++) {\n System.out.println(\"delete : \" + decos.get(i));\n adminFacade.removeDecoration(decos.get(i));\n }\n\n /* Check that there isn't any other cocktails, and delete remaining */\n List<CocktailEntity> cocktails = (List<CocktailEntity>) adminFacade.getAllCocktails();\n if (cocktails.size() > 0) {\n System.err.println(\"Les cocktails n'ont pas été tous supprimés... \"\n + cocktails.size() + \" cocktails restants :\");\n }\n for (int i = 0; i < cocktails.size(); i++) {\n CocktailEntity cocktail = adminFacade.getCocktailFull(cocktails.get(i));\n System.err.println(cocktail.getName() + \" : \"\n + cocktail.getDeliverables());\n adminFacade.removeCocktail(cocktail);\n }\n\n /* Remove client accounts */\n List<ClientAccountEntity> clients = (List<ClientAccountEntity>) adminFacade.getAllClients();\n for (int i = 0; i < clients.size(); i++) {\n adminFacade.removeClient(clients.get(i));\n }\n\n /* Remove addresses */\n List<AddressEntity> addresses = (List<AddressEntity>) adminFacade.getAllAddresses();\n for (int i = 0; i < addresses.size(); i++) {\n adminFacade.removeAddress(addresses.get(i));\n }\n\n /* TODO :\n * * Remove orders\n */\n }", "Boolean remover(String userName, Long idProducto);", "public void remove() {\r\n super.remove();\r\n }", "public void remove(){\n Api.worldRemover(getWorld().getWorldFolder());\n }", "private void clearDeleteFriendAToServer() {\n if (reqCase_ == 14) {\n reqCase_ = 0;\n req_ = null;\n }\n }", "void remove(String name);", "void remove(String name);", "public void remove()\r\n { Exceptions.unmodifiable(\"list\"); }", "public abstract void onRemove();", "public void remove(){throw new RuntimeException(\"Removing() is not implemented\");\r\n\t\t}", "public void revoke();", "public void remove() {\r\n return;\r\n }", "@Override\n\tpublic void eliminar() {\n\n\t}", "public abstract boolean remove(String name);", "public void removeByUserId(long userId);", "public void removeByUserId(long userId);", "@Override\n protected void removeMember() {\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void removeAdminOnIndividualFromSystemUser(Individual i, SystemUser user);", "@Override\n\tpublic void delUser(String[] id) {\n\n\t}", "public void run() {\n main.removeUser(location);\n }", "protected void remove(User<PERM> user) {\n\t\tuserMap.remove(user.principal.getName());\n\t}", "void removeUser(String uid);", "@Override\n\t/**\n\t * feature is not supported\n\t */\n\tpublic void remove() {\n\t}", "public void remove(String name);" ]
[ "0.7207603", "0.7041783", "0.7041783", "0.7041783", "0.7041783", "0.7041783", "0.6997577", "0.6997577", "0.6997577", "0.6997577", "0.6997577", "0.6903352", "0.68768954", "0.68123627", "0.68123627", "0.6810877", "0.67348635", "0.67322654", "0.67322654", "0.67322654", "0.67322654", "0.67322654", "0.67322654", "0.67322654", "0.67322654", "0.6729118", "0.67142344", "0.6693867", "0.6693867", "0.6693867", "0.6677873", "0.66747004", "0.66747004", "0.6645635", "0.66373706", "0.6628802", "0.6609717", "0.6602554", "0.65825385", "0.6582355", "0.65786815", "0.65786815", "0.65600187", "0.6542316", "0.65343285", "0.65220386", "0.65156573", "0.6493559", "0.64907205", "0.6476747", "0.64758205", "0.6465803", "0.6458981", "0.6437434", "0.64134413", "0.64082026", "0.640738", "0.6399459", "0.63895965", "0.63755", "0.6367725", "0.6366848", "0.63613385", "0.6357777", "0.6342912", "0.6331882", "0.63296974", "0.6306963", "0.6298362", "0.6295998", "0.6288255", "0.62783664", "0.6275588", "0.627351", "0.6270374", "0.6268894", "0.6268894", "0.62682754", "0.62669575", "0.6264593", "0.6261834", "0.62611634", "0.6251482", "0.6250815", "0.6247479", "0.6247479", "0.62380093", "0.6232739", "0.6232739", "0.6232739", "0.6232739", "0.6232739", "0.6232739", "0.6232739", "0.6228195", "0.6225763", "0.6224251", "0.62087536", "0.61944175", "0.6186946", "0.61849827" ]
0.0
-1
/ todo send and recive audio file
public MessageHolder(@NonNull View itemView) { super(itemView); context = itemView.getContext(); /// todo send recive audio file senderaudiobox = itemView.findViewById(R.id.SendAudio); reciveraudiobox = itemView.findViewById(R.id.ReciverAudio); senderaudiotime = itemView.findViewById(R.id.SenderAudioTime); reciveraudiotime = itemView.findViewById(R.id.ReciverAudioTime); senderaudiodate = itemView.findViewById(R.id.SenderAudioDate); /// todo send recive audio file // todo sender reciver message sendermessagelayout = itemView.findViewById(R.id.SenderMessageLayout); sendmessage = itemView.findViewById(R.id.SendMessageID); sendmessage_time = itemView.findViewById(R.id.SenderMessageTimeID); recivermessagelayout = itemView.findViewById(R.id.ReciverMessageLayout); recivemessage = itemView.findViewById(R.id.ReciverMessage); recivemessage_time = itemView.findViewById(R.id.ReciverMessageTime); recivershort_message = itemView.findViewById(R.id.ReciverShoetMessageTime); sendershort_message = itemView.findViewById(R.id.SenderShoetMessageTime); sendershotMessageDate = itemView.findViewById(R.id.SenderMessageShortDateID); SenderLOngMessageDate = itemView.findViewById(R.id.SenderMessageDateID); recivershortmessage_date = itemView.findViewById(R.id.ReciverShoetMessageDate); reciverlong_message_date = itemView.findViewById(R.id.ReciverLongMessagedate); // todo sender reciver message // todo sender and reciver image sendderimage = itemView.findViewById(R.id.SenderImageID); senderimagetime = itemView.findViewById(R.id.SenderImageTime); reciverimage = itemView.findViewById(R.id.ImageReciver); reciverimagetime = itemView.findViewById(R.id.ReciverTime); imagebox = itemView.findViewById(R.id.ImageLayoutID); sneder_image_date = itemView.findViewById(R.id.SenderImageDate); reciverimage_date = itemView.findViewById(R.id.ReciverImageDate); // todo sender and reciver image // todo sender and reciver pdf sender_pdf_box = itemView.findViewById(R.id.SenderPdfBox); reciver_pdf_box = itemView.findViewById(R.id.ReciverPdfBox); sender_pdf_time = itemView.findViewById(R.id.SenderPdfTime); senderPdfDate = itemView.findViewById(R.id.SenderPdfDate); reciver_pdf_time = itemView.findViewById(R.id.ReciverPdfTime); reciverpdf_date = itemView.findViewById(R.id.ReciverPdfDate); reciveraudiodate = itemView.findViewById(R.id.ReciverAudioDate); // todo sender and reciver pdf }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sendMusic(String path) {\n try {\n System.out.println(\"start sendMusic\");\n File myFile = new File(path);\n System.out.println(\"openFile\");\n byte[] mybytearray = new byte[(int) myFile.length()];\n FileInputStream fis = new FileInputStream(myFile);\n System.out.println(\"Sending...\");\n int count;\n if ((count = fis.read(mybytearray)) > 0) {\n output.write(mybytearray, 0, count);\n System.out.println(count);\n output.flush();\n }\n output.write(0);\n output.flush();\n fis.close();\n System.out.println(\"finish sending\");\n }catch (Exception e){\n System.out.println(\"sendMusic method\");\n System.err.println();\n }\n }", "@Override\n public void run() {\n\n\n AudioRecord audioRecorder = new AudioRecord (MediaRecorder.AudioSource.VOICE_COMMUNICATION, SAMPLE_RATE,\n AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT,\n AudioRecord.getMinBufferSize(SAMPLE_RATE, AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT));\n int bytes_read = 0;\n int bytes_sent = 0;\n byte[] buf = new byte[BUF_SIZE];\n Log.d(\"bytes_read\", String.valueOf(bytes_read));\n audioRecorder.startRecording();\n while (mic && !UDP){\n bytes_read = audioRecorder.read(buf, 0, BUF_SIZE); //also should add the headers required for our case\n Log.d(\"bytes_read\", String.valueOf(bytes_read));\n //The following code is to add the length in 4 bytes to the packet. Required in TCP connection if you use recv function in multiplex.py(server side).\n// byte[] len = ByteBuffer.allocate(4).order(BIG_ENDIAN).putInt(bytes_read).array();\n// byte[] toSend = new byte[4+bytes_read];\n// System.arraycopy(len, 0, toSend, 0, 4);\n// System.arraycopy(buf, 0, toSend, 4, bytes_read);\n try {\n dataOutputStreamInstance.write(buf);\n dataOutputStreamInstance.flush();\n } catch (IOException e) {\n e.printStackTrace();\n }\n bytes_sent += bytes_read;\n }\n\n // Stop recording and release resources\n audioRecorder.stop();\n audioRecorder.release();\n try {\n buff.close();\n dataOutputStreamInstance.close();\n out1.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return;\n }", "@Override\n public void run() {\n AudioTrack track = new AudioTrack(AudioManager.STREAM_MUSIC, SAMPLE_RATE, AudioFormat.CHANNEL_OUT_MONO,\n AudioFormat.ENCODING_PCM_16BIT, BUF_SIZE, AudioTrack.MODE_STREAM);\n track.play();\n try {\n // Define a socket to receive the audio\n DatagramSocket socket = new DatagramSocket(5000);\n byte[] buf = new byte[BUF_SIZE];\n while(speakers && UDP) {\n // Play back the audio received from packets\n DatagramPacket packet1 = new DatagramPacket(buf, BUF_SIZE);\n socket.receive(packet1);\n Log.d(\"sent\", \"recv\");\n Object[] dataPack = packet.depacketize(packet1.getData());\n if((int) dataPack[0] == 1){\n Log.d(\"check\", \"de-packet\");\n byte[] audio = (byte[]) dataPack[1];\n track.write(audio, 0, audio.length);\n byte[] ack = (byte[]) dataPack[2];\n DatagramPacket packet_ack = new DatagramPacket(ack, ack.length, address, port);\n try {\n socket.send(packet_ack);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }\n // Stop playing back and release resources\n socket.disconnect();\n socket.close();\n track.stop();\n track.flush();\n track.release();\n speakers = false;\n return;\n }\n catch(SocketException e) {\n speakers = false;\n }\n catch(IOException e) {\n speakers = false;\n }\n }", "public void recordVoice() {\n\t\t\n\t\t//String command = \"ffmpeg -f alsa -i hw:0 -t 2 -acodec pcm_s16le -ar 16000 -ac 1 foo.wav\"\n\t\tString command = \"arecord -d 2 -r 22050 -c 1 -i -t wav -f s16_LE foo.wav\";\n\t\t\n\t\tProcessBuilder pb = new ProcessBuilder(\"bash\" , \"-c\" , command );\n\t\ttry {\n\t\t\t\n\t\t\tProcess recordProcess = pb.start();\n\t\t\t\n\t\t\trecordProcess.waitFor();\n\t\t\t\n\t\t\trecordProcess.destroy();\n\t\n\t\t\t\n\t\t}catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t\t\n\t\t}catch (InterruptedException ie) {\n\t\t\tie.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Override\n public void run() {\n AudioManager m_amAudioManager;\n m_amAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);\n m_amAudioManager.setMode(AudioManager.MODE_IN_CALL);\n m_amAudioManager.setSpeakerphoneOn(false);\n AudioTrack track = new AudioTrack(AudioManager.STREAM_MUSIC, SAMPLE_RATE, AudioFormat.CHANNEL_OUT_MONO,\n AudioFormat.ENCODING_PCM_16BIT, BUF_SIZE, AudioTrack.MODE_STREAM);\n track.play();\n try {\n // Define a socket to receive the audio\n byte[] buf = new byte[BUF_SIZE];\n while(speakers && !UDP) {\n // Play back the audio received from packets\n int rec;\n rec = dataInputStreamInstance.read(buf);\n Log.d(\"rec123\", String.valueOf(rec));\n if (rec > 0)\n track.write(buf, 4, rec);\n }\n // Stop playing back and release resources\n track.stop();\n track.flush();\n track.release();\n speakers = false;\n return;\n }\n catch(SocketException e) {\n speakers = false;\n }\n catch(IOException e) {\n speakers = false;\n }\n }", "private void isAudio(MultipartFile file) {\n\t\t\n\t}", "public void playLocal(String audiofile);", "public void playAudio() {\n if (done==false)\n {\n file.play();\n }\n}", "@Override\n\t\t\tpublic void onClick(View v){\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tm.setDataSource(outputFile);\n\t\t\t\t\tm.prepare();\n\t\t\t\t\tm.start();\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Playing Audio\",\n\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\n\t\t\t\t\t// Making the notification pop up\n\t\t\t\t\tmBuilder.setSmallIcon(R.drawable.ic_launcher)\n\t\t\t\t\t\t\t.setContentTitle(\"Audio\")\n\t\t\t\t\t\t\t.setContentText(\"Audio is playing\");\n\t\t\t\t\tNotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\t\t\t\t\tnotificationManager.notify(1, mBuilder.build());\n\t\t\t\t\t\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "@Override\n public void run() {\n DatagramSocket socket = null;\n try {\n socket = new DatagramSocket();\n } catch (SocketException e) {\n e.printStackTrace();\n return;\n }\n //Record the audio\n AudioRecord audioRecorder = new AudioRecord (MediaRecorder.AudioSource.VOICE_COMMUNICATION, SAMPLE_RATE,\n AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT,\n AudioRecord.getMinBufferSize(SAMPLE_RATE, AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT));\n int bytes_read = 0;\n int bytes_sent = 0;\n byte[] buf = new byte[BUF_SIZE];\n // Create a socket and start recording\n audioRecorder.startRecording();\n while(mic && UDP) {\n // Capture audio from the mic and transmit it\n bytes_read = audioRecorder.read(buf, 0, BUF_SIZE); //also should add the headers required\n //The following code is to add the length in 4 bytes to the packet. Required in TCP connection if you use recv function in multiplex.py(server side).\n// byte[] len = ByteBuffer.allocate(4).order(BIG_ENDIAN).putInt(bytes_read).array();\n// byte[] toSend = new byte[4+bytes_read];\n// System.arraycopy(len, 0, toSend, 0, 4);\n// System.arraycopy(buf, 0, toSend, 0, bytes_read);\n Log.d(\"port123\", \"Before packetize\");\n byte[] pac = packet.packetize(buf, 1, 0);\n Log.d(\"port123\", \"after packetize\");\n DatagramPacket packet = new DatagramPacket(pac, bytes_read, address, port);\n Log.d(\"sent\", String.valueOf(bytes_read));\n try {\n socket.send(packet);\n } catch (IOException e) {\n e.printStackTrace();\n }\n bytes_sent += bytes_read;\n }\n // Stop recording and release resources\n audioRecorder.stop();\n audioRecorder.release();\n byte[] emptybuf = new byte[BUF_SIZE];\n DatagramPacket packet = new DatagramPacket(emptybuf, 0, address, port);\n try {\n socket.send(packet);\n } catch (IOException e) {\n e.printStackTrace();\n }\n socket.disconnect();\n socket.close();\n return;\n }", "public void pushData() {\n\t\t\tFile file = new File(Environment.getExternalStorageDirectory()\n\t\t\t\t\t.getAbsolutePath()\n\t\t\t\t\t+ \"/reverseme.pcm\");\n\t\t\t// Get the length of the audio stored in the file (16 bit so 2 bytes\n\t\t\t// per short)\n\t\t\t// and create a short array to store the recorded audio.\n\t\t\tint audioLength = (int) (file.length() / 2);\n\t\t\taudio = new short[audioLength];\n\n\t\t\ttry {\n\t\t\t\t// Create a DataInputStream to read the audio data back from the\n\t\t\t\t// saved file.\n\t\t\t\tInputStream is = new FileInputStream(file);\n\t\t\t\tBufferedInputStream bis = new BufferedInputStream(is);\n\t\t\t\tDataInputStream dis = new DataInputStream(bis);\n\n\t\t\t\t// Read the file into the music array.\n\t\t\t\tint i = 0;\n\t\t\t\twhile (dis.available() > 0) {\n\t\t\t\t\taudio[i] = dis.readShort();\n\t\t\t\t\ti++;\n\t\t\t\t}\n\n\t\t\t\t// Close the input streams.\n\t\t\t\tdis.close();\n\n\t\t\t} catch (Throwable t) {\n\t\t\t\tLog.e(\"AudioTrack\", \"Playback Failed\");\n\t\t\t}\n\t\t}", "public abstract void audioMessage(Message m);", "@FormUrlEncoded\n\t@POST(\"messagerie/insert_audio\")\n\tCall<BasicResponse> insertMessageWithAudio(\n\t\t\t@Field(\"id_header\") String idHeader,\n\t\t\t@Field(\"id_receveur\") String idReceveur,\n\t\t\t@Field(\"filename\") String filename);", "public interface Audio {\r\n\r\n\t//******************************GETS*****************************\r\n//\tpublic FileOutputStream getAudioByBitRate(String bitrate);\r\n\t/**\r\n\t * If the file was uploaded in a rate of 128 kbits/s then streaming at 320 kbits/s provides no benefits.\r\n\t * This method allows the client to check what bitrates exist and choose the adequate one.\t\r\n\t * @return String with all the BitRates accessible.\r\n\t */\r\n\tpublic ArrayList<Integer> getAccessibleBitRates();\r\n\t/**\r\n\t * Returns a Stream with the Audio in the default BitRate.\r\n\t * @return Audio stream.\r\n\t */\r\n//\tpublic FileOutputStream getAudio();\r\n\t/**\r\n\t * Evaluates if the Bitrate \"bitrate\" is allowed for audio and returns a Stream if it is.\r\n\t * @param bitrate \r\n\t * @return FileOutputStream\r\n\t */\r\n//\tpublic FileOutputStream getAudioByBitRate(int bitrate);\r\n\tpublic String getDir();\r\n\tpublic String getFileName();\r\n\t//******************************ACTIONS*****************************\r\n\t/**\r\n\t * Sets the bitRate for the value that comes as parameter.\r\n\t * @return\r\n\t */\r\n\tpublic boolean setDefaultBitRate(String bitrate);\r\n\t/**\r\n\t * Converts the Audio to the default system type, mp3. \r\n\t * @return The type of the file. If it failed returns a null String.\r\n\t */\r\n\tpublic boolean convertAudioTypeToDefault();\r\n\tboolean convertAudioTypeToDefault(String dir, long size,\r\n\t\t\tint defaultBitRate, String type);\r\n\tpublic boolean setAudioType(String type);\r\n\tpublic void setMaxBitRate(String bitRate);\r\n\tpublic Response download(String appId, String audioId, String dir);\r\n\tpublic void setDir(String dir);\r\n\tpublic void setSize(long size);\r\n\tpublic void setCreationDate(String creationDate);\r\n\tpublic void setFileName(String fileName);\r\n\tpublic void setLocation(String location);\r\n}", "public void uploadAudio(String name, MultipartFile file) {\n\t\tisFileEmpty(file);\n\t\t//2. check if file is an audio\n\t\tisAudio(file);\n\t\t\n\t}", "public void sendFile(SocketChannel socketChannel) throws IOException {\n int index = -1;\n RandomAccessFile aFile = null;\n try {\n File file = new File(\"C:\\\\Users\\\\ASUS\\\\Downloads\\\\Music\\\\Marshmello-One-Thing-Right-(Ft-Kane-Brown).mp3\");\n aFile = new RandomAccessFile(file, \"r\");\n FileChannel inChannel = aFile.getChannel();\n ByteBuffer buffer = ByteBuffer.allocate(1024);\n while (inChannel.read(buffer) > 0) {\n buffer.flip();\n socketChannel.write(buffer);\n buffer.clear();\n }\n Thread.sleep(1000);\n System.out.println(\"End of file reached..\");\n socketChannel.close();\n aFile.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n }", "public void playRecording() {\n\t\tString command = \"aplay foo.wav\";\n\t\t\n\t\tProcessBuilder pb = new ProcessBuilder(\"bash\" , \"-c\" , command );\n\t\ttry {\n\t\t\t\n\t\t\tProcess playProcess = pb.start();\n\t\t\t\n\t\t\tplayProcess.waitFor();\n\t\t\t\n\t\t\tplayProcess.destroy();\n\t\t\t\n\t\t\t\n\t\t}catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t\t\n\t\t}catch (InterruptedException ie) {\n\t\t\tie.printStackTrace();\n\t\t}\n\t}", "@Override\n public void onClick(View v) {\n Intent intent_upload = new Intent();\n intent_upload.setType(\"audio/*\");\n intent_upload.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent_upload, 1);\n }", "protected File saveMessage(String path, String filename, String type) throws Exception {\n float rate = handler.getRate();\r\n if (rate != 1.0f) {\r\n Object[] options = {\"The original speed\",\r\n \"The adjusted speed\"};\r\n int answer = JOptionPane.showOptionDialog(NanoGong.this,\r\n \"You have changed the playback speed of the recording.\\nDo you want to save the recording in its original speed or the adjusted speed?\",\r\n \"Question\",\r\n JOptionPane.YES_NO_OPTION,\r\n JOptionPane.QUESTION_MESSAGE,\r\n null,\r\n options,\r\n options[1]);\r\n if (answer == JOptionPane.YES_OPTION) rate = 1.0f;\r\n }\r\n \r\n File file = new File(path, filename);\r\n \r\n handler.downloadData(null, true);\r\n \r\n AudioData data = handler.getData();\r\n AudioData target = null;\r\n \r\n if (type.equals(TYPE_WAV_ADPCM))\r\n target = new ImaADPCMData(data.getFormat());\r\n else if (type.equals(TYPE_WAV_PCM))\r\n target = new WavePCMAudioData(data.getFormat());\r\n else if (type.equals(TYPE_SPEEX)) {\r\n if (speexQuality == 0) speexQuality = 10;\r\n target = new SpeexData(data.getFormat(), true, speexQuality);\r\n } else if (type.equals(TYPE_FLV_PCM))\r\n target = new FlvPCMData(data.getFormat());\r\n else\r\n throw new Exception(\"Invalid file format.\");\r\n\r\n OlaBuffer olaBuffer = new OlaBuffer(data.getFormat(), rate);\r\n \r\n data.reset();\r\n while (data.isAvailable()) {\r\n olaBuffer.write(data.read());\r\n while (olaBuffer.isAvailable()) target.write(olaBuffer.read());\r\n }\r\n \r\n olaBuffer.drain();\r\n while (olaBuffer.isAvailable()) target.write(olaBuffer.read());\r\n \r\n FileOutputStream stream = new FileOutputStream(file);\r\n target.sendToStream(stream);\r\n stream.close();\r\n \r\n return file;\r\n }", "public void startMic() {\n mic = true;\n Thread thread = new Thread(new Runnable() {\n\n @Override\n public void run() {\n // Create an instance of the AudioRecord class\n DatagramSocket socket = null;\n try {\n socket = new DatagramSocket();\n } catch (SocketException e) {\n e.printStackTrace();\n return;\n }\n //Record the audio\n AudioRecord audioRecorder = new AudioRecord (MediaRecorder.AudioSource.VOICE_COMMUNICATION, SAMPLE_RATE,\n AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT,\n AudioRecord.getMinBufferSize(SAMPLE_RATE, AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT));\n int bytes_read = 0;\n int bytes_sent = 0;\n byte[] buf = new byte[BUF_SIZE];\n // Create a socket and start recording\n audioRecorder.startRecording();\n while(mic && UDP) {\n // Capture audio from the mic and transmit it\n bytes_read = audioRecorder.read(buf, 0, BUF_SIZE); //also should add the headers required\n //The following code is to add the length in 4 bytes to the packet. Required in TCP connection if you use recv function in multiplex.py(server side).\n// byte[] len = ByteBuffer.allocate(4).order(BIG_ENDIAN).putInt(bytes_read).array();\n// byte[] toSend = new byte[4+bytes_read];\n// System.arraycopy(len, 0, toSend, 0, 4);\n// System.arraycopy(buf, 0, toSend, 0, bytes_read);\n Log.d(\"port123\", \"Before packetize\");\n byte[] pac = packet.packetize(buf, 1, 0);\n Log.d(\"port123\", \"after packetize\");\n DatagramPacket packet = new DatagramPacket(pac, bytes_read, address, port);\n Log.d(\"sent\", String.valueOf(bytes_read));\n try {\n socket.send(packet);\n } catch (IOException e) {\n e.printStackTrace();\n }\n bytes_sent += bytes_read;\n }\n // Stop recording and release resources\n audioRecorder.stop();\n audioRecorder.release();\n byte[] emptybuf = new byte[BUF_SIZE];\n DatagramPacket packet = new DatagramPacket(emptybuf, 0, address, port);\n try {\n socket.send(packet);\n } catch (IOException e) {\n e.printStackTrace();\n }\n socket.disconnect();\n socket.close();\n return;\n }\n });\n thread.start();\n }", "public void startSpeakers() {\n if(!speakers) {\n\n speakers = true;\n Thread receiveThread = new Thread(new Runnable() {\n\n @Override\n public void run() {\n\n // Create an instance of AudioTrack, used for playing back audio\n AudioTrack track = new AudioTrack(AudioManager.STREAM_MUSIC, SAMPLE_RATE, AudioFormat.CHANNEL_OUT_MONO,\n AudioFormat.ENCODING_PCM_16BIT, BUF_SIZE, AudioTrack.MODE_STREAM);\n track.play();\n try {\n // Define a socket to receive the audio\n DatagramSocket socket = new DatagramSocket(5000);\n byte[] buf = new byte[BUF_SIZE];\n while(speakers && UDP) {\n // Play back the audio received from packets\n DatagramPacket packet1 = new DatagramPacket(buf, BUF_SIZE);\n socket.receive(packet1);\n Log.d(\"sent\", \"recv\");\n Object[] dataPack = packet.depacketize(packet1.getData());\n if((int) dataPack[0] == 1){\n Log.d(\"check\", \"de-packet\");\n byte[] audio = (byte[]) dataPack[1];\n track.write(audio, 0, audio.length);\n byte[] ack = (byte[]) dataPack[2];\n DatagramPacket packet_ack = new DatagramPacket(ack, ack.length, address, port);\n try {\n socket.send(packet_ack);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }\n // Stop playing back and release resources\n socket.disconnect();\n socket.close();\n track.stop();\n track.flush();\n track.release();\n speakers = false;\n return;\n }\n catch(SocketException e) {\n speakers = false;\n }\n catch(IOException e) {\n speakers = false;\n }\n }\n });\n receiveThread.start();\n }\n }", "static void PlaySound(File Sound)\n {\n try{\n Clip clip = AudioSystem.getClip();\n clip.open(AudioSystem.getAudioInputStream(Sound));\n clip.start();\n //BGM = new AudioStream(new FileInputStream(\"OST.WAV\"));\n //MD = BGM.getData();\n //loop = new ContinuousAudioDataStream(MD);\n }catch(Exception e) {}\n //MGP.start(loop); \n }", "private void grabar(View v) {\n if (ContextCompat.checkSelfPermission(getApplicationContext(),\n Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED) {\n\n ActivityCompat.requestPermissions((Activity) getApplicationContext(),\n new String[]{Manifest.permission.RECORD_AUDIO},\n REQUEST_MICROPHONE);\n\n }\n Audio = new File(AudioDir, \"audio.3gp\");\n\n mr = new MediaRecorder();\n mr.reset();\n mr.setAudioSource(MediaRecorder.AudioSource.MIC);\n mr.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);\n\n mr.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);\n\n mr.setOutputFile(Audio.getAbsolutePath());\n\n try {\n mr.prepare();\n mr.start();\n\n } catch (IOException e) {\n e.printStackTrace();\n\n }\n\n }", "public final Message sendAudioFile(AudioFileToSend afs)\n\t{\n\t\tif(afs == null)\n\t\t\treturn null;\n\t\treturn rm.sendAudioFile(afs);\n\t}", "OutputStream receiveUpload(String filename, String mimeType);", "public void onAudioJson(String jsonStr){\n\t\tLog.i(\"123\", \"on audio json len=\"+jsonStr.length());\r\n\t\t//String string = jsonStr.substring(jsonStr.lastIndexOf(\"000a\\\"}\"));\r\n\t\tint offset = jsonStr.lastIndexOf(\"\\\"}\");\r\n\t\tString string = null;\r\n\t\tif(offset>0){\r\n\t\t\t string = jsonStr.subSequence(0, offset+\"\\\"}\".length()).toString();\r\n\t\t}else{\r\n\t\t\tstring = jsonStr+\"\\\"}\";\r\n\t\t}\r\n\t\t//String string = jsonStr.subSequence(0, jsonStr.lastIndexOf(\"000a\\\"}\")+\"000a\\\"}\".length()).toString();\r\n\t\t\r\n//\t\tLog.i(\"123\", \"string=\"+string);\r\n\t\tbyte [] buf = null;\r\n\t\tAudioComeData audioComeData = null;\r\n\t\ttry {\r\n//\t\t\t buf = JsonUtils.audioReceive(new JSONObject(string));\r\n\t\t\taudioComeData = JsonUtils.parseAudioReceive(new JSONObject(string));\r\n\t\t\t\r\n\t\t} catch (JSONException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n//\t\tif(buf.length > 8912){\r\n//\t\t\tToast.makeText(context2, \"\"+buf.length, Toast.LENGTH_SHORT).show();\r\n//\t\t}\r\n\t\tif(audioComeData==null)return;\r\n\t\tbuf = audioComeData.getG711data();\r\n\t\tif(buf!=null){\r\n\t\t\tLog.i(\"123\", \"buf.length=\"+buf.length);\r\n\t\t\t//jni.g711AudioPlay(buf, buf.length);\r\n\t\t\t//tell audio coming\r\n\t\t\tAudioAction.getInstance().audioComing();\r\n\t\t\t\r\n//\t\t\tint maxSize = 8000*1 / buf.length;\r\n\t\t\tint maxSize = 1;\r\n\t\t\tLog.i(\"123\", \"max size=\"+maxSize + \" audioQueue.size =\"+audioQueue.size());\r\n\t\t\tif(audioQueue.size()>=maxSize){\r\n\t\t\t\tLog.e(\"123\",\"audio clear\");\r\n\t\t\t\taudioQueue.clear();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\taudioQueue.offer(audioComeData);\r\n\t\t\tLog.i(\"123\", \"audio queue offer size=\"+audioQueue.size());\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tstartPlayAudioFromQueue();\r\n\t\t\t\r\n//\t\t\tAudioAction.MyAudioPlay myAudioPlay = AudioAction.getInstance().buildMyAudioPlay(audioComeData.getSender());\r\n//\t\t\tif(myAudioPlay!=null){\r\n//\t\t\t//\tmyAudioPlay.audioPlayG711Data(buf, buf.length);\r\n////\t\t\t\taudioStack.push(audioComeData);\r\n//\t\t\t\t\r\n//\t\t\t\t\r\n//\t\t\t\tint maxSize = 8000*3 / buf.length;\r\n//\t\t\t\tLog.i(\"123\", \"max size=\"+maxSize);\r\n//\t\t\t\tif(audioQueue.size()>=maxSize){\r\n//\t\t\t\t\taudioQueue.clear();\r\n//\t\t\t\t}\r\n//\t\t\t\t\r\n//\t\t\t\taudioQueue.offer(audioComeData);\r\n//\t\t\t\tLog.i(\"123\", \"audio queue offer size=\"+audioQueue.size());\r\n//\t\t\t\r\n//\t\t\t\t\r\n//\t\t\t}\r\n\t\t\t\r\n//\t\t\taudioStack.push(audioComeData);\r\n//\t\t\tstartPlayAudioFromStack();\r\n\r\n\t\t}\r\n\t}", "@Override\r\n \tpublic void play() {\n \t\tFile file = new File(location);\r\n \t\tlong audioFileLength = file.length();\r\n \t\tAudioInputStream audioInputStream;\r\n \t\ttry {\r\n \t\t\taudioInputStream = AudioSystem.getAudioInputStream(file);\r\n \r\n \t\t\tAudioFormat format = audioInputStream.getFormat();\r\n \r\n \t\t\tint frameSize = format.getFrameSize();\r\n \t\t\tfloat frameRate = format.getFrameRate();\r\n \t\t\tdurationInSeconds = (audioFileLength / (frameSize * frameRate));\r\n \r\n \r\n \t\t\tLine.Info linfo = new Line.Info(Clip.class);\r\n \t\t\tLine line = AudioSystem.getLine(linfo);\r\n \t\t\tclip = (Clip) line;\r\n \t\t\t//clip.addLineListener(this);\r\n \t\t\tclip.open(audioInputStream);\r\n \t\t\tclip.start();\r\n \r\n \t\t} catch (UnsupportedAudioFileException e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te.printStackTrace();\r\n \t\t} catch (IOException e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te.printStackTrace();\r\n \t\t} catch (LineUnavailableException e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te.printStackTrace();\r\n \t\t}\t\r\n \r\n \t}", "public void playAudio() {\n\n }", "@Override\n\t\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\ttextsent=0;\n\t\t\t\t\t\t\t\t\tesocket = new Socket(TestConnection.ip, TestConnection.port);\n\n\t\t\t\t\t\t\t\t// Log.e(\"ClientActivity\", \"C: Sending command.\");\n\t\t\t\t\t\t\t\t\tedos=new DataOutputStream(esocket.getOutputStream());\n\t\t\t\t\t\t\t\t\tedis=new DataInputStream(esocket.getInputStream());\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\tedos.writeUTF(\"DOUBT\");\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 \n\t\t\t\t\t\t\t// \tif(TestConnection.username!=null)\n\t\t\t\t\t\t\t\t\tedos.writeUTF(TestConnection.username);\n\t\t\t\t\t\t\t\t\tedos.writeUTF(TestConnection.roll);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tedos.writeUTF(TestConnection.macid);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tedos.writeUTF(etopic.getText().toString()); // SEND\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// SUBJECT\n\t\t\t\t\t\t\t\t\tedos.writeUTF(etext.getText().toString()); // SEND\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// MESSAGE\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Sending imageflag\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//Image sending\n\t\t\t\t\t\t\t\t\tif(AudioMainActivity.imageflag!=1)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tedos.writeUTF(\"send_image\");\n\t\t\t\t\t\t\t\t\t\tLog.e(\"Image flag sent\",\"send_image\");\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tAudioMainActivity.imageflag=1;\n\t\t\t\t\t\t\t\t\tFile filedp = new File(mypath+\"/dp_th.jpg\");\n\t\t\t\t\t\t\t\t\tsendFile(filedp);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{edos.writeUTF(\"not_send_image\");\n\t\t\t\t\t\t\t\t\tLog.e(\"Image flag sent\",\"not_send_image\");\n\t\t\t\t\t\t\t\t\tString ifdone =edis.readUTF();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(ifdone.equals(\"not_done\"))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tFile filedp = new File(mypath+\"/dp_th.jpg\");\n\t\t\t\t\t\t\t\t\t\tsendFile(filedp);\n\t\t\t\t\t\t\t\t\t\tLog.e(\"ZABARDASTI\",\"Image Sent\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tfinal String msgServer = edis.readUTF(); // RECEIVE\n\t\t\t\t\t\t\t\t\tLog.e(\"Confirmation\", \"msgServer=\"+msgServer);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// CONFIRMATION\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// IF MESSAGE\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// RECEIVED BY\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// SERVER\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t\t\tif (msgServer.contains(\"received\")) {\n\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(AudioDoubt.this, \"Doubt Sent\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t\t\temerdialog.dismiss();\n\t\t\t\t\t\t\t\t\t\t\t\ttextsent=1;\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tAudioMainActivity.doubt.add(etopic.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\tAudioMainActivity.textMessage.add(etext.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\tAudioMainActivity.count=5-AudioMainActivity.doubt.size();\n\t\t\t\t\t\t\t\t\t\t\t\t//counter.setText(\"Doubts Remaining : \"+count);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(AudioDoubt.this,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Server Error! Doubt not sent!\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t//doubtSubject.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t//doubtText.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\tetopic.setEnabled(true);\n\t\t\t\t\t\t\t\t\t\t\tetext.setEnabled(true);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcatch (Exception e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfinally {\n\t\t\t\t\t\t\t\tif (esocket != null) {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t// close socket connection after using it\n\t\t\t\t\t\t\t\t\t\tesocket.close();\n\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}", "public void handleClient(HttpExchange exchange) throws MidiUnavailableException, InvalidMidiDataException, InterruptedException, IOException {\n final String path = exchange.getRequestURI().getPath();\n final String base = exchange.getHttpContext().getPath();\n final String voice = path.substring(1, path.length()-1);\n SequencePlayer player = new MidiSequencePlayer(DEFAULT_BPM, DEFAULT_TPB);\n System.err.println(\"received request \" + path);\n \n\n // plain text response\n exchange.getResponseHeaders().add(\"Content-Type\", \"text/html; charset=utf-8\");\n\n // must call sendResponseHeaders() before calling getResponseBody()\n final int successCode = 200;\n final int lengthNotKnownYet = 0;\n exchange.sendResponseHeaders(successCode, lengthNotKnownYet);\n\n \n music.play(player, 0, exchange.getResponseBody(), voice);\n \n PrintWriter out = new PrintWriter(new OutputStreamWriter(exchange.getResponseBody(), UTF_8), true);\n \n final int enoughBytesToStartStreaming = 2048;\n for (int i = 0; i < enoughBytesToStartStreaming; ++i) {\n out.print(' ');\n }\n out.flush();\n \n if (music.getLyrics(voice).equals(\"\")) {\n out.println(\"This song has has no lyrics\");\n }\n \n synchronized(this.music) {\n music.wait();\n }\n System.err.println(\"past wait\");\n Object lock = new Object();\n player.addEvent(music.duration(), (Double beat) -> {\n synchronized (lock) {\n lock.notifyAll();\n }\n });\n player.play();\n synchronized (lock) {\n try {\n lock.wait();\n } catch (InterruptedException e) {\n return;\n }\n } \n exchange.close();\n checkRep(); \n }", "private void playAudio() {\r\n Play.au(audioFileName, false);\r\n }", "public FileTransfer sendMultimediaFile(File file)\n throws Exception {\n return null;\n }", "@Override\n public void run() {\n int recBufSize = AudioRecord.getMinBufferSize(frequency,\n channelConfiguration, audioEncoding)*2;\n int plyBufSize = AudioTrack.getMinBufferSize(frequency,\n channelConfiguration, audioEncoding)*2;\n\n AudioRecord audioRecord = new AudioRecord(MediaRecorder.AudioSource.MIC, frequency,\n channelConfiguration, audioEncoding, recBufSize);\n\n AudioTrack audioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, frequency,\n channelConfiguration, audioEncoding, plyBufSize, AudioTrack.MODE_STREAM);\n\n byte[] recBuf = new byte[recBufSize];\n audioRecord.startRecording();\n audioTrack.play();\n while(flag){\n int readLen = audioRecord.read(recBuf, 0, recBufSize);\n Log.i(\"RecordThread\", \"正在输出本地音频: readLen : \" + readLen);\n Log.i(\"RecordThread\", \"正在输出本地音频: recBuf : \" + readLen);\n audioTrack.write(recBuf, 0, readLen);\n }\n Log.i(\"RecordThread\", \"run: 停止输出本地音频...\");\n audioRecord.stop();\n audioRecord.release();\n audioTrack.stop();\n audioTrack.release();\n }", "private synchronized void rawplay(final AudioFormat targetFormat) {\n\t\tThread listeningThread = new Thread(new Runnable() {\n\t\t\tpublic void run() {\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tTargetDataLine line = getLine(targetFormat);\n\t\t\t\t\n\t\t\t\tif (line == null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tout = new ByteArrayOutputStream();\n\t\t\t\tint numBytesRead;\n\t\t\t\tbyte[] data = new byte[line.getBufferSize()];\n\n\t\t\t\t// Begin audio capture.\n\t\t\t\tline.start();\n\t\t\t\trunning = true;\n\t\t\t\t// Here, stopped is a global boolean set by another thread.\n\t\t\t\twhile (running) {\n\t\t\t\t\t\n\t\t\t\t\tnumBytesRead = line.read(data, 0, data.length);\n\t\t\t\t\tout.write(data, 0, numBytesRead);\n\t\t\t\t} \n\t\t\t\t\n\t\t\t}\n\t\t});\n\n\t\tlisteningThread.start();\n\n\t}", "private void downloadAudioFile(final Data mediaData) {\n // final CustomProgressDialog customProgressDialog = new CustomProgressDialog(context, R.mipmap.syc);\n if (Utility.isOnline(context)) {\n //customProgressDialog.show();\n\n DownloadFileAsync task = new DownloadFileAsync(context, mediaData) {\n @Override\n public void receiveData(String result) {\n if (!result.equals(\"\")) {\n DbHelper dbHelper = new DbHelper(context);\n mediaData.setLocalFilePath(result);\n if (dbHelper.updateMediaLanguageLocalFilePathEntity(mediaData)) {\n if (Consts.IS_DEBUG_LOG) {\n Log.d(Consts.LOG_TAG, \"successfully downloaded and local file updated: media Id:\" + media.getId() + \" downloading Url: \" + media.getDownload_url() + \" at \" + result);\n }\n }\n }\n // customProgressDialog.dismiss();\n }\n };\n task.execute();\n }\n }", "private void sendTextRequest() {\n\t\t\t\t\tfinal Thread textingThread = new Thread (new Runnable() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\ttextsent=0;\n\t\t\t\t\t\t\t\t\tesocket = new Socket(TestConnection.ip, TestConnection.port);\n\n\t\t\t\t\t\t\t\t// Log.e(\"ClientActivity\", \"C: Sending command.\");\n\t\t\t\t\t\t\t\t\tedos=new DataOutputStream(esocket.getOutputStream());\n\t\t\t\t\t\t\t\t\tedis=new DataInputStream(esocket.getInputStream());\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\tedos.writeUTF(\"DOUBT\");\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 \n\t\t\t\t\t\t\t// \tif(TestConnection.username!=null)\n\t\t\t\t\t\t\t\t\tedos.writeUTF(TestConnection.username);\n\t\t\t\t\t\t\t\t\tedos.writeUTF(TestConnection.roll);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tedos.writeUTF(TestConnection.macid);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tedos.writeUTF(etopic.getText().toString()); // SEND\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// SUBJECT\n\t\t\t\t\t\t\t\t\tedos.writeUTF(etext.getText().toString()); // SEND\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// MESSAGE\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Sending imageflag\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//Image sending\n\t\t\t\t\t\t\t\t\tif(AudioMainActivity.imageflag!=1)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tedos.writeUTF(\"send_image\");\n\t\t\t\t\t\t\t\t\t\tLog.e(\"Image flag sent\",\"send_image\");\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tAudioMainActivity.imageflag=1;\n\t\t\t\t\t\t\t\t\tFile filedp = new File(mypath+\"/dp_th.jpg\");\n\t\t\t\t\t\t\t\t\tsendFile(filedp);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{edos.writeUTF(\"not_send_image\");\n\t\t\t\t\t\t\t\t\tLog.e(\"Image flag sent\",\"not_send_image\");\n\t\t\t\t\t\t\t\t\tString ifdone =edis.readUTF();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(ifdone.equals(\"not_done\"))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tFile filedp = new File(mypath+\"/dp_th.jpg\");\n\t\t\t\t\t\t\t\t\t\tsendFile(filedp);\n\t\t\t\t\t\t\t\t\t\tLog.e(\"ZABARDASTI\",\"Image Sent\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tfinal String msgServer = edis.readUTF(); // RECEIVE\n\t\t\t\t\t\t\t\t\tLog.e(\"Confirmation\", \"msgServer=\"+msgServer);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// CONFIRMATION\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// IF MESSAGE\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// RECEIVED BY\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// SERVER\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t\t\tif (msgServer.contains(\"received\")) {\n\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(AudioDoubt.this, \"Doubt Sent\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t\t\temerdialog.dismiss();\n\t\t\t\t\t\t\t\t\t\t\t\ttextsent=1;\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tAudioMainActivity.doubt.add(etopic.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\tAudioMainActivity.textMessage.add(etext.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\tAudioMainActivity.count=5-AudioMainActivity.doubt.size();\n\t\t\t\t\t\t\t\t\t\t\t\t//counter.setText(\"Doubts Remaining : \"+count);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(AudioDoubt.this,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Server Error! Doubt not sent!\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t//doubtSubject.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t//doubtText.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\tetopic.setEnabled(true);\n\t\t\t\t\t\t\t\t\t\t\tetext.setEnabled(true);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcatch (Exception e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfinally {\n\t\t\t\t\t\t\t\tif (esocket != null) {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t// close socket connection after using it\n\t\t\t\t\t\t\t\t\t\tesocket.close();\n\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpublic void sendFile(File file) throws IOException {\n\t\t\t\t\t FileInputStream fileIn = new FileInputStream(file);\n\t\t\t\t\t byte[] buf = new byte[Short.MAX_VALUE];\n\t\t\t\t\t int bytesRead; \n\t\t\t\t\t while( (bytesRead = fileIn.read(buf)) != -1 ) {\n\t\t\t\t\t dos.writeShort(bytesRead);\n\t\t\t\t\t dos.write(buf,0,bytesRead);\n\t\t\t\t\t }\n\t\t\t\t\t dos.writeShort(-1);\n\t\t\t\t\t fileIn.close();\n\t\t\t\t\t }\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\ttextingThread.start();\n\t\t\t\t\t\n\t\t\t\t\tThread textTimer=new Thread (new Runnable() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tlong startingtime = System.currentTimeMillis();\n\t\t\t\t\t\t\tlong endingtime = startingtime + 5*1000; // 60 seconds * 1000 ms/sec\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\twhile (true)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(textsent==1||System.currentTimeMillis() > endingtime)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(textsent!=1)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttextingThread.interrupt();\n\t\t\t\t\t\t\t\t\t\tLog.e(\"Texting thread\",\"Thread Interrupted\");\n\t\t\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tebar.setVisibility(View.GONE);\n\t\t\t\t\t\t\t\t\t\t\t\tesend.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"Connection Error... Could not Send Doubt..\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t\t\tetopic.setEnabled(true);\n\t\t\t\t\t\t\t\t\t\t\t\tetext.setEnabled(true);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\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}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\ttextTimer.start();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "private static void playAudio(String musicFile) {\n }", "public boolean isAudio()\n {return false ;\n }", "public void startSpeakersTCP() {\n if(!speakers) {\n\n speakers = true;\n Thread receiveThread = new Thread(new Runnable() {\n\n @Override\n public void run() {\n // Create an instance of AudioTrack, used for playing back audio\n AudioManager m_amAudioManager;\n m_amAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);\n m_amAudioManager.setMode(AudioManager.MODE_IN_CALL);\n m_amAudioManager.setSpeakerphoneOn(false);\n AudioTrack track = new AudioTrack(AudioManager.STREAM_MUSIC, SAMPLE_RATE, AudioFormat.CHANNEL_OUT_MONO,\n AudioFormat.ENCODING_PCM_16BIT, BUF_SIZE, AudioTrack.MODE_STREAM);\n track.play();\n try {\n // Define a socket to receive the audio\n byte[] buf = new byte[BUF_SIZE];\n while(speakers && !UDP) {\n // Play back the audio received from packets\n int rec;\n rec = dataInputStreamInstance.read(buf);\n Log.d(\"rec123\", String.valueOf(rec));\n if (rec > 0)\n track.write(buf, 4, rec);\n }\n // Stop playing back and release resources\n track.stop();\n track.flush();\n track.release();\n speakers = false;\n return;\n }\n catch(SocketException e) {\n speakers = false;\n }\n catch(IOException e) {\n speakers = false;\n }\n }\n });\n receiveThread.start();\n }\n }", "public void record() {\n\t\tif (isRecord) {\n\t\t\tisRecord = false;\n\n\t\t\t// Generates a unique filename.\n\t\t\tString currenttime = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n\t\t\tfilename = recordingsPath + currenttime + \".ogg\";\n\n\t\t\t// The pipe.\n\t\t\tString[] rec = new String[] { \"alsasrc\", \"!\", \"audioconvert\", \"!\", \"audioresample\", \"!\", \"vorbisenc\", \"!\", \"oggmux\", \"!\",\n\t\t\t\t\t\"filesink location = \" + filename };\n\n\t\t\trec = Gst.init(\"AudioRecorder\", rec);\n\t\t\tStringBuilder sb = new StringBuilder();\n\n\t\t\tfor (String s : rec) {\n\t\t\t\tsb.append(' ');\n\t\t\t\tsb.append(s);\n\t\t\t}\n\n\t\t\t// Start recording\n\t\t\taudiopipe = Pipeline.launch(sb.substring(1));\n\t\t\taudiopipe.play();\n\n\t\t} else {\n\t\t\t// Stop recording and add file to the list.\n\t\t\taudiopipe.stop();\n\t\t\tgui.addNewFiletoList(filename);\n\t\t\tisRecord = true;\n\t\t}\n\n\t}", "public void run()\r\n\t{\r\n\t\t// Audio Loop\r\n\t\ttry \r\n\t\t{\r\n\t\t\tp.realize();\r\n\t \r\n\t \t// Create record control for player\r\n\t \tRecordControl rc = (RecordControl)p.getControl(\"RecordControl\");\r\n\t \t\r\n\t \t// Create file to write to\r\n\t \tByteArrayOutputStream output = new ByteArrayOutputStream();\r\n\r\n\t \t// Configure record stream destination\r\n\t \trc.setRecordStream(output);\r\n\t \tp.start();\r\n\t \t\r\n\t \twhile(!doStop)\r\n\t \t{\r\n\t\t \trc.setRecordStream(output);\r\n\t\t \trc.startRecord();\r\n\t\t \t\r\n\t\t \t// sleep 1 milisecond\r\n\t \t\tThread.sleep(1);\r\n\t \t\t\r\n\t \t\t// commit file\r\n\t\t \t\trc.commit();\r\n\t\t \t \trc.stopRecord();\r\n\t\t \t \t\r\n\t\t \t \t\r\n\t\t \t \t\r\n\t\t \t \t\r\n\t\t \t\tbyte[] recordedSoundArray = output.toByteArray();\r\n\t\t \t\tif(recordedSoundArray.length>44){\r\n\t\t\t \t\r\n\t\t\t\t // temporary array for stripped sound bytes\r\n\t\t\t\t byte soundonly[] = new byte[recordedSoundArray.length-44];\r\n\t\t\t\t \r\n\t\t\t\t // strip file header\r\n\t\t\t\t for(int i =0; i<soundonly.length; i++){\r\n\t\t\t\t \tsoundonly[i]=(byte)(recordedSoundArray[i+44]-floor.getLevel());\r\n\t\t\t\t }\r\n \r\n\t\t\t\t // update stream array in graph\r\n\t\t\t \tg.updateStreamData(soundonly);\r\n\t\t\t \t\r\n\t\t\t \t// set current display on graph\r\n\t\t\t \t//display.setCurrent(this);\r\n\t\t\t \t\r\n\t\t\t \t// update graph plot\r\n\t\t\t\t g.update();\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t // warn if threshold reached\r\n\t\t\t \tif(AAnalyzer.samplesAboveThreshold(soundonly, m_alertThreshold)>(soundonly.length-50)/2*1/10){\r\n\t\t\t \t\t\r\n\t\t\t \t\tdouble loudestFrequency = g.getLoudestFrequency();\r\n\t\t\t \t\r\n\t\t\t \t\t// Scan through the match candidates and alert on a match\r\n\t\t\t \t\tboolean foundSpecificMatch = false;\r\n\t\t\t \t\tfor(int j = 0; j < m_sounds.length; j++)\r\n\t\t\t \t\t{\r\n\t\t\t \t\t\tif(m_sounds[j].checkMatch(loudestFrequency))\r\n\t\t\t \t\t\t{\r\n\t\t\t \t\t\t\tfoundSpecificMatch = true;\r\n\t\t\t \t\t\t}\r\n\t\t\t \t\t}\r\n\t\t\t \t\t\r\n\t\t\t \t\tif(!foundSpecificMatch && loudestFrequency>100){\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\td.vibrate(2000);\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t// Do a popup\r\n\t\t\t \t\t\tAlert curAlert = new Alert(\"Sound detected\", \"Unknown sound - \" + Double.toString(loudestFrequency), null, AlertType.ALARM);\r\n\t\t\t \t\t\tcurAlert.setTimeout(3000);\r\n\t\t\t \t\t\td.setCurrent(curAlert, d.getCurrent());\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\tThread.sleep(curAlert.getTimeout()+200);\r\n\t\t\t \t\t\tSystem.out.println(\"frequency hit: \"+ loudestFrequency);\r\n\t\t\t \t\t}\r\n\t\t\t \t}\r\n\t\t\t }\r\n\t\t \t\telse{\r\n\t\t \t\t}\r\n\t\t \toutput.reset();\r\n\t \t}\r\n\t \t\r\n\t \t// close streams\r\n\t \trc.stopRecord();\r\n\t \t\tp.stop();\r\n\t \t\tp.close();\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(e.toString());\r\n\t\t}\r\n\t}", "public void connectToAudio() {\n String json = new Gson().toJson(new TelevisionModel(TelevisionModel.Action.CONNECT));\n String a = sendMessage(json);\n TelevisionModel teleM = new Gson().fromJson(a, TelevisionModel.class);\n System.out.println(\"Client Received \" + json);\n\n if (teleM.getAction() == TelevisionModel.Action.CONNECT) {\n isConnecting = teleM.getValue();\n ui.updateArea(teleM.getMessage());\n };\n }", "public boolean sendFile(String inKey, File inFile) throws NuxeoException;", "public void audio() throws MalformedURLException {\n\n \tfinal XuggleAudio xa = new XuggleAudio(\n \t\t\tnew URL(\"http://www.audiocheck.net/download.php?filename=Audio/audiocheck.net_sweep20-20klin.wav\"));\n \t\n \t/*\n \tAudioPlayer.createAudioPlayer(xa).run();\n \tfinal AudioWaveform vis = new AudioWaveform(400,400);\n \tvis.showWindow(\"Waveform\");\n \tSampleChunk sc = null;\n \t/*\n \twhile( (sc = xa.nextSampleChunk()) != null )\n \t\tvis.setData( sc.getSampleBuffer() );\n \t*/\n \t/*\n \tFourierTransform fft = new FourierTransform(xa);\n \tsc = fft.nextSampleChunk();\n \twhile( sc != null ) {\n \t\tfloat[][] fftData = fft.getMagnitudes();\n \t\tdouble[] fftDataDouble = new double[fftData[0].length];\n \t\tfor (int d = 0; d < fftData[0].length; d++) {\n \t\t\tfftDataDouble[d] = (double) fftData[0][d];\n \t\t}\n \t\t//vis.setData(fftData[0]);\n \t\tvis.setData(fftDataDouble);\n \t\tsc = fft.nextSampleChunk();\n \t}\n \t*/\n \t/*\n \tEQFilter eq = new EQFilter(xa, EQType.LPF, 5000);\n \tFourierTransform fft = new FourierTransform(eq);\n \twhile ((sc = fft.nextSampleChunk()) != null) {\n \t\t\n \t}\n \t*/\n \t//MFCC mfcc = new MFCC(xa);\n }", "public void sendFile(Type type, String file_name) {\n try {\n // Use this for reading the data.\n byte[] buffer = new byte[1000];\n\n FileInputStream inputStream = new FileInputStream(file_name);\n\n // read fills buffer with data and returns\n // the number of bytes read (which of course\n // may be less than the buffer size, but\n // it will never be more).\n int total = 0;\n int nRead = 0;\n while((nRead = inputStream.read(buffer)) != -1) {\n // Convert to String so we can display it.\n // Of course you wouldn't want to do this with\n // a 'real' binary file.\n System.out.println(new String(buffer));\n out.writeByte(nRead);\n total += nRead;\n }\n\n\n // Always close files.\n inputStream.close();\n\n System.out.println(\"Read \" + total + \" bytes\");\n }\n catch(FileNotFoundException ex) {\n System.out.println(\n \"Unable to open file '\" + file_name + \"'\");\n }\n catch(IOException ex) {\n System.out.println(\n \"Error reading file '\" + file_name + \"'\");\n // Or we could just do this:\n // ex.printStackTrace();\n }\n }", "@Override\n public void run() {\n FILEPREFIX = \".//files\"+serverID + \"//\";\n ClientMessage = (Message) socketRead();\n ServerMessage = getReturnMessage(ClientMessage);\n //System.out.println(\"client\"+ClientMessage.getFrom()+\"message : \"+ClientMessage.getContent());\n File file = new File(FILEPREFIX + ClientMessage.getFileName());\n switch (ClientMessage.getType()){\n case \"enquiry\"://return the list of file\n ServerMessage.setContent(ListAllFile());\n break;\n case \"read\"://read the last line\n System.out.println(ClientMessage.getFrom() + \": Reading...\");\n ServerMessage.setContent(\"Reading: \"+ReadLastLine(file));\n System.out.println(\"Reading \"+ClientMessage.getContent());\n break;\n case \"write\"://write to the end of file\n System.out.println(ClientMessage.getFrom() + \": writing...\");\n try{\n WriteLastLine(file,ClientMessage.getContent());\n }catch (IOException e) {\n System.out.println(\"write error\");\n }\n\n ServerMessage.setContent(\"writing: \"+ReadLastLine(file));\n System.out.println(\"Writing \"+ClientMessage.getContent());\n break;\n default://unknown command\n System.out.println(ClientMessage.getType());\n ServerMessage.setContent(\"Error\");\n System.out.println(ClientMessage.getFrom() + \": Wrong type\");\n break;\n }\n socketWrite(ServerMessage);\n\n try {//close the socket connection\n client.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private boolean convert(String text,String directory,String fileName) {\r\n\t\t\r\n\t\tif(!text.isEmpty()) {\t\t\t\r\n\t\t\tFile file = new File(directory,fileName);\r\n\t\t\t\r\n\t\t\t// create mp3 file with this weather announcement\r\n\t\t\tlog.fine(\"text to speech conversion: text=\"+text+\" filename=\"+file);\r\n\t\t\t\r\n\t\t\t// translate into mp3 stream\r\n\t\t\ttry{\r\n\t text=java.net.URLEncoder.encode(text, \"UTF-8\");\r\n\t //URL url = new URL(\"http://translate.google.com/translate_tts?tl=de&ie=UTF-8&q=\"+text+\"&total=1&idx=0&client=alarmpi\");\r\n\t \r\n\t Map<String, String> requestParams = new HashMap<>();\r\n\t requestParams.put(\"key\", \"f5d762f987f34397b350af6563ffb818\");\r\n\t requestParams.put(\"hl\", \"de-de\");\r\n\t requestParams.put(\"c\", \"MP3\");\r\n\t requestParams.put(\"src\", text);\r\n\t \r\n\t\t\t\tString encodedURL = requestParams.keySet().stream()\r\n\t \t .map(key -> key + \"=\" + requestParams.get(key))\r\n\t \t .collect(Collectors.joining(\"&\", \"http://api.voicerss.org?\", \"\"));\r\n\t \r\n\t URL url = new URL(encodedURL);\r\n\t log.fine(\"URL=\"+encodedURL);\r\n\t \r\n\t HttpURLConnection urlConn = (HttpURLConnection) url.openConnection();\r\n\t urlConn.addRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36\");\r\n\t InputStream audioSrc = urlConn.getInputStream();\r\n\t DataInputStream read = new DataInputStream(audioSrc);\r\n\t OutputStream outstream = new FileOutputStream(file);\r\n\t byte[] buffer = new byte[1024];\r\n\t int len;\r\n\t int totalLength = 0;\r\n\t while ((len = read.read(buffer)) > 0) {\r\n\t \toutstream.write(buffer, 0, len);\r\n\t \ttotalLength += len;\r\n\t }\r\n\t outstream.close();\r\n\t log.fine(\"text2speech byteount=\"+totalLength);\r\n\t \r\n\t if(totalLength<1024) {\r\n\t \t// this indicates a problem...\r\n\t \tlog.severe(\"text2speech conversion returns less than 1k data\");\r\n\t }\r\n\t \r\n\t \t\t// update mpd database\r\n\t SoundControl.getSoundControl().update();\r\n\t \r\n\t return true;\r\n\t\t\t} catch(IOException e){\r\n\t\t\t\tlog.severe(\"Exception in text to speech conversion: \"+e.getMessage());\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tlog.warning(\"Text to speech conversion called with empty text\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private String processAudio(Map<String, String[]> params, String lang, KoncepteParaula k) throws IOException {\n\t\tProperties props;\n\t\ttry {\n\t\t\tprops = PFCUtils.getProperties(PFCConstants.KEY_PROPERTIES_SERVER_FILE);\n\t\t} catch (Exception e) {\n\t\t\tthrow new IOException(\"Error looking for properties file.\");\n\t\t}\n\n\t\tString folder = props.getProperty(PFCConstants.PROPERTY_MP3_ROOT) + System.getProperty(\"file.separator\") + lang;\n\n\t\tString audio = null;\n\t\tif (lang.equals(PFCConstants.LANG_CAT)) {\n\t\t\taudio = getParams().get(PFCConstants.HTTP_REQUEST_PARAM_AUDIO_CA)[0];\n\t\t} else if (lang.equals(PFCConstants.LANG_JAP)) {\n\t\t\taudio = getParams().get(PFCConstants.HTTP_REQUEST_PARAM_AUDIO_JP)[0];\n\t\t}\n\n\t\tString path = folder + System.getProperty(\"file.separator\") + k.getId() + \".mp3\";\n\t\tOutputStream out = new FileOutputStream(new File(path));\n\t\ttry {\n\t\t\tPFCUtils.saveBase64(audio, out);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new IOException(\"Cannot save in Base64!\");\n\t\t}\n\n\t\treturn path;\n\t}", "public void File2()throws IOException{\r\n\t//String SERVER = \"127.0.0.1\";\r\n\t//String SERVER = \"192.168.173.148\";\r\n\t//int SOCKET_PORT1 = 13267;\r\n\tint SOCKET_PORT2 = 3333;\r\n\t// you may change this\r\n\t\t//public final static String FILE_TO_SEND = \"E:/Musics/Videos/लॉलीपॉप लागेलू - Pawan Singh - Lollypop Lagelu - Bhojpuri Hot Songs HD_HD.mp4\"; // you may change this\r\n\t\r\n\t\t// FileInputStream fis = null;\r\n\t\t// BufferedInputStream bis = null;\r\n\t\t// OutputStream os = null;\r\n\t\t DataOutputStream dout=null;\r\n\t\t// Socket sock1 = null;\r\n\t\t Socket sock2 = null;\r\n\t\t // int j=0;\r\n\t\t// Scanner sc = null;\r\n\t\t // while(true){\r\n\t\t for(String filename:Main.getFILE_TO_RECEIVE_LIST()){ \t \r\n\t\t try {\r\n\t\t \t\r\n\t\t // sock = servsock.accept();\r\n\t\t // \tsock1 = new Socket(SERVER, SOCKET_PORT1);\r\n\t\t \tsock2 = new Socket(Main.getConnectIp(), SOCKET_PORT2);\r\n\t\t\t // System.out.println(\"Connecting...\");\r\n\r\n\t\t // System.out.println(\"Accepted connection : \" + sock);\r\n\t\t // send file:\r\n\t\t\t \r\n\t\t\t \t// for(String selectedFN:FILE_TO_RECEIVE_LIST){\r\n\t\t\t // \t String selectedFN=selectedFP.substring(selectedFP.lastIndexOf(\"\"\\\"\")+1);\"\r\n\t //setFILE_TO_RECEIVED(filename);\r\n\t\t \t\t// File myFile = new File (selectedFP); \r\n\t\t // File myFile = new File (selectedFP);\r\n\t\t // byte [] mybytearray = new byte [1024];\r\n\t\t // fis = new FileInputStream(myFile);\r\n\t\t // sc = new Scanner(fis, \"UTF-8\");\r\n\t\t // bis = new BufferedInputStream(fis);\r\n\t\t \r\n\t\t // bis.read(mybytearray,0,mybytearray.length);\r\n\t\t // sc.read\r\n\t\t // sc.\r\n\t\t // os = sock1.getOutputStream();\r\n\t\t // System.out.println(\"Sending \" + selectedFN + \"(\" + mybytearray.length + \" bytes)\");\r\n\t\t\t \r\n\t\t dout=new DataOutputStream(sock2.getOutputStream()); \r\n\t \t\t dout.writeUTF(filename); \r\n\t\t // os.write(mybytearray,0,mybytearray.length);\r\n\t\t \r\n\t\t // os.flush();\r\n\t\t // dout.flush(); \r\n\t\t // j++;\r\n\t\t // dout.close(); \r\n\t\t // System.out.println(\"Done.\");\r\n\t\t \r\n\t\t\t \t// }\r\n\t\t\t \t \r\n\t\t\t // }\r\n\t\t \t \r\n\t\t \r\n\t\t\t // System.out.println(\"all send file name\"); \r\n\t\t \r\n\t\t \t } finally {\r\n\t\t // if (bis != null) bis.close();\r\n\t\t \r\n\t\t // if (os != null) os.close();\r\n\t\t \t if (dout != null) dout.close();\r\n\t\t // if (sock1!=null) sock1.close();\r\n\t\t if (sock2!=null) sock2.close();\r\n\t\t \r\n\t\t }\r\n\t\t // System.out.println(\"all name send\");\r\n\t\t \r\n\t\t }\r\n\t\t \r\n\t\t\r\n}", "public int receive_data(String filename) {\r\n\tif (_socket == null) {\r\n\t\tSystem.out.println(\"no socket\");\r\n\t\treturn 2;\r\n\t}\r\n\t\r\n\tDataInputStream inputStream = null;\r\n\t\r\n\ttry {\r\n\t\t// retreve the stream\r\n\t\tinputStream = _socket.getInputStream();\r\n\t\t\r\n\t} catch (Exception e) {\r\n\t\tSystem.out.println(\"getInputStream() failed\");\r\n\t\treturn 2;\r\n\t}\r\n\t\r\n\ttry {\r\n\t\tString msg_received;\r\n\t\t// send verification information\r\n\t\t_socket.send_msg(\"i love ex machina\");\r\n\t\t\r\n\t\t// get hands shaked\r\n\t\tmsg_received = _socket.receive_msg();\r\n\t\tif (msg_received.equals(\"machina\")) {\r\n\t\t\tSystem.out.println(\"get machina. cool!\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"hand shake failed.\");\r\n\t\t\t_socket.disconnect();\r\n\t\t\treturn 2;\r\n\t\t}\r\n\t\t\r\n\t\t// send ur real need\r\n\t\t_socket.send_msg(\"need a file\");\r\n//\t\t_socket.send_msg(\"list all files\");\r\n\t\tmsg_received = _socket.receive_msg();\r\n\t\t\r\n\t\t// send required filename\r\n\t\t_socket.send_msg(filename);\r\n\t\t\r\n\t // 接收part1, which is filename\r\n\t String fullname = _socket.receive_msg();\r\n _socket.send_msg(\"ok\");\r\n\t if (!fullname.equals(filename))\r\n\t {\r\n\t\t System.out.println(fullname);\r\n\t\t System.out.println(\"file does not exist in the server.\\n\");\r\n\t\t\t _socket.disconnect();\r\n\t\t\t return 3;\r\n\t }\r\n\t \r\n\t System.out.println(fullname + \" is good.\");\r\n\t fullname = _savedir + fullname; \r\n\r\n\t // receive part2, which is file size. \r\n\t long filesize = Integer.parseInt(_socket.receive_msg());\r\n\t _socket.send_msg(\"ok\");\r\n\t System.out.println(\"file length: \" + filesize + \"\\n\");\r\n\r\n\t // 用于接收二进制文件流的stream, get ready for receiving the third part, which is the binary content\r\n\t DataOutputStream fileStream = null;\r\n\t try {\r\n\t\t FileOutputStream fileoutputStream = new FileOutputStream(fullname);\r\n\t\t BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(fileoutputStream);\r\n\t\t fileStream = new DataOutputStream(bufferedOutputStream);\r\n \t } catch (Exception e1) {\r\n\t\t\ttry {\r\n\t\t\t\tinputStream.close();\r\n\t\t\t} catch (IOException e2) {\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"file IO errer: \" + fullname);\r\n\t\t\treturn 1;\r\n \t }\r\n\t \r\n\t System.out.println(\"receiving file...\");\r\n\t \r\n\t // make some room for showing the progress percentage\r\n\t System.out.print(\"transfering: \");\r\n\t _lastpercentage_len = 0;\r\n\t String percent_show = \"what?\";\r\n\t \r\n\t int receive_total = 0;\r\n\t int bufferSize = 16384;\r\n\t byte[] receive_buff = new byte[bufferSize];\r\n\t // start to receive\r\n\t while (true) {\r\n\t \t int receive_current = 0;\r\n\t \t if (inputStream != null) {\r\n\t \t\t // beware that buffsize. only receive that amount of data each time\r\n\t \t\t receive_current = inputStream.read(receive_buff);\r\n\t \t }\r\n\t \t \r\n\t \t if (receive_current != -1){\r\n\t \t\t receive_total += receive_current;\r\n\t \t } else {\r\n\t \t\t break;\r\n\t \t }\r\n\r\n\t \t // just save those binary to file\r\n\t \t try {\r\n\t \t\t fileStream.write(receive_buff, 0, receive_current);\r\n\t \t } catch (Exception e1) {\r\n \t\t\ttry {\r\n \t\t\t\tinputStream.close();\r\n \t\t\t} catch (IOException e2) {\r\n \t\t\t\te1.printStackTrace();\r\n \t\t\t}\r\n \t\t\tSystem.out.println(\"file IO errer: \" + fullname);\r\n \t\t\treturn 1;\r\n\t \t }\r\n\t \t \r\n\t \t percent_show = 100.0 * receive_total / filesize + \"%\";\r\n\t \t for (int i=0; i<_lastpercentage_len; i++) {\r\n\t \t\t System.out.print('\\b');\r\n\t \t }\r\n\t \t System.out.print(percent_show);\r\n\t \t for (int i=percent_show.length(); i<_lastpercentage_len; i++) {\r\n\t \t\t System.out.print(' ');\r\n\t \t }\r\n\t \t for (int i=percent_show.length(); i<_lastpercentage_len; i++) {\r\n\t \t\t System.out.print('\\b');\r\n\t \t }\r\n\t \t _lastpercentage_len = percent_show.length();\r\n\t }\r\n\t \r\n\t fileStream.close();\r\n \t for (int i=0; i<_lastpercentage_len; i++) {\r\n \t\t System.out.print('\\b');\r\n \t }\r\n\t \r\n\t if (receive_total == filesize) {\r\n\t \t System.out.print(\"100%\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003\\n\");\r\n\t \t System.out.println(\"\\nfile received: \" + fullname + \"\\n\");\r\n\t } else {\r\n\t \t System.out.println(\"\\nonly partial file was received!!! \" + \"file saved to \" + fullname + \"\\n\");\r\n\t }\r\n\t} catch (Exception e) {\r\n\t\ttry {\r\n\t\t\tinputStream.close();\r\n\t\t} catch (IOException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\tSystem.out.println(\"oh boy, don't know where to start it.\" + \"\\n\");\r\n\t\treturn 2;\r\n\t}\r\n\r\n\ttry {\r\n\t\tinputStream.close();\r\n\t} catch (IOException e1) {\r\n\t\te1.printStackTrace();\r\n\t}\r\n\r\n\treturn 0;\r\n}", "public void playSound(File soundFile);", "public void play() {\n\n\t\tString[] args = new String[] { recordingsPath };\n\t\tGst.init(\"AudioPlayer\", args);\n\n\t\tplaybin = new PlayBin2(\"AudioPlayer\");\n\t\tplaybin.setVideoSink(ElementFactory.make(\"fakesink\", \"videosink\"));\n\t\tplaybin.setInputFile(new File(gui.getSelectedPlayItem()));\n\n\t\tplaybin.play();\n\n\t}", "void sendFile() {\r\n\t\t// 특정 클라이언트에게 파일을 보냄\r\n\t}", "public void startSending() {\n if (shouldSend) {\n return;\n }\n shouldSend = true;\n\n DiscordApiImpl api = (DiscordApiImpl) connection.getChannel().getApi();\n api.getThreadPool().getSingleThreadExecutorService(threadName).submit(() -> {\n try {\n long nextFrameTimestamp = System.nanoTime();\n boolean dontSleep = true;\n boolean speaking = false;\n long framesOfSilenceToPlay = 5;\n while (shouldSend) {\n // Get the current audio source. If none is available, it will block the thread\n AudioSource source = connection.getCurrentAudioSourceBlocking();\n if (source == null) {\n logger.error(\"Got null audio source without being interrupted ({})\", connection);\n return;\n }\n\n if (source.hasFinished()) {\n connection.removeAudioSource();\n dontSleep = true;\n\n // Dispatch AudioSourceFinishedEvent AFTER removing the source.\n // Otherwise, AudioSourceFinishedEvent#getNextSource() won't work\n api.getEventDispatcher().dispatchAudioSourceFinishedEvent(\n (ServerImpl) connection.getServer(),\n connection,\n ((AudioSourceBase) source).getDelegate(),\n new AudioSourceFinishedEventImpl(source, connection));\n continue;\n }\n\n AudioPacket packet = null;\n byte[] frame = source.hasNextFrame() ? source.getNextFrame() : null;\n\n // If the source is muted, replace the frame with a muted frame\n if (source.isMuted()) {\n frame = null;\n }\n\n if (frame != null || framesOfSilenceToPlay > 0) {\n if (!speaking && frame != null) {\n speaking = true;\n connection.setSpeaking(true);\n }\n packet = new AudioPacket(frame, ssrc, sequence, ((int) sequence) * 960);\n // We can stop sending frames of silence after 5 frames\n if (frame == null) {\n framesOfSilenceToPlay--;\n if (framesOfSilenceToPlay == 0) {\n speaking = false;\n connection.setSpeaking(false);\n }\n } else {\n framesOfSilenceToPlay = 5;\n }\n }\n\n nextFrameTimestamp = nextFrameTimestamp + 20_000_000;\n\n sequence++;\n\n if (packet != null) {\n packet.encrypt(secretKey);\n }\n try {\n if (dontSleep) {\n nextFrameTimestamp = System.nanoTime() + 20_000_000;\n dontSleep = false;\n } else {\n Thread.sleep(Math.max(0, nextFrameTimestamp - System.nanoTime()) / 1_000_000);\n }\n if (packet != null) {\n socket.send(packet.asUdpPacket(address));\n }\n } catch (IOException e) {\n logger.error(\"Failed to send audio packet for {}\", connection);\n }\n }\n } catch (InterruptedException e) {\n if (shouldSend) {\n logger.debug(\"Got interrupted unexpectedly while waiting for next audio source packet\");\n }\n }\n });\n }", "public void transferFile() {\n\t\t// create file event and set client and server path\n\t\tfileEvent = new FileEvent();\n\t\tfileEvent.setClientPath(clientPath);\n\t\tfileEvent.setServerPath(serverPath);\n\t\t\n\t\t// get client name and set filename\n\t\tFile file = new File(clientPath);\n\t\tString name = clientPath.substring(clientPath.lastIndexOf(\"/\") + 1, \n\t\t\t\t\t\tclientPath.length());\n\t\tfileEvent.setFilename(name);\n\t\t\n\t\t// checks if the file exists in the path mentioned or sets valid to No\n\t\tif (file.isFile()) {\n\t\t\t//creates input stream setup the data in byte arrays\n\t\t\tDataInputStream inStream = null;\n\t\t\ttry {\n\t\t\t\tinStream = new DataInputStream(new FileInputStream(file));\n\t\t\t\tlong length = (int) file.length();\n\t\t\t\tbyte[] byteArray = new byte[(int) length];\n\t\t\t\tint start = 0;\n\t\t\t\tint last = 0;\n\t\t\t\tint rest = inStream.read(byteArray, start, \n\t\t\t\t\t\t\t\t\t\t\tbyteArray.length - start);\n\t\t\t\twhile (start < byteArray.length && (last = rest) >= 0) {\n\t\t\t\t\tstart = start + last;\n\t\t\t\t}\n\t\t\t\tfileEvent.setFileSize(length);\n\t\t\t\tfileEvent.setFileData(byteArray);\n\t\t\t\tfileEvent.setValid(\"Yes\");\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tfileEvent.setValid(\"No\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Path does not exist.\");\n\t\t\tfileEvent.setValid(\"No\");\n\t\t}\n\t\t// Start sending the data byte array\n\t\ttry {\n\t\t\toutStream.writeObject(fileEvent);\n\t\t\tSystem.out.println(\"Done...\");\n\t\t\tThread.sleep(5000);\n\t\t\tSystem.exit(0);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Override\r\n\tpublic void play(String audioType, String fileName) {\n\t\tif(audioType.equals(\"mp3\")) {\r\n\t\t\tSystem.out.println(\"Playing mp3\");\r\n\t\t\t\r\n\t\t}else if(audioType.equals(\"mp4\") || audioType.equals(\"vlc\")) {\r\n\t\t\tmediaAdpater = new MediaAdapter(audioType);\r\n\t\t\tmediaAdpater.play(audioType, fileName);\r\n\t\t}\r\n\t\t\r\n\t}", "void receiveFile(String fileName, int port) throws IOException;", "public void sendRequest(){\n fileServer.sendMessage(this.packet,new FileNode(ip,port));\n }", "public void OnFileIncoming(int length);", "@FXML\r\n void btnspeechClick(MouseEvent event) {\n \t\r\n \t setService();\r\n setHeader();\r\n \r\n System.out.println(service);\r\n \r\n InputStream stream = service.synthesize(\r\n taContent.getText(), // 변경할 문자열\r\n \tVoice.EN_LISA, // voice 선택\r\n \tAudioFormat.WAV // 출력할 오디오 포멧 형식 \r\n ).execute();\r\n // 음성데이터를 저장하기\r\n try {\r\n InputStream in = WaveUtils.reWriteWaveHeader(stream);\r\n //WaveUtils.\r\n \r\n OutputStream os = new FileOutputStream(\"d:/d_other/AIData/test12.wav\");\r\n \r\n byte[] tmp = new byte[1024];\r\n int len = 0;\r\n \r\n while((len = in.read(tmp)) != -1) {\r\n os.write(tmp, 0, len);\r\n }\r\n os.flush();\r\n \r\n os.close();\r\n in.close();\r\n stream.close();\r\n \r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n \r\n music();\r\n\r\n }", "@Override\n public void run() {\n // We're important...\n android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_URGENT_AUDIO);\n\n // Allocate Recorder and Start Recording...\n int minBufferSize = AudioRecord.getMinBufferSize(sampleRate, channelConfig, audioEncoding);\n if (AudioRecord.ERROR_BAD_VALUE == minBufferSize || AudioRecord.ERROR == minBufferSize){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n showDialog(\"Error recording audio\", \"Your audio hardware doesn't support the sampling rate you have specified.\" +\n \"Try a lower sampling rate, if that doesn't work your audio hardware might be broken.\");\n actionButton.performClick();\n }\n });\n return;\n }\n int bufferSize = 2 * minBufferSize;\n AudioRecord recordInstance =\n new AudioRecord(MediaRecorder.AudioSource.MIC, sampleRate, channelConfig, audioEncoding,\n bufferSize);\n if (recordInstance.getState() != AudioRecord.STATE_INITIALIZED) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n showDialog(\"Error recording audio\", \"Unable to access the audio recording hardware - is your mic working?\");\n actionButton.performClick();\n }\n });\n return;\n }\n\n byte[] tempBuffer = new byte[bufferSize];\n\n String sdDirectory = Environment.getExternalStorageDirectory().toString();\n outFile = new File(sdDirectory + \"/\" + filename);\n rawFile = new File(sdDirectory+\"/\"+rawFileName);\n if (outFile.exists())\n outFile.delete();\n\n FileOutputStream outStream = null;\n FileOutputStream rawOutputStream = null;\n try {\n outFile.createNewFile();\n rawFile.createNewFile();\n outStream = new FileOutputStream(outFile);\n rawOutputStream = new FileOutputStream(rawFile);\n outStream.write(createHeader(0));// Write a dummy header for a file of length 0 to get updated later\n } catch (Exception e) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n showDialog(\"Error creating file\", \"The WAV file you specified \"\n + \"couldn't be created. Try again with a \" + \"different filename.\");\n outFile = null;\n actionButton.performClick();\n }\n });\n return;\n }\n\n recordInstance.startRecording();\n\n try {\n while (isListening) {\n recordInstance.read(tempBuffer, 0, bufferSize);\n outStream.write(tempBuffer);\n rawOutputStream.write(tempBuffer);\n }\n } catch (final IOException e) {\n runOnUiThread(new Runnable() {\n\n @Override\n public void run() {\n showDialog(\"IO Exception\", \"An exception occured when writing to disk or reading from the microphone\\n\"\n + e.getLocalizedMessage()\n + \"\\nWhat you have recorded so far should be saved to disk.\");\n actionButton.performClick();\n }\n\n });\n } catch (OutOfMemoryError om) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n showDialog(\"Out of memory\", \"The system has been \" + \"too strong for too long - but what you \"\n + \"recorded up to now has been saved.\");\n System.gc();\n actionButton.performClick();\n }\n });\n }\n\n // we're done recording\n Log.d(\"Capture\", \"Stopping recording\");\n recordInstance.stop();\n try {\n outStream.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onReceive(Context arg0, Intent arg1) {\n\n String action=arg1.getAction();\n if(action.equals(\"com.example.musicplayer.play\"))\n {\n mp.start();\n control_functions(PLAY);\n }\n else if(action.equals(\"com.example.musicplayer.pause\"))\n {\n mp.pause();\n control_functions(PAUSE);\n }\n else if(action.equals(\"com.example.musicplayer.next\"))\n {\n try\n {\n String name=arg1.getStringExtra(\"name\");\n Uri uri = Uri.parse(name);//Environment.getExternalStorageDirectory().getPath()+\"/songs/\"+name);\n mp.reset();\n mp.setDataSource(arg0, uri);\n mp.setAudioStreamType(AudioManager.STREAM_MUSIC);\n mp.setLooping(true);\n mp.prepare();\n mp.start();seek.setMax(mp.getDuration());\n }catch (Exception e) {\n // TODO: handle exception\n }\n }\n else if(action.equals(\"com.example.musicplayer.previous\"))\n {\n try\n {\n String name=arg1.getStringExtra(\"name\");\n Uri uri = Uri.parse(name);//Environment.getExternalStorageDirectory().getPath()+\"/songs/\"+name);\n mp.reset();\n mp.setDataSource(arg0, uri);\n mp.setAudioStreamType(AudioManager.STREAM_MUSIC);\n mp.setLooping(true);\n mp.prepare();\n mp.start();\n seek.setMax(mp.getDuration());\n }catch (Exception e) {\n // TODO: handle exception\n }\n }\n\n else if(action.equals(\"com.example.musicplayer.frmList\"))\n {\n //Toast.makeText(SongService.this, \"previous\", 1).show();\n try\n {\n String name=arg1.getStringExtra(\"name\");\n Uri uri = Uri.parse(name);//Environment.getExternalStorageDirectory().getPath()+\"/songs/\"+name);\n filePath=uri.getPath();\n //Toast.makeText(getApplicationContext(),name,1).show();\n mp.reset();\n mp.setDataSource(arg0, uri);\n mp.setAudioStreamType(AudioManager.STREAM_MUSIC);\n mp.setLooping(true);\n mp.prepare();\n mp.start();\n seek.setMax(mp.getDuration());\n seek.setOnSeekBarChangeListener((SeekBar.OnSeekBarChangeListener) arg0);\n control_functions(NEW);\n new sendSong().execute();\n } catch (Exception e) {\n // TODO: handle exception\n }\n }\n else if(action.equals(\"com.example.musicplayer.frwd\"))\n {\n if(mp.getDuration()-mp.getCurrentPosition()>1250)\n {\n mp.seekTo(mp.getCurrentPosition()+1250);\n }\n else\n {\n mp.seekTo(mp.getDuration());\n }\n }\n else if(action.equals(\"com.example.musicplayer.rvrse\"))\n {\n if(mp.getCurrentPosition()>1250)\n {\n mp.seekTo(mp.getCurrentPosition()-1250);\n }\n else\n {\n mp.seekTo(0);\n }\n }\n else if(action.equals(\"com.example.musicplayer.jststarted\"))\n {\n if(mp.isPlaying())\n {\n CreateGroup.play_pause.setText(\"PAUSE\");\n }\n }\n else if(action.equals(\"com.example.musicplayer.seekBar\"))\n {\n seek=CreateGroup.seek;\n seek.setMax(mp.getDuration());\n seek.setOnSeekBarChangeListener((SeekBar.OnSeekBarChangeListener) arg0);\n //seek.setProgress(0);\n }\n else if(action.equals(\"com.example.musicplayer.addlist\"))\n {\n ArrayList<MusicData> list=arg1.getParcelableArrayListExtra(\"list\");\n }\n else if(action.equals(\"com.example.musicplayer.seekBarComp\"))\n {\n try\n {\n String name=arg1.getStringExtra(\"name\");\n Uri uri = Uri.parse(Environment.getExternalStorageDirectory().getPath()+\"/songs/\"+name);\n mp.reset();\n mp.setDataSource(arg0, uri);\n mp.setAudioStreamType(AudioManager.STREAM_MUSIC);\n mp.setLooping(true);\n mp.prepare();\n mp.start();seek.setMax(mp.getDuration());\n }catch (Exception e) {\n // TODO: handle exception\n }\n }\n }", "public void ReproduceAudio() { \r\n\t\ttry {\r\n\t\t\t//en caso de que como nombre pongas \"undertale\" la musica sera diferente.\r\n\t\t\tif (Menu.jugador.equals(\"undertale\") || Menu.jugador.equals(\"Undertale\")) {\r\n\t\t\t\trepro.AbrirFichero(\"C:\\\\Temp\\\\Sonidos\\\\undertale.wav\");\r\n\t\t\t\t//emppieza la musica\r\n\t\t\t\trepro.Play();\r\n\t\t\t//musica por defecto\r\n\t\t\t} else {\r\n\t\t\t\trepro.AbrirFichero(\"C:\\\\Temp\\\\Sonidos\\\\tetris.mp3\");\r\n\t\t\t\trepro.Play();\r\n\t\t\t}\t\r\n\t\t} catch (Exception ex) {\r\n\t\t\tSystem.out.println(\"Error: \" + ex.getMessage());\r\n\t\t}\r\n\t}", "public void AudioMuerte() {\r\n\t\ttry {\r\n\t\t\tdeath.AbrirFichero(\"C:\\\\Temp\\\\Sonidos\\\\golpe.wav\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Error: \" + e);\r\n\t\t}\r\n\t}", "@Override\n public void onWebRtcAudioRecordSamplesReady(JavaAudioDeviceModule.AudioSamples samples) {\n // The native audio layer on Android should use 16-bit PCM format.\n if (samples.getAudioFormat() != AudioFormat.ENCODING_PCM_16BIT) {\n Log.e(TAG, \"Invalid audio format\");\n return;\n }\n synchronized (lock) {\n // Abort early if stop() has been called.\n if (!isRunning) {\n return;\n }\n // Open a new file for the first callback only since it allows us to add audio parameters to\n // the file name.\n if (rawAudioFileOutputStream == null) {\n openRawAudioOutputFile(samples.getSampleRate(), samples.getChannelCount());\n fileSizeInBytes = 0;\n }\n }\n // Append the recorded 16-bit audio samples to the open output file.\n executor.execute(() -> {\n if (rawAudioFileOutputStream != null) {\n try {\n // Set a limit on max file size. 58348800 bytes corresponds to\n // approximately 10 minutes of recording in mono at 48kHz.\n if (fileSizeInBytes < MAX_FILE_SIZE_IN_BYTES) {\n // Writes samples.getData().length bytes to output stream.\n rawAudioFileOutputStream.write(samples.getData());\n fileSizeInBytes += samples.getData().length;\n }\n } catch (IOException e) {\n Log.e(TAG, \"Failed to write audio to file: \" + e.getMessage());\n }\n }\n });\n }", "private void recordMessage() {\n if (!listening) {\n capture = microphoneHelper.getInputStream(true);\n new Thread(() -> {\n try {\n speechService.recognizeUsingWebSocket(getRecognizeOptions(capture), new MicrophoneRecognizeDelegate());\n } catch (Exception e) {\n showError(e);\n }\n }).start();\n listening = true;\n Toast.makeText(WatsonActivity.this, \"Listening....Click to Stop\", Toast.LENGTH_LONG).show();\n\n } else {\n try {\n microphoneHelper.closeInputStream();\n listening = false;\n Toast.makeText(WatsonActivity.this, \"Stopped Listening....Click to Start\", Toast.LENGTH_LONG).show();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }\n }", "void onFinishRecord(File voiceFile, int duration);", "private synchronized void sendSound(Storage storage) {\n clear();\n try{\n objOut.flush();\n objOut.writeObject(storage);\n objOut.flush();\n } catch (IOException e) {\n System.out.println(\"Problem while sending sound \" + e.getMessage());\n e.printStackTrace();\n System.exit(1);\n }\n }", "private void generateAudio() {\n soundHandler.generateTone();\n }", "String sound();", "private void sendFile(String fileName) throws IOException {\n // Read file from disk\n //\n fileReader = new MyFileReader();\n byte[] data = fileReader.readFile(fileName);\n //\n // Send binary data over the TCP/IP socket connection\n //\n for (byte i : data) {\n this.socket.getOutputStream().write(i);\n }\n\n System.out.println(\"\\r\\nSent \" + data.length + \" bytes to server.\");\n }", "public void run() {\n //Request the HTML\n try {\n MediaPlayer mPlayer = new MediaPlayer();\n mPlayer.setDataSource(\"http://www.vocalware.com/tts/gen.php?EID=3&LID=1&VID=3&TXT=Hello%2C+I+am+Aai+ra.+Please+let+me+know+your+requirement&EXT=mp3&FX_TYPE=&FX_LEVEL=&ACC=5463643&API=2458605&SESSION=&HTTP_ERR=&CS=3d6cc3b337f4f96a08ed260c90782c3b\");\n mPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);\n mPlayer.prepare();\n mPlayer.start();\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n }\n }", "public SimpleAudioPlayer(String filePath) \r\n throws UnsupportedAudioFileException, \r\n IOException, LineUnavailableException \r\n { \r\n // create AudioInputStream object \r\n audioInputStream = \r\n AudioSystem.getAudioInputStream(new File(filePath).getAbsoluteFile()); \r\n \r\n // create clip reference \r\n clip = AudioSystem.getClip(); \r\n \r\n // open audioInputStream to the clip \r\n clip.open(audioInputStream); \r\n \r\n clip.loop(Clip.LOOP_CONTINUOUSLY); \r\n }", "public void OnFileDataReceived(byte[] data,int read, int length, int downloaded);", "@Override\n\t\tpublic void run() {\n\t\t\tmFiles = DataSourceManager.getSongFileList(currentAlbumPath);\n\t\t\tif (mFiles == null || mFiles.length == 0) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (mPlayPos < 0 || mPlayPos > mFiles.length -1) {\n\t\t\t\tmPlayPos = 0;\n\t\t\t}\n\t\t\t/*Message msg = mMediaplayerHandler.obtainMessage(PREPARE_PLAY);\n\t\t\tif (msg == null) {\n\t\t\t\tmsg = new Message();\n\t\t\t\tmsg.what = PREPARE_PLAY;\n\t\t\t\t\n\t\t\t}\n\t\t\tBundle data = new Bundle();\n\t\t\tdata.putString(MSG_PLAY_PATH, mFiles[mPlayPos]);\n\t\t\tdata.putInt(MSG_PLAY_POSITION, mSeek);\n\t\t\tmsg.setData(data);\n\t\t\tmMediaplayerHandler.sendMessage(msg);*/\n\t\t\t\n\t\t\tsendHandlerInitialized(mFiles[mPlayPos], false);\n\t\t}", "public void playSound() {\n String path = \"Data\\\\\\\\Acceptance.wav\";\n InputStream success;\n try {\n success = new FileInputStream(new File(path));\n AudioStream audioStream = new AudioStream(success);\n AudioPlayer.player.start(audioStream);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Error playing sounds\");\n }\n }", "public static void play(String filename) {\r\n javax.sound.sampled.Clip sonido;\r\n InputStream path=load(filename);\r\n \r\n try\r\n {\r\n sonido=AudioSystem.getClip();\r\n sonido.open(AudioSystem.getAudioInputStream(new BufferedInputStream(path)));\r\n sonido.start();\r\n\r\n }catch(Exception fallo)\r\n {\r\n \r\n }\r\n }", "private void handleRetr(String file) {\n File f = new File(currDirectory + fileSeparator + file);\n\n if (!f.exists()) {\n sendMsgToClient(\"550 File does not exist\");\n }\n\n else {\n\n // Binary mode\n if (transferMode == transferType.BINARY) {\n BufferedOutputStream fout = null;\n BufferedInputStream fin = null;\n\n sendMsgToClient(\"150 Opening binary mode data connection for requested file \" + f.getName());\n\n try {\n // create streams\n fout = new BufferedOutputStream(dataConnection.getOutputStream());\n fin = new BufferedInputStream(new FileInputStream(f));\n } catch (Exception e) {\n debugOutput(\"Could not create file streams\");\n }\n\n debugOutput(\"Starting file transmission of \" + f.getName());\n\n // write file with buffer\n byte[] buf = new byte[1024];\n int l = 0;\n try {\n while ((l = fin.read(buf, 0, 1024)) != -1) {\n fout.write(buf, 0, l);\n }\n } catch (IOException e) {\n debugOutput(\"Could not read from or write to file streams\");\n e.printStackTrace();\n }\n\n // close streams\n try {\n fin.close();\n fout.close();\n } catch (IOException e) {\n debugOutput(\"Could not close file streams\");\n e.printStackTrace();\n }\n\n debugOutput(\"Completed file transmission of \" + f.getName());\n\n sendMsgToClient(\"226 File transfer successful. Closing data connection.\");\n\n }\n\n // ASCII mode\n else {\n sendMsgToClient(\"150 Opening ASCII mode data connection for requested file \" + f.getName());\n\n BufferedReader rin = null;\n PrintWriter rout = null;\n\n try {\n rin = new BufferedReader(new FileReader(f));\n rout = new PrintWriter(dataConnection.getOutputStream(), true);\n\n } catch (IOException e) {\n debugOutput(\"Could not create file streams\");\n }\n\n String s;\n\n try {\n while ((s = rin.readLine()) != null) {\n rout.println(s);\n }\n } catch (IOException e) {\n debugOutput(\"Could not read from or write to file streams\");\n e.printStackTrace();\n }\n\n try {\n rout.close();\n rin.close();\n } catch (IOException e) {\n debugOutput(\"Could not close file streams\");\n e.printStackTrace();\n }\n sendMsgToClient(\"226 File transfer successful. Closing data connection.\");\n }\n\n }\n closeDataConnection();\n\n }", "@Override\n\tpublic void play(String audioType, String fileName) {\n\t\tif(audioType.equalsIgnoreCase(\"mp3\")) {\n\t\t\tSystem.out.println(\"Playing mp3 file name : \"+ fileName);\n\t\t}\n\t\telse if ((audioType.equalsIgnoreCase(\"vlc\")) ||(audioType.equalsIgnoreCase(\"mp4\"))) {\n\t\t\tmediaAdapter = new MediaAdapter(audioType);\n\t\t\tmediaAdapter.play(audioType, fileName);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Invalid media type : \" + audioType + \" not supported.\");\n\t\t}\n\t}", "public void record() {\n if (mCarContext.checkSelfPermission(RECORD_AUDIO)\n != PackageManager.PERMISSION_GRANTED) {\n CarToast.makeText(mCarContext, \"Grant mic permission on phone\",\n CarToast.LENGTH_LONG).show();\n List<String> permissions = Collections.singletonList(RECORD_AUDIO);\n mCarContext.requestPermissions(permissions, (grantedPermissions,\n rejectedPermissions) -> {\n if (grantedPermissions.contains(RECORD_AUDIO)) {\n record();\n }\n });\n return;\n }\n CarAudioRecord record = CarAudioRecord.create(mCarContext);\n\n Thread recordingThread =\n new Thread(\n () -> doRecord(record),\n \"AudioRecorder Thread\");\n recordingThread.start();\n }", "public byte[] getBinary() throws IOException {\n\r\n String contentType = null;\r\n int contentLength = -1;\r\n\r\n // a little weird - this will throw NoSuchElementException\r\n // if nothing was recieved\r\n contentType = connection.getContentType();\r\n contentLength = connection.getContentLength();\r\n\r\n log.info(\"contentType {} contentLength {}\", contentType, contentLength);\r\n\r\n InputStream raw;\r\n byte[] data = null;\r\n int initSize = (contentLength == -1) ? 65536 : contentLength;\r\n ByteArrayOutputStream bos = new ByteArrayOutputStream(initSize);\r\n InputStream in = null;\r\n // try {\r\n raw = connection.getInputStream();\r\n in = new BufferedInputStream(raw);\r\n\r\n byte[] tmp = new byte[initSize];\r\n int ret;\r\n while ((ret = in.read(tmp)) > 0) {\r\n log.debug(\"read {} bytes\", ret);\r\n bos.write(tmp, 0, ret);\r\n }\r\n /*\r\n * } catch (IOException e) { Logging.logException(e); }\r\n */\r\n\r\n data = bos.toByteArray();\r\n log.info(\"read {} bytes\", data.length);\r\n\r\n try {\r\n if (in != null) {\r\n in.close();\r\n }\r\n } catch (IOException e) {\r\n // don't care\r\n }\r\n\r\n /*\r\n * \r\n * try { // content size sent back data = new byte[contentLength]; int\r\n * bytesRead = 0; int offset = 0; while (offset < contentLength) { bytesRead\r\n * = in.read(data, offset, data.length - offset); if (bytesRead == -1)\r\n * break; offset += bytesRead; } in.close();\r\n * \r\n * if (offset != contentLength) { throw new IOException(\"Only read \" +\r\n * offset + \" bytes; Expected \" + contentLength + \" bytes\"); } } catch\r\n * (IOException e1) { Logging.logException(e1); error = e1.getMessage(); } }\r\n */\r\n\r\n /*\r\n * String filename = u.getFile().substring(filename.lastIndexOf('/') + 1);\r\n */\r\n\r\n /*\r\n * FileOutputStream out; try { out = new FileOutputStream(\"hello.mp3\");\r\n * out.write(data); out.flush(); out.close(); } catch (Exception e) { //\r\n * TODO Auto-generated catch block e.printStackTrace(); }\r\n */\r\n\r\n return data;\r\n }", "@SuppressWarnings(\"VisibleForTests\")\n public static void uploadAudioToFirebase(String fileName, String uniqueIDParam, AppCompatActivity activity) {\n\n File audioFile = new File(fileName);\n Uri uriFromFile = Uri.fromFile(audioFile);\n\n final String uniqueID = UUID.randomUUID().toString();\n final StorageReference filePath = mStorageVoiceTalkers\n .child(mCurrentUser.getId())\n .child(\"audio\")\n .child(uniqueID + \".3gp\");\n final String downloadUri = filePath.getPath();\n int audioDuration = getDuration(audioFile);\n\n\n filePath.putFile(uriFromFile)\n .addOnSuccessListener(taskSnapshot -> {\n StorageReference storageRef = mStorage.getReference().child(downloadUri);\n storageRef.getDownloadUrl().addOnSuccessListener(uri -> {\n String duration = stringForTime(audioDuration);\n addVoiceToMessage(uri, downloadUri, uniqueID, duration);\n\n }).addOnFailureListener(Throwable::getLocalizedMessage);\n\n\n })\n .addOnFailureListener(Throwable::getLocalizedMessage);\n }", "public Result execute() {\r\n\t\tresponse = ServletActionContext.getResponse();\r\n\t\tresponse.setContentType(\"audio/ogg\");\r\n\r\n\t\ttry {\r\n\t\t\tbios = new ByteArrayInOutputStream();\r\n\t\t\tMediaPlayer.getInstance().addStreamer(this);\r\n\r\n\t\t\tThread.sleep(1000); // Buffer for 5 seconds before starting.\r\n\t\t\tstreamOgg();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// An exception will be thrown when the stream is closed.\r\n\t\t} finally {\r\n\t\t\tMediaPlayer.getInstance().removeStreamer(this);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public void sendFile(File file)\n {\n byte [] mybytearray = new byte [(int)file.length()];\n FileInputStream fis;\n try {\n \n fis = new FileInputStream(file);\n BufferedInputStream bis = new BufferedInputStream(fis);\n bis.read(mybytearray,0,mybytearray.length);\n OutputStream os = sock.getOutputStream();\n os.write(mybytearray,0,mybytearray.length);\n os.flush();\n \n } catch (Exception ex) {\n \n }\n\n }", "void player(){\n InputStream in; ////apabila merah -> ALT+ENTER ->input stream ->TOP\n try { ////try {}catch(Exception e){}\n in = new FileInputStream(new File(vpath.getText()));\n AudioStream audios = new AudioStream(in);\n AudioPlayer.player.start(audios);\n } catch (Exception e) {\n e.printStackTrace();\n } \n }", "public void broadcastfile(int size, String file_name, byte[] file){\r\n Server.getUsers().forEach((user) -> {\r\n if(!user.getName().equals(this.name)){\r\n user.sendfile(size, file_name, file);\r\n }\r\n \r\n });\r\n \r\n }", "private void startRecording() {\n myAudioRecorder = new MediaRecorder();\n myAudioRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);\n myAudioRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);\n\n\n Log.i(\"METHOD\", \"Recording exists. File is called: \" + recordedPhrase);\n recordedPhrase = \"audioRecording_\" + num + \".3gp\";\n// recording = new File(Environment.getExternalStorageDirectory(), recordedPhrase);\n myAudioRecorder.setOutputFile(recordedPhrase);\n myAudioRecorder.setAudioEncoder(MediaRecorder.OutputFormat.AMR_NB);\n\n // Record audio while button is held\n try {\n // Start recording\n myAudioRecorder.prepare();\n myAudioRecorder.start();\n Log.i(\"METHOD\", \"Audio recorder prepared\");\n } catch (IOException e){\n e.printStackTrace();\n }\n Toast.makeText(getApplication(), \"Audio recording\", Toast.LENGTH_LONG).show();\n }", "void playTone(){\n t = new Thread() {\n public void run(){\n isRunning = true;\n setPriority(Thread.MAX_PRIORITY);\n\n\n\n audioTrack.play();\n\n for (int i = 0; i < message.length(); i++) {\n\n ASCIIBreaker breaker = new ASCIIBreaker((int)message.charAt(i));\n\n int frequencies[] = breaker.ASCIIToFrequency();\n\n //Generate waves for all different frequencies\n for(int fre : frequencies) {\n audioTrack.write(generateSineInTimeDomain(fre),0,sample_size);\n }\n\n audioTrack.write(generateSineInTimeDomain(7000),0,sample_size);\n }\n\n audioTrack.stop();\n audioTrack.release();\n }\n };\n t.start();\n }", "public void play() {\n\t\ttry {\n\t\t\taudioInput = AudioSystem.getAudioInputStream(this.music);\n\t\t\tclip.open(audioInput);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void sendRecognition() throws IOException {\n dataWriter.writeInt(1);\n dataWriter.flush();\n }", "public interface AudioPlayListener {\n\n\n /**\n * 播放\n * @param url 音频url 包括网络url,本地路径,raw资源文件\n */\n void play(String url,OnAudioPlayListener onAudioPlayListener);\n\n /**\n * 暂停\n */\n void pause();\n\n /**\n * 开始\n */\n void start();\n\n /**\n * 重新播放\n */\n void restart();\n\n\n boolean isPlaying();\n\n\n /**\n * 获取音频时长\n * @return\n */\n long getDuration();\n\n /**\n * 仅仅获取音频时长,由于获取是时长是异步操作,通过回调方式回去\n * @param sourceUrl 音频文件url或者本地路径\n *\n *note 只支持单个音频文件,如果要支持列表多个音频文件,是从服务器端返回总时长\n **/\n void getOnlyDuration(String sourceUrl,OnAudioPlayListener2 listener);\n\n\n /**\n * 释放播放器\n */\n void release();\n\n /**\n * 获取播放的位置\n */\n long getCurrentPosition();\n\n /**\n * 设置循环播放\n * @param isLoop\n */\n void setLooping(boolean isLoop);\n}", "public abstract String playMedia ();", "private void sendFileContents() {\n\t\t// mostramos un log\n\t\tthis.getLogger().debug(\"Sending file (\" + this.getFile().getName() + \": \" + this.getFile().length() + \" bytes)..\");\n\t\t// iniciamos una bandera\n\t\tint bytesRead = 0;\n\t\ttry {\n\t\t\t// abrimos el fichero\n\t\t\tfinal FileInputStream inFile = new FileInputStream(this.getFile());\n\t\t\t// creamos un buffer para el envio\n\t\t\tfinal byte[] buff = new byte[this.getConnection().getSendBufferSize()];\n\t\t\t// leemos el fichero\n\t\t\twhile ((bytesRead = inFile.read(buff)) > 0) {\n\t\t\t\t// enviamos el buffer por el socket\n\t\t\t\tthis.getConnection().getOutputStream().write(buff, 0, bytesRead);\n\t\t\t\t// vaciamos el buffer\n\t\t\t\tthis.getConnection().getOutputStream().flush();\n\t\t\t}\n\t\t\t// cerramos el fichero\n\t\t\tinFile.close();\n\t\t\t// vaciamos el fichero enviado\n\t\t\tthis.file = null;\n\t\t\t// mostramos un log\n\t\t\tthis.getLogger().info(\"File sent\");\n\t\t} catch (final SocketException e) {\n\t\t\t// mostramos el trace de la excepcion\n\t\t\tthis.getLogger().error(e);\n\t\t} catch (final FileNotFoundException e) {\n\t\t\ttry {\n\t\t\t\t// enviamos -1 para finalizar\n\t\t\t\tthis.getConnection().getOutputStream().write(-1);\n\t\t\t} catch (final IOException ignored) {}\n\t\t} catch (final IOException e) {\n\t\t\t// mostramos el trace de la excepcion\n\t\t\tthis.getLogger().error(e);\n\t\t}\n\t}", "@Override\n public void run() \n {\n while (!Thread.interrupted()) {\n \n //Read from microphone\n if(line==null)break;\n //return;\n if(Thread.interrupted())break;\n int ready = line.available();\n while (ready <320) \n {\n if(Thread.interrupted()){\n // logger.warn(\"input audio device thread is closed\");\n return;}\n try {\n Thread.sleep(1);\n ready = line.available();\n } catch (InterruptedException e) {\n // logger.warn(\"input audio device thread is closed\");\n return;\n }\n \n }\n if(ready>1024)ready=(1024/audioFormat.getFrameSize())*audioFormat.getFrameSize();\n \n byte[] buffer = new byte[320];\n numBytesRead= line.read(buffer, 0, buffer.length);\n if(speakerLine!=null)speakerLine.write(buffer, 0, buffer.length); \n byte[] b= PcmuEncoder.process(buffer);\n if(microphoneLine!=null)session.Send(b); \n }\n //logger.info(\"input audio device thread is closed\");\n \n}", "@Override\n public void onClick(View v) {\n File sdCard = Environment.getExternalStorageDirectory().getAbsoluteFile();\n File path = new File(sdCard + \"/easeWave\");\n path.mkdirs();\n Intent intent = new Intent(Intent.ACTION_SEND);\n intent.setType(\"*/*\");\n intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(path));\n startActivity(Intent.createChooser(intent, getActivity().getString(R.string.sendfile)));\n dialog2.dismiss();\n }", "public void run() {\n\t\t try {\n\t\t Clip clip = AudioSystem.getClip();\n\t\t //AudioInputStream inputStream = AudioSystem.getAudioInputStream(\n\t\t //Main.class.getResourceAsStream(\"/path/to/sounds/\" + url));\n\t\t //clip.open(inputStream);\n\t\t clip.start(); \n\t\t } catch (Exception e) {\n\t\t System.err.println(e.getMessage());\n\t\t }\n\t\t }", "@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tsuper.run();\r\n\t\t\t\t\t\tMap<String, String> params = new HashMap<String, String>();\r\n\t\t\t\t\t\tparams.put(\"des\", mEdit.getText().toString());\r\n\t\t\t\t\t\tparams.put(\"pwd\", \"0\");\r\n\t\t\t\t\t\tparams.put(\"isPwd\", \"0\");\r\n\t\t\t\t\t\tFile uploadFile = new File(filepath);\r\n\t\t\t\t\t\tFormFile formfile = new FormFile(filename, uploadFile,\r\n\t\t\t\t\t\t\t\t\"file\", \"audio/mpeg\");\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tif (SocketHttpRequester.post(\r\n\t\t\t\t\t\t\t\t\t\"http://shengbo.sinaapp.com/update.php\",\r\n\t\t\t\t\t\t\t\t\tparams, formfile)) {\r\n\t\t\t\t\t\t\t\t// ok\r\n\t\t\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\t\t\tmessage.what = 0;\r\n\t\t\t\t\t\t\t\tmHandler.sendMessage(message);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// error\r\n\t\t\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\t\t\tmessage.what = 1;\r\n\t\t\t\t\t\t\t\tmHandler.sendMessage(message);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t// error\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}", "public void playSound (byte[] data, String mime) {\n\t\t// TODO - install JMF and find out how to bundle it\n\t}", "public AudioChannel() {\r\n\t\t// Default temporary location file has to be picked.\r\n\t\tString defalultFileName = getFileName(null, \"wav\");\r\n\t\tfile = new File( defalultFileName );\r\n\t}", "void fileReceived(IMSession session, String requestId, String fileId, String filePath);", "@Override\n\t\t\t\tpublic void fileTransferRecv(LinphoneCore lc, LinphoneChatMessage message,\n\t\t\t\t\t\tLinphoneContent content, byte[] buffer, int size) {\n\t\t\t\t\t\n\t\t\t\t}" ]
[ "0.7415586", "0.6702704", "0.65602946", "0.65157807", "0.6505582", "0.64984673", "0.6482924", "0.6367401", "0.6306712", "0.6301484", "0.6257945", "0.6235653", "0.6209881", "0.61826175", "0.6086887", "0.6071415", "0.60697436", "0.6066653", "0.60531914", "0.60520315", "0.60383856", "0.60378677", "0.6032351", "0.602454", "0.6017394", "0.6011616", "0.5999425", "0.59910333", "0.5988702", "0.59821486", "0.594617", "0.5939212", "0.59123814", "0.5907774", "0.5899117", "0.58936703", "0.5891585", "0.58851314", "0.5868671", "0.58664227", "0.58454734", "0.5835786", "0.5835684", "0.583367", "0.58329004", "0.58238506", "0.5814325", "0.5809227", "0.579967", "0.5799245", "0.5757999", "0.5743549", "0.5740041", "0.5726052", "0.5708614", "0.57051235", "0.569882", "0.5678717", "0.5674351", "0.56692165", "0.56688446", "0.56553566", "0.56507593", "0.5650738", "0.5640846", "0.56279576", "0.56266594", "0.56219405", "0.5620566", "0.56173766", "0.56170416", "0.5594276", "0.55893207", "0.55883944", "0.55859", "0.558136", "0.5568926", "0.55663824", "0.5557742", "0.5556014", "0.55513453", "0.55340165", "0.55245787", "0.5518144", "0.55133414", "0.5511733", "0.5509906", "0.5508249", "0.5503547", "0.55029005", "0.5494119", "0.54911286", "0.5487144", "0.5485948", "0.54845035", "0.5480109", "0.54763716", "0.54761934", "0.54725605", "0.5467482", "0.5462628" ]
0.0
-1
Initializes the controller class.
@Override public void initialize(URL url, ResourceBundle rb) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initialize() {\n\t\tcontroller = Controller.getInstance();\n\t}", "public MainController() {\n\t\tcontroller = new Controller(this);\n\t}", "public abstract void initController();", "public Controller() {\n super();\n }", "public Controller() {\n super();\n }", "public Controller()\n\t{\n\n\t}", "private static CompanyController initializeController() {\n\n controller = new CompanyController();\n return controller;\n }", "public MainController() {\n initializeControllers();\n initializeGui();\n runGameLoop();\n }", "public Controller() {\n this.model = new ModelFacade();\n this.view = new ViewFacade();\n }", "public Controller()\r\n\t{\r\n\t\tview = new View();\r\n\t}", "public Controller() {\n\t\tthis(null);\n\t}", "public void init(){\n\t\t//Makes the view\n\t\tsetUpView();\n\n\t\t//Make the controller. Links the action listeners to the view\n\t\tnew Controller(this);\n\t\t\n\t\t//Initilize the array list\n\t\tgameInput = new ArrayList<Integer>();\n\t\tuserInput = new ArrayList<Integer>();\n\t\thighScore = new HighScoreArrayList();\n\t}", "private void initialize() {\n\t\tinitializeModel();\n\t\tinitializeBoundary();\n\t\tinitializeController();\n\t}", "public void init() {\n\t\tkontrolleri1 = new KolikkoController(this);\n\t}", "protected void initialize() {\n super.initialize(); // Enables \"drive straight\" controller\n }", "public Controller() {\n model = new Model();\n comboBox = new ChannelComboBox();\n initView();\n new ChannelWorker().execute();\n timer = new Timer();\n }", "protected CityController() {\r\n\t}", "public void initialize() {\n warpController = new WarpController(this);\n kitController = new KitController(this);\n crafting = new CraftingController(this);\n mobs = new MobController(this);\n items = new ItemController(this);\n enchanting = new EnchantingController(this);\n anvil = new AnvilController(this);\n blockController = new BlockController(this);\n hangingController = new HangingController(this);\n entityController = new EntityController(this);\n playerController = new PlayerController(this);\n inventoryController = new InventoryController(this);\n explosionController = new ExplosionController(this);\n requirementsController = new RequirementsController(this);\n worldController = new WorldController(this);\n arenaController = new ArenaController(this);\n arenaController.start();\n if (CompatibilityLib.hasStatistics() && !CompatibilityLib.hasJumpEvent()) {\n jumpController = new JumpController(this);\n }\n File examplesFolder = new File(getPlugin().getDataFolder(), \"examples\");\n examplesFolder.mkdirs();\n\n File urlMapFile = getDataFile(URL_MAPS_FILE);\n File imageCache = new File(dataFolder, \"imagemapcache\");\n imageCache.mkdirs();\n maps = new MapController(this, urlMapFile, imageCache);\n\n // Initialize EffectLib.\n if (com.elmakers.mine.bukkit.effect.EffectPlayer.initialize(plugin, getLogger())) {\n getLogger().info(\"EffectLib initialized\");\n } else {\n getLogger().warning(\"Failed to initialize EffectLib\");\n }\n\n // Pre-create schematic folder\n File magicSchematicFolder = new File(plugin.getDataFolder(), \"schematics\");\n magicSchematicFolder.mkdirs();\n\n // One-time migration of legacy configurations\n migrateConfig(\"enchanting\", \"paths\");\n migrateConfig(\"automata\", \"blocks\");\n migrateDataFile(\"automata\", \"blocks\");\n\n // Ready to load\n load();\n resourcePacks.startResourcePackChecks();\n }", "public ClientController() {\n }", "public Controller() {\n\t\tthis.nextID = 0;\n\t\tthis.data = new HashMap<Integer, T>();\n\t}", "public ListaSEController() {\n }", "boolean InitController();", "public MenuController() {\r\n\t \r\n\t }", "@Override\n\tprotected void initController() throws Exception {\n\t\tmgr = orderPickListManager;\n\t}", "public CustomerController() {\n\t\tsuper();\n\n\t}", "public End_User_0_Controller() {\r\n\t\t// primaryStage = Users_Page_Controller.primaryStage;\r\n\t\t// this.Storeinfo = primaryStage.getTitle();\r\n\t}", "public Controller(){\r\n\t\tthis.fabricaJogos = new JogoFactory();\r\n\t\tthis.loja = new Loja();\r\n\t\tthis.preco = 0;\r\n\t\tthis.desconto = 0;\r\n\t}", "private Controller() {\n\t\tthis.gui = GUI.getInstance();\n\t\tthis.gui.setController(this);\n\t}", "public GameController() {\r\n\t\tsuper();\r\n\t\tthis.model = Main.getModel();\r\n\t\tthis.player = this.model.getPlayer();\r\n\t\tthis.timeline = this.model.getIndefiniteTimeline();\r\n\t}", "public PlantillaController() {\n }", "public Controller() {\n\t\tplaylist = new ArrayList<>();\n\t\tshowingMore = false;\n\t\tstage = Main.getStage();\n\t}", "public IfController()\n\t{\n\n\t}", "public TournamentController()\n\t{\n\t\tinitMap();\n\t}", "public GeneralListVueController() {\n\n\t}", "private ClientController() {\n }", "public Controller()\n\t{\n\t\ttheParser = new Parser();\n\t\tstarList = theParser.getStars();\n\t\tmessierList = theParser.getMessierObjects();\n\t\tmoon = new Moon(\"moon\");\n\t\tsun = new Sun(\"sun\");\n\t\tconstellationList = theParser.getConstellations();\n\t\tplanetList = new ArrayList<Planet>();\n\t\ttheCalculator = new Calculator();\n\t\tepoch2000JD = 2451545.0;\n\t}", "private void initialiseController() \r\n {\r\n defaultVectors();\r\n if(grantsByPIForm == null) \r\n {\r\n grantsByPIForm = new GrantsByPIForm(); //(Component) parent,modal);\r\n }\r\n grantsByPIForm.descriptionLabel.setText(UnitName);\r\n grantsByPIForm.descriptionLabel.setFont(new Font(\"SansSerif\",Font.BOLD,14));\r\n queryEngine = QueryEngine.getInstance();\r\n coeusMessageResources = CoeusMessageResources.getInstance();\r\n registerComponents();\r\n try {\r\n setFormData(null);\r\n }\r\n catch(Exception e) {\r\n e.printStackTrace(System.out);\r\n }\r\n }", "public LogMessageController() {\n\t}", "public LoginPageController() {\n\t}", "public ControllerEnfermaria() {\n }", "public ProvisioningEngineerController() {\n super();\n }", "private StoreController(){}", "public GenericController() {\n }", "@Override\n\tpublic void initialize() {\n\t\tinitializeModel(getSeed());\n\t\tinitializeView();\n\t\tinitializeControllers();\n\t\t\n\t\tupdateScore(8);\n\t\tupdateNumberCardsLeft(86);\n\n\t}", "public Controller() {\n\t\tenabled = false;\n\t\tloop = new Notifier(new ControllerTask(this));\n\t\tloop.startPeriodic(DEFAULT_PERIOD);\n\t}", "public MapController() {\r\n\t}", "@Override\r\n\tpublic void initControllerBean() throws Exception {\n\t}", "private void setupController() {\n setupWriter();\n Controller controller1 = new Controller(writer);\n controller = controller1;\n }", "public WfController()\n {\n }", "public Controller() {\n\n lastSearches = new SearchHistory();\n\n }", "private ClientController(){\n\n }", "public LoginController() {\r\n }", "public PersonasController() {\r\n }", "private void initBefore() {\n // Crear Modelo\n model = new Model();\n\n // Crear Controlador\n control = new Controller(model, this);\n\n // Cargar Propiedades Vista\n prpView = UtilesApp.cargarPropiedades(FICHERO);\n\n // Restaurar Estado\n control.restaurarEstadoVista(this, prpView);\n\n // Otras inicializaciones\n }", "public StoreController() {\n }", "public ConsoleController() {\n\t\tcommandDispatch = new CommandDispatch();\n\t}", "public LoginController() {\r\n\r\n }", "public final void init(final MainController mainController) {\n this.mainController = mainController;\n }", "public SMPFXController() {\n\n }", "public Controller()\r\n {\r\n fillBombs();\r\n fillBoard();\r\n scoreBoard = new ScoreBoard();\r\n }", "public GUIController() {\n\n }", "public void init(){\n this.controller = new StudentController();\n SetSection.displayLevelList(grade_comp);\n new DesignSection().designForm(this, editStudentMainPanel, \"mini\");\n }", "public void init(final Controller controller){\n Gdx.app.debug(\"View\", \"Initializing\");\n \n this.controller = controller;\n \n //clear old stuff\n cameras.clear();\n \n //set up renderer\n hudCamera = new OrthographicCamera();\n hudCamera.setToOrtho(false, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n \n batch = new SpriteBatch();\n igShRenderer = new ShapeRenderer();\n shapeRenderer = new ShapeRenderer();\n \n //set up stage\n stage = new Stage();\n \n //laod cursor\n cursor = new Pixmap(Gdx.files.internal(\"com/BombingGames/WurfelEngine/Core/images/cursor.png\"));\n\n controller.getLoadMenu().viewInit(this);\n \n initalized = true;\n }", "@PostConstruct\n public void init() {\n WebsocketController.getInstance().setTemplate(this.template);\n try {\n\t\t\tthis.chatController = ChatController.getInstance();\n } catch (final Exception e){\n LOG.error(e.getMessage(), e);\n }\n }", "public ControllerTest()\r\n {\r\n }", "public SearchedRecipeController() {\n }", "public FilmOverviewController() {\n }", "public CreditPayuiController() {\n\t\tuserbl = new UserController();\n\t}", "private void initComponents() {\r\n\t\temulator = new Chip8();\r\n\t\tpanel = new DisplayPanel(emulator);\r\n\t\tregisterPanel = new EmulatorInfoPanel(emulator);\r\n\t\t\r\n\t\tcontroller = new Controller(this, emulator, panel, registerPanel);\r\n\t}", "public RootLayoutController() {\n }", "public MehController() {\n updateView(null);\n }", "public Controller(int host) {\r\n\t\tsuper(host);\r\n\t}", "public WorkerController(){\r\n\t}", "public TipoInformazioniController() {\n\n\t}", "private void initializeMealsControllers() {\n trNewPetMeal = MealsControllersFactory.createTrNewPetMeal();\n trObtainAllPetMeals = MealsControllersFactory.createTrObtainAllPetMeals();\n trDeleteMeal = MealsControllersFactory.createTrDeleteMeal();\n trUpdateMeal = MealsControllersFactory.createTrUpdateMeal();\n }", "public ProductOverviewController() {\n }", "public ProduktController() {\r\n }", "public Controller(ViewIF view) {\n\t\tthis.view = view;\n\t\tthis.dao = new DAO();\n\t\tthis.stats = new Statistics(this.dao);\n\t\tthis.gameStarted = false;\n\t}", "private void initializeMedicationControllers() {\n trNewPetMedication = MedicationControllersFactory.createTrNewPetMedication();\n trObtainAllPetMedications = MedicationControllersFactory.createTrObtainAllPetMedications();\n trDeleteMedication = MedicationControllersFactory.createTrDeleteMedication();\n trUpdateMedication = MedicationControllersFactory.createTrUpdateMedication();\n }", "public PersonLoginController() {\n }", "public PremiseController() {\n\t\tSystem.out.println(\"Class PremiseController()\");\n\t}", "public TaxiInformationController() {\n }", "public LoginController() {\n\t\treadFromFile();\n\t\t// TODO Auto-generated constructor stub\n\t}", "public Controller(){\n initControl();\n this.getStylesheets().addAll(\"/resource/style.css\");\n }", "public CreateDocumentController() {\n }", "public ControllerRol() {\n }", "Main ()\n\t{\n\t\tview = new View ();\t\t\n\t\tmodel = new Model(view);\n\t\tcontroller = new Controller(model, view);\n\t}", "public Controller () {\r\n puzzle = null;\r\n words = new ArrayList <String> ();\r\n fileManager = new FileIO ();\r\n }", "public void init() {\n \n }", "public Controller() {\n\t\tdoResidu = false;\n\t\tdoTime = false;\n\t\tdoReference = false;\n\t\tdoConstraint = false;\n\t\ttimeStarting = System.nanoTime();\n\t\t\n\t\tsetPath(Files.getWorkingDirectory());\n\t\tsetSystem(true);\n\t\tsetMultithreading(true);\n\t\tsetDisplayFinal(true);\n\t\tsetFFT(FFT.getFastestFFT().getDefaultFFT());\n\t\tsetNormalizationPSF(1);\n\t\tsetEpsilon(1e-6);\n\t\tsetPadding(new Padding());\n\t\tsetApodization(new Apodization());\n\n\t\tmonitors = new Monitors();\n\t\tmonitors.add(new ConsoleMonitor());\n\t\tmonitors.add(new TableMonitor(Constants.widthGUI, 240));\n\n\t\tsetVerbose(Verbose.Log);\n\t\tsetStats(new Stats(Stats.Mode.NO));\n\t\tsetConstraint(Constraint.Mode.NO);\n\t\tsetResiduMin(-1);\n\t\tsetTimeLimit(-1);\n\t\tsetReference(null);\n\t\tsetOuts(new ArrayList<Output>());\n\t}", "public OrderInfoViewuiController() {\n\t\tuserbl = new UserController();\n\t}", "public SessionController() {\n }", "@Override\n\tprotected void setController() {\n\t\t\n\t}", "public MainFrameController() {\n }", "public LicenciaController() {\n }", "public NearestParksController() {\n this.bn = new BicycleNetwork();\n this.pf = new LocationFacade();\n // this.bn.loadData();\n }", "public MotorController() {\n\t\tresetTachometers();\n\t}", "public AwTracingController() {\n mNativeAwTracingController = nativeInit();\n }", "public Controller(IView view) {\n\t\tengine = new Engine(this);\n\t\tclock = new Clock();\n\t\tsoundEmettor = new SoundEmettor();\n\t\tthis.view = view;\n\t}", "public HomeController() {\n }", "public HomeController() {\n }" ]
[ "0.8125658", "0.78537387", "0.78320265", "0.776199", "0.776199", "0.76010174", "0.74497247", "0.7437837", "0.7430714", "0.742303", "0.74057597", "0.7341963", "0.7327749", "0.72634363", "0.72230434", "0.7102504", "0.70575505", "0.69873077", "0.69721675", "0.6944077", "0.6912564", "0.688884", "0.6881247", "0.68776786", "0.68723065", "0.6868163", "0.68672407", "0.6851157", "0.6846883", "0.6840198", "0.68382674", "0.68338853", "0.6795918", "0.67823315", "0.6766882", "0.67650586", "0.6750353", "0.6749068", "0.6745654", "0.6743223", "0.67401046", "0.6727867", "0.6723379", "0.6695514", "0.6689967", "0.66892517", "0.66791916", "0.6677345", "0.66644365", "0.6664202", "0.66616154", "0.66532296", "0.66481894", "0.6644939", "0.6639398", "0.6633576", "0.66312426", "0.662608", "0.66258574", "0.66105217", "0.6606984", "0.66024727", "0.6597095", "0.6580141", "0.65786153", "0.65752715", "0.6574144", "0.6551536", "0.655142", "0.6547574", "0.6545647", "0.6541474", "0.6529243", "0.65284246", "0.6525593", "0.6523344", "0.6519832", "0.65134746", "0.65079254", "0.6497635", "0.64952356", "0.6493943", "0.6492926", "0.6483847", "0.6483173", "0.648183", "0.6479119", "0.64789915", "0.6476928", "0.64734083", "0.6465272", "0.64616114", "0.6444024", "0.64379543", "0.6431962", "0.64292705", "0.6425357", "0.6417148", "0.6416786", "0.64161026", "0.64161026" ]
0.0
-1
Created by ubuntu on 17328.
public interface makemodelimpl { interface BaseListener<T>{ void getSuccess(T t); void getFailure(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "private void init() {\n\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private void kk12() {\n\n\t}", "public static void main(String[]args) {\n\t\n\t\t\n\n}", "zzang mo29839S() throws RemoteException;", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "private Rekenhulp()\n\t{\n\t}", "public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}", "zzana mo29855eb() throws RemoteException;", "private final zzgy zzgb() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "public static void main(String[] args)\r\t{", "private void strin() {\n\n\t}", "private void init() {\n\n\n\n }", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "public void mo6081a() {\n }", "static void feladat9() {\n\t}", "static void feladat7() {\n\t}", "private void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n protected void startUp() {\n }", "zzafe mo29840Y() throws RemoteException;", "static void init() {}", "@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 nadar() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "protected void mo6255a() {\n }", "public void gored() {\n\t\t\n\t}", "public void mo38117a() {\n }", "static void feladat6() {\n\t}", "@Override\n protected void prot() {\n }", "public void baocun() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "static void feladat4() {\n\t}", "@Override\r\n\tprotected void processInit() {\n\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "public abstract void mo56925d();", "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 }", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "private Unescaper() {\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}", "private MApi() {}", "public void mo21877s() {\n }", "public void mo4359a() {\n }", "private MetallicityUtils() {\n\t\t\n\t}", "private void init() {\n }", "@Override\n\tpublic void retstart() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void init() {\n }", "private NativeSupport() {\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\t\n\n\t}", "public abstract void mo70713b();", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "private void m50366E() {\n }", "static void feladat5() {\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\t\n\t}", "@Override\n void init() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private HSBC() {\n\t\t\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\r\n\tprotected void processInit() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}" ]
[ "0.58812237", "0.56088734", "0.5546014", "0.5498533", "0.54453087", "0.5415496", "0.5415496", "0.54101807", "0.53911114", "0.5383271", "0.5328281", "0.5271556", "0.5270946", "0.5269667", "0.5266002", "0.52502424", "0.52471536", "0.52450097", "0.5235983", "0.5230637", "0.5228095", "0.5225157", "0.52215034", "0.5214037", "0.52100927", "0.52080584", "0.5204133", "0.51979804", "0.5196112", "0.5195827", "0.5171489", "0.51675206", "0.51675206", "0.51675206", "0.51675206", "0.51675206", "0.51674896", "0.51653576", "0.51597756", "0.5157064", "0.51502234", "0.51493174", "0.51459485", "0.5143905", "0.51432824", "0.5141828", "0.51417655", "0.5140835", "0.5139844", "0.5136464", "0.5136148", "0.5135679", "0.5135679", "0.5128617", "0.5117674", "0.5117674", "0.5117674", "0.5117674", "0.5117674", "0.5117674", "0.5117674", "0.5112782", "0.5111499", "0.51019526", "0.51019526", "0.5101293", "0.50986713", "0.5091438", "0.508998", "0.50893325", "0.5088074", "0.5081212", "0.5081212", "0.5081212", "0.5081212", "0.5081212", "0.5081212", "0.5078238", "0.5076995", "0.5076753", "0.5071087", "0.5063207", "0.5062521", "0.5058449", "0.5050749", "0.50493526", "0.5049111", "0.5047307", "0.50465447", "0.5046494", "0.5045799", "0.50457895", "0.50457895", "0.50457895", "0.50457895", "0.5044838", "0.5044765", "0.5044765", "0.5044765", "0.5044765", "0.5044765" ]
0.0
-1
Constructorde la clase todoist. Crea un gestor con las 3 tareas vacias.
public Todoist() { tareas = new ArrayList<String>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GestionTemas() {\n initComponents();\n inicializarComponente();\n cargarTemas();\n }", "public Tarea() {\n\t}", "public Transportista() {\n }", "public Controlador() {\n\t\t// m\n\t\tdatosPrueba1 = new ListaEnlazada();\n\t\t// m\n\t\tdatosPrueba2 = new ListaEnlazada();\n\t\t// add\n\t\tdatosPrueba3 = new ListaEnlazada();\n\t\tdatosPrueba4 = new ListaEnlazada();\n\t\tprueba1 = new Estadisticas(datosPrueba1);\n\t\tprueba2 = new Estadisticas(datosPrueba2);\n\t\tprueba3 = new Estadisticas(datosPrueba3);\n\t\tprueba4 = new Estadisticas(datosPrueba4);\n\t\t// finAdd\n\t}", "private GestionTour() {}", "private void crearElementos() {\n\n\t\tRotonda rotonda1 = new Rotonda(new Posicion(400, 120), \"5 de octubre\");\n\t\tthis.getListaPuntos().add(rotonda1);\n\n\t\tCiudad esquel = new Ciudad(new Posicion(90, 180), \"Esquel\");\n\t\tthis.getListaPuntos().add(esquel);\n\n\t\tCiudad trelew = new Ciudad(new Posicion(450, 200), \"Trelew\");\n\t\tthis.getListaPuntos().add(trelew);\n\n\t\tCiudad comodoro = new Ciudad(new Posicion(550, 400), \"Comodoro\");\n\t\tthis.getListaPuntos().add(comodoro);\n\n\t\tCiudad rioMayo = new Ciudad(new Posicion(350, 430), \"Rio Mayo\");\n\t\tthis.getListaPuntos().add(rioMayo);\n\n\t\t// --------------------------------------------------------\n\n\t\tRutaDeRipio rutaRipio = new RutaDeRipio(230, 230, rotonda1, esquel);\n\t\tthis.getListaRuta().add(rutaRipio);\n\n\t\tRutaPavimentada rutaPavimentada1 = new RutaPavimentada(380, 100, trelew, comodoro);\n\t\tthis.getListaRuta().add(rutaPavimentada1);\n\n\t\tRutaPavimentada rutaPavimentada2 = new RutaPavimentada(800, 120, esquel, comodoro);\n\t\tthis.getListaRuta().add(rutaPavimentada2);\n\n\t\tRutaDeRipio rutaripio3 = new RutaDeRipio(380, 100, trelew, comodoro);\n\t\tthis.getListaRuta().add(rutaripio3);\n\n\t\tRutaEnConstruccion rutaConst1 = new RutaEnConstruccion(180, 70, rioMayo, comodoro);\n\t\tthis.getListaRuta().add(rutaConst1);\n\n\t\tRutaPavimentada rutaPavimentada3 = new RutaPavimentada(600, 110, rioMayo, esquel);\n\t\tthis.getListaRuta().add(rutaPavimentada3);\n\t}", "public TrazAqui(){\n this.utilizadores = new TreeMap<>();\n this.encomendas = new TreeMap<>();\n this.utilizador = null;\n }", "public Lector(BD gestor, int id)\n {\n this.base_de_datos=gestor;\n this.id=id;\n }", "public Cobra()\r\n {\r\n super();\r\n corpo = new ArrayList<CorpoCobra>();\r\n\r\n porCrescer = 0;\r\n ovosComidos = 0;\r\n vidas = 3;\r\n tonta = 0;\r\n }", "public Tarea(String descripcionTarea)\n {\n //Añade la descripción de la tarea\n descripcion = descripcionTarea;\n tareaCompletada = false;\n //Por defecto, las tareas tienen prioridad 0\n prioridad = 0;\n //Las nuevas tareas no tienen fecha de vencimiento\n fechaVencimiento = null;\n }", "public GestionProyectos() {\n initComponents();\n \n }", "public Lotto2(){\n\t\t\n\t}", "public Puerto()\n {\n alquileres = new ArrayList<>();\n }", "public Puerto()\n {\n alquileres = new ArrayList<Alquiler>();\n }", "public datosTaller() {\n this.cedulaCliente = new int[100]; //Atributo de la clase\n this.nombreCliente = new String[100]; //Atributo de la clase\n this.compraRealizada = new String[100]; //Atributo de la clase\n this.valorCompra = new float[100]; //Atributo de la clase\n this.posicionActual = 0; //Inicializacion de la posicion en la que se almacenan datos\n }", "public MorteSubita() {\n }", "public LecturaPorEvento() \r\n {\r\n }", "public Tour(){\n for (int i = 0; i < TourManager.numberOfCities(); i++) {\n tour.add(null);\n }\n }", "public void inicializarListaMascotas()\n {\n //creamos un arreglo de objetos y le cargamos datos\n mascotas = new ArrayList<>();\n mascotas.add(new Mascota(R.drawable.elefante,\"Elefantin\",0));\n mascotas.add(new Mascota(R.drawable.conejo,\"Conejo\",0));\n mascotas.add(new Mascota(R.drawable.tortuga,\"Tortuga\",0));\n mascotas.add(new Mascota(R.drawable.caballo,\"Caballo\",0));\n mascotas.add(new Mascota(R.drawable.rana,\"Rana\",0));\n }", "public AfiliadoVista() {\r\n }", "private void prepare()\n {\n addObject(new TempoLimite(), 432, 207);\n addObject(new NumeroVidas(), 395, 278);\n\n Cliqueparajogar clique = new Cliqueparajogar();\n addObject(clique, getWidth()/2, getHeight()/2);\n\n Som som = new Som();\n addObject(som, getWidth() - 37, getHeight()-57);\n \n umMin ummin = new umMin();\n addObject(ummin,630,206);\n\n doisMin doismin = new doisMin();\n addObject(doismin,670,206);\n \n tresMin tresmin = new tresMin();\n addObject(tresmin,710,206);\n \n quatroMin quatromin = new quatroMin();\n addObject(quatromin,750,206);\n \n cincoMin cincomin = new cincoMin();\n addObject(cincomin,790,206);\n \n umaVida umavida = new umaVida();\n addObject(umavida,630,280);\n \n duasVidas duasvidas = new duasVidas();\n addObject(duasvidas,670,280);\n \n tresVidas tresvidas = new tresVidas();\n addObject(tresvidas,710,280);\n \n quatroVidas quatrovidas = new quatroVidas();\n addObject(quatrovidas,750,280);\n \n cincoVidas cincovidas = new cincoVidas();\n addObject(cincovidas,790,280);\n \n voltaratras voltar = new voltaratras();\n addObject(voltar, getWidth() -37, 428);\n }", "public static void instanciarCreencias() {\n\t\tfor(int i =0; i < GestorPartida.getContJugadores(); i++) {\n\t\t\t\n\t\t\tGestorPartida.jugadores[i].setCreencias(new Creencias(GestorPartida.jugadores, GestorPartida.objetoJugador, GestorPartida.objetoSala, i)); \n\t\t}\n\t}", "public Celula() { // Sentinela\n\t\tthis.item = new Jogador();\n\t\tproximo = null;\n\t}", "public TrazoLibre() {\n this.linea = new ArrayList();\n }", "public CrearQuedadaVista() {\n }", "public Plato(){\n\t\t\n\t}", "public ContasCorrentes(){\n this(0,\"\",0.0,0.0,0);\n }", "public CampoModelo(String valor, String etiqueta, Integer longitud)\n/* 10: */ {\n/* 11:17 */ this.valor = valor;\n/* 12:18 */ this.etiqueta = etiqueta;\n/* 13:19 */ this.longitud = longitud;\n/* 14: */ }", "public DetArqueoRunt () {\r\n\r\n }", "public Duke() {\n this.ui = new Ui();\n this.storage = new Storage();\n this.tasks = new TaskList();\n this.parse = new Parser();\n this.lists = new ArrayList<Task>();\n\n }", "public GestorTiquetesTiempos() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "UtenteFactory () {\n /**\n * inizializzo l'array list che contiene la lista degli utenti iscritti al sito.\n */\n listaUtenti = new ArrayList <Utente> ();\n \n // creo una lista contenente i venditori e una contenente gli acquirenti\n VenditoreFactory listaVenditori = new VenditoreFactory ();\n AcquirenteFactory listaAcquirenti = new AcquirenteFactory();\n \n \n // inserisco nella lista degli utenti, gli acquirenti e i venditori\n // contenuti nelle rispettive liste\n for (int i=0; i<4; i++) {\n listaUtenti.add(listaVenditori.getListaVenditori().get(i));\n listaUtenti.add(listaAcquirenti.getListaAcquirenti().get(i));\n }\n }", "public Troco() {\n }", "public fabrica_pedidos_detalles() {\n initComponents();\n this.setMinimumSize(new Dimension(1000, 680));\n this.setLocationRelativeTo(null);\n CrearModelo();\n Cargar_Informacion();\n }", "public void limpiarCampos() {\n\t\ttema = new Tema();\n\t\ttemaSeleccionado = new Tema();\n\t\tmultimedia = new Multimedia();\n\t}", "public Tarifa() {\n ;\n }", "public TareasEvento() {\n initComponents();\n setTitle (\"Tareas\");\n mostrardatos(jTextField1.getText());\n \n }", "public OthelloBoard (int height, int width){\n super(height, width);\n m_Pieces = new OthelloPiece[WIDTH][HEIGHT];\n m_PieceCount+=4;\n \n }", "public Aritmetica(){ }", "public Artefato() {\r\n\t\tthis.membros = new ArrayList<Membro>();\r\n\t\tthis.servicos = new ArrayList<IServico>();\r\n\t}", "public Echiquier()\n\t{\n\t\ttableau = new Piece[8][8];\n\t}", "private IOferta buildOfertaEjemplo3() {\n\t\tPredicate<Compra> condicion = Predicates.compose(\n\t\t\t\tnew PredicadoDiaSemana(Calendar.SATURDAY),\n\t\t\t\tnew ExtraerFechaCreacion());\n\t\tFunction<Compra, Float> descuento = new DescuentoFijo<>(10.0f);\n\t\treturn new OfertaDinero(\"10$ descuento sabados\", condicion,\n\t\t\t\tdescuento);\n\t}", "public Espacio (int id, int capacidad, int ocupacion, TipoEspacio tipo, Localizacion localizacion){\n this.id = id;\n this.capacidad = capacidad;\n this.ocupacion = ocupacion;\n this.TIPO = tipo;\n this.localizacion = localizacion;\n }", "public void initPlateau() {\r\n\t\t// On place les obstacles\r\n\t\tint epaisseur = 20;\r\n\t\tint delta = 50;\r\n\t\tint espace = 150;\r\n\t\tobstacles.add(new Obstacle(0,0,width,epaisseur));\r\n\t\tobstacles.add(new Obstacle(0,height - epaisseur,width,epaisseur));\r\n\t\tobstacles.add(new Obstacle(0,0,epaisseur,height));\r\n\t\tobstacles.add(new Obstacle(width - epaisseur,0,epaisseur,height));\r\n\t\t\r\n\t\tobstacles.add(new Obstacle(0,100,width-espace,epaisseur));\r\n\t\tobstacles.add(new Obstacle(espace,200,width-espace,epaisseur));\r\n\t\tobstacles.add(new Obstacle(0,300,width-espace,epaisseur));\r\n\t\tobstacles.add(new Obstacle(espace,400,width-espace,epaisseur));\r\n\t\t\r\n\t\t// On place les objectifs\r\n\t\t\r\n\t\tobjectifs.add(new Objectif(400,50));\r\n\t\tobjectifs.add(new Objectif(150,50));\r\n\t\tobjectifs.add(new Objectif(300,50));\r\n\t\tobjectifs.add(new Objectif(50,50));\r\n\t\tobjectifs.add(new Objectif(400,50));\r\n\t\tobjectifs.add(new Objectif(600,50));\r\n\t\tobjectifs.add(new Objectif(700,70));\r\n\t\tobjectifs.add(new Objectif(730,100));\r\n\t\tobjectifs.add(new Objectif(730,130));\r\n\t\tobjectifs.add(new Objectif(100,150));\r\n\t\tobjectifs.add(new Objectif(200,150));\r\n\t\tobjectifs.add(new Objectif(400,150));\r\n\t\tobjectifs.add(new Objectif(500,150));\r\n\t\tobjectifs.add(new Objectif(600,150));\r\n\t\tobjectifs.add(new Objectif(700,150));\r\n\t\tobjectifs.add(new Objectif(70,200));\r\n\t\tobjectifs.add(new Objectif(100,250));\r\n\t\tobjectifs.add(new Objectif(500,250));\r\n\t\tobjectifs.add(new Objectif(300,250));\r\n\t\tobjectifs.add(new Objectif(600,250));\r\n\t\tobjectifs.add(new Objectif(700,270));\r\n\t\tobjectifs.add(new Objectif(730,300));\r\n\t\tobjectifs.add(new Objectif(730,330));\r\n\t\tobjectifs.add(new Objectif(100,350));\r\n\t\tobjectifs.add(new Objectif(200,350));\r\n\t\tobjectifs.add(new Objectif(700,350));\r\n\t\tobjectifs.add(new Objectif(500,350));\r\n\t\tobjectifs.add(new Objectif(300,350));\r\n\t\tobjectifs.add(new Objectif(100,350));\r\n\t\tobjectifs.add(new Objectif(70,400));\r\n\t\tobjectifs.add(new Objectif(100,450));\r\n\t\tobjectifs.add(new Objectif(500,450));\r\n\t\tobjectifs.add(new Objectif(300,450));\r\n\t\tobjectifs.add(new Objectif(600,450));\r\n\t\t\r\n\t}", "public Hipermercado(){\r\n this.clientes = new CatalogoClientes();\r\n this.produtos = new CatalogoProdutos();\r\n this.numFiliais = 3;\r\n this.faturacao = new Faturacao(this.numFiliais);\r\n this.filial = new ArrayList<>(this.numFiliais);\r\n for (int i = 0; i < this.numFiliais; i++){\r\n this.filial.add(new Filial());\r\n }\r\n \r\n this.invalidas = 0;\r\n }", "public Transportador()\n {\n super();\n this.transporte = true;\n this.transporte_medico = false;\n this.classificacao = new HashMap<>();\n this.encomendas = new HashMap<>();\n this.raio = 0.0;\n }", "public TelaJogos() {\n initComponents();\n setSize(1018,768);\n \n }", "Tour(Tour tr) {\r\n this();\r\n for (int i = 0; i < tr.length(); i++) {\r\n this.index[i] = tr.index[i];\r\n }\r\n this.distance = distance();\r\n }", "public Casa() { \n \n /* Cuando se crea la casa, tambien se debe crear la puerta */\n \n laPuerta = new Puerta();\n \n /* se pone la letra F por que son de tipo float */\n laPuerta.setAncho(2.3F);\n laPuerta.setAlto(1.5F);\n \n }", "public Transportadora() {\r\n super();\r\n this.nif = \"\";\r\n this.raio = 0;\r\n this.precoKm = 0;\r\n this.classificacao = new Classificacao();\r\n this.estaLivre = true;\r\n this.velocidadeMed = 0;\r\n this.kmsTotal = 0;\r\n this.capacidade = 0;\r\n }", "public JefeAvion() {\r\n\t\tsuper(2000, 2, new ImageIcon(url), 1275, 636);\r\n\t\trn = new Random();\r\n\t\tx = 400 - defaultWidth/2;\r\n\t\ty = - defaultHeight;\r\n\t\tdelay = 2;\r\n\t\tint cantTorretasDobles = 8;\r\n\t\tint cantTorretasSimples = 3;\r\n\t\tint cantTorretasInvisibles = 12;\r\n\t\tint cantTorretasGrandes = 6;\r\n\t\t\r\n\t\tString boundsDouble = \"/ProyectoX/img/Enemigo/JefeAvion/posicionesTorretasDobles.txt\";\r\n\t\tString boundsSimple = \"/ProyectoX/img/Enemigo/JefeAvion/posicionesTorretasSimples.txt\";\r\n\t\tString boundsInvisible = \"/ProyectoX/img/Enemigo/JefeAvion/posicionesTorretasInvisibles.txt\";\r\n\t\tString boundsGrande = \"/ProyectoX/img/Enemigo/JefeAvion/posicionesTorretasGrandes.txt\";\r\n\t\t\r\n\t\tinit = System.currentTimeMillis();\r\n\t\tcargarArchivoTorretas(boundsDouble, new FabricaTorretasDobles(), cantTorretasDobles);\r\n\t\tcargarArchivoTorretas(boundsSimple, new FabricaTorretasSimples(), cantTorretasSimples);\r\n\t\tcargarArchivoTorretas(boundsInvisible,new FabricaTorretasInvisibles(), cantTorretasInvisibles);\r\n\t\tcargarArchivoTorretas(boundsGrande,new FabricaTorretasGrandes(), cantTorretasGrandes);\r\n\t\tpuntaje = 500;\r\n\t\tsetearParametrosDefecto(2000, 2, 1275, 636);\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void crearNuevaPoblacion() {\n\t\t/* Nos quedamos con los mejores individuos. Del resto, cruzamos la mitad, los mejores,\n\t\t * y el resto los borramos.*/\n\t\tList<IIndividuo> poblacion2 = new ArrayList<>();\n\t\tint numFijos = (int) (poblacion.size()/2);\n\t\t/* Incluimos el 50%, los mejores */\n\t\tpoblacion2.addAll(this.poblacion.subList(0, numFijos));\n\t\t\n\t\t/* De los mejores, mezclamos la primera mitad \n\t\t * con todos, juntandolos de forma aleatoria */\n\t\tList<IIndividuo> temp = poblacion.subList(0, numFijos+1);\n\t\tfor(int i = 0; i < temp.size()/2; i++) {\n\t\t\tint j;\n\t\t\tdo {\n\t\t\t\tj = Individuo.aleatNum(0, temp.size()-1);\n\t\t\t}while(j != i);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tpoblacion2.addAll(cruce(temp.get(i), temp.get(j)));\n\t\t\t} catch (CruceNuloException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//this.poblacion.clear();\n\t\tthis.poblacion = poblacion2;\n\t}", "public Nodo1Controlador() {\n this.reinit();\n\n }", "public Alojamiento() {\r\n\t}", "public AgenteEstAleatorio() {\r\n }", "public Espacio() {\n dib=new Dibujo(\"Simulacion de satelites\", 800,800);\n dib.dibujaImagen(limiteX-60,limiteY-60,\"tierra.png\");\n dib.pinta();\n }", "public VistaListacomprasnocliente() {\n // You can initialise any data required for the connected UI components here.\n }", "public FenetreAide(){\n\t\tbuild();\n\t}", "@Override\n\t public void onActivityCreated(Bundle state) {\n\t super.onActivityCreated(state);\n\t datos=listas.getListaconPlatillos();\n\t if(datos.isEmpty()){ // si ya no hay elementos u ordenes\n\t \t DetalleOrden Noelementos=new DetalleOrden();\n\t\t\t\tNoelementos.setmKeyOrden(\"0\");\n\t\t\t\tNoelementos.setmCantidad(\"\");\n\t\t\t\tNoelementos.setmKeyOrden(\"\");\n\t\t\t\tNoelementos.setmKeyPlatillo(\"\");\n\t\t\t\tNoelementos.setmNombrePlatillo(\"No hay más Ordenes\");\n\t\t\t\tNoelementos.setmNotaEspecial(\"\");\n\t\t\t\tNoelementos.setmNotaPromocion(\"\");\n\t\t\t\tdatos=new ArrayList<DetalleOrden>();\n\t\t datos.add(Noelementos);\n\t }\n\n\t \n\t ListaPlatillos = (ListView)getView().findViewById(R.id.Listado_Platillos); //Listado_Platillos es en el fragment_listado y hace referencia a ListaOrdenes\n\t \n\t // Al adapter personalizado le pasamos el contexto y la lista que contiene\t\n\t AdaptadorListaPlatillos adapter=new AdaptadorListaPlatillos(this,datos);\n\t // Añadimos el adapter al listview\n\t ListaPlatillos.setAdapter(adapter);//se ejecuta el montaje final ya con los datos\n \n\t \n\t }", "public TelaContaUnica() {\n initComponents();\n }", "public cola_de_un_banco(){// se crea nuestro metodo costructor \r\n primero=null;//se crea el tipo de indicaciones con valor a null\r\n ultimo=null;\r\n}", "public Tecnico(){\r\n\t\tthis.matricula = 0;\r\n\t\tthis.nome = \"NULL\";\r\n\t\tthis.email = \"NULL\";\r\n\t\tthis.telefone = \"TELEFONE\";\r\n\t\tlistaDeServicos = new ArrayList<Servico>();\r\n\t}", "public Caso_de_uso () {\n }", "public ComandosJuego() //constructor\n\t{\n\t\tlista = new ArrayList<String>();\n\t}", "MotifLearner(){\n notes = new ArrayList<>();\n times = new ArrayList<>();\n }", "public Comprador() {\n // initialise instance variables\n super(1,\"\",\"\",\"\",\"\",\"\"); //super(email, nome, password, dataNascimento, morada)\n favoritos = new ArrayList<String>();\n }", "public Mapa(int ancho, int alto) {\r\n this.ancho = ancho;\r\n this.alto = alto;\r\n cuadros = new int[ancho*alto];\r\n generarMapa();\r\n }", "public void crearAtracciones(){\n \n //Añado atracciones tipo A\n for (int i = 0; i < 4 ; i++){\n Atraccion atraccion = new A();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo B\n for (int i = 0; i < 6 ; i++){\n Atraccion atraccion = new B();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo C\n for (int i = 0; i < 4 ; i++){\n Atraccion atraccion = new C();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo D\n for (int i = 0; i < 3 ; i++){\n Atraccion atraccion = new D();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo E\n for (int i = 0; i < 7 ; i++){\n Atraccion atraccion = new E();\n atracciones.add(atraccion);\n }\n \n }", "private void setupEscenario3( )\n {\n String todasMarcadas, casillasSinMarca;\n String[] marcadas, noMarcadas;\n int casilla;\n // Prepara el tablero\n triqui = new Triqui( );\n\n // Primer jugador\n\n marcaJugador1 = \"X\";\n todasMarcadas = \"1,3,7,9\";\n marcadas = todasMarcadas.split( \",\" );\n casillasJugador1 = new ArrayList( );\n\n for( int i = 0; i < marcadas.length; i++ )\n {\n casilla = Integer.parseInt( marcadas[ i ] );\n triqui.marcarCasilla( casilla, marcaJugador1 );\n casillasJugador1.add( new Integer( casilla ) );\n }\n\n // Segundo jugador\n\n marcaJugador2 = \"O\";\n todasMarcadas = \"2,4,6,8\";\n marcadas = todasMarcadas.split( \",\" );\n casillasJugador2 = new ArrayList( );\n\n for( int i = 0; i < marcadas.length; i++ )\n {\n casilla = Integer.parseInt( marcadas[ i ] );\n triqui.marcarCasilla( casilla, marcaJugador2 );\n casillasJugador2.add( new Integer( casilla ) );\n }\n\n // Casillas sin marcar\n\n casillasSinMarca = \"5\";\n noMarcadas = casillasSinMarca.split( \",\" );\n casillasSinMarcar = new ArrayList( );\n\n for( int i = 0; i < noMarcadas.length; i++ )\n {\n casilla = Integer.parseInt( noMarcadas[ i ] );\n casillasSinMarcar.add( new Integer( casilla ) );\n }\n }", "public Tarea(String tipo, String area, int unidades) {\n\t\tsetTipo(tipo);\n\t\tsetArea(area);\n\t\tsetUnidades(unidades);\n\t\t//inicialmente no le pertenece a nadie\n\t\tsetAsignada(null);\n\t}", "public Carrinho() {\n\t\tsuper();\n\t}", "public Postoj() {}", "public misTutores() {\n initComponents();\n }", "public Tastatur()\n\t{\n\t\tString pfad = System.getProperty(\"user.dir\")+\"/images/navigator/\";\n\t\t\n\t\t//3 Zeilen, 3 Spalten und 0 Abstand zwischen Elementen\n\t\tsetLayout(new GridLayout(3,3,0,0));\n\t\tsetComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\n\t\t\n\t\tfor(int i=9; i>0;i--)\n\t\t{\n\t\t\ttasten[i-1] = new JButton();\n\t\t\ttasten[i-1].setActionCommand(Integer.toString(i));\n\t\t\ttasten[i-1].setIcon(new ImageIcon(pfad+\"taste\"+i+\".gif\"));\n\t\t\ttasten[i-1].setPreferredSize(new Dimension(75,75));\n\t\t\tadd(tasten[i-1]);\n\t\t\t\n\t\t\tif(i!=5)\n\t\t\t{\n\t\t\t\ttasten[i-1].addActionListener(new ListenerBewegung());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttasten[i-1].addActionListener(new ListenerWaffe());\n\t\t\t}\n\t\t}\n\t}", "public GestioneApplicazione() {\n }", "public PentagoGame() {\n // Default size = 3.\n board = new PentagoBoard();\n lastMove = null;\n hasPlacedPiece = false;\n hasRotatedBoard = true;\n }", "public TelaSorteio() {\n initComponents();\n }", "public static void init()\n\t{\n\t\t\n\t\tu.creerGalaxie(\"VoieLactee\", \"spirale\", 0);\n\t\tu.creerEtoile(\"Soleil\", 0, 'F', u.getGalaxie(\"VoieLactee\")); //1\n\t\tu.creerObjetFroid(\"Terre\", 150000 , 13000 , 365 , u.getObjet(1)); //2\n\n\t\tu.creerObjetFroid(\"Lune\", 200 , 5000 , 30 , u.getObjet(2)); //3\n\n\t\tu.creerObjetFroid(\"Mars\", 200000 , 11000 , 750 , u.getObjet(1)); //4\n\n\t\tu.creerObjetFroid(\"Phobos\", 150 , 500 , 40 , u.getObjet(4)); //5\n\n\t\tu.creerObjetFroid(\"Pluton\", 1200000 , 4000 , 900 , u.getObjet(1)); //6\n\n\t\tu.creerEtoile(\"Sirius\", 2, 'B', u.getGalaxie(\"VoieLactee\")); //7\n\n\t\tu.creerObjetFroid(\"BIG-1\", 1000 , 50000 , 333 , u.getObjet(7)); //8\n\n\t\tu.creerGalaxie(\"M31\", \"lenticulaire\", 900000);\n\t\tu.creerEtoile(\"XS67\", 8, 'F', u.getGalaxie(\"M31\")); //9\n\t\tu.creerObjetFroid(\"XP88\", 160000 , 40000 , 400 , u.getObjet(9)); //10\n\t}", "public Empresa()\n\t{\n\t\tclientes = new HashMap<String, Cliente>();\n\t\tplanes = new ArrayList<Plan>();\n\t\t\n\t}", "public AmishMart()\n {\n super(\"PokeMart\");\n\n eventArray[20][14] = new Teleport();\n eventArray[20][14].setCoord(5, 2, 18, 17);\n\n eventArray[15][13] = new ShopKeep();\n }", "public Duke() {\n this.ui = new Ui();\n this.storage = new Storage();\n try {\n tasks = new TaskList(storage.load());\n } catch (DukeException | IOException e) {\n tasks = new TaskList();\n e.printStackTrace();\n }\n }", "public GestionarRegistro() {\n initComponents();\n this.setLocationRelativeTo(null);\n d = new Donante();\n v = new Validacion();\n a=new Archivos();\n \n // r=new RegistroDonanteApto();\n\n }", "private IOferta buildOfertaEjemplo7() {\n\t\tPredicate<Compra> condicion = Predicates.alwaysTrue();\n\t\tFunction<Compra, Float> descuento = new DescuentoEnSegundoProducto(\"11-111-1111\", \"11-111-1112\", 50);\n\t\treturn new OfertaDinero(\"50% en Sprite, comprando 1 Coca\", condicion,\tdescuento);\n\t}", "public Corso() {\n\n }", "public Vista() {\n initComponents();\n setNombres();\n crearFicheros();\n rellenaComboMarcas(jComboBoxMarcaEdicion);\n rellenaComboTipos(jComboBoxTipoEdicion);\n rellenaComboMarcas(jComboBoxMarcaFiltro);\n rellenaComboTipos(jComboBoxTipoFiltro);\n setInitialState();\n filtrando = false;\n indexFiltro = 0;\n filtro = new ArrayList();\n this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n }", "public SiacDMovgestTsDetTipo() {\n\t}", "public Regla2(){ /*ESTE ES EL CONSTRUCTOR POR DEFECTO */\r\n\r\n /* TODAS LAS CLASES TIENE EL CONSTRUCTOR POR DEFECTO, A VECES SE CREAN AUTOMATICAMENTE, PERO\r\n PODEMOS CREARLOS NOSOTROS TAMBIEN SI NO SE HUBIERAN CREADO AUTOMATICAMENTE\r\n */\r\n \r\n }", "public Campo(String nombre, String dimensiones, String ubicacion,String tipoGramilla) {\n this.nombre = nombre;\n this.dimensiones = dimensiones;\n this.ubicacion = ubicacion;\n this.tipoGramilla= tipoGramilla;\n }", "public Plateau(int largeur, int hauteur) {\r\n\t\tplateau = new Cellule[hauteur][largeur];\r\n\t\tint equipe = 1;\r\n\t\tfor (int i=0; i<hauteur; i++) {\r\n\t\t\tfor (int j=0; j<largeur; j++) {\r\n\t\t\t\tif ((i == 0 && j == 0) || (i == hauteur-1 && j == largeur -1))\r\n\t\t\t\t\tplateau[i][j] = new Base(j,i,equipe++);\r\n\t\t\t\telse\r\n\t\t\t\t\tplateau[i][j] = new Case(j,i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.hauteur = hauteur;\r\n\t\tthis.largeur = largeur;\r\n\t}", "public void agregarFruta(){\n\t\tcontenidos[14][17] = new Fruta();\n\t}", "public VistaAllLotes() {\n initComponents();\n controlFinca = new ControlFincas();\n controlLote = new ControLotes();\n ListamodeloLotes = new ArrayList<>();\n EncabezadoTblLotes = new String[]{\n \"No\",\"Bloque\", \"Número\", \"Área Total\", \"Fuente Hidrica\", \"Modificar\", \"Eliminar\"\n };\n lblId_Bloque.setVisible(false);\n modeloLotes = new ModeloLotes();\n idFinca = \"\";\n AreaBloque = \"\";\n fila = -1;\n CargarListaFincas();\n CargarListaFuentesHidricas();\n LimpiarFomulario();\n InicializarTblLotes();\n }", "public Torretta1(int danno, int x, int y, ArrayList<Proiettile> proiettili) {\r\n super();\r\n velocitàAttacco = 5000;\r\n attacco = danno;\r\n this.proiettili = proiettili;\r\n this.x = x * 40;\r\n this.y = y * 40 - 40;\r\n range = new Ellipse2D.Double();\r\n range.setFrame(this.x - 40, this.y - 40, 119, 119);\r\n temposparo = 200;\r\n finestrasparo = 0;\r\n costoAcquisto = 10;\r\n tipo='a';\r\n }", "public Maps()\n\t{\t\n\t\tsetOnMapReadyHandler( new MapReadyHandler() {\n\t\t\t@Override\n\t\t\tpublic void onMapReady(MapStatus status)\n\t\t\t{\n\t\t\t\tmodelo = new MVCModelo();\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tmodelo.cargarInfo();\n\t\t\t\t\tArregloDinamico<Coordenadas> aux = modelo.sacarCoordenadasVertices();\n\t\t\t\t\tLatLng[] rta = new LatLng[aux.darTamano()];\n\t\t\t\t\tfor(int i=0; i< aux.darTamano();i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tCoordenadas actual = aux.darElementoPos(i);\n\t\t\t\t\t\trta[i] = new LatLng(actual.darLatitud(), actual.darLongitud());\n\t\t\t\t\t}\n\t\t\t\t\tlocations = rta;\n\t\t\t\t}\n\t\t\t\tcatch(Exception e)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Error\");\n\t\t\t\t}\n\t\t\t\tfinally\n\t\t\t\t{\n\t\t\t\t\tif ( status == MapStatus.MAP_STATUS_OK )\n\t\t\t\t\t{\n\t\t\t\t\t\tmap = getMap();\n\n\t\t\t\t\t\t// Configuracion de localizaciones intermedias del path (circulos)\n\t\t\t\t\t\tCircleOptions middleLocOpt= new CircleOptions(); \n\t\t\t\t\t\tmiddleLocOpt.setFillColor(\"#00FF00\"); // color de relleno\n\t\t\t\t\t\tmiddleLocOpt.setFillOpacity(0.5);\n\t\t\t\t\t\tmiddleLocOpt.setStrokeWeight(1.0);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(int i=0; i<locations.length;i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tCircle middleLoc1 = new Circle(map);\n\t\t\t\t\t\t\tmiddleLoc1.setOptions(middleLocOpt);\n\t\t\t\t\t\t\tmiddleLoc1.setCenter(locations[i]); \n\t\t\t\t\t\t\tmiddleLoc1.setRadius(20); //Radio del circulo\n\t\t\t\t\t\t}\n\n\t\t\t \t //Configuracion de la linea del camino\n\t\t\t \t PolylineOptions pathOpt = new PolylineOptions();\n\t\t\t \t pathOpt.setStrokeColor(\"#FFFF00\");\t // color de linea\t\n\t\t\t \t pathOpt.setStrokeOpacity(1.75);\n\t\t\t \t pathOpt.setStrokeWeight(1.5);\n\t\t\t \t pathOpt.setGeodesic(false);\n\t\t\t \t \n\t\t\t \t Polyline path = new Polyline(map); \t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t \t path.setOptions(pathOpt); \n\t\t\t \t path.setPath(locations);\n\t\t\t\t\t\tinitMap( map );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\t);\n\n\n\t}", "private TAPosition()\n {\n\n }", "public Carrera(){\n }", "public Duke() {\n ui = new Ui();\n storage = new Storage();\n try {\n taskList = new TaskList(TaskList.deserialize(storage.loadData()));\n } catch (DukeException | IOException e) {\n ui.printMessage(e.getMessage());\n taskList = new TaskList();\n storage.createNewData(ui);\n }\n }", "public FiltroMicrorregiao() {\r\n }", "public TelaCidadaoDescarte() {\n initComponents();\n }", "public Comprador(String e, String n, String p, String d, String m) {\n // initialise instance variables\n super(1,e,n,p,d,m);\n favoritos = new ArrayList<String>();\n }" ]
[ "0.6342925", "0.6173356", "0.6085844", "0.60337687", "0.5983824", "0.5958772", "0.591617", "0.59045357", "0.5850408", "0.5835825", "0.58308715", "0.5828547", "0.5812006", "0.58097386", "0.58050656", "0.5789326", "0.57413894", "0.57385206", "0.5734498", "0.5707905", "0.5686867", "0.5657336", "0.5654537", "0.56201696", "0.56192875", "0.56185794", "0.559911", "0.5593747", "0.5589743", "0.55878556", "0.55804414", "0.5576657", "0.5564587", "0.55469745", "0.5546685", "0.5525912", "0.5513959", "0.5512495", "0.55108905", "0.5506811", "0.5500615", "0.54981774", "0.54919773", "0.54879296", "0.54814553", "0.54796827", "0.547499", "0.5473885", "0.5470248", "0.5462439", "0.5458977", "0.54578906", "0.5453229", "0.54522896", "0.5447716", "0.54475564", "0.5442859", "0.54382634", "0.5435633", "0.5433149", "0.54291004", "0.54288965", "0.54284984", "0.5426833", "0.5426282", "0.5421807", "0.541943", "0.54176766", "0.5416638", "0.5413742", "0.5408946", "0.5406276", "0.5403869", "0.5399139", "0.53985333", "0.53930134", "0.53897196", "0.5385734", "0.5371334", "0.53697187", "0.5366294", "0.5357313", "0.53569144", "0.5356413", "0.5356399", "0.53554684", "0.5348802", "0.53471786", "0.5345845", "0.5340238", "0.5331474", "0.53294045", "0.53279155", "0.5326905", "0.53266656", "0.53260463", "0.5322505", "0.5320543", "0.53142554" ]
0.64669526
1
Inserta la tarea especifica en la posicion indicada
public void addTarea(String nombreTarea){ tareas.add(nombreTarea); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic void insertar() {\n\t\t\tutilitario.getTablaisFocus().insertar();\n\n\t\t}", "@FXML\n private void guardarNuevaTarea(ActionEvent event) {\n String asignadoA = usuario.getUsuario();\n if (asignarComboBox.getSelectionModel().getSelectedItem().equals(\"otro usuario\")) {\n asignadoA = asignadoFX.getText();\n }\n String porcentaje = labelPorcentaje.getText().replace(\" %\", \"\");\n\n Tarea nuevaTarea = new Tarea(tituloFX.getText(), descripcionFX.getText(), prioridadFX.getValue(),\n estadoFX.getValue(), usuario.getUsuario(), asignadoA, Integer.parseInt(porcentaje));\n\n Connection con = Conexion.conectar(\"gestortareas\", \"proyecto\", \"proyecto\");\n try {\n PreparedStatement consulta = con.prepareStatement(\"INSERT INTO Tareas(Titulo, Descripcion, Prioridad, Estado, Creador, Asignacion, Progreso) \"\n + \"VALUES(?, ?, ?, ?, ?, ?, ?);\", Statement.RETURN_GENERATED_KEYS);\n consulta.setString(1, nuevaTarea.getTitulo());\n consulta.setString(2, nuevaTarea.getDescripcion());\n consulta.setString(3, nuevaTarea.getPrioridad());\n consulta.setString(4, nuevaTarea.getEstado());\n consulta.setString(5, nuevaTarea.getCreador());\n consulta.setString(6, nuevaTarea.getAsignacion());\n consulta.setInt(7, nuevaTarea.getProgreso());\n consulta.executeUpdate();\n // Se obtiene la clave generada por la base de datos\n ResultSet rs = consulta.getGeneratedKeys();\n rs.next();\n int codigo = rs.getInt(1);\n\n // Se envía la nueva tarea a la ventana de tareas para actualizar la tabla\n ventana.anyadirTareaTabla(nuevaTarea);\n\n Stage stage = (Stage) buttonGuardar.getScene().getWindow();\n stage.close();\n } catch (SQLException e) {\n Dialogo.error(\"Error\", null, \"Error al insertar en la base de datos.\");\n }\n Conexion.desconectar(con);\n }", "@Override\r\n\tpublic void insertar() {\n\t\ttab_nivel_funcion_programa.insertar();\r\n\t\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void insertar() {\n\t\t\n\t}", "public void crear(Tarea t) {\n t.saveIt();\n }", "private void insertar() {\n try {\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.insertar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Ingresado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para guardar registro!\");\n }\n }", "public void insertar(Trabajo t){\r\n\t\tif(!estaLlena()){\r\n\t\t\tultimo = siguiente(ultimo);\r\n\t\t\telementos[ultimo] = t;\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void insertPrestito(Prestito p) {\n\t\t\r\n\t}", "private void azzeraInsertForm() {\n\t\tviewInserimento.getCmbbxTipologia().setSelectedIndex(-1);\n\t\tviewInserimento.getTxtFieldDataI().setText(\"\");\n\t\tviewInserimento.getTxtFieldValore().setText(\"\");\n\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\tviewInserimento.getTxtFieldValore().setBackground(Color.white);\n\t}", "public void insertar() {\r\n if (vista.jTNombreempresa.getText().equals(\"\") || vista.jTTelefono.getText().equals(\"\") || vista.jTRFC.getText().equals(\"\") || vista.jTDireccion.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(null, \"Faltan Datos: No puedes dejar cuadros en blanco\");//C.P.M Verificamos si las casillas esta vacia si es asi lo notificamos\r\n } else {//C.P.M de lo contrario prosegimos\r\n modelo.setNombre(vista.jTNombreempresa.getText());//C.P.M mandamos las variabes al modelo \r\n modelo.setDireccion(vista.jTDireccion.getText());\r\n modelo.setRfc(vista.jTRFC.getText());\r\n modelo.setTelefono(vista.jTTelefono.getText());\r\n \r\n Error = modelo.insertar();//C.P.M Ejecutamos el metodo del modelo \r\n if (Error.equals(\"\")) {//C.P.M Si el modelo no regresa un error es que todo salio bien\r\n JOptionPane.showMessageDialog(null, \"Se guardo exitosamente la configuracion\");//C.P.M notificamos a el usuario\r\n vista.dispose();//C.P.M y cerramos la vista\r\n } else {//C.P.M de lo contrario \r\n JOptionPane.showMessageDialog(null, Error);//C.P.M notificamos a el usuario el error\r\n }\r\n }\r\n }", "@RequiresApi(api = Build.VERSION_CODES.O)\n private void añadirTarea() throws ParseException {\n TaskSQLiteHelper usdbh = new TaskSQLiteHelper(this, \"bdTareas\", null, 1);\n //Obtenemos referencia a la base de datos para poder modificarla.\n SQLiteDatabase db = usdbh.getWritableDatabase();\n\n //Abrimos la base de datos ALARMAS en modo escritura.\n TaskSQLiteHelper2 usdbh2 = new TaskSQLiteHelper2(this, \"bdAlarmas\", null, 1);\n //Obtenemos referencia a la base de datos para poder modificarla.\n SQLiteDatabase db2 = usdbh2.getWritableDatabase();\n\n if (etTitulo.getText().toString().trim().isEmpty() && etFechaLimite.getText().toString().trim().isEmpty()) {\n crearToast(\"Faltan campos por completar.\").show();\n etTitulo.setBackgroundTintList(getResources().getColorStateList(R.color.colorRedLight));\n etFechaLimite.setBackgroundTintList(getResources().getColorStateList(R.color.colorRedLight));\n } else {\n if (etTitulo.getText().toString().trim().isEmpty()) {\n crearToast(\"Introduce titulo para la tarea.\").show();\n etTitulo.setBackgroundTintList(getResources().getColorStateList(R.color.colorRedLight));\n } else {\n etTitulo.setBackgroundTintList(getResources().getColorStateList(R.color.colorGray));\n if (etFechaLimite.getText().toString().trim().isEmpty()) {\n crearToast(\"Introduce una fecha límite.\").show();\n etFechaLimite.setBackgroundTintList(getResources().getColorStateList(R.color.colorRedLight));\n } else {\n etTitulo.setBackgroundTintList(getResources().getColorStateList(R.color.colorGray));\n crearTarea();\n db.execSQL(\"INSERT INTO tareas(titulo, descripcion, fechaLimite, horaLimite, fechaCompleta, usarRecordatorio) \" +\n \"VALUES('\" + crearTarea().getTitulo() + \"', '\" + crearTarea().getDescripcion() + \"', '\" +\n crearTarea().getFecha() + \"', '\" + crearTarea().getHora() + \"', '\" + crearTarea().getFechaCompleta() + \"', '\" +\n ((crearTarea().isUsarRecordatorio() == false) ? 0 : 1) + \"');\");\n db.close();\n\n if (crearTarea().isUsarRecordatorio()) {\n db2.execSQL(\"INSERT INTO alarmas(titulo, minutos) VALUES('\" + crearTarea().getTitulo().trim() + \"', '\" + alarmService.getMinutes(gCalendar) + \"');\");\n db2.close();\n }\n\n crearToast(\"Tarea añadida correctamente.\").show();\n\n finish();\n Intent i = new Intent(this, MainActivity.class);\n startActivity(i);\n }\n }\n }\n }", "private void insertar(String nombre, String Contra) {\n ini.Tabla.insertar(nombre, Contra);\n AVLTree arbol = new AVLTree();\n Nod nodo=null;\n ini.ListaGen.append(0,0,\"\\\\\",nombre,\"\\\\\",\"\\\\\",arbol,\"C\",nodo); \n \n }", "public void inserir(Comentario c);", "@Override\n\tpublic void ajouter(Zone t) {\n\t\ttry {\n\t\t\t //preparation de la requete\n\t\t\tString sql=\"INSERT into zone (lieu,frequence,id_chaine) values(?, ?,?)\";\n\t\t\tPreparedStatement pst=Con.prepareStatement(sql);\n\t\t\t//transmission des valeurs aux parametres de la requete\n\t\t\tpst.setString(1,t.getLieu());\n\t\t\tpst.setString(2,t.getFrequence());\n\t\t\tpst.setInt(3, t.getChaine().getId_chaine());\n\t\t\t//execussion de la requete\n\t\t\tpst.executeUpdate();\n\t\t\tSystem.out.println(\"zone ajoutees \");\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\tSystem.out.println(\"Probleme de driver ou connection avec la BD\");\n\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void insere(Pessoa pessoa){\n\t\tdb.save(pessoa);\n\t}", "private void insertar() {\n String nombre = edtNombre.getText().toString();\n String telefono = edtTelefono.getText().toString();\n String correo = edtCorreo.getText().toString();\n // Validaciones\n if (!esNombreValido(nombre)) {\n TextInputLayout mascaraCampoNombre = (TextInputLayout) findViewById(R.id.mcr_edt_nombre_empresa);\n mascaraCampoNombre.setError(\"Este campo no puede quedar vacío\");\n } else {\n mostrarProgreso(true);\n String[] columnasFiltro = {Configuracion.COLUMNA_EMPRESA_NOMBRE, Configuracion.COLUMNA_EMPRESA_TELEFONO\n , Configuracion.COLUMNA_EMPRESA_CORREO, Configuracion.COLUMNA_EMPRESA_STATUS};\n String[] valorFiltro = {nombre, telefono, correo, estado};\n Log.v(\"AGET-ESTADO\", \"ENVIADO: \" + estado);\n resultado = new ObtencionDeResultadoBcst(this, Configuracion.INTENT_EMPRESA_CLIENTE, columnasFiltro, valorFiltro, tabla, null, false);\n if (ID.isEmpty()) {\n resultado.execute(Configuracion.PETICION_EMPRESA_REGISTRO, tipoPeticion);\n } else {\n resultado.execute(Configuracion.PETICION_EMPRESA_MODIFICAR_ELIMINAR + ID, tipoPeticion);\n }\n }\n }", "public void insertar(String dato){\r\n \r\n if(estaVacia()){\r\n \r\n primero = new NodoJugador(dato);\r\n }else{\r\n NodoJugador temporal = primero;\r\n while(temporal.getSiguiente()!=null){\r\n temporal = temporal.getSiguiente();\r\n }\r\n \r\n temporal.setSiguiente(new NodoJugador(dato));\r\n }\r\n }", "@Override\n\tpublic void insert(Unidade obj) {\n\n\t}", "public void processInsertar() {\n }", "int insert(TDictAreas record);", "private void insertaTS(String sToken, int sTipo) {\n tSimbolos[tabla_idx] = new TablaSimbolos(sToken, sTipo, 1);\n tabla_idx++;\n }", "public void mostrarTareasEnPosicionImpar(){}", "public void insertar(Proceso p, int tiempo) {\n\t\tif (p == null || tiempo < 0) {\n\t\t\treturn;\n\t\t}\n\t\tProceso nuevo = new Proceso();\n\t\tnuevo.rafaga = p.rafaga;\n\t\tnuevo.id = p.id;\n\t\tnuevo.IdCola = this.IdCola;\n\t\tnuevo.NombreCola = this.NombreCola;\n\t\tnuevo.tllegada = tiempo;\n\t\tnuevo.ColaProviene = p.ColaProviene;\n\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tcabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t\tthis.rafagaTotal += nuevo.rafaga;\n\t\tthis.Ordenamiento();\n\t}", "public void insercionMasiva() {\r\n\t\tif (!precondInsert())\r\n\t\t\treturn;\r\n\t\tUploadItem fileItem = seleccionUtilFormController.crearUploadItem(\r\n\t\t\t\tfName, uFile.length, cType, uFile);\r\n\t\ttry {\r\n\t\t\tlLineasArch = FileUtils.readLines(fileItem.getFile(), \"ISO-8859-1\");\r\n\t\t} catch (IOException e) {\r\n\t\t\tstatusMessages.add(Severity.INFO, \"Error al subir el archivo\");\r\n\t\t}\r\n\r\n\t\tStringBuilder cadenaSalida = new StringBuilder();\r\n\t\tString estado = \"EXITO\";\r\n\t\tcantidadLineas = 0;\r\n\t\t//Ciclo para contar la cantdad de adjudicados o seleccionados que se reciben\r\n\t\tfor (String linea : lLineasArch) {\r\n\t\t\tcantidadLineas++;\r\n\t\t\tif(cantidadLineas > 1){\r\n\t\t\t\tseleccionados++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Condicion para verificar si la cantidad de seleccionados es mayor a la cantidad de vacancias (en cuyo caso se procede a abortar el proceso e imprimir\r\n\t\t//un mensaje de error) o verificar si esta es menor (se imprime el mensaje pero se continua)\r\n\t\t\r\n\t\tif(seleccionados > concursoPuestoAgrNuevo.getCantidadPuestos()){\r\n\t\t\testado = \"FRACASO\";\r\n\t\t\tcadenaSalida.append(estado + \" - CANTIDAD DE AJUDICADOS ES SUPERIOR A LA CANTIDAD DE PUESTOS VACANTES PARA EL GRUPO\");\r\n\t\t\tcadenaSalida.append(System.getProperty(\"line.separator\"));\r\n\t\t}\r\n\t\telse if(seleccionados < concursoPuestoAgrNuevo.getCantidadPuestos()){\r\n\t\t\tcadenaSalida.append(\"ADVERTENCIA - CANTIDAD DE ADJUDICADOS ES INFERIOR A LA CANTIDAD DE PUESTOS VACANTES PARA EL GRUPO\");\r\n\t\t\tcadenaSalida.append(System.getProperty(\"line.separator\"));\r\n\t\t}\r\n\t\tseleccionados = 0;\r\n\t\t\r\n\t\tif(!estado.equals(\"FRACASO\")){\r\n\r\n\t\tcantidadLineas = 0;\r\n\t\tfor (String linea : lLineasArch) {\r\n\r\n\t\t\tcantidadLineas++;\r\n\t\t\testado = \"EXITO\";\r\n\t\t\tString observacion = \"\";\r\n\t\t\tFilaPostulante fp = new FilaPostulante(linea);\r\n\t\t\tList<Persona> lista = null;\r\n\t\t\tif (cantidadLineas > 1 && fp != null && fp.valido) {\r\n\t\t\t\t//Verifica si la persona leida en el registro del archivo CSV existe en la Tabla Persona\r\n\t\t\t\tString sqlPersona = \"select * from general.persona where persona.documento_identidad = '\"+fp.getDocumento()+ \"'\";\r\n\t\t\t\tQuery q1 = em.createNativeQuery(sqlPersona, Persona.class);\r\n\t\t\t\tPersona personaLocal = new Persona();\r\n\t\t\t\tint banderaEncontroPersonas = 0;\r\n\t\t\t\t//Si existe, se almacena el registro de la tabla\r\n\t\t\t\tif(!q1.getResultList().isEmpty()){\r\n\t\t\t\t\tlista = q1.getResultList();\r\n\t\t\t\t\tif (compararNomApe(lista.get(0).getNombres(), removeCadenasEspeciales(fp.getNombres()))\r\n\t\t\t\t\t\t\t&& compararNomApe(lista.get(0).getApellidos(), removeCadenasEspeciales(fp.getApellidos())) ) {\r\n\t\t\t\t\t\t\tbanderaEncontroPersonas = 1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\t\t\t\tobservacion += \" PERSONA NO REGISTRADA EN LA BASE DE DATOS LOCAL\";\r\n\t\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\t\tobservacion += \" PERSONA NO REGITRADA EN LA BASE DE DATOS LOCAL\";\r\n\t\t\t\t}\r\n\t\t\t\t//Verificamos que la persona figure en la lista corta como seleccionado\r\n\t\t\t\tif(!estado.equals(\"FRACASO\")){\r\n\t\t\t\t\tint banderaExisteEnListaCorta = 0;\t\t\t\t\t\r\n\t\t\t\t\tint i=0;\r\n\t\t\t\t\tif (banderaEncontroPersonas == 1) {\r\n\t\t\t\t\t\twhile(i<lista.size()){\r\n\t\t\t\t\t\t\tpersonaLocal = (Persona) lista.get(i);\r\n\t\t\t\t\t\t\tQuery p = em.createQuery(\"select E from EvalReferencialPostulante E \"\r\n\t\t\t\t\t\t\t\t\t+ \"where E.postulacion.personaPostulante.persona.idPersona =:id_persona and E.concursoPuestoAgr.idConcursoPuestoAgr =:id_concurso_puesto_agr and E.listaCorta=:esta_en_lista_corta\");\r\n\t\t\t\t\t\t\t\t\tp.setParameter(\"id_persona\", personaLocal.getIdPersona());\r\n\t\t\t\t\t\t\t\t\tp.setParameter(\"id_concurso_puesto_agr\", this.idConcursoPuestoAgr);\r\n\t\t\t\t\t\t\t\t\tp.setParameter(\"esta_en_lista_corta\", true);\r\n\t\t\t\t\t\t\tList<EvalReferencialPostulante> listaEvalRefPost = p.getResultList();\r\n\t\t\t\t\t\t\tif (!listaEvalRefPost.isEmpty()) {\r\n\t\t\t\t\t\t\t\tbanderaExisteEnListaCorta = 1;\r\n\t\t\t\t\t\t\t\ti = lista.size();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (banderaExisteEnListaCorta == 0) {\r\n\t\t\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\t\t\tobservacion += \" NO SELECCIONADO/ELEGIBLE EN LISTA CORTA\";\r\n\t\t\t\t\t} else if (banderaExisteEnListaCorta == 1){\r\n\t\t\t\t\t\tobservacion += \" SELECCIONADO/ELEGIBLE EN LISTA CORTA\";\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tQuery p = em.createQuery(\"select E from EvalReferencialPostulante E \"\r\n\t\t\t\t\t\t\t\t+ \"where E.postulacion.personaPostulante.persona.idPersona =:id_persona and E.concursoPuestoAgr.idConcursoPuestoAgr =:id_concurso_puesto_agr and E.listaCorta=:esta_en_lista_corta\");\r\n\t\t\t\t\t\t\t\tp.setParameter(\"id_persona\", personaLocal.getIdPersona());\r\n\t\t\t\t\t\t\t\tp.setParameter(\"id_concurso_puesto_agr\", this.idConcursoPuestoAgr);\r\n\t\t\t\t\t\t\t\tp.setParameter(\"esta_en_lista_corta\", true);\r\n\t\t\t\t\t\tEvalReferencialPostulante auxEvalReferencialPostulante = (EvalReferencialPostulante) p.getResultList().get(0);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Validaciones para actualizaciones\r\n\t\t\t\t\t\t//Bandera indicadora de actualizaciones hechas\r\n\t\t\t\t\t\tint bandera = 0;\r\n\t\t\t\t\t\tif(auxEvalReferencialPostulante.getSelAdjudicado() == null){\r\n\t\t\t\t\t\t\testado = \"EXITO\";\r\n\t\t\t\t\t\t\tauxEvalReferencialPostulante.setSelAdjudicado(true);;\r\n\t\t\t\t\t\t\tbandera = 1;\r\n\t\t\t\t\t\t\tem.merge(auxEvalReferencialPostulante);\r\n\t\t\t\t\t\t\tem.flush();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tagregarEstadoMotivo(linea, estado, observacion, cadenaSalida);\r\n\t\t\t}\r\n\t\t\tif (cantidadLineas > 1 && !fp.valido) {\r\n\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\tcadenaSalida\r\n\t\t\t\t\t\t.append(estado\r\n\t\t\t\t\t\t\t\t+ \" - ARCHIVO INGRESADO CON MENOS CAMPOS DE LOS NECESARIOS. DATOS INCORRECTOS EN ALGUNA COLUMNA.\");\r\n\t\t\t\tcadenaSalida.append(System.getProperty(\"line.separator\"));\r\n\t\t\t}\r\n\r\n\t\t\t// FIN FOR\r\n\t\t}\r\n\t\t//FIN IF\r\n\t\t}\r\n\t\tif (lLineasArch.isEmpty()) {\r\n\t\t\tstatusMessages.add(Severity.INFO, \"Archivo inválido\");\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tSimpleDateFormat sdf2 = new SimpleDateFormat(\"dd_MM_yyyy_HH_mm_ss\");\r\n\t\t\tString nArchivo = sdf2.format(new Date()) + \"_\" + fName;\r\n\t\t\tString direccion = System.getProperty(\"jboss.home.dir\") + System.getProperty(\"file.separator\") + \"temp\" + System.getProperty(\"file.separator\");\r\n\t\t\tFile archSalida = new File(direccion + nArchivo);\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tFileUtils\r\n\t\t\t\t\t\t.writeStringToFile(archSalida, cadenaSalida.toString());\r\n\t\t\t\tif (archSalida.length() > 0) {\r\n\t\t\t\t\tstatusMessages.add(Severity.INFO, \"Insercion Exitosa\");\r\n\t\t\t\t}\r\n\t\t\t\tJasperReportUtils.respondFile(archSalida, nArchivo, false,\r\n\t\t\t\t\t\t\"application/vnd.ms-excel\");\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tstatusMessages.add(Severity.ERROR, \"IOException\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic MensajeBean inserta(Tramite_presentan_info_impacto nuevo) {\n\t\treturn tramite.inserta(nuevo);\r\n\t}", "public void insertarAlimento (int id_alimento, String nombre, String estado, float caloria, float proteinas,float grasas, float hidratos_de_carbono, float H20, float NE, float vitamina_a, float vitamina_B1, float vitamina_B2, float vitamina_C, float Niac, float sodio, float potasio, float calcio, float magnesio, float cobre, float hierro, float fosforo, float azufre, float cloro, float Fen, float Ileu, float Leu, float Lis, float Met, float Tre, float Tri, float Val, float Acid, float AlCAL);", "@Override\r\n\tpublic void insertar() {\n\t\ttab_cuenta.eliminar();\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public void insertar(int index, T elemento) {\n if (raiz == null) {\n raiz = new NodoBAVL<>(elemento);\n }\n insertarOrdenado(raiz, elemento, index);\n }", "@Override\n\tpublic MensajeBean inserta(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.inserta(nuevo);\n\t}", "public void insereFim(TinfoTransicao item) {\t\t\n\t\tTnodoTransicao novo = new TnodoTransicao(item);\n\t\tnovo.proximo = this.ultimo.proximo;\n\t\tthis.ultimo.proximo = novo;\n\t\tthis.ultimo = novo;\t\n\t}", "public void insert(Conge conge) ;", "public void inserisci(NodoAlbero dove, String contenuto, String tipo){\n if (n_nodi == 0){\n root = new NodoAlbero(contenuto, null, tipo);\n n_nodi++;\n return;\n }\n //se il nodo padre non ha un figlio, lo creiamo\n if (dove.getFiglio() == null)\n dove.setFiglio(new NodoAlbero(contenuto, dove, tipo));\n //se ce ne ha già almeno uno, lo accodiamo agli altri figli\n else {\n NodoAlbero temp = dove.getFiglio();\n while (temp.getFratello() != null)\n temp = temp.getFratello();\n temp.setFratello(new NodoAlbero(contenuto, temp.getPadre(), tipo));\n }\n n_nodi++;\n }", "private void populaFaixaEtariaCat()\n {\n faixaEtariaCatDAO.insert(new FaixaEtariaCat(\"Até 15 anos\"));\n faixaEtariaCatDAO.insert(new FaixaEtariaCat(\"De 16 a 19 anos\"));\n faixaEtariaCatDAO.insert(new FaixaEtariaCat(\"De 20 a 30 anos\"));\n faixaEtariaCatDAO.insert(new FaixaEtariaCat(\"De 31 a 45 anos\"));\n faixaEtariaCatDAO.insert(new FaixaEtariaCat(\"De 46 a 60 anos\"));\n faixaEtariaCatDAO.insert(new FaixaEtariaCat(\"Mais de 60 anos\"));\n faixaEtariaCatDAO.insert(new FaixaEtariaCat(\"Todas as idades\"));\n\n }", "public void insertar(int rafaga, int tiempo) {\n\t\tif (rafaga <= 0 || tiempo < 0) {\n\t\t\treturn;\n\t\t}\n\t\tProceso nuevo = new Proceso();\n\t\tnuevo.id = String.valueOf((char) this.caracter);\n\t\tthis.caracter++;\n\t\tnuevo.rafaga = rafaga;\n\t\tnuevo.tllegada = tiempo;\n\t\tnuevo.IdCola = this.IdCola;\n\t\tnuevo.NombreCola = this.NombreCola;\n\t\tnuevo.ColaProviene = this.NombreCola;\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tcabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t\tthis.rafagaTotal += rafaga;\n\t\tthis.Ordenamiento();\n\t}", "@Insert(onConflict = OnConflictStrategy.IGNORE)\n void insert(DataTugas dataTugas);", "public void insertarCargo() {\n ContentValues values = new ContentValues();\n for (int i = 0; i <= 3; i++) {\n values.put(\"NOMBRE_CARGO\", \"nombre \" + i);\n values.put(\"DESCRIPCION_CARGO\", \"Descripcion \" + i);\n db.insert(\"CARGO\", null, values);\n }\n }", "public void insertEstadisticas(String IdPregunta, Integer validacicion, String co_nivel, String co_categoria){\n //Creamos el conector de bases de datos\n AdmiSQLiteOpenHelper admin = new AdmiSQLiteOpenHelper(this, \"administracion\", null, 1 );\n // Abre la base de datos en modo lectura y escritura\n SQLiteDatabase BasesDeDatos = admin.getWritableDatabase();\n\n ContentValues registro = new ContentValues(); // Instanciamos el objeto contenedor de valores.\n registro.put(\"co_estudios\", consultarEstudioUltimaId() );\n registro.put(\"co_pregunta\", IdPregunta);\n registro.put(\"co_nivel\", co_nivel);\n registro.put(\"co_categoria\", co_categoria);\n registro.put(\"validacion\", validacicion);\n\n System.out.println( \" ------------- Insert RESPUESTA ------------------\");\n System.out.println( \" IdEstudio \" + validacicion );\n\n\n //Conectamos con la base datos insertamos.\n BasesDeDatos.insert(\"t_estadisticas\", null, registro);\n BasesDeDatos.close();\n\n }", "public void insertarcola(){\n Cola_banco nuevo=new Cola_banco();// se declara nuestro metodo que contendra la cola\r\n System.out.println(\"ingrese el nombre que contendra la cola: \");// se pide el mensaje desde el teclado\r\n nuevo.nombre=teclado.next();// se ingresa nuestro datos por consola yse almacena en la variable nombre\r\n if (primero==null){// se usa una condicional para indicar si primer dato ingresado es igual al null\r\n primero=nuevo;// se indica que el primer dato ingresado pasa a ser nuestro dato\r\n primero.siguiente=null;// se indica que el el dato ingresado vaya al apuntador siguente y que guarde al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo en la cabeza de nuestro cola\r\n }else{// se usa la condicon sino se cumple la primera\r\n ultimo.siguiente=nuevo;//se indica que ultimo dato ingresado apunte hacia siguente si es que hay un nuevo dato ingresado y que vaya aser el nuevo dato de la cola\r\n nuevo.siguiente=null;// se indica que el nuevo dato ingresado vaya y apunete hacia siguente y quees igual al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo dato\r\n }\r\n System.out.println(\"\\n dato ingresado correctamente\");// se imprime enl mensaje que el dato ha sido ingresado correctamente\r\n}", "public void insertFeriadoZona(FeriadoZona feriadoZona, Usuario usuario);", "void insertar_cabeceraMatriz(Nodo_B nuevo){\n \n if(this.primero == null){\n this.primero = nuevo;\n this.ultimo = nuevo;\n \n this.size++;\n }else{\n \n if(nuevo.getValor() < this.primero.getValor()){\n nuevo.siguiente = this.primero;\n this.primero.anterior = nuevo;\n this.primero = nuevo;\n this.size++;\n }else if(nuevo.getValor() > this.ultimo.getValor()){\n this.ultimo.siguiente = nuevo;\n nuevo.anterior = this.ultimo;\n this.ultimo = nuevo;\n this.size++;\n }else{\n Nodo_B pivote = this.primero;\n \n while(pivote != null){\n if(nuevo.getValor() < pivote.getValor()){\n nuevo.siguiente = pivote;\n nuevo.anterior = pivote.anterior;\n pivote.anterior.siguiente = nuevo;\n pivote.anterior = nuevo;\n this.size++;\n break;\n }else if(nuevo.getValor() == pivote.getValor()){\n System.out.print(\"ya hay un valor con este codigo registrado\");\n break;\n }else{\n pivote = pivote.siguiente;\n }\n }\n }\n }\n // JOptionPane.showMessageDialog(null, \"salio del metodo insertar cabecera con el pais :\"+nuevo.nombreDestino);\n }", "int insertSelective(TDictAreas record);", "public void insertarEn(int posicion, Nodo nInsertar) {\n if (posicion == 0) {\r\n nInsertar.setnSIg(nIni);\r\n nIni.setnPrev(nInsertar);\r\n nIni = nInsertar;\r\n } //EN LA ULTIMA POSICION\r\n else if (posicion == contarNodos()) {\r\n agregarNodo(nInsertar);\r\n } //CUALQUIER OTRA POSICION\r\n else {\r\n int contador = 0;\r\n Nodo nTemp = nIni;\r\n while (contador < posicion - 1) {\r\n nTemp = nTemp.getnSIg();\r\n contador++;\r\n }\r\n nInsertar.setnSIg(nTemp.getnSIg());\r\n nInsertar.setnPrev(nTemp);\r\n nTemp.setnSIg(nInsertar);\r\n nTemp.setnPrev(nTemp.getnPrev());\r\n }\r\n }", "@Override\n\tpublic Tutorial insert(Tutorial t) {\n\t\treturn cotizadorRepository.save(t);\n\n\t\t\n\t}", "@Override\n\tpublic int insertArea(Area area) {\n\t\treturn areaMapper.insertArea(area);\n\t}", "public void insert(Doacao doacao) {\n SQLiteDatabase sqLiteDatabase = getWritableDatabase();\n\n //Abrindo o mapeamento dos dados para o insert\n ContentValues dados = new ContentValues();\n\n dados.put(\"id_participa_campanha\",doacao.getId_participa_campanha());\n dados.put(\"id_recurso\",doacao.getId_recurso());\n dados.put(\"data\",doacao.getData());\n dados.put(\"quantidade\",doacao.getQuantidade());\n\n\n sqLiteDatabase.insert(\"doacao\",null, dados);\n\n }", "public static void insertar (tcus_clientes info){\n \tNodoArbol nuevo = new NodoArbol (info);\n if (raiz == null) {\n raiz = nuevo;\n } else {\n \tNodoArbol anterior = null, reco;\n reco = raiz;\n while (reco != null) {\n anterior = reco;\n if (info.getNmid() < reco.getNodo().getNmid())\n reco = reco.getIzq();\n else\n reco = reco.getDer();\n }\n if (info.getNmid() < anterior.getNodo().getNmid())//50<100\n anterior.setIzq(nuevo); \n else\n anterior.setDer(nuevo);\n }\n }", "void insertSelective(CTipoComprobante record) throws SQLException;", "private void insertData() {\r\n \r\n TeatroEntity teatro = factory.manufacturePojo(TeatroEntity.class);\r\n em.persist(teatro);\r\n FuncionEntity funcion = factory.manufacturePojo(FuncionEntity.class);\r\n List<FuncionEntity> lista = new ArrayList();\r\n lista.add(funcion);\r\n em.persist(funcion);\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n sala.setFuncion(lista);\r\n em.persist(sala);\r\n data.add(sala);\r\n }\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n em.persist(sala);\r\n sfdata.add(sala);\r\n }\r\n \r\n }", "int insertSelective(Tipologia record);", "public Tarea(String descripcionTarea)\n {\n //Añade la descripción de la tarea\n descripcion = descripcionTarea;\n tareaCompletada = false;\n //Por defecto, las tareas tienen prioridad 0\n prioridad = 0;\n //Las nuevas tareas no tienen fecha de vencimiento\n fechaVencimiento = null;\n }", "public void insertarTratamiento(String fecha, String tratamiento)\n {\n ContentValues valores = new ContentValues();\n valores.put(\"fecha\",fecha);\n valores.put(\"tipoTratamiento\",tratamiento);\n db.insert(\"tratamiento\",null,valores);\n\n }", "@Override\n public void insert(J34SiscomexMercadoriaAdi j34SiscomexMercadoriaAdi) {\n super.doInsert(j34SiscomexMercadoriaAdi);\n }", "public void insertar2(String nombre, String apellido, String mail, String celular, String comuna,String profesor,String alumno,String clave) {\n db.execSQL(\"insert into \" + TABLE_NAME + \" values (null,'\" + nombre + \"','\" + apellido + \"','\" + mail + \"','\" + celular + \"','\" + comuna + \"',\" + profesor + \",0,0,0,0,\" + alumno + \",'\" + clave + \"')\");\n }", "public void insertar(Proceso p) {\n\t\tif (p == null) {\n\t\t\treturn;\n\t\t}\n\t\tProceso nuevo = new Proceso();\n\t\tnuevo.rafaga = p.rafaga;\n\t\tnuevo.tllegada = p.tllegada;\n\t\tnuevo.IdCola = this.IdCola;\n\t\tnuevo.NombreCola = this.NombreCola;\n\t\tnuevo.rrejecutada = p.rrejecutada;\n\t\tnuevo.ColaProviene = p.ColaProviene;\n\t\tint tamaņo = p.id.length();\n\t\tif (tamaņo == 1) {\n\t\t\tnuevo.id = p.id + \"1\";\n\t\t} else {\n\t\t\tchar id = p.id.charAt(0);\n\t\t\tint numeroId = Integer.parseInt(String.valueOf(p.id.charAt(1))) + 1;\n\t\t\tnuevo.id = String.valueOf(id) + String.valueOf(numeroId);\n\t\t}\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tcabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t\tthis.rafagaTotal += nuevo.rafaga;\n\t\tthis.Ordenamiento();\n\t}", "@Override\n\tpublic void insertIPODetail(IPODetail ipo) throws SQLException {\n\t\t\n\t}", "public Etudiant insert(Etudiant obj) {\n\t\treturn null;\n\t}", "public void insert()\n\t{\n\t}", "public Mascota insert(Mascota mascota){\n if(mascota != null)\n mascotaRepository.save(mascota);\n return mascota;\n }", "public void inseriPessoa() throws IOException {\n\t\tString r;\n\t\tvetPessoas[nPessoas] = new Pessoa();\n\t\tSystem.out.println(\"Inseri o nome \");\n\t\tr = EntradaTeclado.leString();\n\t\tvetPessoas[nPessoas].setNome(r);\n\t\t\n\t\tSystem.out.println(\"Inseri o Cpf \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetPessoas[this.nPessoas].setCpf(r);\n\t\t\n\t\tSystem.out.println(\"Inseri o Endereco \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetPessoas[this.nPessoas].setEndereco(r);\n\t\t\n\t\tSystem.out.println(\"Inseri o Email \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetPessoas[this.nPessoas].setEmail(r);\n\t\t\n\t\tSystem.out.println(\"Inseri o Data de Nascimento fomanto (dd/mm/aaaa)\");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetPessoas[this.nPessoas].setDataNascimento(r);\n\t\t\n\t\tSystem.out.println(\"Inseri o Estado Civil \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetPessoas[this.nPessoas].setEstadoCivil(r);\n\t\t\n\t\tthis.nPessoas+=1;\n\t}", "@Override\r\n public void inserirQuestaoDiscursiva(QuestaoDiscursiva questaoDiscursiva)\r\n throws Exception {\n rnQuestaoDiscursiva.inserir(questaoDiscursiva);\r\n\r\n }", "@Override\n\tpublic void insert() {\n\t\t\n\t}", "@Override\n public boolean inserir(Pessoa p) {\n try {\n pessoa.getPessoas().add(p);\n serializar(arquivo2Serializado, pessoa);\n } catch (Exception ex) {\n Logger.getLogger(PessoaDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return true;\n }", "public void insertarNota(Note nota){\n ContentValues valores = new ContentValues();\n valores.put(\"fecha\",nota.obtenerFechaFormateada());\n valores.put(\"titulo\",nota.getTitulo());\n valores.put(\"nota\",nota.getNota());\n if(nota.getIdExamenAsociado()!=-1){\n valores.put(\"examenAsociado\",nota.getIdExamenAsociado());\n }\n db.insert(\"nota\",null,valores);\n }", "public void InsertarNodo(int nodo) {\r\n Nodo nuevo_nodo = new Nodo(nodo);\r\n nuevo_nodo.siguiente = UltimoValorIngresado;\r\n UltimoValorIngresado = nuevo_nodo;\r\n tamaño++;\r\n }", "public void insertarHematologia(Examen.Hematologia hematologia)\n {\n ContentValues valores = new ContentValues();\n valores.put(\"fecha\",formatter.format(hematologia.getFechaExamen()));\n valores.put(\"fibrinogeno\",hematologia.getFibrinogeno());\n valores.put(\"leucocitos\",hematologia.getFibrinogeno());\n valores.put(\"hemoglobina\",hematologia.getHemoglobina());\n valores.put(\"hematocrito\",hematologia.getHematocrito());\n valores.put(\"plaqueta\",hematologia.getPlaquetas());\n valores.put(\"vsg\",hematologia.getVsg());\n valores.put(\"hcm\",hematologia.getVsg());\n\n db.insert(\"hematologia\",null,valores);\n\n }", "void insert(CTipoComprobante record) throws SQLException;", "int insert(Tipologia record);", "@Override\r\n\tpublic void inserir(Funcionario funcionario) throws SQLException {\n\t\topen();\r\n\t\t\r\n\t\tclose();\r\n\t\t\r\n\t}", "public void crearActividad (Actividad a) {\r\n String query = \"INSERT INTO actividad (identificacion_navegate, numero_matricula, fecha, hora, destino, eliminar) VALUES (\\\"\" \r\n + a.getIdentificacionNavegante()+ \"\\\", \" \r\n + a.getNumeroMatricula() + \", \\\"\" \r\n + a.getFecha() + \"\\\", \\\"\" \r\n + a.getHora() + \"\\\", \\\"\" \r\n + a.getDestino()+ \"\\\" ,false)\";\r\n try {\r\n Statement st = con.createStatement();\r\n st.executeUpdate(query);\r\n st.close();\r\n JOptionPane.showMessageDialog(null, \"Actividad creada\", \"Operación exitosa\", JOptionPane.INFORMATION_MESSAGE);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PActividad.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "private void insertData() {\n compra = factory.manufacturePojo(CompraVentaEntity.class);\n compra.setId(1L);\n compra.setQuejasReclamos(new ArrayList<>());\n em.persist(compra);\n\n for (int i = 0; i < 3; i++) {\n QuejasReclamosEntity entity = factory.manufacturePojo(QuejasReclamosEntity.class);\n entity.setCompraVenta(compra);\n em.persist(entity);\n data.add(entity);\n compra.getQuejasReclamos().add(entity);\n }\n }", "public static void InsertarAutos(Session sesion){\n String[] colores = \"rojo,azul,amarillo,rojo,azul,verde\".split(\",\");\n String[] marca = \"peugeot,mazda,mercedes,fiat,ford,audi\".split(\",\");\n String[] modelo = \"308,tornado,1114,siena,fiesta,tt\".split(\",\");\n String[] precio = \"100000,100000,1000,1000,1000,10000\".split(\",\");\n \n Transaction tx = sesion.beginTransaction();\n \n for (int i = 0; i < colores.length; i++) {\n Autos auto = new Autos();\n auto.setColor(colores[i]);\n auto.setConcesionario(\"1\");\n auto.setMarca(marca[i]);\n auto.setModelo(modelo[i]);\n sesion.save(auto);\n }\n \n tx.commit();\n }", "public void insert(Nodo nodo) {\r\n\t\tif(cont<7){\r\n\t\t\tif(this.getRaiz() == null) {\r\n\t this.setRaiz(nodo);\r\n\t nodo.setClave(0);\r\n\t return;\r\n\t }\r\n\t \r\n\t Nodo t = this.getRaiz();\r\n\t boolean val = true;\r\n\t while((t != null)&&(val)) {\r\n\t if(t.getLeft() == null) {\r\n\t \tt.setLeft(nodo);\r\n\t \tcont++;\r\n\t \tNivel(nodo);\r\n\t \tval=false;\r\n\t }\r\n\t else if(t.getRight() == null) {\r\n\t t.setRight(nodo);\r\n\t cont++;\r\n\t \tNivel(nodo);\r\n\t val=false;\r\n\t }\r\n\t else {\r\n\t int lCount = countChildren(t.getLeft());\r\n\t int rCount = countChildren(t.getRight());\r\n\t if(lCount == rCount)\r\n\t t = t.getLeft(); \r\n\t \r\n\t else if(lCount == 0 || lCount == 1)\r\n\t t = t.getLeft(); \r\n\t \r\n\t else\r\n\t t = t.getRight();\r\n\t \r\n\t }\r\n\t\r\n\t }\r\n\t\t}\r\n\t}", "public void insertarHistoria(HistoriaPaciente historiaPaciente){\n ContentValues valores = new ContentValues();\n valores.put(\"condicion\",historiaPaciente.getCondicion());\n valores.put(\"tiposangre\",historiaPaciente.getTipoSangre());\n valores.put(\"peso\",historiaPaciente.getPeso());\n valores.put(\"estatura\",historiaPaciente.getEstatura());\n db.insert(\"historia\",null,valores);\n }", "public void ajouter() {\n position = graph.edges.ajouterElement(this);\n origine.successeurs.inserer(destination);\n destination.predecesseurs.inserer(origine);\n origine.aretes_sortantes.inserer(this);\n destination.aretes_entrantes.inserer(this);\n }", "@Override\r\n\tpublic void insertTea(Teacher teacher) {\n\r\n\t}", "public void insertEstudio(){\n //Creamos el conector de bases de datos\n AdmiSQLiteOpenHelper admin = new AdmiSQLiteOpenHelper(this, \"administracion\", null, 1 );\n // Abre la base de datos en modo lectura y escritura\n SQLiteDatabase BasesDeDatos = admin.getWritableDatabase();\n\n //Metodo apra almacenar fecha en SQLite\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n String date = sdf.format(new Date());\n\n ContentValues registro = new ContentValues(); // Instanciamos el objeto contenedor de valores.\n registro.put(\"fecha\", date); // Aqui asociamos los atributos de la tabla con los valores de los campos (Recuerda el campo de la tabla debe ser igual aqui)\n registro.put(\"co_actividad\", \"1\"); // Aqui asociamos los atributos de la tabla con los valores de los campos (Recuerda el campo de la tabla debe ser igual aqui)\n\n //Conectamos con la base datos insertamos.\n BasesDeDatos.insert(\"t_estudios\", null, registro);\n BasesDeDatos.close();\n\n }", "public static void inserttea() {\n\t\ttry {\n\t\t\tps = conn.prepareStatement(\"insert into teacher values ('\"+teaid+\"','\"+teaname+\"','\"+teabirth+\"','\"+protitle+\"','\"+cno+\"')\");\n\t\t\tSystem.out.println(\"cno:\"+cno);\n\t\t\tps.executeUpdate();\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"教师记录添加成功!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}catch (Exception e){\n\t\t\t// TODO Auto-generated catch block\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"数据添加异常!\", \"提示消息\", JOptionPane.ERROR_MESSAGE);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\r\n\tpublic void insert(Object obj) throws DAOException {\n\t\tOfferta offerta;\r\n\t\ttry {\r\n\t\t\tofferta = (Offerta) obj;\r\n\r\n\t\t\tconn = getConnection(usr, pass);\r\n\r\n\t\t\tps = conn.prepareStatement(insertQuery);\r\n\r\n\t\t\tSystem.out.println(\"Inserimento dell'offerta nel db.\");\r\n\t\t\tofferta.print();\r\n\r\n\t\t\tps.setInt(1, offerta.getIdOfferta());\r\n\t\t\tps.setInt(2, offerta.getIdTratta());\r\n\t\t\tps.setInt(3, offerta.getData().getGiorno());\r\n\t\t\tps.setInt(4, offerta.getData().getMese());\r\n\t\t\tps.setInt(5, offerta.getData().getAnno());\r\n\t\t\tps.setInt(6, offerta.getOraPartenza().getOra());\r\n\t\t\tps.setInt(7, offerta.getOraPartenza().getMinuti());\r\n\t\t\tps.setInt(8, offerta.getOraArrivo().getOra());\r\n\t\t\tps.setInt(9, offerta.getOraArrivo().getMinuti());\r\n\t\t\tps.setInt(10, offerta.getPosti());\r\n\t\t\tps.setInt(11, offerta.getDataInserimento().getGiorno());\r\n\t\t\tps.setInt(12, offerta.getDataInserimento().getMese());\r\n\t\t\tps.setInt(13, offerta.getDataInserimento().getAnno());\r\n\r\n\t\t\tps.executeUpdate();\r\n\r\n\t\t} catch (ClassCastException e) {\r\n\t\t\tthrow new DAOException(\"Errore in insert ClassCastException.\");\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new DAOException(\"Errore in insert SQLException.\");\r\n\t\t}\r\n\r\n\t}", "private void insertData() {\n\n cliente = factory.manufacturePojo(ClienteEntity.class);\n em.persist(cliente);\n for (int i = 0; i < 3; i++) {\n FormaPagoEntity formaPagoEntity = factory.manufacturePojo(FormaPagoEntity.class);\n formaPagoEntity.setCliente(cliente);\n em.persist(formaPagoEntity);\n data.add(formaPagoEntity);\n }\n }", "public boolean insert(Contribuyente contribuyente){\n return true;\n }", "public boolean inserir(GrauParentesco grauParentesco) throws Exception ;", "public void adicionar() {\n String sql = \"insert into empresa(empresa, cnpj, endereco, telefone, email) values (?,?,?,?,?)\";\n try {\n pst = conexao.prepareStatement(sql);\n pst.setString(1, txtEmpNome.getText());\n pst.setString(2, txtEmpCNPJ.getText());\n pst.setString(3, txtEmpEnd.getText());\n pst.setString(4, txtEmpTel.getText());\n pst.setString(5, txtEmpEmail.getText());\n // validacao dos campos obrigatorios\n if ((txtEmpNome.getText().isEmpty()) || (txtEmpCNPJ.getText().isEmpty())) {\n JOptionPane.showMessageDialog(null, \"Preencha todos os campos obrigatórios\");\n } else {\n //a linha abaixo atualiza a tabela usuarios com os dados do formulario\n // a esttrutura abaixo confirma a inserção na tabela\n int adicionado = pst.executeUpdate();\n if (adicionado > 0) {\n JOptionPane.showMessageDialog(null, \"Empresa adicionada com sucesso\");\n txtEmpNome.setText(null);\n txtEmpEnd.setText(null);\n txtEmpTel.setText(null);\n txtEmpEmail.setText(null);\n txtEmpCNPJ.setText(null);\n }\n }\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "public void agregaAntNoPato(String id_antNP, String religion_antNP, String lugarNaci_antNP, String estaCivil_antNP, \n String escolaridad_antNP, String higiene_antNP, String actividadFisica_antNP, int frecuencia_antNP, \n String sexualidad_antNP, int numParejas_antNP, String sangre_antNP, String alimentacion_antNP, String id_paciente,\n boolean escoCompInco_antNP, String frecVeces_antNP, Connection conex){\n String sqlst = \"INSERT INTO antnopato\\n \"+\n \"(`id_antNP`,\\n\" +\n \"`religion_antNP`,\\n\" +\n \"`lugarNaci_antNP`,\\n\" +\n \"`estaCivil_antNP`,\\n\" +\n \"`escolaridad_antNP`,\\n\" +\n \"`higiene_antNP`,\\n\" +\n \"`actividadFisica_antNP`,\\n\" +\n \"`frecuencia_antNP`,\\n\" +\n \"`sexualidad_antNP`,\\n\" +\n \"`numParejas_antNP`,\\n\" +\n \"`sangre_antNP`,\\n\" +\n \"`alimentacion_antNP`,\\n\" +\n \"`id_paciente`,\\n\"+\n \"`escoCompInco_antNP`,\\n\"+\n \"`frecVeces_antNP`)\\n\"+\n \"VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n try(PreparedStatement sttm = conex.prepareStatement(sqlst)) {\n conex.setAutoCommit(false);\n sttm.setString (1, id_antNP);\n sttm.setString (2, religion_antNP);\n sttm.setString (3, lugarNaci_antNP);\n sttm.setString (4, estaCivil_antNP);\n sttm.setString (5, escolaridad_antNP);\n sttm.setString (6, higiene_antNP);\n sttm.setString (7, actividadFisica_antNP);\n sttm.setInt (8, frecuencia_antNP);\n sttm.setString (9, sexualidad_antNP);\n sttm.setInt (10, numParejas_antNP);\n sttm.setString (11, sangre_antNP);\n sttm.setString (12, alimentacion_antNP);\n sttm.setString (13, id_paciente);\n sttm.setBoolean (14, escoCompInco_antNP);\n sttm.setString (15, frecVeces_antNP);\n sttm.addBatch();\n sttm.executeBatch();\n conex.commit();\n aux.informacionUs(\"Antecedentes personales no patológicos guardados\", \n \"Antecedentes personales no patológicos guardados\", \n \"Antecedentes personales no patológicos han sido guardados exitosamente en la base de datos\");\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "public void insertaMensaje(InfoMensaje m) throws Exception;", "private void insertData() {\r\n PodamFactory factory = new PodamFactoryImpl();\r\n for (int i = 0; i < 3; i++) {\r\n UsuarioEntity entity = factory.manufacturePojo(UsuarioEntity.class);\r\n em.persist(entity);\r\n dataUsuario.add(entity);\r\n }\r\n for (int i = 0; i < 3; i++) {\r\n CarritoDeComprasEntity entity = factory.manufacturePojo(CarritoDeComprasEntity.class);\r\n if (i == 0 ){\r\n entity.setUsuario(dataUsuario.get(0));\r\n }\r\n em.persist(entity);\r\n data.add(entity);\r\n }\r\n }", "public void inserir(ContaBancaria contaBancaria) {\n\t\tcontas.add(contaBancaria);\n\n\t}", "@Override\n public void insert(J34SiscomexPaises j34SiscomexPaises) {\n super.doInsert(j34SiscomexPaises);\n }", "public void guardar() {\n try {\n objConec.conectar();\n objConec.Sql = objConec.con.prepareStatement(\"insert into contacto values(null,?,?,?,?,?)\");\n objConec.Sql.setString(1, getNom_con());\n objConec.Sql.setInt(2, getTel_con()); \n objConec.Sql.setString(3, getEma_con());\n objConec.Sql.setString(4, getAsu_con());\n objConec.Sql.setString(5, getMen_con());\n objConec.Sql.executeUpdate();\n objConec.cerrar();\n JOptionPane.showMessageDialog(null, \"Mensaje enviado correctamente\");\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Error al enviar el mensaje\");\n\n }\n\n }", "int insertSelective(Movimiento record);", "public void insertarArista(int i, int j) {\n insertarArista(i, j, 1);\n /*if (!existeArista(i, j)) { \n elArray[i].insertar(new Adyacente(j, 1)); \n numA++; \n }*/\n }", "public void insertar(int dato) {\n if (estaLlena()){ // si la pila esta lllena (,etodo en linea 43)\r\n incrementarArreglo(); //incrementamos su capacidad\r\n }\r\n array[++top] = dato; //e insertamos el dato\r\n }", "Position_ordonnee createPosition_ordonnee();", "public void insertarOrden(Object dato) {\n Nodo nuevo = new Nodo(dato);\n int res = 0;\n // System.out.println(\"esxa\"+res);\n if (primero == null) {\n nuevo.setReferencia(primero);\n primero = nuevo;\n // System.out.println(\"Es nulo\");\n// System.out.println(\"sss\"+primero.getDato());\n } else {\n res = comp.evaluar(dato, primero.getDato());\n // System.out.println(\"\"+res);\n if (res == -1) {\n nuevo.setReferencia(primero);\n primero = nuevo;\n } else {\n int auxres = 0;\n Nodo anterior, actual;\n anterior = actual = primero;\n auxres = comp.evaluar(dato, actual.getDato());\n while ((actual.getReferencia() != null) && (auxres == 1)) {\n anterior = actual;\n actual = actual.getReferencia();\n auxres = comp.evaluar(dato, actual.getDato());\n }\n if (auxres == 1) {\n anterior = actual;\n }\n nuevo.setReferencia(anterior.getReferencia());\n anterior.setReferencia(nuevo);\n\n }\n }\n\n }", "public void insertar() throws SQLException {\n String sentIn = \" INSERT INTO datosnodoactual(AmigoIP, AmigoPuerto, AmigoCertificado, AmigoNombre, AmigoSobreNombre, AmigoLogueoName, AmigoPassword) \"\r\n + \"VALUES (\" + AmigoIp + \",\" + AmigoPuerto + \",\" + AmigoCertificado + \",\" + AmigoNombre + \",\" + AmigoSobreNombre + \",\" + AmigoLogueoName + \",\" + AmigoPassword + \")\";\r\n System.out.println(sentIn);\r\n InsertApp command = new InsertApp();\r\n try (Connection conn = command.connect();\r\n PreparedStatement pstmt = conn.prepareStatement(sentIn)) {\r\n if (pstmt.executeUpdate() != 0) {\r\n System.out.println(\"guardado\");\r\n } else {\r\n System.out.println(\"error\");\r\n }\r\n } catch (SQLException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }", "public void insertarPos(int pos,Nodo nNodo) throws Exception {\n if(pos>this.size || pos<0){\r\n throw new Exception(\"Posicion invalida\");\r\n //Si la posicion es igual al tamaño de la lista, quiere decir que se\r\n //quiere insertar al final\r\n } else if(pos==this.size){\r\n this.agregarNodo(nNodo);\r\n //Se inserta en cualquer lugar\r\n } else {\r\n size++;\r\n Nodo temp = nIni;\r\n if(pos ==0){\r\n nIni.setnAnt(nNodo);\r\n nNodo.setnSig(nIni);\r\n nIni = nNodo;\r\n } else{\r\n for (int i = 0; i < pos-1; i++) {\r\n temp=temp.getnSig();\r\n }\r\n temp.getnSig().setnAnt(nNodo);\r\n nNodo.setnSig(temp.getnSig());\r\n nNodo.setnAnt(temp);\r\n temp.setnSig(nNodo);\r\n }\r\n }\r\n }", "public void atacar(Tabuleiro tabuleiro, Posicao posicao) {\n\t\t\tfor(int i=0; i<atirador.atirar(posicao).length; i++)\n\t\t\t{\n\t\t\t\tPosicao pokemon = atirador.atirar(posicao)[i];\n\t\t\t\tif(tabuleiro.posicaoValida(pokemon))\n\t\t\t\t{\n\t\t\t\t\tif(tabuleiro.atingir(pokemon))\n\t\t\t\t\t{\n\t\t\t\t\t\tacertos.add(pokemon);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttirosNaAgua.add(pokemon);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t// adiciona os tiros certos na lista acertos e os errados na tirosNaAgua\n\t\t// essas listas sao usadas para desenhar na tela\n\t}", "int insertSelective(Prueba record);", "public Tarea(String tipo, String area, int unidades) {\n\t\tsetTipo(tipo);\n\t\tsetArea(area);\n\t\tsetUnidades(unidades);\n\t\t//inicialmente no le pertenece a nadie\n\t\tsetAsignada(null);\n\t}", "public void insertProblema() {\n \n \n java.util.Date d = new java.util.Date();\n java.sql.Date fecha = new java.sql.Date(d.getTime());\n \n this.equipo.setEstado(true);\n this.prob = new ReporteProblema(equipo, this.problema, true,fecha);\n f.registrarReporte(this.prob);\n \n }" ]
[ "0.7098717", "0.6765013", "0.6727546", "0.66979986", "0.6584296", "0.6549472", "0.6438081", "0.6361997", "0.6348077", "0.6331455", "0.630056", "0.6285305", "0.6217326", "0.6204247", "0.61975", "0.6146343", "0.61446524", "0.6071186", "0.60412157", "0.60406744", "0.6029362", "0.6028076", "0.6024911", "0.6024454", "0.6021839", "0.6018631", "0.6009631", "0.59773153", "0.59668195", "0.5962268", "0.59591347", "0.59548336", "0.59539664", "0.59512246", "0.5950657", "0.5947858", "0.59315896", "0.5915836", "0.59135866", "0.5902753", "0.58944607", "0.58852816", "0.58830905", "0.58821845", "0.58576053", "0.58497494", "0.5841127", "0.58239156", "0.58063114", "0.5802939", "0.5797429", "0.5792437", "0.5777882", "0.5773671", "0.5773043", "0.57657903", "0.57623065", "0.575685", "0.57533777", "0.57490104", "0.5733432", "0.5729408", "0.572565", "0.5721515", "0.5721223", "0.57178634", "0.5716412", "0.5700985", "0.56878924", "0.56826615", "0.5673743", "0.56647897", "0.5663027", "0.5661699", "0.5659381", "0.5656712", "0.56533504", "0.56511617", "0.56495", "0.56477934", "0.5637554", "0.56329274", "0.56326073", "0.56290615", "0.56142306", "0.5614021", "0.5608042", "0.5602362", "0.5595549", "0.55933607", "0.5585398", "0.5578117", "0.55736196", "0.5568197", "0.55643183", "0.55621046", "0.55614305", "0.55566406", "0.5543369" ]
0.63248813
11
Metodo que imprime todas las tareas existentes, una por linea. El metodo imprime el numero de posicion de la tarea antes del nombre de la tarea. Si la tarea esta completada se muestra un "[X]" antes de la tarea y si no esta completada se muestra un "[ ]".
public void mostrarTareasNumeradas() { int numeroPosicion = 1; for (String tarea : tareas){ if (tarea.substring(0,1).equals("$")) { System.out.println(numeroPosicion + ". [X] " + tarea.substring(1, tarea.length())); } else { System.out.println(numeroPosicion + ". [ ] " + tarea); } numeroPosicion = numeroPosicion + 1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String getTareas() {\n\t\treturn \"TAREA COMERCIAL 3: VENDE MUCHO TODOS LOS DÍAS\";\n\t}", "public Tarea(String tipo, String area, int unidades) {\n\t\tsetTipo(tipo);\n\t\tsetArea(area);\n\t\tsetUnidades(unidades);\n\t\t//inicialmente no le pertenece a nadie\n\t\tsetAsignada(null);\n\t}", "public Tarea(String descripcionTarea)\n {\n //Añade la descripción de la tarea\n descripcion = descripcionTarea;\n tareaCompletada = false;\n //Por defecto, las tareas tienen prioridad 0\n prioridad = 0;\n //Las nuevas tareas no tienen fecha de vencimiento\n fechaVencimiento = null;\n }", "public void mostrarTareasNumeradas(){\n int numeroPosicion = 1;\n for (String tarea : tareas){\n System.out.println(numeroPosicion + \". \" + tarea);\n numeroPosicion = numeroPosicion + 1;\n }\n }", "public void addTarea(String nombreTarea){\n tareas.add(nombreTarea);\n }", "public void addTarea(String nombreTarea){\n tareas.add(nombreTarea);\n }", "public void setTareas(ArrayList<Tarea> tareas) {\n this.tareas = tareas;\n }", "private void openMenuActionPerformed(java.awt.event.ActionEvent evt) {\n \n \n \n String[] colunas = new String[]{\"Linha\",\"Instrução\",\"Atributo 1\",\"Atributo 2\",\"Comentário\"};\n \n int returnVal = escolherArquivo.showOpenDialog(this);\n if (returnVal == JFileChooser.APPROVE_OPTION) {\n File file = escolherArquivo.getSelectedFile();\n\n try {\n FileReader arq = new FileReader(file);\n BufferedReader lerArq = new BufferedReader(arq);\n\n \n\n lerArq.mark(50000);\n\n LineNumberReader lnr = new LineNumberReader(lerArq);\n lnr.skip(Long.MAX_VALUE);\n int retorno = lnr.getLineNumber();\n int caractere=0;\n Character character;\n \n String linhas[][] = new String[retorno + 2][5];\n String count = \"\";\n String linha;\n \n lerArq.reset();\n int cont = 0;\n caractere=proximoCaractere(lerArq);\n \n while (caractere != -1) {\n linha = \"\";\n \n while(Character.isLetterOrDigit(((char)caractere))){\n linha+=(char)caractere;\n caractere=proximoCaractere(lerArq);\n //System.out.println((char)caractere);\n }\n \n if(linha.equals(\"\\n\")){\n caractere=proximoCaractere(lerArq); \n cont++; \n //System.out.println(\"contador\"+cont);\n }\n if(linha.equals(\"NULL\"))\n {\n linhas[cont][2] = linha;\n }\n else{\n linhas[cont][1] = linha;\n //System.out.println(linha);\n }\n \n if(linha.equals(\"ALLOC\") || linha.equals(\"DALLOC\")) // verificacao pra ver se o comando é alloc ou dalloc pq esse comando precisa de 2 atributos\n { linha=\"\";\n \n while((char)caractere==' ')\n caractere=proximoCaractere(lerArq);\n \n if(Character.isDigit((char)caractere))\n while(Character.isDigit((char)caractere)){\n linha+=(char)caractere;\n caractere=proximoCaractere(lerArq);\n }\n \n linhas[cont][2] = linha; // coloco o valor no primeiro atributo\n //System.out.println(linha);\n linha=\"\";\n \n while(!Character.isDigit((char)caractere)) // enquanto nao for numero ele percorre o arquivo\n caractere=proximoCaractere(lerArq);\n \n \n while(Character.isDigit((char)caractere)){\n linha+=(char)caractere;\n caractere=proximoCaractere(lerArq);\n }\n \n linhas[cont][3] = linha; // coloco o valor no segundo atributo\n //System.out.println(linha);\n linha=\"\";\n \n \n }\n \n if(linha.equals(\"JMP\")||linha.equals(\"JMPF\")||linha.equals(\"CALL\")||linha.equals(\"LDV\")||linha.equals(\"LDC\")||linha.equals(\"STR\"))\n {\n linha=\"\";\n \n while(!Character.isLetterOrDigit((char)caractere)) \n caractere=proximoCaractere(lerArq);\n //System.out.println(\"I: \"+(char)caractere); \n while(Character.isLetterOrDigit((char)caractere))\n {\n // System.out.println(\"W: \"+(char)caractere); \n \n linha += (char)caractere;\n caractere=proximoCaractere(lerArq);\n }\n \n linhas[cont][2] = linha; // coloco o valor no segundo atributo\n //System.out.println(linha);\n //linha=\"\";\n \n }\n \n count+= cont;\n linhas[cont][0]=count;\n \n while(!Character.isLetterOrDigit((char)caractere)&& caractere!=-1){\n if((char)caractere=='\\n'){\n cont++; \n }\n caractere=proximoCaractere(lerArq);\n }\n \n \n if(caractere==-1)\n break;\n \n count=\"\";\n }\n\n DefaultTableModel modelo = new DefaultTableModel(linhas, colunas);\n\n grade.setModel(modelo);\n arq.close();\n\n } catch (IOException e) {\n System.err.printf(\"Erro na abertura do arquivo: %s.\\n\", e.getMessage());\n }\n\n } else {\n System.out.println(\"File access cancelled by user.\");\n }\n \n botaoExecutar.setEnabled(true);\n }", "public void mostrarTareasEnPosicionImpar(){}", "public int getNumeroTareasPendientes(){\n return tareas.size();\n }", "public void mostrarTareas(){\n System.out.println(\"Tareas existentes:\");\n System.out.println(tareas);\n }", "public void mostrarNumeroTareasPendientes(){\n System.out.println(tareas.size());\n }", "private void casoFor(ArrayList codigoFuente) {\n try {\n\n String texto = \"\", linea = \"\";\n String var[] = null;\n\n byte parenDerecho = 0;\n for (int i = 0; i < codigoFuente.size(); i++) {\n linea = codigoFuente.get(i).toString();\n for (int j = 0; j < linea.length(); j++) {\n if (linea.charAt(j) == ')') {\n parenDerecho++;\n\n if (j < linea.length() - 1) {\n if (linea.charAt(j + 1) == '{') {\n var = contenidoFor(texto);\n\n if (var[0].equals(\"0\")) {\n ta_output.setText(\"Línea \" + (i + 1) + \":\" + var[1]);\n break;\n } else {\n if (codigoFuente.get(codigoFuente.size() - 1).toString().charAt(codigoFuente.get(codigoFuente.size() - 1).toString().length() - 1) == '}') {\n ta_output.setText(\"Compilado Correctamente\");\n break;\n } else {\n ta_output.setText(\"Línea \" + (codigoFuente.size() - 1) + \": Sintáctico: falta llave derecha\");\n break;\n }\n }\n } else {\n ta_output.setText(\"Línea \" + (i + 1) + \": Sintáctico: falta llave izquierda\");\n break;\n }\n } else {//Evalua si la llave izquierda esta en la siguiente linea\n if (i < codigoFuente.size() - 1) {\n linea = codigoFuente.get(i + 1).toString();\n if (linea.charAt(0) == '{') {\n var = contenidoFor(texto);\n\n if (var[0].equals(\"0\")) {\n ta_output.setText(\"Línea \" + (i + 1) + \":\" + var[1]);\n break;\n } else {\n if (codigoFuente.get(codigoFuente.size() - 1).toString().charAt(codigoFuente.get(codigoFuente.size() - 1).toString().length() - 1) == '}') {\n ta_output.setText(\"Compilado Correctamente\");\n break;\n } else {\n ta_output.setText(\"Línea \" + (codigoFuente.size()) + \": Sintáctico: falta llave derecha\");\n break;\n }\n }\n } else {\n ta_output.setText(\"Línea \" + (i + 1) + \": Sintáctico: falta llave izquierda\");\n break;\n }\n } else {\n ta_output.setText(\"Línea \" + (i + 1) + \": Sintáctico: falta llave izquierda\");\n break;\n }\n }\n }\n texto += linea.charAt(j);\n if (texto.equals(\"for\")) {\n if (linea.length() > 5) {\n if (linea.charAt(j + 1) == '(') {\n texto = \"\";\n } else {\n if (linea.charAt(j + 2) == '(') {\n ta_output.setText(\"Línea \" + (i + 1) + \": Lexico: Caracter sobrante en sentencia for.\");\n parenDerecho++;\n break;\n } else {\n parenDerecho++;\n ta_output.setText(\"Línea \" + (i + 1) + \": Sintáctico: mala construcción de la sentencia.\");\n break;\n }\n }\n } else {\n parenDerecho++;\n ta_output.setText(\"Línea \" + (i + 1) + \": Sintáctico: mala construcción de la sentencia.\");\n break;\n }\n }\n }\n }\n if (parenDerecho == 0) {\n ta_output.setText(\"Sintáctico: falta paréntesis Derecho\");\n }\n\n } catch (Exception e) {\n System.out.println(\"Error en caso for \" + e.getClass());\n }\n }", "public void setNombreArea(String p) { this.nombreArea = p; }", "public void destroyArea(Entity[][] map, int x, int y){\r\n map[y][x] = null;\r\n //check if the area to destroy is within the map\r\n if ((x > 0) && (y > 0)){\r\n checkIfOtherType(map, y-1, x-1);\r\n map[y-1][x-1] = null;\r\n map[y-1][x-1] = new ExplodedArea(3, x-1, y-1);\r\n }\r\n if ((x + 1 < map.length) && (y + 1< map.length)){\r\n checkIfOtherType(map, y+1, x+1);\r\n map[y+1][x+1] = null;\r\n map[y+1][x+1] = new ExplodedArea(3, x+1, y+1);\r\n }\r\n if ((y > 0)){\r\n checkIfOtherType(map, y-1, x);\r\n map[y-1][x] = null;\r\n map[y-1][x] = new ExplodedArea(3, x, y-1);\r\n }\r\n if ((x +1 < map.length) && (y > 0)){\r\n checkIfOtherType(map, y-1, x+1);\r\n map[y-1][x+1] = null;\r\n map[y-1][x+1] = new ExplodedArea(3, x+1, y-1);\r\n }\r\n if ( x < map.length -1){\r\n checkIfOtherType(map, y, x+1);\r\n map[y][x+1] = null;\r\n map[y][x+1] = new ExplodedArea(3, x+1, y);\r\n }\r\n if(x > 0){\r\n checkIfOtherType(map, y, x-1);\r\n map[y][x-1] = null;\r\n map[y][x-1] = new ExplodedArea(3, x-1, y);\r\n }\r\n if (y < map.length-1){\r\n checkIfOtherType(map, y+1, x);\r\n map[y+1][x] = null;\r\n map[y+1][x] = new ExplodedArea(3, x, y+1);\r\n }\r\n if((x > 0) && (y < map.length -1)){\r\n checkIfOtherType(map, y+1, x-1);\r\n map[y+1][x-1] = null;\r\n map[y+1][x-1] = new ExplodedArea(3, x-1, y+1);\r\n }\r\n }", "public void imprimir() {\n\t\r\n\tSystem.out.println(\"El circulo tiene un perimetro de \"+ this.perimetro + \" y un area de \"+ this.area);\r\n\t\r\n\t}", "private Tarea recuperarPrimerTarea(String nombre, SimpleNode nodoRaiz) {\n\t\t// dejamos lista la primer tarea en el planificador\n\t\tTarea tarea = new Tarea();\n\t\ttarea.setNombre(nombre);\n\t\ttarea.setNodos(nodoRaiz);\n\t\ttarea.setContexto(SimpleNode.inicializaTablaDeSimbolos());\n\n\t\treturn tarea;\n\n\t}", "public void tablero(){\r\n System.out.println(\" X \");\r\n System.out.println(\" 1 2 3\");\r\n System.out.println(\" | |\");\r\n //imprimir primera fila\r\n System.out.println(\" 1 \"+gato[0][0]+\" | \"+gato[0][1]+\" | \"+gato[0][2]+\" \");\r\n System.out.println(\" _____|_____|_____\");\r\n System.out.println(\" | |\");\r\n //imprimir segunda fila\r\n System.out.println(\"Y 2 \"+gato[1][0]+\" | \"+gato[1][1]+\" | \"+gato[1][2]+\" \");\r\n System.out.println(\" _____|_____|_____\");\r\n System.out.println(\" | |\");\r\n //imprimir tercera fila\r\n System.out.println(\" 3 \"+gato[2][0]+\" | \"+gato[2][1]+\" | \"+gato[2][2]+\" \");\r\n System.out.println(\" | |\");\r\n }", "public void setNombreCodigoArea(String p) { this.nombreCodigoArea = p; }", "public static void DeterminarArregloDeMisiles() {\n\t\tVectorDeMisilesCrucerosPorNivel[3] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[4] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[7] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[8] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[11] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[12] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[15] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[16] = true;\n\t}", "@Override\r\n\tpublic void getarea(int a) {\n\t\t\r\n\t}", "public void primerTicketDisponibleEncontrado() {\n\t\tprimerTicketDisponible();\n\t\tint f; int c;\n\t\tString ticket = primerTicketDisponible();\n\t\tString[] dividir = ticket.split(\" \");\n\t\tString fila = dividir[0];\n\t\tString columna = dividir[1];\n\t\tSystem.out.println(fila);\n\t\tSystem.out.println(columna);\n\t\tf = Integer.parseInt(fila);\n\t\tc = Integer.parseInt(columna);\n\t\tactualizarPlazas(f, c);\n\t}", "public void imprimirTabuleiro() { \n\t\t\n\t\tfor(int i = 0; i < this.linhas; i++) {\n\t\t\tfor(int j = 0; j < this.colunas; j++) { \t\t\t\t\n\t\t\t\tSystem.out.print(this.tabuleiro[i][j] + \"\\t\"); \n\t\t\t}\n\t\t\tSystem.out.println(); \t\t\t\n\t\t}\n\t}", "void setPosiblesTipos(String[] tipos);", "public AreaMap()\r\n {\r\n map = new JTextArea[10][10];\r\n \r\n for (JTextArea[] map1 : map)\r\n {\r\n for (int i = 0; i<map[0].length; i++)\r\n {\r\n map1[i] = new JTextArea();\r\n map1[i].setBackground(Color.black);\r\n map1[i].setEditable(false);\r\n map1[i].setText(\"\");\r\n }\r\n }\r\n setup();\r\n \r\n \r\n }", "public void primerPunto() {\n\t\tp = new PuntoAltaPrecision(this.xCoord, this.yCoord);\n\t\t// Indicamos la trayectoria por la que va la pelota\n\t\tt = new TrayectoriaRecta(1.7f, p, false);\n\t}", "@Override\n\tpublic void llenarArreglo(){\n\n\t\tString[] textoSeparado = texto.toLowerCase().split(\"\\\\W+\"); //pasa todo a minusculas y despues busca todas las no palabras con W y con + junta los que estan seguidos para separador, ver http://regexr.com/3dcpk\n\n\t\tif (palabras==null) {\n\t\t\t//agregar el primer elemento manualmente\n\t\t\tLabel etiqueta = new Label(textoSeparado[0]);\n\t\t\tpalabras = new Palabra[1];\n\t\t\tpalabras[0] = new Palabra(textoSeparado[0], etiqueta);\n\t\t}\n\n\t\t\tfor (int i=1; i<textoSeparado.length; i++) { //importante el uno para no contar la primera palabra dos veces\n\t\t\t\tString buscar= textoSeparado[i];\n\t\t\t\tif (!checarListaNegra(buscar)) { //solo se hace la operacion por cada palabra si no esta en la lista negra\n\t\t\t\t\tboolean yaExiste = false;\n\t\t\t\t\tfor (Palabra palabraActual : palabras) {\n\t\t\t\t\t\tif (palabraActual.getContenido().equals(buscar)) {\n\t\t\t\t\t\t\tyaExiste = true;\n\t\t\t\t\t\t\tpalabraActual.actualizarFrecuencia();\n\t\t\t\t\t\t//\tSystem.out.println(\"se actualizo\"+ palabraActual.getContenido());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!yaExiste) {\n\t\t\t\t\t\t//no se encontro la palabra (String buscar) en el gran arreglo de palabras entonces hay que crearla\n\t\t\t\t\t\tagregarPalabra(buscar);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@Override\r\n\tpublic String[][] mostraPosicao(String[][] mapa) {\n\t\treturn null;\r\n\t}", "private void atualizarTela() {\n\t\tif(this.primeiraJogada == true) {//SE FOR A PRIMEIRA JOGADA ELE MONTA O LABEL DOS NUMEROS APOS ESCOLHER A POSICAO PELA PRIMEIRA VEZ\r\n\t\t\tthis.primeiraJogada = false;\r\n\t\t\tthis.montarLabelNumeros();\r\n\t\t}\r\n\r\n\t\tthis.esconderBotao();\r\n\t\t\r\n\t\tthis.acabarJogo();\r\n\t}", "private void MembentukListHuruf(){\n for(int i = 0; i < Panjang; i ++){\n Huruf Hrf = new Huruf();\n Hrf.CurrHrf = Kata.charAt(i);\n if(!IsVertikal){\n //horizontal\n Hrf.IdX = StartIdxX;\n Hrf.IdY = StartIdxY+i;\n }else{\n Hrf.IdX = StartIdxX+i;\n Hrf.IdY = StartIdxY;\n }\n // System.out.println(\"iniii \"+Hrf.IdX+\" \"+Hrf.IdY+\" \"+Hrf.CurrHrf+\" \"+NoSoal);\n TTS.Kolom[Hrf.IdX][Hrf.IdY].AddNoSoal(NoSoal);\n TTS.Kolom[Hrf.IdX][Hrf.IdY].Huruf=Hrf.CurrHrf;\n \n }\n }", "public void setCodigoArea(int p) { this.codigoArea = p; }", "public void setCodigoArea(int p) { this.codigoArea = p; }", "public void calculEtatSuccesseur() { \r\n\t\tboolean haut = false,\r\n\t\t\t\tbas = false,\r\n\t\t\t\tgauche = false,\r\n\t\t\t\tdroite = false,\r\n\t\t\t\thautGauche = false,\r\n\t\t\t\tbasGauche = false,\r\n\t\t\t\thautDroit = false,\r\n\t\t\t\tbasDroit = false;\r\n\t\t\r\n\t\tString blanc = \" B \";\r\n\t\tString noir = \" N \";\r\n\t\tfor(Point p : this.jetonAdverse()) {\r\n\t\t\tString [][]plateau;\r\n\t\t\tplateau= copieEtat();\r\n\t\t\tint x = (int) p.getX();\r\n\t\t\tint y = (int) p.getY();\r\n\t\t\tif(this.joueurActuel.getCouleur() == \"noir\") { //dans le cas ou le joueur pose un pion noir\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(p.getY()>0 && p.getY()<plateau[0].length-1 && p.getX()>0 && p.getX()<plateau.length-1) { //on regarde uniquement le centre du plateaau \r\n\t\t\t\t\t//on reinitialise x,y et plateau a chaque étape\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tdroite = getDroite(x,y,blanc);\r\n\t\t\t\t\thaut = getHaut(x, y, blanc);\r\n\t\t\t\t\tbas = getBas(x, y, blanc);\r\n\t\t\t\t\tgauche = getGauche(x, y, blanc);\r\n\t\t\t\t\thautDroit = getDiagHautdroite(x, y, blanc);\r\n\t\t\t\t\thautGauche = getDiagHautGauche(x, y, blanc);\r\n\t\t\t\t\tbasDroit = getDiagBasDroite(x, y, blanc);\r\n\t\t\t\t\tbasGauche = getDiagBasGauche(x, y, blanc);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y-1]==noir) {//regarder si à gauche du pion blanc il y a un pion noir\r\n\r\n\t\t\t\t\t\t//on regarde si il est possible de poser un pion noir à droite\r\n\t\t\t\t\t\tif(droite) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//1\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x-1][y]==noir) {//regardre au dessus si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(bas) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tplateau[x][y]= noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//2\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y+1]==noir) { //regarde a droite si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(gauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y]= noir;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//3\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x+1][y] == noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(haut) {\r\n\t\t\t\t\t\t\t//System.out.println(\"regarde en dessous\");\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//4\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautgauche\r\n\t\t\t\t\tif(this.plateau[x+1][y+1]==noir) {\r\n\t\t\t\t\t\tif(hautGauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//5\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagbasGauche\r\n\t\t\t\t\tif(this.plateau[x-1][y+1]==noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(basGauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}//6\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautDroit : OK!\r\n\t\t\t\t\tif(this.plateau[x+1][y-1]==noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(hautDroit) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}//7\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagBasDroit\r\n\t\t\t\t\tif(this.plateau[x-1][y-1]==noir) {\r\n\t\t\t\t\t\tif(basDroit) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t//System.out.println(\"ajouté!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//8\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse {//si le joueur actuel a les pions blanc\r\n\t\t\t\tif(p.getY()>0 && p.getY()<plateau[0].length-1 && p.getX()>0 && p.getX()<plateau.length-1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x][y-1]==blanc) {//regarder si à gauche du pion blanc il y a un pion noir\r\n\t\t\t\t\t\t//on regarde si il est possible de poser un pion noir à droite\r\n\t\t\t\t\t\tif(getDroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t}//1.1\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x-1][y]==blanc) {//regardre au dessus si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getBas(x, y, noir)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//2.2\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y+1]==blanc) { //regarde a droite si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getGauche(x, y, noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//3.3\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x+1][y] == blanc) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getHaut(x, y, noir)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//4.4\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautgauche\r\n\t\t\t\t\tif(this.plateau[x+1][y+1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagHautGauche(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//5.5\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagbasGauche\r\n\t\t\t\t\tif(this.plateau[x-1][y+1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagBasGauche(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//6.6\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautDroit\r\n\t\t\t\t\tif(this.plateau[x+1][y-1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagHautdroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}//7.7\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagBasDroit\r\n\t\t\t\t\tif(this.plateau[x-1][y-1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagBasDroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//8.8\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Torretta1(int danno, int x, int y, ArrayList<Proiettile> proiettili) {\r\n super();\r\n velocitàAttacco = 5000;\r\n attacco = danno;\r\n this.proiettili = proiettili;\r\n this.x = x * 40;\r\n this.y = y * 40 - 40;\r\n range = new Ellipse2D.Double();\r\n range.setFrame(this.x - 40, this.y - 40, 119, 119);\r\n temposparo = 200;\r\n finestrasparo = 0;\r\n costoAcquisto = 10;\r\n tipo='a';\r\n }", "public boolean EliminarArea(int Numero){\n\t\tString sCurrentLine, NumeroString =Integer.toString(Numero);\n\t\ttry{\n\t\t\tBufferedReader numero= new BufferedReader(new FileReader(\"WS.txt\"));\n\t\t\tString valor = numero.readLine();\n\t\t\tint NumAreas= Integer.valueOf(valor);\n\t\t\tLinkedList<String> nombreArea = new LinkedList<String>();\n\t\t\tfor(int i=0; i< NumAreas;i++){\n\t\t\t\tvalor= numero.readLine();\n\t\t\t\tint algo= Integer.valueOf(valor);\n\t\t\t\tif(algo!= Numero){\n\t\t\t\t\tnombreArea.add(valor);\n\t\t\t\t\tSystem.out.println(i+\":\"+ valor);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(nombreArea.size()==NumAreas){ //No existe area;\n\t\t\t\tSystem.out.println(\"Error: No existe Area\");\n\t\t\t\treturn false;\n\t\t\t}else{\n\t\t\t\tNumAreas--;\n\t\t\t\tSystem.out.println(\"Numero de Areas\"+ NumAreas);\n\t\t\t\tif(NumAreas==0){\n\t\t\t\t\tSystem.out.println(\"No existen areas\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tPrintWriter Nuevo = new PrintWriter(\"WS.txt\", \"UTF-8\");\n\t\t\t\tNuevo.println(NumAreas);\n\t\t\t\tfor(int i=0; i< NumAreas;i++){\n\t\t\t\t\tNuevo.println(nombreArea.get(i));\n\t\t\t\t}\n\t\t\t\tNuevo.close();\n\t\t\t\t//Eliminar el WS(numero)\n\t\t\t\t\tString eliminar =(\"WS\"+Numero+\".txt\");\n\t\t\t\t\tFile Elimino = new File(eliminar);\n\t\t\t\t\tElimino.delete();\n\t\t\t\t//Eliminar las Maquinas de WS(numero) en Maq.txt Almacenar sus c�digos.\n\t\t\t\tint flag=1;\n\t\t\t\tboolean Area=false;\n\t\t\t\tLinkedList<String> respaldoMaq = new LinkedList<String>();\n\t\t\t\tLinkedList<String> EliminarCOD = new LinkedList<String>();\n\t\t\t\tBufferedReader numero2 = new BufferedReader(new FileReader(\"Maq.txt\"));\n\t\t\t\twhile ((sCurrentLine = numero2.readLine()) != null) {\n\t\t\t\t\tif(flag%3==1){\n\t\t\t\t\t\tif(sCurrentLine.contentEquals(NumeroString)){\n\t\t\t\t\t\t\tArea=true;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tArea=false;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}if(Area==true){\n\t\t\t\t\t\tif(flag%3==0){\n\t\t\t\t\t\t\tEliminarCOD.add(sCurrentLine);\n\t\t\t\t\t\t\tSystem.out.println(\"Eliminar: \"+sCurrentLine);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\trespaldoMaq.add(sCurrentLine);\n\t\t\t\t\t\tSystem.out.println(sCurrentLine);\n\t\t\t\t\t}\n\t\t\t\tflag++;\n\t\t\t\t}\n\t\t\t\tnumero2.close();\n\t\t\t\t\n\t\t\t\tPrintWriter Nuevo2 = new PrintWriter(\"Maq.txt\", \"UTF-8\");\n\t\t\t\tfor(int i=0; i<respaldoMaq.size(); i++){\n\t\t\t\t\tNuevo2.println(respaldoMaq.get(i));\n\t\t\t\t}\n\t\t\t\tNuevo2.close();\n\t\t\t\t//Borrar los c�digos de COD.txt\n\t\t\t\tLinkedList<String> respaldoCOD = new LinkedList<String>();\n\t\t\t\tBufferedReader numero3 = new BufferedReader(new FileReader(\"Cod.txt\"));\n\t\t\t\n\t\t\t\tString CODIGOELIMINAR = EliminarCOD.pop();\n\t\t\t\tint a= EliminarCOD.size();\n\t\t\t\twhile ((sCurrentLine = numero3.readLine()) != null) {\t\n\t\t\t\t\tif(a>=0){\n\t\t\t\t\t\tif(sCurrentLine.contains(CODIGOELIMINAR)==true){\n\t\t\t\t\t\t\tif(a>0){\n\t\t\t\t\t\t\t\tCODIGOELIMINAR = EliminarCOD.pop();\n\t\t\t\t\t\t\t\ta--;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\trespaldoCOD.add(sCurrentLine);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\trespaldoCOD.add(sCurrentLine);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tnumero3.close();\n\t\t\t\tPrintWriter Nuevo3 = new PrintWriter(\"Cod.txt\", \"UTF-8\");\n\t\t\t\tfor(int i=0; i<respaldoCOD.size(); i++){\n\t\t\t\t\tNuevo3.println(respaldoCOD.get(i));\n\t\t\t\t}\n\t\t\t\tNuevo3.close(); \n\t\t\t}\n\t\t\tnumero.close();\n\t\t\treturn(true);\n\t\t}catch(IOException e){\n\t\t\tSystem.out.println(\"File not found\");\n\t\t}\n\t\treturn(false);\n\t\n\t}", "@RequiresApi(api = Build.VERSION_CODES.O)\n private void añadirTarea() throws ParseException {\n TaskSQLiteHelper usdbh = new TaskSQLiteHelper(this, \"bdTareas\", null, 1);\n //Obtenemos referencia a la base de datos para poder modificarla.\n SQLiteDatabase db = usdbh.getWritableDatabase();\n\n //Abrimos la base de datos ALARMAS en modo escritura.\n TaskSQLiteHelper2 usdbh2 = new TaskSQLiteHelper2(this, \"bdAlarmas\", null, 1);\n //Obtenemos referencia a la base de datos para poder modificarla.\n SQLiteDatabase db2 = usdbh2.getWritableDatabase();\n\n if (etTitulo.getText().toString().trim().isEmpty() && etFechaLimite.getText().toString().trim().isEmpty()) {\n crearToast(\"Faltan campos por completar.\").show();\n etTitulo.setBackgroundTintList(getResources().getColorStateList(R.color.colorRedLight));\n etFechaLimite.setBackgroundTintList(getResources().getColorStateList(R.color.colorRedLight));\n } else {\n if (etTitulo.getText().toString().trim().isEmpty()) {\n crearToast(\"Introduce titulo para la tarea.\").show();\n etTitulo.setBackgroundTintList(getResources().getColorStateList(R.color.colorRedLight));\n } else {\n etTitulo.setBackgroundTintList(getResources().getColorStateList(R.color.colorGray));\n if (etFechaLimite.getText().toString().trim().isEmpty()) {\n crearToast(\"Introduce una fecha límite.\").show();\n etFechaLimite.setBackgroundTintList(getResources().getColorStateList(R.color.colorRedLight));\n } else {\n etTitulo.setBackgroundTintList(getResources().getColorStateList(R.color.colorGray));\n crearTarea();\n db.execSQL(\"INSERT INTO tareas(titulo, descripcion, fechaLimite, horaLimite, fechaCompleta, usarRecordatorio) \" +\n \"VALUES('\" + crearTarea().getTitulo() + \"', '\" + crearTarea().getDescripcion() + \"', '\" +\n crearTarea().getFecha() + \"', '\" + crearTarea().getHora() + \"', '\" + crearTarea().getFechaCompleta() + \"', '\" +\n ((crearTarea().isUsarRecordatorio() == false) ? 0 : 1) + \"');\");\n db.close();\n\n if (crearTarea().isUsarRecordatorio()) {\n db2.execSQL(\"INSERT INTO alarmas(titulo, minutos) VALUES('\" + crearTarea().getTitulo().trim() + \"', '\" + alarmService.getMinutes(gCalendar) + \"');\");\n db2.close();\n }\n\n crearToast(\"Tarea añadida correctamente.\").show();\n\n finish();\n Intent i = new Intent(this, MainActivity.class);\n startActivity(i);\n }\n }\n }\n }", "private AtualizarContaPreFaturadaHelper parserRegistroTipo3(String linha) {\r\n\t\tAtualizarContaPreFaturadaHelper retorno = new AtualizarContaPreFaturadaHelper();\r\n\r\n\t\tInteger index = 0;\r\n\r\n\t\t// Tipo de registro\r\n\t\tretorno.tipoRegistro = linha.substring(index, index + REGISTRO_TIPO);\r\n\t\tindex += REGISTRO_TIPO;\r\n\r\n\t\t// Matricula do imovel\r\n\t\tretorno.matriculaImovel = linha.substring(index, index\r\n\t\t\t\t+ MATRICULA_IMOVEL);\r\n\t\tindex += MATRICULA_IMOVEL;\r\n\r\n\t\t// Codigo da Categoria\r\n\t\tretorno.codigoCategoria = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_3_CODIGO_CATEGORIA);\r\n\t\tindex += REGISTRO_TIPO_3_CODIGO_CATEGORIA;\r\n\r\n\t\t// Codigo da Subcategoria\r\n\t\tretorno.codigoSubCategoria = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_3_CODIGO_SUBCATEGORIA);\r\n\t\tindex += REGISTRO_TIPO_3_CODIGO_SUBCATEGORIA;\r\n\r\n\t\t// Consumo faturado de agua\r\n\t\tretorno.consumoFaturadoAguaFaixa = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_3_CONSUMO_FATURADO_AGUA_FAIXA);\r\n\t\tindex += REGISTRO_TIPO_3_CONSUMO_FATURADO_AGUA_FAIXA;\r\n\r\n\t\t// Valor tarifa minima de agua\r\n\t\tretorno.valorFaturadoAguaFaixa = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_3_VALOR_FATURADO_AGUA_FAIXA);\r\n\t\tindex += REGISTRO_TIPO_3_VALOR_FATURADO_AGUA_FAIXA;\r\n\r\n\t\t// Limite Inicial do Consumo na Faixa\r\n\t\tretorno.limiteInicialConsumoFaixa = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_3_LIMITE_INICIAL_CONSUMO_FAIXA);\r\n\t\tindex += REGISTRO_TIPO_3_LIMITE_INICIAL_CONSUMO_FAIXA;\r\n\r\n\t\t// Limite Final do consumo na Faixa\r\n\t\tretorno.limiteFinalConsumoFaixa = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_3_LIMITE_FINAL_CONSUMO_FAIXA);\r\n\t\tindex += REGISTRO_TIPO_3_LIMITE_FINAL_CONSUMO_FAIXA;\r\n\r\n\t\t// Valor da Tarifa Agua na Faixa\r\n\t\tretorno.valorTarifaAguaFaixa = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_3_VALOR_TARIFA_AGUA_FAIXA);\r\n\t\tindex += REGISTRO_TIPO_3_VALOR_TARIFA_AGUA_FAIXA;\r\n\r\n\t\t// Valor da Tarifa Esgoto na Faixa\r\n\t\tretorno.valorTarifaEsgotoFaixa = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_3_VALOR_TARIFA_ESGOTO_FAIXA);\r\n\t\tindex += REGISTRO_TIPO_3_VALOR_TARIFA_ESGOTO_FAIXA;\r\n\r\n\t\t// Consumo faturado de esgoto\r\n\t\tretorno.consumoFaturadoEsgotoFaixa = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_3_CONSUMO_FATURADO_ESGOTO_FAIXA);\r\n\t\tindex += REGISTRO_TIPO_3_CONSUMO_FATURADO_ESGOTO_FAIXA;\r\n\r\n\t\t// Valor tarifa minima de agua\r\n\t\tretorno.valorFaturadoEsgotoFaixa = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_3_VALOR_FATURADO_ESGOTO_FAIXA);\r\n\t\tindex += REGISTRO_TIPO_3_VALOR_FATURADO_ESGOTO_FAIXA;\r\n\r\n\t\treturn retorno;\r\n\t}", "private void setupEscenario3( )\n {\n String todasMarcadas, casillasSinMarca;\n String[] marcadas, noMarcadas;\n int casilla;\n // Prepara el tablero\n triqui = new Triqui( );\n\n // Primer jugador\n\n marcaJugador1 = \"X\";\n todasMarcadas = \"1,3,7,9\";\n marcadas = todasMarcadas.split( \",\" );\n casillasJugador1 = new ArrayList( );\n\n for( int i = 0; i < marcadas.length; i++ )\n {\n casilla = Integer.parseInt( marcadas[ i ] );\n triqui.marcarCasilla( casilla, marcaJugador1 );\n casillasJugador1.add( new Integer( casilla ) );\n }\n\n // Segundo jugador\n\n marcaJugador2 = \"O\";\n todasMarcadas = \"2,4,6,8\";\n marcadas = todasMarcadas.split( \",\" );\n casillasJugador2 = new ArrayList( );\n\n for( int i = 0; i < marcadas.length; i++ )\n {\n casilla = Integer.parseInt( marcadas[ i ] );\n triqui.marcarCasilla( casilla, marcaJugador2 );\n casillasJugador2.add( new Integer( casilla ) );\n }\n\n // Casillas sin marcar\n\n casillasSinMarca = \"5\";\n noMarcadas = casillasSinMarca.split( \",\" );\n casillasSinMarcar = new ArrayList( );\n\n for( int i = 0; i < noMarcadas.length; i++ )\n {\n casilla = Integer.parseInt( noMarcadas[ i ] );\n casillasSinMarcar.add( new Integer( casilla ) );\n }\n }", "public void completarTarea()\n {\n tareaCompletada = true;\n }", "public void checkLines() {\n int cont2 = 0;\n int cont3, cont4;\n int casillasVacias;\n int vInicial, vFinal;\n\n for(cont3=20; cont3>0; cont3--) {\n vInicial = cont3*12 + 1;\n vFinal = vInicial + 10;\n casillasVacias = 10;\n\n //Bucle para todas las casillas de una fila\n for(cont4=vInicial; cont4<vFinal; cont4++) {\n if(colMatrix[cont4]) casillasVacias--;\n }\n\n if(casillasVacias == 0) {\n completeLines[cont2] = cont3;\n cont2++;\n }\n }\n removeLines();\n }", "public void alustaAlue() {\n if (x >= 1) {\n for (int i = 0; i < x; i++) {\n this.ruudukko[i] = new ArrayList<Ruutu>();\n for (int j = 0; j < x; j++) {\n this.ruudukko[i].add(new Ruutu(taso));\n }\n }\n for (int i = 0; i < x; i++) {\n for (int j = 0; j < x; j++) {\n ArrayList<Ruutu> lista = this.ruudukko[i];\n if (lista.get(j).isMiina()) {\n lisaaMiina(i, j);\n } else {\n this.ruudut++;\n }\n }\n }\n }\n\n }", "private void crearLineasDelimitadoras(){\n Line2D.Float linea;\n int xp,yp,xl,yl;\n\n // Se crean las lineas verticales: tantas como columnas +1\n for(int i=0; i < columnas+1; i++){\n // Posicion de partida: xp valdra tanto como i*dimensionCasilla\n // yp valdra siempre 0\n // Posicion de llegada: xl vale igual que xp\n // yl valdra siempre numeroFilas*dimensionCasilla \n xp=i*dimensionCasilla;\n yp=0;\n xl=xp;\n yl=filas*dimensionCasilla;\n linea=new Line2D.Float(xp,yp,xl,yl);\n\n // Se agrega la linea al array de lineas\n lineasDelimitadoras.add(linea);\n }\n\n // Se crean las lineas horizontales: tantas como filas + 1\n for(int i=0; i < filas+1; i++){\n // Posicion de partida: xp valdra siempre 0\n // yp valdra i*dimensionCasilla\n // Posicion de llegada: xl valdra numeroFilas*dimensionCasilla\n // yl valdra igual que yp\n xp=0;\n yp=i*dimensionCasilla;\n xl=filas*dimensionCasilla;\n yl=yp;\n linea=new Line2D.Float(xp,yp,xl,yl);\n\n // Se agrega la linea al array de lineas\n lineasDelimitadoras.add(linea);\n }\n }", "public Tarea() {\n\t}", "private void setupEscenario2( )\n {\n String todasMarcadas, casillasSinMarca;\n String[] marcadas, noMarcadas;\n int casilla;\n // Prepara el tablero\n triqui = new Triqui( );\n\n // Primer jugador\n\n marcaJugador1 = \"X\";\n todasMarcadas = \"1,2,3,4\";\n marcadas = todasMarcadas.split( \",\" );\n casillasJugador1 = new ArrayList( );\n\n for( int i = 0; i < marcadas.length; i++ )\n {\n casilla = Integer.parseInt( marcadas[ i ] );\n triqui.marcarCasilla( casilla, marcaJugador1 );\n casillasJugador1.add( new Integer( casilla ) );\n }\n\n // Segundo jugador\n\n marcaJugador2 = \"O\";\n todasMarcadas = \"5,6,7,8\";\n marcadas = todasMarcadas.split( \",\" );\n casillasJugador2 = new ArrayList( );\n\n for( int i = 0; i < marcadas.length; i++ )\n {\n casilla = Integer.parseInt( marcadas[ i ] );\n triqui.marcarCasilla( casilla, marcaJugador2 );\n casillasJugador2.add( new Integer( casilla ) );\n }\n\n // Casillas sin marcar\n\n casillasSinMarca = \"9\";\n noMarcadas = casillasSinMarca.split( \",\" );\n casillasSinMarcar = new ArrayList( );\n\n for( int i = 0; i < noMarcadas.length; i++ )\n {\n casilla = Integer.parseInt( noMarcadas[ i ] );\n casillasSinMarcar.add( new Integer( casilla ) );\n }\n }", "public boolean esValidoElIndice(int indice){\n return (indice > 0 && indice< tareas.size());\n }", "public boolean isTuttaOccupata() {\n\t\tfor (Strada x : stradeConfinanti)\n\t\t\tif (!(x.isOccupata()))\n\t\t\t\treturn false;\n\t\treturn true;\n\t}", "public Tabla(int tip) {\n\t\tthis.sirinaTable = 20;\n\t\tthis.visinaTable = 20;\n\t\tthis.tip = tip;\n\t\tthis.tabla = new char[20][20];\n\t\tfor (int i = 0; i < this.visinaTable;i++) {\n\t\t\tfor (int j = 0; j < this.sirinaTable;j++) {\n\t\t\t\ttabla[i][j] = '.';\n\t\t\t}\n\t\t}\n\t\trezultat = 0;\n\t\tzmija = new ArrayList<Cvor>();\n\t\t\n\t\tif (tip == 2) {\n\t\t\tthis.dodajZidove();\n\t\t}\n\t\telse if(tip == 3) {\n\t\t\tthis.dodajPrepreke1();\n\t\t}\n\t\telse if(tip == 4) {\n\t\t\tthis.dodajPrepreke2();\n\t\t}\n\t\tthis.dodajZmijuPocetak();\n\t\tthis.dodajHranu();\n\t\tthis.smjer = 'd';\n\t}", "private AtualizarContaPreFaturadaHelper parserRegistroTipo2(String linha) {\r\n\t\tAtualizarContaPreFaturadaHelper retorno = new AtualizarContaPreFaturadaHelper();\r\n\r\n\t\tInteger index = 0;\r\n\r\n\t\t// Tipo de registro\r\n\t\tretorno.tipoRegistro = linha.substring(index, index + REGISTRO_TIPO);\r\n\t\tindex += REGISTRO_TIPO;\r\n\t\tSystem.out.println(\"Tipo de Retorno: \" + retorno.tipoRegistro);\r\n\r\n\t\t// Matricula do imovel\r\n\t\tretorno.matriculaImovel = linha.substring(index, index\r\n\t\t\t\t+ MATRICULA_IMOVEL);\r\n\t\tindex += MATRICULA_IMOVEL;\r\n\t\tSystem.out.println(\"Matricula do Imovel: \" + retorno.matriculaImovel);\r\n\r\n\t\t// Codigo da Categoria\r\n\t\tretorno.codigoCategoria = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_CODIGO_CATEGORIA);\r\n\t\tindex += REGISTRO_TIPO_2_CODIGO_CATEGORIA;\r\n\r\n\t\t// Codigo da Subcategoria\r\n\t\tretorno.codigoSubCategoria = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_CODIGO_SUBCATEGORIA);\r\n\t\tindex += REGISTRO_TIPO_2_CODIGO_SUBCATEGORIA;\r\n\r\n\t\t// Valor faturado agua\r\n\t\tretorno.valorFaturadoAgua = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_VALOR_FATURADO_AGUA);\r\n\t\tindex += REGISTRO_TIPO_2_VALOR_FATURADO_AGUA;\r\n\r\n\t\t// Consumo faturado de agua\r\n\t\tretorno.consumoFaturadoAgua = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_CONSUMO_FATURADO_AGUA);\r\n\t\tindex += REGISTRO_TIPO_2_CONSUMO_FATURADO_AGUA;\r\n\r\n\t\t// Valor tarifa minima de agua\r\n\t\tretorno.valorTarifaMinimaAgua = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_VALOR_TARIFA_MINIMA_AGUA);\r\n\t\tindex += REGISTRO_TIPO_2_VALOR_TARIFA_MINIMA_AGUA;\r\n\r\n\t\t// Consumo Minimo de Agua\r\n\t\tretorno.consumoMinimoAgua = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_CONSUMO_MINIMO_AGUA);\r\n\t\tindex += REGISTRO_TIPO_2_CONSUMO_MINIMO_AGUA;\r\n\r\n\t\t// Valor faturado esgoto\r\n\t\tretorno.valorFaturadoEsgoto = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_VALOR_FATURADO_ESGOTO);\r\n\t\tindex += REGISTRO_TIPO_2_VALOR_FATURADO_ESGOTO;\r\n\r\n\t\t// Consumo faturado de esgoto\r\n\t\tretorno.consumoFaturadoEsgoto = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_CONSUMO_FATURADO_ESGOTO);\r\n\t\tindex += REGISTRO_TIPO_2_CONSUMO_FATURADO_ESGOTO;\r\n\r\n\t\t// Valor tarifa minima de esgoto\r\n\t\tretorno.valorTarifaMinimaEsgoto = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_VALOR_TARIFA_MINIMA_ESGOTO);\r\n\t\tindex += REGISTRO_TIPO_2_VALOR_TARIFA_MINIMA_ESGOTO;\r\n\r\n\t\t// Consumo Minimo de esgoto\r\n\t\tretorno.consumoMinimoEsgoto = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_CONSUMO_MINIMO_ESGOTO);\r\n\t\tindex += REGISTRO_TIPO_2_CONSUMO_MINIMO_ESGOTO;\r\n\t\t\r\n\t\t// Consumo Minimo de esgoto \r\n\t\t/*\r\n\t\tretorno.subsidio = linha.substring(index + 2, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_SUBSIDIO_AGUA_PARA);\r\n\t\tindex += REGISTRO_TIPO_2_SUBSIDIO_AGUA_PARA;\r\n\t\t*/\r\n\t\treturn retorno;\r\n\t}", "public double Baricentro() {\n if (puntos.size() <= 2) {\n return 0;\n } else {\n // Inicializacion de las areas\n double areaPonderada = 0;\n double areaTotal = 0;\n double areaLocal;\n // Recorrer la lista conservando 2 puntos\n Punto2D antiguoPt = null;\n for (Punto2D pt : puntos) {\n if (antiguoPt != null) {\n // Cálculo deñ baricentro local\n if (antiguoPt.y == pt.y) {\n // Es un rectángulo, el baricentro esta en\n // centro\n areaLocal = pt.y * (pt.x - antiguoPt.x);\n areaTotal += areaLocal;\n areaPonderada += areaLocal * ((pt.x - antiguoPt.x) / 2.0 + antiguoPt.x);\n } else {\n // Es un trapecio, que podemos descomponer en\n // un reactangulo con un triangulo\n // rectangulo adicional\n // Separamos ambas formas\n // Primer tiempo: rectangulo\n areaLocal = Math.min(pt.y, antiguoPt.y) + (pt.x - antiguoPt.x);\n areaTotal += areaLocal;\n areaPonderada += areaLocal * ((pt.x - antiguoPt.x) / 2.0 + antiguoPt.x);\n //Segundo tiempo: triangulo rectangulo\n areaLocal = (pt.x - antiguoPt.x) * Math.abs(pt.y - antiguoPt.y) / 2.0;\n areaTotal += areaLocal;\n if (pt.y > antiguoPt.y) {\n // Baricentro a 1/3 del lado pt\n areaPonderada += areaLocal * (2.0 / 3.0 * (pt.x - antiguoPt.x) + antiguoPt.x);\n } else {\n // Baricentro a 1/3 dek lado antiguoPt\n areaPonderada += areaLocal * (1.0 / 3.0 * (pt.x - antiguoPt.x) + antiguoPt.x);\n }\n }\n }\n antiguoPt = pt;\n }\n // Devolvemos las coordenadas del baricentro\n return areaPonderada / areaTotal;\n }\n }", "public NodoArbolSintactico(String nombre, int tipo) {\r\n hijos = new ArrayList<>();\r\n this.nombre = nombre;\r\n accion = null;\r\n this.tipo = tipo;\r\n }", "public void inicialAleatorio() {\n //aqui adiciona naquele vetor que de auxilio\n alocacao.add(Estados.ELETRICISTAS);\n alocacao.add(Estados.ELETRICISTAS2);\n alocacao.add(Estados.QUALIDADE);\n alocacao.add(Estados.QUALIDADE2);\n alocacao.add(Estados.FABRICACAO_ESTRUTURAL);\n alocacao.add(Estados.FABRICACAO_ESTRUTURAL2);\n alocacao.add(Estados.FABRICACAO_ESTRUTURAL3);\n alocacao.add(Estados.PLANEJAMENTO);\n\n //biblioteca que sorteia aleatoriamente os departamentos\n Collections.shuffle(alocacao);\n\n for (int i = 0; i < 4; i++) {\n matrix[1][i] = alocacao.get(i);\n\n }\n\n for (int i = 0; i < 4; i++) {\n matrix[3][i] = alocacao.get(i + 4);\n }\n\n }", "public Tequisquiapan()\n {\n nivel = new Counter(\"Barrio Tequisquiapan: \");\n \n nivel.setValue(5);\n hombre.escenario=5;\n\n casa5.creaCasa(4);\n addObject(casa5, 2, 3);\n \n arbol2.creaArbol(2);\n addObject(arbol2, 20, 3);\n arbol3.creaArbol(3);\n addObject(arbol3, 20, 16); \n \n addObject(letrero5, 15, 8);\n\n addObject(hombre, 11, 1);\n \n arbol4.creaArbol(4);\n addObject(arbol4, 20, 20);\n arbol5.creaArbol(5);\n addObject(arbol5, 3, 17);\n \n fuente2.creaAfuera(6);\n addObject(fuente2, 11, 19);\n \n lampara1.creaAfuera(2);\n addObject(lampara1, 8, 14);\n lampara2.creaAfuera(1);\n addObject(lampara2, 8, 7);\n \n addObject(nivel, 5, 0);\n addObject(atras, 20, 2); \n }", "public String getNombreArea() { return (this.nombreArea == null) ? \"\" : this.nombreArea; }", "private Karta kartaErabaki(ArrayList<ArrayList<Karta>> pMatrizea) \r\n\t{\r\n\t\tKarta karta = (Karta) new KartaNormala(ElementuMota.ELURRA,0,KoloreMota.BERDEA);\r\n\t\tfor(int i=0;i<pMatrizea.size();i++) \r\n\t\t{\r\n\t\t\tfor(int x=0;x<5;x++) \r\n\t\t\t{\r\n\t\t\t\tif(pMatrizea.get(i).get(0).getElementua()!=pMatrizea.get(i).get(1).getElementua() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(0).getElementua()!=this.lortuJolastekoKartaPosz(x).getElementua() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(1).getElementua()!=this.lortuJolastekoKartaPosz(x).getElementua() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(0).getKolorea()!=this.lortuJolastekoKartaPosz(x).getKolorea() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(1).getKolorea()!=this.lortuJolastekoKartaPosz(x).getKolorea() &&\r\n\t\t\t\t\t\tthis.lortuJolastekoKartaPosz(x).getBalioa()>karta.getBalioa() &&\r\n\t\t\t\t\t\tthis.lortuJolastekoKartaPosz(x).getErabilgarria()) \r\n\t\t\t\t{\r\n\t\t\t\t\tkarta = lortuJolastekoKartaPosz(x);\r\n\t\t\t\t}\r\n\t\t\t\tif(pMatrizea.get(i).get(0).getElementua()==pMatrizea.get(i).get(1).getElementua() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(0).getElementua()==this.lortuJolastekoKartaPosz(x).getElementua() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(1).getElementua()==this.lortuJolastekoKartaPosz(x).getElementua() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(0).getKolorea()!=this.lortuJolastekoKartaPosz(x).getKolorea() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(1).getKolorea()!=this.lortuJolastekoKartaPosz(x).getKolorea() &&\r\n\t\t\t\t\t\tthis.lortuJolastekoKartaPosz(x).getBalioa()>karta.getBalioa() &&\r\n\t\t\t\t\t\tthis.lortuJolastekoKartaPosz(x).getErabilgarria()) \r\n\t\t\t\t{\r\n\t\t\t\t\tkarta = this.lortuJolastekoKartaPosz(x);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn karta;\r\n\t}", "private static void lanzaTablero() {\r\n\t\t// for (contadorPelotas = 0; contadorPelotas<numPelotasEnTablero;) { // Cambiado porque ahora el contador va dentro del objeto\r\n\t\twhile (tablero.size()<tablero.tamMaximo()) {\r\n\t\t\t// Crea pelota nueva\r\n\t\t\t// Con constructor por defecto sería:\r\n\t\t\t// Pelota p = new Pelota();\r\n\t\t\t//\tp.x = r.nextInt(5) * ANCHO_CASILLA + (ANCHO_CASILLA/2); // Posición aleatoria de centro en 5 filas\r\n\t\t\t//\tp.y = r.nextInt(5) * ALTO_CASILLA + (ALTO_CASILLA/2); // Posición aleatoria de centro en 5 columnas\r\n\t\t\t//\tp.radio = r.nextInt(21) + 50; // Radio aleatorio entre 50 y 70\r\n\t\t\t//\tp.color = COLORES_POSIBLES[ r.nextInt( COLORES_POSIBLES.length ) ];\r\n\t\t\t// Con constructor con parámetros:\r\n\t\t\tPelota p = new Pelota(\r\n\t\t\t\tr.nextInt(RADIO_MAXIMO-RADIO_MINIMO+1) + RADIO_MINIMO, // Radio aleatorio entre los valores dados\r\n\t\t\t\tr.nextInt(tamanyoTablero) * ANCHO_CASILLA + (ANCHO_CASILLA/2), // Posición aleatoria de centro en n filas\r\n\t\t\t\tr.nextInt(tamanyoTablero) * ALTO_CASILLA + (ALTO_CASILLA/2), // Posición aleatoria de centro en n columnas\r\n\t\t\t\tCOLORES_POSIBLES[ r.nextInt( COLORES_POSIBLES.length ) ]\r\n\t\t\t);\r\n\t\t\t// boolean existeYa = yaExistePelota( tablero, p, contadorPelotas ); // Método movido a la clase GrupoPelotas\r\n\t\t\tboolean existeYa = tablero.yaExistePelota( p ); // Observa que el contador deja de ser necesario\r\n\t\t\tif (!existeYa) {\r\n\t\t\t\t// Se dibuja la pelota y se añade al array\r\n\t\t\t\tp.dibuja( v );\r\n\t\t\t\t// tablero[contadorPelotas] = p; // Sustituido por el objeto:\r\n\t\t\t\ttablero.addPelota( p );\r\n\t\t\t\t// contadorPelotas++; // El contador deja de ser necesario (va incluido en el objeto GrupoPelotas)\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Comprueba que el tablero sea posible (no hay solo N-2 pelotas de un color dado)\r\n\t\tchar tabPosible = ' ';\r\n\t\tdo { // Repite hasta que el tablero sea posible\r\n\t\t\t\r\n\t\t\tif (tabPosible!=' ') {\r\n\t\t\t\tboolean existeYa = true;\r\n\t\t\t\tPelota p = null;\r\n\t\t\t\tdo {\r\n\t\t\t\t\tp = new Pelota(\r\n\t\t\t\t\t\tr.nextInt(RADIO_MAXIMO-RADIO_MINIMO+1) + RADIO_MINIMO, // Radio aleatorio entre los valores dados\r\n\t\t\t\t\t\tr.nextInt(tamanyoTablero) * ANCHO_CASILLA + (ANCHO_CASILLA/2), // Posición aleatoria de centro en n filas\r\n\t\t\t\t\t\tr.nextInt(tamanyoTablero) * ALTO_CASILLA + (ALTO_CASILLA/2), // Posición aleatoria de centro en n columnas\r\n\t\t\t\t\t\ttabPosible\r\n\t\t\t\t\t);\r\n\t\t\t\t\texisteYa = tablero.yaExistePelota( p );\r\n\t\t\t\t} while (existeYa);\r\n\t\t\t\tp.dibuja( v );\r\n\t\t\t\ttablero.addPelota( p );\r\n\t\t\t}\r\n\t\t\tquitaPelotasSiLineas( false );\r\n\t\t\ttabPosible = tableroPosible();\r\n\t\t} while (tabPosible!=' ');\r\n\t\tv.setMensaje( tablero.size() + \" pelotas creadas.\" );\r\n\t}", "public void statoIniziale()\n {\n int r, c;\n for (r=0; r<DIM_LATO; r++)\n for (c=0; c<DIM_LATO; c++)\n {\n if (eNera(r,c))\n {\n if (r<3) // le tre righe in alto\n contenutoCaselle[r][c] = PEDINA_NERA;\n else if (r>4) // le tre righe in basso\n contenutoCaselle[r][c] = PEDINA_BIANCA;\n else contenutoCaselle[r][c] = VUOTA; // le 2 righe centrali\n }\n else contenutoCaselle[r][c] = VUOTA; // caselle bianche\n }\n }", "public ArrayList<String> ExcutarCalculo(ArrayList<String> linha, String tipo){\n ArrayList<String> cod = new ArrayList();\n String reg, rv1, rv2;\n \n /*Verifica se a variavel tem registrador*/\n reg = r.getRegistrador(linha.get(0));\n if(linha.size() == 3){//x = n\n rv1 = r.getRegistrador(linha.get(2));//Verifica se é variavel\n \n if(reg == null){\n reg = \"r\"+(r.getMax()+1);\n r.Add(linha.get(0), reg);\n } \n \n if(rv1 == null)\n cod.add(\"load \"+reg+\", \"+linha.get(2));\n else\n cod.add(\"load \"+reg+\", \"+rv1);\n }else{\n ArrayList<String> aux = new ArrayList();\n String[] ordem = new String[100];\n String [][]operador = {{\"(\",\"\"},{\"*\",\"mult\"},{\"/\",\"div\"},{\"+\",\"add\"},{\"-\",\"sub\"}};\n String []temp = {\"ra\",\"rb\",\"rc\",\"rd\",\"re\",\"rf\"};\n Boolean ctr = false;\n int i, j, k, tl, ctrTemp, r1, r2, pos;\n \n for(i = 0; i < 100; i++){\n ordem[i] = \"\";\n } \n \n tl = ctrTemp = 0;\n for(i = 0; i < 5; i++){\n for(j = 0; j < linha.size(); j++){\n if(linha.get(j).contains(operador[i][0])){\n if(i == 0){\n /* min = verificaRegistradores(linha.get(j+1),linha.get(j+3),temp);\n \n if(min == -1){\n ordem[tl++] = \"load \"+temp[ctrTemp++]+\", \"+linha.get(j+1);//Carrega val no registrador t1\n ordem[tl++] = \"load \"+temp[ctrTemp++]+\", \"+linha.get(j+3);//Carrega val no registrador t2\n }\n \n \n for(k = 0; k < 5; k++){\n if(linha.get(j+2).contains(operador[k][0])){ \n if(operador[k][1].equals(\"add\")){\n if(tipo.equals(\"int\"))\n ordem[tl] += \"addi\";\n else\n ordem[tl] += \"addf\";\n }\n \n k = 5;\n }\n }\n \n ordem[tl] += \" \"+temp[ctrTemp-2];//temp3 por conta de reuso\n ordem[tl] += \", \"+temp[ctrTemp-1];//temp2\n ordem[tl] += \", \"+temp[ctrTemp-2];//temp1\n tl++;\n \n for(k = 0; k < 5; k++)//( ate )\n linha.remove(j);\n linha.add(j,temp[ctrTemp-2]);\n \n if(min == -1)\n ctrTemp -= 1;\n else\n ctrTemp = 0;*/\n }else{\n rv1 = r.getRegistrador(linha.get(j-1));\n rv2 = r.getRegistrador(linha.get(j+1));\n \n r1 = verificaRegistradores(linha.get(j-1),temp);\n if(r1 == -1){//Nenhum registrador\n if(rv1 == null)\n ordem[tl++] = \"load \"+temp[ctrTemp++]+\", \"+linha.get(j-1);//Carrega val no registrador t1\n else\n ordem[tl++] = \"move \"+temp[ctrTemp++]+\", \"+rv1;\n }\n r2 = verificaRegistradores(linha.get(j+1),temp);\n if(r2 == -1){//Nenhum registrador\n if(rv2 == null)\n ordem[tl++] = \"load \"+temp[ctrTemp++]+\", \"+linha.get(j+1);//Carrega val no registrador t2\n else\n ordem[tl++] = \"move \"+temp[ctrTemp++]+\", \"+rv2;//Carrega val no registrador t2\n } \n \n pos = ctrTemp;//como posso entrar no mult ou no add\n if(operador[i][1].equals(\"mult\") || operador[i][1].equals(\"div\")){\n ctrTemp -= 2;\n \n if(operador[i][1].equals(\"mult\")){\n aux = mult(linha.get(j-1), linha.get(j+1), tipo, temp[ctrTemp++]);\n }else\n if(operador[i][1].equals(\"div\")){\n aux = div(linha.get(j-1), linha.get(j+1), tipo, temp[ctrTemp++]);\n }\n \n tl -= 2;\n for(k = 0; k < aux.size(); k++){\n ordem[tl++] = aux.get(k);\n }\n pos = ctrTemp-1;\n \n if(r1!= -1 && r2 != -1)\n ctrTemp -= 2;\n /*else\n ctrTemp -= 1;*/\n }else\n if(operador[i][1].equals(\"add\") || operador[i][1].equals(\"sub\")){\n if(operador[i][1].equals(\"sub\")){\n ordem[tl-1] = \"load \"+temp[ctrTemp-1]+\", -\"+linha.get(j+1);\n }\n \n if(tipo.equals(\"int\"))\n ordem[tl] += \"addi\";\n else\n ordem[tl] += \"addf\";\n \n ordem[tl] += \" \"+temp[ctrTemp-2];//temp3\n ordem[tl] += \", \"+temp[ctrTemp-1];//temp2\n ordem[tl] += \", \"+temp[ctrTemp-2];//temp1\n tl++;\n pos = ctrTemp-2;\n \n if(r1!= -1 && r2 != -1)\n ctrTemp -= 2;\n else\n ctrTemp -= 1;\n }\n \n for(k = 0; k < 3; k++)\n linha.remove(j-1);\n linha.add(j-1,temp[pos]);\n }\n ctr = true;//Faz repetir denovo caso adicione;\n }\n }\n if(ctr){\n i--;//Controla pra só sair quando tiver excluido todas operacoes desse tipo\n ctr = false;\n }\n }\n for(k = 0; k < tl; k++){\n cod.add(ordem[k]);\n }\n\n if(reg == null){\n reg = \"r\"+(r.getMax()+1);\n r.Add(linha.get(0), reg);\n }\n cod.add(\"move \"+reg+\", \"+temp[ctrTemp-1]);\n ctrTemp = 0;\n }\n \n return cod;\n }", "public Todoist()\n {\n tareas = new ArrayList<String>();\n }", "public Todoist()\n {\n tareas = new ArrayList<String>();\n }", "public static void imprimirTablero(int[] tablero) {\r\n int n = tablero.length;\r\n System.out.print(\" \");\r\n for (int i = 0; i < n; ++i) {\r\n System.out.print(i + \" \");\r\n }\r\n System.out.println(\"\\n\");\r\n for (int i = 0; i < n; ++i) {\r\n System.out.print(i + \" \");\r\n for (int j = 0; j < n; ++j) {\r\n System.out.print((tablero[i] == j ? \"Q\" : \"#\") + \" \");\r\n }\r\n System.out.println();\r\n }\r\n System.out.println();\r\n }", "public Tarea (String descripcion, String prioridad, int duracion){\n this.codigo = Tarea.usarCodigo();\n this.descripcion = descripcion;\n this.prioridad = prioridad;\n this.duracion = duracion;\n this.estado = 0;\n Tarea.setTiempoPendiente(Tarea.getTiempoPendiente() + (long)duracion);\n }", "private void calculateAreas() {\n\n\t\t/*\n\t\t * Each section is a trapezoid, so that the area is given by:\n\t\t * \n\t\t * (thicknessAtMainSpar + thicknessAtSecondarySpar)*distanceBetweenSpars*0.5\n\t\t * \n\t\t */\n\t\tint nSections = this._thicknessAtMainSpar.size();\n\t\tfor(int i=0; i<nSections; i++)\n\t\t\tthis._prismoidsSectionsAreas.add(\n\t\t\t\t\tAmount.valueOf(\n\t\t\t\t\t\t\t(this._thicknessAtMainSpar.get(i).plus(this._thicknessAtSecondarySpar.get(i)))\n\t\t\t\t\t\t\t.times(this._distanceBetweenSpars.get(i)).times(0.5).getEstimatedValue(),\n\t\t\t\t\t\t\tSI.SQUARE_METRE\n\t\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t}", "private AtualizarContaPreFaturadaHelper parserRegistroTipo4(String linha) {\r\n\t\tAtualizarContaPreFaturadaHelper retorno = new AtualizarContaPreFaturadaHelper();\r\n\r\n\t\tInteger index = 0;\r\n\r\n\t\t// Tipo de registro\r\n\t\tretorno.tipoRegistro = linha.substring(index, index + REGISTRO_TIPO);\r\n\t\tindex += REGISTRO_TIPO;\r\n\r\n\t\t// Matricula do imovel\r\n\t\tretorno.matriculaImovel = linha.substring(index, index\r\n\t\t\t\t+ MATRICULA_IMOVEL);\r\n\t\tindex += MATRICULA_IMOVEL;\r\n\r\n\t\t// Tipo do imposto\r\n\t\tretorno.tipoImposto = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_4_TIPO_IMPOSTO);\r\n\t\tindex += REGISTRO_TIPO_4_TIPO_IMPOSTO;\r\n\r\n\t\t// Descrição do imposto\r\n\t\tretorno.descricaoImposto = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_4_DESCRICAO_IMPOSTO);\r\n\t\tindex += REGISTRO_TIPO_4_DESCRICAO_IMPOSTO;\r\n\r\n\t\t// Percentual da aliquota\r\n\t\tretorno.percentualAliquota = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_4_PERCENTUAL_ALIQUOTA);\r\n\t\tindex += REGISTRO_TIPO_4_PERCENTUAL_ALIQUOTA;\r\n\r\n\t\t// Valor do imposoto\r\n\t\tretorno.valorImposto = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_4_VALOR_IMPOSTO);\r\n\t\tindex += REGISTRO_TIPO_4_VALOR_IMPOSTO;\r\n\r\n\t\treturn retorno;\r\n\t}", "public String[][] imprimirTracos(String[][] imprimir, int indice){\n\t\tif(this.proximo.proximo != null) {\n\t\t\timprimir[indice][0] = this.traco.getNome();\n\t\t\timprimir[indice][1] = this.traco.getDescricao();\n\t\t\treturn this.proximo.imprimirTracos(imprimir, ++indice);\n\t\t}\n\t\telse {\n\t\t\timprimir[indice][0] = this.traco.getNome();\n\t\t\timprimir[indice][1] = this.traco.getDescricao();\n\t\t\treturn imprimir;\n\t\t}\n\t}", "@Test\n\tpublic void driverAssignArea() {\n\t\tfinal Object testingData[][] = {\n\n\t\t\t{\n\t\t\t\t\"chapter3\", \"area3\", null\n\t\t\t},//1. All fine\n\t\t\t{\n\t\t\t\t\"chapter1\", \"area3\", IllegalArgumentException.class\n\t\t\t},//2. A Chapter who have an area, self-assing another area\n\n\t\t};\n\n\t\tfor (int i = 0; i < testingData.length; i++)\n\t\t\tthis.templateAssignArea((String) testingData[i][0], (String) testingData[i][1], (Class<?>) testingData[i][2]);\n\n\t}", "public String toString ()\n\t{\n\t\treturn new String (\"[\" + ancho+ \", \" + alto + \"], Area = \" + area);\n\t}", "public Rectangulo(int alto, int ancho) {\n\t\tthis.alto = alto;\n\t\tthis.ancho = ancho;\n\t\tthis.area = alto * ancho;\n\t\t\n\t\tthis.pos = new Punto();\n\t}", "public void nuevoJuego() {\n fallos = 0;\n finDePartida = false;\n\n for (TextView b : botonesLetras) {\n b.setTextColor(Color.BLACK);\n b.setOnClickListener(clickListenerLetras);\n b.setPaintFlags(b.getPaintFlags() & (~ Paint.STRIKE_THRU_TEXT_FLAG));\n }\n ImageView img_ahorcado = (ImageView) findViewById(es.makingapps.ahorcado.R.id.img_ahorcado);\n img_ahorcado.setImageResource(R.drawable.ahorcado_0);\n\n BaseDatos bd = new BaseDatos(this);\n palabraActual = bd.queryPalabraAleatoria(nivelSeleccionado, esAcumulativo);\n\n palabraEspaniol.setText(palabraActual.getEspaniol());\n\n progreso = \"\";\n boolean parentesis = false;\n for(int i = 0; i<palabraActual.getIngles().length(); i++) {\n if(parentesis){\n progreso += palabraActual.getIngles().charAt(i);\n }\n else {\n// if (palabraActual.getIngles().charAt(i) == ' ')\n// progreso += ' ';\n// else if (palabraActual.getIngles().charAt(i) == '-')\n// progreso += '-';\n// else if (palabraActual.getIngles().charAt(i) == '/')\n// progreso += '/';\n// else if (palabraActual.getIngles().charAt(i) == '(') {\n// progreso += '(';\n// parentesis = true;\n// }\n// else if (palabraActual.getIngles().charAt(i) == ')') {\n// progreso += ')';\n// parentesis = false;\n// }\n// else\n// progreso += '_';\n if(Character.isLowerCase(palabraActual.getIngles().charAt(i)))\n progreso += '_';\n else if (palabraActual.getIngles().charAt(i) == '(') {\n progreso += '(';\n parentesis = true;\n }\n else if (palabraActual.getIngles().charAt(i) == ')') {\n progreso += ')';\n parentesis = false;\n }\n else\n progreso += palabraActual.getIngles().charAt(i);\n }\n }\n\n palabraIngles.setText( progreso );\n }", "private ArrayList limpiar() {//quita espacios en blanco y saltos de linea\n String codigoFuente = ta_source.getText();\n ArrayList retorno = new ArrayList();\n try {\n codigoFuente = codigoFuente.replaceAll(\" \", \"\");\n String aux = \"\";\n byte guardaLinea = 1, guardaBloque = 1;\n for (int i = 0; i < codigoFuente.length(); i++) {\n if (codigoFuente.length() > (i + 1) && codigoFuente.charAt(i) == '/' && codigoFuente.charAt(i + 1) == '/' && guardaBloque == 1) {\n guardaLinea = 0;//0: no guarda\n }\n if (codigoFuente.length() > (i + 1) && codigoFuente.charAt(i) == '/' && codigoFuente.charAt(i + 1) == '*' && guardaLinea == 1) {\n guardaBloque = 0;//0: no guarda\n }\n if (i > 0 && codigoFuente.charAt(i) == '/' && codigoFuente.charAt(i - 1) == '*') {\n guardaBloque = 2;//1: si guarda\n }\n if (codigoFuente.charAt(i) == '\\n' && guardaBloque == 1) {\n guardaLinea = 1;//1: si guarda\n if (aux.length() > 0) {\n retorno.add(aux);\n aux = \"\";\n }\n } else {\n if (i == codigoFuente.length() - 1) {\n aux += codigoFuente.charAt(i);\n retorno.add(aux);\n }\n }\n if (guardaBloque == 1 && guardaLinea == 1 && codigoFuente.charAt(i) != '\\n') {\n aux += codigoFuente.charAt(i);\n }\n if (guardaBloque == 2) {\n guardaBloque--;\n }\n }\n } catch (Exception e) {\n System.out.println(\"errror \" + e.getClass());\n } finally {\n return retorno;\n }\n }", "public void setNoOfRelevantLines(int norl) { this.noOfRelevantLines = norl; }", "public String generarPrioridadVacunacion(){\n \n String aux = \" \"; \n \n if(EmpleadosPrioridadAlta.isEmpty() != true){\n aux += \"\\nLos empleados con mayor prioridad son: \";\n for (int i = 0; i < EmpleadosPrioridadAlta.size(); i++) {\n \n aux += \"\\n-------------------------\\n\" + \"Empleado #\"+(i+1)\n +\"\\nNombre: \"+EmpleadosPrioridadAlta.get(i).getNombre()\n +\"\\nIdentificacion: \"+EmpleadosPrioridadAlta.get(i).getIdentificacion();\n }\n }\n \n if(EmpleadosPrioridadMediaAlta.isEmpty() != true){\n aux += \"\\nLos empleados con prioridad media alta son: \";\n for (int i = 0; i < EmpleadosPrioridadMediaAlta.size(); i++) {\n aux += \"\\n--------------------------\\n\" + \"Empleado #\"+(i+1)\n +\"\\nNombre: \"+EmpleadosPrioridadMediaAlta.get(i).getNombre()\n +\"\\nIdentificacion: \"+EmpleadosPrioridadMediaAlta.get(i).getIdentificacion();\n }\n }\n \n if(EmpleadosPrioridadMedia.isEmpty() != true){\n aux += \"\\nLos empleados con prioridad media son: \";\n for (int i = 0; i < EmpleadosPrioridadMedia.size(); i++) {\n aux += \"\\n--------------------------\\n\" + \"Empleado #\"+(i+1)\n +\"\\nNombre: \"+EmpleadosPrioridadMedia.get(i).getNombre()\n +\"\\nIdentificacion: \"+EmpleadosPrioridadMedia.get(i).getIdentificacion();\n }\n }\n \n if(EmpleadosPrioridadBaja.isEmpty() != true){\n aux += \"\\nLos empleados con menor prioridad son: \";\n for (int i = 0; i < EmpleadosPrioridadBaja.size(); i++) {\n aux += \"\\n--------------------------\\n\" + \"Empleado #\"+(i+1)\n +\"\\nNombre: \"+EmpleadosPrioridadBaja.get(i).getNombre()\n +\"\\nIdentificacion: \"+EmpleadosPrioridadBaja.get(i).getIdentificacion();\n }\n }\n return aux;\n }", "private String getLineAt(int linenum) {\n\t\ttry {\n\t\t\tint start = mainTextArea.getLineStartOffset(linenum);\n\t\t\tint end = mainTextArea.getLineEndOffset(linenum);\n\t\t\treturn mainTextArea.getText(start, end - start);\n\t\t} catch (BadLocationException e) {\n\t\t\treturn (\"\");\n\t\t}\n\t}", "public void leituraMapa() throws IOException {\n BufferedReader br = new BufferedReader(new FileReader(caminho+\"/caminho.txt\"));\n String linha = br.readLine();\n String array[] = new String[3];\n while (linha != null){\n array = linha.split(\",\");\n dm.addElement(array[1]);\n nomeJanela[contador] = array[0];\n contador++;\n linha = br.readLine();\n }\n br.close();\n }", "public void Nivel3(){\n \n int cont = 0; \n\n while(cont<6){\n lv[0][cont] = 4;//pared arriba\n lv[7][cont] = 4;//pared abajo \n cont++;\n }\n cont=0;\n while(cont<8){\n lv[cont][0] = 4;//pared arriba\n lv[cont][5] = 4;//pared abajo \n cont++;\n }\n \n //metas\n lv[1][2] = 3;\n lv[1][3] = 3;\n lv[6][4] = 3;\n \n //cajas\n lv[6][5] = 2;\n lv[2][2] = 2;\n lv[5][4] = 2;\n \n //obstaculos\n lv[5][3] = 4;\n lv[5][2] = 4;\n lv[1][4] = 4;\n \n lv[6][1] =1;//jugador \n \n \n }", "public static void cargarLineaEnCancion(String linea,ArrayList<String> cancion) throws ArchivosException{\n\n\t\ttry{\n\t\t\tStringTokenizer tokens = new StringTokenizer(linea);\n\t\t\tString primerToken =tokens.nextToken();\n\t\t\tString acordesAux=\"\";\n\t\t\t//si es un numero \n\t\t\tif (Utiles.isNumeric(primerToken)){\n\t\t\t\tcancion.add(linea); // carga el compas completo\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\tif (linea.startsWith(Constantes.NUEVO_ESTILO)){\n\t\t\t\t\tthrow new ArchivosException(\"No contemplamos definiciones de nuevos estilos.\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(Utiles.cadenaContienePatron(linea, Constantes.COMIENZO_DE_VARIABLE)){\n\t\t\t\t\t\n\t\t\t\t\tif(Utiles.cadenaContienePatron(linea, Constantes.VAR_ULTIMO_ESTILO)){\n\t\t\t\t\t\tcancion.add(linea);// carga si es $_LastGroove\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//ej :\n\t\t\t\t\t\t//Set Pass 1\n\t\t\t\t\t\t//Groove $Pass BossaNova BossaNovaSus BossaNova1Sus\n\n\t\t\t\t\t\tthrow new ArchivosException(\"No contemplamos variables en definicion de estilos.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//me fijo si esta la palabra repeat en una cadena, ya que nos intersa, y la agrego en el arraylist\n\t\t\t\tif(Utiles.cadenaContienePatron(linea, Constantes.REPEAT)){\n\t\t\t\t\tcancion.add(linea);// carga si es un repeat\n\t\t\t\t}\n\t\t\t\tif(linea.startsWith(Constantes.ESTILO)){\n\t\t\t\t\tcancion.add(linea); // carga si es un estilo\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(linea.indexOf(Constantes.TEMPO)!=-1){\n\t\t\t\t\tcancion.add(linea);// si define tempo\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}catch (NoSuchElementException e){\n\t\t\t//util para las lineas vacias y con espacios en blanco\n\t\t}\n\t}", "private void Mostra() {\n mat = matriz.getMatriz();\n\n for (int lin = 0; lin < 9; lin++) {\n for (int col = 0; col < 9; col++) {\n array_texto[lin][col].setEditable(true);\n array_texto[lin][col].setText(mat[lin][col]);\n array_texto[lin][col].setBackground(Color.white);\n\n for (char letra : array_texto[lin][col].getText().toCharArray()) {\n if ((letra < 1 || letra > 9)) {\n array_texto[lin][col].setEditable(false);\n array_texto[lin][col].setBackground(Color.LIGHT_GRAY);\n }\n }\n }\n }\n }", "public void ALR(AreaInstrucao instrucao){\n deslocamento = instrucao.iParametro;\n for(int i = topo+1; i <= topo+deslocamento; i++ ){\n dads.push(\"0.0\");\n pilhaVerificacaoTipos.push(\"real\");\n };\n\n topo += deslocamento;\n ponteiro += 1;\n }", "private String creaElenco() {\n String testoTabella ;\n String riga = CostBio.VUOTO;\n ArrayList listaPagine = new ArrayList();\n ArrayList listaRiga;\n HashMap mappaTavola = new HashMap();\n String cognomeText;\n int num;\n int taglioPagine = Pref.getInt(CostBio.TAGLIO_COGNOMI_PAGINA);\n String tag = \"Persone di cognome \";\n ArrayList titoli = new ArrayList();\n titoli.add(LibWiki.setBold(\"Cognome\"));\n titoli.add(LibWiki.setBold(\"Voci\"));\n\n for (Map.Entry<String, Integer> mappa: mappaCognomi.entrySet()) {\n\n cognomeText = mappa.getKey();\n num = mappa.getValue();\n if (num >= taglioPagine) {\n cognomeText = tag + cognomeText + CostBio.PIPE + cognomeText;\n cognomeText = LibWiki.setQuadre(cognomeText);\n cognomeText = LibWiki.setBold(cognomeText);\n }// end of if cycle\n\n listaRiga = new ArrayList();\n listaRiga.add(cognomeText);\n listaRiga.add(num);\n listaPagine.add(listaRiga);\n\n }// end of for cycle\n mappaTavola.put(Cost.KEY_MAPPA_SORTABLE_BOOLEAN, true);\n mappaTavola.put(Cost.KEY_MAPPA_TITOLI, titoli);\n mappaTavola.put(Cost.KEY_MAPPA_RIGHE_LISTA, listaPagine);\n testoTabella = LibWiki.creaTable(mappaTavola);\n\n return testoTabella;\n }", "public void decision(Entity[][] map, int y, int x){ \r\n if (!getTired()){\r\n // check if surrounding area is another animal\r\n if ((x > 0) && (y > 0) && (map[y-1][x-1] instanceof Animal )){\r\n destroyArea(map, x, y);\r\n }else if ((x < map.length-1) && (y < map.length -1) && (map[y+1][x+1] instanceof Animal)){\r\n destroyArea(map, x, y);\r\n }else if ((y > 0) && map[y-1][x] instanceof Animal){\r\n destroyArea(map, x, y);\r\n }else if ((x < map.length -1) && (y > 0) && (map[y-1][x+1] instanceof Animal)){\r\n destroyArea(map, x, y);\r\n }else if(( x < map.length -1) && (map[y][x+1] instanceof Animal)){\r\n destroyArea(map, x, y);\r\n }else if(( x > 0) && (map[y][x-1] instanceof Animal)){\r\n destroyArea(map, x, y);\r\n }else if( (y < map.length-1) && (map[y+1][x] instanceof Animal)){\r\n destroyArea(map, x, y);\r\n }else if((x > 0) && (y < map.length -1) && (map[y+1][x-1] instanceof Animal)){\r\n destroyArea(map, x, y);\r\n }else if (numOfTurns == 3){\r\n numOfTurns = 0;\r\n moveRandom(map, y, x);\r\n }\r\n }\r\n numOfTurns ++;\r\n }", "public void crearAreaInt(AreaInteres a) throws Exception {\r\n\t\tboAreaInt.crearAreaInteres(a);\r\n\t}", "public static void main(String[] args) {\n\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\t\r\n\t\tint numZonas;\r\n\t\tSystem.out.println(\"¿Cuantas zonas hay?\");\r\n\t\tnumZonas = sc.nextInt();\r\n\t\t\r\n\t\tString añadir;\r\n\t\tint añadirZona = 0;\r\n\t\tint [][] densidadArea = new int [2][numZonas];\r\n\t\tint [][] denAreaExtra = new int[2][numZonas + añadirZona];\r\n\t\tString [] lugares = new String [numZonas];\r\n\t\tString [] lugaresExtra = new String [numZonas + añadirZona];\r\n\t\t\r\n\t\tfor (int i = 0 ; i < numZonas ; i++) {\r\n\t\t\tSystem.out.println(\"Introduce el nombre de la zona: \");\r\n\t\t\tlugares [i]= sc.next();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Introduce la densidad de la zona:\");\r\n\t\t\tdensidadArea [0][i] = sc.nextInt();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Introduce el area de la zona: \");\r\n\t\t\tdensidadArea [1][i] = sc.nextInt();\t\r\n\t\t\t\r\n\t\t\tResultados(numZonas, lugares, densidadArea);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"¿Quieres añadir más zonas? (Si/No)\");\r\n\t\tañadir = sc.next();\r\n\t\t\r\n\t\tif (añadir.equals (\"Si\")) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"¿Cuantas zonas quieres añadir?\");\r\n\t\t\tañadirZona = sc.nextInt();\r\n\t\t\tlugaresExtra = new String [numZonas + añadirZona];\r\n\t\t\t\r\n\t\t\tfor (int j = numZonas ; j < (numZonas + añadirZona) ; j++) {\r\n\t\t\t\tSystem.out.println(\"Introduce el nombre de la zona: \");\r\n\t\t\t\tlugaresExtra [j]= sc.next();\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Introduce la densidad de la zona:\");\r\n\t\t\t\tdenAreaExtra [0][j] = sc.nextInt();\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Introduce el area de la zona: \");\r\n\t\t\t\tdenAreaExtra [1][j] = sc.nextInt();\r\n\t\t\t\t\r\n\t\t\tResultados2(añadirZona, lugaresExtra, denAreaExtra);\r\n\t\t\t}\r\n\t\t\tnumZonas = numZonas + añadirZona;\r\n\t\t}\r\n\t\telse {\t\r\n\t\t\tSystem.out.println(\"Ya hemos terminado la consulta, gracias.\");\r\n\t\t}\r\n\t\t\r\n\t\tsc.close();\r\n\t\r\n\t\r\n\t\r\n\t}", "private void pintar_cuadrantes() {\tfor (int f = 0; f < 3; f++)\n//\t\t\tfor (int c = 0; c < 3; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 0; f < 3; f++)\n//\t\t\tfor (int c = 6; c < 9; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 3; f < 6; f++)\n//\t\t\tfor (int c = 3; c < 6; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 6; f < 9; f++)\n//\t\t\tfor (int c = 0; c < 3; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 6; f < 9; f++)\n//\t\t\tfor (int c = 6; c < 9; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\t\n\t\t\n\t\t}", "public interface DominoLine {\r\n /**\r\n * Adds a Tile on the beginning of The Dominoline\r\n *\r\n * @param tile Tile to be added\r\n */\r\n public void addTileOnBeginning(Tile tile);\r\n /**\r\n * Adds a Tile at the End of the DominoLine\r\n * \r\n * @param tile , a tile\r\n */\r\n public void addTileAtTheEnd(Tile tile);\r\n /**\r\n * Checks if the given tile fits on the Beggining of the line.\r\n * It is supposed that if the line is empty, every\r\n * tile fits the line.\r\n *\r\n * * \"matches\" depends on the rules of each version of DominoGames\r\n * \r\n * @param tile Tile to be checked\r\n * @return 1:if 1st tile matches the first tile in\r\n * DominoLine (or line is empty) 2:if 2nd tile matches the first\r\n * tile in DominoLine 3:if the first tile\r\n * in DominoLine doesn't match any side of the tile\r\n */\r\n public short fitsOnBeginning(Tile tile);\r\n /**\r\n * Checks if the given tile fits at the End of the line.\r\n * \r\n * \"matches\" depends on the rules of each version of DominoGames\r\n * \r\n * @param tile Tile to be checked\r\n * @return 1:if 1st Tile matches the second tile (or line\r\n * is empty) 2:if 2nd Tile matches the second tile 3:if\r\n * the second tile doesn't match any side of the Tile\r\n */\r\n public short fitsAtTheEnd(Tile tile);\r\n /**\r\n * Checks if this DominoLine contains no elements.\r\n *\r\n * @return true if this DominoLine contains no elements\r\n */\r\n public boolean isEmpty();\r\n /**\r\n * Gets the DominoLine returned.\r\n *\r\n * @return A SetOfTiles representing the DominoLine.\r\n */\r\n public SetOfTiles getSetOfTiles();\r\n /**\r\n * Clears(removes all elements) the DominoLine so\r\n * it can be updated with the next added elements.\r\n */\r\n public void Clear();\r\n \r\n \r\n}", "public void setwoorden()\n {\n String[] woorden = taInput.getText().split(\" |\\n\");\n \n for (int i = 0; i < woorden.length; i++) {\n if(!woorden[i].isEmpty())\n {\n AllText.add(woorden[i]); \n }\n } \n }", "public static void printAreas(String information) {\r\n //String information = stage + \"_\" + day + \"_\" + startTime;\r\n boolean bool = false;\r\n for (int i = 0; i <= 2976; i ++) {\r\n opCount++;\r\n if (LSItemsArray[i].getInformation().equals(information)){\r\n System.out.println(\"Load Shedding Inforamtion: \" + LSItemsArray[i].getInformation()\r\n + \": Corresponding Areas: \" + LSItemsArray[i].getAreas());\r\n bool = true;\r\n break;\r\n }\r\n\r\n }\r\n if (bool == false)\r\n System.out.println(\"Areas not found\");\r\n }", "public void validar() throws FileNotFoundException, IOException \n{\n \n \n codigo.InformacionCodigo co = new codigo.InformacionCodigo();\n \n String archivo=p;/*IMPORTANTE NOMBRE DEL ARCHIVO ABIERTO*/\n /*File fichero = new File(archivo);\n \n PrintWriter writer = new PrintWriter(fichero);\n writer.print(txtArea.getText());\n writer.close();\n \n Reader reader= new BufferedReader(new FileReader(archivo));*/\n String cadena=\"\";\n String linea;\n BufferedReader bs = new BufferedReader(new FileReader(archivo));\n while((linea=bs.readLine())!=null){\n cadena+=linea+\"\\n\";\n }\n \n txtArea.setText(cadena);\n codigo.Lexer lexer = new codigo.Lexer(new StringReader(cadena));\n \n \n ArrayList <String> lexema=new ArrayList<>();\n // ArrayList <Integer> Linea=new ArrayList<>();\n ArrayList <String> comp=new ArrayList<>();\n \n String resultado=\"\";\n boolean errores=false;\n while (true) {\n codigo.Tokens token = lexer.yylex();\n if (token == null) {\n resultado=resultado+ \"FIN\";\n txtErrores.setText(resultado);\n if(errores==false){\n modelo.setRowCount(lexema.size());\n for(int k=0;k<lexema.size();k++){\n //tblTokens.setValueAt(Linea.get(k), k, 0);\n tblTokens.setValueAt(lexema.get(k), k, 1);\n tblTokens.setValueAt(comp.get(k), k, 2);\n }\n txtErrores.setText(\"Correcto\");\n txtErrores.setForeground(new Color(25, 111, 61));\n }\n else{\n modelo.setRowCount(lexema.size());\n for(int k=0;k<lexema.size();k++){\n //tblTokens.setValueAt(Linea.get(k), k, 0);\n tblTokens.setValueAt(lexema.get(k), k, 1);\n tblTokens.setValueAt(comp.get(k), k, 2);\n }\n txtErrores.setText(resultado);\n txtErrores.setForeground(new Color(25, 111, 61));\n }\n \n return;\n \n }\n \n switch (token) {\n case comillas:\n comp.add(\"Cadena\");\n lexema.add(lexer.lexeme);\n break;\n case punto:\n comp.add(\"punto\");\n lexema.add(lexer.lexeme);\n break;\n case cadena:\n comp.add(\"Cadena\");\n lexema.add(lexer.lexeme);\n break;\n case entero:////============================================================\n comp.add(\"entero\");\n lexema.add(lexer.lexeme);\n break;\n case bit:\n comp.add(\"bit\");\n lexema.add(lexer.lexeme);\n break;\n case flotante:\n comp.add(\"flotante\");\n lexema.add(lexer.lexeme);\n break;\n case retorno:\n comp.add(\"retorno\");\n lexema.add(lexer.lexeme);\n break;\n case car:\n comp.add(\"Caracter\");\n lexema.add(lexer.lexeme);\n break;\n case si:\n comp.add(\"if\");\n lexema.add(lexer.lexeme);\n break;\n case entonces:\n comp.add(\"entonces\");\n \n lexema.add(lexer.lexeme);\n break;\n case hacer:\n comp.add(\"hacer\");\n lexema.add(lexer.lexeme);\n break;\n case mientras:\n comp.add(\"mientras\");\n lexema.add(lexer.lexeme);\n break;\n case para:\n comp.add(\"para\");\n lexema.add(lexer.lexeme);\n break;\n case fun:\n comp.add(\"funcion\");\n lexema.add(lexer.lexeme);\n break;\n case suma:\n comp.add(\"suma\");\n lexema.add(lexer.lexeme);\n break;\n case resta:\n comp.add(\"resta\");\n lexema.add(lexer.lexeme);\n break;\n case multiplicacion:\n comp.add(\"multiplicacion\");\n lexema.add(lexer.lexeme);\n break;\n case division:\n comp.add(\"division\");\n lexema.add(lexer.lexeme);\n case Op_logico:\n lexema.add(lexer.lexeme);\n comp.add(\"Op_Logico\");\n break;\n case Op_incremento:\n lexema.add(lexer.lexeme);\n comp.add(\"Op_incremento\");\n break;\n case Op_relacional:\n lexema.add(lexer.lexeme);\n comp.add(\"Op_relacional\");\n break;\n case Op_atribucion:\n lexema.add(lexer.lexeme);\n comp.add(\"Op_atribucion\");\n break;\n case Op_booleano:\n lexema.add(lexer.lexeme);\n comp.add(\"Op_booleano\");\n break;\n case Parentesis_a:\n String l=co.linea+\"\";\n \n lexema.add(lexer.lexeme);\n comp.add(\"Parentesis_a\");\n break;\n case Parentesis_c:\n lexema.add(lexer.lexeme);\n comp.add(\"Parentesis_c\");\n break;\n case Llave_a:\n lexema.add(lexer.lexeme);\n comp.add(\"Llave_a\");\n // Linea.add(lexer.linea);\n break;\n case Llave_c:\n lexema.add(lexer.lexeme);\n comp.add(\"Llave_c\");\n break;\n case Corchete_a:\n lexema.add(lexer.lexeme);\n comp.add(\"Corchete_a\");\n break;\n case Corchete_c:\n lexema.add(lexer.lexeme);\n comp.add(\"Corchete_c\");\n break;\n case prepVa:\n lexema.add(lexer.lexeme);\n comp.add(\"prepVa\");\n break;\n case punto_y_coma:\n lexema.add(lexer.lexeme);\n comp.add(\"punto_y_coma\");\n break;\n \n /*---------------------------------------------------------*/\n case EscDig:\n comp.add(\"Esc_Digital\");\n lexema.add(lexer.lexeme);\n break;\n case EscAnalogica:\n comp.add(\"Esc_Analogica\");\n lexema.add(lexer.lexeme);\n break;\n case LecDig:\n comp.add(\"Lectura_Digital\");\n lexema.add(lexer.lexeme);\n break;\n case LecAnalogica:\n comp.add(\"Lectura_analigica\");\n lexema.add(lexer.lexeme);\n break;\n \n /*---------------------------------------------------------*/ \n case ciclo:\n comp.add(\"ciclo\");\n lexema.add(lexer.lexeme);\n break;\n case clase:\n comp.add(\"clase\");\n lexema.add(lexer.lexeme);\n break;\n case Leer:\n comp.add(\"leer\");\n lexema.add(lexer.lexeme);\n break;\n case importar:\n comp.add(\"importar\");\n lexema.add(lexer.lexeme);\n break;\n case mostrar:\n comp.add(\"mostrar\");\n lexema.add(lexer.lexeme);\n break;\n /*---------------------------------------------------------*/\n case identificador:\n lexema.add(\"ID\");\n comp.add(lexer.lexeme);\n break;\n case numero:\n lexema.add(\"Numero\");\n comp.add(lexer.lexeme);\n break;\n case ERROR:\n \n resultado += \"ERROR LEXICO:-> Linea: \"+lexer.linea+ \" Caracter no definido: \"+lexer.lexeme+\"\\n\" ;\n errores=true;\n break;\n \n case ERRORD:\n resultado += \"ERROR LEXICO:-> Linea: \"+lexer.linea+ \" Caracter no definido: \"+lexer.lexeme+\"\\n\" ;\n errores=true;\n break;\n case ERRORI:\n resultado += \"ERROR LEXICO:-> Linea: \"+lexer.linea+ \" Caracter no definido: \"+lexer.lexeme+\"\\n\" ;\n errores=true;\n break;\n \n default:\n resultado += \" < \" + lexer.lexeme + \" >\\n\";\n break;\n }\n \n \n}\n}", "public void imprimir(){\n for(int i = 0;i < this.listaEtiquetas.size();i++){\n System.out.println(\"- \"+(i+1)+this.listaEtiquetas.get(i).getEtiqueta()+\" descripcion\"+this.listaEtiquetas.get(i).getDescripcion());\n }\n }", "public void main(String[] args) {\n String datas=\"\";\n try {\n File myObj = new File(\"configuracion.txt\");\n Scanner myReader = new Scanner(myObj);\n while (myReader.hasNextLine()) {\n String data = myReader.nextLine();\n datas = datas + data;\n }\n myReader.close();\n }\n catch (FileNotFoundException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n\n String[] partes = datas.split(\">\"); //separa el contenido del fichero en diferentes string\n String[] cambios; //y lo vuelve a separar para quitar los titulos entre <>. Ej: <Localizaciones>\n for (int i = 1; i < 4; i++) {\n cambios=partes[i].split(\"<\");\n partes[i]=cambios[0];\n }\n \n //calcular num de elementos de cada parte\n int[] numelementos = new int[3];\n for (int i = 0; i < 3; i++) {\n for(int j=0; j<partes[i+1].length(); j++){\n if(partes[i+1].charAt(j)=='(')\n numelementos[i]++;\n if(partes[i+1].charAt(j)==')'){\n if(numelementos[i]==0)\n flag1=1;\n }\n }\n }\n\n localizacionesString = new String [numelementos[0]]; //incializa la informacion de cada objeto \n personajesString = new String [numelementos[1]]; //segun el largo de los strings que hemos separado\n objetosString = new String [numelementos[2]];\n String cambio = \"\";\n int count = 0 ;\n\n //Se rellena cada string con un for propio\n //Dentro de un try para deteccion de errores\n try {\n //for para Localizaciones\n for (int i=0; count<numelementos[0]; ++i){ \n if (partes[1].charAt(i)==')'){\n localizacionesString[count]=\"\";\n cambio=cambio+partes[1].charAt(i);\n localizacionesString[count]=localizacionesString[count]+cambio;\n ++count;\n cambio=\"\";\n continue;\n }\n if (partes[1].charAt(i)==','){ //Control de errores en el txt /*\n if(partes[1].charAt(i+1)!=' '){\n cambio=cambio+\", \";\n continue;\n }\n if(partes[1].charAt(i+1)==' '&&partes[1].charAt(i+2)==' '){\n cambio=cambio+\", \";\n ++i;\n for(;;i++){\n if(partes[1].charAt(i)!=' ')\n break;\n }\n }\n }\n cambio=cambio+partes[1].charAt(i);\n if(cambio.charAt(0)==' ')\n cambio=\"\"; \n }\n for (int f,i = 0; i < numelementos[0]; i++) {\n f=0;\n for (int j = 0; j < localizacionesString[i].length(); j++) {\n if(localizacionesString[i].charAt(j)==')'||localizacionesString[i].charAt(j)=='('){\n ++f;\n }\n }\n if(f<2||f>2){\n flag1=1;\n }\n } // */\n \n count = 0;\n\n //for para Personajes\n for (int i=0; count<numelementos[1]; ++i){\n if (partes[2].charAt(i)==')'){\n personajesString[count]=\"\";\n cambio=cambio+partes[2].charAt(i);\n personajesString[count]=personajesString[count]+cambio;\n ++count;\n cambio=\"\";\n continue;\n }\n cambio=cambio+partes[2].charAt(i);\n if(cambio.charAt(0)==' ')\n cambio=\"\";\n }\n for (int f,i = 0; i < numelementos[1]; i++) { //Control de errores/*\n f=0;\n for (int j = 0; j < personajesString[i].length(); j++) {\n if(personajesString[i].charAt(j)==')'||personajesString[i].charAt(j)=='('){\n ++f;\n }\n }\n if(f<2||f>2){\n flag1=1;\n }\n } // */\n \n count=0;\n\n //for para Objetos\n for (int i=0; count<numelementos[2]; ++i){\n if (partes[3].charAt(i)==')'){\n objetosString[count]=\"\";\n cambio=cambio+partes[3].charAt(i);\n objetosString[count]=objetosString[count]+cambio;\n ++count;\n cambio=\"\";\n continue;\n }\n cambio=cambio+partes[3].charAt(i);\n if(cambio.charAt(0)==' ')\n cambio=\"\";\n }\n for (int f,i = 0; i < numelementos[2]; i++) { //Control de errores/*\n f=0;\n for (int j = 0; j < objetosString[i].length(); j++) {\n if(objetosString[i].charAt(j)==')'||objetosString[i].charAt(j)=='('){\n ++f;\n }\n }\n if(f<2||f>2){\n flag1=1;\n }\n } // */\n\n \n } catch (Exception e) {\n System.out.println(\"ERROR EN LECTURA FICHERO\");\n flag1 = 1;\n }\n \n \n\n\n\n\n\n //leer fichero de objetivos(funciona igual que el de configuracion.txt)\n\n datas=\"\";\n try {\n File myObj = new File(\"objetivos.txt\");\n Scanner myReader = new Scanner(myObj);\n while (myReader.hasNextLine()) {\n String data = myReader.nextLine();\n datas = datas + data;\n }\n myReader.close();\n }\n\n catch (FileNotFoundException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n\n partes = datas.split(\">\");\n for (int i = 1; i < 3; i++) {\n cambios=partes[i].split(\"<\");\n partes[i]=cambios[0];\n }\n \n numelementos = new int[2];\n for(int i=0 ; i<2 ; i++){\n for(int j=0; j<partes[i+1].length(); j++){\n if(partes[i+1].charAt(j)=='('){\n numelementos[i]++;\n if(partes[i+1].charAt(j)==')'){\n if(numelementos[i]==0)\n flag2=1;\n }\n }\n }\n }\n\n localizacionesObjetivoString = new String [numelementos[0]];\n objetosObjetivoString = new String [numelementos[1]];\n cambio=\"\";\n\n count = 0;\n\n try {\n // for para las localizaciones objetivo\n for (int i=0; count<numelementos[0]; ++i){\n if (partes[1].charAt(i)==')'){\n localizacionesObjetivoString[count]=\"\";\n cambio=cambio+partes[1].charAt(i);\n localizacionesObjetivoString[count]=localizacionesObjetivoString[count]+cambio;\n ++count;\n cambio=\"\";\n continue;\n }\n cambio=cambio+partes[1].charAt(i);\n if(cambio.charAt(0)==' ')\n cambio=\"\";\n }\n for (int f,i = 0; i < numelementos[0]; i++) { //Control de errores /*\n f=0;\n for (int j = 0; j < localizacionesObjetivoString[i].length(); j++) {\n if(localizacionesObjetivoString[i].charAt(j)==')'||localizacionesObjetivoString[i].charAt(j)=='('){\n ++f;\n }\n }\n if(f<2||f>2){\n flag2=1;\n }\n } // */\n\n count=0;\n\n // for para los objetos objetivo\n for (int i=0; count<numelementos[1]; ++i){\n if (partes[2].charAt(i)==')'){\n objetosObjetivoString[count]=\"\";\n cambio=cambio+partes[2].charAt(i);\n objetosObjetivoString[count]=objetosObjetivoString[count]+cambio;\n ++count;\n cambio=\"\";\n continue;\n }\n cambio=cambio+partes[2].charAt(i);\n if(cambio.charAt(0)==' ')\n cambio=\"\";\n }\n for (int f,i = 0; i < numelementos[0]; i++) { //Control de errores /*\n f=0;\n for (int j = 0; j < objetosObjetivoString[i].length(); j++) {\n if(objetosObjetivoString[i].charAt(j)==')'||objetosObjetivoString[i].charAt(j)=='('){\n ++f;\n }\n }\n if(f<2||f>2){\n flag2=1;\n }\n } // */\n\n } catch (Exception e) {\n System.out.println(\"ERRROR EN LA LECTURA DE FICHERO\");\n flag2=1;\n }\n \n System.out.println(\"\");\n }", "private JTextArea Tekstas() {\n\t JTextArea detailTA = new JTextArea();\n\t detailTA.setFont(new Font(\"Monospaced\", Font.PLAIN, 14));\n\t detailTA.setTabSize(3);\n\t detailTA.setLineWrap(true);\n\t detailTA.setWrapStyleWord(false);\n\t return (detailTA);\n\t}", "public void tipoSimbolos() {\n\t\tint k=0;\n\t\t//Recorre la matriz \"Tabla\"\n\t\tfor (int i = 1; i < tabla.length-1; i++) {\n\t\t\t//Recorre la matriz de \"simbolos\" en la fila con índice 0 para comparar los caracteres o palabras\n\t\t\tfor (int j = 0; j < simbolos[0].length; j++) {\n\t\t\t\t//Verifica si la palabra de posición actual es igual al simbolo de la posición actual\n\t\t\t\t if(tabla[i][0].compareToIgnoreCase(simbolos[0][j])==0) {\n\t\t\t\t\t \t//Comprueba que la casilla esté vacía para agregar el correspondiente tipo\n\t\t\t\t\t\tif(tabla[i][2]==null) {\n\t\t\t\t\t\t\ttabla[i][2]=simbolos[1][j];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//En caso de que la casilla esté llena y con un tipo de símbolo diferente al que se analiza\n\t\t\t\t\t\t//En la posición actual se agrega el otro tipo a la columna de índice 3.\n\t\t\t\t\t\tif(tabla[i][2]!=null && tabla[i][2]!=simbolos[1][j]){\n\t\t\t\t\t\t\ttabla[i][3]=simbolos[1][j];\n\t\t\t\t\t\t}\n\t\t\t\t } \n\t\t\t\t\t \n\t\t\t\tk=j;\n\t\t\t}\n\t\t\t\n\t\t\t//En caso de que el caracter o la palabra analizada no se encuentre en la matriz de \"simbolos\", esta será\n//\t\t\t//clasificada como de tipo \"Identificador\"\n\t\t\t if((k==simbolos[0].length-1) && tabla[i][1]!=null) {\n\t\t\t\t tabla[i][2]=\"Identificador\";\n\t\t\t }\n\t\t}\n\t}", "public static void main(String args[]) throws Exception{\n Pattern patron = Pattern.compile(\"\\\\s+\");\n\n //leer todas las lineas del archivo\n Stream<String> lineas = Files.lines(Paths.get(\"./data/alicia.txt\"),StandardCharsets.ISO_8859_1);\n\n //eliminamos signos de puntuacion\n Stream<String> lineasProcesadas = lineas.map(linea -> linea.replaceAll(\"(?!')\\\\p{Punct}\", \"\"));\n\n //trocear las lineas para tratar con palabras\n\n Stream<String> palabras = lineasProcesadas.flatMap(linea -> patron.splitAsStream(linea));\n\n //filtrar palabras vacias\n\n Stream<String> sinVacias = palabras.filter(palabra -> !palabra.isEmpty());\n\n // generar un diccionario con entradas tipo <palabra, numero de ocurrencias>\n // queremos que el diccionario sea tipo TreeMap\n\n TreeMap<String,Long> mapa = sinVacias.collect(Collectors.groupingBy(String::toLowerCase, TreeMap::new,Collectors.counting()));\n\n\n //Ahora todo compactado\n\n TreeMap<String,Long> mapa2 = Files.lines(Paths.get(\"./data/alicia.txt\"),StandardCharsets.ISO_8859_1).\n map(linea -> linea.replaceAll(\"(?!')\\\\p{Punct}\", \"\")).\n flatMap(linea -> patron.splitAsStream(linea)).\n filter(palabra -> !palabra.isEmpty()).\n collect(Collectors.groupingBy(String::toLowerCase, TreeMap::new,Collectors.counting()));\n\n\n mapa2.forEach(\n (palabra, numero) -> System.out.println(palabra + \" : \" + numero)\n );\n\n //Con esto pedo crear un stream\n //mapa2.entrySet().stream().forEach();\n\n\n //agrupamiento por inicales, todas las palabras con dicha inicial y contadores\n\n TreeMap<Character, List<Map.Entry<String,Long>>> mapa3 = mapa2.\n entrySet().\n stream().\n collect(Collectors.groupingBy(entrada -> entrada.getKey().charAt(0),TreeMap::new,Collectors.toList()));\n\n mapa3.forEach((inicial,listaPalabras) -> {\n System.out.printf(\"%n%c%n\", inicial);\n listaPalabras.stream().forEach( entrada -> {\n System.out.printf(\"%13s: %d%n\", entrada.getKey(), entrada.getValue());\n });\n });\n\n\n\n\n }", "private List<String> parseTipologie(HtmlTableCell cell) {\n\t\tString[] tipi = cell.asText().split(\" \");\n\t\tList<String> tipologie = new ArrayList<String>();\n\t\tfor(int i = 0; i < tipi.length; i++) {\t\t\t\t\t// leggo le tipologie e le porto in un formato comune\n\t\t\t\n\t\t\tString t = tipi[i];\t\n\t\t\tif(t.equals(\"P\"))\n\t\t\t\ttipologie.add(\"Pizzeria\");\n\t\t\telse if(t.equals(\"Bar\"))\n\t\t\t\t\ttipologie.add(\"Bar\");\n\t\t\telse if(t.equals(\"Pub\"))\n\t\t\t\t\ttipologie.add(\"Pub\");\n\t\t\telse if(t.equals(\"Agr\"))\n\t\t\t\t\ttipologie.add(\"Agriturismo\");\n\t\t\telse if(t.equals(\"Gel\"))\n\t\t\t\t\ttipologie.add(\"Gelateria\");\n\t\t\telse if(t.equals(\"Ct\"))\n\t\t\t\t\ttipologie.add(\"Catering\");\n\t\t\telse if(t.equals(\"Tr\") || t.equals(\"Ost\"))\n\t\t\t\t\ttipologie.add(\"Trattoria\");\n\t\t\telse if(t.equals(\"Crep\"))\n\t\t\t\t\ttipologie.add(\"Creperia\");\n\t\t\telse if(t.equals(\"SR\"))\n\t\t\t\t\ttipologie.add(\"SalaRicevimento\");\n\t\t\telse if(t.equals(\"H\"))\n\t\t\t\t\ttipologie.add(\"Hotel\");\n\t\t\telse if(t.equals(\"Alb\"))\n\t\t\t\t\ttipologie.add(\"Albergo\");\n\t\t\telse if(t.equals(\"Eno\"))\n\t\t\t\ttipologie.add(\"Enoteca\");\n\t\t\telse if(t.equals(\"Tc\"))\n\t\t\t\ttipologie.add(\"TavolaCalda\");\n\t\t\telse\n\t\t\t\ttipologie.add(\"Ristorante\");\n\t\t}\n\t\treturn tipologie;\n\t}", "private void drawtab(Graphics g1, int startoffset, int endoffset, boolean isUpwardTab, String text, Color color, String flag){\n\n // ~~~~ 1 ~~~~ revursive for one situation that this annotation are \n // layout on more than one line\n try{\n \n // ~~~~ 1.1 ~~~~ get rectangle of the annotation\n Rectangle rect1 = this.getUI().modelToView(this, startoffset);\n int y1 = rect1.y; // get the Y coordinate of the upper-left corner of the Rectangle.\n Rectangle rect2 = this.getUI().modelToView(this, endoffset);\n int y2 = rect2.y; // get the Y coordinate of the upper-left corner of the Rectangle.\n \n // ~~~~ 1.2 ~~~~ get \n // this annotation are layout on more than one line, if the span \n // start and the span end have different Y coordinate of their \n // upper-left corner of the their rectangle.\n if( y1!=y2){\n for( int i=startoffset; i<=endoffset;i++){\n Rectangle recttemp = this.getUI().modelToView(this, i);\n int ytemp = recttemp.y;\n if( ytemp == y1 )\n continue;\n else{\n //System.out.println(\"i=\"+i+\", start = \" + startoffset + \", endoffset = \"+ endoffset);\n drawtab(g1, startoffset, i-1, isUpwardTab, text.substring(0, i-1-startoffset), color, flag);//\n drawtab(g1, i, endoffset, isUpwardTab, text.substring(i-startoffset, text.length()), color, \"dead\");//\n return;\n }\n\n }\n }\n\n }catch(Exception ex){\n log.LoggingToFile.log( Level.SEVERE, ex.getMessage() );\n }\n\n \n // ~~~~ 2 ~~~~\n // This part is used to draw the rectangle area of a tab \n try {\n // color for line\n //Color linecolor_outer = new Color(153,153,102);\n Color linecolor;\n \n if(( flag!=null)&&(flag.equals(\"father\")))\n linecolor = new Color(204,0,0);\n else\n linecolor = new Color(0,0,204);\n \n Color linecolor_outer = linecolor;\n Color linecolor_inner = new Color(204,204,204);\n \n\n // get rectangle of the annotation\n Rectangle re = this.getUI().modelToView(this, startoffset);\n\n // coordinates (x1,y1) of the upper left point of the rectangle\n // view to this caret point\n int rect_upperleftX = re.x, rect_upperleftY = re.y;\n int rect_height = re.height;\n // coordinates (x2,y2) of the upper right point of the rectangle\n // view to this caret point\n re = this.getUI().modelToView(this, endoffset);\n int rect_upperrightX = re.x, rect_upperrightY = re.y;\n\n int extraheight = 3;\n\n // dirction of tab's head: to top or to bottom\n if( isUpwardTab ){\n\n Color fillcolor;\n fillcolor = ( color==null? new Color(204,204,204) : color);\n \n //g1.setColor( new Color(204,204,204) );\n //g1.fillRect(rect_upperleftX+3, rect_upperleftY-extraheight+3, \n // Math.abs(rect_upperrightX - rect_upperleftX)-3,\n // rect_height+extraheight-3);\n\n //g1.setColor(fillcolor);\n //g1.fillRect(rect_upperleftX, rect_upperleftY - extraheight , rect_upperrightX - rect_upperleftX + 2, extraheight+4);\n\n //g1.setColor(linecolor_outer);\n //g1.drawRect(rect_upperleftX, rect_upperleftY - extraheight-1, rect_upperrightX - rect_upperleftX, rect_height+extraheight+2);\n \n g1.setColor( Color.WHITE ); \n g1.fillRect(rect_upperleftX, rect_upperleftY - extraheight , rect_upperrightX - rect_upperleftX + 2, re.height + 2);\n g1.setColor( linecolor );\n //g1.fillRoundRect(re.x, re.y, re.width, re.height, 10, 10);\n g1.fillRect(rect_upperleftX, rect_upperleftY - extraheight , rect_upperrightX - rect_upperleftX + 2, re.height + 2 );\n g1.setColor( color );\n g1.fillRect(rect_upperleftX+2, rect_upperleftY - extraheight + 2 , rect_upperrightX - rect_upperleftX -2, re.height - 2 );\n //g1.drawRect(+1, rect_upperleftY - extraheight, rect_upperrightX - rect_upperleftX-2, rect_height+extraheight-0);\n //.setColor(linecolor_inner);\n //g1.drawRect(rect_upperleftX+2, rect_upperleftY - extraheight+1, rect_upperrightX - rect_upperleftX-4, rect_height+extraheight-2);\n\n g1.setColor(Color.black);\n\n // draw point\n if(( flag!=null)&&(flag.equals(\"dead\"))){\n \n } else {\n\n int cx = rect_upperleftX+2;\n int cy = rect_upperleftY - extraheight+2;\n g1.fillOval( cx, cy, 10, 10);\n\n if(( flag!=null)&&(flag.equals(\"father\")))\n g1.setColor( Color.red );\n else\n g1.setColor( new Color(255,153,0) );\n \n g1.fillOval( cx, cy, 8, 8);\n }\n\n g1.setColor(Color.black);\n int elementindex = this.getDocument().getDefaultRootElement().getElementIndex(startoffset);\n Element e = this.getDocument().getDefaultRootElement().getElement(elementindex);\n Font font = this.getStyledDocument().getFont( e.getAttributes() );\n\n int r = color.getAlpha();\n int b = color.getBlue();\n int gg = color.getGreen();\n double grayLevel = r * 0.299 + gg * 0.587 + b * 0.114;\n Color textcolor = grayLevel > 192 ? Color.BLACK : Color.white;\n \n g1.setFont( font );\n g1.setColor( textcolor );\n // draw text\n if((text!=null)&&(text.length()>0))\n //g1.drawString(text, rect_upperleftX+2, rect_upperleftY + rect_height-2);\n g1.drawString(text, rect_upperleftX, rect_upperleftY + re.height - 7 );\n \n // opinion1: draw rect\n /*\n\n // lining: lowerleft - lowerright\n g1.drawLine(rect_upperleftX+i, rect_upperleftY-i+rect_height, rect_upperrightX - i,\n rect_upperleftY - i+rect_height );\n\n // lining: topleft - lowerleft\n g1.drawLine(rect_upperleftX+i, rect_upperleftY+i, rect_upperleftX+i,\n rect_upperleftY - i + rect_height );\n\n // lining: topright - lowerright\n g1.drawLine(rect_upperrightX - i, rect_upperrightY + i, rect_upperrightX - i,\n rect_upperrightY - i + rect_height );\n */\n\n }\n\n\n\n //System.out.println(\"start startOffset = \" + re2.startOffset + \", endOffset = \" + re2.endOffset + \"; width = \"+re2.width + \", height = \" + re2.height);\n\n } catch (Exception ex) {\n log.LoggingToFile.log( Level.SEVERE, \"Error 1010140012:: fail to draw tab\" + ex.toString());\n }\n }", "public void etatInitial(){\r\n\t\t\r\n\t\tfor(int i=0; i<plateau.length;i++){\r\n\t\t\tfor(int j =0; j< plateau[0].length; j++)\r\n\t\t\t{\r\n\t\t\t\tplateau[i][j] = \" \";\r\n\t\t\t}\r\n\t\t}\r\n\t\tplateau[3][3] = \" B \";\r\n\t\tplateau[3][4] = \" N \";\r\n\t\tplateau[4][4] = \" B \";\r\n\t\tplateau[4][3] = \" N \";\r\n\t\t\r\n\t}", "public void setTipusPartida(int tipus) {\r\n\t\tthis.tipus = tipus;\r\n\t}", "public static String[][] acomodamiento(char direccion, String[][] cuadricula) {\n int numeroA;\n int espacios;\n for (int fila = 0; fila < 4; fila++) {\n\n for (int columna = 0; columna < 4; columna++) {\n\n switch (direccion) {\n case 'w':\n /*Creamos una condicion que empezara a mover los numeros si la posicion en esa parte\n de la matriz no esta vacia, cuando la encuentra mueve desde esa posicion hacia arriba\n del cuadro y si se encuentra alguna parte igual la suma , si esta vacia la remplaza y si no se queda igual\n */\n if (cuadricula[columna][fila].equals(\" \") == false) {\n for (int vecesMovimiento = columna; vecesMovimiento > 0; vecesMovimiento--) {\n //Verigica si hay un numero igual arriba suyo para sumarse\n if (cuadricula[vecesMovimiento][fila].equals(cuadricula[vecesMovimiento - 1][fila])) {\n /* Como los numeros son iguales se toma uno, se convierte el string de esa parte de la cuadricula a\n numeroA la duplica y se la agrega a la posicion de arriba\n */\n numeroA = Integer.parseInt(cuadricula[vecesMovimiento][fila].replaceAll(\" \", \"\"));\n numeroA += numeroA;\n cuadricula[vecesMovimiento - 1][fila] = Integer.toString(numeroA);\n /* desde la parte de espacios = 4 - cuadricula[vecesMovimiento-1]... hasta el for solo es el numero de espacios agregados al numero que dara\n para que se mantenga posicionado junto con la cuadricula\n */\n espacios = 4 - cuadricula[vecesMovimiento - 1][fila].length();\n for (int barras = espacios; barras > 0; barras--) {\n cuadricula[vecesMovimiento - 1][fila] += \" \";\n }\n cuadricula[vecesMovimiento][fila] = \" \";\n } //Condicion que indica si hay un espacio vacio en una posicion arriba la sustituye la de abajo\n else if (cuadricula[vecesMovimiento - 1][fila].equals(\" \")) {\n cuadricula[vecesMovimiento - 1][fila] = cuadricula[vecesMovimiento][fila];\n cuadricula[vecesMovimiento][fila] = \" \";\n }\n }\n }\n break;\n\n case 's':\n /*Creamos una condicion que empezara a mover los numeros si la posicion en esa parte\n de la matriz no esta vacia,tomando en cuenta que inicia a contar de abajo para arriba, cuando la encuentra mueve\n desde esa posicion hacia abajo del cuadro y si se encuentra alguna parte igual la suma , si esta vacia la remplaza y si no se queda igual\n */\n if (cuadricula[3 - columna][fila].equals(\" \") == false) {\n //Empezamos el ciclo en una posicion de abajo de la matriz\n // llegaremos hasta 2 ya que sigue comparando con una posicion abajo extra gracias al +1\n for (int vecesMovimiento = 3 - columna; vecesMovimiento < 3; vecesMovimiento++) {\n /* Como los numeros son iguales se toma uno, se convierte el string de esa parte de la cuadricula a\n numeroA la duplica y se la agrega a la posicion de abajo\n */\n if (cuadricula[vecesMovimiento][fila].equals(cuadricula[vecesMovimiento + 1][fila])) {\n numeroA = Integer.parseInt(cuadricula[vecesMovimiento][fila].replaceAll(\" \", \"\"));\n numeroA += numeroA;\n cuadricula[vecesMovimiento + 1][fila] = Integer.toString(numeroA);\n /* desde la parte de espacios = 4 - cuadricula[vecesMovimiento-1]... hasta el for solo es el numero de espacios agregados al numero que dara\n para que se mantenga posicionado junto con la cuadricula\n */\n espacios = 4 - cuadricula[vecesMovimiento + 1][fila].length();\n for (int barras = espacios; barras > 0; barras--) {\n cuadricula[vecesMovimiento + 1][fila] += \" \";\n }\n cuadricula[vecesMovimiento][fila] = \" \";\n } //Condicion que indica si hay un espacio vacio en una posicion abajo la sustituye la de arriba\n else if (cuadricula[vecesMovimiento + 1][fila].equals(\" \")) {\n cuadricula[vecesMovimiento + 1][fila] = cuadricula[vecesMovimiento][fila];\n cuadricula[vecesMovimiento][fila] = \" \";\n }\n }\n }\n break;\n\n case 'a':\n /*Creamos una condicion que empezara a mover los numeros si la posicion en esa parte\n de la matriz no esta vacia,tomando en cuenta que inicia a contar de izquierda a derecha, cuando la encuentra mueve\n desde esa posicion hacia la izquierda del cuadro y si se encuentra alguna parte igual la suma , si esta vacia la remplaza y si no se queda igual\n */\n if (cuadricula[fila][columna].equals(\" \") == false) {\n //Empezamos el ciclo en una posicion de la izquierda de la matriz, es decir inicializada en 0\n for (int vecesMovimiento = columna; vecesMovimiento > 0; vecesMovimiento--) {\n /* Como los numeros son iguales se toma uno, se convierte el string de esa parte de la cuadricula a\n numeroA la duplica y se la agrega a la posicion de izquierda\n */\n if (cuadricula[fila][vecesMovimiento].equals(cuadricula[fila][vecesMovimiento - 1])) {\n numeroA = Integer.parseInt(cuadricula[fila][vecesMovimiento].replaceAll(\" \", \"\"));\n numeroA += numeroA;\n cuadricula[fila][vecesMovimiento - 1] = Integer.toString(numeroA);\n espacios = 4 - cuadricula[fila][vecesMovimiento - 1].length();\n for (int barras = espacios; barras > 0; barras--) {\n cuadricula[fila][vecesMovimiento - 1] += \" \";\n }\n cuadricula[fila][vecesMovimiento] = \" \";\n } //Condicion que indica si hay un espacio vacio en una posicion izquierda la sustituye la de derecha\n else if (cuadricula[fila][vecesMovimiento - 1].equals(\" \")) {\n cuadricula[fila][vecesMovimiento - 1] = cuadricula[fila][vecesMovimiento];\n cuadricula[fila][vecesMovimiento] = \" \";\n }\n }\n }\n break;\n\n //Lo mismo establecido pero orientado a la derecha, y en lugar del -1 de los vectores lo pasamos como +1 siguiendo la estructura\n //de la opcion 's'\n case 'd':\n if (cuadricula[fila][3 - columna].equals(\" \") == false) {\n for (int vecesMovimiento = 3 - columna; vecesMovimiento < 3; vecesMovimiento++) {\n if (cuadricula[fila][vecesMovimiento].equals(cuadricula[fila][vecesMovimiento + 1])) {\n numeroA = Integer.parseInt(cuadricula[fila][vecesMovimiento].replaceAll(\" \", \"\"));\n numeroA += numeroA;\n cuadricula[fila][vecesMovimiento + 1] = Integer.toString(numeroA);\n espacios = 4 - cuadricula[fila][vecesMovimiento + 1].length();\n for (int barras = espacios; barras > 0; barras--) {\n cuadricula[fila][vecesMovimiento + 1] += \" \";\n }\n cuadricula[fila][vecesMovimiento] = \" \";\n } else if (cuadricula[fila][vecesMovimiento + 1].equals(\" \")) {\n cuadricula[fila][vecesMovimiento + 1] = cuadricula[fila][vecesMovimiento];\n cuadricula[fila][vecesMovimiento] = \" \";\n }\n }\n }\n break;\n\n }\n\n }\n }\n return cuadricula;\n }", "public void skaityti() throws IOException {\n\n sudoku_skaiciai = new Langelis [9][9]; //duodam sudoku_skaiciai forma 9x9\n\n BufferedReader r = new BufferedReader( new InputStreamReader (System.in ) ); //skaitymas\n\n System.out.println(\"iveskite sudoku varianto failo varda [ Enter - sudoku_var1.csv]\"); //israsas kad tinka failas su situ pavadinimu\n\n String sudoku_var1 = r.readLine(); //perskaito failo pavadinima\n\n if (sudoku_var1.length()==0) { //jei sudoku_var1 length lygus nuliui tai imam faila is direktorijos\n\n sudoku_var1= \"/Users/tadas/Desktop/mvnhello/sudoku/src/main/java/tado/sudoku_var1.csv\"; //vieta failo\n }\n\n File sudoku_failas = new File(sudoku_var1); //sukuriam failo tipo kintamaji\n\n BufferedReader br = new BufferedReader( new FileReader( sudoku_failas ) ); //isskiriama atmintis failo skaitymui\n\n String skaitom_po_viena_eilute; //eilute nuskaitytai eilutej saugoti\n\n int k = 0; //duodam k reiksme lygia 0\n\n System.out.println (\"╔═══════════╦═══════════╦═══════════╗\");\n\n while ((skaitom_po_viena_eilute = br.readLine()) !=null) { //ciklas skaito eilutes kol ju yra\n\n if ((k==3)||(k==6)) {\n \t\t\tSystem.out.print(\"╠═══════════╬═══════════╬═══════════╣\\n\");\n \t\t } if ( ( k==1 )||( k==2) ||( k==4 )||( k==5 )||( k==7 )||( k==8 ) ) {\n \t\t\tSystem.out.print(\"║ ─ ─ ─ ║ ─ ─ ─ ║ ─ ─ ─ ║\\n║\");\n \t\t } else {\n \t\t\tSystem.out.print(\"║\");\n \t\t }\n\n String[] duoti_skaiciai = skaitom_po_viena_eilute.split(\",\"); //paima is masyvo eilutes ir atskyrimo reiksmes lygios kableliui\n\n for (int i=0; i<duoti_skaiciai.length; i+=1) { //for ciklas kad i negali buti daugiau nei duoda skaiciu eiluteje i+=1 reiskia kad kieviena kart ima kita eilutes demeny??\n\n String bruksniukas = \" │\";\n\n if ((i==2)||(i==5)||(i==8)){\n \t\t\t\tbruksniukas=\" ║\";\n \t\t\t}\n System.out.print(\" \"+ duoti_skaiciai [i]+bruksniukas);\n sudoku_skaiciai [k][i] = new Langelis(Integer.parseInt(duoti_skaiciai[i])); //sudoku skaiciai [k] stuplepiai [i] eilutes. parseint atskiria visus skaicius nuo eilutes?\n\n } //uzdaro for\n System.out.println(\"\");\n k++; //sekantis stulpelis?\n }\n System.out.println (\"╚═══════════╩═══════════╩═══════════╝\");\n }", "public void excluirUltimaLinha() {\n valor = venda.BuscaultValor(ultimacod) - ultimoValor;\n int tempqte = venda.BuscaQte(ultimacod) + ultimaQte;\n SubMatRemove(ultimoValor, Double.parseDouble(jTxtSubTotal.getText()));\n AtulizaBanco(ultimacod, fun.getMatricula(), valor, tempqte);\n ((DefaultTableModel) jTable1.getModel()).removeRow(jTable1.getRowCount() - 1);\n }", "public void mostrarTablero(){\n\t\tIterator<String> itr = getIteradorMinas();\n\t\tString mina = null;\n\t\tint col;\n\t\tint fila;\n\t\tint conta=1;\n\t\tCasilla casilla;\n\t\tif (lMinas.size()>0){\n\t\t\twhile(itr.hasNext()){\n\t\t\t\tconta++;\n\t\t\t\tmina=itr.next(); \n\t\t\t\tcol=this.separarCoordenadasCol(this.separarCoordenadasString(mina));\n\t\t\t\tfila=this.separarCoordenadasFil(this.separarCoordenadasString(mina));\n\t\t\t\tcasilla=buscarCasilla(fila, col);\n\t\t\t\tif(!casilla.estaDesvelada()&&!casilla.tieneBandera()){\n\t\t\t\t\tcasilla.descubrir();\n\t\t\t\t\tsetChanged();\n\t\t\t\t\tnotifyObservers(fila+\",\"+col+\",\"+10);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcomprobarBanderas();\n\t\t\n\t}", "public static void obtenerInfoColisionJugador(Jugador jugador, Objeto col,String[] direccion, ArrayList<Objeto> obj_colision) {\n Rectangle[] lados_ente = jugador.objeto_ente.getRectangle();\n Rectangle[] lados_col = col.getRectangle();\n\n \n if (col.getTag().compareToIgnoreCase(Objeto.Tag.COMIDA) == 0 || col.getTag().compareToIgnoreCase(Objeto.Tag.MONEDA) == 0) {\n //System.out.println(\"COMIDA\");\n for(int i=0;i<4;i++)\n if (lados_ente[i].intersects(lados_col[0])) {\n obj_colision.add(col);\n return;\n }\n }\n\n \n \n if (col.getTag().compareToIgnoreCase(Objeto.Tag.ENEMIGO) == 0) {\n\n //System.out.println(lados_ente[0].x + \" con \" + lados_col[0].x + \" tag: \" + col.getId());\n if (lados_ente[0].intersects(lados_col[2])) {\n //\"arriba\";\n obj_colision.add(col);\n direccion[0] = \"enemigo_arriba\";\n }\n //else\n // System.out.println(lados_ente[0].y + \" con \" + lados_col[2].y + \" tag: \" + col.getId());\n if (lados_ente[1].intersects(lados_col[3])) {\n //\"derecha\";\n obj_colision.add(col);\n direccion[1] = \"enemigo_derecha\";\n\n }\n if (lados_ente[2].intersects(lados_col[0])) {\n //\"abajo\";\n obj_colision.add(col);\n direccion[2] = \"enemigo_abajo\";\n }\n if (lados_ente[3].intersects(lados_col[1])) {\n //\"izquierda\";\n obj_colision.add(col);\n direccion[3] = \"enemigo_izquierda\";\n }\n\n }\n \n if (col.getTag().compareToIgnoreCase(Objeto.Tag.NPC) == 0) {\n\n //System.out.println(lados_ente[0].x + \" con \" + lados_col[0].x + \" tag: \" + col.getId());\n if (lados_ente[0].intersects(lados_col[0])) {\n //\"arriba\";\n obj_colision.add(col);\n direccion[0] = \"npc_arriba\";\n }\n //else\n // System.out.println(lados_ente[0].y + \" con \" + lados_col[2].y + \" tag: \" + col.getId());\n if (lados_ente[1].intersects(lados_col[0])) {\n //\"derecha\";\n obj_colision.add(col);\n direccion[1] = \"npc_derecha\";\n\n }\n if (lados_ente[2].intersects(lados_col[0])) {\n //\"abajo\";\n obj_colision.add(col);\n direccion[2] = \"npc_abajo\";\n }\n if (lados_ente[3].intersects(lados_col[0])) {\n //\"izquierda\";\n obj_colision.add(col);\n direccion[3] = \"npc_izquierda\";\n }\n\n }\n\n if (lados_ente[0].intersects(lados_col[0])) {\n //\"arriba\";\n obj_colision.add(col);\n direccion[0] = \"entorno_arriba\";\n }\n if (lados_ente[1].intersects(lados_col[0])) {\n //\"derecha\";\n obj_colision.add(col);\n direccion[1] = \"entorno_derecha\";\n }\n if (lados_ente[2].intersects(lados_col[0])) {\n //\"abajo\";\n obj_colision.add(col);\n direccion[2] = \"entorno_abajo\";\n }\n if (lados_ente[3].intersects(lados_col[0])) {\n //\"izquierda\";\n obj_colision.add(col);\n direccion[3] = \"entorno_izquierda\";\n }\n }" ]
[ "0.58696765", "0.58199805", "0.574419", "0.55430686", "0.547688", "0.547688", "0.5328759", "0.53121096", "0.5247372", "0.5234276", "0.52338755", "0.52290416", "0.5217269", "0.5193495", "0.51918745", "0.51897997", "0.51408154", "0.5112903", "0.50937957", "0.5074847", "0.50714433", "0.50117886", "0.49999285", "0.49281827", "0.4927918", "0.49235857", "0.4922429", "0.49157986", "0.49024498", "0.48903018", "0.48518106", "0.48518106", "0.48500088", "0.48482323", "0.48281386", "0.48278713", "0.48233137", "0.48162475", "0.48071638", "0.48070306", "0.48005748", "0.4796131", "0.4786763", "0.47820938", "0.47676706", "0.47599265", "0.47562465", "0.4740682", "0.46896875", "0.46843785", "0.46837518", "0.46714658", "0.46654183", "0.4660657", "0.46577933", "0.46574482", "0.46544024", "0.46538693", "0.46538693", "0.4652072", "0.46460244", "0.4644114", "0.46432468", "0.4638761", "0.46339428", "0.46245962", "0.46170384", "0.46111444", "0.46087494", "0.46071377", "0.45911118", "0.45899618", "0.45888945", "0.458739", "0.45869786", "0.45851403", "0.45845696", "0.45818275", "0.45764187", "0.45752645", "0.4571616", "0.45704836", "0.45686275", "0.4566987", "0.4562625", "0.4558476", "0.45584574", "0.45578972", "0.4554472", "0.4554232", "0.4546033", "0.45440653", "0.4540622", "0.45379502", "0.4531898", "0.4531281", "0.45287827", "0.4528279", "0.45244437", "0.45233968" ]
0.5403616
6
This method creates a new application form via a POST request
@PostMapping("/api/internships/{internship_id}/application_form") public ApplicationFormDto postApplication(@RequestParam("job_id") String jobID, @RequestParam("job_description") String jobDescription, @RequestParam("company") String company, @RequestParam("employer") String employer, @RequestParam(value = "employer_email", required = false) String email, @RequestParam("location") String location, @RequestParam("start_date") Date startDate, @RequestParam("end_date") Date endDate, @RequestParam("work_permit") boolean workPermit, @PathVariable(value = "internship_id") int internshipId) { Internship i = internshipService.findByIdAndStudent(internshipId, authenticationService.getCurrentStudent()); if (i == null) throw new AccessDeniedException(""); if (i.getApplicationForm() != null) throw new IllegalArgumentException("Application form already exists."); ApplicationFormDto applicationFormDto = new ApplicationFormDto(jobID, jobDescription, company, employer, email, location, startDate, endDate, workPermit); ApplicationForm applicationForm = applicationFormService.create(applicationFormDto, i); return applicationFormService.toDto(applicationForm); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@PostMapping(\"/appointments\")\n @ResponseStatus(HttpStatus.CREATED)\n Appointment createAppointment(@Valid @RequestBody Appointment newApp) {\n\n Appointment appointment = modelMapper.map(newApp, Appointment.class);\n appointment = appointmentService.saveAppointment(appointment);\n\n return appointment;\n }", "@JsonPost\n @RequestMapping(mapping = \"/new-connection-application\", requestMethod = RequestMethod.POST)\n public void postCoLocationNewConnectionApplicationForm(@RequestParameter(isJsonBody = true, value = \"application\") String jsonString, LoginDTO loginDTO, HttpServletRequest request) throws Exception {\n\n JsonElement jelement = new JsonParser().parse(jsonString);\n\n JsonObject jsonObject = jelement.getAsJsonObject();\n\n CoLocationApplicationDTO coLocationApplicationDTO = new CoLocationApplicationDeserializer().deserialize_custom(jelement, loginDTO);\n coLocationApplicationDTO.setApplicationType(CoLocationConstants.NEW_CONNECTION);\n coLocationApplicationDTO.setState(CoLocationConstants.STATE.SUBMITTED.getValue());\n coLocationApplicationService.insertApplication(coLocationApplicationDTO, loginDTO);\n\n// return CoLocationConstants.CO_LOCATION_BASE_URL;\n }", "@Test\n public void getAppSubmissionFormTest() throws ApiException {\n String appId = null;\n String naked = null;\n // String response = api.getAppSubmissionForm(appId, naked);\n\n // TODO: test validations\n }", "FORM createFORM();", "@PostMapping(path=\"/addApplication\", consumes = \"application/json\", produces=\"application/json\")\n\t@ResponseStatus(value=HttpStatus.OK)\n\tpublic Application addApplication(@RequestBody Application app) {\n\t\treturn as.addApplication(app);\n\t}", "@RequestMapping(value = \"/rest/application\", method = RequestMethod.POST,\n produces = \"application/json\", consumes = \"application/json\")\n @Timed\n @Transactional\n public void create(@RequestBody ApplicationDTO appDto) {\n log.debug(\"REST request to save AppImageCfg : {}\", appDto);\n\n try {\n Application application = createApplication(appDto);\n\n // set owner\n String email = SecurityUtils.getCurrentLogin();\n User currentUser = userRepository.getOne(email);\n application.setOwner(currentUser);\n\n application = applicationRepository.saveAndFlush(application);\n log.debug(\"Saved the Application : \" + application.getAppName());\n\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n }\n }", "public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }", "@RequestMapping(value = \"/json/data/app/(*:appId)/version/(*:appVersion)/form/(*:formDefId)/submit\", method = RequestMethod.POST)\n public void postFormSubmit(final HttpServletRequest request, final HttpServletResponse response,\n @RequestParam(\"appId\") final String appId,\n @RequestParam(\"appVersion\") final String appVersion,\n @RequestParam(\"formDefId\") final String formDefId)\n throws IOException, JSONException {\n\n LogUtil.info(getClass().getName(), \"Executing JSON Rest API [\" + request.getRequestURI() + \"] in method [\" + request.getMethod() + \"] as [\" + WorkflowUtil.getCurrentUsername() + \"]\");\n\n try {\n // get version, version 0 indicates published version\n long version = Long.parseLong(appVersion) == 0 ? appDefinitionDao.getPublishedVersion(appId) : Long.parseLong(appVersion);\n\n // get current App\n AppDefinition appDefinition = appDefinitionDao.loadVersion(appId, version);\n if (appDefinition == null) {\n // check if app valid\n throw new ApiException(HttpServletResponse.SC_BAD_REQUEST, \"Invalid application [\" + appId + \"] version [\" + version + \"]\");\n }\n\n // set current app definition\n AppUtil.setCurrentAppDefinition(appDefinition);\n\n Form form = appService.viewDataForm(appDefinition.getAppId(), appDefinition.getVersion().toString(), formDefId, null, null, null, null, null, null);\n\n // read request body and convert request body to json\n final FormData formData = extractBodyToFormData(request, form);\n\n // submit form\n final FormData result = appService.submitForm(form, formData, false);\n\n // construct response\n final JSONObject jsonResponse = new JSONObject();\n if (result.getFormErrors() != null && !result.getFormErrors().isEmpty()) {\n // show error message\n result.getFormErrors().forEach((key, value) -> {\n try {\n jsonResponse.put(key, value);\n } catch (JSONException ignored) {\n }\n });\n } else {\n // set current data as response\n FormRowSet rowSet = appService.loadFormData(form, result.getPrimaryKeyValue());\n if(rowSet == null || rowSet.isEmpty()) {\n response.setStatus(HttpServletResponse.SC_NO_CONTENT);\n } else {\n response.setStatus(HttpServletResponse.SC_OK);\n JSONObject jsonData = new JSONObject(rowSet.get(0));\n jsonResponse.put(\"data\", jsonData);\n jsonResponse.put(\"message\", MESSAGE_SUCCESS);\n jsonResponse.put(\"digest\", getDigest(jsonData));\n }\n }\n\n response.getWriter().write(jsonResponse.toString());\n } catch (ApiException e) {\n response.sendError(e.getErrorCode(), e.getMessage());\n LogUtil.warn(getClass().getName(), e.getMessage());\n }\n }", "@RequestMapping(value = \"/trainer\", method = RequestMethod.POST)\n ResponseEntity<?> createApplicationOnTrainer(\n @RequestBody @Valid TrainerApplicationDto applicationDto);", "static public ApplicationFormItem createNew(int id, String shortname, boolean required, ApplicationFormItemType type,\n\t\t\t\t\t\t\t\t\t\t\t\tString federationAttribute, String perunSourceAttribute, String perunDestinationAttribute, String regex,\n\t\t\t\t\t\t\t\t\t\t\t\tList<Application.ApplicationType> applicationTypes, Integer ordnum, boolean forDelete)\t{\n\t\tApplicationFormItem afi = new JSONObject().getJavaScriptObject().cast();\n\t\tafi.setId(id);\n\t\tafi.setShortname(shortname);\n\t\tafi.setRequired(required);\n\t\tafi.setType(type);\n\t\tafi.setFederationAttribute(federationAttribute);\n\t\tafi.setPerunSourceAttribute(perunSourceAttribute);\n\t\tafi.setPerunDestinationAttribute(perunDestinationAttribute);\n\t\tafi.setRegex(regex);\n\t\tafi.setApplicationTypes(applicationTypes);\n\t\tafi.setOrdnum(ordnum);\n\t\tafi.setForDelete(forDelete);\n\t\treturn afi;}", "@POST\n @Path(RMWSConsts.APPS)\n @Produces({ MediaType.APPLICATION_JSON + \"; \" + JettyUtils.UTF_8,\n MediaType.APPLICATION_XML + \"; \" + JettyUtils.UTF_8 })\n @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })\n @Override\n public Response submitApplication(ApplicationSubmissionContextInfo newApp,\n @Context HttpServletRequest hsr)\n throws AuthorizationException, IOException, InterruptedException {\n if (!enableRestAppSubmissions) {\n String msg = \"App submission via REST is disabled.\";\n return Response.status(Status.FORBIDDEN).entity(msg).build();\n }\n\n UserGroupInformation callerUGI = getCallerUserGroupInformation(hsr, true);\n initForWritableEndpoints(callerUGI, false);\n\n ApplicationSubmissionContext appContext =\n RMWebAppUtil.createAppSubmissionContext(newApp, conf);\n\n final SubmitApplicationRequest req =\n SubmitApplicationRequest.newInstance(appContext);\n\n try {\n callerUGI\n .doAs(new PrivilegedExceptionAction<SubmitApplicationResponse>() {\n @Override\n public SubmitApplicationResponse run()\n throws IOException, YarnException {\n return rm.getClientRMService().submitApplication(req);\n }\n });\n } catch (UndeclaredThrowableException ue) {\n if (ue.getCause() instanceof YarnException) {\n throw new BadRequestException(ue.getCause().getMessage());\n }\n LOG.info(\"Submit app request failed\", ue);\n throw ue;\n }\n\n String url = hsr.getRequestURL() + \"/\" + newApp.getApplicationId();\n return Response.status(Status.ACCEPTED).header(HttpHeaders.LOCATION, url)\n .build();\n }", "@RequestMapping(value = \"/add\",method = RequestMethod.GET)\n \tpublic String addPackageForm (@RequestParam(value=\"id\", required=true) Integer programId, Model model) {\n \t\tlogger.info (\"Generated new package form.\");\n\n \t\tmodel.addAttribute (\"pack\", new Package());\n \t\tmodel.addAttribute(\"programId\", programId);\n \t\t\n \t\treturn \"packageAddNew\";\n \t}", "@POST \n\t\t@Path(\"NewGrant\") \n\t\t@Consumes(MediaType.APPLICATION_FORM_URLENCODED) \n\t\t@Produces(MediaType.TEXT_PLAIN)\n\t\tpublic String insertFund( @FormParam(\"id\") String id,\n\t\t\t\t @FormParam(\"title\") String title,\n\t\t\t\t\t\t\t\t@FormParam(\"full_name\") String full_name,\n\t\t\t\t\t\t\t\t@FormParam(\"email\") String email,\n\t\t\t\t\t\t\t\t@FormParam(\"phone\") String phone,\n\t\t\t\t\t\t\t\t@FormParam(\"research_category\") String research_category,\n\t\t\t\t\t\t\t\t@FormParam(\"budget\") String budget,\n\t\t\t\t\t\t\t\t@FormParam(\"introduction\") String introduction)\n\t\n\t\t{\n\t\t \t{\n\t\t \t\tString output = Obj.insertGrantApplication(id,title,full_name,email,phone,research_category,budget,introduction); \n\t\t \t\treturn output;\n\t\t\t}\n\t\t}", "@POST\n\t@Path(\"/appform\")\n\t@Consumes(MediaType.MULTIPART_FORM_DATA)\n\tpublic Response appformOnboard(@FormDataParam(\"file_war\") InputStream uploadedInputStream,@FormDataParam(\"file_war\") FormDataContentDisposition fileDetail,@FormDataParam(\"file_schema\") InputStream uploadedInputStreamsql,@FormDataParam(\"file_schema\") FormDataContentDisposition fileDetailsql,@FormDataParam(\"app_name\") String appName) throws ClassNotFoundException, SQLException, IOException{\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t// Connect to a database\n\t\tConnection con= DriverManager.getConnection(\"jdbc:mysql://localhost/ecs\",\"root\",\"\");\n\t\tStatement stmt=con.createStatement();\n\n\t\tString query = \"INSERT INTO app_master (app_name) VALUES ('\"+appName+\"');\";\n\t\tstmt.executeUpdate(query);\n\n\t\tResultSet rs = stmt.executeQuery(\"SELECT app_id FROM app_master WHERE app_name='\"+appName+\"';\") ;\n\t\trs.next();\n\t\tint id = rs.getInt(\"app_id\");\n\t\tquery = \"UPDATE app_master SET app_url = 'http://localhost:8080/\"+id+\"_\"+appName+\"' WHERE app_id = \"+id;\n\t\tstmt.executeUpdate(query);\n\t\t//String sql_location = \"C:\\\\apache-tomee-plume-7.0.3\\\\sql_file\\\\\"+id+\"_\"+appName+\".sql\";\n\t\tString sql_location = \"C:\\\\Program Files\\\\Apache Software Foundation\\\\Tomcat 8.0\\\\sql_file\\\\\"+id+\"_\"+appName+\".sql\";\n\t\t//String war_location = \"C:\\\\apache-tomee-plume-7.0.3\\\\webapps\\\\\"+id+\"_\"+appName+\".war\";\n\t\tString war_location = \"C:\\\\Program Files\\\\Apache Software Foundation\\\\Tomcat 8.0\\\\war_file\\\\\"+id+\"_\"+appName+\".war\";\n\t\t\n\t\t//saving WAR file \n\t\ttry { \n\t\t\tFileOutputStream out_war = new FileOutputStream(new File(war_location)); \n\t\t\tint read = 0; \n\t\t\twhile ((read = uploadedInputStream.read())!=-1) { \n\t\t\t\tout_war.write(read); \n\t\t\t} \n\t\t\tout_war.flush(); \n\t\t\tout_war.close(); \n\t\t} catch (IOException e) {e.printStackTrace();}\n\n\t\t\n\t\t//saving SQL file \n\t\ttry { \n\t\t\tFileOutputStream out_sql = new FileOutputStream(new File(sql_location)); \n\t\t\tint read = 0; \n\t\t\twhile ((read = uploadedInputStreamsql.read())!=-1) { \n\t\t\t\tout_sql.write(read); \n\t\t\t} \n\t\t\tout_sql.flush(); \n\t\t\tout_sql.close(); \n\t\t} catch (IOException e) {e.printStackTrace();}\n\n\n\t\tstmt.executeUpdate(\"UPDATE app_master SET app_status='ACTIVE' WHERE app_id='\"+id+\"';\");\n\n\t\tString s=\"Application onboarded\";\n\t\treturn Response.status(200).entity(s).build();\n\n\t}", "private NewApplication createNewApplication() {\n GetNewApplicationRequest req =\n recordFactory.newRecordInstance(GetNewApplicationRequest.class);\n GetNewApplicationResponse resp;\n try {\n resp = rm.getClientRMService().getNewApplication(req);\n } catch (YarnException e) {\n String msg = \"Unable to create new app from RM web service\";\n LOG.error(msg, e);\n throw new YarnRuntimeException(msg, e);\n }\n NewApplication appId =\n new NewApplication(resp.getApplicationId().toString(),\n new ResourceInfo(resp.getMaximumResourceCapability()));\n return appId;\n }", "@PostMapping( value = \"/new\", params = \"auto\" )\n public String createEventFormAutoPopulate( @ModelAttribute CreateEventForm createEventForm )\n {\n // provide default values to make user submission easier\n createEventForm.setSummary( \"A new event....\" );\n createEventForm.setDescription( \"This was autopopulated to save time creating a valid event.\" );\n createEventForm.setWhen( new Date() );\n\n // make the attendee not the current user\n CalendarUser currentUser = userContext.getCurrentUser();\n int attendeeId = currentUser.getId() == 0 ? 1 : 0;\n CalendarUser attendee = calendarService.getUser( attendeeId );\n createEventForm.setAttendeeEmail( attendee.getEmail() );\n\n return \"events/create\";\n }", "public static Result postAddPaper() {\n Form<PaperFormData> formData = Form.form(PaperFormData.class).bindFromRequest();\n Paper info1 = new Paper(formData.get().title, formData.get().authors, formData.get().pages,\n formData.get().channel);\n info1.save();\n return redirect(routes.PaperController.listProject());\n }", "public Result createRoom() {\n\n DynamicForm dynamicForm = Form.form().bindFromRequest();\n String roomType = dynamicForm.get(\"roomType\");\n Double price = Double.parseDouble(dynamicForm.get(\"price\"));\n int bedCount = Integer.parseInt(dynamicForm.get(\"beds\"));\n String wifi = dynamicForm.get(\"wifi\");\n String smoking = dynamicForm.get(\"smoking\");\n\n RoomType roomTypeObj = new RoomType(roomType, price, bedCount, wifi, smoking);\n\n if (dynamicForm.get(\"AddRoomType\") != null) {\n\n Ebean.save(roomTypeObj);\n String message = \"New Room type is created Successfully\";\n\n return ok(views.html.RoomTypeUpdateSuccess.render(message));\n } else{\n\n String message = \"Failed to create a new Room type\";\n\n return ok(views.html.RoomTypeUpdateSuccess.render(message));\n\n }\n\n\n\n }", "public RestResult constructFormRequest(String confAlias, Page page, ExecutionMode mode)\n throws IOException {\n log.info(\"Constructing a form request...\");\n\n InvokeWebServiceAction serviceAction = new InvokeWebServiceAction(args.getFirstString(\n PARAM_NAME_API_NAME));\n serviceAction.setFormId(page.getFormId());\n\n serviceAction.addServiceParameter(PARAM_NAME_CONF_ALIAS, confAlias);\n serviceAction.addServiceParameter(PARAM_NAME_CONTAINER_WIZARD, wizard.serialize());\n\n if (shouldSetNextPageIdx) {\n log.info(\"Setting next page index to \" + nextPageIdx);\n\n if (wizard.isInAddXmlMoMode()) {\n // Needed to make this work when using a form request\n nextPageIdx = wizard.getAddXmlMoContext().getXmlMoConfIdx();\n }\n serviceAction.addServiceParameter(PARAM_NAME_NEXT_PAGE_IDX, String.valueOf(nextPageIdx));\n }\n if (shouldSetNextSubPageIdx) {\n log.info(\"Setting next sub page index form parameter to \" + getNextSubPageIdx());\n serviceAction.addFormParameter(PARAM_NAME_NEXT_SUB_PAGE_IDX, String.valueOf(\n getNextSubPageIdx()));\n }\n\n // copied from constructActionRequest ...\n serviceAction.addProperty(PARAM_NAME_API_NAME, args.getFirstString(PARAM_NAME_API_NAME));\n serviceAction.addProperty(PARAM_NAME_OPERATION_NAME, wizard.getOperationName());\n\n if (page.isSubPages()) {\n Integer nextSubPageOffset = getIntValue(args.getFirst(PARAM_NAME_SECTION_TYPE_IDX), 0);\n Integer nextSubPageIdx = wizard.isInAddXmlMoMode() ? wizard.getAddXmlMoContext()\n .getXmlMoConfIdx() : getNextSubPageIdx() + nextSubPageOffset;\n log.info(\"Setting next sub page index service parameter to \" + nextSubPageIdx\n + \" (offset was \" + nextSubPageOffset + \")\");\n // Needed to make this work when using a form request\n serviceAction.addServiceParameter(PARAM_NAME_NEXT_SUB_PAGE_IDX, Integer.toString(\n nextSubPageIdx));\n // set a specific width\n JQueryDialogOptions dialogOptions = new JQueryDialogOptions();\n dialogOptions.setWidth(400);\n serviceAction.setDialogOptions(dialogOptions);\n }\n\n // end copy\n\n serviceAction.addServiceParameter(PARAM_NAME_EXECUTION_MODE, mode.name());\n\n // Make the web service string params also available to the form.\n for (CallArgument arg : serviceAction.getServiceParameters().values()) {\n if (StringUtils.isNotBlank(arg.getValue())) {\n serviceAction.addFormParameter(arg.getName(), arg.getValue());\n }\n }\n\n RestResult restResult = new RestResult();\n restResult.addAction(serviceAction);\n return restResult;\n }", "@Override\n @SuppressWarnings(\"checkstyle:linelength\")\n public Application create(final TwilioRestClient client) {\n this.pathAccountSid = this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid;\n Request request = new Request(\n HttpMethod.POST,\n Domains.API.toString(),\n \"/2010-04-01/Accounts/\" + this.pathAccountSid + \"/Applications.json\"\n );\n\n addPostParams(request);\n Response response = client.request(request);\n\n if (response == null) {\n throw new ApiConnectionException(\"Application creation failed: Unable to connect to server\");\n } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {\n RestException restException = RestException.fromJson(response.getStream(), client.getObjectMapper());\n if (restException == null) {\n throw new ApiException(\"Server Error, no content\");\n }\n throw new ApiException(restException);\n }\n\n return Application.fromJson(response.getStream(), client.getObjectMapper());\n }", "public CreateOrUpdateAppRequest(App app, String phoneGapVersion) {\n\t\tthis.title = app.getTitle();\n\t\tthis.packageName = app.getPackage();\n\t\tthis.version = app.getVersion();\n\t\tthis.description = app.getDescription();\n\t\tthis.debug = app.isDebug();\n\t\tthis.privateApp = app.isPrivate();\n\t\tthis.phoneGapVersion = phoneGapVersion;\n\t\tthis.createMethod = \"file\";\n\t}", "public App create(App obj) {\n \n JsonNode node = getClient().post(Routes.APP_CREATE, toJsonNode(obj));\n App rapp = getMapper().convertValue(node, App.class);\n \n if (!node.has(\"id\")) {\n throw new ClientException(\"Missing ID on object creation\");\n }\n \n obj.merge(rapp);\n obj.setId(rapp.getId());\n\n return obj;\n }", "public static Result startNewForm() {\r\n\t\tString formName = ChangeOrderForm.NAME;\r\n\t\tDecision firstDecision = CMSGuidedFormFill.startNewForm(formName,\r\n\t\t\t\tCMSSession.getEmployeeName(), CMSSession.getEmployeeId());\r\n\t\treturn ok(backdrop.render(firstDecision));\r\n\t}", "@Test\n public void addAppTest() throws ApiException {\n Boolean naked = null;\n Application body = null;\n // Application response = api.addApp(naked, body);\n\n // TODO: test validations\n }", "public Result addNewRoomType() {\n\n DynamicForm dynamicform = Form.form().bindFromRequest();\n if (dynamicform.get(\"AdminAddRoom\") != null) {\n\n return ok(views.html.AddRoomType.render());\n }\n\n\n return ok(\"Something went wrong\");\n }", "@Override\n public CreateApplicationResult createApplication(CreateApplicationRequest request) {\n request = beforeClientExecution(request);\n return executeCreateApplication(request);\n }", "@Override\n public ExtensionResult getForms(ExtensionRequest extensionRequest) {\n Map<String, String> output = new HashMap<>();\n FormBuilder formBuilder = new FormBuilder(appProperties.getFormIdTest());\n\n ButtonTemplate button = new ButtonTemplate();\n button.setTitle(\"Test Form\");\n button.setSubTitle(\"Subtitle is here\");\n button.setPictureLink(appProperties.getAtmUrl());\n button.setPicturePath(appProperties.getAtmUrl());\n List<EasyMap> actions = new ArrayList<>();\n EasyMap bookAction = new EasyMap();\n bookAction.setName(\"Label here\");\n bookAction.setValue(formBuilder.build());\n actions.add(bookAction);\n button.setButtonValues(actions);\n ButtonBuilder buttonBuilder = new ButtonBuilder(button);\n\n output.put(OUTPUT, buttonBuilder.build());\n ExtensionResult extensionResult = new ExtensionResult();\n extensionResult.setAgent(false);\n extensionResult.setRepeat(false);\n extensionResult.setSuccess(true);\n extensionResult.setNext(true);\n extensionResult.setValue(output);\n return extensionResult;\n }", "@RequestMapping(value = \"/json/data/app/(*:appId)/version/(*:appVersion)/form/(*:formDefId)/(*:primaryKey)\", method = RequestMethod.PUT)\n public void putFormData(final HttpServletRequest request, final HttpServletResponse response,\n @RequestParam(\"appId\") final String appId,\n @RequestParam(\"appVersion\") final String appVersion,\n @RequestParam(\"formDefId\") final String formDefId,\n @RequestParam(\"primaryKey\") final String primaryKey)\n throws IOException, JSONException {\n\n LogUtil.info(getClass().getName(), \"Executing JSON Rest API [\" + request.getRequestURI() + \"] in method [\" + request.getMethod() + \"] as [\" + WorkflowUtil.getCurrentUsername() + \"]\");\n\n try {\n // get version, version 0 indicates published version\n long version = Long.parseLong(appVersion) == 0 ? appDefinitionDao.getPublishedVersion(appId) : Long.parseLong(appVersion);\n\n // get current App\n AppDefinition appDefinition = appDefinitionDao.loadVersion(appId, version);\n if (appDefinition == null) {\n // check if app valid\n throw new ApiException(HttpServletResponse.SC_BAD_REQUEST, \"Invalid application [\" + appId + \"] version [\" + version + \"]\");\n }\n\n // set current app definition\n AppUtil.setCurrentAppDefinition(appDefinition);\n\n Form form = appService.viewDataForm(appDefinition.getAppId(), appDefinition.getVersion().toString(), formDefId, null, null, null, null, null, null);\n\n // read request body and convert request body to json\n final FormData formData = extractBodyToFormData(request, form);\n formData.setPrimaryKeyValue(primaryKey);\n\n // submit form\n final FormData result = appService.submitForm(form, formData, false);\n\n // construct response\n final JSONObject jsonResponse = new JSONObject();\n if (result.getFormErrors() != null && !result.getFormErrors().isEmpty()) {\n final JSONObject jsonError = new JSONObject();\n // show error message\n result.getFormErrors().forEach((key, value) -> {\n try {\n jsonError.put(key, value);\n } catch (JSONException ignored) { }\n });\n jsonResponse.put(\"message\", MESSAGE_VALIDATION_ERROR);\n jsonResponse.put(\"error\", jsonError);\n } else {\n // set current data as response\n FormRowSet rowSet = appService.loadFormData(form, result.getPrimaryKeyValue());\n if(rowSet == null || rowSet.isEmpty()) {\n response.setStatus(HttpServletResponse.SC_NO_CONTENT);\n } else {\n response.setStatus(HttpServletResponse.SC_OK);\n JSONObject jsonData = new JSONObject(rowSet.get(0));\n jsonResponse.put(\"data\", jsonData);\n jsonResponse.put(\"message\", MESSAGE_SUCCESS);\n jsonResponse.put(\"digest\", getDigest(jsonData));\n }\n }\n\n response.getWriter().write(jsonResponse.toString());\n\n } catch (ApiException e) {\n response.sendError(e.getErrorCode(), e.getMessage());\n LogUtil.warn(getClass().getName(), e.getMessage());\n }\n }", "@PostMapping(\"applicant\")\n public Applicant newApplicant(@RequestBody ApplicantDto applicantDto) {\n return applicantService.save(applicantDto);\n }", "public static AssessmentCreationForm openFillCreationForm(Assessment assm) {\n openCreationSearchForm(Roles.STAFF, WingsTopMenu.WingsStaffMenuItem.P_ASSESSMENTS, Popup.Create);\n\n Logger.getInstance().info(\"Fill out the required fields with valid data\");\n AssessmentCreationForm creationForm = new AssessmentCreationForm();\n creationForm.fillAssessmentInformation(new User(Roles.STAFF), assm);\n\n return new AssessmentCreationForm();\n }", "public Form(){\n\t\ttypeOfLicenseApp = new TypeOfLicencsApplication();\n\t\toccupationalTrainingList = new ArrayList<OccupationalTraining>();\n\t\taffiadavit = new Affidavit();\n\t\tapplicationForReciprocity = new ApplicationForReciprocity();\n\t\teducationBackground = new EducationBackground();\n\t\toccupationalLicenses = new OccupationalLicenses();\n\t\tofficeUseOnlyInfo = new OfficeUseOnlyInfo();\n\t}", "public Form getCreationForm() throws ProcessManagerException {\r\n try {\r\n Action creation = processModel.getCreateAction();\r\n return processModel.getPublicationForm(creation.getName(), currentRole,\r\n getLanguage());\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.ERR_NO_CREATION_FORM\", e);\r\n }\r\n }", "private void createForm(ArrayList<HashMap<String, String>> data) {\n\t\tLayoutInflater inflater = LayoutInflater.from(IPropertyRegistrationActivity.this);\n\t\tLinearLayout.LayoutParams params = new LinearLayout.LayoutParams(android.widget.LinearLayout.LayoutParams.MATCH_PARENT,\n\t\t\t\tandroid.widget.LinearLayout.LayoutParams.WRAP_CONTENT);\n\t\tparams.topMargin = 10;\n\n\t\tfields = data;\n\t\tLinearLayout layout = null;\n\t\tint len = fields.size();\n\t\tfor (int j = 0; j < len; j++) {\n\t\t\tfinal HashMap<String, String> field = fields.get(j);\n\t\t\tView fieldView = inflater.inflate(R.layout.iproperty_registration_dynamic_view_item, null);\n\n\t\t\tif (field.get(TYPE).equals(LABEL)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrLabel));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t} else if (field.get(TYPE).equals(PASSWORD)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEdit));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tif (field.get(NAME).contains(getString(R.string.phone)) || field.get(NAME).contains(getString(R.string.year))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_CLASS_NUMBER);\n\t\t\t\t} else if (field.get(NAME).contains(getString(R.string.website)) || field.get(NAME).contains(getString(R.string.email))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);\n\t\t\t\t}\n\t\t\t} else if (field.get(TYPE).equals(TEXT)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEdit));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tif (field.get(NAME).contains(getString(R.string.phone)) || field.get(NAME).contains(getString(R.string.year))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_CLASS_NUMBER);\n\t\t\t\t} else if (field.get(NAME).contains(getString(R.string.website)) || field.get(NAME).contains(getString(R.string.email))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);\n\t\t\t\t}\n\t\t\t} else if (field.get(TYPE).equals(TEXTAREA)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditArea));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\n\t\t\t\tif (field.get(VALUE).toString().trim().length() > 0) {\n\t\t\t\t\tedit.setText(field.get(VALUE));\n\t\t\t\t} else {\n\t\t\t\t}\n\n\t\t\t} else if (field.get(TYPE).equals(MAP)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tfinal ImageView imgMap;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditMap));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\timgMap = ((ImageView) layout.findViewById(R.id.imgMap));\n\t\t\t\tif (field.get(NAME).equalsIgnoreCase(getString(R.string.state))) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tedit.setText(address.getAdminArea().replace(address.getCountryName() == null ? \"\" : address.getCountryName(), \"\")\n\t\t\t\t\t\t\t\t.replace(address.getPostalCode() == null ? \"\" : address.getPostalCode(), \"\"));\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\tedit.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t} else if (field.get(NAME).equalsIgnoreCase(getString(R.string.city_town))) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tedit.setText(address.getSubAdminArea());\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\tedit.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\timgMap.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\teditMap = edit;\n\t\t\t\t\t\tIntent intent = new Intent(IPropertyRegistrationActivity.this, IjoomerMapAddress.class);\n\t\t\t\t\t\tstartActivityForResult(intent, GET_ADDRESS_FROM_MAP);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(SELECT)) {\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrSpin));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tfinal Spinner spn;\n\t\t\t\tspn = ((Spinner) layout.findViewById(R.id.txtValue));\n\t\t\t\tspn.setAdapter(IjoomerUtilities.getSpinnerAdapter(field));\n\t\t\t\tif (field.get(NAME).equalsIgnoreCase(getString(R.string.country))) {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tString country = address.getCountryName();\n\t\t\t\t\t\tint selectedIndex = 0;\n\t\t\t\t\t\tJSONArray jsonArray = null;\n\n\t\t\t\t\t\tjsonArray = new JSONArray(field.get(OPTIONS));\n\t\t\t\t\t\tint optionSize = jsonArray.length();\n\t\t\t\t\t\tfor (int k = 0; k < optionSize; k++) {\n\t\t\t\t\t\t\tJSONObject options = (JSONObject) jsonArray.get(k);\n\n\t\t\t\t\t\t\tif (options.getString(VALUE).equalsIgnoreCase(country)) {\n\t\t\t\t\t\t\t\tselectedIndex = k;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tspn.setSelection(selectedIndex);\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tspn.setSelection(0);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else if (field.get(TYPE).equals(DATE)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getDateDialog(((IjoomerEditText) v).getText().toString(), true, new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setError(null);\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\n\t\t\t} else if (field.get(TYPE).equals(TIME)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getTimeDialog(((IjoomerEditText) v).getText().toString(), new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setError(null);\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\n\t\t\t} else if (field.get(TYPE).equals(MULTIPLESELECT)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getMultiSelectionDialog(field.get(NAME), field.get(OPTIONS), ((IjoomerEditText) v).getText().toString(), new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\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}\n\n\t\t\tif (field.get(REQUIRED).equalsIgnoreCase(\"1\")) {\n\t\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME) + \" *\");\n\t\t\t} else {\n\t\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME));\n\t\t\t}\n\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEdit)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEditArea)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrSpin)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrLabel)).setVisibility(View.GONE);\n\n\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrReadOnly));\n\t\t\tlayout.setVisibility(View.VISIBLE);\n\n\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME));\n\t\t\t((IjoomerEditText) layout.findViewById(R.id.txtValue)).setText(field.get(VALUE));\n\t\t\tfieldView.setTag(field);\n\t\t\tlnr_form.addView(fieldView, params);\n\t\t}\n\t}", "public void createNewMortgageApplication(MortgageApplication application) throws SQLException {\r\n\t\tapplicationDao.insertNewMortgageApplication(application);\r\n\r\n\t}", "@RequestMapping(value={\"/projects/add\"}, method= RequestMethod.GET)\r\n\tpublic String createProjectForm(Model model) {\r\n\t\tUser loggedUser= sessionData.getLoggedUser();\r\n\t\tmodel.addAttribute(\"loggedUser\", loggedUser);\r\n\t\tmodel.addAttribute(\"projectForm\", new Project());\r\n\t\treturn \"addProject\";\r\n\t}", "public Element addForm(int screenId, int itemCount, FormProportion proportion, String title, String url) {\r\n\t\tElement form = mDocument.createElement(\"IppForm\");\r\n\t\tform.setAttribute(\"ItemCount\", String.valueOf(itemCount));\r\n\t\tform.setAttribute(\"Proportion\", proportion.getValue());\r\n\t\tmScreens.get(screenId).appendChild(form);\r\n\r\n\t\taddTextNode(form, \"Title\", title);\r\n\r\n\t\taddTextNode(form, \"Url\", url);\r\n\r\n\t\treturn form;\r\n\t}", "public ExtraApplyVo register_form2(int app_no) {\n ExtraApplyVo extraApplyVo = registerDao.register_form2(app_no);\n// extraApplyVo.setWayArray(wayArray);\n return extraApplyVo;\n }", "@PostMapping(\"/at-job-applications\")\n @Timed\n public ResponseEntity<AtJobApplicationsDTO> createAtJobApplications(@Valid @RequestBody AtJobApplicationsDTO atJobApplicationsDTO) throws URISyntaxException {\n log.debug(\"REST request to save AtJobApplications : {}\", atJobApplicationsDTO);\n if (atJobApplicationsDTO.getId() != null) {\n throw new BadRequestAlertException(\"A new atJobApplications cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n AtJobApplications atJobApplications = atJobApplicationsMapper.toEntity(atJobApplicationsDTO);\n atJobApplications = atJobApplicationsRepository.save(atJobApplications);\n AtJobApplicationsDTO result = atJobApplicationsMapper.toDto(atJobApplications);\n return ResponseEntity.created(new URI(\"/api/at-job-applications/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "java.util.concurrent.Future<CreateApplicationResult> createApplicationAsync(CreateApplicationRequest createApplicationRequest);", "@Override\n public OAuthApplicationInfo createApplication(OAuthAppRequest oauthAppRequest) throws APIManagementException {\n OAuthApplicationInfo oAuthApplicationInfo = oauthAppRequest.getOAuthApplicationInfo();\n\n // Subscriber's name should be passed as a parameter, since it's under the subscriber the OAuth App is created.\n String userId = (String) oAuthApplicationInfo.getParameter(ApplicationConstants.\n OAUTH_CLIENT_USERNAME);\n String applicationName = oAuthApplicationInfo.getClientName();\n String keyType = (String) oAuthApplicationInfo.getParameter(ApplicationConstants.APP_KEY_TYPE);\n String callBackURL = (String) oAuthApplicationInfo.getParameter(ApplicationConstants.APP_CALLBACK_URL);\n if (keyType != null) {\n applicationName = applicationName + '_' + keyType;\n }\n\n if (log.isDebugEnabled()) {\n log.debug(\"Trying to create OAuth application :\" + applicationName);\n }\n\n String tokenScope = (String) oAuthApplicationInfo.getParameter(\"tokenScope\");\n String[] tokenScopes = new String[1];\n tokenScopes[0] = tokenScope;\n\n org.wso2.carbon.apimgt.api.model.xsd.OAuthApplicationInfo info = null;\n\n try {\n org.wso2.carbon.apimgt.api.model.xsd.OAuthApplicationInfo applicationToCreate =\n new org.wso2.carbon.apimgt.api.model.xsd.OAuthApplicationInfo();\n applicationToCreate.setIsSaasApplication(oAuthApplicationInfo.getIsSaasApplication());\n applicationToCreate.setCallBackURL(callBackURL);\n applicationToCreate.setClientName(applicationName);\n applicationToCreate.setAppOwner(userId);\n applicationToCreate.setJsonString(oAuthApplicationInfo.getJsonString());\n applicationToCreate.setTokenType(oAuthApplicationInfo.getTokenType());\n info = createOAuthApplicationbyApplicationInfo(applicationToCreate);\n } catch (Exception e) {\n handleException(\"Can not create OAuth application : \" + applicationName, e);\n } \n\n if (info == null || info.getJsonString() == null) {\n handleException(\"OAuth app does not contains required data : \" + applicationName,\n new APIManagementException(\"OAuth app does not contains required data\"));\n }\n\n oAuthApplicationInfo.addParameter(\"tokenScope\", tokenScopes);\n oAuthApplicationInfo.setClientName(info.getClientName());\n oAuthApplicationInfo.setClientId(info.getClientId());\n oAuthApplicationInfo.setCallBackURL(info.getCallBackURL());\n oAuthApplicationInfo.setClientSecret(info.getClientSecret());\n oAuthApplicationInfo.setIsSaasApplication(info.getIsSaasApplication());\n\n try {\n JSONObject jsonObject = new JSONObject(info.getJsonString());\n\n if (jsonObject.has(ApplicationConstants.\n OAUTH_REDIRECT_URIS)) {\n oAuthApplicationInfo.addParameter(ApplicationConstants.\n OAUTH_REDIRECT_URIS, jsonObject.get(ApplicationConstants.OAUTH_REDIRECT_URIS));\n }\n\n if (jsonObject.has(ApplicationConstants.OAUTH_CLIENT_NAME)) {\n oAuthApplicationInfo.addParameter(ApplicationConstants.\n OAUTH_CLIENT_NAME, jsonObject.get(ApplicationConstants.OAUTH_CLIENT_NAME));\n }\n\n if (jsonObject.has(ApplicationConstants.OAUTH_CLIENT_GRANT)) {\n oAuthApplicationInfo.addParameter(ApplicationConstants.\n OAUTH_CLIENT_GRANT, jsonObject.get(ApplicationConstants.OAUTH_CLIENT_GRANT));\n }\n } catch (JSONException e) {\n handleException(\"Can not retrieve information of the created OAuth application\", e);\n }\n\n return oAuthApplicationInfo;\n\n }", "@RequestMapping(\"/newProjectAppMajorLabConstructApp\")\n\tpublic ModelAndView newProjectAppMajorLabConstructApp(@RequestParam Integer projectappmajor_id) {\n\t\tModelAndView mav = new ModelAndView();\n\t\tmav.addObject(\"projectappmajor_id\", projectappmajor_id);\n\t\tmav.addObject(\"labconstructapp\", new LabConstructApp());\n\t\tmav.addObject(\"newFlag\", true);\n\t\tmav.setViewName(\"projectappmajor/labconstructapp/editLabConstructApp.jsp\");\n\n\t\treturn mav;\n\t}", "@POST\n @Consumes(\"application/x-www-form-urlencoded\")\n @Produces(MediaType.APPLICATION_JSON)\n public AtsConfiguration createConfig(MultivaluedMap<String, String> form, @Context UriInfo uriInfo);", "public static void create(Formulario form){\n daoFormulario.create(form);\n }", "private void createInputBloodDonationForm( HttpServletRequest req, HttpServletResponse resp )\n throws ServletException, IOException {\n String path = req.getServletPath();\n req.setAttribute( \"path\", path );\n req.setAttribute( \"title\", path.substring( 1 ) );\n \n BloodDonationLogic logic = LogicFactory.getFor(\"BloodDonation\");\n req.setAttribute( \"bloodDonationColumnNames\", logic.getColumnNames().subList(1, logic.getColumnNames().size()));\n req.setAttribute( \"bloodDonationColumnCodes\", logic.getColumnCodes().subList(1, logic.getColumnCodes().size()));\n req.setAttribute(\"bloodGroupList\", Arrays.asList(BloodGroup.values()));\n req.setAttribute(\"rhdList\", Arrays.asList(RhesusFactor.values()));\n BloodBankLogic bloodBankLogic = LogicFactory.getFor(\"BloodBank\");\n List<String> bloodBankIDs = new ArrayList<>();\n bloodBankIDs.add(\"\");\n for (BloodBank bb : bloodBankLogic.getAll()) {\n bloodBankIDs.add(bb.getId().toString());\n }\n req.setAttribute( \"bloodBankIDs\", bloodBankIDs);\n req.setAttribute( \"request\", toStringMap( req.getParameterMap() ) );\n \n if (errorMessage != null && !errorMessage.isEmpty()) {\n req.setAttribute(\"errorMessage\", errorMessage);\n }\n //clear the error message if when reload the page\n errorMessage = \"\";\n \n req.getRequestDispatcher( \"/jsp/CreateRecord-BloodDonation.jsp\" ).forward( req, resp );\n }", "@GetMapping(\"/addPharmacist\")\n public String pharmacistForm(Model model) {\n model.addAttribute(\"pharmacist\", new Pharmacist());\n return \"addPharmacist\";\n }", "private void createProgram() {\n String name = createNameEt.getText().toString().trim();\n String description = createDescriptionEt.getText().toString().trim();\n int radioId = createTypeRGrp.getCheckedRadioButtonId();\n createTypeRBtn = findViewById(radioId);\n String type = createTypeRBtn.getText().toString();\n// String type = createTypeSp.getSelectedItem().toString().trim();\n String dateTime = createDateTimeEt.getText().toString().trim();\n String link = createLinkEt.getText().toString().trim();\n String filename = createFilenameTv.getText().toString().trim();\n\n if(name.isEmpty()) {\n createNameEt.setError(\"Program name is required!\");\n createNameEt.requestFocus();\n return;\n }\n\n else if(description.isEmpty()) {\n createDescriptionEt.setError(\"Description is required!\");\n createDescriptionEt.requestFocus();\n return;\n }\n\n else if(dateTime.isEmpty()) {\n createDateTimeEt.setError(\"Date and time of program is required!\");\n createDateTimeEt.requestFocus();\n\n Toast t = Toast.makeText(\n getApplicationContext(),\n \"Date and time of program is required!\",\n Toast.LENGTH_SHORT\n );\n t.show();\n\n return;\n }\n\n else if(!validProgramDate) {\n createDateTimeEt.setError(\"Invalid date and time of program!\");\n createDateTimeEt.requestFocus();\n\n Toast t = Toast.makeText(\n getApplicationContext(),\n \"Invalid date and time of program!\",\n Toast.LENGTH_SHORT\n );\n t.show();\n\n return;\n }\n\n else if(!Patterns.WEB_URL.matcher(link).matches()) {\n createLinkEt.setError(\"Please provide a valid link!\");\n createLinkEt.requestFocus();\n return;\n }\n\n else if(photoURL == null) {\n Toast t = Toast.makeText(\n getApplicationContext(),\n \"Uploading a photo is required!\",\n Toast.LENGTH_SHORT\n );\n t.show();\n\n return;\n }\n\n else {\n storeProgram();\n }\n\n }", "@RequestMapping(method = RequestMethod.POST, value = {\"\",\"/\"})\r\n\tpublic ResponseEntity<FormularioDTO> add(@RequestBody @Valid Formulario formulario) throws AuthenticationException {\r\n\t\tformulario.setInstituicao(new Instituicao(authService.getDados().getInstituicaoId()));\r\n\t\treturn new ResponseEntity<>(formularioService.create(formulario), HttpStatus.CREATED);\r\n\t}", "private void submit(){\n\t\tnew Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tMyApp app = new MyApp();\n\t\t\t\tapp.user = mUser.getText().toString();\n\t\t\t\tapp.password = mPassword.getText().toString();\n\t\t\t\tMyDbHelper dbHelper = MyDbHelper.getInstance(getApplicationContext());\n\t\t\t\ttry {\n\t\t\t\t\tdbHelper.insert(MyDbHelper.TABLE_NAME, null, app.toContentValues());\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally{\n\t\t\t\t\tdbHelper.close();\n\t\t\t\t\tdbHelper = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}).start();\n\t\t//finish self\n\t\tfinish();\n\t}", "public com.google.protobuf.Empty registerApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);", "@RequestMapping(\"/newAppusers\")\n\tpublic ModelAndView newAppusers() {\n\t\tModelAndView mav = new ModelAndView();\n\n\t\tmav.addObject(\"appusers\", new Appusers());\n\t\tmav.addObject(\"newFlag\", true);\n\t\tmav.setViewName(\"appusers/editAppusers.jsp\");\n\n\t\treturn mav;\n\t}", "public static FormV1 createEntity() {\n FormV1 formV1 = new FormV1()\n .customerId(DEFAULT_CUSTOMER_ID)\n .formType(DEFAULT_FORM_TYPE);\n return formV1;\n }", "public void onCreate() {\r\n Session session = sessionService.getCurrentSession();\r\n Map<String, Region> items = ControlUtility.createForm(Pc.class);\r\n\r\n ControlUtility.fillComboBox((ComboBox<Kind>) items.get(\"Kind\"), session.getCampaign().getCampaignVariant().getKinds());\r\n ControlUtility.fillComboBox((ComboBox<Race>) items.get(\"Race\"), session.getCampaign().getCampaignVariant().getRaces());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Ability>) items.get(\"SavingThrows\"), Arrays.asList(Ability.values()));\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Proficiency>) items.get(\"Proficiencies\"), session.getCampaign().getCampaignVariant().getProficiencies());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Feature>) items.get(\"Features\"), session.getCampaign().getCampaignVariant().getFeatures());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Trait>) items.get(\"Traits\"), session.getCampaign().getCampaignVariant().getTraits());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Equipment>) items.get(\"Equipment\"), session.getCampaign().getCampaignVariant().getEquipments());\r\n\r\n Campaign campaign = session.getCampaign();\r\n\r\n Dialog<String> dialog = ControlUtility.createDialog(\"Create Playable Character\", items);\r\n dialog.show();\r\n\r\n dialog.setResultConverter(buttonType -> {\r\n if (buttonType != null) {\r\n Pc pc = null;\r\n try {\r\n pc = ControlUtility.controlsToValues(Pc.class, items);\r\n } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException | InstantiationException | ClassNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n if (pc != null) {\r\n try {\r\n characterService.createPlayerCharacter(pc);\r\n } catch (SessionAlreadyExists | IndexAlreadyExistsException sessionAlreadyExists) {\r\n sessionAlreadyExists.printStackTrace();\r\n }\r\n try {\r\n playerManagementService.addOrUpdatePcForRegisteredPlayer(pc);\r\n Player player = playerManagementService.getRegisteredPlayer();\r\n campaign.addPlayer(player);\r\n campaign.addCharacter(pc);\r\n if (campaignListingService.campaignExists(campaign.getId())) {\r\n manipulationService.updateCampaign(campaign);\r\n } else {\r\n manipulationService.createCampaign(campaign);\r\n }\r\n } catch (MultiplePlayersException | EntityNotFoundException | SessionAlreadyExists | IndexAlreadyExistsException e) {\r\n e.printStackTrace();\r\n }\r\n try {\r\n playerManagementService.addOrUpdatePcForRegisteredPlayer(pc);\r\n } catch (MultiplePlayersException | EntityNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n try {\r\n sessionService.updateParticipant(playerManagementService.getRegisteredPlayer().getId(), pc.getId());\r\n sessionService.updateCampaign(campaign);\r\n } catch (EntityNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n render();\r\n return pc.toString();\r\n }\r\n }\r\n return null;\r\n });\r\n }", "@GetMapping(\"/service_requests/new\")\n public String newServiceRequest(Model model){\n String role = userService.getRole(userService.getCurrentUserName());\n model.addAttribute(\"role\", role);\n\n model.addAttribute(\"serviceRequest\", new ServiceRequest());\n\n return \"/forms/new_servicerequest.html\";\n }", "public Team create(TeamDTO teamForm);", "Appinfo createAppinfo();", "@POST\r\n\t@Path(\"/createMovie\")\r\n\t@Produces(MediaType.TEXT_HTML)\r\n\t@Consumes(MediaType.APPLICATION_FORM_URLENCODED)\r\n\tpublic void newMovie(@FormParam(\"name\") String name, @FormParam(\"rate\") String rate,\r\n\t\t\t@FormParam(\"type\") String type, @FormParam(\"actor\") String actor, @FormParam(\"producer\") String producer,\r\n\t\t\t@FormParam(\"length\") String length, @FormParam(\"country\") String country,\r\n\t\t\t@FormParam(\"on_screen_date\") Date on_screen_date, @FormParam(\"language\") String language,\r\n\t\t\t@FormParam(\"file\") String file,\r\n\t\t\t@FormParam(\"description\") String description, @Context HttpServletResponse servletResponse,\r\n\t\t\t@Context HttpServletRequest request) throws IOException, ServletException {\r\n\t\tSystem.out.println(\"name : \" + name);\r\n\t\tSystem.out.println(\"rate : \" + rate);\r\n\t\tSystem.out.println(\"type : \" + type);\r\n\t\tSystem.out.println(\"actor : \" + actor);\r\n\t\tSystem.out.println(\"producer : \" + producer);\r\n\t\tSystem.out.println(\"length : \" + length);\r\n\t\tSystem.out.println(\"country : \" + country);\r\n\t\tSystem.out.println(\"on_screen_date\" + on_screen_date);\r\n\t\tSystem.out.println(\"language : \" + language);\r\n\t\tSystem.out.println(\"file : \" + file);\r\n\t\tSystem.out.println(\"description : \" + description);\r\n\r\n\t\t//collect data from Database\r\n\t Connection con;\r\n\t\tString driver = Constants.driver;\r\n\t\tString url = Constants.url;\r\n\t\tString user = Constants.user;\r\n\t\tString password = Constants.password;\r\n\r\n\t\t//begin adding\r\n\t\ttry {\r\n\t\t\t //Load driver\r\n\t\t\t Class.forName(driver);\r\n\t\t\t //Connect to the MySQL database! !\r\n\t\t\t con = DriverManager.getConnection(url,user,password);\r\n\r\n\t\t\t PreparedStatement ps=con.prepareStatement(\"insert into movie(name,rate,type,actor,producer,length,country,on_screen_date,language,image,description) values(?,?,?,?,?,?,?,?,?,?,?)\");\r\n\t\t\t //ps.setInt(1,4);\r\n\t\t\t ps.setString(1,name);\r\n\t\t\t ps.setInt(2, Integer.parseInt(rate));\r\n\t\t\t ps.setString(3, type);\r\n\t\t\t ps.setString(4, actor);\r\n\t\t\t ps.setString(5, producer);\r\n\t\t\t ps.setInt(6, Integer.parseInt(length));\r\n\t\t\t ps.setString(7, country);\r\n\t\t\t //SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\t\t ps.setDate(8,on_screen_date);\r\n\t\t\t ps.setString(9,language);\r\n\t\t\t ps.setString(10, file);\r\n\t\t\t ps.setString(11, description);\r\n\t\t\t ps.executeUpdate();\r\n\r\n\t\t\t con.close();\r\n\r\n\t //driver Exception & connection Exception\r\n\t\t}catch(ClassNotFoundException e) {\r\n\t\t\tSystem.out.println(\"Sorry,can`t find the Driver!\"); \r\n\t\t\te.printStackTrace(); \r\n\t\t}catch(SQLException e) {\r\n\t\t\t e.printStackTrace(); \r\n\t\t}catch (Exception e) {\r\n\t\t\t e.printStackTrace();\r\n\t\t}finally{\r\n\t\t\t//System.out.println(\"Success access to Database£¡£¡\");\r\n\t\t}\r\n\r\n\t\trequest.getRequestDispatcher(\"/WEB-INF/administration.html\").forward(request, servletResponse);\r\n\t}", "@RequestMapping(value = \"/new\", method = RequestMethod.POST)\n public Object newAuctionx(@ModelAttribute @Valid AuctionForm form, BindingResult result) throws SQLException {\n if(result.hasErrors()) {\n StringBuilder message = new StringBuilder();\n for(FieldError error: result.getFieldErrors()) {\n message.append(error.getField()).append(\" - \").append(error.getRejectedValue()).append(\"\\n\");\n }\n ModelAndView modelAndView = (ModelAndView)newAuction();\n modelAndView.addObject(\"message\", message);\n modelAndView.addObject(\"form\", form);\n return modelAndView;\n }\n String username = SecurityContextHolder.getContext().getAuthentication().getName();\n UserAuthentication userAuth = UserAuthentication.select(UserAuthentication.class, \"SELECT * FROM user_authentication WHERE username=#1#\", username);\n AuctionWrapper wrapper = new AuctionWrapper();\n wrapper.setDemandResourceId(form.getDemandedResourceId());\n wrapper.setDemandAmount(form.getDemandedAmount());\n wrapper.setOfferResourceId(form.getOfferedResourceId());\n wrapper.setOfferAmount(form.getOfferedAmount());\n wrapper.setSellerId(userAuth.getPlayerId());\n auctionRestTemplate.post(auctionURL + \"/new\", wrapper, String.class);\n return new RedirectView(\"/player/trading\");\n }", "@RequestMapping(method = RequestMethod.POST)\n public Bin create() {\n throw new NotImplementedException(\"To be implemented\");\n }", "@RequestMapping(method = RequestMethod.GET)\n \tpublic String createForm(Model model, ForgotLoginForm form) {\n \t\tmodel.addAttribute(\"form\", form);\n \t\treturn \"forgotlogin/index\";\n \t}", "@GetMapping(\"/create\")\n public ModelAndView create(@ModelAttribute(\"form\") final CardCreateForm form) {\n return getCreateForm(form);\n }", "@Override\n public void onClick(View view) {\n PSMApplication newApp = new PSMApplication();\n newApp.setFullName(txtName.getText().toString());\n newApp.setAddress(txtAddress.getText().toString());\n newApp.setEmail(txtEmail.getText().toString());\n newApp.setDocId(db.collection(\"PSMApplication\").document().getId());// get id of new entry\n // Record in the database\n DocumentReference docRef = db.collection(\"PSMApplication\").document(newApp.getDocId());\n Task insert = docRef.set(newApp);\n insert.addOnSuccessListener(o -> {\n Log.d(\"TAG\", \"New PSM application added!\");\n // Show thank you message\n txtThankYou.setVisibility(View.VISIBLE);\n btnBack.setVisibility(View.VISIBLE);\n btnApply.setEnabled(false);\n txtName.setEnabled(false);\n txtAddress.setEnabled(false);\n txtEmail.setEnabled(false);\n });\n insert.addOnFailureListener(o->{\n Log.e(\"TAG\", \"Failed to add new PSM application.\");\n Toast.makeText(ApplyPsmLicenseActivity.this, \"An error occurred\", Toast.LENGTH_SHORT).show();\n finish();\n });\n\n }", "@GET\n\t@Path(\"/component/{componentName}/new\")\n\t@Produces( MediaType.APPLICATION_JSON )\n\tInstance createInstanceFromComponent( @PathParam(\"name\") String applicationName, @PathParam(\"componentName\") String componentName );", "@RequestMapping(\"/book/new\")\n public String newBook(Model model){\n model.addAttribute(\"book\", new Book ());\n return \"bookform\";\n }", "@_esCocinero\n public Result crearPaso() {\n Form<Paso> frm = frmFactory.form(Paso.class).bindFromRequest();\n\n // Comprobación de errores\n if (frm.hasErrors()) {\n return status(409, frm.errorsAsJson());\n }\n\n Paso nuevoPaso = frm.get();\n\n // Comprobar autor\n String key = request().getQueryString(\"apikey\");\n if (!SeguridadFunctions.esAutorReceta(nuevoPaso.p_receta.getId(), key))\n return Results.badRequest();\n\n // Checkeamos y guardamos\n if (nuevoPaso.checkAndCreate()) {\n Cachefunctions.vaciarCacheListas(\"pasos\", Paso.numPasos(), cache);\n Cachefunctions.vaciarCacheListas(\"recetas\", Receta.numRecetas(), cache);\n return Results.created();\n } else {\n return Results.badRequest();\n }\n\n }", "@POST\r\n @Path(\"/create\")\r\n @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\r\n @Produces(MediaType.APPLICATION_JSON)\r\n public NewAccount createNewCustomerAccount(@FormParam(\"accountNumber\") int accountNumber,\r\n @FormParam(\"accountType\") String accountType,\r\n @FormParam(\"accountBalance\") double accountBalance\r\n ){\r\n return newaccountservice.createNewAccount(accountNumber, accountType, accountBalance);\r\n }", "private void newApplication() throws Exception{\n\t\t\n\t\tPrintWriter writer = new PrintWriter(new BufferedWriter(new FileWriter(this.appfile)));\n\t\tint counter = 0;\n\t\t\n\t\twriter.println(\"Scholarship\");\n\t\twriter.println(this.scholarship);\n\t\twriter.println();\n\t\twriter.println(\"Student\");\n\t\twriter.println(this.student);\n\t\twriter.println();\n\t\twriter.println(\"GPA\");\n\t\twriter.println(this.gpa);\n\t\twriter.println();\n\t\twriter.println(\"Education Level\");\n\t\twriter.println(this.edulvl);\n\t\twriter.println();\n\t\twriter.println(\"Date\");\n\t\twriter.println(this.date);\n\t\twriter.println();\n\t\twriter.println(\"Status\");\n\t\twriter.println(this.status);\n\t\twriter.println();\n\t\twriter.println(\"Priority\");\n\t\twriter.println(this.priority);\n\t\twriter.println();\n\n\t\twriter.close();\n\t\t\n\t}", "@RequestMapping(value = \"/report.create\", method = RequestMethod.GET)\n @ResponseBody public ModelAndView newreportForm(HttpSession session) throws Exception {\n ModelAndView mav = new ModelAndView();\n mav.setViewName(\"/sysAdmin/reports/details\");\n\n //Create a new blank provider.\n reports report = new reports();\n \n mav.addObject(\"btnValue\", \"Create\");\n mav.addObject(\"reportdetails\", report);\n\n return mav;\n }", "@RequestMapping(value = \"/newrecipe\", method = RequestMethod.GET)\n\tpublic String newRecipeForm(Model model) {\n\t\tmodel.addAttribute(\"recipe\", new Recipe()); //empty recipe object\n\t\tmodel.addAttribute(\"categories\", CatRepo.findAll());\n\t\treturn \"newrecipe\";\n\t}", "public SubmitPage(final PageParameters parameters) {\n\n Form form = new Form(\"form\");\n orgLabel = new TextField<String>(\"orgLabel\", new Model<String>(\"\"));\n message = new TextArea<String>(\"message\", new Model<String>(\"\"));\n form.add(orgLabel);\n form.add(message);\n form.add(new Button(\"button\")\n {\n @Override\n public void onSubmit()\n {\n String orgLabelString = orgLabel.getModelObject();\n String messageString = message.getModelObject();\n \n SessionFactory factory = OrganizationManager.getSessionFactory();\n Session session = factory.openSession();\n Transaction tx = session.beginTransaction();\n Query query = session.createQuery(\"from Organization where orgLabel = ?\");\n query.setParameter(0, orgLabelString);\n List<Organization> organizations = query.list();\n Organization organization;\n if (organizations.size() == 0)\n {\n organization = new Organization();\n organization.setParentOrganization((Organization)session.get(Organization.class, 1));\n organization.setOrgLabel(orgLabelString);\n session.save(organization);\n }\n else\n {\n organization = organizations.get(0);\n }\n SubmitterProfile submitterProfile = organization.getPrimaryProfile();\n if (submitterProfile == null)\n {\n submitterProfile = new SubmitterProfile();\n submitterProfile.setProfileLabel(\"HL7\");\n submitterProfile.setProfileStatus(SubmitterProfile.PROFILE_STATUS_TEST);\n submitterProfile.setOrganization(organization);\n submitterProfile.setDataFormat(SubmitterProfile.DATA_FORMAT_HL7V2);\n submitterProfile.setTransferPriority(SubmitterProfile.TRANSFER_PRIORITY_NORMAL);\n session.save(submitterProfile);\n organization.setPrimaryProfile(submitterProfile);\n }\n tx.commit();\n StringWriter stringWriter = new StringWriter();\n PrintWriter out = new PrintWriter(stringWriter);\n try \n {\n // TODO IncomingServlet.processStream(false, out, session, submitterProfile, messageString);\n }\n catch (Exception e)\n {\n e.printStackTrace(out);\n }\n out.close();\n results = stringWriter.toString();\n }\n });\n add(new Label(\"results\"));\n add(form);\n }", "Paper addNewPaper(PaperForm form, Long courseId)throws Exception;", "private void submitNewUser() {\n\t\tboolean validationFlag = true;\n\t\tArrayList<HashMap<String, String>> signUpFields = new ArrayList<HashMap<String, String>>();\n\t\tint size = lnr_form.getChildCount();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tLinearLayout v = (LinearLayout) lnr_form.getChildAt(i);\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tHashMap<String, String> field = (HashMap<String, String>) v.getTag();\n\n\t\t\tIjoomerEditText edtValue = null;\n\t\t\tSpinner spnrValue = null;\n\n\t\t\tif (field != null) {\n\t\t\t\tif (field.get(TYPE).equals(TEXT)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEdit)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(TEXTAREA)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditArea)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(PASSWORD)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrPassword)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(MAP)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditMap)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(\"type\").equals(LABEL)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrLabel)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(DATE)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditClickable)).findViewById(R.id.txtValue);\n\n\t\t\t\t\tif (edtValue.getText().toString().trim().length() > 0) {\n\t\t\t\t\t\tif (!IjoomerUtilities.birthdateValidator(edtValue.getText().toString().trim())) {\n\t\t\t\t\t\t\tedtValue.setFocusable(true);\n\t\t\t\t\t\t\tedtValue.setError(getString(R.string.validation_invalid_birth_date));\n\t\t\t\t\t\t\tvalidationFlag = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (field.get(TYPE).equals(MULTIPLESELECT)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditClickable)).findViewById(R.id.txtValue);\n\t\t\t\t}\n\t\t\t\tif (field.get(TYPE).equals(TIME)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditClickable)).findViewById(R.id.txtValue);\n\t\t\t\t}\n\n\t\t\t\tif (field.get(TYPE).equals(SELECT)) {\n\t\t\t\t\tspnrValue = (Spinner) ((LinearLayout) v.findViewById(R.id.lnrSpin)).findViewById(R.id.txtValue);\n\t\t\t\t\tfield.put(VALUE, spnrValue.getSelectedItem().toString());\n\t\t\t\t\tsignUpFields.add(field);\n\t\t\t\t} else if (field.get(TYPE).equals(PASSWORD) && field.get(NAME).equals(\"Retype Password\")) {\n\t\t\t\t\tint len = lnr_form.getChildCount();\n\t\t\t\t\tfor (int j = 0; j < len; j++) {\n\t\t\t\t\t\tLinearLayout view = (LinearLayout) lnr_form.getChildAt(i);\n\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\t\tHashMap<String, String> row = (HashMap<String, String>) view.getTag();\n\t\t\t\t\t\tif (row.get(TYPE).equals(PASSWORD) && field.get(NAME).equals(\"Password\")) {\n\t\t\t\t\t\t\tString password = ((IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrPassword)).findViewById(R.id.txtValue)).getText().toString();\n\t\t\t\t\t\t\tif (password.equals(edtValue.getText().toString())) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tedtValue.setError(getString(R.string.validation_password_not_match));\n\t\t\t\t\t\t\t\tvalidationFlag = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (edtValue != null && edtValue.getText().toString().trim().length() <= 0 && (field.get(REQUIRED).equals(\"1\"))) {\n\t\t\t\t\tedtValue.setError(getString(R.string.validation_value_required));\n\t\t\t\t\tvalidationFlag = false;\n\t\t\t\t} else {\n\t\t\t\t\tfield.put(VALUE, edtValue.getText().toString().trim());\n\t\t\t\t\tsignUpFields.add(field);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (validationFlag) {\n\t\t\tfinal SeekBar proSeekBar = IjoomerUtilities.getLoadingDialog(getString(R.string.dialog_loading_register_newuser));\n\t\t\tnew IjoomerRegistration(this).submitNewUser(signUpFields, new WebCallListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onProgressUpdate(int progressCount) {\n\t\t\t\t\tproSeekBar.setProgress(progressCount);\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onCallComplete(final int responseCode, String errorMessage, ArrayList<HashMap<String, String>> data1, Object data2) {\n\t\t\t\t\tif (responseCode == 200) {\n\t\t\t\t\t\tIjoomerUtilities.getCustomOkDialog(getString(R.string.dialog_loading_profile), getString(R.string.registration_successfully), getString(R.string.ok),\n\t\t\t\t\t\t\t\tR.layout.ijoomer_ok_dialog, new CustomAlertNeutral() {\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void NeutralMethod() {\n\n\t\t\t\t\t\t\t\t\t\tIntent intent = new Intent(\"clearStackActivity\");\n\t\t\t\t\t\t\t\t\t\tintent.setType(\"text/plain\");\n\t\t\t\t\t\t\t\t\t\tsendBroadcast(intent);\n\t\t\t\t\t\t\t\t\t\tIjoomerWebService.cookies = null;\n\n\t\t\t\t\t\t\t\t\t\tloadNew(IjoomerLoginActivity.class, IPropertyRegistrationActivity.this, true);\n\t\t\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tIjoomerUtilities.getCustomOkDialog(getString(R.string.dialog_loading_profile),\n\t\t\t\t\t\t\t\tgetString(getResources().getIdentifier(\"code\" + responseCode, \"string\", getPackageName())), getString(R.string.ok), R.layout.ijoomer_ok_dialog,\n\t\t\t\t\t\t\t\tnew CustomAlertNeutral() {\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void NeutralMethod() {\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "private void createSubject(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n // Formulareingaben prüfen\n String name = request.getParameter(\"name\");\n\n Subject subject = new Subject(name);\n List<String> errors = this.validationBean.validate(subject);\n\n // Neue Kategorie anlegen\n if (errors.isEmpty()) {\n this.subjectBean.saveNew(subject);\n }\n\n // Browser auffordern, die Seite neuzuladen\n if (!errors.isEmpty()) {\n FormValues formValues = new FormValues();\n formValues.setValues(request.getParameterMap());\n formValues.setErrors(errors);\n\n HttpSession session = request.getSession();\n session.setAttribute(\"subjects_form\", formValues);\n }\n\n response.sendRedirect(request.getRequestURI());\n }", "@GetMapping(\"/new\")\n public ModelAndView addAttributesForm() {\n return new ModelAndView(\"/sessions/session-create.html\");\n }", "private void submitForm() {\n // Build list params\n List<NameValuePair> list = new ArrayList<>();\n list.add(new BasicNameValuePair(\"tag\", AppConfig.TAG_LOGIN));\n list.add(new BasicNameValuePair(\"username\", editTextLogin.getText().toString()));\n list.add(new BasicNameValuePair(\"password\", editTextPassword.getText().toString()));\n\n ConnectionTask connectionTask = new ConnectionTask(this, list);\n connectionTask.execute();\n }", "@PostMapping(\"/createAccount\")\n public ModelAndView createNewAccount(AccountCreateDTO createDTO){\n ModelAndView modelAndView = new ModelAndView();\n\n accountService.createAccount(createDTO);\n modelAndView.addObject(\"successMessage\", \"Account has been created\");\n modelAndView.setViewName(\"accountPage\");\n\n return modelAndView;\n }", "public void onCreate() {\r\n\t\trelayState = null;\r\n\t\tdomainName = ((Person) SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getDomain().getName();\r\n\t\tgoogleAccount = ((Person) SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getGoogleAccount();\r\n\t\tregistry = ((Person) SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getRegistry();\r\n\t\tacsForm = new AcsForm(domainName);\r\n\t\tappendChild(acsForm);\r\n\t\ticeForm = new IceForm();\r\n\t\tappendChild(iceForm);\r\n\t\ticeAppsController = (IceAppsController) SpringUtil.getBean(\"iceAppsController\");\r\n\t}", "@RequestMapping(\"/newProjectAppMajor\")\n\tpublic ModelAndView newProjectAppMajor() {\n\t\tModelAndView mav = new ModelAndView();\n\n\t\tmav.addObject(\"projectappmajor\", new ProjectAppMajor());\n\t\tmav.addObject(\"newFlag\", true);\n\t\tmav.setViewName(\"projectappmajor/editProjectAppMajor.jsp\");\n\n\t\treturn mav;\n\t}", "@PostMapping(\"/createNewGameRoom\")\n @ResponseStatus(HttpStatus.CREATED)\n public Game generateNewGameRoom() {\n String entrycode = service.generateEntryCode();\n currentGame.setEntrycode(entrycode);\n currentGame = gameDao.add(currentGame);\n return currentGame;\n }", "public static Result newProduct() {\n Form<models.Product> productForm = form(models.Product.class).bindFromRequest();\n if(productForm.hasErrors()) {\n return badRequest(\"Tag name cannot be 'tag'.\");\n }\n models.Product product = productForm.get();\n product.save();\n return ok(product.toString());\n }", "@POST\t\n\t@Path(\"/\")\n\t@Consumes(\"application/json\")\t\n\tpublic List<Site> createSite(Site newSite){\n\t\tSystem.out.println(\"help\");\n\t\treturn siteDaoObj.createSite(newSite);\t\t\n\t}", "public String formCreated()\r\n {\r\n return formError(\"201 Created\",\"Object was created\");\r\n }", "@RolesAllowed(\"user\")\n @POST\n @Consumes({MediaType.MULTIPART_FORM_DATA})\n @Produces({MediaType.APPLICATION_JSON})\n public Factory saveFactory(@Context HttpServletRequest request, @Context UriInfo uriInfo) throws FactoryUrlException {\n try {\n EnvironmentContext context = EnvironmentContext.getCurrent();\n if (context.getUser() == null || context.getUser().getName() == null || context.getUser().getId() == null) {\n throw new FactoryUrlException(Status.INTERNAL_SERVER_ERROR.getStatusCode(), \"Unable to identify user from context\");\n }\n\n Set<FactoryImage> images = new HashSet<>();\n Factory factoryUrl = null;\n\n for (Part part : request.getParts()) {\n String fieldName = part.getName();\n if (fieldName.equals(\"factoryUrl\")) {\n try {\n factoryUrl = factoryBuilder.buildEncoded(part.getInputStream());\n } catch (JsonSyntaxException e) {\n throw new FactoryUrlException(\n \"You have provided an invalid JSON. For more information, please visit http://docs.codenvy.com/user/creating-factories/factory-parameter-reference/\");\n }\n } else if (fieldName.equals(\"image\")) {\n try (InputStream inputStream = part.getInputStream()) {\n FactoryImage factoryImage =\n FactoryImage.createImage(inputStream, part.getContentType(), NameGenerator.generate(null, 16));\n if (factoryImage.hasContent()) {\n images.add(factoryImage);\n }\n }\n }\n }\n\n if (factoryUrl == null) {\n LOG.warn(\"No factory URL information found in 'factoryUrl' section of multipart form-data.\");\n throw new FactoryUrlException(Status.BAD_REQUEST.getStatusCode(),\n \"No factory URL information found in 'factoryUrl' section of multipart/form-data.\");\n }\n\n if (factoryUrl.getV().equals(\"1.0\")) {\n throw new FactoryUrlException(\"Storing of Factory 1.0 is unsupported.\");\n }\n\n factoryUrl.setUserid(context.getUser().getId());\n factoryUrl.setCreated(System.currentTimeMillis());\n String factoryId = factoryStore.saveFactory(factoryUrl, images);\n factoryUrl = factoryStore.getFactory(factoryId);\n factoryUrl = factoryUrl.withLinks(linksHelper.createLinks(factoryUrl, images, uriInfo));\n\n String createProjectLink = \"\";\n Iterator<Link> createProjectLinksIterator = linksHelper.getLinkByRelation(factoryUrl.getLinks(), \"create-project\").iterator();\n if (createProjectLinksIterator.hasNext()) {\n createProjectLink = createProjectLinksIterator.next().getHref();\n }\n ProjectAttributes attributes = factoryUrl.getProjectattributes();\n LOG.info(\n \"EVENT#factory-created# WS#{}# USER#{}# PROJECT#{}# TYPE#{}# REPO-URL#{}# FACTORY-URL#{}# AFFILIATE-ID#{}# ORG-ID#{}#\",\n \"\",\n context.getUser().getName(),\n \"\",\n nullToEmpty(attributes != null ? attributes.getPtype() : \"\"),\n factoryUrl.getVcsurl(),\n createProjectLink,\n nullToEmpty(factoryUrl.getAffiliateid()),\n nullToEmpty(factoryUrl.getOrgid()));\n\n return factoryUrl;\n } catch (IOException | ServletException e) {\n LOG.error(e.getLocalizedMessage(), e);\n throw new FactoryUrlException(Status.INTERNAL_SERVER_ERROR.getStatusCode(), e.getLocalizedMessage(), e);\n }\n }", "@RequestMapping(value = \"/application\", method = RequestMethod.GET)\n\tpublic ModelAndView goToApplicationForm() {\n\n\t\tlogger.info(\"application page requested\");\n\n\t\treturn new ModelAndView(\"application\");\n\n\t}", "@RequestMapping(value = \"/program/add.html\", method = RequestMethod.POST)\n\tpublic String addProg(@ModelAttribute Program program) {\n\t\tprogram = progDao.saveProgram(program);\n\t\tSystem.out.println(\"Program saved\");\n\t\treturn \"redirect:../department/details.html?id=\" + program.getProgramOwner();\n\n\t}", "@RequestMapping(value=\"/fpost/new\",method = RequestMethod.POST)\r\n\tpublic ResponseEntity<Fpost> addNewFpost(@RequestBody Fpost fpost) {\r\n\t\tSystem.out.println(\"Adding new fpost\");\r\n\t\t\t\r\n\t\t\tboolean b =fpostDAO.add(fpost);\r\n\t\t\tif(b) System.out.println(\"fpost added Successfully\");\r\n\t\t\telse System.out.println(\"fpost NOT added\");\r\n\t\t\t\r\n\t\treturn new ResponseEntity<Fpost>(fpost, HttpStatus.OK);\r\n\t}", "public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}", "protected void NewApp(String name, String code, String file, String web,\n String dir) {\n String webRoot = UIHelper.getStoragePath(AppManagerActivity.this);\n webRoot = webRoot + constants.SD_CARD_TBSSOFT_PATH3 + \"/\";\n File newfile = new File(webRoot + dir + \"/\" + file);\n/*\t\tFile newfile2 = new File(webRoot + dir + \"/\"\n + constants.WEB_CONFIG_FILE_NAME);*/\n try {\n newfile.createNewFile();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n\n this.IniFile.writeIniString(webRoot + dir + \"/\" + file, \"TBSAPP\",\n \"defaultUrl\", web);\n this.IniFile.writeIniString(webRoot + dir + \"/\" + file, \"TBSAPP\", \"AppCode\",\n code);\n this.IniFile.writeIniString(webRoot + dir + \"/\" + file, \"TBSAPP\", \"AppName\",\n name);\n this.IniFile.writeIniString(webRoot + dir + \"/\" + file, \"TBSAPP\", \"AppVersion\",\n \"1.0\");\n AppManagerActivity.myThread handThread = new AppManagerActivity.myThread(dir, file);\n handThread.run();\n }", "public CreateOrUpdateAppRequest(String title, String packageName, String version, String description, boolean debug, boolean privateApp, String phoneGapVersion) {\n\t\tthis.title = title;\n\t\tthis.packageName = packageName;\n\t\tthis.version = version;\n\t\tthis.description = description;\n\t\tthis.debug = debug;\n\t\tthis.privateApp = privateApp;\n\t\tthis.phoneGapVersion = phoneGapVersion;\n\t\tthis.createMethod = \"file\";\n\t}", "public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}", "@RequestMapping(params = \"new\", method = RequestMethod.GET)\n\t@PreAuthorize(\"hasRole('ADMIN')\")\n\tpublic String createProductForm(Model model) { \t\n \t\n\t\t//Security information\n\t\tmodel.addAttribute(\"admin\",security.isAdmin()); \n\t\tmodel.addAttribute(\"loggedUser\", security.getLoggedInUser());\n\t\t\n\t model.addAttribute(\"product\", new Product());\n\t return \"products/newProduct\";\n\t}", "private void fillCreateOrEditForm(String name, int branchId) {\n waitForElementVisibility(xpathFormHeading);\n String actual = assertAndGetAttributeValue(xpathFormHeading, \"innerText\");\n assertEquals(actual, FORM_HEADING,\n \"Actual heading '\" + actual + \"' should be same as expected heading '\" + FORM_HEADING\n + \"'.\");\n logger.info(\"# User is on '\" + actual + \"' form\");\n assertAndType(xpathNameTF, name);\n logger.info(\"# Entered staff name: \" + name);\n selectByValue(xpathSelectBranch, \"number:\" + branchId);\n logger.info(\"# Select branch id: \" + branchId);\n }", "public com.google.protobuf.Empty setApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.Application request);", "public void saveAndCreateNew() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"saveAndCreateNewButton\").click();\n\t}", "public AddApplicationData(String nameApplication, String descriptionApplication, int userId, int companyId){\n _nameApplication = nameApplication;\n _descriptionApplication = descriptionApplication;\n _userId = userId;\n _companyId = companyId;\n }", "@FXML\n private void goToCreateProgram(ActionEvent event) throws IOException {\n\n CreateProgramController createProgramController = new CreateProgramController();\n Program programEntity = createProgramController.openView(event);\n createProgram.setSelected(false);\n if (programEntity != null && programListController != null)\n {\n if (programListController.listOfPrograms != null)\n {\n programListController.listOfPrograms.add(programEntity);\n programListController.updateProgramList();\n UsermanagementUtilities.setFeedback(event,\"The program was created\",true);\n }\n } else {\n UsermanagementUtilities.setFeedback(event,\"The program was not created\",false);\n }\n }", "@BodyParser.Of(play.mvc.BodyParser.Json.class)\n public static Result create() throws JsonParseException, JsonMappingException, IOException {\n JsonNode json = request().body().asJson();\n Thing thing = mapper.treeToValue(json, Thing.class);\n thing.save();\n return ok(mapper.valueToTree(thing));\n }", "CdapCreateAppStep createCdapCreateAppStep();", "public static void createApplication(String consumerKey, String consumerSecret, int tenantId) {\n try (Connection connection = IdentityDatabaseUtil.getDBConnection();\n PreparedStatement prepStmt = connection.prepareStatement(SQLQueries.OAuthAppDAOSQLQueries.ADD_OAUTH_APP)) {\n prepStmt.setString(1, consumerKey);\n prepStmt.setString(2, consumerSecret);\n prepStmt.setString(3, \"testUser\");\n prepStmt.setInt(4, tenantId);\n prepStmt.setString(5, UserCoreConstants.PRIMARY_DEFAULT_DOMAIN_NAME);\n prepStmt.setString(6, \"oauth2-app\");\n prepStmt.setString(7, \"OAuth-2.0\");\n prepStmt.setString(8, \"some-call-back\");\n prepStmt.setString(9, \"refresh_token urn:ietf:params:oauth:grant-type:saml2-bearer implicit password \" +\n \"client_credentials iwa:ntlm authorization_code urn:ietf:params:oauth:grant-type:jwt-bearer\");\n prepStmt.execute();\n connection.commit();\n } catch (SQLException e) {\n Assert.fail(\"Unable to add Oauth application.\");\n }\n }", "private void fillCreateOrEditForm(String name, String branch) {\n waitForElementVisibility(xpathFormHeading);\n String actual = assertAndGetAttributeValue(xpathFormHeading, \"innerText\");\n assertEquals(actual, FORM_HEADING,\n \"Actual heading '\" + actual + \"' should be same as expected heading '\" + FORM_HEADING\n + \"'.\");\n logger.info(\"# User is on '\" + actual + \"' form\");\n assertAndType(xpathNameTF, name);\n logger.info(\"# Entered staff name: \" + name);\n selectByVisibleText(xpathSelectBranch, branch);\n logger.info(\"# Select branch name: \" + branch);\n }", "@PostMapping ( BASE_PATH + \"/pharmacies\" )\n @PreAuthorize ( \"hasRole('ROLE_ADMIN') \" )\n public ResponseEntity createPharmacy ( @RequestBody final PharmacyForm pharmacyF ) {\n final Pharmacy pharmacy = new Pharmacy( pharmacyF );\n if ( null != Pharmacy.getByLocation( pharmacy.getAddress(), pharmacy.getZip() ) ) {\n return new ResponseEntity( errorResponse( \"A Pharmacy already exists at the given address\" ),\n HttpStatus.CONFLICT );\n }\n try {\n pharmacy.save();\n LoggerUtil.log( TransactionType.CREATE_PHARMACY, LoggerUtil.currentUser() );\n return new ResponseEntity( pharmacy, HttpStatus.OK );\n }\n catch ( final Exception e ) {\n return new ResponseEntity( errorResponse( \"Error occured while validating or saving \" + pharmacy.toString()\n + \" because of \" + e.getMessage() ), HttpStatus.BAD_REQUEST );\n }\n\n }" ]
[ "0.6270748", "0.62452036", "0.60606813", "0.6058808", "0.5999776", "0.59603757", "0.59256256", "0.5836561", "0.58304495", "0.5792695", "0.57827735", "0.5781373", "0.5726226", "0.56934786", "0.5625615", "0.55652696", "0.55527186", "0.555053", "0.5508332", "0.550213", "0.5500322", "0.5467217", "0.5444268", "0.54251397", "0.5423077", "0.5407986", "0.53996956", "0.5386392", "0.53788316", "0.5307407", "0.5302646", "0.5292583", "0.52859366", "0.52688557", "0.5259531", "0.52549", "0.52352786", "0.5224291", "0.5219249", "0.5217546", "0.5209024", "0.51982284", "0.5194837", "0.5194591", "0.5190886", "0.51892585", "0.5182804", "0.5160912", "0.5149954", "0.5147879", "0.51271206", "0.5118577", "0.5108947", "0.51051587", "0.50998944", "0.50995225", "0.5093643", "0.5089945", "0.5074255", "0.5069541", "0.50643843", "0.50639266", "0.50621724", "0.50596935", "0.50585395", "0.5037619", "0.5036643", "0.5036085", "0.5027474", "0.50266916", "0.5025162", "0.5018622", "0.5017451", "0.50101584", "0.5007532", "0.500062", "0.4996179", "0.49961743", "0.4993649", "0.49928448", "0.497945", "0.4962168", "0.49545443", "0.49409536", "0.4936552", "0.49352646", "0.49267083", "0.49200186", "0.4910803", "0.49074548", "0.4902303", "0.4900708", "0.4895788", "0.48945248", "0.48936749", "0.48907587", "0.4888308", "0.48878634", "0.4886943", "0.48819286" ]
0.6338559
0
This method updates a application form via a PUT request
@PutMapping("/api/internships/{internship_id}/application_form") public ApplicationFormDto putApplication(@RequestParam(value = "job_id") String jobID, @RequestParam(value = "job_description") String jobDescription, @RequestParam(value = "company") String company, @RequestParam(value = "employer") String employer, @RequestParam(value = "employer_email", required = false) String email, @RequestParam(value = "location") String location, @RequestParam(value = "start_date") Date startDate, @RequestParam(value = "end_date") Date endDate, @RequestParam(value = "work_permit") boolean workPermit, @PathVariable(value = "internship_id") int internshipId) { Internship i = internshipService.findByIdAndStudent(internshipId, authenticationService.getCurrentStudent()); if (i == null) throw new AccessDeniedException(""); if (i.getApplicationForm() == null) throw new IllegalArgumentException("Application form doesn't exist."); ApplicationFormDto applicationFormDto = new ApplicationFormDto(); applicationFormDto.setId(i.getApplicationForm().getId()); applicationFormDto.setJobID(jobID); applicationFormDto.setJobDescription(jobDescription); applicationFormDto.setCompany(company); applicationFormDto.setEmployer(employer); applicationFormDto.setLocation(location); applicationFormDto.setStartDate(startDate); applicationFormDto.setEndDate(endDate); applicationFormDto.setWorkPermit(workPermit); applicationFormDto.setEmployerEmail(email); ApplicationForm applicationForm = applicationFormService.update(applicationFormDto); return applicationFormService.toDto(applicationForm); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value = \"/json/data/app/(*:appId)/version/(*:appVersion)/form/(*:formDefId)/(*:primaryKey)\", method = RequestMethod.PUT)\n public void putFormData(final HttpServletRequest request, final HttpServletResponse response,\n @RequestParam(\"appId\") final String appId,\n @RequestParam(\"appVersion\") final String appVersion,\n @RequestParam(\"formDefId\") final String formDefId,\n @RequestParam(\"primaryKey\") final String primaryKey)\n throws IOException, JSONException {\n\n LogUtil.info(getClass().getName(), \"Executing JSON Rest API [\" + request.getRequestURI() + \"] in method [\" + request.getMethod() + \"] as [\" + WorkflowUtil.getCurrentUsername() + \"]\");\n\n try {\n // get version, version 0 indicates published version\n long version = Long.parseLong(appVersion) == 0 ? appDefinitionDao.getPublishedVersion(appId) : Long.parseLong(appVersion);\n\n // get current App\n AppDefinition appDefinition = appDefinitionDao.loadVersion(appId, version);\n if (appDefinition == null) {\n // check if app valid\n throw new ApiException(HttpServletResponse.SC_BAD_REQUEST, \"Invalid application [\" + appId + \"] version [\" + version + \"]\");\n }\n\n // set current app definition\n AppUtil.setCurrentAppDefinition(appDefinition);\n\n Form form = appService.viewDataForm(appDefinition.getAppId(), appDefinition.getVersion().toString(), formDefId, null, null, null, null, null, null);\n\n // read request body and convert request body to json\n final FormData formData = extractBodyToFormData(request, form);\n formData.setPrimaryKeyValue(primaryKey);\n\n // submit form\n final FormData result = appService.submitForm(form, formData, false);\n\n // construct response\n final JSONObject jsonResponse = new JSONObject();\n if (result.getFormErrors() != null && !result.getFormErrors().isEmpty()) {\n final JSONObject jsonError = new JSONObject();\n // show error message\n result.getFormErrors().forEach((key, value) -> {\n try {\n jsonError.put(key, value);\n } catch (JSONException ignored) { }\n });\n jsonResponse.put(\"message\", MESSAGE_VALIDATION_ERROR);\n jsonResponse.put(\"error\", jsonError);\n } else {\n // set current data as response\n FormRowSet rowSet = appService.loadFormData(form, result.getPrimaryKeyValue());\n if(rowSet == null || rowSet.isEmpty()) {\n response.setStatus(HttpServletResponse.SC_NO_CONTENT);\n } else {\n response.setStatus(HttpServletResponse.SC_OK);\n JSONObject jsonData = new JSONObject(rowSet.get(0));\n jsonResponse.put(\"data\", jsonData);\n jsonResponse.put(\"message\", MESSAGE_SUCCESS);\n jsonResponse.put(\"digest\", getDigest(jsonData));\n }\n }\n\n response.getWriter().write(jsonResponse.toString());\n\n } catch (ApiException e) {\n response.sendError(e.getErrorCode(), e.getMessage());\n LogUtil.warn(getClass().getName(), e.getMessage());\n }\n }", "@PUT\n @Path(\"/update\")\n public void put() {\n System.out.println(\"PUT invoked\");\n }", "java.util.concurrent.Future<UpdateApplicationResult> updateApplicationAsync(UpdateApplicationRequest updateApplicationRequest);", "java.util.concurrent.Future<UpdateApplicationResult> updateApplicationAsync(UpdateApplicationRequest updateApplicationRequest);", "public boolean updateAppointment(Appointment app);", "public App update(App obj) {\n JsonNode n = getClient().put(\n String.format(Routes.APP_UPDATE, obj.getId()),\n toJsonNode(obj)\n );\n obj.merge(getMapper().convertValue(n, App.class));\n return obj;\n }", "@PUT\n\t@Path(\"{id}\")\n\t@Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})\n\tpublic Response putApplication(@PathParam(\"id\") String id, Application updatedApplication) {\n\t\tupdatedApplication.set_appId(id);\n\t\tApplicationsDao.instance.update(updatedApplication);\n\t\treturn Response.noContent().build();\n\t}", "@RequestMapping(value = \"/rest/application/{id}\", method = RequestMethod.POST,\n produces = \"application/json\")\n @Timed\n public Application update(@PathVariable String id, HttpServletResponse response,\n @RequestBody ApplicationDTO cfgDto) {\n Application application = applicationRepository.findOne(id);\n application = updateApplication(cfgDto, application);\n log.debug(\"REST request to get Application : {}\", id);\n if (application == null) {\n response.setStatus(HttpServletResponse.SC_NOT_FOUND);\n } else {\n applicationRepository.saveAndFlush(application);\n }\n return application;\n }", "@RequestMapping(method = RequestMethod.PUT, value = FR_SERVICE_RESOURCE_PREFIX\n\t\t\t+ \"/crud/{applicationId}/{formId}/form/form.xhtml\")\n\tpublic void putFormDefinition(@PathVariable final String applicationId, @PathVariable final String formId,\n\t\t\t@RequestParam(value = \"document\", required = false) final String documentId, final HttpServletRequest request,\n\t\t\tfinal HttpServletResponse response) throws ServletException, IOException\n\t{\n\t\tif (LOG.isDebugEnabled())\n\t\t{\n\t\t\tLOG.debug(\"putFormDefinition: applicationId=\" + applicationId + \" | formId=\" + formId\n\t\t\t\t\t+ (documentId != null ? \" | documentId=\" + documentId : \"\"));\n\t\t}\n\n\t\tfinal InputStream input = request.getInputStream();\n\t\tif (input != null)\n\t\t{\n\t\t\tfinal String content = IOUtils.toString(input, \"UTF-8\");\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Checks if user has selected a new version, or update the existing one.\n\t\t\t\t// (presumably the latest one, the way to know this is through the documentId)\n\n\t\t\t\t// If the header is not present, we are going to assume we want to create a new version\n\t\t\t\tfinal String versionHeader = request.getHeader(ORBEON_FORM_DEFINITION_VERSION);\n\n\t\t\t\tfinal boolean update = !FORM_BUILDER_NEXT_VERSION.equals(versionHeader) && versionHeader != null;\n\n\t\t\t\tLOG.debug(versionHeader);\n\n\t\t\t\tfinal YFormDefinitionData yformDefinition;\n\t\t\t\tif (update)\n\t\t\t\t{\n\t\t\t\t\t// only the latest version is able to be updated\n\t\t\t\t\tyformDefinition = yFormFacade.updateYFormDefinition(applicationId, formId, content, documentId);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tyformDefinition = yFormFacade.createYFormDefinition(applicationId, formId, content, documentId);\n\t\t\t\t}\n\n\t\t\t\tresponse.setStatus(HttpServletResponse.SC_OK);\n\t\t\t\tLOG.debug(\"Header [\" + versionHeader + \"] - Created Version [\" + yformDefinition.getVersion() + \"]\");\n\t\t\t\tresponse.setHeader(ORBEON_FORM_DEFINITION_VERSION, \"\" + yformDefinition.getVersion());\n\t\t\t}\n\t\t\tcatch (final YFormServiceException e)\n\t\t\t{\n\t\t\t\tLOG.error(e.getMessage(), e);\n\t\t\t\tresponse.sendError(HttpServletResponse.SC_BAD_REQUEST, e.getLocalizedMessage());\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresponse.sendError(HttpServletResponse.SC_EXPECTATION_FAILED, \"there is no form definition received.\");\n\t\t}\n\t}", "public static org.oep.ssomgt.model.Application updateApplication(\n\t\torg.oep.ssomgt.model.Application application)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getService().updateApplication(application);\n\t}", "@Override\n\tpublic int updApp(ApplicationEntity App) {\n\t\tint id=App.A_id;\n\t\tString zt=null;\n\t\tApplicationEntity app=appdao.selectappById(id);\n\t\tif(\"0\".equals(app.A_state)){\n\t\t\t zt=\"1\";\n\t\t\t\n\t\t}\n\t\tApplicationEntity app1=new ApplicationEntity();\n\t\tapp1.A_state=zt;\n\t\tapp1.A_id=id;\n\t\treturn appdao.updapp(app1);\n\t}", "int updateByPrimaryKey(AbiFormsForm record);", "@RequestMapping(value = \"/enquirys\",\n method = RequestMethod.PUT,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> update(@Valid @RequestBody Enquiry enquiry) throws URISyntaxException {\n log.debug(\"REST request to update Enquiry : {}\", enquiry);\n if (enquiry.getId() == null) {\n return create(enquiry);\n }\n enquiryRepository.save(enquiry);\n return ResponseEntity.ok().build();\n }", "public void update(SessionFactory factory, EihApps input) {\n\n\t}", "@Override\n public final void doPut() {\n try {\n checkPermissions(getRequest());\n if (id == null) {\n throw new APIMissingIdException(getRequestURL());\n }\n\n final String inputStream = getInputStream();\n if (inputStream.length() == 0) {\n api.runUpdate(id, new HashMap<String, String>());\n return;\n }\n\n Item.setApplyValidatorMandatoryByDefault(false);\n final IItem item = getJSonStreamAsItem();\n api.runUpdate(id, getAttributesWithDeploysAsJsonString(item));\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n\n }\n }", "@GetMapping(\"/updatePharmacist\")\n public String pharmacistFormUpdate(Model model) {\n model.addAttribute(\"pharmacist\", new Pharmacist());\n return \"updatePharmacist\";\n }", "@RequestMapping(path = \"/{appointmentId}\", method = RequestMethod.PUT, produces = \"application/json\", consumes = \"application/json\")\n\t@ResponseStatus(HttpStatus.OK)\n\tpublic Appointment update(@PathVariable Long appointmentId, @RequestBody Appointment appointment) {\n\t\treturn appointmentService.update(appointmentId, appointment);\n\t}", "public com.google.protobuf.Empty setApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.Application request);", "@Override\n\tpublic T update(F domainForm) throws Exception {\n\t\tT domainObj = getAppCrudDao().getDomainUsingPk(domainForm.getDomainId());\n\n\t\t// update input doaminForm object values with the database values\n\t\tdomainObj = getDomainFactory().populateUsingFormForUpdate(domainForm, domainObj);\n\n\t\treturn this.getAppCrudDao().update(domainObj);\n\t}", "@PutMapping(\"/update\")\n @ResponseStatus(HttpStatus.CREATED)//status 201\n public AsociadosProyecto update(@RequestBody AsociadosProyecto asociadosProyecto){\n return asociadosProyectoService.update(asociadosProyecto);\n }", "@RequestMapping(value = \"/films\", //\n\t\t\t\t\tmethod = RequestMethod.PUT, //\n\t\t\t\t\tproduces = {MediaType.APPLICATION_JSON_VALUE})\n\t@ResponseBody\n\tpublic Film updateFilm(@RequestBody Film film) {\n\t\treturn filmService.modifier(film);\n\t}", "public Team update(TeamDTO teamForm) throws TeamNotFoundException;", "@PUT \r\n @Path(\"/update\") \r\n @Consumes(MediaType.APPLICATION_JSON) \r\n @Produces(MediaType.TEXT_PLAIN) \r\n public String updateItem(String itemData) {\n \tJsonObject itemObject = new JsonParser().parse(itemData).getAsJsonObject(); \r\n \r\n \t//Read the values from the JSON object \r\n \tint appointmentID = itemObject.get(\"appointmentID\").getAsInt(); \r\n \tString patientID = itemObject.get(\"patientID\").getAsString(); \r\n \tString Date = itemObject.get(\"Date\").getAsString(); \r\n \tString docName = itemObject.get(\"docName\").getAsString(); \r\n \tString hosName = itemObject.get(\"hosName\").getAsString(); \r\n \tString appType = itemObject.get(\"appType\").getAsString(); \r\n \r\n String output = appObj.updateAppointment(appointmentID,patientID, Date, docName, hosName, appType); \r\n \r\n \treturn output; \r\n }", "@RequestMapping(method = RequestMethod.PUT, value = FR_SERVICE_RESOURCE_PREFIX\n\t\t\t+ \"/crud/{applicationId}/{formId}/{formDataType:data|draft}/{formDataId}/data.xml\")\n\tpublic void putFormData(@PathVariable final String applicationId, @PathVariable final String formId,\n\t\t\t@PathVariable final String formDataType, @PathVariable final String formDataId, final HttpServletRequest request,\n\t\t\tfinal HttpServletResponse response) throws ServletException, IOException, YFormServiceException\n\t{\n\t\tif (LOG.isDebugEnabled())\n\t\t{\n\t\t\tLOG.debug(\"putFormData: applicationId=\" + applicationId + \" | formId=\" + formId + \" | formDataId=\" + formDataId\n\t\t\t\t\t+ \" | formDataType=\" + formDataType);\n\t\t}\n\n\t\tfinal YFormDataTypeEnum type = YFormDataTypeEnum.valueOf(formDataType.toUpperCase());\n\n\t\tfinal InputStream input = request.getInputStream();\n\t\tfinal String formDataContent = IOUtils.toString(input, \"UTF-8\");\n\t\ttry\n\t\t{\n\t\t\tyFormFacade.createOrUpdateYFormData(applicationId, formId, formDataId, type, formDataContent);\n\t\t\tresponse.setStatus(HttpServletResponse.SC_OK);\n\t\t}\n\t\tcatch (final YFormServiceException e)\n\t\t{\n\t\t\tresponse.sendError(HttpServletResponse.SC_EXPECTATION_FAILED, e.getLocalizedMessage());\n\t\t}\n\t}", "@GetMapping(value = \"/update/{id}\")\n public String updateForm(@PathVariable(\"id\") Long id, Model model) {\n log.info(\"UPDATE itinerary by ID : {}\", id);\n \n Itinerary itinerary = itineraryService.findById(id);\n \n Set<Sector> sectors = sectorService.findAll();\n \n if (Objects.isNull(itinerary)) {\n log.info(\"Any itinerary found with ID : {}\", id);\n return \"redirect:/itineraries/\";\n }\n \n model.addAttribute(\"grades\", Grade.values());\n model.addAttribute(\"itinerary\", itinerary);\n model.addAttribute(\"sectors\", sectors);\n \n return UPDATE;\n }", "@PutMapping(\"/products\") \nprivate Products update(@RequestBody Products products) \n{ \nproductsService.saveOrUpdate(products); \nreturn products; \n}", "HttpPut putRequest(HttpServletRequest request, String address) throws IOException;", "public ResponseTranslator put() {\n setMethod(\"PUT\");\n return doRequest();\n }", "private void update() {\n ambianceModel.ambiance.uniq_id = ambianceModel._id.$oid;\n\n RestAdapter restAdapter = new RestAdapter.Builder().setLogLevel(RestAdapter.LogLevel.FULL).setEndpoint(getResources().getString(R.string.api)).build();\n final GsonBuilder builder = new GsonBuilder();\n builder.excludeFieldsWithoutExposeAnnotation();\n builder.disableHtmlEscaping();\n final Gson gson = builder.create();\n Request r = new Request(Singleton.token, ambianceModel._id.$oid, ambianceModel);\n String json = gson.toJson(r);\n Log.v(\"Ambiance activity\", json);\n\n final Lumhueapi lumhueapi = restAdapter.create(Lumhueapi.class);\n lumhueapi.updateAmbiance(r, new Callback<AmbianceApplyResponse>() {\n @Override\n public void success(AmbianceApplyResponse ambianceApplyResponse, Response response) {\n Log.v(\"Ambiance activity\", \"It worked\");\n }\n\n @Override\n public void failure(RetrofitError error) {\n String tv = error.getMessage();\n Log.v(\"Ambiance activity\", tv + \"\");\n }\n });\n }", "@RequestMapping(value = \"/json/data/app/(*:appId)/version/(*:appVersion)/form/(*:formDefId)/submit\", method = RequestMethod.POST)\n public void postFormSubmit(final HttpServletRequest request, final HttpServletResponse response,\n @RequestParam(\"appId\") final String appId,\n @RequestParam(\"appVersion\") final String appVersion,\n @RequestParam(\"formDefId\") final String formDefId)\n throws IOException, JSONException {\n\n LogUtil.info(getClass().getName(), \"Executing JSON Rest API [\" + request.getRequestURI() + \"] in method [\" + request.getMethod() + \"] as [\" + WorkflowUtil.getCurrentUsername() + \"]\");\n\n try {\n // get version, version 0 indicates published version\n long version = Long.parseLong(appVersion) == 0 ? appDefinitionDao.getPublishedVersion(appId) : Long.parseLong(appVersion);\n\n // get current App\n AppDefinition appDefinition = appDefinitionDao.loadVersion(appId, version);\n if (appDefinition == null) {\n // check if app valid\n throw new ApiException(HttpServletResponse.SC_BAD_REQUEST, \"Invalid application [\" + appId + \"] version [\" + version + \"]\");\n }\n\n // set current app definition\n AppUtil.setCurrentAppDefinition(appDefinition);\n\n Form form = appService.viewDataForm(appDefinition.getAppId(), appDefinition.getVersion().toString(), formDefId, null, null, null, null, null, null);\n\n // read request body and convert request body to json\n final FormData formData = extractBodyToFormData(request, form);\n\n // submit form\n final FormData result = appService.submitForm(form, formData, false);\n\n // construct response\n final JSONObject jsonResponse = new JSONObject();\n if (result.getFormErrors() != null && !result.getFormErrors().isEmpty()) {\n // show error message\n result.getFormErrors().forEach((key, value) -> {\n try {\n jsonResponse.put(key, value);\n } catch (JSONException ignored) {\n }\n });\n } else {\n // set current data as response\n FormRowSet rowSet = appService.loadFormData(form, result.getPrimaryKeyValue());\n if(rowSet == null || rowSet.isEmpty()) {\n response.setStatus(HttpServletResponse.SC_NO_CONTENT);\n } else {\n response.setStatus(HttpServletResponse.SC_OK);\n JSONObject jsonData = new JSONObject(rowSet.get(0));\n jsonResponse.put(\"data\", jsonData);\n jsonResponse.put(\"message\", MESSAGE_SUCCESS);\n jsonResponse.put(\"digest\", getDigest(jsonData));\n }\n }\n\n response.getWriter().write(jsonResponse.toString());\n } catch (ApiException e) {\n response.sendError(e.getErrorCode(), e.getMessage());\n LogUtil.warn(getClass().getName(), e.getMessage());\n }\n }", "@GetMapping(\"/updateAccount\")\n public String updateProfile(HttpServletRequest request,Model model){\n Map<String, String[]> userUpdateParam = request.getParameterMap();\n\n String adminId[] = userUpdateParam.get(\"adminId\");\n String role[] = userUpdateParam.get(\"role\");\n String password[] = userUpdateParam.get(\"password\");\n String adminEmail[] = userUpdateParam.get(\"adminEmail\");\n\n ApplicationUser applicationUser = new ApplicationUser();\n applicationUser.setAdminId(adminId[0]);\n applicationUser.setRole(role[0]);\n applicationUser.setPassword(password[0]);\n applicationUser.setEmail(adminEmail[0]);\n\n sportyShoesService.updateProfile(applicationUser);\n\n return \"profileUpdateSuccess\";\n }", "@PutMapping\n public ResponseEntity<AccountResponse> updateAccount(\n @Validated @RequestBody AccountForm accountForm,\n @RequestParam(\"acctPid\") UUID accountPublicId) {\n\n\n AccountResponse responseDto = accountModifier.update(accountForm, accountPublicId);\n return new ResponseEntity<>(responseDto,HttpStatus.OK);\n }", "public void updateAppSpec(String accountId, String appId, ApplicationSpecification spec) {\n // NOTE: we use Gson underneath to do serde, as it doesn't serialize inner classes (which we use everywhere for\n // specs - see forwarding specs), we want to wrap spec with DefaultApplicationSpecification\n spec = DefaultApplicationSpecification.from(spec);\n LOG.trace(\"App spec to be updated: id: {}: spec: {}\", appId, GSON.toJson(spec));\n Key key = new Key.Builder().add(TYPE_APP_META, accountId, appId).build();\n ApplicationMeta existing = get(key, ApplicationMeta.class);\n if (existing == null) {\n String msg = String.format(\"No meta for account %s app %s exists\", accountId, appId);\n LOG.error(msg);\n throw new IllegalArgumentException(msg);\n }\n\n LOG.trace(\"Application exists in mds: id: {}, spec: {}\", existing);\n ApplicationMeta updated = ApplicationMeta.updateSpec(existing, spec);\n write(key, updated);\n\n for (StreamSpecification stream : spec.getStreams().values()) {\n writeStream(accountId, stream);\n }\n }", "@PutMapping(\"/book\")\n public ResponseEntity<?> update(@RequestBody Book book) {\n bookService.update(book);\n\n return ResponseEntity.ok().body(\"Book has been updated successfully.\");\n }", "@PreAuthorize(\"hasRole('ROLE_ADMIN')\")\n\t@RequestMapping(value = \"/{id}\", params = \"form\", method = RequestMethod.GET) \n\tpublic String updateForm(@PathVariable(\"id\") Long id, Model uiModel) {\n\t\tuiModel.addAttribute(\"customer\", customerService.findById(id));\n\t\treturn \"customers/update\"; \n\t}", "@RequestMapping(value=\"/update\", method = RequestMethod.PUT)\r\n\t @ResponseBody\r\n//\t public String updateUser(Long id, String userName, String phone, String email, String password, Date dateOfBirth, String userNotes) {\r\n\t public UserDto update(UserDto userDto) \r\n\t {\r\n\t\t return service.update(userDto);\r\n\t }", "void updateApp(String marathonJson);", "@Test(groups = \"wso2.am\", description = \"Edit application by application by user in application group\",\n dependsOnMethods = \"testEditApplicationByApplicationOwner\")\n public void testEditApplicationByUserInApplicationGroup() throws ApiException {\n List<ApplicationInfoDTO> user2AllAppsList = restAPIStoreClientUser2.getAllApps().getList();\n ApplicationDTO applicationDTO = restAPIStoreClientUser2.getApplicationById(userOneSharedApplicationId);\n Assert.assertNotNull(applicationDTO);\n Assert.assertEquals(applicationDTO.getName(), SHARED_APPLICATION_NAME);\n\n //Edit application by a user in application group\n HttpResponse serviceResponse = restAPIStoreClientUser2.updateApplicationByID(userOneSharedApplicationId,\n APPLICATION_NAME, \"This app has been edited by user1\",\n APIMIntegrationConstants.APPLICATION_TIER.TEN_PER_MIN, ApplicationDTO.TokenTypeEnum.JWT, groups);\n Assert.assertEquals(serviceResponse.getResponseCode(), HttpStatus.SC_FORBIDDEN);\n }", "@Override\r\n\tpublic void doUpdate(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\t\r\n\t}", "@Path(\"students\")\n\t@PUT\n\t@Consumes(MediaType.APPLICATION_FORM_URLENCODED)\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Object updateStudent_Appform(@FormParam(\"studentId\") String studentId, @FormParam(\"name\") String name, @FormParam(\"major\")String major,@FormParam(\"country\")String country,@Context UriInfo uriInfo){\n\t\tStudent s=new Student(studentId, name, major, country);\n\t\t/*\n\t\t *Server side validation. If an attacker circumvents the client side validation,\n\t\t *the server will detect it and reject the data by throwing Code400 \n\t\t * \n\t\t * This same Regex pattern utilized on the client side.\n\t\t */\n\t\t String expr_id=\"^([G]{1})([0-9]{6})$\";\n\t\t String expr_name=\"^([a-zA-Z]{2,20})$\";\n\t\t String expr_major=\"^([a-zA-Z]{3})$\";\n\t\t String expr_country=\"^([A-Z]{2,4})$\";\n\t\t List<String> errors=new ArrayList<String>();\n\t\t CharSequence inputStr1 = studentId.trim();\n\t\t CharSequence inputStr2 = name.trim();\n\t\t CharSequence inputStr3 = major.trim();\n\t\t CharSequence inputStr4 =country.trim();\n\t\t Pattern pattern1 = Pattern.compile(expr_id,Pattern.CASE_INSENSITIVE);\n\t\t Matcher matcher1 = pattern1.matcher(inputStr1);\n\t\t Pattern pattern2 = Pattern.compile(expr_name,Pattern.CASE_INSENSITIVE);\n\t\t Matcher matcher2 = pattern2.matcher(inputStr2);\n\t\t Pattern pattern3 = Pattern.compile(expr_major,Pattern.CASE_INSENSITIVE);\n\t\t Matcher matcher3 = pattern3.matcher(inputStr3);\n\t\t Pattern pattern4 = Pattern.compile(expr_country,Pattern.CASE_INSENSITIVE);\n\t\t Matcher matcher4 = pattern4.matcher(inputStr4);\n\n\t\t\tSystem.out.println(studentId+matcher1.matches());\n\t\t\tSystem.out.println(name+matcher2.matches());\n\t\t\tSystem.out.println(major+matcher3.matches());\n\t\t\tSystem.out.println(country+matcher4.matches());\n\t\t if(!matcher1.matches()) errors.add(\"the Student Id format is invalid\");\n\t\t if(!matcher2.matches()) errors.add(\"the Student Name format is invalid\");\n\t\t if(!matcher3.matches()) errors.add(\"the Student Major format is invalid\");\n\t\t if(!matcher4.matches()) errors.add(\"the Student Country format is invalid\");\n\t\t if(matcher1.matches()&&matcher2.matches()&&matcher3.matches()&&matcher4.matches())\n\t\t {\n\t\t \n\t\t if(SetupDB.IdInuse(studentId)){\n\t\tSetupDB.updateForm(s);\n\t\tSystem.out.println(s);\n\t\tListStudents =Json_Parser.Object_to_Json(SetupDB.List_students());\n\t\treturn Json_Parser.Object_to_Json(SetupDB.Retrieve(studentId));\n\t\t\n\t\t}else{\n\t\t\terrors.add(\"This Student Id does not exist!\");\n\t\t\treturn BadRequestException.toResponse(errors);\n\t\t}\n\t\t}\n\t\tSystem.out.println(\"cannot save\");\n\t\treturn BadRequestException.toResponse(errors);\n\t}", "@RequestMapping(value=\"/infact-record\", method=RequestMethod.PUT)\n\tpublic ResponseEntity<?> update(@RequestBody InfactRecord infactRecord) {\n\t\tinfactRecordServiceImpl.update(infactRecord);\n\t\treturn ResponseEntity.ok().body(\n\t\t\t\t\"infact-record has been updated successfully.\");\n\t}", "int updateByPrimaryKeySelective(AbiFormsForm record);", "public void testUpdateWithFormError() {\n Basket_up.setPath(BasketPath);\n TUpdate_Return[] Baskets_update_out = basketService.update(new TUpdate_Input[] { Basket_up });\n Baskets_update_out[0].setFormErrors(new TFormError[] { new TFormError() });\n assertEquals(\"updateWithFormError resultset\", Baskets_update_out[0].getFormErrors().length, 1);\n }", "public void put(Object key, Object value) throws AspException\n {\n throw new AspReadOnlyException(\"Request.Form\");\n }", "public int updateUser(Candidat c) {\n String url = StaticVars.baseURL + \"/updateuser\";\n System.out.println(url);\n ConnectionRequest req = new ConnectionRequest();\n\n req.setUrl(url);\n req.setPost(true);\n\nreq.setHttpMethod(\"PUT\"); \n\n\n String can = String.valueOf(currentCandidat.getId());\n req.addArgument(\"id\", can);\n String login =String .valueOf(currentCandidat.getLogin());\n req.addArgument(\"login\",login);\n req.addArgument(\"email\", String .valueOf(currentCandidat.getEmail()));\n req.addArgument(\"pays\", String .valueOf(currentCandidat.getPays()));\n req.addArgument(\"ville\", String .valueOf(currentCandidat.getVille()));\n req.addArgument(\"tel\", Integer.toString(currentCandidat.getTel()));\n req.addArgument(\"domaine\", String .valueOf(currentCandidat.getDomaine()));\n\n req.addResponseListener(new ActionListener<NetworkEvent>() {\n @Override\n public void actionPerformed(NetworkEvent evt) {\n result = req.getResponseCode();\n \n System.out.println(result);\n }\n });\n NetworkManager.getInstance().addToQueueAndWait(req);\n\n return result;\n }", "@Override\n public void update(AssessmentDTO assessmentDTO) {\n Optional<Application> applicationOptional = applicationRepository.findById(assessmentDTO.getApplicationId());\n if (applicationOptional.isPresent()) {\n Application application = applicationOptional.get();\n String pass = assessmentDTO.getPass();\n if (pass.equals(\"pass\")) {\n application.setStep(\"+\" + assessmentDTO.getStep());\n } else if (pass.equals(\"fail\")) {\n application.setStep(\"-\" + assessmentDTO.getStep());\n }\n applicationRepository.save(application);\n } else {\n throw new NotFoundException(\"Application not found\");\n }\n }", "@RestAPI\n \t@PreAuthorize(\"hasAnyRole('A')\")\n \t@RequestMapping(value = \"/api/{id}\", params = \"action=update\", method = RequestMethod.PUT)\n \tpublic HttpEntity<String> update(@PathVariable(\"id\") Long id) {\n \t\tagentManagerService.update(id);\n \t\treturn successJsonHttpEntity();\n \t}", "public void update()\n {\n this.controller.updateAll();\n theLogger.info(\"Update request recieved from UI\");\n }", "@POST\n @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\n @Path(\"user/account/address\")\n public void updateAddress(@FormParam(\"address\") String address) {\n System.out.println(address);\n }", "@PUT\n @Path(\"/{requirementId}\")\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n @ApiOperation(value = \"This method updates a specific requirement.\")\n @ApiResponses(value = {\n @ApiResponse(code = HttpURLConnection.HTTP_OK, message = \"Returns the updated requirement\", response = RequirementEx.class),\n @ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = \"Unauthorized\"),\n @ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = \"Not found\"),\n @ApiResponse(code = HttpURLConnection.HTTP_INTERNAL_ERROR, message = \"Internal server problems\")\n })\n public Response updateRequirement(@PathParam(\"requirementId\") int requirementId,\n @ApiParam(value = \"Requirement entity\", required = true) Requirement requirementToUpdate) {\n DALFacade dalFacade = null;\n try {\n String registratorErrors = service.bazaarService.notifyRegistrators(EnumSet.of(BazaarFunction.VALIDATION, BazaarFunction.USER_FIRST_LOGIN_HANDLING));\n if (registratorErrors != null) {\n ExceptionHandler.getInstance().throwException(ExceptionLocation.BAZAARSERVICE, ErrorCode.UNKNOWN, registratorErrors);\n }\n UserAgent agent = (UserAgent) Context.getCurrent().getMainAgent();\n long userId = agent.getId();\n Gson gson = new Gson();\n Vtor vtor = service.bazaarService.getValidators();\n vtor.validate(requirementToUpdate);\n if (vtor.hasViolations()) {\n ExceptionHandler.getInstance().handleViolations(vtor.getViolations());\n }\n dalFacade = service.bazaarService.getDBConnection();\n Integer internalUserId = dalFacade.getUserIdByLAS2PeerId(userId);\n boolean authorized = new AuthorizationManager().isAuthorized(internalUserId, PrivilegeEnum.Modify_REQUIREMENT, dalFacade);\n if (!authorized) {\n ExceptionHandler.getInstance().throwException(ExceptionLocation.BAZAARSERVICE, ErrorCode.AUTHORIZATION, Localization.getInstance().getResourceBundle().getString(\"error.authorization.requirement.modify\"));\n }\n if (requirementToUpdate.getId() != 0 && requirementId != requirementToUpdate.getId()) {\n ExceptionHandler.getInstance().throwException(ExceptionLocation.BAZAARSERVICE, ErrorCode.UNKNOWN, \"Id does not match\");\n }\n dalFacade.followRequirement(internalUserId, requirementToUpdate.getId());\n RequirementEx updatedRequirement = dalFacade.modifyRequirement(requirementToUpdate, internalUserId);\n service.bazaarService.getNotificationDispatcher().dispatchNotification(service, updatedRequirement.getLastupdated_time(), Activity.ActivityAction.UPDATE, updatedRequirement.getId(),\n Activity.DataType.REQUIREMENT, updatedRequirement.getComponents().get(0).getId(), Activity.DataType.COMPONENT, internalUserId);\n return Response.ok(gson.toJson(updatedRequirement)).build();\n } catch (BazaarException bex) {\n if (bex.getErrorCode() == ErrorCode.AUTHORIZATION) {\n return Response.status(Response.Status.UNAUTHORIZED).entity(ExceptionHandler.getInstance().toJSON(bex)).build();\n } else if (bex.getErrorCode() == ErrorCode.NOT_FOUND) {\n return Response.status(Response.Status.NOT_FOUND).entity(ExceptionHandler.getInstance().toJSON(bex)).build();\n } else {\n return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(ExceptionHandler.getInstance().toJSON(bex)).build();\n }\n } catch (Exception ex) {\n BazaarException bex = ExceptionHandler.getInstance().convert(ex, ExceptionLocation.BAZAARSERVICE, ErrorCode.UNKNOWN, \"\");\n return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(ExceptionHandler.getInstance().toJSON(bex)).build();\n } finally {\n service.bazaarService.closeDBConnection(dalFacade);\n }\n }", "@GetMapping(\"/update/{id}\")\n public String showSocioToUpdate(@PathVariable Integer id, Model model) {\n List<Cargo> cargos = cargoService.getCargos();\n Persona persona = personaService.getById(id);\n model.addAttribute(\"cargos\", cargos);\n model.addAttribute(\"persona\", persona);\n return \"/backoffice/socioFormEdit\";\n }", "E update(IApplicationUser user, ID id, U updateDto);", "@RequestMapping(method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE)\n //Request Body is requesting the student parameter\n public void updateStudent(@RequestBody Student student){\n studentService.updateStudent(student);\n }", "@Test\r\n\tpublic void updateProductDetails() {\r\n\r\n\t\tRestAssured.baseURI = \"http://localhost:9000/products\";\r\n\t\tRequestSpecification request = RestAssured.given();\r\n\t\tJSONObject requestParams = new JSONObject();\r\n\t\trequestParams.put(\"name\", \"Banana\");\r\n\t\trequest.header(\"Content-Type\", \"application/json\");\r\n\t\trequest.body(requestParams.toString());\r\n\t\tResponse response = request.put(\"/5\");\r\n\t\tSystem.out.println(\"Update Responce Body ----->\" + response.asString());\r\n\t\tint statusCode = response.getStatusCode();\r\n\t\tAssert.assertEquals(statusCode, 200);\r\n\r\n\t}", "@PostMapping(\"/update\")\n public String update(@ModelAttribute Mod mod){\n modService.update(mod);\n return \"redirect:/mods\";\n }", "@Test\n public void updateBaasClientUsingPutTest() throws ApiException {\n UUID nucleusClientId = null;\n UpdateBaasClientCO baasClientCO = null;\n BaasClientVO response = api.updateBaasClientUsingPut(nucleusClientId, baasClientCO);\n\n // TODO: test validations\n }", "public void updateLicensePlate(LicensePlateForm form) {\n\t}", "@RequestMapping(value = \"/test\", method = RequestMethod.PUT)\n public void test() {}", "@Override\n\tpublic void updateItems(Session session){\n\t\ttry{\n\t\t\tSystem.out.print(\"++++------++++Update items here++++------++++\\n\");\n\t\t\t//scanner class allows the admin to enter his/her input\n\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\t//read input item id, (name, price or quantity)-whichever field is to be updated\n\t\t\tSystem.out.print(\"Enter Item Id to update: \");\n\t\t\tint itemId = scanner.nextInt();\n\n\t\t\tSystem.out.println(\"----Enter Item attribute to be updated----\");\n\t\t\tSystem.out.println(\"Any of the attributes either: price or quantity or desc::\");\n\t\t\tString itemAttribute = scanner.next();\n\n\t\t\tSystem.out.print(\"Enter Item attribute Value: \");\n\t\t\tString attributeValue = scanner.next();\n\n\t\t\t//pass these input items to client controller\n\t\t\tsamp=mvc.updateItems(session,itemId,itemAttribute,attributeValue);\n\t\t\tSystem.out.println(samp);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App- Add Items Exception: \" +e.getMessage());\n\t\t}\n\t}", "public void edit(RequestBean request) {\n\t\t\r\n\t}", "@Override\r\n\tpublic ResponseEntity<String> update(@Valid @RequestBody Pais updateMODEL, Integer id) {\n\t\treturn null;\r\n\t}", "E update(ID id, E entity, RequestContext context);", "@PutMapping(\"/Mensajeros/actualizar/{id}\")\r\npublic Mensajeros update(@RequestBody Mensajeros ms, @PathVariable(\"id\") Long id) {\r\n\tMensajeros oldM = mService.buscarM_Id(id);\r\n\tString nombreM = ms.getNombreM();\r\n\toldM.setNombreM(nombreM);\r\n\tString cedulaM = ms.getCedulaM();\r\n\toldM.setCedulaM(cedulaM);\r\n\tString celularM = ms.getCelularM();\r\n\toldM.setCelularM(celularM);\r\n\tString placa = ms.getPlaca();\r\n\toldM.setPlaca(placa);\r\n\tString direccionM = ms.getDireccionM();\r\n\toldM.setDireccionM(direccionM);\r\n\treturn mService.actualizarM(oldM);\r\n}", "public<T> Future<Void> update(String pathinfo) throws APIException, CadiException {\n\t\tfinal int idx = pathinfo.indexOf('?');\n\t\tfinal String qp; \n\t\tif(idx>=0) {\n\t\t\tqp=pathinfo.substring(idx+1);\n\t\t\tpathinfo=pathinfo.substring(0,idx);\n\t\t} else {\n\t\t\tqp=queryParams;\n\t\t}\n\n\t\tEClient<CT> client = client();\n\t\tclient.setMethod(PUT);\n\t\tclient.addHeader(CONTENT_TYPE, typeString(Void.class));\n\t\tclient.setQueryParams(qp);\n\t\tclient.setFragment(fragment);\n\t\tclient.setPathInfo(pathinfo);\n//\t\tclient.setPayload(new EClient.Transfer() {\n//\t\t\t@Override\n//\t\t\tpublic void transfer(OutputStream os) throws IOException, APIException {\n//\t\t\t}\n//\t\t});\n\t\tclient.send();\n\t\tqueryParams = fragment = null;\n\t\treturn client.future(null);\n\t}", "@POST\n \t@Path(\"/updateConcept\")\n \t@Consumes({ MediaType.APPLICATION_JSON })\n \tpublic ThesaurusConceptView updateConcept(\n \t\t\tThesaurusConceptView thesaurusConceptViewJAXBElement)\n \t\t\tthrows BusinessException, TechnicalException {\n \n \t\tThesaurusConcept convertedConcept = thesaurusConceptViewConverter\n \t\t\t\t.convert(thesaurusConceptViewJAXBElement);\n \n \t\tList<ThesaurusTerm> terms = termViewConverter\n \t\t\t\t.convertTermViewsInTerms(thesaurusConceptViewJAXBElement\n .getTerms(), true);\n \t\tlogger.info(\"Number of converted terms : \" + terms.size());\n \n \t\tList<ThesaurusTerm> preferedTerm = thesaurusTermService\n \t\t\t\t.getPreferedTerms(terms);\n \n \t\t// Business rule : a concept must have at least 1 term\n \t\tif (preferedTerm.size() == 0) {\n \t\t\tthrow new BusinessException(\"A concept must have a prefered term\",\n \t\t\t\t\t\"missing-preferred-term-for-concept\");\n \t\t}\n \n \t\t// Business rule : a concept mustn't have more than one prefered term\n \t\tif (preferedTerm.size() > 1) {\n \t\t\tthrow new BusinessException(\n \t\t\t\t\t\"A concept must have at only one prefered term\",\n \t\t\t\t\t\"to-many-preferred-terms-for-concept\");\n \t\t}\n \n \t\tif (StringUtils.isNotEmpty(thesaurusConceptViewJAXBElement.getIdentifier())) {\n \t\t\t\tList<ThesaurusTerm> origin = thesaurusTermService\n \t\t\t\t\t\t.getTermsByConceptId(convertedConcept.getIdentifier());\n \t\t\t\tthesaurusTermService.markTermsAsSandboxed(terms, origin);\n \t\t\t\n \t\t}\n \n \t\t// We save or update the concept\n \t\tlogger.info(\"Saving concept in DB\");\n \n \t\tThesaurusConcept returnConcept = thesaurusConceptService\n \t\t\t\t.updateThesaurusConcept(convertedConcept, terms, thesaurusConceptViewJAXBElement.getAssociatedConcepts());\n \n indexerService.addConcept(returnConcept);\n \n \t\t// Return ThesaurusConceptView created/updated\n \t\treturn thesaurusConceptViewConverter.convert(returnConcept, terms);\n \t}", "public static RestTask obtainFormPutTask(String url, List<Pair<String, String>> formData)\n throws IOException {\n HttpURLConnection connection = createDefaultConnection(url);\n attachAuthentication(connection);\n connection.setRequestMethod(\"PUT\");\n connection.setDoOutput(true);\n\n RestTask task = new RestTask(connection);\n task.setFormBody(formData, Charset.defaultCharset());\n return task;\n }", "int updateByExample(@Param(\"record\") AbiFormsForm record, @Param(\"example\") AbiFormsFormExample example);", "Optional<RacePlanForm> partialUpdate(RacePlanForm racePlanForm);", "@PutMapping\n public void updateUser(@RequestBody User user) { userService.updateUser(user);}", "public void testUpdate() {\n Basket_up.setPath(BasketPath);\n TUpdate_Return[] Baskets_update_out = basketService.update(new TUpdate_Input[] { Basket_up });\n assertNoError(Baskets_update_out[0].getError());\n assertNull(\"No FormErrors\", Baskets_update_out[0].getFormErrors());\n assertTrue(\"updated?\", Baskets_update_out[0].getUpdated());\n }", "public boolean update(JSONObject jsonProgram);", "private void updateImformation(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tint fileId= Integer.parseInt(request.getParameter(\"fileId\"));\n\t\tString caption= request.getParameter(\"caption\");\n\t\tString label= request.getParameter(\"label\");\n\t\tString fileName= request.getParameter(\"fileName\");\n\t\tFiles file= new Files(fileId, fileName, label, caption);\n\t\tnew FilesDAO().update(fileId, caption, label);;\n\t\tlistingPage(request, response);\n\t}", "@RequestMapping(value=\"/Scheduling/updateAppointment\", method= {RequestMethod.PUT, RequestMethod.GET})\r\n\tpublic String updateAppointment(Scheduling scheduling) {\r\n\t\tschedulingService.createAppointment(scheduling);\r\n\t\treturn \"redirect:/Scheduling\";\r\n\t}", "@PreAuthorize(\"hasRole('ROLE_ADMIN')\")\n\t@RequestMapping(value = \"/users\", method = RequestMethod.PUT)\n\tpublic AppUser updateUser(@RequestBody AppUser appUser) {\n\t\tif (appUserRepository.findOneByUsername(appUser.getUsername()) != null\n\t\t\t\t&& appUserRepository.findOneByUsername(appUser.getUsername()).getId() != appUser.getId()) {\n\t\t\tthrow new RuntimeException(\"Username already exist\");\n\t\t}\n\t\treturn appUserRepository.save(appUser);\n\t}", "@RequestMapping(value = \"/{id}\", method = RequestMethod.PUT)\n public void put(@PathVariable(\"id\") String id, HttpServletRequest req){\n throw new NotImplementedException(\"To be implemented\");\n }", "java.util.concurrent.Future<UpdateApplicationResult> updateApplicationAsync(UpdateApplicationRequest updateApplicationRequest,\n com.amazonaws.handlers.AsyncHandler<UpdateApplicationRequest, UpdateApplicationResult> asyncHandler);", "java.util.concurrent.Future<UpdateApplicationResult> updateApplicationAsync(UpdateApplicationRequest updateApplicationRequest,\n com.amazonaws.handlers.AsyncHandler<UpdateApplicationRequest, UpdateApplicationResult> asyncHandler);", "void doPut(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;", "protected void edit(HttpServletRequest request, HttpServletResponse response, CleanerServiceItemForm _CleanerServiceItemForm, CleanerServiceItem _CleanerServiceItem) throws Exception{\n\r\n m_logger.debug(\"Before update \" + CleanerServiceItemDS.objectToString(_CleanerServiceItem));\r\n\r\n _CleanerServiceItem.setServiceId(WebParamUtil.getLongValue(_CleanerServiceItemForm.getServiceId()));\r\n\r\n\r\n _CleanerServiceItem.setServiceItemId(WebParamUtil.getLongValue(_CleanerServiceItemForm.getServiceItemId()));\r\n\r\n\r\n _CleanerServiceItem.setItemType(WebParamUtil.getIntegerValue(_CleanerServiceItemForm.getItemType()));\r\n\r\n\r\n _CleanerServiceItem.setTitle(WebParamUtil.getStringValue(_CleanerServiceItemForm.getTitle()));\r\n\r\n\r\n _CleanerServiceItem.setImagePath(WebParamUtil.getStringValue(_CleanerServiceItemForm.getImagePath()));\r\n\r\n\r\n _CleanerServiceItem.setImagePathLocal(WebParamUtil.getStringValue(_CleanerServiceItemForm.getImagePathLocal()));\r\n\r\n\r\n _CleanerServiceItem.setBasePrice(WebParamUtil.getDoubleValue(_CleanerServiceItemForm.getBasePrice()));\r\n\r\n\r\n _CleanerServiceItem.setNote(WebParamUtil.getStringValue(_CleanerServiceItemForm.getNote()));\r\n\r\n\r\n\r\n m_actionExtent.beforeUpdate(request, response, _CleanerServiceItem);\r\n m_ds.update(_CleanerServiceItem);\r\n m_actionExtent.afterUpdate(request, response, _CleanerServiceItem);\r\n m_logger.debug(\"After update \" + CleanerServiceItemDS.objectToString(_CleanerServiceItem));\r\n }", "public void update() {\n\n dbWork.cleanAll();\n\n List<DataFromServiceKudaGo> list = requestDataFromService();\n\n List<Film> films = new ArrayList<>();\n for (DataFromServiceKudaGo data : list) {\n Film film = new Film(list.indexOf(data), data.getNameMovie(), data.getPosterMoviePath(),\n data.getRunning_time(), data.getPrice(), data.getImax(),\n data.getCountryFilm(), data.getYearFilm(), data.getTrailerFilm(),\n data.getAgeFilm(), data.getDirectorFilm(), data.getNameCinema(),\n data.getAddressCinema(), data.getPhone(), data.getStationAboutCinema(),\n data.getPosterCinemaPath(), data.getBeginning_time(), data.getDescription());\n films.add(film);\n }\n\n dbWork.setFilms(films);\n\n fillShows();\n }", "public void updateContact(View v){\n\n String uid = appState.firebaseReference.push().getKey();\n String businessID = ubidField.getText().toString();\n String name = unameField.getText().toString();\n String location = ulocationField.getText().toString();\n String primaryBiz = uprimaryBizField.getText().toString();\n String address = uaddressField.getText().toString();\n\n Map<String, Object> businessUpdate = receivedPersonInfo.toMap();\n businessUpdate.put(\"uid\", uid);\n businessUpdate.put(\"bid\", businessID);\n businessUpdate.put(\"name\", name);\n businessUpdate.put(\"primaryBiz\", primaryBiz);\n businessUpdate.put(\"address\", address);\n businessUpdate.put(\"location\", location);\n\n appState.firebaseReference.child(receivedPersonInfo.uid).setValue(businessUpdate);\n finish();\n Intent intent=new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "@PUT\n\t@Path(\"/\") \n\t@Consumes(MediaType.APPLICATION_JSON) \n\t@Produces(MediaType.TEXT_PLAIN) \n\tpublic String updatesystem_editor(String systData) \n\t{\n\t\tJsonObject itemObject = new JsonParser().parse(systData).getAsJsonObject(); \n\t\t\n\t\t//Read the values from the JSON object\n\t\tString sid = itemObject.get(\"sid\").getAsString(); \n\t\tString username = itemObject.get(\"username\").getAsString(); \n\t\tString email = itemObject.get(\"email\").getAsString(); \n\t\tString password = itemObject.get(\"password\").getAsString(); \n\t\t\n\t\tString output = sysObj.updatesystem_editor(sid, username, email,password);\n\t\t\n\t\treturn output; \n\t}", "public abstract Response update(Request request, Response response);", "public void updateEmpresa() {\n Empresa empresa = empresaDAO.load(config.getApplicationEmpresaId());\n this.textTitle.setText(MessageFormat.format(resource.getString(\"main.title\"), empresa.getNome()));\n }", "public Form getUpdateForm() throws PublicationTemplateException;", "public void updateReview() throws ServletException, IOException {\r\n\t\tInteger reviewId = Integer.parseInt(request.getParameter(\"reviewId\"));\r\n\t\tString headline = request.getParameter(\"headline\");\r\n\t\tString comment = request.getParameter(\"comment\");\r\n\t\t\r\n\t\tReview review = reviewDAO.get(reviewId);\r\n\t\treview.setHeadline(headline);\r\n\t\treview.setComment(comment);\r\n\t\t\r\n\t\treviewDAO.update(review);\r\n\t\t\r\n\t\tString message = \"The review has been updated successfully.\";\r\n\t\t\r\n\t\tlistAllReview(message);\r\n\t\t\r\n\t}", "@RequestMapping(method = RequestMethod.PUT)\r\n public ResponseObject update(@Validated @RequestBody Candidate candidate) {\r\n return candidateService.update(candidate);\r\n }", "@Test\n public void updateBaasBusinessUsingPutTest() throws ApiException {\n UUID nucleusBusinessId = null;\n UpdateBaasBusinessCO baasBusinessCO = null;\n BaasBusinessVO response = api.updateBaasBusinessUsingPut(nucleusBusinessId, baasBusinessCO);\n\n // TODO: test validations\n }", "@PUT\n @Path(\"/{prefix}\")\n @Produces(\"application/json\")\n @Consumes(MediaType.APPLICATION_FORM_URLENCODED) //MediaType.MULTIPART_FORM_DATA)//\n @ApiOperation(value = \"Update single section of METS file.\", notes = \"Section will be selected by prefix and sectionID (optional) of the metadata registered in KIT Data Manager.\"\n + \" If there are multiple sections with the same type an error will occur.\")\n @ApiResponses(value = {\n @ApiResponse(code = 201, message = \"Successfully updated.\")\n ,\n @ApiResponse(code = 400, message = \"Bad request. At least one Parameter is invalid.\")\n ,\n @ApiResponse(code = 401, message = \"Unauthorized access.\")\n ,\n @ApiResponse(code = 404, message = \"ID doesn't exist.\")\n ,\n @ApiResponse(code = 500, message = \"Internal server error\")\n })\n public Response updatePartialXML(\n @ApiParam(value = \"GroupId the user belongs to. (User has to be at least manager)\", required = false, defaultValue = \"USERS\") @FormParam(\"groupId\") String pGroupId,\n @ApiParam(value = \"Unique ID for the metadata (should be identical to id of linked Digital Data Object).\", required = true) @FormParam(value = \"oid\") String pDigitalObjectId,\n @ApiParam(value = \"Section ID for the metadata (mandatory if multiple sections with same type exists).\", required = false) @FormParam(value = \"sectionId\") String pSectionId,\n @ApiParam(value = \"Content of XML file to be stored\", type = \"File\", name = \"xmlFile\", required = true) @FormParam(value = \"xmlFile\") String pFileContent) {\n if (LOGGER.isTraceEnabled()) {\n LOGGER.trace(\"update section XML: groupID = {} & digitalObjectId = {} & section ID = {} & section file = {}\", pGroupId, pDigitalObjectId, pSectionId, pFileContent);\n }\n\n Response.Status statusCode = Response.Status.CREATED;\n StringBuilder sb = new StringBuilder();\n\n try {\n String metsDocument = new RestMetaStoreController().updatePartialMetsDocument(context, pGroupId, pDigitalObjectId, pSectionId, pFileContent);\n\n sb.append(messageToJson(metsDocument));\n } catch (MetaStoreException ex) {\n LOGGER.error(\"Error while updating section of mets file\", ex);\n sb.append(exceptionToJson(ex));\n statusCode = Response.Status.fromStatusCode(ex.getHttpStatus());\n } catch (Exception ex) {\n LOGGER.error(\"Uncatched error while updating section of mets file\", ex);\n sb.append(exceptionToJson(ex));\n statusCode = Response.Status.INTERNAL_SERVER_ERROR;\n }\n\n return Response.status(statusCode).entity(sb.toString()).build();\n }", "@RequestMapping(\"/item/{id}/update\")\n\tpublic ModelAndView showEditForm(@PathVariable(\"id\")Long id) {\n\t\tModelAndView mv = new ModelAndView(\"item-form\");\n\t\tmv.addObject(\"title\", \"Edit item!\"); //1st var is name we wanna call it\n\t\tmv.addObject(\"item\", itemDao.findById(id).orElse(null)); //2nd is data we use over and over again\n\t\t\t\t\n\t\t\t\treturn mv;\n\t\t\n\t}", "public abstract void update(@Nonnull Response response);", "int updateByPrimaryKey(ApplicationDO record);", "private void Updatebrand(final String Brand_Id,final String Brand_Name,final String description,final String brand_status,final String reason,final String Creation_Date,final String Updated_Date,final String Admin_Id) {\n String tag_string_req = \"req_update\";\n\n StringRequest strReq = new StringRequest(Request.Method.POST,\n AppConfig.Url_editBrand, response -> {\n\n\n int jsonStart = response.indexOf(\"{\");\n int jsonEnd = response.lastIndexOf(\"}\");\n\n if (jsonStart >= 0 && jsonEnd >= 0 && jsonEnd > jsonStart) {\n response = response.substring(jsonStart, jsonEnd + 1);\n } else {\n // deal with the absence of JSON content here\n }\n\n response = response.replaceAll(\"<.*?>\", \"\");\n try {\n JSONObject jObj = new JSONObject(response);\n boolean error = jObj.getBoolean(\"error\");\n if (!error) {\n\n } else {\n\n\n String errorMsg = jObj.getString(\"error_msg\");\n Toast.makeText(getApplicationContext(),\n errorMsg, Toast.LENGTH_LONG).show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n\n }\n\n }, error -> {\n }) {\n @Override\n protected Map<String, String> getParams() {\n // Posting params to register url\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Brand_Id\", Brand_Id);\n params.put(\"Brand_Name\", Brand_Name);\n params.put(\"description\", description);\n params.put(\"brand_status\",brand_status);\n params.put(\"reason\", reason);\n params.put(\"Creation_Date\", Creation_Date);\n params.put(\"Updated_Date\", Updated_Date);\n params.put(\"Admin_Id\", Admin_Id);\n\n return params;\n }\n\n };\n\n AppController.getInstance().addToRequestQueue(strReq, tag_string_req);\n }", "public void sendUpdate() {\n JSONObject obj = new JSONObject();\n String url = (\"http://coms-309-hv-3.cs.iastate.edu:8080/user/update\");\n RequestQueue queue = Volley.newRequestQueue(this);\n\n try {\n obj.put(\"email\", emailEdit.getText()); //string\n obj.put(\"name\", nameEdit.getText()); //string\n obj.put(\"age\", Integer.parseInt(ageEdit.getText().toString())); //int\n obj.put(\"height\", Integer.parseInt(heightEdit.getText().toString())); //int\n obj.put(\"weight\", Integer.parseInt(weightEdit.getText().toString())); //int\n obj.put(\"lifestyle\", lifestyleString(activityEdit)); //string\n obj.put(\"gender\", genderEdit.getSelectedItem().toString()); //string\n\n } catch (JSONException ex) {\n ex.printStackTrace();\n }\n\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.POST, url, obj,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n int responseCode = 1;\n String responseMessage = \"\";\n try {\n responseCode = response.getInt(\"response\");\n responseMessage = response.getString(\"message\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n toastKickoff(\"User Updated: \" + responseCode + \" \" + responseMessage);\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"HttpClient\", \"error: \" + error.toString());\n toastKickoff(\"Internal Error\");\n }\n });\n\n queue.add(request);\n\n }", "@PreAuthorize(\"hasRole('ROLE_ADMIN')\")\n @PutMapping(value = \"/cake-application/cakes/{id}\", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)\n public Cake update(@PathVariable(\"id\") String id, @Valid @RequestBody Cake cake) {\n return cakeService.update(id, cake);\n }", "public void saveOrUpdate(AircraftProductParam app);", "@RequestMapping(method = RequestMethod.PUT)\n public <T extends Pet> void updatePet(@RequestBody T pet) {\n throw new UnsupportedOperationException();\n }", "@ResponseStatus(code=HttpStatus.OK)\r\n\t@RequestMapping(value=\"/update\", method=RequestMethod.GET)\r\n\tpublic void update() {\r\n\t\tSystem.out.println(\"StudentRestController.Update()_________\");\r\n\t}", "@Test\n public void update_withValidFormData_savesNewPredicate() {\n Result editBeforeResult =\n controller.edit(addCSRFToken(fakeRequest()).build(), programWithThreeBlocks.id, 3L);\n assertThat(Helpers.contentAsString(editBeforeResult)).contains(\"This screen is always shown.\");\n\n Http.Request request =\n fakeRequest()\n .bodyForm(\n ImmutableMap.of(\n \"predicateAction\",\n \"HIDE_BLOCK\",\n \"questionId\",\n String.valueOf(testQuestionBank.applicantName().id),\n \"scalar\",\n \"FIRST_NAME\",\n \"operator\",\n \"EQUAL_TO\",\n \"predicateValue\",\n \"Hello\"))\n .build();\n\n Result result = controller.update(request, programWithThreeBlocks.id, 3L);\n\n assertThat(result.status()).isEqualTo(SEE_OTHER);\n assertThat(result.redirectLocation())\n .hasValue(\n routes.AdminProgramBlockPredicatesController.edit(programWithThreeBlocks.id, 3L).url());\n assertThat(result.flash().get(\"error\")).isEmpty();\n assertThat(result.flash().get(\"success\").get()).contains(\"Saved visibility condition\");\n\n // For some reason the above result has an empty contents. So we test the new content of the\n // edit page manually.\n Result redirectResult =\n controller.edit(addCSRFToken(fakeRequest()).build(), programWithThreeBlocks.id, 3L);\n assertThat(Helpers.contentAsString(redirectResult))\n .doesNotContain(\"This screen is always shown.\");\n }", "protected void updateClient() throws IOException {\n System.out.print(\"Please enter new name => \");\n String newName = br.readLine();\n\n System.out.print(\"Please enter new second name => \");\n String surname = br.readLine();\n\n int age = inputAge();\n String email = inputEmail();\n String phone = inputPhone();\n\n if (clientService.updateClient(((ClientServiceImpl) clientService).getClientId(), newName, surname, age, email, phone)) {\n System.out.println(\"Client was updated\");\n } else {\n System.out.println(\"Client wasn't updated\");\n }\n\n }" ]
[ "0.6471935", "0.62555206", "0.6155692", "0.6155692", "0.6115608", "0.60880893", "0.6045256", "0.5883244", "0.5881658", "0.5755927", "0.57134724", "0.5698886", "0.5680982", "0.5668102", "0.5563675", "0.5544388", "0.5518453", "0.55039716", "0.5493183", "0.549209", "0.54698575", "0.5467587", "0.5457395", "0.5434233", "0.5433886", "0.5428388", "0.54162586", "0.5409456", "0.53967005", "0.53953165", "0.53933865", "0.5390256", "0.53888994", "0.5384264", "0.5383681", "0.53821665", "0.5367005", "0.53647405", "0.53623414", "0.5360941", "0.5357084", "0.5356316", "0.5348375", "0.5346481", "0.5339483", "0.53376055", "0.5337376", "0.533317", "0.5308003", "0.5297297", "0.5292173", "0.5291179", "0.5279133", "0.52775073", "0.52617127", "0.5256932", "0.52561146", "0.525204", "0.52452135", "0.5239409", "0.5236386", "0.5229916", "0.52272123", "0.52259326", "0.5209605", "0.5205581", "0.51888317", "0.51759136", "0.51727164", "0.51708794", "0.51573056", "0.5156812", "0.51509666", "0.51408136", "0.5130266", "0.51279914", "0.51279914", "0.51252633", "0.51220614", "0.51135546", "0.51124704", "0.5110918", "0.5105543", "0.5098518", "0.50982946", "0.50942796", "0.5089175", "0.508727", "0.50825906", "0.5078481", "0.50782025", "0.507562", "0.50729424", "0.5068628", "0.50685364", "0.5059554", "0.50557786", "0.50551784", "0.50546724", "0.5049564" ]
0.6156942
2
This method gets a application form via a GET request
@GetMapping("/api/internships/{internship_id}/application_form") public ApplicationFormDto getApplication(@PathVariable(value = "internship_id") int internshipId) { Internship i = internshipService.findByIdAndStudent(internshipId, authenticationService.getCurrentStudent()); if (i == null) throw new AccessDeniedException(""); ApplicationForm applicationForm = i.getApplicationForm(); return applicationFormService.toDto(applicationForm); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void getAppSubmissionFormTest() throws ApiException {\n String appId = null;\n String naked = null;\n // String response = api.getAppSubmissionForm(appId, naked);\n\n // TODO: test validations\n }", "@RequestMapping(value = \"/application\", method = RequestMethod.GET)\n\tpublic ModelAndView goToApplicationForm() {\n\n\t\tlogger.info(\"application page requested\");\n\n\t\treturn new ModelAndView(\"application\");\n\n\t}", "public Form readForm(String formKey);", "private void readForm() {\n }", "public org.thethingsnetwork.management.proto.HandlerOuterClass.Application getApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);", "public AppForm getAppFormById(String id) {\n return (AppForm)super.doFindObjectById(id);\r\n }", "@Override\n protected void doGet( HttpServletRequest req, HttpServletResponse resp )\n throws ServletException, IOException {\n log( \"GET\" );\n createInputBloodDonationForm( req, resp );\n }", "@Override\n public ExtensionResult getForms(ExtensionRequest extensionRequest) {\n Map<String, String> output = new HashMap<>();\n FormBuilder formBuilder = new FormBuilder(appProperties.getFormIdTest());\n\n ButtonTemplate button = new ButtonTemplate();\n button.setTitle(\"Test Form\");\n button.setSubTitle(\"Subtitle is here\");\n button.setPictureLink(appProperties.getAtmUrl());\n button.setPicturePath(appProperties.getAtmUrl());\n List<EasyMap> actions = new ArrayList<>();\n EasyMap bookAction = new EasyMap();\n bookAction.setName(\"Label here\");\n bookAction.setValue(formBuilder.build());\n actions.add(bookAction);\n button.setButtonValues(actions);\n ButtonBuilder buttonBuilder = new ButtonBuilder(button);\n\n output.put(OUTPUT, buttonBuilder.build());\n ExtensionResult extensionResult = new ExtensionResult();\n extensionResult.setAgent(false);\n extensionResult.setRepeat(false);\n extensionResult.setSuccess(true);\n extensionResult.setNext(true);\n extensionResult.setValue(output);\n return extensionResult;\n }", "String getRequest();", "@RequestMapping(value = \"/autorization\", method = RequestMethod.GET)\n public String getLoginForm() {\n System.out.println(\"Fetching the Authorization URL...\");\n final String authorizationUrl = service.getAuthorizationUrl();\n return \"redirect:\" + authorizationUrl;\n }", "@GetMapping(\"/form\")\n\tpublic String form() {\n\t\treturn \"form\";\n\t}", "@RequestMapping(value = \"form\", method = RequestMethod.GET)\n public String form() {\n return \"user_form\";\n }", "public static Map<String, String> getAvailableForms(String... varargs) {\n\t\t// setting the default values when arguments' values are omitted\n\t\tString slideRef = varargs.length > 0 ? varargs[0] : null;\n\t\tString sessionID = varargs.length > 0 ? varargs[1] : null;\n\t\t// See what forms are available to fill out, either system-wide (leave slideref\n\t\t// to None), or for a particular slide\n\t\tsessionID = sessionId(sessionID);\n\t\tString url;\n\t\tMap<String, String> forms = new HashMap<>();\n\t\tif (slideRef != null) {\n\t\t\tif (slideRef.startsWith(\"/\")) {\n\t\t\t\tslideRef = slideRef.substring(1);\n\t\t\t}\n\t\t\tString dir = FilenameUtils.getFullPath(slideRef).substring(0,\n\t\t\t\t\tFilenameUtils.getFullPath(slideRef).length() - 1);\n\t\t\turl = apiUrl(sessionID, false) + \"GetForms?sessionID=\" + PMA.pmaQ(sessionID) + \"&path=\" + PMA.pmaQ(dir);\n\t\t} else {\n\t\t\turl = apiUrl(sessionID, false) + \"GetForms?sessionID=\" + PMA.pmaQ(sessionID);\n\t\t}\n\t\ttry {\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\tString jsonString = PMA.getJSONAsStringBuffer(con).toString();\n\t\t\tif (jsonString != null && jsonString.length() > 0) {\n\t\t\t\tif (PMA.isJSONObject(jsonString)) {\n\t\t\t\t\tJSONObject jsonResponse = PMA.getJSONObjectResponse(jsonString);\n\t\t\t\t\tpmaAmountOfDataDownloaded.put(sessionID,\n\t\t\t\t\t\t\tpmaAmountOfDataDownloaded.get(sessionID) + jsonResponse.length());\n\t\t\t\t\tif (jsonResponse.has(\"Code\")) {\n\t\t\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\t\t\tPMA.logger.severe(\"getAvailableForms on \" + slideRef + \" resulted in: \"\n\t\t\t\t\t\t\t\t\t+ jsonResponse.get(\"Message\") + \" (keep in mind that slideRef is case sensitive!)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthrow new Exception(\"getAvailableForms on \" + slideRef + \" resulted in: \"\n\t\t\t\t\t\t\t\t+ jsonResponse.get(\"Message\") + \" (keep in mind that slideRef is case sensitive!)\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tforms = null;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJSONArray jsonResponse = PMA.getJSONArrayResponse(jsonString);\n\t\t\t\t\tpmaAmountOfDataDownloaded.put(sessionID,\n\t\t\t\t\t\t\tpmaAmountOfDataDownloaded.get(sessionID) + jsonResponse.length());\n\t\t\t\t\tfor (int i = 0; i < jsonResponse.length(); i++) {\n\t\t\t\t\t\tforms.put(jsonResponse.optJSONObject(i).get(\"Key\").toString(),\n\t\t\t\t\t\t\t\tjsonResponse.optJSONObject(i).getString(\"Value\"));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tforms = null;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tif (PMA.logger != null) {\n\t\t\t\tStringWriter sw = new StringWriter();\n\t\t\t\te.printStackTrace(new PrintWriter(sw));\n\t\t\t\tPMA.logger.severe(sw.toString());\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t\treturn forms;\n\t}", "String getForms(String Tbname,String Fname, String Action,String Option)\r\n\t {\r\n\t\t\r\n\t\tArrayList<NameValuePair> postParameters = new ArrayList<NameValuePair>(); \r\n\t\t\r\n\t\tpostParameters.add(new BasicNameValuePair(\"tblname\",Tbname)); \r\n\t\tpostParameters.add(new BasicNameValuePair(\"fieldname\", Fname)); \r\n\t\tpostParameters.add(new BasicNameValuePair(\"action\", Action)); \r\n\t\tpostParameters.add(new BasicNameValuePair(\"option\", Option)); \r\n\t\t\t\t\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t\r\n\t\t\tRecvdata = CustomHttpClient.executeHttpPost(strUrl, postParameters); \r\n\t\t\t\r\n\t\t\t\tif(Recvdata.length()== 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tresult = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t \r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t\r\n\t\t\t/*excpError = e.getMessage().toString();\r\n\t\t\tRecvdata = excpError;*/\r\n\t\t\tresult = false;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(result== false)\r\n\t\t {\r\n\t\t\tRecvdata= \"No Recied Data from Net\\n\";\r\n\t\t }\r\n\t\t\r\n\t\treturn Recvdata;\r\n\t}", "public void doGet(HttpServletRequest request, \n HttpServletResponse response)\n throws ServletException, IOException \n {\n response.setContentType(\"text/html\");\n\n // Writing message to the web page\n PrintWriter out = response.getWriter();\n String title = \"Using GET Method to Read Form Data\";\n String docType =\n \"<!doctype html public \\\"-//w3c//dtd html 4.0 \" + \"transitional//en\\\">\\n\";\n \n out.println(docType +\n \t \"<html>\\n\" +\n \t \"<head><title>\" + title + \"</title></head>\\n\" +\n \t \"<body bgcolor = \\\"#f0f0f0\\\">\\n\" +\n \t \"<h1 align = \\\"center\\\">\" + title + \"</h1>\\n\" +\n \t \"<ul>\\n\" +\n \t \" <li><b>Email</b>: \"\n \t + request.getParameter(\"uname\") + \"\\n\" +\n \t \" <li><b>Password</b>: \"\n \t + request.getParameter(\"psw\") + \"\\n\" +\n \t \"\t<li><b>Remember?</b>: \"\n \t + request.getParameter(\"remember\") +\n \t \"</ul>\\n\" +\n \t \"</body>\" +\n \t \"</html>\"\n \t );\n \n }", "public Form getForm() throws IOException {\n if(form == null) {\n form = builder.getInstance();\n }\n return form;\n }", "java.lang.String getFormUri();", "@RequestMapping(value = \"getinput.htm\")\n public ModelAndView getInput() {\n ModelAndView modelAndView = new ModelAndView();\n modelAndView.addObject(\"inputentity\", new InputFormBean());\n return modelAndView;\n }", "public abstract FullResponse onServeFormParams(Map<String, List<String>> formParams);", "java.util.concurrent.Future<GetApplicationResult> getApplicationAsync(GetApplicationRequest getApplicationRequest);", "String getForm(String path, Descriptor desc) {\n return new ScriptBuilder()\n .l(\"getForm(paste(ifelse(is.null(server),%s.server(),server), '%s', sep=''), %s)\", \n moduleAnnot.name(), path, getGetFormParamList(desc))\n .toString();\n }", "public com.google.common.util.concurrent.ListenableFuture<org.thethingsnetwork.management.proto.HandlerOuterClass.Application> getApplication(\n org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);", "public abstract Collection<Pair<String,String>> getAllForms();", "public void getApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request,\n io.grpc.stub.StreamObserver<org.thethingsnetwork.management.proto.HandlerOuterClass.Application> responseObserver);", "public String getForm() {\r\n\t\treturn form;\r\n\t}", "Application getApplication();", "@GetMapping(path = \"/realizar\")\n public ModelAndView getForm(){\n\n return new ModelAndView(ViewConstant.MANTCOMPRASMINO).addObject(\"compraMinorista\", new CompraMinorista());\n }", "@ModelAttribute(\"form\")\n public SearchFiltersLocationForm getForm(PortletRequest request, PortletResponse response) throws PortletException {\n // Portal controller context\n PortalControllerContext portalControllerContext = new PortalControllerContext(this.portletContext, request, response);\n\n return this.service.getForm(portalControllerContext);\n }", "public String getAviaoSingle(HttpServletRequest req) {\n try {\r\n String idAviao = req.getParameter(\"id_aviao\");\r\n \r\n AviaoDAO dao = new AviaoDAO();\r\n return html.getFormAtualizarAviao(dao.visualizarAviao(Integer.parseInt(idAviao)));\r\n } catch (Exception ex) {\r\n return \"Exceção: \" + ex.getMessage();\r\n }\r\n }", "public static Result getFilledForm() {\r\n\t\tStatus result;\r\n\t\ttry {\r\n\t\t\tString formName = ChangeOrderForm.NAME;\r\n\t\t\tString username = CMSSession.getEmployeeName();\r\n\t\t\tFile pdf = File.createTempFile(\"Change_Order_Form_Filled\", \".pdf\");\r\n\t\t\tCMSGuidedFormFill.fillForm(formName, username, pdf);\r\n\r\n\t\t\tresult = ok(pdf, true);\r\n\r\n\t\t\tFileDeletionHandler.deleteFile(pdf);\r\n\t\t} catch (IOException e) {\r\n\t\t\tLogger.error(\"Couldn't create new temp file.\");\r\n\t\t\tLogger.error(e.getMessage(), e);\r\n\t\t\tresult = internalServerError();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public RestResult constructFormRequest(String confAlias, Page page, ExecutionMode mode)\n throws IOException {\n log.info(\"Constructing a form request...\");\n\n InvokeWebServiceAction serviceAction = new InvokeWebServiceAction(args.getFirstString(\n PARAM_NAME_API_NAME));\n serviceAction.setFormId(page.getFormId());\n\n serviceAction.addServiceParameter(PARAM_NAME_CONF_ALIAS, confAlias);\n serviceAction.addServiceParameter(PARAM_NAME_CONTAINER_WIZARD, wizard.serialize());\n\n if (shouldSetNextPageIdx) {\n log.info(\"Setting next page index to \" + nextPageIdx);\n\n if (wizard.isInAddXmlMoMode()) {\n // Needed to make this work when using a form request\n nextPageIdx = wizard.getAddXmlMoContext().getXmlMoConfIdx();\n }\n serviceAction.addServiceParameter(PARAM_NAME_NEXT_PAGE_IDX, String.valueOf(nextPageIdx));\n }\n if (shouldSetNextSubPageIdx) {\n log.info(\"Setting next sub page index form parameter to \" + getNextSubPageIdx());\n serviceAction.addFormParameter(PARAM_NAME_NEXT_SUB_PAGE_IDX, String.valueOf(\n getNextSubPageIdx()));\n }\n\n // copied from constructActionRequest ...\n serviceAction.addProperty(PARAM_NAME_API_NAME, args.getFirstString(PARAM_NAME_API_NAME));\n serviceAction.addProperty(PARAM_NAME_OPERATION_NAME, wizard.getOperationName());\n\n if (page.isSubPages()) {\n Integer nextSubPageOffset = getIntValue(args.getFirst(PARAM_NAME_SECTION_TYPE_IDX), 0);\n Integer nextSubPageIdx = wizard.isInAddXmlMoMode() ? wizard.getAddXmlMoContext()\n .getXmlMoConfIdx() : getNextSubPageIdx() + nextSubPageOffset;\n log.info(\"Setting next sub page index service parameter to \" + nextSubPageIdx\n + \" (offset was \" + nextSubPageOffset + \")\");\n // Needed to make this work when using a form request\n serviceAction.addServiceParameter(PARAM_NAME_NEXT_SUB_PAGE_IDX, Integer.toString(\n nextSubPageIdx));\n // set a specific width\n JQueryDialogOptions dialogOptions = new JQueryDialogOptions();\n dialogOptions.setWidth(400);\n serviceAction.setDialogOptions(dialogOptions);\n }\n\n // end copy\n\n serviceAction.addServiceParameter(PARAM_NAME_EXECUTION_MODE, mode.name());\n\n // Make the web service string params also available to the form.\n for (CallArgument arg : serviceAction.getServiceParameters().values()) {\n if (StringUtils.isNotBlank(arg.getValue())) {\n serviceAction.addFormParameter(arg.getName(), arg.getValue());\n }\n }\n\n RestResult restResult = new RestResult();\n restResult.addAction(serviceAction);\n return restResult;\n }", "public final HttpParams getApplicationParams() {\n/* 150 */ return this.applicationParams;\n/* */ }", "private void formRequest() {\r\n\t\tbyte[] user_bytes = _userName.getBytes();\r\n\t\tbyte[] password_bytes = _password.getBytes();\r\n\r\n\t\t_request = new byte[3 + user_bytes.length + password_bytes.length];\r\n\t\t_request[0] = (byte) 1;\r\n\t\t_request[1] = (byte) user_bytes.length;\r\n\t\tSystem.arraycopy(user_bytes, 0, _request, 2, user_bytes.length);\r\n\t\t_request[2 + user_bytes.length] = (byte) password_bytes.length;\r\n\t\tSystem.arraycopy(password_bytes, 0, _request, 3 + user_bytes.length, password_bytes.length);\r\n\t}", "@GetMapping ( \"/patient/appointmentRequest/manageAppointmentRequest\" )\r\n @PreAuthorize ( \"hasRole('ROLE_PATIENT')\" )\r\n public String requestAppointmentForm ( final Model model ) {\r\n return \"/patient/appointmentRequest/manageAppointmentRequest\";\r\n }", "public Form getSearchForm() throws PublicationTemplateException;", "public Form getForm() {\n return form;\n }", "public String getParameter(String name) throws IOException {\n if(form == null) {\n form = builder.getInstance();\n }\n return form.get(name);\n }", "private void loadForm() {\n service.getReasons(refusalReasons);\n service.getVacEligibilty(vacElig);\n service.getVacSites(vacSites);\n service.getReactions(vacReactions);\n service.getOverrides(vacOverrides);\n updateComboValues();\n \n selPrv = \"\";\n selLoc = \"\";\n \n //datGiven.setDateConstraint(new SimpleDateConstraint(SimpleDateConstraint.NO_NEGATIVE, DateUtil.addDays(patient.getBirthDate(), -1, true), null, BgoConstants.TX_BAD_DATE_DOB));\n datGiven.setDateConstraint(getConstraintDOBDate());\n datEventDate.setConstraint(getConstraintDOBDate());\n radFacility.setLabel(service.getParam(\"Caption-Facility\", \"&Facility\"));\n if (immunItem != null) {\n \n txtVaccine.setValue(immunItem.getVaccineName());\n txtVaccine.setAttribute(\"ID\", immunItem.getVaccineID());\n txtVaccine.setAttribute(\"DATA\", immunItem.getVaccineID() + U + immunItem.getVaccineName());\n setEventType(immunItem.getEventType());\n \n radRefusal.setDisabled(!radRefusal.isChecked());\n radHistorical.setDisabled(!radHistorical.isChecked());\n radCurrent.setDisabled(!radCurrent.isChecked());\n \n visitIEN = immunItem.getVisitIEN();\n if (immunItem.getProvider() != null) {\n txtProvider.setText(FhirUtil.formatName(immunItem.getProvider().getName()));\n txtProvider.setAttribute(\"ID\", immunItem.getProvider().getId().getIdPart());\n selPrv = immunItem.getProvider().getId().getIdPart() + U + U + immunItem.getProvider().getName();\n }\n switch (immunItem.getEventType()) {\n case REFUSAL:\n ListUtil.selectComboboxItem(cboReason, immunItem.getReason());\n txtComment.setText(immunItem.getComment());\n datEventDate.setValue(immunItem.getDate());\n break;\n case HISTORICAL:\n datEventDate.setValue(immunItem.getDate());\n txtLocation.setValue(immunItem.isImmunization() ? immunItem.getLocationName() : \"\");\n txtLocation.setAttribute(\"ID\", immunItem.isImmunization() ? immunItem.getLocationID() : \"\");\n selLoc = immunItem.getLocationID() + U + U + immunItem.getLocationName();\n radOther.setSelected(txtLocation.getAttribute(\"ID\") != null\n ? txtLocation.getAttribute(\"ID\").toString().isEmpty() : false);\n txtAdminNote.setText(immunItem.getAdminNotes());\n ZKUtil.disableChildren(fraDate, true);\n ZKUtil.disableChildren(fraHistorical, true);\n default:\n service.getLot(lotNumbers, getVaccineID());\n loadComboValues(cboLot, lotNumbers, comboRenderer);\n loadVaccination();\n txtLocation.setValue(immunItem.isImmunization() ? immunItem.getLocationName() : \"\");\n txtLocation.setAttribute(\"ID\", immunItem.isImmunization() ? immunItem.getLocationID() : \"\");\n selLoc = immunItem.getLocationID() + U + U + immunItem.getLocationName();\n radOther.setSelected(txtLocation.getAttribute(\"ID\") != null\n ? txtLocation.getAttribute(\"ID\").toString().isEmpty() : false);\n ListUtil.selectComboboxItem(cboLot, immunItem.getLot());\n ListUtil.selectComboboxItem(cboSite, StrUtil.piece(immunItem.getInjSite(), \"~\", 2));\n spnVolume.setText(immunItem.getVolume());\n datGiven.setDate(immunItem.getDate());\n datVIS.setValue(immunItem.isImmunization() ? immunItem.getVISDate() : null);\n ListUtil.selectComboboxItem(cboReaction, immunItem.getReaction());\n ListUtil.selectComboboxData(cboOverride, immunItem.getVacOverride());\n txtAdminNote.setText(immunItem.getAdminNotes());\n cbCounsel.setChecked(immunItem.wasCounseled());\n }\n } else {\n IUser user = UserContext.getActiveUser();\n Practitioner provider = new Practitioner();\n provider.setId(user.getLogicalId());\n provider.setName(FhirUtil.parseName(user.getFullName()));\n txtProvider.setValue(FhirUtil.formatName(provider.getName()));\n txtProvider.setAttribute(\"ID\", VistAUtil.parseIEN(provider)); //provider.getId().getIdPart());\n selPrv = txtProvider.getAttribute(\"ID\") + U + U + txtProvider.getValue();\n Location location = new Location();\n location.setName(\"\");\n location.setId(\"\");\n datGiven.setDate(getBroker().getHostTime());\n onClick$btnVaccine(null);\n \n if (txtVaccine.getValue().isEmpty()) {\n close(true);\n return;\n }\n \n Encounter encounter = EncounterContext.getActiveEncounter();\n if (!EncounterUtil.isPrepared(encounter)) {\n setEventType(EventType.HISTORICAL);\n radCurrent.setDisabled(true);\n } else {\n if (isCategory(encounter, \"E\")) {\n setEventType(EventType.HISTORICAL);\n Date date = encounter == null ? null : encounter.getPeriod().getStart();\n datEventDate.setValue(DateUtil.stripTime(date == null ? getBroker().getHostTime() : date));\n radCurrent.setDisabled(true);\n txtLocation.setText(user.getSecurityDomain().getName());\n PromptDialog.showInfo(user.getSecurityDomain().getLogicalId());\n txtLocation.setAttribute(\"ID\", user.getSecurityDomain().getLogicalId());\n \n } else {\n if (isVaccineInactive()) {\n setEventType(EventType.HISTORICAL);\n radCurrent.setDisabled(true);\n } else {\n setEventType(EventType.CURRENT);\n radCurrent.setDisabled(false);\n }\n }\n }\n selectItem(cboReason, NONESEL);\n }\n btnSave.setLabel(immunItem == null ? \"Add\" : \"Save\");\n btnSave.setTooltiptext(immunItem == null ? \"Add record\" : \"Save record\");\n txtVaccine.setFocus(true);\n }", "public void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\t\trequest.setCharacterEncoding(\"utf-8\");\r\n\t\tresponse.setCharacterEncoding(\"utf-8\");\r\n\t\tString lsh=request.getParameter(\"lsh\");\r\n\t\tString formcode = request.getParameter(\"formcode\");\r\n\t\tString parentId = request.getParameter(\"parentid\");\r\n\t\tif (StringUtils.isEmpty(parentId)) {\r\n\t\t\tparentId = \"1\";\r\n\t\t}\r\n\t\tDyFormData dydata=new DyFormData();\r\n\t\tdydata.setFormcode(formcode);\r\n\t\tdydata.setLsh(lsh);\r\n\t\tdydata.setParticipant(parentId);\r\n\t\tDyFormService dysc = null;\r\n\t\ttry {\r\n\t\t\tdysc = (DyFormService) RmiEntry.iv(\"dyhandle\");\r\n\t\t} catch (NotBoundException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t \r\n\t\tList list=dysc.queryData(dydata, 0, 1000, \"\");\r\n\t\tString jsonString=JSONArray.fromObject(list).toString(); \r\n \t\tresponse.getWriter().print(jsonString);\r\n\t}", "public ResourcesMetadata getForm()\n\t\t{\n\t\t\treturn m_form;\n\t\t}", "public RestResult getRestResult(String confAlias, ExecutionMode mode)\n throws RSuiteException, IOException {\n if (!hasRequestedPage()) {\n throw new RSuiteException(RSuiteException.ERROR_PARAM_INVALID,\n \"The requested page does not exist.\");\n }\n\n Page page = getRequestedPageConf();\n if (StringUtils.isNotBlank(page.getFormId())) {\n return constructFormRequest(confAlias, page, mode);\n } else if (StringUtils.isNotBlank(page.getActionId())) {\n return constructActionRequest(confAlias, page, mode);\n } else {\n // Configuration error (no form or action).\n throw new RSuiteException(RSuiteException.ERROR_CONFIGURATION_PROBLEM,\n \"Page does not declare a form or an action.\");\n }\n\n }", "@RequestMapping(value= \"/{applicationName}\", method = RequestMethod.GET)\n\t@ResponseMapping(\"applicationDetails\")\n\tpublic Application getApplicationDetail(@PathVariable String applicationName) {\n\t\tRequestAttributes attributes = RequestContextHolder.getRequestAttributes();\n\t\t\n\t\tif (attributes != null)\n\t\t\tattributes.setAttribute(\"applicationList\", getAllApplications(), RequestAttributes.SCOPE_REQUEST);\n\t\t\n\t\tApplication answer = applicationRepository.findByName(applicationName);\n\t\tif (answer != null)\n\t\t\tanswer.setEnvironments(environmentController.getAllEnvironments(applicationName));\t// Could use template.fetch - but this handles security\n\t\t\n\t\treturn answer;\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException \n {\n String act = request.getParameter(\"act\");\n \n if (act!=null && act.equalsIgnoreCase(\"doAddTransaction\")){// show page with form to obtain client name\n doPost(request, response);\n }else{// put client name into a bean\n RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(\"/addtransaction.jsp\");\n dispatcher.forward(request, response);\n }\n }", "private void loadForm() {\n CodingProxy icd9 = problem.getIcd9Code();\n \n if (icd9 != null) {\n txtICD.setText(icd9.getProxiedObject().getCode());\n }\n \n String narr = problem.getProviderNarrative();\n \n if (narr == null) {\n narr = icd9 == null ? \"\" : icd9.getProxiedObject().getDisplay();\n }\n \n String probId = problem.getNumberCode();\n \n if (probId == null || probId.isEmpty()) {\n probId = getBroker().callRPC(\"BGOPROB NEXTID\", PatientContext.getActivePatient().getIdElement().getIdPart());\n }\n \n String pcs[] = probId.split(\"\\\\-\", 2);\n lblPrefix.setValue(pcs[0] + \" - \");\n txtID.setValue(pcs.length < 2 ? \"\" : pcs[1]);\n txtNarrative.setText(narr);\n datOnset.setValue(problem.getOnsetDate());\n \n if (\"P\".equals(problem.getProblemClass())) {\n radPersonal.setSelected(true);\n } else if (\"F\".equals(problem.getProblemClass())) {\n radFamily.setSelected(true);\n } else if (\"I\".equals(problem.getStatus())) {\n radInactive.setSelected(true);\n } else {\n radActive.setSelected(true);\n }\n \n int priority = NumberUtils.toInt(problem.getPriority());\n cboPriority.setSelectedIndex(priority < 0 || priority > 5 ? 0 : priority);\n loadNotes();\n }", "public static String getString(String metodo, RequestBody formBody) {\n\n try {\n URL url = new URL(\"http://0.0.0.0:5000/\" + metodo);\n Request request = new Request.Builder().url(url).post(formBody).build();\n Response response = webClient.newCall(request).execute();//Aqui obtiene la respuesta en dado caso si hayas pues un return en python\n String respuesta = response.body().string();//y este seria el string de las respuesta\n return respuesta;\n } catch (MalformedURLException ex) {\n java.util.logging.Logger.getLogger(com.servlet.conexionl_login.class.getName()).log(Level.SEVERE, null, ex);\n } catch (Exception ex) {\n java.util.logging.Logger.getLogger(com.servlet.conexionl_login.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "private String getFormAction(UserRequest ureq) {\n // cannot avoid rawtype warning\n @SuppressWarnings(\"rawtypes\")\n Enumeration params = ureq.getHttpReq().getParameterNames();\n while (params.hasMoreElements()) {\n String key = (String) params.nextElement();\n if (key.startsWith(ACTION_PRE)) {\n return key.substring(ACTION_PRE.length());\n }\n }\n return null;\n }", "@GetMapping(value = \"/showForm\")\n\tpublic String showForm(Model model) {\n\t\tmodel.addAttribute(\"person\", new Person());\n\n\t\t// In order to test 500 internal server error\n\t\t// int g = 7/0;\n\n\t\treturn FORM_VIEW;\n\t}", "@GetMapping(\"/public/clientForm\")\n\tpublic String clientForm(Client client) {\n\t\tClientController.LOGGER\n\t\t\t\t.info(\"La page \\\"clientForm\\\" est demandée\");\n\t\treturn \"/public/clientForm\";\n\t}", "public Object getApplication(String attibuteName) {\n return servletRequest.getServletContext().getAttribute(attibuteName);\n }", "@GetMapping(value = { \"/\", \"/addContact\" })\r\n\tpublic String loadForm(Model model) {\r\n\t\tmodel.addAttribute(\"contact\", new Contact());\r\n\t\treturn \"contactInfo\";\r\n\t}", "@RequestMapping(method=RequestMethod.GET,value=\"/form_modelandview\")\n\tpublic ModelAndView getcustomerform_modelandview()\n\t{\n\t\t ModelAndView modelAndView = new ModelAndView(\"form\");\n\t\t modelAndView.addObject(\"message\", \"Model and View\");\t \n\t\t\t\t \n\t\tSystem.out.println(\"============Customer form called============\");\n\t\treturn modelAndView;\n\t}", "public Form read() throws IOException {\r\n Form result = new Form();\r\n Parameter param = readNextParameter();\r\n \r\n while (param != null) {\r\n result.add(param);\r\n param = readNextParameter();\r\n }\r\n \r\n this.stream.close();\r\n return result;\r\n }", "@RequestMapping (value =\"/cadastrarTema\", method=RequestMethod.GET)\n\tpublic String form() {\n\t\treturn \"formTema\";\n\n\t}", "public static void requestInfo(Claim c){\n\t\tnew GUIClientForm(c);\n\t}", "org.naru.park.ParkModel.UIParkRequest getRequest();", "@GetMapping(\"hello\")\n @ResponseBody\n public String helloLangForm() {\n String html = \"<html>\" +\n \"<form method='post' action=''>\" +\n \"<input type='text' name='name' />\" +\n \"<select name='language'>\" +\n \"<option value='english'>English</option>\" +\n \"<option value='french'>French</option>\" +\n \"<option value='german'>German</option>\" +\n \"<option value='spanish'>Spanish</option>\" +\n \"<option value='arabic'>Arabic</option>\" +\n \"<input type='submit' value='Greet me!'/>\" +\n \"</form>\" +\n \"</html>\";\n\n return html;\n }", "@RequestMapping(method=RequestMethod.GET)\r\n\tpublic String displayClaimForm(Model model){\r\n\t\tmodel.addAttribute(\"client\", new Client());\r\n\t\t\r\n\t\treturn \"clientForm\";\r\n\t}", "@RequestMapping(value=\"/room/form\", method=RequestMethod.GET)\r\n\tpublic String getRoomForm(Model model) {\r\n\t\tmodel.addAttribute(\"room\", new Room());\r\n\t\treturn \"roomForm\";\r\n\t}", "@RequestMapping(value = \"/json/data/app/(*:appId)/version/(*:appVersion)/form/(*:formDefId)/submit\", method = RequestMethod.POST)\n public void postFormSubmit(final HttpServletRequest request, final HttpServletResponse response,\n @RequestParam(\"appId\") final String appId,\n @RequestParam(\"appVersion\") final String appVersion,\n @RequestParam(\"formDefId\") final String formDefId)\n throws IOException, JSONException {\n\n LogUtil.info(getClass().getName(), \"Executing JSON Rest API [\" + request.getRequestURI() + \"] in method [\" + request.getMethod() + \"] as [\" + WorkflowUtil.getCurrentUsername() + \"]\");\n\n try {\n // get version, version 0 indicates published version\n long version = Long.parseLong(appVersion) == 0 ? appDefinitionDao.getPublishedVersion(appId) : Long.parseLong(appVersion);\n\n // get current App\n AppDefinition appDefinition = appDefinitionDao.loadVersion(appId, version);\n if (appDefinition == null) {\n // check if app valid\n throw new ApiException(HttpServletResponse.SC_BAD_REQUEST, \"Invalid application [\" + appId + \"] version [\" + version + \"]\");\n }\n\n // set current app definition\n AppUtil.setCurrentAppDefinition(appDefinition);\n\n Form form = appService.viewDataForm(appDefinition.getAppId(), appDefinition.getVersion().toString(), formDefId, null, null, null, null, null, null);\n\n // read request body and convert request body to json\n final FormData formData = extractBodyToFormData(request, form);\n\n // submit form\n final FormData result = appService.submitForm(form, formData, false);\n\n // construct response\n final JSONObject jsonResponse = new JSONObject();\n if (result.getFormErrors() != null && !result.getFormErrors().isEmpty()) {\n // show error message\n result.getFormErrors().forEach((key, value) -> {\n try {\n jsonResponse.put(key, value);\n } catch (JSONException ignored) {\n }\n });\n } else {\n // set current data as response\n FormRowSet rowSet = appService.loadFormData(form, result.getPrimaryKeyValue());\n if(rowSet == null || rowSet.isEmpty()) {\n response.setStatus(HttpServletResponse.SC_NO_CONTENT);\n } else {\n response.setStatus(HttpServletResponse.SC_OK);\n JSONObject jsonData = new JSONObject(rowSet.get(0));\n jsonResponse.put(\"data\", jsonData);\n jsonResponse.put(\"message\", MESSAGE_SUCCESS);\n jsonResponse.put(\"digest\", getDigest(jsonData));\n }\n }\n\n response.getWriter().write(jsonResponse.toString());\n } catch (ApiException e) {\n response.sendError(e.getErrorCode(), e.getMessage());\n LogUtil.warn(getClass().getName(), e.getMessage());\n }\n }", "@RequestMapping(value = \"/rest/application\", method = RequestMethod.GET,\n produces = \"application/json\")\n @Timed\n public List<Application> getAllForCurrentUser() {\n log.debug(\"REST request to get all Application\");\n try {\n User currentLoggedInUser = userRepository.getOne(SecurityUtils.getCurrentLogin());\n return applicationRepository.getAllForUser(currentLoggedInUser);\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n }\n return null;\n }", "@GET\n\t@Produces(MediaType.TEXT_PLAIN)\n\tpublic Object get() throws MalformedURLException, IOException {\n\t\tURI uri = URI.create(request.getRequestURL().toString());\n\t\tURI serviceUri = uri.resolve(\"mail/multipart\");\n\t\ttry(InputStream is = serviceUri.toURL().openStream()) {\n\t\t\treturn StreamUtil.readString(is);\n\t\t}\n\t}", "HttpGet getRequest(HttpServletRequest request, String address) throws IOException;", "public static Map<String, String> getSubmittedForms(String slideRef, String... varargs) {\n\t\t// setting the default value when arguments' value is omitted\n\t\tString sessionID = varargs.length > 0 ? varargs[0] : null;\n\t\t// Find out what forms where submitted for a specific slide\n\t\tsessionID = sessionId(sessionID);\n\t\tif (slideRef.startsWith(\"/\")) {\n\t\t\tslideRef = slideRef.substring(1);\n\t\t}\n\t\tString url = apiUrl(sessionID, false) + \"GetFormSubmissions?sessionID=\" + PMA.pmaQ(sessionID) + \"&pathOrUids=\"\n\t\t\t\t+ PMA.pmaQ(slideRef);\n\t\tMap<String, String> forms = new HashMap<>();\n\t\tMap<String, String> allForms = getAvailableForms(slideRef, sessionID);\n\t\ttry {\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\tString jsonString = PMA.getJSONAsStringBuffer(con).toString();\n\t\t\tif (jsonString != null && jsonString.length() > 0) {\n\t\t\t\tif (PMA.isJSONObject(jsonString)) {\n\t\t\t\t\tJSONObject jsonResponse = PMA.getJSONObjectResponse(jsonString);\n\t\t\t\t\tpmaAmountOfDataDownloaded.put(sessionID,\n\t\t\t\t\t\t\tpmaAmountOfDataDownloaded.get(sessionID) + jsonResponse.length());\n\t\t\t\t\tif (jsonResponse.has(\"Code\")) {\n\t\t\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\t\t\tPMA.logger.severe(\"getSubmittedForms on \" + slideRef + \" resulted in: \"\n\t\t\t\t\t\t\t\t\t+ jsonResponse.get(\"Message\") + \" (keep in mind that slideRef is case sensitive!)\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthrow new Exception(\"getSubmittedForms on \" + slideRef + \" resulted in: \"\n\t\t\t\t\t\t\t\t+ jsonResponse.get(\"Message\") + \" (keep in mind that slideRef is case sensitive!)\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tforms = null;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJSONArray jsonResponse = PMA.getJSONArrayResponse(jsonString);\n\t\t\t\t\tpmaAmountOfDataDownloaded.put(sessionID,\n\t\t\t\t\t\t\tpmaAmountOfDataDownloaded.get(sessionID) + jsonResponse.length());\n\t\t\t\t\tfor (int i = 0; i < jsonResponse.length(); i++) {\n\t\t\t\t\t\tif (!forms.containsKey(jsonResponse.optJSONObject(i).get(\"FormID\").toString())\n\t\t\t\t\t\t\t\t&& allForms != null) {\n\t\t\t\t\t\t\tforms.put(jsonResponse.optJSONObject(i).get(\"FormID\").toString(),\n\t\t\t\t\t\t\t\t\tallForms.get(jsonResponse.optJSONObject(i).get(\"FormID\").toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// should probably do some post-processing here, but unsure what that would\n\t\t\t\t\t// actually be??\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tforms = null;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tif (PMA.logger != null) {\n\t\t\t\tStringWriter sw = new StringWriter();\n\t\t\t\te.printStackTrace(new PrintWriter(sw));\n\t\t\t\tPMA.logger.severe(sw.toString());\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t\treturn forms;\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\treq.getRequestDispatcher(\"/views/form.jsp\").forward(req, resp);\n\t}", "@Override\n public String performGet(HttpServletRequest request) {\n return performPost(request);\n }", "@RequestMapping(value=\"/cadastrarUsuario\", method=RequestMethod.GET)\r\n\tpublic String form(){\r\n\t\tSystem.out.println(\">>>>>>>>>>>>>>>>>>>>>cadastrarUsuario<<<<<<<<<<<<<<<<<<<evento/formEvento\");\r\n\t\treturn \"usuario/formUsuario\";\r\n\t}", "String getRequest(String url);", "@GET\r\n @Produces(MediaType.APPLICATION_JSON)\r\n public String getIt() {\r\n // return \"Got it!\";\r\n \treturn appObj.readAppointment();\r\n }", "@Override\n protected Object formBackingObject(HttpServletRequest request) throws ServletException \n {\n if (request.getParameter(\"approveParam\") == null && request.getParameter(\"id\") != null) {\n int intValId = Integer.parseInt(request.getParameter(\"id\"));\n Book selectedObj = getSelectedBook(intValId); \n return selectedObj;\n }\n\n return new Book();\n }", "@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {\n String omdbId = request.getParameter(IMDB_ID_PARAMETER_KEY);\n\n if (!isParameterValid(omdbId, MAX_CHARS)) {\n System.err.println(\n \"ItemSubmissionServlet: omdbId parameter given in Get Request is invalid!\");\n return;\n }\n\n response.setContentType(\"application/json\");\n response.getWriter().println(\n new Gson().toJson(EntertainmentItemDatastore.getInstance().queryItemByOmdbId(omdbId)));\n }", "@GET\n@Produces(\"application/json\")\n@Path(\"reviewApplicant/{jobApplicationID}\")\npublic ReviewerJobApplicationDetailsResponseDTO getJobApplication(@PathParam(\"jobApplicationID\")String jobApplicationID)\n{\t\n\tReviewerJobApplicationDetailsResponseDTO response=new ReviewerJobApplicationDetailsResponseDTO();\n\tArrayList<ArrayList<String>> jobApplicationDetails=new ArrayList<ArrayList<String>>();\n\tsecurityKey=headers.getRequestHeaders().getFirst(\"SecurityKey\");\n\tshortKey=headers.getRequestHeaders().getFirst(\"ShortKey\");\n\tif(securityKey==null)\n\t{\n\t\tsecurityKey=\"default\";\n\t}\n\tif(shortKey==null)\n\t{\n\t\tshortKey=\"default\";\n\t}\n\tif(securityKey.equalsIgnoreCase(\"i-am-foundit\")&& shortKey.equalsIgnoreCase(\"app-reviewer\"))\n\t{\n\t\ttry{\n\t\t\tjobApplicationDetails=ReviewerUtil.getJobApplicationDetails(jobApplicationID, con);\n\t\t\tresponse.setJobApplicationDetails(jobApplicationDetails);\n\t\t\t\n\t\t\t\n\t\t\tstatus=200;\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Error Occured in Reviewer getReviewerJobApplication\");\n\t\t\tstatus=500;\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\telse\n\t{\n\t\tstatus=403;\n\t\tSystem.out.println(\"Access Forbidden\");\n\t}\n\t\n\tresponse.setStatus(status);\n\treturn response;\n}", "public NoteForm getOneAsForm(Integer id);", "@RequestMapping(method = RequestMethod.POST, value = FR_SERVICE_RESOURCE_PREFIX + \"/search/{applicationId}/{formId}\")\n\tpublic void searchFormData(@PathVariable final String applicationId, @PathVariable final String formId,\n\t\t\tfinal HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException,\n\t\t\tYFormServiceException\n\t{\n\t\tif (LOG.isDebugEnabled())\n\t\t{\n\t\t\tLOG.debug(\"searchFormData: applicationId=\" + applicationId + \" | formId=\" + formId);\n\t\t\tLOG.debug(request.getHeader(ORBEON_FORM_DEFINITION_VERSION));\n\n\t\t\tfinal InputStream input = request.getInputStream();\n\t\t\tfinal String searchBody = IOUtils.toString(input, \"UTF-8\");\n\t\t\tLOG.debug(\"searchFormData Body:\" + searchBody);\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\tresponse.setStatus(HttpServletResponse.SC_OK);\n\t\t\tresponse.addHeader(\"Content-Type\", \"text/xml\");\n\t\t\tIOUtils.write(SEARCH_FORMDATA_EMPTY_SET, response.getOutputStream());\n\t\t}\n\t\tcatch (final IOException e)\n\t\t{\n\t\t\tresponse.sendError(HttpServletResponse.SC_EXPECTATION_FAILED, e.getLocalizedMessage());\n\t\t}\n\t}", "@GetMapping ( \"/patient/foodDiary/viewFoodDiaryEntries\" )\r\n @PreAuthorize ( \"hasRole('ROLE_PATIENT')\" )\r\n public String viewFoodDiaryEntriesForm ( final Model model ) {\r\n return \"/patient/foodDiary/viewFoodDiaryEntries\";\r\n }", "public GrizzletRequest getRequest();", "public static InputSpecification getInputSpecification() {\n\t\t\n\t\tProperties configFile = new Properties();\n\t\tInputSpecification input = new InputSpecification();\n\t\t\n\t\ttry {\n \n // THESE CALLS MUST BE SUBSTITUTED WITH THE GUI VALUES\n\t\t\t\n\t\t\tconfigFile.load(Crawler.class.getClassLoader().getResourceAsStream(\"app.properties\"));\n\t\t\t\n\t\t\tString user_field = configFile.getProperty(\"USERNAME_FIELD\");\n\t\t\tString user_value = configFile.getProperty(\"USERNAME_VALUE\");\n\t\t\tString password_field = configFile.getProperty(\"PASSWORD_FIELD\");\n\t\t\tString password_value = configFile.getProperty(\"PASSWORD_VALUE\");\n\t\t\tString submit_field = configFile.getProperty(\"SUBMIT_FIELD\");\n\t\t\tString submit_text = configFile.getProperty(\"SUBMIT_TEXT\");\n\t\t\t\n\t\t\tForm loginForm = new Form();\n\t\t\tloginForm.field(user_field).setValue(user_value);\n\t\t\tloginForm.field(password_field).setValue(password_value);\n\t\t\tinput.setValuesInForm(loginForm).beforeClickElement(submit_field).withText(submit_text);\n\t\t\t\n\t\t\t/*\n\t\t\tString textarea_field = configFile.getProperty(\"TEXTAREA_FIELD\");\n\t\t\tString textarea_text = configFile.getProperty(\"TEXTAREA_VALUE\");\n\t\t\tString quickadd_field = configFile.getProperty(\"QUICKADD_FIELD\");\n\t\t\tString quickadd_text = configFile.getProperty(\"QUICKADD_TEXT\");\n\t\t\t\n\t\t\tForm textareaForm = new Form();\n\t\t\ttextareaForm.field(textarea_field).setValue(textarea_text);\n\t\t\tinput.setValuesInForm(textareaForm).beforeClickElement(quickadd_field).withText(quickadd_text);\n\t\t\t*/\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn input;\n\t}", "private appR getApp() throws JAXBException, IOException {\n synchronized (application) {\r\n appR App = (appR) application.getAttribute(\"App\");\r\n if (App == null) {\r\n App = new appR();\r\n App.setFilePath(application.getRealPath(\"WEB-INF/Listings.xml\"));\r\n application.setAttribute(\"App\", App);\r\n }\r\n return App;\r\n }\r\n }", "BuildFilterForm getEditionForm(ID branchId, String name) throws BuildFilterNotFoundException, BuildFilterNotLoggedException;", "protected void doGet(HttpServletRequest request, HttpServletResponse \r\n\t\t\tresponse) throws ServletException, IOException {\r\n\t\tHttpSession mySession = request.getSession();\r\n\t\tRequestDispatcher rd = null;\r\n\t\tString appCode = request.getParameter(\"appCode\");\r\n//\t\tString companyName = request.getParameter(\"menu\");\r\n\t\tsynchronized (mySession) {\r\n\t\t\tApp a = (App) mySession.getAttribute(\"appBean\");\r\n\t\t\tAppDBManager adbm = new AppDBManager();\r\n\t\t\tif(a == null){\r\n\t\t\t\ta = new App(\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\");\r\n\t\t\t\t\r\n\t\t\t\ta.setAppCode(\"\");\r\n\t\t\t\ta.setDevelopersName(\"\");\r\n\t\t\t\ta.setAppTitle(\"\");\r\n\t\t\t\ta.setAppCatagory(\"Business\");\r\n\t\t\t\ta.setPrice(\"\");\r\n\t\t\t\ta.setRating(\"\");\r\n\t\t\t\ta.setDateUpdated(\"\");\r\n\t\t\t\ta.setCurrentVersion(\"\");\r\n\t\t\t\ta.setAppDescription(\"\");\r\n\t\t\t\tmySession.setAttribute(\"appBean\", a);\r\n//\t\t\t\tmySession.getAttribute(\"appBean\");\r\n\t\t\t}\r\n//\t\t\r\n//\t\t\tmySession.getAttribute(\"appBean\");\r\n//\t\t\ta.setAppCode(\"\");\r\n//\t\t\ta.setDevelopersName(\"\");\r\n//\t\t\ta.setAppTitle(\"\");\r\n//\t\t\ta.setAppCatagory(\"Business\");\r\n//\t\t\ta.setPrice(\"\");\r\n//\t\t\ta.setRating(\"\");\r\n//\t\t\ta.setDateUpdated(\"\");\r\n//\t\t\ta.setCurrentVersion(\"\");\r\n//\t\t\ta.setAppDescription(\"\");\r\n\t\t\r\n\t\tif(request.getParameter(\"viewall\") != null){\r\n\t\t\ttry {\r\n\t\t\t\tmySession.getAttribute(\"appBean\");\r\n\t\t\t\tArrayList<App> allApps = adbm.getAllApps();\r\n\t\t\t\tmySession.setAttribute(\"viewAllApps\", allApps);\r\n\t\t\t\tfor(App b : allApps){\r\n\t\t\t\t\ta.setAppCode(b.getAppCode());\r\n\t\t\t\t}\r\n\t\t\t\trd = request.getRequestDispatcher(\"/WEB-INF/app_list.jsp\");\r\n\t\t\t\trd.forward(request, response);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(request.getParameter(\"addapp\") != null){\r\n\t\t\tmySession.getAttribute(\"appBean\");\r\n\t\t\ta.setAppCode(\"\");\r\n\t\t\ta.setDevelopersName(\"\");\r\n\t\t\ta.setAppTitle(\"\");\r\n\t\t\ta.setAppCatagory(\"Business\");\r\n\t\t\ta.setPrice(\"\");\r\n\t\t\ta.setRating(\"\");\r\n\t\t\ta.setDateUpdated(\"\");\r\n\t\t\ta.setCurrentVersion(\"\");\r\n\t\t\ta.setAppDescription(\"\");\r\n\t\t\trd = request.getRequestDispatcher(\"/WEB-INF/app.jsp\");\r\n\t\t\trd.forward(request, response);\r\n\t\t}\r\n\t\telse if(request.getParameter(\"updateApp\") != null){\r\n\t\t\trd = request.getRequestDispatcher(\"/UpdateAppServlet\");\r\n\t\t\trd.forward(request, response);\r\n\t\t}\r\n\t\telse if(request.getParameter(\"editLink\") != null){\r\n\t\t\ttry {\r\n\t\t\t\tmySession.getAttribute(\"appBean\");\r\n\t\t\t\tArrayList<App> foundApp = adbm.findApp(appCode);\r\n\t\t\t\tmySession.setAttribute(\"findApp\", foundApp);\r\n\t\t\t\tfor(App b : foundApp){\r\n\t\t\t\t\ta.setAppCode(b.getAppCode());\r\n\t\t\t\t\ta.setDevelopersName(b.getDevelopersName());\r\n\t\t\t\t\ta.setAppTitle(b.getAppTitle());\r\n\t\t\t\t\ta.setAppCatagory(b.getAppCatagory());\r\n\t\t\t\t\ta.setPrice(b.getPrice());\r\n\t\t\t\t\ta.setRating(b.getRating());\r\n\t\t\t\t\ta.setDateUpdated(b.getDateUpdated());\r\n\t\t\t\t\ta.setCurrentVersion(b.getCurrentVersion());\r\n\t\t\t\t\ta.setAppDescription(b.getAppDescription());\r\n\t\t\t\t}\r\n\t\t\t\trd = request.getRequestDispatcher(\"/WEB-INF/app.jsp\");\r\n\t\t\t\trd.forward(request, response);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\t\r\n\t\t}\r\n\t\telse if(request.getParameter(\"menu\") != null){\r\n//\t\t\tmySession.getAttribute(\"companyName\");\r\n//\t\t\tmySession.getAttribute(companyName);\r\n//\t\t\tServletConfig config = getServletConfig();\r\n//\t\t\tServletContext context = getServletContext(); \r\n//\t\t if(companyName == null){companyName = \"No Company Name\";}\r\n//\t\t\tcontext.setAttribute(\"companyName\", companyName);\r\n\t\t\trd = request.getRequestDispatcher(\"/WEB-INF/elonapp.jsp\");\r\n\t\t\trd.forward(request, response);\r\n\t\t}\r\n\t\telse{\r\n\t\t\trd = request.getRequestDispatcher(\"/DeleteServlet\");\r\n\t\t\trd.forward(request, response);\r\n\t\t}\r\n\t}\r\n}", "public Form getViewForm() throws PublicationTemplateException;", "public FormInfo getForm (String forWhomNrMat) {\n for (int i = 0; i < forms.size(); i++) {\n if (this.forms.get(i).getStudent().getNrMatricol().equals(forWhomNrMat)) {\n return this.forms.get(i);\n }\n }\n \n return null;\n }", "private void show_reviewform(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tString restaurant = request.getParameter(\"key_id\");\n\t\tString restaurant_Name = request.getParameter(\"key_restName\");\n\t\tString restaurant_loc = request.getParameter(\"key_restloc\");\n\t\trequest.setAttribute(\"rrid\", restaurant);\n\t\trequest.setAttribute(\"rrname\", restaurant_Name);\n\t\trequest.setAttribute(\"rrloc\", restaurant_loc);\n\t\trequest.getRequestDispatcher(\"/WEB-INF/jsp/view/reviewform.jsp\").forward(request, response);\n\n\t}", "@GET\n @Path (\"{id}\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response getApplication(@Context final HttpServletRequest httpServletRequest, @PathParam(\"id\") String appId, @QueryParam(\"serviceId\") String serviceId, @QueryParam(\"checkEnablement\") String checkEnablement) {\n try {\n \t\n \t\tApplicationManager appManager = ApplicationManagerImpl.getInstance();\n\t\t\tApplication app = appManager.getApplication(appId);\n\t\t\t\n\t\t\t\n\t\t\tMap<String, Object> json = new HashMap<String, Object>();\n\t\t\tString appType = null;\n\t\t\tif (app.getAppType() != null)\n\t\t\t\tappType = app.getAppType();\n\t\t\tif (appType != null)\n\t\t\t\tjson.put(\"type\", appType);\n\t\t\tjson.put(\"policyId\", app.getPolicyId());\n\t\t\tjson.put(\"state\", app.getPolicyState());\n\t\t\t\n\t\t\tMetricConfigManager configService = MetricConfigManager.getInstance();\n Map<String, Object> configMap = configService.loadDefaultConfig(appType, appId);\n json.put(\"config\", configMap);\n\t\t\treturn RestApiResponseHandler.getResponseOk(objectMapper.writeValueAsString(json));\n\t\t} catch (DataStoreException e) {\n\n return RestApiResponseHandler.getResponseError(MESSAGE_KEY.RestResponseErrorMsg_database_error, e, httpServletRequest.getLocale());\n\t\t} catch (CloudException e) {\n\t\t\treturn RestApiResponseHandler.getResponseError(MESSAGE_KEY.RestResponseErrorMsg_cloud_error, e, httpServletRequest.getLocale());\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t\treturn Response.status(Status.INTERNAL_SERVER_ERROR).build();\n\t\t}\n }", "private void readApplicationsFromAPIManager(ClientAppFilter filter) throws AppException {\n\t\tif(this.apiManagerResponse !=null && this.apiManagerResponse.get(filter)!=null) return;\n\t\tHttpResponse httpResponse = null;\n\t\ttry {\n\t\t\tString requestedId = \"\";\n\t\t\tif(filter.getApplicationId()!=null) {\n\t\t\t\tif(applicationsCache.containsKey(filter.getApplicationId())) {\n\t\t\t\t\tthis.apiManagerResponse.put(filter, applicationsCache.get(filter.getApplicationId()));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\trequestedId = \"/\"+filter.getApplicationId();\n\t\t\t}\n\t\t\tURI uri = new URIBuilder(cmd.getAPIManagerURL()).setPath(cmd.getApiBasepath() + \"/applications\" + requestedId)\n\t\t\t\t\t.addParameters(filter.getFilters())\n\t\t\t\t\t.build();\n\t\t\tLOG.debug(\"Sending request to find existing applications: \" + uri);\n\t\t\tRestAPICall getRequest = new GETRequest(uri, APIManagerAdapter.hasAdminAccount());\n\t\t\thttpResponse = getRequest.execute();\n\t\t\tString response = EntityUtils.toString(httpResponse.getEntity(), \"UTF-8\");\n\t\t\tif(response.startsWith(\"{\")) { // Got a single response!\n\t\t\t\tresponse = \"[\"+response+\"]\";\n\t\t\t}\n\t\t\tthis.apiManagerResponse.put(filter,response);\n\t\t\tif(filter.getApplicationId()!=null) {\n\t\t\t\tapplicationsCache.put(filter.getApplicationId(), response);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new AppException(\"Can't initialize API-Manager API-Representation.\", ErrorCode.API_MANAGER_COMMUNICATION, e);\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif(httpResponse!=null) \n\t\t\t\t\t((CloseableHttpResponse)httpResponse).close();\n\t\t\t} catch (Exception ignore) {}\n\t\t}\n\t}", "@RequestMapping(\"/showForm\")\n public String showForm()\n {\n return \"helloworld-form\";\n }", "public POSApplication getApplicationById(String appId) {\n String url = Configuration.getGS_URL() + APPLICATION_SERVICE + appId;\n Logger.get().info(\"Calling application service url: \" + url);\n\n try {\n POSApplication application = HttpClientApi.getGson(url, POSApplication.class);\n return application;\n } catch (Exception e) {\n Logger.get().info(\"Exception when invoking application service:\" + e);\n return null;\n }\n }", "public String showDetail(){\r\n\t\tuserRole = (Employee) request.getSession().getAttribute(\"user\");\r\n\t\tString id = request.getParameter(\"id\");\r\n\t\tapplication = iad.getApplicationById(Integer.parseInt(id));\r\n\t\tif(application.getStatus().equals(\"unsubmit\")){\r\n\t\t\ttempId = id;\r\n\t\t\trequest.setAttribute(\"tempId\",id);\r\n\t\t\tif(userRole.isAdmin()){\r\n\t\t\t\treturn \"admin_unsubmit\";\r\n\t\t\t}\r\n\t\t\treturn \"unsubmit\";\r\n\t\t}else{\r\n\t\t\treturn \"submit\";\r\n\t\t}\r\n\t}", "@Override\n public List<FormInfo> getForms() {\n return forms;\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String action = request.getServletPath();\n\n switch (action) {\n case \"/new\":\n addForm(request, response);\n break;\n case \"/edit\":\n updateForm(request, response);\n break;\n case \"/insert\":\n insert(request, response);\n break;\n case \"/delete\":\n delete(request, response);\n break;\n case \"/update\":\n update(request, response);\n break;\n case \"/upload\":\n upload(request, response);\n break;\n default:\n listAll(request, response);\n break;\n }\n\n }", "public List findEngEditForm() {\n\t\tString sql = \"SELECT FO_ID,FO_NAME FROM ENG_FORM_FORM where FO_FTYPE='editpage' \";\n\t\tjdbcTemplate.setDataSource(initDataSource);\n\t\treturn jdbcTemplate.queryForList(sql);\n\t}", "private void retrieveInputs(HttpServletRequest req){\n\n\t\ttry {\t\t\t\t\n\n\t\t\t_medicalData = new MedicalData();\n\n\t\t\t\n\t\t\t_medicalData.setUserId(_userId);\n\t\t\t\n\t\t\t_medicalData.setPersonalName(req.getParameter(\"personalcontact_name\").trim());\n\t\t\t_medicalData.setSex(req.getParameter(\"personalcontact_sex\").trim());\n\t\t\t_medicalData.setPersonalAddress(req.getParameter(\"personalcontact_address\").trim());\t\t\t\n\t\t\t_medicalData.setPersonalPhone(req.getParameter(\"personalcontact_phonenumber1\").trim() + \",\" + \n\t\t\t\t\t\t\t\t\t\t req.getParameter(\"personalcontact_phonenumber2\").trim() + \",\" + \n\t\t\t\t\t\t\t\t\t\t req.getParameter(\"personalcontact_phonenumber3\").trim() );\n\t\t\t_medicalData.setPersonalDateOfBirth(req.getParameter(\"personalcontact_month\").trim() + \",\" + \n\t\t\t\t\t\t\t\t\t\t\t\treq.getParameter(\"personalcontact_day\").trim() + \",\" + \n\t\t\t\t\t\t\t\t\t\t\t\treq.getParameter(\"personalcontact_year\").trim() );\t\t\n\t\t\t\n\t\t\t_medicalData.setEmergencyContact1(req.getParameter(\"emergencycontact_name1\").trim());\n\t\t\t_medicalData.setEmergencyContact1Phone(req.getParameter(\"emergencycontact_1_phone1\").trim() + \",\" + \n\t\t\t\t\t \t\t\t\t\t req.getParameter(\"emergencycontact_1_phone2\").trim() + \",\" + \n\t\t\t\t\t req.getParameter(\"emergencycontact_1_phone3\").trim() );\n\t\t\t_medicalData.setEmergencyContact2(req.getParameter(\"emergencycontact_name2\").trim());\n\t\t\t_medicalData.setEmergencyContact2Phone(req.getParameter(\"emergencycontact_2_phone1\").trim() + \",\" + \n\t\t\t\t\t \t\t\t\t\t req.getParameter(\"emergencycontact_2_phone2\").trim() + \",\" + \n\t\t\t\t\t req.getParameter(\"emergencycontact_2_phone3\").trim() );\n\t\t\t\n\t\t\t_medicalData.setPrimaryCare(req.getParameter(\"emergencycontact_care\").trim());\n\t\t\t_medicalData.setPrimaryCarePhone(req.getParameter(\"emergencycontact_care_phone1\").trim() + \",\" + \n\t\t\t\t\t\t\t\t\t\t\t req.getParameter(\"emergencycontact_care_phone2\").trim() + \",\" + \n\t\t\t\t\t\t\t\t\t\t\t req.getParameter(\"emergencycontact_care_phone3\").trim() );\n\t\t\t_medicalData.setInsurance(req.getParameter(\"emergencycontact_insurance\").trim());\n\t\t\t_medicalData.setInsuranceId(req.getParameter(\"emergencycontact_insuranceid\").trim());\n\t\t\t\n\t\t\t_medicalData.setMedicalCondition(req.getParameter(\"emergencycontact_medications\").trim());\n\t\t\t_medicalData.setAllergies(req.getParameter(\"emergencycontact_allergies\").trim());\n\t\t\t_medicalData.setSpecialNotes(req.getParameter(\"emergencycontact_specialnote\").trim());\n\t\t\t\n\t\t\t_medicalData.setHeadNotes(req.getParameter(\"head_notes\").trim());\n\t\t\t_medicalData.setNeckNotes(req.getParameter(\"neck_notes\").trim());\n\t\t\t_medicalData.setChestNotes(req.getParameter(\"chest_notes\").trim());\n\t\t\t_medicalData.setArmsNotes(req.getParameter(\"arms_notes\").trim());\n\t\t\t_medicalData.setLegsNotes(req.getParameter(\"legs_notes\").trim());\n\t\t\t\n\t\t\t//Get the tab marker\n\t\t\t_tabMarker = req.getParameter(\"tabMarker\");\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t_log.warning(e.getMessage());\n\t\t}\t\t\t\n\t}", "public void fillFromHttpRequest(HttpServletRequest req) throws IOException {\n\t\tthis.id = req.getParameter(\"id\");\n\t\tthis.title = prepare(req.getParameter(\"title\"));\n\t\tthis.text = prepare(req.getParameter(\"text\"));\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n List<String> json = new LinkedList<>();\n Gson gson = new Gson();\n AppointmentService appservice = new AppointmentService();\n json = appservice.getDatabyId(Integer.parseInt(request.getParameter(\"id\")));\n try (PrintWriter out = response.getWriter()) {\n if (json != null) {\n out.println(json);\n } else {\n out.println(\"Ha ocurrido un error al buscar la cita\");\n }\n }\n }", "public Form getActionForm(String stateName, String actionName)\r\n throws ProcessManagerException {\r\n try {\r\n return processModel.getPublicationForm(actionName, currentRole,\r\n getLanguage());\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.UNKNOWN_ACTION\", e);\r\n }\r\n }", "IFormView getFormView();", "public OSPApplication getOSPApp();", "public MainForm getMainForm(){\n\t\treturn this.mainForm;\n\t}", "@GetMapping(\"/webformConfig/{id}\")\n String findWebformConfigById(@PathVariable(\"id\") Long id);", "protected final Form getForm() {\n\t\treturn itsForm;\n\t}", "protected Application getApplication() {\r\n\t\treturn application;\r\n\t}" ]
[ "0.6493022", "0.64654917", "0.60212946", "0.5947173", "0.58180857", "0.5645342", "0.56180704", "0.55986613", "0.5486078", "0.5479688", "0.5453805", "0.5425816", "0.54148257", "0.5409893", "0.54000574", "0.5387102", "0.5352874", "0.52997375", "0.52898675", "0.5280234", "0.52611315", "0.5257215", "0.52566224", "0.5248061", "0.5196187", "0.51941335", "0.5187186", "0.51648194", "0.5157334", "0.5142516", "0.512821", "0.5118735", "0.51137894", "0.5111772", "0.51102155", "0.51083195", "0.51065105", "0.5071652", "0.5062988", "0.50550586", "0.5048614", "0.504851", "0.5045167", "0.50291383", "0.5019682", "0.50177807", "0.5000988", "0.50003123", "0.49906233", "0.49902326", "0.49875858", "0.49870154", "0.49842077", "0.49823338", "0.49814048", "0.4973944", "0.49654725", "0.49651244", "0.4957373", "0.4956859", "0.49542642", "0.49433744", "0.49232814", "0.49220133", "0.49214512", "0.49208272", "0.4918886", "0.49023017", "0.4882807", "0.48706722", "0.48691186", "0.48637235", "0.48556447", "0.48491", "0.48444673", "0.48429784", "0.48399436", "0.48370603", "0.48328936", "0.48262784", "0.48245308", "0.48192608", "0.4817438", "0.4816791", "0.48153576", "0.4810899", "0.48097232", "0.48075908", "0.4804129", "0.48020786", "0.48015118", "0.4797217", "0.4793869", "0.4791745", "0.4787856", "0.47854957", "0.47823298", "0.4779204", "0.47677776", "0.47662815" ]
0.56566983
5
/////////////////////////////////////////// Startup Property ///////////////////////////////////////////
public String getPropertyStartupFilename() { return getProperty(startupFilenamePropertyName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startup(){}", "@Override\n public void startup() {\n }", "public abstract void startup();", "@Override\n protected void startUp() {\n }", "public void start()\n/* 354: */ {\n/* 355:434 */ onStartup();\n/* 356: */ }", "void startup();", "void startup();", "@Override\n\tpublic void earlyStartup() {\n\t}", "@Override\n protected void appStart() {\n }", "boolean isStartup();", "public void initialize() {\n\n getStartUp();\n }", "public void startup() {\n\t\tstart();\n }", "public Boolean getStartOnStartup() {\n\t\treturn this.startOnStartup;\n\t}", "public void notifyStartup();", "public StartUp(){\r\n \r\n }", "@Override\n public void firstApplicationStartup()\n {\n System.out.println(\"firstApplicationStartup\");\n \n }", "public void doMyStartupStuff() {\n System.out.println(\"init method\");\n }", "public void startup()\n\t{\n\t\t; // do nothing\n\t}", "public void startup() {\n neutral();\n }", "@Override\r\n\tpublic void startup() {\n\t\t\r\n\t\tString wechatID = \"gh_f49bb9a333b3\";\r\n\t\tString Token = \"spotlight-wechat\";\r\n\t\t\r\n\t\tNoIOClient client = new NoIOClient(\"mg.protel.com.hk\",5010);\r\n\t\tclient.addCRouter(wechatID, Token,null,null);\r\n\t\t\r\n\t\tclient.startup();\r\n\r\n\t}", "private void initializeStartup()\n {\n /* Turn off Limelight LED when first started up so it doesn't blind drive team. */\n m_limelight.turnOffLED();\n\n /* Start ultrasonics. */\n m_chamber.startUltrasonics();\n }", "public static long getStartupTime() {\n return startupTime;\n }", "@PostConstruct\n\tpublic void doMyStartupStfff() {\n\t\tSystem.out.println(\">> TennisCoach: inside of doMyStartupStuff\");\n\t}", "public void setStartOnStartup(Boolean startOnStartup) {\n\t\tthis.startOnStartup = startOnStartup;\n\t}", "protected void applicationInitalize() throws OwConfigurationException, OwServerException\r\n {\n OwConfiguration.applicationInitalize(this);\r\n }", "public void init()\n {\n _appContext = SubAppContext.createOMM(System.out);\n _serviceName = CommandLine.variable(\"serviceName\");\n initGUI();\n }", "@PostConstruct // bcoz of java 9 and higher version i need to download jar file\r\n\tpublic void doMyStartupStuff() {\r\n\t\tSystem.out.println(\">> TennisCoach: inside of doMyStrtupStuff()\");\r\n\t}", "void setStartUpExe(String s);", "public StartupHandler(){\r\n\t\tloadGameFiles();\r\n\t\tnew Engine();\r\n\t}", "public void startApp()\r\n\t{\n\t}", "public void doMyStartupStuff() {\r\n\t\tSystem.out.println(\"TrackCoach: inside method doMyStartupStuff\");\r\n\t}", "public void launchStartupScreen() {\n\t\tnew StartUpScreen(this);\n\t}", "@Override\n protected StartupMode getDefaultStartupMode() {\n return StartupMode.IN_JVM;\n }", "public static StartupOptions initial() {\n return new StartupOptions(StartupMode.INITIAL, null);\n }", "public Launcher()\n {\n // Loading (or creating) the preferences file\n // TODO: handle read/create file failed (maybe with an error popup?)\n boolean settingsLoaded = settings.checkAndLoad();\n\n if (!settingsLoaded) {\n System.exit(-10);\n }\n\n LoginController loginController = configureController(new LoginController());\n configureController(new ContactsController());\n configureController(new ConversationsController());\n\n /**\n * --------------------------\n * Event listeners\n * --------------------------\n */\n eventManager.attach(MvcEvent.WINDOW_CLOSING, new SaveOnExitListener());\n\n\n /**\n * --------------------------\n * Running the application\n * --------------------------\n */\n loginController.displayLogin();\n }", "@Override\r\n\tpublic void windowstartUpData() {\r\n\t\t// TODO Auto-generated method stub\r\n\r\n\t}", "public void doMyStartupStuff(){\r\n System.out.println(\"TrackCoach: inside method doMyStartupStuff\");\r\n }", "public void startUp() {\n\t\t/* Language of App */\n\t\t\n\t\t/* Init Icons */\n\t\tPaintShop.initIcons(display);\n\t\t/* Init all components */\n\t\tinitComponents();\n\t\t\n\t\t\n\t}", "@Override\n\tpublic void onStartup(ServletContext servletContext)\n\t\t\tthrows ServletException {\n\t\tsuper.onStartup(servletContext);//master line where whole framework works\n\t\t//configure global objects/tasks if required\n\t}", "@PostConstruct\r\n\tpublic void doMyStartUpStuff() {\r\n\t\t\r\n\t\tSystem.out.println(\"TennisCoach : -> Inside of doMyStartUpStuff()\");\r\n\t}", "@Override\n public StartupCommand[] initialize() {\n return null;\n }", "@Override\n public void run() {\n startup();\n }", "public MainEntryPoint() {\r\n\r\n }", "@Override\r\n\tpublic void startup() {\n\t\tif(!initialized)\r\n\t\t\tinitOperation();\r\n\t\tregisterMBean();\r\n\t}", "public void initialConfig() {\n }", "public void startApp() {\r\n\t\ttry {\r\n\t\t\tFXMLLoader loader;\r\n\t\t\t// load the FXML resource\r\n\t\t\tif (isRegister) {\r\n\t\t\t\tloader = changeScreen(\"/view/HomeRegister.fxml\", new BorderPane(), \"Register\");\r\n\t\t\t\tHomeRegisterController regiController = loader.getController();\r\n\t\t\t\tregiController.setMain(this);\r\n\t\t\t} else {\r\n\t\t\t\tloader = changeScreen(\"/view/HomeIdentification.fxml\", new BorderPane(), \"Identification\");\r\n\t\t\t\tHomeIdentificationController identiController = loader.getController();\r\n\t\t\t\tidentiController.setMain(this);\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}", "private void start() {\n\n\t}", "private static void setupOsgi() {\r\n FrameworkStarter.getInstance().start();\r\n }", "public void setLookupHomeOnStartup(boolean lookupHomeOnStartup)\r\n/* 24: */ {\r\n/* 25: 72 */ this.lookupHomeOnStartup = lookupHomeOnStartup;\r\n/* 26: */ }", "public void init() throws SystemStartupException\n {\n super.init();\n }", "public LocalAppLauncher() {\n }", "private PropertyUtil(){\n\t\ttry{\n\t\t\tloadURL();\n\t\t\tRuntime.getRuntime().addShutdownHook(new UtilShutdownHook());\n\t\t}catch(IOException ioe){\n\t\t\tLOGGER.error(\"Unable to load Property File\\n\"+ioe);\n\t\t}\n\t\tLOGGER.debug(\"INSTANTIATED\");\n\t}", "public interface Startup {\n\n\t/**\n\t * Starts the application.\n\t * \n\t * @param applicationManager\n\t * Application manager to start.\n\t */\n\tvoid start(ApplicationManager applicationManager);\n\n}", "public void autonomousInit() {\n \n }", "@Override protected void startup() {\n show(new MIDLetParamsView(this));\n }", "public void init() {\n\t\tregisterFunctions();\n\t\t\t\t\n\t\t//Start it\n\t\tconsole.startUserConsole();\n\t}", "void onStart(@Observes Startup event, ApplicationLifecycle app) {\n\n\t\tif (!newstore)\n\t\t\tapp.markAsRestart();\n\t\t\n\t}", "protected void start() {\n }", "public static void init() {\n\n\t\tsnapshot = new SnapshotService();\n\t\tlog.info(\"App init...\");\n\t}", "public static void autostart() {\n\t\tdefaultAutostartMode = AUTOSTART;\n\t}", "@Override\n public void beforeStart() {\n \n }", "public void starting();", "public abstract void initialSettings();", "@Override\n public void setLoadOnStartup(int los) {\n }", "@Override\r\n\tpublic void launch() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void launch() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void launch() {\n\t\t\r\n\t}", "public static void setApplicationInitialized() {\n applicationInitialized = true;\n }", "private void showExecutionStart() {\n log.info(\"##############################################################\");\n log.info(\"Creating a new web application with the following parameters: \");\n log.info(\"##############################################################\");\n log.info(\"Name: \" + data.getApplicationName());\n log.info(\"Package: \" + data.getPackageName());\n log.info(\"Database Choice: \" + data.getDatabaseChoice());\n log.info(\"Database Name: \" + data.getDatabaseName());\n log.info(\"Persistence Module: \" + data.getPersistenceChoice());\n log.info(\"Web Module: \" + data.getWebChoice());\n }", "@Override\n\tpublic void init() throws Exception {\n //the code present in this method is executed as soon as the application loads that is even before it starts\n\t\tsuper.init(); //super keyword invokes the init methods as per the definition in the Application class\n \n\t}", "@Override protected void startup() {\n show(new FrontView());\n //show(new RestaurantManagementView(this));\n }", "@Override\n public void initZygote(StartupParam startupParam) {\n if (Utils.isNotSamsungRom()) {\n XposedBridge.log(\"FFK: com.samsung.device.jar or com.samsung.device.lite.jar not found!\");\n }\n\n getModuleSharedPreferences();\n }", "public static void main(String[] args) {\n Startup.main(args);\n }", "@SuppressLint(\"MissingPermission\")\n private void startup() {\n Log.i(TAG, \"startup: \");\n Log.i(TAG, \"startup: \" + currentLocation.latitude);\n\n }", "public ClientApp()\n\t{\n\t\tinitComponents();\n\t\tafterInitComponents();\n\t}", "public void start() {\n\n\t}", "public void earlyStartup() {\r\n //To initialize the sensor.\r\n try {\r\n EclipseSensor.getInstance();\r\n }\r\n catch (SensorShellException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void Initialse() {\n\t\tappSettings = ctx.getSharedPreferences(APP_SETTINGS, 0);\n\t\tSharedPreferences.Editor prefEditor = appSettings.edit();\n\t\tprefEditor.putBoolean(BLOCK, true); // master switch\n\t\tprefEditor.putBoolean(NOTIFY, true); // controls whether a notification appears in status bar ans notifications lit\n\t\tprefEditor.putBoolean(REMOVE_CALLS, false); // determines whether calls are removed form the call log\n\t\t// add INIT to prevent this code from being called again\n\t\tprefEditor.putBoolean(INIT, true); // flag to allow subsequent loads to recognise that defaults are set\n\t\tprefEditor.putString(TEST, ctx.getString(R.string.test_number));\n\t\tprefEditor.putBoolean(RULES_EXIST, false); // added to control whether app kicks off commshandler\n\t\t\n\t\tprefEditor.commit();\n \n\t}", "public KafkaBacksideEnvironment() {\n\t\tConfigPullParser p = new ConfigPullParser(\"kafka-props.xml\");\n\t\tproperties = p.getProperties();\n\t\tconnectors = new HashMap<String, IPluginConnector>();\n\t\t//chatApp = new SimpleChatApp(this);\n\t\t//mainChatApp = new ChatApp(this);\n\t\t//elizaApp = new ElizaApp(this);\n\t\tbootPlugins();\n\t\t//TODO other stuff?\n\t\tSystem.out.println(\"Booted\");\n\t\t//Register a shutdown hook so ^c will properly close things\n\t\tRuntime.getRuntime().addShutdownHook(new Thread() {\n\t\t public void run() { shutDown(); }\n\t\t});\n\t}", "private Main() {\n\n super();\n }", "public static Date getStartupDateTime() {\r\n\t\treturn startupDateTime;\r\n\t}", "public void autonomousInit() {\n }", "public void autonomousInit() {\n }", "public void initialization() {\n path = Paths.get(\"/home/ubuntu-2018/NetBeansProjects/WatchService Example\");\n try {\n watchService = FileSystems.getDefault().newWatchService();\n path.register(watchService, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);\n } catch (IOException ioE) {\n System.out.println(\"Warning! Error message: \" + ioE);\n }\n }", "public void start() {}", "public void start() {}", "protected void onFirstTimeLaunched() {\n }", "@Override\n public void start() {}", "boolean hasStartingConfig() {\n return startCfg_ != null;\n }", "public void autonomousInit() {\n\t\t\n\t}", "@Override protected void startup() {\n LoganoView main = new LoganoView(this);\n JFrame frame = main.getFrame();\n\n \n show(main);\n\n frame.setMinimumSize(new Dimension(800, 600));\n frame.setExtendedState(JFrame.MAXIMIZED_BOTH);\n\n FrmLogin frmLogin = new FrmLogin();\n Helper.showForm(frmLogin);\n frmLogin.setLocationRelativeTo(frame);\n }", "@Override\n\tpublic void startUp() {\n\t\tSystem.out.println(\"disk startup!\");\n\n\t}", "public void PreAppConfig(Double InputVersion) \n { \n File_Manager Config = new File_Manager(); \n Version = Config.GetVersion(); \n System.out.println(\"Version = \" + Version);\n if (Version != InputVersion)\n {\n System.out.println(\"ERROR: Version Mismatch!\"); \n }\n ServerCount = Config.GetServerCount();\n \n System.out.println(\"Server Count = \" + ServerCount); \n ServerPaths= Config.GetServerPaths(ServerCount);\n \n for (int i = 0; i <= ServerCount - 1 ; i++){ \n System.out.println(\"ServerPath for \" + i + \" = \" + ServerPaths[i]); \n } \n \n if (!Files.isDirectory(Paths.get(\"ServerFiles\"))) \n {\n Config.createFolder(\"ServerFiles\");\n \n } else System.out.println(\"Server Directory Found!\"); \n System.out.println(\"App Initialised: Running.. \\n ________________________________ \\n\" );\n }", "@Override\n public void start() {\n\n }", "@Override\n public void start() {\n\n }", "@Override\n public void start() {\n\n }", "@Override\n public void autonomousInit() {\n }", "@Override\n public void autonomousInit() {\n }", "public void start() {\n\n }", "public boolean start() {\n\t\treturn true;\n\t}" ]
[ "0.74562174", "0.74030423", "0.69674295", "0.69049513", "0.68907994", "0.6866579", "0.6866579", "0.6824704", "0.67187124", "0.6712106", "0.66981494", "0.66017056", "0.65863967", "0.6579394", "0.65595037", "0.6541567", "0.65051204", "0.64491516", "0.6345317", "0.6320348", "0.62851185", "0.62841505", "0.62723523", "0.6255076", "0.6226416", "0.6206855", "0.61904824", "0.61843723", "0.6177702", "0.61656624", "0.61621934", "0.6139037", "0.6081157", "0.60737", "0.6050596", "0.6037034", "0.6034915", "0.60313106", "0.5998802", "0.59912723", "0.5987589", "0.5971943", "0.5968854", "0.5894487", "0.5881475", "0.58759606", "0.5872686", "0.5872359", "0.5865938", "0.5865739", "0.5861468", "0.58460265", "0.58445466", "0.58444744", "0.58434576", "0.5842899", "0.58324075", "0.58264035", "0.58114165", "0.5809657", "0.58068335", "0.58053184", "0.5805196", "0.5790647", "0.57895464", "0.57895464", "0.57895464", "0.57889307", "0.57848704", "0.5779275", "0.5778443", "0.5773138", "0.5767344", "0.5762521", "0.5758547", "0.57434356", "0.574137", "0.5739407", "0.5735571", "0.5730277", "0.57282573", "0.5713894", "0.5713894", "0.5705973", "0.568442", "0.568442", "0.5683842", "0.56833273", "0.5675927", "0.56682074", "0.5665577", "0.56625366", "0.56621164", "0.56570333", "0.56570333", "0.56570333", "0.5656296", "0.5656296", "0.5652303", "0.564532" ]
0.58307195
57
/////////////////////////////////////////// Window Property ///////////////////////////////////////////
public int getPropertyNWindows() { int nWindow = 0; while (hasProperty(windowPropertyName + nWindow + "." + windowXPosSubPropertyName) == true) nWindow++; return nWindow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Window getWindow() { return window; }", "public void setWindow(GWindow w) {\r\n window = w;\r\n }", "@Override\n protected void windowInit ()\n {\n }", "public interface Window {\n\t\n\t/**\n\t * Provides all available display modes that this window\n\t * can be set to.\n\t * \n\t * @return All available displays modes.\n\t */\n\tDisplayMode[] getAvailableDisplayModes();\n\t\n\t/**\n\t * @return current window title.\n\t */\n\tString getTitle();\n\t\n\t/**\n\t * Sets the display mode for this window.\n\t * The safest way to change the display mode is\n\t * to do this before the window is actually visible\n\t * on screen. Some implementations may fail when\n\t * change will be done on fly.\n\t * \n\t * @param mode Display mode to set.\n\t */\n\tvoid setDisplayMode(DisplayMode mode);\n\t\n\t/**\n\t * Sets the window title.\n\t * \n\t * @param title The window title to set.\n\t */\n\tvoid setTitle(String title);\n\t\n\t/**\n\t * Shows the actual application window. It cannot be\n\t * hidden until application stops.\n\t */\n\tvoid show();\n}", "public Window getWindow() {\r\n return window;\r\n }", "public void setWindow(final Window window) {\r\n this.window = window;\r\n }", "public Window getWindow() {\n return window;\n }", "@Override\n public boolean isActive(W window) {\n return true;\n }", "public JFrame getWindow() {\n\t\treturn window;\n\t}", "public static Window getWindow() {\r\n\t\treturn window;\r\n\t}", "public void setWindow(Rectangle.Double w) {\n this.setWindow(w.x, w.y, w.width, w.height);\n }", "@Override\n public void windowOpened(WindowEvent e) {\n \n }", "public final TWindow getWindow() {\n return window;\n }", "@Override public void windowOpened(WindowEvent evt) { }", "@Override public void windowOpened(WindowEvent evt) { }", "public WindowDecorator(Window window) {// creates a window\n this.window = window;\n }", "@Override\n public void windowOpened(WindowEvent we) {\n }", "public SettingsWindow()\n {\n House.seed = System.currentTimeMillis();\n initWindow();\n showWindows();\n }", "public static JFrame getWindow()\r\n {\r\n\treturn window;\r\n }", "@Override\n public W representative(W window) {\n return window;\n }", "private void setupGameWindow()\n {\n uControll.setWindowProperties(new WindowListener() {\n @Override\n public void windowOpened(WindowEvent we) {\n }\n\n @Override\n public void windowClosing(WindowEvent we) {\n menuPanel.open();\n }\n\n @Override\n public void windowClosed(WindowEvent we) {\n }\n\n @Override\n public void windowIconified(WindowEvent we) {\n }\n\n @Override\n public void windowDeiconified(WindowEvent we) {\n }\n\n @Override\n public void windowActivated(WindowEvent we) {\n }\n\n @Override\n public void windowDeactivated(WindowEvent we) {\n }\n });\n }", "@Override\n public long getValidWindow() {\n return 0;\n }", "public Window() {\n initComponents();\n SetIcon();\n \n }", "@Override\n public void windowOpened(WindowEvent e)\n {\n\n }", "@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n public void windowOpened(WindowEvent e) {\n }", "@Override\n\tpublic void windowStateChanged(WindowEvent arg0) {\n\t\t\n\t}", "public JDialog getWindow() {\n\t\treturn window;\n\t}", "private SettingsWindow() {\n loadData();\n createListeners();\n }", "void buildWindow()\n { main.gui.gralMng.selectPanel(\"primaryWindow\");\n main.gui.gralMng.setPosition(-30, 0, -47, 0, 'r'); //right buttom, about half less display width and hight.\n int windProps = GralWindow.windConcurrently;\n GralWindow window = main.gui.gralMng.createWindow(\"windStatus\", \"Status - The.file.Commander\", windProps);\n windStatus = window; \n main.gui.gralMng.setPosition(3.5f, GralPos.size -3, 1, GralPos.size +5, 'd');\n widgCopy = main.gui.gralMng.addButton(\"sCopy\", main.copyCmd.actionConfirmCopy, \"copy\");\n widgEsc = main.gui.gralMng.addButton(\"dirBytes\", actionButton, \"esc\");\n }", "public int getWindows() {\n\t\treturn windows;\n\t}", "protected double getWindowWidth() {\n\t\treturn m_windowWidth;\n\t}", "protected WindowFeaturesNodeDialog() {\n super();\n \n addDialogComponent(new DialogComponentNumber(\n new SettingsModelIntegerBounded(\n WindowFeaturesNodeModel.CFGKEY_WINDOWSIZE,\n WindowFeaturesNodeModel.DEFAULT_CFGKEY_WINDOWSIZE,\n Integer.MIN_VALUE, Integer.MAX_VALUE),\n \"Window Size:\", /*step*/ 1, /*componentwidth*/ 5));\n \n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tif (!isMaximized(window)) {\n\t\t\t\t\tsettings.put(\"window.x\", String.valueOf(window.getX()));\n\t\t\t\t\tsettings.put(\"window.y\", String.valueOf(window.getY()));\n\t\t\t\t\tsettings.put(\"window.width\", String.valueOf(window.getWidth()));\n\t\t\t\t\tsettings.put(\"window.height\", String.valueOf(window.getHeight()));\n\t\t\t\t}\n\t\t\t}", "public void setWindow(Window window) {\n this.window = window;\n window.setInput(input);\n }", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t}", "public Integer getEventGenWindow() {\n return eventGenWindow;\n }", "@Override\n\t\t\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}", "private Window getWindow() {\r\n return root.getScene().getWindow();\r\n }", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\n\t}", "public static synchronized void getSettingsWindow() {\n if (WINDOW == null) {\n WINDOW = new JFrame(\"Settings\");\n WINDOW.setContentPane(new SettingsWindow().settingsPanel);\n WINDOW.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n WINDOW.pack();\n }\n WINDOW.setVisible(true);\n WINDOW.requestFocus();\n }", "@Override\n\tpublic Window createWindow() {\n\t\tLightVisualThemeWindow lightVisualThemeWindow = new LightVisualThemeWindow();\n\t\treturn lightVisualThemeWindow;\n\t}", "@java.lang.Override\n public long getWindowSize() {\n return windowSize_;\n }", "@Override\n\tpublic void windowOpened(WindowEvent e)\n\t{\n\n\t}", "@Override\r\n\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\r\n\t\t}", "public GameWindow() {\n\t\tthis.initWindow();\n\t}", "public void windowOpened (WindowEvent we) { }", "protected void saveWindowDimensionsIfWindowed() {\n\t\tif(isFullscreen() || isBorderless()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.lastWindowWidth = getWidth();\n\t\tthis.lastWindowHeight = getHeight();\n\t\tthis.lastWindowPosX = getPositionX();\n\t\tthis.lastWindowPosY = getPositionY();\n\t}", "@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t\t\n\t}", "@Override\n\tpublic void windowOpened( WindowEvent e ) {\n\t\t\n\t}", "private void Settings(){\n setUndecorated(true); \r\n\t setSize(250,70);\r\n\t setLocationRelativeTo(null);\r\n setAlwaysOnTop(true);\r\n\t setVisible(true);\r\n \r\n addMouseListener(new HandleStatusDialog());\r\n addWindowListener(new HandleStatusDialog());\r\n }", "public int getWindowID() {\n\t\treturn windowID;\n\t}", "@Override\n\t\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\t\n\t\t}", "public int winSize() { return winSize; }", "@java.lang.Override\n public long getWindowSize() {\n return windowSize_;\n }", "@Override\n\t\t\t\tpublic void windowOpened(WindowEvent e) {\n\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void windowOpened(WindowEvent e) {\n\n\t\t\t\t}" ]
[ "0.73269993", "0.7188217", "0.68780726", "0.68502706", "0.6849432", "0.67724335", "0.6743749", "0.6701705", "0.6686486", "0.66727984", "0.6655299", "0.6640166", "0.6617344", "0.6596823", "0.6596823", "0.65681744", "0.6567848", "0.65337765", "0.65285236", "0.6496335", "0.6485415", "0.6450774", "0.64185894", "0.64146894", "0.6409641", "0.6409641", "0.6409641", "0.6409641", "0.6403808", "0.63977027", "0.6397698", "0.63877535", "0.6387314", "0.6382532", "0.6372883", "0.6366738", "0.635632", "0.635632", "0.635632", "0.635632", "0.635632", "0.635632", "0.635632", "0.635632", "0.635632", "0.635632", "0.635632", "0.635632", "0.635632", "0.635632", "0.635632", "0.635632", "0.635632", "0.635632", "0.635632", "0.635632", "0.635632", "0.633318", "0.63260406", "0.63219637", "0.63150406", "0.6313881", "0.63096553", "0.6308827", "0.6308827", "0.6308827", "0.6308827", "0.6308827", "0.6308827", "0.6308827", "0.6306063", "0.6304326", "0.6304326", "0.6304326", "0.6304326", "0.6304326", "0.63020575", "0.6295994", "0.6294648", "0.62741005", "0.62706023", "0.6270539", "0.62614775", "0.62604934", "0.62603134", "0.62603134", "0.62603134", "0.62603134", "0.62603134", "0.62558997", "0.62558997", "0.62479174", "0.6247518", "0.6245738", "0.6241791", "0.6233617", "0.6227773", "0.6203767", "0.6193784", "0.6193784" ]
0.6356293
57
Handle navigation view item clicks here.
@SuppressWarnings("StatementWithEmptyBody") @Override public boolean onNavigationItemSelected(MenuItem item) { int id = item.getItemId(); if (id == R.id.partiesItem) { Intent intent = new Intent(CreateAccountActivity.this, MainActivity.class); startActivity(intent); } else if (id == R.id.loginItem) { Intent intent = new Intent(CreateAccountActivity.this, LoginActivity.class); startActivity(intent); } else if (id == R.id.createAccountItem) { } else if (id == R.id.aboutItem) { } DrawerLayout drawer = (DrawerLayout) findViewById(R.id.create_account); drawer.closeDrawer(GravityCompat.START); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onNavigationItemClicked(Element element);", "@Override\n public void onClick(View view) { listener.onItemClick(view, getPosition()); }", "void onDialogNavigationItemClicked(Element element);", "@Override\n public void onClick(View view) {\n itemInterface.OnItemClickedListener(tracks, getAdapterPosition());\n }", "@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }", "@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }", "@Override\n public void onClick(View view) {\n listener.menuButtonClicked(view.getId());\n }", "@Override\r\n\tpublic boolean onNavigationItemSelected(int itemPosition, long itemId) {\n\t\tLog.d(\"SomeTag\", \"Get click event at position: \" + itemPosition);\r\n\t\tswitch (itemPosition) {\r\n\t\tcase 1:\r\n\t\t\tIntent i = new Intent();\r\n\t\t\ti.setClass(getApplicationContext(), MainActivity.class);\r\n\t\t\tstartActivity(i);\r\n\t\t\t//return true;\r\n\t\t\tbreak;\r\n\t\tcase 2 :\r\n\t\t\tIntent intent = new Intent(this,WhiteListActivity.class);\r\n\t\t\tstartActivity(intent);\r\n\t\t\t//return true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n String name = navDrawerItems.get(position).getListItemName();\n // call a helper method to perform a corresponding action\n performActionOnNavDrawerItem(name);\n }", "@Override\n\tpublic void rightNavClick() {\n\t\t\n\t}", "@Override\n public void OnItemClick(int position) {\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (itemClicked != null)\n\t\t\t\t\titemClicked.OnItemClicked((BusinessType)item.getTag(), item);\n\t\t\t}", "@Override\n public void onClick(View view) {\n clickListener.onItemClicked(getBindingAdapterPosition());\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\thandleClick(position);\n\t\t\t}", "@Override\n public void onItemClicked(int itemPosition, Object dataObject) {\n }", "@Override\n public void onItemClick(int pos) {\n }", "@Override\n public void onClick(View v) {\n if (listener != null)\n listener.onItemClick(itemView, getPosition());\n }", "private void handleNavClick(View view) {\n final String label = ((TextView) view).getText().toString();\n if (\"Logout\".equals(label)) {\n logout();\n }\n if (\"Profile\".equals(label)) {\n final Intent intent = new Intent(this, ViewProfileActivity.class);\n startActivity(intent);\n }\n if (\"Search\".equals(label)){\n final Intent intent = new Intent(this, SearchActivity.class);\n startActivity(intent);\n }\n if (\"Home\".equals(label)) {\n final Intent intent = new Intent(this, HomeActivity.class);\n startActivity(intent);\n }\n }", "void onMenuItemClicked();", "@Override\n public void onClick(View view) {\n\n switch (view.getId()) {\n case R.id.tvSomeText:\n listener.sendDataToActivity(\"MainActivity: TextView clicked\");\n break;\n\n case -1:\n listener.sendDataToActivity(\"MainActivity: ItemView clicked\");\n break;\n }\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\t\tMainActivity sct = (MainActivity) act;\n\t\t\t\t\t\t\t\t\tsct.onItemClick(posit2, 11);\n\t\t\t\t\t\t\t\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t\t\t}", "@Override\n public void onClick(View v) {\n listener.onItemClick(v, position);\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\n\t}", "@Override\n public void onItemClick(View view, String data) {\n }", "abstract public void onSingleItemClick(View view);", "@Override\n public void onClick(View v) {\n this.itemClickListener.onItemClick(v, getLayoutPosition());\n }", "@Override\n public void itemClick(int pos) {\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {\n TextView textView = (TextView)view;\n switch(textView.getText().toString()){\n case \"NavBar\":\n Intent nav = new Intent(this, NavDrawerActivity.class);\n startActivity(nav);\n break;\n }\n\n //Toast.makeText(MainActivity.this,\"Go to \" + textView.getText().toString() + \" page.\",Toast.LENGTH_LONG).show();\n }", "@Override\r\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\r\n\t}", "@Override\n\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\tlong arg3) {\n\t\t\t\n\t\t}", "@Override\n public void onItemClick(Nson parent, View view, int position) {\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\t\t\t\t\tlong arg3) {\n\t\t\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void onClick(View view) {\n int position = getAdapterPosition();\n\n // Check if listener!=null bcz it is not guarantee that we'll call setOnItemClickListener\n // RecyclerView.NO_POSITION - Constant for -1, so that we don't click item at Invalid position (safety measure)\n if (listener != null && position != RecyclerView.NO_POSITION) {\n //listener.onItemClick(notes.get(position)); - used in RecyclerView.Adapter\n listener.onItemClick(getItem(position)); // getting data from superclass\n }\n }", "@Override\n public void onClick(View v) {\n itemClickListener.itemClicked(movieId, v);\n }", "@Override\n\t\tpublic void onClick(View view) {\n\t\t\tif (iOnItemClickListener != null) {\n\t\t\t\tiOnItemClickListener.onItemClick(view, null, getAdapterPosition());\n\t\t\t}\n\t\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t}", "public void onItemClick(View view, int position);", "@Override\n public void onClick(View v) {\n if (mListener != null){\n mListener.onItemClick(itemView, getLayoutPosition());\n }\n }", "@Override\n public void onItemClick(int position) {\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\titemClickListener.Callback(itemInfo);\n\t\n\t\t\t}", "@Override\n public void onItemClick(View view, int position) {\n }", "@Override\n public void onItemClick(View view, int position) {\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t}", "@Override\n public void onItemOfListClicked(Object o) {\n UserProfileFragmentDirections.ActionUserProfileFragmentToEventProfileFragment action = UserProfileFragmentDirections.actionUserProfileFragmentToEventProfileFragment((MyEvent) o);\n navController.navigate(action);\n }", "@Override\n public void onClick(View view) {\n if(mFrom.equals(NetConstants.BOOKMARK_IN_TAB)) {\n IntentUtil.openDetailActivity(holder.itemView.getContext(), NetConstants.G_BOOKMARK_DEFAULT,\n bean.getArticleUrl(), position, bean.getArticleId());\n }\n else {\n IntentUtil.openDetailActivity(holder.itemView.getContext(), mFrom,\n bean.getArticleUrl(), position, bean.getArticleId());\n }\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_ds_note) {\n // Handle the camera action\n } else if (id == R.id.nav_ds_todo) {\n\n } else if (id == R.id.nav_ql_the) {\n\n } else if (id == R.id.nav_tuychinh) {\n Intent intent = new Intent(this, CustomActivity.class);\n startActivity(intent);\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\t\t\t\t\t\tint position, long id) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}", "@Override\n public void onItemClick(View view, ListItem obj, int position) {\n }", "@Override\n\tpublic void onItemClick(Object o, int position) {\n\n\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t}", "void onLinkClicked(@Nullable ContentId itemId);", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:\n Intent homeIntent = new Intent(this, MainActivity.class);\n startActivity(homeIntent);\n break;\n case R.id.send_email:\n Intent mailIntent = new Intent(this, ContactActivity.class);\n startActivity(mailIntent);\n break;\n case R.id.send_failure_ticket:\n Intent ticketIntent = new Intent(this, TicketActivity.class);\n startActivity(ticketIntent);\n break;\n case R.id.position:\n Intent positionIntent = new Intent(this, LocationActivity.class);\n startActivity(positionIntent);\n break;\n case R.id.author:\n UrlRedirect urlRed = new UrlRedirect(this.getApplicationContext(),getString(R.string.linkedinDeveloper));\n urlRed.redirect();\n break;\n default:\n break;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout_main_activity);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@SuppressWarnings(\"ConstantConditions\")\n public void onItemClicked(@NonNull Item item) {\n getView().openDetail(item);\n }", "void onItemClick(View view, int position);", "@Override\n public void onClick(View v) {\n startNavigation();\n }", "void onItemClick(int position);", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_logs) {\n startActivity(new Intent(this, LogView.class));\n } else if (id == R.id.nav_signOut) {\n signOut();\n }\n\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public void onClick(View v) {\n if(listener!=null & getLayoutPosition()!=0)\n listener.onItemClick(itemView, getLayoutPosition());\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\n\t\t\tlong id) {\n\t\tpresenter.onItemClicked(position);\n\t}", "@Override\n public void onClick(View view) {\n listener.onMenuButtonSelected(view.getId());\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\tHashMap<String, Object> item = (HashMap<String, Object>) arg0\n\t\t\t\t\t\t.getAdapter().getItem(arg2);\n\n\t\t\t\tIntent intent = new Intent(ViewActivity.this,\n\t\t\t\t\t\tContentActivity.class);\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tbundle.putString(\"_id\", item.get(\"_id\").toString());\n\t\t\t\tbundle.putString(\"_CityEventID\", item.get(\"_CityEventID\")\n\t\t\t\t\t\t.toString());\n\t\t\t\tbundle.putString(\"_type\", String.valueOf(_type));\n\t\t\t\tintent.putExtras(bundle);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onClick(View view) {\n Navigation.findNavController(view).navigate(R.id.addEventFragment);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Log.w(TAG , \"POSITION : \" + position);\n\n itemClick(position);\n }", "void clickItem(int uid);", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_categories) {\n Intent intent = new Intent(getApplicationContext(), CategoryActivity.class);\n startActivity(intent, compat.toBundle());\n newsHere.setSourceActivity(\"search\");\n newsHere.setTargetActivity(\"category\");\n\n } else if (id == R.id.nav_top_headlines) {\n newsHere.setSourceActivity(\"search\");\n newsHere.setTargetActivity(\"home\");\n Intent intent = new Intent(getApplicationContext(), HomeActivity.class);\n startActivity(intent, compat.toBundle());\n } else if (id == R.id.nav_search) {\n // Do nothing\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public void onItemClick(View view, int position) {\n\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_orders) {\n\n Intent orderStatusIntent = new Intent(Home.this , OrderStatus.class);\n startActivity(orderStatusIntent);\n\n } else if (id == R.id.nav_banner) {\n\n Intent bannerIntent = new Intent(Home.this , BannerActivity.class);\n startActivity(bannerIntent);\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n }", "public void onItemClick(View view, int position) {\n\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t}", "@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\r\n\t\t\t\t\tlong arg3) {\n\r\n\t\t\t}", "void onClick(View item, View widget, int position, int which);", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n\n\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n Intent intent;\n switch(item.getItemId()){\n case R.id.nav_home:\n finish();\n intent = new Intent(this, NavigationActivity.class);\n startActivity(intent);\n return true;\n case R.id.nav_calendar:\n finish();\n intent = new Intent(this, EventHome.class);\n startActivity(intent);\n return true;\n case R.id.nav_discussion:\n return true;\n case R.id.nav_settings:\n intent = new Intent(this, SettingsActivity.class);\n startActivity(intent);\n return true;\n case R.id.nav_app_blocker:\n intent = new Intent(this, AppBlockingActivity.class);\n startActivity(intent);\n return true;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case R.id.nav_home:\n break;\n\n case R.id.nav_favourites:\n\n if (User.getInstance().getUser() == null) {\n Intent intent = new Intent(getApplicationContext(), LoginActivity.class);\n startActivity(intent);\n }\n\n Intent intent = new Intent(getApplicationContext(), PlaceItemListActivity.class);\n startActivity(intent);\n\n break;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tonRgtRgtMenuClick(v);\n\t\t\t}", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_camera) {\n // Handle the camera action\n } else if (id == R.id.nav_gallery) {\n Toast.makeText(this, \"gallery is clicked!\", Toast.LENGTH_LONG).show();\n\n } else if (id == R.id.nav_slideshow) {\n\n } else if (id == R.id.nav_manage) {\n\n } else if (id == R.id.nav_share) {\n\n } else if (id == R.id.nav_send) {\n\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "public void menuClicked(MenuItem menuItemSelected);", "@Override\n public void onItemClick(int position) {\n }", "@Override\n public void onItemClick(int position) {\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_my_account) {\n startActivity(new Intent(this, MyAccountActivity.class));\n } else if (id == R.id.nav_message_inbox) {\n startActivity(new Intent(this, MessageInboxActivity.class));\n } else if (id == R.id.nav_view_offers) {\n //Do Nothing\n } else if (id == R.id.nav_create_listing) {\n startActivity(new Intent(this, CreateListingActivity.class));\n } else if (id == R.id.nav_view_listings) {\n startActivity(new Intent(this, ViewListingsActivity.class));\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\r\n\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\r\n\t\t\t\t\t\tint position, long id) {\n\t\t\t\t}" ]
[ "0.7882029", "0.7235578", "0.6987005", "0.69458413", "0.6917864", "0.6917864", "0.6883472", "0.6875181", "0.68681556", "0.6766498", "0.67418456", "0.67207", "0.6716157", "0.6713947", "0.6698189", "0.66980195", "0.66793925", "0.66624063", "0.66595167", "0.6646381", "0.6641224", "0.66243863", "0.6624042", "0.66207093", "0.6602551", "0.6602231", "0.6599443", "0.65987265", "0.65935796", "0.6585869", "0.658491", "0.65811735", "0.65765643", "0.65751576", "0.65694076", "0.6561757", "0.65582377", "0.65581614", "0.6552827", "0.6552827", "0.6549224", "0.65389794", "0.65345114", "0.65337104", "0.652419", "0.652419", "0.6522521", "0.652146", "0.6521068", "0.6519354", "0.65165275", "0.65159816", "0.65028816", "0.6498054", "0.6498054", "0.64969087", "0.64937705", "0.6488544", "0.64867324", "0.64866185", "0.64865905", "0.6484047", "0.6481108", "0.6474686", "0.64628965", "0.64551884", "0.6446893", "0.64436555", "0.64436555", "0.64436555", "0.64436555", "0.64436555", "0.64386237", "0.643595", "0.64356565", "0.64329195", "0.6432562", "0.6429554", "0.64255124", "0.64255124", "0.64121485", "0.64102405", "0.64095175", "0.64095175", "0.64094734", "0.640727", "0.64060104", "0.640229", "0.6397359", "0.6392996", "0.63921124", "0.63899696", "0.63885015", "0.63885015", "0.63873845", "0.6368818", "0.6368818", "0.63643163", "0.63643163", "0.63643163", "0.6358884" ]
0.0
-1
Resetting variables to avoid addition with saved values in database
public void calculateSubprojects() { totalWorkHours = 0; estTotalCost = 0; for (int i = 0; i < subprojects.size(); i++) { int[] taskData = subprojects.get(i).calculateSubproject(baselineHoursPrWorkday); totalWorkHours += taskData[0]; estTotalCost += taskData[1]; estTotalCost += taskData[2]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void resetVariables(){\n\t\tthis.queryTriplets.clear();\n\t\tthis.variableList.clear();\n\t\tthis.prefixMap.clear();\n\t}", "public void resetValues() {\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(CUREDIFFICULTY, null);\n editor.putInt(CURETARGETSCORE, 0);\n editor.putInt(CURRSCOREFINDCURE, 0);\n editor.apply();\n System.out.println(sharedPreferences.getAll());\n\n }", "private void reset() {\n //todo test it !\n longitude = 0.0;\n latitude = 0.0;\n IDToday = 0L;\n venVolToday = 0L;\n PM25Today = 0;\n PM25Source = 0;\n DBCanRun = true;\n DBRunTime = 0;\n isPMSearchRunning = false;\n isLocationChanged = false;\n isUploadRunning = false;\n refreshAll();\n locationInitial();\n DBInitial();\n sensorInitial();\n }", "@Override\n public void resetAllValues() {\n }", "public void reset () {\n lastSave = count;\n count = 0;\n }", "private void resetValues() {\n\t\ttotalNet = Money.of(Double.valueOf(0.0), currencyCode);\n\t\ttotalVat = Money.of(Double.valueOf(0.0), currencyCode);\n\t\ttotalGross = Money.of(Double.valueOf(0.0), currencyCode);\n\t}", "public void resetVariables() {\n this.name = \"\";\n this.equipLevel = 0;\n this.cpuCost = 0;\n this.bankDamageModifier = 1.0f;\n this.redirectDamageModifier = 1.0f;\n this.attackDamageModifier = 1.0f;\n this.ftpDamageModifier = 1.0f;\n this.httpDamageModifier = 1.0f;\n this.attackDamage = 0.0f;\n this.pettyCashReducePct = 1.0f;\n this.pettyCashFailPct = 1.0f;\n this.dailyPayChangeFailPct = 1.0f;\n this.dailyPayChangeReducePct = 1.0f;\n this.stealFileFailPct = 1.0f;\n this.installScriptFailPct = 1.0f;\n }", "private void resetValues() {\n teamAScoreInt = 0;\n teamBScoreInt = 0;\n teamAFoulScoreInt = 0;\n teamBFoulScoreInt = 0;\n }", "public void resetVariables() {\n\t\tArrays.fill(variables, 0.0);\n\t}", "private void resetDataForAddAfterSchoolAlly() \r\n\t{\n\t\tStaticVariables.showAllyName1InAfterSchool = false;\r\n\t\tStaticVariables.showAllyName2InAfterSchool = false;\r\n\r\n\t\t/*\tStaticVariables.allySetFor1 = null;\r\n\t\tStaticVariables.allySetFor2 = null;*/\r\n\r\n\t}", "public void resetZealotCounter() {\n persistentValues.summoningEyeCount = 0;\n persistentValues.totalKills = 0;\n persistentValues.kills = 0;\n saveValues();\n }", "public void unReset () {\n count = lastSave;\n }", "public void resetTestVars() {\n\t\tuser1 = new User();\n\t\tuser2 = new User();\n\t\tuser3 = new User();\n\t\tsn = new SocialNetwork();\n\t\tstatus = SocialNetworkStatus.DEFAULT;\n\t\tearly = new Date(25L);\n\t\tmid = new Date(50L);\n\t\tlate = new Date(75L);\n\t}", "public void reset() {\n sum1 = 0;\n sum2 = 0;\n }", "public void resetValues() {\n\t\tJavaValue[] publicJavaValues = this.publicVariables.values().toArray(new JavaValue[this.publicVariables.size()]);\n\t\tJavaValue[] privateJavaValues = this.privateVariables.values().toArray(new JavaValue[this.privateVariables.size()]);\n\n\t\tfor(int i = 0; i < publicJavaValues.length; i++) {\n\t\t\tpublicJavaValues[i].reset();\n\t\t}\n\n\t\tfor(int i = 0; i < privateJavaValues.length; i++) {\n\t\t\tprivateJavaValues[i].reset();\n\t\t}\n\t}", "void reset(){\n if (vars!=null){\n vars.clear();\n }\n if (gVars!=null){\n gVars.clear();\n }\n }", "public void reset() {\n gameStatus = null;\n userId = null;\n gameId = null;\n gameUpdated = false;\n selectedTile = null;\n moved = false;\n }", "public void reset() {\n tpsAttentePerso = 0;\n tpsAttentePerso2 =0;\n \ttotalTime = 0;\n\tnbVisited = 0;\n moyenne =0;\n }", "public static void variableReset() {\n\t\tLogic.pieceJumped = 0;\n\t\tLogic.bool = false;\n\t\tLogic.curComp = null;\n\t\tLogic.prevComp = null;\n\t\tLogic.jumpedComp = null;\n\t\tLogic.ydiff = 0;\n\t\tLogic.xdiff = 0;\n\t\tLogic.jumping = false;\n\t\tmultipleJump = false;\n\t\t\n\t}", "private void resetTemporary(){\n temporaryConstants = null;\n temporaryVariables = null;\n }", "public void reset() {\n\tthis.pinguins = new ArrayList<>();\n\tthis.pinguinCourant = null;\n\tthis.pret = false;\n\tthis.scoreGlacons = 0;\n\tthis.scorePoissons = 0;\n }", "public static void resetAll() {\n uniqueBigDecimal = new BigDecimal(\"100\");\n oneBigDecimal = new BigDecimal(1);\n uniqueBigInteger = new BigInteger(\"100\");\n oneBigInteger = new BigInteger(\"1\");\n uniqueByte = new Byte(\"0\");\n uniqueFloat = new Float(100);\n uniqueDouble = new Double(100);\n uniqueInteger = new Integer(100);\n uniqueLong = new Long(\"100\");\n uniqueShort = new Short(\"10\");\n uniqueCal = null;\n // charPosition = 0;\n // lastString = new int[NUM_CHARS];\n }", "public void resetData() {\n user = new User();\n saveData();\n }", "public void reset() {\n _valueLoaded = false;\n _value = null;\n }", "private void clearTemporaryData() {\n\n numbers.stream().forEach(n -> {\n n.setPossibleValues(null);\n n.setUsedValues(null);\n });\n }", "public void reset() {\n delta = 0.0;\n solucionActual = null;\n mejorSolucion = null;\n solucionVecina = null;\n iteracionesDiferenteTemperatura = 0;\n iteracionesMismaTemperatura = 0;\n esquemaReduccion = 0;\n vecindad = null;\n temperatura = 0.0;\n temperaturaInicial = 0.0;\n tipoProblema = 0;\n alfa = 0;\n beta = 0;\n }", "void reset()\n {\n reset(values);\n }", "private void restoreSavedValues() {\n // Find previous times and put them into the layout\n populateTimes();\n fromExisting = preferences.getBoolean(\"fromExisting\", false);\n // If there is a saved comment, put it into the EditText box\n selectedTimeSetId = preferences.getInt(\"SelectedTimeSet\", -1);\n if (selectedTimeSetId != -1) {\n commentBox.setText(DBQueries.getCommentFromTimeset(selectedTimeSetId, database));\n }\n }", "private void resetParameters() {\n\t\twKeyDown = false;\n\t\taKeyDown = false;\n\t\tsKeyDown = false;\n\t\tdKeyDown = false;\n\t\tmouseDown = false;\n\t\t// reset mouse\n\t\tMouse.destroy();\n\t\ttry {\n\t\t\tMouse.create();\n\t\t} catch (LWJGLException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t// resets the player's hp\n\t\tplayer.setHP(1000);\n\t\t// resets the player's position\n\t\tplayer.setX(initPlayerX);\n\t\tplayer.setY(initPlayerY);\n\t\t// the game is not over\n\t\tgameOver = false;\n\t\tstopDrawingPlayer = false;\n\t\tgameWon = false;\n\t\t// clears the entity arraylists\n\t\tenemy.clear();\n\t\tbullet.clear();\n\t\tenemy_bullet.clear();\n\t\tpowerup.clear();\n\t\texplosion.clear();\n\t\t// cash and totalCash are 0\n\t\tcash = 0;\n\t\ttotalCash = 0;\n\t\t// bullet is activated, upgraded weapons are not activated\n\t\tbulletShot = true;\n\t\tdoubleShot = false;\n\t\tlaserShot = false;\n\t\t// boss\n\t\tbossSpawned = false;\n\t\tbossMovement = 3;\n\t\tbossExplosionNum = 0;\n\t}", "public void reset() {\n\t\tvar.clear();\n\t\tname.clear();\n\t}", "public void reset() {\r\n id = -1;\r\n username = \"\";\r\n password = \"\";\r\n password2 = \"\";\r\n firstName = \"\";\r\n lastName = \"\";\r\n phoneNumber = \"\";\r\n email = \"\";\r\n address = \"\";\r\n socialSecurityNumber = \"\";\r\n creditCard = \"\";\r\n }", "private void reset() {\n ms = s = m = h = 0;\n actualizar();\n }", "void reset() {\n errors.clear();\n variables.clear();\n }", "private void ResetVarC() {\n anchura = true;\n iterator = 0;\n Yencoding = new ArrayList<Integer>();\n Cbencoding = new ArrayList<Integer>();\n Crencoding = new ArrayList<Integer>();\n FY = new StringBuilder();\n FCB = new StringBuilder();\n FCR = new StringBuilder();\n }", "public void reset()\n {\n // put your code here\n position = 0;\n order = \"\";\n set[0] = 0;\n set[1] = 0;\n set[2] = 0;\n }", "synchronized void reset() {\n\n // no change if called before getValue() or called twice\n lastValue = currValue = startValue;\n }", "void resetLocal();", "public static void resetSaveCounter3(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter3 = prefs.getInt(saveCounter3, 0);\n SaveCounter3=0;\n prefs.edit().putInt(saveCounter3, SaveCounter3).commit();\n\n }", "public static void resetSaveCounter4(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter4 = prefs.getInt(saveCounter4, 0);\n SaveCounter4=0;\n prefs.edit().putInt(saveCounter4, SaveCounter4).commit();\n\n }", "public static void resetSaveCounter6(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter6 = prefs.getInt(saveCounter6, 0);\n SaveCounter6=0;\n prefs.edit().putInt(saveCounter6, SaveCounter6).commit();\n\n }", "public void resetAppData() {\n this.materials = new ArrayList<String>();\n this.shoplistGroc = new ArrayList<String>();\n this.shopListMat = new ArrayList<String>();\n this.pantry = new ArrayList<String>();\n this.unassignedChores = new ArrayList<Chore>();\n this.finishedChores = new ArrayList<Chore>();\n this.regUsers= new ArrayList<User>();\n this.adminUsers= new ArrayList<AdminUser>();\n this.currentUserId = 0;\n this.serialNumber = 1;\n }", "private void limpiarValores(){\n\t\tpcodcia = \"\";\n\t\tcedula = \"\";\n\t\tcoduser = \"\";\n\t\tcluser = \"\";\n\t\tmail = \"\";\n\t\taudit = \"\";\n\t\tnbr = \"\";\n\t\trol = \"\";\n\t}", "public void reset() {\n setValuesInternal(new Date(clock.getTime()), false, true);\n }", "public void reset(){\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm -r data/games_module\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"sed -i \\\"1s/.*/ \"+\"0\"+\" /\\\" data/winnings\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"sed -i \\\"1s/.*/ \"+\"175\"+\" /\\\" data/tts_speed\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/answered_questions\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/five_random_categories\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/current_player\");\n\t\t_currentPlayer = null;\n\t\t_internationalUnlocked = false;\n\t\t_gamesData.clear();\n\t\t_fiveRandomCategories.clear();\n\t\tfor (int i= 0; i<5;i++) {\n\t\t\t_answeredQuestions[i]=0;\n\t\t}\n\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/answered_questions\");\n\t\tinitialiseCategories();\n\t\ttry {\n\t\t\treadCategories();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tsetFiveRandomCategories();\n\t}", "public void reset()\n {\n cantidad = 0;\n suma = 0;\n maximo = 0; \n minimo = 0; \n \n }", "private void clearInternVariables () {\n\n currentPostVersionList = null;\n postVersionsThatShouldBeInvestigated = null;\n\n allElementsInGUI.clear();\n\n blockPairs_groundTruth.clear();\n blockPairs_computedSimilarity.clear();\n\n positionOfCurrentLeftVersionInViewedPost = 0;\n\n mapPostHistoryIdToVersion.clear();\n groundTruth_postBlockLifeSpanVersionList.clear();\n }", "public void reset(){\r\n barn.setVisited(Boolean.FALSE);\r\n turkeyTalk.setVisited(Boolean.FALSE);\r\n pigginOut.setVisited(Boolean.FALSE);\r\n seeTheLight.setVisited(Boolean.FALSE);\r\n theGobbling.setVisited(Boolean.FALSE);\r\n youDied1.setVisited(Boolean.FALSE);\r\n threeLittlePigs.setVisited(Boolean.FALSE);\r\n forTheGreaterGood.setVisited(Boolean.FALSE);\r\n farmHouseTurkey.setVisited(Boolean.FALSE);\r\n youWin.setVisited(Boolean.FALSE);\r\n }", "public void reset() {\r\n active.clear();\r\n missioncontrollpieces = GameConstants.PIECES_SET;\r\n rolled = 0;\r\n phase = 0;\r\n round = 0;\r\n action = 0;\r\n }", "public synchronized void resetValues(){\n numSent = 0;\n }", "public static void resetSaveCounter5(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter5 = prefs.getInt(saveCounter5, 0);\n SaveCounter5=0;\n prefs.edit().putInt(saveCounter5, SaveCounter5).commit();\n\n }", "@Override\n protected void resetVariables(){\n super.resetVariables();\n pointUp = false;\n }", "void clearValues() {\n percentMissing = \"-1\";\n PICValue = \"-1\";\n maf = \"-1\";\n phenoDataSummary = \"-1\";\n genoSummaryScript = sharedInformation.getWorkingDirectory() + scriptsRelativePath + dataSummaryScriptName;\n phenoSummaryScript = sharedInformation.getWorkingDirectory() + scriptsRelativePath + phenoSummaryScriptName;\n enginePath = sharedInformation.getWorkingDirectory() + rEngineRelativePath;\n }", "private void restorePreferences(){\n SharedPreferences prefs = getPreferences(MODE_PRIVATE);\n\n pOneCounter = prefs.getInt(\"p1Count\",0);\n pTwoCounter = prefs.getInt(\"p2Count\",0);\n pAICounter = prefs.getInt(\"pAICount\",0);\n tieCounter = prefs.getInt(\"tieCount\",0);\n\n }", "public static void resetSaveCounter1(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter1 = prefs.getInt(saveCounter1, 0);\n SaveCounter1=0;\n prefs.edit().putInt(saveCounter1, SaveCounter1).commit();\n\n }", "private void resetAll() {\n\t\tif(mu1 != null)\n\t\t\tmodel.getView().reset(mu1);\n\t\tmu1 = null;\n\t\t\n\t\tif(mu2 != null)\n\t\t\tmodel.getView().reset(mu2);\n\t\tmu2 = null;\n\t\t\n\t\tif(functionWord != null)\n\t\t\tmodel.getView().reset(functionWord);\n\t\tfunctionWord = null;\n\t\t\n\t\tmodel.getSGCreatingMenu().reset();\n\t}", "public static void reset()\n\t\t{\n\t\t\tfeatureSet = new THashMap();\n\t\t\tfeatureIds = new TObjectIntHashMap();\n\t\t\tnextID = 1;\t\t\t\n\t\t}", "private void reset()\n {\n myCellReferences = new ArrayList<>();\n mySheetName = null;\n myCellReference = null;\n myDefaultValue = null;\n amIInsideSingleQuotes = false;\n amIExpectingADefaultValue = false;\n }", "private void reset() {\n \t resultCount =0;\n\t searchStatus = 0;\n\t resultSetStatus = 0;\n\t errorCode = 0;\n\t errorMsg = \"None provided\";\n\t Present = null;\n\t dbResults = null;\n oclc7= null;\n oclc8 = null;\n requestLength=0;\n responseLength=0;\n }", "private void hardReset() {\n softReset();\n // variables\n recordLap = 0; // force first query on database after race restart\n trackName = null;\n // ui\n recordLapTView.setText(\"--:--:---\");\n trackTView.setText(\"Track location\");\n carTView.setText(\"Car\");\n Log.d(TAG, \"HARD Reset: main menu\");\n }", "public void reset() {\n firstUpdate = true;\n }", "protected void reset () {\n for (Field field : this.map) {\n this.table.putNumber(field.getName(), field.getDefaultValue());\n }\n }", "protected void reset() {\n\t\t}", "public void reset() {\r\n\t\tplayAgain = false;\r\n\t\tmainMenu = false;\r\n\t\tachievement = 0;\r\n\t}", "public void reset() {\n solving = false;\n length = 0;\n checks = 0;\n }", "private void reset() {\n }", "private void reset() {\n\t\tdata.clear();\n\t}", "public void resetStats(){\n curA = attack;\n curD = defense;\n curSpA = spAttack;\n curSpD = spDefense;\n curS = speed;\n }", "public void reset() {\n\t\tmCycleFlip = false;\n\t\tmRepeated = 0;\n\t\tmMore = true;\n //mOneMoreTime = true;\n \n\t\t// 추가\n\t\tmStarted = mEnded = false;\n\t\tmCanceled = false;\n }", "public void reset() {\n\t\tfor (int i=0; i < this.WAYS; i++) {\n\t\t\tthis.cache[i] = new Line(this.alpha[i], REPL_VAL);\n\t\t}\n\t\t// set mru\n\t\tthis.cache[this.WAYS-1].state = INSERT_VAL;\n\t}", "@Override\n public void reset()\n {\n state = \"initial state\";\n nbChanges = 0;\n nbResets++;\n }", "public void reset(){\n value = 0;\n }", "protected void reset(){\n inited = false;\n }", "public final void reset() {\n\t\tscore = 0;\n\t\tlives = 10;\n\t\tshields = 3;\n\t}", "public void reset() {\r\n\t\tready = false;\r\n\t\twitnessed_max_price = 0.0;\r\n\t\t\r\n\t\tfor (int i = 0; i<no_goods; i++)\r\n\t\t\tfor (int j = 0; j<no_bins; j++)\r\n\t\t\t\tmarg_prob[i][j] = 0.0;\r\n\t\t\r\n\t\tmarg_sum = 0;\r\n\t\t\r\n\t\tfor (HashMap<IntegerArray, double[]> p : this.prob)\r\n\t\t\tp.clear();\r\n\r\n\t\tfor (HashMap<IntegerArray, Integer> s : this.sum)\r\n\t\t\ts.clear();\r\n\t\t\r\n\t\tlog.clear();\r\n\t}", "public void resetVariableTensors() {\n checkNotClosed();\n wrapper.resetVariableTensors();\n }", "public synchronized void resetCustomValues() {\n customValues = null;\n }", "public void reset() {\r\n textArea1.appendText(\"\\n --- Setting all \" + name + \" variables to null\");\r\n textArea1.setForeground(Color.red);\r\n \r\n\r\n Enumeration enum2 = variableList.elements() ;\r\n while(enum2.hasMoreElements()) {\r\n RuleVariable temp = (RuleVariable)enum2.nextElement() ;\r\n temp.setValue(null) ;\r\n }\r\n }", "public void reset() {\n\t\t\t\t\r\n\t\t\t}", "public void resetCigs() {\n user.resetCigs();\n saveData();\n }", "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}", "public void reset() {\n\n\t\tazDiff = 0.0;\n\t\taltDiff = 0.0;\n\t\trotDiff = 0.0;\n\n\t\tazMax = 0.0;\n\t\taltMax = 0.0;\n\t\trotMax = 0.0;\n\n\t\tazInt = 0.0;\n\t\taltInt = 0.0;\n\t\trotInt = 0.0;\n\n\t\tazSqInt = 0.0;\n\t\taltSqInt = 0.0;\n\t\trotSqInt = 0.0;\n\n\t\tazSum = 0.0;\n\t\taltSum = 0.0;\n\t\trotSum = 0.0;\n\n\t\tcount = 0;\n\n\t\tstartTime = System.currentTimeMillis();\n\t\ttimeStamp = startTime;\n\n\t\trotTrkIsLost = false;\n\t\tsetEnableAlerts(true);\n\n\t}", "private void resultResetHelper()\r\n {\r\n leftOperand = null;\r\n rightOperand = null;\r\n operator = null;\r\n }", "public void clearVars() {\n setLatitude (FLOATNULL);\n setLongitude (FLOATNULL);\n setDepth (FLOATNULL);\n setTemperatureMin (FLOATNULL);\n setTemperatureMax (FLOATNULL);\n setSalinityMin (FLOATNULL);\n setSalinityMax (FLOATNULL);\n setOxygenMin (FLOATNULL);\n setOxygenMax (FLOATNULL);\n setNitrateMin (FLOATNULL);\n setNitrateMax (FLOATNULL);\n setPhosphateMin (FLOATNULL);\n setPhosphateMax (FLOATNULL);\n setSilicateMin (FLOATNULL);\n setSilicateMax (FLOATNULL);\n setChlorophyllMin (FLOATNULL);\n setChlorophyllMax (FLOATNULL);\n }", "public void reset() {\n counters = null;\n counterMap = null;\n counterValueMap = null;\n }", "private void resetSharedPreferences(){\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(getString(R.string.pref_genre_key), getString(R.string.pref_genre_any_value));\n editor.putString(getString(R.string.pref_earliest_year_key), getString(R.string.pref_earliest_year_default));\n editor.putString(getString(R.string.pref_latest_year_key), getString(R.string.pref_latest_year_default));\n // Commit the edits\n editor.apply();\n }", "private void reset() {\n\t\tsnake.setStart();\n\n\t\tfruits.clear();\n\t\tscore = fruitsEaten = 0;\n\n\t}", "public void resetModification()\n {\n _modifiedSinceSave = false;\n }", "private void clearInsertingValues() {\n mapFieldsIntegers.clear();\n mapFieldsStrings.clear();\n }", "public void reset() {\n while (getNumTotal() > 0) {\n this.removeNuclei();\n }\n lastModified = Calendar.getInstance().getTimeInMillis(); // record time\n }", "private void resetAll() // resetAll method start\n\t{\n\t\theader.reset();\n\t\tdebit.reset();\n\t\tcredit.reset();\n\t}", "private void resetValues() {\n this.teaIDText.setText(\"\");\n this.teaNameText.setText(\"\");\n this.teaCollegeText.setText(\"\");\n this.teaDepartmentText.setText(\"\");\n this.teaTypeText.setText(\"\");\n this.teaPhoneText.setText(\"\");\n this.teaRemarkText.setText(\"\");\n }", "protected void resetValues(){\n bean.setName(\"\");\n bean.setPassword(\"\");\n bean.setPasswordRepeat(\"\");\n bean.setSurname(\"\");\n bean.setUsername(\"\");\n bean.setValidation(\"\");\n \n }", "public static void reset() {\n\t\tCAUGHT.clear();\n\t\tLOAD_CACHE.clear();\n\t}", "@Override\n\tpublic void reset() {\n\t\tthis.prepare();\n\t\tsuper.reset();\n\t}", "private void reset() {\n\t\tfiles = new HashMap<>();\n\t\tparams = new HashMap<>();\n\t}", "private void reset(){\n getPrefs().setEasyHighScore(new HighScore(\"Player\", 99 * 60 + 59));\n getPrefs().setMediumHighScore(new HighScore(\"Player\", 99 * 60 + 59));\n getPrefs().setHardHighScore(new HighScore(\"Player\", 99 * 60 + 59));\n easyData.setText(formatHighScore(getPrefs().getEasyHighScore()));\n mediumData.setText(formatHighScore(getPrefs().getMediumHighScore()));\n hardData.setText(formatHighScore(getPrefs().getHardHighScore()));\n }", "public static void Reset(){\n\t\ttstr = 0;\n\t\ttluc = 0;\n\t\ttmag = 0; \n\t\ttacc = 0;\n\t\ttdef = 0; \n\t\ttspe = 0;\n\t\ttHP = 10;\n\t\ttMP = 0;\n\t\tstatPoints = 13;\n\t}", "public void reset(){\n currentStage = 0;\n currentSide = sideA;\n }", "public static void resetData() {\n\t\t// resets all game data\n\t\tbSpeed = 9;\n\t\tbSize = 16;\n\t\tpSize = 100;\n\t\tpSpeed = 7;\n\t\tbSpin = 15;\n\t}", "private void resetAfterGame() {\n }", "public void resetIsModified() {\n roomstlogid_is_modified = false;\n roomstid_is_modified = false;\n roomid_is_modified = false;\n statusdate_is_modified = false;\n st_is_modified = false;\n regbyid_is_modified = false;\n regdate_is_modified = false;\n reservationroomid_is_modified = false;\n roomtypeid_is_modified = false;\n blockroomid_is_modified = false;\n logdate_is_modified = false;\n }" ]
[ "0.7237429", "0.7044546", "0.7008765", "0.6995107", "0.6946253", "0.6920562", "0.6889416", "0.6845743", "0.6820832", "0.678242", "0.67666125", "0.6750455", "0.6680443", "0.66458684", "0.6632002", "0.6604275", "0.6574158", "0.6556004", "0.65272117", "0.6525413", "0.651484", "0.651405", "0.6482059", "0.6471445", "0.64679116", "0.6413389", "0.64133555", "0.6395539", "0.6381005", "0.637093", "0.63650644", "0.6346801", "0.6345767", "0.6337106", "0.63339496", "0.6321863", "0.6321305", "0.6319775", "0.63095134", "0.62930197", "0.62880504", "0.62827146", "0.6266974", "0.6260225", "0.6256446", "0.6253312", "0.6245531", "0.6241088", "0.6236084", "0.6233509", "0.6221008", "0.62143403", "0.62135774", "0.6208426", "0.62050927", "0.6203763", "0.6201659", "0.6191276", "0.618935", "0.61883044", "0.6184776", "0.61828375", "0.6164971", "0.61637574", "0.61630636", "0.61616004", "0.6156693", "0.61562175", "0.6154628", "0.6152028", "0.6150712", "0.61503404", "0.6145411", "0.61444074", "0.6140517", "0.61355275", "0.6128283", "0.61274564", "0.61248857", "0.6113418", "0.6106032", "0.6101561", "0.6098714", "0.6094612", "0.608612", "0.6085572", "0.60819215", "0.6079054", "0.6077093", "0.6076639", "0.60737973", "0.6071693", "0.60688627", "0.6068617", "0.6068322", "0.6065158", "0.60624975", "0.60507333", "0.604505", "0.60395145", "0.60357875" ]
0.0
-1
Constructs a StandardQueryCriteriaBuilder that will query objects of the given class.
public StandardQueryCriteriaBuilder(Class clazz) { this.clazz = clazz; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Criteria createCriteria(Class<?> clazz){\n\t\treturn new Criteria(this, db, clazz);\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tCriteria createCriteria(Class persistentObject);", "public static Criteria create(Class<?> clazz) {\r\n return create(clazz, null);\r\n }", "public Criteria createCriteria(Class<?> cl) throws HibException;", "public Query<T, R> build() {\n // if criteria.size == 0, rootCriterion = null\n Criterion rootCriterion = null;\n if (criteria.size() == 1) {\n rootCriterion = criteria.get(0);\n } else if (criteria.size() > 1) {\n rootCriterion = Restrictions.and(criteria\n .toArray(new Criterion[criteria.size()]));\n }\n return new QueryImpl<T, R>(entityClass, returnType, rootCriterion,\n orderings, maxResults, returnFields);\n }", "public static Criteria create(Class<?> clazz, String alias) {\r\n Criteria criteria = new Criteria();\r\n criteria.clazz = clazz;\r\n criteria.resultColumn = true;\r\n criteria.root = criteria;\r\n criteria.table = Mapping.getInstance().getTableName(clazz);\r\n criteria.alias = alias;\r\n return criteria;\r\n }", "public static Criteria newAndCreateCriteria() {\n SaleClassifyGoodExample example = new SaleClassifyGoodExample();\n return example.createCriteria();\n }", "public void newCriteria(){\r\n this.criteria = EasyCriteriaFactory.createQueryCriteria(em, classe);\r\n }", "private RealmQuery buildRealmQuery(Realm realm, Class myClass) {\n RealmQuery query = RealmQuery.createQuery(realm, myClass);\n return query;\n }", "@Override\n\tpublic <T> TypedQuery<T> createQuery(CriteriaQuery<T> criteriaQuery) {\n\t\treturn null;\n\t}", "protected Criteria crearCriteria() {\n logger.debug(\"Criteria creado\");\n return getSesion().createCriteria(clasePersistente);\n }", "public static Criteria newAndCreateCriteria() {\n LitemallOrderExample example = new LitemallOrderExample();\n return example.createCriteria();\n }", "protected Criteria createEntityCriteria() {\n return getSession().createCriteria(persistentClass);\n }", "public Criteria buildQueryCriteria(Session session,\n PageCriteria<SortType> pageCriteria) {\n Criteria crit = session.createCriteria(clazz);\n\n // If page size is -1, that means get all users\n if (pageCriteria.getPageSize() > 0) {\n crit.setMaxResults(pageCriteria.getPageSize());\n\n int firstResult = 0;\n if (pageCriteria.getPageNumber() > 1) {\n firstResult = (pageCriteria.getPageNumber() - 1) *\n pageCriteria.getPageSize();\n }\n crit.setFirstResult(firstResult);\n }\n\n for (Order order : buildOrders(pageCriteria)) {\n crit.addOrder(order);\n }\n\n Criterion orCriterion = null;\n for (String[] pair : pageCriteria.getOrCriteria()) {\n if (orCriterion == null) {\n orCriterion = Restrictions.ilike(pair[0], pair[1],\n MatchMode.ANYWHERE);\n } else {\n orCriterion = Restrictions.or(orCriterion,\n Restrictions.ilike(pair[0], pair[1],\n MatchMode.ANYWHERE));\n }\n }\n if (orCriterion != null) {\n crit.add(orCriterion);\n }\n\n return crit;\n }", "protected Criteria createCriteriaInternal() {\n Criteria criteria = new Criteria(this);\n return criteria;\n }", "protected Criteria createCriteriaInternal() {\n Criteria criteria = new Criteria(this);\n return criteria;\n }", "protected Criteria createCriteriaInternal() {\n Criteria criteria = new Criteria(this);\n return criteria;\n }", "protected Criteria createCriteriaInternal() {\n Criteria criteria = new Criteria(this);\n return criteria;\n }", "protected Criteria createCriteriaInternal() {\n Criteria criteria = new Criteria(this);\n return criteria;\n }", "public QueryBuilder buildQueryBuilder() {\n return dao.getQueryBuilder()\n .from(dao.getEntityClass(), (joinBuilder != null ? joinBuilder.getRootAlias() : null))\n .join(joinBuilder)\n .add(queryRestrictions)\n .debug(debug)\n .audit(isAuditQuery());\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\r\n Criteria criteria = createCriteriaInternal();\r\n if (oredCriteria.size() == 0) {\r\n oredCriteria.add(criteria);\r\n }\r\n return criteria;\r\n }", "public static Criteria newAndCreateCriteria() {\n BDicTreeCodeExample example = new BDicTreeCodeExample();\n return example.createCriteria();\n }", "protected Criteria createCriteriaInternal() {\n Criteria criteria = new Criteria();\n return criteria;\n }", "protected Criteria createCriteriaInternal() {\n Criteria criteria = new Criteria();\n return criteria;\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "public void prepareCriteria(Criteria criteria, Class persistentClass) {\n for (Criterion criterion : criterionList)\n criteria.add(criterion);\n\n for (Order order : orderList)\n criteria.addOrder(order);\n\n for (Filter filter : relationList) {\n String[] joinedColumns = filter.getJoinedColumns();\n for (int i = 0, joinedColumnsLength = joinedColumns.length - 1; i < joinedColumnsLength; i++) {\n String relatedColumn = joinedColumns[i];\n String firstJoin;\n String persistentClassName = StringUtils.uncapitalize(persistentClass.getSimpleName());\n\n if (joinedColumns[i].equals(persistentClassName))\n relatedColumn = joinedColumns[i + 1];\n\n if (i == 0)\n firstJoin = persistentClassName;\n else\n firstJoin = joinedColumns[i - 1];\n\n criteria.createCriteria(firstJoin + \".\" + relatedColumn, relatedColumn);\n }\n }\n\n\n if (maxResult != 0)\n criteria.setMaxResults(maxResult);\n\n }", "public Criteria createCriteria() {\r\n Criteria criteria = createCriteriaInternal();\r\n if (oredCriteria.size() == 0) {\r\n oredCriteria.add(criteria);\r\n }\r\n return criteria;\r\n }", "public Criteria createCriteria() {\r\n Criteria criteria = createCriteriaInternal();\r\n if (oredCriteria.size() == 0) {\r\n oredCriteria.add(criteria);\r\n }\r\n return criteria;\r\n }", "public Criteria createCriteria() {\r\n Criteria criteria = createCriteriaInternal();\r\n if (oredCriteria.size() == 0) {\r\n oredCriteria.add(criteria);\r\n }\r\n return criteria;\r\n }", "public Criteria createCriteria() {\r\n Criteria criteria = createCriteriaInternal();\r\n if (oredCriteria.size() == 0) {\r\n oredCriteria.add(criteria);\r\n }\r\n return criteria;\r\n }", "public Criteria createCriteria() {\r\n Criteria criteria = createCriteriaInternal();\r\n if (oredCriteria.size() == 0) {\r\n oredCriteria.add(criteria);\r\n }\r\n return criteria;\r\n }", "public Criteria createCriteria() {\r\n Criteria criteria = createCriteriaInternal();\r\n if (oredCriteria.size() == 0) {\r\n oredCriteria.add(criteria);\r\n }\r\n return criteria;\r\n }", "public Criteria createCriteria() {\r\n Criteria criteria = createCriteriaInternal();\r\n if (oredCriteria.size() == 0) {\r\n oredCriteria.add(criteria);\r\n }\r\n return criteria;\r\n }", "public Criteria createCriteria() {\r\n Criteria criteria = createCriteriaInternal();\r\n if (oredCriteria.size() == 0) {\r\n oredCriteria.add(criteria);\r\n }\r\n return criteria;\r\n }", "public Criteria createCriteria() {\r\n Criteria criteria = createCriteriaInternal();\r\n if (oredCriteria.size() == 0) {\r\n oredCriteria.add(criteria);\r\n }\r\n return criteria;\r\n }", "public Criteria createCriteria() {\r\n Criteria criteria = createCriteriaInternal();\r\n if (oredCriteria.size() == 0) {\r\n oredCriteria.add(criteria);\r\n }\r\n return criteria;\r\n }", "public Criteria createCriteria() {\r\n Criteria criteria = createCriteriaInternal();\r\n if (oredCriteria.size() == 0) {\r\n oredCriteria.add(criteria);\r\n }\r\n return criteria;\r\n }", "public Criteria createCriteria() {\r\n Criteria criteria = createCriteriaInternal();\r\n if (oredCriteria.size() == 0) {\r\n oredCriteria.add(criteria);\r\n }\r\n return criteria;\r\n }", "public Criteria createCriteria() {\r\n Criteria criteria = createCriteriaInternal();\r\n if (oredCriteria.size() == 0) {\r\n oredCriteria.add(criteria);\r\n }\r\n return criteria;\r\n }", "public Criteria createCriteria() {\r\n Criteria criteria = createCriteriaInternal();\r\n if (oredCriteria.size() == 0) {\r\n oredCriteria.add(criteria);\r\n }\r\n return criteria;\r\n }", "public Criteria createCriteria() {\r\n Criteria criteria = createCriteriaInternal();\r\n if (oredCriteria.size() == 0) {\r\n oredCriteria.add(criteria);\r\n }\r\n return criteria;\r\n }", "public Criteria createCriteria() {\r\n Criteria criteria = createCriteriaInternal();\r\n if (oredCriteria.size() == 0) {\r\n oredCriteria.add(criteria);\r\n }\r\n return criteria;\r\n }", "public Criteria createCriteria() {\r\n Criteria criteria = createCriteriaInternal();\r\n if (oredCriteria.size() == 0) {\r\n oredCriteria.add(criteria);\r\n }\r\n return criteria;\r\n }", "public Criteria createCriteria() {\r\n Criteria criteria = createCriteriaInternal();\r\n if (oredCriteria.size() == 0) {\r\n oredCriteria.add(criteria);\r\n }\r\n return criteria;\r\n }", "public Criteria createCriteria() {\r\n Criteria criteria = createCriteriaInternal();\r\n if (oredCriteria.size() == 0) {\r\n oredCriteria.add(criteria);\r\n }\r\n return criteria;\r\n }", "public Criteria createCriteria() {\r\n Criteria criteria = createCriteriaInternal();\r\n if (oredCriteria.size() == 0) {\r\n oredCriteria.add(criteria);\r\n }\r\n return criteria;\r\n }", "public Criteria createCriteria() {\r\n Criteria criteria = createCriteriaInternal();\r\n if (oredCriteria.size() == 0) {\r\n oredCriteria.add(criteria);\r\n }\r\n return criteria;\r\n }", "public Criteria createCriteria() {\r\n Criteria criteria = createCriteriaInternal();\r\n if (oredCriteria.size() == 0) {\r\n oredCriteria.add(criteria);\r\n }\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }" ]
[ "0.72202283", "0.69999754", "0.6959941", "0.6920245", "0.6431492", "0.6392365", "0.61029166", "0.6005259", "0.59952253", "0.5903679", "0.584217", "0.56882423", "0.5637388", "0.56104416", "0.5607179", "0.5607179", "0.5607179", "0.5607179", "0.5607179", "0.5564571", "0.5537319", "0.5537319", "0.552719", "0.5525401", "0.5510507", "0.5510507", "0.549535", "0.548304", "0.54577816", "0.54577816", "0.54577816", "0.54577816", "0.54577816", "0.54577816", "0.54577816", "0.54577816", "0.54577816", "0.54577816", "0.54577816", "0.54577816", "0.54577816", "0.54577816", "0.54577816", "0.54577816", "0.54577816", "0.54577816", "0.54577816", "0.54577816", "0.54577816", "0.54577816", "0.5453098", "0.5453098", "0.5453098", "0.5453098", "0.5453098", "0.5453098", "0.5453098", "0.5453098", "0.5453098", "0.5453098", "0.5453098", "0.5453098", "0.5453098", "0.5453098", "0.5453098", "0.5453098", "0.5453098", "0.5453098", "0.5453098", "0.5453098", "0.5453098", "0.5453098", "0.5446792", "0.5446792", "0.5446792", "0.5446792", "0.5446792", "0.5446792", "0.5446792", "0.5446792", "0.5446792", "0.5446792", "0.5446792", "0.5446792", "0.5446792", "0.5446792", "0.5446792", "0.5446792", "0.5446792", "0.5446792", "0.5446792", "0.5446792", "0.5446792", "0.5446792", "0.5446792", "0.5446792", "0.5446792", "0.5446792", "0.5446792", "0.5446792" ]
0.7807186
0
Returns a Criteria based on the given PageCriteria that can be used to query the given Session.
public Criteria buildQueryCriteria(Session session, PageCriteria<SortType> pageCriteria) { Criteria crit = session.createCriteria(clazz); // If page size is -1, that means get all users if (pageCriteria.getPageSize() > 0) { crit.setMaxResults(pageCriteria.getPageSize()); int firstResult = 0; if (pageCriteria.getPageNumber() > 1) { firstResult = (pageCriteria.getPageNumber() - 1) * pageCriteria.getPageSize(); } crit.setFirstResult(firstResult); } for (Order order : buildOrders(pageCriteria)) { crit.addOrder(order); } Criterion orCriterion = null; for (String[] pair : pageCriteria.getOrCriteria()) { if (orCriterion == null) { orCriterion = Restrictions.ilike(pair[0], pair[1], MatchMode.ANYWHERE); } else { orCriterion = Restrictions.or(orCriterion, Restrictions.ilike(pair[0], pair[1], MatchMode.ANYWHERE)); } } if (orCriterion != null) { crit.add(orCriterion); } return crit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Page<Accessprofile> listWithCriteraByPage(SearchCriteria searchCriteria, Pageable pageable);", "Criteria createCriteria(final String criteria);", "public org.springframework.data.jpa.domain.Specification<SessionEntity> toJpaSpecification(\n Specification<Session> sessionSpecification) {\n if (sessionSpecification instanceof AndSpecification) {\n return ((AndSpecification<Session>) sessionSpecification).getSet().stream()\n .map(this::toJpaSpecification)\n .reduce(org.springframework.data.jpa.domain.Specification::and)\n .orElse((root, criteriaQuery, criteriaBuilder) -> criteriaBuilder.disjunction());\n } else if (sessionSpecification instanceof OrSpecification) {\n return ((OrSpecification<Session>) sessionSpecification).getSet().stream()\n .map(this::toJpaSpecification)\n .reduce(org.springframework.data.jpa.domain.Specification::or)\n .orElse((root, criteriaQuery, criteriaBuilder) -> criteriaBuilder.disjunction());\n } else if (sessionSpecification instanceof MatchAllSpecification) {\n return (root, criteriaQuery, criteriaBuilder) -> criteriaBuilder.conjunction();\n } else if (sessionSpecification instanceof Session.IdsSpecification) {\n return (root, criteriaQuery, criteriaBuilder) -> root.get(\"id\").in(((Session.IdsSpecification) sessionSpecification).getIds().stream().map(UUID::toString).collect(Collectors.toList()));\n } else if (sessionSpecification instanceof Session.LocationsSpecification) {\n return (root, criteriaQuery, criteriaBuilder) -> root.get(\"location\").in(((Session.LocationsSpecification) sessionSpecification).getLocations());\n } else if (sessionSpecification instanceof Session.ProgrammeSpecification) {\n return (root, criteriaQuery, criteriaBuilder) -> root.get(\"programme\").in(((Session.ProgrammeSpecification) sessionSpecification).getProgramme());\n } else if (sessionSpecification instanceof Session.UserIdsSpecification) {\n return (root, criteriaQuery, criteriaBuilder) -> root.get(\"userEntity\").get(\"id\").in(((Session.UserIdsSpecification) sessionSpecification).getIds().stream().map(UUID::toString).collect(Collectors.toList()));\n } else if (sessionSpecification instanceof Session.DateTimeSpecification) {\n return (root, criteriaQuery, criteriaBuilder) -> {\n LocalDateTime parsedLocalDateTime = ((Session.DateTimeSpecification) sessionSpecification).getLocalDateTime();\n return criteriaBuilder.between(root.get(\"creationDateTime\"),\n LocalDateTime.of(parsedLocalDateTime.getYear(), parsedLocalDateTime.getMonthValue(), parsedLocalDateTime.getDayOfMonth(), 0, 0, 0),\n LocalDateTime.of(parsedLocalDateTime.getYear(), parsedLocalDateTime.getMonthValue(), parsedLocalDateTime.getDayOfMonth(), 23, 59, 59)\n );\n };\n } else if (sessionSpecification instanceof Session.BetweenDateTimeSpecification) {\n return (root, criteriaQuery, criteriaBuilder) -> {\n LocalDateTime fromDateTime = ((Session.BetweenDateTimeSpecification) sessionSpecification).getFromDateTime();\n LocalDateTime toDateTime = ((Session.BetweenDateTimeSpecification) sessionSpecification).getToDateTime();\n return criteriaBuilder.between(root.get(\"creationDateTime\"), fromDateTime, toDateTime);\n };\n }\n throw new MappingException(\"Unknown specification\");\n }", "public void setCriteria(String criteria) {\r\n\t\tthis.criteria = criteria;\r\n\t}", "protected Criteria constuctCriteria(SearchCriteria searchCriteria, boolean withOrder)\n {\n Criteria criteria = getSession().createCriteria(persistentClass);\n if (searchCriteria == null){\n return criteria;\n }\n constuctCriteria(searchCriteria, criteria, withOrder);\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\r\n Criteria criteria = createCriteriaInternal();\r\n if (oredCriteria.size() == 0) {\r\n oredCriteria.add(criteria);\r\n }\r\n return criteria;\r\n }", "public Page<T> list(DetachedCriteria criteria, Integer pageNumber, Integer pageSize);", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }", "public Criteria createCriteria() {\n Criteria criteria = createCriteriaInternal();\n if (oredCriteria.size() == 0) {\n oredCriteria.add(criteria);\n }\n return criteria;\n }" ]
[ "0.6105095", "0.60488", "0.58624315", "0.57637423", "0.5698594", "0.5681879", "0.5681879", "0.56274635", "0.56122524", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247", "0.55997247" ]
0.78688836
0
Methode permettant de transformer une Collection d'Objet en Map
public static <K, T> Map<K, T> convertCollectionToMap(Collection<T> collection, String keyPropertyName) { // Si la collection est nulle if(collection == null) return null; // Map a retourner Map<K, T> map = new HashMap<K, T>(); // Si la collection est vide if(collection.size() == 0) return map; // Si la propriete cle est vide if(keyPropertyName == null || keyPropertyName.trim().length() == 0) throw new JPersistenceToolsException("NoMapKeyPropertyException.message"); // Parcours de la collection for (T object : collection) { try { // Valeur de la propriete K keyProperty = (K) DAOValidatorHelper.evaluateValueExpression("${" + keyPropertyName + "}", object); // Ajout dans la MAP map.put(keyProperty, object); } catch (Exception e) { // On relance throw new JPersistenceToolsException("convertCollectionToMap.error", e); } } // On retourne la MAP return map; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Map<String, Object> toMap(T object);", "public abstract Map<String, Serializable> toMap();", "@Override\n\tpublic void convertitMap(Map<String, Object> map) {\n\t\t\n\t}", "public Map toMap(Map<String, Object> map) {\n return super.toMap(map);\n }", "Map<String, String> asMap();", "public static <K, T> Collection<T> convertMapToCollection(Map<K, T> map) {\r\n\t\t\r\n\t\t// Si la collection est nulle\r\n\t\tif(map == null) return null;\r\n\t\t\r\n\t\t// On retourne l'ensemble\r\n\t\treturn map.values();\r\n\t}", "protected Map<String, Object> assertMap() {\n if (type == Type.LIST) {\n throw new FlexDataWrongTypeRuntimeException(type, Type.OBJECT); \n }\n if (entryCollectionMap == null) {\n entryCollectionMap = new LinkedHashMap<String, Object>();\n type = Type.OBJECT;\n }\n return entryCollectionMap;\n }", "Map<String, Object> getPropertiesAsMap();", "private Map toMap(Scriptable scriptable) {\n \t\tif (scriptable instanceof MapWrapper)\n \t\t\treturn (Map) ((MapWrapper) scriptable).unwrap();\n \t\treturn new MapAdapter(scriptable);\n \t}", "public static Map<String, Object> toMap() {\n return toMap(null);\n }", "void writeMap(Collection<?> array);", "ProcessOperation<Map<String, Object>> map();", "private static Object mapValueToJava(Object value) {\n if (value instanceof Map) {\n value = ((Map<?, ?>) value).toMap();\n } else if (value instanceof Sequence) {\n value = ((Sequence<?>) value).toMappedList();\n } else if (value instanceof net.ssehub.easy.instantiation.core.model.vilTypes.Set<?>) {\n value = ((net.ssehub.easy.instantiation.core.model.vilTypes.Set<?>) value).toMappedSet();\n }\n return value;\n }", "public Map<String, List<Object>> getDCModelMap(){\n\t\tDBCollection dcModel = db.getCollection(\"dcModel\");\n\t\tMap<String, List<Object>> varModelMap = new HashMap<String, List<Object>>();\n \tDBCursor varModelCursor = dcModel.find();\n \tfor(DBObject varModelObj: varModelCursor) {\n \t\tvarModelMap.put((String) varModelObj.get(\"v\"), (List<Object>) varModelObj.get(\"m\")); \t\t\n \t}\n \treturn varModelMap;\n\t}", "Collect getColl();", "public static Map<Long, User> mapUserById(Collection<User> collection) {\n\t\tMap<Long, User> m = new HashMap<Long, User>(collection.size());\n\t\tfor (User u : collection) {\n\t\t\tm.put(u.getId(), u);\n\t\t}\n\t\treturn m;\n\t}", "public HashMap<String, Item> getItemCollection(){\n \tHashMap<String, Item> result = new HashMap<String, Item>(itemCollection);\r\n \treturn result;\r\n }", "public Map<String, Object> getTagMap();", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default Map<String, IData> asMap() {\n \n return notSupportedCast(\"IData[string]\");\n }", "public Map<K, Collection<V>> mo8153a() {\n return super.mo8153a();\n }", "public Map<String,String> toMap(final Object object)\r\n {\r\n final HashMap<String,String> hashMap = new HashMap<String,String>();\r\n final Class<?> clazz = object.getClass();\r\n final Method[] methods = getDeclaredMethods(clazz);\r\n\r\n for( Method method : methods ) {\r\n if(\r\n method.getParameterTypes().length != 0\r\n || !methodesNamePattern.matcher(\r\n method.getName()\r\n ).matches()\r\n ) {\r\n continue;\r\n }\r\n\r\n Class<?> returnType = method.getReturnType();\r\n Object result0;\r\n\r\n if( isMappable( returnType ) ) {\r\n if( returnType.isArray() ) {\r\n Mappable[] result1 = (Mappable[])invoke(object, method, hashMap, Mappable.class);\r\n\r\n if(result1 == null) {\r\n continue;\r\n }\r\n\r\n int len = Array.getLength(result1);\r\n String methodName = method.getName();\r\n int i = 0;\r\n\r\n do {\r\n if(i >= len) {\r\n continue;// label0;\r\n }\r\n\r\n Mappable value = (Mappable)Array.get(result1, i);\r\n String name = formatIterableEntry(methodName, i, len);\r\n\r\n if(value == null) {\r\n hashMap.put(name, null);\r\n\r\n }\r\n else {\r\n MappableBuilder.addRec(hashMap, name, value);\r\n }\r\n i++;\r\n } while(true);\r\n }\r\n\r\n result0 = invoke(object, method, hashMap, Mappable.class);\r\n\r\n if(result0 != null) {\r\n MappableBuilder.addRec(\r\n hashMap,\r\n (new StringBuilder()).append(method.getName()).append(\"().\").toString(),\r\n ((Mappable) (result0) )\r\n );\r\n }\r\n continue;\r\n }\r\n\r\n if(mappableItemSet.contains(MappableItem.DO_ITERATOR) && Iterator.class.isAssignableFrom(returnType)) {\r\n Iterator<?> iter = (Iterator<?>)invoke(object, method, hashMap, Iterator.class);\r\n String name = method.getName();\r\n\r\n int i = 0;\r\n hashMap.put(\r\n formatMethodName(name),\r\n (new StringBuilder()).append(iter).toString()\r\n );\r\n while( iter.hasNext() ) {\r\n hashMap.put(\r\n formatIteratorEntry(name, i++, -1),\r\n toString( iter.next())\r\n );\r\n }\r\n continue;\r\n }\r\n\r\n if( mappableItemSet.contains( MappableItem.DO_ITERABLE ) &&\r\n Iterable.class.isAssignableFrom( returnType )\r\n ) {\r\n Iterable<?> iterLst = (Iterable<?>)invoke(object, method, hashMap, Iterable.class);\r\n Iterator<?> iter = iterLst.iterator();\r\n String methodName = method.getName();\r\n\r\n int i = 0;\r\n hashMap.put(\r\n formatMethodName( methodName ),\r\n iter == null ? null : iter.toString()\r\n );\r\n\r\n while( iter.hasNext() ) {\r\n hashMap.put(\r\n formatIterableEntry(methodName, i++, -1),\r\n toString(iter.next())\r\n );\r\n }\r\n continue;\r\n }\r\n\r\n if( mappableItemSet.contains(MappableItem.DO_ENUMERATION) && Enumeration.class.isAssignableFrom(returnType)) {\r\n Enumeration<?> enum0 = (Enumeration<?>)invoke(object, method, hashMap, Enumeration.class);\r\n String methodName = method.getName();\r\n\r\n int i = 0;\r\n hashMap.put(\r\n formatMethodName( methodName ),\r\n enum0 == null ? null : enum0.toString()\r\n );\r\n\r\n if( enum0 != null ) {\r\n while( enum0.hasMoreElements() ) {\r\n hashMap.put(\r\n formatEnumerationEntry(methodName, i++, -1),\r\n toString( enum0.nextElement() )\r\n );\r\n }\r\n }\r\n continue;\r\n }\r\n\r\n if( !shouldEvaluate(returnType) ) {\r\n continue;\r\n }\r\n\r\n Object methodResult = invoke(object, method, hashMap, Object.class);\r\n\r\n if( returnType.isArray() ) {\r\n final String methodName = method.getName();\r\n\r\n if( methodResult == null ) {\r\n hashMap.put(\r\n formatMethodName( methodName ),\r\n toString( methodResult )\r\n );\r\n }\r\n else {\r\n int len = Array.getLength( methodResult );\r\n\r\n for(int i = 0; i < len; i++) {\r\n Object value = Array.get( methodResult, i );\r\n\r\n hashMap.put(\r\n formatArrayEntry(methodName, i, len),\r\n toString(value)\r\n );\r\n }\r\n }\r\n }\r\n else {\r\n if( methodResult == null ) {\r\n hashMap.put(\r\n formatMethodName(method.getName()),\r\n null\r\n );\r\n }\r\n else {\r\n hashMap.put(\r\n formatMethodName(method.getName()),\r\n methodResult.toString()\r\n );\r\n }\r\n }\r\n }\r\n\r\n return new TreeMap<String,String>(hashMap);\r\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate static Map createMap(Collection accessibleObjects,\n\t\t\tboolean isConstructor) {\n\t\tfinal Map map = new HashMap();\n\t\tfor (final Iterator i = accessibleObjects.iterator(); i.hasNext();) {\n\t\t\tfinal Member accessibleObject = (Member) i.next();\n\n\t\t\tif (!Modifier.isPublic(accessibleObject.getModifiers()))\n\t\t\t\tcontinue;\n\n\t\t\tfinal AccessibleObjectKey accessibleObjectKey;\n\t\t\t{\n\t\t\t\t// argCount determines the key\n\t\t\t\tint argCount = 0;\n\t\t\t\t{\n\t\t\t\t\t// The parameters determine the size of argCount\n\t\t\t\t\tfinal Class[] param;\n\t\t\t\t\tif (isConstructor) {\n\t\t\t\t\t\tparam = ((Constructor) accessibleObject)\n\t\t\t\t\t\t\t\t.getParameterTypes();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If it is a method and the method was defined in\n\t\t\t\t\t\t// Object(), skip\n\t\t\t\t\t\t// it.\n\t\t\t\t\t\tif (((Method) accessibleObject).getDeclaringClass() == Object.class) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparam = ((Method) accessibleObject).getParameterTypes();\n\t\t\t\t\t}\n\t\t\t\t\tif (isConstructor) {\n\t\t\t\t\t\taccessibleObjectKey = new AccessibleObjectKey(\n\t\t\t\t\t\t\t\t\"$constructor\", 0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\taccessibleObjectKey = new AccessibleObjectKey(\n\t\t\t\t\t\t\t\t((Method) accessibleObject).getName(),\n\t\t\t\t\t\t\t\tparam.length);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tList marr = (ArrayList) map.get(accessibleObjectKey);\n\t\t\tif (marr == null) {\n\t\t\t\tmarr = new ArrayList();\n\t\t\t\tmap.put(accessibleObjectKey, marr);\n\t\t\t}\n\n\t\t\tmarr.add(accessibleObject);\n\t\t}\n\t\treturn map;\n\t}", "public Map<String, String> toMap() {\n Map<String, String> map = new HashMap<String, String>();\n map.put(\"id\", id + \"\");\n map.put(\"name\", name);\n map.put(\"value\", value);\n map.put(\"type\", type);\n map.put(\"description\", description);\n\n return map;\n\n }", "abstract Collection<Object> mapResultClass(Collection<Object> resultSet);", "public IdMap() {\n\t\tthis.add(new TextItems());\n\t\tthis.add(new DateTimeEntity());\n\t\tthis.add(EntityCreator.createJson(false));\n\t\tthis.add(EntityCreator.createJson(true));\n\t\tthis.add(new ObjectMapEntry());\n\t\tthis.add(EntityCreator.createXML());\n\t}", "public interface MapP2P<K, V> {\n\n /** Adds key and value in associative array */\n boolean put(K key, V value);\n\n /** Gets from associative array particular value which associated with received key */\n V get(K key);\n\n /** Removes from associative array particular value which associated with received key */\n V remove(K key);\n\n /** Adds in current map other collection which implements interface MapP2P */\n boolean addAll(MapP2P<K, V> mapP2P);\n\n /** Returns information informing whether the given key is in the collection */\n boolean containsKey(K key);\n\n /** Returns information informing whether the given value is in the collection */\n boolean containsValue(Object value);\n\n /** Returns amount element which stored in the associative array */\n int size();\n\n /** Removes all elements (key-value) from collection */\n void clear();\n\n /** Returns set of nodes which contains key-value */\n Set<Node<K, V>> entrySet();\n\n /** Returns information about whether there are elements on the current associative array */\n boolean isEmpty();\n\n /** Interface for Node that contains key and value */\n interface Node<K, V> {\n /** Returns the key of current node */\n K getKey();\n /** Returns the value of current node */\n V getValue();\n }\n\n /** Performs the given action for each node in this map */\n default void forEach(BiConsumer<? super K, ? super V> action) {\n Objects.requireNonNull(action);\n for (Node<K, V> node : entrySet()) {\n action.accept(node.getKey(), node.getValue());\n }\n }\n\n}", "public static Map<Integer,Employee1> getEmployeeList(){\r\n\t return employees;\r\n\t \r\n }", "LinkedHashMap<Long, City> getAllCitiesMap();", "Map<String, String> mo14888a();", "java.util.Map<java.lang.Integer, java.lang.Integer>\n getInfoMap();", "private Map<Integer, NewsItem> toMap(List<NewsItem> articles) {\n Map<Integer, NewsItem> result = new HashMap<>();\n\n for (NewsItem newsItem : articles) {\n result.put(newsItem.getItemId(), newsItem);\n }\n\n return result;\n }", "public Map<String, Collection<V>> asUnmodifiableMap() {\n return Collections.unmodifiableMap(map);\n }", "private static List<Department> compute(Collection<Employee> employees) {\n Map<String, Employee> employeeMap = employees.stream().collect(Collectors.toMap(e -> e.getDeptName(), Function.identity(), (old, newOne) -> newOne));\n\n\n// Map<string, dept>\n// getEmp\n// get account\n// check slap\n// construct department\n// put department in List\n\n\nreturn null;\n\n }", "Map<Class<?>, Object> yangAugmentedInfoMap();", "Map<Class<?>, Object> yangAugmentedInfoMap();", "public Map<String, Object> toMap(Object data) {\n\n try {\n String dataF = null;\n if (!(data instanceof String)) {\n dataF = toString(data);\n }\n// else {\n// dataF = objectMapper.writeValueAsString(data);\n// }\n return objectMapper.readValue(dataF, new TypeReference<Map<String, Object>>() {\n });\n } catch (IOException e) {\n logger.error(e.getMessage(), e);\n }\n return null;\n }", "public interface Converter {\n Map<String,Map<String, Object>> convert(Map<String, Object> doc);\n}", "public Collection<V> get(Object obj) {\n Collection collection = (Collection) Maps.a(this.Pu, obj);\n if (collection == null) {\n return null;\n }\n return AbstractMapBasedMultimap.this.a(obj, collection);\n }", "public <K> Map<K, JAVATYPE> convertMap(Map<K, JAVATYPE> oldMap, final METATYPE meta);", "private Map<String, String> toMap(final Attributes atts) {\r\n\t\tfinal Map<String, String> values = Maps.newLinkedHashMap();\r\n\t\t\r\n\t\tfor (int index = 0; index < atts.getLength(); index++) {\r\n\t\t\tvalues.put(atts.getLocalName(index), atts.getValue(index));\r\n\t\t}\r\n\t\t\r\n\t\treturn values;\r\n\t}", "public static <K, T> Set<T> convertMapToSet(Map<K, T> map) {\r\n\t\t\r\n\t\t// Si la collection est nulle\r\n\t\tif(map == null) return null;\r\n\t\t\r\n\t\t// On retourne l'ensemble\r\n\t\treturn new HashSet<T>(map.values());\r\n\t}", "@SuppressWarnings(\"unchecked\")\n public static Map<String, Object> toMap(Object o) throws ExecException {\n if (o == null) {\n return null;\n }\n\n if (o instanceof Map && !(o instanceof InternalMap)) {\n try {\n return (Map<String, Object>)o;\n } catch (Exception e) {\n int errCode = 2054;\n String msg = \"Internal error. Could not convert \" + o + \" to Map.\";\n throw new ExecException(msg, errCode, PigException.BUG);\n }\n } else {\n int errCode = 1071;\n String msg = \"Cannot convert a \" + findTypeName(o) +\n \" to a Map\";\n throw new ExecException(msg, errCode, PigException.INPUT);\n }\n }", "java.util.List<com.sanqing.sca.message.ProtocolDecode.SimpleMap> \n getSimpleMapList();", "public static <T> HashMap<String, Object> objectToMap(T x)\n\t{\n\t\tHashMap<String,Object> map = new HashMap<String, Object>();\n\t\tField[] fields = x.getClass().getDeclaredFields();\n\t\tfor(Field field : fields)\n\t\t{\n\t\t\tfield.setAccessible(true);\n\t\t\tif(!field.isAnnotationPresent(Special.class))\n\t\t\t{\n\t\t\t\ttry {\n\t\t\t\t\tif(field.get(x) != null)\n\t\t\t\t\t\tmap.put(field.getName(), field.get(x));\n\t\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}", "public static Map<String, User> mapUserByJmbag(Collection<User> collection) {\n\t\tMap<String, User> m = new HashMap<String, User>(collection.size());\n\t\tfor(User u : collection) {\n\t\t\tm.put(u.getJmbag(), u);\n\t\t}\n\t\treturn m;\n\t}", "public MultiValueMap<String, String> getMap() {\r\n\t\tMultiValueMap<String, String> map = new LinkedMultiValueMap<String, String>();\r\n\t\t\r\n\t\tif(this.country != null) \t\tmap.add(\"country\", this.getCountry().getValue());\r\n\t\tif(this.operation != null) \t\tmap.add(\"operation\", this.getOperation().getValue());\r\n\t\tif(this.propertyType != null) \tmap.add(\"propertyType\", this.getPropertyType().getValue());\r\n\t\tif(this.center != null) \t\tmap.add(\"center\", this.getCenter().getCoordinates());\r\n\t\tif(this.locale != null) \t\tmap.add(\"locale\", this.getLocale().getValue());\r\n\t\tif(this.distance != null) \t\tmap.add(\"distance\", this.getDistance().toString());\r\n\t\tif(this.locationId != null) \tmap.add(\"locationId\", this.getLocationId().getValue());\r\n\t\tif(this.maxItems != null) \t\tmap.add(\"maxItems\", this.getMaxItems().toString());\r\n\t\tif(this.numPage != null) \t\tmap.add(\"numPage\", this.getNumPage().toString());\r\n\t\tif(this.maxPrice != null) \t\tmap.add(\"maxPrice\", this.getMaxPrice().toString());\r\n\t\tif(this.sinceDate != null) \t\tmap.add(\"sinceDate\", this.getSinceDate().getValue());\r\n\t\tif(this.order != null) \t\t\tmap.add(\"order\", this.getOrder().getValue());\r\n\t\tif(this.sort != null) \t\t\tmap.add(\"sort\", this.getSort().getValue());\r\n\t\tif(this.adIds != null) {\r\n\t\t\tfor(Integer id: adIds) {\r\n\t\t\t\tmap.add(\"adIds\", id.toString());\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.hasMultimedia != null) \tmap.add(\"hasMultimedia\", this.getHasMultimedia().toString());\r\n\t\t\r\n\t\treturn map;\r\n\t}", "public interface MultiMap extends Map {\n /**\n * Returns the set associated with the given key. If the key is not \n * in the map, returns an empty set. The set returned is modifiable and \n * backed by this multi-map: if values are added for the given key, \n * they will show up in the returned set. However, the returned set may \n * lose its connection to this multi-map if the multi-map's \n * <code>put</code> method is called or if all the values for the \n * given key are removed. \n */\n Object get(Object key);\n\n /**\n * Associates the given key with the given value, which must be a Set. \n * If the given set is empty, the key is removed from the map. \n *\n * @return the set previously associated with this key, or an empty \n * set if the key was not in the map\n *\n * @throws IllegalArgumentException if <code>value</code> is not a Set\n */\n Object put(Object key, Object value);\n\n /**\n * Adds the given value to the set associated with the given key. \n * If the key is not yet in the map, it is added.\n *\n * @return true if the MultiMap changed as a result of this call\n */\n boolean add(Object key, Object value);\n\n /**\n * Adds all elements of the given set to the set associated with the \n * given key. If the key is not yet in the map, it is added.\n *\n * @return true if the MultiMap changed as a result of this call\n */\n boolean addAll(Object key, Set values);\n\n /**\n * Removes the given value from the set associated with the given key. \n * Does nothing if the value is not in that set. If the set ends up \n * being empty, then the key is removed from the map.\n *\n * @return true if the MultiMap changed as a result of this call\n */\n boolean remove(Object key, Object value);\n\n /**\n * Removes all elements of the given set from the set associated with \n * the given key. If the associated set ends up being empty, then the \n * key is removed from the map. \n *\n * @return true if the MultiMap changed as a result of this call\n */\n boolean removeAll(Object key, Set values);\n\n static class EmptyMultiMap extends AbstractMap \n\t implements MultiMap {\n\tpublic Object get(Object key) {\n\t return Collections.EMPTY_SET;\n\t}\n\t\n\tpublic boolean add(Object key, Object value) {\n\t throw new UnsupportedOperationException();\n\t}\n\t\n\tpublic boolean addAll(Object key, Set values) {\n\t throw new UnsupportedOperationException();\n\t}\n\n\tpublic boolean remove(Object key, Object value) {\n\t throw new UnsupportedOperationException();\n\t}\n\n\tpublic boolean removeAll(Object key, Set values) {\n\t throw new UnsupportedOperationException();\n\t}\n\n\tpublic Set entrySet() {\n\t return Collections.EMPTY_SET;\n\t}\n }\n\n /**\n * An unmodifiable multi-map that maps all keys to the empty set.\n */\n public static final MultiMap EMPTY_MULTI_MAP = new EmptyMultiMap();\n}", "public abstract java.util.Map<java.lang.Double, java.util.List<java.lang.Integer>> pnlListMap();", "public static Map getStudentMap() {\r\n\t\tMap<Integer,Student> stds = new HashMap();\r\n\t\tList<Student> list= new ArrayList<>();\r\n\t\tStudent akash =new Student(\"Akash\",123);\r\n\t\tStudent kalpana =new Student(\"kalpana\",345);\r\n\t\tStudent sasha =new Student(\"sasha\",876);\r\n\t\tStudent prakash =new Student(\"prakasg\",567);\r\n\t\t\r\n\t\tlist.add(prakash);\r\n\t\tlist.add(akash);\r\n\t\tlist.add(sasha);\r\n\t\tlist.add(kalpana);\r\n\t\tIterator<Student> its =list.iterator();\r\n\t\twhile (its.hasNext()) {\r\n\t\t\tStudent st = its.next();// student object from the \"list\" is passed in to st. \r\n\t\t\tstds.put(st.getRoll(),st);// st.getRoll() sends the roll number and st sends the object of the student.\r\n\t\t}\r\n\t\t\r\n\t\treturn stds;\r\n\t}", "public abstract Map<String, Object> fetchModelMap() throws ModelException;", "@Override\r\n \tpublic void setMap(Map m) {\n \t\t\r\n \t}", "java.util.Map<java.lang.String, java.lang.String>\n getDetailsMap();", "java.util.Map<java.lang.String, java.lang.String>\n getDetailsMap();", "protected Map<String,List<PageViewVO>> initializePageMap() {\n\t\tMap<String,List<PageViewVO>> pm = new HashMap<>();\n\t\tfor (Section sect : Section.values()) {\n\t\t\tpm.put(sect.name(), new ArrayList<>());\n\t\t}\n\t\treturn pm;\n\t}", "public Map<String, Object> toMap(){\n HashMap<String, Object> res = new HashMap<>();\n res.put(\"id\", id);\n res.put(\"type\", type);\n res.put(\"status\", status);\n res.put(\"date\", date);\n res.put(\"sender\", sender);\n res.put(\"content\", content);\n\n return res;\n }", "HashMap<String, Object[]> getUbicaciones();", "static Map<Name, ObjectConverter> createConversionMap (final FeatureType input, final FeatureType toConvert) throws NonconvertibleObjectException{\n\n if(input.equals(toConvert)){\n return null;\n }\n final Map<Name, ObjectConverter> map = new HashMap<Name, ObjectConverter>();\n\n for (PropertyDescriptor toConvertDesc : toConvert.getDescriptors()) {\n for(PropertyDescriptor inputDesc : input.getDescriptors()){\n\n //same property name\n if(toConvertDesc.getName().equals(inputDesc.getName())){\n\n final Class inputClass = inputDesc.getType().getBinding();\n final Class toConvertClass = toConvertDesc.getType().getBinding();\n if(toConvertClass.equals(inputClass)){\n //same name and same type\n map.put(toConvertDesc.getName(), null);\n }else{\n //same name but different type\n if(toConvertDesc instanceof GeometryDescriptor){\n map.put(toConvertDesc.getName(), new GeomConverter(toConvertClass, inputClass));\n }else{\n map.put(toConvertDesc.getName(), ConverterRegistry.system().converter(toConvertClass, inputClass));\n }\n }\n }\n }\n }\n return map;\n\n }", "<K extends Object, V extends Object> Map<K, V> getMap(String mapName);", "Map getAspectDatas();", "private MapTransformer(Map map) {\n super();\n iMap = map;\n }", "public static void convertRsToMap(ResultSet rs,Map<String,Object> map) throws SQLException{\n\t\tResultSetMetaData rsMeta = rs.getMetaData();\r\n\t\tint columnCount = rsMeta.getColumnCount();\r\n\t\t\r\n\t\tfor(int i = 1; i <= columnCount; i++){\r\n\t\t\tString key = rsMeta.getColumnLabel(i).toLowerCase();\r\n\t\t\t\r\n\t\t\tObject value = rs.getObject(key);\r\n\t\t\t\r\n\t\t\t//if(value instanceof oracle.sql.DATE){\r\n\t\t\t//\tvalue = new java.sql.Date(((oracle.sql.DATE)value).timestampValue().getTime());\r\n\t\t\t//}else if(value instanceof oracle.sql.TIMESTAMP){\r\n\t\t\t//\tvalue = new java.sql.Timestamp(((oracle.sql.TIMESTAMP)value).timestampValue().getTime());\r\n\t\t\t//}\r\n\t\t\t\r\n\t\t\tmap.put(key, value);\r\n\t\t}\r\n\t}", "@Override\n public void record2Map(final Map<String, Integer> map) {\n }", "@Override\n\tpublic Collection<Eleve> findAll() {\n\t\treturn map.values();\n\t}", "private void mapObject(Object obj) {\n if (!objectIdMap.containsKey(obj))\n objectIdMap.put(obj, objectIdMap.size());\n if (obj instanceof Map) {\n Map dict = (Map) obj;\n Set<Map.Entry<String, Object>> de = dict.entrySet();\n for (Map.Entry<String, Object> e : de)\n mapObject(e.getKey());\n for (Map.Entry<String, Object> e : de)\n mapObject(e.getValue());\n } else if (obj instanceof List) {\n List list = (List) obj;\n for (int i = 0; i < list.size(); i++)\n mapObject(list.get(i));\n } else if (obj instanceof String || obj instanceof Float || obj instanceof Double ||\n obj instanceof Integer || obj instanceof Long || obj instanceof byte[] ||\n obj instanceof Date || obj instanceof Boolean) {\n // do nothing.\n } else\n throw new IllegalStateException(\"Incompatible object \" + obj + \" found\");\n }", "public interface Map<K,V> {\n\n int size();\n\n boolean isEmpty();\n\n boolean containsKey(Object key);\n\n boolean containsValue(Object value);\n\n V get(Object key);\n\n V put(K key, V value);\n\n void putAll(Map<? extends K, ? extends V > m);\n\n void clear();\n\n //views\n Set<K> keySet();\n\n Collection<V> values();\n\n Set<Map.Entry<K,V>> entrySet();\n\n interface Entry<K,V>{\n K getKey();\n\n V getValue();\n\n V setValue(V value);\n\n boolean equals(Object o);\n\n int hashCode();\n\n }\n\n boolean equals(Object o);\n\n int hashCode();\n\n}", "protected abstract Map<String, Serializable> getEventKeyAndIdMap();", "private List<Object> serializeActualCollectionMembers(AbstractPersistentCollection collection)\r\n\t{\r\n\t\tList<Object> result = new ArrayList<Object>();\r\n\t\tif (!collection.wasInitialized())\r\n\t\t{\r\n\t\t\tcollection.forceInitialization();\r\n\t\t}\r\n\t\tIterator<Object> itr = collection.entries(null);\r\n\t\twhile (itr.hasNext())\r\n\t\t{\r\n\t\t\tObject next = itr.next();\r\n\t\t\tObject newObj = serialize(next);\r\n\t\t\tresult.add(newObj);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "void writeObject(Map<Object, Object> map);", "public Map getProperties();", "public Map<String, Object> publicMap(boolean includeSingleRelationShip) {\n\t\tMap<String, Object> map = publicMap();\n\t\tif (includeSingleRelationShip) {\n\t\t\tmap.put(\"user\", this.user == null ? null\t: this.user.publicMap());\n\t\t\tmap.put(\"field\", this.field == null ? null : this.field.publicMap());\n\t\t}\n\t\treturn map;\n\t}", "@Override\n\tpublic Map<Long, Sports> findAllMap() {\n\t\tList<Sports> list1 = shopRepository.findAll();\n\t\tMap<Long,Sports> map1 = new HashMap<Long,Sports>();\n\t\tfor (Sports i : list1) map1.put(i.getId(),i);\n\t\treturn map1;\n\t}", "public ObjectSet<Map.Entry<K, V>> entrySet() {\n/* 315 */ return (ObjectSet)reference2ObjectEntrySet();\n/* */ }", "public static void main(String[] args) {\n\t\tProduct proone=new Product();\r\n\t\tproone.setProdid(10001);\r\n\t\tproone.setProdname(\"lg\");\r\n\t\tproone.setProdprice(1181.11);\r\n\t\t\r\n\t\tProduct protwo=new Product();\r\n\t\tprotwo.setProdid(10008);\r\n\t\tprotwo.setProdname(\"lg\");\r\n\t\tprotwo.setProdprice(1181.11);\r\n\t\t\r\n\t\tProduct prothree=new Product();\r\n\t\tprothree.setProdid(10011);\r\n\t\tprothree.setProdname(\"lg\");\r\n\t\tprothree.setProdprice(1181.11);\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n /* Map<Integer,String> myMap=new HashMap<>();\r\n myMap.put(1, \"abcd\");\r\n myMap.put(2,\"life\");\r\n myMap.put(3,\"veena\");\r\n */\r\n\t\t Map<Integer,Product> myMap=new HashMap<>();\r\n\t myMap.put(1, protwo);\r\n\t myMap.put(3,prothree);\r\n System.out.println(myMap);\r\n System.out.println(myMap.keySet());//give all keys\r\n System.out.println(myMap.get(2));\r\n System.out.println(myMap.values());//all values\r\n System.out.println(\"____________________for loop_=====================\");\r\n \r\n for(Integer keys:myMap.keySet())\r\n {\r\n \t System.out.println(\"Keys are:\"+keys+\"Values \"+myMap.get(keys));\r\n }\r\n for(Integer keys:myMap.keySet())\r\n {\r\n \t System.out.println(myMap.get(keys).getProdid());\r\n \t System.out.println(myMap.get(keys).getProdname());\r\n \t System.out.println(myMap.get(keys).getProdprice());\r\n \t \r\n }\r\n System.out.println(\"____________________Iterator=====================\");\r\n \r\n // Iterator it=myMap.iterator(); error becoz map is not part of collection but list nd set are part of collection\r\n //convert to set wid help of keyset...keyset will only convert keys entryset will convert evrythng\r\n \r\n Set myData=myMap.entrySet();\r\n Iterator it=myData.iterator();\r\n \r\n while(it.hasNext())\r\n {\r\n \t System.out.println(it.next());\r\n }\r\n \r\n System.out.println(\"============================\");\r\n //Collections.sort(myMap);\r\n \r\n // Set<Product> trgtset=new HashSet<>(myMap.values());\r\n Collection<Product> mySet=myMap.values(); \r\n //Set<Product> sett=new TreeSet<>(mySet);\r\n List<Product> myList=new LinkedList<>(mySet);\r\n Collections.sort(myList);\r\n \r\n /* for(Product prod:myList)\r\n {\r\n \t System.out.println(prod.getProdid());\r\n \t System.out.println(prod.getProdname());\r\n \t System.out.println(prod.getProdprice());\r\n }\r\n\r\n */\r\n Iterator it1=myData.iterator();\r\n \r\n while(it1.hasNext())\r\n {\r\n \t System.out.println(it1.next());\r\n }\r\n Map mp=new HashMap<>();\r\n mp.put(null,null);\r\n mp.put(1, null);\r\n mp.put(2, null);\r\n mp.put(null,null);\r\n System.out.println(mp);\r\n //is same above snippet written with map mp=new HashTable<>() it will giv nullpointer exception\r\n \r\n\t}", "public static <K, T> List<T> convertMapToList(Map<K, T> map) {\r\n\t\t\r\n\t\t// Si la collection est nulle\r\n\t\tif(map == null) return null;\r\n\t\t\r\n\t\t// On retourne l'ensemble\r\n\t\treturn new ArrayList<T>(map.values());\r\n\t}", "public interface FunctionForListToMap<K,V> {\n Pair<K,V> transfomr(Object obj);\n}", "public List<Map<String, Object>> funcionarioPorDepartamento(Integer cod_departamento);", "public ObjectSet<Map.Entry<K, V>> entrySet() {\n/* 217 */ return (ObjectSet)reference2ObjectEntrySet();\n/* */ }", "public ObjectSet<Map.Entry<K, V>> entrySet() {\n/* 481 */ return (ObjectSet)reference2ObjectEntrySet();\n/* */ }", "public static Map<String, Field> makeFieldMap(Collection fields)\n {\n Map<String, Field> fieldMap = new HashMap<String, Field>();\n Field field;\n for (Iterator itr = fields.iterator(); itr.hasNext(); )\n {\n field = (Field) itr.next();\n fieldMap.put(field.name(), field);\n }\n return fieldMap;\n }", "@Test\n public void whenHaveListOfUsersThenMakeMapOfUsers() {\n HashMap<Integer, User> expect = new HashMap<>();\n User firstUser = new User(1, \"Vasya\", \"Murmansk\");\n User secondUser = new User(5, \"Vova\", \"Vologda\");\n expect.put(1, firstUser);\n expect.put(5, secondUser);\n List<User> list = new ArrayList<>();\n list.add(firstUser);\n list.add(secondUser);\n UserConvert userConvert = new UserConvert();\n assertThat(userConvert.process(list), is(expect));\n }", "void setMap(Map aMap);", "Map<Element, Map<Element, Element>> getOperationMap();", "Map<String, Object> getServiceSpecificObjects();", "@Override\n public Map makeMap() {\n Map<Integer,String> testMap = new HashingMap<>();\n return testMap;\n }", "java.util.Map<java.lang.String, java.lang.String> getLabelsMap();", "java.util.Map<java.lang.String, java.lang.String> getLabelsMap();", "java.util.Map<java.lang.String, java.lang.String> getLabelsMap();", "java.util.Map<java.lang.String, java.lang.String> getLabelsMap();", "public static void test2(Map<Object,Object> map) \n\t{\n\t\tprint(map.getClass().getSimpleName()+\"~~~~~~~~~~~~\");\n\t\tmap.putAll(new CountingMapData(25));\n\t\t// Map has 'Set' behavior for keys:\n\t\tmap.putAll(new CountingMapData(25));\n\t\tprintKeys2(map);\n\t\t// Producing a collection of the values:\n\t\tprintnb(\"Values: \");\n\t\tprint(map.values());\n\t\tprint(map);\n\t\tprint(\"map.containsKey(11): \" + map.containsKey(11));\n\t\tprint(\"map.get(11): \" + map.get(11));\n\t\tprint(\"map.containsValue(\\\"F0\\\"): \" + map.containsValue(\"F0\"));\n\t\tObject key = map.keySet().iterator().next();\n\t\tprint(\"First key in map: \" + key);\n\t\tmap.remove(key);\n\t\tprintKeys2(map);\n\t\tmap.clear();\n\t\tprint(\"map.isEmpty(): \" + map.isEmpty());\n\t\tmap.putAll(new CountingMapData(25));\n\t\t// Operations on the Set change the Map:\n\t\tmap.keySet().removeAll(map.keySet());\n\t\tprint(\"map.isEmpty(): \" + map.isEmpty());\n\t}", "public interface Map<K,T> {\n\t/**\n\t * Puts a value <code>elem</code> associated with the <code>key</code>\n\t * @param key The key associated to the value\n\t * @param elem The value to store\n\t */\n\tpublic void put(K key, T elem);\n\t\n\t/**\n\t * Returns the corresponding element associated to the <code>key</code>\n\t * @param key The key identifying an element\n\t * @return The element associated to the <code>key</code>. If there is no such element, returns null\n\t */\n\tpublic T get(K key);\n\t\n\t/**\n\t * Returns the number of elements in the map\n\t * @return the number of elements in the map\n\t */\n\tpublic int size();\n\t\n\t/**\n\t * Returns a collection of the keys in the map.\n\t * @return a collection of the keys in the map\n\t */\n\tpublic List<K> keys();\n\t\n\t/**\n\t * Returns a collection of the values in the map.\n\t * @return a collection of the values in the map.\n\t */\n\tpublic List<T> values();\n\n\t/**\n\t * Removes the element correspondong to the <code>key</code> from the map\n\t * @param key\n\t */\n public void remove(K key);\n}", "public Object map(String key, Object input);", "Map<K,V> readFromStore(Collection<K> keys);", "@Override\r\n\tpublic Map<Integer, String> getUomIdAndModel() {\n\t\tList<UomVO> list = partUom();\r\n\t\t/*\r\n\t\t * for (UomVO ob : list) { map.put(ob.getId(), ob.getUomModel()); }\r\n\t\t */\r\n\t\t///\r\n\t\tMap<Integer, String> map = list.stream().collect(Collectors.toMap(UomVO::getId, UomVO::getUomModel));\r\n\t\treturn map;\r\n\r\n\t}", "public abstract Map<K, V> a();", "public Collection<CartItem> getCartItems(){\t\t\n\t\treturn map.values();\n\t}", "public JbootVoModel set(Map<String, Object> map) {\n super.putAll(map);\n return this;\n }", "public Map<String, Object> getInfo();", "public static Map<String, Object> toFiniteJsonMap(final Object obj,\n\t\t\tSet<Object> serialized) {\n\t\tMap<String, Object> map = getGetMethodsValue(obj);\n\t\tSet<String> keys = map.keySet();\n\t\tMap<String, Object> ret = new HashMap<String, Object>();\n\t\tfor (String attr : keys) {\n\t\t\tObject value = map.get(attr);\n\t\t\tif (value != null) {\n\t\t\t\tif (value instanceof Jsonable) {\n\t\t\t\t\tJsonable jvalue = (Jsonable) value;\n\t\t\t\t\tret.put(attr, jvalue.toJsonMap());\n\t\t\t\t} else if (value instanceof Collection<?>) {\n\t\t\t\t\tList<Map<String, Object>> m = new ArrayList<Map<String, Object>>();\n\t\t\t\t\tCollection<Jsonable> jI = (Collection<Jsonable>) value;\n\t\t\t\t\tif (!jI.isEmpty()) {\n\t\t\t\t\t\tfor (Jsonable j : jI) {\n\t\t\t\t\t\t\tm.add(j.toJsonMap());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tret.put(attr, m);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tret.put(attr, value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "private Map<String, DataContainer> getDataContainerMap() {\r\n\r\n if (this.dataContainerMap == null) {\r\n if (this.dataContainerList == null) {\r\n parse();\r\n }\r\n\r\n this.dataContainerMap = new HashMap<>();\r\n for (DataContainer dataContainer : this.dataContainerList) {\r\n this.dataContainerMap.put(dataContainer.getVariableName(), dataContainer);\r\n }\r\n }\r\n return this.dataContainerMap;\r\n }", "public OrderedMap<K, V> decorated() {\n return (OrderedMap) super.decorated();\n }" ]
[ "0.668303", "0.66226894", "0.6607619", "0.63636833", "0.62096465", "0.60930777", "0.606056", "0.5987216", "0.5927996", "0.58913743", "0.58881694", "0.5882431", "0.5806431", "0.5774471", "0.5766801", "0.5763592", "0.57550126", "0.57098204", "0.566693", "0.56445014", "0.55962896", "0.55900955", "0.55861014", "0.5577785", "0.55707026", "0.5564593", "0.5541823", "0.5524425", "0.5517398", "0.5515451", "0.55136114", "0.5496306", "0.54934275", "0.5485206", "0.5485206", "0.5473476", "0.5471953", "0.54700434", "0.54538006", "0.54417115", "0.543766", "0.5433576", "0.5432429", "0.54280156", "0.5423182", "0.54121107", "0.540932", "0.54014355", "0.53980374", "0.53979677", "0.53948754", "0.53834033", "0.53687817", "0.5363509", "0.536316", "0.53577477", "0.53490186", "0.5338513", "0.53312933", "0.5317657", "0.5314476", "0.5313333", "0.5312834", "0.52829957", "0.5277136", "0.52750474", "0.5272135", "0.526616", "0.52659744", "0.526176", "0.5261359", "0.5257008", "0.52547324", "0.52544606", "0.52531976", "0.5252504", "0.5251436", "0.5249564", "0.5247212", "0.5228554", "0.5226003", "0.52251005", "0.5216714", "0.52149725", "0.5213237", "0.5213237", "0.5213237", "0.5213237", "0.5209676", "0.520735", "0.5203761", "0.5201858", "0.5199261", "0.5199177", "0.519775", "0.51796854", "0.5176819", "0.51740235", "0.51738054", "0.5173271" ]
0.65008134
3
Methode de conversion d'une collection en Ensemble
public static <T> Set<T> convertCollectionToSet(Collection<T> collection) { // Si la collection est nulle if(collection == null) return null; // On retourne l'ensemble return new HashSet<T>(collection); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Collect getColl();", "protected abstract Collection createCollection();", "public static void main(String[] args) {\n //Generic Version of Collection\n ArrayList<String> arrayList = new ArrayList<>();\n arrayList.add(\"Deepak\");\n arrayList.add(\"Kumar\");\n arrayList.add(\"Hello\");\n arrayList.add(\"Sandeep\");\n System.out.println(\"Collection Before Array Conversion=\" + arrayList);\n String[] names = new String[arrayList.size()];\n arrayList.toArray(names);\n System.out.println(\"Array After Conversion From Collection\");\n for (int i = 0; i < names.length; i++) {\n System.out.println(names[i]);\n }\n //Collection Normal Version\n ArrayList arrayList1 = new ArrayList<>();\n arrayList1.add(\"Deepak\");\n arrayList1.add('a');\n arrayList1.add(1);\n arrayList1.add(10.9f);\n arrayList1.add(10.90);\n arrayList1.add(true);\n\n\n System.out.println(\"Normal Colection without Conversion\"+arrayList1);\n Object[] object = arrayList1.toArray();\n\n System.out.println(\"Array After Conversion From Normal Collection\");\n for (int i = 0; i < object.length; i++) {\n System.out.println(object[i]);\n }\n\n ///Array to Collection Conversion\n String[] names1 = new String[]{\"Deepak\",\"Kuldeep\",\"Sandeep\",\"Pardeep\"};\n ArrayList<String> namesCollection = new ArrayList(Arrays.asList(names1));\n System.out.println(namesCollection);\n\n\n }", "void setLibroCollection1(Collection<Libro> libroCollection1);", "String getCollection();", "static Object[] m59445a(Collection<?> collection) {\n return m59444a((Iterable<?>) collection, new Object[collection.size()]);\n }", "public void encode (Object o, Collection out) {\n delegate.encode(o, out);\n }", "public /*@ non_null @*/ JMLObjectBag<E> toBag() {\n JMLObjectBag<E> ret = new JMLObjectBag<E>();\n JMLIterator<E> elems = iterator();\n while (elems.hasNext()) {\n //@ assume elems.moreElements;\n E o = elems.next();\n E e = (o == null ? null : o);\n ret = ret.insert(e);\n }\n return ret;\n }", "java.lang.String getCollection();", "@Nullable\n @SuppressWarnings(\"unchecked\")\n protected Collection createCollection(MappingContext context, Object value) {\n if (value instanceof Iterable<?>) {\n TypeInformation entryType = context.getGenericTypeInfoOrFail(0);\n Collection result = createCollectionMatchingType(context);\n\n int index = 0;\n for (Object entry : (Iterable) value) {\n Object convertedEntry = convertValueForType(context.createChild(\"[\" + index + \"]\", entryType), entry);\n if (convertedEntry == null) {\n context.registerError(\"Cannot convert value at index \" + index);\n } else {\n result.add(convertedEntry);\n }\n }\n return result;\n }\n return null;\n }", "@Override\n public DietCollection digestion() {\n return new DietCollection();\n }", "private List<Object> serializeActualCollectionMembers(AbstractPersistentCollection collection)\r\n\t{\r\n\t\tList<Object> result = new ArrayList<Object>();\r\n\t\tif (!collection.wasInitialized())\r\n\t\t{\r\n\t\t\tcollection.forceInitialization();\r\n\t\t}\r\n\t\tIterator<Object> itr = collection.entries(null);\r\n\t\twhile (itr.hasNext())\r\n\t\t{\r\n\t\t\tObject next = itr.next();\r\n\t\t\tObject newObj = serialize(next);\r\n\t\t\tresult.add(newObj);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public abstract List<T> convertToEntities(List<D> dtos);", "abstract Collection<Object> mapResultClass(Collection<Object> resultSet);", "public ArrayList convertDataStructure(Iterator iterator) {\r\n ArrayList list = new ArrayList();\r\n int i = 0;\r\n while (iterator.hasNext()) {\r\n AgrupamentoBean bean = (AgrupamentoBean) iterator.next();\r\n bean.setRegistro(new Long(i));\r\n list.add(bean);\r\n i++;\r\n }\r\n return list;\r\n }", "@Test\n public void testAddAll_Collection() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.addAll(c);\n assertEquals(expResult, result);\n\n }", "public interface DtoConverter<D extends BaseDto, E extends BaseEntity> {\n\n /**\n * Verilen {@link BaseEntity} nesne listesini {@link Set<BaseDto>}'e cevirmektedir.\n *\n * @param entityList {@link BaseEntity} listesi\n * @return Set\n */\n Set<D> convertToDtoSet(Collection<E> entityList);\n\n /**\n * Verilen {@link BaseEntity} nesne listesini {@link List<BaseDto>}'e cevirmektedir.\n *\n * @param entityList {@link BaseEntity} listesi\n * @return List\n */\n List<D> convertToDtoList(Collection<E> entityList);\n\n /**\n * Verilen {@link BaseEntity} nesnesini {@link BaseDto} nesnesine cevirme islemini\n * yapmaktadir.\n *\n * @param entity {@link BaseEntity}\n * @return D\n */\n D convertToDto(E entity);\n}", "public interface DataConverter<JAVATYPE,METATYPE extends FieldDefinition> {\n /** Method invoked for a single JAVATYPE */\n JAVATYPE convert(JAVATYPE oldValue, final METATYPE meta);\n\n /** Method invoked for a JAVATYPE List. This can be used to alter the list length / add / remove elements after processing.\n * Please note that the converter is only invoked on the list itself, not on the individual elements. */\n List <JAVATYPE> convertList(List<JAVATYPE> oldList, final METATYPE meta);\n\n /** Method invoked for a JAVATYPE Set. This can be used to alter the set size / add / remove elements after processing.\n * Please note that the converter is only invoked on the list itself, not on the individual elements. */\n Set <JAVATYPE> convertSet(Set<JAVATYPE> oldSet, final METATYPE meta);\n\n /** Method invoked for an array of JAVATYPEs. This can be used to alter the list length / add / remove elements after processing.\n * Please note that the converter is only invoked on the array itself, not on the individual elements. */\n JAVATYPE [] convertArray(JAVATYPE [] oldArray, final METATYPE meta);\n\n /** Map-type methods. The tree walker converses the value parts of the map only. */\n public <K> Map<K, JAVATYPE> convertMap(Map<K, JAVATYPE> oldMap, final METATYPE meta);\n}", "void setLibroCollection(Collection<Libro> libroCollection);", "void setPrestitoCollection(Collection<Prestito> prestitoCollection);", "@XmlTransient\n Collection<Autore> getAutoreCollection();", "public interface SimapaCollection extends SimapaObject {\r\n}", "private static <T> T identity(Collection<T> collection) {\n return identity(collection.iterator());\n }", "@Test\n public void testAddAll_int_Collection_Order() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n instance.addAll(1, c);\n\n List expResult = Arrays.asList(3, 1, 2, 3, 2);\n\n for (int i = 0; i < expResult.size(); i++) {\n assertEquals(expResult.get(i), instance.get(i));\n }\n }", "protected Collection<V> newCollection() {\r\n \treturn new ArrayList<V>();\r\n }", "void setCopiaelettronicaCollection(Collection<Copiaelettronica> copiaelettronicaCollection);", "@XmlTransient\n Collection<Libro> getLibroCollection1();", "private void arrayToCollection(String name, Collection<Object>lst, JSONArray jarr, Type ptype) throws Exception {\n\t\tCollectionType ctype = (CollectionType) ptype;\n\t\tString cname = lst.getClass().getSimpleName() + \": \" + name;\n\t\tfor(Object jsonObj : jarr) {\n\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\tif(obj!=null)\n\t\t\t\tlst.add(obj);\n\t\t}\n\t}", "public Secs2 toS2F37CollectionEvent();", "@Test\n public void testAddAll_int_Collection() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.addAll(1, c);\n assertEquals(expResult, result);\n\n }", "Collection getData();", "Collections() { return; }", "Iterable<CtElement> asIterable();", "Collection<E> save(Iterable<E> entities);", "@Override\n public Collection<SonarQubeIssueModel> convert(final Collection<InspectCodeIssueModel> issueCollection) {\n if (issueCollection == null || issueCollection.isEmpty()) {\n return java.util.Collections.emptySet();\n }\n\n // Convert the entire collection in parallel using the Java Stream API and return the converted collection\n return issueCollection.parallelStream()\n .map(this::convert)\n .collect(Collectors.toSet());\n }", "public String getCollectionClass ();", "public abstract ImmutableCollection<V> A2u(K k);", "public static Collection transform(Collection source) {\n Collection target = new Collection(MetadataFormat.DC);\n if (source.getFormat() == MetadataFormat.MARC) {\n for (Record record : source.getRecords()) {\n target.add(transform(record));\n }\n } else {\n System.err.println(\"Cannot transform non-MARC collection\");\n }\n return target;\n }", "public void triCollection(){\r\n Collections.sort(collection);\r\n }", "com.google.protobuf.ByteString\n getCollectionBytes();", "public ListConverting getListConverting() {\n return listConverting;\n }", "@Test\n public void testConvertGeneSet() {\n searchService.loadValueObject( SearchResult.from( GeneSet.class, gs, 1.0, \"test object\" ) );\n verify( geneSetService ).loadValueObject( gs );\n }", "public <T> Collection<T> initialize(Collection<T> entities);", "public <E> Collection<E> mo8156u(Collection<E> collection) {\n return Collections.unmodifiableList((List) collection);\n }", "@Override\n\tpublic String getCollection() {\n\t\treturn null;\n\t}", "public interface ListConverterList<From,To> extends Converter<List<From>,List<To>> {\r\n}", "public interface IDataCollection<T> extends Serializable {\n int getPageSize ();\n int getPageNo ();\n int getTotalRows ();\n int getTotalPages ();\n void setData (Collection<T> data);\n List<T> getData ();\n}", "void setAutoreCollection(Collection<Autore> autoreCollection);", "<S extends T> Collection<S> save(Iterable<S> entities);", "@SuppressWarnings(\"unchecked\")\n public <T> void asCollection(final Collection<T> destination) {\n for (final Object o : this) {\n destination.add((T) o);\n }\n }", "public Collection<T> readAll();", "<T, U> Collection<U> map(Collection<T> sources, TypeToken<Collection<U>> destinationTypeToken);", "public E decode(ArrayList<Integer> individual);", "public void setCollection(ArrayList<Fonds> collection){\r\n this.collection = collection;\r\n }", "public Layer_ElementsCollection()\n\t{\n\t\tthis.elements = new ArrayList<GIS_element>();\n\t}", "void addAll(Collection<Book> books);", "public static void main(String[] args) {\n Collection collection= new ArrayList();\n collection.add(1500);\n collection.add(true);\n collection.add(12.32);\n collection.add(\"s\");\n collection.add('f');\n //System.out.println(collection);\n\n //Collection add(item) bunda item qo'sha olsa true aksi bo'lsa false qataradi\n System.out.println(collection.add(2200)); // bunda console da true bo'ladi 2200 qo'sha olgani uchun\n\n /* Collection ni addAll metothdi bu bizga collection methodiga narsalarni collection1 b-n\n ketma ketlikda qo'shish imkonini beradi*/\n\n Collection collection1=new ArrayList();\n collection1.addAll(collection);\n collection1.add(\"otherNumber1\");\n collection1.add(\"otherNumber2\");\n collection1.add(\"otherNumber3\");\n System.out.println(collection1);\n\n // boolean remove(object item) bu ko'rsatilgan obyektni collectionda o'chiradi listlarda index bilan bajariladi\n collection1.remove(12.32);\n System.out.println(collection1);\n\n // boolean removeAll(Collection<?> col)\n collection1.removeAll(collection);\n System.out.println(collection1);\n\n\n\n\n\n }", "public void testSerialization() {\n TaskSeries s1 = new TaskSeries(\"S\");\n s1.add(new Task(\"T1\", new Date(1), new Date(2)));\n s1.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeries s2 = new TaskSeries(\"S\");\n s2.add(new Task(\"T1\", new Date(1), new Date(2)));\n s2.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeriesCollection c1 = new TaskSeriesCollection();\n c1.add(s1);\n c1.add(s2);\n TaskSeriesCollection c2 = (TaskSeriesCollection) TestUtilities.serialised(c1);\n }", "@Override\n\tvoid collect() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n public <T> IndexedCollection<T> collection() {\n return (IndexedCollection<T>) journal\n .retrieve(BarbelQueries.all(id), queryOptions(orderBy(ascending(BarbelQueries.EFFECTIVE_FROM))))\n .stream().map(d -> processingState.expose(context, (Bitemporal) d)).collect(Collectors.toList());\n }", "CollectionParameter createCollectionParameter();", "Collection<? extends Object> getHadithChapterIntro();", "public void pushAll(Collection<? extends E> src) {\n //Implementation\n }", "public void convertHashtoArray(ArrayList<Manufacturer> manu){\r\n\t\tfor(Manufacturer d: manu){\r\n\t\tManlist.add(t.get(d.code));\r\n\t\t}\r\n\t}", "CollectionReferenceElement createCollectionReferenceElement();", "public void toSelf(def<T> func) {\n $(array).forEach((e, i) -> {\n array[$(i)] = func.apply(e);\n });\n }", "public interface CollectionField extends RelationField {\n\n}", "default void addAllTo(Collection<? super E> collection) {\n // Accepting a Collection<? super E> allows us to add elements to\n // any collection that can hold E elements, including Collection<Object>.\n for (E element : this) {\n collection.add(element);\n }\n }", "public abstract ArrayList<Key> toArrayList();", "private List<E> convertObjects(List<PersistentObject> objects) throws IOException {\n List<E> entities = new ArrayList<>();\n\n for (PersistentObject object : objects) {\n entities.add(converter.convert(object));\n }\n\n return entities;\n }", "private void method_158(ObjectInputStream var1) {\n var1.defaultReadObject();\n this.a((Collection)var1.readObject());\n }", "@Override\n protected abstract SecondOrderCollection wrapped();", "@Override\r\n public void process() {\r\n if (isDirectEmbeddableCollection()) {\r\n ObjectArrayMapping mapping = new ObjectArrayMapping();\r\n \r\n // Add the mapping to the descriptor.\r\n setMapping(mapping);\r\n \r\n // Set the reference class name.\r\n mapping.setReferenceClassName(getReferenceClassName());\r\n \r\n // Set the attribute name.\r\n mapping.setAttributeName(getAttributeName());\r\n \r\n // Will check for PROPERTY access\r\n setAccessorMethods(mapping);\r\n \r\n mapping.setStructureName(getDatabaseType());\r\n \r\n // Process the @Column or column element if there is one.\r\n // A number of methods depend on this field so it must be\r\n // initialized before any further processing can take place.\r\n mapping.setField(new ObjectRelationalDatabaseField(getDatabaseField(getDescriptor().getPrimaryTable(), MetadataLogger.COLUMN)));\r\n } else {\r\n ArrayMapping mapping = new ArrayMapping();\r\n \r\n // Add the mapping to the descriptor.\r\n setMapping(mapping);\r\n \r\n // Set the attribute name.\r\n mapping.setAttributeName(getAttributeName());\r\n \r\n // Will check for PROPERTY access\r\n setAccessorMethods(mapping);\r\n \r\n mapping.setStructureName(getDatabaseType());\r\n \r\n // Process the @Column or column element if there is one.\r\n // A number of methods depend on this field so it must be\r\n // initialized before any further processing can take place.\r\n mapping.setField(new ObjectRelationalDatabaseField(getDatabaseField(getDescriptor().getPrimaryTable(), MetadataLogger.COLUMN)));\r\n }\r\n }", "public void copyTo(CollectionResource arg0, String arg1) {\n\t}", "public interface IAggregator<T> {\r\n void aggregate(Collection<T> batch);\r\n}", "@XmlTransient\n Collection<Copiaelettronica> getCopiaelettronicaCollection();", "Object getTolist();", "@SuppressWarnings(\"WeakerAccess\")\n @NonNull\n protected List<T> convert(@NonNull final Object data) {\n final List<Object> objects = CoreReflection.getObjects(data, false);\n if (objects == null) return Collections.singletonList(convertSingle(data));\n\n final ArrayList<T> list = new ArrayList<>();\n for (final Object object: objects)\n if (!CoreReflection.isNotSingle(object))\n list.add(convertSingle(object));\n\n return list;\n }", "protected List getList() {\n/* 88 */ return (List)getCollection();\n/* */ }", "public static <F> /*@ pure @*/ /*@ non_null @*/\n JMLObjectSet<F> convertFrom(/*@ non_null @*/ F[] a)\n {\n /*@ non_null @*/ JMLObjectSet<F> ret = EMPTY;\n for (int i = 0; i < a.length; i++) {\n ret = ret.insert(a[i]);\n }\n return ret;\n }", "<T> void lookupAll(Class<T> type, Collection<T> out);", "Set <JAVATYPE> convertSet(Set<JAVATYPE> oldSet, final METATYPE meta);", "@Test\n public void testAddAll_Collection_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.addAll(c);\n assertEquals(expResult, result);\n\n }", "void setTagCollection(Collection<Tag> tagCollection);", "private void populateViewCollections() {\n\n\t}", "Collection<T> getSimpleModelObjects();", "public Collection<T> dump() {\n\t\treturn internalElements();\n\t}", "DataSet toDataSet(Object adaptee);", "List<T> collect();", "public WECollection()\n {\n }", "public Collection<T> mo29734a() {\n return new ArrayList();\n }", "protected abstract <T> Collection<T> createCollection(Class<T> clazz);", "@XmlTransient\n Collection<Libro> getLibroCollection();", "private CollectionType() {}", "public Collection getCollection() {\n return mCollection;\n }", "E[] toArray();", "@Override\n public List<FeatureId> addFeatures(\n FeatureCollection<SimpleFeatureType, SimpleFeature> collection) throws IOException {\n TransformFeatureCollectionWrapper transformed = new TransformFeatureCollectionWrapper(collection, invertedTransformer);\n return store.addFeatures(transformed);\n\n // TODO: re-shape feature ids...\n }", "List<E> read();", "public Collection getGeneralization()\n {\n \tModelFacade instance = ModelFacade.getInstance(this.refOutermostPackage().refMofId());\n \tif (instance != null && \n \t\tinstance.isRepresentative(this.refMofId())&&\n \t\tinstance.hasRefObject(this.refMofId()))\n \t{\n \t\tCollection col = new ArrayList();\n \t\tcol = instance.getGeneralization(this.refMofId());\n \t\t\n \t\treturn col; \t\t\n \t}\n \n \treturn super_getGeneralization();\n }", "public Collection() {\n this.collection = new ArrayList<>();\n }" ]
[ "0.6521113", "0.6154621", "0.59014535", "0.58739275", "0.5842909", "0.5789322", "0.57525414", "0.57161576", "0.5712267", "0.566013", "0.56230885", "0.5592511", "0.5588505", "0.5541538", "0.5525284", "0.5510841", "0.54963714", "0.54783887", "0.5456281", "0.5449922", "0.54475576", "0.5444758", "0.54419994", "0.543188", "0.5428167", "0.542658", "0.54111904", "0.54111123", "0.5405342", "0.5405037", "0.5398349", "0.53929216", "0.5384816", "0.53736526", "0.53551424", "0.5336853", "0.5334101", "0.5326704", "0.5325539", "0.5318074", "0.5317584", "0.53122157", "0.5307804", "0.5302267", "0.5294255", "0.52895886", "0.5281379", "0.5277852", "0.5269212", "0.52497506", "0.5246974", "0.5240266", "0.52347374", "0.52347034", "0.52343917", "0.5230237", "0.5228393", "0.522837", "0.52207714", "0.520715", "0.5197149", "0.518635", "0.51858234", "0.51781625", "0.5171547", "0.51706094", "0.5169916", "0.5168045", "0.5165205", "0.5142738", "0.5140138", "0.5135668", "0.5132472", "0.5131857", "0.5128508", "0.5126577", "0.51230925", "0.5120385", "0.5115734", "0.5093013", "0.50924295", "0.5092394", "0.5090001", "0.50839543", "0.50813705", "0.5073628", "0.5069264", "0.50677925", "0.5062595", "0.5060122", "0.50585335", "0.505305", "0.5052418", "0.50513357", "0.50448734", "0.5042523", "0.50306064", "0.50301284", "0.5025481", "0.5015186" ]
0.5264523
49
Methode de conversion d'une collection en Liste
public static <T> List<T> convertCollectionToList(Collection<T> collection) { // Si la collection est nulle if(collection == null) return null; // On retourne la Liste return new ArrayList<T>(collection); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected List getList() {\n/* 88 */ return (List)getCollection();\n/* */ }", "Object getTolist();", "public ListConverting getListConverting() {\n return listConverting;\n }", "Listof<X> toList();", "List <JAVATYPE> convertList(List<JAVATYPE> oldList, final METATYPE meta);", "public List<E> toList() {\r\n ArrayList<E> result = new ArrayList<E>(this.size());\r\n for (E e : this) {\r\n result.add(e);\r\n }\r\n return result;\r\n }", "public static <T> List<T> toList(final Collection<T> collection) {\n\n if (isEmpty(collection)) {\n return new ArrayList<T>(0);\n } else {\n return new ArrayList<T>(collection);\n }\n }", "public List<T> toList() {\n return Query.toList(iterable);\n }", "List<Object> toList() {\n List<Object> results = new ArrayList<>(this.myArrayList.size());\n for (Object element : this.myArrayList) {\n if (element == null || PropertyObject.NULL.equals(element)) {\n results.add(null);\n } else if (element instanceof PropertyArray) {\n results.add(((PropertyArray) element).toList());\n } else if (element instanceof PropertyObject) {\n results.add(((PropertyObject) element).toMap());\n } else {\n results.add(element);\n }\n }\n return results;\n }", "public interface ListConverterList<From,To> extends Converter<List<From>,List<To>> {\r\n}", "private List<Object> serializeActualCollectionMembers(AbstractPersistentCollection collection)\r\n\t{\r\n\t\tList<Object> result = new ArrayList<Object>();\r\n\t\tif (!collection.wasInitialized())\r\n\t\t{\r\n\t\t\tcollection.forceInitialization();\r\n\t\t}\r\n\t\tIterator<Object> itr = collection.entries(null);\r\n\t\twhile (itr.hasNext())\r\n\t\t{\r\n\t\t\tObject next = itr.next();\r\n\t\t\tObject newObj = serialize(next);\r\n\t\t\tresult.add(newObj);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "@SuppressWarnings(\"WeakerAccess\")\n @NonNull\n protected List<T> convert(@NonNull final Object data) {\n final List<Object> objects = CoreReflection.getObjects(data, false);\n if (objects == null) return Collections.singletonList(convertSingle(data));\n\n final ArrayList<T> list = new ArrayList<>();\n for (final Object object: objects)\n if (!CoreReflection.isNotSingle(object))\n list.add(convertSingle(object));\n\n return list;\n }", "public List getList() {\n return Arrays.asList(toJavaArray()); \n }", "public ArrayList convertDataStructure(Iterator iterator) {\r\n ArrayList list = new ArrayList();\r\n int i = 0;\r\n while (iterator.hasNext()) {\r\n AgrupamentoBean bean = (AgrupamentoBean) iterator.next();\r\n bean.setRegistro(new Long(i));\r\n list.add(bean);\r\n i++;\r\n }\r\n return list;\r\n }", "List<E> read();", "public static void main(String[] args) {\n //Generic Version of Collection\n ArrayList<String> arrayList = new ArrayList<>();\n arrayList.add(\"Deepak\");\n arrayList.add(\"Kumar\");\n arrayList.add(\"Hello\");\n arrayList.add(\"Sandeep\");\n System.out.println(\"Collection Before Array Conversion=\" + arrayList);\n String[] names = new String[arrayList.size()];\n arrayList.toArray(names);\n System.out.println(\"Array After Conversion From Collection\");\n for (int i = 0; i < names.length; i++) {\n System.out.println(names[i]);\n }\n //Collection Normal Version\n ArrayList arrayList1 = new ArrayList<>();\n arrayList1.add(\"Deepak\");\n arrayList1.add('a');\n arrayList1.add(1);\n arrayList1.add(10.9f);\n arrayList1.add(10.90);\n arrayList1.add(true);\n\n\n System.out.println(\"Normal Colection without Conversion\"+arrayList1);\n Object[] object = arrayList1.toArray();\n\n System.out.println(\"Array After Conversion From Normal Collection\");\n for (int i = 0; i < object.length; i++) {\n System.out.println(object[i]);\n }\n\n ///Array to Collection Conversion\n String[] names1 = new String[]{\"Deepak\",\"Kuldeep\",\"Sandeep\",\"Pardeep\"};\n ArrayList<String> namesCollection = new ArrayList(Arrays.asList(names1));\n System.out.println(namesCollection);\n\n\n }", "private void arrayToCollection(String name, Collection<Object>lst, JSONArray jarr, Type ptype) throws Exception {\n\t\tCollectionType ctype = (CollectionType) ptype;\n\t\tString cname = lst.getClass().getSimpleName() + \": \" + name;\n\t\tfor(Object jsonObj : jarr) {\n\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\tif(obj!=null)\n\t\t\t\tlst.add(obj);\n\t\t}\n\t}", "List<T> readList();", "@Override\n\tpublic void docToLists() {\n\t\tnodesToList(document, null, nodes);\n\t}", "List<Vehiculo>listar();", "protected Collection<V> newCollection() {\r\n \treturn new ArrayList<V>();\r\n }", "public List<New> list();", "@Nullable\n @SuppressWarnings(\"unchecked\")\n protected Collection createCollection(MappingContext context, Object value) {\n if (value instanceof Iterable<?>) {\n TypeInformation entryType = context.getGenericTypeInfoOrFail(0);\n Collection result = createCollectionMatchingType(context);\n\n int index = 0;\n for (Object entry : (Iterable) value) {\n Object convertedEntry = convertValueForType(context.createChild(\"[\" + index + \"]\", entryType), entry);\n if (convertedEntry == null) {\n context.registerError(\"Cannot convert value at index \" + index);\n } else {\n result.add(convertedEntry);\n }\n }\n return result;\n }\n return null;\n }", "@Override\r\n\tpublic List<T> getCollectionData() {\n\t\treturn data == null ? null : data.list;\r\n\t}", "public static <T> List<T> adaptCollection(Collection<?> collection, Class<T> klass)\n {\n List<T> r = new ArrayList<T>();\n \n for(Object o : collection)\n {\n T t = adapt(o, klass);\n if(t != null)\n {\n r.add(t);\n }\n }\n \n return r;\n }", "public List<KategorieFX> convertInKategorieFXList(List<Kategorie> kategorieListe);", "java.lang.String getCollection();", "public List toList() throws TemplateModelException {\n if (unwrappedList == null) {\n Class listClass = list.getClass();\n List result = null;\n try {\n result = (List) listClass.newInstance();\n } catch (Exception e) {\n throw new TemplateModelException(\"Error instantiating an object of type \" + listClass.getName() + \"\\n\" + e.getMessage());\n }\n BeansWrapper bw = BeansWrapper.getDefaultInstance();\n for (int i=0; i<list.size(); i++) {\n Object elem = list.get(i);\n if (elem instanceof TemplateModel) {\n elem = bw.unwrap((TemplateModel) elem);\n }\n result.add(elem);\n }\n unwrappedList = result;\n }\n return unwrappedList;\n }", "Collect getColl();", "List<T> read();", "public abstract List toNameValueList();", "List<ParqueaderoEntidad> listar();", "public static <T> List<T> toList(Iterable<T> elements) {\n return toList(elements.iterator());\n }", "protected abstract Collection createCollection();", "public Collection<T> mo29734a() {\n return new ArrayList();\n }", "public List getList();", "@Override\n\tpublic List<Object> getCollection() {\n\t\treturn null;\n\t}", "protected abstract List<E> getList();", "public interface DtoConverter<D extends BaseDto, E extends BaseEntity> {\n\n /**\n * Verilen {@link BaseEntity} nesne listesini {@link Set<BaseDto>}'e cevirmektedir.\n *\n * @param entityList {@link BaseEntity} listesi\n * @return Set\n */\n Set<D> convertToDtoSet(Collection<E> entityList);\n\n /**\n * Verilen {@link BaseEntity} nesne listesini {@link List<BaseDto>}'e cevirmektedir.\n *\n * @param entityList {@link BaseEntity} listesi\n * @return List\n */\n List<D> convertToDtoList(Collection<E> entityList);\n\n /**\n * Verilen {@link BaseEntity} nesnesini {@link BaseDto} nesnesine cevirme islemini\n * yapmaktadir.\n *\n * @param entity {@link BaseEntity}\n * @return D\n */\n D convertToDto(E entity);\n}", "private List<SillyBot> convert(Collection<SillyBot> botsToAdd) {\n\t\tList<SillyBot> bots = new ArrayList<>();\n\t\tbots.addAll(botsToAdd);\n\t\treturn bots;\n\t}", "public abstract List<T> convertToEntities(List<D> dtos);", "String getCollection();", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default List<IData> asList() {\n \n return notSupportedCast(\"IData[]\");\n }", "@Override\n\tpublic ArrayList<Lista> listaListeElettorali() {\n\t\t\t\n\t\t\t\n\t\t\tDB db = getDB();\n\t\t\tMap<Integer, Lista> map = db.getTreeMap(\"liste\");\n\t\t\tArrayList<Lista> liste = new ArrayList<Lista>();\n\t\t\tSet<Integer> keys = map.keySet();\n\t\t\tfor (int key : keys) {\n\t\t\t\tliste.add(map.get(key));\n\t\t\t}\n\t\n\t\t\treturn liste;\n\t\t\t\n\t\t}", "List<?> getList();", "@Override\r\n public <R> ListADT<R> map(Function<T, R> converter) {\r\n return new ListADTImpl(head.map(converter));\r\n }", "private ArrayList<Document> convertToDocumentsList(ArrayList<WordDocument> list){\n ArrayList<Document> convertedList = new ArrayList<Document>();\n\n for(WordDocument x : list)\n convertedList.add(x.getDocument());\n\n return convertedList;\n }", "public void triCollection(){\r\n Collections.sort(collection);\r\n }", "public static <T> List<T> createList(Collection<T> collection) {\n\t\treturn Collections.list(Collections.enumeration(collection));\n\t}", "public <E> Collection<E> mo8156u(Collection<E> collection) {\n return Collections.unmodifiableList((List) collection);\n }", "public abstract ArrayList<Key> toArrayList();", "abstract List<T> getReuslt();", "public ListaPracownikow() {\n generujPracownikow();\n //dodajPracownika();\n }", "List<PersonaDTO> PersonaListToPersonaDTOList(List<Persona> personaList);", "public DList2 list(){\r\n return this.list;\r\n }", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<T> getList() {\r\n\t\tgetEntityManager().flush();\r\n\t\treturn getEntityManager().createQuery(\r\n\t\t\t\t\"select OBJECT(o) from \" + getClassType().getSimpleName() + \" o order by o.id\")\r\n\t\t\t\t.getResultList();\r\n\t}", "ListType createListType();", "public COSArray toList() \n {\n return array;\n }", "public static List toList(Iterator iter)\r\n {\r\n if (iter == null)\r\n {\r\n return null;\r\n }\r\n List list = new ArrayList();\r\n while (iter.hasNext())\r\n {\r\n list.add(iter.next());\r\n }\r\n return list;\r\n }", "Collection<T> getSimpleModelObjects();", "List<T> obtenerAll();", "List<E> list();", "public ArrayList<Book> getListBook();", "List<T> collect();", "public List<UserOutputDTO> convert(Collection<User> users){\n\t\treturn users\n\t\t\t\t.stream()\n\t\t\t\t.map(this :: convert)\n\t\t\t\t.collect(Collectors.toList());\n\t}", "static public Collection<String> convertCollection(Collection<Language> langs) {\r\n\t\tCollection<String> stringCollection = new ArrayList<>();\r\n\r\n\t\tfor (Language l : langs) {\r\n\t\t\tstringCollection.add(l.getName());\r\n\t\t}\r\n\r\n\t\treturn stringCollection;\r\n\t}", "public static <D> List<D> convert(List<?> source, Class<D> type) {\n return modelMapper.map(source, new ListOfType<D>(type));\n }", "public List<Date> convertXMLGregorianCalendarList(List<XMLGregorianCalendar> alist){\n\t\tList<Date> blist = new ArrayList<Date>(alist.size());\n\t\tfor(int i=0; i < alist.size(); i++){\n\t\t\tblist.add( this.getDate(alist.get(i)) );\n\t\t}\n\t\treturn blist;\n\t}", "Iterable<T> list();", "static Object[] m59445a(Collection<?> collection) {\n return m59444a((Iterable<?>) collection, new Object[collection.size()]);\n }", "public static void main(String[] args) {\n Collection collection= new ArrayList();\n collection.add(1500);\n collection.add(true);\n collection.add(12.32);\n collection.add(\"s\");\n collection.add('f');\n //System.out.println(collection);\n\n //Collection add(item) bunda item qo'sha olsa true aksi bo'lsa false qataradi\n System.out.println(collection.add(2200)); // bunda console da true bo'ladi 2200 qo'sha olgani uchun\n\n /* Collection ni addAll metothdi bu bizga collection methodiga narsalarni collection1 b-n\n ketma ketlikda qo'shish imkonini beradi*/\n\n Collection collection1=new ArrayList();\n collection1.addAll(collection);\n collection1.add(\"otherNumber1\");\n collection1.add(\"otherNumber2\");\n collection1.add(\"otherNumber3\");\n System.out.println(collection1);\n\n // boolean remove(object item) bu ko'rsatilgan obyektni collectionda o'chiradi listlarda index bilan bajariladi\n collection1.remove(12.32);\n System.out.println(collection1);\n\n // boolean removeAll(Collection<?> col)\n collection1.removeAll(collection);\n System.out.println(collection1);\n\n\n\n\n\n }", "void setLibroCollection1(Collection<Libro> libroCollection1);", "public void setItems(List<T> value) {\n getElement().setItems(SerDes.mirror(value).cast());\n }", "ArrayList<E> getAll();", "Collections() { return; }", "public abstract ArrayList<? extends Domain> read();", "@Override\n public List<E> asList() {\n ArrayList<E> result = null;\n\n while (top.next != null) {\n top = top.next;\n result.add(top.data);\n }\n return result;\n }", "@Override\n\tpublic List<NewsCollection> findAllList(Map<String, Object> param) {\n\t\treturn newsCollectionMapper.findAllList(param);\n\t}", "public Collection<T> readAll();", "public ArrayList<Collectable> getItems(){\n return items;\n }", "public static List<AlumnoVO> transformarListaVO() throws SQLException, ClassNotFoundException {\n\n\t\tList<AlumnoVO> alumnos = new ArrayList<AlumnoVO>();\n\t\tConnection con = Constante.getConexion();\n\t\tStatement sentencia = con.createStatement();\n\t\tResultSet result = sentencia.executeQuery(\n\t\t\t\t\"SELECT dni,nombre,apellido1,apellido2,telefono,fechanacimiento FROM alumno ORDER BY nombre\");\n\t\twhile (result.next()) {\n\t\t\tAlumnoVO alumno = new AlumnoVO();\n\n\t\t\talumno.setDni(result.getString(\"dni\"));\n\t\t\talumno.setNombre(result.getString(\"nombre\"));\n\t\t\talumno.setApellido1(result.getString(\"apellido1\"));\n\t\t\talumno.setApellido2(result.getString(\"apellido2\"));\n\t\t\talumno.setTelefono(result.getInt(\"telefono\"));\n\t\t\talumno.setFechaNacimiento(result.getDate(\"fechanacimiento\"));\n\t\t\talumnos.add(alumno);\n\t\t}\n\t\tsentencia.close();\n\t\tcon.close();\n\n\t\treturn alumnos;\n\t}", "public static <K, T> List<T> convertMapToList(Map<K, T> map) {\r\n\t\t\r\n\t\t// Si la collection est nulle\r\n\t\tif(map == null) return null;\r\n\t\t\r\n\t\t// On retourne l'ensemble\r\n\t\treturn new ArrayList<T>(map.values());\r\n\t}", "@SuppressWarnings(\"unchecked\")\n static <T extends I, I>\n List<T> castDown(Class<T> type, List<I> src, Function<I, T> converter, boolean every) {\n if (src == null || src.isEmpty()) return Collections.emptyList();\n if (type.isAssignableFrom(src.get(0).getClass()) && !every) {\n return ((List<T>) src);\n }\n val list = new ArrayList<T>();\n for (I i : src) {\n T t = converter.apply(i);\n list.add(t);\n }\n return list;\n }", "Collection<? extends Object> getInBookNo();", "public abstract List<T> getList();", "java.util.List<com.rpg.framework.database.Protocol.Item> \n getItemsList();", "public static <T> ConstList<T> make(Iterable<T> collection) {\n if (collection == null)\n return make();\n if (collection instanceof ConstList)\n return (ConstList<T>) collection;\n if (collection instanceof Collection) {\n Collection<T> col = (Collection<T>) collection;\n if (col.isEmpty())\n return make();\n else\n return new ConstList<T>(new ArrayList<T>(col));\n }\n ArrayList<T> ans = null;\n for (T x : collection) {\n if (ans == null)\n ans = new ArrayList<T>();\n ans.add(x);\n }\n if (ans == null)\n return make();\n else\n return new ConstList<T>(ans);\n }", "@SuppressWarnings(\"unchecked\")\r\n\t\r\n\tpublic List<ParadaUtil> listar() {\n\t\tiniciarTransacao();\r\n\t\tCriteria c = s.createCriteria(ParadaUtil.class);\r\n\t\tc.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\r\n\t\treturn c.list();\r\n\t}", "private List<SimpleComponent> list() {\n\t\treturn this.list(null);\n\t}", "public ArrayList<T> getAsList(){\r\n return arrayList;\r\n }", "Collection getData();", "@Override\n public List<Entry> toArrayList() {\n return members;\n }", "public static Collection convertToBeList(SyncBusinessEntity[] syncBes)\n {\n ArrayList list = new ArrayList();\n\n if (syncBes != null)\n {\n for (int i=0; i<syncBes.length; i++)\n list.add(syncBes[i].getBusinessEntity());\n }\n\n return list;\n }", "java.util.List<message.Figure.FigureData.FigureBase> \n getFigureListList();", "public List<Mobibus> darMobibus();", "public static void clientFunc(){\n List list = new ArrayList(); //rawtype list\n list.add(10);\n list.add(\"jenkins\");\n list.add(new Object());\n\n //unsafe classcast exception at runtime\n //rawtypes are unsafe\n List<String> stringList = list;\n\n ListIterator listIterator = list.listIterator();\n while(listIterator.hasNext()){\n System.out.println(listIterator.next());\n }\n }", "public List<XMLGregorianCalendar> convertDateList(List<Date> alist){\n\t\tList<XMLGregorianCalendar> blist = new ArrayList<XMLGregorianCalendar>(alist.size());\n\t\tfor(int i=0; i < alist.size(); i++){\n\t\t\tblist.add( this.getDate(alist.get(i)) );\n\t\t}\n\t\treturn blist;\n\t}", "private <T> Collection<T> reverse(Collection<T> col) {\n List<T> list = new ArrayList<>();\n col.forEach(list::add);\n Collections.reverse(list);\n return list;\n }", "public ArrayList<CollectionBean> getCollectionList(int m_idx) {\n\t\treturn collectionDao.getCollectionList(m_idx);\n\t}", "public ArrayList<DanhMuc> getListDanhMucCha();" ]
[ "0.7083787", "0.70675486", "0.6795384", "0.6501573", "0.64877117", "0.6369944", "0.6340875", "0.62958735", "0.61882347", "0.6187073", "0.61606777", "0.61595166", "0.6149171", "0.6129727", "0.60915077", "0.60518223", "0.603511", "0.5995741", "0.59910923", "0.59863144", "0.59805197", "0.59643066", "0.5956531", "0.59456605", "0.59340847", "0.5915587", "0.59100014", "0.59035546", "0.5891465", "0.5879406", "0.58764917", "0.58752817", "0.5861", "0.5853638", "0.5844167", "0.58316356", "0.58205026", "0.58001494", "0.57927793", "0.5772817", "0.57724714", "0.5764914", "0.5753272", "0.5745779", "0.5734468", "0.57336605", "0.57331693", "0.57312846", "0.5720801", "0.5703503", "0.5700631", "0.56998044", "0.56776136", "0.56702524", "0.5667893", "0.5664522", "0.5651466", "0.5649482", "0.5644241", "0.5643864", "0.564229", "0.5637816", "0.5637658", "0.5636949", "0.56239897", "0.5623247", "0.56101865", "0.5604063", "0.5597347", "0.55883896", "0.5588076", "0.5582758", "0.5570814", "0.5558749", "0.55538094", "0.5550465", "0.55470127", "0.5542138", "0.55392754", "0.5530789", "0.5525975", "0.5523563", "0.5521047", "0.5513807", "0.55130666", "0.54983467", "0.549684", "0.5483094", "0.54826", "0.54752636", "0.5473922", "0.5473028", "0.54711556", "0.54692817", "0.54626286", "0.5462611", "0.5461183", "0.54608387", "0.5457136", "0.5453562" ]
0.6784795
3
Methode de conversion d'une MAP en Collection
public static <K, T> Collection<T> convertMapToCollection(Map<K, T> map) { // Si la collection est nulle if(map == null) return null; // On retourne l'ensemble return map.values(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void convertitMap(Map<String, Object> map) {\n\t\t\n\t}", "public static <K, T> List<T> convertMapToList(Map<K, T> map) {\r\n\t\t\r\n\t\t// Si la collection est nulle\r\n\t\tif(map == null) return null;\r\n\t\t\r\n\t\t// On retourne l'ensemble\r\n\t\treturn new ArrayList<T>(map.values());\r\n\t}", "public abstract Map<String, Serializable> toMap();", "void writeMap(Collection<?> array);", "public static <K, T> Set<T> convertMapToSet(Map<K, T> map) {\r\n\t\t\r\n\t\t// Si la collection est nulle\r\n\t\tif(map == null) return null;\r\n\t\t\r\n\t\t// On retourne l'ensemble\r\n\t\treturn new HashSet<T>(map.values());\r\n\t}", "public Map toMap(Map<String, Object> map) {\n return super.toMap(map);\n }", "java.util.List<com.sanqing.sca.message.ProtocolDecode.SimpleMap> \n getSimpleMapList();", "private static Object mapValueToJava(Object value) {\n if (value instanceof Map) {\n value = ((Map<?, ?>) value).toMap();\n } else if (value instanceof Sequence) {\n value = ((Sequence<?>) value).toMappedList();\n } else if (value instanceof net.ssehub.easy.instantiation.core.model.vilTypes.Set<?>) {\n value = ((net.ssehub.easy.instantiation.core.model.vilTypes.Set<?>) value).toMappedSet();\n }\n return value;\n }", "Collect getColl();", "ProcessOperation<Map<String, Object>> map();", "private void convert(Map map) {\n if (map == null)\n return;\n\n for (Object key : valueTypes.keySet()) {\n MessagePackObject mpo = (MessagePackObject) map.get(key);\n if (mpo != null)\n map.put(key, mpo.convert(Templates.tNullable(\n TemplateRegistry.lookup(valueTypes.get(key)))));\n }\n\n }", "Map<String, String> asMap();", "protected Map<String, Object> assertMap() {\n if (type == Type.LIST) {\n throw new FlexDataWrongTypeRuntimeException(type, Type.OBJECT); \n }\n if (entryCollectionMap == null) {\n entryCollectionMap = new LinkedHashMap<String, Object>();\n type = Type.OBJECT;\n }\n return entryCollectionMap;\n }", "public interface Converter {\n Map<String,Map<String, Object>> convert(Map<String, Object> doc);\n}", "public static <K, T> Map<K, T> convertCollectionToMap(Collection<T> collection, String keyPropertyName) {\r\n\t\t\r\n\t\t// Si la collection est nulle\r\n\t\tif(collection == null) return null;\r\n\t\t\r\n\t\t// Map a retourner\r\n\t\tMap<K, T> map = new HashMap<K, T>();\r\n\t\t\r\n\t\t// Si la collection est vide\r\n\t\tif(collection.size() == 0) return map;\r\n\t\t\r\n\t\t// Si la propriete cle est vide\r\n\t\tif(keyPropertyName == null || keyPropertyName.trim().length() == 0) \r\n\t\t\tthrow new JPersistenceToolsException(\"NoMapKeyPropertyException.message\");\r\n\t\t\r\n\t\t// Parcours de la collection\r\n\t\tfor (T object : collection) {\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\t\r\n\t\t\t\t// Valeur de la propriete\r\n\t\t\t\tK keyProperty = (K) DAOValidatorHelper.evaluateValueExpression(\"${\" + keyPropertyName + \"}\", object);\r\n\t\t\t\t\r\n\t\t\t\t// Ajout dans la MAP\r\n\t\t\t\tmap.put(keyProperty, object);\r\n\t\t\t\t\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t\r\n\t\t\t\t// On relance\r\n\t\t\t\tthrow new JPersistenceToolsException(\"convertCollectionToMap.error\", e);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// On retourne la MAP\r\n\t\treturn map;\r\n\t}", "public Collection values() {\n return map.values();\n }", "private Map toMap(Scriptable scriptable) {\n \t\tif (scriptable instanceof MapWrapper)\n \t\t\treturn (Map) ((MapWrapper) scriptable).unwrap();\n \t\treturn new MapAdapter(scriptable);\n \t}", "@Nullable\n @SuppressWarnings(\"unchecked\")\n protected Collection createCollection(MappingContext context, Object value) {\n if (value instanceof Iterable<?>) {\n TypeInformation entryType = context.getGenericTypeInfoOrFail(0);\n Collection result = createCollectionMatchingType(context);\n\n int index = 0;\n for (Object entry : (Iterable) value) {\n Object convertedEntry = convertValueForType(context.createChild(\"[\" + index + \"]\", entryType), entry);\n if (convertedEntry == null) {\n context.registerError(\"Cannot convert value at index \" + index);\n } else {\n result.add(convertedEntry);\n }\n }\n return result;\n }\n return null;\n }", "@Override\n\tpublic Collection<V> values() {\n\t\tList<V> list = Util.newList();\n\t\tfor (K key : keys) {\n\t\t\tlist.add(map.get(key));\n\t\t}\n\t\t\n\t\treturn list;\n\t}", "public abstract Map<String, Object> toMap(T object);", "@Override\n public void record2Map(final Map<String, Integer> map) {\n }", "<T, U> Collection<U> map(Collection<T> sources, TypeToken<Collection<U>> destinationTypeToken);", "private MapTransformer(Map map) {\n super();\n iMap = map;\n }", "public Map<String, Collection<V>> asUnmodifiableMap() {\n return Collections.unmodifiableMap(map);\n }", "public Map<T, V> copyData(Map<T, V> map) {\n Map<T, V> newMap = new HashMap<>();\n for (Map.Entry<T, V> entrySet : map.entrySet()) {\n T key = entrySet.getKey();\n V value = entrySet.getValue();\n newMap.put(key, value);\n }\n return newMap;\n }", "public static List convertMapList2BeanList(List<Map> datas,Class a){\n if(null != datas){\n List ret = new ArrayList();\n for(Map m:datas){\n try{\n ret.add(POJOUtil.convertDBMap2POJO(m,a));\n }catch (Exception e){\n log.error(e.getMessage(),e);\n }\n }\n if(ret.size()>0)\n return ret;\n return null;\n }\n return null;\n }", "void mo53966a(HashMap<String, ArrayList<C8514d>> hashMap);", "public interface MapP2P<K, V> {\n\n /** Adds key and value in associative array */\n boolean put(K key, V value);\n\n /** Gets from associative array particular value which associated with received key */\n V get(K key);\n\n /** Removes from associative array particular value which associated with received key */\n V remove(K key);\n\n /** Adds in current map other collection which implements interface MapP2P */\n boolean addAll(MapP2P<K, V> mapP2P);\n\n /** Returns information informing whether the given key is in the collection */\n boolean containsKey(K key);\n\n /** Returns information informing whether the given value is in the collection */\n boolean containsValue(Object value);\n\n /** Returns amount element which stored in the associative array */\n int size();\n\n /** Removes all elements (key-value) from collection */\n void clear();\n\n /** Returns set of nodes which contains key-value */\n Set<Node<K, V>> entrySet();\n\n /** Returns information about whether there are elements on the current associative array */\n boolean isEmpty();\n\n /** Interface for Node that contains key and value */\n interface Node<K, V> {\n /** Returns the key of current node */\n K getKey();\n /** Returns the value of current node */\n V getValue();\n }\n\n /** Performs the given action for each node in this map */\n default void forEach(BiConsumer<? super K, ? super V> action) {\n Objects.requireNonNull(action);\n for (Node<K, V> node : entrySet()) {\n action.accept(node.getKey(), node.getValue());\n }\n }\n\n}", "public Collection<Collection<V>> values() {\n return map.values();\n }", "public Collection<String> valuesOfMap() {\n Map<String, String> tempMap = createSimpleMap(\"Fondue\",\"Cheese\");\n\t\treturn tempMap.values();\n\t}", "@Override\n\tpublic List selectList2(Object map) {\n\t\treturn null;\n\t}", "private static List<ajr> m19375a(Map<String, String> map) {\n if (map == null) {\n return null;\n }\n if (map.isEmpty()) {\n return Collections.emptyList();\n }\n List<ajr> arrayList = new ArrayList(map.size());\n for (Entry entry : map.entrySet()) {\n arrayList.add(new ajr((String) entry.getKey(), (String) entry.getValue()));\n }\n return arrayList;\n }", "public Collection<V> get(K key) {\r\n \treturn map.get(key);\r\n }", "protected abstract Collection createCollection();", "public abstract ArrayList<Key> toArrayList();", "@Override\r\n\tpublic List<Map<String, Object>> list(Map<String, Object> map) {\n\t\treturn dao.list(map);\r\n\t}", "public Map<K, Collection<V>> mo8153a() {\n return super.mo8153a();\n }", "private static List<Department> compute(Collection<Employee> employees) {\n Map<String, Employee> employeeMap = employees.stream().collect(Collectors.toMap(e -> e.getDeptName(), Function.identity(), (old, newOne) -> newOne));\n\n\n// Map<string, dept>\n// getEmp\n// get account\n// check slap\n// construct department\n// put department in List\n\n\nreturn null;\n\n }", "private static List<Project> convertMapToProjects(Multimap<String, File> map)\n throws StreamReadException, DatabindException, IOException {\n\n List<Project> projects = new ArrayList<>();\n\n // For every array of files for a given key\n for (String key : map.keySet()) {\n List<File> files = (List<File>) map.get(key);\n projects.add(new Project(key, files));\n }\n return projects;\n }", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default Map<String, IData> asMap() {\n \n return notSupportedCast(\"IData[string]\");\n }", "protected SafeHashMap.ValuesCollection instantiateValuesCollection()\n {\n return new ValuesCollection();\n }", "Map<String, String> mo14888a();", "public abstract ImmutableCollection<V> A2u(K k);", "private List<Object> serializeActualCollectionMembers(AbstractPersistentCollection collection)\r\n\t{\r\n\t\tList<Object> result = new ArrayList<Object>();\r\n\t\tif (!collection.wasInitialized())\r\n\t\t{\r\n\t\t\tcollection.forceInitialization();\r\n\t\t}\r\n\t\tIterator<Object> itr = collection.entries(null);\r\n\t\twhile (itr.hasNext())\r\n\t\t{\r\n\t\t\tObject next = itr.next();\r\n\t\t\tObject newObj = serialize(next);\r\n\t\t\tresult.add(newObj);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "static Map<Name, ObjectConverter> createConversionMap (final FeatureType input, final FeatureType toConvert) throws NonconvertibleObjectException{\n\n if(input.equals(toConvert)){\n return null;\n }\n final Map<Name, ObjectConverter> map = new HashMap<Name, ObjectConverter>();\n\n for (PropertyDescriptor toConvertDesc : toConvert.getDescriptors()) {\n for(PropertyDescriptor inputDesc : input.getDescriptors()){\n\n //same property name\n if(toConvertDesc.getName().equals(inputDesc.getName())){\n\n final Class inputClass = inputDesc.getType().getBinding();\n final Class toConvertClass = toConvertDesc.getType().getBinding();\n if(toConvertClass.equals(inputClass)){\n //same name and same type\n map.put(toConvertDesc.getName(), null);\n }else{\n //same name but different type\n if(toConvertDesc instanceof GeometryDescriptor){\n map.put(toConvertDesc.getName(), new GeomConverter(toConvertClass, inputClass));\n }else{\n map.put(toConvertDesc.getName(), ConverterRegistry.system().converter(toConvertClass, inputClass));\n }\n }\n }\n }\n }\n return map;\n\n }", "@Override\r\n\tpublic void exportMap() {\n\r\n\t}", "@Override\r\n \tpublic void setMap(Map m) {\n \t\t\r\n \t}", "public HashMap<String, Item> getItemCollection(){\n \tHashMap<String, Item> result = new HashMap<String, Item>(itemCollection);\r\n \treturn result;\r\n }", "public static Object convertMapEntityPathAndValueToDTO(String prefix, Map<String, Object> mapData, Field field) {\n if (null != mapData && null != field) {\n String mappingField = getEntityMappingFieldPath(field);\n if (!StringUtils.isEmpty(prefix)) {\n prefix += Constants.DOT;\n }\n Class<?> fieldType = MappingUtils.getFieldType(field);\n if (validate(fieldType)) {\n if (!ObjectUtils.fieldIsCollection(field)) {\n return convertMapEntityPathAndValueToDTO(prefix + mappingField, mapData, fieldType);\n } else {\n int length = countLengthOfArray(prefix + mappingField, mapData);\n if (length > 0) {\n try {\n @SuppressWarnings(\"unchecked\")\n Collection<Object> collection = ObjectUtils.newInstanceCollection(field.getType());\n for (int i = 0; i < length; i++) {\n Object innerEntity = convertMapEntityPathAndValueToDTO(prefix + mappingField + \"[\" + i + \"]\", mapData, fieldType);\n if (null != innerEntity) {\n collection.add(innerEntity);\n }\n }\n return collection;\n } catch (NoSuchMethodException e) {\n throw new ConstructorInvalidException(\"Cannot new collection instance for field \" + field.getName(), e);\n }\n }\n }\n } else {\n Class<?> fieldConverter = getFieldConverterType(field);\n return convertField(fieldConverter, mapData.get(prefix + mappingField));\n }\n }\n return null;\n }", "public List<Map<String, Object>> funcionarioPorDepartamento(Integer cod_departamento);", "public static Map<String, Object> toMap() {\n return toMap(null);\n }", "void setMap(Map aMap);", "static Set<String> readValueAsSet(Map m, String key) {\n Set<String> result = new HashSet<>();\n Object val = m.get(key);\n if (val == null) {\n if(\"collection\".equals(key)){\n //for collection collection: null means a core admin/ collection admin request\n // otherwise it means a request where collection name is ignored\n return m.containsKey(key) ? singleton((String) null) : singleton(\"*\");\n }\n return null;\n }\n if (val instanceof Collection) {\n Collection list = (Collection) val;\n for (Object o : list) result.add(String.valueOf(o));\n } else if (val instanceof String) {\n result.add((String) val);\n } else {\n throw new RuntimeException(\"Bad value for : \" + key);\n }\n return result.isEmpty() ? null : Collections.unmodifiableSet(result);\n }", "private Map<String, Object> flatten(Map<String, Object> map) {\n\t\tMap<String, Object> result = new LinkedHashMap<>();\n\t\tflatten(null, result, map);\n\t\treturn result;\n\t}", "public Collection<V> get(Object obj) {\n Collection collection = (Collection) Maps.a(this.Pu, obj);\n if (collection == null) {\n return null;\n }\n return AbstractMapBasedMultimap.this.a(obj, collection);\n }", "abstract Collection<Object> mapResultClass(Collection<Object> resultSet);", "Collection<T> getAll() {\n _readLock.lock();\n try {\n return ImmutableList.copyOf(_toMap.values());\n } finally {\n _readLock.unlock();\n }\n }", "public Collection<V> get(String key) {\n return map.get(key);\n }", "public interface DtoConverter<D extends BaseDto, E extends BaseEntity> {\n\n /**\n * Verilen {@link BaseEntity} nesne listesini {@link Set<BaseDto>}'e cevirmektedir.\n *\n * @param entityList {@link BaseEntity} listesi\n * @return Set\n */\n Set<D> convertToDtoSet(Collection<E> entityList);\n\n /**\n * Verilen {@link BaseEntity} nesne listesini {@link List<BaseDto>}'e cevirmektedir.\n *\n * @param entityList {@link BaseEntity} listesi\n * @return List\n */\n List<D> convertToDtoList(Collection<E> entityList);\n\n /**\n * Verilen {@link BaseEntity} nesnesini {@link BaseDto} nesnesine cevirme islemini\n * yapmaktadir.\n *\n * @param entity {@link BaseEntity}\n * @return D\n */\n D convertToDto(E entity);\n}", "public Object[] adapt( Map<String, Object> objs, Object arg );", "@Override\n public Collection<T> values() {\n List<T> values = new ArrayList<>();\n for (Map.Entry<String, T> v : entries.values()) {\n values.add(v.getValue());\n }\n return values;\n }", "public MultiValueMap<String, String> getMap() {\r\n\t\tMultiValueMap<String, String> map = new LinkedMultiValueMap<String, String>();\r\n\t\t\r\n\t\tif(this.country != null) \t\tmap.add(\"country\", this.getCountry().getValue());\r\n\t\tif(this.operation != null) \t\tmap.add(\"operation\", this.getOperation().getValue());\r\n\t\tif(this.propertyType != null) \tmap.add(\"propertyType\", this.getPropertyType().getValue());\r\n\t\tif(this.center != null) \t\tmap.add(\"center\", this.getCenter().getCoordinates());\r\n\t\tif(this.locale != null) \t\tmap.add(\"locale\", this.getLocale().getValue());\r\n\t\tif(this.distance != null) \t\tmap.add(\"distance\", this.getDistance().toString());\r\n\t\tif(this.locationId != null) \tmap.add(\"locationId\", this.getLocationId().getValue());\r\n\t\tif(this.maxItems != null) \t\tmap.add(\"maxItems\", this.getMaxItems().toString());\r\n\t\tif(this.numPage != null) \t\tmap.add(\"numPage\", this.getNumPage().toString());\r\n\t\tif(this.maxPrice != null) \t\tmap.add(\"maxPrice\", this.getMaxPrice().toString());\r\n\t\tif(this.sinceDate != null) \t\tmap.add(\"sinceDate\", this.getSinceDate().getValue());\r\n\t\tif(this.order != null) \t\t\tmap.add(\"order\", this.getOrder().getValue());\r\n\t\tif(this.sort != null) \t\t\tmap.add(\"sort\", this.getSort().getValue());\r\n\t\tif(this.adIds != null) {\r\n\t\t\tfor(Integer id: adIds) {\r\n\t\t\t\tmap.add(\"adIds\", id.toString());\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.hasMultimedia != null) \tmap.add(\"hasMultimedia\", this.getHasMultimedia().toString());\r\n\t\t\r\n\t\treturn map;\r\n\t}", "public final List<TimeKey> mo13029a(Map<String, ? extends Map<String, String>> map) {\n ArrayList arrayList = new ArrayList(map.size());\n for (Map.Entry next : map.entrySet()) {\n Map map2 = (Map) next.getValue();\n Object obj = map2.get(\"encrypted_mobile_id\");\n if (obj != null) {\n String str = (String) obj;\n Object obj2 = map2.get(\"fromDate\");\n if (obj2 != null) {\n long roundToLong = MathKt.roundToLong(((Double) obj2).doubleValue());\n Object obj3 = map2.get(\"tillDate\");\n if (obj3 != null) {\n arrayList.add(new TimeKey((String) next.getKey(), str, TimeKey.DEFAULT_NAME, roundToLong, MathKt.roundToLong(((Double) obj3).doubleValue()), 0, 32, (DefaultConstructorMarker) null));\n } else {\n throw new NullPointerException(\"null cannot be cast to non-null type kotlin.Double\");\n }\n } else {\n throw new NullPointerException(\"null cannot be cast to non-null type kotlin.Double\");\n }\n } else {\n throw new NullPointerException(\"null cannot be cast to non-null type kotlin.String\");\n }\n }\n return arrayList;\n }", "@Override\n\tpublic Map<String, Object> serch(Pageable pageble,\n\t\t\tMap<String, String> map) {\n\t\tif (pageble == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tMap<String, Object> resultMap = new HashMap<String, Object>();\n\t\tPage<Project> page = projRrep.serch(pageble, map);\n\t\tif (page != null) {\n\t\t\tList<Project> list = page.getContent();\n\t\t\tint pageSize = page.getTotalPages();\n\t\t\tresultMap.put(\"content\", list);\n\t\t\tresultMap.put(\"rows\", pageSize);\n\n\t\t\treturn resultMap;\n\t\t}\n\n\t\treturn null;\n\n\t}", "public Map<String, List<Object>> getDCModelMap(){\n\t\tDBCollection dcModel = db.getCollection(\"dcModel\");\n\t\tMap<String, List<Object>> varModelMap = new HashMap<String, List<Object>>();\n \tDBCursor varModelCursor = dcModel.find();\n \tfor(DBObject varModelObj: varModelCursor) {\n \t\tvarModelMap.put((String) varModelObj.get(\"v\"), (List<Object>) varModelObj.get(\"m\")); \t\t\n \t}\n \treturn varModelMap;\n\t}", "java.lang.String getCollection();", "@Override\n public Stream<ImList<String>> export() {\n return map.entrySet().stream().flatMap(me -> {\n final ImList<String> key = me.getKey().export();\n return me.getValue().stream().map(cal -> key.append(cal.export()));\n });\n }", "public static void convertRsToMap(ResultSet rs,Map<String,Object> map) throws SQLException{\n\t\tResultSetMetaData rsMeta = rs.getMetaData();\r\n\t\tint columnCount = rsMeta.getColumnCount();\r\n\t\t\r\n\t\tfor(int i = 1; i <= columnCount; i++){\r\n\t\t\tString key = rsMeta.getColumnLabel(i).toLowerCase();\r\n\t\t\t\r\n\t\t\tObject value = rs.getObject(key);\r\n\t\t\t\r\n\t\t\t//if(value instanceof oracle.sql.DATE){\r\n\t\t\t//\tvalue = new java.sql.Date(((oracle.sql.DATE)value).timestampValue().getTime());\r\n\t\t\t//}else if(value instanceof oracle.sql.TIMESTAMP){\r\n\t\t\t//\tvalue = new java.sql.Timestamp(((oracle.sql.TIMESTAMP)value).timestampValue().getTime());\r\n\t\t\t//}\r\n\t\t\t\r\n\t\t\tmap.put(key, value);\r\n\t\t}\r\n\t}", "private Map<String, String> m15124a(Map<String, String> map) {\n String str;\n String str2;\n HashMap hashMap = new HashMap();\n if (map != null) {\n for (Entry entry : map.entrySet()) {\n Object key = entry.getKey();\n Object value = entry.getValue();\n if (!(key instanceof String) || !(value instanceof String)) {\n C7262l b = this.f13489a.mo23049b();\n StringBuilder sb = new StringBuilder();\n sb.append(\"Unexpected class type in trackEvent(); all keys and values passed as parameters must be String. Encountered \");\n sb.append(key.getClass().getCanonicalName());\n sb.append(\"/\");\n sb.append(value.getClass().getCanonicalName());\n sb.append(\"; will use toString() value instead, which may be unexpected...\");\n b.mo22913a(\"EventServiceImpl\", sb.toString());\n str = key.toString();\n str2 = value.toString();\n } else {\n str = (String) key;\n str2 = (String) value;\n }\n hashMap.put(str, str2);\n }\n }\n return hashMap;\n }", "public List<Map<String, Object>> getKeYuanList(Map<String, Object> map);", "public static <\n K,\n V> void addToCollectionMap(K key, V valueToAdd, Map<K, Collection<V>> map) {\n if (key != null && valueToAdd != null && map != null) {\n map.computeIfAbsent(key, Suppliers.asFunction(ArrayList::new)).add(valueToAdd);\n }\n }", "public <K> Map<K, JAVATYPE> convertMap(Map<K, JAVATYPE> oldMap, final METATYPE meta);", "public void verifyMap() {\r\n // TODO: implement test to ensure that map is the same as confirmed if\r\n // its values were converted into collections.\r\n }", "@Deprecated\r\n\t\tpublic MappedConverter(final List<T> col) {\r\n\t\t\tmap = new HashMap<Long, T>(col.size());\r\n\t\t\tfor (T entity: col) {\r\n\t\t\t\tmap.put(entity.getId(), entity);\r\n\t\t\t}\r\n\t\t}", "public StringDt getMapElement() { \n\t\tif (myMap == null) {\n\t\t\tmyMap = new StringDt();\n\t\t}\n\t\treturn myMap;\n\t}", "protected SortedMap getSortedMap() {\n/* 65 */ return (SortedMap)this.map;\n/* */ }", "private JsonObject convertMapToJson(Map<String,String> entry){\r\n\t\tJsonObject jsonObj = new JsonObject();\r\n\t\tSet<String> keySet = entry.keySet();\r\n\t\t\r\n\t\tfor(String key : keySet){\r\n\t\t\tjsonObj.addProperty(key, entry.get(key));\r\n\t\t}\r\n\t\treturn jsonObj;\r\n\t}", "private XmlElement toXmlDict(Map<String, Object> map)\n {\n XmlElement dict = new XmlElement(\"dict\");\n for (Map.Entry<String, Object> entry : map.entrySet())\n {\n dict.add(new XmlElement(\"key\", entry.getKey()));\n dict.add(objectToXml(entry.getValue()));\n }\n return dict;\n }", "public void testElementMapWithConverterType() {\n ElementMapWithConverterTypeTestDTO obj = new ElementMapWithConverterTypeTestDTO();\n obj.map = new HashMap<Date, BigDecimal>();\n obj.map.put(getDateForConverter(\"28.02.2007:15:21:27\"), new BigDecimal(3.14));\n obj.map.put(getDateForConverter(\"01.03.2007:15:21:27\"), new BigDecimal(0.815));\n assertTrue(JSefaTestUtil.serialize(XML, obj).indexOf(\"2007-02-28T15:21:27.000Z\") >= 0);\n assertTrue(JSefaTestUtil.serialize(XML, obj).indexOf(\"2007-03-01T15:21:27.000Z\") >= 0);\n }", "static Object[] m59445a(Collection<?> collection) {\n return m59444a((Iterable<?>) collection, new Object[collection.size()]);\n }", "private PropertyValues handleMapType(String path,MutablePropertyValues values,Object data,Method method,int level){\n\t\tClass<?> eleType=GenericCollectionTypeResolver.getMapValueReturnType(method,level);\t\n\t\t\n\t\tif(null==eleType){\n\t\t\treturn values;\n\t\t}\n\t\tif(data instanceof Map<?, ?>){\n\t\t\tMap<?,?> dataMap=(Map<?, ?>) data;\n\t\t\tfor(Map.Entry<?, ?> entry:dataMap.entrySet()){\n\t\t\t\tString key=entry.getKey().toString();\n\t\t\t\tObject value=entry.getValue();\n\t\t\t\tString subPath=path+PropertyAccessor.PROPERTY_KEY_PREFIX+key+PropertyAccessor.PROPERTY_KEY_SUFFIX; \n\t\t\t\tvalues.addPropertyValues(resolve(subPath,value,eleType,method,level+1));\n\t\t\t}\n\t\t}\n\t\treturn values;\n\t}", "Collection getData();", "protected Map<String,List<PageViewVO>> initializePageMap() {\n\t\tMap<String,List<PageViewVO>> pm = new HashMap<>();\n\t\tfor (Section sect : Section.values()) {\n\t\t\tpm.put(sect.name(), new ArrayList<>());\n\t\t}\n\t\treturn pm;\n\t}", "public Collection<CartItem> getCartItems(){\t\t\n\t\treturn map.values();\n\t}", "@SuppressWarnings(\"unchecked\")\n private <T> List<Binding<T>> getFromMap(TypeLiteral<T> type) {\n return (List<Binding<T>>) map.get(type);\n }", "HashMap<String, Object[]> getUbicaciones();", "private static Set<FieldGroup> findGroupsFromMap(Map<Field, List<Field>> map) {\n if (map.isEmpty()) {\n return new HashSet<>();\n }\n\n Map<Field, List<Field>> copiedMap = new HashMap<>(map);\n\n Set<Field> fields = findGroup(SetUtils.firstIteratorElement(copiedMap.keySet()), copiedMap);\n\n copiedMap.keySet().removeAll(fields);\n copiedMap.values().forEach(fieldList -> fieldList.removeAll(fields));\n\n FieldGroup converted = new FieldGroup(new ArrayList<>(fields));\n Set<FieldGroup> result = findGroupsFromMap(copiedMap);\n result.add(converted);\n return result;\n }", "public interface DataConverter<JAVATYPE,METATYPE extends FieldDefinition> {\n /** Method invoked for a single JAVATYPE */\n JAVATYPE convert(JAVATYPE oldValue, final METATYPE meta);\n\n /** Method invoked for a JAVATYPE List. This can be used to alter the list length / add / remove elements after processing.\n * Please note that the converter is only invoked on the list itself, not on the individual elements. */\n List <JAVATYPE> convertList(List<JAVATYPE> oldList, final METATYPE meta);\n\n /** Method invoked for a JAVATYPE Set. This can be used to alter the set size / add / remove elements after processing.\n * Please note that the converter is only invoked on the list itself, not on the individual elements. */\n Set <JAVATYPE> convertSet(Set<JAVATYPE> oldSet, final METATYPE meta);\n\n /** Method invoked for an array of JAVATYPEs. This can be used to alter the list length / add / remove elements after processing.\n * Please note that the converter is only invoked on the array itself, not on the individual elements. */\n JAVATYPE [] convertArray(JAVATYPE [] oldArray, final METATYPE meta);\n\n /** Map-type methods. The tree walker converses the value parts of the map only. */\n public <K> Map<K, JAVATYPE> convertMap(Map<K, JAVATYPE> oldMap, final METATYPE meta);\n}", "public static void test2(Map<Object,Object> map) \n\t{\n\t\tprint(map.getClass().getSimpleName()+\"~~~~~~~~~~~~\");\n\t\tmap.putAll(new CountingMapData(25));\n\t\t// Map has 'Set' behavior for keys:\n\t\tmap.putAll(new CountingMapData(25));\n\t\tprintKeys2(map);\n\t\t// Producing a collection of the values:\n\t\tprintnb(\"Values: \");\n\t\tprint(map.values());\n\t\tprint(map);\n\t\tprint(\"map.containsKey(11): \" + map.containsKey(11));\n\t\tprint(\"map.get(11): \" + map.get(11));\n\t\tprint(\"map.containsValue(\\\"F0\\\"): \" + map.containsValue(\"F0\"));\n\t\tObject key = map.keySet().iterator().next();\n\t\tprint(\"First key in map: \" + key);\n\t\tmap.remove(key);\n\t\tprintKeys2(map);\n\t\tmap.clear();\n\t\tprint(\"map.isEmpty(): \" + map.isEmpty());\n\t\tmap.putAll(new CountingMapData(25));\n\t\t// Operations on the Set change the Map:\n\t\tmap.keySet().removeAll(map.keySet());\n\t\tprint(\"map.isEmpty(): \" + map.isEmpty());\n\t}", "@Override\n\tpublic Collection<Eleve> findAll() {\n\t\treturn map.values();\n\t}", "private static void m33656a(Collection<Fragment> collection, Map<View, Fragment> map) {\n if (collection != null) {\n for (Fragment fragment : collection) {\n if (!(fragment == null || fragment.getView() == null)) {\n map.put(fragment.getView(), fragment);\n m33656a((Collection<Fragment>) fragment.getChildFragmentManager().mo3159e(), map);\n }\n }\n }\n }", "String getCollection();", "@Override\n public boolean canConvert(Class type) {\n return AbstractMap.class.isAssignableFrom(type);\n }", "private PairDTO[] convertMapToArray(Map<String, String> claims) {\n PairDTO[] pairs = new PairDTO[claims.size()];\n Iterator iterator = claims.entrySet().iterator();\n int i = 0;\n while (iterator.hasNext()) {\n Map.Entry entry = (Map.Entry) iterator.next();\n PairDTO pair = new PairDTO();\n pair.setKey((String) entry.getKey());\n pair.setValue((String) entry.getValue());\n pairs[i] = pair;\n i++;\n }\n\n return pairs;\n }", "public static void main(String[] args) {\n //Generic Version of Collection\n ArrayList<String> arrayList = new ArrayList<>();\n arrayList.add(\"Deepak\");\n arrayList.add(\"Kumar\");\n arrayList.add(\"Hello\");\n arrayList.add(\"Sandeep\");\n System.out.println(\"Collection Before Array Conversion=\" + arrayList);\n String[] names = new String[arrayList.size()];\n arrayList.toArray(names);\n System.out.println(\"Array After Conversion From Collection\");\n for (int i = 0; i < names.length; i++) {\n System.out.println(names[i]);\n }\n //Collection Normal Version\n ArrayList arrayList1 = new ArrayList<>();\n arrayList1.add(\"Deepak\");\n arrayList1.add('a');\n arrayList1.add(1);\n arrayList1.add(10.9f);\n arrayList1.add(10.90);\n arrayList1.add(true);\n\n\n System.out.println(\"Normal Colection without Conversion\"+arrayList1);\n Object[] object = arrayList1.toArray();\n\n System.out.println(\"Array After Conversion From Normal Collection\");\n for (int i = 0; i < object.length; i++) {\n System.out.println(object[i]);\n }\n\n ///Array to Collection Conversion\n String[] names1 = new String[]{\"Deepak\",\"Kuldeep\",\"Sandeep\",\"Pardeep\"};\n ArrayList<String> namesCollection = new ArrayList(Arrays.asList(names1));\n System.out.println(namesCollection);\n\n\n }", "private Map<String, String> toMap(final Attributes atts) {\r\n\t\tfinal Map<String, String> values = Maps.newLinkedHashMap();\r\n\t\t\r\n\t\tfor (int index = 0; index < atts.getLength(); index++) {\r\n\t\t\tvalues.put(atts.getLocalName(index), atts.getValue(index));\r\n\t\t}\r\n\t\t\r\n\t\treturn values;\r\n\t}", "MAP createMAP();", "public IdMap() {\n\t\tthis.add(new TextItems());\n\t\tthis.add(new DateTimeEntity());\n\t\tthis.add(EntityCreator.createJson(false));\n\t\tthis.add(EntityCreator.createJson(true));\n\t\tthis.add(new ObjectMapEntry());\n\t\tthis.add(EntityCreator.createXML());\n\t}", "private static void createTypeMap() {\n\n }", "public Collection<V> put(K key, V value) {\r\n\r\n \tCollection<V> values = map.get(key);\r\n\r\n if (values == null) {\r\n \tvalues = newCollection();\r\n \tvalues.add(value);\r\n map.put(key, values);\r\n }\r\n else {\r\n \tvalues.add(value);\r\n }\r\n\r\n return values;\r\n }" ]
[ "0.7241683", "0.6559094", "0.63206893", "0.62275505", "0.6218107", "0.62156177", "0.6166329", "0.6091622", "0.6073234", "0.603838", "0.6030244", "0.58902705", "0.5854764", "0.585461", "0.584727", "0.58174324", "0.581419", "0.5765937", "0.5749949", "0.5740025", "0.5667473", "0.56588316", "0.5655881", "0.56543875", "0.5644702", "0.5643969", "0.5636964", "0.56262964", "0.5611498", "0.5605612", "0.5602498", "0.5582044", "0.5581929", "0.55498445", "0.55416226", "0.55323726", "0.55185014", "0.5508127", "0.5506592", "0.5501307", "0.54996705", "0.54964453", "0.54958075", "0.54881173", "0.54628825", "0.546155", "0.54541695", "0.54440033", "0.54286593", "0.541308", "0.54075986", "0.5406016", "0.5405242", "0.5404396", "0.53945243", "0.5385", "0.5383875", "0.53754956", "0.5350562", "0.5349105", "0.53476214", "0.53454983", "0.53438586", "0.5342552", "0.53367543", "0.533667", "0.53200537", "0.5318621", "0.53148884", "0.53049463", "0.5294841", "0.52856183", "0.52695644", "0.5267463", "0.5266096", "0.5260631", "0.525728", "0.52560073", "0.5246436", "0.5245764", "0.52428824", "0.5234986", "0.52302057", "0.52230054", "0.52183855", "0.5211152", "0.52106297", "0.5210431", "0.5198518", "0.51920897", "0.51908803", "0.51830626", "0.51774347", "0.5173144", "0.5172132", "0.5166507", "0.51645905", "0.51379454", "0.5135569", "0.51251876" ]
0.7375046
0