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 |
---|---|---|---|---|---|---|
!wca! get selectedItem: ?Object When multi is false, this is the currently selected item, or null if no item is selected.
|
@Nullable
public T getSelectedItem() {
return SerDes.unmirror(getElement().getSelectedItem(), getItemClass());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public ItemT getSelectedItem() {\n return selectedItem;\n }",
"public Item getSelectedItem() {\n return this.itemList.getSelectedValue();\n }",
"public Gnome getSelectedItem() {\n return selectedItem;\n }",
"public BrowseItem getSelectedItem()\r\n\t{\r\n\t\treturn this.selectedItem;\r\n\t}",
"public Item getSelectedItem() { return this.getSelectedSlot().getMappedItem(); }",
"@Override\r\n protected TreeItem getSelectedItem() {\r\n return getSelectionModel().getSelectedItem();\r\n }",
"public AbstractListItem getSelectedItem() {\n for (int i = 0; i < getWidgetCount(); i++) {\n Widget item = getWidget(i);\n\n if (item instanceof AbstractListItem && ((AbstractListItem) item).isActive()) {\n return (AbstractListItem) item;\n }\n }\n return null;\n }",
"public String getSelectedItem() {\n if (selectedPosition != -1) {\n Toast.makeText(activity, \"Selected Item : \" + list.get(selectedPosition), Toast.LENGTH_SHORT).show();\n return list.get(selectedPosition);\n }\n return \"\";\n }",
"public boolean getSelected()\n {\n return selected; \n }",
"public T getSelectedItem() {\n\t\tT selectedItem = null;\n\t\tint position = spinner.getSelectedItemPosition();\n\t\tif(position >= 0) {\n\t\t\tselectedItem = adapter.getItem(position);\n\t\t}\n\t\treturn selectedItem;\n\t}",
"public int getSelectedItem() {\n return mSelectedItem;\n }",
"public CTabItem getSelection() {\n checkWidget();\n CTabItem result = null;\n if( selectedIndex != -1 ) {\n result = ( CTabItem )itemHolder.getItem( selectedIndex );\n }\n return result;\n }",
"public ObservableValue<T> selectedItem() {\n return createObservableValue(this::getSelectedItem, this::setSelectedItem, \"selected-item-changed\");\n }",
"public int getSelected() {\n \t\treturn selected;\n \t}",
"public TreeItem getSelectedItem();",
"public Axiom getSelected() {\r\n\treturn view.getSelected();\r\n }",
"public String getSelected()\n\t{\n\t\treturn _current.ID;\n\t}",
"public Object getSelectedObject() {\n return (String) itsCombo.getSelectedItem();\n }",
"public T getSelectedOption() {\n return selectedIndex == -1 ? null : options.get(selectedIndex);\n }",
"public native MenuItem getSelectedItem();",
"IProductInfo getM_piSelectedItem();",
"public BooleanProperty getSelected() {\n return selected;\n }",
"public Object getSelection() {\n return selection;\n }",
"public String getSelected ()\n {\n return ((GroupItem)gbox.getSelectedItem()).getSelected();\n }",
"public int getSelectedId() {\n return selectedId;\n }",
"public List<T> getSelected() {\n Unknown selected = getElement().getSelected();\n if (isMulti()) {\n return SerDes.unmirrorList(selected.<Mirrored<List<T>>>cast(), getItemClass());\n } else {\n return Collections.singletonList(SerDes.unmirror(selected.cast(), getItemClass()));\n }\n }",
"public R getSingleSelection()\r\n {\r\n final ListSelectionModel lsm = jTable.getSelectionModel();\r\n if( lsm.isSelectionEmpty() == false )\r\n {\r\n final int row = lsm.getLeadSelectionIndex(); // or use .getJTable().getSelectedRow() for single or lsm.isSelectedIndex() for multiple selection\r\n if( row != Util.INVALID_INDEX )\r\n {\r\n final int xlatedRow = jTable.convertRowIndexToModel( row ); // has to be done with auto-sorter\r\n return provideRow( xlatedRow );\r\n }\r\n }\r\n\r\n return null;\r\n }",
"public void itemSelected(boolean selected);",
"public S getSelected()\n\t\t{\n\t\t\treturn newValue;\n\t\t}",
"public String getSelected()\r\n {\r\n if (selectedIndex == -1)\r\n return null;\r\n \r\n return towerTypes[selectedIndex];\r\n }",
"public IEntry getSelectedEntry()\n {\n return selectedEntry;\n }",
"private String getSelectedString() {\n\t\treturn menuItem[selectedIndex];\r\n\t}",
"public boolean isSelected() { return selected; }",
"@Nullable String pickItem();",
"public Ward getSelected() {\n\t\treturn table.getSelectionModel().getSelectedItem();\n\t}",
"@NonNull\n public SparseBooleanArray getSelectedItems() {\n return selectedItems;\n }",
"public boolean isSelected()\n {\n return selected;\n }",
"public boolean getSelectedValue() {\r\n\treturn this.selectedValue;\r\n }",
"public String getSelectedItem() {\n return (String) itsCombo.getSelectedItem();\n }",
"public boolean isSelected() {\r\n return selected;\r\n }",
"public ImageFlowItem getSelectedValue()\r\n {\r\n if (getAvatars() == null || getAvatars().isEmpty() || getSelectedIndex() >= getAvatars().size() || getSelectedIndex() < 0)\r\n {\r\n return null;\r\n }\r\n\r\n return getAvatars().get(getSelectedIndex());\r\n }",
"public boolean isSelected() \n {\n return selected;\n }",
"public boolean isSelected()\n\t{\n\t\treturn selected;\n\t}",
"public AUndertaking getSelectedTask()\n {\n String errorMsg;\n Iterator<AUndertaking> taskIt = getSelectedTaskIterator();\n\n if (taskIt.hasNext()) {\n AUndertaking selectedTask = taskIt.next();\n\n if (! taskIt.hasNext()) {\n return selectedTask;\n }\n\n errorMsg = \"Selection is multiple\";\n }\n else {\n errorMsg = \"Nothing is selected\";\n }\n\n throw new IllegalStateException(errorMsg);\n }",
"public boolean isSelected() {\r\n\t\treturn selected;\r\n\t}",
"public E getSelected() {\n ButtonModel selection = selectedModelRef.get();\n //noinspection UseOfSystemOutOrSystemErr\n final String actionCommand = selection.getActionCommand();\n //noinspection HardCodedStringLiteral,UseOfSystemOutOrSystemErr\n return Objects.requireNonNull(textMap.get(actionCommand));\n }",
"public boolean isSelected() {\n\t\treturn selected;\n\t}",
"public boolean isSelected() {\n\t\treturn selected;\n\t}",
"public boolean isSelected() {\n \t\treturn selected;\n \t}",
"public boolean getIsSelected() {\n return this.isSelected;\n }",
"public boolean isSelected(){\r\n return selected;\r\n }",
"public Boolean getIsselected() {\n return isselected;\n }",
"public Boolean getIsselected() {\n return isselected;\n }",
"public Object getSelectedKey()\n\t{\n\t\tif ( m_results.size() == 0)\n\t\t\treturn null;\n\t\treturn m_results.get(0);\n\t}",
"public Cell getSelectedCell() {\n return selectedCell;\n }",
"public boolean isSelected() {\n\t\treturn iAmSelected;\n\t}",
"public List<F> getSelected() {\n return selected;\n }",
"Object getSelection();",
"public MovieItem getMovieSelected(){\n //return movie item data\n return mMovie;\n }",
"public T getSelectedEntity() {\n return selectedEntity;\n }",
"public TabItem [] getSelection () {\r\n\tcheckWidget();\r\n\tint index = getSelectionIndex ();\r\n\tif (index == -1) return new TabItem [0];\r\n\treturn new TabItem [] {items [index]};\r\n}",
"@Override\n\tpublic Object getSelection() {\n\t\tObject value = null;\n\t\tif (selectionNode instanceof Selectable) {\n\t\t\tvalue = ((Selectable) selectionNode).getSelection();\n\t\t}\n\t\treturn value;\n\t}",
"@Override\r\n\tpublic String[] getSelected() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String[] getSelected() {\n\t\treturn null;\r\n\t}",
"public LiveData<Recipe> getSelected() {\n return repository.get(selectedId);\n }",
"public void setSelectedItem(Gnome selectedItem) {\n this.selectedItem = selectedItem;\n }",
"public OptionEntry getSelectedOption() {\n for (Iterator it=getEntries().iterator();it.hasNext();) {\n OptionEntry o=(OptionEntry)it.next();\n if (o.getValue().getBoolean()==true) {\n return o;\n }\n }\n return null;\n\n }",
"public String getSelectedValue() {\r\n\t\treturn selectedValue;\r\n\t}",
"public boolean isSelected() { \n \treturn selection != null; \n }",
"public Category getSelectedCategory() {\r\n Category selected = getSelectedItem();\r\n\r\n return selected == emptyCategory ? null : selected;\r\n }",
"public void setSelectedItem(int selectedItem) {\n setSelectedItem(selectedItem, true);\n }",
"public int getSelectedIndex() {\n return selectedIndex;\n }",
"public int getSelection() {\n \tcheckWidget();\n \treturn selection;\n }",
"public TabItem[] getSelection() {\n checkWidget();\n int index = OS.SendMessage(handle, OS.TCM_GETCURSEL, 0, 0);\n if (index == -1)\n return new TabItem[0];\n return new TabItem[] { items[index] };\n }",
"public String getCurrentItem() {\n\t\treturn currentItem;\n\t}",
"public boolean isSelected(T item) {\n return getElement().isSelected(SerDes.mirror(item));\n }",
"public Patient getSelectedPatient(){\n return (Patient)DoctorCreatePerscriptionPatientSelector.getSelectedItem();\n }",
"public Selection getSelection() {\n return mSelection;\n }",
"public void setSelectedItem(ItemT item) {\n selectedItem = item;\n onSelectedItemChanged();\n }",
"protected abstract Optional<T> getSingleSelection();",
"private ItemSlot getSelectedSlot() {\n\t\tfor(ItemSlot slot : itemSlots) {\n\t\t\tif((slot.getCoordX() == selectedSlotPosX) && (slot.getCoordY() == selectedSlotPosY)) {\n\t\t\t\treturn slot;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public String getMySelection() {\n return mySelection;\n }",
"public ch.ivyteam.ivy.security.IUser getSelectedUser()\n {\n return selectedUser;\n }",
"private IssuePost getSingleSelectedRow() {\n ListSelectionModel selectionModel = table.getSelectionModel();\n int selectedIndex = selectionModel.getLeadSelectionIndex();\n if (selectedIndex != NOT_SELECTED) {\n return table.getRowData(selectedIndex);\n }\n return null;\n }",
"private long getSelectedIndex() {\r\n if (selection != null && selection.getKeys().hasNext()) {\r\n return new Long((Integer) selection.getKeys().next());\r\n } else {\r\n return selectedRowId;\r\n }\r\n }",
"public static IProject getSelectedProject() {\n\t\tIProject activeProject = null;\n\t\tIWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();\n\t\tISelectionService selectionService = window.getSelectionService();\n\t\tISelection selection = selectionService.getSelection(IPageLayout.ID_PROJECT_EXPLORER);\n\t\tif (selection instanceof StructuredSelection) {\n\t\t\tIResource resource = (IResource) ((StructuredSelection) selection).getFirstElement();\n\t\t\tactiveProject = resource.getProject();\n\t\t}\n\t\t\n\t\treturn activeProject;\n\t}",
"@Override\r\n\tpublic ISelection getSelection() {\r\n\t\t//$TODO when could this even happen?\r\n\t\tif (getViewer() == null)\r\n\t\t\treturn StructuredSelection.EMPTY;\r\n\t\treturn getViewer().getSelection();\r\n\t}",
"public online.food.ordering.Food getSelectedFood()\n {\n return selectedFood;\n }",
"protected ItemBO getSelectedInventoryForAnItem(final ItemBO anItem) {\n\t\tif (!isPartFoundInMultipleLocations(anItem)) {\n\t\t\tanItem.setInventory(shortListRelevantInventory(anItem));\n\t\t\tanItem.setAdditionalInventory(new ArrayList<InventoryBO>());\n\t\t}\n\t\t\n\t\treturn anItem;\n\t}",
"public JCommandToggleButton getSelectedButton() {\n return this.buttonSelectionGroup.getSelected();\n }",
"public T getSelection() {\n ButtonModel selected = buttonGroup.getSelection();\n if (selected == null) {\n return null;\n }\n T key = modelToKeyMap.get(selected);\n if (key == null) {\n throw new IllegalArgumentException(\"Key not found for selected radio button: \" + selected);\n }\n return (key != NULL ? key : null);\n }",
"public void setSelectedItem(BrowseItem selectedItem)\r\n\t{\r\n\t\tthis.selectedItem = selectedItem;\r\n\t}",
"protected ARXNode getSelectedNode() {\n return this.selectedNode;\n }",
"public Posto select(int rowSelected) {\n return postos.get(rowSelected);\n }",
"public boolean isSelected()\n {\n\treturn _isSelected;\n }",
"public Piece firstSelected()\n {\n return firstSelected;\n }",
"public String getSelectedId() {\n OptionEntry o=getSelectedOption();\n if (o!=null) {\n return o.getId();\n } else {\n return null;\n }\n\n }",
"public Combustivel select(int rowSelected) {\n return combs.get(rowSelected);\n }",
"private PR1Model.Shape getSelection() { return selection.get(); }",
"public int getSelectedPosition() {\n return mLayoutManager.getSelection();\n }"
] |
[
"0.79104507",
"0.7614793",
"0.7507227",
"0.7349818",
"0.73128575",
"0.71656466",
"0.7155736",
"0.71177316",
"0.70929843",
"0.7062548",
"0.7055318",
"0.70493716",
"0.70039964",
"0.6935276",
"0.6881236",
"0.6815789",
"0.6783031",
"0.67637855",
"0.67342305",
"0.67193544",
"0.6672036",
"0.66699135",
"0.6657303",
"0.6612924",
"0.6574408",
"0.6557484",
"0.6555947",
"0.6550322",
"0.65277475",
"0.64614326",
"0.6437068",
"0.6423411",
"0.6415323",
"0.6413271",
"0.6408638",
"0.6396942",
"0.6374654",
"0.637083",
"0.6364908",
"0.6339528",
"0.6328126",
"0.6324311",
"0.6315716",
"0.6285911",
"0.627955",
"0.62448794",
"0.6239451",
"0.6239451",
"0.62362593",
"0.6232382",
"0.6231001",
"0.62293524",
"0.62293524",
"0.62268144",
"0.62246364",
"0.62198824",
"0.6216909",
"0.62138146",
"0.62128377",
"0.6187929",
"0.61736465",
"0.61616623",
"0.61516577",
"0.61516577",
"0.6148723",
"0.6140564",
"0.6125857",
"0.61176234",
"0.6112442",
"0.61111844",
"0.61011034",
"0.60797524",
"0.60747355",
"0.607336",
"0.6072011",
"0.60676694",
"0.6067649",
"0.6050844",
"0.6042273",
"0.6028047",
"0.60223275",
"0.6017109",
"0.5994836",
"0.5972712",
"0.59397376",
"0.5929485",
"0.5925562",
"0.5921438",
"0.59090316",
"0.59086585",
"0.58920527",
"0.58902186",
"0.5889549",
"0.5880424",
"0.587004",
"0.5866343",
"0.5859989",
"0.58422774",
"0.58234817",
"0.5819919"
] |
0.7204258
|
5
|
!wca! set selectedItem: ?Object When multi is false, this is the currently selected item, or null if no item is selected.
|
public void setSelectedItem(T value) {
getElement().setSelectedItem(SerDes.mirror(value));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public ItemT getSelectedItem() {\n return selectedItem;\n }",
"public Gnome getSelectedItem() {\n return selectedItem;\n }",
"public Item getSelectedItem() {\n return this.itemList.getSelectedValue();\n }",
"@Override\r\n protected TreeItem getSelectedItem() {\r\n return getSelectionModel().getSelectedItem();\r\n }",
"public Item getSelectedItem() { return this.getSelectedSlot().getMappedItem(); }",
"public void itemSelected(boolean selected);",
"public BrowseItem getSelectedItem()\r\n\t{\r\n\t\treturn this.selectedItem;\r\n\t}",
"public void setSelectedItem(int selectedItem) {\n setSelectedItem(selectedItem, true);\n }",
"public boolean getSelected()\n {\n return selected; \n }",
"public void setSelectedItem(Gnome selectedItem) {\n this.selectedItem = selectedItem;\n }",
"public int getSelectedItem() {\n return mSelectedItem;\n }",
"public ObservableValue<T> selectedItem() {\n return createObservableValue(this::getSelectedItem, this::setSelectedItem, \"selected-item-changed\");\n }",
"public void setSelectedItem(ItemT item) {\n selectedItem = item;\n onSelectedItemChanged();\n }",
"public AbstractListItem getSelectedItem() {\n for (int i = 0; i < getWidgetCount(); i++) {\n Widget item = getWidget(i);\n\n if (item instanceof AbstractListItem && ((AbstractListItem) item).isActive()) {\n return (AbstractListItem) item;\n }\n }\n return null;\n }",
"@Nullable\n public T getSelectedItem() {\n return SerDes.unmirror(getElement().getSelectedItem(), getItemClass());\n }",
"public int getSelected() {\n \t\treturn selected;\n \t}",
"public boolean isSelected() { return selected; }",
"public String getSelectedItem() {\n if (selectedPosition != -1) {\n Toast.makeText(activity, \"Selected Item : \" + list.get(selectedPosition), Toast.LENGTH_SHORT).show();\n return list.get(selectedPosition);\n }\n return \"\";\n }",
"@NonNull\n public SparseBooleanArray getSelectedItems() {\n return selectedItems;\n }",
"public void setSelectedItem(BrowseItem selectedItem)\r\n\t{\r\n\t\tthis.selectedItem = selectedItem;\r\n\t}",
"public CTabItem getSelection() {\n checkWidget();\n CTabItem result = null;\n if( selectedIndex != -1 ) {\n result = ( CTabItem )itemHolder.getItem( selectedIndex );\n }\n return result;\n }",
"public BooleanProperty getSelected() {\n return selected;\n }",
"public boolean isSelected()\n {\n return selected;\n }",
"public TreeItem getSelectedItem();",
"public boolean isSelected() \n {\n return selected;\n }",
"public boolean isSelected() {\r\n return selected;\r\n }",
"public void selectItem(int i) {\n checkIndex(i);\n selectedItem = i;\n }",
"IProductInfo getM_piSelectedItem();",
"@Nullable String pickItem();",
"public boolean isSelected() {\r\n\t\treturn selected;\r\n\t}",
"public String getSelected()\n\t{\n\t\treturn _current.ID;\n\t}",
"public boolean isSelected()\n\t{\n\t\treturn selected;\n\t}",
"public boolean isSelected(){\r\n return selected;\r\n }",
"public List<T> getSelected() {\n Unknown selected = getElement().getSelected();\n if (isMulti()) {\n return SerDes.unmirrorList(selected.<Mirrored<List<T>>>cast(), getItemClass());\n } else {\n return Collections.singletonList(SerDes.unmirror(selected.cast(), getItemClass()));\n }\n }",
"public boolean isSelected() {\n \t\treturn selected;\n \t}",
"public native MenuItem getSelectedItem();",
"public T getSelectedItem() {\n\t\tT selectedItem = null;\n\t\tint position = spinner.getSelectedItemPosition();\n\t\tif(position >= 0) {\n\t\t\tselectedItem = adapter.getItem(position);\n\t\t}\n\t\treturn selectedItem;\n\t}",
"public boolean isSelected() {\n\t\treturn iAmSelected;\n\t}",
"public boolean isSelected() {\n\t\treturn selected;\n\t}",
"public boolean isSelected() {\n\t\treturn selected;\n\t}",
"public Axiom getSelected() {\r\n\treturn view.getSelected();\r\n }",
"public Object getSelection() {\n return selection;\n }",
"public boolean isSelected(T item) {\n return getElement().isSelected(SerDes.mirror(item));\n }",
"public boolean isSelected() { \n \treturn selection != null; \n }",
"public int getSelectedId() {\n return selectedId;\n }",
"@Override\r\n\tpublic void setSelectedItem(Object anItem) {\n c=(Category) anItem;\r\n\t}",
"public S getSelected()\n\t\t{\n\t\t\treturn newValue;\n\t\t}",
"public Boolean getIsselected() {\n return isselected;\n }",
"public Boolean getIsselected() {\n return isselected;\n }",
"private String getSelectedString() {\n\t\treturn menuItem[selectedIndex];\r\n\t}",
"public String getSelected ()\n {\n return ((GroupItem)gbox.getSelectedItem()).getSelected();\n }",
"public R getSingleSelection()\r\n {\r\n final ListSelectionModel lsm = jTable.getSelectionModel();\r\n if( lsm.isSelectionEmpty() == false )\r\n {\r\n final int row = lsm.getLeadSelectionIndex(); // or use .getJTable().getSelectedRow() for single or lsm.isSelectedIndex() for multiple selection\r\n if( row != Util.INVALID_INDEX )\r\n {\r\n final int xlatedRow = jTable.convertRowIndexToModel( row ); // has to be done with auto-sorter\r\n return provideRow( xlatedRow );\r\n }\r\n }\r\n\r\n return null;\r\n }",
"void itemSelected(OutlineItem item);",
"@Override\r\n\tpublic String[] getSelected() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String[] getSelected() {\n\t\treturn null;\r\n\t}",
"public boolean getIsSelected() {\n return this.isSelected;\n }",
"public void setSelectedItem(Object anItem)\n/* */ {\n/* 49 */ this.c = ((Category)anItem);\n/* */ }",
"public boolean isMultiSelection()\n {\n return multiSelection;\n }",
"protected ItemBO getSelectedInventoryForAnItem(final ItemBO anItem) {\n\t\tif (!isPartFoundInMultipleLocations(anItem)) {\n\t\t\tanItem.setInventory(shortListRelevantInventory(anItem));\n\t\t\tanItem.setAdditionalInventory(new ArrayList<InventoryBO>());\n\t\t}\n\t\t\n\t\treturn anItem;\n\t}",
"public IEntry getSelectedEntry()\n {\n return selectedEntry;\n }",
"void onItemSelected(int index, T item) throws RemoteException;",
"public Object getSelectedObject() {\n return (String) itsCombo.getSelectedItem();\n }",
"public List<F> getSelected() {\n return selected;\n }",
"@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}",
"@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}",
"void setSelectedItems(ValueType selectedItems);",
"private void selection(int level, int item) {\n switch (level) {\n case 0:\n if (domaineSelectionne != null && item < tvComptes.getItems().size())\n tvComptes.getSelectionModel().select(item);\n break;\n case 1:\n if (donneesActives != null && item < lvDomaines.getItems().size())\n lvDomaines.getSelectionModel().select(item);\n break;\n }\n }",
"public MovieItem getMovieSelected(){\n //return movie item data\n return mMovie;\n }",
"public T getSelectedOption() {\n return selectedIndex == -1 ? null : options.get(selectedIndex);\n }",
"public boolean getSelectedValue() {\r\n\treturn this.selectedValue;\r\n }",
"public void setSelectedItem( final T selectedEntity ) {\n this.selectedEntity = selectedEntity;\n }",
"public String getSelected()\r\n {\r\n if (selectedIndex == -1)\r\n return null;\r\n \r\n return towerTypes[selectedIndex];\r\n }",
"@Override\n\tpublic Object getModelSelected() {\n\t\treturn null;\n\t}",
"public AUndertaking getSelectedTask()\n {\n String errorMsg;\n Iterator<AUndertaking> taskIt = getSelectedTaskIterator();\n\n if (taskIt.hasNext()) {\n AUndertaking selectedTask = taskIt.next();\n\n if (! taskIt.hasNext()) {\n return selectedTask;\n }\n\n errorMsg = \"Selection is multiple\";\n }\n else {\n errorMsg = \"Nothing is selected\";\n }\n\n throw new IllegalStateException(errorMsg);\n }",
"public ImageFlowItem getSelectedValue()\r\n {\r\n if (getAvatars() == null || getAvatars().isEmpty() || getSelectedIndex() >= getAvatars().size() || getSelectedIndex() < 0)\r\n {\r\n return null;\r\n }\r\n\r\n return getAvatars().get(getSelectedIndex());\r\n }",
"public boolean isSelected() {\r\n return isSelected;\r\n }",
"public void setMultiSelection(boolean multiSelection)\n {\n this.multiSelection = multiSelection;\n }",
"public void select(T item) {\n getElement().select(SerDes.mirror(item));\n }",
"@Override\r\n protected ObservableList<TreeItem> getSelectedItems() {\r\n return getSelectionModel().getSelectedItems();\r\n }",
"public boolean IsSelected1(int i) {\n\t\treturn theSelected1[i];\n\t}",
"@Override\n\tpublic void setSelected(boolean selected) {\n\t\t\n\t}",
"@Override\n public void selectItem(String selection) {\n vendingMachine.setSelectedItem(selection);\n vendingMachine.changeToHasSelectionState();\n }",
"@Override\r\n @Test\r\n public void testSelectedOnClearItemsSingle() {\r\n int index = 2;\r\n getSelectionModel().select(index);\r\n TreeItem parent = getSelectedItem().getParent();\r\n int parentIndex = getView().getRow(parent);\r\n clearItems();\r\n if (getSelectionModel().isEmpty()) {\r\n assertTrue(\"selection must be empty\", getSelectionModel().isEmpty());\r\n assertEquals(-1, getSelectedIndex());\r\n assertEquals(null, getSelectedItem());\r\n assertTrue(\"\", getSelectedIndices().isEmpty());\r\n assertTrue(\"\", getSelectedItems().isEmpty());\r\n// assertEquals(\"focus must be cleared\", -1, getFocusModel()\r\n// .getFocusedIndex());\r\n } else {\r\n assertEquals(\"selectedIndex at parentIndex\", parentIndex, getSelectedIndex());\r\n assertEquals(\"parent must be selected after clearing \", parent, \r\n getSelectedItem());\r\n }\r\n }",
"public LiveData<Recipe> getSelected() {\n return repository.get(selectedId);\n }",
"public void setSelection( final CTabItem item ) {\n checkWidget();\n if( item == null ) {\n SWT.error( SWT.ERROR_NULL_ARGUMENT );\n }\n int index = itemHolder.indexOf( item );\n setSelection( index );\n }",
"public TabItem [] getSelection () {\r\n\tcheckWidget();\r\n\tint index = getSelectionIndex ();\r\n\tif (index == -1) return new TabItem [0];\r\n\treturn new TabItem [] {items [index]};\r\n}",
"public boolean isSelected()\n {\n\treturn _isSelected;\n }",
"public int getSelectedIndex() {\n return selectedIndex;\n }",
"public String getCurrentItem() {\n\t\treturn currentItem;\n\t}",
"public Cell getSelectedCell() {\n return selectedCell;\n }",
"Object getSelection();",
"public void getSelected() {\n for (int i = 0; i < list.size(); i++) {\n if (selectColumn.getCellObservableValue(i).getValue().isSelected()) {\n selectedIngredients.add(i + 1);\n }\n }\n }",
"public void select(Object obj, boolean selectionFlag);",
"List<String> getSelectedItems();",
"public void setSelected(boolean selected) \n {\n this.selected = selected;\n }",
"public ObservableValue<List<T>> selected() {\n return createObservableValue(this::getSelected, this::setSelected, \"selected-changed\");\n }",
"protected abstract Optional<T> getSingleSelection();",
"public void selectItem(int position, boolean value) {\n if (value) {\n mSelectedItems.put(position, value);\n notifyItemChanged(position);\n } else {\n mSelectedItems.delete(position);\n notifyItemChanged(position);\n }\n }",
"public void setSelected(boolean selected);",
"public void itemsSelected() {\n getEntitySelect().close();\n Collection<T> selectedValues = getEntitySelect().getResults().getSelectedValues();\n setReferencesToParentAndPersist((T[]) selectedValues.toArray());\n showAddSuccessful();\n }",
"public void setSelected(boolean selected) {\n\t\tiAmSelected = selected;\n\t}"
] |
[
"0.73900455",
"0.69822985",
"0.68793637",
"0.68366754",
"0.68256164",
"0.680392",
"0.6766892",
"0.6755611",
"0.6704121",
"0.6650728",
"0.6607099",
"0.66024506",
"0.65889364",
"0.6485489",
"0.64823115",
"0.64581406",
"0.64504045",
"0.6442732",
"0.635104",
"0.6349986",
"0.6309458",
"0.6301986",
"0.6294992",
"0.62791413",
"0.62742674",
"0.6271822",
"0.6259747",
"0.6243785",
"0.62388307",
"0.6228146",
"0.62242365",
"0.6220566",
"0.6215582",
"0.6211697",
"0.61987054",
"0.6189867",
"0.6187455",
"0.6171421",
"0.6167436",
"0.6167436",
"0.6166514",
"0.6162303",
"0.6154278",
"0.61329293",
"0.61043215",
"0.6057703",
"0.6046025",
"0.60286313",
"0.60286313",
"0.6018812",
"0.59961385",
"0.5992898",
"0.5978303",
"0.597656",
"0.597656",
"0.59725815",
"0.5954748",
"0.59544235",
"0.59309924",
"0.59294134",
"0.5909154",
"0.5904247",
"0.5890461",
"0.58873683",
"0.58873683",
"0.58800143",
"0.5870551",
"0.5865116",
"0.5852141",
"0.5846794",
"0.5828691",
"0.5820002",
"0.5811949",
"0.5811831",
"0.57936347",
"0.577067",
"0.5769317",
"0.5718919",
"0.57006097",
"0.5697984",
"0.5692272",
"0.56860375",
"0.5680297",
"0.5677311",
"0.56699103",
"0.5663977",
"0.5663735",
"0.5653065",
"0.5649549",
"0.5635708",
"0.5634445",
"0.56333447",
"0.5630195",
"0.5628692",
"0.562715",
"0.5607748",
"0.56020296",
"0.5599528",
"0.55861926",
"0.5578445",
"0.55743915"
] |
0.0
|
-1
|
!wca! observe selectedItem: ?Object When multi is false, this is the currently selected item, or null if no item is selected.
|
public ObservableValue<T> selectedItem() {
return createObservableValue(this::getSelectedItem, this::setSelectedItem, "selected-item-changed");
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public ItemT getSelectedItem() {\n return selectedItem;\n }",
"public Gnome getSelectedItem() {\n return selectedItem;\n }",
"public void itemSelected(boolean selected);",
"@Override\r\n protected TreeItem getSelectedItem() {\r\n return getSelectionModel().getSelectedItem();\r\n }",
"public boolean getSelected()\n {\n return selected; \n }",
"public Item getSelectedItem() {\n return this.itemList.getSelectedValue();\n }",
"public BrowseItem getSelectedItem()\r\n\t{\r\n\t\treturn this.selectedItem;\r\n\t}",
"public Item getSelectedItem() { return this.getSelectedSlot().getMappedItem(); }",
"public boolean isSelected() { return selected; }",
"public void setSelectedItem(Gnome selectedItem) {\n this.selectedItem = selectedItem;\n }",
"public int getSelectedItem() {\n return mSelectedItem;\n }",
"public BooleanProperty getSelected() {\n return selected;\n }",
"public TreeItem getSelectedItem();",
"public boolean isSelected() \n {\n return selected;\n }",
"public boolean isSelected()\n {\n return selected;\n }",
"public Axiom getSelected() {\r\n\treturn view.getSelected();\r\n }",
"public int getSelected() {\n \t\treturn selected;\n \t}",
"public boolean isSelected(){\r\n return selected;\r\n }",
"public boolean isSelected() {\r\n return selected;\r\n }",
"public S getSelected()\n\t\t{\n\t\t\treturn newValue;\n\t\t}",
"void onItemSelected(int index, T item) throws RemoteException;",
"public void setSelectedItem(ItemT item) {\n selectedItem = item;\n onSelectedItemChanged();\n }",
"public AbstractListItem getSelectedItem() {\n for (int i = 0; i < getWidgetCount(); i++) {\n Widget item = getWidget(i);\n\n if (item instanceof AbstractListItem && ((AbstractListItem) item).isActive()) {\n return (AbstractListItem) item;\n }\n }\n return null;\n }",
"public String getSelectedItem() {\n if (selectedPosition != -1) {\n Toast.makeText(activity, \"Selected Item : \" + list.get(selectedPosition), Toast.LENGTH_SHORT).show();\n return list.get(selectedPosition);\n }\n return \"\";\n }",
"@Nullable\n public T getSelectedItem() {\n return SerDes.unmirror(getElement().getSelectedItem(), getItemClass());\n }",
"public Object getSelection() {\n return selection;\n }",
"public String getSelected()\n\t{\n\t\treturn _current.ID;\n\t}",
"public boolean isSelected()\n\t{\n\t\treturn selected;\n\t}",
"public boolean isSelected() {\n\t\treturn iAmSelected;\n\t}",
"public boolean isSelected() {\r\n\t\treturn selected;\r\n\t}",
"public List<T> getSelected() {\n Unknown selected = getElement().getSelected();\n if (isMulti()) {\n return SerDes.unmirrorList(selected.<Mirrored<List<T>>>cast(), getItemClass());\n } else {\n return Collections.singletonList(SerDes.unmirror(selected.cast(), getItemClass()));\n }\n }",
"public boolean isSelected() {\n \t\treturn selected;\n \t}",
"public CTabItem getSelection() {\n checkWidget();\n CTabItem result = null;\n if( selectedIndex != -1 ) {\n result = ( CTabItem )itemHolder.getItem( selectedIndex );\n }\n return result;\n }",
"public boolean isSelected() { \n \treturn selection != null; \n }",
"public boolean isSelected() {\n\t\treturn selected;\n\t}",
"public boolean isSelected() {\n\t\treturn selected;\n\t}",
"IProductInfo getM_piSelectedItem();",
"@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}",
"@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}",
"public boolean isSelected(T item) {\n return getElement().isSelected(SerDes.mirror(item));\n }",
"@NonNull\n public SparseBooleanArray getSelectedItems() {\n return selectedItems;\n }",
"public void setSelectedItem(int selectedItem) {\n setSelectedItem(selectedItem, true);\n }",
"public void setSelectedItem(BrowseItem selectedItem)\r\n\t{\r\n\t\tthis.selectedItem = selectedItem;\r\n\t}",
"public ObservableValue<List<T>> selected() {\n return createObservableValue(this::getSelected, this::setSelected, \"selected-changed\");\n }",
"void itemSelected(OutlineItem item);",
"public native MenuItem getSelectedItem();",
"public Boolean getIsselected() {\n return isselected;\n }",
"public Boolean getIsselected() {\n return isselected;\n }",
"@Override\r\n protected ObservableList<TreeItem> getSelectedItems() {\r\n return getSelectionModel().getSelectedItems();\r\n }",
"public boolean isSelected() {\r\n return isSelected;\r\n }",
"public IEntry getSelectedEntry()\n {\n return selectedEntry;\n }",
"public boolean getSelectedValue() {\r\n\treturn this.selectedValue;\r\n }",
"public String getSelected ()\n {\n return ((GroupItem)gbox.getSelectedItem()).getSelected();\n }",
"private String getSelectedString() {\n\t\treturn menuItem[selectedIndex];\r\n\t}",
"public int getSelectedId() {\n return selectedId;\n }",
"public Object getSelectedObject() {\n return (String) itsCombo.getSelectedItem();\n }",
"public List<F> getSelected() {\n return selected;\n }",
"public MovieItem getMovieSelected(){\n //return movie item data\n return mMovie;\n }",
"public void getSelected() {\n for (int i = 0; i < list.size(); i++) {\n if (selectColumn.getCellObservableValue(i).getValue().isSelected()) {\n selectedIngredients.add(i + 1);\n }\n }\n }",
"public boolean getIsSelected() {\n return this.isSelected;\n }",
"public boolean isMultiSelection()\n {\n return multiSelection;\n }",
"@Override\n\t\t\t\t\tpublic void OnSelectItem(Item item) {\n\n\t\t\t\t\t\tif(!toDelete.contains(item))\n\t\t\t\t\t\t\ttoDelete.add(item);\n\t\t\t\t\t}",
"@Override\r\n\tpublic String[] getSelected() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String[] getSelected() {\n\t\treturn null;\r\n\t}",
"public LiveData<Recipe> getSelected() {\n return repository.get(selectedId);\n }",
"@Override\n\tpublic Object getModelSelected() {\n\t\treturn null;\n\t}",
"public T getSelectedItem() {\n\t\tT selectedItem = null;\n\t\tint position = spinner.getSelectedItemPosition();\n\t\tif(position >= 0) {\n\t\t\tselectedItem = adapter.getItem(position);\n\t\t}\n\t\treturn selectedItem;\n\t}",
"public void onItemStateChanged(String id, boolean selected);",
"@Override\r\n\tpublic void setSelectedItem(Object anItem) {\n c=(Category) anItem;\r\n\t}",
"public boolean isSelected()\n {\n\treturn _isSelected;\n }",
"public void selectItem(int i) {\n checkIndex(i);\n selectedItem = i;\n }",
"List<String> getSelectedItems();",
"@Nullable String pickItem();",
"@Override\n public void selectItem(String selection) {\n vendingMachine.setSelectedItem(selection);\n vendingMachine.changeToHasSelectionState();\n }",
"private void selection(int level, int item) {\n switch (level) {\n case 0:\n if (domaineSelectionne != null && item < tvComptes.getItems().size())\n tvComptes.getSelectionModel().select(item);\n break;\n case 1:\n if (donneesActives != null && item < lvDomaines.getItems().size())\n lvDomaines.getSelectionModel().select(item);\n break;\n }\n }",
"@Override\n public void onReselectItem(MeowBottomNavigation.Model item) {\n }",
"public boolean isSelected();",
"public boolean isSelected();",
"@Override\r\n\tpublic void itemSelectedAtIndexPath(IndexPath path) {\n\r\n\t}",
"public ArrayList<Order> getCurrentSelection(){\n\t\t return this.currentSelection;\n\t }",
"public String getMySelection() {\n return mySelection;\n }",
"public Selection getSelection() {\n return mSelection;\n }",
"public void itemsSelected() {\n getEntitySelect().close();\n Collection<T> selectedValues = getEntitySelect().getResults().getSelectedValues();\n setReferencesToParentAndPersist((T[]) selectedValues.toArray());\n showAddSuccessful();\n }",
"public Ward getSelected() {\n\t\treturn table.getSelectionModel().getSelectedItem();\n\t}",
"Object getSelection();",
"@Override\n\tpublic boolean isSelected() {\n\t\treturn false;\n\t}",
"public TabItem [] getSelection () {\r\n\tcheckWidget();\r\n\tint index = getSelectionIndex ();\r\n\tif (index == -1) return new TabItem [0];\r\n\treturn new TabItem [] {items [index]};\r\n}",
"public abstract boolean isSelected();",
"public R getSingleSelection()\r\n {\r\n final ListSelectionModel lsm = jTable.getSelectionModel();\r\n if( lsm.isSelectionEmpty() == false )\r\n {\r\n final int row = lsm.getLeadSelectionIndex(); // or use .getJTable().getSelectedRow() for single or lsm.isSelectedIndex() for multiple selection\r\n if( row != Util.INVALID_INDEX )\r\n {\r\n final int xlatedRow = jTable.convertRowIndexToModel( row ); // has to be done with auto-sorter\r\n return provideRow( xlatedRow );\r\n }\r\n }\r\n\r\n return null;\r\n }",
"void setSelectedItems(ValueType selectedItems);",
"@Override\r\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\tif(e.getStateChange() == ItemEvent.SELECTED)\r\n\t\t\t\t\tcodigoResponsavel = responsaveis.get(jcResponsavel.getSelectedIndex() -1 ).getCodigo();\r\n\t\t\t}",
"public String getSelectedValue() {\r\n\t\treturn selectedValue;\r\n\t}",
"public ImageFlowItem getSelectedValue()\r\n {\r\n if (getAvatars() == null || getAvatars().isEmpty() || getSelectedIndex() >= getAvatars().size() || getSelectedIndex() < 0)\r\n {\r\n return null;\r\n }\r\n\r\n return getAvatars().get(getSelectedIndex());\r\n }",
"public interface OnSelectedItemChangeListener {\n void OnSelectedItemChange(PieMenuView source, int currentItem);\n }",
"public void invSelected()\n {\n\t\t//informaPreUpdate();\n \tisSelected = !isSelected;\n\t\t//informaPostUpdate();\n }",
"public int getSelection() {\n \tcheckWidget();\n \treturn selection;\n }",
"public Cell getSelectedCell() {\n return selectedCell;\n }",
"public T getSelectedOption() {\n return selectedIndex == -1 ? null : options.get(selectedIndex);\n }",
"public String getCurrentItem() {\n\t\treturn currentItem;\n\t}",
"protected ItemBO getSelectedInventoryForAnItem(final ItemBO anItem) {\n\t\tif (!isPartFoundInMultipleLocations(anItem)) {\n\t\t\tanItem.setInventory(shortListRelevantInventory(anItem));\n\t\t\tanItem.setAdditionalInventory(new ArrayList<InventoryBO>());\n\t\t}\n\t\t\n\t\treturn anItem;\n\t}"
] |
[
"0.7377306",
"0.7222875",
"0.71578",
"0.70197636",
"0.6969086",
"0.69310147",
"0.68863034",
"0.6814538",
"0.6733219",
"0.6610601",
"0.659107",
"0.65736693",
"0.65645117",
"0.65636456",
"0.6563424",
"0.65408033",
"0.6539265",
"0.6506743",
"0.649884",
"0.648963",
"0.648586",
"0.642009",
"0.6417134",
"0.63982594",
"0.6387059",
"0.6379754",
"0.63781595",
"0.6372585",
"0.6368328",
"0.6363792",
"0.6359612",
"0.6352954",
"0.63528895",
"0.6331747",
"0.6325118",
"0.6325118",
"0.6319814",
"0.6315246",
"0.6315246",
"0.6305354",
"0.63029885",
"0.62862587",
"0.62800425",
"0.62639445",
"0.6255215",
"0.6201523",
"0.6193121",
"0.6193121",
"0.617963",
"0.61680025",
"0.6158692",
"0.6144277",
"0.61348486",
"0.60985696",
"0.60898346",
"0.6089642",
"0.6074412",
"0.6073149",
"0.6065219",
"0.6036523",
"0.6034275",
"0.6027668",
"0.59981376",
"0.59981376",
"0.5995946",
"0.5991148",
"0.5989829",
"0.5989539",
"0.59152806",
"0.5895926",
"0.58916",
"0.58876735",
"0.5882337",
"0.5875098",
"0.58579624",
"0.5840187",
"0.58369064",
"0.58369064",
"0.5825813",
"0.58205",
"0.5812443",
"0.5808991",
"0.5807228",
"0.5792311",
"0.57916546",
"0.5787141",
"0.5784625",
"0.5784333",
"0.5782386",
"0.57738584",
"0.57679826",
"0.57637423",
"0.57581663",
"0.5754637",
"0.5739997",
"0.5738916",
"0.57202697",
"0.5714835",
"0.5714286",
"0.57014674"
] |
0.7132265
|
3
|
!wca! get toggle: boolean When true, calling select on an item that is already selected will deselect the item.
|
public boolean isToggle() {
return getElement().isToggle();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Boolean toggleSelected()\n\t{\n\t\tthis._selected = !this._selected;\n\t\treturn this._selected;\n\t}",
"static void setNotSelected(){isSelected=false;}",
"public void invSelected()\n {\n\t\t//informaPreUpdate();\n \tisSelected = !isSelected;\n\t\t//informaPostUpdate();\n }",
"public void itemSelected(boolean selected);",
"@Override\n\tpublic boolean isSelected() {\n\t\treturn false;\n\t}",
"public void setSelected(boolean select) {\r\n isSelected = select;\r\n }",
"@Override\n\tpublic void toggle() {\n\t\tsetChecked(!checked);\n\t}",
"private void helperSwitchSelectOff()\r\n\t{\r\n\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_SELECT);\r\n\r\n\t\tmainFormLink.getComponentToolbar().getComponentButtonSelect().setIcon(iconButton);\r\n\r\n\t\tFormMainMouse.isSampleSelectOn = false;\r\n\t}",
"private void doSelect() {\n this.setVisible(false);\n }",
"public boolean isSelected() { return selected; }",
"public void setSelected(boolean selected);",
"public void setSelected(boolean s)\n {\n selected = s; \n }",
"private void toggleSelectedAlgorithm(int index) {\n if (selected[index] == true) {\n selected[index] = false;\n } else {\n selected[index] = true;\n }\n }",
"public void toggle() {\n setChecked(!checked);\n }",
"@Override\n public void onClick(View view)\n {\n if(selectedStructure != null) //checks if object is selected and if prev object is same object\n {\n //if object is the same, then deselect the structure\n if (selectedStructure.equals(structureList.get(getAdapterPosition())))\n selected = false;\n else\n selected = true;\n }\n\n // if selected, get object otherwise let no object is selected\n if (selected)\n {\n selectedStructure = structureList.get(getAdapterPosition());\n }\n else\n {\n selectedStructure = null;\n }\n }",
"@Override\n\tpublic void setSelected(boolean selected) {\n\t\t\n\t}",
"@Override\n\tpublic void unselect() {\n\t}",
"@Override\n public void deselectGolem() {\n }",
"@Override\n public void Toggle() {\n\t \n }",
"@Override\n public boolean select() {\n cell.setState(cell.getRevealedState());\n return true;\n }",
"public boolean isSelected() {\r\n return isSelected;\r\n }",
"public void toggle() {\n toggle(false);\n }",
"@Override\n\tprotected void OnRelease() {\n\t\tsetSelected(false);\n\t}",
"void toggle();",
"public void setSelected(boolean selected) \n {\n this.selected = selected;\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tiv_operate.setSelected(!iv_operate.isSelected());\n\t\t\t\tiv_shuohua.setSelected(!iv_shuohua.isSelected());\n\t\t\t}",
"public boolean isSelected() \n {\n return selected;\n }",
"public abstract void select(boolean select);",
"public boolean isSelected(){\r\n return selected;\r\n }",
"public boolean isSelected();",
"public boolean isSelected();",
"public boolean isSelected() { \n \treturn selection != null; \n }",
"public void toggleChecked(boolean b) {\n for (int i = 0; i < itemsDigested.size(); i++) {\n ListItem item = itemsDigested.get(i);\n if (b && item.getChecked() != ListItem.CHECKED) {\n item.setChecked(true);\n notifyItemChanged(i);\n } else if (!b && item.getChecked() == ListItem.CHECKED) {\n item.setChecked(false);\n notifyItemChanged(i);\n }\n }\n\n if (mainFrag.mActionMode != null) {\n mainFrag.mActionMode.invalidate();\n }\n\n if (getCheckedItems().size() == 0) {\n mainFrag.selection = false;\n if (mainFrag.mActionMode != null) mainFrag.mActionMode.finish();\n mainFrag.mActionMode = null;\n }\n }",
"public abstract void toggle();",
"@Override\n protected void processUnselect() {\n \n }",
"public void select(Object obj, boolean selectionFlag);",
"@Override\n public void onClick(View view) {\n if(view.isSelected()){\n view.setSelected(false);\n selectedList.remove((Integer) getAdapterPosition());\n }\n else{\n view.setSelected(true);\n selectedList.add((Integer) getAdapterPosition());\n }\n\n //when a meta magic is selected we allow the modifications\n if(! (selectedList == null) && ! selectedList.isEmpty()){\n parent.findViewById(R.id.buttonDelete).setEnabled(true);\n\n //we allow modification only if there is one item selected\n if(selectedList.size() == 1)\n {\n parent.findViewById(R.id.buttonEdit).setEnabled(true);\n }\n else\n {\n parent.findViewById(R.id.buttonEdit).setEnabled(false);\n }\n\n }\n else{\n parent.findViewById(R.id.buttonDelete).setEnabled(false);\n parent.findViewById(R.id.buttonEdit).setEnabled(false);\n }\n\n }",
"public boolean isSelected()\n {\n return selected;\n }",
"public void toggle() { this.isOpen = !this.isOpen; }",
"@Override\n public void toggle(boolean active) {\n }",
"void toggleSelected(int selected) {\n switch (selected) {\n case 0:\n boolean expanded = (appBar.getHeight() - appBar.getBottom()) == 0;\n if (expanded)\n appBar.setExpanded(false, true);\n else {\n appBar.setExpanded(true, true);\n hideIngredients();\n hideSteps();\n }\n return;\n case 1:\n if (rv_ingredients.isShown()) {\n hideIngredients();\n } else {\n appBar.setExpanded(false, true);\n showIngredients();\n hideSteps();\n }\n return;\n case 2:\n if (rv_steps.isShown()) {\n hideSteps();\n } else {\n appBar.setExpanded(false, true);\n hideIngredients();\n showSteps();\n }\n return;\n default:\n return;\n }\n }",
"@Override\n public void onToggle(String id, int position, boolean toggleState) {\n Log.d(TAG, String.format(\"onToggle: Id:%s, Position:%d, ToggleState:%s\", id, position, toggleState));\n if (selectedIdsMap.containsKey(id) && !toggleState) {\n //if the item is in the map AND resulting toggle state is false (not selected), we remove it\n Log.d(TAG, \"onToggle: Item is in the map, so removing:\" + id);\n selectedIdsMap.remove(id);\n }\n else if (!selectedIdsMap.containsKey(id) && toggleState) {\n //if the item is not in the map AND resulting toggle state is true, we add it\n Log.d(TAG, \"onToggle: Item is not in the map, so adding:\" + id);\n selectedIdsMap.put(id, position);\n }\n }",
"private void selectDeselectNewPrice(boolean isSelected) {\n if (isSelected) {\n llTitle.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.colorWhite));\n llOriginalPrice.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.colorWhite));\n llTotalItems.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.colorWhite));\n\n llNewPrice.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.colorCreateDealSelected));\n llSlider.setVisibility(View.VISIBLE);\n\n btnDone.setVisibility(View.GONE);\n } else {\n llNewPrice.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.colorWhite));\n llSlider.setVisibility(View.GONE);\n\n btnDone.setVisibility(View.VISIBLE);\n }\n }",
"@FXML\n public void isSelectedOff() {\n reset();\n on.setSelected(false);\n\n lab4.setVisible(false);\n txt4.setVisible(false);\n lab5.setVisible(false);\n txt5.setVisible(false);\n lab6.setVisible(false);\n txt6.setVisible(false);\n\n }",
"boolean isSelected();",
"boolean isSelected();",
"boolean isSelected();",
"public void setSelected(boolean onoff) {\n if (onoff) {\n state |= STATE_SELECTED;\n } else {\n state &= ~STATE_SELECTED;\n }\n redrawInternalAndParent();\n }",
"public void deselect(T item) {\n getElement().deselect(SerDes.mirror(item));\n }",
"public abstract boolean isSelected();",
"private void helperSwitchSelectOn()\r\n\t{\r\n\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_SELECT_PRESSED);\r\n\r\n\t\tmainFormLink.getComponentToolbar().getComponentButtonSelect().setIcon(iconButton);\r\n\r\n\t\tFormMainMouse.isSampleSelectOn = true;\r\n\t}",
"public void setSelected(boolean selected) {\n/* 891 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"private void toggleSelection(int position) {\n // Position may be special \"no position\" during certain\n // transitional phases. If so, skip handling of the event.\n if (position == RecyclerView.NO_POSITION) {\n if (DEBUG) Log.d(TAG, \"Ignoring toggle for element with no position.\");\n return;\n }\n String id = mAdapter.getModelId(position);\n if (id != null) {\n toggleSelection(id);\n }\n }",
"private void actionSwitchSelect()\r\n\t{\r\n\t\tif (FormMainMouse.isSampleSelectOn)\r\n\t\t{\r\n\t\t\thelperSwitchSelectOff();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\thelperSwitchSelectOn();\r\n\r\n\t\t\t//---- If we can select sample, we can not move it\r\n\t\t\thelperSwitchMoveOff();\r\n\t\t}\r\n\t}",
"@FXML\n void selectChecking(ActionEvent event) {\n \tdirectDep.setSelected(false);\n \tisLoyal.setSelected(false);\n \tdirectDep.setDisable(false);\n \tisLoyal.setDisable(true);\n }",
"public boolean isSelected() {\r\n return selected;\r\n }",
"public void setDisaggregationSelected(boolean isSelected) {\n disaggregationFlag = isSelected;\n }",
"@Override\n public void onMenuToggle(boolean b) {\n }",
"public void deselect();",
"public void select(boolean a)\n {\n selected = a;\n }",
"public boolean isSelected() {\n \t\treturn selected;\n \t}",
"public Boolean getSimpleDeselect() {\r\n return getAttributeAsBoolean(\"simpleDeselect\");\r\n }",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\tma.toggle(arg2);\n\t}",
"public void setSimpleDeselect(Boolean simpleDeselect) {\r\n setAttribute(\"simpleDeselect\", simpleDeselect, true);\r\n }",
"@FXML\n void selectMoneyMarket(ActionEvent event) {\n \tdirectDep.setSelected(false);\n \tisLoyal.setSelected(false);\n \tdirectDep.setDisable(true);\n \tisLoyal.setDisable(true);\n }",
"public void setToggle(int toggle) {\n\t\tToggle[SortType - 1] = toggle;\n\t}",
"public void onItemStateChanged(String id, boolean selected);",
"@Override\n\tpublic void setInvertSelection(boolean value) {\n\t\t\n\t}",
"@Override\n public boolean onActionItemClicked(ActionMode mode, MenuItem item) {\n int id = item.getItemId();\n //use switch condition\n switch (id){\n case R.id.select_delete:\n //when click delete\n //use for loop\n for (NoteEntity noteSelect :selectList) {\n //remove select item from list\n list.remove(noteSelect);\n mainViewModel.deleteById(noteSelect.getId());\n }\n //check condition\n if (list.size()==0){\n //when list is empty\n //visible text view\n tvEmpty.setVisibility(View.VISIBLE);\n }\n mode.finish();\n break;\n case R.id.select_all:\n //when click on select all\n //check condition\n if (selectList.size() == list.size()){\n //when all item selected\n //set isSelectAll false\n isSelectAll = false;\n //clear select list\n selectList.clear();\n }else {\n //when all item unselected\n //set isSelectAll true\n isSelectAll = true;\n //clear list\n selectList.clear();\n //add all values in select list\n selectList.addAll(list);\n }\n //set text in view mode\n mainViewModel.setSelectedLiveData(String.valueOf(selectList.size()));\n //notify adaptor\n notifyDataSetChanged();\n break;\n }\n return true;\n }",
"public void toggleMode() {\n if (edit_rbmi.isSelected()) filter_rbmi.setSelected(true);\n // else if (filter_rbmi.isSelected()) edgelens_rbmi.setSelected(true);\n // else if (edgelens_rbmi.isSelected()) timeline_rbmi.setSelected(true);\n else edit_rbmi.setSelected(true);\n }",
"public void setSelected(boolean selected) {\n this.selected = selected;\n }",
"public boolean isSelected()\n\t{\n\t\treturn selected;\n\t}",
"public void toggleSelection(String modelId) {\n assert(modelId != null);\n\n boolean changed = false;\n if (mSelection.contains(modelId)) {\n changed = attemptDeselect(modelId);\n } else {\n changed = attemptSelect(modelId);\n }\n\n if (changed) {\n notifySelectionChanged();\n }\n }",
"@Override\n public void toggle() {\n checkBox.toggle();\n }",
"public void toggle(){\n isOn = !isOn;\n }",
"public static void setToggleActionSelected(ToggleDockingActionIf toggleAction,\n\t\t\tActionContext context, boolean selected) {\n\t\tsetToggleActionSelected(toggleAction, context, selected, true);\n\t}",
"public void toggleSelection(int location) {\n selectItem(location, !selectedItems.get(location));\n }",
"@FXML\r\n\tpublic void checkSelected() {\r\n\t\tif(!listView.getSelectionModel().isEmpty())\r\n\t\t{\r\n\t\t\tdeleteItemButton.setDisable(false);\r\n\t\t\taddToShoppingCartButton.setDisable(false);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tdeleteItemButton.setDisable(true);\r\n\t\t\taddToShoppingCartButton.setDisable(true);\r\n\t\t}\r\n\t}",
"@Override\n\t\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\tprefs.edit().putInt(\"CHOOSE\",(int)choose.getSelectedItemId()).commit();\n\n\t\t\t\t\tif(choose.getSelectedItemId()==0)\n\t\t \t\t\tcontacts.setVisibility(View.GONE);\n\t\t\t\t\telse \n\t\t \t\t\tcontacts.setVisibility(View.VISIBLE);\n\t\t\t\t}",
"public void toggle(){\r\n isDown = !isDown;\r\n }",
"public boolean forceSelection();",
"public void setSelected(boolean selected) {\n\t\tiAmSelected = selected;\n\t}",
"public void setToggle(boolean value) {\n getElement().setToggle(value);\n }",
"@Override\n public void onClick(View v)\n {\n mySpinner.performClick();\n int getPosition = (Integer) v.getTag();\n\n toggleSelection(getPosition);\n\n\n notifyDataSetChanged();\n\n /**\n * if clicked position is one\n * that means you want clear all select item in list\n */\n /* if (getPosition == 1)\n {\n clearList();\n }\n */\n /**\n * if clicked position is two\n * that means you want select all item in list\n */\n /* else if (getPosition == 2)\n {\n fillList();\n }*/\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent actionevent) {\n\t\t\t\tif (select.isSelected()) {\r\n\t\t\t\t\tservice.selectTask(row);\r\n\t\t\t\t\t// service.getTask(row).setSelected(true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tservice.cancleTask(row);\r\n\t\t\t\t\t// service.getTask(row).setSelected(false);\r\n\t\t\t\t}\r\n\t\t\t\t// System.out.println(\"after: \" + service.getSelectedSet());\r\n\r\n\t\t\t}",
"public boolean isSelected() {\r\n\t\treturn selected;\r\n\t}",
"public void invertSelection () {\r\n\t\tif ( modeSelectAll){\r\n\t\t\tselectedDataIds.clear();\r\n\t\t\tif (! unselectedDataIds.isEmpty()){\r\n\t\t\t\tselectedDataIds.addAll(unselectedDataIds);\r\n\t\t\t\tunselectedDataIds.clear();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tunselectedDataIds.clear();\r\n\t\t\tif (!selectedDataIds.isEmpty()){\r\n\t\t\t\tunselectedDataIds.addAll(selectedDataIds);\r\n\t\t\t\tselectedDataIds.clear();\r\n\t\t\t}\r\n\t\t}\r\n\t\tmodeSelectAll=!modeSelectAll;\r\n\t\tfireSelectionChangeNotification();\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic int ToggleDown() {\n\t\treturn 0;\r\n\t}",
"public void selectItem(int position, boolean value) {\n if (value) {\n mSelectedItems.put(position, value);\n notifyItemChanged(position);\n } else {\n mSelectedItems.delete(position);\n notifyItemChanged(position);\n }\n }",
"@Override\r\n\t\t\tpublic void seleccionar() {\n\r\n\t\t\t}",
"public void setIsselected(Boolean isselected) {\n this.isselected = isselected;\n }",
"public void setIsselected(Boolean isselected) {\n this.isselected = isselected;\n }",
"public static interface SimpleSelectable extends IsSelectable {\n public void setSelected(boolean set);\n public boolean isSelected();\n }",
"public void toggleItem(int index) {\n if (findExpandedItemIndex() == index) {\n shrinkItem(index);\n } else {\n expandedItem(index);\n }\n }",
"public void setSelected(boolean selected)\n\t{\n\t\tthis.selected = selected;\n\t}",
"public boolean isSelected() {\n\t\treturn selected;\n\t}",
"public boolean isSelected() {\n\t\treturn selected;\n\t}",
"public boolean isSelected()\n {\n\treturn _isSelected;\n }",
"public void setSelected(boolean selected) {\r\n\t\tthis.selected = selected;\r\n\t}",
"public boolean getSelected()\n {\n return selected; \n }",
"public boolean isSelected() {\n\t\treturn iAmSelected;\n\t}"
] |
[
"0.72898084",
"0.6897617",
"0.6730556",
"0.67294633",
"0.66906166",
"0.66811144",
"0.65924954",
"0.65014946",
"0.6491952",
"0.6471658",
"0.6469466",
"0.63955045",
"0.63929224",
"0.6391394",
"0.6344236",
"0.6343575",
"0.6332547",
"0.6320149",
"0.6295038",
"0.626603",
"0.62594885",
"0.6249948",
"0.6239944",
"0.6216524",
"0.62121755",
"0.6204397",
"0.6202818",
"0.6202271",
"0.61899877",
"0.6156705",
"0.6156705",
"0.614047",
"0.6138088",
"0.6088257",
"0.60588",
"0.60549307",
"0.6052958",
"0.60517645",
"0.60383576",
"0.60341114",
"0.60295576",
"0.6013605",
"0.60042095",
"0.59984285",
"0.599688",
"0.599688",
"0.599688",
"0.5989215",
"0.59795046",
"0.5975366",
"0.59687215",
"0.59670544",
"0.595726",
"0.5952979",
"0.59507936",
"0.59393084",
"0.592287",
"0.59211355",
"0.58955985",
"0.58939314",
"0.58631736",
"0.5862751",
"0.58626443",
"0.5845545",
"0.5832154",
"0.58259225",
"0.5818874",
"0.58132666",
"0.58120996",
"0.581152",
"0.5805663",
"0.58030856",
"0.5793793",
"0.5790308",
"0.5781291",
"0.5778881",
"0.5771357",
"0.5761488",
"0.57538474",
"0.5748045",
"0.57475406",
"0.5745162",
"0.5742716",
"0.5729889",
"0.5723879",
"0.5714451",
"0.57068944",
"0.57065326",
"0.5705629",
"0.5702755",
"0.56972027",
"0.56972027",
"0.5692573",
"0.56842476",
"0.5673712",
"0.56706685",
"0.56706685",
"0.5659769",
"0.56437933",
"0.56404287",
"0.5639699"
] |
0.0
|
-1
|
!wca! set toggle: boolean When true, calling select on an item that is already selected will deselect the item.
|
public void setToggle(boolean value) {
getElement().setToggle(value);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Boolean toggleSelected()\n\t{\n\t\tthis._selected = !this._selected;\n\t\treturn this._selected;\n\t}",
"static void setNotSelected(){isSelected=false;}",
"public void setSelected(boolean select) {\r\n isSelected = select;\r\n }",
"public void invSelected()\n {\n\t\t//informaPreUpdate();\n \tisSelected = !isSelected;\n\t\t//informaPostUpdate();\n }",
"public void itemSelected(boolean selected);",
"private void doSelect() {\n this.setVisible(false);\n }",
"@Override\n\tpublic boolean isSelected() {\n\t\treturn false;\n\t}",
"private void helperSwitchSelectOff()\r\n\t{\r\n\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_SELECT);\r\n\r\n\t\tmainFormLink.getComponentToolbar().getComponentButtonSelect().setIcon(iconButton);\r\n\r\n\t\tFormMainMouse.isSampleSelectOn = false;\r\n\t}",
"@Override\n\tpublic void unselect() {\n\t}",
"public void setSelected(boolean selected);",
"@Override\n\tpublic void toggle() {\n\t\tsetChecked(!checked);\n\t}",
"private void toggleSelectedAlgorithm(int index) {\n if (selected[index] == true) {\n selected[index] = false;\n } else {\n selected[index] = true;\n }\n }",
"@Override\n public void onClick(View view)\n {\n if(selectedStructure != null) //checks if object is selected and if prev object is same object\n {\n //if object is the same, then deselect the structure\n if (selectedStructure.equals(structureList.get(getAdapterPosition())))\n selected = false;\n else\n selected = true;\n }\n\n // if selected, get object otherwise let no object is selected\n if (selected)\n {\n selectedStructure = structureList.get(getAdapterPosition());\n }\n else\n {\n selectedStructure = null;\n }\n }",
"@Override\n public void deselectGolem() {\n }",
"@Override\n\tpublic void setSelected(boolean selected) {\n\t\t\n\t}",
"public void setSelected(boolean s)\n {\n selected = s; \n }",
"@Override\n\tprotected void OnRelease() {\n\t\tsetSelected(false);\n\t}",
"public boolean isSelected() { return selected; }",
"public abstract void select(boolean select);",
"@Override\n protected void processUnselect() {\n \n }",
"public void toggle() {\n setChecked(!checked);\n }",
"public void setSelected(boolean selected) \n {\n this.selected = selected;\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tiv_operate.setSelected(!iv_operate.isSelected());\n\t\t\t\tiv_shuohua.setSelected(!iv_shuohua.isSelected());\n\t\t\t}",
"@Override\n public boolean select() {\n cell.setState(cell.getRevealedState());\n return true;\n }",
"public void select(Object obj, boolean selectionFlag);",
"public void toggleChecked(boolean b) {\n for (int i = 0; i < itemsDigested.size(); i++) {\n ListItem item = itemsDigested.get(i);\n if (b && item.getChecked() != ListItem.CHECKED) {\n item.setChecked(true);\n notifyItemChanged(i);\n } else if (!b && item.getChecked() == ListItem.CHECKED) {\n item.setChecked(false);\n notifyItemChanged(i);\n }\n }\n\n if (mainFrag.mActionMode != null) {\n mainFrag.mActionMode.invalidate();\n }\n\n if (getCheckedItems().size() == 0) {\n mainFrag.selection = false;\n if (mainFrag.mActionMode != null) mainFrag.mActionMode.finish();\n mainFrag.mActionMode = null;\n }\n }",
"@Override\n public void Toggle() {\n\t \n }",
"@Override\n public void onClick(View view) {\n if(view.isSelected()){\n view.setSelected(false);\n selectedList.remove((Integer) getAdapterPosition());\n }\n else{\n view.setSelected(true);\n selectedList.add((Integer) getAdapterPosition());\n }\n\n //when a meta magic is selected we allow the modifications\n if(! (selectedList == null) && ! selectedList.isEmpty()){\n parent.findViewById(R.id.buttonDelete).setEnabled(true);\n\n //we allow modification only if there is one item selected\n if(selectedList.size() == 1)\n {\n parent.findViewById(R.id.buttonEdit).setEnabled(true);\n }\n else\n {\n parent.findViewById(R.id.buttonEdit).setEnabled(false);\n }\n\n }\n else{\n parent.findViewById(R.id.buttonDelete).setEnabled(false);\n parent.findViewById(R.id.buttonEdit).setEnabled(false);\n }\n\n }",
"private void actionSwitchSelect()\r\n\t{\r\n\t\tif (FormMainMouse.isSampleSelectOn)\r\n\t\t{\r\n\t\t\thelperSwitchSelectOff();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\thelperSwitchSelectOn();\r\n\r\n\t\t\t//---- If we can select sample, we can not move it\r\n\t\t\thelperSwitchMoveOff();\r\n\t\t}\r\n\t}",
"public void deselect(T item) {\n getElement().deselect(SerDes.mirror(item));\n }",
"public void toggle() {\n toggle(false);\n }",
"void toggleSelected(int selected) {\n switch (selected) {\n case 0:\n boolean expanded = (appBar.getHeight() - appBar.getBottom()) == 0;\n if (expanded)\n appBar.setExpanded(false, true);\n else {\n appBar.setExpanded(true, true);\n hideIngredients();\n hideSteps();\n }\n return;\n case 1:\n if (rv_ingredients.isShown()) {\n hideIngredients();\n } else {\n appBar.setExpanded(false, true);\n showIngredients();\n hideSteps();\n }\n return;\n case 2:\n if (rv_steps.isShown()) {\n hideSteps();\n } else {\n appBar.setExpanded(false, true);\n hideIngredients();\n showSteps();\n }\n return;\n default:\n return;\n }\n }",
"private void selectDeselectNewPrice(boolean isSelected) {\n if (isSelected) {\n llTitle.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.colorWhite));\n llOriginalPrice.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.colorWhite));\n llTotalItems.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.colorWhite));\n\n llNewPrice.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.colorCreateDealSelected));\n llSlider.setVisibility(View.VISIBLE);\n\n btnDone.setVisibility(View.GONE);\n } else {\n llNewPrice.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.colorWhite));\n llSlider.setVisibility(View.GONE);\n\n btnDone.setVisibility(View.VISIBLE);\n }\n }",
"public void setSelected(boolean selected) {\n/* 891 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public boolean isSelected() {\r\n return isSelected;\r\n }",
"private void helperSwitchSelectOn()\r\n\t{\r\n\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_SELECT_PRESSED);\r\n\r\n\t\tmainFormLink.getComponentToolbar().getComponentButtonSelect().setIcon(iconButton);\r\n\r\n\t\tFormMainMouse.isSampleSelectOn = true;\r\n\t}",
"@FXML\n void selectChecking(ActionEvent event) {\n \tdirectDep.setSelected(false);\n \tisLoyal.setSelected(false);\n \tdirectDep.setDisable(false);\n \tisLoyal.setDisable(true);\n }",
"private void toggleSelection(int position) {\n // Position may be special \"no position\" during certain\n // transitional phases. If so, skip handling of the event.\n if (position == RecyclerView.NO_POSITION) {\n if (DEBUG) Log.d(TAG, \"Ignoring toggle for element with no position.\");\n return;\n }\n String id = mAdapter.getModelId(position);\n if (id != null) {\n toggleSelection(id);\n }\n }",
"@Override\n public void onToggle(String id, int position, boolean toggleState) {\n Log.d(TAG, String.format(\"onToggle: Id:%s, Position:%d, ToggleState:%s\", id, position, toggleState));\n if (selectedIdsMap.containsKey(id) && !toggleState) {\n //if the item is in the map AND resulting toggle state is false (not selected), we remove it\n Log.d(TAG, \"onToggle: Item is in the map, so removing:\" + id);\n selectedIdsMap.remove(id);\n }\n else if (!selectedIdsMap.containsKey(id) && toggleState) {\n //if the item is not in the map AND resulting toggle state is true, we add it\n Log.d(TAG, \"onToggle: Item is not in the map, so adding:\" + id);\n selectedIdsMap.put(id, position);\n }\n }",
"public boolean isSelected() \n {\n return selected;\n }",
"public boolean isSelected(){\r\n return selected;\r\n }",
"@FXML\n public void isSelectedOff() {\n reset();\n on.setSelected(false);\n\n lab4.setVisible(false);\n txt4.setVisible(false);\n lab5.setVisible(false);\n txt5.setVisible(false);\n lab6.setVisible(false);\n txt6.setVisible(false);\n\n }",
"void toggle();",
"public void deselect();",
"public void setDisaggregationSelected(boolean isSelected) {\n disaggregationFlag = isSelected;\n }",
"public boolean isSelected();",
"public boolean isSelected();",
"public boolean isSelected() { \n \treturn selection != null; \n }",
"public void setSelected(boolean onoff) {\n if (onoff) {\n state |= STATE_SELECTED;\n } else {\n state &= ~STATE_SELECTED;\n }\n redrawInternalAndParent();\n }",
"@Override\n public void toggle(boolean active) {\n }",
"@FXML\n void selectMoneyMarket(ActionEvent event) {\n \tdirectDep.setSelected(false);\n \tisLoyal.setSelected(false);\n \tdirectDep.setDisable(true);\n \tisLoyal.setDisable(true);\n }",
"public abstract void toggle();",
"@Override\n public void selectItem(String selection) {\n vendingMachine.setSelectedItem(selection);\n vendingMachine.changeToHasSelectionState();\n }",
"public void select(boolean a)\n {\n selected = a;\n }",
"public void toggleSelection(String modelId) {\n assert(modelId != null);\n\n boolean changed = false;\n if (mSelection.contains(modelId)) {\n changed = attemptDeselect(modelId);\n } else {\n changed = attemptSelect(modelId);\n }\n\n if (changed) {\n notifySelectionChanged();\n }\n }",
"@Override\n public void onClick(View v)\n {\n mySpinner.performClick();\n int getPosition = (Integer) v.getTag();\n\n toggleSelection(getPosition);\n\n\n notifyDataSetChanged();\n\n /**\n * if clicked position is one\n * that means you want clear all select item in list\n */\n /* if (getPosition == 1)\n {\n clearList();\n }\n */\n /**\n * if clicked position is two\n * that means you want select all item in list\n */\n /* else if (getPosition == 2)\n {\n fillList();\n }*/\n }",
"public abstract boolean isSelected();",
"@Override\n public boolean onActionItemClicked(ActionMode mode, MenuItem item) {\n int id = item.getItemId();\n //use switch condition\n switch (id){\n case R.id.select_delete:\n //when click delete\n //use for loop\n for (NoteEntity noteSelect :selectList) {\n //remove select item from list\n list.remove(noteSelect);\n mainViewModel.deleteById(noteSelect.getId());\n }\n //check condition\n if (list.size()==0){\n //when list is empty\n //visible text view\n tvEmpty.setVisibility(View.VISIBLE);\n }\n mode.finish();\n break;\n case R.id.select_all:\n //when click on select all\n //check condition\n if (selectList.size() == list.size()){\n //when all item selected\n //set isSelectAll false\n isSelectAll = false;\n //clear select list\n selectList.clear();\n }else {\n //when all item unselected\n //set isSelectAll true\n isSelectAll = true;\n //clear list\n selectList.clear();\n //add all values in select list\n selectList.addAll(list);\n }\n //set text in view mode\n mainViewModel.setSelectedLiveData(String.valueOf(selectList.size()));\n //notify adaptor\n notifyDataSetChanged();\n break;\n }\n return true;\n }",
"public void toggleSelection(int location) {\n selectItem(location, !selectedItems.get(location));\n }",
"public void toggle() { this.isOpen = !this.isOpen; }",
"@Override\n\t\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\tprefs.edit().putInt(\"CHOOSE\",(int)choose.getSelectedItemId()).commit();\n\n\t\t\t\t\tif(choose.getSelectedItemId()==0)\n\t\t \t\t\tcontacts.setVisibility(View.GONE);\n\t\t\t\t\telse \n\t\t \t\t\tcontacts.setVisibility(View.VISIBLE);\n\t\t\t\t}",
"public boolean isSelected()\n {\n return selected;\n }",
"public void setSelected(boolean selected) {\n this.selected = selected;\n }",
"public void setSimpleDeselect(Boolean simpleDeselect) {\r\n setAttribute(\"simpleDeselect\", simpleDeselect, true);\r\n }",
"public void invertSelection () {\r\n\t\tif ( modeSelectAll){\r\n\t\t\tselectedDataIds.clear();\r\n\t\t\tif (! unselectedDataIds.isEmpty()){\r\n\t\t\t\tselectedDataIds.addAll(unselectedDataIds);\r\n\t\t\t\tunselectedDataIds.clear();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tunselectedDataIds.clear();\r\n\t\t\tif (!selectedDataIds.isEmpty()){\r\n\t\t\t\tunselectedDataIds.addAll(selectedDataIds);\r\n\t\t\t\tselectedDataIds.clear();\r\n\t\t\t}\r\n\t\t}\r\n\t\tmodeSelectAll=!modeSelectAll;\r\n\t\tfireSelectionChangeNotification();\r\n\t\t\r\n\t}",
"public void setToggle(int toggle) {\n\t\tToggle[SortType - 1] = toggle;\n\t}",
"public static void setToggleActionSelected(ToggleDockingActionIf toggleAction,\n\t\t\tActionContext context, boolean selected) {\n\t\tsetToggleActionSelected(toggleAction, context, selected, true);\n\t}",
"public void setSelected(boolean selected) {\n\t\tiAmSelected = selected;\n\t}",
"public void resetSelectPresentation();",
"boolean isSelected();",
"boolean isSelected();",
"boolean isSelected();",
"public void selectItem(int position, boolean value) {\n if (value) {\n mSelectedItems.put(position, value);\n notifyItemChanged(position);\n } else {\n mSelectedItems.delete(position);\n notifyItemChanged(position);\n }\n }",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\tma.toggle(arg2);\n\t}",
"@Override\n\tpublic void setInvertSelection(boolean value) {\n\t\t\n\t}",
"public void toggleMode() {\n if (edit_rbmi.isSelected()) filter_rbmi.setSelected(true);\n // else if (filter_rbmi.isSelected()) edgelens_rbmi.setSelected(true);\n // else if (edgelens_rbmi.isSelected()) timeline_rbmi.setSelected(true);\n else edit_rbmi.setSelected(true);\n }",
"@Override\r\n\t\t\tpublic void seleccionar() {\n\r\n\t\t\t}",
"public void onItemStateChanged(String id, boolean selected);",
"public void toggleItem(int index) {\n if (findExpandedItemIndex() == index) {\n shrinkItem(index);\n } else {\n expandedItem(index);\n }\n }",
"@Override\n public void onMenuToggle(boolean b) {\n }",
"public void selectItem(int i) {\n checkIndex(i);\n selectedItem = i;\n }",
"public static void setToggleActionSelected(ToggleDockingActionIf toggleAction,\n\t\t\tActionContext context, boolean selected, boolean wait) {\n\n\t\tboolean shouldPerformAction = runSwing(() -> {\n\t\t\treturn toggleAction.isSelected() != selected;\n\t\t});\n\n\t\tif (shouldPerformAction) {\n\t\t\tperformAction(toggleAction, context, wait);\n\t\t}\n\t}",
"@FXML\r\n\tpublic void checkSelected() {\r\n\t\tif(!listView.getSelectionModel().isEmpty())\r\n\t\t{\r\n\t\t\tdeleteItemButton.setDisable(false);\r\n\t\t\taddToShoppingCartButton.setDisable(false);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tdeleteItemButton.setDisable(true);\r\n\t\t\taddToShoppingCartButton.setDisable(true);\r\n\t\t}\r\n\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent actionevent) {\n\t\t\t\tif (select.isSelected()) {\r\n\t\t\t\t\tservice.selectTask(row);\r\n\t\t\t\t\t// service.getTask(row).setSelected(true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tservice.cancleTask(row);\r\n\t\t\t\t\t// service.getTask(row).setSelected(false);\r\n\t\t\t\t}\r\n\t\t\t\t// System.out.println(\"after: \" + service.getSelectedSet());\r\n\r\n\t\t\t}",
"public void deselect() {\n\t\tfor (int row = 0; row < field.getRowCount(); row++) {\n\t\t\tCheckBox cb = (CheckBox) field.getWidget(row, 3);\n\t\t\tcb.setValue(false);\n\t\t}\n\t}",
"private void changeSelectedToggleNode(JFXToggleNode newSelectedNode) {\n if (toggleNodeSelected == null) {\n toggleNodeSelected = newSelectedNode;\n canvas.setCursor(Cursor.DEFAULT);\n } else if (toggleNodeSelected == newSelectedNode) {\n toggleNodeSelected = null;\n canvas.setCursor(Cursor.HAND);\n } else {\n toggleNodeSelected.setSelected(false);\n toggleNodeSelected = newSelectedNode;\n canvas.setCursor(Cursor.DEFAULT);\n }\n }",
"public void setSelected(boolean selected)\n\t{\n\t\tthis.selected = selected;\n\t}",
"@Listen(\"onClick = #selectTree\")\n\tpublic void select(){\n\t\ttreeModel.setOpenObjects(treeModel.getRoot().getChildren());\n\t\tTreeitem[] items = tree.getItems().toArray(new Treeitem[0]);\n\t\ttree.setSelectedItem(items[items.length - 1]);\n\t}",
"public boolean isSelected() {\r\n return selected;\r\n }",
"public void setSelectOnlyOne(boolean b) {\n mSeceletOnlyOne = b;\n\n if (b) {\n unselectDaysOne();\n }\n }",
"@Test\n public void selectReplacesSelectionOnlyOnce() throws Exception {\n ArgumentCaptor<Set> itemsCaptor = ArgumentCaptor.forClass(Set.class);\n\n // WHEN\n listView.select(Lists.newArrayList(A));\n verify(listener, only()).onItemSelection(itemsCaptor.capture());\n\n // THEN\n Set<?> items = itemsCaptor.getValue();\n assertThat(items, allOf(hasSize(1), contains(A)));\n }",
"public static interface SimpleSelectable extends IsSelectable {\n public void setSelected(boolean set);\n public boolean isSelected();\n }",
"public void select(T item) {\n getElement().select(SerDes.mirror(item));\n }",
"@Override\r\n\t\t\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\t\t\tif(e.getStateChange()==ItemEvent.DESELECTED)return;\r\n\t\t\t\t\t\tif(b[0].isSelected())gender=false;\r\n\t\t\t\t\t\telse gender=true;\r\n\t\t\t\t\t}",
"private void prevSelect() {\n\t\tif (selectionIndex - 1 < 0) {\n\t\t\tselectionIndex = selections.size() - 1;\n\t\t} else {\n\t\tselectionIndex--;\n\t\t}\n\t\tselected.setVisible(true);\n\t\tselected = selections.get(selectionIndex);\n\t\t\n\t}",
"public void cabDeselectAll() {\n ListView lv = getListView();\n int vCnt = lv.getCount();\n \n for (int i = 0; i < vCnt; i++) {\n \tlv.setItemChecked(i, false);\n }\n \n selectedListItems.clear();\n redrawListView();\n }",
"public void setSelected(boolean selected) {\r\n\t\tthis.selected = selected;\r\n\t}",
"public boolean forceSelection();",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (MyApplication.getIsSelect()) {\n\t\t\t\t\t// ��������ɾ�����\n\t\t\t\t\tnext_sure.setText(\"取消\");\n\t\t\t\t\tMyApplication.setIsSelect(false);\n\t\t\t\t\tmyAdapter.notifyDataSetChanged();\n\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\trl_editno.setVisibility(View.VISIBLE);\n\t\t\t\t\trl_edit.setVisibility(View.GONE);\n\t\t \n\t\t\t\t} else {\n\t\t\t\t\tnext_sure.setText(\"删除\");\n\t\t\t\t\tMyApplication.setIsSelect(true);\n\t\t\t\t\trl_edit.setVisibility(View.VISIBLE);\n\t\t\t\t\trl_editno.setVisibility(View.GONE);\n\t\t\t\t\tmyAdapter.notifyDataSetChanged();\n\t\t\t\t}\n\t\t\t}",
"@FXML\n void selectSavings(ActionEvent event) {\n \tdirectDep.setSelected(false);\n \tisLoyal.setSelected(false);\n \tdirectDep.setDisable(true);\n \tisLoyal.setDisable(false);\n }",
"public void updateSelection() {\n\t\t\n\t}"
] |
[
"0.6857458",
"0.68037623",
"0.67034584",
"0.67021364",
"0.6621559",
"0.6570519",
"0.6527432",
"0.649515",
"0.64308023",
"0.64306045",
"0.6424868",
"0.6388334",
"0.6378311",
"0.6349552",
"0.633978",
"0.631067",
"0.6255325",
"0.6236957",
"0.6229343",
"0.62164485",
"0.6197719",
"0.61800104",
"0.61336577",
"0.6127485",
"0.6098873",
"0.6089331",
"0.60819024",
"0.60574",
"0.6049624",
"0.6034859",
"0.6033859",
"0.6028307",
"0.60258836",
"0.60106206",
"0.6000362",
"0.5987093",
"0.59759754",
"0.5958427",
"0.5948436",
"0.59473974",
"0.5945009",
"0.5928491",
"0.59231144",
"0.5914521",
"0.5902609",
"0.5897361",
"0.5897361",
"0.58941644",
"0.5892202",
"0.587233",
"0.5871611",
"0.5863738",
"0.5852948",
"0.58417857",
"0.5839588",
"0.58257693",
"0.58208436",
"0.5813047",
"0.5806264",
"0.57893276",
"0.5777875",
"0.57776874",
"0.5777627",
"0.5761037",
"0.5748999",
"0.5747799",
"0.57414824",
"0.5735225",
"0.57349175",
"0.5729422",
"0.5729422",
"0.5729422",
"0.5728079",
"0.5725028",
"0.5724852",
"0.571534",
"0.57150877",
"0.57110137",
"0.56803495",
"0.56792724",
"0.56684554",
"0.56679004",
"0.565916",
"0.56580144",
"0.5656734",
"0.56553555",
"0.5649683",
"0.5649126",
"0.56487703",
"0.56425554",
"0.56346035",
"0.56281996",
"0.56167984",
"0.5613357",
"0.56127554",
"0.56096935",
"0.56082004",
"0.5606004",
"0.5605959",
"0.5590926",
"0.55826265"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
private WSResponse addTwitterData(WSResponse response, TwitterData twData) {
if(twData!=null){
if(twData.getTweets()!=null && twData.getTweets().size()>0){
for (Tweet tweet : twData.getTweets()) {
Events event=new Events();
event.setMessage(tweet.getMessage());
event.setMood(tweet.getMood().getType());
event.setSource("twitter");
event.setTime(tweet.getTime());
response.getEvents().add(event);
response.setTwitter(response.getTwitter()+1);
response.setScore(response.getScore()+tweet.getMood().getScore());
}
}
}
return response;
}
|
{
"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
|
private WSResponse addFBData(WSResponse response, FBData fbData) {
if(fbData==null) return response;
if(fbData.getEvents()!=null && fbData.getEvents().size()>0){
for (FBEvent eventData : fbData.getEvents()) {
Events event=new Events();
event.setMessage(eventData.getName());
event.setRsvp_status("attending");
event.setMood("happy");
event.setSource("facebook");
event.setTime(eventData.getTime());
event.setLocation(eventData.getLocation());
event.setLat(eventData.getLat());
event.setLon(eventData.getLon());
response.getEvents().add(event);
response.setScore(response.getScore()+0.5);
response.setFacebook(response.getFacebook()+1);
}
}
if(fbData.getPhotos()!=null && fbData.getPhotos().size()>0){
for (FBPhoto photoData : fbData.getPhotos()) {
Events photo=new Events();
photo.setPic_url(photoData.getUrl());
photo.setMood(Constants.NEU);
photo.setSource("facebook");
photo.setTime(photoData.getTime());
photo.setLocation(photoData.getLocation());
photo.setLat(photoData.getLat());
photo.setLon(photoData.getLon());
if(photoData.getPeople()!=null && photoData.getPeople().size()>0){
Tags tag=new Tags();
ArrayList<String> tags=new ArrayList<>();
for (String string : photoData.getPeople()) {
tags.add(string);
}
tag.setName(tags);
photo.setTags(tag);
}
response.setFacebook(response.getFacebook()+1);
response.getEvents().add(photo);
}
}
if(fbData.getPosts()!=null && fbData.getPosts().size()>0){
for (FBPost statusData : fbData.getPosts()) {
Events status=new Events();
status.setMessage(statusData.getMessage());
status.setMood(Constants.NEU);
status.setSource("facebook");
status.setTime(statusData.getTime());
Tags tag=new Tags();
ArrayList<String> tags=new ArrayList<String>();
tags.add(statusData.getPeople());
status.setTags(tag);
response.setFacebook(response.getFacebook()+1);
response.getEvents().add(status);
}
}
if(fbData.getStatus()!=null && fbData.getStatus().size()>0){
for (FBStatus statusData : fbData.getStatus()) {
Events status=new Events();
status.setMessage(statusData.getMessage());
status.setMood(statusData.getMood().getType());
status.setSource("facebook");
status.setLocation(statusData.getLocation());
status.setLat(statusData.getLat());
status.setLon(statusData.getLon());
status.setTime(statusData.getTime());
if(statusData.getPeople()!=null && statusData.getPeople().size()>0){
Tags tag=new Tags();
ArrayList<String> tags=new ArrayList<>();
for (String string : statusData.getPeople()) {
tags.add(string);
}
tag.setName(tags);
status.setTags(tag);
}
response.getEvents().add(status);
response.setFacebook(response.getFacebook()+1);
response.setScore(response.getScore()+statusData.getMood().getScore());
}
}
return response;
}
|
{
"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
|
Get batch id, used as a session id
|
protected String createBatchAndUpload() throws IOException {
String batchId;
try (CloseableClientResponse response = getResponse(RequestType.POST, "upload")) {
assertEquals(Status.CREATED.getStatusCode(), response.getStatus());
JsonNode node = mapper.readTree(response.getEntityInputStream());
batchId = node.get("batchId").asText();
assertNotNull(batchId);
}
// fist file
String data = "SomeDataExtractedFromNuxeoDBToFeedTensorFlow";
String fileSize = String.valueOf(data.getBytes(UTF_8).length);
Map<String, String> headers = new HashMap<>();
headers.put("Content-Type", "text/plain");
headers.put("X-Upload-Type", "normal");
headers.put("X-File-Name", "aidata.bin");
headers.put("X-File-Size", fileSize);
headers.put("X-File-Type", "application/octet-stream");
try (CloseableClientResponse response = getResponse(RequestType.POST, "upload/" + batchId + "/0", data,
headers)) {
assertEquals(Status.CREATED.getStatusCode(), response.getStatus());
JsonNode node = mapper.readTree(response.getEntityInputStream());
assertEquals("true", node.get("uploaded").asText());
assertEquals(batchId, node.get("batchId").asText());
assertEquals("0", node.get("fileIdx").asText());
assertEquals("normal", node.get("uploadType").asText());
}
// second file
data = "SomeDataExtractedFromNuxeoDBToValidateTensorFlow";
fileSize = String.valueOf(data.getBytes(UTF_8).length);
headers.clear();
headers.put("Content-Type", "text/plain");
headers.put("X-Upload-Type", "normal");
headers.put("X-File-Name", "aidatacheck.bin");
headers.put("X-File-Size", fileSize);
headers.put("X-File-Type", "application/octet-stream");
try (CloseableClientResponse response = getResponse(RequestType.POST, "upload/" + batchId + "/1", data,
headers)) {
assertEquals(Status.CREATED.getStatusCode(), response.getStatus());
JsonNode node = mapper.readTree(response.getEntityInputStream());
assertEquals("true", node.get("uploaded").asText());
assertEquals(batchId, node.get("batchId").asText());
assertEquals("1", node.get("fileIdx").asText());
assertEquals("normal", node.get("uploadType").asText());
}
return batchId;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String getBatchId() {\n return batchId;\n }",
"public String getBatchId() {\r\n return batchId;\r\n }",
"public Integer getBatchId() {\r\n\t\treturn batchId;\r\n\t}",
"public Integer getBatch_id() {\n\t\treturn batch_id;\n\t}",
"@DISPID(85)\r\n\t// = 0x55. The runtime will prefer the VTID if present\r\n\t@VTID(83)\r\n\tint batchID();",
"public String getBatchNo() {\r\n return batchNo;\r\n }",
"public java.lang.String getBatchNo () {\n\t\treturn batchNo;\n\t}",
"public long getId() {\n return session.getId();\n }",
"public long getBatch()\n {\n return m_lBatch;\n }",
"public String getBatch()\n {\n return batch;\n }",
"public java.lang.String getBatch() {\n return batch;\n }",
"public void setBatchId(Integer batchId) {\r\n\t\tthis.batchId = batchId;\r\n\t}",
"private int getIdBatchSize() {\n return ApiProperties.getPropertyAsInt(\n \"api.bigr.library.\" + ApiFunctions.shortClassName(getClass().getName()) + \".batch.size\",\n 500);\n }",
"public long getCurrentBatch()\n {\n return __m_CurrentBatch;\n }",
"private int indexOfBatchId(int batchId) {\n if (queue.isEmpty()) {\n // As an index this is past the end of the queue\n return 0;\n }\n\n // Examine the front of the queue to figure out the difference between the batchId and indexes\n // in the array. Note that since the queue is ordered by batchId, if the first batch has a\n // larger batchId then the requested batchId doesn't exist in the queue.\n MutationBatch firstBatch = queue.get(0);\n int firstBatchId = firstBatch.getBatchId();\n return batchId - firstBatchId;\n }",
"public void setBatch_id(Integer batch_id) {\n\t\tthis.batch_id = batch_id;\n\t}",
"public Integer getBatchRecordNumber() {\r\n\t\treturn batchRecordNumber;\r\n\t}",
"private synchronized int generateJobID() {\n\t\t/* generate JobID */\n\t\tint jobID = lastJobID;\n\t\tlastJobID += 1;\n\t\treturn jobID;\n\t}",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"Defines multiple tasks which can be executed as a batch (e.g. signatures which accept same data).\")\n @JsonProperty(JSON_PROPERTY_BATCH_ID)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public String getBatchId() {\n return batchId;\n }",
"private static String getUniqueId()\n\t{\n\t\tfinal int limit = 100000000;\n\t\tint current;\n\t\tsynchronized (DiskFileItem.class)\n\t\t{\n\t\t\tcurrent = counter.nextInt();\n\t\t}\n\t\tString id = Integer.toString(current);\n\n\t\t// If you manage to get more than 100 million of ids, you'll\n\t\t// start getting ids longer than 8 characters.\n\t\tif (current < limit)\n\t\t{\n\t\t\tid = (\"00000000\" + id).substring(id.length());\n\t\t}\n\t\treturn id;\n\t}",
"public String getBatchLotNo() {\n\n return batchLotNo;\n }",
"public String getSessionId() {\n HttpSession session = (HttpSession) _currentSession.get();\n if (session == null) {\n return null;\n }\n return session.getId();\n }",
"long getJobIDTarget();",
"int getClientSessionID();",
"public String getBatchName(G group, Batch<K, T> batch) {\n return \"batch(\" + batch.size() + \")\";\n }",
"public String getId() {\n\t\treturn _sessionId;\n\t}",
"public String getId()\n\t{\n\t\treturn getId( getSession().getSessionContext() );\n\t}",
"private int indexOfExistingBatchId(int batchId, String action) {\n int index = indexOfBatchId(batchId);\n hardAssert(index >= 0 && index < queue.size(), \"Batches must exist to be %s\", action);\n return index;\n }",
"@Transactional(isolation = Isolation.READ_COMMITTED, propagation = Propagation.REQUIRED)\n\tpublic Batch findOneWithTraineesAndGrades(Integer batchId);",
"java.lang.String getRequestID();",
"public gpss.Batch getBatch() {\n if (batchBuilder_ == null) {\n return batch_ == null ? gpss.Batch.getDefaultInstance() : batch_;\n } else {\n return batchBuilder_.getMessage();\n }\n }",
"public String getImportBatchno() {\r\n return importBatchno;\r\n }",
"@Transactional(isolation = Isolation.READ_COMMITTED, propagation = Propagation.REQUIRED)\n\tpublic Batch findByBatchId(Integer batchId);",
"@java.lang.Override\n public gpss.Batch getBatch() {\n return batch_ == null ? gpss.Batch.getDefaultInstance() : batch_;\n }",
"int getChunkId();",
"int getChunkId();",
"int getChunkId();",
"int getChunkId();",
"int getChunkId();",
"int getChunkId();",
"public String getID()\n\t{\n\t return this.sessionID;\n\t}",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-09-06 12:50:58.282 -0400\", hash_original_method = \"2053F7A68C82ABE32C2AF1BAEC4B5064\", hash_generated_method = \"ADA06475869C2F7BC91A27631CA3BF7E\")\n \npublic PrintJobId getId() {\n return mCachedInfo.getId();\n }",
"String getUniqueId();",
"java.lang.String getClientRecordId();",
"com.google.protobuf.ByteString\n\t\t\tgetIdBytes();",
"public void setBatchId(String batchId) {\n this.batchId = batchId == null ? null : batchId.trim();\n }",
"private int getNextSessionID() {\n\t\treturn sessionNum++;\n\t}",
"public void setBatchId(String batchId) {\r\n this.batchId = batchId == null ? null : batchId.trim();\r\n }",
"public static int getIdentifier(){\n\t\tif(index > ids.size() - 1){\n\t\t\tindex = 0;\n\t\t}\n\t\t// Post increment is used here, returns index then increments index\n\t\treturn ids.get(index++);\n\t}",
"public byte[] getNextJobID() {\n // Get next job id from GCS.\n synchronized (GlobalStateAccessor.class) {\n validateGlobalStateAccessorPointer();\n return this.nativeGetNextJobID(globalStateAccessorNativePointer);\n }\n }",
"public Batch findById(Long id) {\n return batchRepository.getOne(id);\n }",
"com.google.protobuf.ByteString getIdBytes();",
"com.google.protobuf.ByteString getIdBytes();",
"com.google.protobuf.ByteString getIdBytes();",
"com.google.protobuf.ByteString getIdBytes();",
"long getJobIDSource();",
"com.google.protobuf.ByteString\n getIdBytes();",
"public String getUniqueId(int row);",
"public long threadId();",
"public JobID getJobID() {\n \n \t\treturn this.environment.getJobID();\n \t}",
"String allocateId() throws SessionStorageException;",
"byte[] getId();",
"long getId();",
"long getId();",
"long getId();",
"long getId();",
"long getId();",
"long getId();",
"long getId();",
"long getId();",
"long getId();",
"long getId();",
"long getId();",
"long getId();",
"long getId();",
"long getId();",
"long getId();",
"long getId();",
"long getId();",
"long getId();",
"long getId();",
"public int getId() {\n\t\treturn config >> 8;\n\t}",
"com.google.protobuf.ByteString\n getIdBytes();",
"com.google.protobuf.ByteString\n getIdBytes();",
"public String getIdString() {\n return Server.getChunkIdString(this.parent.getSourceFile().getId(), this.chunkID);\n }",
"public java.lang.Long getId();",
"String getContentGeneratorId();",
"private static long getGlobalId() {\n return globalId++;\n }",
"public String getSessionID() {\n Object ref = sessionID_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n sessionID_ = s;\n return s;\n }\n }",
"public String getSessionID() {\n Object ref = sessionID_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n sessionID_ = s;\n return s;\n }\n }",
"com.google.protobuf.ByteString\n getIdBytes();",
"com.google.protobuf.ByteString\n getIdBytes();",
"com.google.protobuf.ByteString\n getIdBytes();",
"com.google.protobuf.ByteString\n getIdBytes();",
"com.google.protobuf.ByteString\n getIdBytes();",
"com.google.protobuf.ByteString\n getIdBytes();",
"com.google.protobuf.ByteString\n getIdBytes();",
"com.google.protobuf.ByteString\n getIdBytes();",
"com.google.protobuf.ByteString\n getIdBytes();",
"com.google.protobuf.ByteString\n getIdBytes();",
"public String getId()\r\n\t{\n\t\treturn id.substring(2, 5);\r\n\t}"
] |
[
"0.79045653",
"0.7903208",
"0.7859209",
"0.77034295",
"0.7653272",
"0.68800575",
"0.6807684",
"0.6513247",
"0.6505959",
"0.6448201",
"0.6370491",
"0.63407063",
"0.6299779",
"0.6299685",
"0.6288077",
"0.62859505",
"0.62851614",
"0.6114387",
"0.60745776",
"0.60267156",
"0.60213625",
"0.59832954",
"0.59832895",
"0.5921771",
"0.59143066",
"0.58882964",
"0.5875423",
"0.5856265",
"0.58486503",
"0.5840376",
"0.5831745",
"0.5813019",
"0.58096015",
"0.5801378",
"0.57987314",
"0.57987314",
"0.57987314",
"0.57987314",
"0.57987314",
"0.57987314",
"0.5791044",
"0.57808703",
"0.5768152",
"0.57600754",
"0.5753114",
"0.5743913",
"0.5735457",
"0.572882",
"0.5721794",
"0.572066",
"0.57129264",
"0.5701577",
"0.5701577",
"0.5701577",
"0.5701577",
"0.56819755",
"0.5669277",
"0.56687504",
"0.5656405",
"0.56551903",
"0.56510895",
"0.56419104",
"0.5618475",
"0.5618475",
"0.5618475",
"0.5618475",
"0.5618475",
"0.5618475",
"0.5618475",
"0.5618475",
"0.5618475",
"0.5618475",
"0.5618475",
"0.5618475",
"0.5618475",
"0.5618475",
"0.5618475",
"0.5618475",
"0.5618475",
"0.5618475",
"0.5618475",
"0.5617687",
"0.5601945",
"0.5601945",
"0.56003815",
"0.55936027",
"0.5593154",
"0.55887836",
"0.55865765",
"0.55865765",
"0.5586154",
"0.5586154",
"0.5586154",
"0.5586154",
"0.5586154",
"0.5586154",
"0.5586154",
"0.5586154",
"0.5586154",
"0.5586154",
"0.5584973"
] |
0.0
|
-1
|
Bind a IntegerProperty to the value of this text field.
|
public final void bindIntegerProperty(IntegerProperty property) {
formatter.valueProperty().bindBidirectional(property.asObject());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setOnlyInteger() {\r\n\t\tPlatform.runLater(() -> {\r\n\t\t\ttextfield.textProperty().addListener(new ChangeListener<String>() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {\r\n\t\t\t\t\tif (!newValue.matches(\"^\\\\d*\\\\d\") && !newValue.isEmpty()) {\r\n\t\t\t\t\t\ttextfield.setText(oldValue);\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 static void setTextFieldInteger(TextField txt) {\n\t\ttxt.textProperty().addListener((obs, oldValue, newValue)->{\n\t\t\tif(newValue!=null && !newValue.matches(\"\\\\d*\"))\n\t\t\t\ttxt.setText(oldValue);\n\t\t});\n\t}",
"public void bind(final TextField textField) {\n\t\t// view for the color\n\t\tthis.addView(new ColorView() {\n\t\t\tTextField that = textField;\n\n\t\t\t@Override\n\t\t\tpublic void update(ColorController controller, Object caller) {\n\t\t\t\tif (!that.equals(caller)) {\n\t\t\t\t\tthat.setText(controller.getValue().toString());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t// Listener for text field input\t\t\n\t\tEventHandler textFieldListener = new EventHandler<KeyEvent>() {\n\t\t\tTextField that = textField;\n @Override\n public void handle(KeyEvent e) {\n if (e.getCode().equals(KeyCode.ENTER)) {\n \tColorController.this.setValue(that.getText(), that);\n } else{\n //nothing\n }\n }\n };\n textField.setOnKeyReleased(textFieldListener);\n\t\t\n\t\t// Update the text field to the integer value\n\t\ttextField.setText(getValue().toString());\n\t}",
"@Override\n\tpublic String getValue() {\n\t\treturn integerLiteral;\n\t}",
"IntegerProperty getXProperty();",
"public IntegerTextField getTextField() {\n\t\treturn integerTextField;\n\t}",
"@Override\n public int getValue() {\n return Integer.parseInt(gValue.getText());\n }",
"public SimpleIntegerProperty decimalsProperty() {\n return this.converter.decimalsProperty();\n }",
"public GeopodIntegerTextField ()\r\n\t{\r\n\t\tsuper ();\r\n\t\tsuper.addFocusListener (this);\r\n\t\tsetDefaultValidRange ();\r\n\t}",
"IntegerTextField getNumberInputField() {\n\t\treturn numberInputField;\n\t}",
"public void setValue (int value)\r\n\t{\r\n\t\tsuper.setText (Integer.toString (value));\r\n\t\tvalidateTextField ();\r\n\t}",
"@Override\r\n public Integer getValue() {\n return (Integer) this.spinner.getValue();\r\n }",
"public static PropertyDescriptionBuilder<Integer> integerProperty(String name) {\n return PropertyDescriptionBuilder.start(name, Integer.class, Parsers::parseInteger);\n }",
"public IntegerSpinner(SpinnerNumberModel spinnerModel) {\n\n\t\tspinner = new JSpinner(spinnerModel);\n\n\t\tintegerTextField = new IntegerTextField(10, ((Number) spinnerModel.getValue()).longValue());\n\t\tintegerTextField.getComponent().setName(\"integer.spinner.editor\");\n\t\tNumber maximum = (Number) spinnerModel.getMaximum();\n\t\tintegerTextField.setMaxValue(\n\t\t\tmaximum == null ? null : BigInteger.valueOf(maximum.longValue()));\n\n\t\tspinner.setEditor(integerTextField.getComponent());\n\n\t\tspinnerModel.addChangeListener(e -> {\n\t\t\tNumber newVal = (Number) spinnerModel.getValue();\n\t\t\tintegerTextField.setValue(newVal.longValue());\n\t\t});\n\n\t\tintegerTextField.getComponent().addKeyListener(new KeyAdapter() {\n\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t\tObject newVal = null;\n\t\t\t\tswitch (e.getKeyCode()) {\n\t\t\t\t\tcase KeyEvent.VK_UP:\n\t\t\t\t\t\tnewVal = spinnerModel.getNextValue();\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase KeyEvent.VK_DOWN:\n\t\t\t\t\t\tnewVal = spinnerModel.getPreviousValue();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (newVal != null) {\n\t\t\t\t\tspinner.setValue(newVal);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tspinner.addMouseWheelListener(e -> {\n\t\t\tSpinnerNumberModel model = (SpinnerNumberModel) spinner.getModel();\n\t\t\ttry {\n\t\t\t\tif (e.getWheelRotation() > 0) {\n\t\t\t\t\tObject previousValue = model.getPreviousValue();\n\t\t\t\t\tif (previousValue != null) {\n\t\t\t\t\t\tspinner.setValue(previousValue);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tObject nextValue = model.getNextValue();\n\t\t\t\t\tif (nextValue != null) {\n\t\t\t\t\t\tspinner.setValue(nextValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (IllegalArgumentException iae) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t});\n\n\t\tintegerTextField.addChangeListener(e -> {\n\t\t\tBigInteger value = integerTextField.getValue();\n\t\t\tif (value == null) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tspinnerModel.setValue(value.longValue());\n\t\t});\n\n\t}",
"public IntegerProperty betProperty() {\n return bet;\n }",
"public SettableIntField(final SettableIntValue value) {\r\n this.value = value;\r\n this.addStyleName(\"settableInt\");\r\n updateDisplay();\r\n disposer.observe(value, new Observer() {\r\n public void onChange() {\r\n updateDisplay();\r\n }\r\n });\r\n addValueChangeHandler(new ValueChangeHandler<String>() {\r\n public void onValueChange(ValueChangeEvent<String> event) {\r\n try {\r\n int newValue = Integer.parseInt(event.getValue());\r\n value.setValue(newValue);\r\n } catch(NumberFormatException err) {\r\n Window.alert(\"Got number format exception. value was \" + event.getValue());\r\n updateDisplay();\r\n }\r\n }\r\n });\r\n }",
"public void setInt(int value)\n\t{\n\t\tsetText(String.valueOf(value));\n\t}",
"public SimpleIntegerProperty getIDProperty(){ return id; }",
"IntegerProperty getYProperty();",
"public void setInteger(int value) {\n this.value = value;\n }",
"public void setInteger(int value) {\n this.value = value;\n }",
"public final Bindings intProperty(String name, boolean array) {\n addProp(name, array, \"0\");\n return this;\n }",
"@Override\n public int getIntValue()\n {\n return value;\n }",
"public final ReadOnlyIntegerProperty editingIndexProperty() {\n\n return this.getWrappedControl().editingIndexProperty();\n }",
"@Override\n public HangarMessages addConstraintsTypeIntegerMessage(String property) {\n assertPropertyNotNull(property);\n add(property, new UserMessage(CONSTRAINTS_TypeInteger_MESSAGE));\n return this;\n }",
"@Override\n public int getValue() {\n return super.getValue();\n }",
"public void setIntValue(int v)\n {\n this.setValue(String.valueOf(v));\n }",
"public int getValue() {\r int retVal = 0;\r try {\r retVal = integerFormatter.parse(getText()).intValue();\r } catch (ParseException e) {\r // This should never happen because insertString allows\r // only properly formatted data to get in the field.\r toolkit.beep();\r }\r return retVal;\r }\r /**\r * Set the value of this field. This ignores the minimum and\r * maximum field values: it is the caller's responsibility to\r * respect the limits.\r * @param value The value to set.\r */\r public void setValue(int value) {\r setText(integerFormatter.format(value));\r }\r\r /**\r * Set the minimum value. This forces the value in range.\r * @param minimum The minimum value.\r */\r public void setMinimum(\r int minimum\r )\r {\r this.minimum = minimum;\r if (minimum < maximum && Integer.parseInt(getText()) < minimum) {\r String newString = Integer.toString(minimum);\r setText(newString);\r }\r }\r /**\r * Return the current minimum value.\r * @return The minimum value.\r */\r public int getMinimum()\r {\r return (minimum);\r }\r /**\r * Set the maximum value. This forces the value in range.\r * @param maximum The maximum value.\r */\r public void setMaximum(int maximum) {\r this.maximum = maximum;\r if (minimum < maximum && Integer.parseInt(getText()) > minimum) {\r String newString = Integer.toString(maximum);\r setText(newString);\r }\r }\r /**\r * Return the current maximum value.\r * @return The maximum value.\r */\r public int getMaximum() {\r return (maximum);\r }\r \r /**\r * Implement the DocumentListener interface. If the user attempts\r * to enter an invalid value, beep and force the string to\r * the last valid value.\r * @param event The TextEvent\r */\r \r\r protected Document createDefaultModel() {\r return new WholeNumberDocument();\r }\r\r protected class WholeNumberDocument extends PlainDocument {\n public static final long serialVersionUID = 13040901L;\r public void insertString(int offs, \r String str,\r AttributeSet a) \r throws BadLocationException {\r char[] source = str.toCharArray();\r char[] result = new char[source.length];\r int j = 0;\r\r for (int i = 0; i < result.length; i++) {\r if (Character.isDigit(source[i]))\r result[j++] = source[i];\r else {\r toolkit.beep();\r System.err.println(\"insertString: \" + source[i]);\r }\r }\r super.insertString(offs, new String(result, 0, j), a);\r }\r }\r}",
"@Override\r\n\tpublic String getBind_property_ind() {\n\t\treturn super.getBind_property_ind();\r\n\t}",
"public void setInput(int value) {\n\t\tnumberInputField.setValue(value);\n\t}",
"public void setInteger(int value){}",
"public IntegerEditor() {\r\n\t super();\r\n\t}",
"public void setInteger(int value);",
"public int getIntValue(){\n return value;\n }",
"public GeopodIntegerTextField (int columns)\r\n\t{\r\n\t\tsuper (columns);\r\n\t\tsuper.addFocusListener (this);\r\n\t\tsetDefaultValidRange ();\r\n\t}",
"void bind(int listIndex) {\n\n //listItemNumberView.setText(String.valueOf(listIndex));\n }",
"void setIntValue(int value)\n {\n this.value = value;\n }",
"public void setValue(Number i) {\n setText(i.toString());\n }",
"public int getItemIntValue(){\n return itemIntValue;\n }",
"public String valueAsText() {\n return \"\" + this.intValue;\n }",
"@Override\n\tpublic Contest bind(String key, String value) {\n\t\treturn find.byId(Long.getLong(value));\n\t}",
"public void setInteger(int value) {\n\t\tthis.integer = value;\n\t}",
"public Value(int i) {\n integer = i;\n itemClass = Integer.class;\n type = DataType.INT;\n }",
"public int getIntValue() {\n return intValue_;\n }",
"public PhoneTextField()\r\n {\r\n super();\r\n setText(\"000-000-0000\");\r\n\r\n phoneNumber = Pattern.compile(\"^\\\\d{3}-\\\\d{3}-\\\\d{4}$\");\r\n\r\n //Adds listener to check when focus lost\r\n focusedProperty().addListener((o, oldV, newV) -> OnChanged(newV));\r\n }",
"public int getIntValue() {\n return intValue_;\n }",
"public Object getEditorValue() {\r\n\t try{\r\n\t\treturn new Integer(getText());\r\n\t }catch(Exception e){}\r\n\t return null;\r\n\t}",
"public Integer getInteger() {\r\n\t\ttype(ConfigurationItemType.INTEGER);\r\n\t\treturn integerValue;\r\n\t}",
"public void setInteger(Integer value) {\r\n\t\ttype(ConfigurationItemType.INTEGER);\r\n\t\tthis.integerValue = value;\r\n\t}",
"public static void setIntegerFilter(TextField field) {\n UnaryOperator<TextFormatter.Change> integerFilter = change -> {\n String newText = change.getControlNewText();\n String minusAndNumbers = \"-?([1-9][0-9]*)?\";\n if (newText.matches(minusAndNumbers)) {\n return change;\n }\n return null;\n };\n\n field.setTextFormatter( new TextFormatter<Integer>(integerFilter) );\n }",
"public int getInt()\n\t{\n\t\tfinal String text = getText();\n\t\tif (text == null || text.length() == 0)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\treturn Integer.parseInt(text);\n\t}",
"public void setIndice(){\n txtIndice.setText(String.valueOf(indice));\n }",
"public int getIntegerProperty(String key) {\n String val = getProperty(key);\n return (null == val ? 1 : Integer.parseInt(val));\n }",
"void setToValue(int val);",
"public void setText(int str) { this.editText.setText(str); }",
"public static void setInteger(String prop, int value)\n {\n props.setProperty(prop, \"\" + value);\n }",
"public Int(int value) { \n this.value = value; \n }",
"public PositiveIntegerCellEditor(JTextField textField) {\n super(textField);\n this.textField = textField;\n this.textField.setHorizontalAlignment(JTextField.RIGHT);\n }",
"public int getIntegerProperty(String key) {\n\t\treturn Integer.parseInt(this.getProperty(key));\n\t}",
"public Long getAIntegerDataSourceValue() {\r\n return aIntegerDataSourceValue;\r\n }",
"public void addProperty(String key,\n int value) {\n if (this.ignoreCase) {\n key = key.toUpperCase();\n }\n\n this.attributes.put(key, Integer.toString(value));\n }",
"@Override\r\n\tprotected KDTextField getNumberCtrl() {\n\t\treturn null;\r\n\t}",
"public Integer getIntegerAttribute();",
"public int getIntValue(){\n\t\treturn value.intValue();\n\t}",
"public JTextField getNumberInput() {\r\n return numberInput;\r\n }",
"public int getNumberValue() {\r\n return number;\r\n }",
"public IntegerLiteral(Integer number)\n {\n this.literal = number; \n }",
"public void yAddBind(String bind_name, ObservableValue<? extends Number> bind);",
"public final StringProperty textProperty() {\n return text;\n }",
"public int getValue(){\n return number;\n }",
"public int getValue() {\n\t\tif (wasCancelled()) {\n\t\t\tthrow new IllegalStateException();\n\t\t}\n\t\treturn numberInputField.getIntValue();\n\t}",
"private int getValueOfField(int reference){\n Object obj = getView().findViewById(reference);\n if (obj instanceof EditText)\n if (!((EditText) obj).getText().toString().equalsIgnoreCase(\"\"))\n return Integer.parseInt(((EditText) obj).getText().toString());\n else\n return 0;\n else if (obj instanceof Button)\n if (!((Button) obj).getText().toString().equalsIgnoreCase(\"\"))\n return Integer.parseInt(((Button) obj).getText().toString());\n else\n return 0;\n else\n return -1;\n }",
"@Override\n\tpublic void initialize(URL location, ResourceBundle resources) {\n\t\tname.setText(new Controller().push());\n\t\tamount.textProperty().addListener(new ChangeListener<String>() {\n\t\t @Override\n\t\t public void changed(ObservableValue<? extends String> observable, String oldValue, \n\t\t String newValue) {\n\t\t if (!newValue.matches(\"\\\\d*\")) {\n\t\t amount.setText(newValue.replaceAll(\"[^\\\\d]\", \"\"));\n\t\t }\n\t\t }\n\t\t}); \n\t}",
"public int getValue() {\n return intValue;\n }",
"public int getValue() {\n return intValue;\n }",
"public void bindTextFields() {\n // bind character stats with TestFields\n healthTxt.textProperty().bind(world.getCharacterHealth());\n goldTxt.textProperty().bindBidirectional(world.getCharacterGold(), new NumberStringConverter() {\n });\n expTxt.textProperty().bindBidirectional(world.getCharacterExp(), new NumberStringConverter() {\n });\n }",
"public Integer getIntValue() {\n\t\treturn this.intValue;\r\n\t}",
"public int getIntValue() {\n return (int)getValue();\n }",
"public int getNumber() {\n return field.getNumber();\n }",
"public int getIntValue()\n {\n return value;\n }",
"public int getIntValue()\n {\n return value;\n }",
"public int\t\tget() { return value; }",
"public int intValue() {\n return value;\n }",
"@Override\n public void update(Observable observable, Object o) {\n if(o instanceof String){\n String m = (String)o;\n String[] partes = m.split(\":\");\n if(m.contains(\"num\") && partes.length == 2){\n final int value = Integer.parseInt(partes[1]);\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n numberOfRects.setText(\"\"+value);\n }\n });\n }\n }\n }",
"public void setIntValue(int intValueIn) {\n\t\tthis.intValue = intValueIn;\n\t}",
"public int getValue() {\n return this.value;\n }",
"public abstract void setInteger(int value);",
"public int intValue() {\r\n return _value;\r\n }",
"public int getIntegerValue() {\r\n\t\t\treturn val;\r\n\t\t}",
"protected void addNumberPropertyDescriptor(Object object) {\n itemPropertyDescriptors.add\n (createItemPropertyDescriptor\n (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n getResourceLocator(),\n getString(\"_UI_ProceedingsType_number_feature\"),\n getString(\"_UI_PropertyDescriptor_description\", \"_UI_ProceedingsType_number_feature\", \"_UI_ProceedingsType_type\"),\n BibtexmlPackage.Literals.PROCEEDINGS_TYPE__NUMBER,\n true,\n false,\n false,\n ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n null,\n null));\n }",
"public int get_int_value()\n\t{\n\t\treturn this.int_value;\n\t}",
"ReadOnlyStringProperty labelMaximumProperty();",
"public void setProperty(Integer t) {\n\n\t\t}",
"@Override\n\tpublic Integer getValue() {\n\t\treturn value;\n\t}",
"@Override\n\tpublic Integer getValue() {\n\t\treturn value;\n\t}",
"public int getValue() {\n return value_;\n }",
"public int getValue(){\n return selectedValue;\n }",
"public IntegerIdentifier(String name, int type, int value) {\n super(name, type); //String and integer declaration\n this.value = value;//set this.value to value\n }",
"private void changeIntModifier(String newValue, int max, Box<Integer> valueToChange, Slider slider, TextField textField, int stringLength) {\n String filtered = newValue.replaceAll(\"[^0-9]\", \"\");\n int parsed = filtered.isEmpty() ? 0 : Integer.parseInt(filtered);\n int value = Math.min(Math.max(parsed, 0), max);\n valueToChange.val = value;\n slider.setValue(value);\n textField.setText(filtered.length() > stringLength ? filtered.substring(0, stringLength) : filtered);\n if (parsed > max) textField.setStyle(\"-fx-text-fill: red;\");\n else textField.setStyle(\"-fx-text-fill: black;\");\n }",
"public DoubleProperty valueProperty() {\n return value;\n }"
] |
[
"0.63001233",
"0.62937963",
"0.60279125",
"0.5897684",
"0.5849129",
"0.56828904",
"0.56559736",
"0.5577914",
"0.55406654",
"0.5531045",
"0.55188936",
"0.5470203",
"0.532619",
"0.5318167",
"0.52854556",
"0.52632135",
"0.5241514",
"0.52348363",
"0.51901126",
"0.5157234",
"0.5157234",
"0.5124505",
"0.51056486",
"0.50896645",
"0.50700843",
"0.504775",
"0.5043947",
"0.5032877",
"0.50283945",
"0.50269604",
"0.5022968",
"0.4992873",
"0.49921876",
"0.4984145",
"0.49512014",
"0.49506125",
"0.49473774",
"0.49393997",
"0.49388564",
"0.4938518",
"0.493019",
"0.49134484",
"0.49091983",
"0.4899457",
"0.48802996",
"0.48659536",
"0.48643988",
"0.48618394",
"0.48527095",
"0.48333487",
"0.48174387",
"0.48169577",
"0.48139808",
"0.48137382",
"0.4812063",
"0.48086873",
"0.48034352",
"0.47974208",
"0.4795111",
"0.47948188",
"0.47934863",
"0.4763943",
"0.47519067",
"0.4748723",
"0.47480515",
"0.4718257",
"0.47080317",
"0.47080094",
"0.47060424",
"0.47030443",
"0.47023618",
"0.46994415",
"0.46905735",
"0.46892604",
"0.46892604",
"0.46872085",
"0.4685541",
"0.46800306",
"0.46721038",
"0.4668383",
"0.4668383",
"0.4666784",
"0.46637702",
"0.46582404",
"0.4654659",
"0.46501392",
"0.46467155",
"0.46367854",
"0.46331164",
"0.46292725",
"0.4622589",
"0.46196985",
"0.46177334",
"0.46172136",
"0.46172136",
"0.4608433",
"0.46083155",
"0.46042442",
"0.4602907",
"0.4600519"
] |
0.7279867
|
0
|
Returns the seconds entered in this field.
|
public Integer getValue() {
return formatter.getValue();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public int getSeconds() {\r\n\t\treturn this.seconds;\r\n\t}",
"public int getSeconds() {\n return this.seconds;\n }",
"public double getSeconds() {\n return seconds;\n }",
"public int getSeconds()\n {\n return seconds;\n }",
"public double getSeconds() {\n return this.seconds;\n }",
"EDataType getSeconds();",
"public int getSeconds() {\r\n return FormatUtils.uint8ToInt(mSeconds);\r\n }",
"public int getSeconds(){\r\n return Seconds;\r\n }",
"public int getSeconds(){\n return (int) (totalSeconds%60);\n }",
"public SpinnerNumberModel getSecondsModel() {\n\treturn this.secondsModel;\n }",
"public int getSecondsPassed()\n {\n return this.seconds;\n }",
"public double getAsSeconds()\n {\n return itsValue / 1000000.0;\n }",
"public double getSecs( );",
"int getPaceSeconds() {\r\n\t\tint m = getContents(minutes);\r\n\t\tint s = getContents(seconds);\r\n\t\treturn 60*m +s;\r\n\t}",
"@Override\r\n\tpublic int getPlayTimeSeconds() {\r\n\t\treturn this.minutes * 60 + this.seconds;\r\n\t}",
"public int getSec(){\n\t\treturn sec;\n\t}",
"public final native int getSeconds() /*-{\n return this.getSeconds();\n }-*/;",
"@java.lang.Override\n public int getTtiSeconds() {\n return ttiSeconds_;\n }",
"@java.lang.Override\n public int getTtiSeconds() {\n return ttiSeconds_;\n }",
"public static double getSecondsTime() {\n\t\treturn (TimeUtils.millis() - time) / 1000.0;\n\t}",
"public float getTimeSeconds() { return getTime()/1000f; }",
"public int getTempoSec() {\n return tempoSec;\n }",
"public int getSecond() {\n return dateTime.getSecond();\n }",
"@Schema(description = \"The time in seconds spent working on the issue. Required when creating a worklog if `timeSpent` isn't provided. Optional when updating a worklog. Cannot be provided if `timeSpent` is provided.\")\n public Long getTimeSpentSeconds() {\n return timeSpentSeconds;\n }",
"public java.lang.Integer getPlaySeconds() {\n return play_seconds;\n }",
"public JTextField getTimeTextField() {\n\t\treturn this.txtTime;\n\t}",
"public java.lang.Integer getPlaySeconds() {\n return play_seconds;\n }",
"public String getCurrentSeconds() {\n\t\t\t\t// DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n\t\t\t\t// need to change after the date format is decided\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"ss\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}",
"int getTtiSeconds();",
"public int getIntervalSeconds() {\n return this.intervalSeconds;\n }",
"public Integer periodSeconds() {\n return this.periodSeconds;\n }",
"protected int getDuration() {\n try {\n return Utils.viewToInt(this.durationInput);\n }\n catch (NumberFormatException ex) {\n return Integer.parseInt(durationInput.getHint().toString());\n }\n }",
"public com.google.protobuf.Int32Value getRemainingTimeSeconds() {\n if (remainingTimeSecondsBuilder_ == null) {\n return remainingTimeSeconds_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : remainingTimeSeconds_;\n } else {\n return remainingTimeSecondsBuilder_.getMessage();\n }\n }",
"public double getUserTimeSec() {\n\treturn getUserTime() / Math.pow(10, 9);\n}",
"public int getLaSeconds() {\n return laSeconds;\n }",
"public long getElapsedSeconds() {\n\t\tlong elapsed;\n\t\tif (running) {\n\t\t\telapsed = (System.nanoTime() - startTime);\n\t\t} else {\n\t\t\telapsed = (stopTime - startTime);\n\t\t}\n\t\treturn elapsed / nsPerSs;\n\t}",
"@java.lang.Override\n public com.google.protobuf.Int32Value getRemainingTimeSeconds() {\n return remainingTimeSeconds_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : remainingTimeSeconds_;\n }",
"public double playTimeInSeconds(){\n\t\treturn durationInSeconds;\n\t}",
"@Contract(pure = true)\n\tpublic abstract int getSeconds();",
"public int getSecond() {\n return this.timeRuunableThread.getSecond();\n }",
"public final native double setSeconds(int seconds) /*-{\n this.setSeconds(seconds);\n return this.getTime();\n }-*/;",
"@Override\n\tpublic int existseconds() {\n\t\treturn seconds;\n\t}",
"public Integer timeoutSeconds() {\n return this.timeoutSeconds;\n }",
"public double getSecondsEnd() {\n return secondsEnd;\n }",
"private int getSecondsFromTimeString(String text) {\n int timeInSeconds = -1;\n if ( text != null && !\"\".equals(text) ) {\n int ipos = text.indexOf(\"Date:\");\n String txtDate = (ipos >= 0 ? text.substring(ipos+5).trim() : text.trim());\n ipos = text.lastIndexOf(\":\");\n if ( ipos > 0 ) {\n int endPos = ipos + 3;\n ipos = text.lastIndexOf(\":\",ipos-1);\n if ( ipos > 0 ) {\n int startPos = ipos - 2;\n if ( startPos >= 0 && endPos > startPos ) {\n text = text.substring(startPos, endPos);\n String[] values = text.split(\":\");\n if ( values.length > 2 ) {\n int hours = Integer.valueOf(values[0]);\n int minutes = Integer.valueOf(values[1]);\n int seconds = Integer.valueOf(values[2]);\n timeInSeconds = (hours * 3600) + (minutes * 60) + seconds;\n }\n }\n }\n }\n }\n return timeInSeconds;\n }",
"public long getIntervalSeconds()\n {\n return __m_IntervalSeconds;\n }",
"@Contract(pure = true)\n\tpublic int getSecondsFromMinute() {\n\t\treturn (getSeconds() - getMinutes() * 60);\n\t}",
"public Long tolerationSeconds() {\n return this.tolerationSeconds;\n }",
"public String getH_time_textFieldText() {\n return H_time_textField.getText();\n }",
"public double getAnimationSeconds()\n\t{\n\t\treturn seconds_passed;\n\t}",
"public String getStopTime() {\n\t\treturn (new Parser(value)).skipString().getString();\n\t}",
"public long getElapsedTimeSecs() {\n return running ? ((System.currentTimeMillis() - startTime) / 1000) % 60 : 0;\n }",
"public java.lang.Integer getSecondsWatched() {\n return seconds_watched;\n }",
"public final native int getUTCSeconds() /*-{\n return this.getUTCSeconds();\n }-*/;",
"public com.google.protobuf.Int32ValueOrBuilder getRemainingTimeSecondsOrBuilder() {\n if (remainingTimeSecondsBuilder_ != null) {\n return remainingTimeSecondsBuilder_.getMessageOrBuilder();\n } else {\n return remainingTimeSeconds_ == null ?\n com.google.protobuf.Int32Value.getDefaultInstance() : remainingTimeSeconds_;\n }\n }",
"public java.lang.Integer getSecondsWatched() {\n return seconds_watched;\n }",
"public double getSystemTimeSec() {\n\treturn getSystemTime() / Math.pow(10, 9);\n}",
"static long getSecondsPart(Duration d) {\n long u = d.getSeconds() % 60;\n\n return u;\n }",
"public double time() {\n long diff = System.nanoTime() - start;\n double seconds = diff * 0.000000001;\n return seconds;\n }",
"public int getduration() {\n\t\tDuration duration = Duration.between(initial_time, current_time);\n\t\treturn (int)duration.getSeconds();\n\t}",
"public int getSamplingSeconds() {\n return samplingSeconds;\n }",
"public String getTimeToLiveSeconds() {\n return timeToLiveSeconds+\"\";\n }",
"public void setSeconds(double seconds) {\n this.seconds = seconds;\n }",
"public void setSeconds(double seconds) {\n this.seconds = seconds;\n }",
"public int getTimeOut()\r\n\t{\r\n\t\tString time = JOptionPane.showInputDialog(null, \"Please enter the timeout amount in milliseconds: \", \"Set Timeout\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t//Check to see if the entry was invalid\r\n\t\twhile(!isNumber(time))\r\n\t\t\ttime = JOptionPane.showInputDialog(null, \"You must enter a NUMBER. Please re-enter the timeout time in milliseconds: \", \"Set Timeout\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\r\n\t\treturn Integer.parseInt(time);\r\n\t}",
"public int getUpSeconds() {\n return (int)((_uptime % 60000) / 1000);\n }",
"public long getSecondsUntilNextExecutionTime() {\n\t\treturn (getNextExecutionTime().getTime() - System.currentTimeMillis()) / 1000;\n\t\t\n\t}",
"public int getSlaSeconds() {\r\n String sla = this.getAttribute(WorkAttributeConstant.SLA);\r\n if (sla == null || sla.length() == 0)\r\n return 0;\r\n String unit = this.getAttribute(WorkAttributeConstant.SLA_UNITS);\r\n if (unit == null || unit.isEmpty())\r\n unit = this.getAttribute(WorkAttributeConstant.SLA_UNIT);\r\n if (unit == null || unit.isEmpty())\r\n unit = ServiceLevelAgreement.INTERVAL_HOURS;\r\n return ServiceLevelAgreement.unitsToSeconds(sla, unit);\r\n }",
"public int getTimeoutInSeconds() {\n return timeoutInSeconds;\n }",
"public int getLoSeconds() {\n return loSeconds;\n }",
"@Schema(description = \"The time spent working on the issue as days (\\\\#d), hours (\\\\#h), or minutes (\\\\#m or \\\\#). Required when creating a worklog if `timeSpentSeconds` isn't provided. Optional when updating a worklog. Cannot be provided if `timeSpentSecond` is provided.\")\n public String getTimeSpent() {\n return timeSpent;\n }",
"public long getTs() {\n return ts;\n }",
"public double getSecond() {\n return second;\n }",
"public final native double setSeconds(int seconds, int millis) /*-{\n this.setSeconds(seconds, millis);\n return this.getTime();\n }-*/;",
"public FormatTimerValues(int seconds) {\r\n this.seconds = seconds;\r\n }",
"public float getSecondSSN(){\n\t\t return SecondSSN;\n\t\t }",
"public long timeLeftInSeconds(){\n Date currTime = new Date();\n long diff = hackathonEndTime.getTime() - currTime.getTime();\n long diffSec = diff/1000;\n\n //truncate to show relevant time\n if(diffSec > 34.5*3600){diffSec = (long)(34.5*3600);}\n if(diffSec < 0){diffSec = 0;}\n\n return diffSec;\n }",
"public long getTs() {\n return ts;\n }",
"public long getQueryTimeSec() {\n return queryTimeSec_;\n }",
"public int getHours(){\n return (int) totalSeconds/3600;\n }",
"public long getQueryTimeSec() {\n return queryTimeSec_;\n }",
"public void getSecsDetail( );",
"public static int getTimeSeconds() {\n return Atlantis.getBwapi().getFrameCount() / 30;\n }",
"@SuppressLint(\"MethodNameUnits\")\n @IntRange(from = IKE_SOFT_LIFETIME_SEC_MINIMUM, to = IKE_HARD_LIFETIME_SEC_MAXIMUM)\n public int getSoftLifetimeSeconds() {\n return mSoftLifetimeSec;\n }",
"@java.lang.Override\n public com.google.protobuf.Int32ValueOrBuilder getRemainingTimeSecondsOrBuilder() {\n return getRemainingTimeSeconds();\n }",
"public int getGMTOffSetSeconds() throws Exception {\n return getGMTOffSetSeconds(\"\");\n }",
"public static int getCurrentSecond()\n\t{\n\t\treturn Calendar.getInstance().get(Calendar.SECOND);\n\t}",
"public float getSecondsElapsed() { return _startTime==0? 0 : (System.currentTimeMillis() - _startTime)/1000f; }",
"public static long getSeconds(Timestamp timestamp) {\n long ms = timestamp.getTime();\n return ms > 0 ? (ms / 1000) : (ms - 999)/1000;\n }",
"public int getSecond() {\n\t\treturn second;\n\t}",
"public Date getInputTime() {\n return inputTime;\n }",
"public Date getInputTime() {\n return inputTime;\n }",
"public Integer getCusTime() {\r\n return cusTime;\r\n }",
"long getQueryTimeSec();",
"public double getStopTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STOPTIME$24);\r\n if (target == null)\r\n {\r\n return 0.0;\r\n }\r\n return target.getDoubleValue();\r\n }\r\n }",
"public int getTimeSec(int columnIndex) {\n TimeSecVector vector = (TimeSecVector) table.getVector(columnIndex);\n return vector.get(rowNumber);\n }",
"public String durationInMinutesAndSeconds( ){\n\t\t\n\t\tString time = \"\";\n\t\t\n\t\tint duration = totalTime();\n\n\t\tint minutes = 0;\n\n\t\tint seconds = 0;\n\n\t\tminutes = (int) (duration/60);\n\n\t\tseconds = (int) (duration- (minutes*60));\n\n\t\ttime = minutes + \":\" + seconds +\"\";\n\t\treturn time;\n\t\t\n\t}",
"@Override\n public int getTimeForNextTicInSeconds() {\n int seconds = Calendar.getInstance().get(Calendar.SECOND);\n return 60 - seconds;\n }",
"@Transient\n \tpublic int getDuration() {\n \t\tint duration = (int) (this.endTime.getTime() - this.startTime.getTime());\n \t\treturn duration / 1000;\n \t}",
"public long getSessionDuration(){\n return (currentTime-startTime)/1000;\n }",
"public long getTimeInMilliSeconds() {\n return timeInMilliSeconds_;\n }"
] |
[
"0.73100024",
"0.7303961",
"0.726604",
"0.7263292",
"0.7223982",
"0.72186595",
"0.7052031",
"0.6965133",
"0.69259447",
"0.6784067",
"0.66591233",
"0.6600263",
"0.65640014",
"0.65459824",
"0.65370387",
"0.6526294",
"0.6513149",
"0.64138716",
"0.6386666",
"0.63204724",
"0.6296197",
"0.6255856",
"0.62519675",
"0.62456775",
"0.61557645",
"0.6141008",
"0.6139452",
"0.6098284",
"0.6082029",
"0.60815644",
"0.6077406",
"0.6063563",
"0.6057236",
"0.6036076",
"0.6033637",
"0.5999536",
"0.5990674",
"0.59835416",
"0.5981248",
"0.5970247",
"0.5959906",
"0.59575164",
"0.5937284",
"0.593471",
"0.59217644",
"0.58872545",
"0.5870024",
"0.5868927",
"0.58285093",
"0.5822301",
"0.5817239",
"0.5802947",
"0.5797724",
"0.5771132",
"0.5753112",
"0.57493466",
"0.5732855",
"0.5721405",
"0.5711728",
"0.57020605",
"0.5689633",
"0.56425023",
"0.56354034",
"0.56354034",
"0.5632861",
"0.56311417",
"0.5628434",
"0.5626128",
"0.56096905",
"0.56053907",
"0.5588578",
"0.5587053",
"0.5583627",
"0.55676764",
"0.55458987",
"0.55179447",
"0.5506488",
"0.550593",
"0.5503451",
"0.5493237",
"0.5482803",
"0.548127",
"0.54691726",
"0.5466677",
"0.546197",
"0.5454682",
"0.54489005",
"0.54439336",
"0.5440523",
"0.54401135",
"0.5435157",
"0.5435157",
"0.5434658",
"0.54169893",
"0.54158133",
"0.5391896",
"0.53868407",
"0.5376813",
"0.53549486",
"0.53503156",
"0.5325551"
] |
0.0
|
-1
|
Create the lookahead sequence.
|
public LookaheadSequence(final Sequence seq) {
mSeq = seq;
mNext = seq.next();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"protected Token lookahead() {\n return m_current;\n }",
"public void read_lookahead() throws Exception {\r\n this.lookahead = new Symbol[error_sync_size()];\r\n for (int i = 0; i < error_sync_size(); i++) {\r\n this.lookahead[i] = this.cur_token;\r\n this.cur_token = scan();\r\n }\r\n this.lookahead_pos = 0;\r\n }",
"FlowSequence createFlowSequence();",
"Sequence createSequence();",
"@Test\n\tpublic void testLookaheadBoundary() {\n\t\t\n\t\t\n\t\tString lookaheads[] = {\"[true, f\", \"{\\\"boo\\\": nu\", \"[false, tr\", \"[false, t\", \"[false, tru\"};\n\t\t\n\t\tfor (String lookahead: lookaheads) {\n\t\t\tJSONParser jp = new JSONParser();\n\t\t\tList<ParsedElement> elements = jp.parse(lookahead);\n\t\t\tassertTrue(String.format(\"lookahead <%s> doesn't crash the parser\", lookahead),elements.size() == 3);\n\t\t}\n\t\t\n\t\tJSONParser jp = new JSONParser();\n\t\tList<ParsedElement> elements = jp.parse(\"{\\\"foo\\\": true\");\n\t\tassertTrue(\"Barewords are parsed at the right lookahead length\", elements.size() == 4);\n\t\t\n\t\telements = jp.parse(\"{\\\"foo\\\": false\");\n\t\tassertTrue(\"Barewords are parsed at the right lookahead length\", elements.size() == 4);\n\t\t\n\t\telements = jp.parse(\"[1, 2, 3, nul\");\n\t\tassertTrue(\"Barewords are parsed at the right lookahead length\", elements.size() == 7);\n\t}",
"SequenceFlow createSequenceFlow();",
"@Test\n public void subSequencesTest3() {\n String text = \"wnylazlzeqntfpwtsmabjqinaweaocfewgpsrmyluadlybfgaltgljrlzaaxvjehhygggdsrygvnjmpyklvyilykdrphepbfgdspjtaap\"\n + \"sxrpayholutqfxstptffbcrkxvvjhorawfwaejxlgafilmzrywpfxjgaltdhjvjgtyguretajegpyirpxfpagodmzrhstrxjrpirlbfgkhhce\"\n + \"wgpsrvtuvlvepmwkpaeqlstaqolmsvjwnegmzafoslaaohalvwfkttfxdrphepqobqzdqnytagtrhspnmprtfnhmsrmznplrcijrosnrlwgds\"\n + \"bylapqgemyxeaeucgulwbajrkvowsrhxvngtahmaphhcyjrmielvqbbqinawepsxrewgpsrqtfqpveltkfkqiymwtqssqxvchoilmwkpzermw\"\n + \"eokiraluaammkwkownrawpedhcklrthtftfnjmtfbftazsclmtcssrlluwhxahjeagpmgvfpceggluadlybfgaltznlgdwsglfbpqepmsvjha\"\n + \"lwsnnsajlgiafyahezkbilxfthwsflgkiwgfmtrawtfxjbbhhcfsyocirbkhjziixdlpcbcthywwnrxpgvcropzvyvapxdrogcmfebjhhsllu\"\n + \"aqrwilnjolwllzwmncxvgkhrwlwiafajvgzxwnymabjgodfsclwneltrpkecguvlvepmwkponbidnebtcqlyahtckk\";\n\n String[] expected = new String[6];\n expected[0] = \"wlfaafrdarvgypipgaputcjflmftgepfmrrhpvwllnfofdqqtmhnjlyeewvxhceqpgftysopelkrhhjtmlapcagllpasazflfthohdtrrvobliwnhazafeevpnlk\";\n expected[1] = \"nzpbwemllljggylhdaatprhwgzxdttypzxlhslksmeohkronrpmprwlmubovmylispqkmqizouwactmatlhmedagfmlafktgmfhcjlhxoagjullcrfxbslceoeyk\";\n expected[2] = \"yewjewyytzegvkyespyqtkoaarjhyaiarjbcrvptsgsatpbyhrslogaycawnajvnxspfwxlekakwkftzcujgglldbswjybhktxcizpypppchanlxwawjctgpnba\";\n expected[3] = \"lqtqaglbgahdnlkppshffxrefygjgjrghrfeveaavmllthqtstrrsdpxgjsgprqarrvktvmriaopltfsswevgytwpvslaiwirjfricwgzxmhqjzvljnglrumbth\";\n expected[4] = \"ansiopuflahsjvdbjxoxfvajiwavuepospgwtpeqjzavfezapfmcnsqeurrthmbweqeqqcwmrmwerfbcshaflbzsqjnghlswabsbibwvvdfsrowgwvyowpvwict\";\n expected[5] = \"ztmncsagjxyrmyrftrlsbvwxlpljrgxdtikgumqowaawxpdgnnzirbgalkhahibewtlishkwamndtnflrxgpufngehniexfgwbykxcncyrelwlmkigmdnklkdqc\";\n int keyLen = 6;\n String[] owns = this.ic.subSequences(text, keyLen);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }",
"public void restart_lookahead() throws Exception {\r\n for (int i = 1; i < error_sync_size(); i++) {\r\n Symbol[] symbolArr = this.lookahead;\r\n symbolArr[i - 1] = symbolArr[i];\r\n }\r\n this.cur_token = scan();\r\n this.lookahead[error_sync_size() - 1] = this.cur_token;\r\n this.lookahead_pos = 0;\r\n }",
"private Sequence makeSequence(String[] sList, int index) {\r\n\t\tSequence s = new Sequence();\r\n\t\tfor(int i = 0; i<sList.length; i++) {\r\n\t\t\ts.addAfter(sList[i]);\r\n\t\t}\r\n\t\ts.start();\r\n\t\tfor(int i=0; i<index; i++) {\r\n\t\t\ts.advance();\r\n\t\t}\r\n\t\treturn s;\r\n\t}",
"private Sequence createSequence(String[] newArray, int capacity, int currentIndex){\n Sequence sq = new Sequence(capacity);\n for(String element:newArray){\n sq.addAfter(element);\n }\n sq.start();\n for(int i = 0; i < currentIndex; i++){\n sq.advance();\n }\n return sq;\n\n }",
"@Test\n public void testConstructorTransformations() {\n\n String t1 = \"A C G T A C G T A A A A\";\n Sequence seq1 = new Sequence(\"t1\", t1, five);\n assertTrue(s1.equals(seq1.sequence()));\n\n String t2 = \"acgtacgtaaaa\";\n Sequence seq2 = new Sequence(\"t2\", t2, five);\n assertTrue(s1.equals(seq2.sequence()));\n\n }",
"public SequenceNumberTest() {}",
"@Before\r\n\tpublic void constructObj (){\r\n\t\tproteinSeq = new ProteinSequence(new char[]{'A','A','T','G','C','C','A','G','T','C','A','G','C','A','T','A','G','C','G'});\r\n\t}",
"private AppendableCharSequence(char[] chars)\r\n/* 20: */ {\r\n/* 21: 33 */ this.chars = chars;\r\n/* 22: 34 */ this.pos = chars.length;\r\n/* 23: */ }",
"public TextBuffer constructTextBuffer()\n/* */ {\n/* 137 */ return new TextBuffer(this._bufferRecycler);\n/* */ }",
"public void createInitialSequence() {\n Sequence seq = new Sequence();\n Map<String, Integer> previousGameByTeam = new HashMap<String, Integer>();\n List<Game> games = new ArrayList<Game>(this.games);\n int currentTime = 0;\n while (!games.isEmpty()) {\n Game nextGame = findBestUpcomingGame(games, previousGameByTeam, currentTime);\n seq.addGame(nextGame);\n if (!nextGame.isFinal()) {\n previousGameByTeam.put(nextGame.getTeam1().getName(), currentTime);\n previousGameByTeam.put(nextGame.getTeam2().getName(), currentTime);\n }\n currentTime += nextGame.getDuration();\n games.remove(nextGame);\n }\n applySequence(seq);\n bestSequence = seq;\n }",
"@Override\n\tpublic int sequence() {\n\t\treturn 0;\n\t}",
"private Sequence() {\n this(\"<Sequence>\", null, null);\n }",
"private void nextMovement()\n\t{\n\t\tif(SEQUENCE.length <= 1)\n\t\t\tSEQUENCE = null;\n\t\telse\n\t\t{\n\t\t\tint[] temp = new int[SEQUENCE.length - 1];\n\t\t\tfor(int i = 1; i < SEQUENCE.length; i++)\n\t\t\t{\n\t\t\t\ttemp[i-1] = SEQUENCE[i];\n\t\t\t}\n\t\t\tSEQUENCE = temp;\n\t\t}\n\t}",
"public LabelsSequence (Labels[] seq)\n\t{\n\t\tfor (int i = 0; i < seq.length-1; i++)\n\t\t\tif (!Alphabet.alphabetsMatch(seq[i], seq[i+1])) \n\t\t\t\tthrow new IllegalArgumentException (\"Alphabets do not match\");\n\t\tthis.seq = new Labels[seq.length];\n\t\tSystem.arraycopy (seq, 0, this.seq, 0, seq.length);\n\t}",
"public Spill() {\n\t\tthis(0, null);\n\t}",
"public Pattern getActivationPatter() {\n\treturn Pattern.compile(ACTIVATION_PATTERN);\n }",
"public void testSequenceNumWrapAround() {\n\t\tByteStreamNALUnit[] stream = new ByteStreamNALUnit[70000];\n\t\tfor (int i = 0; i < stream.length; i++) {\n\t\t\tstream[i] = new ByteStreamNALUnit(START_CODE_4, SAMPLE_STREAM[3].nalUnit, i);\n\t\t}\n\n\t\tStreamVerifier verifier = new StreamVerifier(stream);\n\t\tSdlSession session = createTestSession();\n\t\tRTPH264Packetizer packetizer = null;\n\t\ttry {\n\t\t\tpacketizer = new RTPH264Packetizer(verifier, SessionType.NAV, SESSION_ID, session);\n\t\t} catch (IOException e) {\n\t\t\tfail();\n\t\t}\n\t\tMockVideoApp encoder = new MockVideoApp(packetizer);\n\n\t\ttry {\n\t\t\tpacketizer.start();\n\t\t} catch (IOException e) {\n\t\t\tfail();\n\t\t}\n\n\t\tencoder.inputByteStreamWithArray(stream);\n\t\ttry {\n\t\t\tThread.sleep(2000, 0);\n\t\t} catch (InterruptedException e) {}\n\n\t\tpacketizer.stop();\n\t\tassertEquals(stream.length, verifier.getPacketCount());\n\t}",
"public boolean advance_lookahead() {\r\n this.lookahead_pos++;\r\n if (this.lookahead_pos < error_sync_size()) {\r\n return true;\r\n }\r\n return false;\r\n }",
"static Tour sequence() {\r\n\t\tTour tr = new Tour();\r\n\t\tfor (int i = 0; i < tr.length(); i++) {\r\n\t\t\ttr.index[i] = i;\r\n\t\t}\r\n\t\ttr.distance = tr.distance();\r\n\t\treturn tr;\r\n\t}",
"public static FastaSequence makeSequence(String header, String sequence)\r\n\t{\r\n\t\treturn new FastaSequence(header, sequence);\r\n\t}",
"@Test\n public void testAnyDigitSequences() {\n assertThat(regex(seq(e(\"0\"), e(\"1\"), X))).isEqualTo(\"01\\\\d\");\n // \"\\d\\d\" is shorter than \"\\d{2}\"\n assertThat(regex(seq(X, X))).isEqualTo(\"\\\\d\\\\d\");\n assertThat(regex(seq(X, X, X))).isEqualTo(\"\\\\d{3}\");\n // Top level optional groups are supported.\n assertThat(regex(opt(seq(X, X)))).isEqualTo(\"(?:\\\\d{2})?\");\n // Optional parts go at the end.\n assertThat(regex(\n seq(\n opt(seq(X, X)),\n X, X)))\n .isEqualTo(\"\\\\d\\\\d(?:\\\\d{2})?\");\n // \"(x(x(x)?)?)?\"\n Edge anyGrp = opt(seq(\n X,\n opt(seq(\n X,\n opt(X)))));\n // The two cases of a group on its own or as part of a sequence are handled separately, so\n // must be tested separately.\n assertThat(regex(anyGrp)).isEqualTo(\"\\\\d{0,3}\");\n assertThat(regex(seq(e(\"1\"), e(\"2\"), anyGrp))).isEqualTo(\"12\\\\d{0,3}\");\n // xx(x(x(x)?)?)?\"\n assertThat(regex(seq(X, X, anyGrp))).isEqualTo(\"\\\\d{2,5}\");\n // Combining \"any digit\" groups produces minimal representation\n assertThat(regex(seq(anyGrp, anyGrp))).isEqualTo(\"\\\\d{0,6}\");\n }",
"protected abstract StackManipulation preparation();",
"@Test\n public void rnatest1(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n char[] firstArr = new char[3];\n char[] answer = {'P','L','A'};\n for(int i = 0; i < firstArr.length; i++){\n firstArr[i] = first.aminoAcid;\n System.out.println(first.aminoAcid);\n first = first.next;\n }\n assertArrayEquals(answer, firstArr);\n }",
"@Test\n\tpublic void testSequence(){\n\t\tVariable x = new Variable(\"x\");\n\t\tOperator plus = new Operator(\"+\");\n\t\tExpression one = f.createNumNode(1);\n\t\tExpression two = f.createNumNode(2);\n\t\tExpression exp = f.createInfixNode(plus, one, two);\n\t\tStatement decl = f.createDeclNode(x);\n\t\tStatement assign = f.createAssignNode(x,exp);\n\t\tStatement seq = f.createSequenceNode(decl, assign);\n\t\tassertEquals(seq.textRepresentation(), \"var x; x = 1 + 2;\");\n\n\t\tASTNodeCountVisitor v = new ASTNodeCountVisitor();\n\t\tseq.accept(v);\n\t\tassertEquals(\"sequence test1 fail\", v.numCount, 2);\n\t\tassertEquals(\"sequence test2 fail\", v.infixCount, 1);\n\t\tassertEquals(\"sequence test3 fail\", v.decCount, 1);\n\t\tassertEquals(\"sequence test4 fail\", v.seqCount, 1);\n\t\tassertEquals(\"sequence test5 fail\", v.assignCount, 1);\n\t\tassertEquals(\"sequence test6 fail\", v.varCount, 0);\n\t\tassertEquals(\"sequence test7 fail\", v.strCount, 0);\n\t\tassertEquals(\"sequence test8 fail\", v.prefixCount, 0);\n\t}",
"private void prepare(Source s) {\r\n source = s;\r\n input = source.rawText();\r\n ok = true;\r\n start = in = out = marked = lookahead = 0;\r\n failures = new TreeSet<>();\r\n output = new StringBuffer();\r\n outCount = 0;\r\n }",
"private int forwardPosition() {\n\t\treturn (position + 1) % (maxPosition + 1);\n\t}",
"@Test\n public void rnatest2(){\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(b);\n char[] firstArr = new char[4];\n char[] answer = {'T','S', 'V', 'F'};\n for(int i = 0; i < firstArr.length; i++){\n firstArr[i] = first.aminoAcid;\n System.out.println(first.aminoAcid);\n first = first.next;\n }\n assertArrayEquals(answer,firstArr);\n }",
"@Override\n\tpublic ATN createATN() {\n\t\tSet<String> modes = ((LexerGrammar) g).modes.keySet();\n\t\tfor (String modeName : modes) {\n\t\t\t// create s0, start state; implied Tokens rule node\n\t\t\tTokensStartState startState =\n\t\t\t\tnewState(TokensStartState.class, null);\n\t\t\tatn.modeNameToStartState.put(modeName, startState);\n\t\t\tatn.modeToStartState.add(startState);\n\t\t\tatn.defineDecisionState(startState);\n\t\t}\n\n\t\t// INIT ACTION, RULE->TOKEN_TYPE MAP\n\t\tatn.ruleToTokenType = new int[g.rules.size()];\n\t\tfor (Rule r : g.rules.values()) {\n\t\t\tatn.ruleToTokenType[r.index] = g.getTokenType(r.name);\n\t\t}\n\n\t\t// CREATE ATN FOR EACH RULE\n\t\t_createATN(g.rules.values());\n\n\t\tatn.lexerActions = new LexerAction[indexToActionMap.size()];\n\t\tfor (Map.Entry<Integer, LexerAction> entry : indexToActionMap.entrySet()) {\n\t\t\tatn.lexerActions[entry.getKey()] = entry.getValue();\n\t\t}\n\n\t\t// LINK MODE START STATE TO EACH TOKEN RULE\n\t\tfor (String modeName : modes) {\n\t\t\tList<Rule> rules = ((LexerGrammar)g).modes.get(modeName);\n\t\t\tTokensStartState startState = atn.modeNameToStartState.get(modeName);\n\t\t\tfor (Rule r : rules) {\n\t\t\t\tif ( !r.isFragment() ) {\n\t\t\t\t\tRuleStartState s = atn.ruleToStartState[r.index];\n\t\t\t\t\tepsilon(startState, s);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tATNOptimizer.optimize(g, atn);\n\t\tcheckEpsilonClosure();\n\t\treturn atn;\n\t}",
"private PatternBuilder() { }",
"public static void main(String[] args)\n {\n Pattern pattern = Pattern.compile(\"aba\");\n Matcher m = pattern.matcher(\"abababa\");\n //boolean find()//return true if found the pattern and go to the next sub sequence\n while(m.find()){\n System.out.print(m.start());//0 and 4 but not 2!\n System.out.print(m.end());//3 and 7 (return the position of the last char matched + 1)\n System.out.print(m.group());// = s.substring(m.start(), m.end());\n System.out.print(\"\\n\");\n }\n //what's append?\n //first occurence starts at 0, ends at 2 and aba\n //search for the second occurence from 3\n //second occurence starts at 4, ends at 6 and aba\n //search for the thrid occurence from 7\n \n System.out.print(\"========\\n\");\n \n //0-length matches\n Pattern pattern2 = Pattern.compile(\"a?\");\n Matcher m2 = pattern2.matcher(\"aba\");\n while(m2.find()){\n System.out.print(m2.start());//the char a is or not is at position 0,1,2 and 3\n System.out.print(m2.end());//1,1,3,3 ==> ?? @see page 500\n System.out.print(\"\\n\");\n }\n \n /** Expressions **/\n // \\d digit\n // \\s whitespace\n // \\w letters, digits or _\n // [abc] searching for a, b or c\n // [a-f] searching for a letter to f lettre included\n // [A-F] searching for A letter to F lettre included\n // [a-fA-F] search for a letter to f or A letter to F lettre included\n // 0 [x-X] search for 0 followed by x or X\n /** quantifiers **/\n //? Zero or one\n //* Zero or more\n //+ One or more\n// 0[x-X]+ => 0 followed by one x or one X\n// (0[x-X])+ => 0 followed by x or X one time\n \n //. = any char (whitespace is a char)\n //Escaping special char !!! . = any char, \\. = compilator error, \\\\. = .\n }",
"@Test(timeout = 4000)\n public void test078() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"com.werken.saxpath.XPathLexer\");\n Token token0 = xPathLexer0.pipe();\n xPathLexer0.setPreviousToken(token0);\n assertEquals(17, token0.getTokenType());\n assertEquals(\"c\", token0.getTokenText());\n \n Token token1 = xPathLexer0.nextToken();\n assertEquals(15, token1.getTokenType());\n assertEquals(\"om.werken.saxpath.XPathLexer\", token1.getTokenText());\n }",
"public Token<TOKs> transition( CharSequence sequence, int line ) {\n\t\t\n\t\treturn new T_prensclose( sequence.toString(), line );\n\t}",
"@Test\n\tpublic void testLookaheadBeyondEnd()\n\t{\n\t\tth.addError(1, 7, \"Unmatched '{'.\");\n\t\tth.addError(1, 7, \"Unrecoverable syntax error. (100% scanned).\");\n\t\tth.test(\"({ a: {\");\n\t}",
"Sequence() {\r\n // this helps with converting bytes back to a string.\r\n }",
"public TestSequence() {\n }",
"private NFA base() {\n //check parenthesis case for base\n switch (peek()) {\n case '(':\n eat('(');\n NFA reg = regEx();\n eat(')');\n return reg;\n //if not build a base, simple 2 state nfa\n default:\n NFA defNfa = new NFA();\n //fill out the 5 tuple\n NFAState startS = new NFAState(String.valueOf(stateInc++));\n NFAState endS = new NFAState(String.valueOf(stateInc++)); \n char nextChar = next();\n defNfa.addStartState(startS.getName());\n defNfa.addFinalState(endS.getName());\n defNfa.addTransition(startS.getName(), nextChar, endS.getName());\n Set<Character> alphabet = new LinkedHashSet<Character>();\n alphabet.add(nextChar);\n defNfa.addAbc(alphabet);\n return defNfa;\n }\n }",
"SpCharInSeq create(@Valid SpCharInSeq spCharInSeq);",
"private JavaRuleContext buildTestJavaRuleContext() {\n Map<String, Object> ruleParameters = new HashMap<>();\n ruleParameters.put(SAMLCorrelationRule.ARG_ASSERTION_ATTRIBUTES,\n Collections.singletonMap(UUID.randomUUID().toString(), UUID.randomUUID()));\n return new JavaRuleContext(this.sailPointContext, ruleParameters);\n }",
"ArrayList<Character> nextCountAndSay(ArrayList<Character> sequence) {\n \tArrayList<Character> next = new ArrayList<Character>();\n \tint count = 0;\n \tCharacter c = sequence.get(0);\n \tfor(int i = 0; i < sequence.size(); i++) \n \t//@loop_invariant count represents the length of the longest \n \t// consecutive sequence s in sequence[0, i), all Characters in s\n \t// equal to c and s contains the last element of sequence[0, i) if \n \t// exists\n \t{\n \t\tif(count == 0) {\n \t\t\tcount = 1;\n \t\t\tc = sequence.get(i);\n \t\t}\n \t\telse {\n \t\t\tif(c == sequence.get(i)) {\n \t\t\t\tcount++;\n \t\t\t}\n \t\t\telse {\n \t\t\t\tthis.addCount(next, count);\n \t\t\t\tthis.addSay(next, c);\n \t\t\t\tcount = 1;\n \t\t\t\tc = sequence.get(i);\n \t\t\t}\n \t\t} \t\t\n \t}\n \tthis.addCount(next, count);\n \tthis.addSay(next, c);\n \treturn next;\n }",
"private Pattern(String name, int minimumApplications, int maximumApplications, double applicationChance, PatternFreeze freeze, ArrayList<Sequence> sequences) {\n\t\tthis.name = name;\n\t\tthis.minimumApplications = minimumApplications;\n\t\tthis.maximumApplications = maximumApplications;\n\t\tthis.applicationChance = applicationChance;\n\t\tthis.freeze = freeze;\n\t\tthis.sequences = sequences;\n\t}",
"private Sequence makeSequenceWithCapacity(String[] sList, int index, int cap) {\r\n\t\tSequence s = new Sequence(cap);\r\n\t\tfor(int i = 0; i<sList.length; i++) {\r\n\t\t\ts.addAfter(sList[i]);\r\n\t\t}\r\n\t\ts.start();\r\n\t\tfor(int i=0; i<index; i++) {\r\n\t\t\ts.advance();\r\n\t\t}\r\n\t\treturn s;\r\n\t}",
"private void processCreateSequence() throws HsqlException {\n\n/*\n CREATE SEQUENCE <name>\n [AS {INTEGER | BIGINT}]\n [START WITH <value>]\n [INCREMENT BY <value>]\n*/\n int type = Types.INTEGER;\n long increment = 1;\n long start = 0;\n String name = tokenizer.getName();\n boolean isquoted = tokenizer.wasQuotedIdentifier();\n HsqlName schemaname =\n session.getSchemaHsqlNameForWrite(tokenizer.getLongNameFirst());\n\n if (tokenizer.isGetThis(Token.T_AS)) {\n String typestring = tokenizer.getSimpleToken();\n\n type = Types.getTypeNr(typestring);\n\n Trace.check(type == Types.INTEGER || type == Types.BIGINT,\n Trace.WRONG_DATA_TYPE);\n }\n\n if (tokenizer.isGetThis(Token.T_START)) {\n tokenizer.getThis(Token.T_WITH);\n\n start = tokenizer.getBigint();\n }\n\n if (tokenizer.isGetThis(Token.T_INCREMENT)) {\n tokenizer.getThis(Token.T_BY);\n\n increment = tokenizer.getBigint();\n }\n\n HsqlName hsqlname = database.nameManager.newHsqlName(name, isquoted);\n\n hsqlname.schema = schemaname;\n\n database.schemaManager.createSequence(hsqlname, start, increment,\n type);\n }",
"private Digraph buildEpsilonTransitionsDigraph() {\n Digraph G = new Digraph(M + 1);\n Stack<Integer> ops = new Stack<Integer>();\n for (int i = 0; i < M; i++) {\n int lp = i; // lp - left parenthesis\n \n // left ( or |\n if (re[i] == '(' || re[i] == '|')\n ops.add(i);\n \n // right )\n else if (re[i] == ')') {\n int or = ops.pop();\n if (re[or] == '|') {\n lp = ops.pop();\n G.addEdge(lp, or + 1);\n G.addEdge(or, i);\n } else // re[or] == (\n lp = or; \n }\n \n // closure in ahead char\n if (i < M - 1 && re[i + 1] == '*') {\n G.addEdge(lp, i + 1);\n G.addEdge(i + 1, lp);\n }\n \n // add all the epsilon transition to the next states\n if (re[i] == '(' || re[i] == '*' || re[i] == ')')\n G.addEdge(i, i + 1);\n }\n return G;\n }",
"public SequenceRegion sequencesBefore(Sequence sequence) {\n\tthrow new PasseException();\n/*\nudanax-top.st:15743:SequenceSpace methodsFor: 'smalltalk: passe'!\n{SequenceRegion} sequencesBefore: sequence {Sequence}\n\t\"Essential. All sequences less than or equal to the given sequence.\n\tShould this just be supplanted by CoordinateSpace::region ()?\"\n\t\n\tself passe.\n\t^SequenceRegion usingx: true\n\t\twith: (PrimSpec pointer arrayWith: (AfterSequence make: sequence))!\n*/\n}",
"@Override\n protected Z advanceG(final long k) {\n return Z.valueOf(5 * k - 2); // mSeqG.next();\n }",
"private static int makeTaps(int n) throws IllegalArgumentException {\n\t\t\t// There is no easy algorithm to generate the taps as a function of n.\n\t\t\t// Instead simply have to rely on known results.\n\t\t\t// The values below are all taken from http://homepage.mac.com/afj/taplist.html\n\t\t\t// (except for case 2; I think that I figured that one out myself).\n\t\t\t// A less complete reference is http://en.wikipedia.org/wiki/Linear_feedback_shift_register#Some_Polynomials_for_Maximal_LFSRs\n\t\tswitch (n) {\n\t\t\tcase 2: return (1 << 1) | (1 << 0);\t// i.e. 2 1\n\t\t\tcase 3: return (1 << 2) | (1 << 1);\t// i.e. 3 2\n\t\t\tcase 4: return (1 << 3) | (1 << 2);\t// i.e. 4 3\n\t\t\tcase 5: return (1 << 4) | (1 << 2);\t// i.e. 5 3\n\t\t\tcase 6: return (1 << 5) | (1 << 4);\t// i.e. 6 5\n\t\t\tcase 7: return (1 << 6) | (1 << 5);\t// i.e. 7 6\n\t\t\tcase 8: return (1 << 7) | (1 << 6) | (1 << 5) | (1 << 0);\t// i.e. 8 7 6 1\n\t\t\tcase 9: return (1 << 8) | (1 << 4);\t// i.e. 9 5\n\t\t\tcase 10: return (1 << 9) | (1 << 6);\t// i.e. 10 7\n\t\t\tcase 11: return (1 << 10) | (1 << 8);\t// i.e. 11 9\n\t\t\tcase 12: return (1 << 11) | (1 << 10) | (1 << 9) | (1 << 3);\t// i.e. 12 11 10 4\n\t\t\tcase 13: return (1 << 12) | (1 << 11) | (1 << 10) | (1 << 7);\t// i.e. 13 12 11 8\n\t\t\tcase 14: return (1 << 13) | (1 << 12) | (1 << 11) | (1 << 1);\t// i.e. 14 13 12 2\n\t\t\tcase 15: return (1 << 14) | (1 << 13);\t// i.e. 15 14\n\t\t\tcase 16: return (1 << 15) | (1 << 14) | (1 << 12) | (1 << 3);\t// i.e. 16 15 13 4\n\t\t\tcase 17: return (1 << 16) | (1 << 13);\t// i.e. 17 14\n\t\t\tcase 18: return (1 << 17) | (1 << 10);\t// i.e. 18 11\n\t\t\tcase 19: return (1 << 18) | (1 << 17) | (1 << 16) | (1 << 13);\t// i.e. 19 18 17 14\n\t\t\tcase 20: return (1 << 19) | (1 << 16);\t// i.e. 20 17\n\t\t\tcase 21: return (1 << 20) | (1 << 18);\t// i.e. 21 19\n\t\t\tcase 22: return (1 << 21) | (1 << 20);\t// i.e. 22 21\n\t\t\tcase 23: return (1 << 22) | (1 << 17);\t// i.e. 23 18\n\t\t\tcase 24: return (1 << 23) | (1 << 22) | (1 << 21) | (1 << 16);\t// i.e. 24 23 22 17\n\t\t\tcase 25: return (1 << 24) | (1 << 21);\t// i.e. 25 22\n\t\t\tcase 26: return (1 << 25) | (1 << 24) | (1 << 23) | (1 << 19);\t// i.e. 26 25 24 20\n\t\t\tcase 27: return (1 << 26) | (1 << 25) | (1 << 24) | (1 << 21);\t// i.e. 27 26 25 22\n\t\t\tcase 28: return (1 << 27) | (1 << 24);\t// i.e. 28 25\n\t\t\tcase 29: return (1 << 28) | (1 << 26);\t// i.e. 29 27\n\t\t\tcase 30: return (1 << 29) | (1 << 28) | (1 << 27) | (1 << 6);\t// i.e. 30 29 28 7\n\t\t\tcase 31: return (1 << 30) | (1 << 27);\t// i.e. 31 28\n\t\t\tcase 32: return (1 << 31) | (1 << 30) | (1 << 29) | (1 << 9);\t// i.e. 32 31 30 10\n\t\t\t\n\t\t\tdefault: throw new IllegalArgumentException(\"n = \" + n + \" is an illegal value\");\n\t\t}\n\t}",
"public Sequence(String s) {\n for (char c : s.toCharArray()) {\n if (isValid(c)) seq.add(c);\n }\n }",
"Sequence(String inString) {\r\n // Allocate bytes for the sequence\r\n seqArray = new byte[(int)Math.ceil(inString.length() / 4.0)];\r\n seqLength = inString.length();\r\n\r\n for (int i = 0; i < inString.length(); i++) {\r\n // Begin at the start of byte minus 2, then subtract\r\n // the number of bits into the byte we are\r\n int bytePos = 6 - (i % 4) * 2;\r\n // Divide by the current position in string to find current byte\r\n int currByte = i / 4;\r\n char currChar = inString.charAt(i);\r\n if (currChar == 'A') {\r\n seqArray[currByte] |= 0 << bytePos;\r\n }\r\n else if (currChar == 'C') {\r\n seqArray[currByte] |= 1 << bytePos;\r\n }\r\n else if (currChar == 'G') {\r\n seqArray[currByte] |= 2 << bytePos;\r\n }\r\n else if (currChar == 'T') {\r\n seqArray[currByte] |= 3 << bytePos;\r\n }\r\n else {\r\n System.out.print(\"Could not create sequence!\");\r\n }\r\n }\r\n }",
"protected char tokenLookAhead () throws TableFunctionMalformedException {\r\n\t\tint originalIndex = this.index;\r\n\t\tchar originalLook = this.look;\r\n\t\tString originalValue = new String(this.value);\r\n\t\tString originalNoCaseChangeValue = new String(this.noCaseChangeValue);\r\n\t\tchar originalToken = this.token;\r\n\t\tchar returnedToken = ' ';\r\n\t\t\r\n\t\tthis.scan();\r\n\t\t\r\n\t\treturnedToken = this.token;\t// this value will be the return value\r\n\t\t\r\n\t\t// revert global attributes\r\n\t\tthis.index = originalIndex;\r\n\t\tthis.look = originalLook;\r\n\t\tthis.value = originalValue;\r\n\t\tthis.noCaseChangeValue = originalNoCaseChangeValue;\r\n\t\tthis.token = originalToken;\r\n\t\t\r\n\t\treturn returnedToken;\r\n\t\t\r\n\t}",
"@Override\n public ByteBuffer extractPattern(byte[] bytes, int offset, int length) {\n if (bytes.length <= 1) {\n return ByteBuffer.wrap(bytes);\n }\n int pos = offset;\n int start = pos;\n for (; pos < length && bytes[pos] != 0; ++pos)\n ;\n int stop = pos;\n return ByteBuffer.wrap(bytes, start, stop - start);\n }",
"ISequence sequence();",
"public void makeTran(int fromDfa, int gotoDfa) {\n\t\t\tthrow new RuntimeException(\"This is never called\");\n\t\t}",
"private static void translate(Sequence seq) {\n int frame;\n if(seq.getFrameWithLongestORF()==2){\n frame =0;\n }\n else if (seq.getFrameWithLongestORF()==0){\n //** TEst annomalies??? this frame produces the best aa\n frame = 0;\n }\n else if (seq.getFrameWithLongestORF()==1){\n frame = 2;\n }\n else if(seq.getFrameWithLongestORF()==3){\n frame = 0;\n compliment(seq);\n }\n else if(seq.getFrameWithLongestORF()==4){\n frame = 1;\n compliment(seq);\n }\n else{\n frame = 2;\n compliment(seq);\n }\n String temp = seq.getRawSeq();\n StringBuilder finalreturn = new StringBuilder();\n String codon;\n for (int i = frame; i < seq.getLength() - 2; i+=3) {\n codon = temp.substring(i, i+3);\n if(codon.contains(\"N\") || codon.contains(\"n\")){\n finalreturn.append(\"^\");\n }\n else {\n finalreturn.append(codonsMap.get(codon));\n }\n }\n seq.setTranslatedAA(finalreturn.toString());\n }",
"private static StringBuffer Pad(int depth) {\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tfor (int i = 0; i < depth; i++)\r\n\t\t\tsb.append(\" \");\r\n\t\treturn sb;\r\n\t}",
"private JBurgPatternMatcher()\n\t{\n\t}",
"private void preparePat(String pat) {\n this.pat = pat;\n\n // build DFA from pattern\n int M = pat.length();\n dfa = new int[R][M];\n dfa[pat.charAt(0)][0] = 1;\n for (int X = 0, j = 1; j < M; j++) {\n for (int c = 0; c < R; c++)\n dfa[c][j] = dfa[c][X]; // Copy mismatch cases.\n dfa[pat.charAt(j)][j] = j+1; // Set match case.\n X = dfa[pat.charAt(j)][X]; // Update restart state.\n }\n }",
"@Test(timeout = 4000)\n public void test051() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null, 122, 122, 122);\n javaCharStream0.ReInit((Reader) null, 122, 122, 1500);\n assertEquals((-1), javaCharStream0.bufpos);\n }",
"public void testMoveToStart() {\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n test1.moveToStart();\n assertTrue(test1.getValue().inRange(0));\n }",
"private Layout m3380a(CharSequence charSequence) {\n if (this.f2666L != null) {\n charSequence = this.f2666L.getTransformation(charSequence, this);\n }\n CharSequence charSequence2 = charSequence;\n return new StaticLayout(charSequence2, this.f2662H, charSequence2 != null ? (int) Math.ceil((double) Layout.getDesiredWidth(charSequence2, this.f2662H)) : 0, Alignment.ALIGN_NORMAL, 1.0f, 0.0f, true);\n }",
"@SuppressWarnings(\"unchecked\")\n\t\tprivate State<T> createWaitingStateForZeroOrMore(final State<T> loopingState, final State<T> lastSink) {\n\t\t\tfinal IterativeCondition<T> currentFunction = (IterativeCondition<T>)currentPattern.getCondition();\n\n\t\t\tfinal State<T> followByState = createNormalState();\n\t\t\tfollowByState.addProceed(lastSink, BooleanConditions.<T>trueFunction());\n\t\t\tfollowByState.addTake(loopingState, currentFunction);\n\n\t\t\tfinal IterativeCondition<T> ignoreFunction = getIgnoreCondition(currentPattern);\n\t\t\tif (ignoreFunction != null) {\n\t\t\t\tfinal State<T> followByStateWithoutProceed = createNormalState();\n\t\t\t\tfollowByState.addIgnore(followByStateWithoutProceed, ignoreFunction);\n\t\t\t\tfollowByStateWithoutProceed.addIgnore(ignoreFunction);\n\t\t\t\tfollowByStateWithoutProceed.addTake(loopingState, currentFunction);\n\t\t\t}\n\n\t\t\treturn followByState;\n\t\t}",
"@Test(timeout = 4000)\n public void test091() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"Xr\\\"\");\n Token token0 = xPathLexer0.pipe();\n assertEquals(17, token0.getTokenType());\n assertEquals(\"X\", token0.getTokenText());\n \n Token token1 = xPathLexer0.nextToken();\n assertEquals(15, token1.getTokenType());\n assertEquals(\"r\", token1.getTokenText());\n }",
"public void testPrev() {\n test1.prev();\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n test1.prev();\n test1.moveToPos(8);\n assertTrue(test1.getValue().inRange(8));\n }",
"protected boolean lookaheadIn(TokenCode[] tokenCodes) {\n for(int n=0;n<tokenCodes.length;n++)\n if (tokenCodes[n] == m_current.getTokenCode())\n return true;\n return false;\n }",
"public TemplexTokenMaker() {\r\n\t\tsuper();\r\n\t}",
"SequenceOfStatements getSequenceOfStatements();",
"@BeforeEach\n\tvoid setUpValidRE(){\n\t\tvalidRE= new String[lengthValid];\n\t\t// ab\n\t\tvalidRE[0] = \"ab\";\n\t\t// (ab)\n\t\tvalidRE[1] = \"(ab)\";\n\t\t//(ab)*\n\t\tvalidRE[2] = \"(ab)*\";\n\t\t// a???\n\t\tvalidRE[3] = \"a???\";\n\t\t// a***\n\t\tvalidRE[4] = \"a***\";\n\t\t// a+++\n\t\tvalidRE[5] = \"a+++\";\n\t\t// (((a)))\n\t\tvalidRE[6] = \"(((a)))\";\n\t\t// (a | ab | c*)*\n\t\tvalidRE[7] = \"(a | ab | c*)*\";\n\t\t// (a | ab | c*)**??\n\t\tvalidRE[8] = \"(a | ab | c*)*??\";\n\t\t// ( a | (ab | cd)+ )+\n\t\tvalidRE[9] = \"(a | (ab | cd)+)+\";\n\t\t// 0 (01 | (02) * | (03)++) | (1?01?)\n\t\tvalidRE[10] = \"0 (01 | (02) * | (03)++) | (a?01?)\";\n\t\t// a | &\n\t\tvalidRE[11] = \"a | &\";\n\t\t// &*\n\t\tvalidRE[12] = \"&*\";\n\t\t// (())* (empty language)\n\t\tvalidRE[13] = \"(())*\";\n\t\t// (a*b)*\n\t\tvalidRE[14] = \"(a*b)*\";\n\t\t// (a | & | a*b?c+)*\n\t\tvalidRE[15] = \"(a | & | a*b?c+)*\";\n\t}",
"public Pattern(Delta... pattern)\n {\n assert(pattern.length > 0);\n\n _pattern = pattern;\n _index = 0;\n }",
"public boolean isLookahead() {\n\n return this.isLookahead;\n }",
"HdbSequenceElements createHdbSequenceElements();",
"@Override\n\tprotected String getCreateSequenceString(String sequenceName) {\n\t\tsequenceName = sequenceName.replaceFirst(\".*\\\\.\", \"\");\n\t\treturn \"create sequence \" + sequenceName + \" start with 999\";\n\t}",
"private void generateAutomaton() {\n /**\n * Chars in the positions:\n * 0 -> \"-\"\n * 1 -> \"+\"\n * 2 -> \"/\"\n * 3 -> \"*\"\n * 4 -> \")\"\n * 5 -> \"(\"\n * 6 -> \"=\"\n * 7 -> \";\"\n * 8 -> [0-9]\n * 9 -> [A-Za-z]\n * 10 -> skip (\"\\n\", \"\\r\", \" \", \"\\t\")\n * 11 -> other symbols\n */\n\n automaton = new State[][]{\n /* DEAD */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* START */ {State.SUB, State.PLUS, State.DIV, State.MUL, State.RPAR, State.LPAR, State.EQ, State.SMICOLON, State.INT, State.VAR, State.DEAD, State.DEAD},\n /* SUB */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* PLUS */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* DIV */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* MUL */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* RPAR */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* LPAR */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* EQ */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* SMICOLON */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* INT */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.INT, State.DEAD, State.DEAD, State.DEAD},\n /* VAR */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.VAR, State.VAR, State.DEAD, State.DEAD}\n };\n }",
"public A034318() {\n this(-1, 0, 13, 0, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, 0);\n }",
"protected boolean lookaheadIsFirstOfSign() {\n return (lookaheadIs(TokenCode.ADDOP) && (lookahead().getOpType() == OpType.PLUS || lookahead().getOpType() == OpType.MINUS));\n }",
"private RichSymbol(\n boolean isLookahead) {\n\n this.symbol = null;\n this.isLookahead = isLookahead;\n }",
"private void testPreorderTemplate(OrderTraversal orderTraversal) {\n System.out.println(\"Testing against \" + orderTraversal.getClass().getSimpleName());\n testOne(\"1,2,3,4,5\", Lists.newArrayList(1, 2, 4, 5, 3), orderTraversal);\n testOne(\"1\", Lists.newArrayList(1), orderTraversal);\n testOne(\"4,2,7,1,3,6,9\", Lists.newArrayList(4, 2, 1, 3, 7, 6, 9), orderTraversal);\n testOne(\"4,2,7,1,#,6,9,8,10,#,5\", Lists.newArrayList(4, 2, 1, 8, 10, 7, 6, 5, 9), orderTraversal);\n System.out.println(StringUtils.repeat(\"-\", 30));\n }",
"public static LineQueue<Passenger> makeCommuter() {\r\n\t\tLineQueue<Passenger> commuters = new LineQueue<Passenger>();\r\n\t\tdouble t = 0;\r\n\t\tdouble a;\r\n\t\twhile (t < 3600) {\r\n\t\t\ta = genExp(90);\r\n\t\t\tif (a < 1) {\r\n\t\t\t\ta = 1;\r\n\t\t\t}\r\n\t\t\tt += a;\r\n\t\t\tif (t < 3600) {\r\n\t\t\t\tnumberCommutersMade++;\r\n\t\t\t\tPassenger passenger = new Passenger(false, false, t);\r\n\t\t\t\tcommuters.enqueue(passenger);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn commuters;\r\n\t}",
"Position<T> before(Position<T> p) throws IllegalStateException;",
"@Test(timeout = 4000)\n public void test018() throws Throwable {\n byte[] byteArray0 = new byte[6];\n byteArray0[0] = (byte)43;\n byteArray0[1] = (byte) (-110);\n ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0);\n JavaCharStream javaCharStream0 = new JavaCharStream(byteArrayInputStream0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\"+\", token0.toString());\n }",
"public abstract void addBuffer(Array<Array<Boolean>> pattern);",
"private static int findPreviousStarter(char[] paramArrayOfChar, int paramInt1, int paramInt2, int paramInt3, int paramInt4, char paramChar)\n/* */ {\n/* 1550 */ PrevArgs localPrevArgs = new PrevArgs(null);\n/* 1551 */ localPrevArgs.src = paramArrayOfChar;\n/* 1552 */ localPrevArgs.start = paramInt1;\n/* 1553 */ localPrevArgs.current = paramInt2;\n/* */ \n/* 1555 */ while (localPrevArgs.start < localPrevArgs.current) {\n/* 1556 */ long l = getPrevNorm32(localPrevArgs, paramChar, paramInt3 | paramInt4);\n/* 1557 */ if (isTrueStarter(l, paramInt3, paramInt4)) {\n/* */ break;\n/* */ }\n/* */ }\n/* 1561 */ return localPrevArgs.current;\n/* */ }",
"public Sequence nextSequence(Alphabet alphabet) throws IOException{\t\t\t \t\t\t\t\n\t\t\t//array to hold indexes of nucleotides\n\t\t\tif (alphabet == null){\n\t\t\t\talphabet = Alphabet.DNA16();//The most conservative\n\t\t\t}\n\n\t\t\tStringBuilder header = new StringBuilder();\n\n\t\t\tseqIndex = 0;//the number of nucletiodes read\t\t\n\t\t\tif (pos >= count){\n\t\t\t\tcount = in.read(buff);\n\t\t\t\tpos = 0;\n\t\t\t}\n\t\t\t//No more in the stream\n\t\t\tif (count <=0 ) return null;\n\n\t\t\tif (buff[pos++] != 62){// 62 = '>'\n\t\t\t\tpos --;\n\t\t\t\tthrow new RuntimeException(\"> is expected at the start of Fasta No \" + seqNo);\n\t\t\t}\n\n\t\t\tboolean seqMode = false; \n\n\t\t\tfor (;;){\n\t\t\t\t//make sure there is something in the buffer\n\t\t\t\t//this could be replaced with nextByte()\n\t\t\t\tif (pos >= count){\n\t\t\t\t\tcount = in.read(buff);\n\t\t\t\t\tif (count <= 0) break;//no more to read\n\t\t\t\t\tpos = 0;\n\t\t\t\t}\n\t\t\t\t//process buffer\n\t\t\t\twhile (pos < count){\n\t\t\t\t\tbyte currentByte = buff[pos++];\t\t\t\t\n\n\t\t\t\t\tif (seqMode){//reading header\n\t\t\t\t\t\t//reading sequence\t\t\t\t\t\n\t\t\t\t\t\tbyte nucleotide = alphabet.byte2index(currentByte);\n\t\t\t\t\t\t//assert nucleotide < dna.size()\n\t\t\t\t\t\tif (nucleotide >= 0){\n\t\t\t\t\t\t\tif (seqIndex >= seq.length) {// Full\n\t\t\t\t\t\t\t\tint newLength = seq.length * 2;\n\t\t\t\t\t\t\t\tif (newLength < 0) {\n\t\t\t\t\t\t\t\t\tnewLength = Integer.MAX_VALUE;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// if the array is extended\n\t\t\t\t\t\t\t\tif (newLength <= seqIndex) {\n\t\t\t\t\t\t\t\t\t// in.close();\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\t\t\t\t\t\t\"Sequence is too long to handle\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// create new array of byte\n\t\t\t\t\t\t\t\tseq = Arrays.copyOf(seq, newLength);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tseq[seqIndex++] = nucleotide;\n\t\t\t\t\t\t\t//seqIndex++;\t\t\t\t\t\n\t\t\t\t\t\t}else if(currentByte == 62){\n\t\t\t\t\t\t\t//start of a new sequence\n\t\t\t\t\t\t\tpos --;\n\t\t\t\t\t\t\tseqNo ++;\n\t\t\t\t\t\t\treturn new Sequence(alphabet, seq, seqIndex, header.toString());\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif (nucleotide == -1){\n\t\t\t\t\t\t\t\tthrow new RuntimeException(\"Unexecpected character '\" + (char) currentByte + \"' for dna {\" + alphabet + \"} for sequence \" + seqNo);\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}//mode == 0\n\t\t\t\t\telse{\n\t\t\t\t\t\tif (currentByte == 10 ){//CR \n\t\t\t\t\t\t\tseqMode = true;\n\t\t\t\t\t\t\t//\t\t\t\t\t\tlineNo ++;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}else if (currentByte == 13){//LF\n\t\t\t\t\t\t\tseqMode = true;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\theader.append((char) currentByte);\n\t\t\t\t\t}\n\t\t\t\t}//while\t\t\t\t\t\n\t\t\t}//for\n\t\t\tseqNo ++;\n\t\t\treturn new Sequence(alphabet, seq, seqIndex, header.toString());\n\t\t}",
"private static String buildSequence() {\n\t\tSimpleDateFormat dateFormatGMT = new SimpleDateFormat(\"yyyyMMddHHmmssSSS\");\n\t\tdateFormatGMT.setTimeZone(TimeZone.getTimeZone(\"GMT\")); // set to Greenwich mean time.\n\t\treturn dateFormatGMT.format(new Date());\n\t}",
"private void createAA() {\r\n\r\n\t\tfor( int x = 0 ; x < dnasequence.size(); x++) {\r\n\t\t\tString str = dnasequence.get(x);\r\n\t\t\t//put catch for missing 3rd letter\r\n\t\t\tif(str.substring(0, 1).equals(\"G\")) {\r\n\t\t\t\taasequence.add(getG(str));\r\n\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"C\")) {\r\n\t\t\t\taasequence.add(getC(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"A\")) {\r\n\t\t\t\taasequence.add(getA(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"T\")) {\r\n\t\t\t\taasequence.add(getT(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0,1).equals(\"N\")) {\r\n\t\t\t\taasequence.add(\"ERROR\");\r\n\t\t\t}else\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t}\r\n\t}",
"public FlowRule(Flow flow, int seq) {\r\n super(flow, seq);\r\n }",
"@Test(timeout = 4000)\n public void test131() throws Throwable {\n StringReader stringReader0 = new StringReader(\"QXw?YE]We2j)\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 754, 5, 5);\n javaCharStream0.ReInit((Reader) stringReader0, 754, 754);\n assertEquals((-1), javaCharStream0.bufpos);\n }",
"private void compilePattern() {\r\n\r\n pattern_startOfPage = Pattern.compile(regex_startOfPage);\r\n pattern_headerAttribute = Pattern.compile(regex_headerAttribute);\r\n pattern_messageFirstLine = Pattern.compile(regex_messageFirstLine);\r\n pattern_messageContinuationLine = Pattern.compile(regex_messageContinuationLine);\r\n }",
"public SequenceImpl() {\n super();\n initSequence();\n }",
"public Sequence(String title) { this(title, new Vector<Step>(), \"\"); }",
"protected boolean lookaheadIs(TokenCode tokenCode) {\n return m_current.getTokenCode() == tokenCode;\n }",
"public boolean try_parse_ahead(boolean z) throws Exception {\r\n virtual_parse_stack virtual_parse_stack = new virtual_parse_stack(this.stack);\r\n while (true) {\r\n short s = get_action(virtual_parse_stack.top(), cur_err_token().sym);\r\n if (s == 0) {\r\n return false;\r\n }\r\n if (s > 0) {\r\n int i = s - 1;\r\n virtual_parse_stack.push(i);\r\n if (z) {\r\n debug_message(\"# Parse-ahead shifts Symbol #\" + cur_err_token().sym + \" into state #\" + i);\r\n }\r\n if (!advance_lookahead()) {\r\n return true;\r\n }\r\n } else {\r\n int i2 = (-s) - 1;\r\n if (i2 == start_production()) {\r\n if (z) {\r\n debug_message(\"# Parse-ahead accepts\");\r\n }\r\n return true;\r\n }\r\n short[][] sArr = this.production_tab;\r\n short s2 = sArr[i2][0];\r\n short s3 = sArr[i2][1];\r\n for (int i3 = 0; i3 < s3; i3++) {\r\n virtual_parse_stack.pop();\r\n }\r\n if (z) {\r\n debug_message(\"# Parse-ahead reduces: handle size = \" + ((int) s3) + \" lhs = #\" + ((int) s2) + \" from state #\" + virtual_parse_stack.top());\r\n }\r\n virtual_parse_stack.push(get_reduce(virtual_parse_stack.top(), s2));\r\n if (z) {\r\n debug_message(\"# Goto state #\" + virtual_parse_stack.top());\r\n }\r\n }\r\n }\r\n }",
"private PositionGroup generatePositionGroupAt(int pos){\n PositionGroup pg = new PositionGroup();\n if (isTokenInterruptable(pos)){\n RegexGroup rg1 = ParseLeft(pos);\n RegexGroup rg2 = ParseRight(pos);\n for (int i = 0; i < rg1.getSize(); i++)\n for (int j = 0; j < rg2.getSize(); j++){\n Regex r1 = rg1.getRegexAt(i);\n Regex r2 = rg2.getRegexAt(j);\n if (r1.isVoid() && r2.isVoid())\n continue;\n Regex r12;\n if (r1.isVoid()){\n r12 = r2.clone();\n }else if (r2.isVoid()){\n r12 = r1.clone();\n }else {\n r12 = r1.clone();\n r12.addRegex(r2);\n }\n RegexOccurrence occur = getOccurrenceNumber(r12, pos);\n int occur_num = occur.occur_num;\n int appear = occur.appear;\n pg.AddPosition(new Pos(r1, r2, appear));\n pg.AddPosition(new Pos(r1, r2, appear-occur_num-1));\n }\n }\n //pg.AddPosition(new CPos(pos));\n //pg.AddPosition(new CPos(-(Input.length()-pos+1)));\n if (pg.getSize() == 0)\n return null;\n return pg;\n }",
"public abstract void extendSequence (int k);",
"public String getCharacterSequence();",
"public static void main(String[] args) {\n Node a = new Node(50);\n Node b = new Node(20);\n Node c = new Node(60);\n Node d = new Node(10);\n Node e = new Node(25);\n Node f = new Node(70);\n Node g = new Node(5);\n Node h = new Node(15);\n Node i = new Node(65);\n Node j = new Node(80);\n a.left = b;\n a.right = c;\n b.left = d;\n b.right = e;\n c.right = f;\n d.left = g;\n d.right = h;\n f.left = i;\n f.right = j;\n ArrayList<LinkedList<Integer>> lists = bstSequences(a);\n for (LinkedList sequence : lists)\n System.out.println(sequence);\n\n /*\n * 2 / \\ 1 3\n */\n a = new Node(2);\n b = new Node(1);\n c = new Node(3);\n a.left = b;\n a.right = c;\n lists = bstSequences(a);\n for (LinkedList sequence : lists)\n System.out.println(sequence);\n }"
] |
[
"0.5923506",
"0.5711878",
"0.5541385",
"0.5376521",
"0.5365752",
"0.53041446",
"0.50428885",
"0.50266236",
"0.48827028",
"0.47471875",
"0.47310722",
"0.47093272",
"0.46987125",
"0.46858948",
"0.46296927",
"0.46243283",
"0.4618697",
"0.4618287",
"0.46029848",
"0.45825642",
"0.45397896",
"0.4537343",
"0.45172673",
"0.44885847",
"0.44884947",
"0.44826654",
"0.44725835",
"0.447083",
"0.44705763",
"0.44397834",
"0.44345355",
"0.4432031",
"0.4420608",
"0.4415473",
"0.4370676",
"0.43698138",
"0.43661124",
"0.43457755",
"0.43457434",
"0.43440038",
"0.43216303",
"0.4321053",
"0.43105873",
"0.43102807",
"0.43071988",
"0.42848688",
"0.4284132",
"0.42825097",
"0.42816484",
"0.42652777",
"0.42526865",
"0.42495483",
"0.4241658",
"0.42241356",
"0.4222751",
"0.4221713",
"0.42180443",
"0.42168278",
"0.4216556",
"0.4211496",
"0.42034855",
"0.41995108",
"0.41932812",
"0.41873667",
"0.41823152",
"0.41769758",
"0.4176109",
"0.4176055",
"0.4173695",
"0.4168243",
"0.41672677",
"0.4157119",
"0.41570684",
"0.41497165",
"0.41484642",
"0.41476718",
"0.41373843",
"0.41371495",
"0.41347033",
"0.41295424",
"0.4128385",
"0.41280693",
"0.41275457",
"0.41269687",
"0.4117747",
"0.41159976",
"0.41140416",
"0.41000018",
"0.40987998",
"0.40955982",
"0.40898135",
"0.40894175",
"0.4087802",
"0.40855208",
"0.40815657",
"0.40814823",
"0.40750453",
"0.40743345",
"0.40681508",
"0.40624952"
] |
0.5967773
|
0
|
Retrieve the next value of the sequence, but do not step the sequence.
|
public Z peek() {
return mNext;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public int getNextUnSafeSequence(){ return value++;}",
"public E nextStep() {\r\n\t\tthis.current = this.values[Math.min(this.current.ordinal() + 1, this.values.length - 1)];\r\n\t\treturn this.current;\r\n\t}",
"public int getNext() {\n synchronized(this) {\n System.out.println(\"For Value: \" + value);\n value = value + 1;\n return value;\n }\n }",
"public int getNext() {\n return value++;\n }",
"@Override\r\n public Integer next() {\r\n // Time complexity: O(1), where the problem size N \r\n // represents the size of the sequence to generate.\r\n if (!hasNext()) // check if the current element has a next element in this sequence\r\n return null; \r\n int current = next; // set the current element to next\r\n generatedCount++; // increment the number of generated elements so far\r\n next *= RATIO; // set the next element (adds the common ratio to the current number)\r\n return current; // return the current number as the generated one\r\n }",
"public Integer getNextValue() {\n return this.nextValue;\n }",
"public int nextValue() {\n\t\tint temp = counter;\n\t\tcounter++;\n\t\treturn temp;\n\t}",
"public final T next()\n {\n return skip(1);\n }",
"@Override\r\n\t\t\tpublic T next() {\n\t\t\t\treturn sentinel.getValue();\r\n\t\t\t}",
"@Override\n public Integer next() {\n if(peekedVal != null ){\n Integer next = peekedVal;\n peekedVal = null;\n return next;\n }\n if(!iter.hasNext()){\n throw new NoSuchElementException();\n }\n return iter.next();\n\n }",
"void next(T value);",
"public long next() {\n long ret = prev;\n prev = current;\n current = ret + current;\n return ret;\n }",
"@Override\n public Integer next(){\n while(!isPowerOfTwo(this.getValue() + 1)){\n super.next(); \n }\n if(this.getValue() == 3)\n super.next();\n Integer save = this.getValue();\n super.next();\n return save;\n }",
"public final Integer next() {\n return Integer.valueOf(b());\n }",
"public int getNext(){\n synchronized (ThreadSave.class){\n if(value > 0){\n return 1;\n }\n else if (value < 0){\n return -1;\n }\n else\n return value ++;\n }\n\n }",
"Object nextValue() throws IOException;",
"@NotNull\n @JsonProperty(\"nextValue\")\n public String getNextValue();",
"@Override\n public Integer next() {\n Integer res = next;\n advanceIter();\n return res;\n }",
"public Index next() {\n return Index.valueOf(value + 1);\n }",
"void setNextValue() {\n this.value = this.value * 2;\n }",
"public Long next() {\n\t\t\treturn Long.valueOf(nextLong());\n\t\t}",
"@Override\n public Integer next() {\n if (!isPeeked && hasNext())\n return iterator.next();\n int toReturn = peekedElement;\n peekedElement = -1;\n isPeeked = false;\n return toReturn;\n }",
"@Override\n public Integer next() {\n if (next != null) {\n Integer next = this.next;\n this.next = null;\n return next;\n\n }\n\n return iterator.next();\n }",
"public BigInteger getSeqNextVal(String sequence) {\r\n\t\treturn this.crudDAO.getSeqNextVal(sequence);\r\n\t}",
"@Override\r\n\tpublic Number getNext() {\r\n\t\tif(lambda==Double.POSITIVE_INFINITY){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn Exponential.staticNextDouble(lambda);\r\n\t}",
"public synchronized int getSynchronisedNext() {\n value++;\n return value;\n }",
"public E next()\n\t{\n\t\treturn (vector.get(curr++));\n\t}",
"private PlayState getNext(){\n return values()[(this.ordinal() + 1) % PlayState.values().length];\n }",
"static synchronized long getNextSeqNumber() {\n return seqNumber++;\n }",
"public Object next();",
"public Object next();",
"@Override\n\tpublic String getNextSequenceValue(String sequence) {\n\t\treturn \"\";\n\t}",
"@Override\n public NodoL next() {\n posicionActual = posicionActual.getSiguiente();\n return posicionActual;\n }",
"public Object next()\n {\n if(!hasNext())\n {\n throw new NoSuchElementException();\n //return null;\n }\n previous= position; //Remember for remove;\n isAfterNext = true; \n if(position == null) \n {\n position = first;// true == I have not called next \n }\n else\n {\n position = position.next;\n }\n return position.data;\n }",
"@Override\r\n\t\tpublic E next() {\n\t\t\tcaret = caret.next();\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 abstract BigInteger nextValue();",
"@Override\n public Integer next() {\n if (next == null) {\n throw new NoSuchElementException();\n }\n Integer toReturn = next;\n next = null;\n if (peekingIterator.hasNext()) {\n next = peekingIterator.next();\n }\n return toReturn;\n }",
"public TurnHelper next() {\n return values()[ordinal() + 1];\n }",
"public T next() {\n T temp = this.curr.getData();\n this.curr = this.curr.getNext();\n return temp;\n }",
"@Override\n public Integer next() {\n return nums.get(index++);\n }",
"@Override\n public Integer next() {\n if (cur != null) {\n int temp = cur.intValue();\n cur = null;\n return temp;\n }\n\n if (iter.hasNext()) {\n return iter.next();\n }\n\n return null;\n }",
"@Override\n public Object next() {\n Object retval = this.nextObject;\n advance();\n return retval;\n }",
"public T next() {\n T temp = this.curr.next.getData();\n this.curr = this.curr.next;\n return temp;\n }",
"public Provider<T> getNextValue()\n {\n return this.next;\n }",
"public static Integer next() {\n return incrementingInteger++;\n }",
"public T next()\r\n { \r\n if (next == null)\r\n throw new NoSuchElementException(\"Attempt to\" +\r\n \" call next when there's no next element.\");\r\n\r\n prev = next;\r\n next = next.next;\r\n return prev.data;\r\n }",
"@Override\n\tpublic Integer next() {\n\t return iterator.next();\n\t}",
"public String next() {\r\n\t\tif(firstVal) {\r\n\t\t\tfirstVal = true;\r\n\t\t\treturn getOutput();\r\n\t\t}\r\n\r\n\t\t// Build next lexicographic string and we use the getters to return, we use a finder method to accomplish this task.\r\n\t\tStringBuilder build = new StringBuilder(output);\r\n\t\tsetOutput((outputter(build, build.length()-1)).toString());\r\n\t\treturn getOutput();\r\n\t}",
"public T next() {\n return array[current++];\n }",
"@Override\n public T next() {\n T n = null;\n if (hasNext()) {\n // Give it to them.\n n = next;\n next = null;\n // Step forward.\n it = it.next;\n stop -= 1;\n } else {\n // Not there!!\n throw new NoSuchElementException();\n }\n return n;\n }",
"String getNext();",
"String getNext();",
"public E getNext() {\n\t\tif (!super.isEmpty()) {\n\t\t\tif (index >= this.size() - 1)\n\t\t\t\tindex = -1;\n\t\t\treturn this.get(++index);\n\t\t}\n\t\treturn null;\n\t}",
"public int step() {\n ArrayList<Integer> copy = new ArrayList<Integer>();\n for (int i = 1; i < register.size(); i++) { \n copy.add(register.get(i));\n }\n int tapNum = register.get(register.size()-tap-1);\n int begin = register.get(0);\n if (tapNum == 1 ^ begin == 1) {\n copy.add(1);\n }\n else {\n copy.add(0);\n }\n register.clear();\n register.addAll(copy);\n return register.get(register.size()-1);\n }",
"Long getNextSequence(String seqName);",
"@Override\r\n\tpublic int next() \r\n\t{\r\n\t\tif (currentNumber == OVERFLOW_PRIME)\r\n\t\t{\r\n\t\t\treturn currentNumber;\r\n\t\t}\r\n\t\t\r\n\t\tif (currentNumber != MAX_NUMBER)\r\n\t\t{\r\n\t\t\tcurrentNumber++;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tcurrentNumber = OVERFLOW_PRIME;\r\n\t\t}\r\n\r\n\t\treturn currentNumber;\r\n\t}",
"public int next() {\n TreeNode iter = dq.pop();\n int val = iter.val;\n if(iter.right!=null)\n process(iter.right);\n return val;\n }",
"public Integer next() {\n if (list.isEmpty()){\n return iterator.next();\n }else {\n Integer integer = list.get(list.size() - 1);\n list.remove(list.size()-1);\n return integer;\n }\n\n }",
"public Integer peek() {\n return next;\n }",
"public int getCurrentNext() {\n\t\tInteger ii = (Integer) get_Value(\"CurrentNext\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}",
"public Variable getNext(){\n\t\treturn this.next;\n\t}",
"public double provideNextValue() throws IndexOutOfBoundsException {\n try {\n return valuesList.get(currentIndex++);\n } catch (IndexOutOfBoundsException e) {\n throw new IndexOutOfBoundsException();\n }\n }",
"@Override\n public Integer next() {\n Integer result = null;\n if (checkCurrentIterator(this.currentIterator) && this.currentIterator.hasNext()) {\n while (this.currentIterator.hasNext()) {\n return this.currentIterator.next();\n }\n } else if (it.hasNext()) {\n this.currentIterator = getIterator(it);\n return this.next();\n }\n return result;\n }",
"@Override\n public T next() {\n current = current.next;\n return current.data;\n }",
"@Override\n\t\tpublic int next() {\n\t\t\treturn current++;\n\t\t}",
"@Override\r\n\t\t\tpublic Square next() {\r\n\t\t\t\treturn master.next().getValue();\r\n\t\t\t}",
"@Override\r\n public Object next() {\r\n V value = (V) currentCell.value;\r\n currentCell = currentCell.next;\r\n return value;\r\n }",
"@Override\n\tpublic Object next() {\n\t\treturn null;\n\t}",
"public T next()\n {\n // TODO: implement this method\n return null;\n }",
"public T getNext()\n {\n T elem = handler.getTop();\n handler.pop();\n return elem;\n }",
"public byte NEXT() {\r\n\t\t//log(\"Frame.NEXT mp=\"+mp);\r\n\t\tint addr=base+(mp++);\r\n\t\tbyte b=heap.readByte(addr);\r\n\t\t//log(\"Frame.NEXT addr=\"+addr+\"; byte=\"+b+\" \"+hexByte(b));\r\n\t\treturn b;\r\n\t}",
"synchronized public long peek() {\n return currValue;\n }",
"private E next() {\n\t\tif (hasNext()) {\n\t\t\tE temp = iterator.data;\n\t\t\titerator = iterator.next;\n\t\t\treturn temp;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"@Override\n\t\tpublic T next() {\n\t\t\treturn null;\n\t\t}",
"public void next();",
"public void next();",
"java.lang.String getNextStep();",
"public Object getNext() { \t\n\t\t\tcurrIndex++;\t \n\t\t\treturn collection.elementAt(currIndex);\n\t\t}",
"public void next(){\n\t\tif(generated)\n\t\t\tcurr++;\n\t}",
"private Object getNextElement()\n {\n return __m_NextElement;\n }",
"public int getNextX(){\r\n return nextX;\r\n }",
"public T next()\n {\n T data = current.item;\n current = current.next;\n return data;\n }",
"@Override\n public Long nextSequenceValue() {\n return (Long)getHibernateTemplate().execute(\n new HibernateCallback() {\n @Override\n public Object doInHibernate(Session session) throws HibernateException {\n //return (Long) session.createSQLQuery(\"select SGSWEB.SEQ_CUESTIONARIO.NEXTVAL as id from dual\").addScalar(\"id\", LongType.INSTANCE).uniqueResult();\n return (Long) session.createSQLQuery(\"SELECT NEXTVAL('SGSWEB.SEQ_CUESTIONARIO') as id\").addScalar(\"id\", LongType.INSTANCE).uniqueResult();\n }\n });\n }",
"Object getNextElement() throws NoSuchElementException;",
"@Override\r\n\tpublic String next() {\n\t\tString nx;\r\n\r\n\t\tnx = p.getNext();\r\n\r\n\t\tif (nx != null) {\r\n\t\t\tthisNext = true;\r\n\t\t\tinput(nx);\r\n\t\t}\r\n\t\treturn nx;\r\n\t}",
"@Override\n public Integer next() {\n return query.poll();\n }",
"public void next() {\n\t\t}",
"@Override\n\t\tpublic T1 next() {\n\t\t\treturn (T1)_items[getindex(++_current)];\n\t\t}",
"public T getNextElement();",
"@Override\n public T next() {\n if (nextItem == null)\n throw new NoSuchElementException();\n T item = nextItem;\n lastItem = nextItem;\n remainingItemCount.decrement();\n if (remainingItemCount.isZero())\n getNextReady();\n return item;\n }",
"@Override\n public int nextValue( int start )\n {\n if( possibleValues.size() == 1 && possibleValues.first().equals( start ) )\n {\n return -1;\n }\n return super.nextValue( start );\n }",
"public T next();",
"public T next();",
"public Object next()\n/* */ {\n/* 93 */ if (this.m_offset < this.m_array.length) {\n/* 94 */ Object localObject = this.m_array[this.m_offset];\n/* 95 */ advance();\n/* 96 */ return localObject;\n/* */ }\n/* 98 */ throw new NoSuchElementException();\n/* */ }",
"public int valueAndIncrement() {\n\t\tint x = offset;\n\t\tnext();\n\t\treturn x;\n\t}",
"public void Next();",
"int next();",
"T next();",
"public T getNextItem();",
"public Object next()\n/* */ {\n/* 84 */ if (this.m_offset < this.m_limit) {\n/* 85 */ return this.m_array[(this.m_offset++)];\n/* */ }\n/* 87 */ throw new NoSuchElementException();\n/* */ }",
"public void testGetValue() {\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n test1.prev();\n test1.moveToPos(8);\n assertTrue(test1.getValue().inRange(8));\n for (int i = 0; i < 10; i++) {\n test1.next();\n }\n try {\n test1.getValue();\n }\n catch (Exception e) {\n assertTrue(e instanceof NoSuchElementException);\n }\n }"
] |
[
"0.7793153",
"0.7720692",
"0.70744634",
"0.70562565",
"0.7026456",
"0.6985165",
"0.6922947",
"0.6877512",
"0.6811601",
"0.6773834",
"0.6753246",
"0.6742024",
"0.67201847",
"0.6716332",
"0.6712186",
"0.66889024",
"0.666662",
"0.6645595",
"0.66061956",
"0.6594931",
"0.65677184",
"0.6515689",
"0.64571893",
"0.645594",
"0.6454336",
"0.64358985",
"0.6434345",
"0.6424267",
"0.6418947",
"0.64143527",
"0.64143527",
"0.640984",
"0.6409076",
"0.64082265",
"0.639992",
"0.6391674",
"0.63889885",
"0.6388606",
"0.63708377",
"0.632446",
"0.6316188",
"0.6309844",
"0.630732",
"0.62783676",
"0.6268901",
"0.6268258",
"0.6265909",
"0.62605613",
"0.62508047",
"0.6244179",
"0.62188524",
"0.62188524",
"0.6217519",
"0.62154764",
"0.6211967",
"0.6208321",
"0.6206141",
"0.62061083",
"0.6199288",
"0.61908746",
"0.6185856",
"0.61852294",
"0.61751753",
"0.61749375",
"0.6172453",
"0.6168606",
"0.6160305",
"0.6155686",
"0.6147694",
"0.61416304",
"0.6138579",
"0.61375797",
"0.6135086",
"0.6124032",
"0.61145",
"0.61145",
"0.6109104",
"0.61085284",
"0.60979044",
"0.60950106",
"0.6079215",
"0.60786563",
"0.6077255",
"0.6070294",
"0.6067599",
"0.6058818",
"0.60584784",
"0.6055136",
"0.6048778",
"0.604859",
"0.60449564",
"0.60423505",
"0.60423505",
"0.6038631",
"0.6035154",
"0.60307",
"0.602728",
"0.6025754",
"0.60214186",
"0.60182315",
"0.6001111"
] |
0.0
|
-1
|
System.out.println("Replacing collector with URIs: "); tmp.keySet().forEach(p > System.out.println(" " + p)); System.out.println();
|
private void replace(final Map tmp)
{
_collector.clear();
((Map<String, Object>) tmp).entrySet().forEach(e -> _collector.put(e.getKey(), (Map) e.getValue()));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\tpublic void printFilteredMap() {\n\t\tthis.result.forEach((k, v )-> v.forEach((ke,ve) -> ve.forEach((s) -> System.out.println(k + \" : \"+ ke + \" : \"+ s))));\n\n\t}",
"private void 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}",
"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}",
"public static void main(String[] args) {\n\n HashMap<String, String> hashMap2 = new HashMap<String, String>();\n hashMap2.put(\"bobbyJoe1996\", \"FluffyPonies\");\n hashMap2.put(\"helloKittyFan21\", \"AloeVera?\");\n hashMap2.put(\"coolguyswag\", \"password123\");\n\n System.out.println(hashMap2);\n //hashmaps don't really have an order so the order above might be different than what is printed\n //to the console.\n System.out.println(hashMap2.size());\n System.out.println(hashMap2.replace(\"bobbyJoe1996\", \"DifferenTpassWoRd\"));\n System.out.println(hashMap2);\n System.out.println(hashMap2.containsValue(\"password123\"));\n System.out.println(hashMap2.containsValue(\"passwor\"));\n System.out.println(hashMap2.containsKey(\"coolguyswag\"));\n System.out.println(hashMap2.remove(\"helloKittyFan21\"));\n System.out.println(hashMap2);\n System.out.println(hashMap2.keySet());\n\n }",
"void getSinkSet(){\n\t\tsink = new HashSet<>(inlinks.keySet());\n\t\tfor(String node : outlinks.keySet()){\n\t\t\tif(!(sink.add(node))){\n\t\t\t\tsink.remove(node);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Sink Size : \"+sink.size());\n\t }",
"public static void localPrintAndCompare(Map map) {\n localPrint(_computedAgg.printContent(), map);\n localCompare(map);\n }",
"@Override\n\tpublic void print(Multimap<String, List<String>> multimap,List<String> finalList) {\n\t\tmultimap= fileRecordsIntoMap(finalList);\n\t\tmultimap= \tremoveNonAnagram(multimap);\n\t\tSet<String> set=multimap.keySet();\n\t\tIterator<String> it=set.iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tList<String> list=(List) multimap.get(String.valueOf(it.next()));\n\t\t\tfor(String value:list)\n\t\t\t{\n\t\t\t\tSystem.out.print(value+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public void printMiniMap() { }",
"public static void main(String[] args) {\n\n\t\tHashMap<String,String> hm = new HashMap<String, String>();\n\t\t\n\t\thm.put(\"e\",\"a1\");\n\t\thm.put(\"b\",\"a1\");\n\t\thm.put(\"a\",\"a2\");\n\t\t \n\t\thm.put(\"a\",\"a5\");\n\t\t\n\t\tSet s = hm.entrySet();\n\t\tIterator it = s.iterator();\n\t\t\n\t\tfor(Map.Entry me : hm.entrySet())\n\t\t\tSystem.out.println(me.getKey()+\" \"+me.getValue());\n\t\t\n\t\t\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tMap.Entry mentry = (Map.Entry) it.next();\n\t\t\tSystem.out.println(mentry.getKey() +\" \"+mentry.getValue());\n\t\t\t\n\t\t}\n\t\t\n\tMap<String,String> thmp = \tnew TreeMap<String,String> (hm);\n\tSystem.out.println();\n\tfor(Map.Entry g : thmp.entrySet())\n\t\tSystem.out.println(g.getKey()+\" \"+g.getValue());\n\t\n\t\n\tSystem.out.println(hm.containsKey(\"a\")+\" \"+hm.containsValue(\"a5\"));\n\t\n\t\t\n\t\t\n\t\t\n\t}",
"@Override\n public String toString() {\n return String.format(\"set: {%s}\", getSortedReplacements().toString());\n }",
"private static void testMap(final OurMap<Integer, String> map) {\n System.out.printf(\"%n%s%n\", map.getClass());\n assert map.size() == 0;\n assert !map.containsKey(117);\n assert !map.containsKey(-2);\n assert map.get(117) == null;\n assert map.put(117, \"A\") == null;\n assert map.containsKey(117);\n assert map.get(117).equals(\"A\");\n assert map.put(17, \"B\") == null;\n assert map.size() == 2;\n assert map.containsKey(17);\n assert map.get(117).equals(\"A\");\n assert map.get(17).equals(\"B\");\n assert map.put(117, \"C\").equals(\"A\");\n assert map.containsKey(117);\n assert map.get(117).equals(\"C\");\n assert map.size() == 2;\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v));\n assert map.remove(117).equals(\"C\");\n assert !map.containsKey(117);\n assert map.get(117) == null;\n assert map.size() == 1;\n assert map.putIfAbsent(17, \"D\").equals(\"B\");\n assert map.get(17).equals(\"B\");\n assert map.size() == 1;\n assert map.containsKey(17);\n assert map.putIfAbsent(217, \"E\") == null;\n assert map.get(217).equals(\"E\");\n assert map.size() == 2;\n assert map.containsKey(217);\n assert map.putIfAbsent(34, \"F\") == null;\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v));\n map.reallocateBuckets();\n assert map.size() == 3;\n assert map.get(17).equals(\"B\") && map.containsKey(17);\n assert map.get(217).equals(\"E\") && map.containsKey(217);\n assert map.get(34).equals(\"F\") && map.containsKey(34);\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v)); \n map.reallocateBuckets();\n assert map.size() == 3;\n assert map.get(17).equals(\"B\") && map.containsKey(17);\n assert map.get(217).equals(\"E\") && map.containsKey(217);\n assert map.get(34).equals(\"F\") && map.containsKey(34);\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v)); \n }",
"public static void main(String[] args) {\n\t\n\tHashMap<Integer, String> map=new HashMap<Integer, String>();\n\tmap.put(0, \"X\");\n\tmap.put(1, \"X\");\n\tmap.put(2, \"Y\");\n\tmap.put(3, \"Z\");\n\t\n\tSystem.out.println(map.get(2));\n\t\n\tfor(int i=0;i<=map.size();i++) {\n\t\tSystem.out.println(map.get(i));\n\t}\n\t\n\t//for(String s:li)\n\tfor (Map.Entry<Integer, String> entry : map.entrySet()) {\n\t System.out.println(entry.getKey() + \" = \" + entry.getValue());\n\t}\n\t\n\tmap.forEach((key,value) -> System.out.println(key + \" = \" + value));\n\t\n\t\n\tmap.forEach((key,value) -> System.out.println(key +\"=\"+value));\n\t\n\t\n}",
"public void printCorefChains(PrintWriter out, boolean printSingletons)\n{\n for (Integer cur : clusters.keySet()) {\n TreeMap<Integer, Integer> cluster = clusters.get(cur);\n if (cluster.keySet().size() > 1 || printSingletons) {\n for (Integer k : cluster.keySet()) {\n out.print(k + \" \");\n }\n out.print(\"\\n\");\n }\n }\n}",
"public static void main(String[] args) {\n\tMap <String, Integer>phones=new HashMap<>();\r\n\tphones.put(\"Mila\", 98232433);\r\n\tphones.put(\"Jenia\", 2834732);\r\n\tphones.put(\"Yerlan\", 77398274);\r\n\tphones.put(\"Mila\",1263584);\r\n\t//last one will override the first one\r\n\t\r\n\tIterator <String> iterator=phones.keySet().iterator();\r\n\twhile (iterator.hasNext()){\r\n\t\tString key=iterator.next();\r\n\t\tInteger value=phones.get(key);\r\n\t\tSystem.out.println(key+\" \"+value);\r\n\t}\r\n\t\r\n\t//store keys in Set\r\n\tSet<String> keys=phones.keySet();\r\n\tfor (String key : keys) {\r\n\t\tSystem.out.println(key);\r\n\t}\r\n\t//store values in Collection\r\n Collection <Integer> val=phones.values();\r\n for (Integer values : val) {\r\n \tSystem.out.println(values);\r\n\t\t\r\n\t}\r\n \r\n Set<Entry<String,Integer>> entry=phones.entrySet();\r\n for (Entry<String, Integer> entry2 : entry) {\r\n\t\t//System.out.println(entry2);\r\n\t\tSystem.out.println(entry2.getKey()+\" \"+entry2.getValue());\r\n\t}\r\n}",
"public static void main(String[] args) {\n HashMap<Integer, String> Hm = new HashMap<Integer, String>();\n Hm.put(0, \"USA\");\n Hm.put(1, \"UK\");\n Hm.put(2, \"India\");\n Hm.put(3, \"Maldives\");\n \n Set sn=Hm.entrySet();\n Iterator i= sn.iterator(); \n while(i.hasNext()) {\n Map.Entry mp=(Map.Entry)i.next();\n System.out.println(mp.getKey());\n System.out.println(mp.getValue());\n }\n \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 printKeys2(Map<Object,Object> map) \n\t{\n\t\tprintnb(\"Size = \" + map.size() + \", \");\n\t\tprintnb(\"Keys: \");\n\t\tprint(map.keySet()); // Produce a set of the keys\n\t}",
"public static void main(String[] args) {\n\t\tMap hashmap = new HashMap();\r\n\t\tMap treemap = new TreeMap();\r\n\t\t// JDK 1.4+ only\r\n\t\tMap linkedMap = new LinkedHashMap();\r\n\t\tSet s;\r\n\t\tIterator i;\r\n\t\t\r\n\t\t/// HASHMAP\r\n\t\thashmap.put(\"Three\", \"Three\");\r\n\t\thashmap.put(\"Three\", \"Three\"); // This entry overwrites the previous\r\n\t\thashmap.put(\"One\", \"One\");\r\n\t\thashmap.put(\"Two\", \"Two\");\r\n\t\thashmap.put(\"Six\", \"Six\");\r\n\t\thashmap.put(\"Seven\", \"Seven\");\r\n\t\t// Order is NOT guaranteed to be consistent; no duplicate keys\r\n\t\tSystem.out.println(\"Unordered Contents of HashMap:\");\r\n\t\t\r\n\t\t/*\r\n\t\t * To iterate over items in a Map, you must first retrieve a Set of all \r\n\t\t * of its keys. Then, iterate over the keys and use each key to retrieve \r\n\t\t * the value object from the Map.\r\n\t\t */\r\n\t\ts = hashmap.keySet();\r\n\t\t// A Map does not have an iterator, but a Set DOES ... why?\r\n\t\ti = s.iterator();\r\n\t\twhile( i.hasNext() ) {\r\n\t\t\t// Example of how to retreive and view the key\r\n\t\t\tObject key = i.next();\r\n\t\t\tSystem.out.println( key );\r\n//\t\t\tSystem.out.println( \"Key: \" + key );\r\n\t\t\t// Now retrieve and view the Map value using that key\r\n//\t\t\tString value = (String)hashmap.get(key);\r\n//\t\t\tSystem.out.println( \"Value: \" + value );\r\n\t\t}\r\n\t\t\r\n\t\t/// LINKEDHASHMAP\r\n\t\tlinkedMap.put(\"Three\", \"Three\");\r\n\t\tlinkedMap.put(\"Three\", \"Three\"); // This entry overwrites the previous\r\n\t\tlinkedMap.put(\"One\", \"One\");\r\n\t\tlinkedMap.put(\"Two\", \"Two\");\r\n\t\tlinkedMap.put(\"Six\", \"Six\");\r\n\t\tlinkedMap.put(\"Seven\", \"Seven\");\r\n\t\t// Order IS guaranteed to be consistent (LRU - Entry order)\r\n\t\tSystem.out.println(\"\\nOrdered (Entry Order) Contents of LinkedHashMap:\");\r\n\t\ts = linkedMap.keySet();\r\n\t\ti = s.iterator();\r\n\t\twhile( i.hasNext() ) {\r\n\t\t\tSystem.out.println( i.next() );\r\n\t\t}\r\n\r\n\t\t/// TREEMAP\r\n\t\ttreemap.put(\"Three\", \"Three\");\r\n\t\ttreemap.put(\"Three\", \"Three\");\r\n\t\ttreemap.put(\"Two\", \"Two\");\r\n\t\ttreemap.put(\"Seven\", \"Seven\");\r\n\t\ttreemap.put(\"One\", \"One\");\r\n\t\ttreemap.put(\"Six\", \"Six\");\r\n\t\t// Keys guaranteed to be in sorted order, no duplicate keys\r\n\t\tSystem.out.println(\"\\nOrdered (Sorted) Contents of TreeMap:\");\r\n\t\ts = treemap.keySet();\r\n\t\ti = s.iterator();\r\n\t\twhile( i.hasNext() ) {\r\n\t\t\tSystem.out.println( i.next() );\r\n\t\t}\r\n\t\t\r\n\t\t// Integer Object values\r\n\t\thashmap = new HashMap();\r\n\t\thashmap.put( \"Three\", new Integer(3) );\r\n\t\thashmap.put( \"Three\", new Integer(3) );\r\n\t\thashmap.put( \"One\", new Integer(1) );\r\n\t\thashmap.put( \"Two\", new Integer(2) );\r\n\t\thashmap.put( \"Six\", new Integer(6) );\r\n\t\thashmap.put( \"Seven\", new Integer(7) );\r\n\t\t\r\n\t\tSystem.out.println(\"\\nContents of HashMap:\");\r\n\t\ts = hashmap.keySet();\r\n\t\ti = s.iterator();\r\n\t\twhile( i.hasNext() ) {\r\n\t\t\tSystem.out.println( i.next() );\r\n\t\t}\r\n\t\t\r\n\t\t// Keys guaranteed to be in sorted order, no duplicate keys\r\n\t\ttreemap = new TreeMap();\r\n\t\ttreemap.put( \"Three\", new Integer(3) );\r\n\t\ttreemap.put( \"Three\", new Integer(3) );\r\n\t\ttreemap.put( \"Two\", new Integer(2) );\r\n\t\ttreemap.put( \"Seven\", new Integer(7) );\r\n\t\ttreemap.put( \"One\", new Integer(1) );\r\n\t\ttreemap.put( \"Six\", new Integer(6) );\r\n\t\t\r\n\t\tSystem.out.println(\"\\nContents of TreeMap:\");\r\n\t\ts = treemap.keySet();\r\n\t\ti = s.iterator();\r\n\t\t\r\n\t\twhile( i.hasNext() ) {\r\n\t\t\tSystem.out.println( i.next() );\r\n\t\t}\r\n\t}",
"public void print() {\n\t\tint i = 1;\n\t\tfor (String s: g.keySet()) {\n\t\t\tSystem.out.print(\"Element: \" + i++ + \" \" + s + \" --> \");\n\t\t\tfor (String k: g.get(s)) {\n\t\t\t\tSystem.out.print(k + \" ### \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tMap<String,Double> items = new HashMap<>();\r\n\t\t\r\n\t\titems.put(\"Toaster\",350.00);\t\t//inits elements into map [STRING == KEY; DOUBLE == VALUE]\r\n\t\titems.put(\"Dongle\", 5.99);\r\n\t\titems.put(\"Sham Wow\", 19.99);\r\n\t\titems.put(\"Flex Seal\",19.99);\r\n\t\t\r\n\t\tSet<String> setOKeys = items.keySet();\r\n\t\tint count = 0;\r\n\t\tfor(String key : items.keySet()){\r\n\t\t\tSystem.out.print(++count + \") \" + key + \": $\" /*+ items.get(key)USED IN NORMAL FORMAT; NEEDED TO UPDATE FOR 2 DECI POINTS see below*/);\r\n\t\t\tSystem.out.printf(\"%.2f\\n\", items.get(key));\t//printf; decimal format to help\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(items.containsKey(\"Sham Wow\"));\r\n\t\tSystem.out.println(items.containsValue(19.99));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t//ANIMAL BOOK HASH MAP EXAMPLE\r\n\t\tMap<String, Integer> ani = new HashMap<>();\r\n\t\tani.put(\"Toucan\", 40);\r\n\t\tani.put(\"Lizard\", 7);\t\t\t//Stored by Integer value\r\n\t\tani.put(\"Wallaby\", 18);\r\n\t\t\r\n\t\tSystem.out.println(ani.get(\"Lizard\"));\r\n\t\t\r\n\t\tani.remove(\"Toucan\");\r\n\t\t\r\n\t\tSystem.out.println(ani); //toString Method is in the collections class automatically\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t//TREE MAP\r\n\t\tSet<Character> letters = new TreeSet<>(); //LINKEDHASHSET will be unordered\r\n\t\tletters.add('b');\r\n\t\tletters.add('c');\r\n\t\tletters.add('a');\r\n\t\tletters.add('c');\t\t//duplicate REMOVED automatically\r\n\t\t\r\n\t\tSystem.out.println(letters);\r\n\t\t\r\n\t\tletters.remove('b');\r\n\t\tSystem.out.println(letters);\r\n\t\t\r\n\t\tSystem.out.println(letters.contains('f'));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tLinkedList<String> food = new LinkedList<>(); //can do list-linked list, linked list-linked list\r\n\t\t\r\n\t\tfood.add(\"Sauerkraut\");\r\n\t\tfood.add(\"Carrots\");\r\n\t\tfood.add(\"Mud\");\r\n\t\tfood.add(1, \"Margarine\"); //at indx 1; Margarine\r\n\t\t\r\n\t\tCollections.sort(food); //method in collections class which sorts\r\n\t\tfood.toString();\r\n\t\t//food.clear(); clears list\r\n\t\t\r\n\t\tString marg = food.get(3);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tQueue<String> cities = new PriorityQueue<>();\r\n\t\t\r\n\t\tcities.offer(\"Detroit\");\t\t//QUEUES 'OFFER'\r\n\t\tcities.offer(\"Los Angeles\");\r\n\t\tcities.offer(\"Vienna\");\r\n\t\tcities.offer(\"Windsor\");\r\n\t\t\r\n\t\tSystem.out.println(cities.peek()); //insertion order\r\n\t\tSystem.out.println(cities);\r\n\t\t\r\n\t\tStack<String> dishes = new Stack<>();\r\n\t\t\r\n\t\tdishes.add(\"Cereal bowl\");\r\n\t\tdishes.add(\"Lunch tray\");\r\n\t\tdishes.add(\"Pots and pans\");\r\n\t\tdishes.add(\"Dinner fork\");\r\n\t\t\r\n\t\tSystem.out.println(dishes.peek());\r\n\t\t\r\n\t\tdishes.pop();\r\n\t\tdishes.pop();\t\t//removing the oldest; fifo \r\n\t\t\r\n\t\tSystem.out.println(dishes);\r\n\t}",
"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 main(String[] args) {\n\n Map map = new HashMap();\n map.put(1, \"Raja\");\n map.put(1, \"hjihihi\");\n map.put(3, \"Aadherai\");\n map.put(4, \"ram\");\n\n // traversing the map by using set\n Set set = map.entrySet();\n\n Iterator itr = set.iterator();\n while(itr.hasNext()){\n\n // System.out.println(itr);\n\n Map.Entry entry= (Map.Entry)itr.next(); // converting to Map.Entry so that we can get key & value seperately\n\n System.out.println(entry.getKey()+\" \"+entry.getValue());\n }\n }",
"public static void main(String[] args) {\n\t\tMap<String,String > cityCaptials = new HashMap<String,String>();\r\n\t\tcityCaptials.put(\"India\",\"Delhi\");\r\n\t\tcityCaptials.put(\"USA\",\"Washington\");\r\n\t\tcityCaptials.put(\"Aus\",\"Berra\");\r\n\t\tcityCaptials.put(\"Srilanka\",\"Columbo\");\r\n\t\tIterator<String> it = cityCaptials.keySet().iterator();\r\n\t\twhile(it.hasNext()) {\r\n\t\t\tSystem.out.println(cityCaptials.get(it.next()));\r\n\t\t\tcityCaptials.put(\"Sat\", \"Ragesh\");\r\n\t\t}\r\n\r\n\t}",
"ImmutableSetMultimap<String, String> describe();",
"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}",
"private void printResult()\n\t{\n\t\t java.util.Iterator<Entry<String, Guest>> it = guestMapList.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry pair = (Map.Entry)it.next();\n Guest guest = (Guest) pair.getValue();\n if(guest.isInvited())\n \t \tSystem.out.println(\"guest \"+guest.getName()+\" should invited!!\");\n it.remove(); // avoids a ConcurrentModificationException\n }\n\t}",
"private void compareFirstPass() {\n this.oldFileNoMatch = new HashMap<String, SubsetElement>();\r\n Iterator<String> iter = this.oldFile.keySet().iterator();\r\n while (iter.hasNext()) {\r\n final String key = iter.next();\r\n if (!this.newFile.containsKey(key)) {\r\n final String newKey = this.oldFile.get(key).getSubsetCode()\r\n + this.oldFile.get(key).getConceptCode();\r\n this.oldFileNoMatch.put(newKey, this.oldFile.get(key));\r\n }\r\n }\r\n\r\n // Now repeat going the other way, pulling all new file no matches into\r\n // newFileNoMatch\r\n this.newFileNoMatch = new HashMap<String, SubsetElement>();\r\n iter = this.newFile.keySet().iterator();\r\n while (iter.hasNext()) {\r\n final String key = iter.next();\r\n if (!this.oldFile.containsKey(key)) {\r\n final String newKey = this.newFile.get(key).getSubsetCode()\r\n + this.newFile.get(key).getConceptCode();\r\n this.newFileNoMatch.put(newKey, this.newFile.get(key));\r\n }\r\n }\r\n\r\n // dump the initial large HashMaps to reclaim some memory\r\n this.oldFile = null;\r\n this.newFile = null;\r\n }",
"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 }",
"static void AddAndDisplay()\n\t{\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\toSet = new TreeSet<String>();\n\t\t\toSet.add(\"Apple\");\n\t\t\toSet.add(\"Boy\");\n\t\t\toSet.add(\"Cat\");\n\t\t\toSet.add(\"Apple\");\n\t\t\tSystem.out.println(oSet);\n\t\t\tSystem.out.println(\"****************\");\n\t\t\t\n\t\t\tfor(String s:oSet)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"for each loop: \"+s);\n\t\t\t}\n\t\t\tSystem.out.println(\"****************\");\n\t\t\t\n\t\t\tIterator<String> it = oSet.iterator();\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Iterator: \"+it.next());\n\t\t\t}\n\t\t\tSystem.out.println(\"****************\");\n\t\t\t\n\t\t\tSpliterator<String> sp = oSet.spliterator();\n\t\t\tsp.forEachRemaining(System.out::println);\n\t\t\tSystem.out.println(\"****************\");\n\t\t\t\n\t\t\toSet.forEach((k)->System.out.println(\"for each method: \"+k));\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toSet = null;\n\t\t}\n\t}",
"private void reachable() {\r\n\r\n\t\tSortedSet<String> keys = new TreeSet<String>(vertexMap.keySet());\r\n\t\tIterator it = keys.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tVertex v = vertexMap.get(it.next());\r\n\t\t\tif (v.isStatus()) {\r\n\t\t\t\tSystem.out.println(v.getName());\r\n\t\t\t\tbfs(v);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void printValues(){\r\n\r\n for(String key : values.keySet()){\r\n String value = values.get(key).toString();\r\n System.out.println(key + \" = \" + value);\r\n }\r\n\r\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}",
"private void printNonDuplicates( Collection< String > collection )\r\n {\r\n \t // create a HashSet using a collection as parameter\r\n \t Set< String > set = new HashSet< String >( collection );\r\n \t System.out.println( \"Nonduplicates are: \" );\r\n \t for ( String s : set )\r\n \t\t System.out.printf( \"%s \", s );\r\n \t System.out.println();\r\n \t }",
"void printPlaceArtifacts()\r\n\t{\r\n\t\tfor( Map.Entry <String, Artifact> entry : artPlace.entrySet()) \r\n\t\t{\r\n\t\t\t String key = entry.getKey();\r\n\t\t\t Artifact value = entry.getValue();\r\n\t\t\t \r\n\t\t\t // System.out.println(\"Place Name: \" + this.name());\r\n\t\t\t \r\n\t\t\t System.out.println(\" Artifact Name----->\" + value.getName());\r\n\t\t\t System.out.println(\"Size-----> \" + value.getSize());\r\n\t\t\t System.out.println(\"Value-----> \" + value.getValue() + \" \\n\");\t\r\n\t\t}\r\n\t}",
"private TreeMap<String, Integer> debugMap (Set <String> keys, TreeMap <String, ArrayList<String>> lists) {\r\n \t//Create debug TreeMap\r\n \tTreeMap<String, Integer> toReturn = new TreeMap<String, Integer>();\r\n \t//Iterate through Set of keys created in makeGuess, passed as parameter\r\n \tIterator<String> it = keys.iterator();\r\n \twhile (it.hasNext()) {\r\n \t\tString temp = it.next();\r\n \t\t//Add pattern as key, size as value\r\n \t\ttoReturn.put(temp, lists.get(temp).size());\r\n \t}\r\n \treturn toReturn;\r\n }",
"private void dumpMap(PrintStream stream, Map<String, String> map) {\n for (String key : map.keySet()) {\n stream.println(\" \" + key + \" -> \" + map.get(key));\n }\n }",
"private static void printDependencies(ConcurrentHashMap<String,LinkedList<String>> map, LinkedList<String> toProcess) {\r\n \tLinkedList<String> ll;\r\n \tString p;\r\n\r\n \twhile (toProcess.size() != 0) {\r\n \t\tp = toProcess.removeFirst();\r\n \t\tll = hashM.get(p);\r\n \t\tfor (String name : ll) {\r\n \t\t\tif (map.containsKey(name)) {\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t\tSystem.out.print(\" \" + name);\r\n \t\t\tmap.put(name,new LinkedList<String>());\r\n \t\t\ttoProcess.add(name);\r\n \t\t}\r\n \t}\r\n }",
"public static void main(String[] args) {\n\t\tMap<String, String> m=new HashMap();\n\t\t\nm.put(\"SW\", \"1\");\nm.put(\"HR\", \"2\");\nm.put(\"Admin\", \"3\");\nm.put(\"FOE\", \"4\");\n\nString s=m.get(\"Admin\");\nSystem.out.println(s);\nIterator i=m.keySet().iterator();\n\n//via iterator\nwhile(i.hasNext())\n{\n\tObject k=i.next();\n\tObject v=m.get(k);\n\tSystem.out.print(\"Key=\"+k+\"value=\"+v+\"\\n\");\n}\n//via for loop\nSystem.out.println(\"_________\");\nfor(String key:m.keySet())\n{\n\tString value=m.get(key);\n\t\n\tSystem.out.print(\"Key=\"+key+\"value=\"+value+\"\\n\");\n}\n\n}",
"public void printWithJavaV8(){\n map.entrySet().forEach(System.out::println);\n }",
"public static void main(String[] args) {\n Set<String> mySet = new HashSet<String>(100,50);\n mySet.add(\"APPLE\");\n mySet.add(\"LG\");\n mySet.add(\"HTTC\");\n mySet.add(\"APPLE\");\n mySet.add(\"SAMSUNG\");\n Iterator<String> iterator = mySet.iterator();\n while (iterator.hasNext()){\n System.out.println(iterator.next());\n }\n\n\n\n }",
"public void replaceThesarusWordwithGoogleWord ( ) {\r\n\t \t\t \t\r\n\t \tfor (Map.Entry<String, List<String>> entry : GoogleToThesarus.entrySet()) {\r\n\t String key = entry.getKey();\r\n\t List<String> values = entry.getValue();\r\n\t //String wordIsReplaced=null;\r\n\t \r\n\t for (String temp: values) {\r\n\t \t//why is this null\r\n\t \t\r\n\t \tif (splitto.equals(temp)) {\r\n\t \t\tsplitto=key;\r\n\t \t\tif(!replacedWordList.contains(splitto))\r\n\t \t\t\treplacedWordList.add(splitto);\r\n \t\t\r\n\t \t \t\t \t\t}\r\n\t \telse {\r\n\t \t\t//wordIsReplaced=splitto;\r\n\t \t\t//System.out.println(\"failed\");\r\n\t \t}\r\n\t \t\t }\r\n\t \t}\r\n\t }",
"void printAssociations(HashMap<BitSet, Integer> allAssociations){\n try{\n boolean firstLine = true;\n FileWriter fw = new FileWriter(this.outputFilePath);\n \n for(Map.Entry<BitSet, Integer> entry : allAssociations.entrySet()){\n BitSet bs = entry.getKey();\n if(firstLine)\n firstLine = false;\n else\n fw.write(\"\\n\");\n \n for(int i=0; i<bs.length() ; i++){\n if(bs.get(i))\n fw.write(intToStrItem.get(frequentItemListSetLenOne.get(i).getKey())+\" \");\n }\n\n fw.write(\"(\" + entry.getValue() +\")\");\n }\n \n fw.close();\n }\n catch(Exception e){\n e.printStackTrace();\n }\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}",
"private void printNonDuplicates( Collection< String > collection )\r\n {\r\n // create a HashSet \r\n Set< String > set = new HashSet< String >( collection ); \r\n\r\n System.out.println( \"\\nNonduplicates are: \" );\r\n\r\n for ( String s : set )\r\n System.out.printf( \"%s \", s );\r\n\r\n System.out.println();\r\n }",
"public static void main(String[] args) {\n Map<String, Set<Integer>> ms = new HashMap<>(); \n Set<Integer> s1 = new HashSet<>(Arrays.asList(1,2,3));\n Set<Integer> s2 = new HashSet<>(Arrays.asList(4,5,6));\n Set<Integer> s3 = new HashSet<>(Arrays.asList(7,8,9));\n ms.put(\"one\", s1);\n ms.put(\"two\", s2);\n ms.put(\"three\", s3);\n System.out.println(ms); \n // ch07.collections.Ch0706InterfacesVsConcrete$1\n // {one=[1, 2, 3], two=[4, 5, 6], three=[7, 8, 9]}\n\n // this is how LinkedHashMap<Integer,Tuple2<String,LinkedHashMap<Double,String>>>\n // can be initially initialized\n LinkedHashMap<Integer,Tuple2<String,LinkedHashMap<Double,String>>> toc =\n new LinkedHashMap<>();\n System.out.println(toc); // just using toc to get rid of eclipse warning about not using it\n \n \n\n\n\n }",
"public static void main(String[] args) {\n\t\t\tList<String> hrLeaders = new ArrayList<>();\n\t\t\thrLeaders.add(\"762 - Barry Bonds\");\n\t\t\thrLeaders.add(\"755 - Hank Aaron\");\n\t\t\thrLeaders.add(\"714 - Babe Ruth\");\n\t\t\thrLeaders.add(\"687 - Alex Rodriquez\");\n\t\t\thrLeaders.add(\"686 - Brandon Davis\");\n\t\t\thrLeaders.add(\"686 - Brandon Davis\");\n\t\t\thrLeaders.add(\"660 - Willie Mays\");\n\t\t\t\n\t\t\tSystem.out.println(\"*****LIST EXAMPLE*****\");\n\t\t\tSystem.out.println(\"Here are the top \" + hrLeaders.size() + \" homerun leaders of all time!\");\n\t\t\tSystem.out.print(hrLeaders);\n\t\t\t\n\t\t\tSystem.out.print( \"\\n\\n\" );\n\t\t\thrLeaders.set(0, \"763 - Mike Trout\");\n\t\t\tSystem.out.println(\"Updated Home Run List \\n\" + hrLeaders);\n\t\t\t\n\t\t\tSystem.out.print( \"\\n\\n\" );\t\t\t\n\t\t\tSystem.out.print(\"Sorted Set after passing into TreeSet: \\n\"); \n\t Set<String> tree_Set1 = new TreeSet<String>(hrLeaders); \n\t System.out.println(tree_Set1);\n\t \n\t System.out.print( \"\\n\\n\" );\t\n\t\t\t\n\t\t\tSystem.out.print( \"_______________________________________________________________________\" );\n\t\t\tSystem.out.print( \"\\n\\n\" );\n\t\t\t\n\n//Map EXAMPLE//\t\t\n\t\t\tSystem.out.println(\"*****Map EXAMPLE*****\");\n\t\t\tMap<Integer, String> AhrLeaders = new HashMap<>();\n\t\t\tAhrLeaders.put(762, \"Barry Bonds\");\n\t\t\tAhrLeaders.put(755, \"Hank Aaron\");\n\t\t\tAhrLeaders.put(714, \"Babe Ruth\");\n\t\t\tAhrLeaders.put(687, \"Alex Rodriquez\");\n\t\t\tAhrLeaders.put(686, \"Brandon Davis\");\n\t\t\tAhrLeaders.put(686, \"Brandon Davis\");\n\t\t\tAhrLeaders.put(660, \"Willie Mays\");\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"Here are the top \" + AhrLeaders.size() + \" homerun leaders of all time!\");\n\t\t\tSystem.out.print(AhrLeaders);\n\t\t\t\n\t\t\tSystem.out.print( \"\\n\\n\" );\n\t\t\t\n\t\t\tArrayList<Integer> keyList = new ArrayList<Integer>(AhrLeaders.keySet());\n\t\t ArrayList<String> valueList = new ArrayList<String>(AhrLeaders.values());\n\n\t\t System.out.println(\"Top Homerun Leaders by number of Homeruns ::\"+keyList);\n\t\t System.out.println(\"Top Homerun Leaders by Name ::\"+valueList);\n\t\t\t\n\t\t System.out.print( \"_______________________________________________________________________\" );\n\t\t\tSystem.out.print( \"\\n\\n\" );\n\t\t\t\n//Set EXAMPLE and Treeset//\t\t\n\t\t\tSystem.out.println(\"*****Set EXAMPLE*****\");\n\t\t\tSet<String> BhrLeaders = new HashSet<String>();\n\t\t\tBhrLeaders.add(\"762 - Barry Bonds\");\n\t\t\tBhrLeaders.add(\"755 - Hank Aaron\");\n\t\t\tBhrLeaders.add(\"714 - Babe Ruth\");\n\t\t\tBhrLeaders.add(\"687 - Alex Rodriquez\");\n\t\t\tBhrLeaders.add(\"686 - Brandon Davis\");\n\t\t\tBhrLeaders.add(\"686 - Brandon Davis\");\n\t\t\tBhrLeaders.add(\"660 - Willie Mays\");\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"Here are the top \" + BhrLeaders.size() + \" homerun leaders of all time!\");\n\t\t\tSystem.out.print(BhrLeaders);\n\t\t\t\n\t\t\tSystem.out.print( \"\\n\\n\" );\n\t\n\t\t\tBhrLeaders.add(\"661 - Mike Trout\"); \n\t\t\tSystem.out.println(\"Updated Home Run List: \\n\" + BhrLeaders);\n\t\t\t\n\t\t\tSystem.out.print( \"\\n\\n\" );\n\t\t\t\n\t\t\tSystem.out.print(\"Sorted Set after passing into TreeSet: \\n\"); \n\t Set<String> tree_Set = new TreeSet<String>(BhrLeaders); \n\t System.out.println(tree_Set);\n\t\t\t\n\t System.out.print( \"_______________________________________________________________________\" );\n\t\t\tSystem.out.print( \"\\n\\n\" );\n\n//Queue EXAMPLE//\t\t\n\t\t\tSystem.out.println(\"*****QUEUE EXAMPLE*****\");\n\t\t\t\n\t\t\tList<String> listhrLeaders = Arrays.asList(\"Barry Bond - 762\", \"Hank Aaron - 755\", \"Babe Ruth - 714\", \"Alex Rodriequez - 687\", \"Brandon Davis - 686\", \"Brandon Davis - 686\", \"Willie Mays - 660\");\n\t\t\tQueue<String> queueNames = new LinkedList<>(listhrLeaders);\n\t\t\tSystem.out.println(queueNames);\n\t\t\t\n\t\t\tqueueNames.add(\"661 - Mike Trout\");\n\t\t\tqueueNames.add(\"660 - Bryce Harper\");\n\t\t\tSystem.out.println(queueNames);\n\t\t\t\n\t\t\t\t\t\n\t\n\t}",
"public static void printValues(){\n\t\tSet s = config.entrySet();\n\t\tIterator si = s.iterator();\n\t\tMap.Entry me;\n\t\twhile(si.hasNext()){\n\t\t\tme = ((Map.Entry) (si.next()));\n\t\t\tSystem.out.println(me.getKey() + \" \" + me.getValue());\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n\t\tArrayList<String> ar=new ArrayList<String>();\n\t\tar.add(\"Hai\");\n\t\tar.add(\"Hello\");\n\t\t\n\t\tSet<String> set=new TreeSet<String>();\n\t\tset.add(\"Niha\");\n\t\tset.add(\"Nikki\");\n\t\t\n\t\tPriorityQueue<String> q=new PriorityQueue<String>();\n\t\tq.add(\"Java\");\n\t\tq.add(\"Dotnet\");\n\t\t\n\t\tHashMap<String,Collection> hm=new HashMap<String,Collection>();\n\t\t\n\t\thm.put(\"1234\", ar);\n\t\thm.put(\"234\", set);\n\t\thm.put(\"4567\", q);\n\t\t\n\t\tSet entries=hm.entrySet();\n\t\tIterator itr=entries.iterator();\n\t\t\n\t\twhile(itr.hasNext()) {\n\t\t\tMap.Entry me=(Map.Entry)itr.next();\n\t\t\tCollection c=(Collection)me.getValue();\n\t\t\tSystem.out.println(me.getKey()+\"\"+c);\n\t\t}\n\t\t\n\n\t}",
"public static void main(String[] args) {\n\n\t\tHashMap<Integer, String> hash_map = new HashMap<Integer, String>();\n\t\thash_map.put(1, \"Simon\");\n\t\thash_map.put(2, \"Samuel\");\n\t\thash_map.put(3, \"Thomus\");\n\t\thash_map.put(4, \"Ezekel\");\n\t\t\n\t\tStringBuilder str = new StringBuilder();\n\t\thash_map.entrySet().forEach(n-> str.append(n.getKey()).append(n.getValue()));\n\t\tSystem.out.println(str.toString());\n//\t\tSet<Entry<Integer, String>> n= hash_map.entrySet();\n//\t\thash_map.forEach(n -> str.toString());\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tMap<String, String> map = new HashMap<>();\n\t\t\n\t\tArrayList<String> lista = new ArrayList<>();\n\t\t\n\t\tString a = \"Juan\";\n\t\tString b = \"ObiJuan\";\n\t\tString c = \"Paco\";\n\t\t\n\t\tlista.add(a);\n\t\tlista.add(b);\n\t\tlista.add(c);\n\t\t\n\t\tmap.put(\"primero\", a);\n\t\tmap.put(\"segundo\", b);\n\t\tmap.put(\"tercero\", c);\n\t\t\n\t\tSystem.out.println(lista.get(1));\n\t\tSystem.out.println(lista.get(lista.indexOf(\"ObiJuan\")));\n\t\t\n\t\tSystem.out.println(\"----------------\");\n\t\t\n\t\tSystem.out.println(map.get(\"primero\"));\n\t\t\n\t\tlista.remove(lista.indexOf(\"Paco\"));\n\t\t\n\t\t\n\t\tfor (String palabra : lista) {\n\t\t\tSystem.out.println(palabra);\n\t\t}\n\t\tSystem.out.println(\"----------------\");\n\t\tfor (String key : map.keySet()) {\n\t\t\tSystem.out.println(\"Clave: \" + key);\n\t\t\tSystem.out.println(\"Valor: \" + map.get(key));\n\t\t\tSystem.out.println(\"----------------\");\n\t\t}\n\t\tSystem.out.println(\"----------------\");\n\t\tSystem.out.println(\"----------------\");\n\t\t\n\t\tlista.forEach(elemento -> System.out.println(elemento));\n\t\t\n\t\tSystem.out.println(\"----------------\");\n\t\t\n//\t\tmap.forEach(clave, valor -> (\n//\t\t\tSystem.out.println(\"Clave con lambda: \" + clave);\n//\t\t\tSystem.out.println(\"Valor con lambda: \" + valor);\n//\t\t);\n//\t\t\n\t}",
"public static void main(String[] args) {\n\t\tMap<Integer, Integer> myMap = new HashMap<Integer, Integer>();\n\t\t\n\t\tmyMap.put(1, 5);\n\t\tmyMap.put(2, 4);\n\t\tmyMap.put(3, 3);\n\t\tmyMap.put(4, 2);\n\t\tmyMap.put(5, 1);\n\t\t\n\t\tIterator<Map.Entry<Integer, Integer>> iterator =myMap.entrySet().iterator();\n\t\t\n\t\twhile(iterator.hasNext()) {\n\t\t\tMap.Entry<Integer, Integer> entry =iterator.next();\n\t\t\tSystem.out.println(\"key : \"+entry.getKey()\n\t\t\t+\" value : \"+entry.getValue());\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-----------\");\n\t\t\n\t\tfor(Map.Entry<Integer, Integer> iteratoor : myMap.entrySet()) {\n\t\t\tSystem.out.println(iteratoor);\n\t\t}\n\t\t\n\t\tmyMap.forEach((k,v) -> System.out.println(k+\"-\"+v));\n\t}",
"@Test\n public void canWeKeepNullInCollections() {\n List<Integer> list = new ArrayList<>();\n Set<Integer> set = new HashSet<>();\n Map<Integer, Integer> map = new HashMap<>();\n\n list.add(null);\n set.add(null);\n map.put(1, null);\n map.put(null, 1);\n map.put(null, null);\n\n System.out.println(map);\n\n }",
"public static void printHashMapSI(Map<String, Integer> map) throws IOException{\n\t\tPrintWriter writer = new PrintWriter(\"C:/Users/Naveen/Desktop/TestRuns/LastRun/allTermHash\");\n\t\tfor (Entry<String, Integer> entry : map.entrySet())\n\t {\t \t\t\n\t \t\twriter.println(entry.getKey()+\":\"+entry.getValue());\n\t }\n\t writer.close();\n\t}",
"public void printHash(String valu){\r\n /*\r\n Put A for Arrangers\r\n V for Vocalists\r\n C for Circles\r\n */\r\n String type=\"\";\r\n Map <Integer,String>TempMap=new HashMap();\r\n switch(valu){\r\n case \"A\":\r\n type=\"Arranger's\";\r\n TempMap.putAll(ArrangersMap);\r\n break;\r\n case \"V\":\r\n type=\"Vocalists's\";\r\n TempMap.putAll(VocalistsMap);\r\n break;\r\n case \"C\":\r\n type=\"Circle's\";\r\n TempMap.putAll(CirclesMap);\r\n break; \r\n }\r\n int counter=0;\r\n List<String> values=new ArrayList<>();\r\n for(int id:TempMap.keySet()){\r\n values.add(TempMap.get(id));\r\n }\r\n TempMap.clear();\r\n Collections.sort(values,Collator.getInstance());\r\n for(String val: values){\r\n val=val.trim();\r\n TempMap.put(counter, val.trim());\r\n //System.out.println(val);\r\n counter++;\r\n }\r\n for(int id:TempMap.keySet()){\r\n System.out.println(\"The \" + type+ \" name is: \"+TempMap.get(id)+ \" The id is:\"+id);\r\n }\r\n }",
"public static void main(String[] args) {\n\t\tjava.util.HashMap<Integer,String> h=new java.util.HashMap<Integer,String>(); //Keys,values\n\t\th.put(1,\"alla\");\n\t\th.put(2, \"gopal\");\n\t\th.put(3, \"Barathi\");\n\t\th.put(4, \"thirupathi\");\n\t\th.put(5,\"\");\n\t\th.put(6,\"\");\n\t\th.put( null, \"hello\");\n\t\th.put( null, \"hi\"); //It will take only one null key and number null values\n\t\th.replace(1, \"alla\",\"yeshwanth\");\n\t\t\n\t\t\n\t\tSystem.out.println(h);\n\t\t\n\t\tSystem.out.println(h.get(3));\n\t\tSystem.out.println(h.replace(2, \"gopal\", \"Gopalreddy\"));\n\t\t\n\t\tSet s=h.entrySet();\n\t\tIterator i=s.iterator();\n\t\twhile(i.hasNext())\n\t\t{\n\t\t\tMap.Entry m=(Map.Entry)i.next();\n\t\t\tSystem.out.println(m.getKey()); //if you want seperately print keys\n\t\t\tSystem.out.println(m.getValue()); //If you want seperately print values\n\t\t}\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tHashMap<Price,String> hm = new HashMap<Price,String>();\n\t\tPrice p1 = new Price(100,\"mango\");\n\t\tPrice p2 = new Price(200,\"apple\");\n\t\tPrice p3 = new Price(500,\"custard\");\n\t\tPrice p4 = new Price(700,\"grapes\");\n\t\thm.put(p1, \"mango\"); // key cannot accept duplicate keys so inserting price as a key\n\t\thm.put(p2, \"apple\");\n\t\thm.put(p3, \"custard\");\n\t\thm.put(p4, \"grapes\");\n\t\tPrice p5 = new Price(200,\"apple\");\n\t\thm.put(p5, \"apple\");\n\t\tSet set1 = hm.keySet();\n\t\tSystem.out.println(set1);\n\t\tCollection c = hm.values();\n\t\t\n\t\tfor(Map.Entry<Price, String> map : hm.entrySet()){\n\t\t\tPrice key =map.getKey();\n\t\t\tString value = map.getValue();\n\t\t\tSystem.out.println(key+\" \"+value);\n\t\t}\n\t}",
"private int printMap(Map<Set<String>, Integer> f1Map, FileWriter tgFileWriter) throws IOException {\n\t\tfor(Map.Entry<Set<String>, Integer> f1MapItem : f1Map.entrySet()){\n\t\t\tfor(String p : f1MapItem.getKey()){\n\t\t\t\ttgFileWriter.append(p + \" \");\n\t\t\t}\n\t\t\ttgFileWriter.append(\": \" + f1MapItem.getValue() + \"\\n\");\n\t\t}\n\t\ttgFileWriter.flush();\n\t\treturn f1Map.size();\n\t}",
"public static void main(String[] args) {\n Map<String, String> map = new HashMap<String, String>();\r\n map.put(\"a\", \"A\");\r\n map.put(\"b\", \"B\");\r\n map.put(\"c\", \"C\");\r\n \r\n \r\n int h = (new TestMap()).hashCode();\r\n \r\n String a = map.get(\"a\");\r\n \r\n \r\n \r\n \r\n for (String o : map.keySet()){\r\n \tSystem.out.println(o);\r\n \tSystem.out.println(map.get(o));\r\n \t\r\n }\r\n \r\n Map<String, String> map2 = new HashMap<String, String>();\r\n map2.putAll(map);\r\n \r\n for (Map.Entry<String, String> o : map2.entrySet()){\r\n \tSystem.out.println(o.getKey());\r\n \tSystem.out.println(o.getValue());\r\n }\r\n \r\n System.out.println(map2.containsValue(\"A\")); \r\n System.out.println(map2.equals(map)); \r\n\r\n\t}",
"public static void main(String[] args){\n\n TreeMap<Student, String> tmap = new TreeMap<>(new newComparator());\n tmap.put(new Student(\"aaaa\",12), \"Beijing\");\n tmap.put(new Student(\"bbbb\",12), \"Guangzhou\");\n tmap.put(new Student(\"dddd\",16), \"Zhuzhou\");\n tmap.put(new Student(\"cccc\",11), \"Shanghai\");\n tmap.put(new Student(\"aaaa\",19), \"Hongkong\");\n\n Set<Map.Entry<Student, String>> es = tmap.entrySet();\n Iterator<Map.Entry<Student, String>> it = es.iterator();\n\n\n /*\n while(it.hasNext()){\n Student stu = it.next();\n String location = map.get(stu);\n System.out.println(stu +\" --------- \"+location);\n }\n */\n\n while(it.hasNext()){\n Map.Entry<Student, String> me = it.next();\n Student stu = me.getKey();\n String addr = me.getValue();\n System.out.println(stu+\" ::: \"+ addr);\n\n }\n\n\n }",
"private Map<String,List<Invertedindex>> collecting() //\r\n {\r\n Map<String,List<Invertedindex>> maps = new TreeMap<>();\r\n for (Core pon:pondred){\r\n for(Map.Entry<String,Double> term:pon.allTerms.entrySet()){\r\n if (maps.containsKey(term.getKey())){\r\n List<Invertedindex> index = maps.get(term.getKey());\r\n index.add(new Invertedindex(pon.m_cle,term.getValue(),pon.getBalise(term.getKey())));\r\n maps.put(term.getKey(), index);\r\n }else {\r\n List<Invertedindex> index = new ArrayList<>();\r\n index.add(new Invertedindex(pon.m_cle,term.getValue(),pon.getBalise(term.getKey())));\r\n maps.put(term.getKey(), index);\r\n }\r\n if(cleFreq.containsKey(pon.m_cle))\r\n cleFreq.put(pon.m_cle,cleFreq.get(pon.m_cle)+term.getValue());\r\n else cleFreq.put(pon.m_cle,term.getValue());\r\n\r\n }\r\n }\r\n return maps;\r\n }",
"public static void demo1() {\n Map<String, String> m = new HashMap<String, String>();\r\n // Key, Value\r\n m.put(\"cn\", \"China\");\r\n m.put(\"th\", \"Thailand\");\r\n m.put(\"jp\", \"Japan\");\r\n\r\n// System.out.println(m.get(\"jp\"));\r\n\r\n for (Map.Entry<String, String> item : m.entrySet()) {\r\n String key = item.getKey();\r\n String value = item.getValue();\r\n System.out.printf(\"%s => %s\\n\", key, value);\r\n }\r\n\r\n System.out.println(\"----------------------\");\r\n m.put(\"th\", \"Siam\");\r\n\r\n for (Map.Entry<String, String> item : m.entrySet()) {\r\n String key = item.getKey();\r\n String value = item.getValue();\r\n System.out.printf(\"%s => %s\\n\", key, value);\r\n }\r\n\r\n if (m.containsValue(\"Japan\")) {\r\n System.out.println(\"found Japan\");\r\n }\r\n\r\n if (m.containsKey(\"cn\")) {\r\n System.out.println(\"found key cn\");\r\n m.remove(\"cn\");\r\n System.out.println(\"----------------remove cn-------------\");\r\n for (Map.Entry<String, String> item : m.entrySet()) {\r\n String key = item.getKey();\r\n String value = item.getValue();\r\n System.out.printf(\"%s => %s\\n\", key, value);\r\n }\r\n }\r\n\r\n }",
"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 testEntrySetIteratorHasProperMappings() {\n return;\r\n }",
"public static void main(String[] args) {\nSystem.out.println(\"**********************HashSet********************\");\n\t Set<String> set=new HashSet<String>();\n\t set.add(\"abc\");\n\t set.add(\"abc\");\n\t set.add(\"def\");\n\t print(set);\n\t \n\t System.out.println(\"**********************LinkedHashSet********************\"); \n\t Set<Integer> lset=new LinkedHashSet<Integer>();\n\t lset.add(1);\n\t lset.add(100);\n\t lset.add(100);\n\t print(lset);\n\t \n\t System.out.println(\"**********************TreeSet********************\");\n\t Set<String> ts=new TreeSet<String>();\n\t ts.add(\"aabbcc\");\n\t ts.add(\"ddeeff\");\n\t ts.add(\"awsedr\");\n\t print(ts);\n\t \n\t System.out.println(\"**********************ArrayList********************\");\n\t List<Integer> list=new ArrayList<Integer>();\n\t list.add(1);\n\t list.add(2);\n\t list.add(3);\n\t list.add(3);\n\t list.add(4);\n\t print(list);\n\t \n\t \n\t System.out.println(\"**********************Vector********************\");\n\t List<String> vect=new Vector<String>();\n\t vect.add(\"a\");\n\t vect.add(\"b\");\n\t vect.add(\"c\");\n\t vect.add(\"d\");\n\t vect.add(\"d\");\n\t print(vect);\n\t \n\t System.out.println(\"**********************LinkedList********************\");\n\t List<Integer> linkedList=new LinkedList<Integer>();\n\t linkedList.add(9);\n\t linkedList.add(7);\n\t linkedList.add(1);\n\t linkedList.add(7);\n\t print(linkedList);\n\t \n\t System.out.println(\"**********************HashMap<Integer, Integer>********************\");\n\t Map<Integer, Integer> mp=new HashMap<Integer,Integer>();\n\t mp.put(1, 2);\n\t mp.put(3, 4);\n\t mp.put(5, 6);\n\t mp.put(7, 8);\n\t printMap(mp);\n\t \n\t \n\t System.out.println(\"**********************HashMap<Integer, String>********************\");\n\t Map<Integer, String> mp1=new HashMap<Integer,String>();\n\t mp1.put(1, \"a\");\n\t mp1.put(2, \"b\");\n\t mp1.put(3, \"c\");\n\t mp1.put(4, \"d\");\n\t printMap(mp1);\n\t \n\t System.out.println(\"**********************LinkedHashMap<String, Integer>********************\");\n\t Map<String, Integer> mp2=new HashMap<String, Integer>();\n\t mp2.put(\"a\", 1);\n\t mp2.put(\"a\", 2);\n\t mp2.put(\"b\", 3);\n\t mp2.put(\"d\", 4);\n\t printMap(mp2);\n\t \n\t \n\t System.out.println(\"**********************TreeMap<String, String>********************\");\n\t Map<String, String> mp3=new HashMap<String, String>();\n\t mp3.put(\"a\", \"z\");\n\t mp3.put(\"a\", \"y\");\n\t mp3.put(\"a\", \"y\");\n\t mp3.put(\"b\", \"x\");\n\t mp3.put(\"d\", \"w\");\n\t printMap(mp3);\n\t \n\t \n\t \n\t \n\t}",
"@Test public void testToString() {\r\n new LinkedHashMap<String, Word>() {\r\n private static final long serialVersionUID = -284033589685053024L; {\r\n put(\"Test\", w2);\r\n put(\"test'ing\", w4);\r\n }}.forEach((k, v) -> {\r\n assertTrue(\"Should be equal.\", v.toString().equals(k));\r\n });\r\n }",
"@Test\n public void test12() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1332,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test12\");\n MapIterator<Class<StringTokenizer>, StringTokenizer> mapIterator0 = IteratorUtils.emptyMapIterator();\n MapIterator<Class<StringTokenizer>, StringTokenizer> mapIterator1 = IteratorUtils.unmodifiableMapIterator(mapIterator0);\n assertNotSame(mapIterator1, mapIterator0);\n }",
"void placeArtifacts()\r\n\t{\r\n\t\t\r\n\t\tfor( Map.Entry <String, Artifact> entry : artPlace.entrySet()) \r\n\t\t{\r\n\t\t\t String key = entry.getKey();\r\n\t\t\t Artifact value = entry.getValue();\r\n\t\t\t \r\n\t\t\t System.out.print( value.getName().trim() + \", \");\r\n\t\t\t \r\n\t\t\t/* if (! (value.getName().isEmpty()))\r\n\t\t\t {\r\n\t\t\t\t io.display( value.getName().trim() + \", \");\r\n\t\t\t } */\r\n \r\n\t\t\t// System.out.print( value.getName().trim() + \", \");\r\n\t\t}\r\n\t}",
"public static void printResults() {\n resultMap.entrySet().stream().forEach((Map.Entry<File, String> entry) -> {\n System.out.println(String.format(\"%s processed by thread: %s\", entry.getKey(), entry.getValue()));\n });\n System.out.println(String.format(\"processed %d entries\", resultMap.size()));\n }",
"@Test\n public void keySetTest()\n {\n map.putAll(getAMap());\n assertNotNull(map.keySet());\n }",
"public static void main(String[] args) {\n\t\t\r\n\t\tMap<Integer, Integer> map =new HashMap<>();\r\n\t\tmap.put(1, 8);\r\n\t\tmap.put(2, 2);\r\n\t\tmap.put(3, 9);\r\n\t\tmap.put(4, 2);\r\n\t\t\r\n\t\t\r\n\t\tSet<Entry<Integer, Integer>> ss = new HashSet<>(map.entrySet());\r\n\t\tList<Entry<Integer, Integer>> ll = new ArrayList<>(map.entrySet());\r\n\t\t\r\n\t\tfor(Map.Entry<Integer, Integer> map1: ll)\r\n\t\t{\r\n\t\t\tSystem.out.println(map1.getKey()+\" :: \"+map1.getValue());\r\n\t\t}\r\n\t\t\r\n\t\tCollections.sort(ll,new SortByValue());\r\n\t\tSystem.out.println(\"-------------------------------\");\r\n\t\t\r\n\t\tfor(Map.Entry<Integer, Integer> map1: ll)\r\n\t\t{\r\n\t\t\tSystem.out.println(map1.getKey()+\" :: \"+map1.getValue());\r\n\t\t}\r\n\r\n\t}",
"public static void main(String[] args) {\n HashSet<String> hashSet = new HashSet<>();\n hashSet.add(\"Orange\");\n hashSet.add(\"Red\");\n hashSet.add(\"Pink\");\n hashSet.add(\"Red\");\n hashSet.add(\"White\");\n System.out.println(hashSet);\n TreeSet<String> treeSet = new TreeSet<>(hashSet);\n for (String color : treeSet) {\n System.out.println(color);\n }\n\n }",
"public static void main(String[] args) {\n\t\t\tSystem.out.println(\"10000000\".compareTo(\"2000\"));\n\t\t\t\n\t\t\tTreeMap<String, String> map = new TreeMap<>(Collections.reverseOrder());\n\t\t\tmap.put(\"1\",\"2\");\n\t\t\tmap.put(\"2\",\"1\");\n\t\t\t\n\t\t\tSet<Entry<String, String>> set = map.entrySet();\n\t\t\tIterator<Entry<String, String>> itr = set.iterator();\n\t\t\t\n\t\t\twhile(itr.hasNext()) {\n\t\t\t\tEntry<String, String> e = itr.next();\n\t\t\t\tmap.remove(e.getKey());\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(map);\n\t\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tTreeSet<Object> treeSet = new TreeSet<Object>();\r\n\t treeSet.add(45);\r\n\t treeSet.add(15);\r\n\t treeSet.add(99);\r\n\t treeSet.add(70);\r\n\t treeSet.add(65);\r\n\t treeSet.add(30);\r\n\t treeSet.add(10);\r\n\t System.out.println(\"TreeSet Ascending order : \" + treeSet);\r\n\t NavigableSet<Object> res = treeSet.descendingSet();\r\n\t System.out.println(\"TreeSet after Descending order\" + res);\r\n\t \r\n\t // How to Change it Descending order For TreeMap\r\n\t TreeMap<Object,Object> treeMap = new TreeMap<Object,Object>();\r\n\t treeMap.put(1,\"A\");\r\n\t treeMap.put(5,\"B\");\r\n\t treeMap.put(3,\"C\");\r\n\t treeMap.put(7,\"F\");\r\n\t treeMap.put(2,\"G\");\r\n\t System.out.println(\"TreeMap Ascending order : \" + treeMap);\r\n\t NavigableMap<Object,Object> result = treeMap.descendingMap();\r\n\t System.out.println(\"TreeMap after Descending order\" + result);\r\n\t \r\n\t // Covert HashSet or List to Array\r\n\t HashSet<String> hset = new HashSet<String>();\r\n\t hset.add(\"Element1\");\r\n\t hset.add(\"Element2\");\r\n\t hset.add(\"Element3\");\r\n\t hset.add(\"Element4\");\r\n\t // Displaying HashSet elements\r\n\t System.out.println(\"HashSet contains: \"+ hset); \r\n\t // Creating an Array\r\n\t String[] array = new String[hset.size()];\r\n\t hset.toArray(array);\r\n\t // Displaying Array elements\r\n\t System.out.println(\"Array elements: \");\r\n\t for(String temp : array){\r\n\t System.out.println(temp);\r\n\t }\r\n\t \r\n\t // HashMap Creation with Load Factor \r\n\t Map<String, String> hmapFac = new HashMap<>(12,0.95f);\r\n\t hmapFac.put(\"1\", \"Debu\");\r\n\t hmapFac.put(\"2\", \"Debu\");\r\n\t hmapFac.put(\"3\", \"Shyam\");\r\n\t hmapFac.put(\"4\", \"Uttam\");\r\n\t hmapFac.put(\"5\", \"Gautam\");\r\n\t System.out.println(\"Created with Load Factor \" + hmapFac);\r\n\t \r\n\t \r\n\t \r\n\t //how to copy one hashmap content to another hashmap\r\n\t Map<String, String> hmap1 = new HashMap<>();\r\n\t hmap1.put(\"1\", \"Debu\");\r\n\t hmap1.put(\"2\", \"Debu\");\r\n\t hmap1.put(\"3\", \"Shyam\");\r\n\t hmap1.put(\"4\", \"Uttam\");\r\n\t hmap1.put(\"5\", \"Gautam\");\r\n\t // Create another HashMap\r\n\t HashMap<String, String> hmap2 = new HashMap<String, String>();\r\n\t // Adding elements to the recently created HashMap\r\n\t hmap2.put(\"7\", \"Jerry\");\r\n\t hmap2.put(\"8\", \"Tom\");\r\n\t // Copying one HashMap \"hmap\" to another HashMap \"hmap2\"\r\n\t hmap2.putAll(hmap1);\r\n\t System.out.println(\"After Copy in The HashMap \" + hmap2);\r\n\t \r\n\t // Map containsKey(), containsValue and get() method\r\n\t // get() by index for List and similar contains available for List , Set\r\n\t \r\n\t Map<String, String> map = new HashMap<>();\r\n\t\t\tmap.put(\"1\", \"Debu\");\r\n\t\t\tmap.put(\"2\", \"Debu\");\r\n\t\t\tmap.put(\"3\", \"Shyam\");\r\n\t\t\tmap.put(\"4\", \"Uttam\");\r\n\t\t\tmap.put(\"5\", \"Gautam\");\r\n\t\t\tSystem.out.println(\"Map containsKey() : \" + map.containsKey(\"2\"));\r\n\t\t\tSystem.out.println(\"Map containsValue() : \" + map.containsValue(\"Debu\"));\r\n\t\t\tSystem.out.println(\"Map get() : \" + map.get(\"4\"));\r\n\t\t\t\r\n\t\t\t\r\n\t\t // Few Common Collection Method ========\r\n\t\t\tList<Integer> list = new ArrayList<>();\r\n\t\t\tlist.add(5);\r\n\t\t\tlist.add(3);\r\n\t\t\tlist.add(6);\r\n\t\t\tlist.add(1);\r\n\t\t\t// size()\r\n\t\t\tSystem.out.println(\"List Size() : \" + list.size());\r\n\t\t\t// contains() , Similar containsAll() take all collection Object\r\n\t\t\tSystem.out.println(\"List Contains() : \" + list.contains(1));\r\n\t\t\t// remove() - Here by object of element , also can be happen by index \r\n\t\t\t// Similar removeAll() take all collection Object\r\n\t\t\tSystem.out.println(\"List Before remove : \" + list);\r\n\t\t\tSystem.out.println(\"List remove() : \" + list.remove(3));\r\n\t\t\tSystem.out.println(\"List After remove : \" + list);\r\n\t\t\t\r\n\t\t\t// isEmpty()\r\n\t\t\tSystem.out.println(\"List isEmpty() : \" + list.isEmpty());\r\n\t\t\t// retainAll() - matching\r\n\t\t\tlist.add(1);\r\n\t\t\tlist.add(8);\r\n\t\t\tList<Integer> list1 = new ArrayList<>();\r\n\t\t\tlist1.add(8);\r\n\t\t\tlist1.add(3);\r\n\t\t\tSystem.out.println(\"List Before retainAll() : \" +list );\r\n\t\t\tlist.retainAll(list1);\r\n\t\t\tSystem.out.println(\"List AFter retainAll() : \" +list );\r\n\t\t\t\r\n\t\t\t// clear()\r\n\t\t\tSystem.out.println(\"List Before clear() : \" +list );\r\n\t\t\t\r\n\t\t\tlist.clear();\r\n\t\t\tSystem.out.println(\"List AFter clear() : \" + list );\r\n\t\t\t// Below line compile time error\r\n\t\t\t//System.out.println(\"List AFter clear() : \" + list.clear() );\r\n\t\t\tlist.add(1);\r\n\t\t\tlist.add(3);\r\n\t\t\tlist.add(6);\r\n\t\t\tSystem.out.println(\"List AFter Adding() : \" +list );\r\n\t\t\t\r\n\t\t\t\r\n\t}",
"void modusponens(){\n\t\tHashMap<String,HashSet<Hypothesis> > temp_lhs_hypo = new HashMap<String,HashSet<Hypothesis> >();\n\t\tHashSet<Hypothesis> new_hypos = new HashSet<Hypothesis>();\n\t\t\n\t\t//Utils.println(\"hypothesis list\");\n\t\tIterator it = hypothesis.entrySet().iterator();\n\t while (it.hasNext()) {\n\t Map.Entry pairs = (Map.Entry)it.next();\n\t String A = (String)pairs.getKey();\n\t //Utils.println(\"hypothesis A : \"+A);\n\t HashSet<Hypothesis> A_B = new_lhs_hypo.get(A);\n\t if(A_B == null) {\n\t \t//Utils.println(\"No match\");\n\t \tcontinue;\n\t \t}\n\t else{\n\t \t//Utils.println(\"Matched: \"+A_B.size());\n\t \tIterator bit = A_B.iterator();\n\t \twhile (bit.hasNext()) {\n\t \t Hypothesis A_B_hypo = (Hypothesis)bit.next();\n\t\t \tHypothesis mp_hypo = makeHypothesis(A_B_hypo.rhs, 1, -1, A, A_B_hypo.expression);\n\t\t \tif(mp_hypo!=null) {\n\t\t \t\tnew_hypos.add(mp_hypo);\n\t\t\t \tif(hypothesis.containsKey(mp_hypo.expression)) {\n\t\t\t \t\t//Utils.println(\"Existing MP result: \"+A_B_hypo.rhs+\" on \"+A+\" and \"+A_B_hypo.expression);\n\t\t\t \t\t//already existing\n\t\t\t\t }else{// new hypothesis has resulted\n\t\t\t\t \t//Utils.println(\"New MP result: \"+A_B_hypo.rhs+\" on \"+A+\" and \"+A_B_hypo.expression);\n\t\t\t\t }\n\t\t \t}else{\n\t\t \t\t//Utils.println(\"MP Not Valid: \"+A_B_hypo.rhs+\" on \"+A+\" and \"+A_B_hypo.expression);\n\t\t \t}\n\t\t }\n\t }\n\t }\n\t \n\t //Utils.println(\"new hypothesis list\");\n\t it = new_lhs_hypo.entrySet().iterator();\n\t while (it.hasNext()) {\n\t Map.Entry pairs = (Map.Entry)it.next();\n\t HashSet<Hypothesis> hypos = (HashSet<Hypothesis>) pairs.getValue();\n\t Iterator<Hypothesis> Ait = hypos.iterator();\n\t while(Ait.hasNext()){\n\t \tString A = ((Hypothesis)Ait.next()).expression;\n\t \t//Utils.println(\"hypothesis A : \"+A);\n\t \tHashSet<String> B_set = lhs_hypo.get(A);\n\t \tif(B_set == null){\n\t \t\t//Utils.println(\"No match\");\n\t \t\tcontinue;\n\t \t\t}\n\t \telse{\n\t \t\t//Utils.println(\"Matched: \"+B_set.size());\n\t \t\tIterator Bit = B_set.iterator();\n\t\t \twhile(Bit.hasNext()){\n\t\t \t\tString B_str = (String) Bit.next();\n\t\t \t\tString A_B_exp = Utils.expression(A, B_str);\n\t\t \t\tHypothesis mp_hypo = makeHypothesis(B_str, 1, -1, A, A_B_exp);\n\t\t \t\tif(mp_hypo!=null) {\n\t\t\t \t\tnew_hypos.add(mp_hypo);\n\t\t\t\t \tif(hypothesis.containsKey(mp_hypo.expression)) {\n\t\t\t\t \t\t//Utils.println(\"Existing MP result: \"+B_str+\" on \"+A+\" and \"+A_B_exp);\n\t\t\t\t \t\t//already existing\n\t\t\t\t\t }else{// new hypothesis has resulted\n\t\t\t\t\t \t//Utils.println(\"New MP result: \"+B_str+\" on \"+A+\" and \"+A_B_exp);\n\t\t\t\t\t }\n\t\t\t \t}else{\n\t\t\t \t\t//Utils.println(\"MP Not Valid: \"+B_str+\" on \"+A+\" and \"+A_B_exp);\n\t\t\t \t}\n\t\t \t}\n\t \t}\n\t \t\n\t }\n\t }\n\t \n\t //Utils.println(\"Size of new_hypos: \"+new_hypos.size());\n\t \n\t Iterator<Hypothesis> hit = new_hypos.iterator();\n\t while(hit.hasNext()){\n\t \tHypothesis mp_hypo = hit.next();\n\t \tboolean b = insertHypothesis(mp_hypo);\n\t \tif(b){\n\t \t\tHashSet<Hypothesis> temp_hypos = temp_lhs_hypo.get(mp_hypo.lhs);\n\t \tif(temp_hypos == null){\n\t \t\ttemp_hypos = new HashSet<Hypothesis>();\n\t \t\ttemp_hypos.add(mp_hypo);\n\t \t\ttemp_lhs_hypo.put(mp_hypo.lhs, temp_hypos);\n\t \t}else{\n\t \t\ttemp_hypos.add(mp_hypo);\n\t \t}\n\t \t//Utils.printHypothesis(mp_hypo);\n\t \t}\n\t }\n\t \n\n\t //Utils.println(\"Size of temp_lhs_hypo: \"+temp_lhs_hypo.size());\n\t \n\t new_lhs_hypo.clear();\n\t new_lhs_hypo = temp_lhs_hypo;\n\t if(new_lhs_hypo.size()!=0) modusponens();\n\t}",
"public void printBasinSizes(){\n PriorityQueue<Integer> BasinQueue = new PriorityQueue<Integer>(sinkCounter, Collections.reverseOrder());\n String toPrint = \"\";\n for(int x: sinkCounterMap.values()){\n BasinQueue.add(x);\n \n }\n \n for(int i=0; i<(sinkCounter); i++){\n toPrint = toPrint + BasinQueue.poll() + \" \";\n }\n \n System.out.println(toPrint);\n }",
"private void dumpResultMapping ()\r\n {\r\n for (Entry<Result, Set<Candidate>> entry : connection.getResultMap().\r\n entrySet()) {\r\n logger.debug(\"Result: {}\", entry.getKey());\r\n\r\n for (Candidate candidate : entry.getValue()) {\r\n logger.debug(\"* candidate: {}\", candidate);\r\n }\r\n }\r\n }",
"public static void main(String[] args) {\n\t\tMap myMap = new HashMap();\r\n\t\tmyMap.put(91,\"India\");\r\n\t\tmyMap.put(65,\"Singapore\");\r\n\t\tmyMap.put(94, \"SriLanka\");\r\n\t\tmyMap.put(971, \"Dubai\");\r\n\t\tmyMap.put(91,\"India\");\r\n\t\tmyMap.put(98,\"India\");\r\n\t\tmyMap.put(null,\"India\");\r\n\t\tmyMap.put(null, \"SriLanka\");\r\n\t\tmyMap.put(99,null);\r\n\t\tmyMap.put(199,null);\r\n\t\t\r\n\t\tSystem.out.println(\"myMap :\"+myMap);\r\n\t\t\r\n\t\tSet keySet= myMap.keySet();\r\n\t\tSystem.out.println(\"keySet : \"+keySet);\r\n\t\t\r\n//\t\tfor (int i=0;i<keySet.size();i++) {\t\t\t\r\n//\t\t\tSystem.out.println(myMap.get(keySet));\r\n//\t\t}\r\n\t\tSystem.out.println(\"Using Iterator & while loop\");\r\n\t\tIterator itr = keySet.iterator();\r\n\t\twhile(itr.hasNext()) {\r\n\t\t\tSystem.out.println(myMap.get(itr.next()));\r\n\t\t}\r\n\t\tSystem.out.println(\"Using Enhanced for loop\");\r\n\t\tfor (Object object : keySet) {\r\n\t\t\tSystem.out.println(myMap.get(object));\r\n\t\t}\r\n\t}",
"void keys() {\n for (int i = 0; i < size; i++) {\n System.out.println(keys[i] + \" \" + values[i]);\n }\n }",
"public void test5() {\n\t\tSet<String> keySet = member.keySet();\n\t\tfor(String key : keySet) {\n\t\t\tif(key ==\"leess\") {\n\t\t\t\tmember.remove(key);\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tTreeMap<Integer,String> map = new TreeMap<Integer,String>();\r\n\t\t\r\n map.put(2000, \"A\");\r\n map.put(5000, \"E\");\r\n map.put(6000, \"F\");\r\n map.put(7000, \"G\");\r\n map.put(3000, \"C\");\r\n map.put(4000, \"D\");\r\n map.put(2100, \"B\");\r\n System.out.println(map);\r\n System.out.println(\"max\"+map.lastKey());\r\n System.out.println(\"min\"+map.firstKey());\r\n \r\n Set<Integer> setLessThen3k = map.headMap(3000).keySet();\r\n System.out.println(\"setLessThen3k---\"+setLessThen3k);\r\n \r\n Set<Integer> setLessgreater3k = map.tailMap(3000).keySet();\r\n System.out.println(\"setLessThen3k---\"+setLessgreater3k);\r\n \r\n \r\n\r\n\t\tTreeMap<String,Integer> Usermap = new TreeMap<String,Integer>();\r\n\t\t\r\n\t\tUsermap.put( \"A\",2000);\r\n\t\tUsermap.put( \"F\",8000);\r\n\t\tUsermap.put( \"G\",7000);\r\n\t\tUsermap.put( \"C\",3000);\r\n\t\tUsermap.put( \"D\",3000);\r\n\t\tUsermap.put( \"E\",9000);\r\n\t\tUsermap.put( \"B\",8000);\r\n System.out.println(map);\r\n System.out.println(\"max\"+Usermap.lastKey());\r\n System.out.println(\"min\"+Usermap.firstKey());\r\n \r\n\r\n \r\n \r\n\t}",
"private static void printTrainingSet(ArrayList<ArrayList<String>> TrainSet) {\n\t\t\r\n\t\tSystem.out.println(\"Map Size: \"+ TrainSet.size());\r\n for(int i = 0 ; i < TrainSet.size() ; i++) {\r\n ArrayList<String> currentReview = TrainSet.get(i);\r\n \r\n //now iterate on the current list\r\n for (int j = 0; j < currentReview.size(); j++) {\r\n String s = currentReview.get(j);\r\n System.out.print(s+\" \");\r\n \r\n }\r\n System.out.println();\r\n }\r\n\t}",
"public static void main(String[] args) {\n\t\tTreeMap<String,Long> actorMap = new TreeMap<String, Long>();\t\t\n\t\tactorMap.put(\"Varun Dhawan\", 9966337744L);\n\t\tactorMap.put(\"Jonny Depp\", 9912347744L);\n\t\tactorMap.put(\"Robert Jr.\", 9967837744L);\n\t\tactorMap.put(\"Aalia Bhat\", 9526335744L);\n\t\tactorMap.put(\"Shraddha Kapoor\", 9963337744L);\n\t\t\n\t\tSystem.out.println(\"Phone No of Varun Dhawan : \" + actorMap.get(\"Varun Dhawan\"));\n\t\t\n\t\tSystem.out.println(actorMap);\n\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\tSet<String> actor = actorMap.keySet();\n\t\tSystem.out.println(\"User Iterator\");\n\t\tIterator<String> it = actor.iterator();\n\t\twhile(it.hasNext()) {\n\t\t\tString actorName = it.next();\n\t\t\tlong phNo = actorMap.get(actorName);\n\t\t\tSystem.out.println(\"Actor Name : \" + actorName + \"\\tPhone Number : \" + phNo);\n\t\t}\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\tNavigableMap<String, Long> hdMap = actorMap.headMap(\"Shraddha Kapoor\", false);\n\t\tSystem.out.println(\"Head Map : \" +hdMap);\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\tNavigableMap<String, Long> tlMap = actorMap.tailMap(\"Shraddha Kapoor\", false);\n\t\tSystem.out.println(\"Tail Map : \" +tlMap);\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\tSortedMap<String, Long> sbMap = actorMap.subMap(\"Aalia Bhat\", \"Shraddha Kapoor\");\n\t\tSystem.out.println(\"Sub Map : \" +sbMap);\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\tSystem.out.println(\"Ceiling of Shraddha Kapoor is \" + actorMap.ceilingKey(\"Shraddha Kapoor\") );\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\tSystem.out.println(\"Floor of Shraddha Kapoor is \" + actorMap.floorKey(\"Shraddha Kapoor\"));\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\tSystem.out.println(\"Higher of Shraddha Kapoor is \" + actorMap.higherKey(\"Shraddha Kapoor\"));\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\tSystem.out.println(\"Lower of Shraddha Kapoor is \" + actorMap.lowerKey(\"Shraddha Kapoor\"));\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tSet<Puppy> set = new LinkedHashSet<Puppy>(10);\n\t\t\n\t\t// this DS which can hold other object\n\t\tPuppy puppy1=new Puppy(\"Tommy\",10 );\n\t\tPuppy puppy2=new Puppy(\"AHH\", 12);\n\t\tPuppy puppy3=new Puppy(\"MYY\", 5);\n\t\tPuppy puppy4=new Puppy(\"NANY\", 3);\n\t\tPuppy puppy5=new Puppy(\"NANY\", 3);\n\t\t\n\t\t//dog4 and dog5 are duplicate elements\n\t\tset.add(puppy1);\n\t\tset.add(puppy2);\n\t\tset.add(puppy3);\n\t\tset.add(puppy4);\n\t\tset.add(puppy5);\n\t\t\n\t\tSystem.out.println(\"puppy4 . hashCode () = \"+puppy4.hashCode());\n\t\tSystem.out.println(\"puppy5 . hashCode () = \"+puppy5.hashCode());\n\t\t\n\t\tIterator<Puppy> iterator=set.iterator();\n\t\t\n\t\tSystem.out.println(\"Accessing data using Iterator interface!\");\n\t\twhile(iterator.hasNext()){\n\t\t\tPuppy puppy=iterator.next();\n\t\t\tSystem.out.println(puppy);\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(\"____________-----\");\n\t\tfor(Puppy puppy:set){\n\t\t\tSystem.out.println(puppy);\n\t\t}\n\t\t\n\t\tPuppy puppy6=new Puppy(\"NANY\", 3);\n\t\t\n\t\tboolean b=set.contains(puppy6);\n\t\tif(b){\n\t\t\tSystem.out.println(\"puppy6 found in set!\"+puppy6);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Run it\");\n\t\t /* final Entry<K,V> getEntry(Object key) {\n\t\t int hash = (key == null) ? 0 : hash(key.hashCode());\n\t\t for (Entry<K,V> e = table[indexFor(hash, table.length)];\n\t\t e != null;\n\t\t e = e.next) {\n\t\t Object k;\n\t\t if (e.hash == hash &&\n\t\t ((k = e.key) == key || (key != null && key.equals(k))))\n\t\t return e;\n\t\t }\n\t\t return null;\n\t\t } */\n\t\t b=set.contains(puppy1);\n\t\tif(b){\n\t\t\tSystem.out.println(b+\"is found in set!\");\n\t\t}\n\t\t\n\n\t}",
"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 print() {\n for (Map.Entry<String, String> entry : dictionary.entrySet()) {\r\n String key = entry.getKey();\r\n System.out.println(key + \": \" + dictionary.get(key));\r\n }\r\n }",
"public static void main(String[] args)\r\n\t{\n\t\tMap<String,String> map = new Hashtable<>(); // synchronized, slower\r\n\t\t\r\n\t\tmap.put(\"myName\", \"Bachhan\"); /* we can repeat value but we can't repeat key */\r\n\t\tmap.put(\"actor\", \"Akshay\");\r\n\t\tmap.put(\"ceo\", \"Pichai\");\r\n\t\tmap.put(\"actor\", \"Bachhan\");\r\n\t\t\r\n\t\t// store the keySet() value in Set\r\n\t\tSet<String> keys = map.keySet();\r\n\t\tfor(String key: keys){\r\n\t\t\r\n\t\tSystem.out.println(key+ \" \" +map.get(key));\r\n\t\t}\r\n\t}",
"public void dump(){\r\n\t\tString str = \"\";\r\n\t\tfor(int i = 0; i < M; i++){\r\n\t\t\tstr = str + i + \". \" + vals[i];\r\n\t\t\tif(keys[i] != null){\r\n\t\t\t\tstr = str + \" \" + keys[i] + \" (\";\r\n\t\t\t\tstr = str + hash(keys[i]) + \")\";\r\n\t\t\t}else\r\n\t\t\t\tstr = str + \" -\";\r\n\t\t\tSystem.out.println(str);\r\n\t\t\tstr = \"\";\r\n\t\t}\r\n\t\tSystem.out.println(\"Size: \" + N + \"\\n\"); //La till denna för enkelhetens skull\r\n\t}",
"@SuppressWarnings(\"rawtypes\")\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n Map<Integer,String> map1=new TreeMap<Integer,String>();\n map1.put(101,\"this\");\n map1.put(103,\"is\");\n map1.put(102,\"TreeMap\");\n System.out.println(map1);\n Set set=map1.entrySet();\n Iterator itr=set.iterator();\n \t\t while(itr.hasNext()){\n \t\t\tMap.Entry g=(Map.Entry) itr.next();\n \t System.out.println(g.getKey()+\" \"+g.getValue());\n }\t\n \n\t}",
"public static void main(String[] args){\n\n\n\n Map<Integer,StringBuilder> map=new HashMap<Integer,StringBuilder>();\n map.put(1,new StringBuilder(\"c1\"));\n map.put(2,new StringBuilder(\"c2\"));\n map.put(3,new StringBuilder(\"c3\"));\n\n Map<Integer,StringBuilder> unmodifiableMap= Collections.unmodifiableMap(map);\n //这时候如果再往unmodifiableMap中添加元素,会发生错误\n //unmodifiableMap.put(4,new StringBuilder(\"c4\"));\n System.out.println(\" unmodifiableMap before : \" + unmodifiableMap.get(3));\n System.out.println(\" map before : \" + map.get(3));\n unmodifiableMap.get(3).append(\"new\");\n System.out.println(\" map after : \" + map.get(3));\n System.out.println(\" unmodifiableMap after : \" + unmodifiableMap.get(3));\n\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}",
"interface MapComp<K extends Comparable<K>, V> {\n\n // Add given key-value to this map\n MapComp<K, V> add(K k, V v);\n\n // Count the number of key-values in this map\n Integer count();\n\n // Look up the value associated with given key in this map (if it exists)\n Optional<V> lookup(K k);\n\n // Produce a set of key-values in this map\n Set<Pairof<K, V>> keyVals();\n\n // Produce a list of key-values in ascending sorted order\n Listof<Pairof<K, V>> sortedKeyVals();\n\n // Produce a set of keys in this map\n Set<K> keys();\n\n // Produce a set of keys in ascending sorted order\n Listof<K> sortedKeys();\n\n // Produce a list of values in this map (order is unspecified)\n Listof<V> vals();\n\n // Produce a list of values in the ascending sorted order\n // of their keys in this map\n // NOTE: list is not itself sorted\n Listof<V> sortedVals();\n\n // Is this map the same as m?\n // (Does it have the same keys mapping to the same values?)\n Boolean same(MapComp<K, V> m);\n\n // Remove any key-value with the given key from this map\n MapComp<K, V> remove(K k);\n\n // Remove all key-values with keys that satisfy given predicate\n MapComp<K, V> removeAll(Predicate<K> p);\n\n // Remove all key-values w/ key-values that satisfy given binary predicate\n MapComp<K, V> removeAllPairs(BiPredicate<K, V> p);\n\n // Join this map and given map (entries in this map take precedence)\n MapComp<K, V> join(MapComp<K, V> m);\n}",
"@Test\n\tpublic void testPutAccessReodersElement() {\n\t\tmap.put(\"key1\", \"value1\");\n\n\t\tSet<String> keySet = map.keySet();\n\t\tassertEquals(\"Calling get on an element did not move it to the front\", \"key1\",\n\t\t\tkeySet.iterator().next());\n\n\t\t// move 2 to the top/front\n\t\tmap.put(\"key2\", \"value2\");\n\t\tassertEquals(\"Calling get on an element did not move it to the front\", \"key2\",\n\t\t\tkeySet.iterator().next());\n\t}",
"public static void main(String[] args) {\n\t\t HashMap<Integer, String> map = new HashMap<Integer, String>();\r\n map.put(1, \"Java\");\r\n map.put(2, \"Python\");\r\n map.put(3, \"Selenium\");\r\n int keyToBeChecked = 5;\r\n System.out.println(\"HashMap: \"+ map);\r\n\t\tIterator<Map.Entry<Integer, String> >\r\n\t\titerator = map.entrySet().iterator();\r\n\t\tboolean isKeyPresent = false;\r\n\t\twhile (iterator.hasNext()) {\r\n\t\tMap.Entry<Integer, String> entry = iterator.next();\r\n\t\tif (keyToBeChecked == entry.getKey()) {\r\n\t\t\r\n\t\t isKeyPresent = true;\r\n\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Does key \"+ keyToBeChecked+ \" exists: \"+ isKeyPresent);\r\n\t}",
"public static void main(String[] args) {\n\t\tHashMap<String,String> capitalMap=new HashMap<String,String>();//creating hashmap\n\t\tcapitalMap.put(\"India\", \"New Delhi\");\n\t\tcapitalMap.put(\"USA\", \"WashingtonDC\");//adding values into it\n\t\tcapitalMap.put(\"UK\", \"London\");\n\t\tcapitalMap.put(\"Australlia\", \"Canberra\");\n\t\tcapitalMap.put(\"UK\", \"London111\");\n\t\tcapitalMap.put(\"Africa\", null);\n\t\tcapitalMap.put(\"Odisa\", null);\n\n\n\t\t//getting the values from it\n\t\tSystem.out.println(capitalMap.get(\"Australlia\"));\n\t\tSystem.out.println(capitalMap.get(\"Germany\"));// if value is not present then it will throw null\n\t\tSystem.out.println(capitalMap.get(\"UK\"));// always take the lates value\n\t\t\n\t\t//we can store n number of null valuesbut only one null key\n\t\tcapitalMap.put(null, \"LA\");\n\t\tcapitalMap.put(null, \"SFO\");// can have multiple null values but one null key\n\t\tSystem.out.println(capitalMap.get(null));\n\t\tSystem.out.println(capitalMap.get(\"Africa\"));\n\t\tSystem.out.println(capitalMap.get(\"Odisa\"));\n\t\t\n\t\t//How to Traverse through Hashmap-USing Iterator\n\t\tIterator<String> it=capitalMap.keySet().iterator();// applying iterator on keyset or value set\n\t\t\n\t\twhile(it.hasNext()) {\n\t\tString key=\tit.next();\n\t\tString value=capitalMap.get(key);\n\t\tSystem.out.println(\"Key = \"+key+\" \"+\"value= \"+value );\n\t\t}\n\t\t\n\t\tSystem.out.println(\"****************************************\");\n\t\t//entry set iterator\n\t\tIterator<Entry<String, String>> it1=capitalMap.entrySet().iterator();\n\t\t\n\t\twhile(it1.hasNext()) {\n\t\t\tEntry<String, String> entry=it1.next();\n\t\t\tSystem.out.println(\"Key is \"+entry.getKey()+ \" Value is \"+entry.getValue());\n\t\t}\n\t\t\n\t\tSystem.out.println(\"****************************************\");\n\t\t\n\t\t//iterator with for each and lamda java 8\n\t\tcapitalMap.forEach((k,v)->System.out.println(\"key \"+k+\" value\"+v));\n\t\t\n\t\t\n\t\t\n\n\n\t\t\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tLinkedHashMap<Integer, String> myLinkedHashMap = new LinkedHashMap<Integer, String>();\n\t\tmyLinkedHashMap.put(3, \"Pune\");\n\t\tmyLinkedHashMap.put(2, \"Chennai\");\n\t\tmyLinkedHashMap.put(5, \"Patna\");\n\t\tmyLinkedHashMap.put(1, \"Mumbai\");\n\t\tmyLinkedHashMap.put(4, \"Kolkata\");\n\t\tSystem.out.println(myLinkedHashMap);\n\n\t\t// Iteration on the collection-view of the LinkedHashMap\n\t\tSet<Map.Entry<Integer, String>> myLinkedHashMapCollectionView = myLinkedHashMap.entrySet();\n\t\tSystem.out.println(\"After converting to set: \");\n\t\tSystem.out.println(myLinkedHashMapCollectionView);\n\t\tIterator<Map.Entry<Integer, String>> itr = myLinkedHashMapCollectionView.iterator();\n\t\tSystem.out.println(\"After iterating using Iterator: \");\n\t\twhile (itr.hasNext()) {\n\t\t\tMap.Entry<Integer, String> entry = itr.next();\n\t\t\tSystem.out.println(\"Key: \" + entry.getKey() + \", Value: \" + entry.getValue());\n\t\t}\n\t}",
"public static void main(String[] args) throws IOException {\n SortedMap<String, File> consensuses = new TreeMap<String, File>();\n SortedMap<String, File> descriptors = new TreeMap<String, File>();\n SortedMap<String, File> votes = new TreeMap<String, File>();\n Stack<File> files = new Stack<File>();\n files.add(new File(\"descriptors\"));\n while (!files.isEmpty()) {\n File file = files.pop();\n String filename = file.getName();\n if (file.isDirectory()) {\n files.addAll(Arrays.asList(file.listFiles()));\n } else if (filename.endsWith(\"-consensus\")) {\n consensuses.put(filename, file);\n } else if (filename.endsWith(\"-votes\")) {\n votes.put(filename, file);\n } else if (filename.endsWith(\"-serverdesc\")) {\n descriptors.put(filename, file);\n }\n }\n System.out.println(\"We found \" + consensuses.size()\n + \" consensus files, \" + votes.size() + \" vote files, and \"\n + descriptors.size() + \" server descriptor files.\");\n\n /* Parse consensuses in an outer loop and the referenced votes and\n * descriptors in inner loops. Write the results to disk as soon as\n * we can to avoid keeping many things in memory. */\n SortedMap<String, String> bandwidthAuthorities =\n new TreeMap<String, String>();\n bandwidthAuthorities.put(\"27B6B5996C426270A5C95488AA5BCEB6BCC86956\",\n \"ides\");\n bandwidthAuthorities.put(\"80550987E1D626E3EBA5E5E75A458DE0626D088C\",\n \"urras\");\n bandwidthAuthorities.put(\"D586D18309DED4CD6D57C18FDB97EFA96D330566\",\n \"moria1\");\n bandwidthAuthorities.put(\"ED03BB616EB2F60BEC80151114BB25CEF515B226\",\n \"gabelmoo\");\n bandwidthAuthorities.put(\"49015F787433103580E3B66A1707A00E60F2D15B\",\n \"maatuska\");\n BufferedWriter bw = new BufferedWriter(new FileWriter(\n \"bandwidth-comparison.csv\"));\n bw.write(\"validafter,fingerprint,nickname,category,\"\n + \"descriptorbandwidth,consensusbandwidth\");\n for (String bandwidthAuthority : bandwidthAuthorities.values()) {\n bw.write(\",\" + bandwidthAuthority + \"bandwidth\");\n }\n bw.write(\"\\n\");\n for (File consensusFile : consensuses.values()) {\n System.out.println(\"Parsing consensus \" + consensusFile.getName());\n BufferedReader brC = new BufferedReader(new FileReader(\n consensusFile));\n String lastRLine = null, lastSLine = null;\n String consensusTimestamp = consensusFile.getName().substring(0,\n \"YYYY-MM-DD-hh-mm-ss\".length());\n Map<String, Map<String, String>> measuredBandwidthsByDirSource =\n new HashMap<String, Map<String, String>>();\n\n /* Parse votes first, if we have them, and extract measured\n * bandwidths. */\n String votesFilename = consensusTimestamp + \"-votes\";\n if (votes.containsKey(votesFilename)) {\n BufferedReader brV = new BufferedReader(new FileReader(\n votes.get(votesFilename)));\n String lineV;\n Map<String, String> measuredBandwidths = null;\n while ((lineV = brV.readLine()) != null) {\n if (lineV.startsWith(\"dir-source \")) {\n String dirSource = lineV.split(\" \")[2];\n measuredBandwidths = new HashMap<String, String>();\n measuredBandwidthsByDirSource.put(dirSource,\n measuredBandwidths);\n } else if (lineV.startsWith(\"r \")) {\n lastRLine = lineV;\n } else if (lineV.startsWith(\"w \") &&\n lineV.contains(\" Measured=\")) {\n String fingerprint = Hex.encodeHexString(Base64.\n decodeBase64(lastRLine.split(\" \")[2] + \"=\"));\n String measuredBandwidth = lineV.substring(lineV.indexOf(\n \" Measured=\") + \" Measured=\".length()).split(\" \")[0];\n measuredBandwidths.put(fingerprint, measuredBandwidth);\n }\n }\n brV.close();\n }\n\n /* Parse referenced server descriptors to learn about exit policies\n * and reported bandwidths. */\n String descriptorsFilename = consensusTimestamp + \"-serverdesc\";\n Map<String, String> parsedDescriptors =\n new HashMap<String, String>();\n if (descriptors.containsKey(descriptorsFilename)) {\n BufferedReader brD = new BufferedReader(new FileReader(\n descriptors.get(descriptorsFilename)));\n Set<String> defaultRejects = new HashSet<String>();\n /* Starting with 0.2.1.6-alpha, ports 465 and 587 were allowed\n * in the default exit policy again (and therefore removed\n * from the default reject lines). */\n Set<String> optionalRejects = new HashSet<String>();\n String lineD, address = null, fingerprint = null,\n descriptorBandwidth = null;\n boolean defaultPolicy = false, comparePolicies = true;\n while ((lineD = brD.readLine()) != null) {\n if (lineD.startsWith(\"router \")) {\n address = lineD.split(\" \")[2];\n defaultRejects.clear();\n defaultRejects.addAll(Arrays.asList((\"0.0.0.0/8:*,\"\n + \"169.254.0.0/16:*,127.0.0.0/8:*,192.168.0.0/16:*,\"\n + \"10.0.0.0/8:*,172.16.0.0/12:*,$IP:*,*:25,*:119,\"\n + \"*:135-139,*:445,*:563,*:1214,*:4661-4666,*:6346-6429,\"\n + \"*:6699,*:6881-6999\").split(\",\")));\n optionalRejects.clear();\n optionalRejects.addAll(Arrays.asList(\n \"*:465,*:587\".split(\",\")));\n fingerprint = null;\n descriptorBandwidth = null;\n defaultPolicy = false;\n comparePolicies = true;\n } else if (lineD.startsWith(\"opt fingerprint \") ||\n lineD.startsWith(\"fingerprint \")) {\n fingerprint = lineD.substring(lineD.startsWith(\"opt \") ?\n \"opt fingerprint\".length() : \"fingerprint\".length()).\n replaceAll(\" \", \"\").toLowerCase();\n } else if (lineD.startsWith(\"bandwidth \")) {\n descriptorBandwidth = lineD.split(\" \")[3];\n } else if (lineD.startsWith(\"reject \") && comparePolicies) {\n String rejectPattern = lineD.substring(\"reject \".\n length());\n if (defaultRejects.contains(rejectPattern)) {\n defaultRejects.remove(rejectPattern);\n } else if (optionalRejects.contains(rejectPattern)) {\n optionalRejects.remove(rejectPattern);\n } else if (rejectPattern.equals(address + \":*\")) {\n defaultRejects.remove(\"$IP:*\");\n } else {\n comparePolicies = false;\n }\n } else if (lineD.startsWith(\"accept \") && comparePolicies) {\n if (defaultRejects.isEmpty() &&\n lineD.equals(\"accept *:*\")) {\n defaultPolicy = true;\n }\n comparePolicies = false;\n } else if (lineD.equals(\"router-signature\")) {\n if (address != null && fingerprint != null &&\n descriptorBandwidth != null) {\n parsedDescriptors.put(fingerprint, descriptorBandwidth + \",\"\n + (defaultPolicy ? \"1\" : \"0\"));\n }\n }\n }\n brD.close();\n }\n\n /* Parse r, s, and w lines from the consensus. */\n String lineC, validAfter = null;\n while ((lineC = brC.readLine()) != null) {\n if (lineC.startsWith(\"valid-after \")) {\n validAfter = lineC.substring(\"valid-after \".length());\n } else if (lineC.startsWith(\"r \")) {\n lastRLine = lineC;\n } else if (lineC.startsWith(\"s \")) {\n lastSLine = lineC;\n } else if (lineC.startsWith(\"w \")) {\n String[] parts = lastRLine.split(\" \");\n String nickname = parts[1];\n String fingerprint = Hex.encodeHexString(Base64.decodeBase64(\n parts[2] + \"=\"));\n String descriptor = Hex.encodeHexString(Base64.decodeBase64(\n parts[3] + \"=\"));\n boolean exitFlag = lastSLine.contains(\" Exit\");\n boolean guardFlag = lastSLine.contains(\" Guard\");\n String consensusBandwidth = lineC.substring(lineC.indexOf(\n \" Bandwidth=\") + \" Bandwidth=\".length()).split(\" \")[0];\n\n /* Look up whether we parsed this descriptor before. */\n boolean parsedDescriptor = false, defaultPolicy = false;\n String descriptorBandwidth = null;\n if (parsedDescriptors.containsKey(fingerprint)) {\n String parseResults = parsedDescriptors.get(fingerprint);\n parsedDescriptor = true;\n defaultPolicy = parseResults.endsWith(\"1\");\n descriptorBandwidth = parseResults.split(\",\")[0];\n }\n\n /* Write everything we know about this relay to disk. */\n String category = null;\n if (guardFlag && exitFlag && defaultPolicy) {\n category = \"Guard & Exit (default policy)\";\n } else if (!guardFlag && exitFlag && defaultPolicy) {\n category = \"Exit (default policy)\";\n } else if (guardFlag && exitFlag && !defaultPolicy) {\n category = \"Guard & Exit (non-default policy)\";\n } else if (!guardFlag && exitFlag && !defaultPolicy) {\n category = \"Exit (non-default policy)\";\n } else if (guardFlag && !exitFlag) {\n category = \"Guard\";\n } else if (!guardFlag && !exitFlag) {\n category = \"Middle\";\n }\n bw.write(validAfter + \",\" + fingerprint + \",\" + nickname + \",\"\n + category + \",\" + (parsedDescriptor ? descriptorBandwidth\n : \"NA\") + \",\" + consensusBandwidth);\n for (String bandwidthAuthority :\n bandwidthAuthorities.keySet()) {\n if (measuredBandwidthsByDirSource.containsKey(\n bandwidthAuthority) && measuredBandwidthsByDirSource.get(\n bandwidthAuthority).containsKey(fingerprint)) {\n bw.write(\",\" + measuredBandwidthsByDirSource.get(\n bandwidthAuthority).get(fingerprint));\n } else {\n bw.write(\",NA\");\n }\n }\n bw.write(\"\\n\");\n }\n }\n brC.close();\n }\n bw.close();\n }",
"public static void main(String[] args) {\n\t\tHashMap<String, Integer> map = new HashMap<>();\n\t\t\n\t\tmap.put(\"Pune\", 4111014);\n\t\tmap.put(\"nsk\", 40000014);\n\t\tmap.put(\"Mumbai\", 40000001);\n\t\t\n\t\t\n\t\tSystem.out.println(map);\n\t\t\n\t\tSystem.out.println(map.keySet());\n\t\tSystem.out.println(map.values());\n\t\t\n\t\tSystem.out.println(map.size());\n\t\t\n\t\tmap.replace(\"Pune\",10000001);\n\t\tSystem.out.println(map);\n\t\t\n\t\tSystem.out.println(map.containsKey(\"Nashik\"));\n\t\t\n\t\t//System.out.println(map.remove(\"Pune\", 000000000));\n\t}",
"public void printMap() {\n\t\tmap.printMap();\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tHashMap<Integer,String>hm=new HashMap<Integer,String>();\n\t\thm.put(0,\"hello\");\n\t\thm.put(1,\"hello\");\n\t\thm.put(2,\"hello\");\n\t\thm.put(3,\"hello\");\n\t\thm.put(4,\"hello\");\n\t\thm.put(null,null);\n\t\thm.put(null,null);\n\t\tSystem.out.println(hm.get(2));\n\t\thm.remove(2);\n\t\tSystem.out.println(hm.get(2));\n\t\t\n\t\tSet sn =hm.entrySet();\n\t\tIterator i = sn.iterator();\n\t\twhile(i.hasNext()) {\n\t\t\t\n\t\tMap.Entry mp =(Map.Entry)i.next();\n\tSystem.out.println(\tmp.getKey() +\"\" + mp.getValue());\n\t\n}\n\t\t\n\n\t}",
"public static void main(String[] args) {\n\r\n\t\tSortByValue sbv = new SortByValue();\r\n\t\tsbv.setValueOnMap(12, \"Aarti\");\r\n\t\tsbv.setValueOnMap(15, \"Sonam\");\r\n\t\tsbv.setValueOnMap(17, \"Anita\");\r\n\t\tsbv.setValueOnMap(13, \"Premlata\");\r\n\t\tsbv.setValueOnMap(14, \"Komal\");\r\n\t\tsbv.setValueOnMap(20, \"Namita\");\r\n\t\tsbv.setValueOnMap(25, \"Babita\");\r\n\t\t\r\n\t\tMap<Integer, String> _map = sbv.getValueFromMap();\r\n\t\t/*Iterator<Map.Entry<Integer, String>> _it = _map.entrySet().iterator();\r\n\t\twhile(_it.hasNext()){\r\n\t\t\tMap.Entry<Integer, String> _map_value = _it.next();\r\n\t\t\tSystem.out.println(_map_value.getKey()+\"|\"+_map_value.getValue());\r\n\t\t}*/\r\n\t\t\r\n\t\tSet<Entry<Integer, String>> set = _map.entrySet();\r\n\t\tList<Entry<Integer, String>> list = new ArrayList<Entry<Integer, String>>(set);\r\n\t\tSystem.out.println(\"HashMap values Before sort:\");\r\n\t\tfor(Map.Entry<Integer, String> listBeforeSort : list){\r\n\t\t\tSystem.out.println(listBeforeSort.getKey()+\" | \"+listBeforeSort.getValue());\r\n\t\t}\r\n\t\t\r\n\t\tCollections.sort(list, new Comparator<Map.Entry<Integer, String>>(){\r\n\t\t\tpublic int compare(Map.Entry<Integer, String> value1, Map.Entry<Integer, String> value2){\r\n\t\t\t\treturn value1.getValue().compareTo(value2.getValue());\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tSystem.out.println(\"HashMap values After sort:\");\r\n\t\tfor(Map.Entry<Integer, String> listBeforeSort : list){\r\n\t\t\tSystem.out.println(listBeforeSort.getKey()+\" | \"+listBeforeSort.getValue());\r\n\t\t}\r\n\t}"
] |
[
"0.59192497",
"0.57047814",
"0.5693576",
"0.55824894",
"0.55774117",
"0.5561193",
"0.55306906",
"0.55237055",
"0.55115354",
"0.5467478",
"0.54511577",
"0.5427288",
"0.5426158",
"0.5422038",
"0.5420835",
"0.5409949",
"0.5351142",
"0.5345408",
"0.53390825",
"0.5338331",
"0.5329371",
"0.53283745",
"0.5315606",
"0.5313911",
"0.5311477",
"0.53052706",
"0.529965",
"0.52989054",
"0.5297376",
"0.5279533",
"0.5275285",
"0.5269852",
"0.5242675",
"0.52380425",
"0.523738",
"0.52238536",
"0.5193385",
"0.51758087",
"0.51655453",
"0.516031",
"0.5160269",
"0.5141225",
"0.51340824",
"0.51234734",
"0.50957215",
"0.50927",
"0.50911075",
"0.5087886",
"0.50859463",
"0.5075552",
"0.5055755",
"0.5051165",
"0.50470895",
"0.5032553",
"0.5029354",
"0.5026753",
"0.50236446",
"0.50233173",
"0.50169057",
"0.5015211",
"0.5011621",
"0.50112635",
"0.5006885",
"0.5005627",
"0.50047874",
"0.500273",
"0.5002585",
"0.49978507",
"0.49964643",
"0.49956077",
"0.49878865",
"0.49812832",
"0.4977973",
"0.49760455",
"0.49713862",
"0.49677116",
"0.49675035",
"0.49673662",
"0.4961135",
"0.49591252",
"0.49540433",
"0.49539456",
"0.4949379",
"0.49485144",
"0.49470162",
"0.49441484",
"0.49371937",
"0.49354923",
"0.4933865",
"0.49212196",
"0.49189198",
"0.49160758",
"0.49116588",
"0.49101642",
"0.4909609",
"0.49070385",
"0.49061185",
"0.49027246",
"0.48980543",
"0.4896191"
] |
0.50598717
|
50
|
System.out.println("Merge "); System.out.println(" " + key); System.out.println(" " + ramlKey);
|
private UriKeyMap merge(final UriKeyMap acc, final String key, final String ramlKey)
{
if (!acc.containsKey(ramlKey))
{
acc.put(ramlKey, UriKeyMap.noUri(_collector.get(key)));
}
else
{
merge((UriKeyMap) getMap(acc, ramlKey), _collector.get(key));
}
return acc;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void merge();",
"public static void main(String[] args) {\n\n String word1 = \"abc\";\n String word2 = \"trv\";\n int length1=word1.length();\n int length2=word2.length();\n if (length1==3&&length2==3){\n System.out.println(word1.charAt(0)+\"\"+word2.charAt(0)+\n word1.charAt(1)+\"\"+word2.charAt(1)+\n word1.charAt(2)+\"\"+word2.charAt(2)); }\n else if (length1!=3||length2!=3){\n System.out.println(\"cannot merge\");\n }\n }",
"public static void main(String[] args) {\n\t\tAccountsMerge result = new AccountsMerge();\n\t\tList<List<String>> list = new ArrayList<>();\n\t\tlist.add(Arrays.asList(\"John\", \"[email protected]\", \"[email protected]\"));\n\t\tlist.add(Arrays.asList(\"John\", \"[email protected]\"));\n\t\tlist.add(Arrays.asList(\"John\", \"[email protected]\", \"[email protected]\"));\n\t\tlist.add(Arrays.asList(\"Mary\", \"[email protected]\"));\n\t\tSystem.out.println(result.accountsMerge(list));\n\t}",
"public static void main(String[] args) {\n List<Integer> list1 = new ArrayList<>();\n List<Integer> list2 = new ArrayList<>();\n list1.add(2);\n list1.add(3);\n list1.add(4);\n list2.add(1);\n list2.add(5);\n list2.add(6);\n merge(list1, list2).forEach(item -> System.out.print(item + \" \"));\n }",
"public String merge (Context context) throws Exception;",
"public static void main(String[] args) {\n\t\t\t\t\r\n\t\tListNode list1 =new ListNode(1, new ListNode(2, new ListNode(4, null)));\r\n\t\t\r\n\t\tListNode list2 =new ListNode(1, new ListNode(3, new ListNode(4, null)));\r\n\t\t\r\n\t\tListNode result = new MergeTwoSortedLists().mergeTwoLists(list1, list2);\r\n\t\t\r\n\t\twhile(result!=null) {\r\n\t\t\tSystem.out.print(\" \"+result.val);\r\n\t\t\tresult=result.next;\r\n\t\t}\r\n\t\t\r\n\t}",
"String getMergeStatement(\r\n TypedKeyValue<List<String>, List<String>> fieldsAndValues,\r\n String tableName, String key);",
"public static void main(String[] args) {\n\t\tListNode h1 = new ListNode(2);\n\t\tListNode h2 = new ListNode(1);\n\t\tListNode re = mergeTwoLists(h1,h2);\n\t\tSystem.out.println(re.val);\n\t\tSystem.out.println(re.next.val);\n\t}",
"public void description() throws Exception {\n PrintWriter pw = new PrintWriter(System.getProperty(\"user.dir\")+ \"/resources/merged_file.txt\"); \n \n // BufferedReader for obtaining the description files of the ontology & ODP\n BufferedReader br1 = new BufferedReader(new FileReader(System.getProperty(\"user.dir\")+ \"/resources/ontology_description\")); \n BufferedReader br2 = new BufferedReader(new FileReader(System.getProperty(\"user.dir\")+ \"/resources/odps_description.txt\")); \n String line1 = br1.readLine(); \n String line2 = br2.readLine(); \n \n // loop is used to copy the lines of file 1 to the other \n if(line1==null){\n\t \tpw.print(\"\\n\");\n\t }\n while (line1 != null || line2 !=null) \n { \n if(line1 != null) \n { \n pw.println(line1); \n line1 = br1.readLine(); \n } \n \n if(line2 != null) \n { \n pw.println(line2); \n line2 = br2.readLine(); \n } \n } \n pw.flush(); \n // closing the resources \n br1.close(); \n br2.close(); \n pw.close(); \n \n // System.out.println(\"Merged\"); -> for checking the code execution\n /* On obtaining the merged file, Doc2Vec model is implemented so that vectors are\n * obtained. And the, similarity ratio of the ontology description with the ODPs \n * can be found using cosine similarity \n */\n \tFile file = new File(System.getProperty(\"user.dir\")+ \"/resources/merged_file.txt\"); \t\n SentenceIterator iter = new BasicLineIterator(file);\n AbstractCache<VocabWord> cache = new AbstractCache<VocabWord>();\n TokenizerFactory t = new DefaultTokenizerFactory();\n t.setTokenPreProcessor(new CommonPreprocessor()); \n LabelsSource source = new LabelsSource(\"Line_\");\n ParagraphVectors vec = new ParagraphVectors.Builder()\n \t\t.minWordFrequency(1)\n \t .labelsSource(source)\n \t .layerSize(100)\n \t .windowSize(5)\n \t .iterate(iter)\n \t .allowParallelTokenization(false)\n .workers(1)\n .seed(1)\n .tokenizerFactory(t) \n .build();\n vec.fit();\n \n //System.out.println(\"Check the file\");->for execution of code\n PrintStream p=new PrintStream(new File(System.getProperty(\"user.dir\")+ \"/resources/description_values\")); //storing the numeric values\n \n \n Similarity s=new Similarity(); //method that checks the cosine similarity\n s.similarityCheck(p,vec);\n \n \n }",
"private Map mergeResults(Map first, Map second) {\n/* 216 */ Iterator verb_enum = second.keySet().iterator();\n/* 217 */ Map clonedHash = new HashMap(first);\n/* */ \n/* */ \n/* 220 */ while (verb_enum.hasNext()) {\n/* 221 */ String verb = verb_enum.next();\n/* 222 */ List cmdVector = (List)clonedHash.get(verb);\n/* 223 */ if (cmdVector == null) {\n/* 224 */ clonedHash.put(verb, second.get(verb));\n/* */ continue;\n/* */ } \n/* 227 */ List oldV = (List)second.get(verb);\n/* 228 */ cmdVector = new ArrayList(cmdVector);\n/* 229 */ cmdVector.addAll(oldV);\n/* 230 */ clonedHash.put(verb, cmdVector);\n/* */ } \n/* */ \n/* 233 */ return clonedHash;\n/* */ }",
"private void preOrderPrint() {\n System.out.print(\" \" + key);\n if (left != null) left.preOrderPrint();\n if (right != null) right.preOrderPrint();\n }",
"public static void main(String[] args) {\n\t\tint[] a = {-1,0,0,3,3,3,0,0,0};\n\t\tint[] b = {1,2,2};\n\t\tmerge(a,6, b,3);\n\t\tfor(int i=0;i<a.length;i++) {\n\t\tSystem.out.println(a[i]);}\n\t}",
"public String doMerge(MessageHeader header, Map<String, BundleEntryComponent> entriesByReference) throws JAXBException {\n\t\t\t\t\n\t\t PRPAIN201304UV02Type resultMsg = new PRPAIN201304UV02Type();\n\t\t resultMsg.setITSVersion(\"XML_1.0\");\n\t\t //String UUID.randomUUID().toString();\n\t\t resultMsg.setId(new II(config.getPixQueryOid(), uniqueId()));\n\t\t resultMsg.setCreationTime(new TS(Timestamp.now().toHL7())); // Now\n\t\t resultMsg.setProcessingCode(new CS(\"T\", null ,null));\n\t\t resultMsg.setProcessingModeCode(new CS(\"T\", null, null));\n\t\t resultMsg.setInteractionId(new II(\"2.16.840.1.113883.1.18\", \"PRPA_IN201304UV02\"));\n\t\t resultMsg.setAcceptAckCode(new CS(\"AL\", null, null));\n\t\t\n\t\t MCCIMT000100UV01Receiver receiver = new MCCIMT000100UV01Receiver();\n\t\t resultMsg.addReceiver(receiver);\n\t\t receiver.setTypeCode(CommunicationFunctionType.RCV);\n\t\t \n\t\t MCCIMT000100UV01Device receiverDevice = new MCCIMT000100UV01Device();\n\t\t receiver.setDevice(receiverDevice );\n\t\t receiverDevice.setClassCode(EntityClassDevice.DEV);\n\t\t receiverDevice.setDeterminerCode(EntityDeterminer.INSTANCE);\n\t\t receiverDevice.setId(Collections.singletonList(new II(config.getPixReceiverOid(), null)));\n\t\t\t \n\t\t MCCIMT000100UV01Sender sender = new MCCIMT000100UV01Sender();\n\t\t resultMsg.setSender(sender);\n\t\t sender.setTypeCode(CommunicationFunctionType.SND);\n\t\t \n\t\t MCCIMT000100UV01Device senderDevice = new MCCIMT000100UV01Device();\n\t\t sender.setDevice(senderDevice);\n\t\t senderDevice.setClassCode(EntityClassDevice.DEV);\n\t\t senderDevice.setDeterminerCode(EntityDeterminer.INSTANCE);\n\t\t senderDevice.setId(Collections.singletonList(new II(config.getPixMySenderOid(), null)));\n\t\t\t \t\t \n\t\t PRPAIN201304UV02MFMIMT700701UV01ControlActProcess controlActProcess = new PRPAIN201304UV02MFMIMT700701UV01ControlActProcess();\n\t\t resultMsg.setControlActProcess(controlActProcess);\n\t\t controlActProcess.setClassCode(ActClassControlAct.CACT); // ???\n\t\t controlActProcess.setMoodCode(XActMoodIntentEvent.EVN); // ???\n\t\t controlActProcess.setCode(new CD(\"PRPA_TE201304UV02\",\"2.16.840.1.113883.1.18\", null)); // ???\n\t\t\n\t\t \n\t\t \n\t\t \n\t\t\n\t\t for (BundleEntryComponent entry : entriesByReference.values()) {\n\t\t\t //BundleEntryComponent entry = entriesByReference.get(ref.getReference());\n\n\t \t\tHTTPVerb method = entry.getRequest().getMethod();\n\t\t \tif (method == null) throw new InvalidRequestException(\"HTTP verb missing in Bundle for Patient resource.\");\n\t\t \t\t\t \t\t\t \t\n\t\t \tPatient basePatient = (Patient) entry.getResource();\n\t\t \tPatient in = null;\n\t\t \t\n\t\t \tList<Patient> replaced = new ArrayList<Patient>();\n\t\t \t\n\t\t \tfor (PatientLinkComponent linked : basePatient.getLink()) {\t\t \t\t\n\t\t \t\tif (linked.getType().equals(LinkType.REPLACEDBY)) {\n\t\t \t\t\tReference other = linked.getOther();\t\n\t\t \t\t\tPatient otherPatient = findPatient(other, entriesByReference, basePatient);\n\t\t \t\t\tin = otherPatient;\n\t\t \t\t\treplaced.add(basePatient);\n\t\t \t\t} else if (linked.getType().equals(LinkType.REPLACES)) {\n\t\t \t\t\tReference other = linked.getOther();\t\n\t\t \t\t\tPatient otherPatient = findPatient(other, entriesByReference, basePatient);\n\t\t \t\t\tin = basePatient;\n\t\t \t\t\treplaced.add(otherPatient);\n\t\t \t\t}\n\t\t \t}\n\t\t \t\n\t\t \tif (in==null || replaced.isEmpty()) throw new InvalidRequestException(\"Cannot determine Patients to merge\");\n\t\t \t\t\t \t\t \t\t\t \t\n\t\t \tPRPAIN201304UV02MFMIMT700701UV01Subject1 subject = new PRPAIN201304UV02MFMIMT700701UV01Subject1();\n\t\t\t controlActProcess.addSubject(subject);\n\t\t\t subject.setTypeCode(\"SUBJ\");\n\t\t\t subject.setContextConductionInd(false); // ???\n\t\t\t \t\t\t \n\t\t\t PRPAIN201304UV02MFMIMT700701UV01RegistrationEvent registrationEvent = new PRPAIN201304UV02MFMIMT700701UV01RegistrationEvent();\n\t\t\t subject.setRegistrationEvent(registrationEvent);\n\t\t\t registrationEvent.setClassCode(ActClass.REG);\n\t\t\t registrationEvent.setMoodCode(ActMood.EVN);\n\t\t\t registrationEvent.setStatusCode(new CS(\"active\",null,null)); // ???\n\t\t\t \n\t\t\t List<MFMIMT700701UV01ReplacementOf> replacementOfList = new ArrayList<MFMIMT700701UV01ReplacementOf>();\n\t\t\t registrationEvent.setReplacementOf(replacementOfList);\n\t\t\t \n\t\t\t for (Patient replacedPatient : replaced) {\n\t\t\t MFMIMT700701UV01ReplacementOf replacementOf = new MFMIMT700701UV01ReplacementOf();\n\t\t\t MFMIMT700701UV01PriorRegistration priorRegistration = new MFMIMT700701UV01PriorRegistration();\n\t\t\t replacementOf.setPriorRegistration(priorRegistration );\n\t\t\t replacementOf.setTypeCode(\"RPLC\");\n\t\t\t priorRegistration.setClassCode(ActClass.REG);\n\t\t\t priorRegistration.setMoodCode(ActMood.EVN);\n\t\t\t priorRegistration.setStatusCode(new CS(\"obsolete\", null,null));\n\t\t\t MFMIMT700701UV01Subject3 subject1 = new MFMIMT700701UV01Subject3();\n\t\t\t\tpriorRegistration.setSubject1(subject1 );\n\t\t\t subject1.setTypeCode(ParticipationTargetSubject.SBJ);\n\n\t\t\t MFMIMT700701UV01PriorRegisteredRole priorRegisteredRole = new MFMIMT700701UV01PriorRegisteredRole();\n\t\t\t\tsubject1.setPriorRegisteredRole(priorRegisteredRole );\n\t\t\t\tpriorRegisteredRole.setClassCode(\"PAT\");\n\t\t\t\t\n\t\t\t\tfor (Identifier id : replacedPatient.getIdentifier()) {\n\t\t\t\t\tpriorRegisteredRole.addId(patientIdentifier(id));\n\t\t\t }\t\t\t\t\t\t\t\t\n\t\t\t \n\t\t\t replacementOfList.add(replacementOf);\n\t\t\t }\n\t\t\t \n\t\t\t \t\t\t \n\t\t\t PRPAIN201304UV02MFMIMT700701UV01Subject2 subject1 = new PRPAIN201304UV02MFMIMT700701UV01Subject2();\t\t\t \n\t\t\t registrationEvent.setSubject1(subject1);\n\t\t\t subject1.setTypeCode(ParticipationTargetSubject.SBJ);\n\t\t\t \t\t\t \n\t\t\t PRPAMT201303UV02Patient patient = new PRPAMT201303UV02Patient();\n\t\t\t patient.setClassCode(\"PAT\");\n\t\t\t subject1.setPatient(patient);\n\t\t\t \t\t\t \n\t\t\t PRPAMT201302UV02PatientStatusCode statusCode = new PRPAMT201302UV02PatientStatusCode(\"active\", null, null);\n\t\t\t patient.setStatusCode(statusCode); //???\n\t\t\t \t\t\t \n\t\t\t PRPAMT201303UV02Person patientPerson = new PRPAMT201303UV02Person();\n\t\t\t patientPerson.setClassCode(EntityClass.PSN);\n\t\t\t patientPerson.setDeterminerCode(EntityDeterminer.INSTANCE);\n\t\t\t patient.setPatientPerson(patientPerson );\n\t\t\t Organization managingOrg = getManagingOrganization(in, basePatient.getContained());\n\t\t\t if (managingOrg==null) managingOrg = getManagingOrganization(basePatient, basePatient.getContained());\n\t\t\t if (managingOrg==null) throw new InvalidRequestException(\"Cannot determine managingOrganization\");\n\t\t\t // TODO How is the correct mapping done?\n\t\t\t for (Identifier id : in.getIdentifier()) {\n\t\t\t \tPRPAMT201302UV02PatientId patientId = new PRPAMT201302UV02PatientId(getScheme(id.getSystem()),id.getValue());\n\t\t\t\t\tpatient.addId(patientId );\n\t\t\t }\n\t\t \t\n\t\t \tfor (HumanName name : in.getName()) {\t\t \t\t\t\t \t\n\t\t\t\t\tpatientPerson.addName(transform(name));\t\n\t\t \t}\n\t\t \t\n\t\t \t\n\t\t \tpatientPerson.setBirthTime(transform(in.getBirthDateElement()));\n\t\t \tif (in.hasGender()) {\n\t\t\t switch(in.getGender()) {\n\t\t\t case MALE:patientPerson.setAdministrativeGenderCode(new CE(\"M\",\"Male\",\"2.16.840.1.113883.12.1\"));break;\n\t\t\t case FEMALE:patientPerson.setAdministrativeGenderCode(new CE(\"F\",\"Female\",\"2.16.840.1.113883.12.1\"));break;\n\t\t\t case OTHER:patientPerson.setAdministrativeGenderCode(new CE(\"A\",\"Ambiguous\",\"2.16.840.1.113883.12.1\"));break;\n\t\t\t case UNKNOWN:patientPerson.setAdministrativeGenderCode(new CE(\"U\",\"Unknown\",\"2.16.840.1.113883.12.1\"));break;\n\t\t\t }\n\t\t \t}\n\t\t if (in.hasAddress()) patientPerson.setAddr(new ArrayList<AD>());\n\t\t for (Address address : in.getAddress()) {\n\t\t\t\t\tpatientPerson.addAddr(transform(address));\n\t\t }\n\t\t \t\n\t\t for (ContactPoint contactPoint : in.getTelecom()) { \n\t\t\t\t\tpatientPerson.addTelecom(transform(contactPoint));\n\t\t }\n\t\t \n\t\t if (in.hasDeceasedBooleanType()) {\n\t\t patientPerson.setDeceasedInd(new BL(in.getDeceasedBooleanType().getValue()));\n\t\t }\n\t\t if (in.hasDeceasedDateTimeType()) {\n\t\t \tpatientPerson.setDeceasedTime(transform(in.getDeceasedDateTimeType()));\n\t\t }\n\t\t if (in.hasMultipleBirthBooleanType()) {\n\t\t \tpatientPerson.setMultipleBirthInd(new BL(in.getMultipleBirthBooleanType().getValue()));\n\t\t }\n\t\t if (in.hasMultipleBirthIntegerType()) {\n\t\t \tpatientPerson.setMultipleBirthOrderNumber(new INT(in.getMultipleBirthIntegerType().getValue()));\n\t\t }\n\t\t if (in.hasMaritalStatus()) {\n\t\t \tpatientPerson.setMaritalStatusCode(transform(in.getMaritalStatus()));\n\t\t }\n\t\t if (in.hasCommunication()) {\n\t\t \tfor (PatientCommunicationComponent pcc : in.getCommunication()) {\t\t \t\t\n\t\t \t\tPRPAMT201303UV02LanguageCommunication languageCommunication = new PRPAMT201303UV02LanguageCommunication();\n\t\t \t\tlanguageCommunication.setLanguageCode(transform(pcc.getLanguage()));\n\t\t \t\tif (pcc.hasPreferred()) languageCommunication.setPreferenceInd(new BL(pcc.getPreferred()));\n\t\t\t\t\t\tpatientPerson.addLanguageCommunication(languageCommunication);\n\t\t \t}\n\t\t }\n\t \t\t\n\t\t \tMFMIMT700701UV01Custodian custodian = new MFMIMT700701UV01Custodian();\n\t\t\t\tregistrationEvent.setCustodian(custodian );\n\t\t\t\tcustodian.setTypeCode(ParticipationType.CST);\n\t\t\t\t\n\t\t\t\tCOCTMT090003UV01AssignedEntity assignedEntity = new COCTMT090003UV01AssignedEntity();\n\t\t\t\tcustodian.setAssignedEntity(assignedEntity);\n\t\t\t\tassignedEntity.setClassCode(RoleClassAssignedEntity.ASSIGNED);\n\t\t\t\t\n\t\t\t\tList<II> custIds = new ArrayList<II>();\t\t\t \t\t\t \n\t\t\t custIds.add(new II(getScheme(config.getCustodianOid()), null));\n\t\t\t\t\n\t\t\t\tassignedEntity.setId(custIds);\n\t\t\t\t//assignedEntity.setId(orgIds);\n\t\t\t\t\n\t\t\t\tCOCTMT090003UV01Organization assignedOrganization = new COCTMT090003UV01Organization();\n\t\t\t\tassignedEntity.setAssignedOrganization(assignedOrganization );\n\t\t\t\tassignedOrganization.setClassCode(EntityClassOrganization.ORG);\n\t\t\t\tassignedOrganization.setDeterminerCode(EntityDeterminer.INSTANCE);\n\t\t\t\tif (managingOrg.hasName()) {\t\n\t\t\t\t\tON name = new ON();\n\t\t\t\t\tname.setMixed(Collections.singletonList(managingOrg.getName()));\n\t\t\t\t assignedOrganization.setName(Collections.singletonList(name));\n\t\t\t\t}\n\t \t}\n\t \n\t \n\t ByteArrayOutputStream out = new ByteArrayOutputStream();\t \n\t HL7V3Transformer.marshallMessage(PRPAIN201304UV02Type.class, out, resultMsg);\n\t System.out.println(\"POST CONVERT\");\n\t String outArray = new String(out.toByteArray()); \n\t System.out.println(outArray);\n\t return outArray;\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t List<Result> outputK = new ArrayList<Result>();\n\n\t\t\t\n\t\t\tint alignment_type = Integer.parseInt(args[0]);\n\t\t\t\n\t\t\tif(alignment_type==1){\n\t\t\t\t\n\t\t\t\tGlobalAlignment gb = new GlobalAlignment();\n\n\t\t\t\toutputK = \tgb.PerformGlobalAlignment(args[1],args[2],args[3],args[4],Integer.parseInt(args[5]),Integer.parseInt(args[6]));\n\t\t\t\t\n \n\t\t\t\t\n\t\t\t\tfor(int i=0;i<outputK.size();i++){\n\t\t\t\t\tResult r = outputK.get(i);\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(r.score);\n \tSystem.out.println(\"id1 \"+r.id1+\" \"+r.startpos1+\" \"+r.seq1);\n\t\t\t\t\tSystem.out.println(\"id2 \"+r.id2+\" \"+r.startpos2+\" \"+r.seq2);\n//\t\t\t\t\t\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else if(alignment_type==2){\n\t\t\t\t\n\t\t\t\tLocalAlignment loc = new LocalAlignment();\n\t\t\t\toutputK = \tloc.PerformLocalAlignment(args[1],args[2],args[3],args[4],Integer.parseInt(args[5]),Integer.parseInt(args[6]));\n\t\t\t\t\n \n\t\t\t\t\n\t\t\t\tfor(int i=0;i<outputK.size();i++){\n\t\t\t\t\tResult r = outputK.get(i);\n\n\t\t\t\t\tSystem.out.println(r.score);\n System.out.println(\"id1 \"+r.id1+\" \"+r.startpos1+\" \"+r.seq1);\n\t\t\t\t\tSystem.out.println(\"id2 \"+r.id2+\" \"+r.startpos2+\" \"+r.seq2);\n\n\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}else if(alignment_type==3){\n\t\t\t\t\n\t\t \tDoveTail dt = new DoveTail();\t\t\n\t\t\t\toutputK = \tdt.PerformDoveTailAlignment(args[1],args[2],args[3],args[4],Integer.parseInt(args[5]),Integer.parseInt(args[6]));\n\t\t\t\t\n \n\t\t\t\t\n\t\t\t\tfor(int i=0;i<outputK.size();i++){\n\t\t\t\t\tResult r = outputK.get(i);\n\n\t\t\t\t\tSystem.out.println(r.score);\n System.out.println(\"id1 \"+r.id1+\" \"+r.startpos1+\" \"+r.seq1);\n\t\t\t\t\tSystem.out.println(\"id2 \"+r.id2+\" \"+r.startpos2+\" \"+r.seq2);\n\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Enter 1,2 or 3\");\n\t\t\t}\n\t\t\n\t\n\t}",
"public static void main(String[] args) {\n MergeAlternateLinkedList linkedList=new MergeAlternateLinkedList();\n MergeAlternateLinkedList linkedList1=new MergeAlternateLinkedList();\n linkedList.push(2);\n linkedList.push(3);\n linkedList.push(4);\n System.out.println(\"First list-\");\n linkedList.printList();\n linkedList1.push(5);\n linkedList1.push(6);\n linkedList1.push(7);\n System.out.println(\"Second list-\");\n linkedList1.printList();\n //merge two linkedlist\n linkedList.mergeList(linkedList1);\n System.out.println(\"Print modified merge linked list 2\");\n linkedList1.printList();\n\n\n }",
"public static void main(String[] args) {\n\t\tint []arr1= {12,13,44};\r\n\t\tint []arr2= {44,45,47,50};\r\n\t\tint i,j;\r\n\t\tint count=0;\r\n\t\t\r\n\t\tint []merge=new int[arr1.length+arr2.length];\r\n\t\tfor(i=0;i<arr1.length;i++)\r\n\t\t{\r\n\t\t\tmerge[i]=arr1[i];\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\t\tfor(i=0;i<arr2.length;i++)\r\n\t\t\t{\r\n\t\t\t\tmerge[count++]=arr2[i];\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tfor(i=0;i<merge.length;i++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\" \" +merge[i]);\r\n\t\t\t}\r\n\t\t\r\n\r\n\t}",
"public String print() {\n\n String returnString = \"\";\n\n if (kv1 != null) {\n returnString += kv1.toString();\n }\n\n if (kv2 != null) {\n returnString += \" \" + kv2.toString();\n }\n\n return returnString;\n }",
"public static void main(String[] args) {\n\t\tList<String> t1 = Arrays.asList(\"John\", \"[email protected]\", \"[email protected]\");\n\t\tList<String> t2 = Arrays.asList(\"John\", \"[email protected]\");\n\t\tList<String> t3 = Arrays.asList(\"John\", \"[email protected]\",\"[email protected]\");\n\t\tList<String> t4 = Arrays.asList(\"Mary\", \"[email protected]\");\n\t\tList<List<String>> t = new ArrayList<>();\n\t\tt.add(t1);\n\t\tt.add(t2);\n\t\tt.add(t3);\n\t\tt.add(t4);\n\t\t\n\t\tAccountsMerge721 am = new AccountsMerge721();\n\t\tList<List<String>> result = am.accountsMerge2(t);\n\t\tresult.stream()\n\t\t\t\t.forEach(System.out :: println);\n\t}",
"@Override\n\tpublic void print(Multimap<String, List<String>> multimap,List<String> finalList) {\n\t\tmultimap= fileRecordsIntoMap(finalList);\n\t\tmultimap= \tremoveNonAnagram(multimap);\n\t\tSet<String> set=multimap.keySet();\n\t\tIterator<String> it=set.iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tList<String> list=(List) multimap.get(String.valueOf(it.next()));\n\t\t\tfor(String value:list)\n\t\t\t{\n\t\t\t\tSystem.out.print(value+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"@Override\n public String toString(){\n return key;\n }",
"private void printKeyHash() {\n try {\n PackageInfo info =\n getPackageManager().getPackageInfo(\"in.peerreview.ping\", PackageManager.GET_SIGNATURES);\n for (Signature signature : info.signatures) {\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n md.update(signature.toByteArray());\n Log.d(\"KeyHash:\", Base64.encodeToString(md.digest(), Base64.DEFAULT));\n }\n } catch (PackageManager.NameNotFoundException e) {\n Log.e(\"KeyHash:\", e.toString());\n } catch (NoSuchAlgorithmException e) {\n Log.e(\"KeyHash:\", e.toString());\n }\n }",
"private BTreeNode mergeSingleKeyRoot() {\n BTreeNode root = getRoot();\n String rootKey = root.getKey(0);\n BTreeNode leftChild = root.getChild(0);\n BTreeNode rightChild = root.getChild(1);\n return root.merge(leftChild, rightChild, rootKey);\n }",
"public static void main(String[] args) {\n\r\n\t\tint[] l1 = {1,5,9,10,20};\r\n\r\n\t\tint[] l2 = {2,4,5,6,7,9,15};\r\n\r\n\t\tint[] l3 = {3,8,13,15,22};\r\n\r\n\t\t// Required: Test your mergeklists() over l1, l2, l3,\r\n\t\t// Complete the code here.\r\n\r\n\t\tint size = (l1.length -1) + (l2.length -1) + (l3.length -1);\r\n\r\n\t\tint[] arry = \tmergeklists(l1,l2,l3,size);\r\n\r\n\t\tfor (int i = 0; i < size; i++){\r\n\t\t\tSystem.out.println(arry[i]);\r\n\t\t}\r\n\t}",
"void printAssociations(HashMap<BitSet, Integer> allAssociations){\n try{\n boolean firstLine = true;\n FileWriter fw = new FileWriter(this.outputFilePath);\n \n for(Map.Entry<BitSet, Integer> entry : allAssociations.entrySet()){\n BitSet bs = entry.getKey();\n if(firstLine)\n firstLine = false;\n else\n fw.write(\"\\n\");\n \n for(int i=0; i<bs.length() ; i++){\n if(bs.get(i))\n fw.write(intToStrItem.get(frequentItemListSetLenOne.get(i).getKey())+\" \");\n }\n\n fw.write(\"(\" + entry.getValue() +\")\");\n }\n \n fw.close();\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }",
"public void printHashKey(){\n try {\n PackageInfo info = getPackageManager().getPackageInfo(\n \"net.simplifiedcoding.androidlogin\",\n PackageManager.GET_SIGNATURES);\n for (Signature signature : info.signatures) {\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n md.update(signature.toByteArray());\n Log.d(\"KeyHash:\", Base64.encodeToString(md.digest(), Base64.DEFAULT));\n\n }\n } catch (PackageManager.NameNotFoundException e) {\n\n } catch (NoSuchAlgorithmException e) {\n\n }\n }",
"public void printHashKey(){\n try {\n PackageInfo info = getPackageManager().getPackageInfo(\"com.lostfind\", PackageManager.GET_SIGNATURES);\n for (Signature signature : info.signatures) {\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n md.update(signature.toByteArray());\n Log.d(\"KeyHash:\", \"KEYHASH::::\"+Base64.encodeToString(md.digest(), Base64.DEFAULT));\n }\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n }",
"public void print() \n\t{\n\t\tSystem.out.println(\"existing files:\\n\");\n\t\tIterator<Entry<String, byte[]>> existing = this.existingFile.entrySet().iterator();\n\t\twhile (existing.hasNext()) \n\t\t{\n\t\t\tEntry<String, byte[]> entry = existing.next();\n\t\t\tString key = entry.getKey();\n\t\t\tbyte[] macValue = entry.getValue();\n\t\t\tSystem.out.println(key + \" - \" + bytes2HexString(macValue));\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\\n\\nprefix files:\\n\");\n\t\tIterator<Entry<String, byte[]>> prefix = this.prefix.entrySet().iterator();\n\t\twhile (prefix.hasNext()) \n\t\t{\n\t\t\tEntry<String, byte[]> entry = prefix.next();\n\t\t\tString key = entry.getKey();\n\t\t\tbyte[] macValue = entry.getValue();\n\t\t\tSystem.out.println(key + \" - \" + bytes2HexString(macValue));\n\t\t}\n\t}",
"public static void showInstruction(){\r\n\t\tSystem.out.println(\"put key value : put operation\");\r\n\t\tSystem.out.println(\"get key : get the value of this key\");\r\n\t\tSystem.out.println(\"delete key : delete this key-value pairs\");\r\n\t}",
"public static void main(String[] args) {\n\t\tint [] queue1 = {4,7,2,9,12,35,8,49};\r\n\t int [] queue2 = {24,53,6,19,41,71,1,68,11,32,99}; \r\n\t int[]mergeQ = new int[queue1.length + queue2.length];\r\n\r\n\t for(int i=0; i < queue1.length; i++ )\r\n\t {\r\n\r\n\t mergeQ[i*2] = queue1[i]; \r\n\t mergeQ[i*2+1] = queue2[i]; \r\n\t }\r\n\t for(int i=0; i < mergeQ.length; i++) { \r\n\t System.out.print(mergeQ[i]+\",\");\r\n\t }\r\n\t}",
"private String getCombinedKey(final ProductAssociation productAssociation) {\n\t\t\n\t\treturn new StringBuilder()\n\t\t\t.append(productAssociation.getSourceProduct().getCode())\n\t\t\t.append(productAssociation.getTargetProduct().getCode())\n\t\t\t.append(productAssociation.getAssociationType())\n\t\t\t.append(productAssociation.getCatalog().getCode())\n\t\t\t.toString();\n\t}",
"public static void main(String[] args) throws IOException {\n\t\t\t\n\t\t\tReader.init(System.in);\n\t\t int x=Reader.nextInt();\n\t\t int y=Reader.nextInt();\n\t\t LabUnion1 obj1=new LabUnion1();\n\t\t LabUnion1 obj2=new LabUnion1();\n\t\t LabUnion1 curr1=obj1.header;\n\t\t LabUnion1 curr2=obj2.header;\n\t\t System.out.println(curr1.getLink());\n\t\t for(int i=0;i<x;i++)\n\t\t {\n\t\t \t int n=Reader.nextInt();\n\t\t \t System.out.println(1);\n\t\t \t LabUnion1 element=new LabUnion1(n);\n\t\t \t curr1.setLink(element);\n\t\t \t curr1=curr1.link; \n\t\t }\n\t\t for(int j=0;j<y;j++)\n\t\t {\n\t\t \t int n=Reader.nextInt();\n\t\t \t LabUnion1 element=new LabUnion1(n);\n\t\t \t curr2.setLink(element);\n\t\t \t curr2=curr2.link; \n\t\t }\n\t\t \n\t\t \n\t\t \n\t\t LabUnion1 z=obj1.MergeSort(obj1,obj2);\n\t\t obj1.display();\n\t\t System.out.println(z.comp);\n\t\t \n\t\t}",
"public static void printIDTable () {\n System.out.println(); \n System.out.println(\"Identifier Cross Reference Table\");\n System.out.println(\"--------------------------------\"); \n for(String key : idCRT.keySet()) {\n // if id string length is > 30,\n // replace excess characters with a '+' character\n if(key.length() > 30) {\n String temp = key.substring(0, 30);\n temp += \"+\";\n System.out.printf(\"%-30s\",temp); \n } else {\n System.out.printf(\"%-30s\",key);\n }\n // prints the line numbers, creating a new line\n // if number of line numbers exceeds 7\n int count = 0;\n for(Integer lno : idCRT.get(key)) {\n if(count == 7) {\n System.out.printf(\"\\n%30s\", \" \");\n count = 0;\n }\n System.out.printf(\"%6d\",lno);\n count++;\n }\n System.out.println();\n }\n }",
"public String toString() {\r\n \treturn key;\r\n }",
"@Override\n\tprotected void merge(Object in1, Object in2, Object out) {\n\t\t\n\t}",
"@Override\r\n\tpublic String toString() {\n\t\treturn key + \"\";\r\n\t}",
"public static void main(String[] args) {\n\t\tint[] a = new int[30];\n\t\ta[0] = 1;\n\t\ta[1] = 3;\n\t\ta[2] = 5;\n\t\ta[3] = 7;\n\t\ta[4] = 9;\n\t\t\n\t\tint[] b = new int[]{2,4,6,8};\n\t\t//a = {1,3,5,7,9};\n\t\t//a[30] = 10;\n\t\tmerge(a, 5, b, 4);\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t\t//System.out.println(a);\n\t}",
"public void print(){\t\t\r\n\t\tSystem.out.println(\"===\\nCommit \" + id +\"\\n\"+ Time + \"\\n\" + message + \"\\n\");\r\n\t}",
"private void printKeyHash(){\n try {\n PackageInfo info = getPackageManager().getPackageInfo(\n \"andbas.ui3_0628\",\n PackageManager.GET_SIGNATURES);\n for (Signature signature : info.signatures) {\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n md.update(signature.toByteArray());\n Log.d(\"KeyHash:\", Base64.encodeToString(md.digest(), Base64.DEFAULT));\n }\n } catch (PackageManager.NameNotFoundException e) {\n\n } catch (NoSuchAlgorithmException e) {\n\n }\n\n }",
"public String toString() { \n StringBuffer sb = new StringBuffer(); \n sb.append(\"[\"); \n sb.append(key);\n sb.append(\"]:\"); \n sb.append(apsPinKey);\n sb.append(\"|\");\n sb.append(apsSkillKey);\n sb.append(\"|\");\n sb.append(apsOthers);\n sb.append(\"|\");\n sb.append(apsCityKey);\n sb.append(\"|\");\n sb.append(apsRemarks);\n sb.append(\"|\");\n sb.append(activeStatus);\n sb.append(\"|\");\n sb.append(profileKey);\n sb.append(\"|\");\n sb.append(lockKey);\n sb.append(\"|\");\n sb.append(createdOn);\n return sb.toString(); \n }",
"public void printAlignment(SWGAlignment alignment){\n\t\t\tString \torigSeq1 = alignment.getOriginalSequence1().toString(),\n\t\t\t\t\torigSeq2 = alignment.getOriginalSequence2().toString(),\n\t\t\t\t\talnSeq1 = new String(alignment.getSequence1()),\n\t\t\t\t\talnSeq2 = new String(alignment.getSequence2());\n\t\t\tint \tstart1 = alignment.getStart1(),\n\t\t\t\t\tstart2 = alignment.getStart2(),\n\t\t\t\t\tgap1 = alignment.getGaps1(),\n\t\t\t\t\tgap2 = alignment.getGaps2();\n\t\t\t\n\t\t\tString seq1, seq2, mark;\n\t\t\tif(start1>=start2){\n\t\t\t\tseq1=origSeq1.substring(0, start1) + alnSeq1 + origSeq1.substring(start1+alnSeq1.length()-gap1);\n\t\t\t\tString \tseq2Filler = start1==start2?\"\":String.format(\"%\"+(start1-start2)+\"s\", \"\"),\n\t\t\t\t\t\tmarkFiller = start1==0?\"\":String.format(\"%\"+start1+\"s\", \"\");\n\t\t\t\tseq2= seq2Filler + origSeq2.substring(0, start2) + alnSeq2 + origSeq2.substring(start2+alnSeq2.length()-gap2);\n\t\t\t\tmark= markFiller+String.valueOf(alignment.getMarkupLine());\n\t\t\t}else{\n\t\t\t\tseq2=origSeq2.substring(0, start2) + alnSeq2 + origSeq2.substring(start2+alnSeq2.length()-gap2);\n\t\t\t\tString \tmarkFiller = start2==0?\"\":String.format(\"%\"+start2+\"s\", \"\");\n\t\t\t\tseq1=String.format(\"%\"+(start2-start1)+\"s\", \"\") + origSeq1.substring(0, start1) + alnSeq1 + origSeq1.substring(start1+alnSeq1.length()-gap1);\n\t\t\t\tmark=markFiller+String.valueOf(alignment.getMarkupLine());\n\t\t\t}\n\t\t\tSystem.out.println(alignment.getSummary());\n\t\t\tSystem.out.println(seq1);\n\t\t\tSystem.out.println(mark);\n\t\t\tSystem.out.println(seq2);\n\t\t}",
"private void printKeyHash() {\n\n try {\n\n PackageInfo info = getPackageManager().getPackageInfo(\"com.example.androidnotification\", PackageManager.GET_SIGNATURES);\n\n for (Signature signature : info.signatures) {\n\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n md.update(signature.toByteArray());\n\n Log.d(TAG, \"printKeyHash: \" + Base64.encodeToString(md.digest(), Base64.DEFAULT));\n }\n\n } catch (PackageManager.NameNotFoundException e) {\n\n e.printStackTrace();\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n }",
"private static void showKeysInBase64(KeyPair keyPair) {\r\n\r\n\t\tfinal byte[] encodedPrivateKey = keyPair.getPrivate().getEncoded();\r\n\t\tfinal byte[] encodedPublicKey = keyPair.getPublic().getEncoded();\r\n\t\tSystem.out.printf(\"encoded private key length[%3d], encoded public key length[%3d]%n\", encodedPrivateKey.length,\r\n\t\t\t\tencodedPublicKey.length);\r\n\t\tfinal String base64Priv = Base64.getUrlEncoder().encodeToString(encodedPrivateKey);\r\n\t\tfinal String base64Pub = Base64.getUrlEncoder().encodeToString(encodedPublicKey);\r\n\t\tSystem.out.printf(\"private key changed to Base64 (length[%3d]):%n [%s]%n\", base64Priv.length(), base64Priv);\r\n\t\tSystem.out.printf(\"public key changed to Base64 (length[%3d]):%n [%s]%n\", base64Pub.length(), base64Pub);\r\n\t}",
"private String toString(String pre) {\n StringBuilder sb = new StringBuilder();\n\n sb.append(key);\n if (values1 != null) {\n sb.append(\" \");\n sb.append(values1);\n sb.append(\", \");\n sb.append(values2);\n }\n sb.append(\"\\n\");\n\n String newpre = pre + \" \";\n if (!son.empty) {\n sb.append(newpre);\n sb.append(\"son: \");\n sb.append(son.toString(newpre));\n }\n if (!left.empty) {\n sb.append(newpre);\n sb.append(\"left: \");\n sb.append(left.toString(newpre));\n }\n if (!right.empty) {\n sb.append(newpre);\n sb.append(\"right: \");\n sb.append(right.toString(newpre));\n }\n return sb.toString();\n }",
"public void printHashKey(){\n try {\n PackageInfo info = getPackageManager().getPackageInfo(\n \"com.credolabs.justcredo\",\n PackageManager.GET_SIGNATURES);\n for (Signature signature : info.signatures) {\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n md.update(signature.toByteArray());\n Log.d(\"Credo:\", Base64.encodeToString(md.digest(), Base64.DEFAULT));\n }\n } catch (PackageManager.NameNotFoundException e) {\n\n } catch (NoSuchAlgorithmException e) {\n\n }\n }",
"public static void main(String[] args) {\n\n\n\t\tNode head = Merge.takeInput();\n\t\thead = evenOdd(head);\n\t\twhile(head != null){\n\t\t\tSystem.out.print(head.data + \"-->\");\n\t\t\thead = head.next;\n\t\t}\n\t}",
"public static void main(String[] args) {\n KeyPairGenerator keygen = null;\n try {\n keygen = KeyPairGenerator.getInstance(\"RSA\");\n SecureRandom secrand = new SecureRandom();\n // secrand.setSeed(\"17\".getBytes());//初始化随机产生器\n keygen.initialize(2048, secrand);\n KeyPair keys = keygen.genKeyPair();\n PublicKey publicKey = keys.getPublic();\n PrivateKey privateKey = keys.getPrivate();\n String pubKey = Base64.encode(publicKey.getEncoded());\n String priKey = Base64.encode(privateKey.getEncoded());\n System.out.println(\"pubKey = \" + new String(pubKey));\n System.out.println(\"priKey = \" + new String(priKey));\n\n/*\n X509EncodedKeySpec keySpec = new X509EncodedKeySpec(pubkey.getEncoded());\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n PublicKey publicKey = keyFactory.generatePublic(keySpec);\n pubKey = Base64.encode(publicKey.getEncoded());\n System.out.println(\"pubKey = \" + new String(pubKey));\n*/\n\n/*\n PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(prikey.getEncoded());\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n PrivateKey privateKey = keyFactory.generatePrivate(keySpec);\n priKey = Base64.encode(privateKey.getEncoded());\n System.out.println(\"priKey = \" + new String(priKey));\n*/\n //(N,e)是公钥\n RSAPublicKey rsaPublicKey = (RSAPublicKey) publicKey;\n System.out.println(\"RSAPublicKey:\");\n System.out.println(\"Modulus.length=\" +\n rsaPublicKey.getModulus().bitLength());\n System.out.println(\"Modulus=\" + rsaPublicKey.getModulus().toString());//n\n System.out.println(\"PublicExponent.length=\" +\n rsaPublicKey.getPublicExponent().bitLength());\n System.out.println(\"PublicExponent=\" + rsaPublicKey.getPublicExponent().toString());//e\n\n\n //(N,d)是私钥\n RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) privateKey;\n System.out.println(\"RSAPrivateKey:\");\n System.out.println(\"Modulus.length=\" +\n rsaPrivateKey.getModulus().bitLength());\n System.out.println(\"Modulus=\" + rsaPrivateKey.getModulus().toString());//n\n System.out.println(\"PrivateExponent.length=\" +\n rsaPrivateKey.getPrivateExponent().bitLength());\n System.out.println(\"PrivateExponent=\" + rsaPrivateKey.getPrivateExponent().toString());//d\n\n String encodeData = encode(\" public static String encode(String toEncode,String D, String N) {\\n\" +\n \" // BigInteger var2 = new BigInteger(\\\"17369712262290647732768133445861332449863405383733306695896586821166245382729380222118948668590047591903813382253186640467063376463309880263824085810383552963627855603429835060435976633955217307266714318344160886538360012623239010786668755679438900124601074924850696725233212494777766999123952653273738958617798460338184668049410136792403729341479373919634041235053823478242208651592611582439749292909499663165109004083820192135244694907138372731716013807836312280426304459316963033144149631900633817073029029413556757588486052978078614048837784810650766996280232645714319416096306667876390555673421669667406990886847\\\");\\n\" +\n \" // BigInteger var3 = new BigInteger(\\\"65537\\\");\\n\" +\n \" int MAX_ENCRYPT_BLOCK = 128;\\n\" +\n \" int offSet = 0;\\n\" +\n \" byte[] cache;\\n\" +\n \" int i = 0;\\n\" +\n \" ByteArrayOutputStream out = new ByteArrayOutputStream();\\n\" +\n \" try {\\n\" +\n \" RSAPrivateKeySpec rsaPrivateKeySpec = new java.security.spec.RSAPrivateKeySpec(new BigInteger(N),new BigInteger(D));\\n\" +\n \" KeyFactory keyFactory = java.security.KeyFactory.getInstance(\\\"RSA\\\");\\n\" +\n \" PrivateKey privateKey = keyFactory.generatePrivate(rsaPrivateKeySpec);\\n\" +\n \" Cipher cipher = javax.crypto.Cipher.getInstance(\\\"RSA\\\");\\n\" +\n \" cipher.init(Cipher.ENCRYPT_MODE,privateKey);\\n\" +\n \"\\n\" +\n \" byte[] data = toEncode.getBytes(StandardCharsets.UTF_8);\\n\" +\n \" int inputLen = data.length;\\n\" +\n \" // 对数据分段加密\\n\" +\n \" while (inputLen - offSet > 0) {\\n\" +\n \" if (inputLen - offSet > MAX_ENCRYPT_BLOCK) {\\n\" +\n \" cache = cipher.doFinal(data, offSet, MAX_ENCRYPT_BLOCK);\\n\" +\n \" } else {\\n\" +\n \" cache = cipher.doFinal(data, offSet, inputLen - offSet);\\n\" +\n \" }\\n\" +\n \" out.write(cache, 0, cache.length);\\n\" +\n \" i++;\\n\" +\n \" offSet = i * MAX_ENCRYPT_BLOCK;\\n\" +\n \" }\\n\" +\n \" byte[] datas = out.toByteArray();\\n\" +\n \" out.close();\\n\" +\n \"\\n\" +\n \" //byte[] datas = datas = cipher.doFinal(toEncode.getBytes());\\n\" +\n \" datas = org.apache.commons.codec.binary.Base64.encodeBase64(datas);\\n\" +\n \" return new String(datas,StandardCharsets.UTF_8);\\n\" +\n \" } catch (NoSuchAlgorithmException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (InvalidKeySpecException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (NoSuchPaddingException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (InvalidKeyException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (BadPaddingException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (IllegalBlockSizeException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" } catch (IOException e) {\\n\" +\n \" e.printStackTrace();\\n\" +\n \" }\\n\" +\n \" return null;\\n\" +\n \" }\",rsaPrivateKey.getPrivateExponent().toString(),rsaPrivateKey.getModulus().toString());\n String decodeData = decode(encodeData,rsaPublicKey.getPublicExponent().toString(),rsaPublicKey.getModulus().toString());\n\n System.out.println(encodeData);\n System.out.println(decodeData);\n\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }/* catch (InvalidKeySpecException e) {\n e.printStackTrace();\n }*/\n }",
"@Override\n public abstract void merge(Mergeable merge);",
"@Override\n public String toString() {\n return key;\n }",
"public static void main(String[] args) {\n\t\tListNode L1 = new ListNode(1);\r\n\t\tListNode L2 = new ListNode(2);\r\n\t\tListNode L3 = new ListNode(3);\r\n\t\tListNode L4 = new ListNode(4);\r\n\t\tListNode L5 = new ListNode(5);\r\n\t\tL1.next=L2;\r\n\t\tL2.next=L3;\r\n\t\tL3.next=L4;\r\n\t\tL4.next=L5;\r\n\t\t\r\n\t\tListNode L6 = new ListNode(1);\r\n\t\tListNode L7 = new ListNode(3);\r\n\t\tListNode L8 = new ListNode(4);\r\n\t\tListNode L9 = new ListNode(7);\r\n\t\tListNode L10 = new ListNode(9);\r\n\t\tL6.next=L7;\r\n\t\tL7.next=L8;\r\n\t\tL8.next=L9;\r\n\t\tL9.next=L10;\r\n\t\t\r\n\t\tprintListNode(mergeTwoLists( L1, L6));\r\n\t}",
"public static void main(String[] args) {\r\n\t\tint[] A = { 1, 2, 3, 4, 4, 5, 6, 6, 7 };\r\n\t\tint[] B = { 4, 5, 5, 5, 6, 7, 8, 9 };\r\n\r\n\t\tSystem.out.println(\"Test 1: \");\r\n\t\tmerge(A, B);\r\n\r\n\t\tint[] C = { 9, 15, 16, 28 };\r\n\t\tint[] D = { 1, 8, 14, 15, 26, 31 };\r\n\t\tSystem.out.println(\"Test 2: \");\r\n\t\tmerge(C, D);\r\n\r\n\t\tint[] E = { -3, -1, 0, 29358, 29359, 300000 };\r\n\t\tint[] F = { -29, -2, 0, 100, 29360 };\r\n\t\tSystem.out.println(\"Test 3: \");\r\n\t\tmerge(E, F);\r\n\r\n\t}",
"public static void main(String[] args) {\n\t\tStringJoiner joiner=new StringJoiner(\" and \",\"{\",\"}\");\n\t\tjoiner.add(\"python\");\n\t\tjoiner.add(\"java\");\n\t\tjoiner.add(\"c\");\n\t\tjoiner.add(\"c++\").add(\"html\").add(\"css\").add(\"js\");\n\t\tString s=joiner.toString();\n\t\tSystem.out.println(s);\n\t\tString s1=\"asd ad ad vxczvz\";\n\t\tSystem.out.println(s1.lastIndexOf(\" \"));\n\t\tSystem.out.println(s1.substring(s1.lastIndexOf(\" \")));\n\t\t\n\t\tStringJoiner joiner1=new StringJoiner(\" and \",\"[\",\"]\");\n\t\tjoiner1.add(\"asdsa\").add(\"rgrg\").add(\"grger\");\n\t\tSystem.out.println(joiner1);\n\t\tjoiner.merge(joiner1);\n\t\tSystem.out.println(joiner);\n\t}",
"private static String addToKey(String key, String addendum) {\n String ret = key;\n\n if (ret == null) {\n ret = \"\";\n }\n\n if (!ret.equals(\"\")) {\n ret += \".\";\n }\n\n ret += addendum;\n\n return ret;\n }",
"public static void main(String[] args) {\n\t\ttry{\r\n\t\t\tInputStreamReader Flujo = new InputStreamReader(System.in);\r\n\r\n\t\t\tBufferedReader teclado = new BufferedReader(Flujo);\r\n\t\t\tSystem.out.print(\"Introducir Nombre Certificado: \" );\r\n\t\t\tString NameFile=teclado.readLine();\r\n\t\t\tSystem.out.println(\"Nombre fichero:\"+NameFile );\r\n\t\t\tFileInputStream fr = new FileInputStream(NameFile);\r\n\r\n\r\n\r\n\t\t\tCertificateFactory cf = CertificateFactory.getInstance(\"X509\");\r\n\t\t\tX509Certificate c = (X509Certificate) cf.generateCertificate(fr);\r\n\r\n\t\t\tSystem.out.println(\"Certificado Leido \\n\");\r\n\r\n\r\n\r\n\t\t\t//lectura certificado CA\r\n\t\t\tInputStreamReader Flujo3 = new InputStreamReader(System.in);\r\n\t\t\tBufferedReader teclado3 = new BufferedReader(Flujo3);\r\n\t\t\tSystem.out.print(\"Introducir Nombre Certificado CA(*.pem): \" );\r\n\t\t\tString NameFile3=teclado3.readLine();\r\n\t\t\tSystem.out.println(\"Leido nombre fichero CA:\"+NameFile3 );\r\n\r\n\r\n\t\t\tFileInputStream fr3 = new FileInputStream(NameFile3);\r\n\r\n\t\t\tCertificateFactory cf3 = CertificateFactory.getInstance(\"X509\");\r\n\t\t\tX509Certificate c3 = (X509Certificate) cf3.generateCertificate(fr3);\r\n\r\n\t\t\tPublicKey publicKeyCA=c3.getPublicKey();\r\n\t\t\tfr3.close();\r\n\t\t\tc.verify(publicKeyCA);\r\n\r\n\t\t\t//lectura del fichero crl.pem\r\n\r\n\t\t\tInputStreamReader Flujo2 = new InputStreamReader(System.in);\r\n\t\t\tBufferedReader teclado2 = new BufferedReader(Flujo2);\r\n\t\t\tSystem.out.print(\"Introducir Nombre fichero certificados revocados(*.pem): \" );\r\n\t\t\tString NameFile2=teclado2.readLine();\r\n\t\t\tSystem.out.println(\"Leido nombre fichero crl:\"+NameFile2);\r\n\r\n\t\t\tFileInputStream inStream = new FileInputStream(NameFile2);\r\n\r\n\t\t\tCertificateFactory cf1 = CertificateFactory.getInstance(\"X.509\");\r\n\r\n\t\t\tX509CRL crl = (X509CRL) cf1.generateCRL(inStream);\r\n\r\n\t\t\t//Imprime los campos del certificado en forma de string\r\n\r\n\t\t\tinStream.close();\r\n\r\n\t\t\tFileWriter fichSalida = new FileWriter(\"log.txt\");\r\n\t\t\tBufferedWriter fs= new BufferedWriter(fichSalida);\r\n\r\n\t\t\tif(crl.isRevoked(c)){\r\n\t\t\t\tSystem.out.println(\"Certificado \"+NameFile+\" Revocado\");\r\n\t\t\t\tfs.write(\"\\n Certificado \"+NameFile+\" Revocado\");\r\n\t\t\t}else{\r\n\t\t\t\tSystem.out.println(\"Certificado \"+NameFile+\" NO revocado\");\r\n\t\t\t\tfs.write(\"\\n Certificado \"+NameFile+\" NO revocado\");\r\n\t\t\t}\t\r\n\t\t\tcrl.verify(publicKeyCA);\t\t\t\t\t\t\r\n\r\n\t\t\tSystem.out.println(\"\\n Fichero CRL \"+NameFile2+\" HA SIDO FIRMADO POR LA CA\");\r\n\t\t\tfs.write(\"\\n Fichero CRL \"+NameFile2+\" HA SIDO FIRMADO POR LA CA\");\r\n\t\t\t\r\n\t\t\tSet setEntries=crl.getRevokedCertificates();\r\n\t\t\tif(setEntries!=null && setEntries.isEmpty()==false){\r\n\t\t\t\tfor(Iterator iterator = setEntries.iterator(); iterator.hasNext();){\r\n\t\t\t\t\tX509CRLEntry x509crlentry = (X509CRLEntry) iterator.next();\r\n\t\t\t\t\tSystem.out.println(\"serial number=\"+x509crlentry.getSerialNumber());\r\n\t\t\t\t\tSystem.out.println(\"revocacion date=\"+x509crlentry.getRevocationDate());\r\n\t\t\t\t\tSystem.out.println(\"extensions=\"+x509crlentry.hasExtensions());\r\n\t\t\t\t}\r\n\t\t\t}\t\t\r\n\r\n\t\t\tfs.close();\r\n\r\n\t\t}catch (Exception e) {\r\n\t\t\te.printStackTrace( );\r\n\t\t}\r\n\t}",
"public void globallog() {\n for (Comm currcomm: allcomms.values()) {\n System.out.println(\"===\");\n System.out.println(\"commit \" + currcomm.getCommitID());\n if (currcomm.getMergepointer() != null) {\n System.out.println(\"Merge: \"\n + currcomm.getParent()\n .getCommitID().substring(0, 7) + \" \"\n + currcomm\n .getMergepointer().getCommitID().substring(0, 7));\n }\n System.out.println(\"Date: \" + currcomm.getDate());\n System.out.println(currcomm.getMessage());\n System.out.println();\n }\n }",
"private static void mergingSync() {\n Observable.merge(getDataSync(1), getDataSync(2)).blockingForEach(System.out::println);\n }",
"public static void main(String args[]) {\r\n\t\tMap<Integer,String> mp = new TreeMap<>();\r\n\t\t//mp.put(1,\"pavan\");\r\n\t\tmp.put(1, \"THe Dv\");\r\n\t\tmp.put(2,\"He is the B.O.S.S\");\r\n\t\tmp.put(3,\"The Devil\");\r\n\t\tfor(Map.Entry<Integer,String> ent : mp.entrySet()) {\r\n\t\t\tSystem.out.println(ent.getKey()+\":\"+ent.getValue());\r\n\t\t}\r\n\t\tfor(Integer a: mp.keySet()) {\r\n\t\t\tSystem.out.println(a + mp.get(a));\r\n\t\t}\r\n\t\r\n\t}",
"public static void main(String[] args) {\n\t\tTreeMap<String,Long> actorMap = new TreeMap<String, Long>();\t\t\n\t\tactorMap.put(\"Varun Dhawan\", 9966337744L);\n\t\tactorMap.put(\"Jonny Depp\", 9912347744L);\n\t\tactorMap.put(\"Robert Jr.\", 9967837744L);\n\t\tactorMap.put(\"Aalia Bhat\", 9526335744L);\n\t\tactorMap.put(\"Shraddha Kapoor\", 9963337744L);\n\t\t\n\t\tSystem.out.println(\"Phone No of Varun Dhawan : \" + actorMap.get(\"Varun Dhawan\"));\n\t\t\n\t\tSystem.out.println(actorMap);\n\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\tSet<String> actor = actorMap.keySet();\n\t\tSystem.out.println(\"User Iterator\");\n\t\tIterator<String> it = actor.iterator();\n\t\twhile(it.hasNext()) {\n\t\t\tString actorName = it.next();\n\t\t\tlong phNo = actorMap.get(actorName);\n\t\t\tSystem.out.println(\"Actor Name : \" + actorName + \"\\tPhone Number : \" + phNo);\n\t\t}\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\tNavigableMap<String, Long> hdMap = actorMap.headMap(\"Shraddha Kapoor\", false);\n\t\tSystem.out.println(\"Head Map : \" +hdMap);\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\tNavigableMap<String, Long> tlMap = actorMap.tailMap(\"Shraddha Kapoor\", false);\n\t\tSystem.out.println(\"Tail Map : \" +tlMap);\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\tSortedMap<String, Long> sbMap = actorMap.subMap(\"Aalia Bhat\", \"Shraddha Kapoor\");\n\t\tSystem.out.println(\"Sub Map : \" +sbMap);\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\tSystem.out.println(\"Ceiling of Shraddha Kapoor is \" + actorMap.ceilingKey(\"Shraddha Kapoor\") );\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\tSystem.out.println(\"Floor of Shraddha Kapoor is \" + actorMap.floorKey(\"Shraddha Kapoor\"));\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\tSystem.out.println(\"Higher of Shraddha Kapoor is \" + actorMap.higherKey(\"Shraddha Kapoor\"));\n\t\t\n\t\tSystem.out.println(\"-------------------------------------------------\");\n\t\t\n\t\tSystem.out.println(\"Lower of Shraddha Kapoor is \" + actorMap.lowerKey(\"Shraddha Kapoor\"));\n\t\t\n\t}",
"public void userLogInInfoRead(String filepath2, HashMap<String, EmpInfo> mergeData) {\n String data;\n String[] userLogInInfoToken;\n File userLogInInfoFile = new File(filepath2);\n Scanner scanner = null;\n try {\n scanner = new Scanner(userLogInInfoFile);\n } catch (FileNotFoundException e) {\n out.println(\"file not found\");\n }\n if (scanner != null) {\n while (scanner.hasNextLine()) {\n data = scanner.nextLine();\n userLogInInfoToken = data.split(\",\");\n // store userid in mergeData as a key\n EmpInfo empInfo = new EmpInfo(Integer.parseInt(userLogInInfoToken[0]),\n userLogInInfoToken[1], userLogInInfoToken[2], userLogInInfoToken[3]);\n EmpInfo uRole = mergeData.get(userLogInInfoToken[0]);\n uRole.setUserRole(userLogInInfoToken[3]);\n /* merge data have already 6 key and 6 emp information if new key is equal to old key\n then hash map not put new key and hashmap put userRole at old key,hashmap allowed only unique kay*/\n mergeData.put(userLogInInfoToken[0], uRole);\n // all employee log in information add in arraylist for printing information\n userLogInInfo.add(empInfo);\n }\n }\n }",
"public static void main(final String[] args) throws Exception {\n Security.addProvider(new BouncyCastleProvider());\n\n // --- setup key pair (generated in advance)\n final String passphrase = \"owlstead\";\n final KeyPair kp = generateRSAKeyPair(1024);\n final RSAPublicKey rsaPublicKey = (RSAPublicKey) kp.getPublic();\n final RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) kp.getPrivate();\n\n // --- encode and wrap\n byte[] x509EncodedRSAPublicKey = encodeRSAPublicKey(rsaPublicKey);\n final byte[] saltedAndEncryptedPrivate = wrapRSAPrivateKey(\n passphrase, rsaPrivateKey);\n\n // --- decode and unwrap\n final RSAPublicKey retrievedRSAPublicKey = decodeRSAPublicKey(x509EncodedRSAPublicKey);\n final RSAPrivateKey retrievedRSAPrivateKey = unwrapRSAPrivateKey(passphrase,\n saltedAndEncryptedPrivate);\n\n // --- check result\n System.out.println(retrievedRSAPublicKey);\n System.out.println(retrievedRSAPrivateKey);\n }",
"public static void main(String[] args) {\n\t\tAerospikeClient client = new AerospikeClient(\"127.0.0.1\", 3000); //Update IP Address \n\n\t //Set up record key and delete prior copy of the record, if any.\n\n\t\tKey key1 = new Key(\"test\", \"s1\", 1);\n\t\tWritePolicy wPolicy = new WritePolicy();\n\t\twPolicy.recordExistsAction = RecordExistsAction.UPDATE;\n\t\t\n\t\tclient.delete(wPolicy, key1);\n\n //Step 1: Insert a record with a map data type\n Map<Value, Value> m1 = new HashMap<Value, Value>();\n m1.put(Value.get(\"l1k1\"), Value.get(11));\n m1.put(Value.get(\"l1k2\"), Value.get(12));\n m1.put(Value.get(\"l1k3\"), Value.get(13));\n\n MapPolicy mPolicy = new MapPolicy(MapOrder.KEY_ORDERED, MapWriteFlags.DEFAULT); \n\t\tclient.operate(wPolicy, key1, MapOperation.putItems(mPolicy, \"myMap\", m1));\n\t \t\n\n\n System.out.println(\"\\nRecord inserted:\"); \n for(int i=0; i<3;i++){\n System.out.println(\"\\nKey1,KEY_ORDERED, getByIndex(\"+i+\") = \"+ client.operate(null, key1, \n MapOperation.getByIndex(\"myMap\", i, MapReturnType.VALUE)));\n }\n\n //Step 2: Insert nested map at l1k1:11 in key1\n \n Map<Value, Value> m2 = new HashMap<Value, Value>();\n m2.put(Value.get(\"l2k1\"), Value.get(0));\n\t\tclient.operate(wPolicy, key1, \n MapOperation.put(mPolicy, \"myMap\", Value.get(\"l1k1\"), Value.get(m2))\n );\n\n // Step 3: Reassign m2 \n m2.put(Value.get(\"l2k1\"), Value.get(21));\n m2.put(Value.get(\"l2k2\"), Value.get(22));\n m2.put(Value.get(\"l2k3\"), Value.get(23));\n\n\t\tclient.operate(wPolicy, key1, \n MapOperation.putItems(mPolicy, \"myMap\", m2, CTX.mapKey(Value.get(\"l1k1\")) )\n );\n\n //Step 4: Add another nesting level\n Map<Value, Value> m3 = new HashMap<Value, Value>();\n m3.put(Value.get(\"l3k1\"), Value.get(0));\n\t\tclient.operate(wPolicy, key1, \n MapOperation.put(mPolicy, \"myMap\", Value.get(\"l2k1\"), Value.get(m3), CTX.mapKey(Value.get(\"l1k1\")) )\n );\n\n //Step 5: Edit second nesting level entry\n\n // Reassign m3 \n m3.put(Value.get(\"l3k1\"), Value.get(31));\n m3.put(Value.get(\"l3k2\"), Value.get(32));\n m3.put(Value.get(\"l3k3\"), Value.get(33));\n\t\tclient.operate(wPolicy, key1, \n MapOperation.putItems(\n mPolicy, \"myMap\", m3, \n CTX.mapKey(Value.get(\"l1k1\")), \n CTX.mapKey(Value.get(\"l2k1\")) \n )\n );\n\n //Step 6: Edit 2nd level nested value l3k3:33 to l3k3:99\n \n\t\tclient.operate(wPolicy, key1, \n MapOperation.put(\n mPolicy, \"myMap\", Value.get(\"l3k3\"), Value.get(99),\n CTX.mapKey(Value.get(\"l1k1\")), \n CTX.mapKey(Value.get(\"l2k1\")) \n )\n );\n \n //Step 7: Edit 2nd level nested value l3k3:99 to an empty list type\n //Note: This list type is inserted with defautl list policies (UNORDERED)\n\n List<Value> l1 = new ArrayList<Value>(); \n\n\t\tclient.operate(wPolicy, key1, \n MapOperation.put(\n mPolicy, \"myMap\", Value.get(\"l3k3\"), Value.get(l1),\n CTX.mapKey(Value.get(\"l1k1\")), \n CTX.mapKey(Value.get(\"l2k1\")) \n )\n );\n\n //Step 8: Append items directly to nested list at l3k3\n \n\t\tl1.add(Value.get(0)); \n\t\tl1.add(Value.get(4)); \n\t\tl1.add(Value.get(1)); \n\t\tl1.add(Value.get(4)); \n\n ListPolicy lPolicy = new ListPolicy(ListOrder.ORDERED, \n ListWriteFlags.ADD_UNIQUE|ListWriteFlags.NO_FAIL|ListWriteFlags.PARTIAL);\n\t\tclient.operate(wPolicy, key1,\n //We need to explicitly change the order from UNORDERED to ORDERED \n ListOperation.setOrder(\"myMap\", ListOrder.ORDERED,\n CTX.mapKey(Value.get(\"l1k1\")), \n CTX.mapKey(Value.get(\"l2k1\")), \n CTX.mapKey(Value.get(\"l3k3\")) \n ),\n ListOperation.appendItems(\n lPolicy, \"myMap\", l1,\n CTX.mapKey(Value.get(\"l1k1\")), \n CTX.mapKey(Value.get(\"l2k1\")), \n CTX.mapKey(Value.get(\"l3k3\")) \n )\n );\n\n //Step 9: Finally, lets do a read of highest value in the list\n\t\tRecord r = client.operate(wPolicy, key1,\n ListOperation.getByRank(\n \"myMap\", -1, ListReturnType.VALUE,\n CTX.mapKey(Value.get(\"l1k1\")), \n CTX.mapKey(Value.get(\"l2k1\")), \n CTX.mapKey(Value.get(\"l3k3\")) \n )\n );\n System.out.println(\"Max list item value = \"+ r.getInt(\"myMap\"));\n/*\n*/\n client.close();\n\t}",
"public void display() {\n\tString tm = \"{ \";\n\tIterator it = entrySet().iterator();\n\twhile(it.hasNext()) {\n\t\ttm += it.next() + \" ,\";\n\t}\n\ttm = tm.substring(0, tm.length() - 2) + \" }\";\n\tSystem.out.println(tm);\n }",
"private void m36905a(StringBuilder parameters, String key, String value) {\n parameters.append(key);\n parameters.append(\" : \");\n parameters.append(value);\n parameters.append(\"\\n\");\n }",
"@Test\n public void fieldMergeRec() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n builder.write(\"Dear \");\n FieldMergeField fieldMergeField = (FieldMergeField) builder.insertField(FieldType.FIELD_MERGE_FIELD, true);\n fieldMergeField.setFieldName(\"Name\");\n builder.writeln(\",\");\n\n // A MERGEREC field will print the row number of the data being merged in every merge output document.\n builder.write(\"\\nRow number of record in data source: \");\n FieldMergeRec fieldMergeRec = (FieldMergeRec) builder.insertField(FieldType.FIELD_MERGE_REC, true);\n\n Assert.assertEquals(fieldMergeRec.getFieldCode(), \" MERGEREC \");\n\n // A MERGESEQ field will count the number of successful merges and print the current value on each respective page.\n // If a mail merge skips no rows and invokes no SKIP/SKIPIF/NEXT/NEXTIF fields, then all merges are successful.\n // The MERGESEQ and MERGEREC fields will display the same results of their mail merge was successful.\n builder.write(\"\\nSuccessful merge number: \");\n FieldMergeSeq fieldMergeSeq = (FieldMergeSeq) builder.insertField(FieldType.FIELD_MERGE_SEQ, true);\n\n Assert.assertEquals(fieldMergeSeq.getFieldCode(), \" MERGESEQ \");\n\n // Insert a SKIPIF field, which will skip a merge if the name is \"John Doe\".\n FieldSkipIf fieldSkipIf = (FieldSkipIf) builder.insertField(FieldType.FIELD_SKIP_IF, true);\n builder.moveTo(fieldSkipIf.getSeparator());\n fieldMergeField = (FieldMergeField) builder.insertField(FieldType.FIELD_MERGE_FIELD, true);\n fieldMergeField.setFieldName(\"Name\");\n fieldSkipIf.setLeftExpression(\"=\");\n fieldSkipIf.setRightExpression(\"John Doe\");\n\n // Create a data source with 3 rows, one of them having \"John Doe\" as a value for the \"Name\" column.\n // Since a SKIPIF field will be triggered once by that value, the output of our mail merge will have 2 pages instead of 3.\n // On page 1, the MERGESEQ and MERGEREC fields will both display \"1\".\n // On page 2, the MERGEREC field will display \"3\" and the MERGESEQ field will display \"2\".\n DataTable table = new DataTable(\"Employees\");\n table.getColumns().add(\"Name\");\n table.getRows().add(new String[]{\"Jane Doe\"});\n table.getRows().add(new String[]{\"John Doe\"});\n table.getRows().add(new String[]{\"Joe Bloggs\"});\n\n doc.getMailMerge().execute(table);\n doc.save(getArtifactsDir() + \"Field.MERGEREC.MERGESEQ.docx\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"Field.MERGEREC.MERGESEQ.docx\");\n\n Assert.assertEquals(0, doc.getRange().getFields().getCount());\n\n Assert.assertEquals(\"Dear Jane Doe,\\r\" +\n \"\\r\" +\n \"Row number of record in data source: 1\\r\" +\n \"Successful merge number: 1\\fDear Joe Bloggs,\\r\" +\n \"\\r\" +\n \"Row number of record in data source: 3\\r\" +\n \"Successful merge number: 2\", doc.getText().trim());\n }",
"public static void main(String[] args) {\n\n\t\tString message = \"\";\n\t\tbyte[] messageBytes;\n\t\tbyte[] tempPub = null;\n\t\tString sPub = null;\n\t\tbyte[] ciphertextBytes = null;\n\t\tbyte[] textBytes = null;\n\n\t\ttry {\n\n\t\t\t// The source of randomness\n\t\t\tSecureRandom secureRandom = new SecureRandom();\n\n\t\t\t// Obtain a RSA Cipher Object\n\t\t\tCipher cipher = Cipher.getInstance(\"RSA/ECB/PKCS1Padding\");\n\n\t\t\t// Loading certificate file \n\t\t\tString certFile = ResourceReader.readFileToString(\"classpath:softsolution.txt\").trim();\n\t\t\tInputStream inStream = new ByteArrayInputStream(certFile.getBytes());\n\t\t\tCertificateFactory cf = CertificateFactory.getInstance(\"X.509\");\n\t\t\tX509Certificate cert = (X509Certificate) cf.generateCertificate(inStream);\n\t\t\tinStream.close();\n\n\t\t\t// Read the public key from certificate file\n\t\t\tRSAPublicKey pubkey = (RSAPublicKey) cert.getPublicKey();\n\t\t\ttempPub = pubkey.getEncoded();\n\t\t\tsPub = new String(tempPub);\n\t\t\tlog.info(\"Public key from certificate file:\\n\" + hex(sPub) + \"\\n\");\n\t\t\tlog.info(\"Public Key Algorithm = \" + cert.getPublicKey().getAlgorithm() + \"\\n\");\n\n\t\t\t// Set plain message\n\t\t\tmessage = \"{\\r\\n\" +\n\t\t\t\t\t\"\\\"merchantId\\\":\\\"109618\\\",\\r\\n\" +\n\t\t\t\t\t\"\\\"subMerchantId\\\":\\\"12234\\\",\\r\\n\" +\n\t\t\t\t\t\"\\\"terminalId\\\":\\\"5411\\\",\\r\\n\" +\n\t\t\t\t\t\"\\\"merchantName\\\":\\\"test stores\\\",\\r\\n\" +\n\t\t\t\t\t\"\\\"subMerchantName\\\":\\\"sub_ test stores\\\",\\r\\n\" +\n\t\t\t\t\t\"\\\"payerVa\\\":\\\"testother2@icici\\\",\\r\\n\" +\n\t\t\t\t\t\"\\\"amount\\\":\\\"5.00\\\",\\r\\n\" +\n\t\t\t\t\t\"\\\"note\\\":\\\"collect-pay-request\\\",\\r\\n\" +\n\t\t\t\t\t\"\\\"collectByDate\\\":\\\"10/04/2018 11:01 AM\\\",\\r\\n\" +\n\t\t\t\t\t\"\\\"merchantTranId\\\":\\\"6124114576893\\\",\\r\\n\" +\n\t\t\t\t\t\"\\\"billNumber\\\":\\\"SDF234278\\\"\\r\\n\" +\n\t\t\t\t\t\"}\\r\\n\" +\n\t\t\t\t\t\"\";\n\t\t\tmessageBytes = message.getBytes();\n\t\t\tlog.info(\"Plain message:\\n\" + message + \"\\n\");\n\n\t\t\t// Initialize the cipher for encryption\n\t\t\tcipher.init(Cipher.ENCRYPT_MODE, pubkey, secureRandom);\n\n\t\t\t// Encrypt the message\n\t\t\tciphertextBytes = cipher.doFinal(messageBytes);\n\t\t\tlog.info(\"Message encrypted with certificate file public key:\\n\" + new String(org.bouncycastle.util.encoders.Base64.encode(ciphertextBytes)) + \"\\n\");\n\t\t\tString msg=new String(org.bouncycastle.util.encoders.Base64.encode(ciphertextBytes));\n\t\t\tlog.info(\"Decoded Message encrypted with certificate file public key:\\n\" +msg + \"\\n\");\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// Loading private key file \n\t\t\tString keyFile = ResourceReader.readFileToString(\"classpath:softsolution.pem\").trim();\n\t\t\tinStream = new ByteArrayInputStream(keyFile.getBytes());\n\t\t\tbyte[] encKey = new byte[inStream.available()];\n\t\t\tinStream.read(encKey);\n\t\t\tinStream.close();\n\t\t\tString pvtKey = new String(encKey);\n\n\n\t\t\tpvtKey = pvtKey.replaceAll(\"\\\\n\", \"\").replace(\"-----BEGIN PRIVATE KEY-----\", \"\").replace(\"-----END PRIVATE KEY-----\", \"\");\n\n\n\t\t\tlog.info(pvtKey);\n\t\t\t// Read the private key from file\n\t\t\tlog.info(\"RSA PrivateKeyInfo: \" + encKey.length + \" bytes\\n\");\n\t\t\t// PKCS8EncodedKeySpec privKeySpec=new PKCS8EncodedKeySpec(Base64.getDecoder().decode(encKey));//new PKCS8EncodedKeySpec(encKey);\n\t\t\tPKCS8EncodedKeySpec privKeySpec = new PKCS8EncodedKeySpec(Base64.getDecoder().decode(pvtKey));\n\t\t\tKeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n\t\t\tlog.info(\"KeyFactory Object Info:\");\n\t\t\tlog.info(\"Algorithm = \" + keyFactory.getAlgorithm());\n\t\t\tlog.info(\"Provider = \" + keyFactory.getProvider());\n\t\t\tPrivateKey priv = (RSAPrivateKey) keyFactory.generatePrivate(privKeySpec);\n\t\t\tlog.info(\"Loaded \" + priv.getAlgorithm() + \" \" + priv.getFormat() + \" private key.\");\n\n\n\t\t\t// Initialize the cipher for decryption\n\t\t\tcipher.init(Cipher.DECRYPT_MODE, priv, secureRandom);\n\n\n\n\t\t\t// Decrypt the message\n\t\t\t//\ttextBytes = cipher.doFinal(ciphertextBytes);\n\t\t\tbyte[] cipherByte = org.bouncycastle.util.encoders.Base64.decode(msg.getBytes(\"UTF-8\"));\n\t\t\tlog.info(cipherByte);\n\n\t\t\tString op = new String(cipher.doFinal(cipherByte));\n\t\t\t// String s = new String(textBytes);\n\t\t\tlog.info(\"Message decrypted with file private key:\\n\");\n\t\t\tlog.info(op);\n\n\t\t} catch (IOException e) {\n\t\t\tlog.info(\"IOException:\" + e);\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\tlog.info(\"Exception:\" + e);\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public abstract void merge (org.apache.spark.sql.expressions.MutableAggregationBuffer buffer1, org.apache.spark.sql.Row buffer2) ;",
"@Test\n public void mergeField() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n // Create a data table to be used as a mail merge data source.\n DataTable table = new DataTable(\"Employees\");\n table.getColumns().add(\"Courtesy Title\");\n table.getColumns().add(\"First Name\");\n table.getColumns().add(\"Last Name\");\n table.getRows().add(\"Mr.\", \"John\", \"Doe\");\n table.getRows().add(\"Mrs.\", \"Jane\", \"Cardholder\");\n\n // Insert a MERGEFIELD with a FieldName property set to the name of a column in the data source.\n FieldMergeField fieldMergeField = (FieldMergeField) builder.insertField(FieldType.FIELD_MERGE_FIELD, true);\n fieldMergeField.setFieldName(\"Courtesy Title\");\n fieldMergeField.isMapped(true);\n fieldMergeField.isVerticalFormatting(false);\n\n // We can apply text before and after the value that this field accepts when the merge takes place.\n fieldMergeField.setTextBefore(\"Dear \");\n fieldMergeField.setTextAfter(\" \");\n\n Assert.assertEquals(\" MERGEFIELD \\\"Courtesy Title\\\" \\\\m \\\\b \\\"Dear \\\" \\\\f \\\" \\\"\", fieldMergeField.getFieldCode());\n\n // Insert another MERGEFIELD for a different column in the data source.\n fieldMergeField = (FieldMergeField) builder.insertField(FieldType.FIELD_MERGE_FIELD, true);\n fieldMergeField.setFieldName(\"Last Name\");\n fieldMergeField.setTextAfter(\":\");\n\n doc.updateFields();\n doc.getMailMerge().execute(table);\n\n Assert.assertEquals(\"Dear Mr. Doe:\\fDear Mrs. Cardholder:\", doc.getText().trim());\n //ExEnd\n\n Assert.assertTrue(doc.getRange().getFields().getCount() == 0);\n }",
"public void printContribuintes (){\n for(String s : contribuintes.keySet()){\n System.out.printf(\"%s\",getContribuinte(s).toString());\n }\n }",
"void put(){\n System.out.print(name + \" from \" + address + \". \");\n }",
"public void merge(Tuple tup) {\n\t\t\n\t}",
"public String toString() {\n\treturn \"Key: \" + key.toString() + \"\\tData: \" + data;\n }",
"@Test\n\tpublic void addOtherKeys() {\n\t\tRsaKeyStore ks = new RsaKeyStore();\n\t\tKeyPair kp = RsaHelper.generateKeyPair();\n\t\tassertTrue(\"should have added key\", ks.addOtherKey(\"firstOther\", kp.getPublic()));\n\t\tKeyPair kpp = RsaHelper.generateKeyPair();\n\t\tassertTrue(\"should have added key\", ks.addOtherKey(\"secondOther\", kpp.getPublic()));\n\t}",
"@Override\n\tpublic void merge(MutableAggregationBuffer buffer1, Row buffer2) {\n\t\tif (buffer1.getString(0) == null) {\n\t\t\tbuffer1.update(0, buffer2.getString(0));\n\t\t} else\n\t\t\tbuffer1.update(0, buffer1.getString(0) + \",\" + buffer2.getString(0));\n\n\t\tbuffer1.update(1, buffer1.getLong(1) + buffer2.getLong(1));\n\t\tbuffer1.update(2, buffer1.getLong(2) + buffer2.getLong(2));\n\n\t}",
"static void generatePrimary(Table table, Key key, PrintWriter outData, String mcomma)\r\n {\r\n String comma = \" ( \";\r\n String keyname = key.name.toUpperCase();\r\n if (keyname.indexOf(table.name.toUpperCase()) == -1)\r\n keyname = table.name.toUpperCase()+\"_\"+keyname;\r\n outData.println(mcomma+\"CONSTRAINT \"+keyname+\" PRIMARY KEY\");\r\n for (int i=0; i < key.fields.size(); i++, comma = \" , \")\r\n {\r\n String name = (String) key.fields.elementAt(i);\r\n outData.println(comma+name);\r\n }\r\n outData.println(\" )\");\r\n for (int i=0; i < key.options.size(); i++)\r\n {\r\n String option = (String) key.options.elementAt(i);\r\n outData.println(\" \"+option);\r\n }\r\n }",
"public static void main(String[] args){\n RedBlackTree RBT1= new RedBlackTree<Integer, String>();\n RBT1.insert(7, \"Violet\");\n RBT1.insert(6, \"May\");\n RBT1.insert(5, \"Alexander\");\n RBT1.insert(4, \"Anya\");\n RBT1.insert(3, \"Maven\");\n RBT1.insert(2, \"Susan\");\n RBT1.insert(1, \"Tom\");\n RBT1.print();\n System.out.println(RBT1.getHeight()); //height = 2\n\n //duplicate keys\n RedBlackTree RBT2= new RedBlackTree<Integer, String>();\n RBT2.insert(7, \"Violet\");\n RBT2.insert(7, \"May\");\n RBT2.insert(7, \"Alexander\");\n RBT2.insert(6, \"Anya\");\n RBT2.insert(6, \"Maven\");\n RBT2.insert(6, \"Susan\");\n RBT2.insert(1, \"Tom\");\n RBT2.print();\n System.out.println(RBT2.getHeight()); //height = 1\n }",
"@Override\n public String toString() {\n return \"MultiKey\" + Arrays.toString(keys);\n }",
"@Test\n @Ignore(\"Already ran, organisations merged\")\n public void mergeOrganisations() {\n List<List<Long>> idsList = new ArrayList<>();\n List<Long> mergingIds = new ArrayList<>(); //<mergingId, survivingId>\n List<Long> survivingIds = new ArrayList<>(); //<mergingId, survivingId>\n\n //ECS\n mergingIds.add(20066194L);\n survivingIds.add(17913930L);\n\n //Waveguide -->2\n mergingIds.add(19440239L);\n survivingIds.add(20067398L);\n\n //Goldman Sachs -->3\n mergingIds.add(1807900L);\n survivingIds.add(710854L);\n\n //Elekta -->5\n mergingIds.add(16374120L);\n survivingIds.add(9050265L);\n //Bank of England -->12\n mergingIds.add(1878532L);\n survivingIds.add(710744L);\n //Nordea -->14\n mergingIds.add(692179L);\n survivingIds.add(13109201L);\n //HSBC Bank PLC -- 28\n mergingIds.add(15315614L);\n survivingIds.add(710229L);\n\n //Lein applied diagnostics -->16\n mergingIds.add(20066543L);\n survivingIds.add(20015906L);\n\n //Mitsubishi -->17\n mergingIds.add(709719L);\n survivingIds.add(710917L);\n //Travelex -->18\n mergingIds.add(1808837L);\n survivingIds.add(3613025L);\n //zedsen -->19\n mergingIds.add(25361568L);\n survivingIds.add(24436501L);\n //RaymondJames ->20\n mergingIds.add(20019540L);\n survivingIds.add(20311840L);\n //Elektron -->22\n mergingIds.add(19440192L);\n survivingIds.add(12776071L);\n //Glaxo Smith Kline -->23\n mergingIds.add(25881446L);\n survivingIds.add(17430668L);\n //UCL -->24\n mergingIds.add(3604761L);\n survivingIds.add(711204L);\n //Safeguard -->25\n mergingIds.add(710501L);\n survivingIds.add(2721808L);\n //Francis Crick Institute-->26\n mergingIds.add(17488058L);\n survivingIds.add(24075580L);\n //Elekta 2 -->27\n mergingIds.add(20746251L);\n survivingIds.add(9050265L);\n //Scentrics -->29\n mergingIds.add(3648896L);\n survivingIds.add(4819987L);\n //Imperial --> 30\n mergingIds.add(1808803L);\n survivingIds.add(3585109L);\n //M&G -->33\n mergingIds.add(1369007L);\n survivingIds.add(17765068L);\n //World programming Company --> 34\n mergingIds.add(6570392L);\n survivingIds.add(6231419L);\n //British Airways --> 35\n mergingIds.add(710006L);\n survivingIds.add(710401L);\n //Deloitte--> 36\n mergingIds.add(3604552L);\n survivingIds.add(3586027L);\n //Morgan Stanley--> 37\n mergingIds.add(711029L);\n survivingIds.add(709877L);\n\n assertEquals(mergingIds.size(), survivingIds.size());\n\n for (int i = 0; i < mergingIds.size(); i++) {\n String uri = baseURI + \"/organisation/\" + mergingIds.get(i) + \"/mergeInto/\" + survivingIds.get(i);\n System.out.print(uri);\n String res = getFromVertec(uri, String.class).getBody();\n System.out.println(\"============= \" + res + \" ===================\");\n }\n\n }",
"public static void launch() {\r\n\r\n\t\ttry {\r\n\t\t\tcomputeKeyPairs();\r\n\t\t\tshowKeysInBase64(keyPairAlice);\r\n\r\n\t\t\tfinal byte[] encodedPublicKeyAlice = keyPairAlice.getPublic().getEncoded();\r\n\t\t\tfinal byte[] digestBytesBob = receiveAlicePublicKeyAndSendBobDigest(encodedPublicKeyAlice);\r\n\r\n\t\t\tfinal byte[] encodedPublicKeyBob = keyPairBob.getPublic().getEncoded();\r\n\t\t\tfinal byte[] digestBytesAlice = receiveBobPublicKeyAndSendAliceDigest(encodedPublicKeyBob);\r\n\r\n\t\t\tSystem.out.printf(\"Exchanged digests are equal[%b]%n\",\r\n\t\t\t\t\tMessageDigest.isEqual(digestBytesBob, digestBytesAlice));\r\n\t\t\tif (VERBOSE) {\r\n\t\t\t\tSystem.out.printf(\"Alice encoded private key%n%s%n\",\r\n\t\t\t\t\t\tUtils.bytesToHexAndUtf(keyPairAlice.getPrivate().getEncoded()));\r\n\t\t\t\tSystem.out.printf(\"Alice encoded public key%n%s%n\",\r\n\t\t\t\t\t\tUtils.bytesToHexAndUtf(keyPairAlice.getPublic().getEncoded()));\r\n\t\t\t\tSystem.out.printf(\"Alice digest bytes%n%s%n\", Utils.bytesToHexAndUtf(digestBytesAlice));\r\n\t\t\t}\r\n\t\t} catch (InvalidKeyException | NoSuchAlgorithmException | InvalidAlgorithmParameterException\r\n\t\t\t\t| IllegalStateException | InvalidKeySpecException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\tSystem.out.println(\"- \".repeat(50));\r\n\t}",
"@Override\r\n\tpublic String toString() {\n\t\treturn this.key;\r\n\t}",
"public static void main(String[] args) {\n\r\n\t\tLinkedListNode n1 = new LinkedListNode(3);\r\n\t\tLinkedListNode n2 = new LinkedListNode(5);\r\n\t\tLinkedListNode n3 = new LinkedListNode(7);\r\n\t\tLinkedListNode n4 = new LinkedListNode(9);\r\n\t\tLinkedListNode n5 = new LinkedListNode(11);\r\n\t\tn1.next=n2;\r\n\t\tn2.next=n3;\r\n\t\tn3.next=n4;\r\n\t\tn4.next=n5;\r\n\t\t\r\n\t\tLinkedListNode n6 = new LinkedListNode(1);\r\n\t\tLinkedListNode n7 = new LinkedListNode(2);\r\n\t\tLinkedListNode n8 = new LinkedListNode(4);\r\n\t\tLinkedListNode n9 = new LinkedListNode(6);\r\n\t\tLinkedListNode n10 = new LinkedListNode(8);\r\n\t\tn6.next=n7;\r\n\t\tn7.next=n8;\r\n\t\tn8.next=n9;\r\n\t\tn9.next=n10;\r\n\t\tif(n1.data < n6.data){\r\n\t\tn1 = merge(n1,n6);\r\n\t\tprint(n1);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tn6 = merge(n6,n1);\r\n\t\t\tprint(n6);\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"Enetr first linkedlist: \");\n\t\tNode<Integer> list1 = takeInput();\n\t\tSystem.out.println(\"Enter second linkedlist: \");\n\t\tNode<Integer> list2 = takeInput();\n\t\tlist1 = merge2Sorted(list1, list2);\n\t\tprintList(list1);\n\n\t}",
"String process_key () throws BaseException;",
"@Override\n public String getUpsert(String tableName, String[] columns, String[] keyColumns) {\n List<String> sql = new ArrayList<String>();\n sql.add(\"MERGE INTO \" + tableName + \"\");\n sql.add(\" (\" + StringUtils.join(\", \", columns) + \")\");\n sql.add(\"KEY\");\n sql.add(\" (\" + StringUtils.join(\", \", keyColumns) + \")\");\n sql.add(\"VALUES\");\n sql.add(\" (\" + StringUtils.repeat(\"?\", \", \", columns.length) + \")\");\n\n return StringUtils.join(\"\\n\", sql);\n }",
"public String toString() { \n StringBuffer sb = new StringBuffer(); \n sb.append(\"[\"); \n sb.append(\"]:\"); \n sb.append(prlKey);\n sb.append(\"|\");\n sb.append(prlPinKey);\n // attribute 'prlFirstName' not usable (type = String Long Text)\n sb.append(\"|\");\n sb.append(rcdOrderBy);\n sb.append(\"|\");\n sb.append(relationtype);\n sb.append(\"|\");\n sb.append(relationship);\n sb.append(\"|\");\n sb.append(activeStatus);\n return sb.toString(); \n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"Output looks like: \");\r\n\t\tint i,j;\r\n\t\tint a[][]= {{1,3,4},{2,4,6},{3,4,5}};\r\n\t\tint b[][]= {{1,3,4},{2,4,6},{3,4,5}};\r\n\t\tfor(i=0;i<3;i++) {\r\n\t\t\tfor(j=0;j<3;j++)\r\n\t\t\t{\r\n\t\t\t\t System.out.print(a[i][j] + b[i][j]);\r\n\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\tSystem.out.println(\"ALL THE BEST!!!\");\r\n\t}",
"public static void main(String[] args) \r\n\t\r\n\t{\n\t\t\r\n\t\tHashMap<String,String> map=new HashMap<String,String>();\r\n\t\tmap.put(\"UserName\", \"Ajay\");\r\n\t\tmap.put(\"Password\", \"12345\");\r\n\t\t//map.put(\"UserName\", \"Jay\");\t\t\t\t// Key's same, It overwrites the previous value\r\n\t\t\r\n\t\tmap.put(\"Username\", \"Ajay\");\t\t\t\t// Key's different,so it's allowed\r\n\t\t\r\n\t\tString uName =map.get(\"UserName\");\r\n\t\tSystem.out.println(uName);\r\n\t\t\r\n\t\tString uName1 =map.get(\"Username\");\r\n\t\tSystem.out.println(uName1);\r\n\t\t\r\n\r\n\t}",
"public void print(){\n\t\tfor (int i=0; i<_size; i++){\n\t\t\tSystem.out.print(_a[i].getKey()+\"; \");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"void keys() {\n for (int i = 0; i < size; i++) {\n System.out.println(keys[i] + \" \" + values[i]);\n }\n }",
"public static void log() {\n String branch = commitPointers.readHeadCommit()[0];\n String currName = commitPointers.readHeadCommit()[1];\n File cFile = Utils.join(Commit.COMMIT_FOLDER, currName + \".txt\");\n Commit curr = Utils.readObject(cFile, Commit.class);\n\n while (currName != null) {\n System.out.println(\"===\");\n System.out.println(\"commit \" + curr.commitID);\n if (curr.parentID.size() == 2) {\n System.out.println(\"Merge: \" + curr.parentID.get(0).substring(0, 7) + \" \" + curr.parentID.get(1).substring(0, 7));\n }\n System.out.println(\"Date: \" + curr.timeStamp.format(myFormatObj) + \" -0800\");\n System.out.println(curr.message);\n System.out.println();\n\n currName = curr.parentID.get(0);\n\n if (currName != null) {\n File newcFile = Utils.join(Commit.COMMIT_FOLDER, currName + \".txt\");\n curr = Utils.readObject(newcFile, Commit.class);\n }\n }\n }",
"public static void main(String[] args) {\n\t\tListNode node1 = new ListNode(5);\n node1.next = new ListNode(6);\n node1.next.next = new ListNode(7);\n\n ListNode node2 = new ListNode(5);\n node2.next = new ListNode(6);\n node2.next.next = new ListNode(7);\n\n ListNode result = new MergeTwoSortedLists().mergeTwoLists(node1, node2);\n\t}",
"@Test\n @Ignore(\"Not necessary anymore\")\n public void doWeNeedToRepointParentOrganisationsAfterMerge() {\n String line;\n Long mergingID;\n Long survivingID;\n List<Long> mergedIds = new ArrayList<>();\n int counter = 0;\n try {\n\n File file = new File(\"OrganisationsThatHaveBeenMergedOnVertec.txt\");\n\n FileReader reader = new FileReader(file.getAbsolutePath());\n BufferedReader breader = new BufferedReader(reader);\n while ((line = breader.readLine()) != null) {\n String[] parts = line.split(\",\");\n mergingID = Long.parseLong(parts[0]);\n survivingID = Long.parseLong(parts[1]);\n mergedIds.add(mergingID);\n\n }\n for (Long id : mergedIds) {\n String uri = baseURI + \"/org/\" + id;\n JSONOrganisation org = getFromVertec(uri, JSONOrganisation.class).getBody();\n if (!org.getChildOrganisationList().isEmpty() || org.getParentOrganisationId() != null) {\n System.out.println(\"parent: \" + org.getParentOrganisationId());\n System.out.println(\"child: \" + org.getChildOrganisationList());\n System.out.println(\"Org: \" + org.getName() + \"(v_id: \" + org.getObjid() + \")\");\n\n counter++;\n }\n }\n System.out.println(\"Total nr of merged away orgs with relatives: \" + counter);\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }",
"private static void FinalIndVsPAk() {\n\t\tSystem.out.println(\"Pak Lost The Match\");\n\t\t\n\t}",
"@Test\r\n public void testMerge() throws Exception {\r\n// List<ISpectrum> spectra = ClusteringTestUtilities.readConsensusSpectralItems();\r\n//\r\n// List<ICluster> list = ClusterUtilities.asClusters(spectra);\r\n// IClusteringEngine engine = new ClusteringEngineFactory().getClusteringEngine();\r\n// for (ICluster sc : list) {\r\n// engine.addClusters(sc);\r\n// }\r\n// for (int i = 0; i < Defaults.getNumberReclusteringPasses(); i++) {\r\n// if (!engine.processClusters())\r\n// break;\r\n// }\r\n// // we have solved for these\r\n// List<ICluster> found = (List<ICluster>) engine.getClusters();\r\n//\r\n//\r\n// final ISimilarityChecker similarityChecker = new FrankEtAlDotProduct(Defaults.getFragmentIonTolerance(), Defaults.getNumberComparedPeaks());\r\n// final List<ICluster> newClusters = ClusterUtilities.mergeClusters(found, similarityChecker, 1);\r\n//\r\n// // because we just did this in the engine we expect little further merging\r\n// Assert.assertEquals(newClusters.size(), found.size());\r\n\r\n\r\n }",
"public static void main(String[] args) {\n KeyStore myStore = null;\n try {\n\n /* Note: could also use a keystore file, which contains the token label or slot no. to use. Load that via\n * \"new FileInputStream(ksFileName)\" instead of ByteArrayInputStream. Save objects to the keystore via a\n * FileOutputStream. */\n\n ByteArrayInputStream is1 = new ByteArrayInputStream((\"slot:\" + slot).getBytes());\n myStore = KeyStore.getInstance(keystoreProvider);\n myStore.load(is1, passwd.toCharArray());\n } catch (KeyStoreException kse) {\n System.out.println(\"Unable to create keystore object\");\n System.exit(-1);\n } catch (NoSuchAlgorithmException nsae) {\n System.out.println(\"Unexpected NoSuchAlgorithmException while loading keystore\");\n System.exit(-1);\n } catch (CertificateException e) {\n System.out.println(\"Unexpected CertificateException while loading keystore\");\n System.exit(-1);\n } catch (IOException e) {\n // this should never happen\n System.out.println(\"Unexpected IOException while loading keystore.\");\n System.exit(-1);\n }\n\n KeyPairGenerator keyGen = null;\n KeyPair keyPair = null;\n try {\n // Generate an ECDSA KeyPair\n /* The KeyPairGenerator class is used to determine the type of KeyPair being generated. For more information\n * concerning the algorithms available in the Luna provider please see the Luna Development Guide. For more\n * information concerning other providers, please read the documentation available for the provider in question. */\n System.out.println(\"Generating ECDSA Keypair\");\n /* The KeyPairGenerator.getInstance method also supports specifying providers as a parameter to the method. Many\n * other methods will allow you to specify the provider as a parameter. Please see the Sun JDK class reference at\n * http://java.sun.org for more information. */\n keyGen = KeyPairGenerator.getInstance(\"ECDSA\", provider);\n /* ECDSA keys need to know what curve to use. If you know the curve ID to use you can specify it directly. In the\n * Luna Provider all supported curves are defined in LunaECCurve */\n ECGenParameterSpec ecSpec = new ECGenParameterSpec(\"c2pnb304w1\");\n keyGen.initialize(ecSpec);\n keyPair = keyGen.generateKeyPair();\n } catch (Exception e) {\n System.out.println(\"Exception during Key Generation - \" + e.getMessage());\n System.exit(1);\n }\n\n // generate a self-signed ECDSA certificate.\n Date notBefore = new Date();\n Date notAfter = new Date(notBefore.getTime() + 1000000000);\n BigInteger serialNum = new BigInteger(\"123456\");\n LunaCertificateX509 cert = null;\n try {\n cert = LunaCertificateX509.SelfSign(keyPair, \"CN=ECDSA Sample Cert\", serialNum, notBefore, notAfter);\n } catch (InvalidKeyException ike) {\n System.out.println(\"Unexpected InvalidKeyException while generating cert.\");\n System.exit(-1);\n } catch (CertificateEncodingException cee) {\n System.out.println(\"Unexpected CertificateEncodingException while generating cert.\");\n System.exit(-1);\n }\n\n byte[] bytes = \"Some Text to Sign as an Example\".getBytes();\n System.out.println(\"PlainText = \" + com.safenetinc.luna.LunaUtils.getHexString(bytes, true));\n\n Signature ecdsaSig = null;\n byte[] signatureBytes = null;\n try {\n // Create a Signature Object and signUsingI2p the encrypted text\n /* Sign/Verify operations like Encrypt/Decrypt operations can be performed in either singlepart or multipart\n * steps. Single part Signing and Verify examples are given in this code. Multipart signatures use the\n * Signature.update() method to load all the bytes and then invoke the Signature.signUsingI2p() method to get the result.\n * For more information please see the class documentation for the java.security.Signature class with respect to\n * the version of the JDK you are using. */\n System.out.println(\"Signing encrypted text\");\n ecdsaSig = Signature.getInstance(\"ECDSA\", provider);\n ecdsaSig = Signature.getInstance(\"SHA256withECDSA\", provider);\n ecdsaSig.initSign(keyPair.getPrivate());\n ecdsaSig.update(bytes);\n signatureBytes = ecdsaSig.sign();\n\n // Verify the signature\n System.out.println(\"Verifying signature(via Signature.verify)\");\n ecdsaSig.initVerify(keyPair.getPublic());\n ecdsaSig.update(bytes);\n boolean verifies = ecdsaSig.verify(signatureBytes);\n if (verifies == true) {\n System.out.println(\"Signature passed verification\");\n } else {\n System.out.println(\"Signature failed verification\");\n }\n\n } catch (Exception e) {\n System.out.println(\"Exception during Signing - \" + e.getMessage());\n System.exit(1);\n }\n\n try {\n // Verify the signature\n System.out.println(\"Verifying signature(via cert)\");\n ecdsaSig.initVerify(cert);\n ecdsaSig.update(bytes);\n boolean verifies = ecdsaSig.verify(signatureBytes);\n if (verifies == true) {\n System.out.println(\"Signature passed verification\");\n } else {\n System.out.println(\"Signature failed verification\");\n }\n } catch (Exception e) {\n System.out.println(\"Exception during Verification - \" + e.getMessage());\n System.exit(1);\n }\n\n// // Logout of the token\n// HSM_Manager.hsmLogout();\n }",
"private void printAssocations(List<AssetAssociationDef> associations) {\n\n }",
"public static void userDisplay() {\n\n String nameList = \" | \";\n for (String username : students.keySet()) {\n nameList += \" \" + username + \" | \";\n\n\n }\n System.out.println(nameList);\n// System.out.println(students.get(nameList).getGrades());\n\n }",
"public static String merge(String parent1, String parent2){\n\n StringBuilder sb = new StringBuilder();\n\n try {\n String s1 = complete(parent1);\n String s2 = complete(parent2);\n sb.append(s1,0,16);\n sb.append(s2,16,32);\n } catch (IntegerTooBigException e) {\n e.printStackTrace();\n }\n return sb.toString();\n }",
"public static void printPrimaryKeyDetails(ResultSet pk) throws SQLException {\n/*\n ResultSetMetaData rs_meta = pk.getMetaData();\n\n for (int x = 1; x <= rs_meta.getColumnCount(); x++) {\n writeMessage(\"pk column attr: \" + rs_meta.getColumnName(x));\n }\n*/\n writeMessage(\"getPrimaryKeys(): TABLE_CAT=\" + pk.getString(\"TABLE_CAT\"));\n writeMessage(\"getPrimaryKeys(): TABLE_SCHEM=\" + pk.getString(\"TABLE_SCHEM\"));\n writeMessage(\"getPrimaryKeys(): TABLE_NAME=\" + pk.getString(\"TABLE_NAME\"));\n writeMessage(\"getPrimaryKeys(): COLUMN_NAME=\" + pk.getString(\"COLUMN_NAME\"));\n writeMessage(\"getPrimaryKeys(): KEY_SEQ=\" + pk.getString(\"KEY_SEQ\"));\n writeMessage(\"getPrimaryKeys(): PK_NAME=\" + pk.getString(\"PK_NAME\"));\n }",
"public void printResult(){\n StringBuilder sb = new StringBuilder(20);\n sb.append(left_value)\n .append(space)\n .append(symbol)\n .append(space)\n .append(right_value)\n .append(space)\n .append('=')\n .append(space)\n .append(result);\n System.out.println(sb);\n }",
"@PostMapping(\"/createKeyPair\")\n public String createKeyPair() {\n \n AWSKMS kmsClient = AWSKMSClientBuilder.standard().build();\n \n return \"Private uid: \"+ priuid +\"\\nPublic uid: \" + pubuid +\"\\n\";\n }",
"private static void outputVotes() {\n Iterator<Map.Entry<Character, ArrayList>> it = candidateVotes.entrySet().iterator();\n\n while (it.hasNext()) {\n\n Map.Entry<Character, ArrayList> next = it.next();\n System.out.println(next.getKey() +\"->\"+\n Integer.parseInt(next.getValue().toString().replace(\"[\",\"\").replace(\"]\",\"\")));\n }\n }"
] |
[
"0.53187317",
"0.51352197",
"0.5112631",
"0.5095813",
"0.5090193",
"0.5007821",
"0.49935582",
"0.4921995",
"0.48581073",
"0.48427206",
"0.48095617",
"0.4809383",
"0.47951475",
"0.4793568",
"0.47902992",
"0.47812888",
"0.47450152",
"0.47372484",
"0.47193673",
"0.47110862",
"0.4663454",
"0.46533412",
"0.4644724",
"0.46389505",
"0.46312332",
"0.4628126",
"0.46108112",
"0.46096846",
"0.46092644",
"0.45850107",
"0.45847413",
"0.45843565",
"0.45709077",
"0.45633686",
"0.45534042",
"0.45488375",
"0.45385578",
"0.453317",
"0.45200777",
"0.44946447",
"0.44906437",
"0.4489015",
"0.4485276",
"0.4462377",
"0.44615182",
"0.44599453",
"0.44588897",
"0.4457146",
"0.44539425",
"0.44508985",
"0.4432932",
"0.44277027",
"0.4406082",
"0.4405309",
"0.44040674",
"0.44035962",
"0.4402767",
"0.43955553",
"0.43931797",
"0.43925193",
"0.43877196",
"0.4387361",
"0.43869555",
"0.4381766",
"0.4376437",
"0.4375638",
"0.4368509",
"0.43636015",
"0.4357967",
"0.43466622",
"0.43343723",
"0.4330894",
"0.4325369",
"0.4320329",
"0.43153584",
"0.43111494",
"0.43055385",
"0.43043327",
"0.4299045",
"0.42939445",
"0.42901298",
"0.42861968",
"0.42843443",
"0.42783886",
"0.42694578",
"0.42619866",
"0.42616972",
"0.42614302",
"0.4255377",
"0.42539197",
"0.42525446",
"0.42523003",
"0.42519245",
"0.425152",
"0.42438647",
"0.42436978",
"0.42312983",
"0.42295733",
"0.42279127",
"0.4226487"
] |
0.47697276
|
16
|
Initialize the contents of the frame.
|
public void initialize(Control control) {
frame = new JFrame(control.getPlayer1().getType());
frame.setBounds(100, 100, 450, 300);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//frame.getContentPane().setLayout(null);
frame.setVisible(true);
JLabel lblTheWinnerIs = new JLabel("The winner is: ");
lblTheWinnerIs.setFont(new Font("Tahoma", Font.PLAIN, 24));
if (control.getScore().getCurrentScorePlayer1() >= control.getScore().getScore()) {
winner = control.getPlayer1().getName();
}
else if (control.getScore().getCurrentScorePlayer2() >= control.getScore().getScore()){
winner = control.getPlayer2().getName();
}
JLabel lblNewLabel = new JLabel(winner);
lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 24));
JButton btnBackToMenu = new JButton("Back to Menu");
btnBackToMenu.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
frame.setVisible(false);
control.showMenu();
}
});
GroupLayout groupLayout = new GroupLayout(frame.getContentPane());
groupLayout.setHorizontalGroup(
groupLayout.createParallelGroup(Alignment.LEADING)
.addGroup(groupLayout.createSequentialGroup()
.addGap(23)
.addComponent(lblTheWinnerIs)
.addGap(56)
.addComponent(lblNewLabel)
.addContainerGap(194, Short.MAX_VALUE))
.addGroup(Alignment.TRAILING, groupLayout.createSequentialGroup()
.addContainerGap(281, Short.MAX_VALUE)
.addComponent(btnBackToMenu)
.addGap(42))
);
groupLayout.setVerticalGroup(
groupLayout.createParallelGroup(Alignment.LEADING)
.addGroup(groupLayout.createSequentialGroup()
.addGap(63)
.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
.addComponent(lblTheWinnerIs)
.addComponent(lblNewLabel))
.addGap(92)
.addComponent(btnBackToMenu)
.addContainerGap(44, Short.MAX_VALUE))
);
frame.getContentPane().setLayout(groupLayout);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public BreukFrame() {\n super();\n initialize();\n }",
"public MainFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}",
"private void initialize() {\n\t\tthis.setSize(211, 449);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setTitle(\"JFrame\");\n\t}",
"public SiscobanFrame() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\t}",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(0, 0, 1100, 800);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tsetUIComponents();\n\t\tsetControllers();\n\n\t}",
"private void initialize() {\r\n\t\tthis.setSize(530, 329);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t}",
"private void initialize() {\r\n\t\tthis.setSize(300, 200);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t}",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\taddSampleData();\n\t\tsetDefaultSettings();\n\t\topenHomePage();\n\t\tframe.setVisible(true);\n\t}",
"private void initialize() {\n\t\tframe = new JFrame(\"Media Inventory\");\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(0, 0, 1000, 700);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tframeContent = new JPanel();\n\t\tframe.getContentPane().add(frameContent);\n\t\tframeContent.setBounds(10, 10, 700, 640);\n\t\tframeContent.setLayout(null);\n\t\t\n\t\tinfoPane = new JPanel();\n\t\tframe.getContentPane().add(infoPane);\n\t\tinfoPane.setBounds(710, 10, 300, 640);\n\t\tinfoPane.setLayout(null);\n\t}",
"private void initialize() {\n\t\tframe = new JFrame(\"BirdSong\");\n\t\tframe.pack();\n\t\tframe.setVisible(true);\n\t\tframe.setBounds(100, 100, 400, 200);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tabc = new BirdPanel();\n\t\ttime = new TimePanel();\n\t\tgetContentPane().setLayout(new BoxLayout(frame, BoxLayout.Y_AXIS));\n\n\t\tframe.getContentPane().add(abc, BorderLayout.NORTH);\n\t\tframe.getContentPane().add(time, BorderLayout.CENTER);\n\t}",
"private void initialize() {\r\n\t\tthis.setSize(311, 153);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t\tsetCancelButton( btnCancel );\r\n\t}",
"public Frame() {\n initComponents();\n }",
"public Frame() {\n initComponents();\n }",
"private void initialize() {\r\n\t\tthis.setSize(497, 316);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t\tthis.setExtendedState(JFrame.MAXIMIZED_BOTH);\r\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}",
"protected HFrame(){\n\t\tinit();\n\t}",
"private void initializeFields() {\r\n myFrame = new JFrame();\r\n myFrame.setSize(DEFAULT_SIZE);\r\n }",
"private void initialize() {\n\t\tthis.setSize(329, 270);\n\t\tthis.setContentPane(getJContentPane());\n\t}",
"private void initialize() {\r\n\t\t//setFrame\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(125,175, 720, 512);\r\n\t\tframe.setTitle(\"Periodic Table\");\r\n\t\tframe.setResizable(false);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}",
"private void initFrame() {\n setLayout(new BorderLayout());\n }",
"private void initialize() {\n\t\tthis.setSize(300, 300);\n\t\tthis.setIconifiable(true);\n\t\tthis.setClosable(true);\n\t\tthis.setTitle(\"Sobre\");\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setFrameIcon(new ImageIcon(\"images/16x16/info16x16.gif\"));\n\t}",
"public FrameControl() {\n initComponents();\n }",
"private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}",
"public MainFrame() {\n initComponents();\n \n }",
"private void init(Element frame) {\n\t\tthis.frameWidth = Integer.parseInt(frame.attributeValue(\"width\"));\n\t\tthis.frameHeight = Integer.parseInt(frame.attributeValue(\"height\"));\n\t\tthis.paddle = Integer.parseInt(frame.attributeValue(\"paddle\"));\n\t\tthis.size = Integer.parseInt(frame.attributeValue(\"size\"));\n\t}",
"public MainFrame() {\n \n initComponents();\n \n this.initNetwork();\n \n this.render();\n \n }",
"public internalFrame() {\r\n initComponents();\r\n }",
"private void initialize() {\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setSize(810, 600);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setBackground(new java.awt.Color(226,226,222));\n\t\tthis.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n\t\tthis.setModal(true);\n\t\tthis.setResizable(false);\n\t\tthis.setName(\"FramePrincipalLR\");\n\t\tthis.setTitle(\"CR - Lista de Regalos\");\n\t\tthis.setLocale(new java.util.Locale(\"es\", \"VE\", \"\"));\n\t\tthis.setUndecorated(false);\n\t}",
"public Mainframe() {\n initComponents();\n }",
"private void initialize() {\r\n\t\tthis.setSize(392, 496);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"Informações\");\r\n\t}",
"private void initialize() {\n this.setSize(253, 175);\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setContentPane(getJContentPane());\n this.setTitle(\"Breuken vereenvoudigen\");\n }",
"private void initialize() {\r\n\t\t// Initialize main frame\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(Constants.C_MAIN_PREFERED_POSITION_X_AT_START, Constants.C_MAIN_PREFERED_POSITION_Y_AT_START, \r\n\t\t\t\tConstants.C_MAIN_PREFERED_SIZE_X, Constants.C_MAIN_PREFERED_SIZE_Y);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.setTitle(Constants.C_MAIN_WINDOW_TITLE);\r\n\t\t\r\n\t\t// Tab panel and their panels\r\n\t\tmainTabbedPane = new JTabbedPane(JTabbedPane.TOP);\r\n\t\tframe.getContentPane().add(mainTabbedPane, BorderLayout.CENTER);\r\n\t\t\r\n\t\tpanelDecision = new DecisionPanel();\r\n\t\tmainTabbedPane.addTab(Constants.C_TAB_DECISION_TITLE, null, panelDecision, null);\r\n\t\t\r\n\t\tpanelCalculation = new CalculationPanel();\r\n\t\tmainTabbedPane.addTab(Constants.C_TAB_CALCULATION_TITLE, null, panelCalculation, null);\r\n\t\t\r\n\t\tpanelLibrary = new LibraryPanel();\r\n\t\tmainTabbedPane.addTab(Constants.C_TAB_LIBRARY_TITLE, null, panelLibrary, null);\r\n\t\t\r\n\t\t// Menu bar\r\n\t\tmenuBar = new JMenuBar();\r\n\t\tframe.setJMenuBar(menuBar);\r\n\t\tcreateMenus();\r\n\t}",
"public void initializeFrame() {\n frame.getContentPane().removeAll();\n createComponents(frame.getContentPane());\n// frame.setSize(new Dimension(1000, 600));\n }",
"private void initialize() {\r\n\t\t// this.setSize(271, 295);\r\n\t\tthis.setSize(495, 392);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(ResourceBundle.getBundle(\"Etiquetas\").getString(\"MainTitle\"));\r\n\t}",
"private void initializeFrame() {\n add(container);\n setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n pack();\n }",
"private void initialize() {\n this.setSize(300, 200);\n this.setContentPane(getJContentPane());\n this.pack();\n }",
"private void initialize() {\n\t\tframe = new JFrame(\"DB Filler\");\n\t\tframe.setBounds(100, 100, 700, 500);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tdbc = new DataBaseConnector();\n\t\tcreateFileChooser();\n\n\t\taddTabbedPane();\n\t\tsl_panel = new SpringLayout();\n\t\taddAddFilePanel();\n\t}",
"public mainframe() {\n initComponents();\n }",
"public FrameDesign() {\n initComponents();\n }",
"public Jframe() {\n initComponents();\n setIndice();\n loadTextBoxs();\n }",
"public JGSFrame() {\n\tsuper();\n\tinitialize();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n try {\n initComponents();\n initElements();\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Error \" + e.getMessage());\n }\n }",
"private void initialize() {\n this.setSize(495, 276);\n this.setTitle(\"Translate Frost\");\n this.setContentPane(getJContentPane());\n }",
"private void initialize() {\r\n\t\t// set specific properties and add inner components.\r\n\t\tthis.setBorder(BorderFactory.createEtchedBorder());\r\n\t\tthis.setSize(300, 400);\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\taddComponents();\r\n\t}",
"private void initialize() {\r\n\t\tthis.setBounds(new Rectangle(0, 0, 670, 576));\r\n\t\tthis.setResizable(false);\r\n\t\tthis.setTitle(\"数据入库 \");\r\n\t\tthis.setLocationRelativeTo(getOwner());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}",
"public void initializePanelToFrame() {\n\t\tnew ColorResources();\n\t\tnew TextResources().changeLanguage();\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(null);\n\t\tpanel.setPreferredSize(new Dimension(375, 812));\n\n\t\tconfigureLabels();\n\t\tconfigureButtons();\n\t\taddListeners();\n\t\taddComponentsToPanel();\n\n\t\tthis.setContentPane(panel);\n\t\tthis.pack();\n\t}",
"private void initialize() {\n this.setLayout(new BorderLayout());\n this.setSize(new java.awt.Dimension(564, 229));\n this.add(getMessagePanel(), java.awt.BorderLayout.NORTH);\n this.add(getBalloonSettingsListBox(), java.awt.BorderLayout.CENTER);\n this.add(getBalloonSettingsButtonPane(), java.awt.BorderLayout.SOUTH);\n\n editBalloonSettingsFrame = new EditBalloonSettingsFrame();\n\n }",
"public SMFrame() {\n initComponents();\n updateComponents();\n }",
"private void initialize() {\n m_frame = new JFrame(\"Video Recorder\");\n m_frame.setResizable(false);\n m_frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n m_frame.setLayout(new BorderLayout());\n m_frame.add(buildContentPanel(), BorderLayout.CENTER);\n\n JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 5, 5));\n JButton startButton = new JButton(\"Start\");\n startButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent ae) {\n listen();\n }\n });\n buttonPanel.add(startButton);\n\n m_connectionLabel = new JLabel(\"Disconnected\");\n m_connectionLabel.setOpaque(true);\n m_connectionLabel.setBackground(Color.RED);\n m_connectionLabel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 3));\n m_connectionLabel.setPreferredSize(new Dimension(100, 26));\n m_connectionLabel.setHorizontalAlignment(SwingConstants.CENTER);\n buttonPanel.add(m_connectionLabel);\n\n m_frame.add(buttonPanel, BorderLayout.PAGE_END);\n }",
"public FirstNewFrame() {\n\t\tjbInit();\n\t}",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(Color.BLACK);\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Play\");\n\t\tbtnNewButton.setFont(new Font(\"Bodoni 72\", Font.BOLD, 13));\n\t\tbtnNewButton.setBounds(frame.getWidth() / 2 - 60, 195, 120, 30);\n\t\tframe.getContentPane().add(btnNewButton);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"Space Escape\");\n\t\tlblNewLabel.setForeground(Color.WHITE);\n\t\tlblNewLabel.setFont(new Font(\"Bodoni 72\", Font.BOLD, 24));\n\t\tlblNewLabel.setBounds(frame.getWidth() / 2 - 60, 30, 135, 25);\n\t\tframe.getContentPane().add(lblNewLabel);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"New label\");\n\t\tlblNewLabel_1.setBounds(0, 0, frame.getWidth(), frame.getHeight());\n\t\tframe.getContentPane().add(lblNewLabel_1);\n\t}",
"private void initializeFrame()\r\n\t{\r\n\t\tthis.setResizable(false);\r\n\r\n\t\tsetSize(DIMENSIONS); // set the correct dimensions\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetLayout( new GridLayout(1,1) );\r\n\t}",
"private void setupFrame()\n\t{\n\t\tthis.setContentPane(botPanel);\n\t\tthis.setSize(800,700);\n\t\tthis.setTitle(\"- Chatbot v.2.1 -\");\n\t\tthis.setResizable(true);\n\t\tthis.setVisible(true);\n\t}",
"public MainFrame() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"public EmulatorFrame() {\r\n\t\tsuper(\"Troyboy Chip8 Emulator\");\r\n\t\t\r\n\t\tsetNativeLAndF();\r\n\t\tinitComponents();\r\n\t\tinitMenubar();\r\n\t\tsetupLayout();\r\n\t\tinitFrame();\r\n\t\t//frame is now ready to run a game\r\n\t\t//running of any games must be started by loading a ROM\r\n\t}",
"public void init()\n {\n buildUI(getContentPane());\n }",
"private void initialize()\n {\n this.setTitle( \"SerialComm\" ); // Generated\n this.setSize( 500, 300 );\n this.setContentPane( getJContentPane() );\n }",
"public launchFrame() {\n \n initComponents();\n \n }",
"private void initialize() {\r\n\t\tthis.setSize(378, 283);\r\n\t\tthis.setJMenuBar(getMenubar());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JAVIER\");\r\n\t}",
"private void initialize() {\n\t\tthis.setSize(430, 280);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setUndecorated(true);\n\t\tthis.setModal(true);\n\t\tthis.setBackground(new java.awt.Color(226,226,222));\n\t\tthis.setTitle(\"Datos del Invitado\");\n\t\tthis.addComponentListener(this);\n\t}",
"public PilaFrame() {\n initComponents();\n }",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 900, 900);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tgame = new Game();\n\t\t\n\t\tGameTable puzzle = new GameTable(game.getPuzzle());\n\t\tpuzzle.setBounds(100, 100, 700, 700);\n\t\t\n\t\tframe.add(puzzle);\n\t\t\n\t\tSystem.out.println(\"SAD\");\n\t\t\n\t}",
"private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setResizable(false);\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tPanel mainFramePanel = new Panel();\r\n\t\tmainFramePanel.setBounds(10, 10, 412, 235);\r\n\t\tframe.getContentPane().add(mainFramePanel);\r\n\t\tmainFramePanel.setLayout(null);\r\n\t\t\r\n\t\tfinal TextField textField = new TextField();\r\n\t\ttextField.setBounds(165, 62, 79, 24);\r\n\t\tmainFramePanel.add(textField);\r\n\t\t\r\n\t\tButton changeTextButt = new Button(\"Change Text\");\r\n\t\tchangeTextButt.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\ttextField.setText(\"Domograf\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tchangeTextButt.setBounds(165, 103, 79, 24);\r\n\t\tmainFramePanel.add(changeTextButt);\r\n\t}",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setResizable(false);\n\t\tframe.setAlwaysOnTop(true);\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t}",
"StudentFrame() {\n \tgetContentPane().setFont(new Font(\"Times New Roman\", Font.PLAIN, 11));\n s1 = null; // setting to null\n initializeComponents(); // causes frame components to be initialized\n }",
"private void initialize() {\r\n\t\tthis.setSize(300, 200);\r\n\t\tthis.setTitle(\"Error\");\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}",
"public NewFrame() {\n initComponents();\n }",
"public SerialCommFrame()\n {\n super();\n initialize();\n }",
"public LoginFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}",
"public BaseFrame() {\n initComponents();\n }",
"private void initialize() {\r\n\t\tthis.setSize(733, 427);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"jProxyChecker\");\r\n\t}",
"public frame() {\r\n\t\tadd(createMainPanel());\r\n\t\tsetTitle(\"Lunch Date\");\r\n\t\tsetSize(FRAME_WIDTH, FRAME_HEIGHT);\r\n\r\n\t}",
"public MercadoFrame() {\n initComponents();\n }",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 800, 800);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJPanel browserPanel = new JPanel();\n\t\tframe.getContentPane().add(browserPanel, BorderLayout.CENTER);\n\t\t\n\t\t// create javafx panel for browser\n browserFxPanel = new JFXPanel();\n browserPanel.add(browserFxPanel);\n \n // create JavaFX scene\n Platform.runLater(new Runnable() {\n public void run() {\n createScene();\n }\n });\n\t}",
"private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(X_FRAME, Y_FRAME, WIDTH_FRAME, HEIGHT_FRAME);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJButton btnAddSong = new JButton(\"Add song\");\r\n\t\tbtnAddSong.setBounds(X_BTN, Y_ADDSONG, WIDTH_BTN, HEIGHT_BTN);\r\n\t\tframe.getContentPane().add(btnAddSong);\r\n\t\t\r\n\t\tJTextPane txtpnBlancoYNegro = new JTextPane();\r\n\t\ttxtpnBlancoYNegro.setText(\"Blanco y negro\\r\\nThe Spectre\\r\\nGirasoles\\r\\nFaded\\r\\nTu Foto\\r\\nEsencial\");\r\n\t\ttxtpnBlancoYNegro.setBounds(X_TXT, Y_TXT, WIDTH_TXT, HEIGHT_TXT);\r\n\t\tframe.getContentPane().add(txtpnBlancoYNegro);\r\n\t\t\r\n\t\tJLabel lblSongs = new JLabel(\"Songs\");\r\n\t\tlblSongs.setBounds(X_LBL, Y_LBL, WIDTH_LBL, HEIGHT_LBL);\r\n\t\tframe.getContentPane().add(lblSongs);\r\n\t\t\r\n\t\tJButton btnAddAlbum = new JButton(\"Add album\");\r\n\t\tbtnAddAlbum.setBounds(X_BTN, Y_ADDALBUM, WIDTH_BTN, HEIGHT_BTN);\r\n\t\tframe.getContentPane().add(btnAddAlbum);\r\n\t}",
"public holdersframe() {\n initComponents();\n }",
"public void init() {\n\t\tsetSize(500,300);\n\t}",
"private void setupFrame()\n\t\t{\n\t\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\tthis.setResizable(false);\n\t\t\tthis.setSize(800, 600);\n\t\t\tthis.setTitle(\"SEKA Client\");\n\t\t\tthis.setContentPane(panel);\n\t\t\tthis.setVisible(true);\n\t\t}",
"public addStFrame() {\n initComponents();\n }",
"public JFrame() {\n initComponents();\n }",
"public FrameForm() {\n initComponents();\n }",
"private void initialize() {\n\t\tframe = new JFrame(\"View Report\");\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\n\t\tJButton backButton = new JButton(\"Back\");\n\t\tbackButton.setBounds(176, 227, 89, 23);\n\t\tframe.getContentPane().add(backButton);\n\t\tbackButton.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tframe.setVisible(false);\n\t\t\t}\n\t\t});\n\t\t\n\t\tJTextArea textArea = new JTextArea();\n\t\ttextArea.setBounds(50, 30, 298, 173);\n\t\tframe.getContentPane().add(textArea);\n\t\ttextArea.append(control.seeReport());\n\t\tframe.setVisible(true);\n\t}",
"private void initialize() {\r\n this.setSize(new Dimension(666, 723));\r\n this.setContentPane(getJPanel());\r\n\t\t\t\r\n\t}",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(Color.BLACK);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblSubmission = new JLabel(\"Submission\");\n\t\tlblSubmission.setForeground(Color.WHITE);\n\t\tlblSubmission.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 16));\n\t\tlblSubmission.setBounds(164, 40, 83, 14);\n\t\tframe.getContentPane().add(lblSubmission);\n\t\t\n\t\tJLabel lblTitle = new JLabel(\"Title:\");\n\t\tlblTitle.setForeground(Color.WHITE);\n\t\tlblTitle.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 14));\n\t\tlblTitle.setBounds(77, 117, 41, 14);\n\t\tframe.getContentPane().add(lblTitle);\n\t\t\n\t\tJLabel lblPath = new JLabel(\"Path:\");\n\t\tlblPath.setForeground(Color.WHITE);\n\t\tlblPath.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 14));\n\t\tlblPath.setBounds(85, 155, 33, 14);\n\t\tframe.getContentPane().add(lblPath);\n\t\t\n\t\ttitle = new JTextField();\n\t\ttitle.setBounds(128, 116, 197, 20);\n\t\tframe.getContentPane().add(title);\n\t\ttitle.setColumns(10);\n\t\t\n\t\tpath = new JTextField();\n\t\tpath.setBounds(128, 154, 197, 20);\n\t\tframe.getContentPane().add(path);\n\t\tpath.setColumns(10);\n\t\t\n\t\tbtnSubmit = new JButton(\"Submit\");\n\t\tbtnSubmit.setBackground(Color.BLACK);\n\t\tbtnSubmit.setForeground(Color.WHITE);\n\t\tbtnSubmit.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 14));\n\t\tbtnSubmit.setBounds(158, 210, 89, 23);\n\t\tframe.getContentPane().add(btnSubmit);\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\tframe.setVisible(true);\n\t}",
"public void init() {\r\n\t\t\r\n\t\tsetSize(WIDTH, HEIGHT);\r\n\t\tColor backgroundColor = new Color(60, 0, 60);\r\n\t\tsetBackground(backgroundColor);\r\n\t\tintro = new GImage(\"EvilMehranIntroGraphic.png\");\r\n\t\tintro.setLocation(0,0);\r\n\t\tadd(intro);\r\n\t\tplayMusic(new File(\"EvilMehransLairThemeMusic.wav\"));\r\n\t\tinitAnimationArray();\r\n\t\taddKeyListeners();\r\n\t\taddMouseListeners();\r\n\t\twaitForClick();\r\n\t\tbuildWorld();\r\n\t}",
"public FrameIntroGUI() {\n\t\ttry {\n\t\t\tjbInit();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void initialize() {\n\t\tthis.setBounds(100, 100, 950, 740);\n\t\tthis.setLayout(null);\n\n\t\n\t}",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblCoisa = new JLabel(\"Coisa\");\n\t\tlblCoisa.setBounds(10, 11, 46, 14);\n\t\tframe.getContentPane().add(lblCoisa);\n\t\t\n\t\ttextField = new JTextField();\n\t\ttextField.setBounds(39, 8, 86, 20);\n\t\tframe.getContentPane().add(textField);\n\t\ttextField.setColumns(10);\n\t}",
"private void initialize() {\n\t\tthis.setExtendedState(Frame.MAXIMIZED_BOTH);\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tthis.setResizable(true);\n\t\tthis.screenDimensions = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tthis.getContentPane().setLayout(new BorderLayout());\n\t\t// Initialize SubComponents and GUI Commands\n\t\tthis.initializeSplitPane();\n\t\tthis.initializeExplorer();\n\t\tthis.initializeConsole();\n\t\tthis.initializeMenuBar();\n\t\tthis.pack();\n\t\tthis.hydraExplorer.refreshExplorer();\n\t}"
] |
[
"0.77704835",
"0.75652915",
"0.7442664",
"0.7369101",
"0.7366378",
"0.7358479",
"0.73146075",
"0.73096764",
"0.72987294",
"0.72978777",
"0.7278321",
"0.72729623",
"0.7269468",
"0.7269468",
"0.7215727",
"0.7180792",
"0.71682984",
"0.7140954",
"0.7140953",
"0.7126852",
"0.7107974",
"0.7100368",
"0.7092515",
"0.708178",
"0.70652425",
"0.70630395",
"0.70621413",
"0.7060283",
"0.70517516",
"0.7043992",
"0.6996167",
"0.6978269",
"0.6971387",
"0.6956391",
"0.6938475",
"0.6929829",
"0.6929629",
"0.69251114",
"0.6921989",
"0.6920365",
"0.6914633",
"0.6911002",
"0.6911002",
"0.6911002",
"0.6911002",
"0.6911002",
"0.6911002",
"0.6911002",
"0.6911002",
"0.6911002",
"0.6911002",
"0.6911002",
"0.6911002",
"0.69020075",
"0.68911743",
"0.6886017",
"0.6873457",
"0.6870402",
"0.68686837",
"0.68669385",
"0.686311",
"0.68616706",
"0.68552315",
"0.68537515",
"0.681551",
"0.68141145",
"0.68094325",
"0.67992085",
"0.67930394",
"0.6782133",
"0.6765297",
"0.6748138",
"0.6731745",
"0.6716807",
"0.6711878",
"0.6706194",
"0.6697453",
"0.6692831",
"0.66927665",
"0.6689213",
"0.66724384",
"0.66606426",
"0.664954",
"0.6642464",
"0.6640775",
"0.6638488",
"0.663824",
"0.663545",
"0.66264987",
"0.6625419",
"0.6611392",
"0.6608291",
"0.6600817",
"0.66005784",
"0.6591052",
"0.65869486",
"0.65862876",
"0.65753394",
"0.6575285",
"0.6570335",
"0.655961"
] |
0.0
|
-1
|
Initialise variables for use in Contact methods
|
public Contact (String fname, String sname, String id, String phone){
firstName = fname;
surname = sname;
uniqueID = id;
phoneNumber = phone;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"protected void initVars() {}",
"private void initFields() {\n\n tipPercent = 0.0;\n noPersons = 1;\n totalPay = 0.0;\n totalTip = 0.0;\n totalPerPerson = 0.0;\n\n }",
"private void init() {\n cloudAmount = null;\n cloudGenus = null;\n cloudAltitude = null;\n cloudDescription = null;\n }",
"public void initialise() {\n\t\tm_country_id = 0;\n\t\tm_country_name = \"\";\n\t\tm_error_string = \"\";\n\t}",
"private void initializeInstanceVariables(){\n\n //Initialize Firebase variables\n firebaseAuth = FirebaseAuth.getInstance();\n currentUser = FirebaseAuth.getInstance().getCurrentUser();\n myDatabase = FirebaseDatabase.getInstance().getReference(firebaseAuth.getUid());\n\n //Initialize input variables\n newContactPhoneNumber = findViewById(R.id.addcontact_phonenumber);\n finishButton = findViewById(R.id.addcontact_finishbttn);\n backButton = findViewById(R.id.addContactScreenBackBttn);\n newContactFirstName = ((EditText) findViewById(R.id.addcontact_firstname));\n newContactLastName = ((EditText) findViewById(R.id.addcontact_lastname));\n newContactEmailAddress = ((EditText) findViewById(R.id.addcontact_email));\n }",
"public void initCampaignData() {\n tozAdCampaignAccount = \"init\";\n tozAdCampaignID = \"init\";\n baseViewIndex = 0;\n finalViewIndex = 0;\n repeatCycle = 0;\n }",
"@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}",
"private void initialise() {\n progressBar = (ProgressBar) view.findViewById(R.id.deliver_page_progress_bar);\n getCurrentAddressButton = (Button) view.findViewById(R.id.get_current_address);\n\n contactPersonEditText = (EditText) view.findViewById(R.id.contact_person);\n phoneNumberEditText = (EditText) view.findViewById(R.id.phone_number);\n emailEditText = (EditText) view.findViewById(R.id.email);\n houseNumberEditText = (EditText) view.findViewById(R.id.house_number);\n streetAddressEditText = (EditText) view.findViewById(R.id.street_address);\n //clearErrors();\n\n\n// normalDeliveryButton.setOnClickListener(this);\n// expressDeliveryButton.setOnClickListener(this);\n getCurrentAddressButton.setOnClickListener(this);\n\n sharedData = SharedData.getSingletonObject();\n\n ApplicationPreferences preferences = new ApplicationPreferences();\n String phone_number = preferences.getUserRegisterPhone(getContext());\n\n phoneNumberEditText.setText(phone_number);\n hideSoftKeyboard();\n }",
"@Override\n\tprotected void initVariable() {\n\t\tapp = (MApplication) this.getApplication();\n\t\tapp.addAllActivity(this);\n\t\tfundcode = this.getIntent().getStringExtra(\"fundcode\");\n\t\tlist = new ArrayList<MoneyChangeBean>();\n\t\tadapter = new RecordDetailsAdapter(getApplicationContext(), list);\n\t\tuserShare = UserSharedData.getInstance(getApplicationContext());\n\t}",
"protected void init() {\n setUUIDString();\n setNoteCreatedAt();\n setNoteUpdatedAt();\n setCreator(ParseUser.getCurrentUser());\n addAuthor(ParseUser.getCurrentUser());\n setACL(new ParseACL(ParseUser.getCurrentUser()));\n }",
"private void init() {\n\t\t\n\t\ttry{\t\t\t\n\t\t\tinfos = new HashMap<String, VariableInfo>();\n\t\t\t\n\t\t\tfor(String var : this.problem.getMyVars()){\n\t\t\t\t\n\t\t\t\tif(this.problem.getNbrNeighbors(var) != 0){ // an isolated variable doesn't need a CryptoScheme and therefore no VariableInfo either\n\t\t\t\t\t\n\t\t\t\t\tVariableInfo info = new VariableInfo(var);\n\t\t\t\t\tinfos.put(var, info);\n\t\t\t\t\t\n\t\t\t\t\tinfo.cs = cryptoConstr.newInstance(this.cryptoParameter);\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//initialize request counter for my own variables\n\t\t\trequestCount = new HashMap<String,Integer>(); \n\t\t\tfor(String var : this.problem.getMyVars()){\n\t\t\t\trequestCount.put(var, 0);\n\t\t\t}\n\t\t\t\n\t\t\tthis.started = true;\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t}",
"private void initData() {\n requestServerToGetInformation();\n }",
"private void initializeVariables() {\n\n //Acquisizione credeziali per il login\n editTextUsername = findViewById(R.id.username);\n editTextPassword = findViewById(R.id.password);\n\n //bottone per il login\n mLoginButton = findViewById(R.id.button_login);\n\n //Checkbox per ricordare le credenziali\n rememberMe = findViewById(R.id.remember);\n\n //Variabile per reimpostare la password\n forgotTextLink = findViewById(R.id.lost_password);\n\n //ProgressBar\n progressBar = findViewById(R.id.progress_view);\n }",
"private void initObjects() {\n inputValidation = new InputValidation(activity);\n databaseHelper = new DatabaseHelper(activity);\n user = new User();\n }",
"protected void init() {\n super.init();\n uriExpr = null;\n uri = null;\n nameExpr = null;\n name = null;\n qname = null;\n attrExpr = null;\n attr = null;\n emptyExpr = null;\n empty = false;\n }",
"private void setDefaultValues()\r\n\t{\r\n\t\tif (m_receiverAddress == null || m_receiverAddress.equals(\"\") )\r\n\t\t{\r\n\t\t\tm_receiverAddress = \"[email protected]\";\r\n\t\t}\r\n\r\n\t\tif (m_replyAddress == null || m_replyAddress.equals(\"\") )\r\n\t\t{\r\n\t\t\tm_replyAddress = \"no return\";\r\n\t\t}\r\n\r\n\t\tif (m_senderName == null || m_senderName.equals(\"\") )\r\n\t\t{\r\n\t\t\tm_senderName = \"Unknown Sender\";\r\n\t\t}\r\n\r\n\t\tif (m_subject == null || m_subject.equals(\"\") )\r\n\t\t{\r\n\t\t\tm_subject = \"AN.ON support request\";\r\n\t\t}\r\n\r\n\t\tif (m_bodyText == null || m_bodyText.equals(\"\") )\r\n\t\t{\r\n\t\t\tm_bodyText = \"message is empty\";\r\n\t\t}\r\n\r\n\t}",
"private CustomerDetails initCustomerDetails() {\n CustomerDetails mCustomerDetails = new CustomerDetails();\n mCustomerDetails.setPhone(\"085310102020\");\n mCustomerDetails.setFirstName(\"user fullname\");\n mCustomerDetails.setEmail(\"[email protected]\");\n return mCustomerDetails;\n }",
"private void init() {\r\n\r\n analyticsManager = new xxxxAnalytics(getApplicationContext());\r\n\r\n analyticsSender = new AnalyticsSender(this);\r\n\r\n provider = FeedProviderImpl.getInstance(this);\r\n\r\n feedId = getIntent().getExtras().getInt(Constants.FEED_ID);\r\n if (provider != null) {\r\n friendFeed = provider.getFeed(feedId);\r\n }\r\n\r\n unifiedSocialWindowView = findViewById(R.id.linearLayoutForUnifiedSocialWindow);\r\n\r\n\r\n // Get member contacts.\r\n memberContacts = provider.getContacts(feedId);\r\n\r\n lastDiffs = new LinkedBlockingDeque<Integer>();\r\n }",
"private void initialize()\r\n {\r\n this.workspace = null;\r\n this.currentUser = null;\r\n this.created = new Date();\r\n this.securityInfo = null;\r\n }",
"private void initObjects() {\n String emailFromIntent = getIntent().getStringExtra(\"NAMA\");\n textViewName.setText(emailFromIntent);\n }",
"private void initData() {\n getCourse();\n// getMessage();\n\n }",
"public static void initializePreqs() { \r\n\t\tlist = new ArrayList<Freebody>();\r\n\t\ttrackers = new ArrayList<TrackingPoint>();\r\n\t\tcamPos=new int[3];\r\n\t}",
"public void initActivities() {\n a = (Receive) flow.getNode(\"A\");\n b = (Receive) flow.getNode(\"B\");\n c = (Receive) flow.getNode(\"C\");\n x = (Receive) flow.getNode(\"X\");\n y = (Receive) flow.getNode(\"Y\");\n }",
"protected void init()\n {\n Timestamp now = new Timestamp(System.currentTimeMillis());\n timestampCreated = now;\n timestampModified = now;\n createdByAgent = AppContextMgr.getInstance() == null? null : (AppContextMgr.getInstance().hasContext() ? Agent.getUserAgent() : null);\n modifiedByAgent = null;\n }",
"private void initVars(){\n this.dice = new Dice();\n this.playing = true;\n this.currentPlayer = 0;\n this.turn = 0;\n this.xPlayers=new ArrayList<>(); \n this.players = new Player[4];\n this.diceRoller=true;\n this.xTokens=new ArrayList<>();\n this.winners=new ArrayList<>();\n this.computerPlayer= new Autoplay();\n this.gameResults = \"\";\n this.debug = false;\n }",
"protected void initialize() {\n\t\tright = left = throttle = turn = forward = 0;\n\t}",
"protected void aInit()\r\n {\r\n \t\t//state_sender = STATE_WAIT_FOR_CALL_0_FROM_ABOVE;\r\n \t\tpacketBufferAry = new Packet[LimitSeqNo];\r\n \t\twindow_base = FirstSeqNo;\r\n \t\tnext_seq_num = FirstSeqNo;\r\n \t\tSystem.out.println(\"|aInit| : window_base: \"+Integer.toString(window_base));\r\n \t\tSystem.out.println(\"|aInit| : next_seq_num: \"+Integer.toString(next_seq_num)); \t\t\r\n }",
"private void init() {\n\t\tinitProtocol();\n\t\tinitResultStorage();\n\t}",
"public void initialize() {\n\n fechaDeLaVisita.set(LocalDate.now());\n\n if (medico.get() != null) {\n medico.get().clear();\n } else {\n medico.set(new Medico());\n }\n\n turnoVisita.set(\"\");\n visitaAcompanadaSN.set(false);\n lugarVisita.set(\"\");\n if (causa.get() != null) {\n causa.get().clear();\n } else {\n causa.set(new Causa());\n }\n\n if (promocion.get() != null) {\n promocion.get().clear();\n } else {\n promocion.set(new Promocion());\n }\n\n observacion.set(\"\");\n persistida.set(false);\n persistidoGraf.set(MaterialDesignIcon.SYNC_PROBLEM.graphic());\n\n fechaCreacion.set(LocalDateTime.now());\n\n }",
"public PDContactSend() {\n this.email = new ArrayList<>();\n this.phone = new ArrayList<>();\n this.active_flag = true;\n }",
"public void inicialisation(){\r\n\t\t\r\n\t\tgoods = new AutoParts[0];\r\n\t\tclient = new Client[0];\r\n\t\t\r\n\t\tshop = new Shopping[0];\r\n\t\tsale = new Sale[0];\r\n\t\ttransaction = new Document[0];\r\n\t\t\r\n\t\tbalancesAutoParts = new BalancesAutoParts[0];\r\n\t\t\r\n\t\tprices = new Prices[0];\r\n\t\t\r\n\t\tagriment = new Agreement[0];\r\n\t\t\r\n\t}",
"public void init(){\n nomInscription = (EditText)findViewById(R.id.inscriptionNomEdit);\n prenomInscription = (EditText)findViewById(R.id.inscriptionPrenomEdit);\n mailInscription = (EditText)findViewById(R.id.inscriptionMailEdit);\n telInscription = (EditText)findViewById(R.id.inscriptionGSMEdit);\n mdpInscription = (EditText)findViewById(R.id.inscriptionPSWEdit);\n mdpConfirmation = (EditText)findViewById(R.id.inscriptionConfirmEdit);\n }",
"public void init() {\n //De leden mogen niet extreem obesitas hebben. Onder of gelijk aan 180kg.\n Valerie= 40;\n Jeroen=100;\n Hans=80;\n\n // Teller begint bij 0. Stel: staaf is 80 hoog.\n // 180 is waar de grafiek begint.\n nulpunt=180; //Dit is het nulpunt van de staaf\n som_v = nulpunt - Valerie;\n som_j = nulpunt - Jeroen;\n som_h = nulpunt - Hans;\n }",
"private void init() {\n ip = SPUtils.get(this, Constant.SP_SERVICE_IP, \"\").toString();\n port = SPUtils.get(this, Constant.SP_SERVICE_PORT, \"\").toString();\n\n if (TextUtils.isEmpty(ip) || TextUtils.isEmpty(port)){\n editPort.setText(getResources().getString(R.string.default_port));\n editIp.setText(getResources().getString(R.string.default_ip));\n }else{\n editIp.setText(ip);\n editPort.setText(port);\n }\n }",
"private void initObjects() {\n databaseHelper = new DatabaseHelper(activity);\n dbHelper = new DBHelper(activity);\n inputValidation = new InputValidation(activity);\n progress = new ProgressDialog(activity);\n user=new User();\n }",
"public void init() {\r\n\t\tlog.info(\"init()\");\r\n\t\tobjIncidencia = new IncidenciaSie();\r\n\t\tobjObsIncidencia = new ObservacionIncidenciaSie();\r\n\t\tobjCliente = new ClienteSie();\r\n\t\tobjTelefono = new TelefonoPersonaSie();\r\n\t}",
"protected void initializeInstances() {\n if (mUser == null) {\n mUser = new User(getApplicationContext());\n }\n if (mUserCache == null) {\n mUserCache = new UserCache();\n }\n if(mGlobalGroupContainer == null) {\n mGlobalGroupContainer = new GroupContainer(getApplicationContext());\n }\n if(mGlobalHistoryContainer == null) {\n mGlobalHistoryContainer = new HistoryContainer(getApplicationContext());\n }\n\n if(mGlobalContactContainer == null) {\n mGlobalContactContainer = new ContactContainer(getApplicationContext());\n mGlobalContactContainer.setContactSortKey(Contact.UserSortKey.USER_FIRST_NAME);\n }\n }",
"@Override\n\tpublic void initializeContacts(EvolutionState state) {\n\t}",
"private void init()\n\t{\n\t\tif (_invData == null)\n\t\t\t_invData = new InvestigateStore.MappedStores();\n\t}",
"private Request() {\n initFields();\n }",
"private void fieldsInitialization() {\n this.emailEditText = findViewById(R.id.login_email_edit_text);\n this.passwordEditText = findViewById(R.id.login_password_edit_text);\n this.loginButton = findViewById(R.id.login_button_login);\n\n this.emailEditText.setOnFocusChangeListener(this.emailFocusChangingListener);\n this.emailEditText.setOnEditorActionListener(this.emailTextChangingListener);\n this.passwordEditText.setOnFocusChangeListener(this.passwordFocusChangingListener);\n this.passwordEditText.setOnEditorActionListener(this.passwordTextChangingListener);\n this.loginButton.setOnClickListener(this.loginButtonClickListener);\n }",
"private void init() {\n\n\t}",
"public Contact(){\n\t\t\n\t}",
"public void init() {\r\n\r\n\t}",
"public static void initialisations() {\n\t\tit = 0;\r\n\t\tbc = 1;\r\n\r\n\t\t// pile des reprises pour compilation des branchements en avant\r\n\t\tpileRep = new TPileRep(); \r\n\t\t// programme objet = code Mapile de l'unite en cours de compilation\r\n\t\tpo = new ProgObjet();\r\n\t\t// COMPILATION SEPAREE: desripteur de l'unite en cours de compilation\r\n\t\tdesc = new Descripteur();\r\n\r\n\t\t// initialisation necessaire aux attributs lexicaux\r\n\t\tUtilLex.initialisation();\r\n\r\n\t\t// initialisation du type de l'expression courante\r\n\t\ttCour = NEUTRE;\r\n\r\n\t\t//Initialisation de la variable qui compte le nombre de param�tres de chaque proc�dure \r\n\t\tnbParamProc = 0;\r\n\r\n\t\t//Initialisation de la variable qui compte le nombre de variables d�clar�es\r\n\t\tnbVar++;\r\n\r\n\t\t//Initialisation vTmp\r\n\t\tvTmp = 0;\r\n\t\t\r\n\t\tdesc.setUnite(\"programme\");\r\n\t\t\r\n\t}",
"private Globals(){\n store = null;\n service = null;\n filters = new EmailFilters();\n\n //notification types:\n keywordsNotification = 1;\n flagNotification = 0;\n }",
"private void init() {\n\t\tback=(ImageView)this.findViewById(R.id.back);\n\t\taddUser=(ImageView)this.findViewById(R.id.adduser);\n\t\tgrid=(GridView)this.findViewById(R.id.gridview);\n\t}",
"private void init(){\n //Get instance of Members to access Members Lists\n Members members = Members.getInstance();\n \n //add to patient members list\n members.getPatients().addMember(this);\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}",
"private void init() {\n\t\tutils = new MmustUtils(Authenticate.this);\n\t\treceiver = new AuthReceiver();\n\t\t\n\t\tetRegno = (EditText)findViewById(R.id.authenticate_editText_reg_no);\n\t\tetPassword = (EditText)findViewById(R.id.authenticate_editText_password);\n\t\tetPassword.addTextChangedListener(this);\n\t\t\n\t\tbtAuth = (Button)findViewById(R.id.authenticate_button_auth);\n\t\tbtAuth.setOnClickListener(this);\n\t\t\n\t\tivPeek = (ImageView)findViewById(R.id.authenticate_imageView_view_password);\n\t\tivPeek.setVisibility(ImageView.GONE);\n\t\tivPeek.setOnClickListener(this);\n\t\t\n\t\t\n\t\tpbAuthenticating = (ProgressBar)findViewById(R.id.authenticate_progressBar_authenticating);\n\t\tpbAuthenticating.setVisibility(ProgressBar.GONE);\n\t\t\n\t\ttvLoginFail = (TextView)findViewById(R.id.authenticate_textView_login_fail);\n\t\ttvLoginFail.setVisibility(TextView.GONE);\n\t\t\n\t\tgetRegisteredEmails();\n\t\t\n\t}",
"private void setupVariables() {\n mCalendarView = findViewById(R.id.calendarView);\n mTextView = findViewById(R.id.eventsView);\n }",
"private void initData() {\n\t}",
"private void initialize() {\n\t\t\n\t}",
"public void init(){\r\n\t\tbuild(0);\r\n\t\taddFestiveCity(1);\r\n\t}",
"public void init()\n {\n this.tripDict = new HashMap<String, Set<Trip>>();\n this.routeDict = new HashMap<String, Double>();\n this.tripList = new LinkedList<Trip>();\n this.computeAllPaths();\n this.generateDictionaries();\n }",
"private TigerData() {\n initFields();\n }",
"private void setUpReferences()\n {\n namedFields = new HashMap<>(5);\n namedFields.put(\"firstName\", (EditText) findViewById(R.id.signUpFirstNameField));\n namedFields.put(\"surname\", (EditText) findViewById(R.id.signUpSurnameField));\n namedFields.put(\"password\", (EditText) findViewById(R.id.signUpPasswordField));\n namedFields.put(\"confPassword\", (EditText) findViewById(R.id.signUpConfirmPassword));\n namedFields.put(\"email\", (EditText) findViewById(R.id.signUpEmailField));\n formContainer = (ScrollView) findViewById(R.id.signUpFormContainer);\n progressContainer = (RelativeLayout) findViewById(R.id.signUpProgressContainer);\n }",
"private void init(){\n this.firstNameTF.setText(user.getFirstName());\n this.nameTF.setText(user.getName());\n this.phoneTF.setText(user.getPhone());\n\n this.mailLabel.setText(user.getMail());\n this.roleLabel.setText(user.getFirstName());\n }",
"private void init() {\n\n\n\n }",
"public void init() {\n\t\t}",
"private void initData() {\n }",
"public Variables() {\n this.numCliente = 0;\n this.tiempoSalida = 999;\n }",
"public void initialise() {\n number_of_rays = 4; // how many rays are fired from the boat\n ray_angle_range = 145; // the range of the angles that the boat will fire rays out at\n ray_range = 30; // the range of each ray\n ray_step_size = (float) 10;\n regen = false;\n }",
"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 init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"private void initialParameters()\n\t{\n\t\tasteroidList = new ArrayList<Asteroid>();\n\t\tfor(int i = 0 ; i < INITIAL_ASTEROIDS ; i++)\n\t\t\tasteroidList.add(new Asteroid(getRandomLocationX(), getRandomLocationY(), SCREEN_WIDTH, SCREEN_HEIGHT));\n\t\t\n\t\t//========== Game Status ===========\n\t\trunning \t= true;\n\t\tisWin \t\t= false;\n\t\tisGameOver \t= false;\n\t\t\n\t\t//========== Game Craft ===========\t\t\n\t\tcraft = new Craft(SCREEN_WIDTH/2, SCREEN_HEIGHT/2, SCREEN_WIDTH, SCREEN_HEIGHT);\n\t}",
"public void initData() {\n\t\tnotes = new ArrayList<>();\n\t\t//place to read notes e.g from file\n\t}",
"public void performInitialisation() {\n \t\t// subclasses can override the behaviour for this method\n \t}",
"public TycoAgent() {\n\n\t\t// Initialize the Gmail, clear its emails via initialize(), initialize\n\t\t// the whole map with the init message, then initialize the new map,\n\t\t// dummy databse, auth users, and auth threads\n\t\tjciEmail = GmailAuthorize.getGmailService();\n\t\t// initialize();\n\t\trecentMailMap = new HashMap<String, Mail>();\n\n\t}",
"protected void initVars() {\n prefFile = \"./server.ini\";\n mimeFile = \"./mime.ini\";\n }",
"private void initVar() {\n\n sTextLD = sTextMLD;\n\n }",
"@Override\n\t\tprotected void initialise() {\n\n\t\t}",
"private void init() {\n }",
"public void init()\n\t{\n\t\tpaused = false;\n\t\tbg.play();\n\t\tdeath.setVolume(10);\n\t\texplosion.setVolume(20);\n\t\tsetGameOver(false);\n\t\tscore = 0;\n\t\tlives = 3;\n\t\tgameTime = 0;\n\t\tgameObj = new GameWorldCollection();\n\t\tshipSpawned = false;\n\t\tsound = true;\n\t\ttotalNPS = 0;\n\t\tcollisionVectorPS = new Vector<ICollider>();\n\t\tcollisionVectorNPS\t = new Vector<ICollider>();\n\t\tcollisionVectorAsteroid = new Vector<ICollider>();\n\t\ttrash\t\t\t\t\t= new Vector<ICollider>();\n\t\tnotifyObservers();\t\n\t}",
"private void initData() {\n ContractList conl = new ContractList();\n String iCard = txtindentify.getText().trim();\n if (conl.getacc(iCard) == 0) {\n txtAcc.setText(\"NEW CUSTOMER\");\n\n } else {\n Customer cus = new Customer();\n CustomerList cl = new CustomerList();\n cus = cl.getcus(iCard);\n txtAcc.setText(Integer.toString(cus.acc));\n\n }\n }",
"private void initialize() {\n }",
"private void initialize() {\n\t\tdisenioVentana();\n\n\t\tdisenioMenu();\n\n\t\tdisenio_Cuerpo();\n\n\t}",
"private void initialize() {\n\t}",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public void init(){\n\t\tEmployee first = new Employee(\"Diego\", \"Gerente\", \"[email protected]\");\n\t\tHighSchool toAdd = new HighSchool(\"Santiago Apostol\", \"4656465\", \"cra 33a #44-56\", \"3145689879\", 30, 5000, \"Jose\", new Date(1, 3, 2001), 3, \"Servicios educativos\", \"451616\", 15, \"Piedrahita\", 45, 1200, 500);\n\t\ttoAdd.addEmployee(first);\n\t\tProduct pilot = new Product(\"jet\", \"A00358994\", 1.5, 5000);\n\t\tFood firstFood = new Food(\"Colombina\", \"454161\", \"cra 18\", \"454611313\", 565, 60000, \"Alberto\", new Date(1, 8, 2015), 6, \"Manufactura\", 4);\n\t\tfirstFood.addProduct(pilot);\n\t\ttheHolding = new Holding(\"Hertz\", \"15545\", \"cra 39a #30a-55\", \"3147886693\", 80, 500000, \"Daniel\", new Date(1, 2, 2015), 5);\n\t\ttheHolding.addSubordinate(toAdd);\n\t\ttheHolding.addSubordinate(firstFood);\n\t}",
"private void initVariables() {\n emailET = (EditText) findViewById(R.id.EmailET_Signup);\n passwordET = (EditText) findViewById(R.id.PasswordET_Signup);\n signupBTN = (Button) findViewById(R.id.SignupBTN_Signup);\n firebaseAuth = FirebaseAuth.getInstance();\n databaseRef = FirebaseDatabase.getInstance().getReference(\"users\");\n signupBTN.setOnClickListener(btnListener);\n }",
"public void init() {\n \n }",
"private void Initialized_Data() {\n\t\t\r\n\t}",
"private void initializeGlobalVariables()\n\t{\n\t\t_continue = (Button) findViewById(R.id.es_continue);\n\t\t\n\t\t_points = (CheckBox) findViewById(R.id.es_points);\n\t\t_score = (CheckBox) findViewById(R.id.es_score);\n\t}",
"protected void initialize() {}",
"protected void initialize() {}",
"public void init() {\n\t\t\n\t}",
"@Override \n public void init() {\n intakeLeft = hardwareMap.crservo.get(\"intakeLeft\");\n intakeRight = hardwareMap.crservo.get(\"intakeRight\");\n topLeft = hardwareMap.servo.get(\"topLeft\");\n bottomLeft = hardwareMap.servo.get(\"bottomRight\");\n topRight = hardwareMap.servo.get(\"topRight\");\n bottomRight = hardwareMap.servo.get(\"bottomRight\");\n lift = hardwareMap.dcMotor.get(\"lift\");\n }",
"private void initializeReferencesAndListeners() {\r\n imgCall1 = findViewById(R.id.imgCall1);\r\n imgCall2 = findViewById(R.id.imgCall2);\r\n imgEmail = findViewById(R.id.imgEmail);\r\n txtEmail = findViewById(R.id.txtEmail);\r\n txtCustomerCarePhone = findViewById(R.id.txtCustomerCarePhone);\r\n txtTollFreePhone = findViewById(R.id.txtTollFreePhone);\r\n\r\n imgCall1.setOnClickListener(this);\r\n imgCall2.setOnClickListener(this);\r\n imgEmail.setOnClickListener(this);\r\n\r\n firebaseFirestore = FirebaseFirestore.getInstance();\r\n }",
"private void initialise() {\n\t\tok=(Button)findViewById(R.id.button1);\n clear=(Button)findViewById(R.id.bExit);\n symptoms=(EditText)findViewById(R.id.edAppointTime);\n other=(EditText)findViewById(R.id.edSecondName);\n headache = (CheckBox) findViewById(R.id.cbHeadache);\n stomach = (CheckBox) findViewById(R.id.cbStomach);\n fever = (CheckBox) findViewById(R.id.cbFever);\n diarrhoea = (CheckBox) findViewById(R.id.cbDiarrhoea);\n hiv = (CheckBox) findViewById(R.id.cbHiv);\n disability = (CheckBox) findViewById(R.id.cbDisability);\n\t}",
"protected void initialize() {\n \t\n }",
"private void init() {\n recyclerView = findViewById(R.id.mRecyclerView);\n noBudgetData = findViewById(R.id.NoData);\n noDataGif = findViewById(R.id.NoDataGif);\n Amount = findViewById(R.id.Amount);\n WalletName = findViewById(R.id.WalletName);\n TotalCost = findViewById(R.id.TotalCost);\n CostHeading = findViewById(R.id.CostHeading);\n CurrentBalance = findViewById(R.id.CurrentBalance);\n toolbar = findViewById(R.id.tool_bar);\n mainLayout = findViewById(R.id.home_layout);\n editButton = findViewById(R.id.editIcon);\n ux = new UX(this, mainLayout);\n tools = new Tools(this);\n databaseHelper = DatabaseHelper.getHelper(this);\n }",
"public void teleopInit() {\n \n }",
"protected void init() {\n\t}",
"protected void init() {\n\t}",
"public Contact() {\n\t}"
] |
[
"0.6926631",
"0.6736953",
"0.668384",
"0.6560588",
"0.65601104",
"0.65028024",
"0.65025944",
"0.6419773",
"0.6390326",
"0.63440233",
"0.6325292",
"0.6324147",
"0.6293597",
"0.6270065",
"0.6238954",
"0.6233209",
"0.6225185",
"0.621459",
"0.62135124",
"0.62011045",
"0.61804605",
"0.6109807",
"0.6105041",
"0.6074124",
"0.6055618",
"0.6052822",
"0.60466164",
"0.6045414",
"0.6026695",
"0.6020197",
"0.600354",
"0.6003527",
"0.60019726",
"0.59938353",
"0.5988305",
"0.59814584",
"0.5979356",
"0.597805",
"0.59696984",
"0.59616786",
"0.5952952",
"0.59336746",
"0.59284824",
"0.5923403",
"0.59184015",
"0.59179723",
"0.591524",
"0.5915204",
"0.59136915",
"0.58953804",
"0.58935726",
"0.58827055",
"0.5880898",
"0.58801275",
"0.5873132",
"0.5864997",
"0.5861528",
"0.5860502",
"0.5856875",
"0.5853622",
"0.58520424",
"0.5851037",
"0.5848005",
"0.58328056",
"0.58258307",
"0.58258307",
"0.58258307",
"0.58258307",
"0.5822016",
"0.5819721",
"0.5816452",
"0.5810993",
"0.5809393",
"0.5805186",
"0.5802882",
"0.5800191",
"0.57995236",
"0.57954496",
"0.5795078",
"0.5780634",
"0.57804567",
"0.577545",
"0.577545",
"0.577545",
"0.5771158",
"0.57680744",
"0.5762168",
"0.57582957",
"0.5756654",
"0.5754258",
"0.5754258",
"0.5752884",
"0.5752613",
"0.5749644",
"0.57472986",
"0.57471615",
"0.5746571",
"0.57445705",
"0.5742623",
"0.5742623",
"0.57399124"
] |
0.0
|
-1
|
Display the information to TextArea
|
public String toString ()
{
String format =
"*****************************************************************" + "\n" +
"\t" + "The name of the contact is "+ firstName + " " + surname + ". " + "\n" +
"\t" + "The ID number of the contact is " + uniqueID + ". " + "\n" +
"\t" + "The phone number of the contact is " + phoneNumber + "." + "\n" +
"*****************************************************************" + "\n";
return format;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void showInfo(String data) {\r\n\t \r\n\t \r\n\ttextArea.append(data);\r\n\t try{\r\n\t\t int len=textArea.getText().length();\r\n\t\t textArea.setCaretPosition(len);\r\n\t\t }\r\n\t\t catch(Exception E){\r\n\t\t\t E.printStackTrace();\r\n\t\t }\r\n\t\r\n this.getContentPane().validate();\r\n }",
"private void generateTextArea()\n {\n //Clear the textArea\n textArea.selectAll();\n textArea.replaceSelection(\"\");\n\n MyCircle circle = panel.getCircle();\n\n //Add all of the required information to the textarea\n textArea.append(String.format(\"AREA: %.2f %n\", circle.getArea()));\n textArea.append(\"RADIUS: \"+circle.getRadius()+\"\\n\");\n textArea.append(\"DIAMETER: \"+circle.getDiameter()+\"\\n\");\n textArea.append(String.format(\"CIRCUMFERENCE: %.2f %n\", circle.getCircumference()));\n }",
"private void writeTextArea(){\r\n try\r\n {\r\n //Fill in \"textArea\" with club names and results\r\n textArea.appendText(\"OK: \" + choiceHomeTeam.getValue() + \" - \" + choiceAwayTeam.getValue() + \" \" \r\n + Integer.valueOf(finalTimeHomeScore.getText()) + \":\"\r\n + Integer.valueOf(finalTimeAwayScore.getText()) + \"(\" \r\n + Integer.valueOf(halfTimeHomeScore.getText()) + \":\" \r\n + Integer.valueOf(halfTimeAwayScore.getText()) + \")\\n\");\r\n textArea.setWrapText(true);\r\n //the letters will be green\r\n textArea.setStyle(\"-fx-text-fill: #4F8A10;\"); \r\n }\r\n //Fill in \"textArea\" with erros\r\n catch(NumberFormatException e)\r\n {\r\n textArea.appendText(\"Error: \" + e.getMessage() + \"\\n\");\r\n textArea.setWrapText(true);\r\n //the letters will be red\r\n textArea.setStyle(\"-fx-text-fill: RED;\"); \r\n } \r\n }",
"private void putDataToTextArea() {\n jTextArea1.setEditable(false);\n jTextArea1.setText(selectedFoods);\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\ttextArea.setText(textArea.getText()+\"\\n\"+s);\n\t\t\t}",
"@FXML\n\t private void setProdInfoToTextArea ( Product prod) {\n\t resultArea.setText(\"Denumire: \" + prod.getDenumire() + \"\\n\" +\"Producator: \" + prod.getProducator() + \"\\n\" + \"Pret: \" + prod.getPrice() + \"\\n\" + \"Marime: \" + prod.getMarime() + \"\\n\" + \"Culoare: \" + prod.getCuloare());\n\t }",
"private void setupTextArea() {\n\t\tcourseInfo = new JTextPane();\n\t\tinfoScrollPane = new JScrollPane(courseInfo);\n\t\tinfoScrollPane.setPreferredSize(new Dimension(350, 175));\n\t\tcourseInfo.setEditable(false);\n\t\tdisplay.add(infoScrollPane);\n\t}",
"public static void fillTextArea() {\r\n\t\tString choice = (String) comboBox.getSelectedItem();\r\n\t\tStatement statement;\r\n\t\ttry {\r\n\t\t\tstatement = connection.createStatement();\r\n\t\t\tresults = statement\r\n\t\t\t\t\t.executeQuery(\"Select People.PeopleName,paragraph.text \"\r\n\t\t\t\t\t\t\t+ \"From People \" + \"inner join paragraph \"\r\n\t\t\t\t\t\t\t+ \"on People.peopleKey=paragraph.peopleKey \"\r\n\t\t\t\t\t\t\t+ \"where PeopleName = '\" + choice + \"'\");\r\n\r\n\t\t\tparagraphtextArea.setText(\"\");\r\n\t\t\tparagraphtextArea.setEditable(true);\r\n\t\t\twhile (results.next()) {\r\n\t\t\t\tparagraphtextArea.append(results.getString(\"text\"));\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private void viewAllInfo(){\r\n try{\r\n Scanner scanner = new Scanner(file);\r\n String info;\r\n\r\n while (scanner.hasNext()){\r\n String line = scanner.nextLine();\r\n String[] components = line.split(separator);\r\n info = \" Name: \" + components[0] + \"\\n\";\r\n info += \" Phone No.: \"+components[1]+\"\\n\";\r\n info += \" Email: \"+components[2]+\"\\n\";\r\n info += \" Address: \"+components[3]+\"\\n\";\r\n textAreaFromAllInfo.append(info+\"\\n\");\r\n }\r\n\r\n }catch (IOException e){\r\n fileError();\r\n }\r\n }",
"@FXML\n void displayPH() {\n generalTextArea.clear();\n clearEverything();\n String employeeListPH = company.printByDate();\n generalTextArea.appendText(employeeListPH);\n\n }",
"JTextArea getDisplay();",
"public TextDisplay(){\n // Default values for all TextDisplays \n fontSize = 20.0f;\n fontColor = new Color(0, 0, 0);\n fieldWidth = 100;\n fieldHeight = 30;\n drawStringX = 0;\n drawStringY = 15;\n input = \"\";\n hasBackground = false;\n \n // TextDisplays' TextArea specifics\n borderWidth = 5;\n borderHeight = 5;\n borderColor = new Color(0, 0, 0, 128);\n backgroundColor = new Color (255, 255, 255, 128);\n }",
"public void refreshDatabaseTextArea() {\n\ttry {\n\tList<OfficesList> offices = db.showOffices();\n\tdatabaseTextArea.setText(\"\");\n\t\tfor (OfficesList officesList : offices) {\n\t\t\tdatabaseTextArea.append(officesList.getOfficeCode() + \": \" + officesList.getCity() + \", \" + officesList.getPhone() + \", \" + officesList.getAddressLine1() + \", \" + officesList.getAddressLine2() + \", \" + officesList.getState() + \", \" + officesList.getCountry() + \", \" + officesList.getPostalCode() + \", \" + officesList.getTerritory() + \"\\n\");\n\t\t}\n\t} catch (SQLException err) {\n\t\terr.printStackTrace();\n\t}\n}",
"@FXML\n void displayPA() {\n generalTextArea.clear();\n clearEverything();\n String employeeListPA = company.print();\n generalTextArea.appendText(employeeListPA);\n\n }",
"public void getText(){\n\t\tnoteText.setText(note.getText());\n\t}",
"private void displayInformation(String message) {\n informationTextArea.setText(EMPTY);\n informationTextArea.setText(message);\n }",
"void displayInfoText(String info) {\n resultWindow.removeAll();\n JLabel label = new JLabel(info);\n label.setFont(resultFont);\n resultWindow.add(label);\n revalidate();\n repaint();\n }",
"public static void majAffichage(String info){\n\t\tInterface.area_Text.setText(\"\\n\" + info);\n\t}",
"public Info(String text) {\n //new JTextArea(text);\n super(text, SwingConstants.CENTER);\n setFont(Scheme.getFont());\n setOpaque(true);\n setSize(getFontMetrics(Scheme.getFont()).stringWidth(getText()) + 13, 25);\n setBackground(Scheme.getBackgroundColor());\n setForeground(Scheme.getForegroundColor());\n setBorder(BorderFactory.createLineBorder(Color.GRAY));\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 displayInfo(String info){\n infoWindow.getContentTable().clearChildren();\n Label infoLabel = new Label(info, infoWindow.getSkin(), \"dialog\");\n infoLabel.setWrap(true);\n infoLabel.setAlignment(Align.center);\n infoWindow.getContentTable().add(infoLabel).width(500);\n infoWindow.show(guiStage);\n }",
"private String getMessage(){\n\t\t\treturn textArea.getText();\n\t}",
"private void refreshInformation () {\n if (textInformation != null) {\n String messageInfo = \"\";\n\n while (!listMessageInfo.isEmpty()) {\n messageInfo = listMessageInfo.getLast() + \"\\n\" + messageInfo;\n listMessageInfo.removeLast();\n }\n\n if (textInformation.getText() != null) {\n textInformation.setText(messageInfo + textInformation.getText());\n } else {\n textInformation.setText(messageInfo);\n }\n }\n }",
"public String getTextoArea() {\n\t\treturn textArea.getText();\n\t}",
"private void textInfoBottom(JPanel panel_TextInfo) {\n\t\tcontentPane.setLayout(gl_contentPane_1);\n\t\ttxtrPreparing = new JTextArea();\n\t\ttxtrPreparing.setBackground(Color.WHITE);\n\t\ttxtrPreparing.setText(\"Preparing... \");\n\t\t\n\t\tJTextArea textArea = new JTextArea();\n\t\ttextArea.setBackground(Color.WHITE);\n\t\ttextArea.setText(\" $10\");\n\t\tGroupLayout gl_panel_TextInfo = new GroupLayout(panel_TextInfo);\n\t\tgl_panel_TextInfo.setHorizontalGroup(\n\t\t\tgl_panel_TextInfo.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel_TextInfo.createSequentialGroup()\n\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t.addComponent(txtrPreparing, GroupLayout.PREFERRED_SIZE, 232, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t.addGap(18)\n\t\t\t\t\t.addComponent(textArea, GroupLayout.DEFAULT_SIZE, 228, Short.MAX_VALUE))\n\t\t);\n\t\tgl_panel_TextInfo.setVerticalGroup(\n\t\t\tgl_panel_TextInfo.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel_TextInfo.createSequentialGroup()\n\t\t\t\t\t.addGroup(gl_panel_TextInfo.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t.addComponent(txtrPreparing, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(textArea, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n\t\t);\n\t\tpanel_TextInfo.setLayout(gl_panel_TextInfo);\n\t}",
"@FXML\n void displayPD() {\n generalTextArea.clear();\n clearEverything();\n String employeeListPD = company.printByDepartment();\n generalTextArea.appendText(employeeListPD);\n }",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tdisplayArea.append(messageToDisplay);\r\n\t\t\t\tdisplayArea.setCaretPosition(displayArea.getText().length());\t//把文本区域中的输入光标定位到文本区域中最后一个字符之后\r\n\t\t\t}",
"private void updateTextArea(Course c) {\n\t\tString info = \"Course Info: \\n\\n\";\n\t\tinfo += \"Name: \" + c.getFullName() + \"\\n\";\n\t\tinfo += \"Course ID: \" + c.getCourseId() + \"\\n\";\n\n\t\tinfo += \"\\n\";\n\n\t\tinfo += \"Course Offerings: \\n\";\n\t\tArrayList<CourseOffering> offerings = adCon.getOfferings(c.getCourseId());\n\t\tif (offerings.size() == 0) {\n\t\t\tinfo += \"None.\\n\";\n\t\t} else {\n\t\t\tfor (int i = 0; i < offerings.size(); i++) {\n\t\t\t\tinfo += offerings.get(i) + \"\\n\";\n\t\t\t}\n\t\t}\n\n\t\tinfo += \"\\n\";\n\n\t\tinfo += \"Pre-Requisites: \\n\";\n\t\tArrayList<Course> preReqs = adCon.getPrereqs(c.getCourseId());\n\t\tif (preReqs.size() == 0) {\n\t\t\tinfo += \"None.\\n\";\n\t\t} else {\n\t\t\tfor (int i = 0; i < preReqs.size(); i++) {\n\t\t\t\tinfo += String.format(\"ID: %d, Name: %s\\n\", preReqs.get(i).getCourseId(), preReqs.get(i).getFullName());\n\t\t\t}\n\t\t}\n\n\t\tcourseInfo.setText(info);\n\t}",
"TEXTAREA createTEXTAREA();",
"public static void editTextArea(String context) {\r\n\t\ttextArea.append(context+\"\\n\");\r\n\t}",
"public void setAreaText(String text) {\n description.setText(text);\n }",
"public void print() {\n\t\tString sqlList = \"select * from commodity;\";\n\t\tcommodityBuffer = new StringBuffer();\n\t\ttry {\n\t\t\tconnection = SQLConnect.getConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\tresultSet = statement.executeQuery(sqlList);\n\n\t\t\t// put the commodity messages into a stringbuffer\n\t\t\twhile ( resultSet.next() ) {\n\t\t\t\tcommodityBuffer.append(resultSet.getString(\"number\")+\" - \"+resultSet.getString(\"name\")+\"\\n\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// show the commodity messages on window\n\t\tcommodityArea = new JTextArea(commodityBuffer.toString());\n\t}",
"public void motif_zone(){\n\n JLabel lbl_Motif = new JLabel(\"Motif du Rapport :\");\n lbl_Motif.setBounds(40, 130, 119, 16);\n add(lbl_Motif);\n\n motif_content = new JTextField();\n motif_content.setBounds(200, 130, 200, 22);\n motif_content.setText(rapport_visite.elementAt(DAO_Rapport.indice)[4]);\n motif_content.setEditable(false);\n add(motif_content);\n\n\n\n }",
"public TextAreaOutputStream( JTextArea control ) {\r\n textControl = control;\r\n }",
"@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}",
"private void updateTextAreaLenght() {\n //\n }",
"public static String getInputText(){\n\t\treturn textArea.getText();\n\t}",
"public void receberMensagem(String mensagem) {\n this.textArea.setText(textArea.getText() + mensagem);//Limpa a Tela do Computador\n this.textArea.appendText(\"\");//Descendo Scroll da tela do Computador\n }",
"private void viewExtractedData() {\n txtViewer.setText(extractedData);\n }",
"public void addTextAreaValue(String str){\n\t\tcenterPanel.addTextAreaValue(str);\n\t}",
"public TextAreaMessageDisplay(@NotNull final TextArea textArea) {\n super();\n Utils4J.checkNotNull(\"textArea\", textArea);\n this.textArea = textArea;\n }",
"public void read() {\r\n\t\tJTextField txtCustomerNo = new JTextField();\r\n\t\ttxtCustomerNo.setText(\"\" + this.getCustomerNo());\r\n\t\tJTextField txtTitle = new JTextField();\r\n\t\ttxtTitle.requestFocus();\r\n\t\tJTextField txtFirstName = new JTextField();\r\n\t\tJTextField txtSurname = new JTextField();\r\n\t\tJTextField txtAddress = new JTextField();\r\n\t\tJTextField txtPhoneNo = new JTextField();\r\n\t\tJTextField txtEmail = new JTextField();\r\n\r\n\t\t\r\n\t\tObject[] message = { \"Customer Number:\", txtCustomerNo, \"Title:\", txtTitle, \"First Name:\", txtFirstName,\r\n\t\t\t\t\"Surname:\", txtSurname, \"Address:\", txtAddress, \"Phone Number:\", txtPhoneNo, \"Email:\", txtEmail, };\r\n\t\t\r\n\r\n\t\tint option = JOptionPane.showConfirmDialog(null, message, \"Enter customer details\",\r\n\t\t\t\tJOptionPane.OK_CANCEL_OPTION);\r\n\t\t\r\n\t\tName txtName = new Name(txtTitle.getText(), txtFirstName.getText(), txtSurname.getText());\r\n\r\n\t\tif (option == JOptionPane.OK_OPTION) {\r\n\t\t\tthis.name = txtName;\r\n\t\t\tthis.address = txtAddress.getText();\r\n\t\t\tthis.phoneNo = txtPhoneNo.getText();\r\n\t\t\tthis.emailAddress = txtEmail.getText();\r\n\t\t}\r\n\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJFrame frame = new JFrame();\r\n\t\t\t\tframe.setLayout(null);\r\n\t\t\t\tJTextArea area = new JTextArea();\r\n\t\t\t\tJScrollPane scrollPane = new JScrollPane(area);\r\n\t\t\t\tscrollPane.setBounds(10, 10, 410, 560);\r\n\t\t\t\tscrollPane.setHorizontalScrollBarPolicy(\r\n\t\t\t\tJScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);\r\n\t\t\t\tscrollPane.setVerticalScrollBarPolicy(\r\n\t\t\t\tJScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\r\n\t\t\t\tframe.add(scrollPane);\r\n\t\t\t\tarea.setBounds(10, 10, 1000, 1000);\r\n//\t\t\t\tframe.add(area);\r\n\t\t\t\t// 设置窗体参数\r\n\t\t\t\tframe.setResizable(false);// 窗体大小固定\r\n\t\t\t\tframe.setTitle(\"Note\");\r\n\t\t\t\tframe.setSize(430, 600);\r\n\t\t\t\tframe.setLocation(300, 100);// 初始位置\r\n\t\t\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\t\t\tframe.setVisible(true);\r\n\t\t\t\tString inPut = insertFileName.getText();\r\n\t\t\t\ttry {\r\n\t\t\t\t\trs = null;\r\n\t\t\t\t\tconn = DriverManager.getConnection(URL, USERNAME, PASSWORD);\r\n\t\t\t\t\tstmt = conn.createStatement();\r\n\t\t\t\t\tString sql = null;\r\n\t\t\t\t\tif(numb==1) {\r\n\t\t\t\t\t\tsql = \"select codeText from sqlTable where sqlTableName = '\"+inPut+\"'\";\r\n\t\t\t\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\t\t\t\tString str_show = \"\";\r\n\t\t\t\t\t\twhile(rs.next()) {\r\n\t\t\t\t\t\t\tstr_show += rs.getString(\"codeText\") + \" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tarea.setText(str_show);\r\n\t\t\t\t\t}else if(numb==2) {\r\n\t\t\t\t\t\tsql = \"select codeText from sqlSelect where sqlSelectName = '\"+inPut+\"'\";\r\n\t\t\t\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\t\t\t\tString str_show = \"\";\r\n\t\t\t\t\t\twhile(rs.next()) {\r\n\t\t\t\t\t\t\tstr_show += rs.getString(\"codeText\") + \" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tarea.setText(str_show);\r\n\t\t\t\t\t}else if(numb==3) {\r\n\t\t\t\t\t\tsql = \"select codeText from sqlInsert where sqlInsertName = '\"+inPut+\"'\";\r\n\t\t\t\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\t\t\t\tString str_show = \"\";\r\n\t\t\t\t\t\twhile(rs.next()) {\r\n\t\t\t\t\t\t\tstr_show += rs.getString(\"codeText\") + \" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tarea.setText(str_show);\r\n\t\t\t\t\t}else if(numb==4) {\r\n\t\t\t\t\t\tsql = \"select codeText from sqlDelete where sqlDeleteName = '\"+inPut+\"'\";\r\n\t\t\t\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\t\t\t\tString str_show = \"\";\r\n\t\t\t\t\t\twhile(rs.next()) {\r\n\t\t\t\t\t\t\tstr_show += rs.getString(\"codeText\") + \" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tarea.setText(str_show);\r\n\t\t\t\t\t}else if(numb==5) {\r\n\t\t\t\t\t\tsql = \"select codeText from signIn where signInName = '\"+inPut+\"'\";\r\n\t\t\t\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\t\t\t\tString str_show = \"\";\r\n\t\t\t\t\t\twhile(rs.next()) {\r\n\t\t\t\t\t\t\tstr_show += rs.getString(\"codeText\") + \" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tarea.setText(str_show);\r\n\t\t\t\t\t}else if(numb==6) {\r\n\t\t\t\t\t\tsql = \"select codeText from MyJPanel where JPanelName = '\"+inPut+\"'\";\r\n\t\t\t\t\t\tSystem.out.println(sql);\r\n\t\t\t\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\t\t\t\tString str_show = \"\";\r\n\t\t\t\t\t\twhile(rs.next()) {\r\n\t\t\t\t\t\t\tstr_show += rs.getString(\"codeText\") + \" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tarea.setText(str_show);\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t}\r\n\t\t\t\t\tconn.close();\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t\t} catch (SQLException 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}",
"private void appendText(String text) {\n textArea.appendText(text);\n }",
"public void showBooking(JTextArea output, Booking b)\r\n {\r\n output.setText(b.toString());\r\n }",
"public void displayText(String line)\n\t{\n\t\tif(line != null)\n\t\t{\n\t\t\tta.setText(line);\n\t\t}\n\t}",
"private ZapTextArea getTxtDescription() {\n if (txtDescription == null) {\n txtDescription = new ZapTextArea();\n txtDescription.setBorder(\n javax.swing.BorderFactory.createBevelBorder(\n javax.swing.border.BevelBorder.LOWERED));\n txtDescription.setLineWrap(true);\n }\n return txtDescription;\n }",
"@Override\r\n public void writeText(String text) {\n String[] lines = text.split(\"\\n\");\r\n JLabel[] labels = new JLabel[lines.length];\r\n for (int i = 0; i < lines.length; i++) {\r\n labels[i] = new JLabel(lines[i]);\r\n labels[i].setFont(new Font(\"Monospaced\", Font.PLAIN, 20));\r\n }\r\n JOptionPane.showMessageDialog(null, labels);\r\n }",
"public void run () {\n\t\t\t\t//This is the method that gets called everytime the GUI needs to be updated.\n\t\t\t\t\n\t\t\t\tchatWindow.append(text);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"public String getInfoText();",
"public void report_number_zone(){\n\n JLabel lbl_num = new JLabel(\"Num\\u00E9ro du Rapport :\");\n lbl_num.setBounds(40, 10, 129, 16);\n add(lbl_num);\n\n num_content = new JTextField();\n num_content.setHorizontalAlignment(SwingConstants.RIGHT);\n num_content.setEditable(false);\n num_content.setBounds(200, 7, 116, 22);\n num_content.setColumns(10);\n num_content.setText(rapport_visite.elementAt(DAO_Rapport.indice)[0]);\n add(num_content);\n\n\n\n\n }",
"public String saveText() {\n\n return \"!Základ!\\n\\n\" + \"Hrubá mzda : \" + wage + \"Kč\\n\" + \"Sleva poplatníka : \" + saveTextChoose + \"\\nSuperhrubá mzda : \" + calc.superGrossWage(wage) + \" Kč\\n\" + \"\\n!Zaměstnavatel odvody z mzdy!\\n\\n\" + \"Socialní pojištění : \" + calc.socialInsuranceEmployer(wage) + \" Kč\\n\" + \"Zdravotní pojištění: \" + calc.healthInsuranceEmployer(wage) + \" Kč\\n\" +\n \"\\n!Zaměstnanec odvody z mzdy!\\n\" + \"\\nSocialní pojištění : \" + calc.socialInsuranceEmployee(wage) + \" Kč\\n\" + \"Zdravotní pojištění : \" + calc.healthInsuranceEmployee(wage) + \" Kč\\n\" +\n \"\\n!Daň ze závislé činnosti!\\n\" + \"\\nZáklad daní :\" + calc.round(wage) + \" Kč\\n\" + \"Daň : \" + calc.tax(wage) + \" Kč \\n\" + \"Daň po odpoču slevy : \" + calc.afterDeductionOfDiscounts(wage, choose) + \" Kč\\n\" +\n \"\\nČistá mzda : \" + calc.netWage(wage, choose) + \" Kč\";\n }",
"@Override\n\tpublic void display() {\n\t\tSystem.out.println(\"Pasos dados por \" + a.nombre + \" \" + a.distancia + \" m = \" + pasosActividad + \" / Pasos en total = \" + pasosTotal);\n\t}",
"public void setTextToTextArea(String message) {\r\n\t\ttextArea.setText(textArea.getText() + System.lineSeparator() + message);\r\n\t}",
"private void setupFeedbackDisplayTextArea(){\n\t\tfeedback_display = new JTextArea();\n\t\tfeedback_display.setFont(new Font(\"Calibri Light\", Font.PLAIN, 25));\n\t\tfeedback_display.setEditable(false);\n\t\tfeedback_display.setLineWrap(true);\n\t\tfeedback_display.setWrapStyleWord(true);\n\t\tfeedback_display.setOpaque(true);\n\n\t\tJScrollPane scrolling_pane = new JScrollPane(feedback_display);\n\t\tadd(scrolling_pane);\n\t\tscrolling_pane.setBounds(32, 222, 1284, 252);\n\t\tscrolling_pane.setBackground(Color.WHITE);\n\t}",
"public void bilan_zone() {\n\n JLabel lbl_Bilan = new JLabel(\"BILAN :\");\n lbl_Bilan.setBounds(40, 170, 119, 16);\n add(lbl_Bilan);\n\n bilan_content = new JTextArea();\n bilan_content.setBounds(100, 170, 200, 150);\n bilan_content.setText(rapport_visite.elementAt(DAO_Rapport.indice)[3]);\n bilan_content.setLineWrap(true);\n bilan_content.setWrapStyleWord(true);\n bilan_content.setEditable(false);\n add(bilan_content);\n\n\n }",
"private void makeLabels() {\n infoPanel = new JPanel();\n\n infoText = new JTextArea(30,25);\n\n infoPanel.add(infoText);\n }",
"public MarcoAreaTexto() {\r\n \r\n super(\"Demostración JTextArea\");\r\n Box cuadro = Box.createHorizontalBox();\r\n String demo = \"Texto de ejemplo\\npara mostrar como\\n\" +\r\n \"se copia texto por\\neventoexterno (Salu2)\";\r\n \r\n areaTexto1 = new JTextArea(demo, 10, 15); \r\n cuadro.add(new JScrollPane(areaTexto1) );\r\n copiar = new JButton(\"Copiar >>> \");\r\n cuadro.add(copiar);\r\n copiar.addActionListener(\r\n \r\n new ActionListener() {\r\n \r\n public void actionPerformed(ActionEvent event) {\r\n \r\n areaTexto2.setText(areaTexto1.getSelectedText() );\r\n } //Fin del método actionPerformed\r\n } //Clase interna anónima\r\n ); //Clase interna anónima\r\n \r\n areaTexto2 = new JTextArea(10, 15);\r\n areaTexto2.setEditable(false);\r\n cuadro.add(new JScrollPane(areaTexto2) );\r\n add(cuadro);\r\n }",
"private void displayContactDetails() {\n bindTextViews();\n populateTextViews();\n }",
"void updateTextArea(final String text) {\r\n\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tJCoresConsole.this.textArea.append(text);\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"public TextArea()\n {\n super(AreaId.TEXT, new AsciiByteFormatter());\n }",
"private void display() {\n TextView textview = (TextView) findViewById(R.id.textView);\n EditText editText = (EditText) findViewById(R.id.editNumber) ;\n textview.setText(\"TEXT\");\n editText.setText(\"\");\n\n }",
"public void displayMessage(String text)\r\n {\r\n Message message = new Message();\r\n message.what = GUIManager.DISPLAY_INFO_TOAST;\r\n message.obj = text;\r\n mGUIManager.sendThreadSafeGUIMessage(message);\r\n }",
"void showOrdersText();",
"public String visualizzaCampo(){\n\t\tString info= new String(\"Nome: \"+ nome +\"\\n\" +\"Descrizione: \" + descrizione+ \"\\n\"+ \"Obbligatoria: \" + obbligatorio +\"\\n\");\n\t\treturn info;\n\t}",
"public static void GenerateTextArea(int id)\n\t{\n\t\tareaHeight += 210;\n\t\tHome.createArticle.setPreferredSize(new Dimension(800, areaHeight));\n\t\ti++; \n\t\tgbc.gridx = 0;\n\t\tgbc.gridy = i;\n\t\tgbc.gridwidth = 1;\n\t\tgbc.insets = new Insets(10, 0, 0, 5);\n\t\tgbc.anchor = GridBagConstraints.LINE_END;\n\t\tHome.createArticle.add(textLabels.get(id), gbc);\n\t\t\n\t\tgbc.gridx = 1;\n\t\tgbc.gridwidth = 3;\n\t\tgbc.insets = new Insets(10, 0, 0, 0);\n\t\tgbc.anchor = GridBagConstraints.LINE_START;\n\t\tgbc.weighty = 10;\n\t\tHome.createArticle.add(textAreas.get(id), gbc);\n\t}",
"@Override\r\n\tpublic void getInfo() {\n\t\tSystem.out.println(\"=== 선생 정보 ===\");\r\n\t\tsuper.getInfo();\r\n\t\tSystem.out.println(\"과목 : \" + text);\r\n\t}",
"@Override\n public void update() {\n CommandNodeGameState gs = (CommandNodeGameState) state;\n String acc = String.valueOf(gs.getAcc());\n accView.setText(acc);\n String bak = String.valueOf(gs.getBak());\n bakView.setText(bak);\n String last = String.valueOf(gs.getLast());\n lastView.setText(last);\n String mode = String.valueOf(gs.getMode());\n modeView.setText(mode);\n String idle = String.valueOf(0);\n idleView.setText(idle);\n\n StringBuilder builder = new StringBuilder();\n for (int i = 0; i < gs.lineCount(); i++) {\n builder.append(gs.getLine(i).toString());\n builder.append(\"\\n\");\n }\n textArea.setText(builder.toString());\n\n if (state.isActive()) {\n highlightedLine = gs.getSelectedLine();\n } else {\n highlightedLine = null;\n }\n invalidate();\n }",
"@Override\n\tpublic void showContents() {\n\t\tprogram.add(returnToMain);\n\t\tprogram.add(congratMessage);\n\t\tprogram.setBackground(Color.DARK_GRAY);\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic String getText() {\n\t\t\t\treturn text;\r\n\t\t\t}",
"@Override\n public void display(JPasswordField passFirstnameTextField,\n JTextField userFirstnameTextField,\n JTextField userLastnameTextField,\n JTextField DoBTextField,\n JTextField contactNumberTextField,\n JTextField emailTextField,\n JTextField salaryTextField,\n JTextField positionStatusTextField,\n JTextField nameTextField,\n JTextField buildingNameTextField,\n JTextField streetTextField,\n JTextField buildingNoTextField,\n JTextField areaTextField,\n JTextField cityTextField,\n JTextField countryTextField,\n JTextField postcodeTextField){\n\n\n\n passFirstnameTextField.setText(getPassword());\n userFirstnameTextField.setText(getFirstname());\n userLastnameTextField.setText(getLastname());\n DoBTextField.setText(DMY.format(getDoB()));\n contactNumberTextField.setText(getContactNumber());\n emailTextField.setText(getEmail());\n salaryTextField.setText(String.valueOf(getSalary()));\n positionStatusTextField.setText(getPositionStatus());\n homeAddress.display(nameTextField,buildingNameTextField,streetTextField,\n buildingNoTextField,areaTextField,cityTextField,\n countryTextField,postcodeTextField);\n }",
"public void setUpTextArea() {\n noteContent.textProperty().addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {\n int remaining = NoteText.NOTE_MAX_CHARACTER_LIMIT - newValue.length();\n feedbackLabel.setStyle(\"-fx-font-size: 12; -fx-text-fill: white;\");\n feedbackLabel.setText(\"Characters remaining: \" + remaining);\n }\n });\n\n noteContent.setTextFormatter(new TextFormatter<String>(text ->\n text.getControlNewText().length() <= NoteText.NOTE_MAX_CHARACTER_LIMIT\n ? text : null));\n }",
"private void updateText() {\n updateDateText();\n\n TextView weightText = findViewById(R.id.tvWeight);\n TextView lowerBPText = findViewById(R.id.tvLowerBP);\n TextView upperBPText = findViewById(R.id.tvUpperBP);\n\n mUser.weight.sortListByDate();\n mUser.bloodPressure.sortListsByDate();\n\n double weight = mUser.weight.getWeightByDate(mDate.getTime());\n int upperBP = mUser.bloodPressure.getUpperBPByDate(mDate.getTime());\n int lowerBP = mUser.bloodPressure.getLowerBPByDate(mDate.getTime());\n\n weightText.setText(String.format(Locale.getDefault(), \"Paino\\n%.1f\", weight));\n lowerBPText.setText(String.format(Locale.getDefault(), \"AlaP\\n%d\", lowerBP));\n upperBPText.setText(String.format(Locale.getDefault(), \"YläP\\n%d\", upperBP));\n\n ((EditText)findViewById(R.id.etWeight)).setText(\"\");\n ((EditText)findViewById(R.id.etLowerBP)).setText(\"\");\n ((EditText)findViewById(R.id.etUpperBP)).setText(\"\");\n }",
"public void display()\n\t{\n\t\tSystem.out.println(\"Bike No.\\t\"+\n\t\t\t\t\"Phone no.\\t\"+\n\t\t\t\t\"Name\\t\"+\n\t\t\t\t\"No. of days\\t\"+\n\t\t\t\t\"Charge\");\n\t\tSystem.out.println(bno+\n\t\t\t\t\"\\t\"+phno+\n\t\t\t\t\"\\t\"+name+\n\t\t\t\t\"\\t\"+days+\n\t\t\t\t\"\\t\"+charge);\n\t}",
"public void displayInfo(Actor actor, String info){\n infoWindow.getContentTable().clearChildren();\n infoWindow.getContentTable().add(actor).row();\n Label infoLabel = new Label(info, infoWindow.getSkin(), \"dialog\");\n infoLabel.setWrap(true);\n infoLabel.setAlignment(Align.center);\n infoWindow.getContentTable().add(infoLabel).width(500);\n infoWindow.show(guiStage);\n }",
"private JTextArea getDetailsTextArea() {\r\n\t\tif (detailsTextArea == null) {\r\n\t\t\ttry {\r\n\t\t\t\tdetailsTextArea = new JTextArea();\r\n\t\t\t} catch (java.lang.Throwable e) {\r\n\t\t\t\t// TODO: Something\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn detailsTextArea;\r\n\t}",
"public void output() {\n System.out.printf(\"Dien tich: %.2f \\n\", getArea());\n System.out.printf(\"Chu vi: %.2f \\n\", getPeripheral());\n }",
"public void praticien_zone(){\n\n JLabel lbl_Praticien = new JLabel(\"Praticien :\");\n lbl_Praticien.setBounds(40, 50, 119, 16);\n add(lbl_Praticien);\n\n\n\n JTextField praticien = new JTextField();\n praticien.setBounds(200, 50, 200, 22);\n praticien.setEditable(false);\n try {\n praticien.setText((DAO_Praticien.nomPraticien(rapport_visite.elementAt(DAO_Rapport.indice)[1])));\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n add(praticien);\n\n }",
"public void run () {\n\t\t\t\t//This is the method that gets called everytime the GUI needs to be updated.\n\t\t\t\t\n\t\tuserText.setEditable(tof);\n\t\t\t}",
"private void setTextArea(String type)\n\t{\n\t\tif (type.equals(\"CreditTransaction\"))\n\t\t\ttaDSIXML.setText(mCreditTran);\n\t\telse if (type.equals(\"GiftTransaction\"))\n\t\t\ttaDSIXML.setText(mGiftTran);\t\n\t}",
"public void show(){\n sensorTextView.setText(String.format(Locale.US,\"Earth\\nx: %f\\n\" +\"y: %f\\nz: %f\", earthMag[0], earthMag[1], earthMag[2]));\n }",
"public void display()\n\t{\n\t\tSystem.out.println(data+\" \");\n\t}",
"public void run()\r\n\r\n\t {\r\n\r\n\t while(true)\r\n\r\n\t {\r\n\r\n\t try{\r\n\t\t String s;\r\n\t\t s=br.readLine();\r\n\r\n\t ta.append(\"pagal: \"+s+\"\\n\");//Append to TextArea\r\n\r\n\t }catch(Exception e) {}\r\n\r\n\t }\r\n\r\n\t }",
"String userInputFromTextArea();",
"public void setInfoText(String infoText);",
"public void setMessage(String text) {\r\n\t\tif (this.outputTextArea == null)\r\n\t\t\treturn;\r\n\t\tif (text != null && text.length() > 0) {\r\n\t\t\tthis.outputTextArea.setText(text.replaceAll(\"\\n\", \" \"));\r\n\t\t\tthis.outputTextArea.setRows(2);\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis.outputTextArea.setText(\"\");\r\n\t}",
"public TextInfoBox getTextInfoBox()\r\n {\r\n return textInfoBox;\r\n }",
"public void display()\r\n {\r\n System.out.println(\"Description: \" +description);\r\n if(!customersName.equals(\"\")) {\r\n System.out.println(\"Customer Name: \" +customersName);\r\n }\r\n }",
"private void updateInformation(){\n view.getPrompt().setText(getPrompt());\n view.getScore().setText(getScore());\n }",
"public TextArea getInputPane();",
"private void showInfo(String message){ infoLabel.setText(message);}",
"public void Display()\r\n \t{\r\n\t SimpleDateFormat sdf=new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\r\n\t try{\r\n\t\t txtID.setText(rsTution.getString(1));\r\n\t\t txtName.setText(rsTution.getString(2));\r\n\t\t txtYear.setText(rsTution.getString(3));\r\n\t\t txtMonth.setText(rsTution.getString(4));\r\n\t\t txtPDate.setText(sdf.format(rsTution.getDate(5)));\r\n\t\t txtFees.setText(rsTution.getString(6));\r\n\r\n\t }catch(SQLException sqle)\r\n\t {System.out.println(\"Display Error:\"+sqle);\r\n\t }\r\n \t}",
"private void postInfo(String text) {\r\n\t\tLabel hLabel = new Label(labelInfo.getText());\r\n\t\thLabel.addStyleName(Styles.battle_info);\r\n\t\t//add the old info to the history\r\n\t\tvPanelInfoHistory.insert(hLabel, 0);\r\n\t\tlabelInfo.setText(SafeHtmlUtils.htmlEscape(text));\r\n\t}",
"private void buildOutput() {\n\t\tsalesSlip.addName(itemField.getText());\n\t\tsalesSlip.addPrice(Double.parseDouble(costField.getText()), Integer.parseInt(quantityField.getText()));\n\t\tsalesSlip.addQuantity(Integer.parseInt(quantityField.getText()));\n\t\tsalesSlip.updatePrice();\n\t\t\n\t\ttextArea.append(salesSlip.generateOutput(salesSlip.numItems-1));\n\t\ttextArea.append(\"\\n\");\n\t\t\n\t\ttotalArea.setText(\"$\" + salesSlip.totalPrice);\n\t}",
"@FXML\n void printAcc(ActionEvent event) {\n \tString accInfo = db.printAccounts();\n \tmessageArea.setText(accInfo);\n }",
"public String info(){\r\n String info =\"\";\r\n info += \"id karyawan : \" + this.idkaryawan + \"\\n\";\r\n info += \"Nama karyawan : \" + this.namakaryawan + \"\\n\";\r\n return info;\r\n }",
"public String displayText(){\n String displayText = \"\";\n displayText = \"Title: \" + getTitle() + \"\\nAuthor: \" + getAuthor() + \"\\nDescription: \" +getDescription();\n\n return displayText;\n\n }",
"private void txt() {\n\n\t}",
"public void setText() {\n\t\ttxtPower.setText(\"\");\n\t\ttxtPower.setText(\"Battery Info: \\n\" + getBatteryInfo() + \"\\n\"\n\t\t\t\t+ \"Battery Status: \" + getStatus() + \"\\n\"\n\t\t\t\t+ \"External AC Power: \" + getExtPowerStatus() + \"\\n\"\n\t\t\t\t+ \"External USB Power: \" + getUsbPowerStatus() + \"\\n\"\n\t\t\t\t+ \"Current level: \" + getCurrentLevel() + \"\\n\"\n\t\t);\n\t}",
"@Override\n public void actionPerformed(ActionEvent e)\n {\n area2.setText(area1.getText());\n }",
"public void displayCustomerDetails(){\n\t\tStringBuffer fullname = new StringBuffer();//Creates new string buffer\n\t\tStringBuffer fulladdress = new StringBuffer();//Creates new string buffer\n\t\tfullname.append(\"Full Name: \" + fname + \" \" + lname);\n\t\tfulladdress.append(\"Full Address: \" + address1 + \", \" + address2 + \", \" + postcode);\n\t\tSystem.out.println(fullname);\n\t\tSystem.out.println(fulladdress);\n\t\tSystem.out.println(\"Account No: \" + linkedacc);\n\t\tSystem.out.println(\"Customer Ref: \" + custref);\n\t}"
] |
[
"0.7437389",
"0.7193509",
"0.6849007",
"0.6805198",
"0.68035007",
"0.6797479",
"0.6758558",
"0.66932684",
"0.66886985",
"0.66501826",
"0.66416407",
"0.65659356",
"0.654475",
"0.6459125",
"0.6421997",
"0.6328417",
"0.6315699",
"0.63017696",
"0.6296684",
"0.62860006",
"0.62790745",
"0.62593687",
"0.6247923",
"0.62312007",
"0.62182325",
"0.6202231",
"0.61519986",
"0.61492336",
"0.6128823",
"0.610977",
"0.61074686",
"0.6089571",
"0.606936",
"0.6052399",
"0.6048077",
"0.6030655",
"0.6025145",
"0.6019221",
"0.60066783",
"0.59860444",
"0.5976521",
"0.59674716",
"0.59453815",
"0.5940986",
"0.5939846",
"0.58932865",
"0.58925074",
"0.5891852",
"0.588202",
"0.58720887",
"0.5864827",
"0.58587945",
"0.5855817",
"0.5842313",
"0.5836186",
"0.5832669",
"0.5825823",
"0.582261",
"0.5818521",
"0.58170015",
"0.5814303",
"0.58123374",
"0.58107847",
"0.5806031",
"0.58053416",
"0.5805298",
"0.5800512",
"0.57982355",
"0.57977176",
"0.5797476",
"0.579269",
"0.57857233",
"0.57815397",
"0.57770675",
"0.5769663",
"0.57662493",
"0.57635903",
"0.5762209",
"0.57605135",
"0.5750515",
"0.57489705",
"0.5745681",
"0.5745368",
"0.57431966",
"0.5740977",
"0.57358664",
"0.5732194",
"0.57305163",
"0.5730328",
"0.57301265",
"0.5727936",
"0.5726974",
"0.5723394",
"0.57209265",
"0.57188284",
"0.57176256",
"0.570749",
"0.57069385",
"0.57062596",
"0.5705678",
"0.570503"
] |
0.0
|
-1
|
Created by j_cho on 2017/10/03.
|
public interface ITabSetting {
CircularTabLayout.Tab getTabItem(int position);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"private void poetries() {\n\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public final void mo51373a() {\n }",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n void init() {\n }",
"@Override\n protected void getExras() {\n }",
"@Override\n public void init() {\n }",
"private void init() {\n\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n protected void 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 }",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n\tpublic void nghe() {\n\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 public void init() {\n\n }",
"@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\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n public void init() {}",
"private void kk12() {\n\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n protected void init() {\n }",
"@Override\r\n\tpublic void init() {}",
"private void strin() {\n\n\t}",
"public void mo4359a() {\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n public void initialize() { \n }",
"private void init() {\n\n\n\n }",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"private void m50366E() {\n }",
"public void mo6081a() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"protected boolean func_70814_o() { return true; }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"Petunia() {\r\n\t\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tprotected void initialize() {\n\t}"
] |
[
"0.60673046",
"0.5876308",
"0.58462745",
"0.5811991",
"0.57698727",
"0.57698727",
"0.5731713",
"0.56905794",
"0.5684854",
"0.56768554",
"0.566104",
"0.5607615",
"0.5599526",
"0.55907714",
"0.5578553",
"0.5577039",
"0.55615443",
"0.5557981",
"0.55480623",
"0.55401224",
"0.55340433",
"0.55092597",
"0.5490267",
"0.5490267",
"0.5490267",
"0.5490267",
"0.5490267",
"0.54830563",
"0.54830456",
"0.54776335",
"0.5473146",
"0.5471677",
"0.5469808",
"0.5465597",
"0.54475105",
"0.5441579",
"0.54415536",
"0.5434924",
"0.5434924",
"0.5432713",
"0.5432713",
"0.5432713",
"0.5432713",
"0.5432713",
"0.5432713",
"0.54284525",
"0.5417515",
"0.5415345",
"0.5411343",
"0.5407733",
"0.5397349",
"0.5390479",
"0.5390479",
"0.5390479",
"0.5386626",
"0.5386626",
"0.53849375",
"0.53849375",
"0.5378437",
"0.5378437",
"0.5378437",
"0.53696597",
"0.53696597",
"0.53696597",
"0.5367781",
"0.5365579",
"0.5361479",
"0.5360025",
"0.5354554",
"0.5352902",
"0.53420246",
"0.53373635",
"0.5318522",
"0.5312141",
"0.5305906",
"0.530448",
"0.5300291",
"0.5291803",
"0.5290507",
"0.5287157",
"0.52762157",
"0.52668995",
"0.5262845",
"0.52595454",
"0.52595454",
"0.52595454",
"0.52595454",
"0.52595454",
"0.52595454",
"0.52595454",
"0.525467",
"0.52436346",
"0.52355146",
"0.5231106",
"0.5230076",
"0.52299297",
"0.5225049",
"0.52176094",
"0.51948017",
"0.5186367",
"0.5184181"
] |
0.0
|
-1
|
Referenced classes of package com.facebook.share.internal: ShareContentValidation
|
private static class <init> extends <init>
{
public void validate(SharePhoto sharephoto)
{
ShareContentValidation.access$200(sharephoto, this);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static boolean canShowWebCheck(ShareContent shareContent) {\r\n if (!canShowWebTypeCheck(shareContent.getClass())) {\r\n return false;\r\n }\r\n if (shareContent instanceof ShareOpenGraphContent) {\r\n try {\r\n ShareInternalUtility.toJSONObjectForWeb((ShareOpenGraphContent) shareContent);\r\n } catch (Exception e) {\r\n Utility.logd(TAG, \"canShow returned false because the content of the Opem Graph object can't be shared via the web dialog\", e);\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"public static void checkAndClickShareOnFacebookButton() {\r\n\t\t\tcheckNoSuchElementExceptionByXPath(\"//*[@id=\\\"fackBook2\\\"]/img\", \"\\\"Share on Facebook\\\" button\");\r\n\t\t\tcheckElementNotInteractableExceptionByXPath(\"//*[@id=\\\"fackBook2\\\"]/img\", \"\\\"Share on Facebook\\\" button\");\r\n\t\t}",
"private void genSharedPostOnFacebook () {\n shareLinkContent = new ShareLinkContent.Builder()\n .setContentTitle(\"Your Title\")\n .setContentDescription(\"Your Description\")\n .setContentUrl(Uri.parse(\"URL[will open website or app]\"))\n .setImageUrl(Uri.parse(\"image or logo [if playstore or app store url then no need of this image url]\"))\n .build();\n\n }",
"boolean isActivityNotValid(ExoSocialActivity activity, ExoSocialActivity comment) throws Exception;",
"public interface FacebookShareListener {\n void OnShareSuccess(Sharer.Result result);\n void onShareCancel();\n void OnShareError(FacebookException error);\n}",
"public void postToFB(View view) {\n\n// Toast.makeText(getBaseContext(), \"Posted Story on Timeline\", Toast.LENGTH_SHORT).show();\n\n if (ShareDialog.canShow(ShareLinkContent.class)) {\n ShareLinkContent linkContent = null;\n try {\n linkContent = new ShareLinkContent.Builder()\n .setContentTitle(basic.getString(\"title\"))\n .setContentUrl(Uri.parse(basic.getString(\"viewItemURL\")))\n .setContentDescription(\n ((TextView) findViewById(R.id.price)).getText().toString() + \"\\n\" +\n ((TextView) findViewById(R.id.shippingInfo)).getText().toString()\n )\n .setImageUrl(Uri.parse(basic.getString(\"galleryURL\")))\n .build();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n// if(linkContent != null)\n shareDialog.show(linkContent);\n\n// ShareLinkContent content = new ShareLinkContent.Builder()\n// .setContentUrl(Uri.parse(\"https://developers.facebook.com\"))\n// .build();\n//\n// shareDialog.show(content);\n\n\n }\n }",
"@Override\n public View checkContentValidation() {\n return null;\n }",
"@Override\n public View checkContentValidation() {\n return null;\n }",
"private void _fbAppShare(Activity act, UiLifecycleHelper uiHelper, String link, String description)\n {\n try {\n FacebookDialog shareDialog = new FacebookDialog.ShareDialogBuilder(act)\n .setLink(link != null && !link.equals(\"\") ? link : \"\")\n .setDescription(description != null && !description.equals(\"\") ? description : \"\")\n .build();\n uiHelper.trackPendingDialogCall(shareDialog.present());\n } catch (FacebookException ex) {\n String urlParameters = String.format(Constants.FB_SHARE_URL,\n act.getString(R.string.app_url), act.getString(R.string.app_name));\n Utilities.getInstance().openURL(act, urlParameters);\n }\n }",
"public boolean canShare();",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif (AppConstants.ENABLE_FACEBOOK_SHARE) {\n\t\t\tFacebookManager.getInstance().onActivityResult(requestCode,\n\t\t\t\t\tresultCode, data, this);\n\t\t}\n\n\t}",
"@Test\r\n\tpublic void verifySocialMediaButtons(){\r\n\t\tdriver.get(url+radioUrl+audioUrl);\r\n\t\tjse.executeScript(\r\n\t\t\t\t\"if(document.readyState==='complete'){\"\r\n\t\t\t\t+ \"document.getElementsByTagName('iframe')[0].onload = function(){\"\r\n\t\t\t\t//+ \"document.querySelector('div.fb-share-button.fb_iframe_widget').click();\"\r\n\t\t\t\t+ \"document.getElementsByTagName('iframe')[0].click();\"\r\n\t\t\t\t+ \"document.querySelector('button[title=Share]').click();}}\"\r\n\t\t\t\t, \"\");\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t}",
"public void shareToFacebook(View view) {\n // more config: https://developers.facebook.com/docs/sharing/android\n\n String quoteMessage = \"Check out this fantastic film: \" + movieTitle\n + \" (\" + movieReleaseDate + \") -- MyMovieMemoir App\";\n\n if (ShareDialog.canShow(ShareLinkContent.class)) {\n ShareLinkContent linkContent = new ShareLinkContent.Builder()\n .setQuote(quoteMessage)\n .setContentUrl(Uri.parse(imageURL))\n .build();\n shareDialog.show(linkContent);\n }\n }",
"public void referToSocialServices(){\r\n\t\t//here is some code that we do not have access to\r\n\t}",
"@Override\n\tpublic boolean validateContent()\n\t{\n\t\treturn true;\n\t}",
"private boolean checkIfHasRequiredFields(BoxItem shareItem){\n return shareItem.getSharedLink() != null && shareItem.getAllowedSharedLinkAccessLevels() != null;\n }",
"public interface ShareController {\r\n\r\n\t/** Share with dialog */\r\n\tvoid share();\r\n\r\n\t/** Share natively */\r\n\tvoid getBase64();\r\n}",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\n\t\t\t//for facebook share dialog responses\n\t\t\tuiHelper.onActivityResult(requestCode, resultCode, data, new FacebookDialog.Callback() {\n\t\t\t@Override\n\t\t\tpublic void onError(FacebookDialog.PendingCall pendingCall, Exception error, Bundle data) {\n\t\t\t\tLog.e(TAG, String.format(\"Error: %s\", error.toString()));\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onComplete(FacebookDialog.PendingCall pendingCall, Bundle data) {\n\t\t\t\tLog.i(TAG, \"Success!\");\n\t\t\t}\n\t\t});\n\t}",
"public abstract Result check(WebBundleDescriptor descriptor);",
"public static Bundle m6388a(UUID uuid, ShareContent shareContent, boolean z) {\n C1749x.m6064a((Object) shareContent, \"shareContent\");\n C1749x.m6064a((Object) uuid, \"callId\");\n if (shareContent instanceof ShareLinkContent) {\n return C1833f.m6380a((ShareLinkContent) shareContent, z);\n }\n if (shareContent instanceof SharePhotoContent) {\n SharePhotoContent sharePhotoContent = (SharePhotoContent) shareContent;\n return C1833f.m6386a(sharePhotoContent, C1838i.m6462a(sharePhotoContent, uuid), z);\n } else if (shareContent instanceof ShareVideoContent) {\n ShareVideoContent shareVideoContent = (ShareVideoContent) shareContent;\n return C1833f.m6387a(shareVideoContent, C1838i.m6460a(shareVideoContent, uuid), z);\n } else if (shareContent instanceof ShareOpenGraphContent) {\n ShareOpenGraphContent shareOpenGraphContent = (ShareOpenGraphContent) shareContent;\n try {\n return C1833f.m6385a(shareOpenGraphContent, C1838i.m6466a(C1838i.m6465a(uuid, shareOpenGraphContent), false), z);\n } catch (UUID uuid2) {\n z = new StringBuilder();\n z.append(\"Unable to create a JSON Object from the provided ShareOpenGraphContent: \");\n z.append(uuid2.getMessage());\n throw new FacebookException(z.toString());\n }\n } else if (shareContent instanceof ShareMediaContent) {\n ShareMediaContent shareMediaContent = (ShareMediaContent) shareContent;\n return C1833f.m6381a(shareMediaContent, C1838i.m6461a(shareMediaContent, uuid2), z);\n } else if (shareContent instanceof ShareCameraEffectContent) {\n ShareCameraEffectContent shareCameraEffectContent = (ShareCameraEffectContent) shareContent;\n return C1833f.m6378a(shareCameraEffectContent, C1838i.m6450a(shareCameraEffectContent, uuid2), z);\n } else if ((shareContent instanceof ShareMessengerGenericTemplateContent) != null) {\n return C1833f.m6382a((ShareMessengerGenericTemplateContent) shareContent, z);\n } else {\n if ((shareContent instanceof ShareMessengerOpenGraphMusicTemplateContent) != null) {\n return C1833f.m6384a((ShareMessengerOpenGraphMusicTemplateContent) shareContent, z);\n }\n return (shareContent instanceof ShareMessengerMediaTemplateContent) != null ? C1833f.m6383a((ShareMessengerMediaTemplateContent) shareContent, z) : null;\n }\n }",
"public void doShare(Platform$ShareParams var1_1) {\n block70: {\n block69: {\n block68: {\n block62: {\n block61: {\n block60: {\n var2_2 = this;\n var3_3 = cn.sharesdk.facebookmessenger.a.a();\n var5_6 = var1_1;\n var4_4 = new FacebookMessenger$1(this, var1_1);\n var1_1.getShareType();\n var6_7 = var1_1.getImageUrl();\n var4_4 = var1_1.getImagePath();\n var7_8 = var1_1.getTitle();\n var8_9 = var1_1.getUrl();\n var9_10 = var1_1.getImageArray();\n var10_11 = var1_1.getComment();\n var11_12 = new ArrayList<Object>();\n var12_13 = TextUtils.isEmpty((CharSequence)var4_4);\n if (var12_13 != 0) break block60;\n var4_4 = var3_3.a((String)var4_4);\n var11_12.add(var4_4);\nlbl28:\n // 9 sources\n\n while (true) {\n continue;\n break;\n }\n }\n var12_13 = TextUtils.isEmpty((CharSequence)var4_4);\n if (var12_13 != 0) break block61;\n var14_15 = new File((String)var4_4);\n var15_16 = var14_15.exists();\n if (var15_16 != 0) ** GOTO lbl28\n }\n var15_16 = TextUtils.isEmpty((CharSequence)var6_7);\n if (var15_16 != 0) break block62;\n var4_4 = MobSDK.getContext();\n var4_4 = BitmapHelper.downloadBitmap((Context)var4_4, (String)var6_7);\n var16_18 = TextUtils.isEmpty((CharSequence)var4_4);\n if (var16_18) ** GOTO lbl28\n var9_10 = new File((String)var4_4);\n var16_18 = var9_10.exists();\n if (!var16_18) ** GOTO lbl28\n var11_12.add(var4_4);\n ** GOTO lbl28\n }\n if (var9_10 == null) ** GOTO lbl28\n var15_16 = ((String[])var9_10).length;\n if (var15_16 <= 0) ** GOTO lbl28\n var15_16 = (int)TextUtils.isEmpty((CharSequence)var8_9);\n if (var15_16 != 0) ** GOTO lbl28\n var15_16 = ((String[])var9_10).length;\n var12_13 = 0;\n var14_15 = null;\n while (true) {\n block67: {\n block64: {\n block66: {\n block65: {\n block63: {\n if (var12_13 < var15_16) ** break;\n ** continue;\n var17_20 = var9_10[var12_13];\n var18_21 = \"http\";\n var19_22 = var17_20.startsWith((String)var18_21);\n if (!var19_22) break block63;\n var18_21 = MobSDK.getContext();\n var17_20 = BitmapHelper.downloadBitmap((Context)var18_21, (String)var17_20);\n }\n var18_21 = new File((String)var17_20);\n var20_23 = var18_21.exists();\n if (!var20_23) break block64;\n var21_24 = \"/data/\";\n var20_23 = var17_20.startsWith((String)var21_24);\n if (!var20_23) break block65;\n var21_24 = MobSDK.getContext();\n var22_17 = \"images\";\n var22_17 = ResHelper.getCachePath((Context)var21_24, var22_17);\n var23_25 = new StringBuilder();\n var24_26 = var9_10;\n var13_14 = var7_8;\n var25_27 = System.currentTimeMillis();\n var23_25.append(var25_27);\n var9_10 = var18_21.getName();\n var23_25.append((String)var9_10);\n var9_10 = var23_25.toString();\n var21_24 = new File(var22_17, (String)var9_10);\n var9_10 = var21_24.getAbsolutePath();\n var21_24.createNewFile();\n var16_19 = ResHelper.copyFile((String)var17_20, (String)var9_10);\n if (var16_19) {\n var18_21 = var21_24;\n }\n break block66;\n }\n var24_26 = var9_10;\n var13_14 = var7_8;\n }\n var9_10 = var18_21.getAbsolutePath();\n var11_12.add(var9_10);\n break block67;\n }\n var24_26 = var9_10;\n var13_14 = var7_8;\n }\n ++var12_13;\n var7_8 = var13_14;\n var9_10 = var24_26;\n }\n var13_14 = var7_8;\n var15_16 = var11_12.size();\n if (var15_16 > 0) ** GOTO lbl156\n var15_16 = (int)TextUtils.isEmpty((CharSequence)var8_9);\n if (var15_16 == 0) ** GOTO lbl156\n var4_4 = var2_2.listener;\n if (var4_4 == null) ** GOTO lbl155\n var5_6 = \"The params of image or url are missing!\";\n var3_3 = new Throwable((String)var5_6);\n var27_28 = 9;\n var4_4.onError(var2_2, var27_28, (Throwable)var3_3);\nlbl155:\n // 2 sources\n\n return;\nlbl156:\n // 2 sources\n\n if ((var15_16 = (int)TextUtils.isEmpty((CharSequence)var8_9)) != 0) break block68;\n var15_16 = 0;\n var4_4 = null;\n var4_4 = var2_2.getShortLintk(var8_9, false);\n var28_29 = 4;\n var14_15 = var4_4;\n break block69;\n }\n var15_16 = 2;\n var14_15 = var8_9;\n var28_29 = var15_16;\n }\n var4_4 = var2_2.a;\n var3_3.a(var2_2, (String)var4_4);\n var4_4 = var2_2.a;\n var9_10 = var2_2.listener;\n var22_17 = var1_1.getText();\n var5_6 = var4_4;\n var7_8 = var13_14;\n try {\n var3_3.a((String)var4_4, var28_29, (PlatformActionListener)var9_10, var13_14, (String)var14_15, var22_17, var6_7, var11_12, var10_11);\n }\n catch (Throwable var4_5) {\n SSDKLog.b().d(var4_5);\n var3_3 = var2_2.listener;\n if (var3_3 == null) break block70;\n var27_28 = 9;\n var3_3.onError(var2_2, var27_28, var4_5);\n }\n }\n }\n\n public HashMap filterFriendshipInfo(int n10, HashMap hashMap) {\n return null;\n }",
"public void publishOnFacebook()\n {\n\n }",
"public fbStatusPostingValidation() {\n\t\tsuper();\t\n\t}",
"private void shareToFacebook(Context context, CallbackManager callbackManager, Uri uri) {\n Toast.makeText(context, \"start sharing to facebook, \" + uri.getPath(), Toast.LENGTH_SHORT).show();\n //com.facebook.orca\n //com.facebook.katana\n //com.example.facebook\n //com.facebook.android\n String facebookPackage = \"com.facebook.katana\";\n if (AppUtil.getInstance().isAppInstalled(context, facebookPackage)) {\n //using default intent\n// Intent intent = new Intent(Intent.ACTION_SEND);\n// intent.setType(\"image/*\");\n// intent.putExtra(Intent.EXTRA_STREAM, uri);\n// intent.putExtra(Intent.EXTRA_TEXT, \"this is a simple extra text\");\n// intent.setPackage(facebookPackage);\n//// startActivity(Intent.createChooser(intent, \"pick an app to ...\"));\n// startActivity(intent);\n\n //using sdk but native facebook app has been installed\n sharePhotoToFacebook(context, callbackManager, uri);\n\n } else {\n loginAndShareToFacebook(context, callbackManager, uri);\n }\n\n\n }",
"public abstract void share(String content, Uri imageOrVideo);",
"public void validateSocialMediaLinks(WebDriver driver)\n\t{\n\t\tBoolean actTwitter1 = driver.findElement(By.cssSelector(\"a.twitter\")).isDisplayed();\n System.out.println(\"Twitter is displayed or not: \"+actTwitter1);\n\t}",
"private void shareOnFacebook() {\n // Take a screen shot\n takeScreenShot(imgSharedFacebook);\n final File screenShotfile = new File(SCREENSHOTS_LOCATIONS, mQuestionScreenShotName);\n final Uri screenShotUri = Uri.fromFile(screenShotfile);\n final String shareSubject = \"Congratulation!\";\n String shareBody = \"http://p2a.asia\";\n if (mSession != null) {\n shareBody = \"You won P2A ASEAN Game with \" + mSession.get_session_total_score() +\n \" score. Visit our site here: http://www.p2a.asia\";\n }\n final Intent sharingTotalScoreIntent = new Intent(Intent.ACTION_SEND);\n sharingTotalScoreIntent.putExtra(Intent.EXTRA_SUBJECT, shareSubject);\n sharingTotalScoreIntent.putExtra(Intent.EXTRA_TEXT, shareBody);\n sharingTotalScoreIntent.setType(\"image/*\");\n sharingTotalScoreIntent.putExtra(Intent.EXTRA_STREAM, screenShotUri);\n sharingTotalScoreIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n startActivity(Intent.createChooser(sharingTotalScoreIntent, \"Share your score via\"));\n }",
"@Override\n public void onFailure(Call<String> call, Throwable t) {\n mShareView.showRequestFailed(t.getMessage());\n }",
"@Override\n public void onFailure(Call<String> call, Throwable t) {\n mShareView.showRequestFailed(t.getMessage());\n }",
"public interface ShareInterface {\n\n/** 是否显示管理菜单 置顶, 删除*/\n// public boolean visibleManager ();\n\n/** 是否是置顶 2置顶, 其他 解除置顶 */\n public String getStick ();\n /** 是否是置顶 2置顶, 其他 解除置顶 */\n public void setStick (String s);\n\n/** 是否显示报名管理, 1线下活动, 2 线上活动,999 系列活动 , 显示管理, 其他不显示*/\n public String getCategory ();\n/** 创始人标记, 是否显示删除 1 创始人(显示删除)*/\n public String getIsJoin ();\n\n /**\n * 是否为新版的线下活动贴, null 否, 不为空 是新版活动帖\n * @return\n */\n public String getNewActive();\n\n /**\n * 俱乐部Id\n * @return\n */\n public String getClubId ();\n\n /**\n * 帖子Id\n * @return\n */\n public String getTopicId ();\n\n /**\n * 图片Url 地址\n * @return\n */\n public String getImageUrl ();\n\n /**\n * 分享显示标题\n * @return\n */\n public String getTitle ();\n\n /**\n * 分享内容\n * @return\n */\n public String getShareTxt ();\n\n /**\n * 分享连接地址\n * @return\n */\n public String getShareUrl ();\n\n /**\n * 帖子类型\n * @return 0, 其他, 1, 线上\n */\n public int getType();\n\n\n}",
"public boolean isContentInvalid() {\n/* 1156 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"private void shareDataOnLinkedin() {\n\n OAuthConsumer consumer = new CommonsHttpOAuthConsumer(Constants.CONSUMER_KEY, Constants.CONSUMER_SECRET);\n consumer.setTokenWithSecret(accessToken.getToken(), accessToken.getTokenSecret());\n DefaultHttpClient httpclient = new DefaultHttpClient();\n HttpPost post = new HttpPost(\"https://api.linkedin.com/v1/people/~/shares\");\n\n try {\n consumer.sign(post);\n } catch (OAuthMessageSignerException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (OAuthExpectationFailedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (OAuthCommunicationException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n // here need the consumer for sign in for post the share\n post.setHeader(\"content-type\", \"text/XML\");\n/*\n <share ><comment > This is a test</comment ><visibility ><code > anyone </code ></\n visibility ></share >*/\n\n /* String myEntity = \"{\" +\n \"\\\"comment\\\":\\\"Check out developer.linkedin.com! \" +\n \"http://linkd.in/1FC2PyG\\\",\" +\n \"\\\"visibility\\\":{\" + \"\\\"code\\\":\\\"anyone\\\"}\" +\n \"}\";*/\n\n String myEntity = \"<share>\"\n + \"<comment>Check out work of Logiguyz Tech!</comment>\"\n + \"<content>\"\n + \"<title>Logiguyz Tech</title>\"\n + \"<description>Great mobile apps development organization</description>\"\n + \"<submitted-url>www.logiguyz.com</submitted-url>\"\n //+ \"<submitted-image-url>http://m3.licdn.com/media/p/3/000/124/1a6/089a29a.png</submitted-image-url>\"\n + \"</content>\"\n + \"<visibility> \"\n + \" <code>anyone</code>\"\n + \"</visibility>\"\n + \"</share>\";\n\n Log.e(\"myEntity\", \"*\" + myEntity);\n try {\n String res = \"\";\n\n post.setEntity(new StringEntity(myEntity));\n org.apache.http.HttpResponse response = httpclient.execute(post);\n if (response != null) {\n HttpEntity resEntity = response.getEntity();\n res = EntityUtils.toString(resEntity);\n // .....Read the response\n }\n\n Log.e(\"response\", res);\n Toast.makeText(Login.this, \"Shared sucessfully\" + res, Toast.LENGTH_SHORT).show();\n } catch (UnsupportedEncodingException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (ClientProtocolException 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\n }",
"private static Bundle m6380a(ShareLinkContent shareLinkContent, boolean z) {\n Bundle a = C1833f.m6379a((ShareContent) shareLinkContent, z);\n Utility.m5772a(a, \"TITLE\", shareLinkContent.getContentTitle());\n Utility.m5772a(a, \"DESCRIPTION\", shareLinkContent.getContentDescription());\n Utility.m5771a(a, \"IMAGE\", shareLinkContent.getImageUrl());\n Utility.m5772a(a, \"QUOTE\", shareLinkContent.getQuote());\n Utility.m5771a(a, \"MESSENGER_LINK\", shareLinkContent.getContentUrl());\n Utility.m5771a(a, \"TARGET_DISPLAY\", shareLinkContent.getContentUrl());\n return a;\n }",
"public void shareToFacebook(View view) {\n Uri path = imageWithThumbnail.getImageUri();\n\n // create email intent first to remove bluetooth + others options\n Intent emailIntent = new Intent();\n emailIntent.setAction(Intent.ACTION_SEND);\n // Native email client doesn't currently support HTML, but it doesn't hurt to try in case they fix it\n emailIntent.putExtra(Intent.EXTRA_TEXT, \"#Selfie@NYPSIT\");\n emailIntent.putExtra(Intent.EXTRA_SUBJECT, \"#Selfie@NYPSIT\");\n emailIntent.putExtra(Intent.EXTRA_STREAM, path);\n emailIntent.setType(\"image/jpeg\");\n // Create the chooser based on the email intent\n Intent openInChooser = Intent.createChooser(emailIntent, \"Share to\");\n\n // Check for other packages that open our mime type\n Intent sendIntent = new Intent(Intent.ACTION_SEND);\n sendIntent.setType(\"image/jpeg\");\n\n PackageManager pm = getContext().getPackageManager();\n List<ResolveInfo> resInfo = pm.queryIntentActivities(sendIntent, 0);\n List<LabeledIntent> intentList = new ArrayList<LabeledIntent>();\n for (int i = 0; i < resInfo.size(); i++) {\n // Extract the label, append it, and repackage it in a LabeledIntent\n ResolveInfo ri = resInfo.get(i);\n String packageName = ri.activityInfo.packageName;\n if (packageName.contains(\"com.amuletxheart.cameraderie\")) {\n emailIntent.setPackage(packageName);\n }\n intentList.add(new LabeledIntent(emailIntent, packageName, ri.loadLabel(pm), ri.icon));\n }\n // Get our custom intent put here as we only want your app to get it not others\n Intent customIntent = new Intent(\"facebooktestingimageandtext.intent.action.SEND\");\n customIntent.setType(\"image/jpeg\");\n customIntent.setAction(\"facebooktestingimageandtext.intent.action.SEND\");\n\n resInfo = pm.queryIntentActivities(customIntent, 0);\n for (int i = 0; i < resInfo.size(); i++) {\n // Extract the label, append it, and repackage it in a LabeledIntent\n ResolveInfo ri = resInfo.get(i);\n String packageName = ri.activityInfo.packageName;\n if (packageName.contains(\"com.amuletxheart.cameraderie\")) {\n Intent intent = new Intent();\n intent.setComponent(new ComponentName(packageName, ri.activityInfo.name));\n intent.setAction(Intent.ACTION_SEND);\n intent.putExtra(Intent.EXTRA_STREAM, path);\n intent.setType(\"image/jpeg\");\n if (packageName.contains(\"com.amuletxheart.cameraderie\")) {\n // My custom facebook intent to do something very simple!\n intent.putExtra(Intent.EXTRA_TEXT, \"caption #testhashtag\");\n }\n intentList.add(new LabeledIntent(intent, packageName, ri.loadLabel(pm), ri.icon));\n }\n }\n // convert the list of intents(intentList) to array and add as extra intents\n LabeledIntent[] extraIntents = intentList.toArray(new LabeledIntent[intentList.size()]);\n openInChooser.putExtra(Intent.EXTRA_INITIAL_INTENTS, extraIntents);\n\n mContext.startActivity(openInChooser);\n }",
"@Override\n\tpublic void onShareButton() {\n\t\tDialogs.getShareEditDialog(this, false).show();\n\t}",
"private boolean checkResolve(BundleImpl b) {\n ArrayList okImports = new ArrayList();\n if (framework.perm.missingMandatoryPackagePermissions(b.bpkgs, okImports) == null &&\n checkBundleSingleton(b) == null) {\n HashSet oldTempResolved = (HashSet)tempResolved.clone();\n HashMap oldTempProvider = (HashMap)tempProvider.clone();\n HashMap oldTempRequired = (HashMap)tempRequired.clone();\n HashSet oldTempBlackList = (HashSet)tempBlackList.clone();\n tempResolved.add(b);\n if (checkRequireBundle(b) == null) {\n List r = resolvePackages(okImports.iterator());\n if (r.size() == 0) {\n return true;\n }\n }\n tempResolved = oldTempResolved;\n tempProvider = oldTempProvider;\n tempRequired = oldTempRequired;\n tempBlackList = oldTempBlackList;\n }\n return false;\n }",
"@Test\n public void testValidateManifest() {\n KicIngester.validateManifest(new File(SCP_DATA_DIR), \"Manifest\",\n KicIngester.getScpFiles(new File(SCP_DATA_DIR),\n SCP_FILENAME_PATTERN));\n }",
"public static void validate(FeedProvider _feedProvider) throws FeedInvalidException {\n\t\tif(_feedProvider.getnNumber() == null || _feedProvider.getnNumber().equals(\"\") \r\n\t\t\t\t|| _feedProvider.getNickName() == null || _feedProvider.getNickName().equals(\"\")\r\n\t\t\t\t|| _feedProvider.getUrl() == null || _feedProvider.getUrl().equals(\"\") )\r\n\t\t\tthrow new FeedInvalidException(message_02);\r\n\t\t\r\n\t\tUrlValidator urlValidator = new UrlValidator();\t\t \r\n\t //validation URL\r\n\t if (!urlValidator.isValid(_feedProvider.getUrl())) \r\n\t \tthrow new FeedInvalidException(message);\r\n\t \r\n\t // verify if URL is a valid RSS\r\n\t try {\r\n\t\t \r\n\t \tDocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\r\n\t\t org.w3c.dom.Document doc = builder.parse(_feedProvider.getUrl()); \r\n\t\t boolean validRss = doc.getDocumentElement().getNodeName().equalsIgnoreCase(\"rss\");\r\n\t\t if(!validRss)\r\n\t\t \tthrow new FeedInvalidException(message);\r\n\t\t \r\n\t } catch (FeedInvalidException fe) {\r\n\t \t\r\n\t\t throw fe;\r\n\t\t \r\n\t } catch (Exception e) {\r\n\t \t//for unknown case\r\n\t \tthrow new FeedInvalidException( message +\"\\n\"+ e.getMessage() );\r\n\t\t}\r\n\t \r\n\t}",
"public static boolean canShowNative(Class<? extends ShareContent> cls) {\r\n DialogFeature feature = getFeature(cls);\r\n return feature != null && DialogPresenter.canPresentNativeDialogWithFeature(feature);\r\n }",
"private void tjshowShare() {\n\t\tShareSDK.initSDK(getActivity(), \"171a7e7c3c736\");\n\t\tOnekeyShare oks = new OnekeyShare();\n\t\t// 关闭sso授权\n\t\toks.disableSSOWhenAuthorize();\n\n\t\t// 分享时Notification的图标和文字 2.5.9以后的版本不调用此方法\n\t\t// oks.setNotification(R.drawable.ic_launcher,\n\t\t// getString(R.string.app_name));\n\t\t// 信息分享时电话\n//\t\toks.setAddress(zhuproduct.getData().getStore_info().getStore_tel());\n\t\t// title标题,印象笔记、邮箱、信息、微信、人人网和QQ空间使用\n\t\toks.setTitle(\"【餐餐抢】\");\n\t\t// titleUrl是标题的网络链接,仅在人人网和QQ空间使用\n\t\toks.setTitleUrl(SharedUtil.getStringValue(\n\t\t\t\tSharedCommon.MALL_QRCODE_IMG_AZ_URL, \"\"));\n\t\t// text是分享文本,所有平台都需要这个字段\n\t\toks.setText(\"作为你的好朋友,我忍不住给你推荐一个平台帮你暴增客流量,提升营业额,别犹豫,相信我!马上入驻吧!\");\n\t\t// imagePath是图片的本地路径,Linked-In以外的平台都支持此参数\n\t\toks.setImagePath(SharedUtil.getStringValue(SharedCommon.MALL_FX, \"\"));// 确保SDcard下面存在此张图片\n\t\toks.setImageUrl(SharedUtil.getStringValue(SharedCommon.MALL_FX, \"\"));\n\t\t// url仅在微信(包括好友和朋友圈)中使用\n\t\toks.setUrl(\"http://www.28yun.com/api_wap/tmpl/merchant/merchant_enter.html\");\n\t\t// comment是我对这条分享的评论,仅在人人网和QQ空间使用\n\t\toks.setComment(\"我是测试评论文本\");\n\t\t// site是分享此内容的网站名称,仅在QQ空间使用\n\t\toks.setSite(getString(R.string.app_name));\n\t\t// siteUrl是分享此内容的网站地址,仅在QQ空间使用\n\t\toks.setSiteUrl(SharedUtil.getStringValue(\n\t\t\t\tSharedCommon.MALL_QRCODE_IMG_AZ_URL, \"\"));\n\n\t\t// 启动分享GUI\n\t\toks.show(getActivity());\n\t}",
"protected boolean isCodeshareValid(String codeshare) {\n return codeshare.isEmpty() || codeshare.equals(\"Y\");\n }",
"private void publishFeedDialog() {\n\t\tBundle postParams = new Bundle();\n postParams.putString(\"name\", \"Care Apps\");\n postParams.putString(\"description\", description);\n postParams.putString(\"picture\", profile_path);\n \n\t WebDialog feedDialog = (new WebDialog.FeedDialogBuilder(this,com.facebook.Session.getActiveSession(),postParams))\n\t .setOnCompleteListener(new OnCompleteListener() {\n\t @Override\n\t public void onComplete(Bundle values,\n\t FacebookException error) {\n\t if (error == null) {\n\t final String postId = values.getString(\"post_id\");\n\t if (postId != null) {\n\t Toast.makeText(FB_ShareActivity.this,\n\t \"Posted story, id: \"+postId,\n\t Toast.LENGTH_SHORT).show();\n\t onBackPressed();\n\t } else {\n\t Toast.makeText(FB_ShareActivity.this, \n\t \"Publish cancelled\", \n\t Toast.LENGTH_SHORT).show();\n\t onBackPressed();\n\t }\n\t } \n\t else if (error instanceof FacebookOperationCanceledException) {\n\t Toast.makeText(FB_ShareActivity.this, \n\t \"Publish cancelled\", \n\t Toast.LENGTH_SHORT).show();\n\t onBackPressed();\n\t } \n\t else {\n\t Toast.makeText(FB_ShareActivity.this, \n\t \"Error posting story\", \n\t Toast.LENGTH_SHORT).show();\n\t onBackPressed();\n\t }\n\t }\n\t })\n\t .build();\n\t feedDialog.show();\n\t}",
"private void shareSMS() {\r\n EventSharer.shareSMS(this, event.uid);\r\n }",
"public interface ShareLinkDialogMvpPresenter<V extends MvpView> extends MvpPresenter<V> {\n\n void onSourceShareSelected(Intent shareIntent, ResolveInfo resolveInfo, String linkUrl);\n}",
"private void initShare() {\n // Create ShareHelper\n mShareHelper = new ShareHelper(mContext);\n }",
"public void validateRpd4s7()\n {\n // URL guidelines can't be automatically tested, this validator allow to validate content only.\n }",
"public void validateRpd4s6()\n {\n // URL guidelines can't be automatically tested, this validator allow to validate content only.\n }",
"protected void validate() {\n // no implementation.\n }",
"public static void m5823d() {\n if (f4669a != null) {\n f4669a.m12578a(\"whatsapp_app_share\", null);\n }\n Answers.getInstance().logCustom(new CustomEvent(\"whatsapp_app_share\"));\n }",
"private ContentUtil() {\n // do nothing\n }",
"private static Bundle m6379a(ShareContent shareContent, boolean z) {\n Bundle bundle = new Bundle();\n Utility.m5771a(bundle, \"LINK\", shareContent.getContentUrl());\n Utility.m5772a(bundle, \"PLACE\", shareContent.getPlaceId());\n Utility.m5772a(bundle, \"PAGE\", shareContent.getPageId());\n Utility.m5772a(bundle, \"REF\", shareContent.getRef());\n bundle.putBoolean(\"DATA_FAILURES_FATAL\", z);\n Collection peopleIds = shareContent.getPeopleIds();\n if (!Utility.m5786a(peopleIds)) {\n bundle.putStringArrayList(Sticker.FRIENDS_CAPABILITY, new ArrayList(peopleIds));\n }\n shareContent = shareContent.getShareHashtag();\n if (shareContent != null) {\n Utility.m5772a(bundle, \"HASHTAG\", shareContent.getHashtag());\n }\n return bundle;\n }",
"private PackageValidator() {}",
"@Test(expected = IllegalArgumentException.class)\n public void testValidator473_2() {\n List<DomainValidator.Item> items = new ArrayList<>();\n new UrlValidator(new String[]{}, null, 0L, DomainValidator.getInstance(true, items));\n }",
"@Test\n public void shouldAllowClassOnWhitelistedClassAndNonWhitelistedPackage() {\n // given\n validator.setAllowedClasses(SOME_CLASS);\n validator.setAllowedPackages(ANOTHER_PACKAGE);\n // then\n assertThat(validator.validate(SOME_CLASS)).isTrue();\n }",
"private void publishShareDialog(String url, String description){\n FacebookDialog shareDialog = new FacebookDialog.ShareDialogBuilder(this)\n .setLink(url)\n .setDescription(description)\n .build();\n uiHelper.trackPendingDialogCall(shareDialog.present());\n }",
"@Override\n\tpublic boolean isShareable() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isShareable() {\n\t\treturn false;\n\t}",
"HateosContentType() {\n super();\n }",
"@Override\n public void checkSourcesParameter(PubDTO pub) throws PubHandlerAssemblyException {\n\n }",
"@Override\n public void checkSourcesParameter(PubDTO pub) throws PubHandlerAssemblyException {\n\n }",
"@Override\r\n\tprotected void doVerify() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void validate() {\n\t}",
"protected void checkLinkage(String[] paths) {\n\t\tcheckImport(paths);\n\t\tcheckInclude(paths);\n\t}",
"@Test\r\n\tpublic void testScanePage_malformedLink() {\n\t}",
"@Override\n\tpublic String getContentShareable() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getContentShareable() {\n\t\treturn null;\n\t}",
"@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tDialog dialog=new Dialog(Glory.this);\n\t\t\t\tdialog.setContentView(R.layout.share_dialog_layout);\n\t\t\t\tdialog.setTitle(\"Share Via\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfbIcon=(TextView)dialog.findViewById(R.id.fb_icon);\n\t\t\t\ttwitterIcon=(TextView)dialog.findViewById(R.id.twitter_icon);\n\t\t\t\tgPlusIcon=(TextView)dialog.findViewById(R.id.gplus_icon);\n\t\t\t\t\n\t\t\t\tfbIcon.setTypeface(font);\n\t\t\t\ttwitterIcon.setTypeface(font);\n\t\t\t\tgPlusIcon.setTypeface(font);\n\t\t\t\n\t\t\t\t\n\t\t\t\tfbIcon.setOnClickListener(new OnClickListener() \n\t\t\t\t{\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) \n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tString url = \"https://www.facebook.com/dialog/feed?app_id=1507764116109075&\" +\n\t\t\t\t\t\t\t\t \t \"link=https://play.google.com/store/apps/details?id=com.achyuthnfn.cnbfinal&\" +\n\t\t\t\t\t\t\t\t \t \"caption=GuessIn&\" +\n\t\t\t\t\t\t\t\t \t \"description=\"+Uri.parse(\"My smartphone just thought of a word and I guessed it in \"+attempts+\" attempts. Check out the new game by @nfnlabs called GuessIn!\")+\n\t\t\t\t\t\t\t\t \t \"&redirect_uri=https://www.facebook.com/connect/login_success.html\"+\n\t\t\t\t\t\t\t\t \t \"&picture=http://nfnlabs.in/wp-content/uploads/2014/06/Share%20Image.png\";\n\t\t\t\t\t\tIntent intent=new Intent(Intent.ACTION_VIEW);\n\t\t\t\t\t\tintent.setData(Uri.parse(url));\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\ttwitterIcon.setOnClickListener(new OnClickListener() \n\t\t\t\t{\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tString url = \"https://twitter.com/intent/tweet?text=My smartphone just thought of a word and I guessed it in \"+attempts+\" attempts. Check out Guessin by @nfnlabs:&url=\"+Uri.parse(\"http://goo.gl/CGmGEx\");\n\t\t\t\t\t\tIntent intent=new Intent(Intent.ACTION_VIEW);\n\t\t\t\t\t\tUri uri=Uri.parse(url);\n\t\t\t\t\t\tintent.setData(uri);\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tgPlusIcon.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tIntent intent= new PlusShare.Builder(Glory.this)\n\t\t\t\t\t\t\t.setText(\"My smartphone just thought of a word and I guessed it in \"+attempts+\" attempts. Check out the new game by @nfnlabs called GuessIn!\")\n\t\t\t\t\t\t\t.setType(\"text/plain\")\n\t\t\t\t\t\t\t.setContentUrl(Uri.parse(\"https://play.google.com/store/apps/details?id=com.achyuthnfn.cnbfinal\"))\n\t\t\t\t\t\t\t.getIntent();\n\t\t\t\t\t\tstartActivityForResult(intent, 0);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tdialog.show();\n\t\t\t}",
"@Test\n public void canConnectFacebookAccount() throws Exception {\n String expectedTitle = \"Social Media Summary\";\n String selectCompanyMessage = \"Select the Facebook Page you want to link.\";\n String notSetupMessage = \"Facebook Account is not setup. Click the Authorize button below to add your Facebook account.\";\n String facebookEmail = \"[email protected]\";\n String facebookPassword = \"sunset00\";\n String facebookName = \"Yaroslav Api\";\n String facebookCompany = \"Q4 Web Test\";\n SocialMediaSummary socialMediaSummary = new Dashboard(driver).openSocialMedia();\n\n Assert.assertEquals(socialMediaSummary.getTitle(), expectedTitle,\"Actual Social Media Summary page title doesn't match to expected\");\n\n Assert.assertTrue(socialMediaSummary.getFacebookStatusIndicator().contains(\"/unchecked.png\"),\n \"Red X is not displayed at start of test (Facebook account not setup state expected)\");\n\n // authorizing Facebook account\n socialMediaSummary.authorizeFacebookAccount().allowAccessTo(facebookEmail, facebookPassword);\n Assert.assertEquals(socialMediaSummary.getTitle(),expectedTitle,\"You are not returned to summary page after authorizing Facebook account\");\n Assert.assertEquals(socialMediaSummary.getFacebookStatusMessage(),selectCompanyMessage,\"Select company status message is not properly displayed\");\n\n socialMediaSummary.chooseFirstFacebookPage();\n Assert.assertEquals(socialMediaSummary.getFacebookAccountName(),facebookName,\"Incorrect account name is displayed\");\n Assert.assertEquals(socialMediaSummary.getFacebookPage(),facebookCompany,\"Incorrect company name is displayed\");\n Assert.assertTrue(socialMediaSummary.numberOfFacebookFansIsDisplayed(),\"Number of followers is improperly displayed.\");\n\n //socialMediaSummary.enableFacebookAccount();\n Assert.assertTrue(socialMediaSummary.getFacebookStatusIndicator().contains(\"/checked.png\"),\n \"Green checkmark is not displayed after authorizing Facebook account\");\n\n Assert.assertTrue(socialMediaSummary.facebookSettingsButtonIsDisplayed(),\"Settings button is not displayed after authorizing Facebook account.\");\n Assert.assertTrue(socialMediaSummary.facebookDeAuthorizeButtonIsDisplayed(),\"De-Authorize button is not displayed after authorizing Facebook account\");\n Assert.assertTrue(socialMediaSummary.facebookDisableButtonIsDisplayed(),\"Disable button is not displayed after authorizing Facebook account\");\n Assert.assertTrue(socialMediaSummary.facebookReAuthorizeButtonIsDisplayed(),\"Re-Authorize button is not displayed after authorizing Facebook account\");\n\n // disabling Facebook account\n socialMediaSummary.disableFacebookAccount();\n\n Assert.assertTrue(socialMediaSummary.getFacebookStatusIndicator().contains(\"/disabled.png\"),\n \"Grey checkmark is not displayed after disabling Facebook account\");\n Assert.assertFalse(socialMediaSummary.facebookDisableButtonIsDisplayed(),\"Disable button is still present after disabling Facebook account.\");\n Assert.assertTrue(socialMediaSummary.facebookEnableButtonIsDisplayed(),\"Enable button is not present after disabling Facebook account.\");\n\n // enabling Facebook account\n socialMediaSummary.enableFacebookAccount();\n Assert.assertTrue(socialMediaSummary.getFacebookStatusIndicator().contains(\"/checked.png\"),\n \"Green checkmark is not displayed after enabling Facebook account\");\n\n Assert.assertFalse(socialMediaSummary.facebookEnableButtonIsDisplayed(),\"Enable button is still present after enabling Facebook account.\");\n Assert.assertTrue(socialMediaSummary.facebookDisableButtonIsDisplayed(),\"Disable button is not present after enabling Facebook account.\");\n\n // re-authorizing Facebook account\n socialMediaSummary.logoutFromFacebook(); // authorization process causes you to be logged in to Facebook; this deletes the Facebook session cookie to undo this\n socialMediaSummary.reAuthorizeFacebookAccount().allowAccessTo(facebookEmail, facebookPassword);\n\n Assert.assertEquals(socialMediaSummary.getTitle(),expectedTitle,\"You are not returned to summary page after re-authorizing Facebook account\");\n Assert.assertEquals(socialMediaSummary.getFacebookStatusMessage(),selectCompanyMessage,\"Select company status message is not properly displayed after re-authorizing\");\n socialMediaSummary.chooseFirstFacebookPage();\n\n Assert.assertEquals(socialMediaSummary.getFacebookAccountName(),facebookName,\"Incorrect account name is displayed after re-authorizing\");\n Assert.assertEquals(socialMediaSummary.getFacebookPage(),facebookCompany,\"Incorrect company name is displayed after re-authorizing\");\n Assert.assertTrue(socialMediaSummary.numberOfFacebookFansIsDisplayed(),\"Number of followers is improperly displayed after re-authorizing.\");\n\n Assert.assertTrue(socialMediaSummary.getFacebookStatusIndicator().contains(\"/checked.png\"),\n \"Green checkmark is not displayed after re-authorizing Facebook account\");\n\n Assert.assertTrue(socialMediaSummary.facebookSettingsButtonIsDisplayed(),\"Settings button is not displayed after re-authorizing Facebook account.\");\n Assert.assertTrue(socialMediaSummary.facebookDeAuthorizeButtonIsDisplayed(),\"De-Authorize button is not displayed after re-authorizing Facebook account\");\n Assert.assertTrue(socialMediaSummary.facebookDisableButtonIsDisplayed(),\"Disable button is not displayed after re-authorizing Facebook account\");\n Assert.assertTrue(socialMediaSummary.facebookReAuthorizeButtonIsDisplayed(),\"Re-Authorize button is not displayed after re-authorizing Facebook account\");\n\n // de-authorizing Facebook account\n socialMediaSummary.deAuthorizeFacebookAccount();\n Assert.assertTrue(socialMediaSummary.getFacebookStatusIndicator().contains(\"/unchecked.png\"),\n \"Red X is not displayed after de-authorizing Facebook account\");\n\n Assert.assertEquals(socialMediaSummary.getFacebookStatusMessage(),notSetupMessage,\"Status message is not properly displayed after de-authorizing Facebook account\");\n Assert.assertTrue(socialMediaSummary.facebookSettingsButtonIsDisplayed(),\"Settings button is not displayed after de-authorizing Facebook account.\");\n Assert.assertTrue(socialMediaSummary.facebookAuthorizeButtonIsDisplayed(),\"Authorize button is not displayed after de-authorizing Facebook account.\");\n }",
"private boolean m36043c(Throwable th) {\n return ((th instanceof ShareTextException) && ((ShareTextException) th).d() == ExceptionType.USER_IS_HIDDEN) ? true : null;\n }",
"public void share(View view) {\n if (urlImage != \"\") {\n try {\n new ShareOnFacebook(bitmapArray, this).share();\n } catch (Exception e) {\n e.printStackTrace();\n Intent mIntentFacebookBrowser = new Intent(Intent.ACTION_SEND);\n String mStringURL = \"https://www.facebook.com/sharer/sharer.php?u=\" + urlImage;\n mIntentFacebookBrowser = new Intent(Intent.ACTION_VIEW, Uri.parse(mStringURL));\n startActivity(mIntentFacebookBrowser);\n }\n }\n }",
"@Override\n protected void checkSubclass() {\n }",
"protected void shareIt() {\n\t\tIntent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);\r\n\t\tsharingIntent.setType(\"text/plain\");\r\n\t\tString shareBody = content.getText().toString();\r\n\t\tsharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, \"Sharing\");\r\n\t\tsharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);\r\n\t\tstartActivity(Intent.createChooser(sharingIntent, \"Share via\"));\r\n\t}",
"private Intent Shareintent(){\n Intent Shareintent = new Intent(Intent.ACTION_SEND);\n Shareintent.setType(\"text/html\");\n Shareintent.putExtra(Intent.EXTRA_SUBJECT, \"SUBJECT\");\n Shareintent.putExtra(Intent.EXTRA_TEXT, \"http://www.habeshastudent.com/m/video.html\");\n return Shareintent;\n\n\n }",
"@Override\r\n\t\t\tpublic void onClick(View v)\r\n\t\t\t{\n\t\t\t\tshareViaFacebook();\r\n\t\t\t}",
"@Override\n public void onError(Platform arg0, int arg1, Throwable arg2) {\n mHandler.post(new Runnable() {\n public void run() {\n Toast.makeText(context, \"分享失败\", Toast.LENGTH_SHORT).show();\n }\n });\n if (mShareCallback!=null) {\n mShareCallback.onFailure();\n }\n }",
"@Override\n\t\t\t\t\t\t\tpublic void onFbcompleate() {\n\n\t\t\t\t\t\t\t}",
"private static Bundle m6385a(ShareOpenGraphContent shareOpenGraphContent, JSONObject jSONObject, boolean z) {\n Bundle a = C1833f.m6379a((ShareContent) shareOpenGraphContent, z);\n Utility.m5772a(a, \"PREVIEW_PROPERTY_NAME\", (String) C1838i.m6451a(shareOpenGraphContent.getPreviewPropertyName()).second);\n Utility.m5772a(a, \"ACTION_TYPE\", shareOpenGraphContent.getAction().getActionType());\n Utility.m5772a(a, \"ACTION\", jSONObject.toString());\n return a;\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testValidator473_3() {\n List<DomainValidator.Item> items = new ArrayList<>();\n new UrlValidator(new String[]{}, null, UrlValidator.ALLOW_LOCAL_URLS, DomainValidator.getInstance(false, items));\n }",
"private ValidationUtils() {}",
"private Validations() {\n\t\tthrow new IllegalAccessError(\"Shouldn't be instantiated.\");\n\t}",
"@Override\r\n public void validate() {\n\r\n }",
"@SuppressWarnings(\"deprecation\")\n\t@Test\n\tpublic void test_shareToLibraryConversion() throws Exception {\n\t\t\n\t\t{\n\t\t\tfinal JsonNode share1 = getLibraryMetadata(this, Arrays.asList(\n\t\t\t\t\t\"com.ikanow.aleph2.test.EntryPoint\",\n\t\t\t\t\t\"This is a description.\",\n\t\t\t\t\t\"More description.\"\n\t\t\t\t\t//(no tags)\n\t\t\t\t\t));\n\t\t\t\n\t\t\tSharedLibraryBean lib1 = IkanowV1SyncService_LibraryJars.getLibraryBeanFromV1Share(share1);\n\t\t\tassertEquals(\"v1_555d44e3347d336b3e8c4cbe\", lib1._id());\n\t\t\tassertEquals(\"21 May 2015 02:37:23 GMT\", lib1.created().toGMTString());\n\t\t\tassertEquals(\"21 May 2015 02:37:24 GMT\", lib1.modified().toGMTString());\n\t\t\tassertEquals(null, lib1.batch_enrichment_entry_point());\n\t\t\tassertEquals(\"This is a description.\\nMore description.\", lib1.description());\n\t\t\tassertEquals(\"/app/aleph2/library/misc/library.jar\", lib1.display_name());\n\t\t\tassertEquals(null, lib1.library_config());\n\t\t\tassertEquals(\"com.ikanow.aleph2.test.EntryPoint\", lib1.misc_entry_point());\n\t\t\tassertEquals(\"455d44e3347d336b3e8c4cbe\", lib1.owner_id());\n\t\t\tassertEquals(\"/app/aleph2/library/misc/library.jar\", lib1.path_name());\n\t\t\tassertEquals(null, lib1.streaming_enrichment_entry_point());\n\t\t\tassertEquals(null, lib1.subtype());\n\t\t\tassertEquals(ImmutableSet.builder().build(), lib1.tags());\n\t\t}\n\t\t\n\t\t// NOW A BUNCH OF ONES WHERE WE'LL JUST CHECK THE DESC/TAGS/ENTRY POINT\n\n\t\t//(desc, tags)\n\t\t{\n\t\t\tfinal JsonNode share2 = getLibraryMetadata(this, Arrays.asList(\n\t\t\t\t\t\"com.ikanow.aleph2.test.EntryPoint\",\n\t\t\t\t\t\"This is a description.\",\n\t\t\t\t\t\"More description.\",\n\t\t\t\t\t\"tags:tag1,tag2\"\n\t\t\t\t\t));\n\t\t\t\n\t\t\tSharedLibraryBean lib2 = IkanowV1SyncService_LibraryJars.getLibraryBeanFromV1Share(share2);\n\t\t\tassertEquals(\"This is a description.\\nMore description.\", lib2.description());\n\t\t\tassertEquals(null, lib2.library_config());\n\t\t\tassertEquals(ImmutableSet.builder().add(\"tag1\").add(\"tag2\").build(), lib2.tags());\n\t\t}\t\t\n\n\t\t//(desc, tags, multi-line JSON)\n\t\t{\n\t\t\tfinal JsonNode share2 = getLibraryMetadata(this, Arrays.asList(\n\t\t\t\t\t\"com.ikanow.aleph2.test.EntryPoint\",\n\t\t\t\t\t\"{\",\n\t\t\t\t\t\" \\\"test\\\": {\",\n\t\t\t\t\t\" \\\"test2\\\": \\\"test_val\\\"\",\n\t\t\t\t\t\" }\",\n\t\t\t\t\t\"}\",\n\t\t\t\t\t\"This is a description.\",\n\t\t\t\t\t\"More description.\",\n\t\t\t\t\t\"tags:tag1,tag2\"\n\t\t\t\t\t));\n\t\t\t\n\t\t\tSharedLibraryBean lib2 = IkanowV1SyncService_LibraryJars.getLibraryBeanFromV1Share(share2);\n\t\t\tassertEquals(\"This is a description.\\nMore description.\", lib2.description());\n\t\t\tassertEquals(\"{\\\"test\\\":{\\\"test2\\\":\\\"test_val\\\"}}\", _mapper.convertValue(lib2.library_config(), JsonNode.class).toString());\n\t\t\tassertEquals(ImmutableSet.builder().add(\"tag1\").add(\"tag2\").build(), lib2.tags());\n\t\t}\t\t\n\n\t\t//(desc, no tags, multi-line JSON)\n\t\t{\n\t\t\tfinal JsonNode share2 = getLibraryMetadata(this, Arrays.asList(\n\t\t\t\t\t\"com.ikanow.aleph2.test.EntryPoint\",\n\t\t\t\t\t\"{\",\n\t\t\t\t\t\" \\\"test\\\": {\",\n\t\t\t\t\t\" \\\"test2\\\": \\\"test_val\\\"\",\n\t\t\t\t\t\" }\",\n\t\t\t\t\t\"}\",\n\t\t\t\t\t\"This is a description.\",\n\t\t\t\t\t\"More description.\"\n\t\t\t\t\t));\n\t\t\t\n\t\t\tSharedLibraryBean lib2 = IkanowV1SyncService_LibraryJars.getLibraryBeanFromV1Share(share2);\n\t\t\tassertEquals(\"This is a description.\\nMore description.\", lib2.description());\n\t\t\tassertEquals(\"{\\\"test\\\":{\\\"test2\\\":\\\"test_val\\\"}}\", _mapper.convertValue(lib2.library_config(), JsonNode.class).toString());\n\t\t\tassertEquals(ImmutableSet.builder().build(), lib2.tags());\n\t\t}\t\t\n\n\t\t//(NO desc, no tags, multi-line JSON)\n\t\t{\n\t\t\tfinal JsonNode share2 = getLibraryMetadata(this, Arrays.asList(\n\t\t\t\t\t\"com.ikanow.aleph2.test.EntryPoint\",\n\t\t\t\t\t\"{\",\n\t\t\t\t\t\" \\\"test\\\": {\",\n\t\t\t\t\t\" \\\"test2\\\": \\\"test_val\\\"\",\n\t\t\t\t\t\" }\",\n\t\t\t\t\t\"}\"\n\t\t\t\t\t));\n\t\t\t\n\t\t\tSharedLibraryBean lib2 = IkanowV1SyncService_LibraryJars.getLibraryBeanFromV1Share(share2);\n\t\t\tassertEquals(\"\", lib2.description());\n\t\t\tassertEquals(\"{\\\"test\\\":{\\\"test2\\\":\\\"test_val\\\"}}\", _mapper.convertValue(lib2.library_config(), JsonNode.class).toString());\n\t\t\tassertEquals(ImmutableSet.builder().build(), lib2.tags());\n\t\t}\t\t\n\t\t\n\t\t//(desc, tags, single-line JSON)\n\t\t{\n\t\t\tfinal JsonNode share2 = getLibraryMetadata(this, Arrays.asList(\n\t\t\t\t\t\"com.ikanow.aleph2.test.EntryPoint\",\n\t\t\t\t\t\"{\\\"test\\\":{\\\"test2\\\":\\\"test_val\\\"}}\",\n\t\t\t\t\t\"This is a description.\",\n\t\t\t\t\t\"More description.\",\n\t\t\t\t\t\"tags:tag1,tag2\"\n\t\t\t\t\t));\n\t\t\t\n\t\t\tSharedLibraryBean lib2 = IkanowV1SyncService_LibraryJars.getLibraryBeanFromV1Share(share2);\n\t\t\tassertEquals(\"This is a description.\\nMore description.\", lib2.description());\n\t\t\tassertEquals(\"{\\\"test\\\":{\\\"test2\\\":\\\"test_val\\\"}}\", _mapper.convertValue(lib2.library_config(), JsonNode.class).toString());\n\t\t\tassertEquals(ImmutableSet.builder().add(\"tag1\").add(\"tag2\").build(), lib2.tags());\n\t\t}\t\t\n\n\t\t//(NO desc, tags, single-line JSON)\n\t\t{\n\t\t\tfinal JsonNode share2 = getLibraryMetadata(this, Arrays.asList(\n\t\t\t\t\t\"com.ikanow.aleph2.test.EntryPoint\",\n\t\t\t\t\t\"{\\\"test\\\":{\\\"test2\\\":\\\"test_val\\\"}}\",\n\t\t\t\t\t\"tags:tag1,tag2\"\n\t\t\t\t\t));\n\t\t\t\n\t\t\tSharedLibraryBean lib2 = IkanowV1SyncService_LibraryJars.getLibraryBeanFromV1Share(share2);\n\t\t\tassertEquals(\"\", lib2.description());\n\t\t\tassertEquals(\"{\\\"test\\\":{\\\"test2\\\":\\\"test_val\\\"}}\", _mapper.convertValue(lib2.library_config(), JsonNode.class).toString());\n\t\t\tassertEquals(ImmutableSet.builder().add(\"tag1\").add(\"tag2\").build(), lib2.tags());\n\t\t}\t\t\n\n\t\t//(desc, no tags, single-line JSON)\n\t\t{\n\t\t\tfinal JsonNode share2 = getLibraryMetadata(this, Arrays.asList(\n\t\t\t\t\t\"com.ikanow.aleph2.test.EntryPoint\",\n\t\t\t\t\t\"{\\\"test\\\":{\\\"test2\\\":\\\"test_val\\\"}}\",\n\t\t\t\t\t\"This is a description.\",\n\t\t\t\t\t\"More description.\"\n\t\t\t\t\t));\n\t\t\t\n\t\t\tSharedLibraryBean lib2 = IkanowV1SyncService_LibraryJars.getLibraryBeanFromV1Share(share2);\n\t\t\tassertEquals(\"This is a description.\\nMore description.\", lib2.description());\n\t\t\tassertEquals(\"{\\\"test\\\":{\\\"test2\\\":\\\"test_val\\\"}}\", _mapper.convertValue(lib2.library_config(), JsonNode.class).toString());\n\t\t\tassertEquals(ImmutableSet.builder().build(), lib2.tags());\n\t\t}\t\t\n\t\t\n//\t\tfinal JsonNode share1 = getLibraryMetadata(this, Arrays.asList(\n//\t\t\t\t\"\",\n//\t\t\t\t\"\"\n//\t\t\t\t));\n\n\t\t// SOME FAILURE CASES\n\t\t\n\t\t//TODO: some exception cases\n\t}",
"public void validateRpd4s3()\n {\n // URL guidelines can't be automatically tested, this validator allow to validate content only.\n }",
"@Override\n public void validateRequest(WebScriptRequest webScriptRequest) {\n }",
"private void validate() {\r\n if (cmtFileSetList.size() == 0) {\r\n throw new BuildException(\"Nested Element 'fileset' missing for task 'cmt'.\");\r\n }\r\n if (output == null) {\r\n throw new BuildException(\"Parameter 'output' missing for task 'cmt'.\");\r\n }\r\n }",
"private static void validate(final ContentModelCreate item) throws InvalidContentException {\r\n \r\n // check public status of Content Model\r\n final StatusType publicStatus = item.getProperties().getObjectProperties().getStatus();\r\n \r\n if (publicStatus != StatusType.PENDING) {\r\n if (LOGGER.isDebugEnabled()) {\r\n LOGGER.debug(\"New Content Model has to be in public-status '\" + StatusType.PENDING + \"'.\");\r\n }\r\n item.getProperties().getObjectProperties().setStatus(StatusType.PENDING);\r\n }\r\n \r\n // validate Metadata Records\r\n checkMetadataRecords(item);\r\n }",
"@Override\n\t\t\tpublic void onGetShareUrlResult(MKShareUrlResult result, int type,\n\t\t\t\t\tint error) {\n\t\t\t\t\n\t\t\t}",
"@Override\r\n public void validate() {\r\n }",
"@Override\n public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {\n SharePhoto photo = new SharePhoto.Builder()\n .setBitmap(bitmap)\n .build();\n if(ShareDialog.canShow(SharePhotoContent.class)){\n SharePhotoContent content = new SharePhotoContent.Builder()\n .addPhoto(photo)\n .build();\n shareDialog.show(content);\n }\n\n }",
"public ShareFileHttpHeaders() {}",
"private void showShareView() {\n Timber.d(\"showShareView\");\n }",
"@External\n\tpublic void set_game_developers_share(BigInteger _share) {\n\t\t\n\t\tif (!Context.getCaller().equals(Context.getOwner())) {\n\t\t\tContext.revert(\"This function can only be called by GAS owner\");\n\t\t}\n\t\tthis.game_developers_share.set(_share);\n\t}",
"public void shareSocial(Activity act,UiLifecycleHelper uiHelper, SocialType socialToShare,\n String title, String text, String shareUrl, String[] recipients, boolean fromGmail)\n {\n switch (socialToShare) {\n case FACEBOOK:\n this._fbAppShare(act, uiHelper, shareUrl, text);\n break;\n case TWITTER:\n this._tweetShare(act, title, text);\n break;\n case EMAIL:\n this._emailShare(act, title, text, recipients, fromGmail);\n break;\n }\n }",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}"
] |
[
"0.57430816",
"0.56020725",
"0.51949704",
"0.5194255",
"0.517513",
"0.51750326",
"0.5093989",
"0.5093989",
"0.5018842",
"0.49852148",
"0.49212164",
"0.49053913",
"0.48713723",
"0.48670477",
"0.48328865",
"0.48128608",
"0.48035014",
"0.47931713",
"0.47885206",
"0.47316176",
"0.47239873",
"0.47224352",
"0.47142717",
"0.47067696",
"0.4697369",
"0.46890765",
"0.4679298",
"0.46517673",
"0.46517673",
"0.46406066",
"0.46379086",
"0.4623318",
"0.46188444",
"0.46134156",
"0.46069208",
"0.4606913",
"0.46023026",
"0.45937026",
"0.45504037",
"0.45303294",
"0.4527261",
"0.45139396",
"0.4512605",
"0.45095694",
"0.45081562",
"0.45023552",
"0.4500624",
"0.45002747",
"0.4499665",
"0.44696748",
"0.44689494",
"0.44680518",
"0.4455401",
"0.44526294",
"0.4451568",
"0.44365457",
"0.44365457",
"0.4433349",
"0.44333044",
"0.44333044",
"0.44309586",
"0.44264075",
"0.44220415",
"0.4419811",
"0.44118246",
"0.44118246",
"0.44002634",
"0.43897247",
"0.43858102",
"0.4377961",
"0.4376976",
"0.4372349",
"0.43706107",
"0.43695378",
"0.43691063",
"0.43674394",
"0.436437",
"0.4357664",
"0.43570256",
"0.4356371",
"0.43533725",
"0.4349196",
"0.43479955",
"0.43397805",
"0.43375885",
"0.4332107",
"0.4329571",
"0.43247002",
"0.43217003",
"0.4320421",
"0.4319837",
"0.43183184",
"0.43097568",
"0.4308084",
"0.4308084",
"0.4308084",
"0.4308084",
"0.4308084",
"0.4308084",
"0.4308084"
] |
0.6348659
|
0
|
Returns true if device ringer is silent or vibrate, otherwise false.
|
public static boolean isRingerSilent(Context context) {
AudioManager am = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
int ringerMode = am.getRingerMode();
if ((ringerMode == AudioManager.RINGER_MODE_SILENT)
|| (ringerMode == AudioManager.RINGER_MODE_VIBRATE)) {
return true;
}
return false;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public boolean getVibrationEnabled() {\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\n return prefs.getBoolean(\"vibration_switch\", true);\n }",
"static void vibrate() {\n String currentState = SettingDetail.settingDetails.get(VIBRATION_SETTING).getCurrentState();\n int ringerMode = audioManager.getRingerMode();\n if (currentState.equals(context.getString(R.string.enabled))\n || (currentState.equals(context.getString(R.string.followSystem))\n && (ringerMode == AudioManager.RINGER_MODE_NORMAL || ringerMode == AudioManager.RINGER_MODE_VIBRATE))) {\n vibrator.vibrate(VibrationEffect.createOneShot(100, VibrationEffect.DEFAULT_AMPLITUDE));\n }\n }",
"public static boolean isSupported() {\n\t\tLog.v(\"trace\", \"Checking Vibrator is supported \" + mVibrator.hasVibrator() );\n\t\treturn mVibrator != null && mVibrator.hasVibrator();\n\t}",
"boolean isCalibrating();",
"public boolean onSilenceRinger() {\n boolean z;\n if (this.mRemote == null) {\n HiLog.error(LOG_LABEL, \"onSilenceRinger fail, no remote.\", new Object[0]);\n return false;\n }\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(DistributedCallUtils.DISTRIBUTED_CALL_ABILITY_DESCRIPTOR);\n this.mRemote.transact(5, obtain, obtain2, 0);\n z = true;\n try {\n HiLog.info(LOG_LABEL, \"onSilenceRinger.\", new Object[0]);\n } catch (RemoteException unused) {\n }\n } catch (RemoteException unused2) {\n z = false;\n try {\n HiLog.error(LOG_LABEL, \"onSilenceRinger got RemoteException.\", new Object[0]);\n obtain2.recycle();\n obtain.recycle();\n return z;\n } catch (Throwable th) {\n obtain2.recycle();\n obtain.recycle();\n throw th;\n }\n }\n obtain2.recycle();\n obtain.recycle();\n return z;\n }",
"public boolean isLingering();",
"public boolean isSoundNotificationEnabled()\r\n {\r\n return isSoundNotificationEnabled;\r\n }",
"public boolean setVibrate() {\n boolean isVibrate = checkVibrate();\n editor.putBoolean(Constans.KeyPreference.TURN_VIBRATE, !isVibrate);\n editor.commit();\n return !isVibrate;\n }",
"private int ringerMode () throws Exception {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tAudioManager audioManager = \n\t\t\t\t(AudioManager)ConfigAppValues.getContext().getSystemService(Context.AUDIO_SERVICE);\n\t\t\t\n\t\t\t\n\t\t\t//Only for traces\n\t\t\tswitch (audioManager.getRingerMode()) {\n\t\t\t\n\t\t\t\tcase AudioManager.RINGER_MODE_SILENT:\n\t\t\t\t\tif (QSLog.DEBUG_D)QSLog.d(CLASS_NAME, \"Ringer_Mode_Silent\");\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase AudioManager.RINGER_MODE_NORMAL:\n\t\t\t\t\tif (QSLog.DEBUG_D)QSLog.d(CLASS_NAME, \"Ringer_Mode_Normal\");\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase AudioManager.RINGER_MODE_VIBRATE:\n\t\t\t\t\tif (QSLog.DEBUG_D)QSLog.d(CLASS_NAME, \"Ringer_Mode_Vibrate\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\treturn audioManager.getRingerMode();\n\t\t\t\n\t\t}catch (Exception e) {\n\t\t\tif (QSLog.DEBUG_E)QSLog.e(CLASS_NAME, ExceptionUtils.exceptionTraceToString(\n\t\t\t\t\te.toString(), \n\t\t\t\t\te.getStackTrace()));\n\t\t\tthrow new Exception();\n\t\t}\n\t\t\n\t}",
"private boolean adjustAlarmStreamVolume(){\n \tAudioManager audioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE);\t\n \tint volume = audioManager.getStreamVolume(AudioManager.STREAM_ALARM);\n \tfinal int silentModeStreams = Settings.System.getInt(getContentResolver(),\n\t Settings.System.MODE_RINGER_STREAMS_AFFECTED, 0);\n \tboolean result = (silentModeStreams & ALARM_STREAM_TYPE_BIT) == 0;\n \tif (!result && volume == 0) {\n \t\taudioManager.adjustStreamVolume(AudioManager.STREAM_ALARM,\n \t\t\t\tAudioManager.ADJUST_SAME, AudioManager.FLAG_SHOW_UI);\n \t\treturn true;\n \t}\n\t\t\t\n \treturn false;\n }",
"public boolean isSound() {\n\t\treturn true;\n\t}",
"boolean hasVolume();",
"public boolean soundDeviceCanPlayback(String device);",
"public boolean isPossibleSpectate() throws RemoteException {\n return mainScreenProvider.isPossibleSpectate();\n }",
"public void vibrate() {\n if ((deltaX > vibrateThreshold) || (deltaY > vibrateThreshold) || (deltaZ > vibrateThreshold)) {\n v.vibrate(50);\n status = true;\n } else {\n status = false;\n }\n }",
"boolean isSignal();",
"public boolean soundDeviceCanCapture(String device);",
"public static boolean isSound() {\n return sound;\n }",
"private boolean isVoicemailAvailable() {\n boolean promptEnabled = Settings.System.getInt(getActivity().getContentResolver(),\n Settings.System.MULTI_SIM_VOICE_PROMPT, 0) == 1;\n Log.d(TAG, \"prompt enabled : \"+ promptEnabled);\n if (promptEnabled) {\n return hasVMNumber();\n } else {\n try {\n mSubscription = MSimTelephonyManager.getDefault().getPreferredVoiceSubscription();\n return (MSimTelephonyManager.getDefault().getVoiceMailNumber(mSubscription) != null);\n } catch (SecurityException se) {\n // Possibly no READ_PHONE_STATE privilege.\n Log.w(TAG, \"SecurityException is thrown. Maybe privilege isn't sufficient.\");\n }\n }\n return false;\n }",
"public boolean isSpeaking() {\n return (mSelf.mIsSpeaking && (mSpeechQueue.size() < 1));\n }",
"public boolean isSoundPlaybackEnabled()\r\n {\r\n return isSoundPlaybackEnabled;\r\n }",
"@Override\r\n\t\tpublic boolean dmr_getMute() throws RemoteException {\n\t\t\tboolean mute = soundManager.getAudioMuteEnabled();\r\n\t\t\tUtils.printLog(TAG, \"soundManager.getAudioMuteEnabled()\" + mute);\r\n\t\t\treturn mute;\r\n\t\t}",
"public final boolean isAlarmOn()\n {\n return this.getPropertyValue(GUILoggerSeverityProperty.ALARM);\n }",
"boolean hasFingerPrint();",
"boolean isReceiving();",
"public boolean getRingDuringIncomingEarlyMedia();",
"public boolean micEnabled();",
"@SuppressLint(\"MissingPermission\")\n protected void vibrate() {\n if (ContextCompat.checkSelfPermission(getContext(), Manifest.permission.VIBRATE)\n == PackageManager.PERMISSION_GRANTED && vibratingEnabled) {\n vibrator.vibrate(VIBRATION_DURATION);\n }\n }",
"public boolean checkVoiceRecognition() {\n\t\tPackageManager pm = context.getPackageManager();\n\t\tList<ResolveInfo> activities = pm.queryIntentActivities(new Intent(\n\t\t\t\tRecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0);\n\t\tif (activities.size() == 0) {\n\t\t\tToast.makeText(context, \"Voice recognizer not present\",\n\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean isWakeKey() {\n switch (this) {\n case BACK:\n case MENU:\n case WAKEUP:\n case PAIRING:\n case STEM_1:\n case STEM_2:\n case STEM_3:\n return true;\n default:\n return false;\n }\n }",
"public boolean isSilent() {\n for(int iSndGrp = 0, i = 0;\n iSndGrp < XaAdpcmDecoder.ADPCM_SOUND_GROUPS_PER_SECTOR;\n iSndGrp++, i += XaAdpcmDecoder.SIZEOF_SOUND_GROUP)\n {\n // just check if all ADPCM values are 0\n for (int j = 16; j < XaAdpcmDecoder.SIZEOF_SOUND_GROUP; j++) {\n if (getCdSector().readUserDataByte(i+j) != 0)\n return false;\n }\n }\n return true;\n }",
"public boolean isSpectator()\n {\n NetworkPlayerInfo networkplayerinfo = Minecraft.getMinecraft().getNetHandler().getPlayerInfo(this.getGameProfile().getId());\n return networkplayerinfo != null && networkplayerinfo.getGameType() == GameType.SPECTATOR;\n }",
"public boolean takeControl(){\r\n\t\tif(sound.readValue()>40){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@JsonGetter(\"silent\")\n public boolean isSilent() {\n return silent != null && silent;\n }",
"boolean hasSignal();",
"public static boolean isImsCallSupport() {\n return MTK_IMS_SUPPORT && MTK_VOLTE_SUPPORT;\n }",
"public boolean isSoundEnabled() {\n return soundToggle;\n }",
"public boolean getAcceptsAudio() {\n\n return m_acceptsAudio;\n }",
"private Boolean getUseMicrophone() {\n return true;\n }",
"boolean getShutterSoundPref();",
"public boolean isSoundPCSpeakerEnabled()\r\n {\r\n return isSoundPCSpeakerEnabled;\r\n }",
"public static boolean enableVolumeMonitoring() {\r\n return enableVolumeMonitoring.getValue();\r\n }",
"public boolean getSoundShot() { return soundShot; }",
"public boolean onTouch(View v, MotionEvent event) {\n\n Log.d(TAG, \"onTouch: \");\n if (SIP_Audio_Call == null) {\n return false;\n } else if (event.getAction() == MotionEvent.ACTION_DOWN && SIP_Audio_Call != null && SIP_Audio_Call.isMuted()) {\n SIP_Audio_Call.toggleMute();\n Toast.makeText(this, \"ACTION_DOWN\", Toast.LENGTH_SHORT).show();\n } else if (event.getAction() == MotionEvent.ACTION_UP && !SIP_Audio_Call.isMuted()) {\n SIP_Audio_Call.toggleMute();\n Toast.makeText(this, \"ACTION_UP\", Toast.LENGTH_SHORT).show();\n }\n return false;\n }",
"private boolean canRecognizeSpeechInput() {\n final Activity activity = getActivity();\n if (activity != null) {\n final List<ResolveInfo> activities = activity.getPackageManager()\n .queryIntentActivities(new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0);\n\n if (activities.size() > 0) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return false;\n }\n }",
"public boolean isAudio()\n {return false ;\n }",
"public boolean isPowerOn() {\n Log.d(TAG, \"Is Fist Power On: \" + (SystemProperties.getBoolean(IS_POWER_ON_PROPERTY, false)));\n\n if (!SystemProperties.getBoolean(IS_POWER_ON_PROPERTY, false)) {\n SystemProperties.set(IS_POWER_ON_PROPERTY, \"true\");\n return true;\n } else {\n return false;\n }\n }",
"private void setAudioProfilModem() {\n int ringerMode = mAudioManager.getRingerModeInternal();\n ContentResolver mResolver = mContext.getContentResolver();\n Vibrator vibrator = (Vibrator) mContext\n .getSystemService(Context.VIBRATOR_SERVICE);\n boolean hasVibrator = vibrator == null ? false : vibrator.hasVibrator();\n if (AudioManager.RINGER_MODE_SILENT == ringerMode) {\n if (hasVibrator) {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 0);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_VIBRATE);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_VIBRATE);\n /* @} */\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_RINGER,\n AudioManager.VIBRATE_SETTING_ON);\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_NOTIFICATION,\n AudioManager.VIBRATE_SETTING_ON);\n } else {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 1);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_NORMAL);\n /* @} */\n }\n } else if (AudioManager.RINGER_MODE_VIBRATE == ringerMode) {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 1);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_OUTDOOR);\n /* @} */\n }else if (AudioManager.RINGER_MODE_OUTDOOR == ringerMode) {//add by wanglei for outdoor mode\n Settings.System.putInt(mResolver,Settings.System.SOUND_EFFECTS_ENABLED, 1);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_NORMAL);\n }else {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 0);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_SILENT);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_SILENT);\n /* @} */\n if (hasVibrator) {\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_RINGER,\n AudioManager.VIBRATE_SETTING_OFF);\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_NOTIFICATION,\n AudioManager.VIBRATE_SETTING_OFF);\n }\n }\n }",
"public boolean checkiFRated(int newRate){\r\n\r\n\t\t//! ask the server if the user already voted this\r\n\t\treturn(FLAG_RATED);\r\n\t}",
"public boolean isConnected() {\n\t\t\treturn (m_soundManager instanceof RemoteSoundManager);\n\t\t}",
"public boolean getSoundAmbience() { return soundAmbience; }",
"public Boolean isRtcPEnable() {\n\t\treturn rtcPEnable;\n\t}",
"public void setVibrate(Boolean vibrate_on){\n this.vibrate_on = vibrate_on;\n }",
"public boolean getSoundDuck() { return soundDuck; }",
"@Override\n\tpublic boolean isRingTone(String paramString)\n\t{\n\t\treturn false;\n\t}",
"public boolean getMute();",
"public boolean isWakeUp() {\n return wakeUp;\n }",
"public boolean getSoundEnabled() { return soundEnabled; }",
"public void setVibrationOn() {\n\n }",
"public boolean isAudio() {\n\t\t\treturn this == AUDIO;\n\t\t}",
"@Override\n public boolean isStealthOn() {\n // Try to find a Mek Stealth system.\n for (Mounted mEquip : getMisc()) {\n MiscType mtype = (MiscType) mEquip.getType();\n if (mtype.hasFlag(MiscType.F_STEALTH)) {\n if (mEquip.curMode().equals(\"On\")) {\n // Return true if the mode is \"On\"\n return true;\n }\n }\n }\n // No Mek Stealth or system inactive. Return false.\n return false;\n }",
"public boolean isOnReceiveCalled() {\n return this.f49;\n }",
"public boolean adaptiveRateControlEnabled();",
"public synchronized boolean getEnabled() {\r\n return this.soundOn;\r\n }",
"public Boolean isMSROnline() throws DeviceException;",
"public boolean isMuted()\n\t{\n\t\treturn m_isMuted;\n\t}",
"public boolean updateSystemGestureExclusion() {\n if (this.mSystemGestureExclusionListeners.getRegisteredCallbackCount() == 0) {\n return false;\n }\n Region systemGestureExclusion = calculateSystemGestureExclusion();\n try {\n if (this.mSystemGestureExclusion.equals(systemGestureExclusion)) {\n return false;\n }\n this.mSystemGestureExclusion.set(systemGestureExclusion);\n for (int i = this.mSystemGestureExclusionListeners.beginBroadcast() - 1; i >= 0; i--) {\n try {\n this.mSystemGestureExclusionListeners.getBroadcastItem(i).onSystemGestureExclusionChanged(this.mDisplayId, systemGestureExclusion);\n } catch (RemoteException e) {\n Slog.e(TAG, \"Failed to notify SystemGestureExclusionListener\", e);\n }\n }\n this.mSystemGestureExclusionListeners.finishBroadcast();\n systemGestureExclusion.recycle();\n return true;\n } finally {\n systemGestureExclusion.recycle();\n }\n }",
"boolean isSoundPlaying() {\n return (audioTrack.getPlayState() == AudioTrack.PLAYSTATE_PLAYING);\n }",
"boolean hasReceiveTime();",
"public boolean isSuppressed();",
"public boolean isIPVoiceCallSupported() {\n\t\tLogger.i(TAG, \"isIPVoiceCallSupported value \" + ipVoiceCall);\n\t\treturn ipVoiceCall;\t\t\t\t\n\t}",
"boolean hasSendReading();",
"public boolean isPowered(){\n\t\tint value = sensor.readRawValue();\n\t\tDiscoveryVehicle.getMonitor().log(\"raw: \"+value);\n//\t\treturn Button.ENTER.isDown();\n\t\treturn (value < Configuration.HYDROGEN_MEASURE_TRIGGER_PRECISION);\n\t}",
"public boolean isDetecting()\n\t{\n\t\treturn currentlyDetecting;\n\t}",
"private boolean isRoaming() {\n if (isCarrierNetworkChangeActive()) {\n return false;\n }\n if (isCdma() && mServiceState != null) {\n final int iconMode = mServiceState.getCdmaEriIconMode();\n return mServiceState.getCdmaEriIconIndex() != EriInfo.ROAMING_INDICATOR_OFF\n && (iconMode == EriInfo.ROAMING_ICON_MODE_NORMAL\n || iconMode == EriInfo.ROAMING_ICON_MODE_FLASH);\n } else {\n return mServiceState != null && mServiceState.getRoaming();\n }\n }",
"public boolean isRSU() { return isRSU; }",
"public boolean getDataOnRoamingEnabled() {\n try {\n return Settings.Secure.getInt(phone.getContext().getContentResolver(), \n Settings.Secure.DATA_ROAMING) > 0;\n } catch (SettingNotFoundException snfe) {\n return false;\n }\n }",
"boolean hasPitch();",
"boolean hasPitch();",
"@VisibleForTesting\n public boolean isSmallBatteryDevice() {\n return ActivityManager.isSmallBatteryDevice();\n }",
"private Boolean isDeviceYouWant(BleManager.DiscoveryListener.DiscoveryEvent event) {\n String name = event.device().getName_native();\n if (name.toLowerCase().startsWith(\"polar\")) {\n Log.v(TAG, event.device().getName_native());\n return true;\n }\n return false;\n\n// // Test with prototype BLE device, same repro.\n// byte[] b = event.device().getScanRecord();\n// if (null == b) {\n// return false;\n// }\n// if (b.length < 22) {\n// return false;\n// }\n//\n// byte[] kCompanyIdentifier = new byte[] {(byte)0x01, (byte)0x02, (byte)0x03};\n// byte[] companyIdentifier = new byte[] {b[19], b[20], b[21]};\n// if (Arrays.equals(kCompanyIdentifier, companyIdentifier)){\n// return true;\n// }\n// return false;\n }",
"boolean hasDevice();",
"public boolean getDataOnRoamingEnabled() {\n try {\n return Settings.Secure.getInt(phone.getContext().getContentResolver(),\n Settings.Secure.DATA_ROAMING) > 0;\n } catch (SettingNotFoundException snfe) {\n return false;\n }\n }",
"public static boolean isReceivingSong(Player player) {\n\t\treturn ((plugin.playingSongs.get(player.getUniqueId()) != null) \n\t\t\t\t&& (!plugin.playingSongs.get(player.getUniqueId()).isEmpty()));\n\t}",
"public boolean isVoiceDetectionActivated() {\n return voiceDetectionActivated;\n }",
"public boolean isRzcMix() {\n if (CanJni.GetCanFsTp() == 2 && CanJni.GetSubType() == 4) {\n return true;\n }\n return false;\n }",
"private boolean checkBatteryLevelOK() {\n return true;\n }",
"public boolean isScuttle() {\n return scuttle;\n }",
"public boolean hasVolume() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"boolean isSMSPromptEnabled();",
"public boolean hasSignal() {\n return ((bitField0_ & 0x00004000) == 0x00004000);\n }",
"public static boolean toggleSound()\r\n\t{\r\n\t\tSettings.setSoundOn( !Settings.isSoundOn() );\r\n\t\treturn Settings.isSoundOn();\r\n\t}",
"public boolean hasMPPerSecond() {\n return ((bitField0_ & 0x00000020) == 0x00000020);\n }",
"public boolean isSystemKey() {\n switch (this) {\n case MENU:\n case SOFT_RIGHT:\n case HOME:\n case BACK:\n case CALL:\n case ENDCALL:\n case VOLUME_UP:\n case VOLUME_DOWN:\n case VOLUME_MUTE:\n case MUTE:\n case POWER:\n case HEADSETHOOK:\n case MEDIA_PLAY:\n case MEDIA_PAUSE:\n case MEDIA_PLAY_PAUSE:\n case MEDIA_STOP:\n case MEDIA_NEXT:\n case MEDIA_PREVIOUS:\n case MEDIA_REWIND:\n case MEDIA_RECORD:\n case MEDIA_FAST_FORWARD:\n case CAMERA:\n case FOCUS:\n case SEARCH:\n case BRIGHTNESS_DOWN:\n case BRIGHTNESS_UP:\n case MEDIA_AUDIO_TRACK:\n return true;\n default:\n return false;\n }\n }",
"public Boolean IsInterrupt() {\n Random r = new Random();\n int k = r.nextInt(100);\n //10%\n if (k <= 10) {\n return true;\n }\n return false;\n }",
"public boolean isNotificationOn(){\n return mSharedPreferences.getBoolean(SharedPrefContract.PREF_NOTIFICATION_TURNED_ON, true);\n }",
"boolean hasPingerLoc();",
"public int getRingtoneMode() {\n return mAudioManager.getRingerMode();\n }",
"public boolean hasVolume() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"public boolean playsSound() {\r\n\t\treturn playsSound;\r\n\t}"
] |
[
"0.68701446",
"0.6337699",
"0.6205674",
"0.6168283",
"0.6161094",
"0.6142337",
"0.59637624",
"0.5938003",
"0.5936418",
"0.59321815",
"0.59220123",
"0.586802",
"0.5866057",
"0.58558047",
"0.5839832",
"0.5831091",
"0.58078164",
"0.5804855",
"0.57494295",
"0.56781757",
"0.5666237",
"0.5660653",
"0.56520635",
"0.5582534",
"0.55777425",
"0.5565438",
"0.55492806",
"0.5528584",
"0.5508231",
"0.55039275",
"0.55032897",
"0.55022556",
"0.549628",
"0.54933685",
"0.54825485",
"0.5474135",
"0.54684526",
"0.54601073",
"0.54574555",
"0.5444129",
"0.5433573",
"0.54295844",
"0.54272985",
"0.54236585",
"0.5420123",
"0.5404135",
"0.5390274",
"0.5386607",
"0.5365692",
"0.5362538",
"0.53607416",
"0.5360029",
"0.5358476",
"0.5353888",
"0.5340757",
"0.5334186",
"0.5327523",
"0.53221875",
"0.5319676",
"0.5316758",
"0.5304285",
"0.5298311",
"0.52892673",
"0.52881724",
"0.5283065",
"0.52819103",
"0.52792925",
"0.5275554",
"0.5274947",
"0.5274809",
"0.5272956",
"0.52720124",
"0.52673686",
"0.52571726",
"0.5256316",
"0.5238761",
"0.5217769",
"0.52157295",
"0.52157295",
"0.5215568",
"0.5214099",
"0.52041984",
"0.52040017",
"0.5196836",
"0.5191975",
"0.5188673",
"0.5184644",
"0.51745474",
"0.5168987",
"0.5166753",
"0.516657",
"0.5158353",
"0.51538914",
"0.5152441",
"0.5151755",
"0.5150608",
"0.51482713",
"0.5137109",
"0.51370203",
"0.51358575"
] |
0.71344626
|
0
|
Creates a new checkerboard.
|
public CheckerboardImage(int tileSize, int width, int height)
throws IllegalArgumentException {
if (tileSize < 0 || width < 0 || height < 0) {
throw new IllegalArgumentException("Cannot have negative value.");
}
this.tileSize = tileSize;
this.width = width;
this.height = height;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public IImage createCheckerboard() {\n List<List<Pixel>> grid = new ArrayList<>();\n for (int i = 0; i < this.height; i++) {\n List<Pixel> row;\n // alternating between making rows starting with black or white tiles\n if (i % 2 == 0) {\n // start white\n for (int j = 0; j < this.tileSize; j++) {\n row = createRow(255, 0, (i * this.tileSize) + j);\n grid.add(row);\n }\n }\n else {\n // start black\n for (int m = 0; m < this.tileSize; m++) {\n row = createRow(0, 255, (i * this.tileSize) + m);\n grid.add(row);\n }\n }\n }\n return new Image(grid, 255);\n }",
"public static void createBoard() {\n Checkers[] CheckerBoard = new Checkers[24];\n CheckerBoard[0] = new Checkers(0,1,\"black\");\n CheckerBoard[1] = new Checkers(0,3,\"black\");\n CheckerBoard[2] = new Checkers(0,5,\"black\");\n CheckerBoard[3] = new Checkers(0,7,\"black\");\n CheckerBoard[4] = new Checkers(1,0,\"black\");\n CheckerBoard[5] = new Checkers(1,2,\"black\");\n CheckerBoard[6] = new Checkers(1,4,\"black\");\n CheckerBoard[7] = new Checkers(1,6,\"black\");\n CheckerBoard[8] = new Checkers(2,1,\"black\");\n CheckerBoard[9] = new Checkers(2,3,\"black\");\n CheckerBoard[10] = new Checkers(2,5,\"black\");\n CheckerBoard[11] = new Checkers(2,7,\"black\");\n CheckerBoard[12] = new Checkers(5,1,\"red\");\n CheckerBoard[13] = new Checkers(5,3,\"red\");\n CheckerBoard[14] = new Checkers(5,5,\"red\");\n CheckerBoard[15] = new Checkers(5,7,\"red\");\n CheckerBoard[16] = new Checkers(6,0,\"red\");\n CheckerBoard[17] = new Checkers(6,2,\"red\");\n CheckerBoard[18] = new Checkers(6,4,\"red\");\n CheckerBoard[19] = new Checkers(6,6,\"red\");\n CheckerBoard[20] = new Checkers(7,1,\"red\");\n CheckerBoard[21] = new Checkers(7,3,\"red\");\n CheckerBoard[22] = new Checkers(7,5,\"red\");\n CheckerBoard[23] = new Checkers(7,7,\"red\");\n\n\n\n }",
"public void create() {\n\t\t// setup Chess board\n\t\tthis.removeAll();\n\t\tthis.layout = new GridLayout(this.startupBoardSize, this.startupBoardSize);\n\t\tthis.squares = new SquarePanel[this.startupBoardSize][this.startupBoardSize];\n\t\t\n\t\tsetLayout(layout);\n\t\tsetPreferredSize(new Dimension(600, 600));\n\t\tsetBorder(new LineBorder(new Color(0, 0, 0)));\n\n\t\t//paint the chess board\n\n\t\tfor (int i = 0; i < this.startupBoardSize; i++) \n\t\t{\n\t\t\tfor (int j = 0; j < this.startupBoardSize; j++) \n\t\t\t{\n\t\t\t\tsquares[i][j] = new SquarePanel(j, i);\n\t\t\t\tsquares[i][j].setPreferredSize(new Dimension(600 / this.startupBoardSize - 5, 600 / this.startupBoardSize - 5));\n\n\n\t\t\t\tsquares[i][j].setBackground(Color.WHITE);\n\t\t\t\t\n\t\t\t\tif (((i + j) % 2) == 0) \n\t\t\t\t{\n\t\t\t\t\tsquares[i][j].setBackground(Color.DARK_GRAY);\n\t\t\t\t}\n\t\t\t\tadd(squares[i][j]);\n\t\t\t}\n\t\t}\n\t}",
"public CheckerBoard(){\n mCheckerBoard = new ArrayList<>(64);\n }",
"public void createBoard() {\n\t\tboard = new Piece[8][8];\n\t\t\n\t\tfor(int i=0; i<8; i++) {\n\t\t\tfor(int j=0; j<8; j++) {\n\t\t\t\tboard[i][j] = null;\n\t\t\t}\n\t\t}\n\t}",
"void checkerboard(int checkerSquareArea);",
"public ChessBoard() {\n initComponents();\n createChessBoard();\n\n }",
"public abstract void createBoard();",
"public static void makeBoardChess() {\r\n \r\n white = new AllPiece(\"White\");\r\n black = new AllPiece(\"Black\");\r\n \r\n }",
"MainBoard createMainBoard();",
"Board() {\n this(INITIAL_PIECES, BLACK);\n _countBlack = 12;\n _countWhite = 12;\n _moveHistory = new ArrayList<Move>();\n _movesMade = 0;\n }",
"private void initializeBoard(){\r\n checks =new int[][]{{0,2,0,2,0,2,0,2},\r\n {2,0,2,0,2,0,2,0},\r\n {0,2,0,2,0,2,0,2},\r\n {0,0,0,0,0,0,0,0},\r\n {0,0,0,0,0,0,0,0},\r\n {1,0,1,0,1,0,1,0},\r\n {0,1,0,1,0,1,0,1},\r\n {1,0,1,0,1,0,1,0}};\r\n }",
"public BoardTest() {\n initComponents();\n \n createSudoku();\n //createBoggle();\n }",
"public static int[][] createBoard() {\r\n\t\t\r\n\t\tint[][] board = new int [8][8];\r\n\t\t//printing the red solduers\r\n\t\tfor (int line =0,column=0;line<3;line=line+1){\r\n\t\t\tif (line%2==0){column=0;}\r\n\t\t\telse {column=1;}\r\n\t\t\tfor (;column<8;column=column+2){\r\n\t\t\t\tboard [line][column] = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//printing the blu solduers\r\n\t\tfor (int line =5,column=0;line<8;line=line+1){\r\n\t\t\tif (line%2==0){column=0;}\r\n\t\t\telse {column=1;}\r\n\t\t\tfor (;column<8;column=column+2){\r\n\t\t\t\tboard [line][column] = -1;\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t\treturn board;\r\n\t}",
"@Override\r\n\tpublic Board createBoard(long width, long height)\r\n\t{\r\n\t\treturn new Board(width, height);\r\n\t}",
"public static void createBoard() \n\t{\n\t\tfor (int i = 0; i < tictactoeBoard.length; i++) \n\t\t{\n\t\t\ttictactoeBoard[i] = '-';\n\t\t}\n\t}",
"public Board() {\n this.board = new byte[][] { new byte[3], new byte[3], new byte[3] };\n }",
"public Board createBoard(Square[][] grid) {Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\");assert grid != null; Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1053\"); Board board = new Board(grid); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1079\"); int width = board.getWidth(); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1115\"); int height = board.getHeight(); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1148\"); for (int x = 0; x < width; x++) {\n\t\t\tfor (int y = 0; y < height; y++) {\n\t\t\t\tSquare square = grid[x][y];\n\t\t\t\tfor (Direction dir : Direction.values()) {\n\t\t\t\t\tint dirX = (width + x + dir.getDeltaX()) % width;\n\t\t\t\t\tint dirY = (height + y + dir.getDeltaY()) % height;\n\t\t\t\t\tSquare neighbour = grid[dirX][dirY];\n\t\t\t\t\tsquare.link(neighbour, dir);\n\t\t\t\t}\n\t\t\t}\n\t\t} Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1183\"); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1552\");return board ; }",
"private TextureUniform makeCheckerboardTexture(int textureSize) {\n Uint8Array checkerboard = Uint8ArrayNative.create(4 * textureSize * textureSize);\n\n int maxDiagonal = 2 * (textureSize - 1);\n for (int i = 0; i < textureSize; i++) {\n for (int j = 0; j < textureSize; j++) {\n int index = i * textureSize + j;\n // Checking the parity of the diagonal number gives a checkerboard\n // pattern.\n int diagonal = i + j;\n if (diagonal % 2 == 0) {\n // set the square red. We only need to set the red channel!\n checkerboard.set(4 * index, 255);\n }\n // otherwise we'd set the square to black. But arrays are already\n // initialized to 0s so nothing needed here.\n\n // for the alpha channel, map the diagonal number to [0, 255]\n checkerboard.set(4 * index + 3, (255 * diagonal) / maxDiagonal);\n }\n }\n return new TextureUniform(new TextureUniformOptions()\n .setTypedArray(checkerboard)\n .setWidth(textureSize)\n .setHeight(textureSize)\n .setMinificationFilter(TextureMinificationFilter.NEAREST())\n .setMagnificationFilter(TextureMagnificationFilter.NEAREST()));\n }",
"public Board()\r\n\t{\r\n\t\tsuper(8, 8);\r\n\t}",
"public void newBoard(LiteBoard board) {\n }",
"private GameBoard() {}",
"public Scoreboard() {\n\t}",
"TetrisBoard() {\n\t\t// create new board \n\t\tblockMatrix = new boolean[NUM_ROWS][NUM_COLS];\n\t\t\n\t\t// fill in values for board\n\t\tinitBoard();\n\t\t\n\t\t// add new piece to fall\n\t\taddNewPiece();\n\t\t\n\t\t// start scores at 0\n\t\tnumLines = 0;\n\t\tnumTetrises = 0;\n\t}",
"public void Makeboard() {\r\n\r\n Normalboard(new Point2(20, 300));\r\n Normalboard(new Point2(224, 391));\r\n Stingboard(new Point2(156, 209));\r\n Leftlboard(new Point2(88, 482));\r\n Rightboard(new Point2(292, 573));\r\n Regenerateboard(new Point2(360, 118));\r\n\r\n }",
"private void createBoard() {\n\t// An array of rows containing rows with squares are made\n\t\tfor (int i = 0; i < squares.length; i++) {\n\t \trows[i] = new Row(squares[i]);\n\t\t}\n\n\n\t// An array of columns containing columns with squares are made\n\t\tSquare[] columnArray = new Square[size];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t for (int row = 0; row < size; row++) {\n\t\t\t\tcolumnArray[row] = squares[row][i];\n\t\t }\n\t\t columns[i] = new Column(columnArray);\n\t\t columnArray = new Square[size];\n\t\t}\n\n\n\t\tSquare[] boxArray;\n\t\tint counter;\n\t\t// Box nr i\n\t\tfor (int i = 0; i < size; i = i + height) {\n\t\t // Box nr j\n\t\t for (int j = 0; j < size; j = j + length) {\n\t\t\t\tcounter = 0;\n\t\t\t\tboxArray = new Square[size];\n\t\t\t\tint rowIndex = (i / height) * height;\n\t\t\t\tint columnIndex = (j / length) * length;\n\t\t\t\t// Row nr k\n\t\t\t\tfor (int k = rowIndex; k < rowIndex + height; k++) {\n\t\t\t\t // Column nr l\n\t\t\t\t for (int l = columnIndex; l < columnIndex + length; l++) {\n\t\t\t\t\t\tboxArray[counter] = squares[k][l];\n\t\t\t\t\t\tcounter++;\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tboxes[j/length][i/height] = new Box(boxArray);\n\t\t }\n\t\t}\t\n\t\tcreatePointers();\n }",
"public TicTacToeBoard() {board = new int[rows][columns];}",
"public Board(Player p1, Player p2) {\r\n try {\r\n crownImage = ImageIO.read(new File(\"crown.jpg\"));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n checks = new int[8][8];\r\n currentPlayer = p2;\r\n nextPlayer = p1;\r\n whiteQueens = 0;\r\n whiteChecks = 12;\r\n blackQueens = 0;\r\n blackChecks = 12;\r\n winner = null;\r\n isGame = true;\r\n window(this);\r\n initializeBoard();\r\n swapPlayer();\r\n repaint();\r\n\r\n }",
"public JumbleBoard()\n {\n }",
"public void createBoard() {\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[i].length; j++) {\n matrix[i][j] = WATER;\n }\n }\n }",
"private void generateBoard(){\n\t}",
"public Board() {\n initialize(3, null);\n }",
"public Board(int dimensions){\n this.dimensions = dimensions;\n createBoard(dimensions);\n this.status = Status.CREATED;\n this.hitsLeft = 15;\n }",
"public AIPlayer(Board board) {\n cells = board.squares;\n }",
"public Board(Board a)\n {\n mainBoard=false;\n squares = new Square[Chess.ROWS][Chess.COLUMNS];\n setLayout(new GridLayout(Chess.ROWS,Chess.COLUMNS,0,0));\n if (a.firstSelected==null)\n firstSelected=null;\n else\n firstSelected = new Piece(a.firstSelected);\n for (int i = 0; i < Chess.ROWS; i++)\n for (int j = 0; j < Chess.COLUMNS; j++)\n squares[i][j] = new Square(a.squares[i][j]);\n }",
"Board createLayout();",
"public Board()\n\t{\n\t\tcols = DEFAULT_WIDTH;\n\t\trows = DEFAULT_HEIGHT;\n\t\t\n\t\tpieces = new int[rows][cols];\n\t\tif (pieces.length > 0)\n\t\t{\n\t\t\tfor (int i = 0; i < pieces.length; i++)\n\t\t\t\tfor (int j = 0; j < pieces[0].length; j++)\n\t\t\t\t\tpieces[i][j] = -1;\n\t\t}\n\t}",
"void generateNewBoard() {\n createAvailableDice();\n\n // Add them to board\n generateBoardLayout();\n }",
"public ChessboardView() {\n\t\t\n\t\tcontroller = new ChessController(this);\n\t\t\n\t\tsetLayout(new GridLayout(10, 10));\n\t\t\n\t\t// creo i bottoni (caselle della scacchiera)\n\t\tcreateButtons();\n\t\t\n\t\t// assegno componenti alla griglia (buttons e labels)\n\t\taddComponents();\n\t}",
"public CheckerBoard(int size) {\n super(new int[size * tilesPerSide][size * tilesPerSide][3]);\n for (int y = 0; y < this.getHeight(); ++y) {\n for (int x = 0; x < this.getWidth(); ++x) {\n for (int channel = 0; channel < 3; ++channel) {\n this.data[y][x][channel] = ((x / size + y / size) % 2 == 1) ? 0 : 255;\n }\n }\n }\n }",
"public Board()\r\n\t{\r\n\t\tfor(int x = 0; x < 9; x++)\r\n\t\t\tfor(int y = 0 ; y < 9; y++)\r\n\t\t\t{\r\n\t\t\t\tboard[x][y] = new Cell();\r\n\t\t\t\tboard[x][y].setBoxID( 3*(x/3) + (y)/3+1);\r\n\t\t\t}\r\n\t}",
"private void testBoardCreation() {\n for (int r = 0; r < Constants.BOARD_GRID_ROWS; r++) {\n for (int c = 0; c < Constants.BOARD_GRID_COLUMNS; c++) {\n Vector2 tokenLocation = this.mBoardLevel.getCenterOfLocation(r, c);\n Image tokenImage = new Image(this.mResources.getToken(PlayerType.RED));\n tokenImage.setPosition(tokenLocation.x, tokenLocation.y);\n this.mStage.addActor(tokenImage);\n }\n }\n }",
"public Sudoku() {\n this.board = new int[size][size];\n }",
"Board() {\n this.cardFactory = new CardFactory(this);\n }",
"abstract Checker newChecker(int x, int y);",
"public ChessRunner(){\n\t\taddMouseListener(this);\n\t\tfor(int i=0;i<8;i++){\n\t\t\tfor (int j=1;j<7;j++)\n\t\t\t\tif(j==1)\n\t\t\t\t\tboard[i][j] = new BlackPawn();\n\t\t\t\telse if(j==6)\n\t\t\t\t\tboard[i][j] = new WhitePawn();\n\t\t\t\telse\n\t\t\t\t\tboard[i][j]= new BlankPiece();\n\t\t}\n\t\tboard[1][0] = new BlackKnight();\n\t\tboard[6][0] = new BlackKnight();\n\t\tboard[0][0] = new BlackRook();\n\t\tboard[7][0] = new BlackRook();\n\t\tboard[2][0] = new BlackBishop();\n\t\tboard[5][0] = new BlackBishop();\n\t\tboard[4][0] = new BlackKing();\n\t\tboard[3][0] = new BlackQueen();\n\t\t\n\t\tboard[1][7] = new WhiteKnight();\n\t\tboard[6][7] = new WhiteKnight();\n\t\tboard[0][7] = new WhiteRook();\n\t\tboard[7][7] = new WhiteRook();\n\t\tboard[2][7] = new WhiteBishop();\n\t\tboard[5][7] = new WhiteBishop();\n\t\tboard[4][7] = new WhiteKing();\n\t\tboard[3][7] = new WhiteQueen();\n\t\t\n\t}",
"public PersonalBoard(){\n this(0);\n }",
"public Board() {\n\t\tdimension = 9;\n\t\tpuzzle = new int[dimension][dimension];\n\t}",
"public Board() {\n\t\tintializeBoard(_RowCountDefault, _ColumnCountDefault, _CountToWinDefault);\n\t}",
"private Board create3by3Board() {\n Tile[][] tiles;\n Tile t1 = new Tile(0, 3);\n Tile t2 = new Tile(1, 3);\n Tile t3 = new Tile(2, 3);\n Tile t4 = new Tile(3, 3);\n Tile t5 = new Tile(4, 3);\n Tile t6 = new Tile(5, 3);\n Tile t7 = new Tile(6, 3);\n Tile t8 = new Tile(7, 3);\n Tile t9 = new Tile(8, 3);\n tiles = new Tile[3][3];\n tiles[0][0] = t7;\n tiles[0][1] = t6;\n tiles[0][2] = t2;\n tiles[1][0] = t5;\n tiles[1][1] = t9;\n tiles[1][2] = t3;\n tiles[2][0] = t1;\n tiles[2][1] = t8;\n tiles[2][2] = t4;\n return new Board(tiles);\n }",
"@Override\n public void createBoard(List<List<Boolean>> mines) {\n dims = new Point(\n Util.clamp(mines.get(0).size(), MIN_DIM_X, MAX_DIM_X),\n Util.clamp(mines.size(), MIN_DIM_Y, MAX_DIM_Y));\n int maxMines = (int) ((dims.getX() - 1) * (dims.getY() - 1));\n this.numMines = Util.clamp(numMines, MIN_MINES, maxMines);\n\n // Create Cells based on mines\n cells = new ArrayList<>();\n for (int i = 0; i < dims.getY(); i++) {\n ArrayList<Cell> oneRow = new ArrayList<>();\n for (int j = 0; j < dims.getX(); j++) {\n oneRow.add(new CellImpl(this, new Point(j, i), mines.get(i).get(j)));\n }\n cells.add(oneRow);\n }\n\n updateCellNumbers();\n }",
"public Board()\r\n\t{\r\n\t\treset();\r\n\t}",
"public TicTacToeBoard() {\n grid = new Cell[N][N];\n\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++)\n grid[i][j] = new Cell(i, j, '-');\n }\n }",
"public Board()\r\n {\r\n board = new Piece[8][8];\r\n xLength = yLength = 8;\r\n }",
"public Board(String gameType) {\n propertyFactory = new TileFactory(gameType);\n createBoard();\n }",
"public void createNewGame() {\n\t\tfor(int n = 0; n < 8; n++){\n\t\t\tfor(int j = 0; j < 8; j++){\n\t\t\t\tif ( n % 2 == j % BLACK_PAWN ) {\n\t\t\t\t\tif (n < 3)\n\t\t\t\t\t\tarr[n][j] = RED_PAWN;\n\t\t\t\t\telse if (n > 4)\n\t\t\t\t\t\tarr[n][j] = BLACK_PAWN;\n\t\t\t\t\telse\n\t\t\t\t\t\tarr[n][j] = EMPTY;\n\t\t } \n\t\t\t\telse\n\t\t\t\t\tarr[n][j] = EMPTY;\n\t\t\t}\n\t\t}\n\t}",
"public Rules(ChessboardMatrix chessboard) {\n\t\tthis.chessboard = chessboard;\n\t}",
"public void createNewCardPuzzle(){\n if (playerCardList != null) removePrevCardList();\n pairMatchedCount = 0;\n playerCardList = new PlayerCardList();\n int tempCardNo = 0;\n for (int row = 0; row < 4; row++) {\n for (int col = 0; col < 5; col++) {\n PlayerCard playerCard = playerCardList.getPlayerCardByNo(tempCardNo);\n setCardFlipEventHandler(playerCard);\n playerCardPuzzle.add(playerCard, col, row);\n tempCardNo++;\n }\n }\n }",
"public static void newGame(){\n\t\tsetUp.buildBoard(8,8);\n\t\tfor(int i = 0; i < boardBoundsRow * boardBoundsColumn; i++){\n\t\t\tJPanel selectedTile = (JPanel) userInterface.boardButtons.getComponent(i);\n\t\t\tselectedTile.removeAll();\n\t\t\tselectedTile.revalidate();\n\t\t}\n\t\tuserInterface.addBlackPiece();\n\t\tuserInterface.addWhitePiece();\n\t\tuserInterface.check.setText(\"You are not in check\");\n\t\tking.blackKingCheck = false;\n\t\tking.whiteKingCheck = false;\n\t\tturn = \"white\";\n\t\tString playerTurn = \"Player turn: \";\n\t\tuserInterface.turn.setText(playerTurn.concat(turn));\n\t\tundoMoveClass.clearStacks();\n\t}",
"public IntelMainboard createMainboard() {\n\t\treturn new IntelMainboard();\n\t}",
"@Override\r\n\tpublic void createBoardWithFile(Board board) {\n\t\t\r\n\t}",
"public static CellModel buildNewBoard(MainActivity activity) {\r\n if (cellModel == null) {\r\n cellModel = new CellModel();\r\n } else {\r\n cellModel.resetAllCells();\r\n }\r\n Random r = new Random(System.currentTimeMillis());\r\n int filledCells = r.nextInt(15) + 17;\r\n MaskBoardGeneratorTask task = new MaskBoardGeneratorTask(filledCells, activity);\r\n BackgroundTaskManager.getInstance().runTask(task, cellModel);\r\n return cellModel;\r\n }",
"public Board(int row, int column, int countToWin) {\n\t\tintializeBoard(row, column, countToWin);\n\t}",
"public Board(float width, float height) {\r\n tablero = new Array<BlockDrawable>();\r\n this.width = width;\r\n this.height = height;\r\n deletedRowsInfo.ordered = true;\r\n reset();\r\n }",
"public static StackPane createBoard() {\n StackPane stackPane = new StackPane();\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n Tile tile = new Tile();\n Coordinates coordinates = new Coordinates(i, j);\n tile.setTextValue(\"\");\n tile.setTranslateX(i * 50);\n tile.setTranslateY(j * 50);\n tile.setEditable(true);\n tile.setTileId(coordinates);\n stackPane.getChildren().add(tile);\n tiles.put(coordinates, tile);\n }\n }\n return stackPane;\n }",
"public Board()\r\n\t{\r\n\t\tthis.grid = new CellState[GRID_SIZE][GRID_SIZE];\r\n\t\tthis.whiteMarblesCount = MARBLES_COUNT;\r\n\t\tthis.blackMarblesCount = MARBLES_COUNT;\r\n\t\t\r\n\t\t/**\r\n\t\t * Initializes the board with empty value\r\n\t\t */\r\n\t\tfor (int indexcol = 0; indexcol < GRID_SIZE; indexcol++)\r\n\t\t{\r\n\t\t\tfor (int indexrow = 0; indexrow < GRID_SIZE; indexrow++)\r\n\t\t\t{\r\n\t\t\t\tthis.grid[indexrow][indexcol] = CellState.EMPTY;\t\t\t\t\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Sets marbles on the board with default style\r\n\t\t */\r\n\t\tfor (int indexcol = 0; indexcol < 5; indexcol++)\r\n\t\t{\r\n\t\t\tthis.grid[0][indexcol] = CellState.WHITE_MARBLE;\r\n\t\t\tthis.grid[8][8 - indexcol] = CellState.BLACK_MARBLE;\r\n\t\t}\r\n\t\tfor (int indexcol = 0; indexcol < 6; indexcol++)\r\n\t\t{\r\n\t\t\tthis.grid[1][indexcol] = CellState.WHITE_MARBLE;\r\n\t\t\tthis.grid[7][8 - indexcol] = CellState.BLACK_MARBLE;\r\n\t\t}\r\n\t\tfor (int indexcol = 2; indexcol < 5; indexcol++)\r\n\t\t{\r\n\t\t\tthis.grid[2][indexcol] = CellState.WHITE_MARBLE;\r\n\t\t\tthis.grid[6][8 - indexcol] = CellState.BLACK_MARBLE;\r\n\t\t}\r\n\t\tthis.grid[3][8] = CellState.INVALID;\r\n\t\tthis.grid[2][7] = CellState.INVALID;\r\n\t\tthis.grid[1][6] = CellState.INVALID;\r\n\t\tthis.grid[0][5] = CellState.INVALID;\r\n\t\tthis.grid[5][0] = CellState.INVALID;\r\n\t\tthis.grid[6][1] = CellState.INVALID;\r\n\t\tthis.grid[7][2] = CellState.INVALID;\r\n\t\tthis.grid[8][3] = CellState.INVALID;\r\n\t}",
"public ScoreBoard()\r\n {\r\n super();\r\n int boardWidth = 200;\r\n int boardHeight = 30;\r\n \r\n board = new GreenfootImage(boardWidth,boardHeight);\r\n board.setColor(Color.green); \r\n //&& Color.blue);\r\n board.fillRect(0, 0, boardWidth,boardHeight);\r\n this.setImage(board);\r\n \r\n //draw it\r\n update();\r\n }",
"public Board() {\n playerNumber = 2;\n deadBlackCount = 0;\n deadWhiteCount = 0;\n deadRedCount = 0;\n deadBlueCount = 0;\n\n fields = new Field[DIMENSION][DIMENSION];\n // init fields\n for (int i = 0; i < DIMENSION; i++) {\n for (int j = 0; j < DIMENSION; j++) {\n fields[i][j] = new Field();\n fields[i][j].setX(i);\n fields[i][j].setY(j);\n }\n }\n }",
"private Parent create() {\n root.setPrefSize(600,600);\r\n\r\n for(int i = 0; i < 3; ++i) {\r\n for(int j = 0; j < 3; ++j) {\r\n Tile tile = new Tile();\r\n tile.setTranslateX(j * 200);\r\n tile.setTranslateY(i * 200);\r\n\r\n root.getChildren().add(tile);\r\n board[j][i] = tile;\r\n }\r\n }\r\n\r\n // horizontal strikes\r\n for(int i = 0; i < 3; ++i) {\r\n comboList.add(new Combination(board[0][i], board[1][i], board[2][i]));\r\n }\r\n\r\n // vertical strikes\r\n for(int j = 0; j < 3; ++j) {\r\n comboList.add(new Combination(board[j][0], board[j][1], board[j][2]));\r\n }\r\n\r\n // diagonal strikes\r\n comboList.add(new Combination(board[0][0], board[1][1], board[2][2]));\r\n comboList.add(new Combination(board[2][0], board[1][1], board[0][2]));\r\n\r\n return root;\r\n }",
"public ThirteensBoard()\n {\n super(BOARD_SIZE, RANKS, SUITS, POINT_VALUES);\n }",
"@Override\n public void createBoard(int width, int height, int numMines) {\n // Clamp the dimensions and mine numbers\n dims = new Point(Util.clamp(width, MIN_DIM_X, MAX_DIM_X),\n Util.clamp(height, MIN_DIM_Y, MAX_DIM_Y));\n int maxMines = (int) ((dims.getX() - 1) * (dims.getY() - 1));\n this.numMines = Util.clamp(numMines, MIN_MINES, maxMines);\n\n // Step 1\n cells = new ArrayList<>();\n for (int i = 0; i < dims.getY(); i++) {\n List<Cell> oneRow = new ArrayList<>();\n for (int j = 0; j < dims.getX(); j++) {\n oneRow.add(new CellImpl(this, new Point(j, i), false));\n }\n cells.add(oneRow);\n }\n\n // Step 2\n int minesPlaced = 0;\n while (minesPlaced < this.numMines) {\n int randX = ThreadLocalRandom.current().nextInt((int) dims.getX());\n int randY = ThreadLocalRandom.current().nextInt((int) dims.getY());\n\n if (!cells.get(randY).get(randX).isMine()) {\n cells.get(randY).get(randX).setNumber(-1);\n minesPlaced++;\n }\n }\n\n // Step 3\n updateCellNumbers();\n }",
"RasPiBoard createRasPiBoard();",
"public Board() {\n this.board = new Piece[16];\n }",
"public RedPuzzle() {\n }",
"public BoardView(GameController controller, Text state, Rectangle sideRect,\n Text sideStatus, RadioMenuItem playerGameMenuItem, Text tType,\n Label whitePiecesEaten, Label blackPiecesEaten,\n ObservableList<String> moveHistory, Label lblCurrentPiece) {\n\n this.controller = controller;\n this.state = state;\n this.sideRect = sideRect;\n this.sideStatus = sideStatus;\n\n this.playerGameMenuItem = playerGameMenuItem;\n\n this.tType = tType;\n\n this.whitePiecesEaten = whitePiecesEaten;\n this.blackPiecesEaten = blackPiecesEaten;\n\n this.moveHistory = moveHistory;\n this.lblCurrentPiece = lblCurrentPiece;\n\n tiles = new Tile[8][8];\n gridPane = new GridPane();\n gridPane.setStyle(\"-fx-background-color : darkcyan;\");\n reset(controller);\n\n isFirstClick = true;\n hasStarted = false;\n promotionEventHappened = false;\n }",
"public Board(ArrayList<Piece> pieces)\n {\n squares = new Square[Chess.ROWS][Chess.COLUMNS];\n setLayout(new GridLayout(Chess.ROWS,Chess.COLUMNS,0,0));\n firstSelected = null;\n mainBoard=true;\n turn = 0;\n fiftyMove = 0;\n for (int i = 0; i < Chess.ROWS; i++)\n for (int j = 0; j < Chess.COLUMNS; j++)\n {\n squares[i][j] = new Square(i,j,this);\n for (Piece p: pieces)\n if (p.getOrigin().equals(new Location(i,j)))\n squares[i][j].setPiece(p);\n add(squares[i][j]);\n }\n positions = new ArrayList<>();\n positions.add(toString());\n }",
"@Test\r\n\tpublic void testBoard() {\r\n\t\tBoard board = new Board();\r\n\t\tassertNotNull(board);\r\n\t}",
"public Board() {\n\t\tmarkCount = 0;\n\t\ttheBoard = new char[3][];\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\ttheBoard[i] = new char[3];\n\t\t\tfor (int j = 0; j < 3; j++)\n\t\t\t\ttheBoard[i][j] = SPACE_CHAR;\n\t\t}\n\t}",
"private Board() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// A private board constructor to ensure only one is created\n\t\tsuper();\n\t}",
"public UIBoard()\r\n\t{\r\n\t\t//Creates a 10x10 \"Board\" object\r\n\t\tsuper(10,10);\r\n\t\tgrid = new int[getLength()][getWidth()];\r\n\t\t\r\n\t\t//Sets all coordinates to the value 0, which corresponds to \"not hit yet\"\r\n\t\tfor(int i=0; i<grid.length; i++)\r\n\t\t\tfor(int j=0; j<grid[i].length; j++)\r\n\t\t\t\tgrid[i][j] = 0;\t\t\r\n\t}",
"private TilePane createGrid() {\n\t\tTilePane board = new TilePane();\n\t\tboard.setPrefRows(9);\n\t\tboard.setPrefColumns(9);\n\t\tboard.setPadding(new Insets(3,3,3,3));\n\t\tboard.setHgap(3); //Horisontal gap between tiles\n\t\tboard.setVgap(3); //Vertical gap between tiles\n\t\t\n\t\t//Creates and colors tiles\n\t\tfor(int i = 0; i < 9; i++){\n\t\t\tfor(int k = 0; k < 9; k++){\n\t\t\t\tLetterTextField text = new LetterTextField();\n\t\t\t\ttext.setPrefColumnCount(1);\n\t\t\t\t\n\t\t\t\tif(!(i/3 == 1 || k/3 == 1) || (i/3 == 1 && k/3 == 1)){\n\t\t\t\t\ttext.setStyle(\"-fx-background-color: #daa520;\");\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfield[i][k] = text;\n\t\t\t\tboard.getChildren().add(text);\n\t\t\t}\n\t\t}\t\t\n\t\treturn board;\n\t}",
"public Board() {\n\t\tboard = new int[8][8];\n\t\tbombs = 64 / 3;\n\t\tdifficulty = GlobalModel.BESTSCORE_EASY;\n\t\tfillBoard();\n\t\tsetDefaultScores();\n\t}",
"public void initializeBoard() {\n\n\t\t/*\n\t\t * How the array coordinates align with the actual chess board\n\t\t * (row,col) \n\t\t * (7,0) ... ... ... \n\t\t * (7,7) ... ... ... \n\t\t * ... ... ... \n\t\t * (2,0) ...\n\t\t * (1,0) ... \n\t\t * (0,0) ... ... ... (0,7)\n\t\t */\n\n\t\tboolean hasMoved = false;\n\t\tboolean white = true;\n\t\tboolean black = false;\n\n\t\t// Set white piece row\n\t\tboard[0][0] = new Piece('r', white, hasMoved, 0, 0, PieceArray.A_rookId);\n\t\tboard[0][1] = new Piece('n', white, hasMoved, 0, 1, PieceArray.B_knightId);\n\t\tboard[0][2] = new Piece('b', white, hasMoved, 0, 2, PieceArray.C_bishopId);\n\t\tboard[0][3] = new Piece('q', white, hasMoved, 0, 3, PieceArray.D_queenId);\n\t\tboard[0][4] = new Piece('k', white, hasMoved, 0, 4, PieceArray.E_kingId);\n\t\tboard[0][5] = new Piece('b', white, hasMoved, 0, 5, PieceArray.F_bishopId);\n\t\tboard[0][6] = new Piece('n', white, hasMoved, 0, 6, PieceArray.G_knightId);\n\t\tboard[0][7] = new Piece('r', white, hasMoved, 0, 7, PieceArray.H_rookId);\n\n\t\t// Set white pawns\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tboard[1][i] = new Piece('p', white, hasMoved, 1, i, i + 8);\n\t\t}\n\n\t\t// Set empty rows\n\t\tfor (int row = 2; row < 6; row++)\n\t\t\tfor (int col = 0; col < 8; col++)\n\t\t\t\tboard[row][col] = null;\n\n\t\t// Set black pawns\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tboard[6][i] = new Piece('p', black, hasMoved, 6, i, i+8);\n\t\t}\n\n\t\t// Set black piece row\n\t\tboard[7][0] = new Piece('r', black, hasMoved, 7, 0, PieceArray.A_rookId);\n\t\tboard[7][1] = new Piece('n', black, hasMoved, 7, 1, PieceArray.B_knightId);\n\t\tboard[7][2] = new Piece('b', black, hasMoved, 7, 2, PieceArray.C_bishopId);\n\t\tboard[7][3] = new Piece('q', black, hasMoved, 7, 3, PieceArray.D_queenId);\n\t\tboard[7][4] = new Piece('k', black, hasMoved, 7, 4, PieceArray.E_kingId);\n\t\tboard[7][5] = new Piece('b', black, hasMoved, 7, 5, PieceArray.F_bishopId);\n\t\tboard[7][6] = new Piece('n', black, hasMoved, 7, 6, PieceArray.G_knightId);\n\t\tboard[7][7] = new Piece('r', black, hasMoved, 7, 7, PieceArray.H_rookId);\n\t}",
"public void initializeBoard() {\r\n int x;\r\n int y;\r\n\r\n this.loc = this.userColors();\r\n\r\n this.board = new ArrayList<ACell>();\r\n\r\n for (y = -1; y < this.blocks + 1; y += 1) {\r\n for (x = -1; x < this.blocks + 1; x += 1) {\r\n ACell nextCell;\r\n\r\n if (x == -1 || x == this.blocks || y == -1 || y == this.blocks) {\r\n nextCell = new EndCell(x, y);\r\n } else {\r\n nextCell = new Cell(x, y, this.randColor(), false);\r\n }\r\n if (x == 0 && y == 0) {\r\n nextCell.flood();\r\n }\r\n this.board.add(nextCell);\r\n }\r\n }\r\n this.stitchCells();\r\n this.indexHelp(0, 0).floodInitStarter();\r\n }",
"public Board() {\n\t\tboardState = new Field[DIMENSION][DIMENSION];\n\t\tfor(int i = 0; i < DIMENSION; i++) {\n\t\t\tfor(int j = 0; j < DIMENSION; j++) {\n\t\t\t\tboardState[i][j] = new Field();\n\t\t\t}\n\t\t}\n\t}",
"void createWires() {\n this.splitBoard(new Posn(0, 0), this.height, this.width);\n int counter = 0;\n for (int i = 0; i < this.width; i++) {\n for (int j = 0; j < this.height; j++) {\n nodes.set(counter, this.board.get(i).get(j));\n counter++;\n }\n }\n }",
"public Board() {\n\t\tboard = new char[9][9];\n\t}",
"public Board() {\n for (int row = 0; row < 9; row++) {\n for (int col = 0; col < 9; col++) {\n this.grid[row][col] = 0;\n }\n }\n }",
"public void create() {\n\n\t\tthis.data = new Object[lb.getBoardLen()+3][3];\n\t\tdata[0][0] = \"RANK\";\n\t\tdata[0][1] = \"PLAYER\";\n\t\tdata[0][2] = \"POINTS\";\n\t\t\n\t\tfor (int i = 1; i <= lb.getBoardLen(); i++) {\n\t\t\tdata[i][0] = \"#\" + Integer.toString(i);\n\t\t\tdata[i][1] = lb.getUserPointsList().get(i-1).username;\n\t\t\tdata[i][2] = Integer.toString(lb.getUserPointsList().get(i-1).points);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tif (Sfunctions.sUserPull(user.getUsername(), user.getPassword()).getWeek() == -1) {\n\t\t\tdata[lb.getBoardLen() + 1][0] = \"\";\n\t\t\tdata[lb.getBoardLen() + 1][1] = \"THE SEASON HAS ENDED.\";\n\t\t\tdata[lb.getBoardLen() + 1][2] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][0] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][1] = \"THANKS FOR PLAYING!\";\n\t\t\tdata[lb.getBoardLen() + 2][2] = \"\";\n\t\t}\n\t\telse {\n\t\t\tdata[lb.getBoardLen() + 1][0] = \"\";\n\t\t\tdata[lb.getBoardLen() + 1][1] = \"\";\n\t\t\tdata[lb.getBoardLen() + 1][2] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][0] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][1] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][2] = \"\";\n\t\t}\n\t\n\tJTable table = new JTable(data, headers);\n\ttable.setBackground(new Color(104, 0, 0));\n\ttable.setForeground(Color.WHITE);\n\ttable.setFont(textFont);\n\ttable.setShowGrid(false);\n\ttable.setEnabled(false);\n\n\t//Depending on where the ME is\n\tme_row = getRowByValue(table, user.getUsername());\n\ttable.setRowSelectionInterval(me_row, me_row);\n\t\n\t\n\n\t\n\tTableColumn column = null;\n\tfor (int i = 0; i < 3; i++) {\n\t column = table.getColumnModel().getColumn(i);\n\t if (i == 0) {\n\t \t\tcolumn.setPreferredWidth(60);\n\t }\n\t if (i == 1) {\n\t column.setPreferredWidth(210); //third column is bigger\n\t } else {\n\t \t\tcolumn.setPreferredWidth(80);\n\t }\n\t}\n\n\t\n\tthis.add(table);\n\tthis.setBackground(new Color(104, 0, 0));\n\t}",
"public Game(int rowNumber, int columnNumber, int bombNumber, MinesweeperView frame) {\r\n Score panScore = new Score(rowNumber*columnNumber, bombNumber);\r\n Checkerboard panGrid = new Checkerboard(rowNumber, columnNumber, bombNumber, panScore); \r\n int[] gridef = {rowNumber, columnNumber, panGrid.getBombInitialNumber()};\r\n frame.add(panGrid);\r\n frame.add(panScore);\r\n this.initComponents(frame, gridef, panGrid, panScore);\r\n this.initBackgroundImage(frame);\r\n frame.addWindowListener(new ListenerWindow(panGrid));\r\n }",
"public Board() {\n this.x = 0;\n this.o = 0;\n }",
"void loadCheckerBoard(int tileSize);",
"public void setUp()\r\n {\r\n board = new MineSweeperBoard(4, 4, 1);\r\n }",
"public void instantiateV(){\n for(int row = 0; row < board.length; row++){\n for(int col = 0; col < board.length; col++){\n check1[row][col] = false;\n }\n }\n }",
"public static void printCheckerboard(int width,int height)\r\n{\n\tfor (int row=0; row<width; row++)\r\n\t{\r\n\r\n\t // for each column in this row\r\n\t for (int col=0; col<height; col++)\r\n\t {\r\n\t\t if (row % 2 == 0)\r\n\t\t\t{\r\n\t\t\t \tif (col % 2 == 0)\r\n\t\t\t \t\t{\r\n\t\t\t \t\t\tSystem.out.print(\"#\");\r\n\t\t\t \t\t}\r\n\t\t\t \tif (col % 1 == 0)\r\n\t\t\t \t\t{\r\n\t\t\t \t\t\tSystem.out.print(\" \");\r\n\t\t\t \t\t}\r\n\t\t\t}\r\n\t\t if (row % 1 == 0)\r\n\t\t {\r\n\t\t\t\tif (col % 2 == 0)\r\n\t\t \t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t \t\t\t}\r\n\t\t\t\r\n\t\t \t\tif (col % 1 == 0)\r\n\t\t \t\t\t{\r\n\t\t \t\t\t\tSystem.out.print(\"#\");\r\n\t\t \t\t\t}\r\n\t\t }\r\n\t\t System.out.println(\"\");\r\n\t }\r\n\t System.out.println(\"\");\r\n\t}\r\n}",
"@Test\n\tpublic void testConstructor() {\n\t\ttestBoard = new Board();\n\t\tassertEquals(8, testBoard.getHeight());\n\t\tassertEquals(8, testBoard.getWidth());\n\t}",
"Board() {\n clear();\n }",
"Board() {\n clear();\n }",
"public ChessBoard() {\r\n\t\t\tsuper();\r\n\t\t\ttry {\r\n\t\t\t\tbgImage = ImageIO.read(new File(\"人人\\\\棋盘背景.png\"));\r\n\t\t\t\twImage = ImageIO.read(new File(\"人人\\\\白棋子.png\"));\r\n\t\t\t\tbImage = ImageIO.read(new File(\"人人\\\\黑棋子.png\"));\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\tthis.repaint();\r\n\t\t}",
"public MinesweeperBoard(int rowsCount, int colsCount){\n this.rowsCount = rowsCount;\n this.colsCount = colsCount;\n this.cells = new Cell[rowsCount][colsCount];\n }"
] |
[
"0.7083047",
"0.64354444",
"0.61945784",
"0.61405027",
"0.60205543",
"0.6006144",
"0.59680325",
"0.5967659",
"0.5950932",
"0.5917994",
"0.5874662",
"0.5855621",
"0.5833359",
"0.5831817",
"0.5825817",
"0.58171296",
"0.57933944",
"0.5761635",
"0.5755904",
"0.57297313",
"0.57160467",
"0.5711032",
"0.570001",
"0.5692084",
"0.5683931",
"0.565462",
"0.5634335",
"0.5622239",
"0.5612791",
"0.56098115",
"0.5595025",
"0.55826014",
"0.55755806",
"0.5574196",
"0.5574088",
"0.55696326",
"0.5568859",
"0.555128",
"0.5536221",
"0.5518346",
"0.55167454",
"0.5515939",
"0.5502846",
"0.549317",
"0.54888403",
"0.547076",
"0.5458349",
"0.5431344",
"0.5418496",
"0.5404246",
"0.5392284",
"0.5385229",
"0.53797424",
"0.53773105",
"0.5371631",
"0.5368654",
"0.53639066",
"0.5360635",
"0.53584784",
"0.5355015",
"0.53490585",
"0.534772",
"0.53475815",
"0.5342659",
"0.5341535",
"0.5334736",
"0.53338104",
"0.53290844",
"0.5325883",
"0.53245395",
"0.53239787",
"0.52958804",
"0.5290359",
"0.52811116",
"0.52777207",
"0.52714384",
"0.5265601",
"0.52637076",
"0.5262017",
"0.52599686",
"0.5257467",
"0.5254164",
"0.52503693",
"0.52485514",
"0.5230626",
"0.5223889",
"0.52186334",
"0.52147955",
"0.52081245",
"0.5206993",
"0.5200386",
"0.5196078",
"0.5190754",
"0.5189934",
"0.51832086",
"0.51805496",
"0.5179116",
"0.5179116",
"0.51741076",
"0.5171568"
] |
0.5216682
|
87
|
Creates a checkerboard image programmatically.
|
public IImage createCheckerboard() {
List<List<Pixel>> grid = new ArrayList<>();
for (int i = 0; i < this.height; i++) {
List<Pixel> row;
// alternating between making rows starting with black or white tiles
if (i % 2 == 0) {
// start white
for (int j = 0; j < this.tileSize; j++) {
row = createRow(255, 0, (i * this.tileSize) + j);
grid.add(row);
}
}
else {
// start black
for (int m = 0; m < this.tileSize; m++) {
row = createRow(0, 255, (i * this.tileSize) + m);
grid.add(row);
}
}
}
return new Image(grid, 255);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"Image createImage();",
"private void createImage()\n {\n GreenfootImage image = new GreenfootImage(width, height);\n setImage(\"Player.png\");\n }",
"private TextureUniform makeCheckerboardTexture(int textureSize) {\n Uint8Array checkerboard = Uint8ArrayNative.create(4 * textureSize * textureSize);\n\n int maxDiagonal = 2 * (textureSize - 1);\n for (int i = 0; i < textureSize; i++) {\n for (int j = 0; j < textureSize; j++) {\n int index = i * textureSize + j;\n // Checking the parity of the diagonal number gives a checkerboard\n // pattern.\n int diagonal = i + j;\n if (diagonal % 2 == 0) {\n // set the square red. We only need to set the red channel!\n checkerboard.set(4 * index, 255);\n }\n // otherwise we'd set the square to black. But arrays are already\n // initialized to 0s so nothing needed here.\n\n // for the alpha channel, map the diagonal number to [0, 255]\n checkerboard.set(4 * index + 3, (255 * diagonal) / maxDiagonal);\n }\n }\n return new TextureUniform(new TextureUniformOptions()\n .setTypedArray(checkerboard)\n .setWidth(textureSize)\n .setHeight(textureSize)\n .setMinificationFilter(TextureMinificationFilter.NEAREST())\n .setMagnificationFilter(TextureMagnificationFilter.NEAREST()));\n }",
"public void create() {\n\t\t// setup Chess board\n\t\tthis.removeAll();\n\t\tthis.layout = new GridLayout(this.startupBoardSize, this.startupBoardSize);\n\t\tthis.squares = new SquarePanel[this.startupBoardSize][this.startupBoardSize];\n\t\t\n\t\tsetLayout(layout);\n\t\tsetPreferredSize(new Dimension(600, 600));\n\t\tsetBorder(new LineBorder(new Color(0, 0, 0)));\n\n\t\t//paint the chess board\n\n\t\tfor (int i = 0; i < this.startupBoardSize; i++) \n\t\t{\n\t\t\tfor (int j = 0; j < this.startupBoardSize; j++) \n\t\t\t{\n\t\t\t\tsquares[i][j] = new SquarePanel(j, i);\n\t\t\t\tsquares[i][j].setPreferredSize(new Dimension(600 / this.startupBoardSize - 5, 600 / this.startupBoardSize - 5));\n\n\n\t\t\t\tsquares[i][j].setBackground(Color.WHITE);\n\t\t\t\t\n\t\t\t\tif (((i + j) % 2) == 0) \n\t\t\t\t{\n\t\t\t\t\tsquares[i][j].setBackground(Color.DARK_GRAY);\n\t\t\t\t}\n\t\t\t\tadd(squares[i][j]);\n\t\t\t}\n\t\t}\n\t}",
"public static void createBoard() {\n Checkers[] CheckerBoard = new Checkers[24];\n CheckerBoard[0] = new Checkers(0,1,\"black\");\n CheckerBoard[1] = new Checkers(0,3,\"black\");\n CheckerBoard[2] = new Checkers(0,5,\"black\");\n CheckerBoard[3] = new Checkers(0,7,\"black\");\n CheckerBoard[4] = new Checkers(1,0,\"black\");\n CheckerBoard[5] = new Checkers(1,2,\"black\");\n CheckerBoard[6] = new Checkers(1,4,\"black\");\n CheckerBoard[7] = new Checkers(1,6,\"black\");\n CheckerBoard[8] = new Checkers(2,1,\"black\");\n CheckerBoard[9] = new Checkers(2,3,\"black\");\n CheckerBoard[10] = new Checkers(2,5,\"black\");\n CheckerBoard[11] = new Checkers(2,7,\"black\");\n CheckerBoard[12] = new Checkers(5,1,\"red\");\n CheckerBoard[13] = new Checkers(5,3,\"red\");\n CheckerBoard[14] = new Checkers(5,5,\"red\");\n CheckerBoard[15] = new Checkers(5,7,\"red\");\n CheckerBoard[16] = new Checkers(6,0,\"red\");\n CheckerBoard[17] = new Checkers(6,2,\"red\");\n CheckerBoard[18] = new Checkers(6,4,\"red\");\n CheckerBoard[19] = new Checkers(6,6,\"red\");\n CheckerBoard[20] = new Checkers(7,1,\"red\");\n CheckerBoard[21] = new Checkers(7,3,\"red\");\n CheckerBoard[22] = new Checkers(7,5,\"red\");\n CheckerBoard[23] = new Checkers(7,7,\"red\");\n\n\n\n }",
"private void testBoardCreation() {\n for (int r = 0; r < Constants.BOARD_GRID_ROWS; r++) {\n for (int c = 0; c < Constants.BOARD_GRID_COLUMNS; c++) {\n Vector2 tokenLocation = this.mBoardLevel.getCenterOfLocation(r, c);\n Image tokenImage = new Image(this.mResources.getToken(PlayerType.RED));\n tokenImage.setPosition(tokenLocation.x, tokenLocation.y);\n this.mStage.addActor(tokenImage);\n }\n }\n }",
"public static void createBoard() \n\t{\n\t\tfor (int i = 0; i < tictactoeBoard.length; i++) \n\t\t{\n\t\t\ttictactoeBoard[i] = '-';\n\t\t}\n\t}",
"IMG createIMG();",
"public abstract void createBoard();",
"public ScoreBoard()\r\n {\r\n super();\r\n int boardWidth = 200;\r\n int boardHeight = 30;\r\n \r\n board = new GreenfootImage(boardWidth,boardHeight);\r\n board.setColor(Color.green); \r\n //&& Color.blue);\r\n board.fillRect(0, 0, boardWidth,boardHeight);\r\n this.setImage(board);\r\n \r\n //draw it\r\n update();\r\n }",
"public ChessBoard() {\r\n\t\t\tsuper();\r\n\t\t\ttry {\r\n\t\t\t\tbgImage = ImageIO.read(new File(\"人人\\\\棋盘背景.png\"));\r\n\t\t\t\twImage = ImageIO.read(new File(\"人人\\\\白棋子.png\"));\r\n\t\t\t\tbImage = ImageIO.read(new File(\"人人\\\\黑棋子.png\"));\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\tthis.repaint();\r\n\t\t}",
"public void createImage() {\n\t\tBufferedImage crab1ststep = null;\n\t\tBufferedImage crab2ndstep = null;\n\t\tBufferedImage crabhalf = null;\n\t\tBufferedImage crabfull = null;\n\t\tBufferedImage eye6 = null;\n\t\tBufferedImage eye5 = null;\n\t\tBufferedImage eye4 = null;\n\t\tBufferedImage eye3 = null;\n\t\tBufferedImage eye2 = null;\n\t\tBufferedImage eye1 = null;\n\t\tBufferedImage eyeClosed = null;\n\t\ttry {\n\t\t crabImage = ImageIO.read(new File(\"src/images/crab.png\"));\n\t\t crab1ststep = ImageIO.read(new File(\"src/images/crab1ststep.png\"));\n\t\t crab2ndstep = ImageIO.read(new File(\"src/images/crab2ndstep.png\"));\n\t\t crabhalf = ImageIO.read(new File(\"src/images/crabhalf.png\"));\n\t\t crabfull = ImageIO.read(new File(\"src/images/crabfull.png\"));\n\t\t crabWin = ImageIO.read(new File(\"src/images/crabwin.png\"));\n\t\t crabLose = ImageIO.read(new File(\"src/images/crablose.png\"));\n\t\t eye6 = ImageIO.read(new File(\"src/images/crab_eye6.png\"));\n\t\t eye5 = ImageIO.read(new File(\"src/images/crab_eye5.png\"));\n\t\t eye4 = ImageIO.read(new File(\"src/images/crab_eye4.png\"));\n\t\t eye3 = ImageIO.read(new File(\"src/images/crab_eye3.png\"));\n\t\t eye2 = ImageIO.read(new File(\"src/images/crab_eye2.png\"));\n\t\t eye1 = ImageIO.read(new File(\"src/images/crab_eye1.png\"));\n\t\t eyeClosed = ImageIO.read(new File(\"src/images/eyes_closed.png\"));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"bad\");\n\t\t}\n//\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n//\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n//\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n//\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\t\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\t\n\t\tblink.add(eye6);\n\t\tblink.add(eye6);\n//\t\tblink.add(eye5);\n//\t\tblink.add(eye5);\n\t\tblink.add(eye4);\n\t\tblink.add(eye4);\n//\t\tblink.add(eye3);\n//\t\tblink.add(eye3);\n\t\tblink.add(eye2);\n\t\tblink.add(eye2);\n//\t\tblink.add(eye1);\n//\t\tblink.add(eye1);\n\t\tblink.add(eyeClosed);\n\t\tblink.add(eyeClosed);\n\t\tblink.add(eyeClosed);\n\t\tblink.add(eyeClosed);\n//\t\tblink.add(eye1);\n//\t\tblink.add(eye1);\n\t\tblink.add(eye2);\n\t\tblink.add(eye2);\n//\t\tblink.add(eye3);\n//\t\tblink.add(eye3);\n\t\tblink.add(eye4);\n\t\tblink.add(eye4);\n//\t\tblink.add(eye5);\n//\t\tblink.add(eye5);\n\t\tblink.add(eye6);\n\t\tblink.add(eye6);\n\t}",
"public void setPreviewCanvas()\n {\n if(grayImgToFit!=null)\n {\n canvas.beginDraw();\n for(int i = 0; i < xTiles+3; i++)\n {\n for(int j = 0; j < yTiles+1; j++)\n {\n //if(i<verticalFlip[0].length && j<verticalFlip.length)\n //{\n //if(!notShow[i][j])\n //{\n // even or odd row shift\n if(j%2 == 0)\n {\n if(verticalFlip[i][j] && ! horizontalFlip[i][j])\n {\n canvas.image(tileMiniaturesV[getTileIntensityAtIndex(i,j)],i * tileMiniaturesV[0].width + evenRowShift,j * tileMiniatures[0].height);\n }\n else if(horizontalFlip[i][j] && !verticalFlip[i][j])\n {\n canvas.image(tileMiniaturesH[getTileIntensityAtIndex(i,j)],i * tileMiniaturesH[0].width + evenRowShift,j * tileMiniatures[0].height);\n }\n else if(horizontalFlip[i][j] && verticalFlip[i][j])\n {\n canvas.image(tileMiniaturesVH[getTileIntensityAtIndex(i,j)],i * tileMiniaturesVH[0].width + evenRowShift,j * tileMiniatures[0].height);\n }\n else\n {\n canvas.image(tileMiniatures[getTileIntensityAtIndex(i,j)],i * tileMiniatures[0].width + evenRowShift,j * tileMiniatures[0].height);\n }\n }\n else\n {\n if(verticalFlip[i][j] && ! horizontalFlip[i][j])\n {\n canvas.image(tileMiniaturesV[getTileIntensityAtIndex(i,j)],i * tileMiniaturesV[0].width + oddRowShift,j * tileMiniatures[0].height);\n }\n else if(horizontalFlip[i][j] && !verticalFlip[i][j])\n {\n canvas.image(tileMiniaturesH[getTileIntensityAtIndex(i,j)],i * tileMiniaturesH[0].width + oddRowShift,j * tileMiniatures[0].height);\n }\n else if(horizontalFlip[i][j] && verticalFlip[i][j])\n {\n canvas.image(tileMiniaturesVH[getTileIntensityAtIndex(i,j)],i * tileMiniaturesVH[0].width + oddRowShift,j * tileMiniatures[0].height);\n }\n else\n {\n canvas.image(tileMiniatures[getTileIntensityAtIndex(i,j)],i * tileMiniatures[0].width + oddRowShift,j * tileMiniatures[0].height);\n }\n }\n //}\n //else\n //{\n // canvas.fill(255,255,255);\n // canvas.noStroke();\n // if(hoverIndex[1]%2 == 0)\n // canvas.rect(i * tileMiniatures[0].width + evenRowShift,j * tileMiniatures[0].height,tileMiniatures[0].width, tileMiniatures[0].height);\n // else\n // canvas.rect(i * tileMiniatures[0].width + oddRowShift,j * tileMiniatures[0].height,tileMiniatures[0].width, tileMiniatures[0].height);\n //}\n //}\n }\n }\n \n canvas.fill(0,255,0,100);\n canvas.noStroke();\n if(hoverIndex[1]%2 == 0)\n {\n canvas.rect(hoverIndex[0] * tileMiniatures[0].width + evenRowShift,hoverIndex[1] * tileMiniatures[0].height,tileMiniatures[0].width, tileMiniatures[0].height);\n }\n else\n {\n canvas.rect(hoverIndex[0] * tileMiniatures[0].width + oddRowShift,hoverIndex[1] * tileMiniatures[0].height,tileMiniatures[0].width, tileMiniatures[0].height);\n }\n canvas.endDraw();\n }\n }",
"public CheckerboardImage(int tileSize, int width, int height)\n throws IllegalArgumentException {\n if (tileSize < 0 || width < 0 || height < 0) {\n throw new IllegalArgumentException(\"Cannot have negative value.\");\n }\n this.tileSize = tileSize;\n this.width = width;\n this.height = height;\n }",
"public void createBoard() {\n\t\tboard = new Piece[8][8];\n\t\t\n\t\tfor(int i=0; i<8; i++) {\n\t\t\tfor(int j=0; j<8; j++) {\n\t\t\t\tboard[i][j] = null;\n\t\t\t}\n\t\t}\n\t}",
"public void createBoard() {\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[i].length; j++) {\n matrix[i][j] = WATER;\n }\n }\n }",
"public BufferedImage create() {\n checkDimensions();\n final BufferedImage image = createImage();\n getImagePainter().paint(image);\n return image;\n }",
"public void makeImage() {\n image = new GreenfootImage(\"highscoreb.png\");\n \n image.setFont(new Font(\"Arial\", false, false, 50));\n image.setColor(Color.WHITE);\n image.setFont(new Font(\"Arial\", false, false, 25));\n renderer.drawShadowString(image, name, 25, getHeight() - 50);\n setBackground(image);\n }",
"@Override\r\n\tpublic void createBoardWithFile(Board board) {\n\t\t\r\n\t}",
"void checkerboard(int checkerSquareArea);",
"public void Makeboard() {\r\n\r\n Normalboard(new Point2(20, 300));\r\n Normalboard(new Point2(224, 391));\r\n Stingboard(new Point2(156, 209));\r\n Leftlboard(new Point2(88, 482));\r\n Rightboard(new Point2(292, 573));\r\n Regenerateboard(new Point2(360, 118));\r\n\r\n }",
"public static void printCheckerboard(int width,int height)\r\n{\n\tfor (int row=0; row<width; row++)\r\n\t{\r\n\r\n\t // for each column in this row\r\n\t for (int col=0; col<height; col++)\r\n\t {\r\n\t\t if (row % 2 == 0)\r\n\t\t\t{\r\n\t\t\t \tif (col % 2 == 0)\r\n\t\t\t \t\t{\r\n\t\t\t \t\t\tSystem.out.print(\"#\");\r\n\t\t\t \t\t}\r\n\t\t\t \tif (col % 1 == 0)\r\n\t\t\t \t\t{\r\n\t\t\t \t\t\tSystem.out.print(\" \");\r\n\t\t\t \t\t}\r\n\t\t\t}\r\n\t\t if (row % 1 == 0)\r\n\t\t {\r\n\t\t\t\tif (col % 2 == 0)\r\n\t\t \t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t \t\t\t}\r\n\t\t\t\r\n\t\t \t\tif (col % 1 == 0)\r\n\t\t \t\t\t{\r\n\t\t \t\t\t\tSystem.out.print(\"#\");\r\n\t\t \t\t\t}\r\n\t\t }\r\n\t\t System.out.println(\"\");\r\n\t }\r\n\t System.out.println(\"\");\r\n\t}\r\n}",
"public Image generate() {\n generateStripes(rainbow, 7, vertical);\n return new ImageRGB(data);\n }",
"private void createGraySquares() {\n for (int x = 0; x < 16; x ++)\n for (int y = 0; y < 16; y ++)\n // If the area is not explored, creates a gray square at that point.\n if (!storage.explored[x][y]) {\n GraySquare square = new GraySquare(screen.miscAtlases.get(2));\n // Uses the x and y integers to set the corresponding position in the grid.\n square.setPosition(x * 20, y * 20 + 19);\n // Adds to the rendering list.\n squares.add(square);\n }\n }",
"public void\r NewPixmap(CType display_context, int width, int height,\r ILPix_t image, ILPix_t mask);",
"public static synchronized void createPatternImage(String... args) {\n if(args.length < 1) {\n return;\n }\n\n reset();\n currentPattern = PatternReader.readPattern(args);\n createPatternImage(currentPattern, null);\n }",
"Board createLayout();",
"public CheckerBoard(int size) {\n super(new int[size * tilesPerSide][size * tilesPerSide][3]);\n for (int y = 0; y < this.getHeight(); ++y) {\n for (int x = 0; x < this.getWidth(); ++x) {\n for (int channel = 0; channel < 3; ++channel) {\n this.data[y][x][channel] = ((x / size + y / size) % 2 == 1) ? 0 : 255;\n }\n }\n }\n }",
"public static int[][] createBoard() {\r\n\t\t\r\n\t\tint[][] board = new int [8][8];\r\n\t\t//printing the red solduers\r\n\t\tfor (int line =0,column=0;line<3;line=line+1){\r\n\t\t\tif (line%2==0){column=0;}\r\n\t\t\telse {column=1;}\r\n\t\t\tfor (;column<8;column=column+2){\r\n\t\t\t\tboard [line][column] = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//printing the blu solduers\r\n\t\tfor (int line =5,column=0;line<8;line=line+1){\r\n\t\t\tif (line%2==0){column=0;}\r\n\t\t\telse {column=1;}\r\n\t\t\tfor (;column<8;column=column+2){\r\n\t\t\t\tboard [line][column] = -1;\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t\treturn board;\r\n\t}",
"private void generateBoard(){\n\t}",
"public void drawImage()\n {\n imageMode(CORNERS);\n //image(grayImgToFit, firstCellPosition[0], firstCellPosition[1]);\n image(canvas, firstCellPosition[0], firstCellPosition[1]);\n //image(tileMiniaturesV[0],10,250);\n //if(avaragedImgs.length > 4)\n // image(avaragedImgs[3],200,200);\n //getTileIntensityAtIndex(15,15);\n //println(tiles[7].getEndBrightness());\n \n }",
"public Image createImage() {\n if (source == null) {\n source = new MemoryImageSource(width, height, cModel, pixels, 0, width);\n source.setAnimated(true);\n }\n Image img = Toolkit.getDefaultToolkit().createImage(source);\n return img;\n }",
"void generateNewBoard() {\n createAvailableDice();\n\n // Add them to board\n generateBoardLayout();\n }",
"public static void makeBoardChess() {\r\n \r\n white = new AllPiece(\"White\");\r\n black = new AllPiece(\"Black\");\r\n \r\n }",
"RasPiBoard createRasPiBoard();",
"public void createPreview(Tile t)\n {\n \n boolean[][] pattern = t.getPattern();\n PImage preview = createImage(pattern.length, pattern[0].length, RGB);\n\n for (int i = 0; i < pattern.length; i++)\n {\n for (int j = 0; j < pattern[0].length; j++)\n {\n int loc = i + j * pattern.length;\n if (pattern[i][j])\n preview.pixels[loc] = color(0);\n else\n preview.pixels[loc] = color(255);\n }\n }\n preview.resize(100, 0);\n previews[t.getTileLevel()] = resizeToFit(preview, 100, 100);\n }",
"private PImage createBG() {\n\t\tPImage image = new PImage(64, 64);\n\t\timage.copy(Textures.get(\"gui.box_black_red_tl\"), 0, 0, 16, 16, 0, 0, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_tm\"), 0, 0, 16, 16, 16, 0, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_tm\"), 0, 0, 16, 16, 32, 0, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_tr\"), 0, 0, 16, 16, 48, 0, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_ml\"), 0, 0, 16, 16, 0, 16, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mm\"), 0, 0, 16, 16, 16, 16, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mm\"), 0, 0, 16, 16, 32, 16, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mr\"), 0, 0, 16, 16, 48, 16, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_ml\"), 0, 0, 16, 16, 0, 32, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mm\"), 0, 0, 16, 16, 16, 32, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mm\"), 0, 0, 16, 16, 32, 32, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mr\"), 0, 0, 16, 16, 48, 32, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_bl\"), 0, 0, 16, 16, 0, 48, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_bm\"), 0, 0, 16, 16, 16, 48, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_bm\"), 0, 0, 16, 16, 32, 48, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_br\"), 0, 0, 16, 16, 48, 48, 16, 16);\n\t\treturn image;\t\t\n\t}",
"MainBoard createMainBoard();",
"private void initializeBoard(){\r\n checks =new int[][]{{0,2,0,2,0,2,0,2},\r\n {2,0,2,0,2,0,2,0},\r\n {0,2,0,2,0,2,0,2},\r\n {0,0,0,0,0,0,0,0},\r\n {0,0,0,0,0,0,0,0},\r\n {1,0,1,0,1,0,1,0},\r\n {0,1,0,1,0,1,0,1},\r\n {1,0,1,0,1,0,1,0}};\r\n }",
"public void createNewImageFile(){\n fillNewImage();\n\n try {\n ImageIO.write(newImage, imageFileType, new File(k + \"_Colored_\" + fileName.substring(0,fileName.length() - 4) + \".\" + imageFileType));\n } catch (IOException e){\n e.printStackTrace();\n }\n \n }",
"@Nonnull\n private BufferedImage createImage() {\n return new BufferedImage(getWidth(), getHeight(), getImageType().getType());\n }",
"public void create(int [][] arr) {\n //default background image\n gc.drawImage(bg0, 0, 0);\n gc.drawImage(bg0, 1024,0);\n\n // traverses 2D array to creat map\n for(int i = 0; i < arr.length; i++) {\n for(int j = 0; j < arr[0].length; j++) {\n if(arr[i][j] == 0) {\n //blank space, for reference\n } else if(arr[i][j] == 1) { // make IndestructibleObject\n IndestructibleObject object = new IndestructibleObject(img0, j*64, i*64);\n mapList.add(object);\n } else if(arr[i][j] == 2) { // make DestructibleObject\n DestructibleObject object = new DestructibleObject(img1, j*64, i*64);\n mapList.add(object);\n } else if(arr[i][j] == 3) { // make power up\n PowerUpObject object = new PowerUpObject(img2, j*64+1, i*64, 1);\n powerList.add(object);\n } else if(arr[i][j] == 4) { // make power up\n PowerUpObject object = new PowerUpObject(img3, j*64+1, i*64, 2);\n powerList.add(object);\n } else if(arr[i][j] == 5) { // make power up\n PowerUpObject object = new PowerUpObject(img4, j*64+1, i*64, 3);\n powerList.add(object);\n } else if(arr[i][j] == 6) { // make power up\n PowerUpObject object = new PowerUpObject(img5, j*64+1, i*64, 4);\n powerList.add(object);\n }\n }\n }\n }",
"public void createTestPattern()\n {\n int i;\n int j;\n RGBPixel p = new RGBPixel();\n\n for ( i = 0; i < getXSize(); i++ ) {\n for ( j = 0; j < getYSize(); j++ ) {\n if ( ((i % 2 != 0) && (j % 2 == 0)) || \n ((j % 2 != 0) && (i % 2 == 0)) ) {\n p.r = (byte)255;\n p.g = (byte)255;\n p.b = (byte)255;\n }\n else {\n p.r = 0;\n p.g = 0;\n p.b = 0;\n }\n if ( j == getYSize()/2 ) {\n p.r = (byte)255;\n p.g = 0;\n p.b = 0;\n }\n if ( i == getXSize()/2) {\n p.r = 0;\n p.g = (byte)255;\n p.b = 0;\n }\n putPixelRgb(i, j, p);\n }\n }\n }",
"private void newCanvas() {\n\t\timgCanvas = new ImageCanvas(1000, 563);\n\t\t//canvasJP.add(imgCanvas);\n\t}",
"private void displayBoard()\n {\n GreenfootImage toDisplay;\n \n for( int r = 0; r < board.length; r ++ )\n {\n for( int c = 0; c < board[r].length; c ++ )\n {\n toDisplay = new GreenfootImage( board[r][c], 100, Color.BLACK, new Color(0,0,0,0) ); \n getBackground().drawImage( toDisplay, c * getWidth()/3 + (getWidth()/3 - toDisplay.getWidth() )/2 , r * getHeight()/3 + (getHeight()/3 - toDisplay.getHeight() )/2 );\n }\n }\n }",
"public static StackPane createBoard() {\n StackPane stackPane = new StackPane();\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n Tile tile = new Tile();\n Coordinates coordinates = new Coordinates(i, j);\n tile.setTextValue(\"\");\n tile.setTranslateX(i * 50);\n tile.setTranslateY(j * 50);\n tile.setEditable(true);\n tile.setTileId(coordinates);\n stackPane.getChildren().add(tile);\n tiles.put(coordinates, tile);\n }\n }\n return stackPane;\n }",
"void loadCheckerBoard(int tileSize);",
"public void ToImage(){\n\t\tint row=SL.length;\n\t\tint col=SL[0].length;\n\t\tint cr=0;\n\t\tint cb=0;\n\t\t// System.out.println(row+\" \"+col);\n\t\tint[] intArray = new int[3*row*col];\n\t\tint w=row;\n\t int h=col;\n\t BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);\n\t\tint pixel = 0;\n\t\tfor(int x=0;x<row;x++){\n\t\t\tfor(int y=0;y<col;y++){\n\t\t\t\tint rByte = (int)(SL[x][y]);\n\t\t int gByte = (int)(SL[x][y]);\n\t\t int bByte = (int)(SL[x][y]);\n\t\t \n\t\t // int rByte = (int)(SL[x][y]+1.402*(cr-128));\n\t\t // int gByte = (int)(SL[x][y]-0.3414*(cb-128)-0.71414*(cr-128));\n\t\t // int bByte = (int)(SL[x][y]+1.772*(cb-128));\n\t\t int rgb = (rByte *65536) + (gByte * 256) + bByte;\n\t\t image.setRGB(x,y,rgb);\n\t \t}\n\t\t}\n\t try {\n\t ImageIO.write(image, \"bmp\", new File(\"\"+picture_num+\".png\"));\n\t } catch (Exception e) {\n\t e.printStackTrace();\n\t }\n\t}",
"private void createBackground()\n {\n GreenfootImage background = getBackground();\n background.setColor(Color.BLACK);\n background.fill();\n }",
"public ChessBoard() {\n initComponents();\n createChessBoard();\n\n }",
"public WorldImage drawBoard(int blocks) {\r\n return new EmptyImage();\r\n }",
"private void createBoard() {\n\t// An array of rows containing rows with squares are made\n\t\tfor (int i = 0; i < squares.length; i++) {\n\t \trows[i] = new Row(squares[i]);\n\t\t}\n\n\n\t// An array of columns containing columns with squares are made\n\t\tSquare[] columnArray = new Square[size];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t for (int row = 0; row < size; row++) {\n\t\t\t\tcolumnArray[row] = squares[row][i];\n\t\t }\n\t\t columns[i] = new Column(columnArray);\n\t\t columnArray = new Square[size];\n\t\t}\n\n\n\t\tSquare[] boxArray;\n\t\tint counter;\n\t\t// Box nr i\n\t\tfor (int i = 0; i < size; i = i + height) {\n\t\t // Box nr j\n\t\t for (int j = 0; j < size; j = j + length) {\n\t\t\t\tcounter = 0;\n\t\t\t\tboxArray = new Square[size];\n\t\t\t\tint rowIndex = (i / height) * height;\n\t\t\t\tint columnIndex = (j / length) * length;\n\t\t\t\t// Row nr k\n\t\t\t\tfor (int k = rowIndex; k < rowIndex + height; k++) {\n\t\t\t\t // Column nr l\n\t\t\t\t for (int l = columnIndex; l < columnIndex + length; l++) {\n\t\t\t\t\t\tboxArray[counter] = squares[k][l];\n\t\t\t\t\t\tcounter++;\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tboxes[j/length][i/height] = new Box(boxArray);\n\t\t }\n\t\t}\t\n\t\tcreatePointers();\n }",
"private void createTiles() {\n\t\tint tile_width = bitmap.getWidth() / gridSize;\n\t\tint tile_height = bitmap.getHeight() / gridSize;\n\n\t\tfor (short row = 0; row < gridSize; row++) {\n\t\t\tfor (short column = 0; column < gridSize; column++) {\n\t\t\t\tBitmap bm = Bitmap.createBitmap(bitmap, column * tile_width,\n\t\t\t\t\t\trow * tile_height, tile_width, tile_height);\n\n\t\t\t\t// if final, Tile -> blank\n\t\t\t\tif ((row == gridSize - 1) && (column == gridSize - 1)) {\n\t\t\t\t\tbm = Bitmap.createBitmap(tile_width, tile_height,\n\t\t\t\t\t\t\tbm.getConfig());\n\t\t\t\t\tbm.eraseColor(Color.WHITE);\n\t\t\t\t\ttheBlankTile = new Tile(bm, row, column);\n\t\t\t\t\ttiles.add(theBlankTile);\n\t\t\t\t} else {\n\t\t\t\t\ttiles.add(new Tile(bm, row, column));\n\t\t\t\t}\n\t\t\t} // end column\n\t\t} // end row\n\t\tbitmap.recycle();\n\n\t}",
"public PinboardMaker()\r\n {\r\n pictures = new ArrayList<String>();\r\n pinboardObject = new Pinboard();\r\n }",
"public void createBoard() {\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j <colls; j++) {\n if(i==0 || j == 0 || i == rows-1|| j == colls-1){\n board[i][j] = '*';\n } else {\n board[i][j] = ' ';\n }\n }\n }\n }",
"void takeSnapShot(File fileToSave) {\n try {\n /*Construct a new BufferedImage*/\n BufferedImage exportImage = new BufferedImage(this.getSize().width,\n this.getSize().height,\n BufferedImage.TYPE_INT_RGB);\n\n \n /*Get the graphics from JPanel, use paint()*/\n this.paint(exportImage.createGraphics());\n \n fileToSave.createNewFile();\n ImageIO.write(exportImage, \"PNG\", fileToSave);\n } catch(Exception exe){\n System.out.println(\"DrawCanvas.java - Exception\");\n }//catch\n}",
"private void initImage() {\n this.image = (BufferedImage)this.createImage(DisplayPanel.COLS, DisplayPanel.ROWS);\n this.r.setRect(0, 0, DisplayPanel.ROWS, DisplayPanel.COLS);\n this.paint = new TexturePaint(this.image,\n this.r);\n }",
"private Image makeShot(Control control, boolean type) {\n\t\tColor greenScreen = new Color(control.getDisplay(), 222, 223, 224);\n\n\t\tShell shell = new Shell(control.getShell(), SWT.NO_TRIM);\n\n\t\t// otherwise we have a default gray color\n\t\tshell.setBackground(greenScreen);\n\n\t\tButton button = new Button(shell, SWT.CHECK);\n\t\tbutton.setBackground(greenScreen);\n\t\tbutton.setSelection(type);\n\n\t\t// otherwise an image is located in a corner\n\t\tbutton.setLocation(1, 1);\n\t\tPoint bsize = button.computeSize(SWT.DEFAULT, SWT.DEFAULT);\n\n\t\t// otherwise an image is stretched by width\n\t\tbsize.x = Math.max(bsize.x - 1, bsize.y - 1);\n\t\tbsize.y = Math.max(bsize.x - 1, bsize.y - 1);\n\t\tbutton.setSize(bsize);\n\t\tshell.setSize(bsize);\n\n\t\tshell.open();\n\t\tGC gc = new GC(shell);\n\t\tImage image = new Image(control.getDisplay(), bsize.x, bsize.y);\n\t\tgc.copyArea(image, 0, 0);\n\t\tgc.dispose();\n\t\tshell.close();\n\n\t\tImageData imageData = image.getImageData();\n\t\timageData.transparentPixel = imageData.palette.getPixel(greenScreen.getRGB());\n\n\t\treturn new Image(control.getDisplay(), imageData);\n\t}",
"public GreetingCardCanvas(){\n array = new ArrayList<>();\n //Winter background\n array.add(new Square(0, 0, 256, 768,new Color(123, 165, 248)));\n array.add(new Square(0, 700, 256, 68, new Color(255,250,250)));\n //Autumn background\n array.add(new Square(256, 0, 256, 768,new Color(162, 163, 3)));\n array.add(new Square(256, 700, 256, 68, new Color(218,165,32)));\n //Spring background\n array.add(new Square(512, 0, 256, 768,new Color(0, 255, 127)));\n array.add(new Square(512, 700, 256, 68, new Color(124, 252, 0)));\n //Summer background\n array.add(new Square(768, 0, 256, 768,new Color(202,238,249)));\n array.add(new Square(768, 700, 256, 68, new Color(249, 209, 153)));\n //Sun\n array.add(new Sun (974, -50, 100, new Color(255, 170, 0),new Color(255, 195, 77)));\n //Winter Trunk\n array.add(new Trunk(120, 720, new Color(160, 82, 45)));\n //Autumm Trunk\n array.add(new Trunk(376, 720, new Color(160, 82, 45)));\n //Spring Trunk\n array.add(new Trunk(632, 720, new Color(160, 82, 45)));\n //Summer Trunk\n array.add(new Trunk(888, 720, new Color(160, 82, 45)));\n //Summer Leaves\n array.add(new Leaves(968, 600, Color.GREEN));\n //Spring Leaves\n array.add(new Leaves(712, 600, new Color(255, 183, 197)));\n //Autumn Leaves\n array.add(new Leaves(456, 600, new Color(218, 120, 27)));\n //Falling Autumn Leaves\n array.add(new Leaf(440, 650, new Color(218, 120, 27)));\n array.add(new Leaf(456, 700, new Color(218, 120, 27)));\n array.add(new Leaf(300, 680, new Color(218, 120, 27)));\n array.add(new Leaf(356, 710, new Color(218, 120, 27)));\n array.add(new Leaf(330, 650, new Color(218, 120, 27)));\n //Winter Snow\n array.add(new Snow(50, 50, 10, Color.WHITE));\n array.add(new Snow(123, 400, 10, Color.WHITE));\n array.add(new Snow(90, 90, 10, Color.WHITE));\n array.add(new Snow(100, 340, 10, Color.WHITE));\n array.add(new Snow(200, 200, 10, Color.WHITE));\n array.add(new Snow(140, 100, 10, Color.WHITE));\n array.add(new Snow(80, 200, 10, Color.WHITE));\n array.add(new Snow(60, 250, 10, Color.WHITE));\n array.add(new Snow(210, 250, 10, Color.WHITE));\n //Summer Clouds\n array.add(new Cloud(800, 20, 50, Color.WHITE));\n array.add(new Cloud(850, 120, 50, Color.WHITE));\n //Summer Birds\n array.add(new Bird(800, 100, 20, new Color(64,224,208), new Color(224,255,255)));\n array.add(new Bird(900, 70, 30, new Color(218,165,32), new Color(204,204,0)));\n //Beach ball\n array.add(new BeachBall(800, 710, 40));\n //Spring Flowers\n array.add(new Flowers(570, 720, 10, new Color(255, 183, 197)));\n array.add(new Flowers(610, 740, 10, new Color(255, 183, 197)));\n array.add(new Flowers(670, 720, 10, new Color(255, 183, 197)));\n array.add(new Flowers(720, 730, 10, new Color(255, 183, 197)));\n array.add(new Flowers(570, 520, 10, new Color(255, 183, 197)));\n array.add(new Flowers(610, 500, 10, new Color(255, 183, 197)));\n array.add(new Flowers(670, 530, 10, new Color(255, 183, 197)));\n array.add(new Flowers(720, 540, 10, new Color(255, 183, 197)));\n //More Winter Snow\n array.add(new Snow(123, 0, 10, Color.WHITE));\n array.add(new Snow(90, -310, 10, Color.WHITE));\n array.add(new Snow(100, -60, 10, Color.WHITE));\n array.add(new Snow(200, -200, 10, Color.WHITE));\n array.add(new Snow(140, -300, 10, Color.WHITE));\n array.add(new Snow(80, -200, 10, Color.WHITE));\n array.add(new Snow(60, -250, 10, Color.WHITE));\n array.add(new Snow(210, -250, 10, Color.WHITE));\n //The displayed text\n array.add(new Fonts());\n //Spring Clouds\n array.add(new Cloud(544, 20, 50, new Color(239,238,237)));\n array.add(new Cloud(594, 120, 50, new Color(239,238,237)));\n //Autumn Clouds\n array.add(new Cloud(288, 20, 50, new Color(224,223,221)));\n array.add(new Cloud(338, 120, 50, new Color(224,223,221)));\n //Winter Clouds\n array.add(new Cloud(32, 20, 50, new Color(168,167,165)));\n array.add(new Cloud(82, 120, 50, new Color(168,167,165)));\n //Autumn Flowers\n array.add(new AutumnLeaf(314, 720, 20, new Color(176, 101, 75)));\n array.add(new AutumnLeaf(354, 740, 20, new Color(176, 101, 75)));\n array.add(new AutumnLeaf(414, 720, 20, new Color(176, 101, 75)));\n array.add(new AutumnLeaf(464, 730, 20, new Color(176, 101, 75)));\n setPreferredSize(new Dimension(1024, 768));\n \n }",
"public void createNewGame() {\n\t\tfor(int n = 0; n < 8; n++){\n\t\t\tfor(int j = 0; j < 8; j++){\n\t\t\t\tif ( n % 2 == j % BLACK_PAWN ) {\n\t\t\t\t\tif (n < 3)\n\t\t\t\t\t\tarr[n][j] = RED_PAWN;\n\t\t\t\t\telse if (n > 4)\n\t\t\t\t\t\tarr[n][j] = BLACK_PAWN;\n\t\t\t\t\telse\n\t\t\t\t\t\tarr[n][j] = EMPTY;\n\t\t } \n\t\t\t\telse\n\t\t\t\t\tarr[n][j] = EMPTY;\n\t\t\t}\n\t\t}\n\t}",
"private Image blackSquare() {\n\t\tWritableImage wImage = new WritableImage(40, 40);\n\t\tPixelWriter writer = wImage.getPixelWriter();\n\t\tfor (int i = 0; i < 30; i++) {\n\t\t\tfor (int j = 0; j < 30; j++) {\n\t\t\t\twriter.setColor(i, j, Color.BLACK);\n\t\t\t}\n\t\t}\n\t\treturn wImage;\n\t}",
"public abstract WorldImage drawBoard(int blocks);",
"private ImageView[] createTiledWord(String tilesToCreate) {\n int count;\n int length = tilesToCreate.length();\n ImageView[] imagesViewList = new ImageView[length];\n for (count = 0; count < length; count++) {\n ImageView iv = new ImageView(this);\n iv.setImageResource(tileMap.getTile(tilesToCreate.charAt(count)));\n iv.setContentDescription(String.valueOf(tilesToCreate.charAt(count)));\n iv.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View sender) {\n ImageView tile = (ImageView) sender;\n if (tile.getParent() == MainActivity.this.imageLayout) {\n MainActivity.this.imageLayout.removeView(tile);\n MainActivity.this.answerLayout.addView(tile);\n MainActivity.this.checkAnswer();\n\n } else {\n MainActivity.this.answerLayout.removeView(tile);\n MainActivity.this.imageLayout.addView(tile);\n MainActivity.this.convertAnswerString();\n }\n }\n });\n imagesViewList[count] = iv;\n }\n return imagesViewList;\n }",
"Image createImage(List<List<Pixel>> pixelArray);",
"@Override\n public Sprite createSprite(SnakeSmash game) {\n Texture texture = game.getAssetManager().get(\"pinkSquare.png\");\n return new Sprite(texture, texture.getWidth(), texture.getHeight());\n }",
"private void createGrid() {\n String imageButtonID;\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n imageButtonID = \"painterImageButton_\" + i + j;\n\n //This step allows easy assignment of each imageButton with a nested loop\n int resID = this.getResources().getIdentifier(imageButtonID, \"id\", this.getPackageName());\n grid[i][j] = findViewById(resID);\n grid[i][j].setOnClickListener(this); //Response to each button click\n\n //Generate a random number to decide whether to put white or black here\n double x = Math.random() * 2;\n if (x < 1) {\n grid[i][j].setImageResource(R.drawable.black_circle);\n grid[i][j].setContentDescription(getString(R.string.alien_painter_black));\n } else if (x < 2) {\n grid[i][j].setImageResource(R.drawable.white_circle);\n grid[i][j].setContentDescription(getString(R.string.alien_painter_white));\n }\n\n }\n }\n\n //Make sure the grid isn't entirely black at the beginning\n grid[1][1].setImageResource(R.drawable.white_circle);\n grid[1][1].setContentDescription(\"white\");\n }",
"public BoardTest() {\n initComponents();\n \n createSudoku();\n //createBoggle();\n }",
"void generateNewPuzzle() {\n\t\t/* Clean up and initialize the layout for the new puzzle */\n\t\tinitLayout();\n\n\t\t/* Make appropriate changes to the UI */\n\t\tmsgText.setText(R.string.good_luck_string); //change text to 'Good Luck!'\n\t\tviewAgainButton.setText(R.string.see_again_string); //change text to \"View Original Image\"\n\t\t\n\t\t/* Generate the puzzle again */\n\t\tgeneratePuzzle(this.getResources(), R.drawable.pic);\n\t}",
"private void generateBlackImage(int width, int height, int[] pixels) {\n\t\tfor (int y=0; y<height; y++) {\n\t\t\t// Schleife ueber die x-Werte\n\t\t\tfor (int x=0; x<width; x++) {\n\t\t\t\tint pos = y*width + x; // Arrayposition bestimmen\n\t\t\t\t\n\t\t\t\tint r = 0;\n\t\t\t\tint g = 0;\n\t\t\t\tint b = 0;\n\t\t\t\t\n\t\t\t\t// Werte zurueckschreiben\n\t\t\t\tpixels[pos] = 0xFF000000 | (r << 16) | (g << 8) | b;\n\t\t\t}\n\t\t}\n\t}",
"Picture colourComponentImage() throws Exception;",
"private Parent create() {\n root.setPrefSize(600,600);\r\n\r\n for(int i = 0; i < 3; ++i) {\r\n for(int j = 0; j < 3; ++j) {\r\n Tile tile = new Tile();\r\n tile.setTranslateX(j * 200);\r\n tile.setTranslateY(i * 200);\r\n\r\n root.getChildren().add(tile);\r\n board[j][i] = tile;\r\n }\r\n }\r\n\r\n // horizontal strikes\r\n for(int i = 0; i < 3; ++i) {\r\n comboList.add(new Combination(board[0][i], board[1][i], board[2][i]));\r\n }\r\n\r\n // vertical strikes\r\n for(int j = 0; j < 3; ++j) {\r\n comboList.add(new Combination(board[j][0], board[j][1], board[j][2]));\r\n }\r\n\r\n // diagonal strikes\r\n comboList.add(new Combination(board[0][0], board[1][1], board[2][2]));\r\n comboList.add(new Combination(board[2][0], board[1][1], board[0][2]));\r\n\r\n return root;\r\n }",
"private void createAreaWithoutBorder(){\n image.setColor(backgroundColor);\n image.fillRect(0, 0, fieldWidth, fieldHeight);\n }",
"public Board createBoard(Square[][] grid) {Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\");assert grid != null; Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1053\"); Board board = new Board(grid); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1079\"); int width = board.getWidth(); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1115\"); int height = board.getHeight(); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1148\"); for (int x = 0; x < width; x++) {\n\t\t\tfor (int y = 0; y < height; y++) {\n\t\t\t\tSquare square = grid[x][y];\n\t\t\t\tfor (Direction dir : Direction.values()) {\n\t\t\t\t\tint dirX = (width + x + dir.getDeltaX()) % width;\n\t\t\t\t\tint dirY = (height + y + dir.getDeltaY()) % height;\n\t\t\t\t\tSquare neighbour = grid[dirX][dirY];\n\t\t\t\t\tsquare.link(neighbour, dir);\n\t\t\t\t}\n\t\t\t}\n\t\t} Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1183\"); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1552\");return board ; }",
"@Test\n void writeToImage() {\n String imagename = \"img\";\n int width = 1600;\n int height = 1000;\n int nx =500;\n int ny =800;\n ImageWriter imageWriter = new ImageWriter(imagename, width, height, nx, ny);\n for (int col = 0; col < ny; col++) {\n for (int row = 0; row < nx; row++) {\n if (col % 10 == 0 || row % 10 == 0) {\n imageWriter.writePixel(row, col, Color.blue);\n }\n }\n }\n imageWriter.writeToImage();\n }",
"public static synchronized void createPatternImage(int width) {\n if(width < 0) {\n width = 600;\n }\n\n int[][] intensityData = new int[width][width];\n for(int i=0; i<width; i++) {\n for(int j=0; j<width; j++) {\n intensityData[i][j] = i + j;\n }\n }\n\n reset();\n currentPattern = new Pattern(intensityData, \"\", false);\n createPatternImage(currentPattern, null);\n }",
"public static Bitmap CreateBitmapFromGridOfCells(TrafficCell[][] i_grid,int i_mode, boolean i_drawVehicles) {\n// The first index is the y coordinate measured from the top; the second\n// index is the x coordinate measured from the left.\nint t_height = i_grid.length;\nint t_width = 0;\nif (i_grid[0] != null)\nt_width = i_grid[0].length;\n\nBitmap.Config t_conf = Bitmap.Config.ARGB_8888;\nBitmap t_bitmap = Bitmap.createBitmap(t_width, t_height, t_conf);\n\n// this is a slow method\n// TODO: change this to setPixels or to copyPixelsFrom...\nfor (int i = 0; i < t_height; i++) {\nfor (int j = 0; j < t_width; j++) {\nt_bitmap.setPixel(j, i,\nCalulateColorFromTrafficCell(i_grid[i][j], i_mode,i_drawVehicles));\n}\n}\nreturn t_bitmap;\n}",
"@Override\n public void createBoard(List<List<Boolean>> mines) {\n dims = new Point(\n Util.clamp(mines.get(0).size(), MIN_DIM_X, MAX_DIM_X),\n Util.clamp(mines.size(), MIN_DIM_Y, MAX_DIM_Y));\n int maxMines = (int) ((dims.getX() - 1) * (dims.getY() - 1));\n this.numMines = Util.clamp(numMines, MIN_MINES, maxMines);\n\n // Create Cells based on mines\n cells = new ArrayList<>();\n for (int i = 0; i < dims.getY(); i++) {\n ArrayList<Cell> oneRow = new ArrayList<>();\n for (int j = 0; j < dims.getX(); j++) {\n oneRow.add(new CellImpl(this, new Point(j, i), mines.get(i).get(j)));\n }\n cells.add(oneRow);\n }\n\n updateCellNumbers();\n }",
"private void createBitMap() {\n bitMap = bitMap.copy(bitMap.getConfig(), true);\n Canvas canvas = new Canvas(bitMap);\n Paint paint = new Paint();\n paint.setAntiAlias(true);\n paint.setColor(Color.BLACK);\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeWidth(4.5f);\n canvas.drawCircle(50, 50, 30, paint);\n winningBitMap = winningBitMap.copy(winningBitMap.getConfig(), true);\n Canvas canvas2 = new Canvas(winningBitMap);\n paint.setAntiAlias(true);\n paint.setColor(Color.GREEN);\n paint.setStyle(Paint.Style.FILL);\n paint.setStrokeWidth(4.5f);\n canvas2.drawCircle(50, 50, 30, paint);\n bitMapWin = winningBitMap.copy(winningBitMap.getConfig(), true);\n Canvas canvas3 = new Canvas(bitMapWin);\n paint.setAntiAlias(true);\n paint.setColor(Color.MAGENTA);\n paint.setStyle(Paint.Style.FILL);\n paint.setStrokeWidth(4.5f);\n canvas3.drawCircle(50, 50, 30, paint);\n bitMapCat = winningBitMap.copy(winningBitMap.getConfig(), true);\n Canvas canvas4 = new Canvas(bitMapCat);\n paint.setAntiAlias(true);\n paint.setColor(Color.DKGRAY);\n paint.setStyle(Paint.Style.FILL);\n paint.setStrokeWidth(4.5f);\n canvas4.drawCircle(50, 50, 30, paint);\n }",
"private void createXONImageMakerIconPane() throws Exception {\r\n\t\tif (m_XONImageMakerIconPanel != null)\r\n\t\t\treturn;\r\n\t\tImageUtils iu = new ImageUtils();\r\n\t\tm_XONImageMakerIconPanel = new JPanel() {\r\n\t\t\tpublic void paint(Graphics g) {\r\n\t\t\t\tRectangle visibleRect = this.getVisibleRect();\r\n\t\t\t\tDimension panelSize = new Dimension(\r\n\t\t\t\t\t\t(int) visibleRect.getWidth(),\r\n\t\t\t\t\t\t(int) visibleRect.getHeight());\r\n\t\t\t\t// RGPTLogger.logToConsole(\"Panel Size: \"+panelSize);\r\n\t\t\t\tg.drawImage(XON_IMAGE_MAKER_ICON, 0, 0, panelSize.width,\r\n\t\t\t\t\t\tpanelSize.height, this);\r\n\t\t\t}\r\n\t\t};\r\n\t}",
"private Image createImage(String image_file) {\n\t\tImage img = new Image(image_file);\n\t\treturn img;\n\t}",
"private Sprite createSprite(Image image)\n\t{\n\t\tSprite sprite = new Sprite(image, image.getWidth(), image.getHeight());\n\t\treturn sprite;\n\t}",
"public void createNodeUsingExistingClasses() {\n final PLayer layer = getCanvas().getLayer();\n layer.addChild(PPath.createEllipse(0, 0, 100, 100));\n layer.addChild(PPath.createRectangle(0, 100, 100, 100));\n layer.addChild(new PText(\"Hello World\"));\n\n // Here we create an image node that displays a thumbnail\n // image of the root node. Note that you can easily get a thumbnail\n // of any node by using PNode.toImage().\n final PImage image = new PImage(layer.toImage(300, 300, null));\n layer.addChild(image);\n }",
"public void draw() {\n PImage grid = loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/tile.png\");\n for(int i = 0 ; i < 10 ; i++){\n for(int j = 0 ; j < 6 ; j++){\n image(grid, i*grid.width, j*grid.height);\n if(gridPlane.get(List.of(i, j)).getOwner() != null){\n if(gridPlane.get(List.of(i, j)).getOwner().getColor().equals(\"Red\")){\n if(gridPlane.get(List.of(i, j)).getAtomCount() == 1){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/red1.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 2){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/red2.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 3){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/red3.png\"), i*grid.width, j*grid.height);\n }\n }else if(gridPlane.get(List.of(i, j)).getOwner().getColor().equals(\"Green\")){\n if(gridPlane.get(List.of(i, j)).getAtomCount() == 1){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/green1.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 2){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/green2.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 3){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/green3.png\"), i*grid.width, j*grid.height);\n }\n }\n }\n }\n }\n if(this.finish == true){\n System.exit(0);\n }\n }",
"public void createPieces(){ \n\t\tfor(int x = 0; x<BOARD_LENGTH; x++){\n\t\t\tfor(int y = 0; y<BOARD_LENGTH; y++){ \n\t\t\t\tif(CHESS_MAP[x][y] != (null)){\n\t\t\t\t\tswitch (CHESS_MAP[x][y]){\n\t\t\t\t\tcase KING:\n\t\t\t\t\t\tpieces[pieceCounter] = new King(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase QUEEN:\n\t\t\t\t\t\tpieces[pieceCounter] = new Queen(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase BISHOP:\n\t\t\t\t\t\tpieces[pieceCounter] = new Bishop(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase KNIGHT:\n\t\t\t\t\t\tpieces[pieceCounter] = new Knight(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase PAWN:\n\t\t\t\t\t\tpieces[pieceCounter] = new Pawn(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase ROOK:\n\t\t\t\t\t\tpieces[pieceCounter] = new Rook(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} \n\t\t\t\t\tsetPieceIconAndName(x, y, CHESS_MAP[x][y]); \t\n\t\t\t\t\tpieceCounter++;\n\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t}",
"private void generate() {\n preGenerate();\n\n SpriteGrid grid = new SpriteGrid(specState);\n IOHelper.pixelsToBitmap(grid.draw(), sprite);\n\n }",
"public ChessboardView() {\n\t\t\n\t\tcontroller = new ChessController(this);\n\t\t\n\t\tsetLayout(new GridLayout(10, 10));\n\t\t\n\t\t// creo i bottoni (caselle della scacchiera)\n\t\tcreateButtons();\n\t\t\n\t\t// assegno componenti alla griglia (buttons e labels)\n\t\taddComponents();\n\t}",
"public CheckerBoard(){\n mCheckerBoard = new ArrayList<>(64);\n }",
"public static void main(String[] args){\n\tImage test = new Image(700,700);\n\t//addRectangle(test, 0, 0, 600, 600, -1, -1, -1);\n\t//test.display();\n\taddCircle(test, 300, 300, 100, 255, 255, 255);\n\taddCircle(test, 500, 300, 100, 255, 255, 255);\n\taddCircle(test, 400, 400, 150, 255, 255, 255);\n\taddCircle(test, 350, 350, 25, 0, 0, 0);\n\taddCircle(test, 450, 350, 25, 0, 0, 0);\n\taddCircle(test, 350, 350, 24, 255, 255, 255);\n\taddCircle(test, 450, 350, 24, 255, 255, 255);\n\taddCircle(test, 350, 350, 10, 0, 0, 0);\n\taddCircle(test, 450, 350, 10, 0, 0, 0);\n\taddRectangle(test, 325, 475, 150, 20, 0, 0, 0);\n\ttest.setPixel(0,0,255,255,255);\n\ttest.display();\n\tencrypt(test, \"PerfektDokumentation\");\n\ttest.display();\n\tdecrypt(test, \"PerfektDokumentation\");\n\t\n\ttest.display();\n\t}",
"public Board() {\n this.board = new byte[][] { new byte[3], new byte[3], new byte[3] };\n }",
"private void createTestImage()\n {\n initialImage = new byte[3 * size / 2];\n for (int i = 0; i < size; i++)\n {\n initialImage[i] = (byte) (40 + i % 199);\n }\n\n for (int i = size; i < 3 * size / 2; i += 2)\n {\n initialImage[i] = (byte) (40 + i % 200);\n initialImage[i + 1] = (byte) (40 + (i + 99) % 200);\n }\n }",
"public void setBoard() {\n margin = Math.round((sizeOfCell * 3) / 2);\n RelativeLayout.LayoutParams marginParam = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n marginParam.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);\n marginParam.addRule(RelativeLayout.CENTER_HORIZONTAL);\n marginParam.setMargins(0, 0, 0, (margin));\n gridContainer.setLayoutParams(marginParam);\n\n LinearLayout.LayoutParams lpRow = new LinearLayout.LayoutParams(sizeOfCell * maxN, sizeOfCell);\n LinearLayout.LayoutParams lpCell = new LinearLayout.LayoutParams(sizeOfCell, sizeOfCell);\n LinearLayout linRow;\n\n for (int row = 0; row < maxN; row++) {\n linRow = new LinearLayout(context);\n for (int col = 0; col < maxN; col++) {\n ivCell[row][col] = new ImageView(context);\n linRow.addView(ivCell[row][col], lpCell);\n }\n linBoardGame.addView(linRow, lpRow);\n }\n }",
"private void createBWScreen() {\n\t\tfloat[] dash1 = { 2f, 0f, 2f };\n\t\t// Color myNewBlue = new Color(136, 69, 19);\n\t\tColor myNewBlue = new Color(153, 118, 55);\n\t\tBasicStroke bs1 = new BasicStroke(1, BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL);\n\n\t\tactionPanel = new ImagePanel(new ImageIcon(ClassLoader.getSystemResource(\"image/BackgroundNFA.png\")).getImage());\n\t\tactionPanel.setBackground(Color.white);\n\t\tactionPanel.setBounds(0, 0, 1259, 719);\n\t\tgetContentPane().add(actionPanel);\n\n\t\tactionPanel.setBorder(new TitledBorder(null, \"\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\n\t\tactionPanel.setLayout(null);\n\n\t\tg = (Graphics2D) actionPanel.getGraphics();\n\t\tg.setColor(myNewBlue);\n\t\tg.setStroke(bs1);\n\t\ttimer = new Timer(5, blinker);\n\t\ttimer.start();\n\n\t\ttransitionLabel1121 = new JLabel();\n\t\tappleLabels.put(1121, transitionLabel1121);\n\t\ttransitionLabel1121.setBounds(435, 135, 40, 40);\n\t\ttransitionLabel1121.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel1121);\n\n\t\ttransitionLabel1122 = new JLabel();\n\t\tappleLabels.put(1122, transitionLabel1122);\n\t\ttransitionLabel1122.setBounds(616, 135, 40, 40);\n\t\ttransitionLabel1122.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel1122);\n\n\t\ttransitionLabel1123 = new JLabel();\n\t\tappleLabels.put(1123, transitionLabel1123);\n\t\ttransitionLabel1123.setBounds(801, 133, 40, 40);\n\t\ttransitionLabel1123.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel1123);\n\n\t\ttransitionLabel2131 = new JLabel();\n\t\tappleLabels.put(2131, transitionLabel2131);\n\t\ttransitionLabel2131.setBounds(210, 282, 40, 40);\n\t\ttransitionLabel2131.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2131);\n\n\t\ttransitionLabel2132 = new JLabel();\n\t\tappleLabels.put(2132, transitionLabel2132);\n\t\ttransitionLabel2132.setBounds(264, 282, 40, 40);\n\t\ttransitionLabel2132.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2132);\n\n\t\ttransitionLabel2133 = new JLabel();\n\t\tappleLabels.put(2133, transitionLabel2133);\n\t\ttransitionLabel2133.setBounds(312, 282, 40, 40);\n\t\ttransitionLabel2133.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2133);\n\n\t\ttransitionLabel2234 = new JLabel();\n\t\tappleLabels.put(2234, transitionLabel2234);\n\t\ttransitionLabel2234.setBounds(549, 282, 40, 40);\n\t\ttransitionLabel2234.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2234);\n\n\t\ttransitionLabel2235 = new JLabel();\n\t\tappleLabels.put(2235, transitionLabel2235);\n\t\ttransitionLabel2235.setBounds(615, 282, 40, 40);\n\t\ttransitionLabel2235.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2235);\n\n\t\ttransitionLabel2236 = new JLabel();\n\t\tappleLabels.put(2236, transitionLabel2236);\n\t\ttransitionLabel2236.setBounds(674, 282, 40, 40);\n\t\ttransitionLabel2236.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2236);\n\n\t\ttransitionLabel2337 = new JLabel();\n\t\tappleLabels.put(2337, transitionLabel2337);\n\t\ttransitionLabel2337.setBounds(913, 282, 40, 40);\n\t\ttransitionLabel2337.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2337);\n\n\t\ttransitionLabel2338 = new JLabel();\n\t\tappleLabels.put(2338, transitionLabel2338);\n\t\ttransitionLabel2338.setBounds(966, 282, 40, 40);\n\t\ttransitionLabel2338.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2338);\n\n\t\ttransitionLabel2339 = new JLabel();\n\t\tappleLabels.put(2339, transitionLabel2339);\n\t\ttransitionLabel2339.setBounds(1017, 282, 40, 40);\n\t\ttransitionLabel2339.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2339);\n\n\t\ttransitionLabel3141 = new JLabel();\n\t\tappleLabels.put(3141, transitionLabel3141);\n\t\ttransitionLabel3141.setBounds(118, 460, 40, 40);\n\t\ttransitionLabel3141.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3141);\n\n\t\ttransitionLabel3142 = new JLabel();\n\t\tappleLabels.put(3142, transitionLabel3142);\n\t\ttransitionLabel3142.setBounds(145, 460, 40, 40);\n\t\ttransitionLabel3142.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3142);\n\n\t\ttransitionLabel3143 = new JLabel();\n\t\tappleLabels.put(3143, transitionLabel3143);\n\t\ttransitionLabel3143.setBounds(173, 460, 40, 40);\n\t\ttransitionLabel3143.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3143);\n\n\t\ttransitionLabel3244 = new JLabel();\n\t\tappleLabels.put(3244, transitionLabel3244);\n\t\ttransitionLabel3244.setBounds(237, 460, 40, 40);\n\t\ttransitionLabel3244.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3244);\n\n\t\ttransitionLabel3245 = new JLabel();\n\t\tappleLabels.put(3245, transitionLabel3245);\n\t\ttransitionLabel3245.setBounds(262, 460, 40, 40);\n\t\ttransitionLabel3245.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3245);\n\n\t\ttransitionLabel3246 = new JLabel();\n\t\tappleLabels.put(3246, transitionLabel3246);\n\t\ttransitionLabel3246.setBounds(285, 460, 40, 40);\n\t\ttransitionLabel3246.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3246);\n\n\t\ttransitionLabel3347 = new JLabel();\n\t\tappleLabels.put(3347, transitionLabel3347);\n\t\ttransitionLabel3347.setBounds(346, 460, 40, 40);\n\t\ttransitionLabel3347.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3347);\n\n\t\ttransitionLabel3348 = new JLabel();\n\t\tappleLabels.put(3348, transitionLabel3348);\n\t\ttransitionLabel3348.setBounds(376, 460, 40, 40);\n\t\ttransitionLabel3348.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3348);\n\n\t\ttransitionLabel3349 = new JLabel();\n\t\tappleLabels.put(3349, transitionLabel3349);\n\t\ttransitionLabel3349.setBounds(406, 460, 40, 40);\n\t\ttransitionLabel3349.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3349);\n\n\t\ttransitionLabel34410 = new JLabel();\n\t\tappleLabels.put(34410, transitionLabel34410);\n\t\ttransitionLabel34410.setBounds(469, 460, 40, 40);\n\t\ttransitionLabel34410.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel34410);\n\n\t\ttransitionLabel34411 = new JLabel();\n\t\tappleLabels.put(34411, transitionLabel34411);\n\t\ttransitionLabel34411.setBounds(496, 460, 40, 40);\n\t\ttransitionLabel34411.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel34411);\n\n\t\ttransitionLabel34412 = new JLabel();\n\t\tappleLabels.put(34412, transitionLabel34412);\n\t\ttransitionLabel34412.setBounds(524, 460, 40, 40);\n\t\ttransitionLabel34412.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel34412);\n\n\t\ttransitionLabel35413 = new JLabel();\n\t\tappleLabels.put(35413, transitionLabel35413);\n\t\ttransitionLabel35413.setBounds(588, 460, 40, 40);\n\t\ttransitionLabel35413.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel35413);\n\n\t\ttransitionLabel35414 = new JLabel();\n\t\tappleLabels.put(35414, transitionLabel35414);\n\t\ttransitionLabel35414.setBounds(616, 460, 40, 40);\n\t\ttransitionLabel35414.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel35414);\n\n\t\ttransitionLabel35415 = new JLabel();\n\t\tappleLabels.put(35415, transitionLabel35415);\n\t\ttransitionLabel35415.setBounds(642, 460, 40, 40);\n\t\ttransitionLabel35415.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel35415);\n\n\t\ttransitionLabel36416 = new JLabel();\n\t\tappleLabels.put(36416, transitionLabel36416);\n\t\ttransitionLabel36416.setBounds(704, 460, 40, 40);\n\t\ttransitionLabel36416.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel36416);\n\n\t\ttransitionLabel36417 = new JLabel();\n\t\tappleLabels.put(36417, transitionLabel36417);\n\t\ttransitionLabel36417.setBounds(733, 460, 40, 40);\n\t\ttransitionLabel36417.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel36417);\n\n\t\ttransitionLabel36418 = new JLabel();\n\t\tappleLabels.put(36418, transitionLabel36418);\n\t\ttransitionLabel36418.setBounds(758, 460, 40, 40);\n\t\ttransitionLabel36418.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel36418);\n\n\t\ttransitionLabel37419 = new JLabel();\n\t\tappleLabels.put(37419, transitionLabel37419);\n\t\ttransitionLabel37419.setBounds(820, 460, 40, 40);\n\t\ttransitionLabel37419.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel37419);\n\n\t\ttransitionLabel37420 = new JLabel();\n\t\tappleLabels.put(37420, transitionLabel37420);\n\t\ttransitionLabel37420.setBounds(848, 460, 40, 40);\n\t\ttransitionLabel37420.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel37420);\n\n\t\ttransitionLabel37421 = new JLabel();\n\t\tappleLabels.put(37421, transitionLabel37421);\n\t\ttransitionLabel37421.setBounds(876, 460, 40, 40);\n\t\ttransitionLabel37421.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel37421);\n\n\t\ttransitionLabel38422 = new JLabel();\n\t\tappleLabels.put(38422, transitionLabel38422);\n\t\ttransitionLabel38422.setBounds(938, 460, 40, 40);\n\t\ttransitionLabel38422.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel38422);\n\n\t\ttransitionLabel38423 = new JLabel();\n\t\tappleLabels.put(38423, transitionLabel38423);\n\t\ttransitionLabel38423.setBounds(965, 460, 40, 40);\n\t\ttransitionLabel38423.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel38423);\n\n\t\ttransitionLabel38424 = new JLabel();\n\t\tappleLabels.put(38424, transitionLabel38424);\n\t\ttransitionLabel38424.setBounds(992, 460, 40, 40);\n\t\ttransitionLabel38424.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel38424);\n\n\t\ttransitionLabel39425 = new JLabel();\n\t\tappleLabels.put(39425, transitionLabel39425);\n\t\ttransitionLabel39425.setBounds(1054, 460, 40, 40);\n\t\ttransitionLabel39425.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel39425);\n\n\t\ttransitionLabel39426 = new JLabel();\n\t\tappleLabels.put(39426, transitionLabel39427);\n\t\ttransitionLabel39426.setBounds(1082, 460, 40, 40);\n\t\ttransitionLabel39426.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel39426);\n\n\t\ttransitionLabel39427 = new JLabel();\n\t\tappleLabels.put(39427, transitionLabel39427);\n\t\ttransitionLabel39427.setBounds(1111, 460, 40, 40);\n\t\ttransitionLabel39427.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel39427);\n\n\t\ttreeBWLevel1 = new JLabel(\"\");\n\t\ttreeBWLevel1.setLayout(new FlowLayout(FlowLayout.CENTER));\n\t\ttreeBWLevel1.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel1.setBounds(605, 51, 58, 58);\n\t\ttreeBWLevel1.setName(\"11\");\n\t\tactionPanel.add(treeBWLevel1);\n\t\tlabelList.put(11, treeBWLevel1);\n\t\ttreeBWLevel23 = new JLabel(\"\");\n\t\ttreeBWLevel23.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel23.setBounds(956, 200, 58, 58);\n\t\ttreeBWLevel23.setName(\"23\");\n\t\tlabelList.put(23, treeBWLevel23);\n\t\tactionPanel.add(treeBWLevel23);\n\t\ttreeBWLevel22 = new JLabel(\"\");\n\t\ttreeBWLevel22.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel22.setBounds(605, 200, 58, 58);\n\t\ttreeBWLevel22.setName(\"22\");\n\t\tlabelList.put(22, treeBWLevel22);\n\t\tactionPanel.add(treeBWLevel22);\n\t\ttreeBWLevel21 = new JLabel(\"\");\n\t\ttreeBWLevel21.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel21.setBounds(254, 200, 58, 58);\n\t\ttreeBWLevel21.setName(\"21\");\n\t\tlabelList.put(21, treeBWLevel21);\n\t\tactionPanel.add(treeBWLevel21);\n\t\ttreeBWLevel31 = new JLabel(\"\");\n\t\ttreeBWLevel31.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel31.setBounds(137, 350, 58, 58);\n\t\ttreeBWLevel31.setName(\"31\");\n\t\tlabelList.put(31, treeBWLevel31);\n\t\tactionPanel.add(treeBWLevel31);\n\t\ttreeBWLevel32 = new JLabel(\"\");\n\t\ttreeBWLevel32.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel32.setBounds(254, 350, 58, 58);\n\t\ttreeBWLevel32.setName(\"32\");\n\t\tlabelList.put(32, treeBWLevel32);\n\t\tactionPanel.add(treeBWLevel32);\n\t\ttreeBWLevel33 = new JLabel(\"\");\n\t\ttreeBWLevel33.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel33.setBounds(371, 350, 58, 58);\n\t\ttreeBWLevel33.setName(\"33\");\n\t\tlabelList.put(33, treeBWLevel33);\n\t\tactionPanel.add(treeBWLevel33);\n\t\ttreeBWLevel34 = new JLabel(\"\");\n\t\ttreeBWLevel34.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel34.setBounds(488, 350, 58, 58);\n\t\ttreeBWLevel34.setName(\"34\");\n\t\tlabelList.put(34, treeBWLevel34);\n\t\tactionPanel.add(treeBWLevel34);\n\t\ttreeBWLevel35 = new JLabel(\"\");\n\t\ttreeBWLevel35.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel35.setBounds(605, 350, 58, 58);\n\t\ttreeBWLevel35.setName(\"35\");\n\t\tlabelList.put(35, treeBWLevel35);\n\t\tactionPanel.add(treeBWLevel35);\n\t\ttreeBWLevel36 = new JLabel(\"\");\n\t\ttreeBWLevel36.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel36.setBounds(722, 350, 58, 58);\n\t\ttreeBWLevel36.setName(\"36\");\n\t\tlabelList.put(36, treeBWLevel36);\n\t\tactionPanel.add(treeBWLevel36);\n\t\ttreeBWLevel37 = new JLabel(\"\");\n\t\ttreeBWLevel37.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel37.setBounds(839, 350, 58, 58);\n\t\ttreeBWLevel37.setName(\"37\");\n\t\tlabelList.put(37, treeBWLevel37);\n\t\tactionPanel.add(treeBWLevel37);\n\t\ttreeBWLevel38 = new JLabel(\"\");\n\t\ttreeBWLevel38.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel38.setBounds(956, 350, 58, 58);\n\t\ttreeBWLevel38.setName(\"38\");\n\t\tlabelList.put(38, treeBWLevel38);\n\t\tactionPanel.add(treeBWLevel38);\n\t\ttreeBWLevel39 = new JLabel(\"\");\n\t\ttreeBWLevel39.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel39.setBounds(1073, 350, 58, 58);\n\t\ttreeBWLevel39.setName(\"39\");\n\t\tlabelList.put(39, treeBWLevel39);\n\t\tactionPanel.add(treeBWLevel39);\n\t\ttreeBWLevel41 = new JLabel(\"\");\n\t\ttreeBWLevel41.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel41.setBounds(98, 510, 40, 40);\n\t\ttreeBWLevel41.setName(\"41\");\n\t\tlabelList.put(41, treeBWLevel41);\n\t\tactionPanel.add(treeBWLevel41);\n\t\ttreeBWLevel42 = new JLabel(\"\");\n\t\ttreeBWLevel42.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel42.setBounds(137, 510, 40, 40);\n\t\ttreeBWLevel42.setName(\"42\");\n\t\tlabelList.put(42, treeBWLevel42);\n\t\tactionPanel.add(treeBWLevel42);\n\t\ttreeBWLevel43 = new JLabel(\"\");\n\t\ttreeBWLevel43.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel43.setBounds(176, 510, 40, 40);\n\t\ttreeBWLevel43.setName(\"43\");\n\t\tlabelList.put(43, treeBWLevel43);\n\t\tactionPanel.add(treeBWLevel43);\n\t\ttreeBWLevel44 = new JLabel(\"\");\n\t\ttreeBWLevel44.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel44.setBounds(215, 510, 40, 40);\n\t\ttreeBWLevel44.setName(\"44\");\n\t\tlabelList.put(44, treeBWLevel44);\n\t\tactionPanel.add(treeBWLevel44);\n\t\ttreeBWLevel45 = new JLabel(\"\");\n\t\ttreeBWLevel45.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel45.setBounds(254, 510, 40, 40);\n\t\ttreeBWLevel45.setName(\"45\");\n\t\tlabelList.put(45, treeBWLevel45);\n\t\tactionPanel.add(treeBWLevel45);\n\t\ttreeBWLevel46 = new JLabel(\"\");\n\t\ttreeBWLevel46.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel46.setBounds(293, 510, 40, 40);\n\t\ttreeBWLevel46.setName(\"46\");\n\t\tlabelList.put(46, treeBWLevel46);\n\t\tactionPanel.add(treeBWLevel46);\n\t\ttreeBWLevel47 = new JLabel(\"\");\n\t\ttreeBWLevel47.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel47.setBounds(332, 510, 40, 40);\n\t\ttreeBWLevel47.setName(\"47\");\n\t\tlabelList.put(47, treeBWLevel47);\n\t\tactionPanel.add(treeBWLevel47);\n\t\ttreeBWLevel48 = new JLabel(\"\");\n\t\ttreeBWLevel48.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel48.setBounds(371, 510, 40, 40);\n\t\ttreeBWLevel48.setName(\"48\");\n\t\tlabelList.put(48, treeBWLevel48);\n\t\tactionPanel.add(treeBWLevel48);\n\t\ttreeBWLevel49 = new JLabel(\"\");\n\t\ttreeBWLevel49.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel49.setBounds(410, 510, 40, 40);\n\t\ttreeBWLevel49.setName(\"49\");\n\t\tlabelList.put(49, treeBWLevel49);\n\t\tactionPanel.add(treeBWLevel49);\n\t\ttreeBWLevel412 = new JLabel(\"\");\n\t\ttreeBWLevel412.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel412.setBounds(527, 510, 40, 40);\n\t\ttreeBWLevel412.setName(\"412\");\n\t\tlabelList.put(412, treeBWLevel412);\n\t\tactionPanel.add(treeBWLevel412);\n\t\ttreeBWLevel410 = new JLabel(\"\");\n\t\ttreeBWLevel410.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel410.setBounds(449, 510, 40, 40);\n\t\ttreeBWLevel410.setName(\"410\");\n\t\tlabelList.put(410, treeBWLevel410);\n\t\tactionPanel.add(treeBWLevel410);\n\t\ttreeBWLevel411 = new JLabel(\"\");\n\t\ttreeBWLevel411.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel411.setBounds(488, 510, 40, 40);\n\t\ttreeBWLevel411.setName(\"411\");\n\t\tlabelList.put(411, treeBWLevel411);\n\t\tactionPanel.add(treeBWLevel411);\n\t\ttreeBWLevel413 = new JLabel(\"\");\n\t\ttreeBWLevel413.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel413.setBounds(566, 510, 40, 40);\n\t\ttreeBWLevel413.setName(\"413\");\n\t\tlabelList.put(413, treeBWLevel413);\n\t\tactionPanel.add(treeBWLevel413);\n\t\ttreeBWLevel414 = new JLabel(\"\");\n\t\ttreeBWLevel414.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel414.setBounds(605, 510, 40, 40);\n\t\ttreeBWLevel414.setName(\"414\");\n\t\tlabelList.put(414, treeBWLevel414);\n\t\tactionPanel.add(treeBWLevel414);\n\t\ttreeBWLevel415 = new JLabel(\"\");\n\t\ttreeBWLevel415.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel415.setBounds(644, 510, 40, 40);\n\t\ttreeBWLevel415.setName(\"415\");\n\t\tlabelList.put(415, treeBWLevel415);\n\t\tactionPanel.add(treeBWLevel415);\n\t\ttreeBWLevel416 = new JLabel(\"\");\n\t\ttreeBWLevel416.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel416.setBounds(683, 510, 40, 40);\n\t\ttreeBWLevel416.setName(\"416\");\n\t\tlabelList.put(416, treeBWLevel416);\n\t\tactionPanel.add(treeBWLevel416);\n\t\ttreeBWLevel417 = new JLabel(\"\");\n\t\ttreeBWLevel417.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel417.setBounds(722, 510, 40, 40);\n\t\ttreeBWLevel417.setName(\"417\");\n\t\tlabelList.put(417, treeBWLevel417);\n\t\tactionPanel.add(treeBWLevel417);\n\t\ttreeBWLevel418 = new JLabel(\"\");\n\t\ttreeBWLevel418.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel418.setBounds(761, 510, 40, 40);\n\t\ttreeBWLevel418.setName(\"418\");\n\t\tlabelList.put(418, treeBWLevel418);\n\t\tactionPanel.add(treeBWLevel418);\n\n\t\ttreeBWLevel419 = new JLabel(\"\");\n\t\ttreeBWLevel419.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel419.setName(\"419\");\n\t\ttreeBWLevel419.setBounds(800, 510, 40, 40);\n\t\tlabelList.put(419, treeBWLevel419);\n\t\tactionPanel.add(treeBWLevel419);\n\n\t\ttreeBWLevel420 = new JLabel(\"\");\n\t\ttreeBWLevel420.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel420.setName(\"420\");\n\t\ttreeBWLevel420.setBounds(839, 510, 40, 40);\n\t\tlabelList.put(420, treeBWLevel420);\n\t\tactionPanel.add(treeBWLevel420);\n\n\t\ttreeBWLevel421 = new JLabel(\"\");\n\t\ttreeBWLevel421.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel421.setName(\"421\");\n\t\ttreeBWLevel421.setBounds(878, 510, 40, 40);\n\t\tlabelList.put(421, treeBWLevel421);\n\t\tactionPanel.add(treeBWLevel421);\n\n\t\ttreeBWLevel422 = new JLabel(\"\");\n\t\ttreeBWLevel422.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel422.setName(\"422\");\n\t\ttreeBWLevel422.setBounds(917, 510, 40, 40);\n\t\tlabelList.put(422, treeBWLevel422);\n\t\tactionPanel.add(treeBWLevel422);\n\n\t\ttreeBWLevel423 = new JLabel(\"\");\n\t\ttreeBWLevel423.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel423.setName(\"423\");\n\t\ttreeBWLevel423.setBounds(956, 510, 40, 40);\n\t\tlabelList.put(423, treeBWLevel423);\n\t\tactionPanel.add(treeBWLevel423);\n\n\t\ttreeBWLevel424 = new JLabel(\"\");\n\t\ttreeBWLevel424.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel424.setName(\"424\");\n\t\ttreeBWLevel424.setBounds(995, 510, 40, 40);\n\t\tlabelList.put(424, treeBWLevel424);\n\t\tactionPanel.add(treeBWLevel424);\n\n\t\ttreeBWLevel425 = new JLabel(\"\");\n\t\ttreeBWLevel425.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel425.setName(\"425\");\n\t\ttreeBWLevel425.setBounds(1034, 510, 40, 40);\n\t\tlabelList.put(425, treeBWLevel425);\n\t\tactionPanel.add(treeBWLevel425);\n\n\t\ttreeBWLevel426 = new JLabel(\"\");\n\t\ttreeBWLevel426.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel426.setName(\"426\");\n\t\tlabelList.put(426, treeBWLevel426);\n\t\ttreeBWLevel426.setBounds(1073, 510, 40, 40);\n\t\tactionPanel.add(treeBWLevel426);\n\n\t\ttreeBWLevel427 = new JLabel(\"\");\n\t\ttreeBWLevel427.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel427.setName(\"427\");\n\t\ttreeBWLevel427.setBounds(1112, 510, 40, 40);\n\t\tlabelList.put(4127, treeBWLevel427);\n\t\tactionPanel.add(treeBWLevel427);\n\t\tactionPanel.add(treeBWLevel427);\n\t\tarrowLabel = new JLabel(\"\");\n\t\tarrowLabel.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/arrow.png\")));\n\t\tarrowLabel.setBounds(660, 600, 30, 30);\n\t\tactionPanel.add(arrowLabel);\n\t\tarrowLabel.setVisible(false);\n\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBackground(Color.LIGHT_GRAY);\n\t\tpanel.setBorder(new TitledBorder(null, \"\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\n\t\tpanel.setBounds(6, 599, 1250, 98);\n\t\tactionPanel.add(panel);\n\t\tpanel.setLayout(null);\n\t\ttestPanel = new JPanel();\n\t\ttestPanel.setBounds(650, 27, 245, 39);\n\t\tpanel.add(testPanel);\n\t\ttestPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));\n\n\t\ttestBtn1 = new JButton(\"\");\n\t\ttestBtn1.setBackground(Color.GRAY);\n\t\ttestPanel.add(testBtn1);\n\n\t\ttestBtn2 = new JButton(\"\");\n\t\ttestBtn2.setBackground(Color.GRAY);\n\t\ttestPanel.add(testBtn2);\n\n\t\ttestBtn3 = new JButton(\"\");\n\t\ttestBtn3.setBackground(Color.GRAY);\n\t\ttestPanel.add(testBtn3);\n\n\t\ttestPanel.setVisible(false);\n\t\ttestPanel.setBackground(Color.LIGHT_GRAY);\n\n\t\tpanel_1 = new JPanel();\n\t\tpanel_1.setBackground(Color.LIGHT_GRAY);\n\t\tpanel_1.setBounds(181, 27, 376, 44);\n\t\tpanel.add(panel_1);\n\n\t\tJLabel lblNewLabel = new JLabel(\"Enter Test string\");\n\t\tpanel_1.add(lblNewLabel);\n\n\t\ttestField = new JTextField();\n\t\ttestField.setBounds(20, 40, 161, 27);\n\t\tpanel_1.add(testField);\n\t\ttestField.setColumns(10);\n\t\ttestBtn = new JButton(\"Test\");\n\t\ttestBtn.setBounds(340, 20, 92, 30);\n\t\tpanel_1.add(testBtn);\n\n\t\ttestBtn.addMouseListener(new MouseAdapter() {\n\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\n\t\t\t\ttestPanel.setVisible(true);\n\t\t\t\tarrowLabel.setVisible(true);\n\n\t\t\t\ttestString = testField.getText().toString();\n\n\t\t\t\ttestBtn1.setText(String.valueOf(testString.charAt(0)));\n\t\t\t\ttestBtn2.setText(String.valueOf(testString.charAt(1)));\n\t\t\t\ttestBtn3.setText(String.valueOf(testString.charAt(2)));\n\t\t\t\tactionPanel.revalidate();\n\t\t\t\tactionPanel.repaint();\n\t\t\t\t// testBtn1.setText(\" \" + testString.charAt(0));\n\n\t\t\t\ttestBtn1.addMouseListener(new MouseAdapter() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\tarrowLabel.setVisible(true);\n\t\t\t\t\t\tarrowLabel.setBounds(700, 600, 30, 30);\n\t\t\t\t\t\tNFARunWindow.this.testUserInput(testString.substring(0, 1));\n\t\t\t\t\t\ttestBtn1.setBackground(Color.GREEN);\n\t\t\t\t\t\ttestBtn2.setBackground(Color.GRAY);\n\t\t\t\t\t\ttestBtn3.setBackground(Color.GRAY);\n\t\t\t\t\t\tactionPanel.revalidate();\n\t\t\t\t\t\tactionPanel.repaint();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\ttestBtn2.addMouseListener(new MouseAdapter() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\tarrowLabel.setBounds(745, 600, 30, 30);\n\t\t\t\t\t\tarrowLabel.setVisible(true);\n\t\t\t\t\t\tNFARunWindow.this.testUserInput(testString.substring(0, 2));\n\t\t\t\t\t\ttestBtn2.setBackground(Color.GREEN);\n\t\t\t\t\t\ttestBtn3.setBackground(Color.GRAY);\n\t\t\t\t\t\tactionPanel.revalidate();\n\t\t\t\t\t\tactionPanel.repaint();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\ttestBtn3.addMouseListener(new MouseAdapter() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\tarrowLabel.setBounds(790, 600, 30, 30);\n\t\t\t\t\t\tNFARunWindow.this.testUserInput(testString.substring(0, 3));\n\t\t\t\t\t\ttestBtn3.setBackground(Color.GREEN);\n\t\t\t\t\t\tarrowLabel.setVisible(false);\n\t\t\t\t\t\tactionPanel.revalidate();\n\t\t\t\t\t\tactionPanel.repaint();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\n\t}",
"Icon createIcon();",
"public PixImage toPixImage() {\n // Replace the following line with your solution.\n\t PixImage image=new PixImage(getWidth(),getHeight());\n\t \n\t DList<int[]> runs_new=new DList<int[]>();\n\t\t\t for(RunIterator i=this.iterator();i.hasNext();) {\n\t\t\t int[] run = i.next();\n\t\t\t for (int t= 0; t < run[0]; t++) {\n\t\t\t \t runs_new.addLast(run);\n\t\t\t System.out.print(\"(\" + run[1]+\" \"+ run[2]+\" \"+run[3]+\")\");\n\t\t } \n\t }\t\n int position=1;\n for(int j=0;j<height;j++) {\n\t for(int i=0;i<width;i++) {\n\t\t\n\t\t DListNode<int[]> run_new=runs_new.nth(position);\n\t\t position++;\n\t\t \n\t\t image.setPixel(i, j, (short) run_new.item[1], (short) run_new.item[2], (short) run_new.item[3]);\n\t }\n }\n\t\t \n\t\t \n\t return image;\n }",
"public void initGameboardPanel(){\n Image image = Toolkit.getDefaultToolkit().createImage(getClass().getResource(\"/board/Masters of Renaissance_PlayerBoard (11_2020)-1.png\"));\n this.backgroundImage = image.getScaledInstance(gameboardWidth,gameboardHeight,0);\n\n this.setSize(gameboardWidth,gameboardHeight);\n this.setBounds(0,0,gameboardWidth,gameboardHeight);\n this.setLayout(null);\n //this.addMouseListener(this);\n this.setVisible(true);\n }",
"Lab create();",
"public ImageCanvas() {\r\n super();\r\n }",
"public Image() {\n\t\t\tthis(Color.white, 0);\n\t\t}",
"public Bitmap generateBackground()\n {\n Bitmap bg = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);\n Canvas temp = new Canvas(bg);\n for (int i = 0; i < width/blockWidth; i++)\n {\n for (int j = 0; j < height/blockHeight; j++)\n {\n Random rand = new Random();\n int val = rand.nextInt(5);\n\n if (val == 0)\n {\n temp.drawBitmap(Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.ground_tile_1), blockWidth, blockHeight, true),\n i*blockWidth, j*blockHeight, null);\n\n }\n else if (val == 1)\n {\n temp.drawBitmap(Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.ground_tile_2), blockWidth, blockHeight, true),\n i*blockWidth, j*blockHeight, null);\n }\n else if (val == 2)\n {\n temp.drawBitmap(Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.ground_tile_3), blockWidth, blockHeight, true),\n i*blockWidth, j*blockHeight, null);\n }\n else if (val == 3)\n {\n temp.drawBitmap(Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.ground_tile_4), blockWidth, blockHeight, true),\n i*blockWidth, j*blockHeight, null);\n }\n else if (val == 4)\n {\n temp.drawBitmap(Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.ground_tile_5), blockWidth, blockHeight, true),\n i*blockWidth, j*blockHeight, null);\n }\n\n }\n }\n\n return bg;\n\n }",
"public int createBuildLayout(final Card card, GridLayout tableLayout, int counter){\r\n GridLayout.LayoutParams layoutParams;\r\n Drawable drawable;\r\n if (card instanceof Build) {\r\n TextView build = new TextView(this);\r\n layoutParams = new GridLayout.LayoutParams(GridLayout.spec(0, 1),\r\n GridLayout.spec(counter));\r\n\r\n String buildName = \"\\t\" + card.getCardName();\r\n build.setText(buildName);\r\n\r\n if (((Build) card).getOwnerId() == 1) {\r\n build.setTextColor(Color.rgb(220, 20, 60));\r\n }\r\n else{\r\n build.setTextColor(Color.rgb(0,191,255));\r\n }\r\n\r\n tableLayout.addView(build, layoutParams);\r\n\r\n return ++counter;\r\n }\r\n final CheckBox checkBox = new CheckBox(this);\r\n checkBox.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n if (checkBox.isChecked()) {\r\n userChosenCards.add(card);\r\n return;\r\n }\r\n userChosenCards.remove(card);\r\n }\r\n });\r\n\r\n\r\n checkBox.setLayoutParams(new ViewGroup.LayoutParams(1, 2));\r\n\r\n layoutParams = new GridLayout.LayoutParams(GridLayout.spec(0, 1), GridLayout.spec(counter));\r\n\r\n layoutParams.setMargins(2, 0, 2, 0);\r\n\r\n drawable = this.getResources().getDrawable(this.getResources().getIdentifier(\r\n card.getCardName().toLowerCase(), \"drawable\", getPackageName()));\r\n checkBox.setBackgroundDrawable(drawable);\r\n layoutParams.width = 100;\r\n layoutParams.height = 150;\r\n\r\n checkBox.setWidth(100);\r\n checkBox.setHeight(150);\r\n\r\n tableLayout.addView(checkBox, layoutParams);\r\n\r\n return ++counter;\r\n }"
] |
[
"0.6038241",
"0.5881549",
"0.5874939",
"0.5862218",
"0.5825304",
"0.5735048",
"0.573447",
"0.5659985",
"0.56512415",
"0.56311995",
"0.56041425",
"0.55992657",
"0.5566475",
"0.5489737",
"0.54522455",
"0.54215",
"0.54205436",
"0.5412121",
"0.53913105",
"0.53544265",
"0.53482753",
"0.53241205",
"0.52936506",
"0.52786136",
"0.52759475",
"0.52750146",
"0.5267292",
"0.5259277",
"0.5249142",
"0.52279687",
"0.5224559",
"0.52036905",
"0.5185626",
"0.5178947",
"0.51761824",
"0.51685166",
"0.51513153",
"0.51498246",
"0.5137242",
"0.51354533",
"0.512664",
"0.51194847",
"0.5109031",
"0.50984883",
"0.50834656",
"0.507576",
"0.5075428",
"0.50662374",
"0.5060584",
"0.50480604",
"0.5040479",
"0.50289804",
"0.50285053",
"0.50131935",
"0.5012524",
"0.50096583",
"0.49981794",
"0.49974993",
"0.49872226",
"0.49477673",
"0.49461144",
"0.49366844",
"0.4930407",
"0.49228406",
"0.49189293",
"0.49088734",
"0.48921967",
"0.4886711",
"0.487964",
"0.4877503",
"0.4872349",
"0.4871359",
"0.4869988",
"0.48662272",
"0.4852257",
"0.48470494",
"0.4845402",
"0.4843135",
"0.4837697",
"0.4835154",
"0.48349974",
"0.4829842",
"0.48280492",
"0.48239726",
"0.48181793",
"0.48099086",
"0.48094964",
"0.48078746",
"0.48041406",
"0.48031554",
"0.48009843",
"0.47939625",
"0.47937822",
"0.47933993",
"0.47878453",
"0.47835135",
"0.47807103",
"0.47742206",
"0.47710928",
"0.4770806"
] |
0.74717367
|
0
|
creates a row of pixels used in the createCheckerboard method
|
private List<Pixel> createRow(int colorValue, int altColorValue, int y) {
List<Pixel> row = new ArrayList<>();
for (int j = 0; j < this.width; j++) { // width = 3
if (j % 2 == 0) {
for (int k = 0; k < this.tileSize; k++) {
Pixel p = new Pixel(colorValue, colorValue, colorValue,
new Posn((j * tileSize) + k, y));
row.add(p);
}
} else {
for (int k = 0; k < this.tileSize; k++) {
Pixel p = new Pixel(altColorValue, altColorValue, altColorValue,
new Posn((j * tileSize) + k, y));
row.add(p);
}
}
}
return row;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public IImage createCheckerboard() {\n List<List<Pixel>> grid = new ArrayList<>();\n for (int i = 0; i < this.height; i++) {\n List<Pixel> row;\n // alternating between making rows starting with black or white tiles\n if (i % 2 == 0) {\n // start white\n for (int j = 0; j < this.tileSize; j++) {\n row = createRow(255, 0, (i * this.tileSize) + j);\n grid.add(row);\n }\n }\n else {\n // start black\n for (int m = 0; m < this.tileSize; m++) {\n row = createRow(0, 255, (i * this.tileSize) + m);\n grid.add(row);\n }\n }\n }\n return new Image(grid, 255);\n }",
"private void fillBoardWithCells(){\n double posx = MyValues.HORIZONTAL_VALUE*0.5*MyValues.HEX_SCALE + MyValues.DIAGONAL_VALUE*MyValues.HEX_SCALE;\n double posy = 2*MyValues.DIAGONAL_VALUE*MyValues.HEX_SCALE ;\n HexCell startCell = new HexCell(0,0, this);\n startCell.changePosition(posx, posy);\n boardCells[0][0] = startCell;\n for (int i = 0; i< x-1; i++) {\n HexCell currentCell = new HexCell(i+1, 0, this);\n boardCells[i+1][0] = currentCell;\n //i mod 2 = 0: Bottom\n if (i % 2 == 0) {\n boardCells[i][0].placeHexCell(currentCell, MyValues.HEX_POSITION.BOT_RIGHT );\n } else {\n //i mod 2 =1: Top\n boardCells[i][0].placeHexCell(currentCell, MyValues.HEX_POSITION.TOP_RIGHT );\n }\n }\n for(int i = 0; i < x; i++){\n for(int j = 0; j < y-1; j++){\n HexCell currentCell = new HexCell(i, j+1, this);\n //System.out.println(Integer.toString(i) + Integer.toString(j));\n boardCells[i][j+1] = currentCell;\n boardCells[i][j].placeHexCell(currentCell, MyValues.HEX_POSITION.BOT);\n }\n }\n }",
"public void setBoard() {\n margin = Math.round((sizeOfCell * 3) / 2);\n RelativeLayout.LayoutParams marginParam = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n marginParam.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);\n marginParam.addRule(RelativeLayout.CENTER_HORIZONTAL);\n marginParam.setMargins(0, 0, 0, (margin));\n gridContainer.setLayoutParams(marginParam);\n\n LinearLayout.LayoutParams lpRow = new LinearLayout.LayoutParams(sizeOfCell * maxN, sizeOfCell);\n LinearLayout.LayoutParams lpCell = new LinearLayout.LayoutParams(sizeOfCell, sizeOfCell);\n LinearLayout linRow;\n\n for (int row = 0; row < maxN; row++) {\n linRow = new LinearLayout(context);\n for (int col = 0; col < maxN; col++) {\n ivCell[row][col] = new ImageView(context);\n linRow.addView(ivCell[row][col], lpCell);\n }\n linBoardGame.addView(linRow, lpRow);\n }\n }",
"public static void createBoard() {\n Checkers[] CheckerBoard = new Checkers[24];\n CheckerBoard[0] = new Checkers(0,1,\"black\");\n CheckerBoard[1] = new Checkers(0,3,\"black\");\n CheckerBoard[2] = new Checkers(0,5,\"black\");\n CheckerBoard[3] = new Checkers(0,7,\"black\");\n CheckerBoard[4] = new Checkers(1,0,\"black\");\n CheckerBoard[5] = new Checkers(1,2,\"black\");\n CheckerBoard[6] = new Checkers(1,4,\"black\");\n CheckerBoard[7] = new Checkers(1,6,\"black\");\n CheckerBoard[8] = new Checkers(2,1,\"black\");\n CheckerBoard[9] = new Checkers(2,3,\"black\");\n CheckerBoard[10] = new Checkers(2,5,\"black\");\n CheckerBoard[11] = new Checkers(2,7,\"black\");\n CheckerBoard[12] = new Checkers(5,1,\"red\");\n CheckerBoard[13] = new Checkers(5,3,\"red\");\n CheckerBoard[14] = new Checkers(5,5,\"red\");\n CheckerBoard[15] = new Checkers(5,7,\"red\");\n CheckerBoard[16] = new Checkers(6,0,\"red\");\n CheckerBoard[17] = new Checkers(6,2,\"red\");\n CheckerBoard[18] = new Checkers(6,4,\"red\");\n CheckerBoard[19] = new Checkers(6,6,\"red\");\n CheckerBoard[20] = new Checkers(7,1,\"red\");\n CheckerBoard[21] = new Checkers(7,3,\"red\");\n CheckerBoard[22] = new Checkers(7,5,\"red\");\n CheckerBoard[23] = new Checkers(7,7,\"red\");\n\n\n\n }",
"public Row(Context context, boolean black, int x, int y, int tileWidth, int tileHeight, int index) {\n this.blackFirst = black;\n this.context = context;\n this.index = index;\n this.x = x;\n this.y = y;\n dy = GamePanel.gameSpeed;\n\n\n// BLACK_BITMAP_TILE = BitmapFactory.decodeResource(context.getResources(), R.drawable.black);\n// WHITE_BITMAP_TILE = BitmapFactory.decodeResource(context.getResources(), R.drawable.white);\n\n tiles = new ArrayList<>();\n if (blackFirst) {\n// for(int i = 0; i < ChessBoard.COLUMN_NUM; i ++){\n// Tile tile;\n// if((i % 2) == 0) {\n// tile = new Tile(BLACK_BITMAP_TILE, x + i * tileWidth, y, tileWidth, tileHeight, true );\n// } else {\n// tile = new Tile(WHITE_BITMAP_TILE, x + i * tileWidth, y, tileWidth, tileHeight, false );\n// }\n// tiles.add(i, tile);\n// }\n for (int i = 0; i < GamePanel.COLUMN_NUM; i++) {\n Tile tile;\n if ((i % 2) == 0) {\n tile = new Tile(x + i * tileWidth, y, tileWidth, tileHeight, true, i, index);\n } else {\n tile = new Tile(x + i * tileWidth, y, tileWidth, tileHeight, false, i, index);\n }\n tiles.add(i, tile);\n }\n } else {\n// for(int i = 0; i < ChessBoard.COLUMN_NUM; i ++){\n// Tile tile;\n// if((i % 2) == 0) {\n// tile = new Tile(WHITE_BITMAP_TILE, x + i * tileWidth, y, tileWidth, tileHeight, false );\n// } else {\n// tile = new Tile(BLACK_BITMAP_TILE, x + i * tileWidth, y, tileWidth, tileHeight, true );\n// }\n// tiles.add(i, tile);\n// }\n\n for (int i = 0; i < GamePanel.COLUMN_NUM; i++) {\n Tile tile;\n if ((i % 2) == 0) {\n tile = new Tile(x + i * tileWidth, y, tileWidth, tileHeight, false, i, index);\n } else {\n tile = new Tile(x + i * tileWidth, y, tileWidth, tileHeight, true, i, index);\n }\n tiles.add(i, tile);\n }\n }\n\n\n }",
"public WorldImage drawRow(int blocks) {\r\n return new EmptyImage();\r\n }",
"public abstract WorldImage drawRow(int blocks);",
"private void generateRows() {\n\t\tfor (int i=0; i<squares.length; i++) {\n\t\t\trows[i]=new Row(squares[i]);\n\t\t}\n\t}",
"ArrayList<ArrayList<GamePiece>> makeBoard() {\n ArrayList<ArrayList<GamePiece>> row = new ArrayList<ArrayList<GamePiece>>();\n for (int i = 0; i < this.width; i++) {\n ArrayList<GamePiece> column = new ArrayList<GamePiece>();\n for (int j = 0; j < this.height; j++) {\n GamePiece temp = new GamePiece(i, j);\n column.add(temp);\n nodes.add(temp);\n }\n row.add(column);\n }\n return row;\n }",
"private void testBoardCreation() {\n for (int r = 0; r < Constants.BOARD_GRID_ROWS; r++) {\n for (int c = 0; c < Constants.BOARD_GRID_COLUMNS; c++) {\n Vector2 tokenLocation = this.mBoardLevel.getCenterOfLocation(r, c);\n Image tokenImage = new Image(this.mResources.getToken(PlayerType.RED));\n tokenImage.setPosition(tokenLocation.x, tokenLocation.y);\n this.mStage.addActor(tokenImage);\n }\n }\n }",
"public CheckerBoard(int size) {\n super(new int[size * tilesPerSide][size * tilesPerSide][3]);\n for (int y = 0; y < this.getHeight(); ++y) {\n for (int x = 0; x < this.getWidth(); ++x) {\n for (int channel = 0; channel < 3; ++channel) {\n this.data[y][x][channel] = ((x / size + y / size) % 2 == 1) ? 0 : 255;\n }\n }\n }\n }",
"private void createBoardRow(int row, int startState, int endState) {\n\t\tLog.d(LOG_TAG, String.format(\"Create board row %s with start state: %s and end state: %s\",row,startState,endState));\n\t\tBoardSquareInfo[][] squares = getBoardGame();\n\t\t\n\t\tfor(int col=0; col<COLUMNS; col++) {\n\t\t\tint id = row*COLUMNS+col;\n\t\t\tint state = (col%2 == 0)? startState: endState;\n\t\t\tint chip = (state == PLAYER1_STATE || state == PLAYER2_STATE)? PAWN_CHIP: EMPTY_CHIP;\n\t\t\t\n\t\t\tsquares[row][col] = new BoardSquareInfo(id,row,col,state,chip);\n\t\t}\n\t}",
"public abstract WorldImage drawBoard(int blocks);",
"private void createGraySquares() {\n for (int x = 0; x < 16; x ++)\n for (int y = 0; y < 16; y ++)\n // If the area is not explored, creates a gray square at that point.\n if (!storage.explored[x][y]) {\n GraySquare square = new GraySquare(screen.miscAtlases.get(2));\n // Uses the x and y integers to set the corresponding position in the grid.\n square.setPosition(x * 20, y * 20 + 19);\n // Adds to the rendering list.\n squares.add(square);\n }\n }",
"public WorldImage drawBoard(int blocks) {\r\n return new EmptyImage();\r\n }",
"private void generateBoard(){\n\t}",
"public void create() {\n\t\t// setup Chess board\n\t\tthis.removeAll();\n\t\tthis.layout = new GridLayout(this.startupBoardSize, this.startupBoardSize);\n\t\tthis.squares = new SquarePanel[this.startupBoardSize][this.startupBoardSize];\n\t\t\n\t\tsetLayout(layout);\n\t\tsetPreferredSize(new Dimension(600, 600));\n\t\tsetBorder(new LineBorder(new Color(0, 0, 0)));\n\n\t\t//paint the chess board\n\n\t\tfor (int i = 0; i < this.startupBoardSize; i++) \n\t\t{\n\t\t\tfor (int j = 0; j < this.startupBoardSize; j++) \n\t\t\t{\n\t\t\t\tsquares[i][j] = new SquarePanel(j, i);\n\t\t\t\tsquares[i][j].setPreferredSize(new Dimension(600 / this.startupBoardSize - 5, 600 / this.startupBoardSize - 5));\n\n\n\t\t\t\tsquares[i][j].setBackground(Color.WHITE);\n\t\t\t\t\n\t\t\t\tif (((i + j) % 2) == 0) \n\t\t\t\t{\n\t\t\t\t\tsquares[i][j].setBackground(Color.DARK_GRAY);\n\t\t\t\t}\n\t\t\t\tadd(squares[i][j]);\n\t\t\t}\n\t\t}\n\t}",
"protected abstract void paintBoard() throws TilePixelOutOfRangeException;",
"public static int[][] createBoard() {\r\n\t\t\r\n\t\tint[][] board = new int [8][8];\r\n\t\t//printing the red solduers\r\n\t\tfor (int line =0,column=0;line<3;line=line+1){\r\n\t\t\tif (line%2==0){column=0;}\r\n\t\t\telse {column=1;}\r\n\t\t\tfor (;column<8;column=column+2){\r\n\t\t\t\tboard [line][column] = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//printing the blu solduers\r\n\t\tfor (int line =5,column=0;line<8;line=line+1){\r\n\t\t\tif (line%2==0){column=0;}\r\n\t\t\telse {column=1;}\r\n\t\t\tfor (;column<8;column=column+2){\r\n\t\t\t\tboard [line][column] = -1;\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t\treturn board;\r\n\t}",
"void createWires() {\n this.splitBoard(new Posn(0, 0), this.height, this.width);\n int counter = 0;\n for (int i = 0; i < this.width; i++) {\n for (int j = 0; j < this.height; j++) {\n nodes.set(counter, this.board.get(i).get(j));\n counter++;\n }\n }\n }",
"@Override\n public void createBoard(int width, int height, int numMines) {\n // Clamp the dimensions and mine numbers\n dims = new Point(Util.clamp(width, MIN_DIM_X, MAX_DIM_X),\n Util.clamp(height, MIN_DIM_Y, MAX_DIM_Y));\n int maxMines = (int) ((dims.getX() - 1) * (dims.getY() - 1));\n this.numMines = Util.clamp(numMines, MIN_MINES, maxMines);\n\n // Step 1\n cells = new ArrayList<>();\n for (int i = 0; i < dims.getY(); i++) {\n List<Cell> oneRow = new ArrayList<>();\n for (int j = 0; j < dims.getX(); j++) {\n oneRow.add(new CellImpl(this, new Point(j, i), false));\n }\n cells.add(oneRow);\n }\n\n // Step 2\n int minesPlaced = 0;\n while (minesPlaced < this.numMines) {\n int randX = ThreadLocalRandom.current().nextInt((int) dims.getX());\n int randY = ThreadLocalRandom.current().nextInt((int) dims.getY());\n\n if (!cells.get(randY).get(randX).isMine()) {\n cells.get(randY).get(randX).setNumber(-1);\n minesPlaced++;\n }\n }\n\n // Step 3\n updateCellNumbers();\n }",
"private void createBoard() {\n\t// An array of rows containing rows with squares are made\n\t\tfor (int i = 0; i < squares.length; i++) {\n\t \trows[i] = new Row(squares[i]);\n\t\t}\n\n\n\t// An array of columns containing columns with squares are made\n\t\tSquare[] columnArray = new Square[size];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t for (int row = 0; row < size; row++) {\n\t\t\t\tcolumnArray[row] = squares[row][i];\n\t\t }\n\t\t columns[i] = new Column(columnArray);\n\t\t columnArray = new Square[size];\n\t\t}\n\n\n\t\tSquare[] boxArray;\n\t\tint counter;\n\t\t// Box nr i\n\t\tfor (int i = 0; i < size; i = i + height) {\n\t\t // Box nr j\n\t\t for (int j = 0; j < size; j = j + length) {\n\t\t\t\tcounter = 0;\n\t\t\t\tboxArray = new Square[size];\n\t\t\t\tint rowIndex = (i / height) * height;\n\t\t\t\tint columnIndex = (j / length) * length;\n\t\t\t\t// Row nr k\n\t\t\t\tfor (int k = rowIndex; k < rowIndex + height; k++) {\n\t\t\t\t // Column nr l\n\t\t\t\t for (int l = columnIndex; l < columnIndex + length; l++) {\n\t\t\t\t\t\tboxArray[counter] = squares[k][l];\n\t\t\t\t\t\tcounter++;\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tboxes[j/length][i/height] = new Box(boxArray);\n\t\t }\n\t\t}\t\n\t\tcreatePointers();\n }",
"public abstract WorldImage drawCell(int blocks);",
"public void createBoard() {\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[i].length; j++) {\n matrix[i][j] = WATER;\n }\n }\n }",
"@Override\n public void createBoard(List<List<Boolean>> mines) {\n dims = new Point(\n Util.clamp(mines.get(0).size(), MIN_DIM_X, MAX_DIM_X),\n Util.clamp(mines.size(), MIN_DIM_Y, MAX_DIM_Y));\n int maxMines = (int) ((dims.getX() - 1) * (dims.getY() - 1));\n this.numMines = Util.clamp(numMines, MIN_MINES, maxMines);\n\n // Create Cells based on mines\n cells = new ArrayList<>();\n for (int i = 0; i < dims.getY(); i++) {\n ArrayList<Cell> oneRow = new ArrayList<>();\n for (int j = 0; j < dims.getX(); j++) {\n oneRow.add(new CellImpl(this, new Point(j, i), mines.get(i).get(j)));\n }\n cells.add(oneRow);\n }\n\n updateCellNumbers();\n }",
"public WorldImage drawCell(int blocks) {\r\n return new EmptyImage();\r\n }",
"public void createCellBoard(int rows, int cols) {\n\t\trowcount = rows;\n\t\tcolcount = cols;\n\t\tcells = new int[rows][cols];\n\t}",
"private void createTiles() {\n\t\tint tile_width = bitmap.getWidth() / gridSize;\n\t\tint tile_height = bitmap.getHeight() / gridSize;\n\n\t\tfor (short row = 0; row < gridSize; row++) {\n\t\t\tfor (short column = 0; column < gridSize; column++) {\n\t\t\t\tBitmap bm = Bitmap.createBitmap(bitmap, column * tile_width,\n\t\t\t\t\t\trow * tile_height, tile_width, tile_height);\n\n\t\t\t\t// if final, Tile -> blank\n\t\t\t\tif ((row == gridSize - 1) && (column == gridSize - 1)) {\n\t\t\t\t\tbm = Bitmap.createBitmap(tile_width, tile_height,\n\t\t\t\t\t\t\tbm.getConfig());\n\t\t\t\t\tbm.eraseColor(Color.WHITE);\n\t\t\t\t\ttheBlankTile = new Tile(bm, row, column);\n\t\t\t\t\ttiles.add(theBlankTile);\n\t\t\t\t} else {\n\t\t\t\t\ttiles.add(new Tile(bm, row, column));\n\t\t\t\t}\n\t\t\t} // end column\n\t\t} // end row\n\t\tbitmap.recycle();\n\n\t}",
"public void initializeBoard() {\r\n int x;\r\n int y;\r\n\r\n this.loc = this.userColors();\r\n\r\n this.board = new ArrayList<ACell>();\r\n\r\n for (y = -1; y < this.blocks + 1; y += 1) {\r\n for (x = -1; x < this.blocks + 1; x += 1) {\r\n ACell nextCell;\r\n\r\n if (x == -1 || x == this.blocks || y == -1 || y == this.blocks) {\r\n nextCell = new EndCell(x, y);\r\n } else {\r\n nextCell = new Cell(x, y, this.randColor(), false);\r\n }\r\n if (x == 0 && y == 0) {\r\n nextCell.flood();\r\n }\r\n this.board.add(nextCell);\r\n }\r\n }\r\n this.stitchCells();\r\n this.indexHelp(0, 0).floodInitStarter();\r\n }",
"void create(){\n // I assign zero value to each element of the array.\n for (int i = 0;i< this.row; i++){\n for (int j = 0; j< this.column; j++){\n array[i][j]= 0;\n }\n }\n // I create random values for mines indexes\n int min = 0;\n int max = this.row;\n Random random = new Random();\n int randRow, randColumn, count=0;\n //I generate random mines quarter of the size of the array and assign it into the array.\n while(count != (this.row*this.column/4)){\n randRow = random.nextInt(max + min) + min;\n randColumn = random.nextInt(max + min) + min;\n if (array[randRow][randColumn] != -1){\n array[randRow][randColumn]= -1;\n count++;\n }\n }\n // I show the all minesweeper map\n for (int i = 0;i< this.row; i++){\n for (int j = 0; j< this.column; j++){\n if (array[i][j]==0)\n System.out.print(\"0 \");\n else\n System.out.print(\"* \");\n }\n System.out.println();\n }\n }",
"private int getRowPixelCoords(int row) {\r\n\t\treturn row * (HEX_HEIGHT - HEX_ANGLE_HEIGHT);\r\n\t}",
"public void initializeBoard() {\n\n\t\t/*\n\t\t * How the array coordinates align with the actual chess board\n\t\t * (row,col) \n\t\t * (7,0) ... ... ... \n\t\t * (7,7) ... ... ... \n\t\t * ... ... ... \n\t\t * (2,0) ...\n\t\t * (1,0) ... \n\t\t * (0,0) ... ... ... (0,7)\n\t\t */\n\n\t\tboolean hasMoved = false;\n\t\tboolean white = true;\n\t\tboolean black = false;\n\n\t\t// Set white piece row\n\t\tboard[0][0] = new Piece('r', white, hasMoved, 0, 0, PieceArray.A_rookId);\n\t\tboard[0][1] = new Piece('n', white, hasMoved, 0, 1, PieceArray.B_knightId);\n\t\tboard[0][2] = new Piece('b', white, hasMoved, 0, 2, PieceArray.C_bishopId);\n\t\tboard[0][3] = new Piece('q', white, hasMoved, 0, 3, PieceArray.D_queenId);\n\t\tboard[0][4] = new Piece('k', white, hasMoved, 0, 4, PieceArray.E_kingId);\n\t\tboard[0][5] = new Piece('b', white, hasMoved, 0, 5, PieceArray.F_bishopId);\n\t\tboard[0][6] = new Piece('n', white, hasMoved, 0, 6, PieceArray.G_knightId);\n\t\tboard[0][7] = new Piece('r', white, hasMoved, 0, 7, PieceArray.H_rookId);\n\n\t\t// Set white pawns\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tboard[1][i] = new Piece('p', white, hasMoved, 1, i, i + 8);\n\t\t}\n\n\t\t// Set empty rows\n\t\tfor (int row = 2; row < 6; row++)\n\t\t\tfor (int col = 0; col < 8; col++)\n\t\t\t\tboard[row][col] = null;\n\n\t\t// Set black pawns\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tboard[6][i] = new Piece('p', black, hasMoved, 6, i, i+8);\n\t\t}\n\n\t\t// Set black piece row\n\t\tboard[7][0] = new Piece('r', black, hasMoved, 7, 0, PieceArray.A_rookId);\n\t\tboard[7][1] = new Piece('n', black, hasMoved, 7, 1, PieceArray.B_knightId);\n\t\tboard[7][2] = new Piece('b', black, hasMoved, 7, 2, PieceArray.C_bishopId);\n\t\tboard[7][3] = new Piece('q', black, hasMoved, 7, 3, PieceArray.D_queenId);\n\t\tboard[7][4] = new Piece('k', black, hasMoved, 7, 4, PieceArray.E_kingId);\n\t\tboard[7][5] = new Piece('b', black, hasMoved, 7, 5, PieceArray.F_bishopId);\n\t\tboard[7][6] = new Piece('n', black, hasMoved, 7, 6, PieceArray.G_knightId);\n\t\tboard[7][7] = new Piece('r', black, hasMoved, 7, 7, PieceArray.H_rookId);\n\t}",
"public void createBoard() {\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j <colls; j++) {\n if(i==0 || j == 0 || i == rows-1|| j == colls-1){\n board[i][j] = '*';\n } else {\n board[i][j] = ' ';\n }\n }\n }\n }",
"public TicTacToeBoard() {board = new int[rows][columns];}",
"private Board create4by4Board() {\n Tile[][] tiles;\n Tile t1 = new Tile(0, 4);\n Tile t2 = new Tile(1, 4);\n Tile t3 = new Tile(2, 4);\n Tile t4 = new Tile(3, 4);\n Tile t5 = new Tile(4, 4);\n Tile t6 = new Tile(5, 4);\n Tile t7 = new Tile(6, 4);\n Tile t8 = new Tile(7, 4);\n Tile t9 = new Tile(8, 4);\n Tile t10 = new Tile(9, 4);\n Tile t11 = new Tile(10, 4);\n Tile t12 = new Tile(11, 4);\n Tile t13 = new Tile(12, 4);\n Tile t14 = new Tile(13, 4);\n Tile t15 = new Tile(14, 4);\n Tile t16 = new Tile(15, 4);\n tiles = new Tile[4][4];\n tiles[0][0] = t5;\n tiles[0][1] = t16;\n tiles[0][2] = t1;\n tiles[0][3] = t3;\n tiles[1][0] = t13;\n tiles[1][1] = t15;\n tiles[1][2] = t9;\n tiles[1][3] = t12;\n tiles[2][0] = t2;\n tiles[2][1] = t6;\n tiles[2][2] = t7;\n tiles[2][3] = t14;\n tiles[3][0] = t10;\n tiles[3][1] = t4;\n tiles[3][2] = t8;\n tiles[3][3] = t11;\n return new Board(tiles);\n }",
"public static Bitmap CreateBitmapFromGridOfCells(TrafficCell[][] i_grid,int i_mode, boolean i_drawVehicles) {\n// The first index is the y coordinate measured from the top; the second\n// index is the x coordinate measured from the left.\nint t_height = i_grid.length;\nint t_width = 0;\nif (i_grid[0] != null)\nt_width = i_grid[0].length;\n\nBitmap.Config t_conf = Bitmap.Config.ARGB_8888;\nBitmap t_bitmap = Bitmap.createBitmap(t_width, t_height, t_conf);\n\n// this is a slow method\n// TODO: change this to setPixels or to copyPixelsFrom...\nfor (int i = 0; i < t_height; i++) {\nfor (int j = 0; j < t_width; j++) {\nt_bitmap.setPixel(j, i,\nCalulateColorFromTrafficCell(i_grid[i][j], i_mode,i_drawVehicles));\n}\n}\nreturn t_bitmap;\n}",
"public void createNodesOfPixels() {\n makeGrayscale();\n WritableImage pixelPop = copyImage(holderImg);\n PixelReader pr = pixelPop.getPixelReader();\n for (int i = 0; i < h; i++) {\n for (int j = 0; j < w; j++) {\n Color color = pr.getColor(j, i);\n if (color.equals(Color.WHITE)) {\n pathNodes[(i * w) + j] = new GraphNodeAL(i);\n }\n }\n }\n\n for (int i = 0; i < pathNodes.length; i++) {\n if (pathNodes[i] != null) {\n if ((i - w) >= 0 && pathNodes[i - w] != null) { // pixel above\n pathNodes[i].connectToNodeDirected(pathNodes[i - w], 1);\n }\n if ((i + w) < pathNodes.length && pathNodes[i + w] != null) { // pixel below\n pathNodes[i].connectToNodeDirected(pathNodes[i + w], 1);\n }\n if ((i - 1) >= 0 && pathNodes[i - 1] != null && ((i - 1) % w) != 0) { // pixel left\n pathNodes[i].connectToNodeDirected(pathNodes[i - 1], 1);\n }\n if ((i + 1) < pathNodes.length && pathNodes[i + 1] != null && ((i + 1) % w) != 0) { // pixel right\n pathNodes[i].connectToNodeDirected(pathNodes[i + 1], 1);\n }\n }\n }\n }",
"public void initializeTiles(){\r\n tileBoard = new Tile[7][7];\r\n //Create the fixed tiles\r\n //Row 0\r\n tileBoard[0][0] = new Tile(false, true, true, false);\r\n tileBoard[2][0] = new Tile(false, true, true, true);\r\n tileBoard[4][0] = new Tile(false, true, true, true);\r\n tileBoard[6][0] = new Tile(false, false, true, true);\r\n //Row 2\r\n tileBoard[0][2] = new Tile(true, true, true, false);\r\n tileBoard[2][2] = new Tile(true, true, true, false);\r\n tileBoard[4][2] = new Tile(false, true, true, true);\r\n tileBoard[6][2] = new Tile(true, false, true, true);\r\n //Row 4\r\n tileBoard[0][4] = new Tile(true, true, true, false);\r\n tileBoard[2][4] = new Tile(true, true, false, true);\r\n tileBoard[4][4] = new Tile(true, false, true, true);\r\n tileBoard[6][4] = new Tile(true, false, true, true);\r\n //Row 6\r\n tileBoard[0][6] = new Tile(true, true, false, false);\r\n tileBoard[2][6] = new Tile(true, true, false, true);\r\n tileBoard[4][6] = new Tile(true, true, false, true);\r\n tileBoard[6][6] = new Tile(true, false, false, true);\r\n \r\n //Now create the unfixed tiles, plus the extra tile (15 corners, 6 t's, 13 lines)\r\n ArrayList<Tile> tileBag = new ArrayList<Tile>();\r\n Random r = new Random();\r\n for (int x = 0; x < 15; x++){\r\n tileBag.add(new Tile(true, true, false, false));\r\n }\r\n for (int x = 0; x < 6; x++){\r\n tileBag.add(new Tile(true, true, true, false));\r\n }\r\n for (int x = 0; x < 13; x++){\r\n tileBag.add(new Tile(true, false, true, false));\r\n }\r\n //Randomize Orientation\r\n for (int x = 0; x < tileBag.size(); x++){\r\n int rand = r.nextInt(4);\r\n for (int y = 0; y <= rand; y++){\r\n tileBag.get(x).rotateClockwise();\r\n }\r\n }\r\n \r\n for (int x = 0; x < 7; x++){\r\n for (int y = 0; y < 7; y++){\r\n if (tileBoard[x][y] == null){\r\n tileBoard[x][y] = tileBag.remove(r.nextInt(tileBag.size()));\r\n }\r\n }\r\n }\r\n extraTile = tileBag.remove(0);\r\n }",
"private void generateBoardLayout() {\n Collections.shuffle(availableDice);\n List<GameCube> row1 = Arrays.asList(availableDice.get(0), availableDice.get(1), availableDice.get(2), availableDice.get(3));\n List<GameCube> row2 = Arrays.asList(availableDice.get(4), availableDice.get(5), availableDice.get(6), availableDice.get(7));\n List<GameCube> row3 = Arrays.asList(availableDice.get(8), availableDice.get(9), availableDice.get(10), availableDice.get(11));\n List<GameCube> row4 = Arrays.asList(availableDice.get(12), availableDice.get(13), availableDice.get(14), availableDice.get(15));\n board = new ArrayList<>();\n board.add(0, row1);\n board.add(1, row2);\n board.add(2, row3);\n board.add(3, row4);\n }",
"public static void printCheckerboard(int width,int height)\r\n{\n\tfor (int row=0; row<width; row++)\r\n\t{\r\n\r\n\t // for each column in this row\r\n\t for (int col=0; col<height; col++)\r\n\t {\r\n\t\t if (row % 2 == 0)\r\n\t\t\t{\r\n\t\t\t \tif (col % 2 == 0)\r\n\t\t\t \t\t{\r\n\t\t\t \t\t\tSystem.out.print(\"#\");\r\n\t\t\t \t\t}\r\n\t\t\t \tif (col % 1 == 0)\r\n\t\t\t \t\t{\r\n\t\t\t \t\t\tSystem.out.print(\" \");\r\n\t\t\t \t\t}\r\n\t\t\t}\r\n\t\t if (row % 1 == 0)\r\n\t\t {\r\n\t\t\t\tif (col % 2 == 0)\r\n\t\t \t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t \t\t\t}\r\n\t\t\t\r\n\t\t \t\tif (col % 1 == 0)\r\n\t\t \t\t\t{\r\n\t\t \t\t\t\tSystem.out.print(\"#\");\r\n\t\t \t\t\t}\r\n\t\t }\r\n\t\t System.out.println(\"\");\r\n\t }\r\n\t System.out.println(\"\");\r\n\t}\r\n}",
"Board createLayout();",
"public void Makeboard() {\r\n\r\n Normalboard(new Point2(20, 300));\r\n Normalboard(new Point2(224, 391));\r\n Stingboard(new Point2(156, 209));\r\n Leftlboard(new Point2(88, 482));\r\n Rightboard(new Point2(292, 573));\r\n Regenerateboard(new Point2(360, 118));\r\n\r\n }",
"public void createBoard() {\n\t\tboard = new Piece[8][8];\n\t\t\n\t\tfor(int i=0; i<8; i++) {\n\t\t\tfor(int j=0; j<8; j++) {\n\t\t\t\tboard[i][j] = null;\n\t\t\t}\n\t\t}\n\t}",
"private Board create5by5Board() {\n Tile[][] tiles;\n Tile t1 = new Tile(0, 5);\n Tile t2 = new Tile(1, 5);\n Tile t3 = new Tile(2, 5);\n Tile t4 = new Tile(3, 5);\n Tile t5 = new Tile(4, 5);\n Tile t6 = new Tile(5, 5);\n Tile t7 = new Tile(6, 5);\n Tile t8 = new Tile(7, 5);\n Tile t9 = new Tile(8, 5);\n Tile t10 = new Tile(9, 5);\n Tile t11 = new Tile(10, 5);\n Tile t12 = new Tile(11, 5);\n Tile t13 = new Tile(12, 5);\n Tile t14 = new Tile(13, 5);\n Tile t15 = new Tile(14, 5);\n Tile t16 = new Tile(15, 5);\n Tile t17 = new Tile(16, 5);\n Tile t18 = new Tile(17, 5);\n Tile t19 = new Tile(18, 5);\n Tile t20 = new Tile(19, 5);\n Tile t21 = new Tile(20, 5);\n Tile t22 = new Tile(21, 5);\n Tile t23 = new Tile(22, 5);\n Tile t24 = new Tile(23, 5);\n Tile t25 = new Tile(24, 5);\n tiles = new Tile[5][5];\n tiles[0][0] = t7;\n tiles[0][1] = t6;\n tiles[0][2] = t2;\n tiles[0][3] = t5;\n tiles[0][4] = t9;\n tiles[1][0] = t3;\n tiles[1][1] = t1;\n tiles[1][2] = t8;\n tiles[1][3] = t4;\n tiles[1][4] = t11;\n tiles[2][0] = t17;\n tiles[2][1] = t18;\n tiles[2][2] = t10;\n tiles[2][3] = t25;\n tiles[2][4] = t20;\n tiles[3][0] = t23;\n tiles[3][1] = t21;\n tiles[3][2] = t12;\n tiles[3][3] = t15;\n tiles[3][4] = t13;\n tiles[4][0] = t22;\n tiles[4][1] = t24;\n tiles[4][2] = t14;\n tiles[4][3] = t16;\n tiles[4][4] = t19;\n return new Board(tiles);\n }",
"private void buildRow(int x, int y, int rowBricks) {\r\n\t\tfor (int i = 0; i < rowBricks; i++) {\r\n\t\t\tadd(makeBrick(x, y));\r\n\t\t\tx += BRICK_WIDTH;\r\n\t\t}\r\n\t}",
"public MinesweeperBoard(int rowsCount, int colsCount){\n this.rowsCount = rowsCount;\n this.colsCount = colsCount;\n this.cells = new Cell[rowsCount][colsCount];\n }",
"public WorldImage drawBoard() {\r\n return new OverlayOffsetAlign(\"center\", \"bottom\",\r\n new TextImage(\"Flood-It!\", Cnst.textHeight, Color.BLUE),\r\n 0, Cnst.boardHeight + Cnst.scale,\r\n new AboveAlignImage(\"center\",\r\n new TextImage(\"Turn Count: \" + Integer.toString(this.currTurn) + \"/\"\r\n + Integer.toString(this.maxTurn), Cnst.textHeight, Color.BLACK),\r\n this.indexHelp(0,0).drawBoard(this.blocks)).movePinhole(0, (Cnst.scale * 7) / 2)\r\n ).movePinhole(0, (Cnst.scale * 76) / 10)\r\n .movePinhole(-Cnst.boardWidth / 2, -Cnst.boardHeight / 2);\r\n }",
"void testDrawRow(Tester t) {\r\n initData();\r\n t.checkExpect(this.game2.indexHelp(0, 0).drawRow(2),\r\n new BesideImage(this.game2.indexHelp(0, 0).drawCell(2),\r\n this.game2.indexHelp(0, 0).right.drawRow(2)));\r\n\r\n t.checkExpect(this.game3.indexHelp(0, 0).drawRow(3),\r\n new BesideImage(this.game3.indexHelp(0, 0).drawCell(3),\r\n this.game3.indexHelp(0, 0).right.drawRow(3)));\r\n\r\n t.checkExpect(this.game5.indexHelp(0, 0).drawRow(4),\r\n new BesideImage(this.game5.indexHelp(0, 0).drawCell(4),\r\n this.game5.indexHelp(0, 0).right.drawRow(4)));\r\n t.checkExpect(this.game2.indexHelp(-1, -1).drawRow(3), new EmptyImage());\r\n }",
"private void setupSquares() {\n\t\tInsets buttonMargin = new Insets(0, 0, 0, 0);\n\t\tfor (int row = 0; row < chessBoardSquares.length; row++) {\n\t\t\tfor (int col = 0; col < chessBoardSquares[row].length; col++) {\n\t\t\t\tJButton button = new JButton();\n\t\t\t\tbutton.setMargin(buttonMargin);\n\t\t\t\t// our chess pieces are 64x64 px in size, so we'll\n\t\t\t\t// 'fill this in' using a transparent icon..\n\t\t\t\tImageIcon icon = new ImageIcon(new BufferedImage(64, 64, BufferedImage.TYPE_INT_ARGB));\n\t\t\t\tbutton.setIcon(icon);\n\n\t\t\t\tif ((col % 2 == 1 && row % 2 == 1)\n\t\t\t\t\t\t// ) {\n\t\t\t\t\t\t|| (col % 2 == 0 && row % 2 == 0)) {\n\t\t\t\t\tbutton.setBackground(Color.WHITE);\n\t\t\t\t} else {\n\t\t\t\t\tbutton.setBackground(Color.BLACK);\n\t\t\t\t}\n\t\t\t\tchessBoardSquares[col][row] = button;\n\t\t\t}\n\t\t}\n\t}",
"private void initializeBoard(){\r\n checks =new int[][]{{0,2,0,2,0,2,0,2},\r\n {2,0,2,0,2,0,2,0},\r\n {0,2,0,2,0,2,0,2},\r\n {0,0,0,0,0,0,0,0},\r\n {0,0,0,0,0,0,0,0},\r\n {1,0,1,0,1,0,1,0},\r\n {0,1,0,1,0,1,0,1},\r\n {1,0,1,0,1,0,1,0}};\r\n }",
"public void createPieces(){ \n\t\tfor(int x = 0; x<BOARD_LENGTH; x++){\n\t\t\tfor(int y = 0; y<BOARD_LENGTH; y++){ \n\t\t\t\tif(CHESS_MAP[x][y] != (null)){\n\t\t\t\t\tswitch (CHESS_MAP[x][y]){\n\t\t\t\t\tcase KING:\n\t\t\t\t\t\tpieces[pieceCounter] = new King(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase QUEEN:\n\t\t\t\t\t\tpieces[pieceCounter] = new Queen(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase BISHOP:\n\t\t\t\t\t\tpieces[pieceCounter] = new Bishop(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase KNIGHT:\n\t\t\t\t\t\tpieces[pieceCounter] = new Knight(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase PAWN:\n\t\t\t\t\t\tpieces[pieceCounter] = new Pawn(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase ROOK:\n\t\t\t\t\t\tpieces[pieceCounter] = new Rook(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} \n\t\t\t\t\tsetPieceIconAndName(x, y, CHESS_MAP[x][y]); \t\n\t\t\t\t\tpieceCounter++;\n\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t}",
"private GamePiece[][] initBoard(int rows, int cols, Random rand) {\n gameBoard = new GamePiece[rows][cols];\n curPlayerRow = 0;\n curPlayerCol = 0;\n for(int i = 0; i < rows; i++){\n for(int j = 0; j < cols; j++){\n gameBoard[i][j] = new EmptyPiece();\n }\n }\n gameBoard[0][0] = new PlayerPiece(INIT_PLAYER_POINTS);\n curTrollRow = getRandTrollRow(rand, rows);\n curTrollCol = getRandTrollCol(rand, cols);\n while(curTrollRow == 7 && curTrollCol == 9){\n curTrollRow = getRandTrollRow(rand, rows);\n curTrollCol = getRandTrollCol(rand, cols);\n }\n gameBoard[curTrollRow][curTrollCol] = new TrollPiece();\n gameBoard[7][9] = new TreasurePiece(TREASURE_POINTS);\n return gameBoard;\n }",
"private void createGrid() {\n String imageButtonID;\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n imageButtonID = \"painterImageButton_\" + i + j;\n\n //This step allows easy assignment of each imageButton with a nested loop\n int resID = this.getResources().getIdentifier(imageButtonID, \"id\", this.getPackageName());\n grid[i][j] = findViewById(resID);\n grid[i][j].setOnClickListener(this); //Response to each button click\n\n //Generate a random number to decide whether to put white or black here\n double x = Math.random() * 2;\n if (x < 1) {\n grid[i][j].setImageResource(R.drawable.black_circle);\n grid[i][j].setContentDescription(getString(R.string.alien_painter_black));\n } else if (x < 2) {\n grid[i][j].setImageResource(R.drawable.white_circle);\n grid[i][j].setContentDescription(getString(R.string.alien_painter_white));\n }\n\n }\n }\n\n //Make sure the grid isn't entirely black at the beginning\n grid[1][1].setImageResource(R.drawable.white_circle);\n grid[1][1].setContentDescription(\"white\");\n }",
"void loadCheckerBoard(int tileSize);",
"public Piece[][] createStandardChessboard(Player whitePlayer, Player blackPlayer) {\t\t\r\n\t\tPiece[][] start_board = {\r\n\t\t\t\t{new Rook(0,0,blackPlayer), new Knight(1,0,blackPlayer), new Bishop(2,0,blackPlayer), new Queen(3,0,blackPlayer),new King(4,0,blackPlayer), new Bishop(5,0,blackPlayer), new Knight(6,0,blackPlayer), new Rook(7,0,blackPlayer)},\r\n\t\t\t\t{new Pawn(0,1,blackPlayer), new Pawn(1,1,blackPlayer), new Pawn(2,1,blackPlayer), new Pawn(3,1,blackPlayer),new Pawn(4,1,blackPlayer), new Pawn(5,1,blackPlayer), new Pawn(6,1,blackPlayer), new Pawn(7,1,blackPlayer)},\r\n\t\t\t\t{null, null, null, null,null, null, null, null},\r\n\t\t\t\t{null, null, null, null,null, null, null, null},\r\n\t\t\t\t{null, null, null, null,null, null, null, null},\r\n\t\t\t\t{null, null, null, null,null, null, null, null},\r\n\t\t\t\t{new Pawn(0,6,whitePlayer), new Pawn(1,6,whitePlayer), new Pawn(2,6,whitePlayer), new Pawn(3,6,whitePlayer),new Pawn(4,6,whitePlayer), new Pawn(5,6,whitePlayer), new Pawn(6,6,whitePlayer), new Pawn(7,6,whitePlayer)},\r\n\t\t\t\t{new Rook(0,7,whitePlayer), new Knight(1,7,whitePlayer), new Bishop(2,7,whitePlayer), new Queen(3,7,whitePlayer),new King(4,7,whitePlayer), new Bishop(5,7,whitePlayer), new Knight(6,7,whitePlayer), new Rook(7,7,whitePlayer)}\r\n\t\t};\r\n\t\treturn start_board;\r\n\t}",
"static void pixels() {\n flag = 0;\n // On start-up this will ask for the dimensions of the board until you enter a valid number.\n // If there already is a dimension set, the dialogue will close properly even with invalid input.\n while( true ) {\n try {\n String input = JOptionPane.showInputDialog(content, \"Enter n. 1 < n < 101\");\n tileNum = Integer.parseInt(input);\n \n if( tileNum > 100 || tileNum < 2 ) continue;\n break;\n } catch ( Exception e ) {\n if( tiles.size() != 0 ) return;\n }\n }\n start = 0;\n \n // Wipes and prepares the content pane for new tiles.\n tiles.clear();\n if( content == null ) {\n content = new JPanel();\n content.setBackground(Color.gray);\n content.setSize(self.getContentPane().getSize().width, self.getContentPane().getSize().height * 6 / 7);\n content.setLocation(0, 0);\n content.setLayout(new GridLayout(tileNum, tileNum, 0, 0));\n \n self.add(content);\n }\n content.removeAll();\n content.repaint();\n \n // Fills the content pane with tileNum * tileNum tiles.\n for( int i = 0; i < tileNum * tileNum; i++ ) {\n Tile temp = new Tile(white);\n if( i == 0 ) temp.setBackground(red);\n tiles.add(temp);\n content.add(temp);\n }\n content.revalidate();\n }",
"public void makeBoard2d() {\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n this.board2d[i][j] = this.board[(i * 3) + j];\n }\n }\n }",
"@Override\r\n public int[] grabPixels(Object canvas, int width, int height, \r\n int[] pixels, int startRow, int nRows) {\r\n\t {}\r\n int[] buf = Image.grabPixels(Image.getGraphics(canvas), width, height); \r\n /**\r\n * @j2sNative\r\n * \r\n * canvas.buf32 = buf;\r\n * \r\n */\r\n {}\r\n return buf;\r\n\t}",
"private void putTilesOnBoard() {\n boolean isWhite = true;\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n Tile t = new Tile(isWhite, new Position(x, y));\n t.setOnMouseClicked(e -> {\n if (t.piece != null && this.activeTile == null && this.whitePlayer == t.piece.isWhite()) {\n this.activeTile = t;\n ArrayList<Position> moves = t.piece.getLegalMoves();\n this.highlightAvailableMoves(moves, t.isWhite);\n } else if (t.isHighlighted.getValue() && this.activeTile.piece != null ) {\n movePieces(t);\n } else {\n this.activeTile = null;\n this.clearHighlightedTiles();\n }\n this.updatePieceBoards();\n });\n t.isHighlighted.addListener((o, b, b1) -> {\n if (o.getValue() == true) {\n t.startHighlight();\n } else {\n t.clearHighlight();\n }\n });\n this.board[x][y] = t;\n this.add(this.board[x][y], x, y);\n isWhite = !isWhite;\n }\n isWhite = !isWhite;\n }\n\n }",
"@Override\n public void buildGrid(){\n for(int column=0; column<columns; column++){\n for(int row=0; row<rows; row++){\n grid[column][row] = \"[ ]\";\n }\n }\n }",
"private TextureUniform makeCheckerboardTexture(int textureSize) {\n Uint8Array checkerboard = Uint8ArrayNative.create(4 * textureSize * textureSize);\n\n int maxDiagonal = 2 * (textureSize - 1);\n for (int i = 0; i < textureSize; i++) {\n for (int j = 0; j < textureSize; j++) {\n int index = i * textureSize + j;\n // Checking the parity of the diagonal number gives a checkerboard\n // pattern.\n int diagonal = i + j;\n if (diagonal % 2 == 0) {\n // set the square red. We only need to set the red channel!\n checkerboard.set(4 * index, 255);\n }\n // otherwise we'd set the square to black. But arrays are already\n // initialized to 0s so nothing needed here.\n\n // for the alpha channel, map the diagonal number to [0, 255]\n checkerboard.set(4 * index + 3, (255 * diagonal) / maxDiagonal);\n }\n }\n return new TextureUniform(new TextureUniformOptions()\n .setTypedArray(checkerboard)\n .setWidth(textureSize)\n .setHeight(textureSize)\n .setMinificationFilter(TextureMinificationFilter.NEAREST())\n .setMagnificationFilter(TextureMagnificationFilter.NEAREST()));\n }",
"public ChessRunner(){\n\t\taddMouseListener(this);\n\t\tfor(int i=0;i<8;i++){\n\t\t\tfor (int j=1;j<7;j++)\n\t\t\t\tif(j==1)\n\t\t\t\t\tboard[i][j] = new BlackPawn();\n\t\t\t\telse if(j==6)\n\t\t\t\t\tboard[i][j] = new WhitePawn();\n\t\t\t\telse\n\t\t\t\t\tboard[i][j]= new BlankPiece();\n\t\t}\n\t\tboard[1][0] = new BlackKnight();\n\t\tboard[6][0] = new BlackKnight();\n\t\tboard[0][0] = new BlackRook();\n\t\tboard[7][0] = new BlackRook();\n\t\tboard[2][0] = new BlackBishop();\n\t\tboard[5][0] = new BlackBishop();\n\t\tboard[4][0] = new BlackKing();\n\t\tboard[3][0] = new BlackQueen();\n\t\t\n\t\tboard[1][7] = new WhiteKnight();\n\t\tboard[6][7] = new WhiteKnight();\n\t\tboard[0][7] = new WhiteRook();\n\t\tboard[7][7] = new WhiteRook();\n\t\tboard[2][7] = new WhiteBishop();\n\t\tboard[5][7] = new WhiteBishop();\n\t\tboard[4][7] = new WhiteKing();\n\t\tboard[3][7] = new WhiteQueen();\n\t\t\n\t}",
"private void generateBorder() {\n\t\tfor (int y = 0; y < height; y++) {\n\t\t\tfor (int x = 0; x < width; x++) {\n\t\t\t\tif (x == 0 || y == 0 || x == width - 1 || y == height - 1) {\n\t\t\t\t\ttiles[x + y * width] = Tile.darkGrass;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void initGameBoard(int rows, int cols)\n {\n //GameBoard = new Cell[ROWS][COLS];\n\n for(int i = 0; i < rows; i++)\n {\n for(int j = 0; j < cols; j++)\n {\n GameBoard[i][j] = new Cell(i,j, Color.BLUE,false);\n }\n\n }\n }",
"@Override\n protected void onDraw(Canvas canvas) {\n super.onDraw(canvas);\n\n int width = getWidth();\n int height = getHeight();\n float pieceWidth = width/5.0f-5;\n float pieceHeight = height/3.0f-20;\n Log.d(\"hello\", \"DRAWINGGGGGGG\");\n\n //this.paint.setColor(Color.WHITE);\n this.paint.setStyle(Paint.Style.FILL);\n //canvas.drawPaint(this.paint);\n canvas.drawColor(0x00000000);\n\n this.paint.setColor(Color.WHITE);\n //canvas.drawRect(0, 0, 100, 100, this.paint);\n\n\n for(int i = 0; i < 5; i++)\n for(int j = 0; j<3; j++){\n Cell cell = grid.getCellAt(i, j);\n if(cell!=null){\n //Before you can call any drawing methods, though, it's necessary to create a Paint object.\n\n this.paint.setColor(cell.getColor());\n canvas.drawRect(i*pieceWidth, j*pieceHeight, i*pieceWidth + pieceWidth, j*pieceHeight + pieceHeight, this.paint);\n\n this.paint.setColor(Color.WHITE);\n this.paint.setStrokeWidth(4);\n //Lines on window\n canvas.drawLine(i*pieceWidth, j*pieceHeight, i*pieceWidth, j*pieceHeight + pieceHeight, this.paint);\n canvas.drawLine(i*pieceWidth, j*pieceHeight, i*pieceWidth + pieceWidth, j*pieceHeight, this.paint);\n canvas.drawLine(i*pieceWidth + pieceWidth, j*pieceHeight, i*pieceWidth + pieceWidth, j*pieceHeight + pieceHeight, this.paint);\n canvas.drawLine(i*pieceWidth, j*pieceHeight + pieceHeight, i*pieceWidth + pieceWidth, j*pieceHeight + pieceHeight, this.paint);\n\n }\n }\n\n\n\n }",
"public WorldImage drawCell(int blocks) {\r\n return new FrameImage(new RectangleImage(Cnst.boardWidth / blocks,\r\n Cnst.boardHeight / blocks,\r\n OutlineMode.SOLID, this.color));\r\n }",
"public static void createBoard() \n\t{\n\t\tfor (int i = 0; i < tictactoeBoard.length; i++) \n\t\t{\n\t\t\ttictactoeBoard[i] = '-';\n\t\t}\n\t}",
"public WorldImage drawRow(int blocks) {\r\n return new BesideImage(this.drawCell(blocks), this.right.drawRow(blocks));\r\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 WorldImage drawBoard(int blocks) {\r\n return new AboveImage(this.drawRow(blocks), this.bottom.drawBoard(blocks));\r\n }",
"public Board(int rows, int columns) throws Exception {\n\t\tif (rows >= 8 && columns >= 8) {\n\t\t\tthis.rows = rows;\n\t\t\tthis.columns = columns;\n\t\t\tboard = new int[rows][columns];\n\t\t\tthis.bombs = (rows * columns) / 3;\n\t\t\tfillBoard();\n\t\t} else {\n\t\t\tthrow new Exception(\"Minesweeper dimensions invalid:\\nWidth: from 8 to 100\\nHeight: from 8 to 100\\nBombs: 1 to 1/3 of squares\");\n\t\t}\n\t}",
"private void createPieces() {\n\t\t// Create and fill up the array, iterating by piece row and piece column.\n\t\tpieces = new ArrayList<CvMat>();\n\t\tfor (int pi = 0; pi < prows; pi++) {\n\t\t\tfor (int pj = 0; pj < pcols; pj++) {\n\t\t\t\tCvMat piece = CvMat.create(pieceHeight, pieceWidth, image.type());\n\t\t\t\tpieces.add(piece);\n\t\t\t\t// Copy pixels from image to piece (as usual, do it by hand rather than OpenCV).\n\t\t\t\tfor (int i = 0; i < pieceHeight; i++) {\n\t\t\t\t\tfor (int j = 0; j < pieceWidth; j++) {\n\t\t\t\t\t\tfor (int c = 0; c < 3; c++) {\n\t\t\t\t\t\t\tpiece.put(i, j, c, image.get(i + pi * pieceHeight, j + pj * pieceWidth, c));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public String[] draw() {\n Piece[][] pieces = solver.getSolution();\n int height = pieces.length;\n int width = pieces[0].length;\n char[][] board = new char[height * 4][width * 4 + 1];\n int totalPieces = pieces.length * pieces[0].length;\n int countPieces = 0;\n // run through each piece and add it to the temp board\n for (int i = 0; i < height; i++) {\n for (int j = 0; j < width; j++) {\n countPieces++;\n Piece curPiece = pieces[i][j];\n int tempHeight = i * 4 + 1;\n int tempWidth = j * 4 + 2;\n if (curPiece == null) {\n board[tempHeight][tempWidth] = EMPTY;\n board[tempHeight][tempWidth + 1] = EMPTY;\n board[tempHeight][tempWidth + 2] = EMPTY;\n board[tempHeight + 1][tempWidth] = EMPTY;\n board[tempHeight + 1][tempWidth + 1] = EMPTY;\n board[tempHeight + 1][tempWidth + 2] = EMPTY;\n board[tempHeight + 2][tempWidth] = EMPTY;\n board[tempHeight + 2][tempWidth + 1] = EMPTY;\n board[tempHeight + 2][tempWidth + 2] = EMPTY;\n Arrays.fill(board[tempHeight + 3], EMPTY);\n } else {\n char[][] displayPiece = pieceToDisplay(curPiece);\n\n board[tempHeight][tempWidth] = displayPiece[0][0];\n board[tempHeight][tempWidth + 1] = displayPiece[0][1];\n board[tempHeight][tempWidth + 2] = displayPiece[0][2];\n board[tempHeight + 1][tempWidth] = displayPiece[1][0];\n board[tempHeight + 1][tempWidth + 1] = displayPiece[1][1];\n board[tempHeight + 1][tempWidth + 2] = displayPiece[1][2];\n board[tempHeight + 2][tempWidth] = displayPiece[2][0];\n board[tempHeight + 2][tempWidth + 1] = displayPiece[2][1];\n board[tempHeight + 2][tempWidth + 2] = displayPiece[2][2];\n Arrays.fill(board[tempHeight + 3], EMPTY);\n }\n }\n }\n\n // convert the completed char[][] to the final string[]\n return finalBoard(board, totalPieces, totalPieces - countPieces);\n }",
"public Grid generateGrid(){\n myGrid = new RectGrid();\n myStates = new HashMap<>();\n\n for(int row = 0; row < imageHeight; row++){\n for(int column = 0; column < imageWidth; column++){\n int color = myImage.getRGB(column, row);\n int blue = color & 0xff;\n int green = (color & 0xff00) >> 8;\n int red = (color & 0xff0000) >> 16;\n\n int stateValue = color*-1;\n System.out.println(stateValue);\n //int stateValue = Integer.parseInt(hex, 16);\n //System.out.println(stateValue);\n\n Cell myCell = new RPSCell();\n myCell.setState(stateValue);\n myGrid.placeCell(row, column, myCell);\n\n Color myColor = Color.rgb(red, green, blue);\n myStates.put(stateValue, myColor);\n }\n }\n return myGrid;\n }",
"public void paint(Graphics g){\r\n super.paintComponent(g);\r\n for(int row = 0; row < 8; row++) {\r\n for (int col = 0; col < 8; col++) {\r\n if((row % 2 == 0 && col % 2 == 0) || (row % 2 != 0 && col % 2 != 0)){\r\n g.setColor(Color.gray.brighter()); //pale yellow\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n }\r\n else{\r\n g.setColor(Color.gray.darker()); //dark brown\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n if ((currentPlayer.getColor()==checks[row][col])) {\r\n g.setColor(Color.darkGray.darker());\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n }\r\n if (this.nextMove[row][col] == 1) {\r\n g.setColor(Color.getHSBColor(98,70,43));\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n }\r\n if (this.checks[row][col] != 0) {\r\n if (this.checks[row][col] == WHITE) {\r\n drawPiece(row, col, g, Color.yellow.brighter());\r\n if (row == 7)\r\n g.drawImage(crownImage, (col * tileSize)+6, (row * tileSize) + 6, tileSize - 12, tileSize - 12, null);\r\n }\r\n else{\r\n drawPiece(row, col, g, Color.black);\r\n if (row == 0)\r\n g.drawImage(crownImage, (col * tileSize)+6, (row * tileSize) + 6, tileSize - 12, tileSize - 12, null);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if(isOver && isGame){\r\n gameOverDisplay(g);\r\n }\r\n }",
"private Component getSplitBoard() {\n\t\t\n\t\t int rows = 4; //You should decide the values for rows and cols variables\n\t int cols = 4;\n\t int chunks = rows * cols;\n\n\t int chunkWidth = image.getWidth() / cols; // determines the chunk width and height\n\t int chunkHeight = image.getHeight() / rows;\n\t int count = 0;\n\t BufferedImage imgs[] = new BufferedImage[chunks]; //Image array to hold image chunks\n\t \n\t for (int x = 0; x < rows; x++) {\n\t for (int y = 0; y < cols; y++) {\n\t //Initialize the image array with image chunks\n\t imgs[count] = new BufferedImage(chunkWidth, chunkHeight, image.getType());\n\n\t // draws the image chunk\n\t Graphics2D gr = imgs[count++].createGraphics();\n\t gr.drawImage(image, 0, 0, chunkWidth, chunkHeight, chunkWidth * y, chunkHeight * x, chunkWidth * y + chunkWidth, chunkHeight * x + chunkHeight, null);\n\t gr.dispose();\n\t }\n\t }\n\t \n\t \n\t JPanel imageBoard = new JPanel(new GridLayout(5, 4));\n\t\t\t//imageBoard.setBorder(BorderFactory.createEmptyBorder(2,2,2,2));\n\t imageBoard.setBorder ( new TitledBorder ( new EtchedBorder (), \"Image Completion puzzle\" ) );\n\t //writing mini images into image files\n\t \n\t //int[] random_index = {3, 15, 0, 2, 5, 1, 4, 8, 6, 9, 7, 11, 14, 12, 13, 10 };\n\t statusLabel.setText(\"Status: preparing random image board...\");\n\t int[] random_index = generateRandomNumbers(imgs.length);\n\t \n\t //labels = new JLabel[imgs.length];\n\t \n\t for (int i = 0; i < imgs.length; i++) {\n\t \t//final ImageIcon icn = new ImageIcon(imgs[ random_index[i] ]);\n\t \tlabels[i] = new JLabel(new ImageIcon(imgs[ random_index[i] ]));\n\t \tlabels[i].setBorder(BorderFactory.createLineBorder(Color.WHITE));\n\t \timageBoard.add(labels[i]);\n\t \tfinal int pos = i;\n\t \tlabels[i].addMouseListener(new MouseAdapter() {\n\t @Override\n\t public void mouseClicked(MouseEvent e) {\n\t \tif(canMove(pos)){\n\t \t\tIcon temp = labels[pos].getIcon();\n\t \t\tlabels[pos].setIcon(labels[blank].getIcon());\n\t \t\tlabels[blank].setIcon(temp);\n\t \t\tblank = pos;\n\t \t\tstatusLabel.setText(\"moved!\");\n\t \t}else{\n\t \t\tstatusLabel.setText(\"Cannot move!\");\n\t \t}\n\t }\n\t });\n\t //ImageIO.write(imgs[i], \"jpg\", new File(\"img\" + i + \".jpg\"));\n\t }\n\t \n\t labels[16] = new JLabel(new ImageIcon(\"blank.png\"));\n\t \n\t labels[16].addMouseListener(new MouseAdapter() {\n @Override\n public void mouseClicked(MouseEvent e) {\n \tif(canMove(16)){\n \t\tIcon temp = labels[16].getIcon();\n \t\tlabels[16].setIcon(labels[blank].getIcon());\n \t\tlabels[blank].setIcon(temp);\n \t\tblank = 16;\n \t\tstatusLabel.setText(\"moved!\");\n \t}else{\n \t\tstatusLabel.setText(\"Cannot move!\");\n \t}\n }\n });\n\t \n\t imageBoard.add( labels[16] );\n\t \n\t\treturn imageBoard;\n\t}",
"public abstract void createBoard();",
"void generateNewBoard() {\n createAvailableDice();\n\n // Add them to board\n generateBoardLayout();\n }",
"public void renderBoard(){\n for (int k = 0; k < grid.length; k++)\n for (int m = 0; m < grid[k].length; m++)\n grid[k][m] = 0;\n\n // fill the 2D array using information for non-empty tiles\n for (Cell c : game.getNonEmptyTiles())\n grid[c.getRow()][c.getCol()] = c.getValue();\n }",
"public abstract void makeSafeZone(int rows);",
"private void createTile(){\n for(int i = 0; i < COPY_TILE; i++){\n for(int k = 0; k < DIFF_TILES -2; k++){\n allTiles.add(new Tile(k));\n }\n }\n }",
"public Board(int rows, int cols) {\n\t\t_board = new ArrayList<ArrayList<String>>();\n\t\t_rand = new Random();\n\t\t_colorFileNames = new ArrayList<String>();\n\t\tfor (int i=0; i<MAX_COLORS; i=i+1) {\n\t\t\t_colorFileNames.add(\"Images/Tile-\"+i+\".png\");\n\t\t}\n\t\tfor (int r=0; r<rows; r=r+1) {\n\t\t\tArrayList<String> row = new ArrayList<String>();\n\t\t\tfor (int c=0; c<cols; c=c+1) {\n\t\t\t\trow.add(_colorFileNames.get(_rand.nextInt(_colorFileNames.size())));\n\t\t\t}\n\t\t\t_board.add(row);\n\t\t\t\n\t\t\tif(_board.size()==rows) { //board is complete\n\t\t\t\tboolean istrue = false;\n\t\t\t\tif(match(3).size()>0 || end()){ //(1)there are match //(2)there is no valid move\n\t\t\t\t\tistrue = true;\n\t\t\t\t}\n\t\t\t\tif (istrue) {\n\t\t\t\t\t_board.clear();\t\t// if istrue clear the board\n\t\t\t\t\tr=-1;\t\t\t\t// restart; r=-1, at the end of loop will add 1\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\t\t\n\t}",
"void checkerboard(int checkerSquareArea);",
"void drawGridLayout() {\n\t\tpiecesGrid = (GridLayout) findViewById(R.id.layout_container); //get a reference to the GridLayout\n\t\tpiecesGrid.setColumnCount(NUM[COLS]); //set number of columns\n\t\tpiecesGrid.setRowCount(NUM[ROWS]); //set number of rows\n\t\tfor (int i=0; i<NUM[TOTAL]; i++) {\n\t\t\tpiecesGrid.addView(pieceViews.get(i), i); //add the ImageViews\n\t\t}\n\t}",
"private void drawBoard(Canvas cnv) {\n\t\tfor (int row = 0; row < 3; row++) {\n\t\t\tfor (int column = 0; column < 3; column++) {\n\t\t\t\tif (board.getPosition(row, column)==Marker.O) {\n\t\t\t\t\tdrawMarkerO(cnv, row, column);\n\t\t\t\t}\n\t\t\t\telse if (board.getPosition(row, column)==Marker.X) {\n\t\t\t\t\tdrawMarkerX(cnv, row, column);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void initializeGameboard() {\r\n\t\t\r\n\t\t for (int row=0 ; row<gameBoard.length; row++)\r\n\t\t { \r\n\t\t \t \r\n\t\t \t for(int column=0;column<gameBoard[row].length;column++ )\t \r\n\t\t \t { \r\n\t\t \t\t if( row==0|| row ==1)\r\n\t\t \t\t { \r\n\t\t \t\t\t if (column==0) {gameBoard[row][column]=\"2\";}\r\n\t\t \t\t\t else if (column==1) {gameBoard[row][column]=\"3\";}\t \r\n\t\t \t\t\t else if (column==2) {gameBoard[row][column]=\"4\";} \r\n\t\t \t\t\t else if (column==3) {gameBoard[row][column]=\"5\";} \r\n\t\t \t\t\t else if (column==4) {gameBoard[row][column]=\"6\";} \r\n\t\t \t\t\t else if (column==5) {gameBoard[row][column]=\"7\";}\r\n\t\t \t\t\t else if (column==6) {gameBoard[row][column]=\"8\";} \r\n\t\t \t\t\t else if (column==7) {gameBoard[row][column]=\"9\";}\r\n\t\t \t\t\t else if (column==8) {gameBoard[row][column]=\"10\";} \r\n\t\t \t\t\t else if (column==9) {gameBoard[row][column]=\"11\";} \r\n\t\t \t\t\t else if (column==10) {gameBoard[row][column]=\"12\";} \r\n\t\t \t\t }\r\n\t\t \t\t \r\n\t\t\t \t else if(row ==2 || row==3) \r\n\t\t\t \t {\r\n\t\t\t \t\t if (column==0) {gameBoard[row][column]=\"12\";}\r\n\t\t \t\t\t else if (column==1) {gameBoard[row][column]=\"11\";}\t \r\n\t\t \t\t\t else if (column==2) {gameBoard[row][column]=\"10\";} \r\n\t\t \t\t\t else if (column==3) {gameBoard[row][column]=\"9\";} \r\n\t\t \t\t\t else if (column==4) {gameBoard[row][column]=\"8\";} \r\n\t\t \t\t\t else if (column==5) {gameBoard[row][column]=\"7\";}\r\n\t\t \t\t\t else if (column==6) {gameBoard[row][column]=\"6\";} \r\n\t\t \t\t\t else if (column==7) {gameBoard[row][column]=\"5\";}\r\n\t\t \t\t\t else if (column==8) {gameBoard[row][column]=\"4\";} \r\n\t\t \t\t\t else if (column==9) {gameBoard[row][column]=\"3\";} \r\n\t\t \t\t\t else if (column==10) {gameBoard[row][column]=\"2\";} \r\n\t\t\t \t }\r\n\t\t }\r\n\t\t }\r\n\t }",
"public static void main(String[] args) {\n boolean[][] board = new boolean[8][8];\n for(int i = 0; i < 8; i++) {\n for(int j = 0; j < 8; j++) {\n board [i][j] = false;\n }\n }\n int row = 3; //can be between -1 and 6 depending where you want first square (row - 2)\n int count = 1;\n int column = 1;\n int addedTrue = 0;\n \n while (count < 9) {\n for(int i = row + 1; i < 8; i++) { \n if(horizontal(board, i) && diagonal(board, column - 1, i)) {\n board[column - 1][i] = true;\n addedTrue++;\n break;\n } \n }\n if(addedTrue == 0) {\n column--;\n count--;\n for(int z = 0; z < 8; z++) {\n if(board[column - 1][z]) {\n row = z;\n board[column - 1][z] = false;\n }\n }\n }\n if(addedTrue == 1) {\n column++;\n count++;\n addedTrue = 0;\n row = -1;\n } \n /*printBoard(board);\n System.out.println(\"\\n\\n\");*/\n }\n printBoard(board);\n }",
"public Board createBoard(Square[][] grid) {Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\");assert grid != null; Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1053\"); Board board = new Board(grid); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1079\"); int width = board.getWidth(); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1115\"); int height = board.getHeight(); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1148\"); for (int x = 0; x < width; x++) {\n\t\t\tfor (int y = 0; y < height; y++) {\n\t\t\t\tSquare square = grid[x][y];\n\t\t\t\tfor (Direction dir : Direction.values()) {\n\t\t\t\t\tint dirX = (width + x + dir.getDeltaX()) % width;\n\t\t\t\t\tint dirY = (height + y + dir.getDeltaY()) % height;\n\t\t\t\t\tSquare neighbour = grid[dirX][dirY];\n\t\t\t\t\tsquare.link(neighbour, dir);\n\t\t\t\t}\n\t\t\t}\n\t\t} Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1183\"); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1552\");return board ; }",
"private void createSquare(int x, int y, int row, int column) {\r\n grid[row][column] = new JLabel();\r\n grid[row][column].setOpaque(true);\r\n grid[row][column].setBackground(SQUARE_COLOR);\r\n grid[row][column].setBorder(SQUARE_BORDER);\r\n this.getContentPane().add(grid[row][column]);\r\n grid[row][column].setBounds(x,y,SQUARE_SIZE,SQUARE_SIZE);\r\n }",
"private void drawBackgroundGrid(Canvas canvas) {\n Resources resources = getResources();\n Drawable backgroundCell = resources.getDrawable(R.drawable.cell_rectangle);\n // Outputting the game grid\n for (int xx = 0; xx < game.numSquaresX; xx++) {\n for (int yy = 0; yy < game.numSquaresY; yy++) {\n int sX = startingX + gridWidth + (cellSize + gridWidth) * xx;\n int eX = sX + cellSize;\n int sY = startingY + gridWidth + (cellSize + gridWidth) * yy;\n int eY = sY + cellSize;\n\n drawDrawable(canvas, backgroundCell, sX, sY, eX, eY);\n }\n }\n }",
"private void createRow1() throws IOException {\r\n\t\tint x = 0;\r\n\t\tfor (int i = 0; i < 16; i++) {\r\n\t\t\tarray[i] = createButton(x, 0);\r\n\t\t\tx += 40;\r\n\t\t}\r\n\t\tImage redslidestart = ImageIO.read(getClass().getResource(\"/images\\\\slides\\\\redSlideStart.png\"))\r\n\t\t\t\t.getScaledInstance(38, 38, 4);\r\n\t\tarray[1].setIcon(new ImageIcon(redslidestart));\r\n\t\tImage redslide = ImageIO.read(getClass().getResource(\"/images\\\\slides\\\\redSlideMedium.png\"))\r\n\t\t\t\t.getScaledInstance(38, 38, 4);\r\n\t\tarray[2].setIcon(new ImageIcon(redslide));\r\n\t\tarray[3].setIcon(new ImageIcon(redslide));\r\n\t\tImage redslideend = ImageIO.read(getClass().getResource(\"/images\\\\slides\\\\redSlideEnd.png\"))\r\n\t\t\t\t.getScaledInstance(38, 38, 4);\r\n\t\tarray[4].setIcon(new ImageIcon(redslideend));\r\n\t\tarray[9].setIcon(new ImageIcon(redslidestart));\r\n\t\tarray[10].setIcon(new ImageIcon(redslide));\r\n\t\tarray[11].setIcon(new ImageIcon(redslide));\r\n\t\tarray[12].setIcon(new ImageIcon(redslide));\r\n\t\tarray[13].setIcon(new ImageIcon(redslideend));\r\n\t}",
"public static void makeBoardChess() {\r\n \r\n white = new AllPiece(\"White\");\r\n black = new AllPiece(\"Black\");\r\n \r\n }",
"public void constructArray(){\n\t\tfor (int col = 0; col < cols; col++){\n\t\t\tfor (int row = 0; row < rows; row++){\n\t\t\t\tmap[col][row] = new Pixel();\n\t\t\t}\n\t\t}\n\t}",
"public void initBasicBoardTiles() {\n\t\ttry {\n\t\t\tfor(int i = 1 ; i <= BOARD_SIZE ; i+=2) {\n\t\t\t\tfor(char c = getColumnLowerBound() ; c <= getColumnUpperBound() ; c+=2) {\n\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, c), PrimaryColor.BLACK).build());\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, (char) ( c + 1)), PrimaryColor.WHITE).build());\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 2 ; i <= BOARD_SIZE ; i+=2) {\n\t\t\t\tfor(char c = getColumnLowerBound() ; c <= getColumnUpperBound() ; c+=2) {\n\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, c), PrimaryColor.WHITE).build());\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, (char) ( c + 1)), PrimaryColor.BLACK).build());\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(LocationException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void displayBoard() {\r\n\r\n for (int r = 0; r < 8; r++) {\r\n for (int c = 0; c < 8; c++) {\r\n if (model.pieceAt(r, c) == null)\r\n board[r][c].setIcon(null);\r\n else if (model.pieceAt(r, c).player() == Player.WHITE) {\r\n if (model.pieceAt(r, c).type().equals(\"Pawn\"))\r\n board[r][c].setIcon(wPawn);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Rook\"))\r\n board[r][c].setIcon(wRook);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Knight\"))\r\n board[r][c].setIcon(wKnight);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Bishop\"))\r\n board[r][c].setIcon(wBishop);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Queen\"))\r\n board[r][c].setIcon(wQueen);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"King\"))\r\n board[r][c].setIcon(wKing);\r\n } else if (model.pieceAt(r, c).player() == Player.BLACK) {\r\n if (model.pieceAt(r, c).type().equals(\"Pawn\"))\r\n board[r][c].setIcon(bPawn);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Rook\"))\r\n board[r][c].setIcon(bRook);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Knight\"))\r\n board[r][c].setIcon(bKnight);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Bishop\"))\r\n board[r][c].setIcon(bBishop);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Queen\"))\r\n board[r][c].setIcon(bQueen);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"King\"))\r\n board[r][c].setIcon(bKing);\r\n }\r\n repaint();\r\n }\r\n }\r\n if (model.inCheck(Player.WHITE))\r\n JOptionPane.showMessageDialog(null, \"White King in Check\");\r\n if (model.inCheck(Player.BLACK))\r\n JOptionPane.showMessageDialog(null, \"Black King in Check\");\r\n if (model.movingIntoCheck())\r\n JOptionPane.showMessageDialog(null, \"Cannot move into check\");\r\n if (model.isComplete())\r\n JOptionPane.showMessageDialog(null, \"Checkmate\");\r\n }",
"private int rowToX(int r) { \n\t\treturn r * getHeight() / BOARD_LENGTH - (BOARD_PIECE_LENGTH); // why - 50 ?\n\t}",
"public void draw_grid() {\n for (int i = 0; i <= xNumTiles; i++) {\n stroke(100);\n line(i * tileSize, 0, i * tileSize, yNumTiles * tileSize);\n }\n\n for (int j = 0; j <= yNumTiles; j++) {\n stroke(100);\n line(0, j * tileSize, xNumTiles * tileSize, j * tileSize);\n }\n }",
"private List<Tile> makeTiles() {\n List<Tile> tiles = new ArrayList<>();\n Board board = (Board) boardManager.getBoard();\n final int numTiles = board.getNumRows() * board.getNumCols();\n for (int tileNum = 0; tileNum != numTiles; tileNum++) {\n tiles.add(new Tile(tileNum + 1, tileNum, 4));\n }\n\n return tiles;\n }",
"TetrisBoard() {\n\t\t// create new board \n\t\tblockMatrix = new boolean[NUM_ROWS][NUM_COLS];\n\t\t\n\t\t// fill in values for board\n\t\tinitBoard();\n\t\t\n\t\t// add new piece to fall\n\t\taddNewPiece();\n\t\t\n\t\t// start scores at 0\n\t\tnumLines = 0;\n\t\tnumTetrises = 0;\n\t}",
"private void displayBoard()\n {\n GreenfootImage toDisplay;\n \n for( int r = 0; r < board.length; r ++ )\n {\n for( int c = 0; c < board[r].length; c ++ )\n {\n toDisplay = new GreenfootImage( board[r][c], 100, Color.BLACK, new Color(0,0,0,0) ); \n getBackground().drawImage( toDisplay, c * getWidth()/3 + (getWidth()/3 - toDisplay.getWidth() )/2 , r * getHeight()/3 + (getHeight()/3 - toDisplay.getHeight() )/2 );\n }\n }\n }"
] |
[
"0.7649454",
"0.64912605",
"0.6487699",
"0.64477473",
"0.64415956",
"0.64137334",
"0.63740385",
"0.6365729",
"0.63643575",
"0.6339026",
"0.6333282",
"0.63261855",
"0.6326161",
"0.6290293",
"0.627044",
"0.62624234",
"0.6258299",
"0.6256668",
"0.6231622",
"0.61570674",
"0.6148719",
"0.61472577",
"0.6137897",
"0.61237496",
"0.6109729",
"0.6107646",
"0.60832447",
"0.6066188",
"0.60576516",
"0.604977",
"0.6034709",
"0.6022071",
"0.60163397",
"0.59472287",
"0.5946384",
"0.59438854",
"0.5936293",
"0.59333515",
"0.59305054",
"0.59296584",
"0.5923131",
"0.5891887",
"0.5868341",
"0.5867376",
"0.5856209",
"0.5855486",
"0.58497137",
"0.58338726",
"0.5825184",
"0.58215576",
"0.5813321",
"0.58123887",
"0.581192",
"0.58111835",
"0.58108383",
"0.5807274",
"0.58068675",
"0.5806681",
"0.57989275",
"0.57983047",
"0.5794733",
"0.578985",
"0.5788606",
"0.5786876",
"0.5781322",
"0.5768952",
"0.57686585",
"0.5765455",
"0.57598525",
"0.57564163",
"0.5751745",
"0.5748538",
"0.5741412",
"0.57400143",
"0.5715573",
"0.5712394",
"0.57074136",
"0.5698921",
"0.5689664",
"0.5683029",
"0.5681528",
"0.5680331",
"0.5678892",
"0.5676709",
"0.5676219",
"0.5674513",
"0.5671069",
"0.5668817",
"0.56682265",
"0.56653565",
"0.56562126",
"0.56474006",
"0.5646543",
"0.5643708",
"0.5640443",
"0.56304395",
"0.5622339",
"0.56200296",
"0.560769",
"0.56068736"
] |
0.6479256
|
3
|
Spring Data JPA repository for the PeopleRoleUserMapping entity.
|
@SuppressWarnings("unused")
@Repository
public interface PeopleRoleUserMappingRepository extends JpaRepository<PeopleRoleUserMapping,Long> {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public interface UserRoleRepository extends JpaRepository<UserRoleEntity, Long> {\n\n List<UserRoleEntity> findByUser(UserEntity entity);\n}",
"@Repository\npublic interface UserRoleRepository extends JpaRepository<UserRole, Long> {\n\n @Query(\"SELECT ur FROM UserRole ur WHERE ur.user.id = :userId AND ur.role.id = :roleId\")\n UserRole findByUserIdAndRoleId(@Param(\"userId\") Long userId, @Param(\"roleId\") Long roleId);\n}",
"@Repository\npublic interface RoleRepository extends JpaRepository<Role, Long> {\n}",
"public interface RoleRepository extends JpaRepository<Role, Long>{\n}",
"public interface RolesRepo extends JpaRepository<Roles, Integer> {\n\n\tRoles findByRoleName(String roleName);\n}",
"public interface RolesRepository extends JpaRepository<RolesEntity, Long> {\n}",
"public interface UserRoleRepository extends CrudRepository<UserRole, Integer> {\n}",
"@Repository\npublic interface UserRoleMapper {\n\n\tpublic void save(UserRoleEntity userRoleEntity);\n\t\n\tpublic void saveBatch(HashMap<String,Object> map);\n\t\n\tpublic void delete(UserRoleEntity userRoleEntity);\n\t\n\tpublic void update(UserRoleEntity userRoleEntity);\n\t\n\tpublic List<UserRoleEntity> findList(UserRoleEntity userRoleEntity);\n}",
"@Resource(name = \"roleRepository\")\npublic interface RoleRepository extends BaseRepository<Role, Long> {\n\t\n\t@Query(nativeQuery=true,value=\"select permissions from role_permission where role=?1\")\n\tpublic List findPidByRoleId(Long rid);\n}",
"public interface RoleRepository extends CrudRepository<Role, Long> {\n}",
"public interface RoleRepository extends CrudRepository<Role, Long>{\n}",
"@Repository\npublic interface RoleRepository extends JpaRepository<Role,Integer>{\n\n}",
"public interface RolesRepository extends JpaRepository<Role, Integer>{\r\n\tOptional<Role> findByRoleName(Roles role);\r\n}",
"public interface RoleRepository extends CrudRepository<Role, Integer> {\n}",
"@Repository\npublic interface RoleRepository extends JpaRepository<Role,Long> {\n\n Role findByName(String name);\n\n}",
"public interface RoleRepository extends BaseRepository<Role, Integer> {\r\n\t\r\n\t@Query(value = \"select * from role where id in (select role_id from user_role where user_id = :userId)\", nativeQuery = true)\r\n\tList<Role> findByUserId(@Param(\"userId\") Integer userId);\r\n\t\r\n\t@Modifying\r\n\t@Query(value = \"update role set locked = :locked where id = :id\", nativeQuery=true)\r\n\tint updateLocked(@Param(\"id\") Integer id, @Param(\"locked\") Boolean locked);\r\n\r\n\tlong countByCode(String name);\r\n\t\r\n\tlong countByName(String name);\r\n}",
"public interface RolePageRepository extends PagingAndSortingRepository<Role, Integer> {\n\n// @Query(\"from Role r where r.roleId=:id\")\n// Role findByRoleId(@Param(\"id\") int id);\n\n\n\n}",
"@Repository\npublic interface UserRepository extends JpaRepository<User, Integer> {\n\n /**\n * Returns employees who are not involved in one of the projects.\n *\n * @return list of free employees\n */\n @Query(\"select u from User u where u.project is null and u.role = 'EMPLOYEE'\")\n List<User> getFreeEmployees();\n\n /**\n * Returns project managers who are not involved in one of the projects.\n *\n * @return list of free project managers\n */\n @Query(\"select u from User u where u.managedProject is null and u.role = 'PM'\")\n List<User> getFreeManagers();\n\n /**\n * Returns the user by specified first and last names.\n *\n * @param firstName of the required user\n * @param lastName of the required user\n * @return specified user\n */\n @Query(\"select u from User u where u.firstName = :firstName and u.lastName = :lastName\")\n User getUserByFirstAndLastName(@Param(\"firstName\") String firstName,\n @Param(\"lastName\") String lastName);\n\n /**\n * Returns the user by specified username.\n *\n * @param username of the required user\n * @return specified user\n */\n @Query(\"select u from User u where u.username = :username\")\n User getUserByUsername(@Param(\"username\") String username);\n\n /**\n * Returns the user by specified email.\n *\n * @param email of the required user\n * @return specified user\n */\n @Query(\"select u from User u where u.email = :email\")\n User getUserByEmail(@Param(\"email\") String email);\n\n /**\n * Returns all employees in the system.\n *\n * @return list of all employees\n */\n @Query(\"select u from User u where u.role = 'EMPLOYEE'\")\n List<User> getAllEmployees();\n\n /**\n * Returns all managers in the system.\n *\n * @return list of all employees\n */\n @Query(\"select u from User u where u.role = 'PM'\")\n List<User> getAllManagers();\n\n /**\n * Returns the total number of customers in the system.\n *\n * @return total number of customers\n */\n @Query(\"select count(u) from User u where u.role = 'CUSTOMER'\")\n Long getTotalCustomersCount();\n\n /**\n * Returns the total number of employees in the system.\n *\n * @return total number of employees\n */\n @Query(\"select count(u) from User u where u.role = 'EMPLOYEE'\")\n Long getTotalEmployeesCount();\n\n /**\n * Returns the latest hired employees.\n *\n * @param pageable abstract interface for pagination information\n * @return list of latest hired employees\n */\n @Query(\"select u from User u where u.role = 'EMPLOYEE' order by u.hireDay desc\")\n List<Task> getLatestHiredEmployees(Pageable pageable);\n}",
"public interface RoleRepository extends CrudRepository<Role, Integer> {\n\n\tIterable<Role> findAll(Sort sort);\n\n\tRole findByRole(String role);\n\n}",
"public interface RoleRepository extends CrudRepository<Role, Long> {\n\n Role findByName(String name);\n\n}",
"@Repository\npublic interface UserRoleDetailDao extends CrudRepository<UserRoleDetail, Integer> {\n}",
"@Repository\npublic interface UserRepo extends JpaRepository<User, Long> {\n\n public List<User> findByEmail(String email);\n\tpublic List<User> findByRole(String role);\n\t@Query(value=\"SELECT new com.harmeetsingh13.dtos.UserPermissionsDto(user.id, perm.id, user.name, user.email, perm.url, perm.permission) FROM \"\n\t\t\t+ \"UserPermission AS perm RIGHT OUTER JOIN perm.user AS user WHERE user.role = :role\")\n\tpublic List<UserPermissionsDto> findAllUsersPermissionsByRole(@Param(\"role\")String role);\n}",
"public interface UserRoleRepository extends GenericRepository<UserRole> {\n\n public List<String> getAllRole();\n\n}",
"@Repository\npublic interface RoleRepository extends CrudRepository<Role, Long> {\n Role findByRole(String name);\n List<Role> findAll();\n Set<Role> findAllByIdIn(List<Long> id);\n}",
"@RestResource(path=\"roles\", rel=\"roles\")\npublic interface RoleRepository extends CrudRepository<Role, Long>{\n\n\tList<Permission> findPermissionsByRole(String role);\n}",
"public interface RoleRepository extends JpaRepository<Role,Long> {\n\n /**\n * Adnotacja Query - Spring Data dzięki adnotacji udostępnia możliwość definiowania zapytania.\n * Dodatkowa metoda findByName - wyszukuje rekord w bazie danych na podstawie nazwy roli.\n */\n @Query(\"SELECT r FROM Role r WHERE r.name = ?1\")\n public Role findByName(String name);\n}",
"public interface RoleRepository extends CrudRepository<Role, Long> {\n\n List<Role> findAll();\n Role findByName(String name);\n\n}",
"public interface RoleRepository extends JpaRepository<Role, Long> {\n Role findByName(String role);\n\n List<Role> findByNameIn(List<String> roles);\n}",
"@Repository\npublic interface UsersIdentityRepository extends JpaRepository<UsersIdentity, Long> {\n}",
"public interface AccountRoleRepository extends CrudRepository<AccountRole, Long> {\n\n List<AccountRole> findByAccountId(Long accountId);\n\n}",
"public interface UserRepository extends JpaRepository<User, Long> {\n\n @Query(\"select u From User u where u.email='SYSTEM'\")\n User findSystemUser();\n\n @Query(\"select u From User u where u.email = :username\")\n List<User> loadUsersByUserName(@Param(\"username\") String username);\n\n @Query(\"select u from User u join u.roles r where r.name = :rolename\")\n List<User> loadUsersByRoleName(@Param(\"rolename\")String rolename);\n\n @Query(\"select u From User u Where u.email like :ctx Or u.userNumber like :ctx Or u.profile.phone like :ctx\")\n List<User> findByEmailOrUserNumberOrPhone(@Param(\"ctx\") String compare);\n}",
"public interface RoleRepository {\n public List<UserRole> getAll();\n public UserRole getById(int id);\n public UserRole getByName(String name);\n public void create(UserRole userRole);\n}",
"@Repository\r\npublic interface RoleRepository extends JpaRepository<Role, Long> {\r\n // Query per ottenere un ruolo conoscendone il nome.\r\n Optional<Role> findByName(RoleName roleName);\r\n}",
"public interface IRepositoryRole extends IRepository<Role,UUID> {\n public Role roleByRoleName(String roleName) throws RoleException;\n}",
"public interface UserRepository extends JpaRepository<User, Long>, UserRepositoryCustom {\n\t@Query(\"SELECT u FROM User u LEFT JOIN FETCH u.roles\")\n\tList<User> findAllEager();\n\n\t@Query(\"SELECT u FROM User u LEFT JOIN FETCH u.roles r LEFT JOIN FETCH r.privileges rp WHERE u.id = :id\")\n\tUser findOneEager(@Param(\"id\") Long id);\n\n\t@Query(\"SELECT u FROM User u WHERE u.username = :username\")\n\tUser findByUsername(@Param(\"username\") String username);\n\n\t@Query(\"SELECT u FROM User u LEFT JOIN FETCH u.roles r LEFT JOIN FETCH r.privileges rp WHERE u.username = :username\")\n\tUser findByUsernameEager(@Param(\"username\") String username);\n}",
"public interface SysRoleRepository {\n\n\n Long save(SysRole role);\n\n void delete(Long roleId);\n\n SysRole get(Long inventorId);\n\n List<SysRole> getAllRoleName();\n\n}",
"public interface UserRoleRepository extends JpaRepository<Tb_user_role, Integer> {\n /**\n * 根据用户id删除数据\n * @param userids\n * @return\n */\n Integer deleteAllByUseridIn(String[] userids);\n\n Integer deleteAllByRoleidIn(String[] roleids);\n\n @Query(value = \"select roleid from Tb_user_role where userid=?1\")\n List<String> findRoleidByUserid(String userid);\n\n @Transactional\n Integer deleteAllByUseridNotIn(String[] userids);\n\n List<Tb_user_role> findByRoleid(String roleid);\n\n @Query(value = \"select t.roleid from Tb_user_role t where t.userid = ?1\")\n List<String> findByUserid(String userid);\n\n Integer deleteByRoleid(String roleid);\n\n int deleteByRoleidAndUseridIn(String roleid,String[] userids);\n\n @Query(value = \"select t.userid from Tb_user_role t where roleid in (select roleid from Tb_role_function where fnid in (select fnid from Tb_right_function where \" +\n \"functionname = ?1))\")\n List<String> findUseridsByFunctionname(String functionname);\n}",
"public interface UserRepository extends CrudRepository<User, Long> {\r\n\t\r\n\tUser findByUsername(String username);\r\n\r\n\tUser findByActivationCode(String code);\r\n\t\r\n\tList<User> findAllByRoles(Role role);\r\n\r\n\tUser findById(long id);\r\n\r\n\r\n\r\n\t\r\n\r\n}",
"@Repository\npublic interface UserRolesRepository extends JpaRepository<UserRoles, Integer>, JpaSpecificationExecutor<UserRoles>, QuerydslPredicateExecutor<UserRoles> {\n\n}",
"public interface UserRepository\n extends CrudRepository<User, Long>\n{\n /**\n * Find a user based off over username\n *\n * @param username the name (String) of user you seek\n * @return the first user object with the name you seek\n */\n User findByUsername(String username);\n\n /**\n * Find all users whose name contains a given substring ignoring case\n *\n * @param name the substring of the names (String) you seek\n * @return List of users whose name contain the given substring ignoring case\n */\n List<User> findByUsernameContainingIgnoreCase(String name);\n\n\n @Query(value = \"select * from users u \" +\n \"LEFT JOIN userroles ur \" +\n \"ON u.userid = ur.userid \" +\n \"WHERE ur.roleid = 3\", nativeQuery = true)\n List<User> getVolunteers();\n}",
"@Repository\npublic interface RoleRepo extends JpaRepository<Role, Long>{\n\t\n\tOptional<Role> findByName(ValidRoles name);\n\n}",
"@Repository\npublic interface UserRepository extends CrudRepository<User, Integer>{\n User findByUserName(String userName);\n User findByToken(String token);\n User findByPartnerId(int id);\n User findByStudentId(int id);\n User findByStudentIdAndStatus(int id, String status);\n List<User> findByRole(Role role);\n}",
"@Repository\npublic interface IUserRepository extends JpaRepository<UserOB,Long> {\n @Query(\"SELECT u FROM UserOB u WHERE u.active = ?1\")\n List<UserOB> findUserByActivity (Boolean aActive);\n @Query(\"SELECT u FROM UserOB u WHERE u.login LIKE ?1\")\n UserOB findUserByLogin (String aLogin);\n @Query(\"SELECT u FROM UserOB u WHERE u.email LIKE ?1\")\n UserOB findUserByEmail (String aEmail);\n @Query(\"SELECT u FROM UserOB u WHERE u.name = ?1\")\n List<UserOB> findUserByName (String aName);\n @Query(\"SELECT u FROM UserOB u WHERE u.surname = ?1\")\n List<UserOB> findUserBySurname (String aSurname);\n @Query(\"SELECT u FROM UserOB u WHERE u.name = ?1 AND u.surname = ?2\")\n List<UserOB> findUserByNameAndSurname (String aName, String aSurname);\n @Query(\"SELECT u FROM UserOB u WHERE u.role.name = ?1\")\n List<UserOB> findUserByRole(String aRoleOB);\n\n\n}",
"@Repository\npublic interface UserRoleRepository extends JpaRepository<UserRole, Long> {\n\n\n public void delete(UserRole userRole);\n\n public UserRole findByUser(User user);\n}",
"public interface AppRoleRepository {\n //根据角色ID列表获取权限列表\n public List<AppRoleEntity> getRoles(String setIds);\n\n //根据角色ID获取权限列表\n public List<AppRoleEntity> getRoleList(String setId);\n\n //获取权限列表\n public List<AppRoleEntity> roleList();\n\n /**\n * 根据角色ID获取 交付APP 权限列表\n *\n * @param appSetId\n * @return\n */\n List<AppRoleEntity> getRepairAppRoleList(String appSetId);\n\n /**\n * 根据角色ID获取 工程APP 权限列表\n *\n * @param appSetId\n * @return\n */\n List<AppRoleEntity> getEngineeringAppRoleList(String appSetId);\n}",
"@Repository\npublic interface UserAuthorityRepository extends CrudRepository<UserAuthority, Long> {\n\tPage<UserAuthority> findAll(Pageable pageable);\n\n\tList<UserAuthority> findByUser(RegisteredUser registeredUser);\n\n\t@Query(value = \"select * from authorities where username = :username\", nativeQuery = true)\n\tList<UserAuthority> findByUsername(@Param(\"username\") String username);\n}",
"public interface TPUserRepository extends JpaRepository<TPUser, Long> {\n\n}",
"public interface SysRoleRepository extends WiselyRepository<SysRole,Long> , PagingAndSortingRepository<SysRole,Long>, JpaRepository<SysRole,Long> {\r\n\r\n public SysRole findByName(String name);\r\n\r\n @Query(value = \"select role_permission from sys_role where id in (:roleId)\",nativeQuery = true)\r\n public List<String> findRolePermisssionbyid(@Param(\"roleId\") List<Long> id );\r\n\r\n @Query(value = \"select * from sys_role where id in (:roleId)\",nativeQuery = true)\r\n public List<SysRole> findRoleById(@Param(\"roleId\") List<Long> id );\r\n\r\n @Modifying\r\n @Transactional\r\n @Query(value = \"delete from sys_user_roles where roles_id = ?\",nativeQuery = true)\r\n public Integer deleteUserRole(Long roleId);\r\n\r\n}",
"public interface SysRoleRepository extends CrudRepository<SysRole, Long> {\n\n List<SysRole> findAllByDescriptionIn(Collection<String> roleNames);\n}",
"@Repository\npublic interface SysUserRepository extends JpaRepository<SysUser,Integer> {\n}",
"public interface RoleJdbcRepository {\n List<RoleViewDto> searchRoleList();\n\n Long searchRampAreaPageableTotalCount(RoleFilterDto filter);\n\n\n List<RoleViewDto> searchRampAreaPageable(RoleFilterDto filter);\n}",
"public interface IdentityComponentsPersonRepository extends GenericRepository<IdentityComponentsPerson, Long>{\n}",
"public interface UserRoleDao {\n\n /**\n * Add new user role mapping\n *\n * @param userRole mapping to add\n * @return new mapping's primary key\n */\n long addUserRole(UserRole userRole);\n\n /**\n * Search user role mappings by params\n *\n * @param userRole params\n * @return mappings found or null\n */\n List<UserRole> searchUserRole(UserRole userRole);\n}",
"public interface ShopperPersonRepository extends CrudRepository<ShopperPerson, Long> {\n}",
"@Repository\npublic interface UserMapper {\n\n List selectAllUser();\n\n\n}",
"@Repository\npublic interface PermissionDao {\n Set<Permission> findPermissionsByRoleId(Integer roleId);\n}",
"List<RoleDto> findAllRoles();",
"public interface ParametrageAppliRepository extends CrudRepository<ParametresAppliDTO, Integer> {\n /**\n * This method will find an User instance in the database by its email.\n * Note that this method is not implemented and its working code will be\n * automatically generated from its signature by Spring Data JPA.\n */\n\n public ParametresAppliDTO findByTypeEnvironnement(int idTypeEnvironement);\n\n\n}",
"@Repository\npublic interface UserDetailsRepository extends JpaRepository<UserDetails, Long> {\n}",
"List<RoleDTO> findAll();",
"@Query(\"SELECT userEntity FROM RoleEntity roleEntity JOIN roleEntity.user userEntity WHERE roleEntity.roleValue=:roleValue\")\r\n List<UserEntity> findAllByRole(@Param(\"roleValue\") RoleEntity.Role roleValue);",
"@Repository\npublic interface UserRepository extends JpaRepository<User,Long> {\n}",
"@Repository(value = \"userMapper\")\npublic interface UserMapper {\n public UserVO getUserInfo(String username);\n public List<String> readAuthority(String username);\n public String test();\n}",
"public interface UserRepository extends JpaRepository<User, Long>{\n}",
"List<Role> findAll();",
"public List<User> getUsersByRole(Role role);",
"public interface RoleRepository extends GraphRepository<Role> {\n\n}",
"@Repository\npublic interface RoleActionMapper {\n\n List<Integer> selectActionIdByManager(String id);\n}",
"@Repository\npublic interface UsuarioRepository extends JpaRepository<EUsuario, Long> {\n\t\n\t/**\n\t * Buscar por ID\n\t * \n\t * @param usuarioId\n\t * @return EUsuario\n\t */\n\tpublic EUsuario findById(long usuarioId);\n\t\n\t/**\n\t * Buscar por nome ou parcial\n\t * \n\t * @param nome\n\t * @return List<EUsuario>\n\t */\n\tpublic List<EUsuario> findByNome(String nome);\n\t\n\t/**\n\t * Buscar por login\n\t * \n\t * @param login\n\t * @return EUsuario\n\t */\n\tpublic EUsuario findByLogin(String login);\n\t\n\t/**\n\t * Buscar por Cargo\n\t * \n\t * @param cargo\n\t * @return List<EUsuario>\n\t */\n\tpublic List<EUsuario> findByCargo(String cargo);\n\t\n\t/**\n\t * Buscar por Nivel de Acesso\n\t * \n\t * @param nivelAcesso\n\t * @return List<EUsuario>\n\t */\n\tpublic List<EUsuario> findByNivelAcesso(int nivelAcesso);\n\t\n\t/**\n\t * Executa query no banco\n\t * \n\t * @param query\n\t * @return List<EUsuario>\n\t */\n\t@Query(\"SELECT u FROM EUsuario u WHERE u.nome LIKE :query\")\n\tpublic List<EUsuario> findByQuery(@Param(\"query\") String query);\n\t\n}",
"@Component(\"JSysUserDAO\")\n@RepositoryDefinition(domainClass = SysUser.class, idClass = Integer.class)\npublic interface SysUserDAO extends JpaRepository<SysUser,Integer> {\n @Query(\"select a from SysUser a where a.name=:name and a.password=:password\")\n// @QueryHints({ @QueryHint(name = \"org.hibernate.cacheable\", value = \"true\") })\n SysUser authentication(@Param(\"name\") String name, @Param(\"password\") String password);\n\n SysUser findByName(String name);\n\n @Query(\"select a from SysUser a left join fetch a.sysRoles where a.name=?1\")\n SysUser fetchRoleByName(String name);\n}",
"@Repository\npublic interface UserRepository extends JpaRepository<User, Long> {\n}",
"@Repository\npublic interface UserRepository extends JpaRepository<User, Long> {\n}",
"@Repository\npublic interface UserRepository extends JpaRepository<User, Long> {\n}",
"@Component\npublic interface SysUserRoleMapper extends Mapper<SysUserRole> {\n @Select(\"select r.* from sys_role r, sys_user u, sys_user_role u_r where r.id = u_r.ROLE_ID and u_r.USER_ID = u.ID and u_r.IS_DELETE = 0 and u.ID = #{userId}\")\n List<SysRole> findSysRolesByUserId(String userId);\n\n @Select(\"select ROLE_ID from sys_user_role where IS_DELETE=0 and user_id=#{userID}\")\n List<String> findRolesByUserId(String userId);\n\n @Select(\"select r.`NAME` from sys_role r, sys_user u, sys_user_role u_r WHERE u.ID = u_r.USER_ID AND r.ID = u_r.ROLE_ID AND u_r.IS_DELETE=0 AND u.LOGIN_NAME = #{username}\")\n List<String> getSysRolesByUsername(String username);\n\n @Delete(\"update sys_user_role set IS_DELETE=1 where user_id=#{userId}\")\n void deleteByUserId(String userId);\n}",
"@Repository\npublic interface UserLeagueRepo extends JpaRepository<UserLeague, UserLeagueKey> {\n}",
"@Repository\npublic interface UsuariosPerfilRepository extends JpaRepository<UsuarioPerfil, Integer> {\n\n\tUsuario findByUsername(String username);\t\n\n}",
"public interface UsersRepository extends CrudRepository<Users,String> {\n}",
"public interface PeopleRepository extends CrudRepository<People,Long> {\n\n People findPeopleByUserId(Long userId);\n\n @Override\n People findOne(Long aLong);\n}",
"public interface AdminUserRepository extends JpaRepository<User,Integer>{\n}",
"@Repository\npublic interface PersonRepository extends JpaRepository<Person, Long> {\n}",
"@Repository\npublic interface OrganizationMapper extends BaseMapper<Organization> {\n\n\n// Integer getCountForFindPageByName(Map<String, Object> map);\n//\n// List<Organization> findPageByName(Map<String, Object> map);\n\n List<Organization> findOrgByUser(String userId);\n\n List<Organization> findCountyIDByFaceID(long id);\n\n Organization findIdByName(String name);\n\n List<Organization> findYfByUser(Map<String, Object> map);\n\n}",
"public interface UserDetailsRepository extends CrudRepository<UserDetails, Long> {\n}",
"public interface UserRespository extends JpaRepository<User,Long>{\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface UserProfileRepository extends JpaRepository<UserProfile, Long> {\n @Query(\"select up from UserProfile up join up.user u on u.id=up.user.id where u.login =:login\")\n UserProfile findUserProfileByLogin(@Param(value=\"login\") String login);\n\n}",
"@Mapper\npublic interface RoleMapper extends BaseMapper<RoleEntity>{\n @Select(\"select * from role\")\n List<RoleEntity> selectAllRole();\n @Select(\"select * from role where role_name like CONCAT('%',#{role_name},'%')\")\n List<RoleEntity>selectRoleName(String role_name);\n @Select(\"select * from role where role_name = #{roleName}\")\n RoleEntity selectRoleOne(@Param(\"roleName\")String roleName);\n}",
"@Repository\npublic interface UserMapper {\n\n User findById(@Param(\"id\") Integer id);\n User findBypassword(User user);\n void addUser(User user);\n\n}",
"@Repository(\"userRepository\")\npublic interface UserRepository extends PagingAndSortingRepository<User, Long> {\n\n /**\n * Find user by the Email.\n *\n * @param email user email\n * @return user\n */\n User findByEmail(String email);\n\n /**\n * List all the active users.\n *\n * @param active active status\n * @return users list\n */\n List<User> findUserByActive(Integer active);\n\n /**\n * List active users with pagination.\n *\n * @param pageable page\n * @param active active status\n * @return user\n */\n @Query(value = \"SELECT user FROM User user WHERE user.active = :active\")\n Page<User> findByUserIsActive(Pageable pageable, @Param(\"active\") Integer active);\n \n \n /**\n * Find user by the username.\n *\n * @param userName user name.\n * @return user\n */\n @Query(value = \"SELECT user FROM User user WHERE user.active = 1 AND user.userName = :userName\")\n User findByUsername(@Param(\"userName\") String userName);\n \n /**\n * Find user by the emailId.\n *\n * @param email email.\n * @return user\n */\n @Query(value = \"SELECT user FROM User user WHERE user.active = 1 AND user.email = :email\")\n User findByEmailId(@Param(\"email\") String email);\n\n}",
"@Query(\"select u from User u where u.role = 'PM'\")\n List<User> getAllManagers();",
"public interface UserRepository extends JpaRepository<Users, Integer> {\n Users findByEmail(String email);\n}",
"@Transactional\n@Component\npublic interface UserRepository extends CrudRepository<User,Integer> {\n List<User> findByName(String name);\n User findByPseudo(String pseudo);\n}",
"@Repository\npublic interface UserRepository extends JpaRepository<User,Integer>{\n}",
"public interface AddressesRepository extends JpaRepository<Addresses,Long> {\n\n}",
"public interface UserRepository extends CrudRepository<User, String> {\n}",
"public interface UserCustomRepository {\n\n}",
"public interface UsersRepository extends CrudRepository<Users, Integer> {\n\n}",
"@Repository\npublic interface PersonaRepository extends JpaRepository<Persona, Integer> {\n \n}",
"@Repository\npublic interface UserConfigRepository extends CrudRepository<UserConfig, String> {\n\n UserConfig findByUserId(String userId);\n}",
"public interface UsersRepo extends CrudRepository<Users, Long>\n{\n}",
"public interface UserInfoRepository extends JpaRepository<UserInfoEntity,Long> {\n}",
"public interface RepositoryUserPermission extends CrudRepository<UserPermission, Long> {\n\n UserPermission findByName(String name);\n\n}"
] |
[
"0.6539945",
"0.63771224",
"0.63759416",
"0.63693076",
"0.6366138",
"0.63300085",
"0.62905675",
"0.6259728",
"0.6237528",
"0.62221146",
"0.6212031",
"0.6191954",
"0.6191292",
"0.6103139",
"0.6074315",
"0.60681355",
"0.60386103",
"0.6010453",
"0.597921",
"0.59486866",
"0.594348",
"0.5933719",
"0.59291244",
"0.5908928",
"0.5894669",
"0.5870751",
"0.5843233",
"0.5791306",
"0.57783526",
"0.5764412",
"0.57473344",
"0.5740685",
"0.5708022",
"0.5703247",
"0.5694059",
"0.5693383",
"0.5677996",
"0.56758875",
"0.56653",
"0.5663375",
"0.56536365",
"0.5640857",
"0.56310695",
"0.5627772",
"0.55710304",
"0.556128",
"0.5490846",
"0.54823595",
"0.54736465",
"0.5471495",
"0.5463905",
"0.54539967",
"0.5436132",
"0.54358137",
"0.5434935",
"0.5429852",
"0.5413076",
"0.53895825",
"0.53863204",
"0.5372575",
"0.53702617",
"0.53683126",
"0.5356384",
"0.5351555",
"0.53504544",
"0.5335666",
"0.5335522",
"0.53334635",
"0.5325785",
"0.53237796",
"0.53190464",
"0.53190464",
"0.53190464",
"0.5318147",
"0.53043956",
"0.52887094",
"0.5282316",
"0.5272761",
"0.52716464",
"0.52711546",
"0.5260598",
"0.5258038",
"0.52526444",
"0.5249911",
"0.5237276",
"0.52334654",
"0.5225807",
"0.52222717",
"0.5215434",
"0.520415",
"0.5203877",
"0.5202601",
"0.5176982",
"0.51746494",
"0.517415",
"0.5173813",
"0.51704836",
"0.51683897",
"0.5165021",
"0.51548326"
] |
0.71613914
|
0
|
false = hide, true == show Sends a packet to show a single Redstonecolor particle to a player
|
public static void displaySingleParticle(Player p, float x, float y, float z, ParticleColor color){
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(EnumParticle.REDSTONE, true, x, y, z, color.getRed(), color.getGreen(), color.getBlue(), 1, 0, 0);
((CraftPlayer) p).getHandle().playerConnection.sendPacket(packet);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public boolean getShowParticles()\r\n/* 90: */ {\r\n/* 91: 91 */ return this.showParticles;\r\n/* 92: */ }",
"@Override\r\n\tpublic void display() {\n\t\tif (silenced.contains(caster))\r\n\t\t\tdead = true;\r\n\t\tif (lastloc == null)\r\n\t\t\tlastloc = loc;\r\n\t\tdir = loc.toVector().subtract(lastloc.toVector());\r\n\t\tif (speed > 2)\r\n\t\t\tParUtils.dropItemEffectVector(loc.clone().add(0,1,0), Material.CACTUS, 1,1, 1,dir);\r\n\t\t\t\r\n\t\t\t//ParUtils.createFlyingParticle(Particles.CRIT, loc.clone().add(0,2.5,0), 0, 0, 0, 1, 5, dir.normalize());\r\n\t\t//ParUtils.createRedstoneParticle(loc.clone().add(0,2.5,0), 0.5,0.5, 0.5, 1, Color.GREEN, 1.5F);\r\n\t}",
"void show() {\n if (!isDead) {\n for (int i = 0; i < bullets.size(); i++) {//show bullets\n bullets.get(i).show();\n }\n if (immortalityTimer >0) {//no need to decrease immortalityCounter if its already 0\n immortalityTimer--;\n }\n\n if (immortalityTimer >0 && floor(((float)immortalityTimer)/5)%2 ==0) {//needs to appear to be flashing so only show half of the time\n } else {\n\n Constants.processing.pushMatrix();\n Constants.processing.translate(this.position.x, this.position.y);\n Constants.processing.rotate(rotation);\n\n //actually draw the player\n Constants.processing.fill(0);\n Constants.processing.noStroke();\n Constants.processing.beginShape();\n int size = 12;\n\n //black triangle\n Constants.processing.vertex(-size - 2, -size);\n Constants.processing.vertex(-size - 2, size);\n Constants.processing.vertex(2 * size - 2, 0);\n Constants.processing.endShape(CLOSE);\n Constants.processing.stroke(255);\n\n //white out lines\n Constants.processing.line(-size - 2, -size, -size - 2, size);\n Constants.processing.line(2 * size - 2, 0, -22, 15);\n Constants.processing.line(2 * size - 2, 0, -22, -15);\n if (boosting) {//when boosting draw \"flames\" its just a little triangle\n boostCount--;\n if (floor(((float)boostCount)/3)%2 ==0) {//only show it half of the time to appear like its flashing\n Constants.processing.line(-size - 2, 6, -size - 2 - 12, 0);\n Constants.processing.line(-size - 2, -6, -size - 2 - 12, 0);\n }\n }\n Constants.processing.popMatrix();\n }\n }\n for (int i = 0; i < asteroids.size(); i++) {//show asteroids\n asteroids.get(i).show();\n }\n }",
"public static void showParticle(Player p, Location loc, EnumParticle particle, int amount){\n PacketPlayOutWorldParticles pckt = new PacketPlayOutWorldParticles(particle, false, (float) loc.getX(), (float) loc.getY(), (float) loc.getZ(), 0f, 0f, 0f, /*speed*/0f, amount);\n ((CraftPlayer) p).getHandle().playerConnection.sendPacket(pckt);\n }",
"public void show() {\n isVisible = true;\n this.saveBorderColor(playerColor);\n this.setBorderColor(playerColor);\n }",
"@Override\n\tpublic void hideContents() {\n\t\tprogram.remove(Play);\n\t\tprogram.remove(Settings);\n\t\tprogram.remove(Credits);\n\t\tprogram.remove(Exit);\n\t\tprogram.remove(tank);\n\t\tprogram.remove(barrel);\n\t\tprogram.remove(explosion);\n\t\tprogram.remove(title);\n\t\tshootCounter = 0;\n\t\tdelayCounter = 0;\n\t\tbarrel = new GameImage(\"../media/TanksPNGS/large_greenTank_cannon.png\");\n\t\tbarrel.setLocation(15, 475);\n\t\tp = false;\n\t\ts= false;\n\t\tc = false;\n\t\tq = false;\n\t}",
"public void DisplayWithShield() {\n\t\tplayers = new ArrayList<Player>();\n\t\tplayer1 = new Player(\"Nick\");\n\t\tplayer2 = new Player(\"Ausitn\");\n\t\tplayers.add(player1);\n\t\tplayers.add(player2);\n\t\tgame = new GameState();\n\t\tgame.initializeServer(players);\n\t\tRulesEngine.setColour(game, String.valueOf(Type.BLUE));\n\t\t\n\t\tgame.setTurn(0);\n\t\t\n\t\t\n\t\t//create cards to be added to player's hand and target's display\n\t\tCard purpleCard = new Card(Type.PURPLE, 3);\n\t\tCard greenCard = new Card(Type.GREEN, 1);\n\t\tCard yellowCard = new Card(Type.YELLOW, 2);\n\t\tCard blueCard = new Card(Type.BLUE, 3);\n\t\tCard redCard = new Card(Type.RED, 4);\n\t\tCard squire = new Card(Type.WHITE, 2);\n\t\tCard maiden = new Card (Type.WHITE, 6);\n\t\tCard shield = new Card(Type.ACTION, Card.SHIELD);\n\t\t\n\t\t//Give one of the players a riposte card to play\n\t\tCard riposte = new Card(Type.ACTION, Card.RIPOSTE);\n\t\tgame.getAllPlayers().get(0).getHand().add(riposte);\n\t\t\n\t\t//Give target player a custom display\n\t\tgame.getDisplay(1).add(redCard);\n\t\tgame.getDisplay(1).add(purpleCard);\n\t\tgame.getDisplay(1).add(blueCard);\n\t\tgame.getDisplay(1).add(greenCard);\n\t\tgame.getDisplay(1).add(squire);\n\t\tgame.getDisplay(1).add(yellowCard);\n\t\tgame.getDisplay(1).add(maiden);\n\t\tgame.getShield(1).add(shield); //give player a shield\n\t}",
"public boolean makeVisible(int player) {\n\t\tif (player < 0 || player >= 4) {\n\t\t\treturn false;\n\t\t}\n\t\tshow[player] = true;\n\t\treturn true;\n\t}",
"public void hide() {\n energy = 0;\n redBull = 1;\n gun = 0;\n target = 1;\n }",
"public void show() {\n hidden = false;\n }",
"private void displayParticles(Player p, double radius, ParticleColor color){\n //just some math to create a circle, and send it to the player. z+0.1f so they arent inside of the bottom block.\n double part = 2 * Math.PI / particlePoints;\n for (int i = 0; i < particlePoints; i++)\n {\n double alpha = part * i;\n float x = (float) (location.getX() + radius * Math.cos(alpha));\n float z = (float) (location.getZ() + radius * Math.sin(alpha));\n float y = (float) (location.getY()+0.1f);\n PacketHelper.displaySingleParticle(p, x, y, z, color);\n }\n }",
"public void show() {\n\t\thidden = false;\n\t}",
"private void diplay() {\n\t\tSystem.out.println(new StringBuilder(HUMIDITY_CONSTANT + humidity + TEMPRETURE_CONSTANT + temp\n\t\t\t\t+ PRESSURE_CONSTANT + pressure));\n\n\t}",
"@Override\n public void makeHidden(Player viewer) {\n \n }",
"@Override\n\t\t\t\t\t public void visit(Player player) {\n\t\t\t\t\t\t\tPacketSendUtility.sendPacket(player, SM_SYSTEM_MESSAGE.STR_MSG_HF_ShugoCaravanAppear);\n\t\t\t\t\t }",
"public void showNet()\n/* */ {\n/* 482 */ update(getGraphics());\n/* */ }",
"public void show() {\r\n\t\tif (getSpawnLocation() == null)\r\n\t\t\treturn;\r\n\r\n\t\tif (!checkItem()) {\r\n\t\t\titem \t= getWorld().dropItem(getSpawnLocation(), getItemStack());\r\n\t\t\titem.setVelocity(new Vector(0, 0.1, 0));\r\n\t\t\titem.setPickupDelay(1000);\r\n\t\t\t\r\n\t\t}\r\n\t\tisVisible \t= true;\r\n\t}",
"@Override\n\tpublic void showContents() {\n\t\tprogram.add(background);\n\t\tprogram.add(topMatte);\n\t\tprogram.add(bottomMatte);\n\t\tprogram.add(stackLabel);\n\t\t\n\t\tprogram.add(basePurp);\n\t\tprogram.add(currPurp);\n\t\tbasePurp.sendToFront();\n\t\tfor (int i = 0; i < callStack; i++) {\n\t\t\tprogram.add(stackBricks[i]);\n\t\t}\n\n\t\tprogram.add(player.getImage());\n\t\tplayer.move(0, 0);\n\n\t\tAudioPlayer.getInstance().playSound(\"sounds\", \"LevelMusic.mp3\", true);\n\t\tif (portalLeft != null) {\n\t\t\tprogram.add(portalLeft.getImage());\n\t\t}\n\t\tif (portalRight != null) {\n\t\t\tprogram.add(portalRight.getImage());\n\t\t\tprogram.add(portalLabel);\n\t\t}\n\t\tif (next == null || next.payloadRetrieved) {\n\t\t\tprogram.add(payload.getImage());\n\t\t}\n\n\t\tArrayList<Payload> collectedPayload = player.getPayloads();\n\n\t\tprogram.add(psuedocode);\n\n\t\tfor (int i = 0; i < collectedPayload.size(); i++) {\n\t\t\tprogram.add(collectedPayload.get(i).getImage());\n\t\t\tpsuedocode.addRtnLong();\n\t\t}\n\t}",
"@Override\n public void makeVisible(Player viewer) {\n \n }",
"protected void playParticle(){\n\t\teffectData.getPlayParticles().playParticles(effectData, effectData.getDisplayAt());\n\t}",
"@Override\r\n\tpublic void showGetPrisonCardMessage(Player player) {\n\t\t\r\n\t}",
"@Override\n\tpublic void show () {\n overWorld = new Sprite(new TextureRegion(new Texture(Gdx.files.internal(\"Screens/overworldscreen.png\"))));\n overWorld.setPosition(0, 0);\n batch = new SpriteBatch();\n batch.getProjectionMatrix().setToOrtho2D(0, 0, 320, 340);\n\n // Creates the indicator and sets it to the position of the first grid item.\n indicator = new MapIndicator(screen.miscAtlases.get(2));\n // Creates the icon of Daur that indicates his position.\n icon = new DaurIcon(screen.miscAtlases.get(2));\n // Sets the mask position to zero, as this screen does not lie on the coordinate plane of any tiled map.\n screen.mask.setPosition(0, 0);\n screen.mask.setSize(320, 340);\n Gdx.input.setInputProcessor(inputProcessor);\n\n // Creates all relevant text.\n createText();\n // Sets numX and numY to the position of Daur on the map.\n numX = storage.cellX;\n numY = storage.cellY;\n indicator.setPosition(numX * 20, numY * 20 + 19);\n // Sets the icon to the center of this cell.\n icon.setPosition(numX * 20 + 10 - icon.getWidth() / 2, numY * 20 + 29 - icon.getHeight() / 2);\n // Creates all the gray squares necessary.\n createGraySquares();\n }",
"public boolean showPlayer(){\n\t\t\n\t\tSystem.out.println(\"\\t\"+color+\"\\t \"+playermoney+\"\\t \\t\"+totalminions+\" \\t\"+totalbuildings+\" \\t\\t\"+personalityCard.cardName);\n\t\treturn true;\n\t}",
"private void hideEntity(int entityId) {\n Object idArray = Array.newInstance(int.class, 1);\n Array.set(idArray, 0, entityId);\n\n Object packet = ReflectUtils.newInstance(\"PacketPlayOutEntityDestroy\", new Class[]{}, new Object[]{});\n ReflectUtils.setField(packet, \"a\", idArray);\n sendPacket(packet);\n }",
"@Override\n public void run() {\n PacketPlayOutEntityStatus status = new PacketPlayOutEntityStatus(fw, (byte) 17);\n ((CraftPlayer) p).getHandle().playerConnection.sendPacket(status);\n PacketPlayOutEntityDestroy destroy = new PacketPlayOutEntityDestroy(fw.getId());\n ((CraftPlayer) p).getHandle().playerConnection.sendPacket(destroy);\n }",
"public void drawParticles() {}",
"public void show() {\n visible=true;\n }",
"void sendUpdatePlayer(int x, int y, int color, byte tool);",
"public void showDetails (Player player) {\r\n\t\tString \tc\t= Term.COLOR_INACTIVE.get();\r\n\t\t\r\n\t\t// Get the color\r\n\t\tif (getActivity() == Activity.SELL\t\t&& isActive())\r\n\t\t\tc\t= Term.COLOR_SELL.get();\r\n\t\t\r\n\t\telse if (getActivity() == Activity.BUY\t\t&& isActive())\r\n\t\t\tc\t= Term.COLOR_BUY.get();\r\n\t\t\r\n\t\telse if (getActivity() == Activity.EXCHANGE\t&& isActive())\r\n\t\t\tc\t= Term.COLOR_EXCHANGE.get();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tList<String>\tmessage\t= new ArrayList<String>();\r\n\t\t\t\t\t\tmessage.add(Term.INFO_1.get() + c + getActivity().toString() \t+ Term.INFO_2.get() + c +scs.formatCurrency(getPrice())\t\t+ Term.INFO_9.get() + c + getOwner());\r\n\t\t\r\n\t\tString \ttext\t= null;\r\n\t\tString\tname\t= getItemName();\r\n\t\t\r\n\t\tif (!isUnlimited()) {\r\n\t\t\tif (getActivity() == Activity.BUY)\r\n\t\t\t\ttext = getAmount()+ \"/\" + getMaxAmount();\r\n\t\t\telse\r\n\t\t\t\ttext = \"\" + getAmount();\r\n\t\t} else {\r\n\t\t\ttext = Term.INFO_UNLIMITED.get();\r\n\t\t}\r\n\t\t\r\n\t\tif (getItemStack().getType() == Material.WRITTEN_BOOK)\r\n\t\t\tname = getNBTStorage().getBookTitle();\r\n\t\t\r\n\t\tmessage.add(Term.INFO_4.get() + c + name\t\t\t\t+ Term.INFO_3.get() + c + text);\r\n//\t\t\t\t\t\tmessage.add(Term.INFO_4.get() + c + getItemName()\t\t\t\t+ Term.INFO_3.get() + c + (!isUnlimited() ? (getActivity() == Activity.BUY ? getMaxAmount() : getAmount()) : Term.INFO_UNLIMITED.get()));\r\n\t\t\r\n\t\tStringBuffer\tbuffer \t= new StringBuffer();\r\n\t\tString\t\t\tdelim\t= \"\";\r\n\t\r\n\t\tfor (Enchantment en : getEnchantments().keySet()) {\r\n\t\t\tint lvl\t= getEnchantments().get(en);\r\n\t\t\t\r\n\t\t\tbuffer.append(delim + en.getName() + \" lvl \" + lvl);\r\n\t\t\tdelim\t= \", \";\r\n\t\t}\r\n\t\t\r\n\t\tif (buffer.toString().length() > 0)\r\n\t\t\tmessage.add(Term.INFO_8.get() + c + buffer.toString());\r\n\t\t\r\n\t\tif (player.hasPermission(Properties.permAdmin))\r\n\t\t\tmessage.add(c + getSHA1());\r\n\t\t\r\n\t\tMessaging.mlSend(player, message);\r\n\t}",
"boolean isVisible(Player player, Entity entity);",
"@Override\n\tpublic void show() {\n\t\trefreshServerList();\n\t\t((InputMultiplexer)Gdx.input.getInputProcessor()).addProcessor(ui);\n\t}",
"public void setShadesVisible(boolean visible) {\r\n showShades = visible;\r\n }",
"@Override\n public void showMessage() {\n MessageHandler.getInstance()\n .writeMessage(\"This Base is different! \\n Behold!\");\n Player p = ((RomInntrenger) GameApplication.getInstance()).getClosestPlayer(transform.getGlobalPosition());\n p.getCurrentWeapon().setWeaponBase(cli);\n collider.destroy();\n destroy();\n\n }",
"public boolean hide(String m) {\n int maxPix = currentIm.getRows() * currentIm.getCols();\n \n \n if(m.length() > 999999 || m.length() <= 0 || m.length() > maxPix || m.length()+3 > maxPix+3){\n //Set message to nnn as No.\n for(int ii = 0; ii < 4; ii = ii + 1){\n int rgb= currentIm.getPixel(0, ii);\n double red= DM.getRed(rgb);\n double blue= DM.getBlue(rgb);\n double green= DM.getGreen(rgb);\n int alpha= DM.getAlpha(rgb);\n \n //Covert values to char\n int charValue = (int)'n';\n int msgChar1 = charValue/100;\n \n int msgChar2 = 0;\n if(charValue > 99){\n msgChar2 = (charValue-100)/10;\n }else{\n msgChar2 = (charValue)/10;\n }\n \n int msgChar3 = charValue%10;\n \n \n //Check the current values versus the upper limit which is 255 and then reduce by 10 where\n //appropriate and set the end values to zero.\n red = readyPixel(red);\n blue = readyPixel(blue);\n green = readyPixel(green);\n \n //Actually hide the characters now.\n red = red + msgChar1;\n green = green + msgChar2;\n blue = blue + msgChar3;\n \n currentIm.setPixel(0, ii,\n (alpha << 24) | ((int)red << 16) | ((int)green << 8) | \n (int)blue);\n }\n return false;\n }else{\n //Encode That A Message Is Present\n //Use yyy as Yes.\n for(int ii = 0; ii < 3; ii = ii + 1){\n int rgb= currentIm.getPixel(0, ii);\n double red= DM.getRed(rgb);\n double blue= DM.getBlue(rgb);\n double green= DM.getGreen(rgb);\n int alpha= DM.getAlpha(rgb);\n \n //Covert values to char\n int charValue = (int)'y';\n int msgChar1 = charValue/100;\n \n int msgChar2 = 0;\n if(charValue > 99){\n msgChar2 = (charValue-100)/10;\n }else{\n msgChar2 = (charValue)/10;\n }\n \n int msgChar3 = charValue%10;\n \n \n //Check the current values versus the upper limit which is 255 and then reduce by 10 where\n //appropriate and set the end values to zero.\n red = readyPixel(red);\n blue = readyPixel(blue);\n green = readyPixel(green);\n \n //Actually hide the characters now.\n red = red + msgChar1;\n green = green + msgChar2;\n blue = blue + msgChar3;\n \n currentIm.setPixel(0, ii,\n (alpha << 24) | ((int)red << 16) | ((int)green << 8) | \n (int)blue);\n }\n \n //Loop through the entire message and encode it.\n for(int ii = 3; ii < (3+m.length()); ii = ii + 1){\n \n int rgb= currentIm.getPixel(0, ii);\n double red= DM.getRed(rgb);\n double blue= DM.getBlue(rgb);\n double green= DM.getGreen(rgb);\n int alpha= DM.getAlpha(rgb);\n \n //Check the current values versus the upper limit which is 255 and then reduce by 10 where\n //appropriate and set the end values to zero.\n red = readyPixel(red);\n blue = readyPixel(blue);\n green = readyPixel(green);\n \n if(ii < 3 + m.length()){\n //Covert values to char\n int charValue = (int)(m.charAt(ii-3));\n int msgChar1 = charValue/100;\n \n int msgChar2 = 0;\n if(charValue > 99){\n msgChar2 = (charValue-100)/10;\n }else{\n msgChar2 = (charValue)/10;\n }\n \n int msgChar3 = charValue%10;\n \n //Actually hide the characters now.\n red = red + msgChar1;\n green = green + msgChar2;\n blue = blue + msgChar3;\n \n currentIm.setPixel(ii,\n (alpha << 24) | ((int)red << 16) | ((int)green << 8) | \n (int)blue);\n }\n }\n \n //Insert the terminal values '~'\n for(int ii = (3+m.length()); ii < ((3+m.length())+1); ii = ii +1){\n int rgb= currentIm.getPixel(0, ii);\n double red= DM.getRed(rgb);\n double blue= DM.getBlue(rgb);\n double green= DM.getGreen(rgb);\n int alpha= DM.getAlpha(rgb);\n \n //Check the current values versus the upper limit which is 255 and then reduce by 10 where\n //appropriate and set the end values to zero.\n red = readyPixel(red);\n blue = readyPixel(blue);\n green = readyPixel(green);\n \n if(ii == (3+m.length())){\n int charValue = (int)'~';\n int msgChar1 = charValue/100;\n \n int msgChar2 = 0;\n if(charValue > 99){\n msgChar2 = (charValue-100)/10;\n }else{\n msgChar2 = (charValue)/10;\n }\n \n int msgChar3 = charValue%10;\n \n red = red + msgChar1;\n green = green + msgChar2;\n blue = blue + msgChar3;\n \n currentIm.setPixel(ii,\n (alpha << 24) | ((int)red << 16) | ((int)green << 8) | \n (int)blue);\n }\n \n \n }//Next FOR \n }//Close Else\n return true;\n }",
"public void sendShortVisible(short objCode, boolean visible, List<String> clientNames) {\n\t\tServerMessage serverMessage = new ServerMessage(getId(), SpaceProtocol.SHORT_VISIBLE);\n\t\tserverMessage.put(objCode);\n\t\tserverMessage.put(visible);\n\t\tDGSLogger.log(\"Space.sendShortVisible objcode: \" + objCode + \" visible: \" + visible);\n\t\tserverMessage.sendClientMessage(clientNames);\n\t}",
"@Override\r\n\tpublic void show() {\n\t\t\r\n\t\t\r\n\t}",
"public void DisplayWithOneCard() {\n\t\tplayers = new ArrayList<Player>();\n\t\tplayer1 = new Player(\"Nick\");\n\t\tplayer2 = new Player(\"Ausitn\");\n\t\tplayers.add(player1);\n\t\tplayers.add(player2);\n\t\tgame = new GameState();\n\t\tgame.initializeServer(players);\n\t\tRulesEngine.setColour(game, String.valueOf(Type.BLUE));\n\t\t\n\t\tgame.setTurn(0);\n\t\t\n\t\t\n\t\t//create cards to be added to player's hand and target's display\n\t\tCard redCard = new Card(Type.RED, 4);\n\t\t\n\t\t//Give one of the players a riposte card to play\n\t\tCard riposte = new Card(Type.ACTION, Card.RIPOSTE);\n\t\tgame.getAllPlayers().get(0).getHand().add(riposte);\n\t\t\n\t\t//Give target player a custom display\n\t\tgame.getDisplay(1).add(redCard);\n\t}",
"@Override\r\n public void show()\r\n {\r\n // De inmediato, ponemos en marcha una melodia\r\n if (!juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).isPlaying())\r\n {\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).play();\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).setLooping(true);\r\n }\r\n }",
"@Override\n\tpublic void show() {\n\t\tcontainer = new Table();\n//\t\tcontainer.background(skin.getDrawable(\"darkenWorld\"));\n\t\tcontainer.setSize(width, height);\n\t\t\n\t\tdarken = new Image(skin.getDrawable(\"darkenWorld\"));\n\t\tdarken.setSize(width, height);\n\t\t\n\t\ttimer.start();\n\t\t\n\t\ttrainingBag = new TrainingBag(width, height);\n\t\t\n\t\tBitmapFont font = new BitmapFont(Gdx.files.internal(\"fontSmall-export.fnt\"),\n\t\t Gdx.files.internal(\"fontSmall-export.png\"), false);\n\t\t\n\t\t\n\t\tLabelStyle labelStyle = new LabelStyle();\n\t\tlabelStyle.font = font;\n\t\t\n\t\ttimeLeft = new Label(timeString + \" 20\", labelStyle);\n\t\ttimeLeft.setPosition(width - timeLeft.getWidth(), height - timeLeft.getHeight());\n\t\t\n\t\thits = new Label(hitsString + \"0\" + amountString, labelStyle);\n\t\thits.setPosition(0, height - timeLeft.getHeight());\n\t\t\n\t\t\n\t\tcontainer.row();\n\t\tcontainer.add(trainingBag);\n\t\t\n\t\tgroup.addActor(darken);\n\t\tgroup.addActor(container);\n\t\tgroup.addActor(timeLeft);\n\t\tgroup.addActor(hits);\n\t}",
"@Override\n\tpublic void render() {\n\t\t// only render it when visible is true\n\t\tif (visible == false) {\n\t\t\treturn;\n\t\t} else {\n\t\t\tsuper.render();\n\t\t}\n\t}",
"@Override\n\tpublic void show() {\n\t\tsuper.show();\n\t\tGdx.input.setInputProcessor(multiplexer);\n\t\tsetProcessorAfterDismissingLoading(multiplexer);\n\t\tif (firstCreated) {\n\t\t\tinitAudio();\n\t\t\tinitTextures();\n\t\t\tinitInterface();\n\t\t\tfirstCreated = false;\n\t\t} \n\t\t\n\t\tgGame.iFunctions.hideAdView();\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"private void show() {\n System.out.println(\"...................................................................................................................................................................\");\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n for(int i = 0; i < players.size(); i++) {\n if (state.getTurn() == i) {\n System.out.print(Color.PURPLE.getPrintColor());\n System.out.print((i+1) + \"- \" + players.get(i).toString());\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n }\n else {\n System.out.print(Color.CYAN.getPrintColor());\n System.out.print((i+1) + \"- \" + players.get(i).toString());\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n }\n }\n System.out.println();\n System.out.print(\"Direction: \");\n if (state.getDirection() == +1) {\n System.out.println(Color.PURPLE.getPrintColor() + \"clockwise ↻\");\n }\n else {\n System.out.println(Color.PURPLE.getPrintColor() + \"anticlockwise ↺\");\n }\n System.out.println(Color.RESET.getPrintColor() + \"Turn: \" + Color.PURPLE.getPrintColor() + players.get(state.getTurn()).getName() + Color.RESET.getPrintColor());\n System.out.println(currentCard.currToString());\n if (controls.get(state.getTurn()) instanceof PcControl) {\n System.out.print(players.get(state.getTurn()).backHandToString() + Color.RESET.getPrintColor());\n }\n else {\n System.out.print(players.get(state.getTurn()).handToString() + Color.RESET.getPrintColor());\n }\n }",
"@Override\r\n\tpublic void show() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void show() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void show() {\n\t\t\r\n\t}",
"@Override\n\tpublic void show() {\n\t worldRenderer = new WorldRenderer(game);\n\t\tGdx.input.setCatchBackKey(true);\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"public void sendShortVisible(short objCode, boolean visible) {\n\t\tsendShortVisible(objCode, visible, clientNames);\n\t}",
"private void spawnPlayer() {\n\t\tplayer.show(true);\n\t\tplayer.resetPosition();\n\t\tplayerDead = false;\n\t\tplayerDeadTimeLeft = 0.0;\n\t}",
"@Override\r\n\tpublic void show() {\n\r\n\t}",
"@Override\r\n\tpublic void show() {\n\r\n\t}",
"public static void displayFirework(Player p, double x, double y, double z, ItemStack firework){\n\n //create and spawn a firework rocket from our itemstack\n EntityFireworks fw = new EntityFireworks(((CraftWorld) p.getWorld()).getHandle());\n fw.setLocation(x, y, z, 0f, 0f);\n\n PacketPlayOutSpawnEntity alive = new PacketPlayOutSpawnEntity(fw, 76);\n ((CraftPlayer) p).getHandle().playerConnection.sendPacket(alive);\n\n //i looked at what mincreaft does in vanilla whe you launch a firework on a server. I just copied what they do here by editing a datawatcher. dont ask me how or why, but it works.\n DataWatcher dataWatcher = fw.getDataWatcher();\n for(DataWatcher.WatchableObject obj: dataWatcher.c()){\n if(obj.c()==5 && obj.a()==8 && obj.b()==null){\n obj.a(firework);\n }\n }\n\n //give the entity some meta\n PacketPlayOutEntityMetadata itemMeta = new PacketPlayOutEntityMetadata(fw.getId(), fw.getDataWatcher(), true);\n ((CraftPlayer) p).getHandle().playerConnection.sendPacket(itemMeta);\n\n //also play a sound\n PacketPlayOutNamedSoundEffect sound = new PacketPlayOutNamedSoundEffect(\"fireworks.launch\", x, y, z, 3f, 1f);\n ((CraftPlayer) p).getHandle().playerConnection.sendPacket(sound);\n\n\n //wait 30 ticks before we detonate it.\n //IMPORTANT: wait too long and the players client will freeze!\n new BukkitRunnable() {\n @Override\n public void run() {\n //detonate the firework, and destroy the entity.\n PacketPlayOutEntityStatus status = new PacketPlayOutEntityStatus(fw, (byte) 17);\n ((CraftPlayer) p).getHandle().playerConnection.sendPacket(status);\n PacketPlayOutEntityDestroy destroy = new PacketPlayOutEntityDestroy(fw.getId());\n ((CraftPlayer) p).getHandle().playerConnection.sendPacket(destroy);\n }\n }.runTaskLater(Juggernaut.pluginInstance, 30L);\n }",
"@Override\n\tpublic void show() {\n\t\tSystem.out.println(\"SHOWWWW_ACCUEIL\");\n\t\tMusicManager.playLoop(typeSong.accueil);\n\t\tfond = new Texture(Gdx.files.internal(LauncherScreen.accueil));\n\t\tbatch = new SpriteBatch();\n\t\tGdx.input.setInputProcessor(this.inputHandler());\n\t}",
"@Override\r\n\tpublic void show() {\n\t}",
"public void DisplayWithMultiTypes() {\n\t\tplayers = new ArrayList<Player>();\n\t\tplayer1 = new Player(\"Nick\");\n\t\tplayer2 = new Player(\"Ausitn\");\n\t\tplayers.add(player1);\n\t\tplayers.add(player2);\n\t\tgame = new GameState();\n\t\tgame.initializeServer(players);\n\t\tRulesEngine.setColour(game, String.valueOf(Type.BLUE));\n\t\t\n\t\tgame.setTurn(0);\n\t\t\n\t\t\n\t\t//create cards to be added to player's hand and target's display\n\t\tCard purpleCard = new Card(Type.PURPLE, 3);\n\t\tCard greenCard = new Card(Type.GREEN, 1);\n\t\tCard yellowCard = new Card(Type.YELLOW, 2);\n\t\tCard blueCard = new Card(Type.BLUE, 3);\n\t\tCard redCard = new Card(Type.RED, 4);\n\t\tCard squire = new Card(Type.WHITE, 2);\n\t\tCard maiden = new Card (Type.WHITE, 6);\n\t\t\n\t\t//Give one of the players a riposte card to play\n\t\tCard riposte = new Card(Type.ACTION, Card.RIPOSTE);\n\t\tgame.getAllPlayers().get(0).getHand().add(riposte);\n\t\t\n\t\t//Give target player a custom display\n\t\tgame.getDisplay(1).add(redCard);\n\t\tgame.getDisplay(1).add(purpleCard);\n\t\tgame.getDisplay(1).add(blueCard);\n\t\tgame.getDisplay(1).add(greenCard);\n\t\tgame.getDisplay(1).add(squire);\n\t\tgame.getDisplay(1).add(yellowCard);\n\t\tgame.getDisplay(1).add(maiden);\n\t}",
"@Override\n\tpublic void shown() {\n\n\t}",
"@Override\r\n public void show()\r\n {\r\n\r\n }",
"@Override\r\n public void show()\r\n {\r\n\r\n }",
"@Override\n public void show() {\n Gdx.input.setInputProcessor(serpentIslandMain);\n\n // Make the drawable for button\n Drawable dungeonA_D = new TextureRegionDrawable(new TextureRegion(new Texture(Gdx.files.internal(\"background_imgs/secreatisland.png\"))));\n\n // Add the first dungeon's button to the stage\n ImageButton dungeonAButton = new ImageButton(dungeonA_D);\n dungeonAButton.setPosition(20, Gdx.graphics.getHeight()/10);\n\n // Add listeners to buttons\n dungeonAButton.addListener(new ClickListener() {\n @Override\n public void clicked(InputEvent event, float x, float y) {\n // Direct to the dungeonA battle screen\n game.setScreen(new DungeonA(game));\n dispose();\n }\n });\n\n // Add the ui elements to stage\n serpentIslandMain.addActor(dungeonAButton);\n }",
"@Override\n\tpublic void show() {\n\t}",
"@Override\n\tpublic void show() {\n\t}",
"private void showPlayerOptions() {\n playStartLinearLayout.setVisibility(View.INVISIBLE);\n timeInfoLinearLayout.setVisibility(View.INVISIBLE);\n gsOpenPlayImage.setVisibility(View.VISIBLE);\n\n\n }",
"public void sendByteVisible(byte objCode, boolean visible, List<String> clientNames) {\n\t\tServerMessage serverMessage = new ServerMessage(getId(), SpaceProtocol.BYTE_VISIBLE);\n\t\tserverMessage.put(objCode);\n\t\tserverMessage.put(visible);\n\t\tDGSLogger.log(\"Space.sendByteVisible objcode: \" + objCode + \" visible: \" + visible);\n\t\tserverMessage.sendClientMessage(clientNames);\n\t}",
"public void displayClientMessage(Component debug1, boolean debug2) {}",
"public void showNoeudByClick() {\r\n\t\tSystem.out.print(\"Cliquez votre noeud: \");\r\n\t\tNoeud noeud = getNoeudByClick();\r\n\t\tthis.dessin.setColor(Color.RED);\r\n\t\tthis.dessin.putText(noeud.getLongitude(), noeud.getLatitude(), noeud.toString());\t\r\n\t\tSystem.out.println(noeud);\r\n\t}",
"@Override\n\tpublic void setTensileShows(Boolean paramBoolean)\n\t{\n\n\t}",
"@Override\n public void setControllerVisible(final boolean show) {\n if (isPlayerOnPage(playerId)) {\n impl.setControllerVisible(show);\n } else {\n addToPlayerReadyCommandQueue(\"controller\", new Command() {\n\n @Override\n public void execute() {\n impl.setControllerVisible(show);\n }\n });\n }\n }",
"public void setShowDisplaySlotPanel(boolean b) {\r\n\r\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tshowPanel(createReinforcePanel(MainPlayScreen.this.game.getCurrentPlayer()));\t\t\n\t\t\t\n\t\t\t}",
"@Override\r\n public void show() {\r\n // makes sure the controller is ready for new inputs\r\n controller.reset();\r\n // tell the game to take input data via our controller\r\n Gdx.input.setInputProcessor(controller);\r\n // update the preferences\r\n parent.updateActivePreferences();\r\n // set the volume to our new preference\r\n bgMusic.setVolume(musicVol);\r\n bgMusic.play();\r\n }",
"@Override\n public void show() {\n mHandler.obtainMessage(0).sendToTarget();\n }",
"public void toggleVanishQuiet(Player vanishingPlayer, boolean effects, boolean updateStatus) {\n final boolean vanishing = !this.isVanished(vanishingPlayer);\n final String vanishingPlayerName = vanishingPlayer.getName();\n if(updateStatus)\n \tBungeeHelper.setVanishState(vanishingPlayer, vanishing);\n\n if (vanishing) {\n Debuggle.log(\"It's invisible time! \" + vanishingPlayer.getName());\n this.setSleepingIgnored(vanishingPlayer);\n if (VanishPerms.canNotFollow(vanishingPlayer)) {\n for (final Entity entity : vanishingPlayer.getNearbyEntities(70, 70, 70)) {\n if ((entity instanceof Creature)) {\n final Creature creature = ((Creature) entity);\n if (creature.getTarget() != null && creature.getTarget().equals(vanishingPlayer)) {\n creature.setTarget(null);\n }\n }\n }\n }\n this.vanishedPlayerNames.add(vanishingPlayerName);\n this.vanishedPlayers.add(vanishingPlayer.getUniqueId());\n MetricsOverlord.getVanishTracker().increment();\n this.plugin.getLogger().info(vanishingPlayerName + \" disappeared.\");\n vanishingPlayer.setCollidable(false);\n } else {\n Debuggle.log(\"It's visible time! \" + vanishingPlayer.getName());\n this.resetSleepingIgnored(vanishingPlayer);\n this.removeVanished(vanishingPlayer);\n MetricsOverlord.getUnvanishTracker().increment();\n this.plugin.getLogger().info(vanishingPlayerName + \" reappeared.\");\n vanishingPlayer.setCollidable(true);\n }\n if (effects) {\n playEffects(vanishingPlayer);\n }\n this.plugin.getServer().getPluginManager().callEvent(new VanishStatusChangeEvent(vanishingPlayer, vanishing));\n vanishingPlayer.sendPluginMessage(this.plugin, VanishManager.VANISH_PLUGIN_CHANNEL, vanishing ? new byte[]{0x01} : new byte[]{0x00});\n final java.util.Collection<? extends Player> playerList = this.plugin.getServer().getOnlinePlayers();\n for (final Player otherPlayer : playerList) {\n if (vanishingPlayer.equals(otherPlayer)) {\n continue;\n }\n Debuggle.log(\"Determining what to do about \" + vanishingPlayer.getName() + \" for \" + otherPlayer.getName());\n if (vanishing) {\n if (!VanishPerms.canSeeAll(otherPlayer)) {\n if (otherPlayer.canSee(vanishingPlayer)) {\n Debuggle.log(\"Hiding \" + vanishingPlayer.getName() + \" from \" + otherPlayer.getName());\n otherPlayer.hidePlayer(this.plugin, vanishingPlayer);\n }\n } else {\n otherPlayer.hidePlayer(this.plugin,vanishingPlayer);\n this.showPlayer.add(new ShowPlayerEntry(otherPlayer, vanishingPlayer));\n }\n } else {\n if (VanishPerms.canSeeAll(otherPlayer)) {\n otherPlayer.hidePlayer(this.plugin,vanishingPlayer);\n }\n if (!otherPlayer.canSee(vanishingPlayer)) {\n Debuggle.log(\"Showing \" + vanishingPlayer.getName() + \" to \" + otherPlayer.getName());\n this.showPlayer.add(new ShowPlayerEntry(otherPlayer, vanishingPlayer));\n }\n }\n }\n }",
"public void showOption(Socket s , BufferedReader bof,String contact) throws IOException\n {\n clipRequestNotif.play();\n PrintWriter printWriter = new PrintWriter(s.getOutputStream(),true) ;\n Platform.runLater(() ->\n {\n\n BoxBlur boxBlur = new BoxBlur(3, 3, 3);\n JFXButton no = new JFXButton(\"Refuse\");\n JFXButton yes = new JFXButton(\"Accept\");\n JFXDialogLayout layout = new JFXDialogLayout();\n no.getStyleClass().add(\"dialogButtonNo\");\n yes.getStyleClass().add(\"dialogButtonYes\");\n layout.setActions(no, yes);\n layout.setHeading(new Text(contact+\" wants to chat with you?\"));\n JFXDialog dialog = new JFXDialog(rootStackPane, layout, JFXDialog.DialogTransition.TOP);\n dialog.show();\n rootAnchorPane.setEffect(boxBlur);\n\n no.addEventHandler(MouseEvent.MOUSE_CLICKED, (MouseEvent mouseevnt) ->\n {\n rootAnchorPane.setEffect(null);\n dialog.close();\n printWriter.println(\"false\");\n\n });\n yes.addEventHandler(MouseEvent.MOUSE_CLICKED, (MouseEvent mouseevnt) ->\n {\n rootAnchorPane.setEffect(null);\n dialog.close();\n printWriter.println(\"true\");\n addMessages(contact) ;\n });\n });\n\n }",
"public void updateInfo(Player p, boolean isFirst) {\r\n\t\tif (p.isDead() || p.isFree()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Updating player info\");\r\n\t\t\r\n\t\t// Build embed with all stats\r\n\t\tEmbedBuilder embed = new EmbedBuilder();\r\n\t\tembed.setColor(p.getColor());\r\n\t\tembed.setTitle(\"**\"+Utils.getName(p.getPlayerID(),guild)+\"**'s Information\");\r\n\t\tembed.addField(\"Health :heart:\",\"``\"+p.getHealth()+\"``\", true);\r\n\t\tembed.addField(\"Board Clank :warning:\",\"``\"+p.getClankOnBoard()+\"``\", true);\r\n\t\tembed.addField(\"Bag Clank :briefcase:\",\"``\"+p.getClankInBag()+\"``\", true);\r\n\t\tembed.addField(\"**Skill** :diamond_shape_with_a_dot_inside:\",\"``\"+p.getSkill()+\"``\",true);\r\n\t\tembed.addField(\"**Boots** :boot:\",\"``\"+p.getBoots()+\"``\",true);\r\n\t\tembed.addField(\"**Swords** :crossed_swords:\",\"``\"+p.getSwords()+\"``\",true);\r\n\t\tembed.addField(\"Gold :moneybag:\",\"``\"+p.getGold()+\"``\",true);\r\n\t\t//embed.addField(\"Room [\"+ p.getCurrentRoom() + \"] :door:\",\"``\"+Utils.arrayToString(GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()])+\"``\",true);\r\n\t\tembed.addField(\"Room [\"+ p.getCurrentRoom() + \"] :door:\",Utils.arrayToEmojiString(GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()]),true);\r\n\t\tif (p.getTeleports() > 0) {\r\n\t\t\tif (GlobalVars.teleportRoomsPerRoom[p.getCurrentRoom()].length > 0) {\r\n\t\t\t\t//embed.addField(p.getTeleports() + \"x **Teleport(s)** :crystal_ball:\",\"``\"+\r\n\t\t\t\t//\t\tUtils.arrayToString(GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()])+\" ┃ \"+\r\n\t\t\t\t//\t\tUtils.arrayToString(GlobalVars.teleportRoomsPerRoom[p.getCurrentRoom()])+\"``\",true);\r\n\t\t\t\tembed.addField(p.getTeleports() + \"x **Teleport(s)** :crystal_ball:\",\r\n\t\t\t\t\t\tUtils.arrayToEmojiString(GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()])+\"┃\"+\r\n\t\t\t\t\t\tUtils.arrayToEmojiString(GlobalVars.teleportRoomsPerRoom[p.getCurrentRoom()],GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()].length),true);\r\n\t\t\t} else {\r\n\t\t\t\t//embed.addField(p.getTeleports() + \"x **Teleport(s)** :crystal_ball:\",\"``\"+\r\n\t\t\t\t//\t\tUtils.arrayToString(GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()])+\"``\",true);\r\n\t\t\t\tembed.addField(p.getTeleports() + \"x **Teleport(s)** :crystal_ball:\",\r\n\t\t\t\t\t\tUtils.arrayToEmojiString(GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()]),true);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tembed.addField(\"\",\"\",true);\r\n\t\t}\r\n\t\t\r\n\t\t// Set history as footer\r\n\t\tString history = \"\";\r\n\t\tfor (int i = p.getHistory().size()-1; i >= 0; i--) {\r\n\t\t\thistory += p.getHistory().get(i) + \" / \";\r\n\t\t}\r\n\t\tembed.setFooter(history, null);\r\n\t\t\r\n\t\tif (isFirst) {\r\n\t\t\tgameChannel.sendMessage(embed.build()).queueAfter(5000, TimeUnit.MILLISECONDS);\r\n\t\t} else {\r\n\t\t\tgameChannel.editMessageById(infoID, embed.build()).queue();\r\n\t\t\tupdateReactionsInfo(); // To allow for hiding rooms that can't be moved into\r\n\t\t}\r\n\t}",
"public void setDynamicOverlayVisible(boolean vis)\n/* 111: */ {\n/* 112:174 */ this.mapPanel.showDynamicOverlay = vis;\n/* 113: */ }",
"@Override\n\tpublic void setVisible(boolean b) {\n\t\t\n\t}",
"public void showChat() {\n eventView.setVisible(true);\n }",
"public void showCard()\n {\n ArrayList<Card> superCards = super.removeCards();\n super.addCard(hiddenCard);\n super.addCards(superCards.subList(1, superCards.size()));\n hidden = false;\n }"
] |
[
"0.629393",
"0.609456",
"0.60688233",
"0.60185766",
"0.580711",
"0.5746019",
"0.5738091",
"0.56961286",
"0.5623078",
"0.5607208",
"0.55943906",
"0.5579825",
"0.5566321",
"0.5528883",
"0.5511057",
"0.5510121",
"0.546169",
"0.54545254",
"0.54370654",
"0.5435762",
"0.5393977",
"0.5385111",
"0.53760624",
"0.53543293",
"0.53538835",
"0.5343323",
"0.5306251",
"0.5292284",
"0.5288145",
"0.5277468",
"0.52694315",
"0.5248283",
"0.52473176",
"0.52464914",
"0.5234986",
"0.5230345",
"0.5206922",
"0.5192433",
"0.5179172",
"0.51736754",
"0.5169508",
"0.51670927",
"0.51670927",
"0.51670927",
"0.51670927",
"0.51670927",
"0.51670927",
"0.51670927",
"0.51670927",
"0.51670927",
"0.51670927",
"0.51670927",
"0.51670927",
"0.51670927",
"0.51670927",
"0.51670927",
"0.51646703",
"0.51570064",
"0.51570064",
"0.51570064",
"0.5147729",
"0.5134222",
"0.5134222",
"0.5134222",
"0.5134222",
"0.5134222",
"0.5134222",
"0.5134222",
"0.5134222",
"0.5126579",
"0.51235026",
"0.51201606",
"0.51201606",
"0.5108147",
"0.51041543",
"0.5091485",
"0.5088226",
"0.5087382",
"0.5074294",
"0.5074294",
"0.50663364",
"0.5062672",
"0.5062672",
"0.5059085",
"0.5056696",
"0.5054573",
"0.50497895",
"0.5048311",
"0.504414",
"0.5042018",
"0.5041145",
"0.50404793",
"0.5031085",
"0.50275135",
"0.50261205",
"0.5025949",
"0.5024236",
"0.50217927",
"0.50204957",
"0.50184584"
] |
0.61250377
|
1
|
Sends a packet to show an armorstand with custom name, as a hologram, to a player.
|
public static EntityArmorStand displayHologram(Player p, double x, double y, double z, String text){
//get a new armorstand
EntityArmorStand stand = new EntityArmorStand(((CraftWorld) p.getPlayer().getWorld()).getHandle());
stand.setLocation(x, y, z, 0,0); //xyz pitch yaw, we dont need the latter 2 for holograms.
//set the custom text, and make it visible
stand.setCustomName(text);
stand.setCustomNameVisible(true);
//stop the armorstand from falling down
stand.setGravity(false);
//if debug is off, turn it invisible
stand.setInvisible(!showArmorstandsDebug);
//set it small so its easier to control the height
stand.setSmall(true);
PacketPlayOutSpawnEntityLiving packet = new PacketPlayOutSpawnEntityLiving(stand);
((CraftPlayer) p).getHandle().playerConnection.sendPacket(packet);
return stand;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void sendNameInfo(Player plr){\r\n\t\t\r\n\t\tString message = \"UDNM\" + lobby.getNameString();\r\n\t\tsendOnePlayer(plr, message);\r\n\t}",
"public static void updateHologram(Player p, EntityArmorStand stand, String newName){\n if(stand==null || p==null){\n return; //something definately went wrong. safeguard\n }\n\n //create a new metadata packet with the correct datawatchers.\n DataWatcher dataWatcher = new DataWatcher(null);\n if(newName!=null) {\n dataWatcher.a(2, newName); //2 = optChat with custom name (see https://wiki.vg/Entity_metadata#Entity_Metadata_Format)\n dataWatcher.a(3, (byte) 1); //3 = customnamevisible , set to true.\n }else{\n dataWatcher.a(3, (byte) 0); //if name is null, simply set customnamevisible to false.\n }\n\n //send the packet to the player\n PacketPlayOutEntityMetadata packet = new PacketPlayOutEntityMetadata(stand.getId(), dataWatcher, true);\n ((CraftPlayer) p).getHandle().playerConnection.sendPacket(packet);\n }",
"public void DisplayWithShield() {\n\t\tplayers = new ArrayList<Player>();\n\t\tplayer1 = new Player(\"Nick\");\n\t\tplayer2 = new Player(\"Ausitn\");\n\t\tplayers.add(player1);\n\t\tplayers.add(player2);\n\t\tgame = new GameState();\n\t\tgame.initializeServer(players);\n\t\tRulesEngine.setColour(game, String.valueOf(Type.BLUE));\n\t\t\n\t\tgame.setTurn(0);\n\t\t\n\t\t\n\t\t//create cards to be added to player's hand and target's display\n\t\tCard purpleCard = new Card(Type.PURPLE, 3);\n\t\tCard greenCard = new Card(Type.GREEN, 1);\n\t\tCard yellowCard = new Card(Type.YELLOW, 2);\n\t\tCard blueCard = new Card(Type.BLUE, 3);\n\t\tCard redCard = new Card(Type.RED, 4);\n\t\tCard squire = new Card(Type.WHITE, 2);\n\t\tCard maiden = new Card (Type.WHITE, 6);\n\t\tCard shield = new Card(Type.ACTION, Card.SHIELD);\n\t\t\n\t\t//Give one of the players a riposte card to play\n\t\tCard riposte = new Card(Type.ACTION, Card.RIPOSTE);\n\t\tgame.getAllPlayers().get(0).getHand().add(riposte);\n\t\t\n\t\t//Give target player a custom display\n\t\tgame.getDisplay(1).add(redCard);\n\t\tgame.getDisplay(1).add(purpleCard);\n\t\tgame.getDisplay(1).add(blueCard);\n\t\tgame.getDisplay(1).add(greenCard);\n\t\tgame.getDisplay(1).add(squire);\n\t\tgame.getDisplay(1).add(yellowCard);\n\t\tgame.getDisplay(1).add(maiden);\n\t\tgame.getShield(1).add(shield); //give player a shield\n\t}",
"public void showHologram(Player player) {\n if(!trackPlayers || playerHologramIds.getOrDefault(player.getUniqueId(), null) == null) {\n List<Integer> ids = Lists.newArrayList();\n WorldServer world = ((CraftWorld) location.getWorld()).getHandle();\n AtomicDouble currentSpacing = new AtomicDouble(this.text.size() * spacing);\n\n text.forEach(text -> {\n EntityArmorStand stand = new EntityArmorStand(world);\n stand.setCustomName(text);\n stand.setCustomNameVisible(true);\n stand.setLocation(\n location.getX(),\n location.getY() + currentSpacing.get(),\n location.getZ(),\n 0f,\n 0f\n );\n stand.setGravity(false);\n stand.setInvisible(true);\n ids.add(stand.getId());\n\n ((CraftPlayer) player).getHandle().playerConnection.sendPacket(new PacketPlayOutSpawnEntityLiving(stand));\n\n currentSpacing.addAndGet(-spacing);\n });\n\n playerHologramIds.put(player.getUniqueId(), ids);\n }\n }",
"@Override\r\n\tpublic void attack() {\n\t\tSystem.out.printf(\"ºóÎÀ%s½ø¹¥\\n\", name);\r\n\t}",
"@Override\r\n\t\t\tpublic void hear(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void hear(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void hear(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\tpublic void hear(Player spkr,String s) {\n\t\tplayerMappingService.sendString(this,s);\r\n\t}",
"public void presentPlayer( CoinFlipper theHandle, String theName );",
"void sendPacketToPlayer(Player player, Object packet);",
"public void claimLand(final String name, Chunk chunk, final Player player) throws ParseException, org.json.simple.parser.ParseException, IOException {\n final int x = chunk.getX();\n final int z = chunk.getZ();\n System.out.println(\"[claim] \"+player.getDisplayName()+\" wants to claim \"+x+\",\"+z+\" with name \"+name);\n\n if (!name.isEmpty()) {\n // check that desired area name doesn't have non-alphanumeric characters\n boolean hasNonAlpha = name.matches(\"^.*[^a-zA-Z0-9 _].*$\");\n if (!hasNonAlpha) {\n // 16 characters max\n if (name.length() <= 16) {\n\n\n if (name.equalsIgnoreCase(\"the wilderness\")) {\n player.sendMessage(ChatColor.RED + \"You cannot name your land that.\");\n return;\n }\n if (REDIS.get(\"chunk\" + x + \",\" + z + \"owner\") == null) {\n final User user = new User(this, player);\n player.sendMessage(ChatColor.YELLOW + \"Claiming land...\");\n BukkitScheduler scheduler = Bukkit.getServer().getScheduler();\n final BitQuest bitQuest = this;\n\n user.wallet.getBalance(0, new Wallet.GetBalanceCallback() {\n @Override\n public void run(Long balance) {\n try {\n if (balance >= LAND_PRICE) {\n if (user.wallet.move(\"land\", LAND_PRICE)) {\n\n BitQuest.REDIS.set(\"chunk\" + x + \",\" + z + \"owner\", player.getUniqueId().toString());\n BitQuest.REDIS.set(\"chunk\" + x + \",\" + z + \"name\", name);\n land_owner_cache=new HashMap();\n land_name_cache=new HashMap();\n land_unclaimed_cache=new HashMap();\n player.sendMessage(ChatColor.GREEN + \"Congratulations! You're now the owner of \" + name + \"!\");\n updateScoreboard(player);\n if (bitQuest.messageBuilder != null) {\n\n // Create an event\n org.json.JSONObject sentEvent = bitQuest.messageBuilder.event(player.getUniqueId().toString(), \"Claim\", null);\n org.json.JSONObject sentCharge = bitQuest.messageBuilder.trackCharge(player.getUniqueId().toString(), BitQuest.LAND_PRICE / 100, null);\n\n\n ClientDelivery delivery = new ClientDelivery();\n delivery.addMessage(sentEvent);\n delivery.addMessage(sentCharge);\n\n\n MixpanelAPI mixpanel = new MixpanelAPI();\n mixpanel.deliver(delivery);\n }\n } else {\n if (balance < BitQuest.LAND_PRICE) {\n player.sendMessage(ChatColor.RED + \"You don't have enough money! You need \" +\n ChatColor.BOLD + (int) Math.ceil((BitQuest.LAND_PRICE - balance) / 100) + ChatColor.RED + \" more Bits.\");\n } else {\n player.sendMessage(ChatColor.RED + \"Claim payment failed. Please try again later.\");\n }\n }\n } else {\n player.sendMessage(ChatColor.RED + \"You don't have enough money! You need \" +\n ChatColor.BOLD + (int) Math.ceil((BitQuest.LAND_PRICE) / 100) + ChatColor.RESET + ChatColor.RED + \" Bits.\");\n }\n } catch (Exception e) {\n System.out.println(\"Error on claiming land\");\n e.printStackTrace();\n }\n }\n });\n } else if (REDIS.get(\"chunk\" + x + \",\" + z + \"owner\").equals(player.getUniqueId().toString()) || isModerator(player)) {\n if (name.equals(\"abandon\")) {\n // Abandon land\n BitQuest.REDIS.del(\"chunk\" + x + \",\" + z + \"owner\");\n BitQuest.REDIS.del(\"chunk\" + x + \",\" + z + \"name\");\n } else if (name.startsWith(\"transfer \") && name.length() > 9) {\n // If the name starts with \"transfer \" and has at least one more character,\n // transfer land\n final String newOwner = name.substring(9);\n player.sendMessage(ChatColor.YELLOW + \"Transfering land to \" + newOwner + \"...\");\n\n if (REDIS.exists(\"uuid:\" + newOwner)) {\n String newOwnerUUID = REDIS.get(\"uuid:\" + newOwner);\n BitQuest.REDIS.set(\"chunk\" + x + \",\" + z + \"owner\", newOwnerUUID);\n player.sendMessage(ChatColor.GREEN + \"This land now belongs to \" + newOwner);\n } else {\n player.sendMessage(ChatColor.RED + \"Could not find \" + newOwner + \". Did you misspell their name?\");\n }\n\n } else if (BitQuest.REDIS.get(\"chunk\" + x + \",\" + z + \"name\").equals(name)) {\n player.sendMessage(ChatColor.RED + \"You already own this land!\");\n } else {\n // Rename land\n player.sendMessage(ChatColor.GREEN + \"You renamed this land to \" + name + \".\");\n BitQuest.REDIS.set(\"chunk\" + x + \",\" + z + \"name\", name);\n }\n }\n } else {\n player.sendMessage(ChatColor.RED+\"Your land name must be 16 characters max\");\n }\n } else {\n player.sendMessage(ChatColor.RED+\"Your land name must contain only letters and numbers\");\n }\n } else {\n player.sendMessage(ChatColor.RED+\"Your land must have a name\");\n }\n }",
"void sendPacket(Player player, Object packet);",
"public void sendPlayerName(String s) {\n try {\n dOut.writeUTF(s);\n dOut.flush();\n } catch (IOException e) {\n System.out.println(\"Could not send player name\");\n e.printStackTrace();\n }\n }",
"public void setStandNAME(ItemStack stack, String name) {\n/* 314 */ NBTTagCompound nbttagcompound = stack.getTagCompound();\n/* */ \n/* 316 */ if (nbttagcompound == null) {\n/* */ \n/* 318 */ nbttagcompound = new NBTTagCompound();\n/* 319 */ stack.setTagCompound(nbttagcompound);\n/* */ } \n/* */ \n/* 322 */ NBTTagCompound nbttagcompound1 = nbttagcompound.getCompoundTag(this.standInfo);\n/* */ \n/* 324 */ if (!nbttagcompound.hasKey(this.standInfo))\n/* */ {\n/* 326 */ nbttagcompound.setTag(this.standInfo, nbttagcompound1);\n/* */ }\n/* */ \n/* 329 */ nbttagcompound1.setString(this.standName, name);\n/* */ }",
"public void sendPlayerData() throws JSONException {\n\t\tJSONObject json = new JSONObject();\n\t\tJSONObject json2 = new JSONObject();\n\t\tjson2.put(\"Name\", playerModel.getPlayerName());\n\n\t\tswitch (playerModel.getPlayerColor()) {\n\n\t\tcase PL_BLUE:\n\t\t\tjson2.put(\"Farbe\", \"Blau\");\n\t\t\tbreak;\n\t\tcase PL_RED:\n\t\t\tjson2.put(\"Farbe\", \"Rot\");\n\t\t\tbreak;\n\t\tcase PL_WHITE:\n\t\t\tjson2.put(\"Farbe\", \"Weiß\");\n\t\t\tbreak;\n\t\tcase PL_YELLOW:\n\t\t\tjson2.put(\"Farbe\", \"Orange\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\n\t\t}\n\t\tjson.put(\"Spieler\", json2);\n\t\tlog.info(playerModel + \" verschickt\");\n\t\tcontroller.getClient().send(json);\n\t}",
"public void printDetailedPlayer(Player player);",
"public static void giveStuff(GamePlayer player) {\r\n\t\tItemStack sword = new ItemStack(Material.WOOD_SWORD);\r\n\t\tItemStack bow = new ItemStack(Material.BOW);\r\n\t\tItemStack arrow = new ItemStack(Material.ARROW);\r\n\t\tItemStack compass = new ItemStack(Material.COMPASS);\r\n\t\tItemMeta compassMeta = sword.getItemMeta();\r\n\t\tItemMeta swordMeta = sword.getItemMeta();\r\n\t\tItemMeta bowMeta = sword.getItemMeta();\r\n\t\t\r\n\t\tplayer.getPlayer().getInventory().clear();\r\n\t\tswordMeta.spigot().setUnbreakable(true);\r\n\t\tsword.setItemMeta(swordMeta);\r\n\t\tsword.setAmount(1);\r\n\t\t\r\n\t\tbowMeta.spigot().setUnbreakable(true);\r\n\t\tbowMeta.setDisplayName(\"§aSniper§r §7(One Shot Kill)\");\r\n\t\tbow.setItemMeta(bowMeta);\r\n\t\tbow.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, 10);\r\n\t\tbow.setAmount(1);\r\n\t\t\r\n\t\tarrow.setAmount(1);\r\n\t\t\r\n\t\tcompassMeta.setDisplayName(\"§aTarget Tracker\");\r\n\t\tcompass.setItemMeta(compassMeta);\r\n\t\tcompass.setAmount(1);\r\n\t\t\r\n player.getPlayer().getInventory().addItem(sword);\r\n player.getPlayer().getInventory().addItem(bow);\r\n player.getPlayer().getInventory().addItem(arrow);\r\n player.getPlayer().getInventory().addItem(compass);\r\n\t}",
"public static EntityArmorStand setToolTipName(Player toSend, Player toDisable, @Nullable String tip){\n EntityArmorStand stand = new EntityArmorStand(((CraftWorld) toDisable.getPlayer().getWorld()).getHandle());\n\n //set the tooltip, if its set\n if(tip!=null){\n stand.setCustomName(tip);\n stand.setCustomNameVisible(true);\n }\n\n //make it look pretty and not fall too much\n stand.setGravity(false);\n stand.setInvisible(!showArmorstandsDebug);\n stand.setSmall(true);\n\n //send the armorstand\n PacketPlayOutSpawnEntityLiving packet = new PacketPlayOutSpawnEntityLiving(stand);\n ((CraftPlayer) toSend).getHandle().playerConnection.sendPacket(packet);\n\n //make the armorstand attached to the player\n PacketPlayOutAttachEntity pckt2 = new PacketPlayOutAttachEntity(0, stand, ((CraftPlayer) toDisable).getHandle());\n ((CraftPlayer) toSend).getHandle().playerConnection.sendPacket(pckt2);\n\n return stand;\n\n }",
"@Override\r\n\tpublic void equipArmor() {\n\t\tSystem.out.println(\"아머 장착\");\r\n\t}",
"public static void send104m(Player player, int skill) {\n\t\tsendMessage(player, skill, 104273167, player.getXPMode());\n\t\tplayer.sm(\"<col=825200><shad=000000>Well done! You've achieved 104,273,167 XP in this skill! You can now purchase a Mastery Cape from the Wise Old Man.\");\n\t\treturn;\n\t}",
"public void display(String name) {\r\n\t\tthis.getShield(name).display();\r\n\t}",
"public void feedArmies (WarPlayer player) {\n super.feedPersonnages(player, 1);\n System.out.println(\" III ) Armies feeded.\");\n }",
"public void welcome(Player player) {\n\t\tplayer.speak(\"Where am I? Why is a saw in front of me? Why is my left feet handcuffed? What happened! There is a letter. I should read it......\");\n\t\tplayer.addCarried(new Item(\"handcuff\", null, new String[]{\"isWearable\", \"isDressed\", \"isPortable\", \"isImpedient\"}, new boolean[]{false, true, false, true}, new String[]{\"wearTo\"}, new String[]{\"left feet\"}));\n\t}",
"@Override\n\t\t\t\t\t public void visit(Player player) {\n\t\t\t\t\t\t\tPacketSendUtility.sendPacket(player, SM_SYSTEM_MESSAGE.STR_MSG_HF_ShugoCaravanAppear);\n\t\t\t\t\t }",
"public void sendResponseToolCard(String username, int nCard, String response) throws IOException {\n PrintWriter out= new PrintWriter(socket.getOutputStream(),true);\n out.println(username+\" responseToolCard \"+nCard+\" \"+response);\n out.close();\n socket.close();\n }",
"public void setPlayerName(String name) {\n \tplayername = name;\n }",
"private void sendThirstUpdate(EntityPlayerMP player)\n\t{\n\t\tCapability capability = SDCapabilities.THIRST;\n\t\t\n\t\t//Make new message with new data\n\t\tMessageUpdateThirst message = new MessageUpdateThirst(capability.getStorage().writeNBT(capability, SDCapabilities.getThirstData(player), null));\n\t\t\n\t\t//Send to player\n\t\tPacketHandler.instance.sendTo(message, player);\n\t}",
"public Warrior(String n)\n {\n\tname = n;\n\tHP = 1300;\n\tstr = 1000;\n\tdef = 400;\n\tdmg = 0.5;\n }",
"@Override\n\tpublic String attack(Entity e) {\n\t\tRandom rand = new Random();\n\t\tint randomDamage = rand.nextInt(4); \n\t\te.takeDamage(randomDamage);\n\t\treturn \"hits \" + e.getName() + \" for \" + randomDamage + \" damage \";\n\t}",
"public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean smt) {\n/* 122 */ int standID = getStandID(stack);\n/* 123 */ if (standID == 0) {\n/* */ return;\n/* */ }\n/* */ \n/* */ \n/* 128 */ int standAct = getStandACT(stack);\n/* 129 */ int standExp = getStandEXP(stack);\n/* */ \n/* 131 */ String standName = getStandNAME(stack);\n/* 132 */ EntityOneStand standEnt = ItemStandArrow.getStand(standID, player.worldObj);\n/* 133 */ String standEntName = standEnt.getCommandSenderName();\n/* 134 */ if (standName.equals(\"\")) {\n/* */ \n/* 136 */ standName = getEntityStandName(standEnt);\n/* */ }\n/* */ else {\n/* */ \n/* 140 */ stack.setStackDisplayName(standEntName);\n/* */ } \n/* 142 */ String standActPre = StatCollector.translateToLocal(\"stands.jojobadv.Act.txt\");\n/* 143 */ String standExpPre = StatCollector.translateToLocal(\"stands.jojobadv.Exp.txt\");\n/* */ \n/* 145 */ list.add(standName);\n/* 146 */ list.add(standActPre + \" \" + standAct + \"!\");\n/* 147 */ list.add(standExpPre + \" \" + standExp);\n/* */ }",
"private void goCharacter() {\n\t\t// TODO print player\n\t\tSystem.out.println(\"***\");\n\t\tSystem.out.println( \"Warrior: \" + playern.getName());\n\t\tSystem.out.println(\"Level: \" + playern.getLevel());\n\t\tSystem.out.println(\"Experience: \" + playern.getExp());\n\t\tSystem.out.println(\"HP \" + playern.getHp());\n\t\tSystem.out.println(\"***\");\n\t}",
"public void printPermitCards(Player player);",
"public static void Skills(Player player) {\n\t\t\r\n\t\tItemStack H = new ItemStack(Material.POTION);\r\n\t\tItemMeta HM = H.getItemMeta();\r\n\t\tHM.setDisplayName(ChatColor.RED + \"Health: \");\r\n\t}",
"public ItemStack render(Player player) {\n if (clone) return cloneItem;\n ItemStack itemStack = new ItemStack(type);\n ItemMeta itemMeta = itemStack.getItemMeta();\n if (itemMeta != null) {\n itemMeta.setDisplayName(displayName.getText(player));\n List<String> list = new ArrayList<>();\n for (ChatMessage chatMessage : lore) {\n list.add(chatMessage.getText(player));\n }\n itemMeta.setLore(list);\n if (enchanted) {\n itemMeta.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 1, true);\n itemMeta.addItemFlags(ItemFlag.HIDE_ENCHANTS);\n }\n if (unbreakable) {\n itemMeta.setUnbreakable(true);\n }\n itemStack.setItemMeta(itemMeta);\n }\n return itemStack;\n }",
"@EventHandler\n void onPlayerInteract(PlayerInteractEvent e){\n Player player = e.getPlayer();\n Block rawblock = e.getClickedBlock();\n Material block = null;\n if(rawblock != null){ block = rawblock.getType();}\n if(block != null && block == Material.DARK_OAK_WALL_SIGN){\n Sign sign = (Sign) e.getClickedBlock().getState();\n if(sign.getLine(0).equalsIgnoreCase(ChatColor.WHITE + \"[\" + ChatColor.GOLD + \"RAID\" + ChatColor.WHITE + \"]\"))\n {\n player.sendMessage(\"gg\");\n }\n }\n }",
"public void setPlayer1Name(String name){\n player1 = name;\n }",
"public void sendArpResponse(Packet packet) {\n Packet p = new Packet();\n Ethernet e = Ethernet.makeArpEthernet();\n e.setSrcMac(this.getMacAddress());\n e.setDestMac(packet.getSrcMac());\n p.setL2(e);\n\n Arp arp = Arp.makeArpResponse();\n arp.setSendIp(((Arp) packet.getL3()).getRecvIp());\n arp.setRecvIp(((Arp) packet.getL3()).getSendIp());\n arp.setSendMac(this.getMacAddress());\n arp.setRecvMac(packet.getSrcMac());\n p.setL3(arp);\n this.handleOut(packet);\n }",
"Object renameHologramPacket(int id, String text);",
"@Override\n public String executeCommand(String... commandParameters) {\n if (commandParameters.length == 0) {\n return \"Bez uvedenia toho, ktorý predmet zo svojho batohu chceš použiť, to naozaj nepôjde\";\n }\n\n if (commandParameters.length > 1) {\n return \"Nie tak zhurta! Dokážem pracovať iba s jedným predmetom\";\n }\n\n String itemToUseName = commandParameters[0];\n boolean isItemInPlayerInventory =\n gamePlan.getPlayer().getInventory().isItemInInventory(itemToUseName);\n if (!isItemInPlayerInventory) {\n return \"Tento predmet v tvojom batohu nevidím! Nezabudol si ho náhodou v nejakej inej miestnosti?\";\n }\n\n // medical mask and protective medical suit can be used without standing next to object or NPC\n if (itemToUseName.equals(ItemName.getItemName(\"MEDICAL_MASK\"))) {\n gamePlan.getPlayer().getInventory().removeItemFromInventory(itemToUseName);\n gamePlan.getPlayer().setIsPlayerWearingMedicalMask(true);\n\n boolean isPlayerWearingMedicalSuit = gamePlan.getPlayer()\n .isPlayerWearingMedicalSuit();\n if (isPlayerWearingMedicalSuit) {\n return \"Opatrnosti nikdy nie je dosť a preto si sa rozhodol nasadiť si k celotelovému obleku aj rúško\";\n }\n return \"Nasádzaš si rúško. Povinnosť nosiť rúško už síce pominula, ale koronavírus rozhodne nie!\";\n }\n\n if (itemToUseName.equals(ItemName.getItemName(\"PROTECTIVE_MEDICAL_SUIT\"))) {\n gamePlan.getPlayer().getInventory().removeItemFromInventory(itemToUseName);\n gamePlan.getPlayer().setIsPlayerWearingMedicalSuit(true);\n\n return \"Obliekaš si celotelový ochranný oblek. Možno na konci skončíš zavalený sutinami budovy, ale negatívny na Covid-19!\";\n }\n\n boolean isPlayerStandingNextToNPC = gamePlan.getActualNonPlayerCharacter() != null;\n if (isPlayerStandingNextToNPC) {\n setAlternativeGameEnding(itemToUseName);\n return gamePlan.getActualNonPlayerCharacter()\n .performSpecialAction(itemToUseName, gamePlan);\n }\n\n boolean isPlayerStandingNextToInteractableObject =\n gamePlan.getActualInteractableObject() != null;\n if (isPlayerStandingNextToInteractableObject) {\n setAlternativeGameEnding(itemToUseName);\n return gamePlan.getActualInteractableObject()\n .performSpecialAction(itemToUseName, gamePlan);\n }\n\n return \"Nenapadá mi ako tento predmet využiť, čo tak najprv pristúpiť k nejakej osobe alebo objektu a skúsiť to znovu?\";\n }",
"public void processPacket(String packet) {\n try {\n Log.e(\"info\", packet);\n JSONObject obj = new JSONObject(packet);\n JSONObject toSend = new JSONObject();\n String id = obj.getString(\"packet\");\n\n\n\n if (id.equals(\"acknowledge\")) {\n LocalPlayer ply = new LocalPlayer(activity);\n ply.identifier = socket.toString();\n ply.socket = socket;\n activity.playerMap.put(ply.identifier, ply);\n ply.latitude = 0;\n ply.longitude = 0;\n ply.bomb = false;\n ply.name = obj.getString(\"name\");\n ply.update();\n\n JSONObject playerObj = new JSONObject();\n\n playerObj.put(\"identifier\", ply.identifier);\n playerObj.put(\"latitude\", ply.latitude);\n playerObj.put(\"longitude\", ply.longitude);\n playerObj.put(\"name\", ply.name);\n playerObj.put(\"bomb\", ply.bomb);\n toSend.put(\"player\", playerObj);\n\n server.sendPacket(socket, \"initialize\", toSend);\n }\n else if (id.equals(\"bomb\")) {\n for (HashMap.Entry<String, LocalPlayer> entry : activity.playerMap.entrySet()) {\n entry.getValue().bomb = false;\n }\n LocalPlayer ply = activity.playerMap.get(obj.getString(\"identifier\"));\n if (ply.identifier.equals(activity.selfPlayer))\n Toast.makeText(activity, \"You got the bomb\", Toast.LENGTH_LONG).show();\n\n if (ply != null) {\n ply.bomb = true;\n }\n }\n else if (id.equals(\"location\")) {\n LocalPlayer ply = activity.playerMap.get(socket.toString());\n if (ply != null) {\n ply.longitude = obj.getDouble(\"longitude\");\n ply.latitude = obj.getDouble(\"latitude\");\n ply.update();\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"public String showCardInHand(){\n String handCard = \"\";\n int cardNum = 0;\n for(Card cards: playerHand)\n {\n String cardDesc;\n if (cards instanceof Mineral) {\n // Description of the Mineral card\n cardDesc = \"No: \" + cardNum + \" \" +\n \"Name: \" + cards.getCardName() + \" \" +\n \"Hardness: \" + ((Mineral) cards).getCardHardness() + \" \" +\n \"Specific Gravity: \" + ((Mineral) cards).getCardSpecGravity() + \" \" +\n \"Cleavage: \" + ((Mineral) cards).getCardCleavage() + \" \" +\n \"Crystal Abundance: \" + ((Mineral) cards).getCardCrystalAbundance() + \" \" +\n \"Economic Value: \" + ((Mineral) cards).getCardEconomicValue() + \"\\n\";\n }\n else{\n // Description of the Supertrump card\n cardDesc = \"No: \"+ cardNum+ \" \" + \"Name: \" + cards.getCardName()+ \" \" + \"Description: \" +\n ((SuperTrumps) cards).effectDescription()+ \"\\n\";\n }\n cardNum += 1;\n handCard += cardDesc; // Used for adding the description of the card in the hand\n }\n return handCard;\n }",
"public void txtResponse(String response , Player player);",
"public void showHand(){\n System.out.println(this.hand.toString());\n }",
"public String getName()\r\n/* 23: */ {\r\n/* 24:20 */ return \"Wire demo receiver\";\r\n/* 25: */ }",
"@Override\n\tpublic void setDisplayName(TangentPlayer pl) {\n\t\tgetPlayer().setDisplayName(pl.getName());\n\t}",
"@Override\n public void onExecute(GenericExecutor sender, String[] args) {\n if (sender.getOriginal() instanceof ProxiedPlayer) {\n ProxiedPlayer player = (ProxiedPlayer) sender.getOriginal();\n\n CommandProxyPayload payload = new CommandProxyPayload();\n payload.setExecutor(player.getUniqueId());\n payload.setArgs(args);\n payload.setCommandProxy(CommandProxy.SHOW);\n\n OpenAudioMcBungee.getInstance().getNodeManager().getPacketManager().sendPacket(new PacketPlayer(player), new CommandProxyPacket(payload));\n }\n }",
"public IronArmour()\n {\n name = \"iron armour\";\n hitpoints = 10;\n damageBlocked = 5;\n }",
"public String attack(Entity e) {\n return super.attack(e) + \"\\n\" + super.attack(e);\n }",
"void fireShellAtOpponent(int playerNr);",
"private void manualCommand(String player) {\n try {\n Piece s = Piece.playerValueOf(player);\n _playing = false;\n _players[s.ordinal()] = new HumanPlayer(s, this);\n } catch (IllegalArgumentException excp) {\n error(\"unknown player: %s\", player);\n System.out.println();\n }\n }",
"public void setName(String name)\r\n\t{\r\n\t\tthis.playerName = name;\r\n\t}",
"public void printHand() {\r\n System.out.printf(\"%s's cards:\\n\", name);\r\n for (int n = 0; n < numOfCards; n++) {\r\n System.out.printf(\" %s\\n\", hand[n].toString());\r\n }\r\n }",
"public String toString(){\n return player.toString() + \"\\nGained a new Skill\";\n }",
"Player() {\r\n setPlayerType(\"HUMAN\");\r\n\t}",
"public void setPlayerName(String name) {\n\t\tsuper.setPlayerName(name);\n\t}",
"default void onHitPlayer(@NotNull String name, int damage) {}",
"public void hp(Graphics g) {\n\t\tw = g.getFontMetrics().stringWidth(\"HP: \" + player.hp); //Get the width of the rendered text\n\t\tg.setColor(Color.white); //Set the colour for the text\n\t\tg.setFont(f); //Set the font for the text\n\t\tg.drawString(\"HP: \" + player.hp, WIDTH-w-25, 25); //Draw \"HP: #\" in the top right corner of the screen\n\t}",
"@Override\n public void onSmelting(EntityPlayer player, ItemStack item) {\n }",
"void SendPacket(int packetIdentifier);",
"@Override\n public void use(AbstractPlayer p, AbstractMonster m) {\n //give player plated armor\n AbstractDungeon.actionManager.addToBottom( // 2.Gain plated armor\n new com.megacrit.cardcrawl.actions.common.ApplyPowerAction(AbstractDungeon.player, AbstractDungeon.player,\n new com.megacrit.cardcrawl.powers.PlatedArmorPower(AbstractDungeon.player, 3), 3));\n }",
"public void handleHost()\n {\n String n = name.getText();\n if(n.isEmpty())\n {\n setStatus(\"Bitte Namen eingeben!\",Color.RED);\n return;\n }\n if(n.contains(\";\"))\n {\n setStatus(\"Bitte keine ; verwenden!\",Color.RED);\n return;\n }if(n.contains(\"'\"))\n {\n setStatus(\"Bitte keine ' verwenden!\",Color.RED);\n return;\n }if(n.contains(\",\"))\n {\n setStatus(\"Bitte keine , verwenden!\",Color.RED);\n return;\n }\n\n int speed = 10;\n try\n {\n speed = Integer.parseInt(speed_text.getText());\n }catch(Exception e)\n {\n setStatus(\"'\"+speed_text.getText() + \"' ist keine Zahl!\", Color.RED);\n return;\n }\n\n matchup.hostGame(n,color_snake.getValue(),color_head.getValue(),speed);\n }",
"public void DisplayWithOneCard() {\n\t\tplayers = new ArrayList<Player>();\n\t\tplayer1 = new Player(\"Nick\");\n\t\tplayer2 = new Player(\"Ausitn\");\n\t\tplayers.add(player1);\n\t\tplayers.add(player2);\n\t\tgame = new GameState();\n\t\tgame.initializeServer(players);\n\t\tRulesEngine.setColour(game, String.valueOf(Type.BLUE));\n\t\t\n\t\tgame.setTurn(0);\n\t\t\n\t\t\n\t\t//create cards to be added to player's hand and target's display\n\t\tCard redCard = new Card(Type.RED, 4);\n\t\t\n\t\t//Give one of the players a riposte card to play\n\t\tCard riposte = new Card(Type.ACTION, Card.RIPOSTE);\n\t\tgame.getAllPlayers().get(0).getHand().add(riposte);\n\t\t\n\t\t//Give target player a custom display\n\t\tgame.getDisplay(1).add(redCard);\n\t}",
"private void sendCustomMessage(String message, String alli) {\n String frontA = \"V\" + alli;\n String gobbleDeGuck = \"<ID 0><CLR><WIN 0 0 287 31><POS 0 0><SL><S S><BL N><CS 3><GRN><T>\";\n String mid = message;\n String ender = \"</T>\";\n String sendableMsgString = frontA + gobbleDeGuck + mid + ender;\n //\n sendRawMessage(sendableMsgString);\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"\\nCard Name: \" + getName() +\n\t\t\t\t\"\\nMultiverse Id: \" + getMultiverseid() +\n\t\t\t\t\"\\nMana Cost: \" + getManaCost();\n\t}",
"@Override\n public void onSmelting(EntityPlayer player, ItemStack item) \n {\n \n }",
"void giveReward(BPlayer bPlayer, int tier, int status);",
"@Override\n public void run() {\n Handler temp = getHandler();\n Scanner scanner = temp.getScanner();\n temp.getGameServer().sendMsg(\"yek nafar ra entekhab konid :(tanha yek payam baraye Mafia) \" +\n temp.getGameServer().getNames().toString(), temp);\n String msg = scanner.nextLine().strip();\n temp.getGameServer().sendMsgToMafia(temp.getName() + \" : \" + msg, temp);\n System.out.println(msg + \"<------\" + toString());\n }",
"void setName(String name) {\n setStringStat(name, playerName);\n }",
"public String getHand(){\r\n return this.handStr;\r\n }",
"void sendRawPacket(T player, ByteBuf packet) throws IllegalArgumentException;",
"public void cmdShowPlayer(User teller, Player player) {\n Formatter msg = new Formatter();\n Integer rating = player.ratings().get(USCL_RATING);\n String ratingStr = (rating == null || rating < 0) ? \"Unavailable\" : rating.toString();\n msg.format(\" Player %s:\\\\n\", player);\n msg.format(\" %6s: %s\\\\n\", \"Name\", player.getRealName());\n msg.format(\" %6s: %s\\\\n\", \"Title\", player.getTitles());\n msg.format(\" %6s: %s\\\\n\", \"Rating\", ratingStr);\n msg.format(\" %6s: %s\\\\n\", \"Team\", player.getTeam());\n msg.format(\" %6s: %s\\\\n\", \"Web\", player.getWebsite());\n command.qtell(teller, msg);\n }",
"public HL7A04(String name) {\n\t\tsuper(name);\n\t\taddSegment(new HL7Segment(\"MSH\"));\n\t\taddSegment(new HL7Segment(\"EVN\"));\n\t\taddSegment(new HL7Segment(\"PID\"));\n\t\taddSegment(new HL7Segment(\"PV1\"));\n\t}",
"@Override\r\n\tpublic void showGetPrisonCardMessage(Player player) {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void writeImpl(L2Client client, L2Player activeChar, MMOBuffer buf) throws RuntimeException\r\n\t{\n\t\tfinal boolean god = client.getVersion().isNewerThanOrEqualTo(ClientProtocolVersion.GODDESS_OF_DESTRUCTION);\r\n\t\tbuf.writeD(0); // Type\r\n\t\tbuf.writeD(0); // Servitor OID\r\n\t\tbuf.writeD(0); // Servitor\r\n\t\tbuf.writeD(0); // Attackable\r\n\t\tbuf.writeD(0); // Location X\r\n\t\tbuf.writeD(0); // Location Y\r\n\t\tbuf.writeD(0); // Location Z\r\n\t\tbuf.writeD(0); // Heading\r\n\t\tbuf.writeD(0); // 0\r\n\t\tbuf.writeD(0); // Casting speed\r\n\t\tbuf.writeD(0); // Attack speed\r\n\t\tbuf.writeD(0); // Running speed (on ground)\r\n\t\tbuf.writeD(0); // Walking speed (on ground)\r\n\t\tbuf.writeD(0); // Running speed (in water)\r\n\t\tbuf.writeD(0); // Walking speed (in water)\r\n\t\tbuf.writeD(0); // Running speed (in air) ???\r\n\t\tbuf.writeD(0); // Walking speed (in air) ???\r\n\t\tbuf.writeD(0); // Running speed (in air) while mounted?\r\n\t\tbuf.writeD(0); // Walking speed (in air) while mounted?\r\n\t\tbuf.writeF(0D); // Movement speed multiplier\r\n\t\tbuf.writeF(0D); // Attack speed multiplier\r\n\t\tbuf.writeF(0D); // Collision radius\r\n\t\tbuf.writeF(0D); // Collision height\r\n\t\tbuf.writeD(0); // Main weapon\r\n\t\tbuf.writeD(0); // Chest armor\r\n\t\tbuf.writeD(0); // Shield/support weapon\r\n\t\tbuf.writeC(0); // Owner online\r\n\t\tbuf.writeC(0); // Moving\r\n\t\tbuf.writeC(0); // In combat\r\n\t\tbuf.writeC(0); // Lying dead\r\n\t\tbuf.writeC(0); // Status\r\n\t\tbuf.writeD(0); // ???\r\n\t\tbuf.writeS(\"\"); // Name\r\n\t\tbuf.writeD(0); // ???\r\n\t\tbuf.writeS(\"\"); // Title\r\n\t\tbuf.writeD(0); // 1\r\n\t\tbuf.writeD(0); // In PvP\r\n\t\tbuf.writeD(0); // Karma\r\n\t\tbuf.writeD(0); // Current satiation\r\n\t\tbuf.writeD(0); // Maximum satiation\r\n\t\tbuf.writeD(0); // Current HP\r\n\t\tbuf.writeD(0); // Maximum HP\r\n\t\tbuf.writeD(0); // Current MP\r\n\t\tbuf.writeD(0); // Maximum MP\r\n\t\tbuf.writeD(0); // SP\r\n\t\tbuf.writeD(0); // Level\r\n\t\tbuf.writeQ(0L); // XP\r\n\t\tbuf.writeQ(0L); // Current level XP\r\n\t\tbuf.writeQ(0L); // Next level XP\r\n\t\tbuf.writeD(0); // Current carried weight\r\n\t\tbuf.writeD(0); // Maximum carried weight\r\n\t\tbuf.writeD(0); // P. Atk.\r\n\t\tbuf.writeD(0); // P. Def.\r\n\t\tif (god)\r\n\t\t{\r\n\t\t\tbuf.writeD(0); // P. Accuracy\r\n\t\t\tbuf.writeD(0); // P. Evasion\r\n\t\t\tbuf.writeD(0); // P. Critical\r\n\t\t}\r\n\t\tbuf.writeD(0); // M. Atk.\r\n\t\tbuf.writeD(0); // M. Def.\r\n\t\tif (god)\r\n\t\t{\r\n\t\t\tbuf.writeD(0); // M. Accuracy\r\n\t\t\tbuf.writeD(0); // M. Evasion\r\n\t\t\tbuf.writeD(0); // M. Critical\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tbuf.writeD(0); // Accuracy\r\n\t\t\tbuf.writeD(0); // Evasion\r\n\t\t\tbuf.writeD(0); // Critical\r\n\t\t}\r\n\t\tbuf.writeD(0); // Actual movement speed\r\n\t\tbuf.writeD(0); // Attack speed\r\n\t\tbuf.writeD(0); // Casting speed\r\n\t\tbuf.writeD(0); // Abnormal effect\r\n\t\tbuf.writeH(0); // Mountable\r\n\t\tbuf.writeC(0); // Weapon enchant glow\r\n\t\tbuf.writeH(0); // ??? 0\r\n\t\tbuf.writeC(0); // Duel team\r\n\t\tbuf.writeD(0); // Soulshot usage\r\n\t\tbuf.writeD(0); // Spiritshot usage\r\n\t\tbuf.writeD(0); // Ability level\r\n\t\tbuf.writeD(0); // Special effect\r\n\t\tif (god)\r\n\t\t{\r\n\t\t\tbuf.writeD(0); // ??? 0\r\n\t\t\tbuf.writeD(0); // ??? 0\r\n\t\t\tbuf.writeD(0); // ??? 0\r\n\t\t}\r\n\t}",
"public final void give(final Player player) {\n\t\tplayer.getInventory().addItem(this.getItem());\n\t}",
"Player(String name){\n\t\tthis.name = name;\n\t}",
"public void showDetails (Player player) {\r\n\t\tString \tc\t= Term.COLOR_INACTIVE.get();\r\n\t\t\r\n\t\t// Get the color\r\n\t\tif (getActivity() == Activity.SELL\t\t&& isActive())\r\n\t\t\tc\t= Term.COLOR_SELL.get();\r\n\t\t\r\n\t\telse if (getActivity() == Activity.BUY\t\t&& isActive())\r\n\t\t\tc\t= Term.COLOR_BUY.get();\r\n\t\t\r\n\t\telse if (getActivity() == Activity.EXCHANGE\t&& isActive())\r\n\t\t\tc\t= Term.COLOR_EXCHANGE.get();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tList<String>\tmessage\t= new ArrayList<String>();\r\n\t\t\t\t\t\tmessage.add(Term.INFO_1.get() + c + getActivity().toString() \t+ Term.INFO_2.get() + c +scs.formatCurrency(getPrice())\t\t+ Term.INFO_9.get() + c + getOwner());\r\n\t\t\r\n\t\tString \ttext\t= null;\r\n\t\tString\tname\t= getItemName();\r\n\t\t\r\n\t\tif (!isUnlimited()) {\r\n\t\t\tif (getActivity() == Activity.BUY)\r\n\t\t\t\ttext = getAmount()+ \"/\" + getMaxAmount();\r\n\t\t\telse\r\n\t\t\t\ttext = \"\" + getAmount();\r\n\t\t} else {\r\n\t\t\ttext = Term.INFO_UNLIMITED.get();\r\n\t\t}\r\n\t\t\r\n\t\tif (getItemStack().getType() == Material.WRITTEN_BOOK)\r\n\t\t\tname = getNBTStorage().getBookTitle();\r\n\t\t\r\n\t\tmessage.add(Term.INFO_4.get() + c + name\t\t\t\t+ Term.INFO_3.get() + c + text);\r\n//\t\t\t\t\t\tmessage.add(Term.INFO_4.get() + c + getItemName()\t\t\t\t+ Term.INFO_3.get() + c + (!isUnlimited() ? (getActivity() == Activity.BUY ? getMaxAmount() : getAmount()) : Term.INFO_UNLIMITED.get()));\r\n\t\t\r\n\t\tStringBuffer\tbuffer \t= new StringBuffer();\r\n\t\tString\t\t\tdelim\t= \"\";\r\n\t\r\n\t\tfor (Enchantment en : getEnchantments().keySet()) {\r\n\t\t\tint lvl\t= getEnchantments().get(en);\r\n\t\t\t\r\n\t\t\tbuffer.append(delim + en.getName() + \" lvl \" + lvl);\r\n\t\t\tdelim\t= \", \";\r\n\t\t}\r\n\t\t\r\n\t\tif (buffer.toString().length() > 0)\r\n\t\t\tmessage.add(Term.INFO_8.get() + c + buffer.toString());\r\n\t\t\r\n\t\tif (player.hasPermission(Properties.permAdmin))\r\n\t\t\tmessage.add(c + getSHA1());\r\n\t\t\r\n\t\tMessaging.mlSend(player, message);\r\n\t}",
"@Override\n public String toString() {\n return super.toString() + \"Subtype- X-wing fighter\\n\";\n }",
"public abstract void onBakestatsCommand(Player player);",
"public void sendGameInfo(Player plr){\r\n\t\t\r\n\t\tString message = \"UDGM\" + lobby.getGameString();\r\n\t\tsendOnePlayer(plr, message);\r\n\t}",
"@Override\n public String getAction() {\n return \"SELECT S.name, S.level, S.coolDown, E.effect, S.manaCost FROM hasskill AS H,\"+\n \" playerchar AS P, skill AS S, skilleffect as E WHERE P.name='\"+ name +\n \"' AND H.character = P.charid AND H.skill = S.name AND E.skill = S.name\";\n }",
"public boolean onCommand(CommandSender sender, Command command, String label, String[] args) throws ArrayIndexOutOfBoundsException{\n\t\n\t\ttry {\n\t\tString cmd = command.getName().toLowerCase();\n\t\t if (cmd.equals(\"stat\")) {\n\t\t\tif (args[0] == \"\" || args[1] == \"\" || args[0] == \"null\" || args[1] == \"null\"){\n\t\t\t\tthrow new ArrayIndexOutOfBoundsException(\"type /stat reg to register or /stat view playerName to view stats\");\n\t\t\t\t\n\t\t\t}\n\t\t\treturn statsMethod(sender,args);\n\t\t}\n\t\t\tif (args[0].equalsIgnoreCase(\"armor\")) {\n\t\t\t\tItem.class.getMethods();\n\n\t\t\t\tPlayer p = (Player)sender;\n\t\t\t\tPlayerInventory inventory = p.getInventory();\n\t\t\t\t//give the player an iron set of armor \n\t\t\t\tinventory.addItem(new ItemStack(Material.IRON_HELMET, 1));\n\t\t\t\tinventory.addItem(new ItemStack(Material.IRON_CHESTPLATE, 1));\n\t\t\t\tinventory.addItem(new ItemStack(Material.IRON_LEGGINGS, 1));\n\t\t\t\tinventory.addItem(new ItemStack(Material.IRON_HELMET, 1));\n\n\t\t\t\t//send a message to inform player they received a set of armor\n\t\t\t\tp.sendMessage(ChatColor.RED + \"Armorset is in Inventory... \");\n\t\t\t\t\n\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t}\n\telse {\n\t\t\treturn false;\n\t\t}\n\t\t}\n\t\tcatch(ArrayIndexOutOfBoundsException ie){\n\t\t\tie.printStackTrace();\n\t\t\t//System.out.println(\"type /stat view playerName to view your statistics\");\n\t\t\tsender.sendMessage(\"type /stat view playerName to view your statistics or /stat reg playerName to register \");\n\t\t}\n\t\treturn true;\n\t}",
"public void run() \n\t\t\t{\n\t\t\t\tif (Math.abs(player.getLocation().getX() - playerLoc.getX()) > 1\n\t\t\t\t\t\t|| Math.abs(player.getLocation().getY() - playerLoc.getY()) > 1\n\t\t\t\t\t\t|| Math.abs(player.getLocation().getZ() - playerLoc.getZ()) > 1)\n\t\t\t\t{\n\t\t\t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You cannot move while bandaging!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString name = player.getCustomName();\n\t\t\t\tif (name == null)\n\t\t\t\t\tname = player.getName();\n\t\t\t\t\n\t\t\t\t//Check that the recipient is still in roughly the same location\n\t\t\t\t//Skip if self-heal\n\t\t\t\tif (!player.equals(recipient))\n\t\t\t\t\tif (Math.abs(recipient.getLocation().getX() - recipientLoc.getX()) > 1\n\t\t\t\t\t\t|| Math.abs(recipient.getLocation().getY() - recipientLoc.getY()) > 1\n\t\t\t\t\t\t|| Math.abs(recipient.getLocation().getZ() - recipientLoc.getZ()) > 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You cannot bandage your patient while they are moving!\");\n\t\t\t\t\t\trecipient.sendMessage(ChatColor.YELLOW + name + \" cannot bandage you while you are moving!\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Remove item from player's inventory.\n\t \t\tplayer.getInventory().removeItem(new ItemStack(Material.getMaterial(item.toUpperCase()), 1));\n\t \t\tplayer.updateInventory();\n\t \t\t\t\n\t \t\t//Heal the other player.\n\t \t\trecipient.setHealth(recipient.getHealth() + amountToHeal);\n\n\t \t\t//Award experience.\n\t \t\tProfessionStats prof = new ProfessionStats(perms, data, config, player.getUniqueId());\n\t \t\t\n\t \t\tif (!prof.isPracticeFatigued(profession))\n\t \t\t\taddExperience(player, profession, config.getInt(\"healing.\" + item + \".exp\"));\n\t \t\t\t\n\t \t\t//Notify both parties.\n\t \t\tif (!player.equals(recipient))\n\t \t\t{\t \t\t\n\t \t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You bandaged \" + recipient.getName() + \"'s wounds.\");\n\t \t\t\trecipient.sendMessage(ChatColor.YELLOW + player.getName() + \" bandaged your wounds.\");\n\t \t\t}\n\t \t\telse\n\t \t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You bandaged your wounds.\");\n\t\t\t }",
"@Override\n public void landedOn(Player player) {}",
"public Rogue() {\r\n\t\tsuper();\r\n\t\tthis.name =\"Rogue\";\r\n\t\tthis.attackPower = 50;\r\n\t\tthis.maxHP = 35;\r\n\t\tthis.hp = this.maxHP;\r\n\t}",
"public FloatingHead(Location loc) {\n\t\t\thead = new EntityArmorStand(((CraftWorld) loc.getWorld()).getHandle());\n\t\t\thead.setLocation(loc.getX(), loc.getY(), loc.getZ(), 0, 0);\n\t\t\thead.setInvisible(true);\n\t\t\tPacketHandler.spawnNMSLivingEntity(player, head);\n\t\t\t\n\t\t\tcenterY = head.locY;\n\t\t\tintensity = (Math.random() * 4) + 1;\n\t\t\t\n\t\t\t//Attach the head to the armorstand 1 tick later to make sure it's had time to spawn\n\t\t\tBukkit.getServer().getScheduler().runTaskLaterAsynchronously(HookahPlugin.plugin, () -> PacketHandler.sendEquipment(player, head.getId(), ItemSlot.HEAD, getRandomDecoration()), 1);\n\t\t}",
"public void printAssistants(Player player);",
"public void who(String name)\n\t{\n\t\tsendRaw(\"WHO :\" + name);\n\t}",
"public void notifyTurn(String name) {\n if(name.equals(username) && !(client.getPlayer() instanceof ComputerPlayer)) {\n JOptionPane.showMessageDialog(frame, \"It's your turn!\");\n } else if(!(client.getPlayer() instanceof ComputerPlayer)) {\n JOptionPane.showMessageDialog(frame, \"It's \" + name + \"'s turn!\");\n }\n inventoryArea.append(\"\\n\\nIt's \" + name + \"'s turn\");\n }",
"public void send(Packet packet);",
"public static ItemStack skull(String name, String skull, String... lore) {\r\n\t\tItemStack is = XMaterial.PLAYER_HEAD.parseItem();\r\n\t\tSkullMeta im = (SkullMeta) is.getItemMeta();\r\n\t\tif (skull != null) im.setOwner(skull);\r\n\t\tis.setItemMeta(applyMeta(im, name, lore));\r\n\t\treturn is;\r\n\t}",
"public void printHand(){\n\t\tSystem.out.println(name + \"'s hand:\");\n\t\tfor(int i=0; i<hand.size(); i++){\n\t\t\tSystem.out.print(i+1 + \".\\t\");\n\t\t\thand.get(i).printCard();\n\t\t}\n\t}",
"private void addPlayerSheild() {\n this.playerShield += 1;\n }",
"@Override\n public void sendChatMessage(EntityPlayer player) {\n }",
"public static void giveKIT(Player p) {\r\n\t\tp.getInventory().clear();\r\n\t\tfor (String kitget : kit.keySet()) {\r\n\t\t\tString[] kitdojogador = kit.get(kitget).split(\":\");\r\n\t\t\tString kit1 = kitdojogador[0];\r\n\t\t\tString kit2 = kitdojogador[1];\r\n\t\t\tif (kit1.equalsIgnoreCase(\"PvP\") || kit2.equalsIgnoreCase(\"PvP\")) {\r\n\t\t\t\tp.getInventory().addItem(new ItemStack(Material.WOOD_SWORD));\r\n\t\t\t}\r\n\t\t\tif (kit1.equalsIgnoreCase(\"Archer\") || kit2.equalsIgnoreCase(\"Minerador\")) {\r\n\t\t\t\tp.getInventory().addItem(new ItemStack(Material.BOW));\r\n\t\t\t\tp.getInventory().addItem(new ItemStack(Material.ARROW, 10));\r\n\t\t\t}\r\n\t\t\tif (kit1.equalsIgnoreCase(\"Barbarian\")) {\r\n\t\t\t\tp.getInventory().addItem(new ItemStack(Material.WOOD_SWORD));\r\n\t\t\t}\r\n\t\t\tif (kit1.equalsIgnoreCase(\"Beastmaster\")) {\r\n\t\t\t\tp.getInventory().addItem(new ItemStack(Material.BONE, 3));\r\n\t\t\t\tp.getInventory().addItem(new ItemStack(Material.MONSTER_EGG, 3, EntityType.WOLF.getTypeId()));\r\n\t\t\t}\r\n\t\t\tif (kit1.equalsIgnoreCase(\"Grandpa\")) {\r\n\t\t\t\tItemStack g = new ItemStack(Material.STICK);\r\n\t\t\t\tItemMeta gm =g.getItemMeta();\r\n\t\t\t\tgm.addEnchant(Enchantment.KNOCKBACK, 2, true);\r\n\t\t\t\tg.setItemMeta(gm);\r\n\t\t\t\tp.getInventory().addItem(g);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void openGUISounds(Player p){\n //gui.setItem(0, new ItemStack(Material.GRASS));\n //ItemStack grass = new ItemStack(Material.SKULL_ITEM, 1, (short) 3);\n //SkullMeta skullMeta = (SkullMeta) grass.getItemMeta();\n //skullMeta.setDisplayName(ChatColor.GRAY + \"Player: \" + ChatColor.YELLOW + p.getName());\n //skullMeta.setOwner(p.getName());\n //grass.setItemMeta(skullMeta);\n //gui.setItem(1, grass);\n //p.openInventory(gui);\n }",
"@Override\n\tpublic void onPacketData(NetworkManager network, Packet250CustomPayload packet, Player player)\n\t{\n\n\t}",
"public void sendNameInfoToAll(){\r\n\t\t\r\n\t\tVector<Player> players = lobby.getLobbyPlayers();\t\r\n\t\tString message = \"UDNM\" + lobby.getNameString();\r\n\t\t\r\n\t\tif(!players.isEmpty()){\r\n\t \tfor(int i=0; i<players.size(); i++){\t \t\t\r\n\t \t\tsendOnePlayer(players.get(i), message);\t \t\t\r\n\t \t}\r\n\t\t}\r\n\t}",
"public void setName(String name) {\n monsterName = name;\n }"
] |
[
"0.59798306",
"0.59065455",
"0.5900383",
"0.58788633",
"0.57840425",
"0.57553333",
"0.57553333",
"0.57553333",
"0.5721542",
"0.5677616",
"0.5676866",
"0.56137097",
"0.55809176",
"0.55769676",
"0.55225337",
"0.549182",
"0.5476952",
"0.5476649",
"0.5476099",
"0.54645103",
"0.5400285",
"0.5383601",
"0.53786546",
"0.5360869",
"0.5322537",
"0.5261714",
"0.5253266",
"0.5221962",
"0.52170676",
"0.51925606",
"0.5191903",
"0.5190511",
"0.5185243",
"0.51737565",
"0.51674694",
"0.5166089",
"0.5159466",
"0.514869",
"0.51214457",
"0.51146364",
"0.51113206",
"0.5091853",
"0.50911003",
"0.5085078",
"0.5078216",
"0.5076162",
"0.50663584",
"0.50604177",
"0.5059778",
"0.50589836",
"0.5055667",
"0.50512856",
"0.5046946",
"0.5044246",
"0.50438225",
"0.50432926",
"0.50417733",
"0.5038023",
"0.5033062",
"0.5023889",
"0.5023143",
"0.5019944",
"0.50168437",
"0.5016396",
"0.5007762",
"0.5005593",
"0.50014675",
"0.49973834",
"0.4994946",
"0.4994052",
"0.49927545",
"0.4990874",
"0.49898508",
"0.49897936",
"0.49845716",
"0.4977458",
"0.49646455",
"0.4962206",
"0.4962057",
"0.4960177",
"0.49456906",
"0.49451327",
"0.4940598",
"0.493871",
"0.49385676",
"0.49297136",
"0.4929708",
"0.4929639",
"0.49282783",
"0.49281472",
"0.4924367",
"0.4923315",
"0.4920532",
"0.4916193",
"0.4914512",
"0.4909369",
"0.49073535",
"0.49033442",
"0.48981756",
"0.4896127"
] |
0.5962979
|
1
|
Send a chatMessage to a player
|
public static void sendChatMessage(Player toSend, byte chatType, String message){
ChatComponentText chat = new ChatComponentText(message);
PacketPlayOutChat packet = new PacketPlayOutChat(chat, chatType);
((CraftPlayer) toSend).getHandle().playerConnection.sendPacket(packet);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void sendMessage(String msg) {\n\t\tplayer.sendMessage(msg);\n\t}",
"@Override\n public void sendChatMessage(EntityPlayer player) {\n }",
"public void doSendMsg() {\n FacesContext fctx = FacesContext.getCurrentInstance();\n HttpSession sess = (HttpSession) fctx.getExternalContext().getSession(false);\n SEHRMessagingListener chatHdl = (SEHRMessagingListener) sess.getAttribute(\"ChatHandler\");\n if (chatHdl.isSession()) {\n //TODO implement chat via sehr.xnet.DOMAIN.chat to all...\n if (room.equalsIgnoreCase(\"public\")) {\n //send public inside zone\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PUBLIC, moduleCtrl.getLocalZoneID(), -1, -1);\n } else {\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PRIVATE_USER, moduleCtrl.getLocalZoneID(), -1, curUserToChat.getUsrid());\n }\n this.text = \"\";\n }\n //return \"pm:vwChatRoom\";\n }",
"void sendChat(SendChatParam param);",
"public void sendChat(String message) {\r\n connection.chat(message);\r\n }",
"private void sendMessage(CommandSender p, String msg) {\n\t\tif (p instanceof Player) {\n\t\t\tif (!((Player) p).isOnline()) return;\n\t\t}\n\t\t_.msg(p, GameMode.Sonic, msg);\n\t}",
"public void sendChat(String message) {\n\t\tenqueue(\"PRIVMSG #\"+Executable.targetChannel+\" :imGlitch \"+message);\n\t}",
"public void sendMessage(Player player, MessageType type, Object... args){\r\n player.sendMessage(type.format(args));\r\n }",
"public synchronized void sendPrivateMessageToPlayer(Player player, String message) {\n SlackUser user;\n if (isTestingMode) {\n user = session.findUserByUserName(testingModeUserName);\n } else {\n user = session.findUserByUserName(player.getUserName());\n }\n SlackMessageHandle<SlackChannelReply> openDirectHandle = session.openDirectMessageChannel(user);\n SlackChannel directChannel = openDirectHandle.getReply().getSlackChannel();\n session.sendMessage(directChannel, message, null);\n }",
"public void sendMessage(final ProxiedPlayer player, final BaseComponent component) {\r\n\t\tplayer.sendMessage(component);\r\n\t}",
"public void sendChat(String client, String message) {\n\t\t//enqueue(\"PRIVMSG #\"+myself+\" :.w \"+client + \" imGlitch \" + message); //whisper\n\t\tenqueue(\"PRIVMSG #\"+Executable.targetChannel+\" :imGlitch (@\"+client + \") \" + message);\n\t}",
"public void sendChatMessage(String chatMessage) throws IOException {\r\n\t\tif (chatMessage.length() > 2\r\n\t\t\t\t&& chatMessage.substring(0, 2).equals(\"/w \")) { //$NON-NLS-1$\r\n\t\t\tchatMessage = \"/w [\" + client.getUsername() + \"]: \" //$NON-NLS-1$ //$NON-NLS-2$\r\n\t\t\t\t\t+ chatMessage.substring(3);\r\n\t\t} else {\r\n\t\t\tchatMessage = \"[\" + client.getUsername() + \"]: \" + chatMessage; //$NON-NLS-1$ //$NON-NLS-2$\r\n\t\t}\r\n\t\tsendMessage(new Message(chatMessage, client.getID()));\r\n\t}",
"private void sendMessage(ChatMessage msg) {\n try {\n sOutput.writeObject(msg);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void sendChat(String s) {\n ACLMessage m = new ACLMessage(briscola.common.ACLCodes.ACL_CHAT);\n m.setConversationId(getChatID());\n m.setContent(s);\n if (players == null) {\n say(\"Nessun giocatore in lista\");\n } else {\n for (Player p : players) {\n m.addReceiver(p.getAID());\n }\n send(m);\n }\n }",
"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}",
"void sendMessage(String msg);",
"public void sendMessage(String message);",
"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 static void playerBroadcast(Player sender, final String message, boolean webchat, boolean console) {\n\t\tfor (StandardPlayer player : instance.getOnlinePlayers()) {\n\t\t\tif (player != sender && player.isOnline()) {\n\t\t\t\ttry {\n\t\t\t\t\tplayer.sendMessage(message);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// Can happen if a player leaves as this handler is running\n\t\t\t\t\tinstance.getLogger().severe(\"Exception while broadcasting\");\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tBukkit.getConsoleSender().sendMessage(webchatConsoleGate(message, webchat, console));\n\t}",
"private void sendMessage(String message){\n try{\n output.writeObject(nickname+\" : \" + message);\n output.flush();\n showMessage(\"\\n\"+nickname+\" : \" + message);\n }catch(IOException ioException){\n chatWindow.append(\"\\n Oops! Something went wrong!\");\n }\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 sendMessage(String message) {}",
"public void sendMessage()\r\n {\r\n MessageScreen messageScreen = new MessageScreen(_lastMessageSent);\r\n pushScreen(messageScreen);\r\n }",
"@FXML\n private void sendMessage(ActionEvent actionEvent) {\n String playerName = RiskMain.getInstance().getDomain().getPlayerName();\n System.out.println(messageInput.getText());\n String text = playerName + \": \" + messageInput.getText();\n if (RiskMain.getInstance().getDomain().isServer()) {\n this.serverInterface = RiskMain.getInstance().getDomain().getServer();\n this.serverInterface\n .sendMessageChat(RiskMain.getInstance().getDomain().getPlayerName(),\n messageInput.getText(), recipientList.getValue());\n } else {\n this.clientPlayerInterface = RiskMain.getInstance().getDomain().getClient();\n this.clientPlayerInterface.sendMessageChat(RiskMain.getInstance().getDomain().getPlayerName(),\n messageInput.getText(), recipientList.getValue());\n }\n }",
"public synchronized void sendPublicMessageToPlayer(Player recipient, String message) {\n session.sendMessage(gameChannel, recipient.getUserName() + \", \" + message,null);\n }",
"public void sendMessage(String msg) {\n Player player = RegionOwn.server.getPlayer(name);\n if (player != null) {\n player.sendMessage(msg);\n } else if (RegionOwn.pm.isPluginEnabled(\"TextPlayer\")) {\n User user = TextPlayer.findUser(name);\n user.sendText(\"Region Security System\", msg);\n }\n }",
"private void sendMessage(Space jSpace, int playerID, String msg) throws InterruptedException {\n\t\tsendHeader(jSpace, playerID, ServerCommands.message);\n\t\tjSpace.put(playerID, msg);\n\t}",
"public void sendMessageXMPP(String message, String targetUser, MainActivity mainActivity) {\n ChatManager chatmanager = xmppConnection.getChatManager();\n Chat newChat = chatmanager.createChat(targetUser, new MessageListener(mainActivity));\n\n try {\n newChat.sendMessage(message);\n System.out.println(\"yohoo message sent\");\n// receiveMessage(connection);\n } catch (XMPPException e) {\n System.out.println(\"Error Delivering block\");\n System.out.println(\"----------sendMessageXMPP---------\" + e.getMessage());\n } catch (Exception e) {\n System.out.println(\"----------sendMessageXMPP---------\" + e.getMessage());\n }\n\n }",
"private void sendTextMessage(String message) {\n if ( message == null || message.length() < 1 ) {\n return;\n }\n DateFormat localDateFormat = Constant.getServerDateFormat();\n Chat chat = new Chat(0,tournamentID,clubID,receiverID, selfID,self.getDisplayName(),\n Constant.MESSAGE_TYPE_TEXT,message,localDateFormat.format(new Date()));\n RequestAction actionPostChatText = new RequestAction() {\n @Override\n public void actOnPre() {\n et_message.setText(\"\");\n }\n\n @Override\n public void actOnPost(int responseCode, String response) {\n if ( responseCode == 201 ) {\n Log.d(TAG,\"Message sent successfully!\");\n }\n }\n };\n String url;\n if ( tournament != null ) { // tournament chat\n url = UrlHelper.urlChatByTournament(tournament.id,club.id);\n } else if ( club != null ) {// club chat\n url = UrlHelper.urlChatByClub(club.id);\n } else if ( receiver != null ) { // private chat\n url = UrlHelper.urlPrivateChat(receiver.getId());\n } else {\n Toast.makeText(getContext(), \"Unknown error!\", Toast.LENGTH_SHORT).show();\n Log.e(TAG,\"Unspecified chat type.\");\n return;\n }\n RequestHelper.sendPostRequest(url,chat.toJson(),actionPostChatText);\n }",
"public void sendMessageToClient(Object message, String username) {\n\n }",
"public void serverSendMessageToUser(String username, String message) {\r\n \t\tServerCommand serverCommand = new PrivateMessageServerCommand(message, \"server\", username, null);\r\n \r\n \t\tRoMClient userClient = this.clients.getClientByUsername(username);\r\n \r\n \t\tthis.sendCommandToClient(userClient, serverCommand);\r\n \t}",
"public void sendMessage(ChatMessage msg) {\n try{\n loginOutput.writeObject(msg);\n }\n catch(IOException e){\n display(\"Exception on send message to server: \" + e);\n }\n }",
"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 void send(Message msg);",
"private void sendMessage() {\n\t\tString text = myMessagePane.getText();\n\t\tMessage msg = new Message(text, myData.userName, myData.color);\n\n\t\tcommunicationsHandler.send(msg);\n\n\t\t// De-escape xml-specific characters\n\t\tXmlParser xmlParser = new XmlParser(myData);\n\t\tString outText = xmlParser.deEscapeXMLChars(msg.text);\n\t\tmsg.text = outText;\n\n\t\tmyMessagePane.setText(\"\");\n\t\tupdateMessageArea(msg);\n\n\t}",
"public static void opChat(Player player, String message) {\n //remove the # from the message\n String replaceFirst = message.substring(1);\n \n BaseComponent[] baseComp = assembleChatMessage(createNamePredicate(player.getName(), player.getDisplayName(), ChatColor.YELLOW + \"[OP] \" + ChatColor.RESET, \":\", ChatColor.WHITE), replaceFirst);\n opBroadcast(baseComp);\n }",
"private void sendMessage(String content, String room) {\n }",
"private void sendPlayerChat1(String s) {\n\t\tc.getPA().sendFrame200(969, 591);\n\t\tc.getPA().sendFrame126(c.playerName, 970);\n\t\tc.getPA().sendFrame126(s, 971);\n\t\tc.getPA().sendFrame185(969);\n\t\tc.getPA().sendFrame164(968);\n\t}",
"public void clientToServerChatMessage(String message){\n String chatMessage = message;\n System.out.println(\"chatmessage\" + chatID + \" \" + chatMessage);\n toServer.println(\"chatmessage\" + chatID + \" \" + chatMessage);\n toServer.flush();\n }",
"@Override\n public boolean sendMessage(ChatMessage chatMessage){\n return true;\n }",
"public void getChatMessage(String text) {\n\t\tint idplayer = gamecontroller.getPlayerController().getPlayerID();\n\t\tChatM.writeChatToDatabase(idplayer, text);\n\t}",
"public static void generalChat(Player player, String message) {\n BaseComponent[] baseComp = assembleChatMessage(createNamePredicate(player.getName(), player.getDisplayName(), \"\", \":\", ChatColor.WHITE), message);\n broadcast(baseComp);\n }",
"public void sendMessageToPlayer(JSONObject msg, Player receiver)\n {\n if (mEnable && msg != null && receiver != null) {\n Log.d(LOGTAG,\"Sending message to receiver at pos \" + receiver.getPosition());\n\n // TODO: Check if device ok?\n BluetoothDevice recDevice = receiver.getBDevice();\n mBS.send(recDevice, MessageFactory.msgToBytes(msg));\n\n } else Log.d(LOGTAG,\"There is a problem sending a message to a receiver\");\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\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}",
"void sendPacketToPlayer(Player player, Object packet);",
"@Override\n public void sendMessage(Message m) {\n commSender.sendMessage(m);\n }",
"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(String message);",
"public void sendPlayer(Player p) {\n\t\tp.sendMessage(ChatColor.GREEN + \"Welcome to the \" + ChatColor.GOLD + \"Tregmine Network\" + ChatColor.GREEN + \" Lobby!\");\n\t\tByteArrayDataOutput out = ByteStreams.newDataOutput();\n\t\tout.writeUTF(\"Connect\");\n\t\tout.writeUTF(\"Hub\");\n\t\tp.sendPluginMessage(this, \"BungeeCord\", out.toByteArray());\n\t}",
"public void sendMessage ( EnumMessageType position , String message ) {\n\t\tValidate.notNull ( position , \"position cannot be null\" );\n\t\tValidate.notNull ( message , \"message cannot be null\" );\n\t\t\n\t\tif ( Version.getServerVersion ( ).isNewerEquals ( Version.v1_12_R1 ) ) {\n\t\t\torg.bukkit.entity.Player.Spigot spigot = spigot ( );\n\t\t\t\n\t\t\tif ( spigot != null ) {\n\t\t\t\t// this will also work on versions v1_9_R4+, but there is a problem with the colors,\n\t\t\t\t// so we will instead use nms for that versions.\n\t\t\t\tspigot.sendMessage ( net.md_5.bungee.api.ChatMessageType.valueOf ( position.name ( ) ) ,\n\t\t\t\t\t\t\t\t\t net.md_5.bungee.api.chat.TextComponent.fromLegacyText ( message ) );\n\t\t\t}\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tClass < ? > component_class = ClassReflection.getNmsClass ( \"IChatBaseComponent\" );\n\t\t\t\tClass < ? >[] inner_classes = component_class.getClasses ( );\n\t\t\t\tClass < ? > chat_serializer = inner_classes.length > 0 ? component_class.getClasses ( )[ 0 ]\n\t\t\t\t\t\t: ClassReflection.getNmsClass ( \"ChatSerializer\" );\n\t\t\t\tClass < ? > packet_class = ClassReflection.getNmsClass ( \"PacketPlayOutChat\" );\n\t\t\t\tObject component = MethodReflection.get ( chat_serializer , \"a\" , String.class )\n\t\t\t\t\t\t.invoke ( chat_serializer ,\n\t\t\t\t\t\t\t\t \"{\\\"text\\\":\\\"\" + StringUtil.limit ( message , 63 ) + \"\\\"}\" );\n\t\t\t\t\n\t\t\t\t// https://wiki.vg/index.php?title=Protocol&oldid=8313\n\t\t\t\tbyte type_value;\n\t\t\t\t\n\t\t\t\tswitch ( position ) {\n\t\t\t\t\tcase CHAT: // 0: chat (chat box)\n\t\t\t\t\t\ttype_value = ( byte ) 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SYSTEM: // 1: system message (chat box)\n\t\t\t\t\t\ttype_value = ( byte ) 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase ACTION_BAR: // 2: above hotbar\n\t\t\t\t\t\ttype_value = ( byte ) 2;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthrow new IllegalStateException ( \"unsupported: \" + position );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// then sending\n\t\t\t\tObject packet = ConstructorReflection.newInstance (\n\t\t\t\t\t\tpacket_class , new Class < ? >[] { component_class , byte.class } ,\n\t\t\t\t\t\tcomponent , type_value );\n\t\t\t\t\n\t\t\t\thandleOptional ( ).ifPresent ( player -> BukkitReflection.sendPacket ( player , packet ) );\n\t\t\t} catch ( ClassNotFoundException | NoSuchMethodException | SecurityException | IllegalAccessException\n\t\t\t\t\t| IllegalArgumentException | InvocationTargetException | InstantiationException e ) {\n\t\t\t\te.printStackTrace ( );\n\t\t\t}\n\t\t}\n\t}",
"public void sendMessage(final CommandSender player, final SoundType sound, String message) {\r\n\t\t//message = ChatColor.translateHexColorCodes(message);\r\n\t\tplayer.sendMessage(TextComponent.fromLegacyText(message));\r\n\t\tif(player instanceof ProxiedPlayer)\r\n\t\t\tKaranteeniCore.getSoundHandler().playSound((ProxiedPlayer)player, sound);\r\n\t}",
"private void broadcast(String message)\n \t{\n \t\tfor(int i = 0; i < players.length; i++)\n \t\t{\n // PROTOCOL\n \t\t\tplayers[i].sendMessage(message);\n // PROTOCOL\n \t\t}\n \t}",
"@Override\r\n\tpublic void sendMessage(String message) {\n\t\t\r\n\t}",
"public void sendMessagePacket(String to, String message, Message.Type type) {\n Message msg = new Message(to, type);\n msg.setBody(message);\n xmppConnection.sendPacket(msg);\n// receiveMessage(connection);\n }",
"public static void sendMessage(String s) {\r\n sendRaw(\"PRIVMSG \" + channel + \" :\" + s + \"\\n\");\r\n Console.writeLine(nick + \": \" + s);\r\n }",
"@Override\n\tpublic void sendMessage() {\n\t\t\n\t}",
"protected void sendMessage(String msg) {\n message = msg; \n newMessage = true;\n }",
"public void sendMessage(Message msg) {\n network.sendAsync(msg);\n }",
"public void sendMessage ( UUID sender , String message ) {\n\t\texecute ( handle -> handle.sendMessage ( sender , message ) );\n\t}",
"public void processMessage(Chat chat, Message message)\n {\n }",
"Boolean sendMsg(String token, Long chatSessionId, String Content);",
"void sendMessage() {\n\n\t}",
"@Override\n\tpublic void SendMessage(String message) {\n\t\t\n\t\ttry\n\t\t{\n\t\tprintWriters.get(clients.get(0)).println(message);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\n\t}",
"public boolean sendHipChatMessage(String hipChatKey, String message) {\n\t\tthrow new NotImplementedException();\n\t}",
"public static void sendActionMessage(ServerPlayer player, Component textComponent) {\n sendMessage(player, textComponent, true);\n }",
"public void sendMessage(String message){\n pw.print(message);\n pw.flush();\n }",
"@Override\r\n\tpublic void sendMessage(String message) {\n\t\tmediator.send(message, this);\r\n\t}",
"public static void sendToTelegram(String message) {\n bot.execute(new SendMessage(chatId,message));\n }",
"void sendPacket(Player player, Object packet);",
"public void sendMessage(NetMessage message) {\n ClientDirector.getDataManager().sendMessage(message);\n }",
"public void sendPacket() throws IOException {\n\t\tbyte[] buf = playerList.toString().getBytes();\n\n\t\t// send the message to the client to the given address and port\n\t\tInetAddress address = packet.getAddress();\n\t\tint port = packet.getPort();\n\t\tpacket = new DatagramPacket(buf, buf.length, address, port);\n\t\tsocket.send(packet);\n\t}",
"public void sendChannelMessage(String msg) throws RemoteException {\n if(mService.isConnected()) {\n try {\n IJumbleService binder = mService.getBinder();\n\n int channelId = mService.getBinder().getSessionChannel().getId();\n binder.sendChannelTextMessage(channelId, msg, false);\n }\n catch(NullPointerException e) {\n Log.d(TAG, \"Unable to send command '\" + msg + \"': \" + e);\n }\n }\n }",
"private void sendMessage(String message) {\n\t\tMainstarter.meClient.sendMessage(new MessageSend(message, Mainstarter.meClient));\n\t\ttextInputMessage.clear();\n\t}",
"public static void sendMessage(CommandSender player, String msg) {\n\t\tint i;\n\t\tString part;\n\t\tCustomColor lastColor = CustomColor.WHITE;\n\t\tfor (String line : msg.split(\"\\n\")) {\n\t\t\ti = 0;\n\t\t\twhile (i < line.length()) {\n\t\t\t\tpart = getMaxString(line.substring(i));\n\t\t\t\tif (i+part.length() < line.length() && part.contains(\" \"))\n\t\t\t\t\tpart = part.substring(0, part.lastIndexOf(\" \"));\n\t\t\t\tpart = lastColor.getCustom() + part;\n\t\t\t\tplayer.sendMessage(replaceColors(part));\n\t\t\t\tlastColor = getLastColor(part);\n\t\t\t\ti = i + part.length() -1;\n\t\t\t}\n\t\t}\n\t}",
"boolean send(String message, PlayerID from, PlayerID to) {\n\t\tfor (Player player : players) {\n\t\t\tif (player.id().equals(to)) {\n\t\t\t\tplayer.sendMsg(\"P\" + from.toString() + \": \" + message);\n\t\t\t\tlog.add(new String[] { from.toString(), message, String.valueOf(System.currentTimeMillis()) });\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"private void sendMessage(String message) {\n if (mChatService.getState() != BluetoothChatService.STATE_CONNECTED) {\n // Toast.makeText(this, R.string.not_connected, Toast.LENGTH_SHORT).show();\n return;\n }\n\n if (message.length() > 0) {\n byte[] send = message.getBytes();\n mChatService.write(send);\n mOutStringBuffer.setLength(0);\n\n }\n }",
"void receiveFromServer(PlayerMessage playerMessage) throws RemoteException;",
"public void sendMessage(String msg, int client) throws Exception{\n \tlastMessageSent = new String(msg);\n \tif(client == Constants.ROBOT){\n \t\trobotHandler.sendMessage(msg);\n \t} else {\n \t\tHumanClientHandler.sendMessage(msg);\n \t}\n }",
"public void sendMessage(String userID, String message){\n\n\t\t// Checking if the user is available before sending the message.\n\n\n\t\tif(chatInstanceMap.containsKey(userID)\n\t\t\t\t&& isLoggedInWithVisgo(userID)){\n\n\t\t\ttry {\n\t\t\t\tchatInstanceMap.get(userID).sendMessage(message);\n\n\n\t\t\t} catch (XMPPException e) {\n\n\t\t\t\tSystem.out.print(\"Problem with sending message :: \" + message);\n\t\t\t\t//e.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public void messageToAll(String s) {\n\t\tfor(ClientThread player: players) {\n\t\t\tplayer.send(new Package(\"MESSAGE\",s));\n\t\t}\n\t\t\n\t}",
"@Override\n\tpublic void tellPlayer(String message) {\n\t\tSystem.out.println(message);\n\t}",
"void sendMessage(String message) {\n writer.println(message);\n }",
"public void sendMessage(String message) {\n\t\tif (!connectionActive()) {\n\t\t\tthrow new IllegalOperationException(\"Cannot send a message if you are not connected to a server!\\n\");\n\t\t}\n\t\tMessage bctMessage = Message.makeBroadcastMessage(userName, message);\n\t\tsocketConnection.print(bctMessage);\n\t}",
"private void sendMessage(String message) {\n if (mApiClient != null && mQuizCastChannel != null) {\n try {\n Cast.CastApi.sendMessage(mApiClient,\n mQuizCastChannel.getNamespace(), message)\n .setResultCallback(new ResultCallback<Status>() {\n @Override\n public void onResult(Status result) {\n if (!result.isSuccess()) {\n Log.e(context.getString(R.string.LOGTAG), \"Sending message failed\");\n }\n }\n });\n } catch (Exception e) {\n Log.e(context.getString(R.string.LOGTAG), \"Exception while sending message\", e);\n }\n } else {\n Log.d(context.getString(R.string.LOGTAG), \"Sent message successfully\");\n Log.d(context.getString(R.string.LOGTAG), message);\n }\n }",
"protected abstract void sendMessage(UUID[] players, BaseComponent[][] messages, IntConsumer response);",
"public void sendMessage(String message) {\n\n setChanged();\n notifyObservers(message);\n }",
"public void sendMessage(String s){\r\n\t\tsynchronized(msgToSend){ // synchronized to maintain thread-safety\r\n\t\t\tmsgToSend.append(s + \"\\n\");\r\n\t\t}\r\n\t}",
"public void chat ( String message ) {\n\t\texecute ( handle -> handle.chat ( message ) );\n\t}",
"public abstract void sendMessage(String message);",
"public void sendToServer(Message message){\n\t\ttry {\n\t\t\tSystem.out.println(message._sender+\" to \"+message._receiver+\": \"+message._message);\n\t\t\tFileUtils.writeLineInFile(message._sender+\" to \"+message._receiver+\": \"+message._message, new File(FileUtils.getSettingsProperty(\"path\")+\"/chatlog.txt\"));\n\t\t\t_outputStream.writeObject(message);\n\t\t\t_main._clientMenuController.updateChatlog();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"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 void sendMessage() {\n\t\tString myPosition=this.agent.getCurrentPosition();\n\t\tif (myPosition!=null){\n\t\t\t\n\t\t\tList<String> wumpusPos = ((CustomAgent)this.myAgent).getStenchs();\n\t\t\t\n\t\t\tif(!wumpusPos.isEmpty()) {\n\t\t\t\tList<String> agents =this.agent.getYellowpage().getOtherAgents(this.agent);\n\t\t\t\t\n\t\t\t\tACLMessage msg=new ACLMessage(ACLMessage.INFORM);\n\t\t\t\tmsg.setSender(this.myAgent.getAID());\n\t\t\t\tmsg.setProtocol(\"WumpusPos\");\n\t\t\t\tmsg.setContent(wumpusPos.get(0)+\",\"+myPosition);\n\t\t\t\t\n\t\t\t\tfor(String a:agents) {\n\t\t\t\t\tif(this.agent.getConversationID(a)>=0) {\n\t\t\t\t\t\tif(a!=null) msg.addReceiver(new AID(a,AID.ISLOCALNAME));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.agent.sendMessage(msg);\n\t\t\t\tthis.lastPos=myPosition;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}",
"@Override\n public void sendChat(String message) throws ModelException {\n assert message != null;\n\n try {\n String clientModel = m_theProxy.sendChat(GameModelFacade.instance().getLocalPlayer().getIndex(), message);\n new ModelInitializer().initializeClientModel(clientModel, m_theProxy.getPlayerId());\n } catch (NetworkException e) {\n throw new ModelException(e);\n }\n }",
"public static void privateMessage(Player fromPlayer, Player toPlayer, String[] message) {\n PlayerDataObject fromPDO = PlayerManager.getPlayerDataObject(fromPlayer);\n PlayerDataObject toPDO = PlayerManager.getPlayerDataObject(toPlayer);\n //target.sendMessage(ChatColor.DARK_GRAY + \"[\" + player.getFriendlyName() + ChatColor.DARK_GRAY + \" > you]: \" + ChatColor.WHITE + String.join(\" \", Arrays.copyOfRange(arg3, 1, arg3.length)).trim());\n //player.sendMessage(ChatColor.DARK_GRAY + \"[You > \" + target.getDisplayName() + ChatColor.DARK_GRAY + \"]: \" + ChatColor.WHITE + String.join(\" \", Arrays.copyOfRange(arg3, 1, arg3.length)).trim());\n ComponentBuilder toComp = new ComponentBuilder(ChatColor.DARK_GRAY + \"[\" + fromPDO.getFriendlyName() + ChatColor.DARK_GRAY + \" > you]\" + ChatColor.WHITE + \":\");\n toComp.event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(\"PM \" + fromPDO.getPlainNick()).create()));\n toComp.event(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, \"/pm \" + fromPDO.getName() + \" \"));\n toComp.append(\" \").reset();\n \n ComponentBuilder fromComp = new ComponentBuilder(ChatColor.DARK_GRAY + \"[You > \" + toPDO.getDisplayName() + ChatColor.DARK_GRAY + \"]\" + ChatColor.WHITE + \":\");\n fromComp.event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(\"PM \" + toPDO.getPlainNick()).create()));\n fromComp.event(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, \"/pm \" + toPDO.getName() + \" \"));\n fromComp.append(\" \").reset();\n \n TextComponent messageComp = new TextComponent();\n for (String part : message) {\n if (part.matches(\"^.*(https?)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|].*$\")) {\n messageComp.addExtra(assembleURLComponent(part));\n messageComp.addExtra(\" \");\n } else {\n messageComp.addExtra(part + \" \");\n }\n }\n \n BaseComponent[] toMSG = toComp\n .append(messageComp)\n .create();\n BaseComponent[] fromMsg = fromComp\n .append(messageComp)\n .create();\n \n toPDO.sendMessageIf(toMSG);\n fromPDO.sendMessageIf(fromMsg);\n }",
"public void send(String msg) {\n msgs.push(msg);\n lastMessageSentAt = game.ticks;\n }",
"boolean processChatCmd( String s )\n\t{\n\t\t\n\t\tman.getOpponent(this).out.println(s);\n\t\tman.getOpponent(this).out.flush();\n\t\tout.println(\"Message sent.\");\n\t\tout.flush();\n\t\treturn true;\n\t}",
"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}",
"protected abstract void sendMessage(UUID[] players, String[] messages, IntConsumer response);",
"public void sendMessage(CharSequence text, String conversation)\n {\n String user = currentUId();\n Map<String, Object> map = new HashMap<>();\n map.put(\"user\", user);\n map.put(\"time\", ServerValue.TIMESTAMP);\n map.put(\"text\", text.toString());\n Map<String, Object> read = new HashMap<>();\n read.put(user, true);\n map.put(\"read\", read);\n rootRef.child(\"messaging/\" + conversation).push().setValue(map, ServerValue.TIMESTAMP);\n }",
"public abstract void sendConfirmationMessage(Player player);"
] |
[
"0.7794509",
"0.76483303",
"0.75082576",
"0.7341472",
"0.73380953",
"0.73192656",
"0.72575146",
"0.71926415",
"0.7157217",
"0.7153862",
"0.7153167",
"0.71098566",
"0.7086389",
"0.70639426",
"0.70596397",
"0.7040197",
"0.7012127",
"0.6997103",
"0.6994426",
"0.6985119",
"0.69510764",
"0.6927059",
"0.6903711",
"0.6901014",
"0.68778497",
"0.68723065",
"0.68461317",
"0.6836348",
"0.682304",
"0.68106276",
"0.67965263",
"0.67945427",
"0.67902726",
"0.6777135",
"0.677456",
"0.67716306",
"0.6770811",
"0.67611325",
"0.6738874",
"0.6738171",
"0.6714508",
"0.67085725",
"0.67039114",
"0.6657851",
"0.664706",
"0.6604576",
"0.66008925",
"0.6580268",
"0.6577537",
"0.65709263",
"0.6565747",
"0.6565292",
"0.6538461",
"0.65139073",
"0.6511095",
"0.6499217",
"0.6498825",
"0.6487687",
"0.64779764",
"0.6472342",
"0.6459837",
"0.64491963",
"0.6442871",
"0.644279",
"0.64403754",
"0.6427394",
"0.64235646",
"0.63979083",
"0.63918394",
"0.6381596",
"0.63778275",
"0.6367481",
"0.6365859",
"0.6364624",
"0.6360068",
"0.6353991",
"0.6335298",
"0.6331441",
"0.6327423",
"0.63260275",
"0.63237065",
"0.6322002",
"0.6320799",
"0.6315908",
"0.63126236",
"0.63104194",
"0.6296084",
"0.62826043",
"0.62820315",
"0.62803316",
"0.62671626",
"0.62671125",
"0.6259731",
"0.6251978",
"0.6251534",
"0.6249316",
"0.62487906",
"0.6246849",
"0.62382907",
"0.6234404"
] |
0.74734354
|
3
|
Sets a name on top of a player for another player, which will remove the actual name of the player.
|
public static EntityArmorStand setToolTipName(Player toSend, Player toDisable, @Nullable String tip){
EntityArmorStand stand = new EntityArmorStand(((CraftWorld) toDisable.getPlayer().getWorld()).getHandle());
//set the tooltip, if its set
if(tip!=null){
stand.setCustomName(tip);
stand.setCustomNameVisible(true);
}
//make it look pretty and not fall too much
stand.setGravity(false);
stand.setInvisible(!showArmorstandsDebug);
stand.setSmall(true);
//send the armorstand
PacketPlayOutSpawnEntityLiving packet = new PacketPlayOutSpawnEntityLiving(stand);
((CraftPlayer) toSend).getHandle().playerConnection.sendPacket(packet);
//make the armorstand attached to the player
PacketPlayOutAttachEntity pckt2 = new PacketPlayOutAttachEntity(0, stand, ((CraftPlayer) toDisable).getHandle());
((CraftPlayer) toSend).getHandle().playerConnection.sendPacket(pckt2);
return stand;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setName(String name)\r\n\t{\r\n\t\tthis.playerName = name;\r\n\t}",
"public void setName(String name)\n {\n playersName = name;\n }",
"public void setPlayerName(String name) {\n \tplayername = name;\n }",
"void setPlayer1Name(String name) {\n if (!name.isEmpty()) {\n this.player1.setName(name);\n }\n }",
"private void setName(String nameIn){\r\n\t\tplayerName = nameIn;\r\n\t}",
"public void setPlayer2Name(String name){\n player2 = name;\n }",
"public void setPlayer1Name(String name){\n player1 = name;\n }",
"public void setPlayerName2(String name){\n\t\tplayerName2 = name;\n\t\trepaint();\n\t}",
"public void setPlayerName(String name) {\n\t\tsuper.setPlayerName(name);\n\t}",
"public void setNames(){\n System.out.println();\n System.out.println(\"Welcome! Please set your username!\");\n for(int i = 0; i < players.size(); i ++){\n Player player = players.get(i);\n player.rename(\"Dealer Jack\");\n for(int j = 0; j < i; j ++){\n while(player.getName().equals(players.get(j).getName())){\n System.out.println(\"Username taken! Please enter another name!\");\n player.setName(\"player\" + (i + 1));\n player.rename(\"Dealer Jack\");\n }\n }\n }\n }",
"public void setPlayerName(String name){\n\t\tplayerName = name;\n\t\trepaint();\n\t}",
"private void assignPlayerNames() {\n\t\tSystem.out.print(\"What is the name of the first player? \");\n\t\tplayer1.setName(sc.nextLine());\n\n\t\t// Read the second player's name\n\t\tSystem.out.print(\"What is the name of the second player? \");\n\t\tplayer2.setName(sc.nextLine());\n\n\t\twhile (player2.getName().toLowerCase()\n\t\t\t\t.equals(player1.getName().toLowerCase())) {\n\t\t\tSystem.out.print(\"Both players cannot be named \"\n\t\t\t\t\t+ player2.getName() + \".\" + \" Enter a different name: \");\n\t\t\tplayer2.setName(sc.nextLine());\n\t\t}\n\t}",
"void setName(String name) {\n setStringStat(name, playerName);\n }",
"@Override\r\n\tpublic void setOpponentName(String name) {\n\t\tmain.setOpponentUsername(name);\r\n\t}",
"public void setPlayerName(String newName) {\n if(newName == null) {\n return;\n }\n props.setProperty(\"name\", newName);\n saveProps();\n }",
"public void setPlayerName(String newName) {\n\t\tname = newName;\n\t}",
"public void setCurrentPlayerName(String name)\n {\n currentPlayerName = name;\n startGame();\n }",
"public void displayName(){\n player1.setText(p1.getName());\n player2.setText(p2.getName());\n }",
"public void setPlayerName(String playerName) {\n this.playerName = playerName;\n }",
"public void setNames() {\n\t\tPlayer1 = \"COMPUTER\";\n\t\tPlayer2 = JOptionPane.showInputDialog(null, \"Enter your Name:\");\n\t\tnames_set = true;\n\t}",
"public void updateName(Player player)\n {\n String oldName = playerLabel.getText();\n playerLabel.setText(player.getName());\n if (player.getName().equalsIgnoreCase(\"Disconnesso\"))\n {\n waiting(player.getName());\n }\n }",
"private void ReplacePlayer()\n {\n String oldPlayer = GetPlayerString(mTeamsComboBox.getSelectedItem().toString(),\n mPositionComboBox.getSelectedItem().toString());\n if( oldPlayer == null )\n return;\n\n String newPlayer = GetPlayerString_UI();\n String team = mTeamsComboBox.getModel().getElementAt(mTeamsComboBox.getSelectedIndex()).toString();\n ReplacePlayer(team, oldPlayer, newPlayer);\n }",
"Player(String name){\n\t\tthis.name = name;\n\t}",
"void setUpPlayerNames() {\n playerName.setText(this.player1.getName());\n computerName.setText(this.computer.getName());\n }",
"public void setName( final String name ) throws RemoteException {\r\n playerState.name = name;\r\n }",
"public void setName(final String name) {\n\t\tGuard.ArgumentNotNullOrEmpty(name, \"name\");\n\t\t\n\t\tthis.name = name;\n\t\t\n\t\tif (bukkitPlayer != null) {\n\t\t\tbukkitPlayer.setDisplayName(name);\n\t\t\tbukkitPlayer.setCustomName(name);\n\t\t\tbukkitPlayer.setPlayerListName(name);\n\t\t}\n\t\tdb.updateField(this, \"name\", name);\n\t}",
"public static void SetPlayerNames () {\n for (int i = 0; i < player_count; i++) {\r\n\r\n // PROMPT THE USER\r\n System.out.print(\"Player \" + (i+1) + \", enter your name: \");\r\n\r\n // INSTANTIATE A NEW PLAYER USING THE NAME THAT'S PROVIDED\r\n player[i] = new Player(input.nextLine());\r\n\r\n // IF THE PLAYER DOESN'T ENTER A NAME, CALL THEM \"BIG BRAIN\"\r\n if (player[i].name.length() == 0) {\r\n player[i].name = \"Big Brain\";\r\n System.out.println(\"Uh, OK...\");\r\n }\r\n\r\n }\r\n\r\n // MAKE SOME SPACE...\r\n System.out.println();\r\n }",
"public void setPlayerName(String playerName) {\n\t\tthis.playerName = playerName;\n\t}",
"public void setPlayerName(String[] currentMsg, Player plr){\r\n\t\t\r\n\t\tString name = plr.getName();\r\n\t\tRandom rand = new Random();\r\n\t\tString substitute = \"Player\"+rand.nextInt(99);\r\n\t\t\r\n\t\tif(currentMsg.length>1){\r\n\t\t\tif(name == null){\r\n\t\t\t\tif(currentMsg[1].equals(\"null\"))\r\n\t\t\t\t\tplr.setName(substitute);\t\t\t\t\t\r\n\t\t\t\telse\r\n\t\t\t\t\tplr.setName(currentMsg[1]);\r\n\t\t\t}else{\r\n\t\t\t\tsendAllPlayers(serverMessage(name+\" is now \" + currentMsg[1]+\"!\"), lobby.getLobbyPlayers());\r\n\t\t\t\tname = currentMsg[1];\t\r\n\t\t\t\tplr.setName(name);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tplr.setName(substitute);\r\n\t\t}\r\n\t\t\t\r\n\t\tlobby.updateNames();\r\n \tsendNameInfoToAll();\r\n\t}",
"String getNewPlayerName();",
"public void deleteCharFromName() {\n \t\tif (playerName.length() > 0 && state == 4) {\n \t\t\tplayerName = playerName.substring(0, playerName.length() - 1);\n \t\t}\n \t}",
"@Override\n\tpublic void setDisplayName(TangentPlayer pl) {\n\t\tgetPlayer().setDisplayName(pl.getName());\n\t}",
"public void removePlayer(String p) {\n this.playersNames.remove(p);\n }",
"Player(String playerName) {\n this.playerName = playerName;\n }",
"public void AskName(){\r\n\t\tSystem.out.println(\"Player 2, please enter your name: \\nPredictable Computer\");\r\n\t\tplayerName = \"Predictable Computer\";\r\n\t}",
"@Override\n public String getPlayerName()\n {\n if (currentPlayer == 0)\n {\n return playerOneName;\n }\n else\n {\n return playerTwoName;\n }\n }",
"public void setPlayer(String player) {\r\n this.player = player;\r\n }",
"public void switchPlayer(){\n // Menukar giliran player dalam bermain\n Player temp = this.currentPlayer;\n this.currentPlayer = this.oppositePlayer;\n this.oppositePlayer = temp;\n }",
"public Builder setPlayerName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n playerName_ = value;\n onChanged();\n return this;\n }",
"public void switchPlayer() {\r\n\t\tif (player == player1) {\r\n\t\t\tplayer = player2;\r\n\t\t} else {\r\n\t\t\tplayer = player1;\r\n\t\t}\r\n\t}",
"public String getNewPlayerName() {\n return newPlayerName;\n }",
"public void setFullPlayerName(String fullPlayerName) {\n this.fullPlayerName = fullPlayerName;\n\n if (this.textDrawable != null)\n this.textDrawable.setText(fullPlayerName);\n\n if (this.gameScreenFullPlayerName != null) {\n String[] strTemp = { fullPlayerName };\n this.gameScreenFullPlayerName.setText(strTemp);\n }\n }",
"public void setPlayerName()\r\n\t{\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter your name: \");\r\n\t\tname = in.nextLine();\r\n\t}",
"@Override\n\tpublic void setData(String playerName) {\n\t\tthis.currentPlayerName = playerName;\n\t\t\n\t}",
"public void switchPlayers(Player p1, Player p2) {\r\n\t\tint p1Place = getPlace(p1);\r\n\t\tint p2Place = getPlace(p2);\r\n\t\tplayers.remove(p1Place);\r\n\t\tplayers.remove(p2Place);\r\n\t\tif (p2 != null)\r\n\t\t\taddPlayer(p1Place, p2);\r\n\t\tif (p1 != null)\r\n\t\t\taddPlayer(p2Place, p1);\r\n\t}",
"public Player(String name) {\r\n this.name = name;\r\n }",
"public void removePlayer(String name) {\n for (Player player : players) {\n if (player.getName() != null && player.getName().equals(name)) {\n player.setState(false);\n for (Piece piece : player.getPieces()) {\n piece.setPosition(0);\n }\n\n // PLAYERLISTENER : Trigger playerEvent for player that LEFTGAME\n for (PlayerListener listener : playerListeners) {\n PlayerEvent event = new PlayerEvent(this, player.getColour(), PlayerEvent.LEFTGAME);\n listener.playerStateChanged(event);\n }\n\n if (player.getName().equals(players.get(activePlayer).getName())) {\n this.setNextActivePlayer();\n }\n }\n }\n }",
"public void setPlayer(Player myPlayer){\n battlePlayer=myPlayer;\n }",
"public String getPlayerName() {\n return name; \n }",
"public Player_ex1(String playerName){\n this.name = playerName;\n winner = false;\n }",
"void setHighscoreName(String _playerName) {\n String name = _playerName;\n\n System.out.println(name + \"Game\");\n if (name == null) {\n //create Scanner\n Scanner input = new Scanner(System.in);\n //prompt the user to enter the name their highscore\n System.out.println(\"\");\n System.out.println(\"Please enter your highscore name:\");\n name = input.next();\n }\n// String name = playerName;\n if (!(name.length() <= 16)) {\n String substringOfName = name.substring(0, 15);\n score.setName(substringOfName);\n } else {\n score.setName(name);\n }\n }",
"@Override\r\n\t\tpublic void dmr_setPlayingName(String str) throws RemoteException {\n\r\n\t\t}",
"public void AskName(String input){\r\n\t\tplayerName = input;\r\n\t}",
"public static void showPreviousPlayerNames() {\r\n\t\tGameSetup.choiceBoxPlayer1.select(Main.player1);\r\n\t\tGameSetup.choiceBoxPlayer2.select(Main.player2);\r\n\t\tGameSetup.choiceBoxPlayer3.select(Main.player3);\r\n\t\t\r\n\t\t//Don't show fourth player if playing 3 handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tGameSetup.choiceBoxPlayer4.select(Main.player4);\r\n\t\t}\r\n\t}",
"void setGameName(String gameName);",
"public static void clearPlayerNames() {\r\n\t\tif (GameSetup.choiceBoxPlayer1.isEnabled()) {\r\n\t\t\tGameSetup.choiceBoxPlayer1.select(0);\r\n\t\t\tMain.player1 = \"\";\r\n\t\t}\r\n\r\n\t\tif (GameSetup.choiceBoxPlayer2.isEnabled()) {\r\n\t\t\tGameSetup.choiceBoxPlayer2.select(0);\r\n\t\t\tMain.player2 = \"\";\r\n\t\t}\r\n\r\n\t\tif (GameSetup.choiceBoxPlayer3.isEnabled()) {\r\n\t\t\tGameSetup.choiceBoxPlayer3.select(0);\r\n\t\t\tMain.player3 = \"\";\r\n\t\t}\r\n\t\t\r\n\t\t//Don't show fourth player if playing 3 handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tif (GameSetup.choiceBoxPlayer4.isEnabled()) {\r\n\t\t\t\tGameSetup.choiceBoxPlayer4.select(0);\r\n\t\t\t\tMain.player4 = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void setOwner(Player player) {\n owner = player;\n }",
"static void setCurrentPlayer()\n {\n System.out.println(\"Name yourself, primary player of this humble game (or type \\\"I suck in life\\\") to quit: \");\n\n String text = input.nextLine();\n\n if (text.equalsIgnoreCase(\"I suck in life\"))\n quit();\n else\n Player.current.name = text;\n }",
"public void setPlayer(Player player) {\n this.player = player;\n }",
"public void removePlayer(String name) {\n\t\tcreateGameLobbyController.removePlayerFromList(name);\n\t}",
"public void removePlayerFromPlayerListForPlayerName(String playerName) {\n\n for (Player P : fliegeScore.getPlayers()) {\n if (P.getPlayerName().compareTo(playerName) == 0) {\n fliegeScore.getPlayers().remove(P);\n }\n }\n\n }",
"public void setName(String username) {\n\t\tthis.playlistName = username;\n\t}",
"public void createOwnerPlayer(String name, double x, double y) {\n Player player = (Player) players.get(name);\r\n if (player == null) {\r\n// System.out.println(\"Create owner player \" + name);\r\n player = new Player(name, x, y);\r\n inPlayer = player;\r\n players.put(name, player);\r\n }\r\n }",
"public String getName(){\r\n\t\treturn playerName;\r\n\t}",
"public void addPlayer(String p) {\n this.playersNames.add(p);\n }",
"public void removePlayer(String name) {\n\t\tUser user = users.get(userTurn);\n\t\tFootballPlayer player = market.findPlayer(name);\n\t\tdouble marketValue = player.getMarketValue();\n\t\t\n\t\tif (tmpTeam.size() > 0) {\n\t\t\tuser.updateBudget(marketValue, \"+\");\n\t\t\ttmpTeam.removePlayer(name);\n\t\t}\n\t\tSystem.out.println(\"budget after sell\" + user.getBudget());\n\t}",
"public void setPlayer(Player player) {\r\n this.player = player;\r\n }",
"@Override\n\tpublic void setPlayer(Player player) {\n\n\t}",
"@Override\n\tpublic String getPlayerName() {\n\t\treturn playerName;\n\t}",
"public void setPlayer(Player newPlayer) {\n roomPlayer = newPlayer;\n }",
"public void removePlayer(String name) {\n\t\tfor(Player p : playerList) {\n\t\t\tif(p.getName().equals(name)) {\n\t\t\t\toccupiedPositions.remove(p.getPosition());\n\t\t\t\tif(p.getType() == Player.PlayerType.Agent) {\n\t\t\t\t\treAssignRobots(p);\n\t\t\t\t\tthis.agents -= 1;\n\t\t\t\t}\n\t\t\t\tplayerList.remove(p);\n\t\t\t}\n\t\t}\n\t\tserver.broadcastToClient(name, SendSetting.RemovePlayer, null, null);\n\t\tserver.updateGameplane();\n\t}",
"public static void changePlayer() {\n\t\tvariableReset();\n\t\tif (curPlayer == 1)\n\t\t\tcurPlayer = player2;\n\t\telse\n\t\t\tcurPlayer = player1;\n\t}",
"public String getPlayerName() {\n\t\treturn name;\n\t}",
"public String getPlayerName(){\n\t\treturn playerName;\n\t}",
"public void setPlayer(Player player) {\n this.currentPlayer = player;\n }",
"public void setPlayer(Player player) {\n this.player = player;\n }",
"public Player(String name)\n\t{\n\t\tthis.name = name;\n\t}",
"private void giveClientName()\n\t{\n\t\trandomClientId = new Random().nextInt();\n\t\tif ( randomClientId < 0 )\n\t\t\trandomClientId = -randomClientId;\n\t\t\n\t\tthis.playerName += Integer.toString(randomClientId);\n\t}",
"public void setPlayer(Player p) {\n\t\tplayer = p;\n\t}",
"public void setUsername(String name)\r\n {\r\n int index = -1;\r\n //Check if the new username is not already taken before setting the new username\r\n if(usernamesTaken.indexOf(name) == -1)\r\n {\r\n index = usernamesTaken.indexOf(this.username);\r\n usernamesTaken.set(index, name);\r\n this.username = name;\r\n }\r\n else\r\n {\r\n //Outouts a warning message\r\n System.out.println(\"WARNING: This username is already taken\");\r\n }//end if \r\n }",
"@Override\r\n\tpublic void SavePlayerName() {\r\n\t\tPlayer player = (Player)Player.getPlayerInstance();\r\n\t\t\r\n\t\tString file = \"PlayerName.txt\";\r\n\t\tString playerName = player.getName();\r\n\t\ttry{\r\n\t\t\tPrintWriter print = new PrintWriter(file);\r\n\t\t\tprint.println(playerName);\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"Player(String Name){\n\t\tthis.Name=Name;\n\t\tdate=new Date();\n\t\tthis.Score=Score;\n\t\tScore=0;\n\t}",
"public void setName(final String pName){this.aName = pName;}",
"public void movePlayer(String playerName, Location newLocation )\n\t{\n\t\tplayerLocations.put(playerName, newLocation);\n\t}",
"public void sendPlayerName(String s) {\n try {\n dOut.writeUTF(s);\n dOut.flush();\n } catch (IOException e) {\n System.out.println(\"Could not send player name\");\n e.printStackTrace();\n }\n }",
"public RandomPlayer(String name)\r\n\t{\r\n\t\tsuper.setName(name);\r\n\t\tguessHistory=new ArrayList<Code>();\r\n\t}",
"public String getPlayerName() {\n return this.playerName;\n }",
"public void setPlayer(Player player) {\n\t\tthis.player = player;\r\n\t}",
"public void wonPoint(String playerName) {\n if (playerName.equals(player1Name))\n this.player1Score += 1;\n else\n this.player2Score += 1;\n }",
"public void setName(String newname){\n name = newname; \n }",
"public Player (String name) {\n this.name = name;\n score = 0;\n usedWords = new HashSet<>();\n }",
"public Player(String name)\n { \n if (name == \"\")\n {\n setName(\"Anonymous\");\n }\n else\n {\n setName(name);\n }\n }",
"public void setName(String name){\n\t\tthis.tournamentName = name;\n\t}",
"public void setName(final String name);",
"public Player(String name) {\n\t\tthis.name = name;\n\t\tscore = 0;\n\t}",
"public HumanPlayer(String name) {\n super(name);\n }",
"String getPlayerName();",
"public void setWinningText(String player) {\n names.setText(player +\" WINS!!!\");\n }",
"public void setName( String pName )\n {\n name = pName;\n }",
"public void setName(String newname)\n {\n name = newname;\n \n }",
"public String getPlayerName() {\n return playerName;\n }"
] |
[
"0.77333933",
"0.77119017",
"0.7629824",
"0.7616102",
"0.7608485",
"0.7591464",
"0.74991834",
"0.74854183",
"0.74569386",
"0.72970223",
"0.72890514",
"0.727578",
"0.7253456",
"0.71012145",
"0.7073202",
"0.7072697",
"0.69843316",
"0.6975555",
"0.6949409",
"0.6857638",
"0.6842593",
"0.67870533",
"0.67330986",
"0.6719179",
"0.6694373",
"0.6622109",
"0.6615644",
"0.66092426",
"0.6598967",
"0.65829676",
"0.6558354",
"0.6556575",
"0.65428025",
"0.65141153",
"0.64456284",
"0.64026415",
"0.6395237",
"0.6347273",
"0.63352436",
"0.6333249",
"0.6311772",
"0.6295989",
"0.629398",
"0.6291653",
"0.62660956",
"0.6265578",
"0.6253422",
"0.62318695",
"0.6223207",
"0.62210685",
"0.62098736",
"0.62096655",
"0.61878705",
"0.61867344",
"0.61810356",
"0.6173559",
"0.6159544",
"0.6154434",
"0.6136201",
"0.61272454",
"0.61196613",
"0.6116935",
"0.611683",
"0.6116513",
"0.6116482",
"0.6109987",
"0.61071795",
"0.6095903",
"0.6092855",
"0.6088032",
"0.6087231",
"0.6079477",
"0.60633385",
"0.6057043",
"0.60559344",
"0.6055476",
"0.605207",
"0.60393655",
"0.6021539",
"0.6018828",
"0.6013873",
"0.60006374",
"0.59952116",
"0.59932774",
"0.5980752",
"0.5976213",
"0.5968752",
"0.59635806",
"0.595372",
"0.5950146",
"0.5947724",
"0.59357464",
"0.59294283",
"0.5924281",
"0.5924235",
"0.5923564",
"0.59209085",
"0.59117043",
"0.5910337",
"0.5907082",
"0.59056425"
] |
0.0
|
-1
|
Displays a Rotating item, suspended in midair (by armorstand)
|
public static ArrayList<Entity> displaySuspendedRotatingItem(Player p, double x, double y, double z, ItemStack itemStack){
ArrayList<Entity> list = new ArrayList<>();
//put an armorstand at the location first, and make it look pretty.
EntityArmorStand stand = new EntityArmorStand(((CraftWorld) p.getPlayer().getWorld()).getHandle());
stand.setLocation(x, y, z, 0,0);
stand.setGravity(false);
stand.setInvisible(!showArmorstandsDebug);
stand.setSmall(true);
//create an item entity from our itemstack
EntityItem item = new EntityItem(((CraftWorld) p.getPlayer().getWorld()).getHandle());
item.setLocation(x, y, z, 0f, 0f);
item.setItemStack(itemStack);
item.mount(stand);
item.inactiveTick();
//make the item ride our armorstand
stand.getBukkitEntity().setPassenger(item.getBukkitEntity());
//spawn the stand for the player
PacketPlayOutSpawnEntityLiving packet = new PacketPlayOutSpawnEntityLiving(stand);
((CraftPlayer) p).getHandle().playerConnection.sendPacket(packet);
//spawn the item for the player (including metadata)
PacketPlayOutSpawnEntity itemPacket = new PacketPlayOutSpawnEntity(item, 2);
((CraftPlayer) p).getHandle().playerConnection.sendPacket(itemPacket);
PacketPlayOutEntityMetadata itemMeta = new PacketPlayOutEntityMetadata(item.getId(), item.getDataWatcher(), true);
((CraftPlayer) p).getHandle().playerConnection.sendPacket(itemMeta);
//tell the player the armorstand is ridden by the item
PacketPlayOutAttachEntity attachEntity = new PacketPlayOutAttachEntity(0, item, stand);
((CraftPlayer) p).getHandle().playerConnection.sendPacket(attachEntity);
//return all entities used
list.add(item);
list.add(stand);
return list;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void equipArmor() {\n\t\tSystem.out.println(\"아머 장착\");\r\n\t}",
"public void showArming();",
"void show() {\n if (!isDead) {\n for (int i = 0; i < bullets.size(); i++) {//show bullets\n bullets.get(i).show();\n }\n if (immortalityTimer >0) {//no need to decrease immortalityCounter if its already 0\n immortalityTimer--;\n }\n\n if (immortalityTimer >0 && floor(((float)immortalityTimer)/5)%2 ==0) {//needs to appear to be flashing so only show half of the time\n } else {\n\n Constants.processing.pushMatrix();\n Constants.processing.translate(this.position.x, this.position.y);\n Constants.processing.rotate(rotation);\n\n //actually draw the player\n Constants.processing.fill(0);\n Constants.processing.noStroke();\n Constants.processing.beginShape();\n int size = 12;\n\n //black triangle\n Constants.processing.vertex(-size - 2, -size);\n Constants.processing.vertex(-size - 2, size);\n Constants.processing.vertex(2 * size - 2, 0);\n Constants.processing.endShape(CLOSE);\n Constants.processing.stroke(255);\n\n //white out lines\n Constants.processing.line(-size - 2, -size, -size - 2, size);\n Constants.processing.line(2 * size - 2, 0, -22, 15);\n Constants.processing.line(2 * size - 2, 0, -22, -15);\n if (boosting) {//when boosting draw \"flames\" its just a little triangle\n boostCount--;\n if (floor(((float)boostCount)/3)%2 ==0) {//only show it half of the time to appear like its flashing\n Constants.processing.line(-size - 2, 6, -size - 2 - 12, 0);\n Constants.processing.line(-size - 2, -6, -size - 2 - 12, 0);\n }\n }\n Constants.processing.popMatrix();\n }\n }\n for (int i = 0; i < asteroids.size(); i++) {//show asteroids\n asteroids.get(i).show();\n }\n }",
"public void showInventory()\n\t{\n\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t+ \"__________________\\n\\n\");\n\t\tSystem.out.print(\"\\t\\t\\t\\tInventory\");\n\t\t\n\t\tfor (String s: inventory)\n\t\t{\n\t\t\tSystem.out.print(\"\\n\" + s);\n\t\t}\n\t\t\n\t\tSystem.out.print(\"\\n\\n[R] Return\\n\");\n\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t+ \"__________________\\n\\n\");\n\t\tSystem.out.print(\"Action: \");\n\t\t\n\t}",
"public void reinforceAction(){\n\t\tint u = MainPlayScreen.this.game.getCurrentPlayer().getUnplacedArmies();\n\t\t\n\t\tif( u == 0){\n\t\t\tnumberOfArmies[1].removeAllItems();\n\t\t}\t// end of if statement\n\t\t\n\t\telse{\t\t\t\t\t\n\t\t\tnumberOfArmies[1].removeAllItems();\n\t\t\tfor( int i = 1; i <= u; i++){\n\t\t\t\tSystem.out.print(i);\n\t\t\t\t\n\t\t\t\tnumberOfArmies[1].addItem(i);\n\t\t\t\t\n\t\t\t}// end of else\n\t\t} // end of else\n\t\t\n\t\tnumberOfArmies[1].repaint();\n\t}",
"private void renderHeldItem(EntityLivingBase entity, ItemStack itemStack, ItemCameraTransforms.TransformType transformType, EnumHandSide handSide, float ageInTicks, float scale) {\n/* 78 */ if (!itemStack.isEmpty()) {\n/* */ \n/* 80 */ GlStateManager.pushMatrix();\n/* */ \n/* 82 */ if (entity.isSneaking())\n/* */ {\n/* 84 */ GlStateManager.translate(0.0F, 0.2F, 0.0F);\n/* */ }\n/* */ \n/* 87 */ translateToHand(handSide, scale);\n/* 88 */ GlStateManager.rotate(-90.0F, 1.0F, 0.0F, 0.0F);\n/* 89 */ GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);\n/* 90 */ boolean flag = (handSide == EnumHandSide.LEFT);\n/* */ \n/* 92 */ if (itemStack.getItem() == Items.BOOK) {\n/* 93 */ renderBook(ageInTicks);\n/* */ } else {\n/* 95 */ Minecraft.getMinecraft().getItemRenderer().renderItemSide(entity, itemStack, transformType, flag);\n/* */ } \n/* 97 */ GlStateManager.popMatrix();\n/* */ } \n/* */ }",
"@Override\n\tpublic void showContents() {\n\t\tprogram.add(background);\n\t\tprogram.add(topMatte);\n\t\tprogram.add(bottomMatte);\n\t\tprogram.add(stackLabel);\n\t\t\n\t\tprogram.add(basePurp);\n\t\tprogram.add(currPurp);\n\t\tbasePurp.sendToFront();\n\t\tfor (int i = 0; i < callStack; i++) {\n\t\t\tprogram.add(stackBricks[i]);\n\t\t}\n\n\t\tprogram.add(player.getImage());\n\t\tplayer.move(0, 0);\n\n\t\tAudioPlayer.getInstance().playSound(\"sounds\", \"LevelMusic.mp3\", true);\n\t\tif (portalLeft != null) {\n\t\t\tprogram.add(portalLeft.getImage());\n\t\t}\n\t\tif (portalRight != null) {\n\t\t\tprogram.add(portalRight.getImage());\n\t\t\tprogram.add(portalLabel);\n\t\t}\n\t\tif (next == null || next.payloadRetrieved) {\n\t\t\tprogram.add(payload.getImage());\n\t\t}\n\n\t\tArrayList<Payload> collectedPayload = player.getPayloads();\n\n\t\tprogram.add(psuedocode);\n\n\t\tfor (int i = 0; i < collectedPayload.size(); i++) {\n\t\t\tprogram.add(collectedPayload.get(i).getImage());\n\t\t\tpsuedocode.addRtnLong();\n\t\t}\n\t}",
"public String getArmorPicture() {\r\n\t\treturn super.getItemPicture();\r\n\t}",
"public String unequipItem(String itemName) {\r\n\t\t\tif(itemName == \"unarmored\") {\r\n\t\t\t\treturn \"You do not have any armor to unequip.\"; // handles unarmored situation\r\n\t\t\t}\r\n\t\t\telse if(itemName.equals(this.getPlayer().getBodyArmor().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getBodyArmor().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getBodyArmor());\r\n\t\t\t\tthis.getPlayer().setBodyArmor(this.getDefaultBodyArmor());\t\t// set armor to default on unequip\r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getHeadgear().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getHeadgear().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getHeadgear());\r\n\t\t\t\tthis.getPlayer().setHeadgear(this.getDefaultHeadgear());\t\t// set headgear to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getGloves().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getGloves().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getGloves());\r\n\t\t\t\tthis.getPlayer().setGloves(this.getDefaultGloves());\t\t\t// set gloves to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getBoots().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getBoots().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getBoots());\r\n\t\t\t\tthis.getPlayer().setBoots(this.getDefaultBoots());\t\t\t\t// set boots to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getWeapon().getName())) {\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getWeapon());\r\n\t\t\t\tthis.getPlayer().setWeapon(this.getDefaultWeapon());\t\t\t// set weapon to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn \"You cannot unequip an item you are not wearing.\";\r\n\t\t\t}\r\n\t\t}",
"public void showDisarmed();",
"@Override\n public boolean CanArmor() {\n return false;\n }",
"@Override\r\n\tpublic void display() {\n\t\tif (silenced.contains(caster))\r\n\t\t\tdead = true;\r\n\t\tif (lastloc == null)\r\n\t\t\tlastloc = loc;\r\n\t\tdir = loc.toVector().subtract(lastloc.toVector());\r\n\t\tif (speed > 2)\r\n\t\t\tParUtils.dropItemEffectVector(loc.clone().add(0,1,0), Material.CACTUS, 1,1, 1,dir);\r\n\t\t\t\r\n\t\t\t//ParUtils.createFlyingParticle(Particles.CRIT, loc.clone().add(0,2.5,0), 0, 0, 0, 1, 5, dir.normalize());\r\n\t\t//ParUtils.createRedstoneParticle(loc.clone().add(0,2.5,0), 0.5,0.5, 0.5, 1, Color.GREEN, 1.5F);\r\n\t}",
"public void show() {\r\n\t\tif (getSpawnLocation() == null)\r\n\t\t\treturn;\r\n\r\n\t\tif (!checkItem()) {\r\n\t\t\titem \t= getWorld().dropItem(getSpawnLocation(), getItemStack());\r\n\t\t\titem.setVelocity(new Vector(0, 0.1, 0));\r\n\t\t\titem.setPickupDelay(1000);\r\n\t\t\t\r\n\t\t}\r\n\t\tisVisible \t= true;\r\n\t}",
"public void onLeftPressed(){\n player.setRotation(player.getRotation()-3);\n\n }",
"public void roam()\n {\n super.roam();\n System.out.println(\", and now that it is a wolf it is very dangerous for its prey\");\n }",
"public abstract ACTION react (ORIENTATION orientation, ITEM view);",
"public void startExecuting() {\n this.peekTime = 20 * (1 + ShulkerEntity.this.rand.nextInt(3));\n ShulkerEntity.this.updateArmorModifier(30);\n }",
"@Override\r\n\tpublic void renderDebug(Graphics2D g) {\n\t\tdouble r = TILT_ANGLE;\r\n\t\tg.translate(x, y);\t\t\t\r\n\t\tg.rotate(r);\r\n\t\tfor (int i=0; i<items.size(); i++)\r\n\t\t{\r\n\t\t\tdouble yDiff = getItemY(i) - y;\r\n\t\t\tdouble xDiff = getItemX(i) -x;\t\r\n\t\t\tInfoBit bit =items.get(i); \t\r\n\r\n\t\t\tg.translate(xDiff, yDiff);\r\n\r\n\t\t\titems.get(i).renderDebug(g);\t\t\r\n\t\t\t\r\n\t\t\tg.translate(-xDiff, -yDiff);\r\n\t\t\t\t\r\n\t\t}\r\n\t\tg.rotate(-r);\t\t\r\n\t\tg.translate(-x, -y);\r\n\t}",
"@Override\r\n\tpublic void rotate() {\n\t\t\r\n\t}",
"public String turnoitems(){\n\t\tString tur;\n\t\tint a = randint(1,5);\n\t\t\t/*Dara un item random de 1 a 5.*/\n\t\t\tif(a==1){\n\t\t\t\ttur=\"\\nHa sacado un item 1 su poder de ataque ha aumentado en 3\";\n\t\t\t\tpoderataque=poderataque+3;\n\t\t\t}else if(a==2){\n\t\t\t\ttur=\"\\nHa sacado un item 2 su vida ha aumentado en 4\";\n\t\t\t\tpuntosvida=puntosvida+4;\n\t\t\t}else if (a==3){\n\t\t\t\ttur=\"\\nHa sacado un item 3 su vida ha aumentado en 7 pero su poder de ataque se ha reducido en 2\";\n\t\t\t\tif (poderataque-2<1){\n\t\t\t\t\tpoderataque=1;\n\t\t\t\t}else{\n\t\t\t\t\tpoderataque=poderataque-2;\n\t\t\t\t}\n\t\t\t\tpuntosvida=puntosvida+7;\n\t\t\t}else{\n\t\t\t\ttur=\"\\nHa sacado un item vacio.\";\n\t\t\t}\n\t\treturn tur;\n\t}",
"LocalMaterialData rotate();",
"public interface Rotateable extends InteractiveEntity {\n Palstance getPalstance();\n double getIntetia();\n}",
"public String printPlayerInventory() {\r\n\t\t\tif(this.getPlayer().getInventory().getContent().isEmpty()) {\r\n\t\t\t\treturn \"You have no items in your inventory.\" + \"\\n\"\r\n\t\t\t\t\t\t+ \"You can carry \" + this.getPlayer().getCarryCapacity() + \" more units of weight. \\n\"\r\n\t\t\t\t\t\t+ \"You have \" + this.getPlayer().getGold() + \" gold.\";\t\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\treturn \"Your \" + this.getPlayer().getInventory().printContent()\r\n\t\t\t\t+ \"You can carry \" + this.getPlayer().getCarryCapacity() + \" more units of weight. \\n\"\r\n\t\t\t\t\t\t+ \"You have \" + this.getPlayer().getGold() + \" gold.\";\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}",
"public boolean displayLeftArm() {\r\n\t\tfinal List<Block> newBlocks = new ArrayList<>();\r\n\t\tif (this.leftArmConsumed) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tfinal Location l1 = GeneralMethods.getLeftSide(this.player.getLocation(), 1).add(0, 1.5, 0);\r\n\t\tif (!this.canPlaceBlock(l1.getBlock())) {\r\n\t\t\tthis.left.clear();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (!(this.getLeftHandPos().getBlock().getLocation().equals(l1.getBlock().getLocation()))) {\r\n\t\t\tthis.addBlock(l1.getBlock(), GeneralMethods.getWaterData(3), 100);\r\n\t\t\tnewBlocks.add(l1.getBlock());\r\n\t\t}\r\n\r\n\t\tfinal Location l2 = GeneralMethods.getLeftSide(this.player.getLocation(), 2).add(0, 1.5, 0);\r\n\t\tif (!this.canPlaceBlock(l2.getBlock()) || !this.canPlaceBlock(l1.getBlock())) {\r\n\t\t\tthis.left.clear();\r\n\t\t\tthis.left.addAll(newBlocks);\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tthis.addBlock(l2.getBlock(), Material.WATER.createBlockData(), 100);\r\n\t\tnewBlocks.add(l2.getBlock());\r\n\r\n\t\tfor (int j = 1; j <= this.initLength; j++) {\r\n\t\t\tfinal Location l3 = l2.clone().toVector().add(this.player.getLocation().clone().getDirection().multiply(j)).toLocation(this.player.getWorld());\r\n\t\t\tif (!this.canPlaceBlock(l3.getBlock()) || !this.canPlaceBlock(l2.getBlock()) || !this.canPlaceBlock(l1.getBlock())) {\r\n\t\t\t\tthis.left.clear();\r\n\t\t\t\tthis.left.addAll(newBlocks);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tnewBlocks.add(l3.getBlock());\r\n\t\t\tif (j >= 1 && this.selectedSlot == this.freezeSlot && this.bPlayer.canIcebend()) {\r\n\t\t\t\tthis.addBlock(l3.getBlock(), Material.ICE.createBlockData(), 100);\r\n\t\t\t} else {\r\n\t\t\t\tthis.addBlock(l3.getBlock(), Material.WATER.createBlockData(), 100);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.left.clear();\r\n\t\tthis.left.addAll(newBlocks);\r\n\r\n\t\treturn true;\r\n\t}",
"public void feedArmies (WarPlayer player) {\n super.feedPersonnages(player, 1);\n System.out.println(\" III ) Armies feeded.\");\n }",
"public void onRightPressed(){\n player.setRotation(player.getRotation()+3);\n\n }",
"public void liftArm(){armLifty.set(-drivePad.getThrottle());}",
"public boolean displayRightArm() {\r\n\t\tfinal List<Block> newBlocks = new ArrayList<>();\r\n\t\tif (this.rightArmConsumed) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tfinal Location r1 = GeneralMethods.getRightSide(this.player.getLocation(), 1).add(0, 1.5, 0);\r\n\t\tif (!this.canPlaceBlock(r1.getBlock())) {\r\n\t\t\tthis.right.clear();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (!(this.getRightHandPos().getBlock().getLocation().equals(r1.getBlock().getLocation()))) {\r\n\t\t\tthis.addBlock(r1.getBlock(), GeneralMethods.getWaterData(3), 100);\r\n\t\t\tnewBlocks.add(r1.getBlock());\r\n\t\t}\r\n\r\n\t\tfinal Location r2 = GeneralMethods.getRightSide(this.player.getLocation(), 2).add(0, 1.5, 0);\r\n\t\tif (!this.canPlaceBlock(r2.getBlock()) || !this.canPlaceBlock(r1.getBlock())) {\r\n\t\t\tthis.right.clear();\r\n\t\t\tthis.right.addAll(newBlocks);\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tthis.addBlock(r2.getBlock(), Material.WATER.createBlockData(), 100);\r\n\t\tnewBlocks.add(r2.getBlock());\r\n\r\n\t\tfor (int j = 1; j <= this.initLength; j++) {\r\n\t\t\tfinal Location r3 = r2.clone().toVector().add(this.player.getLocation().clone().getDirection().multiply(j)).toLocation(this.player.getWorld());\r\n\t\t\tif (!this.canPlaceBlock(r3.getBlock()) || !this.canPlaceBlock(r2.getBlock()) || !this.canPlaceBlock(r1.getBlock())) {\r\n\t\t\t\tthis.right.clear();\r\n\t\t\t\tthis.right.addAll(newBlocks);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tnewBlocks.add(r3.getBlock());\r\n\t\t\tif (j >= 1 && this.selectedSlot == this.freezeSlot && this.bPlayer.canIcebend()) {\r\n\t\t\t\tthis.addBlock(r3.getBlock(), Material.ICE.createBlockData(), 100);\r\n\t\t\t} else {\r\n\t\t\t\tthis.addBlock(r3.getBlock(), Material.WATER.createBlockData(), 100);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.right.clear();\r\n\t\tthis.right.addAll(newBlocks);\r\n\r\n\t\treturn true;\r\n\t}",
"public void rotLeft()\n\t{\n\t\t//only rotate if a PlayerShip is currently spawned\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\t((PlayerShip)gameObj[1].get(0)).moveLeft();\n\t\t\tSystem.out.println(\"Heading +10 degrees\");\n\t\t}else {\n\t\t\tSystem.out.println(\"there is not currently a player ship spawned\");\n\t\t}\n\t}",
"private void inventoryHandler(){\n final Button TAB = getOwnerArea().getKeyboard().get(Keyboard.TAB);\n final Button SPACE = getOwnerArea().getKeyboard().get(Keyboard.SPACE);\n final Button R = getOwnerArea().getKeyboard().get(Keyboard.R);\n final Button T = getOwnerArea().getKeyboard().get(Keyboard.T);\n final Button Y = getOwnerArea().getKeyboard().get(Keyboard.Y);\n final Button U = getOwnerArea().getKeyboard().get(Keyboard.U);\n final Button I = getOwnerArea().getKeyboard().get(Keyboard.I);\n final Button O = getOwnerArea().getKeyboard().get(Keyboard.O);\n final Button P = getOwnerArea().getKeyboard().get(Keyboard.P);\n final Button K = getOwnerArea().getKeyboard().get(Keyboard.K);\n\n //Used for tests, as asked in the instructions\n if (R.isPressed()) {\n inventory.add(ARPGItem.ARROW, 1);\n } else if (T.isPressed()) {\n inventory.add(ARPGItem.SWORD, 1);\n } else if (Y.isPressed()) {\n inventory.add(ARPGItem.STAFF, 1);\n } else if (U.isPressed()) {\n inventory.add(ARPGItem.BOW, 1);\n } else if (I.isPressed()) {\n inventory.add(ARPGItem.BOMB, 1);\n } else if (O.isPressed()) {\n inventory.add(ARPGItem.CASTLEKEY, 1);\n } else if (P.isPressed()) {\n inventory.add(ARPGItem.WINGS, 1);\n } else if (K.isPressed()) {\n inventory.add(ARPGItem.CHESTKEY, 1);\n }\n\n /*If the player does not have any currentItem anymore we switch it (f. ex. if a player\n uses his last bomb or if the constructor assigns as the player's current item an item\n he does not possess by mistake)\n */\n if(!possess(currentItem)) {\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n }\n\n //Switches item.\n if(TAB.isPressed()){\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n if(currentItem == ARPGItem.ARROW){\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n }\n }\n\n //Uses the item and adapts the animations\n if(SPACE.isPressed() && !isDisplacementOccurs()){\n if(currentItem.use(getOwnerArea(), getOrientation(), getCurrentMainCellCoordinates())){\n switch(currentItem){\n case BOMB:\n inventory.remove(currentItem, 1);\n break;\n case BOW:\n if(actionTimer >= COOLDOWN) {\n animateAction = true;\n currentAnimation = bowAnimations[getOrientation().ordinal()];\n shootArrow = true;\n actionTimer = 0.f;\n }\n break;\n case SWORD:\n animateAction = true;\n currentAnimation = swordAnimations[getOrientation().ordinal()];\n break;\n case STAFF:\n animateAction = true;\n currentAnimation = staffAnimations[getOrientation().ordinal()];\n break;\n }\n\n }\n }\n\n //Wings have a special treatment because SPACE needs to be down and not pressed\n if (currentItem == ARPGItem.WINGS && SPACE.isDown()) {\n //Sets the animation for the current orientation. Make sure it doesn't fly yet\n // so that the animation is not stuck.\n if (!canFly) {\n currentAnimation = flyAnimations[getOrientation().ordinal()];\n }\n canFly = true;\n } else {\n //Resets to idleAnimations\n if (canFly) {\n currentAnimation = idleAnimations[getOrientation().ordinal()];\n }\n canFly = false;\n }\n }",
"public void rotLauncherRight()\n\t{\n\t\tIIterator iter = gameObj.getIterator();\n\t\twhile(iter.hasNext())\n\t\t{\n\t\t\tGameObject current = (GameObject)iter.getNext();\n\t\t\tif(current instanceof PlayerShip)\n\t\t\t{\n\t\t\t\t((PlayerShip)current).moveLauncherRight();\n\t\t\t\tSystem.out.println(\"launcher heading -20\");\n\t\t\t\tnotifyObservers();\n\t\t\t\treturn;\n\t\t\t}\t\n\t\t}\n\t\tSystem.out.println(\"There is no playerShip spawned\");\n\t}",
"public void rotateLeft() {\n // I fucked up? Rotations are reversed, just gonna switch em\n// tileLogic = getRotateLeft();\n tileLogic = getRotateRight();\n// rotateLeftTex();\n rotateRightTex();\n }",
"public void rotLauncher()\n\t{\n\t\t//only rotate if a PlayerShip, and therefore a MissileLauncher is spawned\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\t((PlayerShip)gameObj[1].get(0)).moveLauncher();\n\t\t\tSystem.out.println(\"Launcher rotated 10 degrees\");\n\t\t}else\n\t\t\tSystem.out.println(\"A player ship is not currently spawned\");\n\t}",
"public String showItemInfo()\n {\n return \"The room has 1 \" + currentItem.getDescription() \n + \" weighted \" + currentItem.getWeight() + \" pounds\"; \n }",
"@Override\n\tprotected void execute() {\n\t\tmyLowerArm.set(-0.25);\n\t}",
"private void setArmorPoint (int arm)\r\n {\r\n if (arm < 1 || arm >25)\r\n {\r\n armorPoint = 1;\r\n }\r\n else\r\n {\r\n armorPoint = arm;\r\n }\r\n }",
"public void rotRight()\n\t{\n\t\t//only rotate if a PlayerShip is currently spawned\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\t((PlayerShip)gameObj[1].get(0)).moveRight();\n\t\t\tSystem.out.println(\"Heading -10 degrees\");\n\t\t}else {\n\t\t\tSystem.out.println(\"there is not currently a player ship spawned\");\n\t\t}\n\t}",
"public void printInventory()\n { \n System.out.println();\n\n // Checks if the player has items.\n if(!(getPerson(PLAYER).getInventory().getItems().isEmpty())){\n System.out.println(\"In your backpack, you have:\");\n\n // Gets each item in the player's inventory.\n for(Item item: getPerson(PLAYER).getInventory().getItems()){\n System.out.print(item.getName() + \",\");\n }\n System.out.println();\n System.out.println(\"You are carrying \"+ getPerson(PLAYER).getWeight() + \"kg.\");\n }\n else{\n System.out.println(\"There are currently no items in your backpack.\");\n }\n System.out.println();\n }",
"void rightInv() {\n startAnimation(rightSubCubes(), Axis.X, Direction.ANTICLOCKWISE);\n rightCubeSwap();\n rightCubeSwap();\n rightCubeSwap();\n }",
"@Override\n\tpublic int getArmor() {\n\t\treturn 0;\n\t}",
"void rotateInv() {\n startAnimation(allSubCubes(), Axis.Y, Direction.ANTICLOCKWISE);\n rotateCubeSwap();\n rotateCubeSwap();\n rotateCubeSwap();\n }",
"public void act() \r\n {\r\n super.mueve();\r\n super.tocaBala();\r\n super.creaItem();\r\n \r\n if(getMoveE()==0)\r\n {\r\n \r\n if(shut%3==0)\r\n {\r\n dispara();\r\n shut=shut%3;\r\n shut+=1;\r\n \r\n }\r\n else \r\n shut+=1;\r\n }\r\n super.vidaCero();\r\n }",
"protected void rotateScreen(Activity activity){\n \t\tApplicationData applicationData = SplashActivity.getApplicationData();\n \t\tString rotation = applicationData.getRotation();\n \t\trotateScreen(activity, rotation);\n \n }",
"@Override\n\tpublic void rotate() {\n\t}",
"public static void clearArmor(Player player)\n\t{\n\t\tPlayerInventory inv = player.getInventory();\n\t\tinv.setArmorContents(new ItemStack[4]);\n\t}",
"@Override\n public void onSmelting(EntityPlayer player, ItemStack item) \n {\n \n }",
"@Override\r\n\tpublic void rotar() {\n\r\n\t}",
"@SuppressWarnings(\"incomplete-switch\")\n\tprivate void rotatingBehavior() {\n\t\tif (remainingSteps > 0) {\n\t\t\tremainingSteps--;\n\t\t} else {\n\t\t\tswitch (facing) {\n\t\t\t\tcase LEFT:\n\t\t\t\t\tchangeFacing(ACTION.UP);\n\t\t\t\t\tbreak;\n\t\t\t\tcase UP:\n\t\t\t\t\tchangeFacing(ACTION.RIGHT);\n\t\t\t\t\tbreak;\n\t\t\t\tcase RIGHT:\n\t\t\t\t\tchangeFacing(ACTION.DOWN);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOWN:\n\t\t\t\t\tchangeFacing(ACTION.LEFT);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tremainingSteps = STEP_SIZE;\n\t\t}\n\t}",
"private void doItemVerification() {\n\t\tif (actor != null && !actor.attributes.getInventory().contains(Items.FISHING_ROD)) {\r\n\t\t\tactor.say(\"fishing.norod\", getAssigningPlayer());\r\n\t\t\treset();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tactor.setHeldItem(actor.attributes.getInventory()\r\n\t\t\t\t.getStackInSlot(actor.attributes.getInventory().getFirstSlotContainingItem(Items.FISHING_ROD))\r\n\t\t\t\t.getItem());\r\n\t}",
"public String getDescription() {return \"Use an item in your inventory\"; }",
"@Override\r\n\tpublic void rotateLeft() {\n\t\tsetDirection((this.getDirection() + 3) % 4);\r\n\t}",
"public void play()\n {\n try\n {\n Thread.sleep(1000/level);\n boolean x = current.translate(1, 0);\n if(!x)\n {\n clearCompletedRows();\n current = new Tetrad(grid);\n\n }\n display.showBlocks();\n\n }\n catch(InterruptedException e)\n {\n\n }\n\n }",
"public static void showCombatInterface(Player player, int weapon) {\n\t\tString itemName = ItemAssistant.getItemName(weapon);\n\t\tfor (int i = 0; i < unarmedItemNames.length; i++) {\n\t\t\tif (itemName.toLowerCase().equals(unarmedItemNames[i])) {\n\t\t\t\tplayer.playerAssistant.setSidebarInterface(0, 5855); // punch, kick, block\n\t\t\t\tplayer.getPA().sendFrame126(itemName, 5857);\n\t\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\t\tCombatInterface.updateClickedCombatStyle(player);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tboolean doNotChange = false;\n\t\tif ((GameType.isPreEoc() && weapon == 19780)) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 4705);\n\t\t\tplayer.getPA().sendFrame246(426, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 4708);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"whip\")\n\t\t\t\t|| itemName.toLowerCase().contains(\"abyssal tentacle\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 12290); // flick, lash, deflect\n\t\t\tplayer.getPA().sendFrame246(12291, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 12293);\n\t\t\treAdjustCombatStyle(player, \"AGGRESSIVE\", ServerConstants.CONTROLLED);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"chinchompa\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 27500); // first param\n\t\t\tplayer.getPA().sendFrame126(itemName, 27503); // first param + 2\n\t\t\treAdjustCombatStyle(player, \"DEFENSIVE\", ServerConstants.CONTROLLED);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"dagger\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 2276); // stab, lunge, slash, block\n\t\t\tplayer.getPA().sendFrame246(2277, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 2279);\n\t\t}\n\t\telse if (itemName.toLowerCase().contains(\"bow\") || itemName.toLowerCase().contains(\"ballista\") || itemName.toLowerCase().contains(\"cannon\") || itemName.toLowerCase().contains(\"javelin\") || itemName.toLowerCase().contains(\"throwing\") || itemName.toLowerCase().contains(\"dragon thrownaxe\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 1764); // accurate, rapid, longrange\n\t\t\tplayer.getPA().sendFrame246(1765, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 1767);\n\t\t\treAdjustCombatStyle(player, \"DEFENSIVE\", ServerConstants.CONTROLLED);\n\t\t} else if (!itemName.toLowerCase().contains(\"saradomin sword\") && !itemName.toLowerCase().contains(\"blessed sword\") && !itemName.toLowerCase().contains(\"2h\") && (\n\t\t\t\titemName.toLowerCase().contains(\"rapier\") || itemName.toLowerCase().contains(\"sword\") && !itemName.toLowerCase().contains(\"godsword\") && !itemName.toLowerCase()\n\t\t\t\t .contains(\n\t\t\t\t\t\t \"longsword\"))\n\t\t\t\t|| itemName.toLowerCase().contains(\"toktz-xil-ek\") || itemName.toLowerCase().contains(\"toktz-xil-ak\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 2276); // stab, lunge, slash, block\n\t\t\tplayer.getPA().sendFrame246(2277, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 2279);\n\t\t} else if (itemName.toLowerCase().contains(\"staff\") || itemName.toLowerCase().contains(\"wand\") || itemName.toLowerCase().contains(\"staff of light\")\n\t\t\t\t|| itemName.toLowerCase().contains(\"trident\") || itemName.toLowerCase().contains(\"thammaron's sceptre\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 328); // bash, pound, focus.\n\t\t\tplayer.getPA().sendFrame246(329, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 331);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t}\n\t\telse if (itemName.toLowerCase().contains(\"dart\") || itemName.toLowerCase().contains(\"knife\") || itemName.toLowerCase().contains(\"blowpipe\") || itemName.toLowerCase()\n\t\t .contains(\n\t\t\t\t \"toktz-xil-ul\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 4446); // accurate, rapid, longrange\n\t\t\tplayer.getPA().sendFrame246(4447, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 4449);\n\t\t\treAdjustCombatStyle(player, \"DEFENSIVE\", ServerConstants.CONTROLLED);\n\t\t} else if (itemName.toLowerCase().contains(\"pickaxe\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 5570); // spike, impale, smash, block\n\t\t\tplayer.getPA().sendFrame246(5571, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 5573);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"axe\") || itemName.toLowerCase().contains(\"hatchet\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 1698); // chop, hack, smash, block\n\t\t\tplayer.getPA().sendFrame246(1699, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 1701);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"claws\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 7762);\n\t\t\tplayer.getPA().sendFrame246(7763, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 7765);\n\t\t} else if (itemName.toLowerCase().contains(\"halberd\") || itemName.toLowerCase().contains(\"scythe\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 8460); // jab, swipe, fend\n\t\t\tplayer.getPA().sendFrame246(8461, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 8463);\n\t\t\treAdjustCombatStyle(player, \"ACCURATE\", ServerConstants.AGGRESSIVE);\n\t\t} else if (itemName.toLowerCase().contains(\"spear\") || itemName.toLowerCase().contains(\"hasta\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 4679); // lunge, swipe, pound, block\n\t\t\tplayer.getPA().sendFrame246(4680, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 4682);\n\t\t\treAdjustCombatStyle(player, \"AGGRESSIVE ACCURATE\", ServerConstants.CONTROLLED);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"mace\") || itemName.toLowerCase().contains(\"barrelchest\") || itemName.toLowerCase().contains(\"flail\") || itemName.toLowerCase()\n\t\t .contains(\n\t\t\t\t \"cane\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 3796);\n\t\t\tplayer.getPA().sendFrame246(3797, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 3799);\n\t\t} else if (itemName.toLowerCase().contains(\"maul\") || itemName.toLowerCase().contains(\"hammer\") || itemName.toLowerCase().contains(\"tzhaar-ket-om\")\n\t\t || itemName.toLowerCase().contains(\"dinh's\") || itemName.contains(\"spade\") || itemName.contains(\"club\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 425); // war hamer equip.\n\t\t\tplayer.getPA().sendFrame246(426, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 428);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"godsword\") || itemName.toLowerCase().contains(\"2h\") || itemName.toLowerCase().contains(\"saradomin sword\")\n\t\t\t\t|| itemName.toLowerCase().contains(\"sara's blessed sword\")\n\t\t\t\t|| (GameType.isPreEoc() && weapon == 19780)) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 4705); // Godsword.\n\t\t\tplayer.getPA().sendFrame246(426, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 4708);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 2423); // chop, slash, lunge, block\n\t\t\tplayer.getPA().sendFrame246(2424, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 2426);\n\t\t}\n\t\tswitch (weapon) {\n\t\t\tcase 20779:\n\t\t\t\tplayer.playerAssistant.setSidebarInterface(0, 425); // war hamer equip.\n\t\t\t\tplayer.getPA().sendFrame246(426, 200, weapon);\n\t\t\t\tplayer.getPA().sendFrame126(itemName, 428);\n\t\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\t\tdoNotChange = true;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Whip is the only main weapon where the aggressive option is controlled, so make it easier by if i use whip and switch to another weapon, it puts the other weapon\n\t\t//on aggressive instead of longrange/lunge.\n\t\tif (player.wasWearingAggressiveSharedXpWeapon && !doNotChange) {\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t}\n\t\tplayer.wasWearingAggressiveSharedXpWeapon = false;\n\t\tCombatInterface.updateClickedCombatStyle(player);\n\t}",
"public void printInventory(){\n\t\tint i;\n\t\tint listSize = inventory.size();\n\t\tRoll temp;\n\t\tString outputText;\n\t\toutputText = \"Inventory Stocks Per Roll: \";\n\t\t//outputText = inventory.get(0).getRoll().getType() + \" Roll Current stock: \" + inventory.get(0).getStock();\n\t\tfor(i = 0; i < listSize; i++){\n\t\t\tif(i % 3 == 0){\n\t\t\t\toutputText = outputText + \"\\n\";\n\t\t\t}\n\t\t\toutputText = outputText + inventory.get(i).getRoll().getType() + \" : \" + inventory.get(i).getStock() + \" \";\n\t\t}\n\t\tSystem.out.println(outputText);\n\t\tthis.status = outputText;\n\t\tsetChanged();\n notifyObservers();\n\t}",
"public void rotate() {\n\t\tclearPiece();\n\t\trotateFirstBlock();\n\t\trotateSecondBlock();\n\t\trotateFourthBlock();\n\t\tsetPiece();\n\t\trepaint();\n\t}",
"public void rotRight()\n\t{\n\t\t//only rotate if a PlayerShip is currently spawned\n\t\tIIterator iter = gameObj.getIterator();\n\t\twhile(iter.hasNext())\n\t\t{\n\t\t\tGameObject current = (GameObject)iter.getNext();\n\t\t\tif(current instanceof PlayerShip)\n\t\t\t{\n\t\t\t\t((PlayerShip)current).moveRight();\n\t\t\t\tSystem.out.println(\"Heading +20\");\n\t\t\t\tnotifyObservers();\n\t\t\t\treturn;\n\t\t\t}\t\n\t\t}\n\t\tSystem.out.println(\"There is no playerShip spawned\");\n\t}",
"@Override\n\tpublic void action() {\n\t\tsuppressed = false;\n\t\t//if (Settings.motorAAngle == -90) Settings.motorAAngle = -95;\n\n\t\tMotor.A.rotateTo(Settings.motorAAngle, true);\n\n\t\twhile (Motor.A.isMoving() && !Motor.A.isStalled() && !suppressed);\t\t\t\n\t\t\n\t\tMotor.A.stop();\n\t}",
"private void viewBackpack() {\n Item[] inventory = GameControl.getSortedInventoryList();\r\n \r\n System.out.println(\"\\n List of inventory Items\");\r\n System.out.println(\"Description\" + \"\\t\" + \r\n \"Required\" + \"\\t\" +\r\n \"In Stock\");\r\n \r\n // For each inventory item\r\n for (Item inventoryItem : inventory){\r\n // Display the description, the required amount and amount in stock\r\n System.out.println(InventoryItem.getType + \"\\t \" +\r\n InventoryItem.requiredAmount + \"\\t \" +\r\n InventoryItem.getQuantity);\r\n }\r\n \r\n }",
"@SideOnly(Side.CLIENT)\n public static void renderItemStack_Full(ItemStack stk,double posX, double posY, double posZ, double screenPosX, double screenPosY, double screenPosZ, float rotation, float rotationZ, float colorRed, float colorGreen, float colorBlue, float offsetX, float offsetY, float offsetZ, boolean force3DRender)\n {\n \tif(stk != null)\n \t{\n\t \t ItemStack itemstack = stk.copy();\n\t \t itemstack.stackSize = 1; //Doing this so no weird glitches occur.\n\t RenderBlocks renderBlocksRi = new RenderBlocks();\n\t Random random = new Random(); \n\t boolean renderWithColor = true;\n\t if (itemstack != null && itemstack.getItem() != null)\n\t {\n\t Minecraft.getMinecraft().renderEngine.bindTexture(Minecraft.getMinecraft().renderEngine.getResourceLocation(stk.getItemSpriteNumber()));\n\t TextureUtil.func_152777_a(false, false, 1.0F);\n\t random.setSeed(187L);\n\t GL11.glPushMatrix();\n\t float f2 = rotationZ;\n\t float f3 = rotation;\n\t byte b0 = 1;\n\t\n\t if (stk.stackSize > 1)\n\t {\n\t b0 = 2;\n\t }\n\t\n\t if (stk.stackSize > 5)\n\t {\n\t b0 = 3;\n\t }\n\t\n\t if (stk.stackSize > 20)\n\t {\n\t b0 = 4;\n\t }\n\t\n\t if (stk.stackSize > 40)\n\t {\n\t b0 = 5;\n\t }\n\t\n\t GL11.glTranslated((float)screenPosX+offsetX, (float)screenPosY+offsetY, (float)screenPosZ+offsetZ);\n\t GL11.glEnable(GL12.GL_RESCALE_NORMAL);\n\t float f6;\n\t float f7;\n\t int k;\n\t EntityItem fakeItem = new EntityItem(Minecraft.getMinecraft().theWorld, posX, posY, posZ, stk);\n\t GL11.glRotatef(f2, 0, 0, 1);\n\t if (ForgeHooksClient.renderEntityItem(fakeItem, itemstack, f2, f3, random, Minecraft.getMinecraft().renderEngine, renderBlocksRi, b0))\n\t {\n\t \n\t }\n\t else if (itemstack.getItemSpriteNumber() == 0 && itemstack.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemstack.getItem()).getRenderType()))\n\t {\n\t Block block = Block.getBlockFromItem(itemstack.getItem());\n\t GL11.glRotatef(f3, 0.0F, 1.0F, 0.0F);\n\t float f9 = 0.25F;\n\t k = block.getRenderType();\n\t\n\t if (k == 1 || k == 19 || k == 12 || k == 2)\n\t {\n\t f9 = 0.5F;\n\t }\n\t\n\t if (block.getRenderBlockPass() > 0)\n\t {\n\t GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);\n\t GL11.glEnable(GL11.GL_BLEND);\n\t OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);\n\t }\n\t\n\t GL11.glScalef(f9, f9, f9);\n\t\n\t for (int l = 0; l < b0; ++l)\n\t {\n\t GL11.glPushMatrix();\n\t\n\t if (l > 0)\n\t {\n\t f6 = (random.nextFloat() * 2.0F - 1.0F) * 0.2F / f9;\n\t f7 = (random.nextFloat() * 2.0F - 1.0F) * 0.2F / f9;\n\t float f8 = (random.nextFloat() * 2.0F - 1.0F) * 0.2F / f9;\n\t GL11.glTranslatef(f6, f7, f8);\n\t }\n\t\n\t renderBlocksRi.renderBlockAsItem(block, itemstack.getItemDamage(), 1.0F);\n\t GL11.glPopMatrix();\n\t }\n\t\n\t if (block.getRenderBlockPass() > 0)\n\t {\n\t GL11.glDisable(GL11.GL_BLEND);\n\t }\n\t }\n\t else\n\t {\n\t if (itemstack.getItem().requiresMultipleRenderPasses())\n\t {\n\t GL11.glScalef(0.5F, 0.5F, 0.5F);\n\t for (int j = 0; j < itemstack.getItem().getRenderPasses(itemstack.getItemDamage()); ++j)\n\t {\n\t random.setSeed(187L);\n\t itemstack.getItem().getIcon(itemstack, j);\n\t renderItemStack(stk, posX, posY, posZ, screenPosX, screenPosY, screenPosZ, rotation, colorRed, colorGreen, colorBlue, j, stk.stackSize,force3DRender);\n\t }\n\t }\n\t else\n\t {\n\t if (itemstack != null && itemstack.getItem() instanceof ItemCloth)\n\t {\n\t GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);\n\t GL11.glEnable(GL11.GL_BLEND);\n\t OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);\n\t }\n\t GL11.glScalef(0.5F, 0.5F, 0.5F);\n\t itemstack.getIconIndex();\n\t\n\t if (renderWithColor)\n\t {\n\t renderItemStack(stk, posX, posY, posZ, screenPosX, screenPosY, screenPosZ, rotation, colorRed, colorGreen, colorBlue, 0, stk.stackSize,force3DRender);\n\t }\n\t if (itemstack != null && itemstack.getItem() instanceof ItemCloth)\n\t {\n\t GL11.glDisable(GL11.GL_BLEND);\n\t }\n\t }\n\t }\n\t fakeItem = null;\n\t GL11.glDisable(GL12.GL_RESCALE_NORMAL);\n\t GL11.glPopMatrix();\n\t Minecraft.getMinecraft().renderEngine.bindTexture(Minecraft.getMinecraft().renderEngine.getResourceLocation(stk.getItemSpriteNumber()));\n\t TextureUtil.func_147945_b();\n\t }\n\t itemstack = null;\n \t}\n }",
"private static Inventory BanMenu(Inventory inv) {\n\t\tinv.setItem(0, new ItemStack(ItemStackUtil.nameItem(Material.BEDROCK, \"perm ban\", \"perm ban de hacker\")));\n\t\tinv.setItem(1, new ItemStack(ItemStackUtil.nameItem(Material.DIAMOND_SWORD, \"PVP\", \"voor alle pvp hackers\")));\n\t\tinv.setItem(2, new ItemStack(ItemStackUtil.nameItem(Material.DIAMOND_ORE, \"X-RAY\", \"ban de X-ray hacker\")));\n\t\tinv.setItem(3, new ItemStack(ItemStackUtil.nameItem(Material.ARROW, \"spam\", \"veel berichten in chat sturen achter elkaar\")));\n\t\tinv.setItem(4, new ItemStack(ItemStackUtil.nameItem(Material.EMERALD, \"scam\", \"mensen oplichten\")));\n\t\tinv.setItem(5, new ItemStack(ItemStackUtil.nameItem(Material.BRICK, \"inapropiate builds\", \"niet toegestane gebouwen\")));\n\t\tinv.setItem(6, new ItemStack(ItemStackUtil.nameItem(Material.SIGN, \"inapropiate skin/IGN\", \"verkeerde skin of naam\")));\n\t\tinv.setItem(7, new ItemStack(ItemStackUtil.nameItem(Material.BARRIER, \"schelden\", \"slecht woord gebruik\")));\n\t\tinv.setItem(8, new ItemStack(ItemStackUtil.nameItem(Material.RED_BED, \"other\", \"overig\")));\n\n\t\t//bottom row for the time bans whitout the known reason\n\t\tinv.setItem(9, new ItemStack(ItemStackUtil.nameItem(Material.GREEN_WOOL, \"1 uur ban\", \"green\")));\n\t\tinv.setItem(10, new ItemStack(ItemStackUtil.nameItem(Material.LIME_WOOL, \"4 uur ban\", \"lime\")));\n\t\tinv.setItem(11, new ItemStack(ItemStackUtil.nameItem(Material.YELLOW_WOOL, \"8 uur ban\", \"yellow\")));\n\t\tinv.setItem(12, new ItemStack(ItemStackUtil.nameItem(Material.ORANGE_WOOL, \"1 dag ban\", \"orange\")));\n\t\tinv.setItem(13, new ItemStack(ItemStackUtil.nameItem(Material.BLUE_WOOL, \"1 week ban\", \"blue\")));\n\t\tinv.setItem(14, new ItemStack(ItemStackUtil.nameItem(Material.BROWN_WOOL, \"1 month ban\", \"brown\")));\n\t\tinv.setItem(15, new ItemStack(ItemStackUtil.nameItem(Material.GRAY_WOOL, \"2 month ban\", \"dark brown\")));\n\t\tinv.setItem(16, new ItemStack(ItemStackUtil.nameItem(Material.RED_WOOL, \"6 month ban\", \"red\")));\n\t\tinv.setItem(17, new ItemStack(ItemStackUtil.nameItem(Material.MAGENTA_WOOL, \"1 jaar ban\", \"dark red\")));\n\t\treturn inv;\n\t}",
"public void doItemEffect(RobotPeer robot){\n\t\t//System.out.println(\"Energy = \" + robot.getEnergy());\n\t\trobot.updateEnergy(-15);\n\t\t//System.out.println(\"Poison item USED\");\n\t\t//System.out.println(\"Energy = \" + robot.getEnergy());\n\t\t\n\t}",
"public void DisplayWithShield() {\n\t\tplayers = new ArrayList<Player>();\n\t\tplayer1 = new Player(\"Nick\");\n\t\tplayer2 = new Player(\"Ausitn\");\n\t\tplayers.add(player1);\n\t\tplayers.add(player2);\n\t\tgame = new GameState();\n\t\tgame.initializeServer(players);\n\t\tRulesEngine.setColour(game, String.valueOf(Type.BLUE));\n\t\t\n\t\tgame.setTurn(0);\n\t\t\n\t\t\n\t\t//create cards to be added to player's hand and target's display\n\t\tCard purpleCard = new Card(Type.PURPLE, 3);\n\t\tCard greenCard = new Card(Type.GREEN, 1);\n\t\tCard yellowCard = new Card(Type.YELLOW, 2);\n\t\tCard blueCard = new Card(Type.BLUE, 3);\n\t\tCard redCard = new Card(Type.RED, 4);\n\t\tCard squire = new Card(Type.WHITE, 2);\n\t\tCard maiden = new Card (Type.WHITE, 6);\n\t\tCard shield = new Card(Type.ACTION, Card.SHIELD);\n\t\t\n\t\t//Give one of the players a riposte card to play\n\t\tCard riposte = new Card(Type.ACTION, Card.RIPOSTE);\n\t\tgame.getAllPlayers().get(0).getHand().add(riposte);\n\t\t\n\t\t//Give target player a custom display\n\t\tgame.getDisplay(1).add(redCard);\n\t\tgame.getDisplay(1).add(purpleCard);\n\t\tgame.getDisplay(1).add(blueCard);\n\t\tgame.getDisplay(1).add(greenCard);\n\t\tgame.getDisplay(1).add(squire);\n\t\tgame.getDisplay(1).add(yellowCard);\n\t\tgame.getDisplay(1).add(maiden);\n\t\tgame.getShield(1).add(shield); //give player a shield\n\t}",
"static void displayInv()\r\n {\r\n //Draws the current inventory \r\n \r\n char[][] inv = MainApp.inv;\r\n \r\n //Assigns formatting variables\r\n char i0_0 = inv[0][0];\r\n char i1_0 = inv[0][1];\r\n char i2_0 = inv[0][2];\r\n char i3_0 = inv[0][3];\r\n char i0_1 = inv[1][0];\r\n char i1_1 = inv[1][1];\r\n char i2_1 = inv[1][2];\r\n char i3_1 = inv[1][3];\r\n char i0_2 = inv[2][0];\r\n char i1_2 = inv[2][1];\r\n char i2_2 = inv[2][2];\r\n char i3_2 = inv[2][3];\r\n \r\n String temp = MainApp.playerName;\r\n \r\n //displays the inventory\r\n \r\n System.out.printf(\"%s's inventory\\n\", temp);\r\n System.out.printf(\"~~~~~~~~~~~~~~\\n\");\r\n System.out.printf(\"| %1s %1s %1s %1s |\\n\", i0_0, i1_0, i2_0, i3_0);\r\n System.out.printf(\"| %1s %1s %1s %1s |\\n\", i0_1, i1_1, i2_1, i3_1);\r\n System.out.printf(\"| %1s %1s %1s %1s |\\n\", i0_2, i1_2, i2_2, i3_2);\r\n System.out.printf(\"~~~~~~~~~~~~~~\\n\");\r\n System.out.printf(\"%d Small Potions\\n\",MainApp.potions[0]);\r\n System.out.printf(\"%d Medium Potions\\n\",MainApp.potions[1]);\r\n System.out.printf(\"%d Large Potions\\n\",MainApp.potions[2]);\r\n \r\n \r\n }",
"public void equip();",
"public void target()\n {\n if(noRotation == false)\n {\n if(timer % 3 == 0)\n {\n int currentRotation = getRotation();\n turnTowards(xMouse, yMouse);\n int newRotation = getRotation();\n if (Math.abs(currentRotation-newRotation) > 180)\n {\n if (currentRotation < 180) currentRotation += 360;\n else newRotation += 360;\n }\n if(currentRotation != newRotation)\n { \n setRotation(currentRotation+direction()*8);\n }\n }\n }\n }",
"public void rotLeft()\n\t{\n\t\t//only rotate if a PlayerShip is currently spawned\n\t\tIIterator iter = gameObj.getIterator();\n\t\twhile(iter.hasNext ())\n\t\t{\n\t\t\tGameObject current = (GameObject)iter.getNext();\n\t\t\tif(current instanceof PlayerShip)\n\t\t\t{\n\t\t\t\t((PlayerShip)current).moveLeft();\n\t\t\t\tSystem.out.println(\"Heading -20\");\n\t\t\t\tnotifyObservers();\n\t\t\t\treturn;\n\t\t\t}\t\n\t\t}\n\t\tSystem.out.println(\"There is no playerShip spawned\");\n\t}",
"public static boolean renderCustomArmorEffect(EntityLivingBase entity, ItemStack itemStack, ModelBase model, float limbSwing, float prevLimbSwing, float partialTicks, float timeLimbSwing, float yaw, float pitch, float scale) {\n/* 854 */ if (enchantmentProperties == null)\n/* */ {\n/* 856 */ return false;\n/* */ }\n/* 858 */ if (Config.isShaders() && Shaders.isShadowPass)\n/* */ {\n/* 860 */ return false;\n/* */ }\n/* 862 */ if (itemStack == null)\n/* */ {\n/* 864 */ return false;\n/* */ }\n/* */ \n/* */ \n/* 868 */ int[][] idLevels = getEnchantmentIdLevels(itemStack);\n/* */ \n/* 870 */ if (idLevels.length <= 0)\n/* */ {\n/* 872 */ return false;\n/* */ }\n/* */ \n/* */ \n/* 876 */ HashSet<Integer> layersRendered = null;\n/* 877 */ boolean rendered = false;\n/* 878 */ TextureManager textureManager = Config.getTextureManager();\n/* */ \n/* 880 */ for (int i = 0; i < idLevels.length; i++) {\n/* */ \n/* 882 */ int id = idLevels[i][0];\n/* */ \n/* 884 */ if (id >= 0 && id < enchantmentProperties.length) {\n/* */ \n/* 886 */ CustomItemProperties[] cips = enchantmentProperties[id];\n/* */ \n/* 888 */ if (cips != null)\n/* */ {\n/* 890 */ for (int p = 0; p < cips.length; p++) {\n/* */ \n/* 892 */ CustomItemProperties cip = cips[p];\n/* */ \n/* 894 */ if (layersRendered == null)\n/* */ {\n/* 896 */ layersRendered = new HashSet();\n/* */ }\n/* */ \n/* 899 */ if (layersRendered.add(Integer.valueOf(id)) && matchesProperties(cip, itemStack, idLevels) && cip.textureLocation != null) {\n/* */ \n/* 901 */ textureManager.bindTexture(cip.textureLocation);\n/* 902 */ float width = cip.getTextureWidth(textureManager);\n/* */ \n/* 904 */ if (!rendered) {\n/* */ \n/* 906 */ rendered = true;\n/* */ \n/* 908 */ if (Config.isShaders())\n/* */ {\n/* 910 */ ShadersRender.layerArmorBaseDrawEnchantedGlintBegin();\n/* */ }\n/* */ \n/* 913 */ GlStateManager.enableBlend();\n/* 914 */ GlStateManager.depthFunc(514);\n/* 915 */ GlStateManager.depthMask(false);\n/* */ } \n/* */ \n/* 918 */ Blender.setupBlend(cip.blend, 1.0F);\n/* 919 */ GlStateManager.disableLighting();\n/* 920 */ GlStateManager.matrixMode(5890);\n/* 921 */ GlStateManager.loadIdentity();\n/* 922 */ GlStateManager.rotate(cip.rotation, 0.0F, 0.0F, 1.0F);\n/* 923 */ float texScale = width / 8.0F;\n/* 924 */ GlStateManager.scale(texScale, texScale / 2.0F, texScale);\n/* 925 */ float offset = cip.speed * (float)(Minecraft.getSystemTime() % 3000L) / 3000.0F / 8.0F;\n/* 926 */ GlStateManager.translate(0.0F, offset, 0.0F);\n/* 927 */ GlStateManager.matrixMode(5888);\n/* 928 */ model.render((Entity)entity, limbSwing, prevLimbSwing, timeLimbSwing, yaw, pitch, scale);\n/* */ } \n/* */ } \n/* */ }\n/* */ } \n/* */ } \n/* */ \n/* 935 */ if (rendered) {\n/* */ \n/* 937 */ GlStateManager.enableAlpha();\n/* 938 */ GlStateManager.enableBlend();\n/* 939 */ GlStateManager.blendFunc(770, 771);\n/* 940 */ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n/* 941 */ GlStateManager.matrixMode(5890);\n/* 942 */ GlStateManager.loadIdentity();\n/* 943 */ GlStateManager.matrixMode(5888);\n/* 944 */ GlStateManager.enableLighting();\n/* 945 */ GlStateManager.depthMask(true);\n/* 946 */ GlStateManager.depthFunc(515);\n/* 947 */ GlStateManager.disableBlend();\n/* */ \n/* 949 */ if (Config.isShaders())\n/* */ {\n/* 951 */ ShadersRender.layerArmorBaseDrawEnchantedGlintEnd();\n/* */ }\n/* */ } \n/* */ \n/* 955 */ return rendered;\n/* */ }",
"public ItemStack render(Player player) {\n if (clone) return cloneItem;\n ItemStack itemStack = new ItemStack(type);\n ItemMeta itemMeta = itemStack.getItemMeta();\n if (itemMeta != null) {\n itemMeta.setDisplayName(displayName.getText(player));\n List<String> list = new ArrayList<>();\n for (ChatMessage chatMessage : lore) {\n list.add(chatMessage.getText(player));\n }\n itemMeta.setLore(list);\n if (enchanted) {\n itemMeta.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 1, true);\n itemMeta.addItemFlags(ItemFlag.HIDE_ENCHANTS);\n }\n if (unbreakable) {\n itemMeta.setUnbreakable(true);\n }\n itemStack.setItemMeta(itemMeta);\n }\n return itemStack;\n }",
"@SuppressWarnings(\"deprecation\")\r\n\t@Override\r\n public EnumActionResult onItemUse(EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ)\r\n {\r\n \tItemStack stack = playerIn.getHeldItem(hand);\r\n \tif (side == EnumFacing.DOWN && side == EnumFacing.UP)\r\n {\r\n return EnumActionResult.PASS;\r\n }\r\n else if (!playerIn.canPlayerEdit(pos.offset(side), side, stack))\r\n {\r\n return EnumActionResult.PASS;\r\n }\r\n \tIBlockState iblockstate = worldIn.getBlockState(pos);\r\n Block block = iblockstate.getBlock();\r\n if (block == ModBlocks.crystalLog)\r\n {\r\n \tCrystalColors.Basic wood = iblockstate.getValue(CrystalColors.COLOR_BASIC);\r\n \tif(wood == CrystalColors.Basic.BLUE && TYPE !=PlantType.BLUE)return EnumActionResult.PASS;\r\n \tif(wood == CrystalColors.Basic.RED && TYPE !=PlantType.RED)return EnumActionResult.PASS;\r\n \tif(wood == CrystalColors.Basic.GREEN && TYPE !=PlantType.GREEN)return EnumActionResult.PASS;\r\n \tif(wood == CrystalColors.Basic.DARK && TYPE !=PlantType.DARK)return EnumActionResult.PASS;\r\n pos = pos.offset(side);\r\n\r\n if (worldIn.isAirBlock(pos))\r\n {\r\n IBlockState iblockstate1 = getPlant().getBlock().getStateForPlacement(worldIn, pos, side, hitX, hitY, hitZ, 0, playerIn);\r\n worldIn.setBlockState(pos, iblockstate1, 10);\r\n SoundType soundtype = worldIn.getBlockState(pos).getBlock().getSoundType(worldIn.getBlockState(pos), worldIn, pos, playerIn);\r\n worldIn.playSound(playerIn, pos, soundtype.getPlaceSound(), SoundCategory.BLOCKS, (soundtype.getVolume() + 1.0F) / 2.0F, soundtype.getPitch() * 0.8F);\r\n \r\n if (!playerIn.capabilities.isCreativeMode)\r\n {\r\n \tItemStackTools.incStackSize(stack, -1);\r\n }\r\n }\r\n\r\n return EnumActionResult.SUCCESS;\r\n }\r\n return EnumActionResult.PASS;\r\n }",
"void idle()\n {\n\n elevatorOffset = 0;\n motorTimeline.pause();\n }",
"@Override\n public void imprime(){\n System.out.println(\" ----- Arbol Splay ----- \");\n imprimeAS(super.getRaiz());\n }",
"public abstract void rotateLeft();",
"public void displayActionItemScreen() throws SQLException, ClassNotFoundException {\n String item = console_actionItemList.getSelectionModel().getSelectedItem();\n all_teams();\n all_members();\n if(item != null && !item.isEmpty())\n getAction_Name().setDisable(true);\n actionItemClass obj = new actionItemClass();\n obj.displayActionItemScreen(this,item);\n }",
"@Override\r\n public ItemStack getCurrentArmor(int slotIn)\r\n {\n return null;\r\n }",
"public void upPressed() {\n System.out.println(\"upPressed()\");\n current.rotate();\n display.showBlocks();\n }",
"@Override\r\n\tpublic String fly() {\n\t\tString volar = \"Puede volar\";\r\n\t\treturn volar;\r\n\t}",
"private void setArmor() {\n\n if (VersionChecker.currentVersionIsUnder(12, 2)) return;\n if (!ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_ARMOR)) return;\n\n eliteMob.getEquipment().setItemInMainHandDropChance(0);\n eliteMob.getEquipment().setHelmetDropChance(0);\n eliteMob.getEquipment().setChestplateDropChance(0);\n eliteMob.getEquipment().setLeggingsDropChance(0);\n eliteMob.getEquipment().setBootsDropChance(0);\n\n if (hasCustomArmor) return;\n\n if (!(eliteMob instanceof Zombie || eliteMob instanceof PigZombie ||\n eliteMob instanceof Skeleton || eliteMob instanceof WitherSkeleton)) return;\n\n eliteMob.getEquipment().setBoots(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.AIR));\n\n if (eliteMobLevel >= 12)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.LEATHER_HELMET));\n\n if (eliteMobLevel >= 14)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.LEATHER_BOOTS));\n\n if (eliteMobLevel >= 16)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.LEATHER_LEGGINGS));\n\n if (eliteMobLevel >= 18)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.LEATHER_CHESTPLATE));\n\n if (eliteMobLevel >= 20)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.CHAINMAIL_HELMET));\n\n if (eliteMobLevel >= 22)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.CHAINMAIL_BOOTS));\n\n if (eliteMobLevel >= 24)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.CHAINMAIL_LEGGINGS));\n\n if (eliteMobLevel >= 26)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.CHAINMAIL_CHESTPLATE));\n\n if (eliteMobLevel >= 28)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.IRON_HELMET));\n\n if (eliteMobLevel >= 30)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.IRON_BOOTS));\n\n if (eliteMobLevel >= 32)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.IRON_LEGGINGS));\n\n if (eliteMobLevel >= 34)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.IRON_CHESTPLATE));\n\n if (eliteMobLevel >= 36)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.DIAMOND_BOOTS));\n\n if (eliteMobLevel >= 38)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.DIAMOND_HELMET));\n\n if (eliteMobLevel >= 40)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS));\n\n if (eliteMobLevel >= 42)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));\n\n }",
"public static void waltz() {\n //test code written by bokun: self rotation\n leftMotor.setSpeed(ROTATE_SPEED);\n rightMotor.setSpeed(ROTATE_SPEED);\n leftMotor.forward();\n rightMotor.backward();\n }",
"public void updateAmmunition() {\n amountOfAmmoText.setText(\"Ammunition: \" + game.getPlayerComponent().getActiveWeapon().getMagazineCounter());\n }",
"private void remindGoal()\n {\n System.out.println(\"you have to Pick up all three items and get back outside!\");\n }",
"void render(Inventory inventory, Player player, int offsetX, int offsetY);",
"public void rotLauncherLeft()\n\t{\n\t\t//only rotate if a PlayerShip, and therefore a MissileLauncher is spawned\n\t\tIIterator iter = gameObj.getIterator();\n\t\twhile(iter.hasNext())\n\t\t{\n\t\t\tGameObject current = (GameObject)iter.getNext();\n\t\t\tif(current instanceof PlayerShip)\n\t\t\t{\n\t\t\t\t((PlayerShip)current).moveLauncherLeft();\n\t\t\t\tSystem.out.println(\"launcher heading +20\");\n\t\t\t\tnotifyObservers();\n\t\t\t\treturn;\n\t\t\t}\t\n\t\t}\n\t\tSystem.out.println(\"There is no playerShip spawned\");\n\t}",
"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}",
"public void rotateLeft (View view){ //onClick for LEFT Button\n\n if (toyRobotIsActive) {\n\n robot.animate().rotationBy(-90f).setDuration(50); //turn toy robot LEFT\n\n rotateLeft--; //counter to determine orientation\n System.out.println(\"rotateLeft \" + rotateLeft);\n System.out.println(\"rotateLeft + rotateRight = \"\n + orientation(rotateLeft, rotateRight)); //chk params in Logs\n\n } else errorMessage(\"Please place toy robot\");\n }",
"@SideOnly(Side.CLIENT)\r\n\t public boolean shouldRotateAroundWhenRendering() {\r\n\t return true;\r\n\t }",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tgetSprite().rotate(-5);\n\t\t\t\t\tempEffect = false;\n\t\t\t\t\tcustomMovement = false;\n\t\t\t\t\thitByEMP = false;\n\t\t\t\t}",
"public synchronized String printInventory(){\n String inventStr = \"\";\n\n for (int i = 0; i < titleList.size(); i++){\n inventStr += titleList.get(i) + \" \" + quantityList.get(i);\n if(i < titleList.size() - 1) {\n inventStr +=\"___\";\n }\n }\n return inventStr;\n }",
"private void drawActivePotionEffects() {\n/* 63 */ int i = this.guiLeft - 124;\n/* 64 */ int j = this.guiTop;\n/* 65 */ int k = 166;\n/* 66 */ Collection<PotionEffect> collection = this.mc.player.getActivePotionEffects();\n/* */ \n/* 68 */ if (!collection.isEmpty()) {\n/* */ \n/* 70 */ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n/* 71 */ GlStateManager.disableLighting();\n/* 72 */ int l = 33;\n/* */ \n/* 74 */ if (collection.size() > 5)\n/* */ {\n/* 76 */ l = 132 / (collection.size() - 1);\n/* */ }\n/* */ \n/* 79 */ for (PotionEffect potioneffect : Ordering.natural().sortedCopy(collection)) {\n/* */ \n/* 81 */ Potion potion = potioneffect.getPotion();\n/* 82 */ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n/* 83 */ this.mc.getTextureManager().bindTexture(INVENTORY_BACKGROUND);\n/* 84 */ drawTexturedModalRect(i, j, 0, 166, 140, 32);\n/* */ \n/* 86 */ if (potion.hasStatusIcon()) {\n/* */ \n/* 88 */ int i1 = potion.getStatusIconIndex();\n/* 89 */ drawTexturedModalRect(i + 6, j + 7, 0 + i1 % 8 * 18, 198 + i1 / 8 * 18, 18, 18);\n/* */ } \n/* */ \n/* 92 */ String s1 = I18n.format(potion.getName(), new Object[0]);\n/* */ \n/* 94 */ if (potioneffect.getAmplifier() == 1) {\n/* */ \n/* 96 */ s1 = String.valueOf(s1) + \" \" + I18n.format(\"enchantment.level.2\", new Object[0]);\n/* */ }\n/* 98 */ else if (potioneffect.getAmplifier() == 2) {\n/* */ \n/* 100 */ s1 = String.valueOf(s1) + \" \" + I18n.format(\"enchantment.level.3\", new Object[0]);\n/* */ }\n/* 102 */ else if (potioneffect.getAmplifier() == 3) {\n/* */ \n/* 104 */ s1 = String.valueOf(s1) + \" \" + I18n.format(\"enchantment.level.4\", new Object[0]);\n/* */ } \n/* */ \n/* 107 */ this.fontRendererObj.drawStringWithShadow(s1, (i + 10 + 18), (j + 6), 16777215);\n/* 108 */ String s = Potion.getPotionDurationString(potioneffect, 1.0F);\n/* 109 */ this.fontRendererObj.drawStringWithShadow(s, (i + 10 + 18), (j + 6 + 10), 8355711);\n/* 110 */ j += l;\n/* */ } \n/* */ } \n/* */ }",
"public static EntityArmorStand displayHologram(Player p, double x, double y, double z, String text){\n //get a new armorstand\n EntityArmorStand stand = new EntityArmorStand(((CraftWorld) p.getPlayer().getWorld()).getHandle());\n\n stand.setLocation(x, y, z, 0,0); //xyz pitch yaw, we dont need the latter 2 for holograms.\n //set the custom text, and make it visible\n stand.setCustomName(text);\n stand.setCustomNameVisible(true);\n\n //stop the armorstand from falling down\n stand.setGravity(false);\n\n //if debug is off, turn it invisible\n stand.setInvisible(!showArmorstandsDebug);\n\n //set it small so its easier to control the height\n stand.setSmall(true);\n\n PacketPlayOutSpawnEntityLiving packet = new PacketPlayOutSpawnEntityLiving(stand);\n ((CraftPlayer) p).getHandle().playerConnection.sendPacket(packet);\n\n return stand;\n }",
"public void handleArmor(Client c, int itemId, int X, int Y) {\r\n\t\tif(!c.spawned) {\r\n\t\t\tthis.xCoord = X;\r\n\t\t\tthis.yCoord = Y;\r\n\t\t\tfor(int i = 0; i < ARMORREQUIRED.length; i++) {\r\n\t\t\t\tfor(int f = 0; f < ARMORREQUIRED[0].length; f++) {\r\n\t\t\t\t\tif(itemId == ARMORREQUIRED[i][f]) {\r\n\t\t\t\t\t\tif(hasItem(c, ARMORREQUIRED[i][0], true) && hasItem(c, ARMORREQUIRED[i][1], true) && hasItem(c, ARMORREQUIRED[i][2], true)) {\r\n\t\t\t\t\t\t\tanimateArmor(c, new int[] {ARMORREQUIRED[i][0], ARMORREQUIRED[i][1], ARMORREQUIRED[i][2]}, ARMORREQUIRED[i][3], ARMORREQUIRED[i][4], ARMORREQUIRED[i][5], ARMORREQUIRED[i][6], ARMORREQUIRED[i][7]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tc.sendMessage(\"You already have armor spawned!\");\r\n\t\t}\r\n\t}",
"public void rotateRight() {\n// tileLogic = getRotateRight();\n tileLogic = getRotateLeft();\n// rotateRightTex();\n rotateLeftTex();\n }",
"@Override \n public void handle(ActionEvent arg0) {\n rotate.pause(); \n }",
"void rotate();",
"public Item() {\n\t\tthis(rand.nextDouble() * GameManager.NATIVE_WIDTH, -30.0, PowerUp[new Random().nextInt(PowerUp.length)]);\n\t}",
"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 }",
"@Overwrite(remap = false)\n private void renderDroppedItem(EntityItem entityItem, IIcon icon, int p_77020_3_, float p_77020_4_, float p_77020_5_, float p_77020_6_, float p_77020_7_, int pass) {\n Tessellator tessellator = Tessellator.instance;\n ItemStack itemStack = ItemUtils.changeRenderTarget(entityItem.getEntityItem());\n\n\n if (icon == null) {\n TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();\n ResourceLocation resourcelocation = texturemanager.getResourceLocation(itemStack.getItemSpriteNumber());\n icon = ((TextureMap) texturemanager.getTexture(resourcelocation)).getAtlasSprite(\"missingno\");\n }\n\n float f14 = icon.getMinU();\n float f15 = icon.getMaxU();\n float f4 = icon.getMinV();\n float f5 = icon.getMaxV();\n float f6 = 1.0F;\n float f7 = 0.5F;\n float f8 = 0.25F;\n float f10;\n\n if (this.renderManager.options.fancyGraphics) {\n GL11.glPushMatrix();\n\n if (renderInFrame) {\n GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);\n } else {\n GL11.glRotatef((((float) entityItem.age + p_77020_4_) / 20.0F + entityItem.hoverStart) * (180F / (float) Math.PI), 0.0F, 1.0F, 0.0F);\n }\n\n float f9 = 0.0625F;\n f10 = 0.021875F;\n //ItemStack itemStack = entityItem.getEntityItem();\n int j = itemStack.stackSize;\n byte b0;\n\n if (j < 2) {\n b0 = 1;\n } else if (j < 16) {\n b0 = 2;\n } else if (j < 32) {\n b0 = 3;\n } else {\n b0 = 4;\n }\n\n b0 = getMiniItemCount(itemStack, b0);\n\n GL11.glTranslatef(-f7, -f8, -((f9 + f10) * (float) b0 / 2.0F));\n\n for (int k = 0; k < b0; ++k) {\n // Makes items offset when in 3D, like when in 2D, looks much better. Considered a vanilla bug...\n if (k > 0 && shouldSpreadItems()) {\n float x = (random.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;\n float y = (random.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;\n float z = (random.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;\n GL11.glTranslatef(x, y, f9 + f10);\n } else {\n GL11.glTranslatef(0f, 0f, f9 + f10);\n }\n\n if (itemStack.getItemSpriteNumber() == 0) {\n this.bindTexture(TextureMap.locationBlocksTexture);\n } else {\n this.bindTexture(TextureMap.locationItemsTexture);\n }\n\n GL11.glColor4f(p_77020_5_, p_77020_6_, p_77020_7_, 1.0F);\n ItemRenderer.renderItemIn2D(tessellator, f15, f4, f14, f5, icon.getIconWidth(), icon.getIconHeight(), f9);\n\n if (itemStack.hasEffect(pass)) {\n GL11.glDepthFunc(GL11.GL_EQUAL);\n GL11.glDisable(GL11.GL_LIGHTING);\n this.renderManager.renderEngine.bindTexture(RES_ITEM_GLINT);\n GL11.glEnable(GL11.GL_BLEND);\n GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE);\n float f11 = 0.76F;\n GL11.glColor4f(0.5F * f11, 0.25F * f11, 0.8F * f11, 1.0F);\n GL11.glMatrixMode(GL11.GL_TEXTURE);\n GL11.glPushMatrix();\n float f12 = 0.125F;\n GL11.glScalef(f12, f12, f12);\n float f13 = (float) (Minecraft.getSystemTime() % 3000L) / 3000.0F * 8.0F;\n GL11.glTranslatef(f13, 0.0F, 0.0F);\n GL11.glRotatef(-50.0F, 0.0F, 0.0F, 1.0F);\n ItemRenderer.renderItemIn2D(tessellator, 0.0F, 0.0F, 1.0F, 1.0F, 255, 255, f9);\n GL11.glPopMatrix();\n GL11.glPushMatrix();\n GL11.glScalef(f12, f12, f12);\n f13 = (float) (Minecraft.getSystemTime() % 4873L) / 4873.0F * 8.0F;\n GL11.glTranslatef(-f13, 0.0F, 0.0F);\n GL11.glRotatef(10.0F, 0.0F, 0.0F, 1.0F);\n ItemRenderer.renderItemIn2D(tessellator, 0.0F, 0.0F, 1.0F, 1.0F, 255, 255, f9);\n GL11.glPopMatrix();\n GL11.glMatrixMode(GL11.GL_MODELVIEW);\n GL11.glDisable(GL11.GL_BLEND);\n GL11.glEnable(GL11.GL_LIGHTING);\n GL11.glDepthFunc(GL11.GL_LEQUAL);\n }\n }\n\n GL11.glPopMatrix();\n } else {\n for (int l = 0; l < p_77020_3_; ++l) {\n GL11.glPushMatrix();\n\n if (l > 0) {\n f10 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.3F;\n float f16 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.3F;\n float f17 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.3F;\n GL11.glTranslatef(f10, f16, f17);\n }\n\n if (!renderInFrame) {\n GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);\n }\n\n GL11.glColor4f(p_77020_5_, p_77020_6_, p_77020_7_, 1.0F);\n tessellator.startDrawingQuads();\n tessellator.setNormal(0.0F, 1.0F, 0.0F);\n tessellator.addVertexWithUV((double) (0.0F - f7), (double) (0.0F - f8), 0.0D, (double) f14, (double) f5);\n tessellator.addVertexWithUV((double) (f6 - f7), (double) (0.0F - f8), 0.0D, (double) f15, (double) f5);\n tessellator.addVertexWithUV((double) (f6 - f7), (double) (1.0F - f8), 0.0D, (double) f15, (double) f4);\n tessellator.addVertexWithUV((double) (0.0F - f7), (double) (1.0F - f8), 0.0D, (double) f14, (double) f4);\n tessellator.draw();\n GL11.glPopMatrix();\n }\n }\n }",
"public void openArms() {\n\t\tleftArmMotor.setSpeed(100);\n\t\trightArmMotor.setSpeed(100);\n\t\t\n\t\trightArmMotor.rotate(-80, true);\n\t\tleftArmMotor.rotate(-80, false);\n\t}",
"public void iniciarRotina() {\n }",
"@EventHandler\n void onPlayerInteract(PlayerInteractEvent e){\n Player player = e.getPlayer();\n Block rawblock = e.getClickedBlock();\n Material block = null;\n if(rawblock != null){ block = rawblock.getType();}\n if(block != null && block == Material.DARK_OAK_WALL_SIGN){\n Sign sign = (Sign) e.getClickedBlock().getState();\n if(sign.getLine(0).equalsIgnoreCase(ChatColor.WHITE + \"[\" + ChatColor.GOLD + \"RAID\" + ChatColor.WHITE + \"]\"))\n {\n player.sendMessage(\"gg\");\n }\n }\n }",
"@Override\n public void unInvoke() {\n final Environmental item = affected;\n if (item == null)\n return;\n final Room room = CMLib.map().roomLocation(item);\n if ((canBeUninvoked()) && (room != null))\n room.showHappens(CMMsg.MSG_OK_VISUAL, item, L(\"<S-YOUPOSS> flaming sword is consumed!\"));\n super.unInvoke();\n if ((canBeUninvoked()) && (room != null)) {\n room.recoverRoomStats();\n item.destroy();\n }\n }"
] |
[
"0.63207906",
"0.6141195",
"0.57989293",
"0.57303387",
"0.56682235",
"0.561957",
"0.5498464",
"0.54719543",
"0.5461803",
"0.5444392",
"0.54224896",
"0.5380548",
"0.5363406",
"0.5361001",
"0.53534544",
"0.5281273",
"0.52645093",
"0.5252515",
"0.5231218",
"0.5227911",
"0.5200204",
"0.5190806",
"0.51902866",
"0.51646656",
"0.5156289",
"0.5151526",
"0.51499414",
"0.51422876",
"0.5136854",
"0.51367635",
"0.5136476",
"0.51324534",
"0.5123722",
"0.51235443",
"0.51216865",
"0.5115359",
"0.51098615",
"0.50859696",
"0.5071381",
"0.5070675",
"0.50691307",
"0.5066875",
"0.5060716",
"0.5059186",
"0.50555813",
"0.50433415",
"0.5041953",
"0.5039081",
"0.50257325",
"0.5022721",
"0.5021398",
"0.5015593",
"0.50122774",
"0.50121963",
"0.5005344",
"0.49936816",
"0.49896932",
"0.4980524",
"0.49723083",
"0.49706227",
"0.49567744",
"0.4956576",
"0.49542606",
"0.49539262",
"0.49533194",
"0.49510545",
"0.49467427",
"0.49320355",
"0.4931002",
"0.49259678",
"0.49236152",
"0.49209577",
"0.49154156",
"0.49145892",
"0.49142146",
"0.4908296",
"0.49081513",
"0.4903519",
"0.48952535",
"0.48925257",
"0.4889257",
"0.48863366",
"0.48813492",
"0.48771527",
"0.48728362",
"0.4867393",
"0.4865539",
"0.48573014",
"0.48550785",
"0.48494527",
"0.48483327",
"0.4846173",
"0.48458603",
"0.48444444",
"0.48442745",
"0.484359",
"0.48434192",
"0.48433068",
"0.48305452",
"0.48275802"
] |
0.6845787
|
0
|
Displays a firework to the given player
|
public static void displayFirework(Player p, double x, double y, double z, ItemStack firework){
//create and spawn a firework rocket from our itemstack
EntityFireworks fw = new EntityFireworks(((CraftWorld) p.getWorld()).getHandle());
fw.setLocation(x, y, z, 0f, 0f);
PacketPlayOutSpawnEntity alive = new PacketPlayOutSpawnEntity(fw, 76);
((CraftPlayer) p).getHandle().playerConnection.sendPacket(alive);
//i looked at what mincreaft does in vanilla whe you launch a firework on a server. I just copied what they do here by editing a datawatcher. dont ask me how or why, but it works.
DataWatcher dataWatcher = fw.getDataWatcher();
for(DataWatcher.WatchableObject obj: dataWatcher.c()){
if(obj.c()==5 && obj.a()==8 && obj.b()==null){
obj.a(firework);
}
}
//give the entity some meta
PacketPlayOutEntityMetadata itemMeta = new PacketPlayOutEntityMetadata(fw.getId(), fw.getDataWatcher(), true);
((CraftPlayer) p).getHandle().playerConnection.sendPacket(itemMeta);
//also play a sound
PacketPlayOutNamedSoundEffect sound = new PacketPlayOutNamedSoundEffect("fireworks.launch", x, y, z, 3f, 1f);
((CraftPlayer) p).getHandle().playerConnection.sendPacket(sound);
//wait 30 ticks before we detonate it.
//IMPORTANT: wait too long and the players client will freeze!
new BukkitRunnable() {
@Override
public void run() {
//detonate the firework, and destroy the entity.
PacketPlayOutEntityStatus status = new PacketPlayOutEntityStatus(fw, (byte) 17);
((CraftPlayer) p).getHandle().playerConnection.sendPacket(status);
PacketPlayOutEntityDestroy destroy = new PacketPlayOutEntityDestroy(fw.getId());
((CraftPlayer) p).getHandle().playerConnection.sendPacket(destroy);
}
}.runTaskLater(Juggernaut.pluginInstance, 30L);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void display (Player player) {\n player.setScoreboard(this.bukkitScoreboard);\n }",
"public static void launchFirewor(Player p) {\n Firework fw = (Firework) p.getWorld().spawnEntity(p.getLocation(), EntityType.FIREWORK);\n FireworkMeta fwm = fw.getFireworkMeta();\n \n //Our random generator\n Random r = new Random(); \n\n //Get the type\n int rt = r.nextInt(4) + 1;\n Type type = Type.BALL; \n if (rt == 1) type = Type.BALL;\n if (rt == 2) type = Type.BALL_LARGE;\n if (rt == 3) type = Type.BURST;\n if (rt == 4) type = Type.CREEPER;\n if (rt == 5) type = Type.STAR;\n \n //Get our random colours \n Color c1 = Color.AQUA;\n Color c2 = Color.BLACK;\n \n //Create our effect with this\n FireworkEffect effect = FireworkEffect.builder().flicker(r.nextBoolean()).withColor(c1).withFade(c2).with(type).trail(r.nextBoolean()).build();\n \n //Then apply the effect to the meta\n fwm.addEffect(effect);\n \n //Generate some random power and set it\n int rp = r.nextInt(2) + 1;\n fwm.setPower(rp);\n \n //Then apply this to our rocket\n fw.setFireworkMeta(fwm); \n\t}",
"public static void playFirework(Player player, Location loc,\r\n\t\t\tFireworkEffect... fe) throws Exception {\r\n\t\tFirework fw = loc.getWorld().spawn(loc, Firework.class);\r\n\r\n\t\tFireworkMeta fm = fw.getFireworkMeta();\r\n\t\tfm.clearEffects();\r\n\t\tfm.addEffects(fe);\r\n\t\tfm.setPower(1);\r\n\t\tfw.setFireworkMeta(fm);\r\n\r\n\t\tObject craftFirework = obc_CraftFirework.cast(fw);\r\n\t\tObject nmsFirework = obc_CraftFirework_getHandle.invoke(craftFirework);\r\n\r\n\t\t// Object packetPlayOutEntityStatus = c_PacketPlayOutEntityStatus\r\n\t\t// .newInstance(nmsFirework, (byte) 17);\r\n\r\n\t\tObject packetPlayOutEntityStatus = PacketUtil.getPacket(\r\n\t\t\t\tPacketType.PLAY_OUT_ENTITY_STATUS, nmsFirework, (byte) 17);\r\n\r\n\t\tPacketUtil.sendPacket(player, packetPlayOutEntityStatus);\r\n\t\tfw.remove();\r\n\t}",
"public void display(JPanel panel, Graphics2D g2d, Hero[] players) {\n int[] pos = {(int)(this.x), (int)(this.y), \n this.imageWidth, this.imageHeight};\n int[] newPos = Zoom.getDisplayPos(g2d, players, pos);\n float opacity;\n if (this.state.equals(\"dodge\")) {\n opacity = 0.5f;\n } else {\n opacity = 1f;\n }\n\n g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER,\n opacity));\n g2d.drawImage(this.sprites.get(this.state)[this.spriteNum],\n newPos[0], newPos[1], newPos[2], newPos[3],\n panel);\n }",
"public void drawFire(Graphics g){\n \n if(player.getScore()>= initScore+1000){\n fireRecord.add(new Fire());\n initScore+=1000;\n } \n \n for(int i=0; i<fireRecord.size(); i++){\n Fire current = fireRecord.get(i);\n boolean test = current.test(player.getX(), player.getY(), player.getW(), player.getH(),-5); \n if(!delay){\n if(test){\n player.loseLife();\n delay = true; //If player loses a life, become invulnerable for a short period of time\n }\n }\n \n if (moveCount%5000 == 0){ /// Delay after taking dmg\n delay = false;\n } \n \n if(moveCount%speedAdj==0){ //Adjust Speed\n current.addX();\n current.addY();\n }\n g.drawImage(current.getImage(), current.getX(), current.getY(), this); \n } \n }",
"void fireShellAtOpponent(int playerNr);",
"public abstract void fire(Player holder);",
"void fireShellAtPlayer(int playerNr, int x, int y);",
"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 }",
"public void DisplayWithShield() {\n\t\tplayers = new ArrayList<Player>();\n\t\tplayer1 = new Player(\"Nick\");\n\t\tplayer2 = new Player(\"Ausitn\");\n\t\tplayers.add(player1);\n\t\tplayers.add(player2);\n\t\tgame = new GameState();\n\t\tgame.initializeServer(players);\n\t\tRulesEngine.setColour(game, String.valueOf(Type.BLUE));\n\t\t\n\t\tgame.setTurn(0);\n\t\t\n\t\t\n\t\t//create cards to be added to player's hand and target's display\n\t\tCard purpleCard = new Card(Type.PURPLE, 3);\n\t\tCard greenCard = new Card(Type.GREEN, 1);\n\t\tCard yellowCard = new Card(Type.YELLOW, 2);\n\t\tCard blueCard = new Card(Type.BLUE, 3);\n\t\tCard redCard = new Card(Type.RED, 4);\n\t\tCard squire = new Card(Type.WHITE, 2);\n\t\tCard maiden = new Card (Type.WHITE, 6);\n\t\tCard shield = new Card(Type.ACTION, Card.SHIELD);\n\t\t\n\t\t//Give one of the players a riposte card to play\n\t\tCard riposte = new Card(Type.ACTION, Card.RIPOSTE);\n\t\tgame.getAllPlayers().get(0).getHand().add(riposte);\n\t\t\n\t\t//Give target player a custom display\n\t\tgame.getDisplay(1).add(redCard);\n\t\tgame.getDisplay(1).add(purpleCard);\n\t\tgame.getDisplay(1).add(blueCard);\n\t\tgame.getDisplay(1).add(greenCard);\n\t\tgame.getDisplay(1).add(squire);\n\t\tgame.getDisplay(1).add(yellowCard);\n\t\tgame.getDisplay(1).add(maiden);\n\t\tgame.getShield(1).add(shield); //give player a shield\n\t}",
"public void drawPlayer(){\n Player player = world.getPlayer();\n if(player.isGod()) {\n spriteBatch.draw(fadedPlayerTexture,player.getPosition().x * ppuX, player.getPosition().y * ppuY,\n player.WIDTH * ppuX, player.HEIGHT * ppuY);\n } else {\n spriteBatch.draw(playerTexture, player.getPosition().x * ppuX, player.getPosition().y * ppuY,\n player.WIDTH * ppuX, player.HEIGHT * ppuY);\n }\n }",
"public void DisplayWithOneCard() {\n\t\tplayers = new ArrayList<Player>();\n\t\tplayer1 = new Player(\"Nick\");\n\t\tplayer2 = new Player(\"Ausitn\");\n\t\tplayers.add(player1);\n\t\tplayers.add(player2);\n\t\tgame = new GameState();\n\t\tgame.initializeServer(players);\n\t\tRulesEngine.setColour(game, String.valueOf(Type.BLUE));\n\t\t\n\t\tgame.setTurn(0);\n\t\t\n\t\t\n\t\t//create cards to be added to player's hand and target's display\n\t\tCard redCard = new Card(Type.RED, 4);\n\t\t\n\t\t//Give one of the players a riposte card to play\n\t\tCard riposte = new Card(Type.ACTION, Card.RIPOSTE);\n\t\tgame.getAllPlayers().get(0).getHand().add(riposte);\n\t\t\n\t\t//Give target player a custom display\n\t\tgame.getDisplay(1).add(redCard);\n\t}",
"public void displayWinner(Player player) {\n System.out.println(\"Partie terminée !\");\n System.out.println(player.getPlayerName()+\" remporte la partie avec les billes \"+player.getColor().toString(true));\n System.out.println(\"――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――\");\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tshowPanel(createReinforcePanel(MainPlayScreen.this.game.getCurrentPlayer()));\t\t\n\t\t\t\n\t\t\t}",
"@Override\n\tpublic void show() {\n\t\tsetUpGame();\n\t}",
"public void showGameBoard(Player player){\n\t\tFeatherBoardAPI.removeScoreboardOverride(player, \"build-battle-lobby\");\n\n\t\tFeatherBoardAPI.showScoreboard(player,\"build-battle-game\");\n\t}",
"public void render()\n\t{\n\t\tBufferStrategy bs = this.getBufferStrategy();\n\n\t\tif (bs == null)\n\t\t{\n\t\t\tcreateBufferStrategy(3);\n\t\t\treturn;\n\t\t}\n\n\t\tGraphics g = bs.getDrawGraphics();\n\t\t//////////////////////////////\n\n\t\tg.setColor(Color.DARK_GRAY);\n\t\tg.fillRect(0, 0, getWidth(), getHeight());\n\t\tif (display != null && GeneticSimulator.updateRendering)\n\t\t{\n\t\t\tg.drawImage(display, 0, 0, getWidth(), getHeight(), this);\n\t\t}\n\n\t\tWorld world = GeneticSimulator.world();\n\n\t\tworld.draw((Graphics2D) g, view);\n\n\t\tg.setColor(Color.WHITE);\n\t\tg.drawString(String.format(\"view: [%2.1f, %2.1f, %2.1f, %2.1f, %2.2f]\", view.x, view.y, view.width, view.height, view.PxToWorldScale), (int) 10, (int) 15);\n\n\t\tg.drawString(String.format(\"world: [time: %2.2f pop: %d]\", world.getTime() / 100f, World.popCount), 10, 30);\n\n\t\tg.drawRect(view.pixelX, view.pixelY, view.pixelWidth, view.pixelHeight);\n//\t\tp.render(g);\n//\t\tc.render(g);\n\n\n\t\t//g.drawImage(player,100,100,this);\n\n\t\t//////////////////////////////\n\t\tg.dispose();\n\t\tbs.show();\n\t}",
"@Override\n\tpublic void show() {\n\t\tSystem.out.println(\"SHOWWWW_ACCUEIL\");\n\t\tMusicManager.playLoop(typeSong.accueil);\n\t\tfond = new Texture(Gdx.files.internal(LauncherScreen.accueil));\n\t\tbatch = new SpriteBatch();\n\t\tGdx.input.setInputProcessor(this.inputHandler());\n\t}",
"@Override\n public void displayInventory(Player player)\n {\n Platform.runLater(() -> {\n InventoryDisplay inventory = gui.getInventory();\n inventory.displayInventory(player);\n });\n }",
"public GoToWork(Player player)\n\t\t{\n\t\t\tsuper(player,\"Work\",100);\n\t\t}",
"public static void playFirework(Location loc, FireworkEffect... fe)\r\n\t\t\tthrows Exception {\r\n\t\tFirework fw = loc.getWorld().spawn(loc, Firework.class);\r\n\r\n\t\tFireworkMeta fm = fw.getFireworkMeta();\r\n\t\tfm.clearEffects();\r\n\t\tfm.addEffects(fe);\r\n\t\tfm.setPower(1);\r\n\t\tfw.setFireworkMeta(fm);\r\n\r\n\t\tObject craftFirework = obc_CraftFirework.cast(fw);\r\n\t\tObject nmsFirework = obc_CraftFirework_getHandle.invoke(craftFirework);\r\n\r\n\t\tObject craftWorld = obc_CraftWorld.cast(loc.getWorld());\r\n\t\tObject nmsWorld = obc_CraftWorld_getHandle.invoke(craftWorld);\r\n\r\n\t\tnms_World_broadcastEntityEffect\r\n\t\t\t\t.invoke(nmsWorld, nmsFirework, (byte) 17);\r\n\t\tfw.remove();\r\n\t}",
"public void howToPlay() {\r\n // An item has been added to the ticket. Fire an event and let everyone know.\r\n System.out.println(\"Step 1: Have no life. \\nStep 2: Deal cards\\nStep 3: Cry yourself to sleep.\");\r\n }",
"public static void displayInterface(Player player) {\n\t\tif (GameMode.getGameMode(player, \"ULTIMATE IRON MAN\")) {\n\t\t\tplayer.getDH().sendStatement(\"As an Ultimate Ironman, you cannot use presets.\");\n\t\t\treturn;\n\t\t}\n\t\tPresets.openPresetInterface(player);\n\t\tplayer.getPA().displayInterface(24280);\n\t}",
"public void printDetailedPlayer(Player player);",
"void show() {\n if (!isDead) {\n for (int i = 0; i < bullets.size(); i++) {//show bullets\n bullets.get(i).show();\n }\n if (immortalityTimer >0) {//no need to decrease immortalityCounter if its already 0\n immortalityTimer--;\n }\n\n if (immortalityTimer >0 && floor(((float)immortalityTimer)/5)%2 ==0) {//needs to appear to be flashing so only show half of the time\n } else {\n\n Constants.processing.pushMatrix();\n Constants.processing.translate(this.position.x, this.position.y);\n Constants.processing.rotate(rotation);\n\n //actually draw the player\n Constants.processing.fill(0);\n Constants.processing.noStroke();\n Constants.processing.beginShape();\n int size = 12;\n\n //black triangle\n Constants.processing.vertex(-size - 2, -size);\n Constants.processing.vertex(-size - 2, size);\n Constants.processing.vertex(2 * size - 2, 0);\n Constants.processing.endShape(CLOSE);\n Constants.processing.stroke(255);\n\n //white out lines\n Constants.processing.line(-size - 2, -size, -size - 2, size);\n Constants.processing.line(2 * size - 2, 0, -22, 15);\n Constants.processing.line(2 * size - 2, 0, -22, -15);\n if (boosting) {//when boosting draw \"flames\" its just a little triangle\n boostCount--;\n if (floor(((float)boostCount)/3)%2 ==0) {//only show it half of the time to appear like its flashing\n Constants.processing.line(-size - 2, 6, -size - 2 - 12, 0);\n Constants.processing.line(-size - 2, -6, -size - 2 - 12, 0);\n }\n }\n Constants.processing.popMatrix();\n }\n }\n for (int i = 0; i < asteroids.size(); i++) {//show asteroids\n asteroids.get(i).show();\n }\n }",
"public void DisplayWithMultiTypes() {\n\t\tplayers = new ArrayList<Player>();\n\t\tplayer1 = new Player(\"Nick\");\n\t\tplayer2 = new Player(\"Ausitn\");\n\t\tplayers.add(player1);\n\t\tplayers.add(player2);\n\t\tgame = new GameState();\n\t\tgame.initializeServer(players);\n\t\tRulesEngine.setColour(game, String.valueOf(Type.BLUE));\n\t\t\n\t\tgame.setTurn(0);\n\t\t\n\t\t\n\t\t//create cards to be added to player's hand and target's display\n\t\tCard purpleCard = new Card(Type.PURPLE, 3);\n\t\tCard greenCard = new Card(Type.GREEN, 1);\n\t\tCard yellowCard = new Card(Type.YELLOW, 2);\n\t\tCard blueCard = new Card(Type.BLUE, 3);\n\t\tCard redCard = new Card(Type.RED, 4);\n\t\tCard squire = new Card(Type.WHITE, 2);\n\t\tCard maiden = new Card (Type.WHITE, 6);\n\t\t\n\t\t//Give one of the players a riposte card to play\n\t\tCard riposte = new Card(Type.ACTION, Card.RIPOSTE);\n\t\tgame.getAllPlayers().get(0).getHand().add(riposte);\n\t\t\n\t\t//Give target player a custom display\n\t\tgame.getDisplay(1).add(redCard);\n\t\tgame.getDisplay(1).add(purpleCard);\n\t\tgame.getDisplay(1).add(blueCard);\n\t\tgame.getDisplay(1).add(greenCard);\n\t\tgame.getDisplay(1).add(squire);\n\t\tgame.getDisplay(1).add(yellowCard);\n\t\tgame.getDisplay(1).add(maiden);\n\t}",
"@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}",
"public void presentPlayer( CoinFlipper theHandle, String theName );",
"public void cmdShowPlayer(User teller, Player player) {\n Formatter msg = new Formatter();\n Integer rating = player.ratings().get(USCL_RATING);\n String ratingStr = (rating == null || rating < 0) ? \"Unavailable\" : rating.toString();\n msg.format(\" Player %s:\\\\n\", player);\n msg.format(\" %6s: %s\\\\n\", \"Name\", player.getRealName());\n msg.format(\" %6s: %s\\\\n\", \"Title\", player.getTitles());\n msg.format(\" %6s: %s\\\\n\", \"Rating\", ratingStr);\n msg.format(\" %6s: %s\\\\n\", \"Team\", player.getTeam());\n msg.format(\" %6s: %s\\\\n\", \"Web\", player.getWebsite());\n command.qtell(teller, msg);\n }",
"@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) \r\n\t\t\t{\n\t\t\t\tpaintComponent(getGraphics(), player);\r\n\t\t\t}",
"private void reportPlay (Player player) {\n System.out.println(\"Player \" + player.name() +\n \" takes \" + player.numberTaken() +\n \" stick(s), leaving \" + game.sticksLeft()\n + \".\");\n }",
"public void play() {\r\n\t\tSystem.out.println(\"Playing Cricket with ball and bat\");\r\n\t}",
"public void playAI() {\r\n // An item has been added to the ticket. Fire an event and let everyone know.\r\n System.out.println(\"You're going to lose foolish human!\");\r\n }",
"@Override\n\tpublic void showContents() {\n\t\tprogram.add(background);\n\t\tprogram.add(topMatte);\n\t\tprogram.add(bottomMatte);\n\t\tprogram.add(stackLabel);\n\t\t\n\t\tprogram.add(basePurp);\n\t\tprogram.add(currPurp);\n\t\tbasePurp.sendToFront();\n\t\tfor (int i = 0; i < callStack; i++) {\n\t\t\tprogram.add(stackBricks[i]);\n\t\t}\n\n\t\tprogram.add(player.getImage());\n\t\tplayer.move(0, 0);\n\n\t\tAudioPlayer.getInstance().playSound(\"sounds\", \"LevelMusic.mp3\", true);\n\t\tif (portalLeft != null) {\n\t\t\tprogram.add(portalLeft.getImage());\n\t\t}\n\t\tif (portalRight != null) {\n\t\t\tprogram.add(portalRight.getImage());\n\t\t\tprogram.add(portalLabel);\n\t\t}\n\t\tif (next == null || next.payloadRetrieved) {\n\t\t\tprogram.add(payload.getImage());\n\t\t}\n\n\t\tArrayList<Payload> collectedPayload = player.getPayloads();\n\n\t\tprogram.add(psuedocode);\n\n\t\tfor (int i = 0; i < collectedPayload.size(); i++) {\n\t\t\tprogram.add(collectedPayload.get(i).getImage());\n\t\t\tpsuedocode.addRtnLong();\n\t\t}\n\t}",
"public void display()\r\n\t{\r\n\t\t\r\n\t}",
"public void showPlayer ( Player player ) {\n\t\ttry {\n\t\t\tinvoke ( \"showPlayer\" , new Class[] { Plugin.class , Player.class } ,\n\t\t\t\t\t AdrianSRCore.getInstance ( ) , player );\n\t\t} catch ( NoSuchMethodException ex ) { // legacy\n\t\t\texecute ( handle -> handle.hidePlayer ( player ) );\n\t\t}\n\t}",
"public void display() {\n\t\t\n\t}",
"public void display() {\n\t\t\n\t}",
"@Override\n\t\t\t\t\t public void visit(Player player) {\n\t\t\t\t\t\t\tPacketSendUtility.sendPacket(player, SM_SYSTEM_MESSAGE.STR_MSG_HF_ShugoCaravanAppear);\n\t\t\t\t\t }",
"@Override\n\tpublic void show() {\n\t\tcontainer = new Table();\n//\t\tcontainer.background(skin.getDrawable(\"darkenWorld\"));\n\t\tcontainer.setSize(width, height);\n\t\t\n\t\tdarken = new Image(skin.getDrawable(\"darkenWorld\"));\n\t\tdarken.setSize(width, height);\n\t\t\n\t\ttimer.start();\n\t\t\n\t\ttrainingBag = new TrainingBag(width, height);\n\t\t\n\t\tBitmapFont font = new BitmapFont(Gdx.files.internal(\"fontSmall-export.fnt\"),\n\t\t Gdx.files.internal(\"fontSmall-export.png\"), false);\n\t\t\n\t\t\n\t\tLabelStyle labelStyle = new LabelStyle();\n\t\tlabelStyle.font = font;\n\t\t\n\t\ttimeLeft = new Label(timeString + \" 20\", labelStyle);\n\t\ttimeLeft.setPosition(width - timeLeft.getWidth(), height - timeLeft.getHeight());\n\t\t\n\t\thits = new Label(hitsString + \"0\" + amountString, labelStyle);\n\t\thits.setPosition(0, height - timeLeft.getHeight());\n\t\t\n\t\t\n\t\tcontainer.row();\n\t\tcontainer.add(trainingBag);\n\t\t\n\t\tgroup.addActor(darken);\n\t\tgroup.addActor(container);\n\t\tgroup.addActor(timeLeft);\n\t\tgroup.addActor(hits);\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 protected void display() {\n System.out.println(\"Welcome to team builder tool!\");\n System.out.println(\"Current team: \" + team.getName());\n }",
"public void drawFire(Graphics g) {\r\n\t\tg.drawImage(fire, (int) (x * scalingX + rocketWidth / 10), (int) (y * scalingY + rocketHeight),\r\n\t\t\t\t(int) (0.8 * rocketWidth), (int) (0.8 * rocketHeight), null);\r\n\t}",
"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}",
"public void run() {\n gf = addGameFrame(\"Pacman\", displayW, displayH);\n }",
"private void render() {\n\t\t// clear the screen and depth buffer\n\t\tglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);\n\t\t\n\t\t// draws the background\n\t\tdrawScreen(sprite.get(\"background\"));\n\t\t\n\t\t// drawing player\n\t\tif (!stopDrawingPlayer)\n\t\t\tdrawEntity(player);\n\t\t// drawing bullets\n\t\tdrawListEntity(bullet);\n\t\t// drawing enemy bullets\n\t\tdrawListEntity(enemy_bullet);\n\t\t// drawing enemies\n\t\tdrawListEntity(enemy);\n\t\t// drawing powerups\n\t\tdrawListEntity(powerup);\n\t\t// drawing explosions\n\t\tdrawListEntity(explosion);\n\t\t\n\t\t// draw health\n\t\tdefaultFont.drawString(10, 10, \"Health: \" + player.getHP() + \"/1000\");\n\t\t// draw cash\n\t\tdefaultFont.drawString(10, 40, \"Cash: $\" + cash);\n\t\t// draw shop prompt\n\t\tdefaultFont.drawString(displayWidth - 280, displayHeight - 40, \"Press F to enter shop\");\n\t\t\n\t\tif (stopDrawingPlayer) {\n\t\t\t// draw Game Over\n\t\t\tgameOverFont.drawString(displayWidth / 2 - gameOverFont.getWidth(\"Game Over!\") / 2, displayHeight\n\t\t\t\t\t/ 2 - gameOverFont.getHeight(\"Game Over!\") / 2 - 50, \"Game Over!\");\n\t\t\t\n\t\t\t// draw the score\n\t\t\tscoreFont.drawString(displayWidth / 2 - scoreFont.getWidth(\"Score: \" + totalCash) / 2, displayHeight\n\t\t\t\t\t/ 2\n\t\t\t\t\t+ scoreFont.getHeight(\"Game Over!\")\n\t\t\t\t\t/ 2\n\t\t\t\t\t+ scoreFont.getHeight(\"Score: \" + totalCash)\n\t\t\t\t\t/ 2 + 10 - 50, \"Score: \" + totalCash);\n\t\t}\n\t}",
"private void drawFireworks() {\n\t\tgc.setFill(BACKGROUND_COLOUR);\r\n\t\tgc.fillRect(0, 0, canvas.getWidth(), canvas.getHeight());\r\n\t\tif (fireworks.size() > 0){\r\n\t\t\tfor (Particle firework : fireworks) {\r\n\t\t\t\t// Get the position for the Particle\r\n\t\t\t\tdouble[] pos = firework.getPosition();\r\n\t\t\t\tif (firework instanceof Streak){\r\n\t\t\t\t\t// Streaks are lines from the firework to the origin\r\n\t\t\t\t\tdouble[] origin = ((Streak) firework).getOrigin();\r\n\t\t\t\t\tgc.setFill(spreadColor(firework.getColour()));\r\n\t\t\t\t\tgc.strokeLine(xPos(origin[0]),yPos(origin[1]),xPos(pos[0]),yPos(pos[1]));\r\n\t\t\t\t}\r\n\t\t\t\telse if (firework instanceof BurningParticle){\r\n\t\t\t\t\t// Burning Particles are the stars themselves\r\n\t\t\t\t\t// Saves the star object to test for a collision later\r\n\t\t\t\t\tStar1 = (BurningParticle) firework.clone();\r\n\t\t\t\t\tgc.setFill(firework.getColour());\r\n\t\t\t\t\tgc.fillOval(xPos(pos[0]),yPos(pos[1]), 6, 6);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// Everything else is a spark and can have a random color / transparency \r\n\t\t\t\t\tgc.setFill(spreadColor(firework.getColour()));\r\n\t\t\t\t\tgc.fillOval(xPos(pos[0]),yPos(pos[1]), 1 + 3*Math.random(), 1 + 3*Math.random());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// update the current time and the fireworks attribute\r\n\t\t\ttime = (time + TIME_INTERVAL);\r\n\t\t\tfireworks = manager1.getFireworks(time);\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void display() {\n\t\tif (silenced.contains(caster))\r\n\t\t\tdead = true;\r\n\t\tif (lastloc == null)\r\n\t\t\tlastloc = loc;\r\n\t\tdir = loc.toVector().subtract(lastloc.toVector());\r\n\t\tif (speed > 2)\r\n\t\t\tParUtils.dropItemEffectVector(loc.clone().add(0,1,0), Material.CACTUS, 1,1, 1,dir);\r\n\t\t\t\r\n\t\t\t//ParUtils.createFlyingParticle(Particles.CRIT, loc.clone().add(0,2.5,0), 0, 0, 0, 1, 5, dir.normalize());\r\n\t\t//ParUtils.createRedstoneParticle(loc.clone().add(0,2.5,0), 0.5,0.5, 0.5, 1, Color.GREEN, 1.5F);\r\n\t}",
"public static final void display(final Player player, final Class<? extends Tool> pluginToolClasses, final String... description) {\r\n\t\tof(pluginToolClasses, description).displayTo(player);\r\n\t}",
"public void showFightSetup(PlayerStats enemyStats, PlayerStats stats, Card card) {\n\t\t\tJLabel title = new JLabel();\r\n\t\t\ttitle.setText(\"Commit troops to fight!\");\r\n\t\t\ttitle.setFont(new Font(\"Arial\", Font.BOLD, 18));\r\n\t\t\tcontent.add(title);\r\n\t\t\r\n\t\t\t//Initialize label\r\n\t\t\tJLabel troopsToCommit = new JLabel();\r\n\t\t\ttroopsToCommit.setFont(new Font(\"Arial\", Font.BOLD, 18));\r\n\t\t\ttroopsToCommit.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\t\r\n\t\t\tJSlider slider = new JSlider(0, enemyStats.getArmySize(), 0); //From 0 to the population minus the minimum population that cannot be in the army.\r\n\t\t\tslider.setPreferredSize(new Dimension(width - 30, 90));\r\n\t\t\tslider.setMajorTickSpacing(250);\r\n\t\t\tslider.setMinorTickSpacing(100);\r\n\t\t\tslider.setPaintLabels(true);\r\n\t\t\tslider.setPaintTicks(true);\r\n\t\t\tslider.addChangeListener(new ChangeListener() {\r\n\t\t\t\tpublic void stateChanged(ChangeEvent event) {\r\n\t\t\t\t\tint change = slider.getValue();\r\n\t\t\t\t\ttroopsToCommit.setText(\"Troops: \" + change + \"\\n\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tcontent.add(slider);\r\n\t\t\r\n\t\t\t//This is the amount of troops the enemy has.\r\n\t\t\tJLabel enemyTroops = new JLabel(\"Enemy Troops: \" + card.getTroopContribution());\r\n\t\t\tenemyTroops.setFont(new Font(\"Arial\", Font.BOLD, 18));\r\n\t\t\tenemyTroops.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\t\r\n\t\t\tJButton fight = new JButton(\"FIGHT!\");\r\n\t\t\tfight.setFont(new Font(\"Arial\", Font.BOLD, 18));\r\n\t\t\tfight.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\t\tfight.addMouseListener(new MouseAdapter() {\r\n\t\t\t\tpublic void mousePressed(MouseEvent evt) {\r\n\t\t\t\t\tSystem.out.println(\"Starting fight on \" + card.getName());\r\n\t\t\t\t\t\r\n\t\t\t\t\tint enemyTroops = slider.getValue();\r\n\t\t\t\t\tBattle battle = new Battle(card.getTroopContribution(), card.getDefensiveBonus(), enemyTroops);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Subtract dead troops from the card's troop contributions\r\n\t\t\t\t\tdefenseSurvivors = battle.getDefenseSurvivors();\r\n\t\t\t\t\tdefenseDead = card.getTroopContribution() - defenseSurvivors;\r\n\t\t\t\t\tSystem.out.println(\"Defense Dead: \" + defenseDead);\r\n\t\t\t\t\tSystem.out.println(\"Defense Alive: \" + defenseSurvivors);\r\n\t\t\t\t\tcard.subTroops(defenseDead);\r\n\t\t\t\t\r\n\t\t\t\t\t//This is the number of dead enemy troops\r\n\t\t\t\t\toffenseSurvivors = battle.getOffenseSurvivors();\r\n\t\t\t\t\toffenseDead = enemyTroops - offenseSurvivors;\r\n\t\t\t\t\tSystem.out.println(\"Offense Alive: \" + offenseSurvivors);\r\n\t\t\t\t\tSystem.out.println(\"Offense Dead: \" + offenseDead);\r\n\t\t\t\t\tenemyStats.subTroops(offenseDead);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//If the enemy wins we give them an award.\r\n\t\t\t\t\tif (defenseSurvivors == 0) { //A reward of resources\r\n\t\t\t\t\t\tint statResources = stats.getResource();\r\n\t\t\t\t\t\tremovedResources = (int) (statResources * 0.05);\r\n\t\t\t\t\t\tstats.removeResources(removedResources);\r\n\t\t\t\t\t\tenemyStats.addResources(removedResources);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (card.getPop() > U.planetMinPop) { //A reward of population\r\n\t\t\t\t\t\t\tremovedPop = (int) (card.getPop() * 0.15);\r\n\t\t\t\t\t\t\tcard.removePop(removedPop);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tint enemyCurPop = enemyStats.getPopulation();\r\n\t\t\t\t\t\t\tenemyStats.setPopulation(enemyCurPop + removedPop);\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\t//Update stats\r\n\t\t\t\t\tstats.getUser().updateSideNav();\r\n\t\t\t\t\tenemyStats.getUser().updateSideNav();\r\n\t\t\r\n\t\t\t\t\thideFightSetup();\r\n\t\t\r\n\t\t\t\t\t//Shows the results\r\n\t\t\t\t\tshowResults();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\r\n\t\t\r\n\t\t\t//This will holder everything under the slider\r\n\t\t\tJPanel holder = new JPanel();\r\n\t\t\tholder.setLayout(new BoxLayout(holder, BoxLayout.Y_AXIS));\r\n\t\t\tholder.setPreferredSize(new Dimension(width - 30, 200));\r\n\t\t\tholder.setBackground(modalColor.brighter());\r\n\t\t\tholder.add(enemyTroops);\r\n\t\t\tholder.add(troopsToCommit);\r\n\t\t\tholder.add(Box.createRigidArea(new Dimension(width, 15)));\r\n\t\t\tholder.add(fight);\r\n\t\t\tcontent.add(holder);\r\n\t}",
"public void showTurn(PlayerClient[] players, DraftPoolMP draft, RoundTrackMP track, int[] tools, int activePlayer, int me, int round) throws InvalidIntArgumentException, IOException\n {\n printOut(cliToolsManager.sceneInitializer(width));\n printOut(printerMaker.getGameScene(players, draft, track, privateObjective, pubObjs, tools, activePlayer, me));\n\n printOut(cliToolsManager.printSpaces(width));\n\n printOut(printerMaker.round(round, players[activePlayer].getName()));\n\n printOut(cliToolsManager.sceneEnder(width));\n }",
"private void display(){\n out.println(\"\\n-STOCK EXCHANGE-\");\n out.println(\"Apple - Share Price: \" + game.apple.getSharePrice() + \" [\" + game.apple.top() + \"]\");\n out.println(\"BP - Share Price: \" + game.bp.getSharePrice() + \" [\" + game.bp.top() + \"]\");\n out.println(\"Cisco - Share Price: \" + game.cisco.getSharePrice() + \" [\" + game.cisco.top() + \"]\");\n out.println(\"Dell - Share Price: \" + game.dell.getSharePrice() + \" [\" + game.dell.top() + \"]\");\n out.println(\"Ericsson - Share Price: \" + game.ericsson.getSharePrice() + \" [\" + game.ericsson.top() + \"]\");\n\n out.println(\"\\n-PLAYERS-\");\n// System.out.println(playerList.toString());\n for (Player e : playerList) {\n if (e.equals(player)) {\n out.println(e.toString() + \" (you)\");\n } else {\n out.println(e.toString());\n }\n }\n }",
"public void render(Renderer screen) {\t\r\n\t\tsprite = chosenSprite.getSprite();\r\n\t\tscreen.renderEntity(x-16, y-16, this); //-16 centres player as it is a 32x32 sprite\r\n\t\tfont.render(this.getUsername(), this.getX() - (this.getUsername().length()*8/2), this.getY() - 25, true, 0xffffffff, screen, false);\r\n\t}",
"public void displayWin()\n {\n if(player1 instanceof GameController){\n player1.gameOver(1);\n } else {\n player2.gameOver(1);\n }\n }",
"public void showLobbyBoard(Player player){\n\t\tFeatherBoardAPI.showScoreboard(player,\"build-battle-lobby\");\n\t}",
"public void print()\n\t{\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t\tSystem.out.println(\"[Lives: \" + lives + \"][Score: \" + score + \n\t\t\t\t\t\t\t\"][Time: \" + gameTime + \"]\");\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t}else\n\t\t\tSystem.out.println(\"Spawn a player ship to view game info\");\n\t}",
"public void play() {\n\t\tSystem.out.println(\"playing \"+title+\" by \" +artist);\n\t}",
"public void runTheGame() {\n\t\txPlayer.setOpponent(oPlayer);\n\t\toPlayer.setOpponent(xPlayer);\n\t\tboard.display();\n\t\txPlayer.play();\n\t}",
"private static void playGame(int index, GameModel highCardGame){\n GameView.humanLabels[index].setVisible(false);\n GameView.playedCardLabels[1].setIcon(GameView.humanLabels[index].getIcon());\n computerPlay(highCardGame.getHand(1).inspectCard(index).getValue(),highCardGame);\n }",
"private void showMatch() {\n System.out.println(\"Player 1\");\n game.getOne().getField().showField();\n System.out.println(\"Player 2\");\n game.getTwo().getField().showField();\n }",
"private void goCharacter() {\n\t\t// TODO print player\n\t\tSystem.out.println(\"***\");\n\t\tSystem.out.println( \"Warrior: \" + playern.getName());\n\t\tSystem.out.println(\"Level: \" + playern.getLevel());\n\t\tSystem.out.println(\"Experience: \" + playern.getExp());\n\t\tSystem.out.println(\"HP \" + playern.getHp());\n\t\tSystem.out.println(\"***\");\n\t}",
"public FloppyDisplay(FloppyGame myGame) {\n game = myGame;\n bird = game.getBird();\n pipes = game.getPipes();\n\n //Schedule a job for the event-dispatching thread:\n //creating and showing this application's GUI.\n SwingUtilities.invokeLater(this::createAndShowGUI);\n\n //Wait until display has been drawn\n try {\n while (frame == null || !frame.isVisible())\n Thread.sleep(1);\n } catch (InterruptedException e) {\n e.printStackTrace();\n System.exit(1);\n }\n }",
"public void onClickPlayer() {\n carIcon.setOpacity(1);\n playerIcon.setOpacity(1);\n playerList.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {\n displayUserInfo(newValue);\n });\n MAIN_MENU_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n }",
"void drawPlayer(float x, float y, float w)\n\t{\n\t\tline(x, y, x + 50, y);\n\t\tline(x, y, x, y - 50);\n\t\tline(x + 50, y, x + 50, y - 50);\n\t\tline(x, y - 50, x + 50, y - 50);\n\t\tstroke(255,0,0);\n\t}",
"public void act()\n {\n if (Greenfoot.mouseClicked(this))\n Greenfoot.playSound(\"fanfare.wav\");\n }",
"public void showMove(PlayerClient[] players, DraftPoolMP draft, RoundTrackMP track, int[] tools, int activePlayer, int me, MoveEvent event) throws InvalidIntArgumentException, FileNotFoundException {\n printOut(cliToolsManager.sceneInitializer(width));\n printOut(printerMaker.getGameScene(players, draft, track, privateObjective, pubObjs, tools, activePlayer, me));\n printOut(printerMaker.notMyTurnMove(players[activePlayer].getName(), event.getIndex(), event.getX(), event.getY()));\n }",
"private void show() {\n System.out.println(team.toString());\n }",
"public void movieDisplay(){\n actor.display();\n }",
"@Override\r\n\tpublic void display() {\n\t\tSystem.out.println(\"RedHeadDuck\");\r\n\t}",
"private void displayPlayerMenu () {\n System.out.println();\n System.out.println(\"Player Selection Menu:\");\n System.out.println(\n \"Timid player...........\" + TIMID);\n System.out.println(\n \"Greedy player..........\" + GREEDY);\n System.out.println(\n \"Clever player..........\" + CLEVER);\n System.out.println(\n \"Interactive player.....\" + INTERACTIVE);\n }",
"private void drawTarget(Graphics g, Player player)\n {\n if (player.getAlive())\n {\n g.setColor(player.getColor());\n g.drawRect(player.getSafeSpot()[0] * 32 + jitterX, player.getSafeSpot()[1] * 32 + jitterY, 32, 32);\n }\n }",
"private void displayPlayers() {\n\t\tfor (Player p: game.getPlayers()) {\n\t\t\tview.updateDisplay(p.getId(), p.getDeck().getNumberOfCards());\n\t\t}\n\t}",
"public static void playFirework(Collection<Player> players, Location loc,\r\n\t\t\tFireworkEffect... fe) throws Exception {\r\n\t\tfor (Player player : players)\r\n\t\t\tplayFirework(player, loc, fe);\r\n\t}",
"@Override\n\tpublic void render(Graphics g) {\t\n\t\tg.drawImage(Images.player, (int)x, (int)y, null);\n\t}",
"public void act()\n {\n displayBoard();\n Greenfoot.delay(10);\n \n if( checkPlayerOneWin() == true )\n {\n JOptionPane.showMessageDialog( null, \"Congratulations Player One!\", \"playerOne Win\", JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( checkPlayerTwoWin() == true )\n {\n JOptionPane.showMessageDialog( null, \"Congratulations Player Two!\", \"plauerTwo Win\",JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( checkBoardFilled() == true )\n {\n JOptionPane.showMessageDialog( null, \"It is a draw!\", \"Wrong step\", JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( messageShown == false )\n {\n showTurn();\n \n messageShown = true;\n }\n \n checkMouseClick();\n }",
"@Override\n public void show() {\n Label title = new Label(\"Hall of Fame\", new Label.LabelStyle(fonts.getInstance().getClouds(), Color.WHITE));\n title.setPosition(MENU_WIDTH / 2 - title.getWidth() / 2, MENU_HEIGHT / 1.9f + 3*title.getHeight());\n stage.addActor(title);\n }",
"public void play() { \r\n\t System.out.printf(\"Playing Song: artist=%-20s title=%s\\n\", artist, title);\r\n\t}",
"public void paintEntityGui(Entity entity, Graphics graphics, Camera camera, Minimap minimap)\r\n\t{\t\r\n\t\tif(entity.getFaction() == EntityConfiguration.PLAYER_FACTION)\r\n\t\t{\r\n\t\t\tgraphics.setColor(Color.green);\r\n\t\t}\r\n\t\telse if(entity.getFaction() == EntityConfiguration.BOT_FACTION)\r\n\t\t{\r\n\t\t\tgraphics.setColor(Color.red);\r\n\t\t}\r\n\t\telse if(entity.getId() == EntityConfiguration.RESSOURCE)\r\n\t\t{\r\n\t\t\tgraphics.setColor(Color.yellow);\r\n\t\t}\r\n\t\tgraphics.fillRect(entity.getPosition().getX() / GameConfiguration.TILE_SIZE * minimap.getGridMapWidth() + minimap.getFirstGridXOfMap(), \r\n\t\t\t\tentity.getPosition().getY() / GameConfiguration.TILE_SIZE * minimap.getGridMapHeight() + minimap.getFirstGridYOfMap(), \r\n\t\t\t\tminimap.getGridMapWidth(), minimap.getGridMapHeight());\r\n\t}",
"public void showNotification(Notification notification, boolean save) {\n Player recipient = null;\n if (notification.hasRecipient()) {\n String text = notification.getTemplate().compile(notification.getData());\n recipient = Bukkit.getPlayer(notification.getPlayer());\n if (!afk.isPlayerAFK(recipient)) {\n recipient.sendMessage(text);\n notification.playerRead();\n recipient.playSound(recipient.getLocation(), notification.getTemplate().getSound(), 1f, 1f);\n }\n }\n if (notification.isGlobal()) {\n if (recipient == null || !afk.isPlayerAFK(recipient)) {\n String text = notification.getBroadcastTemplate().compile(notification.getData());\n for (Player player : Bukkit.getOnlinePlayers()) {\n if (player == recipient) {\n continue;\n }\n player.sendMessage(text);\n player.playSound(player.getLocation(), notification.getBroadcastTemplate().getSound(), 1f, 1f);\n }\n }\n }\n if (save) {\n saveNotification(notification);\n }\n }",
"public String callPlayer() {\n\t\treturn \"OVER HERE!!\";\n\t}",
"public ImageIcon displayItem(Player owner){\n\t\treturn image;\n\t}",
"@Override\n\tpublic void action(Player player) {\n\t\tfireMessageEvent(player.getPlayerId());\n\t\tplayer.setPosition(jail);\n\t\tplayer.setInJail(true);\n\t}",
"public void display() {\n\t}",
"public void display() {\n startPreview();\n }",
"void fire(WarParticipant target, WarParticipant attacker, int noOfShooters);",
"private void howToPlay() {\n\n String s = \"You are presented with a grid of tiles, some of which contain mines.\\n\"\n + \"The aim of Minesweeper is to reveal all tiles in the grid which do not contain mines.\\n\"\n + \"To reveal a tile, click on it. If the tile you reveal is a mine, you lose the game.\\n\"\n + \"If the tile you reveal is empty, all surrounding tiles will be revealed, \\n\"\n + \"and if those are also empty, their surrounding tiles will be revealed too.\\n\"\n + \"Tiles containing numbers indicate how many mines there are surrounding that tile.\\n\"\n + \"If you think a tile contains a mine, right click on it to mark it as a mine.\\n\"\n + \"You win the game once either you mark all mines, or reveal all tiles which are not mines.\";\n\n JFrame helpframe = new JFrame(\"How to play\");\n JPanel helppanel = new JPanel();\n JButton close = new JButton(\"Got it!\");\n JTextArea text = new JTextArea(s);\n\n close.addActionListener((ActionEvent ev) -> {\n helpframe.dispose();\n });\n\n text.setEditable(false);\n text.setOpaque(false);\n text.setWrapStyleWord(true);\n helppanel.add(text);\n helppanel.add(close);\n helpframe.add(helppanel);\n helpframe.setLocationRelativeTo(null);\n helpframe.setSize(560, 200);\n helpframe.setVisible(true);\n helpframe.setResizable(false);\n }",
"@Override\n public void display() {\n display.display();\n }",
"public void fly() {\n\t\tSystem.out.println(\"我是比赛用排球, 我可以飞!\");\n\t}",
"@Override\n\tpublic void show() {\n\t\tmusic.play();\n\t}",
"public void actionPerformed(ActionEvent evt)\n\t\t{\n\t\t\tif(evt.getSource() == sub)\n\t\t\t{\n\t\t\t\tname = nameJF.getText();\n\t\t\t\tgp = new GamePanel();\n\t\t\t\tgp.setName(name);\n\t\t\t\tHomePanel.this.add(\"Game\", gp);\n\t\t\t\tcl.show(HomePanel.this, \"Game\");\n\t\t\t\t//gp.ti.start();\n\t\t\t}\n\t\t}",
"@Override\n\tpublic void show () {\n overWorld = new Sprite(new TextureRegion(new Texture(Gdx.files.internal(\"Screens/overworldscreen.png\"))));\n overWorld.setPosition(0, 0);\n batch = new SpriteBatch();\n batch.getProjectionMatrix().setToOrtho2D(0, 0, 320, 340);\n\n // Creates the indicator and sets it to the position of the first grid item.\n indicator = new MapIndicator(screen.miscAtlases.get(2));\n // Creates the icon of Daur that indicates his position.\n icon = new DaurIcon(screen.miscAtlases.get(2));\n // Sets the mask position to zero, as this screen does not lie on the coordinate plane of any tiled map.\n screen.mask.setPosition(0, 0);\n screen.mask.setSize(320, 340);\n Gdx.input.setInputProcessor(inputProcessor);\n\n // Creates all relevant text.\n createText();\n // Sets numX and numY to the position of Daur on the map.\n numX = storage.cellX;\n numY = storage.cellY;\n indicator.setPosition(numX * 20, numY * 20 + 19);\n // Sets the icon to the center of this cell.\n icon.setPosition(numX * 20 + 10 - icon.getWidth() / 2, numY * 20 + 29 - icon.getHeight() / 2);\n // Creates all the gray squares necessary.\n createGraySquares();\n }",
"@Override\r\n\tpublic void display() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void display() {\n\t\t\r\n\t}",
"static void pickup(Player player, String what) {\n if (player.getLocation().contains(what)) {\n Thing thing = player.pickup(what);\n if (thing != null) {\n System.out.println(\"You now have \" + thing);\n }\n else {\n System.out.println(\"You can't carry that. You may need to drop something first.\");\n }\n }\n else {\n System.out.println(\"I don't see a \" + what);\n }\n }",
"public void display(int uMove, int cMove, boolean hard)\r\n {\r\n animate.start(uMove, cMove, hard);\r\n }",
"@Override\r\n\tpublic void display() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tSystem.out.println(\"Im a mallard Duck!\");\r\n\t}",
"public void act() \n {\n mouse = Greenfoot.getMouseInfo();\n \n // Removes the achievement after its duration is over if its a popup (when it pops up during the game)\n if(popup){\n if(popupDuration == 0) getWorld().removeObject(this);\n else popupDuration--;\n }\n // Displays the decription of the achievement when the user hovers over it with the mouse\n else{\n if(Greenfoot.mouseMoved(this)) drawDescription();\n if(Greenfoot.mouseMoved(null) && !Greenfoot.mouseMoved(this)) drawMedal();\n }\n }",
"public void fire() {\n\n\t\t// A player cannot continually fire, there is a delay between each bullet.\n\t\tif (isAbleToFire) {\n\n\t\t\taudio.playMusic(\"Audio/Fire.wav\");\n\n\t\t\tif (multiBulletIsActive) {\n\n\t\t\t\tmultiBulletFire();\n\n\t\t\t} else if (speedBulletIsActive) {\n\n\t\t\t\tspeedBulletFire();\n\n\t\t\t} else if (quickFireBulletIsActive) {\n\n\t\t\t\tquickFireBulletFire();\n\n\t\t\t} else {\n\n\t\t\t\t// Single fire.\n\t\t\t\t// Adjust bullet position to be fired from the center of the player.\n\t\t\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2), bulletYPosition,\n\t\t\t\t\t\tbulletWidth, bulletHeight, \"Red\"));\n\t\t\t}\n\n\t\t\t// Stop the player from being able to fire for 'ticksBetweemFire' amount.\n\t\t\tticksToNextFire = currentTickCount + ticksBetweenFire;\n\t\t}\n\t}",
"public void displayHotPlayers(Player fantasy) throws IOException {\n\t\tExportExcel.export(\"Week.xls\", 0, fantasy);\n\t\t\n\t\tMinHeap min = MinHeap.getInstance();\n\t\t\n\t\tHashMap<String, Integer> outputPlayers = new HashMap<String, Integer>();\n\t\t\n\t\tPercentLine[] topStats = min.getOverall(min.OVERALL);\n\t\tSystem.out.println(\"Overall Top Value\");\n\t\tUtil.displayHeap(topStats, min.OVERALL, outputPlayers);\n\t\t\n\t\ttopStats = MinHeap.getInstance().getOverall(min.POINTS);\n\t\tSystem.out.println(\"Overall Top Points\");\n\t\tUtil.displayHeap(topStats, min.POINTS, outputPlayers);\n\t\t\n\t\ttopStats = MinHeap.getInstance().getOverall(min.REBOUNDS);\n\t\tSystem.out.println(\"Overall Top Rebounds\");\n\t\tUtil.displayHeap(topStats, min.REBOUNDS, outputPlayers);\n\t\t\n\t\ttopStats = MinHeap.getInstance().getOverall(min.ASSISTS);\n\t\tSystem.out.println(\"Overall Top Assists\");\n\t\tUtil.displayHeap(topStats, min.ASSISTS, outputPlayers);\n\t\t\n\t\ttopStats = MinHeap.getInstance().getOverall(min.THREES);\n\t\tSystem.out.println(\"Overall Top Threes\");\n\t\tUtil.displayHeap(topStats, min.THREES, outputPlayers);\n\t\t\n\t\ttopStats = MinHeap.getInstance().getOverall(min.STEALS);\n\t\tSystem.out.println(\"Overall Top Steals\");\n\t\tUtil.displayHeap(topStats, min.STEALS, outputPlayers);\n\t\t\n\t\ttopStats = MinHeap.getInstance().getOverall(min.BLOCKS);\n\t\tSystem.out.println(\"Overall Top Blocks\");\n\t\tUtil.displayHeap(topStats, min.BLOCKS, outputPlayers);\n\t\t\n\t\tSystem.out.println(\"Players +3 Categories\");\n\t\tUtil.display(outputPlayers);\n\t\t\n\t\ttopStats = MyTeam.getInstance().getList();\n\t\tSystem.out.println(ExportExcel.TEAM_PERFORMANCE + \"'s Performance over the last week\");\n\t\tUtil.displayHeap(topStats, min.OVERALL, outputPlayers);\n\t}",
"public void act() \r\n {\r\n if (Greenfoot.mouseClicked(this)) {\r\n Greenfoot.setWorld(new howToPlayGuide());\r\n }\r\n }"
] |
[
"0.6440098",
"0.62625426",
"0.6104298",
"0.60649526",
"0.60623044",
"0.60500115",
"0.601436",
"0.60018253",
"0.59889704",
"0.5978993",
"0.59768987",
"0.5948821",
"0.5906366",
"0.5851752",
"0.5831794",
"0.5827715",
"0.58111393",
"0.5763485",
"0.5758612",
"0.5758344",
"0.5747851",
"0.57361144",
"0.5731941",
"0.57221496",
"0.57025295",
"0.56827796",
"0.56750494",
"0.5672691",
"0.56688684",
"0.565125",
"0.56347215",
"0.5633452",
"0.5632049",
"0.5627826",
"0.5624847",
"0.5615812",
"0.5612531",
"0.5612531",
"0.5608081",
"0.56032145",
"0.560133",
"0.55971104",
"0.55969536",
"0.55963385",
"0.55823624",
"0.5575492",
"0.55753565",
"0.55728203",
"0.5571934",
"0.55707574",
"0.556831",
"0.55620855",
"0.5557847",
"0.5556357",
"0.5556304",
"0.55501586",
"0.55499464",
"0.5543082",
"0.5528439",
"0.55263704",
"0.5526053",
"0.5525153",
"0.5523821",
"0.5511593",
"0.5506219",
"0.5505255",
"0.55011666",
"0.54962885",
"0.5488827",
"0.54842114",
"0.5476429",
"0.5470959",
"0.546806",
"0.5461388",
"0.5454854",
"0.5454833",
"0.54523695",
"0.5450729",
"0.5444134",
"0.54379207",
"0.5437566",
"0.5430406",
"0.5428018",
"0.54262483",
"0.5419139",
"0.5418239",
"0.5413807",
"0.5412164",
"0.54099137",
"0.5402205",
"0.5401992",
"0.5401714",
"0.5401714",
"0.53989244",
"0.53961945",
"0.5394519",
"0.5390698",
"0.5387693",
"0.538457",
"0.5383113"
] |
0.68914795
|
0
|
detonate the firework, and destroy the entity.
|
@Override
public void run() {
PacketPlayOutEntityStatus status = new PacketPlayOutEntityStatus(fw, (byte) 17);
((CraftPlayer) p).getHandle().playerConnection.sendPacket(status);
PacketPlayOutEntityDestroy destroy = new PacketPlayOutEntityDestroy(fw.getId());
((CraftPlayer) p).getHandle().playerConnection.sendPacket(destroy);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void entityDeactivating() {}",
"public void deactivate() {\n\t\tentity.deactivateInstance(this);\n\t}",
"void entityDestroyed(Entity entity);",
"@Override\n\tpublic void delete(EntityManagerFactory emf, Stop entity) {\n\t\t\n\t}",
"protected void attemptDeletion()\n {\n if ( this.nmsEntity != null )\n {\n this.nmsEntity.destroyHologramEntity();\n }\n // Setting all variables to null\n this.nmsEntity = null;\n this.location = null;\n }",
"private void cleanup(OpenJPAEntityManagerFactorySPI emf) {\n clear(emf);\n closeEMF(emf);\n }",
"@Override\n public void destroy() {\n super.destroy();\n dungeon.removeEntity(this);\n }",
"@Override\n protected void onDestroy() {\n super.onDestroy();\n if (fireworkView.isRunning()) {\n fireworkView.setRunning(false);\n }\n }",
"public final void delete() {\n\t\tOllie.delete(this);\n\t\tOllie.removeEntity(this);\n\t\tnotifyChange();\n\t\tid = null;\n\t}",
"public void destroyDefense(){\n\t\tif(currentConstruct != null)\n\t\t\tcurrentConstruct.receiveDamage(currentConstruct.getHitpoints());\n\t}",
"public abstract void endDXFEntity();",
"public void entityDeactivated() {\r\n \t\t\r\n \t\tif (logger.isDebugEnabled()) {\r\n \t\t\tlogger\r\n \t\t\t.debug(\"entityDeactivated(): ending all activities\");\r\n \t\t}\r\n \t\t\r\n \t\tfor(ActivityHandle handle: activities.keySet()) {\r\n \t\t\ttry {\r\n \t\t\t\tsleeEndpoint.activityEnding(handle);\r\n \t\t\t} catch (UnrecognizedActivityException uae) {\r\n \t\t\t\tlogger.error(\"failed to indicate activity has ended\",\r\n \t\t\t\t\tuae);\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\tif (logger.isDebugEnabled()) {\r\n \t\t\tlogger.debug(\"entityDeactivated(): cleaning naming context\");\r\n \t\t}\r\n \t\ttry {\r\n \t\t\tcleanNamingContextBindings();\r\n \t\t} catch (NamingException e) {\r\n \t\t\tlogger.error(\"failed to clean naming context\",e);\r\n \t\t}\r\n \t\t\r\n \t\tif (logger.isDebugEnabled()) {\r\n \t\t\tlogger\r\n \t\t\t.debug(\"entityDeactivated() completed\");\r\n \t\t}\r\n \t}",
"@After\n\tpublic void Destroy(){\n\t\tuserDao = null;\n\t\tentityManager = null;\n\t}",
"public void enemyoff(){\n getWorld().removeObject(this);\n }",
"public void destroy() {\n\t\tsuper.destroy(); \n\t\t// Put your code here\n\t}",
"@DELETE\n public void delete() {\n PersistenceService persistenceSvc = PersistenceService.getInstance();\n try {\n persistenceSvc.beginTx();\n deleteEntity(getEntity());\n persistenceSvc.commitTx();\n } finally {\n persistenceSvc.close();\n }\n }",
"public static void despawnEntity(Player p, Entity entity){\n despawnEntity(p, entity.getId());\n }",
"public void detach() {\n body.destroyFixture(fixture);\n world.destroyBody(body);\n engineSound.stop();\n }",
"@After\n public void teardown() {\n for (UseTypeEntity thisEntity : entities) {\n me.deleteUseTypeEntity(thisEntity);\n }\n\n // clean up\n me = null;\n testEntity = null;\n entities = null;\n\n }",
"public void unsetEntityContext() {\n _ctx = null;\n }",
"public void entityRemoved() {}",
"public void destroy(){\n\t\tif(entState != EntState.Destroyed){\n\t\t\tentState = EntState.Destroyed;\n\t\t\tif(childList != null){\n\t\t\t\tfor (Ent e : childList){\n\t\t\t\t\te.destroy();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n @After\n public void teardown() throws Exception {\n EveKitUserAccountProvider.getFactory()\n .runTransaction(() -> {\n EveKitUserAccountProvider.getFactory()\n .getEntityManager()\n .createQuery(\"DELETE FROM Opportunity \")\n .executeUpdate();\n });\n OrbitalProperties.setTimeGenerator(null);\n super.teardown();\n }",
"public void closeEntity();",
"public void destroy() {\n \t\n }",
"public void destroy() {\n\t\tsuper.destroy();\n\t\tlockManager.releaseLock();\n\t\tlockManager.releaseTimer();\n\t\tif (timerForAutomaticSaving != null) {\n\t\t\t/* cancel the timer, if map is closed. */\n\t\t\ttimerForAutomaticSaving.cancel();\n\t\t}\n\t}",
"public void deletar() {\n\t\tClienteDAO Clientedao = new ClienteDAO();\t\r\n\t\tClientedao.delete(this);\r\n\t\t\r\n\t\tnovoRegistro();\r\n\t\tnotifyObservers();\r\n\t}",
"public void destroy() {\n World.getInstance().getTracked().remove(this); // unregister self from World\n }",
"public void deleteInstance(){\n //cancels the runnable\n shouldCancelRunnable = true;\n //remove the chest from the map to avoid confusion\n this.location.getBlock().setType(Material.AIR);\n //unregister from all events, we're done!\n HandlerList.unregisterAll(this);\n }",
"void deactivate() {\n\t\tanimalTemplate = null;\n\t\tscope=null;\n\t\ttriggerOnID=false;\n\t\tstate = null;\n\t\tlog.debug(bundleMarker, \"deactivating...\");\n\t}",
"public void destroy(@Entity int entity) {\n nDestroy(mNativeObject, entity);\n }",
"public void destroy()\r\n\t{\r\n\t\tlog.fine(\"destroy\");\r\n\t}",
"public void cleanup(Entity e)\n {\n\t\tif(my_mesh != null)\n\t\t{\n\t\t\tRenderManagerCallback rc = new RenderManagerCallback()\n\t\t\t{\n\t\t\t\tpublic void onSuccess()\n\t\t\t\t{\n\t\t\t\t\t//System.err.println(\"Removing from world\");\n\t\t\t\t\tmy_geom.removeFromParent();\n\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\t\tRenderManager.addCallback(rc);\n\t\t}\n }",
"public void destroy() {\n this.game.deleteObject(this);\n }",
"public void destroy() {\n\t\t\r\n\t}",
"public void destroy() {\n\t\t\r\n\t}",
"public void destroy() {\n\t\t\r\n\t}",
"public void destroy() {\n\t\t\r\n\t}",
"public void destroy()\r\n\t{\n\t\t\r\n\t}",
"public void cleanUp() {\r\n\t\temfactory.close();\r\n\t}",
"@Override\r\n public void destroy() {\n \tdaoMaterial=null;\r\n \tdaoUsuario=null;\r\n \tsuper.destroy();\r\n }",
"public void removeDefense(){\n\t\tcurrentConstruct = null;\n\t\thasDefenseObject = false;\n\t}",
"@Override\n\tpublic void deletRow(HongXunWorkItem hongXunWorkItem) {\n\t\tgetHibernateTemplate().delete(hongXunWorkItem);\n\t}",
"public void destroy() {\r\n\t\ttexture.destroy();\r\n\t}",
"@Override\r\n protected void terminate() {\n forceEntities.release();\r\n forceEntities = null;\r\n\r\n velocityEntities.release();\r\n velocityEntities = null;\r\n\r\n gravityEntities.release();\r\n gravityEntities = null;\r\n }",
"void destroy() {\n\t\tdespawnHitbox();\n\t\tinventory.clear();\n\t\texperience = 0;\n\t\tinvalid = true;\n\t}",
"public void deletePhysical(final T entity)\n\t{\n\t\tem.remove(entity);\n\t}",
"public final void clean() {\n distributed_graph.unpersist(true);\n }",
"@Override\n\tpublic void del() {\n\t\ttarget.del();\n\t}",
"@Override\n\tpublic void deletRow(HongXunWorkNum hongXunWorkNum) {\n\t\tgetHibernateTemplate().delete(hongXunWorkNum);\n\t}",
"public void destroy() {\r\n\r\n\t}",
"@Override\n\tpublic void despawn() {\n\t\t\n\t}",
"@After\n\tpublic void tearDown() throws Exception {\n\t\tydelseService.setEntityManager(null);\n\t}",
"public void removeEntity(Entity entity) {\n\t\tif (entity instanceof Bullet) {\n\t\t\tif (((Bullet) entity).getName().equals(\"bullet\")) {\n\t\t\t\tbullet.remove(entity);\n\t\t\t} else if (((Bullet) entity).getName().equals(\"enemy_bullet\")\n\t\t\t\t\t|| ((Bullet) entity).getName().equals(\"boss_bullet\")) {\n\t\t\t\tenemy_bullet.remove(entity);\n\t\t\t}\n\t\t} else if (entity instanceof Enemy) {\n\t\t\tint enemyX = entity.getX();\n\t\t\tint enemyY = entity.getY();\n\t\t\t\n\t\t\tif (!((Enemy) entity).getName().equals(\"boss\")) {\n\t\t\t\tenemy.remove(entity);\n\t\t\t\t// play enemy explosion sfx\n\t\t\t\tsound.get(\"enemyExplosionEffect\").playAsSoundEffect(1.0f, 1.0f, false);\n\t\t\t\t\n\t\t\t\t// add enemy explosion\n\t\t\t\texplosion.add(new Explosion(this, \"enemy_explosion\", enemyX - 5, enemyY - 5, entity));\n\t\t\t\tpowerupCheck(enemyX, enemyY);\n\t\t\t} else if (((Enemy) entity).getName().equals(\"boss\") && bossExplosionNum == 0) {\n\t\t\t\tbossExplosionNum = 1;\n\t\t\t\t\n\t\t\t\tsound.get(\"bossExplosionEffect\").playAsSoundEffect(1.0f, 1.0f, false);\n\t\t\t\texplosion.add(new Explosion(this, \"enemy_explosion\", enemyX, enemyY, entity));\n\t\t\t}\n\t\t\t\n\t\t\t// add cash and points to score\n\t\t\tif (!stopDrawingPlayer && ((Enemy) entity).getName().equals(\"green_box\")) {\n\t\t\t\tcash += 30;\n\t\t\t\ttotalCash += 30;\n\t\t\t} else if (!stopDrawingPlayer && ((Enemy) entity).getName().equals(\"red_box\")) {\n\t\t\t\tcash += 50;\n\t\t\t\ttotalCash += 50;\n\t\t\t} else if (!stopDrawingPlayer && ((Enemy) entity).getName().equals(\"boss\")) {\n\t\t\t\ttotalCash += 500;\n\t\t\t}\n\t\t} else if (entity instanceof Powerup) {\n\t\t\t// play obtain powerup sfx\n\t\t\tsound.get(\"powerupGetEffect\").playAsSoundEffect(1.0f, 1.0f, false);\n\t\t\t\n\t\t\tEnemy boss = null;\n\t\t\t\n\t\t\tpowerup.remove(entity);\n\t\t\tif (((Powerup) entity).getName() == \"powerup_explosion\") {\n\t\t\t\tfor (int i = 0; i < enemy.size(); i++) {\n\t\t\t\t\tif (!enemy.get(i).getName().equals(\"boss\")) {\n\t\t\t\t\t\texplosion.add(new Explosion(this, \"enemy_explosion\", enemy.get(i).getX() - 5,\n\t\t\t\t\t\t\t\tenemy.get(i).getY() - 5, entity));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tboss = enemy.get(i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < enemy.size(); i++) {\n\t\t\t\t\tif (enemy.get(i).getName().equals(\"green_box\")) {\n\t\t\t\t\t\tcash += 30;\n\t\t\t\t\t\ttotalCash += 30;\n\t\t\t\t\t} else if (enemy.get(i).getName().equals(\"red_box\")) {\n\t\t\t\t\t\tcash += 50;\n\t\t\t\t\t\ttotalCash += 50;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// play enemy explosion sfx\n\t\t\t\tsound.get(\"enemyExplosionEffect\").playAsSoundEffect(1.0f, 1.0f, false);\n\t\t\t\tenemy.clear();\n\t\t\t\t\n\t\t\t\tif (boss != null)\n\t\t\t\t\tenemy.add(boss);\n\t\t\t}\n\t\t} else if (entity instanceof Player) {\n\t\t\t// play player explosion sfx\n\t\t\tsound.get(\"playerExplosionEffect\").playAsSoundEffect(1.0f, 1.0f, false);\n\t\t\t\n\t\t\texplosion.add(new Explosion(this, \"player_explosion\", player.getX() - 5, player.getY() - 5,\n\t\t\t\t\tentity));\n\t\t\tstopDrawingPlayer = true;\n\t\t}\n\t}",
"@Override\r\n\tpublic void delete(Empregado entity) throws Exception {\n\t\tentity.setAtivo(false);\r\n\t\tem.unwrap(Session.class).update(entity);\r\n\t}",
"public void delete(T entity) throws Exception{\n\t\tem.remove(entity);\n\t}",
"public void destroy() {\n\n\t}",
"public void destroy() {\n\n\t}",
"public void destroy() {\n\n\t}",
"public void destroy() {\n\n\t}",
"public void destroy() {\n\n\t}",
"public void destroy() {\n\n\t}",
"public static void despawnEntity(Player p, int entityID){\n PacketPlayOutEntityDestroy deadEntity = new PacketPlayOutEntityDestroy(entityID);\n ((CraftPlayer) p.getPlayer()).getHandle().playerConnection.sendPacket(deadEntity);\n\n }",
"public void destroy()\r\n\t{\r\n\t}",
"public void destroy() {\n destroying = true;\n }",
"public void clear() {\n\t\t//Kill all entities\n\t\tentities.parallelStream().forEach(e -> e.kill());\n\n\t\t//Clear the lists\n\t\tentities.clear();\n\t\tdrawables.clear();\n\t\tcollidables.clear();\n\t}",
"@Override\r\n\tpublic void delete(T instance) {\r\n\t\tif (isManaged(instance)) {\r\n\t\t\tinstance = loadInstance(instance.getId());\r\n\t\t\tgetEntityManager().remove(getEntityManager().merge(instance));\r\n\t\t}\r\n\t}",
"public void destroy() {\r\n }",
"@After\n public void after() {\n pl.getEntityManager().clear();\n }",
"@Override\r\n\tpublic void destroy()\r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void detach(Object entity) {\n\t\t\n\t}",
"public void destroy() {\r\n\t\tsuper.destroy();\r\n\t\tBirtEngine.destroyBirtEngine();\r\n\t}",
"public void close()\r\n {\r\n myModel.deleteObserver(this);\r\n }",
"public void deleteEntity(AnnexDetail entity) throws Exception {\n\t\t\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}",
"public void destroy() {\n\t\tsuper.destroy(); // Just puts \"destroy\" string in log\n\t\t// Put your code here\n\t}"
] |
[
"0.660932",
"0.64735377",
"0.6386711",
"0.62106824",
"0.6210486",
"0.6198425",
"0.6171152",
"0.6140387",
"0.61364",
"0.6134273",
"0.6120027",
"0.60879517",
"0.6060765",
"0.6037999",
"0.6011313",
"0.5994679",
"0.59878236",
"0.5951787",
"0.5950784",
"0.59380084",
"0.5937315",
"0.5929926",
"0.5919102",
"0.5910365",
"0.5902801",
"0.58880115",
"0.58851",
"0.5876896",
"0.5867303",
"0.58670664",
"0.5860877",
"0.58569247",
"0.5843188",
"0.584279",
"0.58284324",
"0.58284324",
"0.58284324",
"0.58284324",
"0.58130854",
"0.577811",
"0.5772826",
"0.5772461",
"0.57622707",
"0.5744137",
"0.5736988",
"0.57341206",
"0.5723511",
"0.57212627",
"0.5711492",
"0.57061136",
"0.5705203",
"0.5704794",
"0.5690565",
"0.5668422",
"0.5652877",
"0.56482315",
"0.5646402",
"0.5646402",
"0.5646402",
"0.5646402",
"0.5646402",
"0.5646402",
"0.5646193",
"0.56421226",
"0.5635261",
"0.5635228",
"0.563414",
"0.56308454",
"0.5628382",
"0.56246245",
"0.5624253",
"0.5624108",
"0.56190544",
"0.56152654",
"0.5614993",
"0.5614993",
"0.5614993",
"0.5614993",
"0.5614993",
"0.5614993",
"0.5614993",
"0.5614993",
"0.5614993",
"0.5614993",
"0.5614993",
"0.5614993",
"0.5614993",
"0.5614993",
"0.5614993",
"0.5614993",
"0.5614993",
"0.5614993",
"0.5614993",
"0.5614993",
"0.5614993",
"0.5614993",
"0.5614993",
"0.5614993",
"0.5614993",
"0.5614993",
"0.5614993"
] |
0.0
|
-1
|
Updates a hologram for a player
|
public static void updateHologram(Player p, EntityArmorStand stand, String newName){
if(stand==null || p==null){
return; //something definately went wrong. safeguard
}
//create a new metadata packet with the correct datawatchers.
DataWatcher dataWatcher = new DataWatcher(null);
if(newName!=null) {
dataWatcher.a(2, newName); //2 = optChat with custom name (see https://wiki.vg/Entity_metadata#Entity_Metadata_Format)
dataWatcher.a(3, (byte) 1); //3 = customnamevisible , set to true.
}else{
dataWatcher.a(3, (byte) 0); //if name is null, simply set customnamevisible to false.
}
//send the packet to the player
PacketPlayOutEntityMetadata packet = new PacketPlayOutEntityMetadata(stand.getId(), dataWatcher, true);
((CraftPlayer) p).getHandle().playerConnection.sendPacket(packet);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void showHologram(Player player) {\n if(!trackPlayers || playerHologramIds.getOrDefault(player.getUniqueId(), null) == null) {\n List<Integer> ids = Lists.newArrayList();\n WorldServer world = ((CraftWorld) location.getWorld()).getHandle();\n AtomicDouble currentSpacing = new AtomicDouble(this.text.size() * spacing);\n\n text.forEach(text -> {\n EntityArmorStand stand = new EntityArmorStand(world);\n stand.setCustomName(text);\n stand.setCustomNameVisible(true);\n stand.setLocation(\n location.getX(),\n location.getY() + currentSpacing.get(),\n location.getZ(),\n 0f,\n 0f\n );\n stand.setGravity(false);\n stand.setInvisible(true);\n ids.add(stand.getId());\n\n ((CraftPlayer) player).getHandle().playerConnection.sendPacket(new PacketPlayOutSpawnEntityLiving(stand));\n\n currentSpacing.addAndGet(-spacing);\n });\n\n playerHologramIds.put(player.getUniqueId(), ids);\n }\n }",
"public Hologram(Location location) {\n this.location = location;\n this.text = Lists.newArrayList();\n this.playerHologramIds = Maps.newConcurrentMap();\n\n this.spacing = 0.25;\n this.trackPlayers = true;\n }",
"public void hideHologram(Player player) {\n List<Integer> ids = playerHologramIds.getOrDefault(player.getUniqueId(), null);\n\n if(ids != null) {\n ids.forEach(id ->\n ((CraftPlayer) player).getHandle().playerConnection.sendPacket(new PacketPlayOutEntityDestroy(id)));\n playerHologramIds.remove(player.getUniqueId());\n }\n }",
"Object renameHologramPacket(int id, String text);",
"Horse updateHorse(Horse horse);",
"void updatePlayer(Player player);",
"@Override\n\tpublic void updatePlayer(Joueur joueur) {\n\t\t\n\t}",
"public Player updatePlayer(Player player);",
"public void update(Player player) {\n\t\t\n\t}",
"public void updatePlayer(Player player) {\n\t\t// update the flag GO TO JAIL in Player class\n\t}",
"@Override\r\n\t\t\tpublic void hear(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void hear(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void hear(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}",
"Object moveHologramPacket(int id, Location to);",
"public void change_hero_pos() {\n\t\tif (labirinto.getLab()[heroi.getX_coord()][heroi.getY_coord()] == 'O')\n\t\t\theroi.setShielded(true);\n\t\tif (heroi.isArmado())\n\t\t\tlabirinto.setLabCell(heroi.getX_coord(), heroi.getY_coord(), 'A');\n\t\telse\n\t\t\tlabirinto.setLabCell(heroi.getX_coord(), heroi.getY_coord(), 'H');\n\t}",
"private void updateObjects(Graphics g){\n\t\tclearMhos(g);\n\t\tclearPlayer(g);\n\t\tdrawMhos(g);\n\t\tdrawPlayer(g);\n\t\tdrawFences(g);\n\t\tDraw.drawInstructions(g,smallFont);\n\t}",
"public void hp(Graphics g) {\n\t\tw = g.getFontMetrics().stringWidth(\"HP: \" + player.hp); //Get the width of the rendered text\n\t\tg.setColor(Color.white); //Set the colour for the text\n\t\tg.setFont(f); //Set the font for the text\n\t\tg.drawString(\"HP: \" + player.hp, WIDTH-w-25, 25); //Draw \"HP: #\" in the top right corner of the screen\n\t}",
"public void updateHud() {\r\n\r\n\t\tif (m_planet.getCoordinateSystemType() == Planet.CoordinateSystemType.GEOCENTRIC) {\r\n\t\t\t// Getting longitud and latitud informacion from planet\r\n\t\t\tlon = Hud.getSexagesinal(m_planet.getLongitude(), true);\r\n\t\t\tlat = Hud.getSexagesinal(m_planet.getLatitude(), false);\r\n\t\t\t\r\n\r\n\t\t\t// Updating text information\r\n\t\t\ttextoHud.setText(lonText + \" \" + lon + \" \" + latText + \" \" + lat);\r\n\t\t} else {\r\n\t\t\t// Getting longitud and latitud informacion from planet\r\n\t\t\tlon = Double.toString(m_planet.getLongitude());\r\n\t\t\tlat = Double.toString(m_planet.getLatitude());\r\n\r\n\t\t\t// Updating text information\r\n\t\t\ttextoHud.setText(lonText + \" \" + lon + \" \" + latText + \" \" + lat);\r\n\t\t}\r\n\t\t\r\n\t\tcompass.setScale(new Vec3(75,75,75));\r\n\t\tcompass.setPosition(new Vec3(m_canvas3d.getWidth()-70,m_canvas3d.getHeight()-70,0));\r\n\t\t// Repainting view\r\n\t\tif (m_canvas3d != null)\r\n\t\t\tm_canvas3d.repaint();\r\n\t}",
"private void updateSpotLight() {\n\t\tfloat light0_position[] = { player.getPosition().x, 16.0f, player.getPosition().z, 1.0f }; // x,y,z,1\n\t\tfloat light0_diff_spec[] = { 1f, 1f, 1f, 1.0f };\n\t\tfloat light0_direction[] = {-(float)Math.sin(Math.toRadians(player.getRotY())),0,-(float)Math.cos(Math.toRadians(player.getRotY())), 1f};\n\t\t// Eine weitere Lichtquellen definieren\n\t\tspotLight.setPosition(light0_position);\n\t\tspotLight.setCutoff(45.f);\n\t\tspotLight.setDirection(light0_direction);\n\t\tspotLight.setDiffAndSpek(light0_diff_spec);\n\t\t\n\t\tglEnable(GL_LIGHTING);\n\t}",
"public abstract Scoreboard update(Player player);",
"public void setHeuristic(int h) {\n\t\t\tthis.heuristique = h;\n\t\t}",
"public void updateHp(double amount);",
"@Override\n public void playerAttributeChange() {\n\n Logger.info(\"HUD Presenter: playerAttributeChange\");\n view.setLives(String.valueOf(player.getLives()));\n view.setMoney(String.valueOf(player.getMoney()));\n setWaveCount();\n }",
"abstract void updatePlayer();",
"public void updateMhos() { \r\n\r\n\t\tfor (int i = 0; i < 12; i++) {\r\n\t\t\tif (Mhos[i].isAlive) {// Mho AI\r\n\t\t\t\t\r\n\t\t\t\tif (Mhos[i].x == p.x) // directly vertical\r\n\t\t\t\t\tif (Mhos[i].y > p.y) // move up\r\n\t\t\t\t\t\tmoveMho(i, 0, -1);\r\n\t\t\t\t\telse // move down\r\n\t\t\t\t\t\tmoveMho(i, 0, 1);\r\n\r\n\t\t\t\telse if (Mhos[i].y == p.y) { // directly horizontal\r\n\t\t\t\t\tif (Mhos[i].x > p.x) {\r\n\t\t\t\t\t\tmoveMho(i, -1, 0);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tmoveMho(i, 1, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tint relPos = Mhos[i].relToPlayer(p.x, p.y);\r\n\t\t\t\t\tint horDist = Math.abs(Mhos[i].x - p.x);\r\n\t\t\t\t\tint verDist = Math.abs(Mhos[i].y - p.y);\r\n\r\n\t\t\t\t\tif (relPos == 1) { // top right\r\n\t\t\t\t\t\tif (!(board[Mhos[i].x - 1][Mhos[i].y + 1] instanceof Fence\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x - 1][Mhos[i].y + 1] instanceof Mho)) {\r\n\t\t\t\t\t\t\t// directly diagonal\r\n\t\t\t\t\t\t\tmoveMho(i, -1, 1);\r\n\t\t\t\t\t\t} else if (horDist >= verDist && !(board[Mhos[i].x - 1][Mhos[i].y] instanceof Fence\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x - 1][Mhos[i].y] instanceof Mho)) // horizontal\r\n\t\t\t\t\t\t\tmoveMho(i, -1, 0);\r\n\r\n\t\t\t\t\t\telse if (horDist <= verDist && !(board[Mhos[i].x][Mhos[i].y + 1] instanceof Fence)\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x][Mhos[i].y + 1] instanceof Fence) // vertical\r\n\t\t\t\t\t\t\tmoveMho(i, 0, 1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// tries to move on a fence now\r\n\t\t\t\t\t\telse if (board[Mhos[i].x - 1][Mhos[i].y + 1] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, -1, 1);\r\n\t\t\t\t\t\telse if (horDist >= verDist && board[Mhos[i].x - 1][Mhos[i].y] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, -1, 0);\r\n\t\t\t\t\t\telse if (horDist >= verDist && board[Mhos[i].x][Mhos[i].y + 1] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, 0, 1);\r\n\r\n\t\t\t\t\t} else if (relPos == 2) { // top left\r\n\t\t\t\t\t\tif (!(board[Mhos[i].x + 1][Mhos[i].y + 1] instanceof Fence\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x + 1][Mhos[i].y + 1] instanceof Mho)) {\r\n\t\t\t\t\t\t\t// directly diagonal\r\n\t\t\t\t\t\t\tmoveMho(i, 1, 1);\r\n\t\t\t\t\t\t} else if (horDist >= verDist && !(board[Mhos[i].x + 1][Mhos[i].y] instanceof Fence\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x + 1][Mhos[i].y] instanceof Mho)) // horizontal\r\n\t\t\t\t\t\t\tmoveMho(i, 1, 0);\r\n\r\n\t\t\t\t\t\telse if (horDist <= verDist && !(board[Mhos[i].x][Mhos[i].y + 1] instanceof Fence)\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x][Mhos[i].y + 1] instanceof Fence) // vertical\r\n\t\t\t\t\t\t\tmoveMho(i, 0, 1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// tries to move on a fence now\r\n\t\t\t\t\t\telse if (board[Mhos[i].x + 1][Mhos[i].y + 1] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, 1, 1);\r\n\t\t\t\t\t\telse if (horDist >= verDist && board[Mhos[i].x + 1][Mhos[i].y] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, 1, 0);\r\n\t\t\t\t\t\telse if (horDist >= verDist && board[Mhos[i].x][Mhos[i].y + 1] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, 0, 1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} else if (relPos == 3) { // bottom left\r\n\t\t\t\t\t\tif (!(board[Mhos[i].x + 1][Mhos[i].y - 1] instanceof Fence\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x + 1][Mhos[i].y - 1] instanceof Mho)) {\r\n\t\t\t\t\t\t\t// directly diagonal\r\n\t\t\t\t\t\t\tmoveMho(i, 1, -1);\r\n\t\t\t\t\t\t} else if (horDist >= verDist && !(board[Mhos[i].x + 1][Mhos[i].y] instanceof Fence\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x + 1][Mhos[i].y] instanceof Mho)) // horizontal\r\n\t\t\t\t\t\t\tmoveMho(i, 1, 0);\r\n\r\n\t\t\t\t\t\telse if (horDist <= verDist && !(board[Mhos[i].x][Mhos[i].y - 1] instanceof Fence)\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x][Mhos[i].y - 1] instanceof Fence) // vertical\r\n\t\t\t\t\t\t\tmoveMho(i, 0, -1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// tries to move on a fence now\r\n\t\t\t\t\t\telse if (board[Mhos[i].x + 1][Mhos[i].y - 1] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, 1, -1);\r\n\t\t\t\t\t\telse if (horDist >= verDist && board[Mhos[i].x + 1][Mhos[i].y] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, 1, 0);\r\n\t\t\t\t\t\telse if (horDist >= verDist && board[Mhos[i].x][Mhos[i].y - 1] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, 0, -1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} else if (relPos == 4) { // bottom right\r\n\t\t\t\t\t\tif (!(board[Mhos[i].x - 1][Mhos[i].y - 1] instanceof Fence\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x - 1][Mhos[i].y - 1] instanceof Mho)) {\r\n\t\t\t\t\t\t\t// directly diagonal\r\n\t\t\t\t\t\t\tmoveMho(i, -1, -1);\r\n\t\t\t\t\t\t} else if (horDist >= verDist && !(board[Mhos[i].x - 1][Mhos[i].y] instanceof Fence\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x - 1][Mhos[i].y] instanceof Mho)) // horizontal\r\n\t\t\t\t\t\t\tmoveMho(i, -1, 0);\r\n\r\n\t\t\t\t\t\telse if (horDist <= verDist && !(board[Mhos[i].x][Mhos[i].y - 1] instanceof Fence)\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x][Mhos[i].y - 1] instanceof Fence) // vertical\r\n\t\t\t\t\t\t\tmoveMho(i, 0, -1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// tries to move on a fence now\r\n\t\t\t\t\t\telse if (board[Mhos[i].x - 1][Mhos[i].y - 1] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, -1, -1);\r\n\t\t\t\t\t\telse if (horDist >= verDist && board[Mhos[i].x - 1][Mhos[i].y] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, -1, 0);\r\n\t\t\t\t\t\telse if (horDist >= verDist && board[Mhos[i].x][Mhos[i].y - 1] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, 0, -1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}",
"public void setMove(int hash, Player player) {\n board[hash] = player;\n numMoves++;\n }",
"public static void newHighscore(int h){\n highscore = h;\n SharedPreferences prefs = cont.getSharedPreferences(\"PAFF_SETTINGS\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putInt(\"highscore\",highscore);\n editor.commit();\n }",
"public void healPlayer(int hp) {\n if (hero.getHp() < LabyrinthFactory.HP_PLAYER) {\n hero.increaseHP(hp);\n }\n }",
"private void updateWelcome() {\n try {\n if (getOwnerName() != null) {\n TextView welcomeText = (TextView) findViewById(R.id.info_text_1);\n welcomeText.setText(getString(R.string.welcome) + \" \" + getOwnerName() + \"!\");\n }\n } catch (CursorIndexOutOfBoundsException e) {\n e.printStackTrace();\n }\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 }",
"@Override\r\n\tpublic void hear(Player spkr,String s) {\n\t\tplayerMappingService.sendString(this,s);\r\n\t}",
"public void updatePlayer(Player player) {\n Duration playDuration = Duration.ofMinutes(player.getStatistic(Statistic.PLAY_ONE_MINUTE) / 20 / 60);\n int hoursPlayed = Math.toIntExact(playDuration.toHours());\n this.objective.getScore(player.getName()).setScore(hoursPlayed);\n }",
"public static EntityArmorStand displayHologram(Player p, double x, double y, double z, String text){\n //get a new armorstand\n EntityArmorStand stand = new EntityArmorStand(((CraftWorld) p.getPlayer().getWorld()).getHandle());\n\n stand.setLocation(x, y, z, 0,0); //xyz pitch yaw, we dont need the latter 2 for holograms.\n //set the custom text, and make it visible\n stand.setCustomName(text);\n stand.setCustomNameVisible(true);\n\n //stop the armorstand from falling down\n stand.setGravity(false);\n\n //if debug is off, turn it invisible\n stand.setInvisible(!showArmorstandsDebug);\n\n //set it small so its easier to control the height\n stand.setSmall(true);\n\n PacketPlayOutSpawnEntityLiving packet = new PacketPlayOutSpawnEntityLiving(stand);\n ((CraftPlayer) p).getHandle().playerConnection.sendPacket(packet);\n\n return stand;\n }",
"public void setState (int philosphoer, String state){\n currentState[philosphoer] = state;\n }",
"public void setHost(LobbyPlayer player) {\n DocumentReference doc = Firebase.docRefFromPath(\"lobbies/\" + player.getLobbyCode());\n doc.update(FieldPath.of(\"players\", player.getUsername(), \"host\"), true);\n }",
"void updateLeaderSlot(String username, ArrayList<LightLeaderCard> leaderSlot);",
"public void setWinningText(String player) {\n names.setText(player +\" WINS!!!\");\n }",
"void updateTrails() {\r\n\t\tint from, to;\r\n\t\t\r\n\t\t// Pheromone evaporation\r\n\t\tfor(from = 0; from < cities.length; from++) {\r\n\t\t\tfor(to = 0; to < cities.length; to++) {\r\n\t\t\t\tif(from != to) {\r\n\t\t\t\t\tpheromone[from][to] *= (1.0 - RHO);\r\n\t\t\t\t\tif(pheromone[from][to] < 0.0) pheromone[from][to] = INIT_PHEROMONE; \r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// add new pheromone to the trails\r\n\t\t// look at the tours of each ant\r\n\t\tfor(int ai = 0; ai < ants.length; ai++) {\r\n\t\t\tAnt ant = ants[ai];\r\n\t\t\t// update each leg of the tour given the tour length\r\n\t\t\tfor(int i = 0; i < cities.length; i++) {\r\n\t\t\t\tif(i < cities.length - 1) {\r\n\t\t\t\t\tfrom = ant.path[i];\r\n\t\t\t\t\tto = ant.path[i + 1];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfrom = ant.path[i];\r\n\t\t\t\t\tto = ant.path[0];\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tpheromone[from][to] += ((QVAL / ant.tourLength) * RHO);\r\n\t\t\t\tpheromone[to][from] = pheromone[from][to];\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void setHeroHurt(Animation<TextureRegion> heroHurt) {\n this.heroHurt = heroHurt;\n }",
"public void updateUi() {\n updateTextView(R.id.blindword, gameInstance.getBlindWord(), EditMode.ADDSPACING);\n updateTextView(R.id.guessedletters, gameInstance.getGuessedSoFar(), EditMode.ADDSPACING);\n\n int livesTotal = settings.getInt(\"lives\", 7);\n int livesLeft = gameInstance.getLives();\n StringBuilder healthbar = new StringBuilder();\n for(int i=0;i<livesLeft;i++) {\n healthbar.append('\\u2764'); //black heart\n }\n\n for(int i=0;i<(livesTotal - livesLeft);i++) {\n healthbar.append('\\u2661'); //white heart\n }\n\n updateTextView(R.id.healthbar, healthbar.toString(), EditMode.NONE);\n\n gameOverListener();\n\n }",
"public void setHomeScore(int h);",
"void updateSignToPlayer(Player player, Location location, String[] lines);",
"public void updateScore(int score){ bot.updateScore(score); }",
"@Override\r\n\tpublic void update() {\n\t\tListIterator<Player> it = players.listIterator();\r\n\t\twhile(it.hasNext()){\r\n\t\t\tit.next().update();\r\n\t\t}\r\n\t\t// Logica del juego, etc\r\n\t\tcontrolMenu();\r\n\t}",
"public void welcome(Player player) {\n\t\tplayer.speak(\"Where am I? Why is a saw in front of me? Why is my left feet handcuffed? What happened! There is a letter. I should read it......\");\n\t\tplayer.addCarried(new Item(\"handcuff\", null, new String[]{\"isWearable\", \"isDressed\", \"isPortable\", \"isImpedient\"}, new boolean[]{false, true, false, true}, new String[]{\"wearTo\"}, new String[]{\"left feet\"}));\n\t}",
"public void onLivingUpdate()\n {\n this.updateArmSwingProgress();\n float var1 = this.getBrightness(1.0F);\n\n if (var1 > 0.5F)\n {\n this.entityAge += 2;\n }\n\n super.onLivingUpdate();\n }",
"public void hpChange(Context context,int textview, boolean increase, String characterName){\n try {\n Cursor hpCursor = SQLHelper.setupDatabase(context, SQLHelper.TABLE_NAME, null, SQLHelper.CHARACTER_NAME + \"=?\", new String[]{characterName});\n SQLHelper hpSqlhelper = new SQLHelper(context);\n SQLiteDatabase hpDB = hpSqlhelper.getWritableDatabase();\n TextView hpOutput = (TextView) findViewById(textview);\n int currentHP = Integer.parseInt(hpCursor.getString(hpCursor.getColumnIndex(SQLHelper.CHARACTER_HP)));\n int maxHP = Integer.parseInt(hpCursor.getString(hpCursor.getColumnIndex(SQLHelper.CHARACTER_MAX_HP)));\n ContentValues cv = new ContentValues();\n if (increase) {\n currentHP++;\n } else if (!increase) {\n currentHP--;\n }\n cv.put(SQLHelper.CHARACTER_HP, currentHP);\n hpDB.update(SQLHelper.TABLE_NAME, cv, SQLHelper.CHARACTER_NAME + \"=?\", new String[]{characterName});\n hpOutput.setText(currentHP + \"/\" + maxHP);\n Log.i(\"MenuAndDatabase\", \"HP has been modified new HP: \" + currentHP);\n }\n catch (Exception e){\n Log.e(\"MenuAndDatabase\", \"error setting HP: \" + e.toString());\n }\n }",
"private void addPlayerSheild() {\n this.playerShield += 1;\n }",
"private void updateHocSinh() {\n\t\thocsinh user = new hocsinh();\n\n\t\tuser.setMa(txtMa.getText());\n\t\tuser.setTen(txtTen.getText());\n\t\tuser.setTuoi(txtTuoi.getText());\n\t\tuser.setSdt(txtSdt.getText());\n\t\tuser.setDiaChi(txtDiaChi.getText());\n\t\tuser.setEmail(txtEmail.getText());\n\t\t\n\n\t\thocsinhdao.updateUser(user);\n\t}",
"public void update() {\n remHpWidth = healthbarWidth * ent.getCurrentHealth() / ent.getMaxHealth();\n lostHpWidth = healthbarWidth - remHpWidth;\n }",
"@Override\n public void update(Observable o, Object remoteView) {\n RemoteView remote = (RemoteView) remoteView;\n this.mapView = remote.getMapView();\n this.playerHand = remote.getPlayerHands().get(this.playerId);\n this.playerBoardViews = remote.getPlayerBoardViews();\n this.playerPosition = remote.getMapView().getPlayerPosition(remote.getPlayerBoardViews().get(this.playerId).getColor());\n }",
"public void changeMatHang(MatHang mh) throws SQLException {\r\n connectionAdminToAccessData(\"update mathangton set mathangton.tenmh = '\"\r\n + mh.getTenMH() + \"', mathangton.soluong = \"\r\n + mh.getSoLuong() + \", mathangton.ngaynhap = '\"\r\n + mh.getNgayNhapXuat() + \"' where mathangton.mamh = '\" + mh.getMaMH() + \"'\");\r\n rs.close();\r\n stm.close();\r\n con.close();\r\n }",
"public Builder setPlayerHash(double value) {\n \n playerHash_ = value;\n onChanged();\n return this;\n }",
"public void play() {\n if (!isHungry()) {\n hunger += 2;\n mood += 2;\n fatigue += 3;\n\n if (!muted) {\n System.out.println(\"play\\t|\\tPlaying is fun!\");\n }\n }\n }",
"public void makeHappy() {\n while (statusEnum() != TamagotchiMood.HAPPY) {\n if (!isHungry() && !isTired()) {\n play();\n } else if (isHungry() && !isTired()) {\n eat();\n } else {\n sleep();\n }\n }\n\n if (!muted) {\n System.out.println(\"I can do thing on my own now and will rule the world! MUHAHAHA!\");\n }\n }",
"public void updateNames() {\n\n List<Team> teams = Guser.getTeams();\n int position = getTeam();\n\n try {\n\n JSONObject json = new JSONObject(getIntent().getExtras().getString(\"json\"));\n\n if(!gameMaster.getE(1).isDead()) {\n ((TextView)findViewById(R.id.eslot1)).setText(json.getJSONObject(\"char1\").getString(\"graphic\"));\n ((TextView)findViewById(R.id.eslot1)).setTextColor(Color.parseColor(json.getJSONObject(\"char1\").getString(\"color\")));\n }\n if(!gameMaster.getE(2).isDead()) {\n ((TextView)findViewById(R.id.eslot2)).setText(json.getJSONObject(\"char2\").getString(\"graphic\"));\n ((TextView)findViewById(R.id.eslot2)).setTextColor(Color.parseColor(json.getJSONObject(\"char2\").getString(\"color\")));\n }\n if(!gameMaster.getE(3).isDead()) {\n ((TextView)findViewById(R.id.eslot3)).setText(json.getJSONObject(\"char3\").getString(\"graphic\"));\n ((TextView)findViewById(R.id.eslot3)).setTextColor(Color.parseColor(json.getJSONObject(\"char3\").getString(\"color\")));\n }\n if(!gameMaster.getE(4).isDead()) {\n ((TextView)findViewById(R.id.eslot4)).setText(json.getJSONObject(\"char4\").getString(\"graphic\"));\n ((TextView)findViewById(R.id.eslot4)).setTextColor(Color.parseColor(json.getJSONObject(\"char4\").getString(\"color\")));\n }\n\n } catch (JSONException e) {\n\n e.printStackTrace();\n }\n\n ((TextView)findViewById(R.id.pslot1)).setText(Guser.getGraphicFromPosition(teams.get(position).getChar1()));\n ((TextView)findViewById(R.id.pslot2)).setText(Guser.getGraphicFromPosition(teams.get(position).getChar2()));\n ((TextView)findViewById(R.id.pslot3)).setText(Guser.getGraphicFromPosition(teams.get(position).getChar3()));\n ((TextView)findViewById(R.id.pslot4)).setText(Guser.getGraphicFromPosition(teams.get(position).getChar4()));\n\n ((TextView)findViewById(R.id.pslot1)).setTextColor(Color.parseColor(Guser.getColorFromPosition(teams.get(position).getChar1())));\n ((TextView)findViewById(R.id.pslot2)).setTextColor(Color.parseColor(Guser.getColorFromPosition(teams.get(position).getChar2())));\n ((TextView)findViewById(R.id.pslot3)).setTextColor(Color.parseColor(Guser.getColorFromPosition(teams.get(position).getChar3())));\n ((TextView)findViewById(R.id.pslot4)).setTextColor(Color.parseColor(Guser.getColorFromPosition(teams.get(position).getChar4())));\n }",
"public void setRayonH(int rayon){\r\n\t\trayonH = rayon;\r\n\t}",
"private void setInformationToDraw(Player player)\n {\n playerPieceList = player.getPieces();\n\n if (player == antagonistPlayer) {\n x = antagonistLocation[0];\n y = antagonistLocation[1];\n damageToAnnounce = antagonistDamage;\n healthBenefitToAnnounce = antagonistHealthBenefit;\n } else if (player == heroPlayer) {\n x = heroLocation[0];\n y = heroLocation[1];\n damageToAnnounce = heroDamage;\n healthBenefitToAnnounce = heroHealthBenefit;\n } else {\n x = 0;\n y = 0;\n }\n }",
"public static void update() {\n String sql = \"UPDATE dateGame SET level = ? , \"\n + \"score = ?,\"\n + \"hearts = ?, \"\n + \"sound = ?, \"\n + \"speed = ?, \"\n + \"path = ? \"\n + \"WHERE id = ?\";\n\n try (Connection conn = connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)) {\n\n // set the corresponding param\n pstmt.setInt(1, level);\n pstmt.setInt(2, score);\n pstmt.setInt(3, hearts);\n pstmt.setInt(4, sound);\n pstmt.setInt(5, speed);\n pstmt.setString(6, path);\n //id-ul este hardcoded setat pe 1\n pstmt.setInt(7, 1);\n\n // update\n pstmt.executeUpdate();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }",
"@Override\r\n\tpublic void updateScore(String name, int lv, int score) {\r\n\t\t\r\n\t\tConnection connection = ConnectionFactory.getConnection();\r\n try {\r\n Statement stmt = connection.createStatement();\r\n String update = \"REPLACE INTO SINGLEPLAYERDB\\n\"\r\n \t\t+ \" (NAME_PLAYER, LV, SCORE)\\n\"\r\n \t\t+ \"VALUES\\n\"\r\n \t\t+ \"('\" + name + \"','\" + lv + \"','\" + score + \"')\";\r\n \r\n stmt.executeQuery(update);\r\n \r\n \r\n }catch (SQLException ex) {\r\n ex.printStackTrace();\r\n }\r\n\t\t\r\n\t\t\r\n\t}",
"void update(boolean winner);",
"private void SetPlayerData(String playerLine) throws IOException\n {\n String fName = m_Parser.GetFirstName(playerLine);\n String lName = m_Parser.GetLastName(playerLine);\n int face = m_Parser.GetFace(playerLine);\n int jerseyNumber = m_Parser.GetJerseyNumber(playerLine);\n int[] attrs = m_Parser.GetInts(playerLine);\n int[] simData = m_Parser.GetSimVals(playerLine);\n\n mFirstNameTextBox.setText( fName);\n mLastNameTextBox.setText( lName);\n m_ImageNumber = face;\n if( jerseyNumber > -1 && jerseyNumber < 0x100)\n mJerseyNumberUpDown.setValue( Integer.parseInt(String.format(\"%x\", jerseyNumber)));\n\n if( attrs != null )\n {\n int attrIndex = 0;\n for(int i = 0; i < attrs.length && i < m_Attributes.length; i++)\n {\n attrIndex = AttrIndex(attrs[i]+\"\");\n if( attrIndex > -1 )\n m_Attributes[i].setSelectedIndex(attrIndex);\n }\n }\n if( simData != null)\n {\n for( int i =0; i < simData.length; i++)\n {\n m_SimAttrs[i].setValue( Integer.parseInt(simData[i]+\"\"));\n }\n }\n if( jerseyNumber > -1 && jerseyNumber < 0x100)\n {\n mJerseyNumberUpDown.setValue(Integer.parseInt(String.format(\"%x\", jerseyNumber)));\n ShowCurrentFace();\n }\n }",
"public void updateStake(Player player)\n {\n stakeLabel.setText(\"€ \" + player.getStake());\n }",
"@NonNull\n Hologram newHologram(@NonNull Position position, @NonNull List<String> lines);",
"public void setAutoHandsForPlayers(){\n\t\tint totSwitch = 0;\n\t\tHands[] allHands = new Hands[this.numberOfPlayers];\n\n\t\tfor(int i = 0 ; i < this.numberOfPlayers; i++){\n\t\t\tallHands[i] = new Hands();\n\t\t}\n\n\t\t// Case for two players\n\t\tswitch (this.numberOfPlayers){\n\t\tcase 2:\n\t\t\ttotSwitch = 1;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\ttotSwitch = 2;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\ttotSwitch = 3;\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\ttotSwitch = 4;\n\t\t\tbreak;\n\t\t}\n\n\t\tint twist = 0;\n\t\twhile (twist <= totSwitch){\n\t\t\tfor(int i = 0 ; i < 5; i++){\n\t\t\t\tallHands[twist].hands[i] = this.deckOfCards.cards[(twist*5)+i];\n\t\t\t}\t\n\t\t\ttwist = twist + 1;\n\t\t}\n\n\t\tfor(int i = 0; i < this.numberOfPlayers; i++){\n\t\t\tthis.players[i].playerHand.setHands(allHands[i]);\n\t\t}\n\n\t}",
"public void updateHangman()\n {\n hangmanShapes[hangmanIndex].setVisible(true);\n }",
"public void setHosucr(Float hosucr) {\r\n this.hosucr = hosucr;\r\n }",
"@Override\n public void updatePlayer(final EntityPlayer entityplayer) {\n if (entityplayer instanceof EntityHumanNPC)\n return;\n Entity tracker = getTracker(this);\n if (entityplayer != tracker && c(entityplayer)) {\n if (!this.trackedPlayers.contains(entityplayer)\n && ((entityplayer.x().getPlayerChunkMap().a(entityplayer, tracker.ac, tracker.ae))\n || (tracker.attachedToPlayer))) {\n if ((tracker instanceof SkinnableEntity)) {\n\n SkinnableEntity skinnable = (SkinnableEntity) tracker;\n\n Player player = skinnable.getBukkitEntity();\n if (!entityplayer.getBukkitEntity().canSee(player))\n return;\n\n skinnable.getSkinTracker().updateViewer(entityplayer.getBukkitEntity());\n }\n }\n }\n super.updatePlayer(entityplayer);\n }",
"public void updateGameWorld() {\r\n\t\t//divide the user entered height by the height of the canvas to get a ratio\r\n\t\tfloat canvas_height = Window.getCanvas().getHeight();\r\n\t\tfloat new_height = EnvironmentVariables.getHeight();\r\n\t\tfloat ratio = new_height / canvas_height;\r\n\t\t\r\n\t\t//use this ration th=o set the new meter value\r\n\t\tEnvironmentVariables.setMeter(EnvironmentVariables.getMeter() * ratio);\r\n\t\t\r\n\t\t//use the ratio to set all objects new location\r\n\t\tfor(GameObject obj: EnvironmentVariables.getWorldObjects()) {\r\n\t\t\tobj.setX(obj.getX() * ratio);\r\n\t\t\tobj.setY(obj.getY() * ratio);\r\n\t\t}\r\n\t\t\r\n\t\tfor(GameObject obj: EnvironmentVariables.getTerrain()) {\r\n\t\t\tobj.setX(obj.getX() * ratio);\r\n\t\t\tobj.setY(obj.getY() * ratio);\r\n\t\t}\r\n\t\t\r\n\t\tif(EnvironmentVariables.getMainPlayer() != null) {\r\n\t\t\tEnvironmentVariables.getMainPlayer().setX(EnvironmentVariables.getMainPlayer().getX() * ratio);\r\n\t\t\tEnvironmentVariables.getMainPlayer().setY(EnvironmentVariables.getMainPlayer().getY() * ratio);\r\n\t\t}\r\n\t\t\r\n\t}",
"private void moveHorizontalMhos() {\n\n\t\t//Assign playerX and playerY to the X and Y of the player\n\t\tint playerX = getNewPlayerLocation()[0];\n\t\tint playerY = getNewPlayerLocation()[1];\n\n\t\t//Iterate through every mho's X and Y values\n\t\tfor(int i = 0; i < mhoLocations.size()/2; i++) {\n\n\t\t\t//Assign mhoX and mhoY to the X and Y values of the mho that is currently being tested\n\t\t\tint mhoX = mhoLocations.get(i*2);\n\t\t\tint mhoY = mhoLocations.get(i*2+1);\n\n\t\t\t//set the default X and Y offsets to 0, and the move to NO_MOVEMENT\n\t\t\tint xOffset = 0;\n\t\t\tint yOffset = 0;\n\t\t\tchar move = Legend.NO_MOVEMENT;\n\n\t\t\t//If the horizontal distance is greater than or equal to the vertical distance, change the xOffset and yOffset\n\t\t\tif((Math.abs(playerX-mhoX))>=(Math.abs(playerY-mhoY))) {\n\t\t\t\tif(playerX > mhoX) {\n\t\t\t\t\txOffset = 1;\n\t\t\t\t\tmove = Legend.RIGHT;\n\t\t\t\t} else {\n\t\t\t\t\txOffset = -1;\n\t\t\t\t\tmove = Legend.LEFT;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//If the new location is an instance of BlankSpace, move the mho\n\t\t\tif(newMap[mhoX+xOffset][mhoY+yOffset] instanceof BlankSpace) {\n\n\t\t\t\t//If the mho were to move onto a Player, call gameOver() and shrink the Player\n\t\t\t\tif(newMap[mhoX+xOffset][mhoY+yOffset] instanceof Player) {\n\t\t\t\t\tmoveList[mhoX+xOffset][mhoY+yOffset] = Legend.SHRINK;\n\t\t\t\t\tgameOver();\n\t\t\t\t}\n\n\t\t\t\t//Assign the new map location as a Mho\n\t\t\t\tnewMap[mhoX+xOffset][mhoY+yOffset] = new Mho(mhoX+xOffset, mhoY+yOffset, board);\n\n\t\t\t\t//Set the mho's move in the moveList\n\t\t\t\tmoveList[mhoX][mhoY] = move;\n\n\t\t\t\t//Assign the mho's original location as a BlankSpace in the new map\n\t\t\t\tnewMap[mhoX][mhoY] = new BlankSpace(mhoX, mhoY, board);\n\n\t\t\t\t//remove each X and Y from mhoLocations\n\t\t\t\tmhoLocations.remove(i*2+1);\n\t\t\t\tmhoLocations.remove(i*2);\n\t\t\t\t\n\t\t\t\t//Call moveHorizontalMhos again, because the list failed to be checked through completely\n\t\t\t\tmoveHorizontalMhos();\n\t\t\t\tbreak;\n\t\t\t} \n\t\t}\n\t\treturn;\n\t}",
"public void editForwardLines(int line, int player, int newLine, int newPlayer) {\n Player selection1 = forwardLines[line][player];\n Player selection2 = forwardLines[newLine][newPlayer];\n\n //swap players\n forwardLines[line][player] = selection2;\n forwardLines[newLine][newPlayer] = selection1;\n }",
"@Override\n public void updateEnergy(int p, Racer player) {\n\n super.updateEnergy(p, player);\n player.setEnergy(player.getEnergy() * 2);\n }",
"public void changePlayerPixels() {\n //change the player point2pixels\n if (!playerFlag) {\n game.getPlayer().setPixels(convertor.gps2Pixels(game.getPlayer().getPoint()));\n Point3D point = new Point3D(game.getPlayer().getPixels()[0] , game.getPlayer().getPixels()[1]);\n GraphNode playerNode = new GraphNode(point);\n vertices.add(playerNode);\n\n }\n\n else {\n Point3D point = new Point3D(game.getPlayer().getPixels()[0] , game.getPlayer().getPixels()[1]);\n GraphNode playerNode = new GraphNode(point);\n vertices.add(playerNode);\n }\n\n playerFlag = true;\n\n }",
"public static void handleHunterKit(Player player) {\n\t\t\n\t}",
"public abstract void changePlayerAt(ShortPoint2D pos, Player player);",
"private void updateTamingProcess() {\n\n if (!mseEntity.isTameable())\n return;\n\n int tamingIncrease = mseEntity.updateHunger();\n if (tamingIncrease > 0) {\n mseEntity.eatAnimation();\n }\n\n int tamingProgress = tamingHandler.getTamingProgress();\n tamingProgress += tamingIncrease;\n tamingHandler.setTamingProgress(tamingProgress);\n if (tamingProgress < 0)\n tamingProgress = 0;\n if (tamingProgress >= mseEntity.getMaxTamingProgress())\n tamingHandler.setSuccessfullyTamed();\n\n }",
"private void drawWhite() throws IOException, ReversiException {\n playSound(PLAY_SOUND);\n // get the list of stones need to be changed\n String list = fromServer.readUTF();\n // draw white the list of stones\n boardComponent.drawWhite(list);\n setScoreText();\n\n // followed by the TURN command\n responseToServer();\n }",
"@Override\n\tpublic void move(Herbivore h, Plant p) {\n\t\tif(Flatland.distance(myX, myY, h.getX(), h.getY()) < 50){\n\t\t\tisHidden = false;\n\t\t\tmoveTowards(h.getX(), h.getY());\n\t\t\tmoveTowards(h.getX(), h.getY());\n\t\t\tmoveTowards(h.getX(), h.getY());\n\t\t\tmyColor = StdDraw.RED;\n\t\t}\n\t\telse{\n\t\t\tisHidden = true;\n\t\t\tmyX = myX;\n\t\t\tmyY = myY;\n\t\t\tmyColor = StdDraw.GREEN;\n\t\t}\n\t\t//if moved off screen, predator shows up on other side\n\t\tif(myX < 0){\n\t\t\tmyX = 1000;\n\t\t}\n\t\tif(myX > 1000){\n\t\t\tmyX = 0;\n\t\t}\n\t\tif(myY < 0){\n\t\t\tmyY = 1000;\n\t\t}\n\t\tif(myY > 1000){\n\t\t\tmyY = 0;\n\t\t}\n\t}",
"private void update() {\n\t\ttheMap.update();\n\t\ttheTrainer.update();\n\t}",
"@Override\n public void show () {\n g.prefs = Gdx.app.getPreferences(\"potions_master_preferences\");\n g.lang = g.prefs.getInteger(\"language\", 0);\n g.atlas = new TextureAtlas(\"textures/textures.atlas\");\n g.textSystem = new TextSystem(g.lang);\n g.sounds = new Sounds();\n g.fonts = new Fonts(g.textSystem.get(\"FONT_CHARS\"));\n g.ingredients = new Ingredients(g);\n g.potions = new Potions();\n\n g.w = Gdx.graphics.getWidth();\n g.h = Gdx.graphics.getHeight();\n\n g.pixel_size = .00625f * g.w;\n g.tile_size = g.pixel_size * 16f;\n\n String[] inv = g.prefs.getString(\"inventory\", \"\").split(\" \");\n for (String s : inv) {\n for (Ingredient i : g.ingredients.list) {\n if (i.getId().equals(s))\n g.ingredients.inventory.add(i);\n }\n }\n\n String[] add = g.prefs.getString(\"added\", \"\").split(\" \");\n for (String s : add) {\n for (Ingredient i : g.ingredients.list) {\n if (i.getId().equals(s))\n g.ingredients.added.add(i);\n }\n }\n\n g.is_music = g.prefs.getBoolean(\"is_music_on\", true);\n g.is_sound = g.prefs.getBoolean(\"is_sound_on\", true);\n\n g.music_volume = g.prefs.getFloat(\"music_volume\", 1f);\n g.sound_volume = g.prefs.getFloat(\"sound_volume\", 1f);\n\n g.week = g.prefs.getInteger(\"week\", 1);\n g.money = g.prefs.getInteger(\"money\", 0);\n g.potions_cooked = g.prefs.getInteger(\"potion_cooked\", 0);\n\n g.is_potion_cooked = false;\n g.potion_color = new Color();\n\n for (int i = 0; i < g.potions_cooked; ++i) {\n String[] p_h = g.prefs.getString(\"potion_history_\" + i, \"\").split(\" \");\n g.potions.list.add(new Potion(\n new String[] {p_h[4], p_h[5], p_h[6], p_h[7]},\n new int[] {\n Integer.parseInt(p_h[0]),\n Integer.parseInt(p_h[1]),\n Integer.parseInt(p_h[2]),\n Integer.parseInt(p_h[3])\n },\n Integer.parseInt(p_h[8]),\n Integer.parseInt(p_h[9])\n ));\n }\n\n if (g.is_music) {\n g.sounds.music_1.setLooping(true);\n g.sounds.music_1.setVolume(g.music_volume);\n g.sounds.music_1.play();\n }\n\n }",
"public void setWah(boolean wah) {\n\t\tif (isWah != wah) {\n\t\t\tisWah = wah;\n\t\t\tpauseMusic();\n\t\t\tint position;\n\t\t\tif (wah) {\n\t\t\t\tif (!isReverse && !isDistorted) {\n\t\t\t\t\tposition = alGetSourcei(musicSourceIndex, AL_BYTE_OFFSET);\n\t\t\t\t\talSourcei(wahSourceIndex, AL_BYTE_OFFSET, position);\n\t\t\t\t}\n\t\t\t\telse if (isReverse && !isDistorted) {\n\t\t\t\t\tposition = alGetSourcei(reverseSourceIndex, AL_BYTE_OFFSET);\n\t\t\t\t\talSourcei(revWahSourceIndex, AL_BYTE_OFFSET, position);\n\t\t\t\t}\n\t\t\t\tif (!isReverse && isDistorted) {\n\t\t\t\t\tposition = alGetSourcei(distortSourceIndex, AL_BYTE_OFFSET);\n\t\t\t\t\talSourcei(wahDistortSourceIndex, AL_BYTE_OFFSET, position);\n\t\t\t\t}\n\t\t\t\telse if (isReverse && isDistorted) {\n\t\t\t\t\tposition = alGetSourcei(revDistortSourceIndex, AL_BYTE_OFFSET);\n\t\t\t\t\talSourcei(revWahDistortSourceIndex, AL_BYTE_OFFSET, position);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!isReverse && !isDistorted) {\n\t\t\t\t\tposition = alGetSourcei(wahSourceIndex, AL_BYTE_OFFSET);\n\t\t\t\t\talSourcei(musicSourceIndex, AL_BYTE_OFFSET, position);\n\t\t\t\t}\n\t\t\t\telse if (isReverse && !isDistorted) {\n\t\t\t\t\tposition = alGetSourcei(revWahSourceIndex, AL_BYTE_OFFSET);\n\t\t\t\t\talSourcei(reverseSourceIndex, AL_BYTE_OFFSET, position);\n\t\t\t\t}\n\t\t\t\tif (!isReverse && isDistorted) {\n\t\t\t\t\tposition = alGetSourcei(wahDistortSourceIndex, AL_BYTE_OFFSET);\n\t\t\t\t\talSourcei(distortSourceIndex, AL_BYTE_OFFSET, position);\n\t\t\t\t}\n\t\t\t\telse if (isReverse && isDistorted) {\n\t\t\t\t\tposition = alGetSourcei(revWahDistortSourceIndex, AL_BYTE_OFFSET);\n\t\t\t\t\talSourcei(revDistortSourceIndex, AL_BYTE_OFFSET, position);\n\t\t\t\t}\n\t\t\t}\n\t\t\tplayMusic();\n\t\t}\n\t}",
"private void moveVerticalMhos() {\n\n\t\t//Assign playerX and playerY to the X and Y of the player\n\t\tint playerX = getNewPlayerLocation()[0];\n\t\tint playerY = getNewPlayerLocation()[1];\n\n\t\t//Iterate through every mho's X and Y values\n\t\tfor(int i = 0; i < mhoLocations.size()/2; i++) {\n\n\t\t\t//Assign mhoX and mhoY to the X and Y values of the mho that is currently being tested\n\t\t\tint mhoX = mhoLocations.get(i*2);\n\t\t\tint mhoY = mhoLocations.get(i*2+1);\n\n\t\t\t//set the default X and Y offsets to 0, and the move to NO_MOVEMENT\n\t\t\tint xOffset = 0;\n\t\t\tint yOffset = 0;\n\t\t\tchar move = Legend.NO_MOVEMENT;\n\n\t\t\t//If the horizontal distance is less than or equal to the vertical distance, change the xOffset and yOffset\n\t\t\tif((Math.abs(playerX-mhoX))<=(Math.abs(playerY-mhoY))) {\n\t\t\t\tif(playerY > mhoY) {\n\t\t\t\t\tyOffset = 1;\n\t\t\t\t\tmove = Legend.DOWN;\n\t\t\t\t} else {\n\t\t\t\t\tyOffset = -1;\n\t\t\t\t\tmove = Legend.UP;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If the new location is an instance of BlankSpace, move the mho\n\t\t\tif(newMap[mhoX+xOffset][mhoY+yOffset] instanceof BlankSpace) {\n\t\t\t\tnewMap[mhoX][mhoY] = new BlankSpace(mhoX, mhoY, board);\n\t\t\t\t\n\t\t\t\t//If the new location is a player, shrink the player and call gameOver()\n\t\t\t\tif(newMap[mhoX+xOffset][mhoY+yOffset] instanceof Player) {\n\t\t\t\t\tmoveList[mhoX+xOffset][mhoY+yOffset] = Legend.SHRINK;\n\t\t\t\t\tgameOver();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Set the mho's move in the moveList\n\t\t\t\tmoveList[mhoX][mhoY] = move;\n\t\t\t\t\n\t\t\t\t//Assign the new map location as a Mho\n\t\t\t\tnewMap[mhoX+xOffset][mhoY+yOffset] = new Mho(mhoX+xOffset, mhoY+yOffset, board);\n\t\t\t\t\n\t\t\t\t//remove each X and Y from mhoLocations\n\t\t\t\tmhoLocations.remove(i*2+1);\n\t\t\t\tmhoLocations.remove(i*2);\n\t\t\t\t\n\t\t\t\t//Call moveVerticalMhos again, because the list failed to be checked through completely\n\t\t\t\tmoveVerticalMhos();\n\t\t\t\tbreak;\n\t\t\t} \n\t\t}\n\t\treturn;\n\t}",
"public void display (Player player) {\n player.setScoreboard(this.bukkitScoreboard);\n }",
"@Override\n public void update() {\n if (Screen.checkState(GameState.RUNNING)) {\n healthToDraw = getPlayer().getHealth();\n maxHealthToDraw = getPlayer().getMaxHealth();\n minesToDraw = getPlayer().getCurrentMines();\n maxMinesToDraw = getPlayer().getMaxMines();\n currentLevelToDraw = Screen.getRoomHandler().getCurrentLevel();\n defenseToDraw = getPlayer().getDefense();\n speedToDraw = getPlayer().getSpeed();\n rangeToDraw = getPlayer().getSmallPlayerRange();\n damageToDraw = getPlayer().getPlayerDamage();\n playerRings = getPlayer().getRings();\n skillsToDraw = new Skill[4];\n for (int i = 0; i < getPlayer().getSkills().size(); i++) {\n if ( i < 4) {\n skillsToDraw[i] = getPlayer().getSkills().get(i);\n }\n }\n }\n }",
"public void updatePlayerPanel()\n {\n playerInfoPanel.updateLabel();\n }",
"private void warSeed(Player player) {\n\t\t\n\t}",
"public void updateAmmo(){\n if(shots >= 9999)\n shots = 9999;\n ammo.setText(\"x\" + String.format(\"%04d\", shots));\n }",
"public abstract void explodingKittenReplaced(int playerIndex);",
"private void drawSightHypothesisInfo(SightHypothesis h, SightPort vp, Graphics g) {\n\t\tIntegroidFacade igf = SignalStation.getSignalStation().getIntegroidFacade();\n\t\tPersonTracker pt = PersonHelpFuncs.getPersonTrackerForHypo(igf, (FaceHypothesis) h);\n\t\tSightAttentionStatus attentionStatus = null;\n\t\tif (pt != null) {\n\t\t\tPersonCue pc = pt.getCue();\n\t\t\tif (pc != null) {\n\t\t\t\tattentionStatus = pc.getAttentionStatus();\n\t\t\t}\n\t\t}\n\t\tSightObservation obs = h.getMostAccurateObservation();\n\t\tif (obs == null) {\n\t\t\ttheLogger.warning(\"Got null most-accurate-obs for hypo \" + h);\n\t\t\treturn;\n\t\t}\n\t\tdouble strength = h.getStrength();\n\t\tFaceHypothesis.ActivationStatus actStat = h.getActivationStatus();\n\t\tColor hypoColor = null;\n\t\tif ((attentionStatus != null) && (attentionStatus != SightAttentionStatus.IGNORED)) {\n\t\t\t// GazeTarget = Blue\n\t\t\tAnimoidGazeFacade agf = (AnimoidGazeFacade) igf.getAnimoidFacade();\n\t\t\tboolean gazeHoldFlag = agf.getAttentionJob().getHoldingStatusFlag();\n\t\t\tif (gazeHoldFlag) {\n\t\t\t\t// Light blue = gaze hold\n\t\t\t\thypoColor = new Color(0.5f, 0.5f, 1.0f, (float) strength);\n\t\t\t} else {\n\t\t\t\t// Dark blue = goto gaze\n\t\t\t\thypoColor = new Color(0.0f, 0.0f, 1.0f, (float) strength);\n\t\t\t}\n\t\t} else if (actStat == FaceHypothesis.ActivationStatus.POSTED) {\n\t\t\t// PersonCue, not gazeTarget = Green\n\t\t\thypoColor = new Color(0.0f, 1.0f, 0.0f, (float) strength);\n\t\t} else {\n\t\t\t// Not person cue = Purple\n\t\t\thypoColor = new Color(1.0f, 0.0f, 1.0f, (float) strength);\n\t\t}\n\n\t\tPoint adjustedCenterPoint = myFaceModel.getObsCenterAdjustedScreenPoint(obs, true);\n\n\t\tg.setColor(hypoColor);\n\t\tif (vp.inBounds(adjustedCenterPoint)) {\n\t\t\tRectangle boundRect = ((FaceObservation) obs).getBoundRect();\n\t\t\tint width = boundRect.width;\n\t\t\tint height = boundRect.height;\n\t\t\tint adjX = adjustedCenterPoint.x - width / 2;\n\t\t\tint adjY = adjustedCenterPoint.y - height / 2;\n\t\t\tg.fill3DRect(adjX, adjY, width, height, true);\n\t\t\tint textX = adjX + 5;\n\t\t\tint textY = adjY+ 10;\n\t\t\tg.setColor(Color.YELLOW);\n\t\t\tg.drawString(\"H-\" + h.getHypothesisNumber(), textX, textY);\n\n\t\t\tString tval = ((FaceHypothesis) h).getTagValue();\n\n\t\t\tif (tval != null) {\n\t\t\t\ttextY += 15;\n\t\t\t\tg.drawString(\"TV=\" + tval, textX, textY);\n\t\t\t}\n\t\t\tEgocentricDirection obsDir = obs.getCenterDirection();\n\t\t\tif (obsDir != null) {\n\t\t\t\ttextY += 15;\n\t\t\t\tg.drawString(\"az=\" + obsDir.getAzimuth().getDegreesText(), textX, textY);\n\t\t\t\ttextY += 15;\n\t\t\t\tg.drawString(\"el=\" + obsDir.getElevation().getDegreesText(), textX, textY);\n\t\t\t}\n\t\t\tdouble diamDeg = obs.getDiameterDeg(vp);\n\t\t\ttextY += 15;\n\t\t\tg.drawString(\"diam=\" + diamDeg, textX, textY);\n\t\t\ttextY += 15;\n\t\t\tString attStatString = (attentionStatus == null) ? \"UNRECOGNIZED\" : attentionStatus.toString();\n\t\t\tg.drawString(\"stat=\" + attStatString, textX, textY);\n\t\t}\n\t}",
"public void updatePlayerHealthUI() {\n CharSequence text = String.format(\"Score: %d\", getscore());\n scoreLabel.setText(text);\n }",
"void changeTrainer(Long pokemonId, Long newTrainerId);",
"public static void updatePlayer(Player p){\n\t\tp.clearMoves();\n\t\tboard.possibleMoves(p);\n\t}",
"void updateSkill(Skill skill);",
"public void update() {\n if(this.getLine(0) != \"\") this.setLine(0, \"\");\n if(this.getLine(0) != plugin.getGameManager().getAlivePlayers().size() + \" §7Joueurs\") this.setLine(1, plugin.getGameManager().getAlivePlayers().size() + \" §7Joueurs\");\n if(this.getLine(0) != Team.getTeams().size() + \" §7Equipes\") this.setLine(2, Team.getTeams().size() + \" §7Equipes\");\n if(this.getLine(0) != \" \") this.setLine(3, \" \");\n\n /* Timer part */\n if(plugin.getGameManager().hasStarted()) {\n this.setLine(4, \"§eTimer: §r\" + getFormattedTimer(plugin.getTimerManager().getMinutesLeft(), plugin.getTimerManager().getSecondsLeft()) + \" [§bE\" + getFormattedEpisode(plugin.getTimerManager().getEpisode()) + \"§r]\");\n\n String text = \"\";\n List<Integer> timers = new ArrayList<>();\n if(!plugin.getGameManager().isPvpActivated())\n timers.add(plugin.getTimerManager().getMinutesPvpLeft());\n if(!plugin.getGameManager().isRolesActivated())\n timers.add(plugin.getTimerManager().getMinutesRolesLeft());\n if(!plugin.getGameManager().isKitsActivated())\n timers.add(plugin.getTimerManager().getMinutesKitsLeft());\n if(!plugin.getBorderManager().isShrinking())\n timers.add(plugin.getTimerManager().getMinutesBorderLeft());\n\n try {\n int min = timers\n .stream()\n .filter(v -> v != -1)\n .mapToInt(v -> v)\n .min()\n .orElseThrow(NoSuchElementException::new);\n\n if(min == plugin.getTimerManager().getMinutesPvpLeft() && !plugin.getGameManager().isPvpActivated())\n text = \"Pvp\";\n else if(min == plugin.getTimerManager().getMinutesRolesLeft() && !plugin.getGameManager().isRolesActivated())\n text = \"Equipes\";\n else if(min == plugin.getTimerManager().getMinutesKitsLeft() && !plugin.getGameManager().isKitsActivated())\n text = \"Kits\";\n else if(min == plugin.getTimerManager().getMinutesBorderLeft() && !plugin.getBorderManager().isShrinking())\n text = \"Bordure\";\n\n if(!text.equals(\"\")) {\n this.setLine(5, \"§c\" + text + \": §r< \" + (min + 1) + \"min\");\n }\n } catch (NoSuchElementException e) {\n this.removeLine(5);\n }\n }\n }",
"public void setHall(int h) {\n hall = h;\n System.out.println(\"Singleton hall: \" + hall);\n }",
"private void setPlayerRoom(){\n player.setRoom(currentRoom);\n }",
"public void update() {\n\t\t//Indicate that data is fetched\n\t\tactivity.showProgressBar();\n\t\n\t\tPlayer currentPlayer = dc.getCurrentPlayer();\n\t\tactivity.updatePlayerInformation(\n\t\t\t\tcurrentPlayer.getName(),\n\t\t\t\tgetGlobalRanking(),\n\t\t\t\tcurrentPlayer.getGlobalScore(),\n\t\t\t\tcurrentPlayer.getPlayedGames(),\n\t\t\t\tcurrentPlayer.getWonGames(),\n\t\t\t\tcurrentPlayer.getLostGames(),\n\t\t\t\tcurrentPlayer.getDrawGames());\n\n\t\tactivity.hideProgressBar();\n\t}",
"public void updateMatch(Match match){\n setMatch(match);\n Platform.runLater( () -> {\n firstPage.setMatch(match);\n firstPage.refreshPlayersInLobby();\n });\n if(mainPage != null) {\n Platform.runLater( () -> {\n mainPage.setMatch(match);\n senderRemoteController.setMatch(match);\n this.match = match;\n mainPage.refreshPlayersPosition();\n mainPage.refreshPoints();\n if(match.getPlayer(senderRemoteController.getNickname()).getStatus().getSpecialAbility().equals(AbilityStatus.FRENZY)){\n mainPage.setFrenzyMode(true);\n mainPage.frenzyButtonBoosted();\n System.out.println(\"[FRENZY]: Started FINAL FRENZY\");\n System.out.println(\"[FRENZY]: Current Player: \"+match.getCurrentPlayer().getNickname()+ \" in status \"+match.getCurrentPlayer().getStatus().getTurnStatus());\n\n }\n if (match.getPlayer(senderRemoteController.getNickname()).getStatus().getSpecialAbility().equals(AbilityStatus.FRENZY_LOWER)){\n mainPage.setFrenzyMode(true);\n mainPage.frenzyButtonLower();\n }\n });\n }\n //questo metodo viene chiamato piu volte.\n }",
"public void updatePlayerScore()\n\t{\n\t\tthis.score = (int)(getBalance() - 500) - (getNumberOfLoans()*500); \n\t}",
"public void drawStaticHud(GL2 gl) {\n this.gl = gl;\n\n if (! player.isAlive())\n return;\n\n update();\n\n start2D();\n //drawEnergy(gl);\n\n // Set the crosshair color to green\n gl.glColor4f(0.0f, 1.0f, 0.0f, 0.0f);\n\n if(crosshair != null) {\n crosshair.bind(gl);\n }\n gl.glBegin(GL2.GL_QUADS);\n int s = HEIGHT / 2; // Cross hair 10% screen height\n\n draw(-s / 2, -s / 2, s, s);\n gl.glEnd();\n gl.glColor4f(0.0f, 0.0f, 0.0f, 1.0f);\n\n {//Health/Shield Bar\n float xStart = 0;\n float xEnd = WIDTH;\n \n float yStart = -HEIGHT;\n float yEnd = HEIGHT;\n\n if(healthbackdrop != null) { \n healthbackdrop.bind(gl);\n }\n\n gl.glBegin(GL2.GL_QUADS );\n draw(xStart, yStart, xEnd , yEnd );\n gl.glEnd();\n\n\n if(healthbar != null) {\n healthbar.bind(gl);\n }\n\n //draws the health bar\n gl.glBegin(GL2.GL_QUADS );\n drawBarGraph(xStart, yStart, xEnd , yEnd , ship.health()*0.72f);\n gl.glEnd();\n\n if(shieldbar!=null){\n shieldbar.bind(gl);\n }\n gl.glBegin(GL2.GL_QUADS );\n drawBarGraph(xStart, yStart, xEnd , yEnd , ship.shield()*0.70f);\n gl.glEnd();\n\n //health cross\n if(healthcross != null) {\n healthcross.bind(gl);\n }\n\n gl.glBegin(GL2.GL_QUADS );\n draw(xStart, yStart, xEnd , yEnd );\n gl.glEnd();\n }\n\n {//Gun bar code\n float xStart = -WIDTH;\n float xEnd = WIDTH;\n \n float yStart = -HEIGHT;\n float yEnd = HEIGHT;\n \n if(gunbackdrop != null) {\n gunbackdrop.bind(gl);\n }\n\n gl.glBegin(GL2.GL_QUADS );\n draw(xStart, yStart, xEnd , yEnd);\n gl.glEnd();\n\n if(gunbar != null) {\n gunbar.bind(gl);\n }\n\n //draw the percent bar for the gun\n gl.glBegin(GL2.GL_QUADS );\n drawBarGraph(xStart, yStart, xEnd , yEnd,ship.getWeapon().getAmmoPercent()*0.72f);\n gl.glEnd();\n\n if(gunammo != null) {\n gunammo.bind(gl);\n }\n\n gl.glBegin(GL2.GL_QUADS );\n draw(xStart, yStart, xEnd , yEnd);\n gl.glEnd();\n }\n\n gl.glFlush();\n stop2D();\n }"
] |
[
"0.7055204",
"0.61497086",
"0.58446336",
"0.57759494",
"0.5626788",
"0.5625957",
"0.55285335",
"0.55001163",
"0.5464081",
"0.5433165",
"0.54107946",
"0.54107946",
"0.54107946",
"0.54007244",
"0.53376985",
"0.5274309",
"0.52371806",
"0.5236032",
"0.5203369",
"0.5198936",
"0.51690716",
"0.51604766",
"0.5152996",
"0.5137372",
"0.5134688",
"0.5100047",
"0.50957286",
"0.5083398",
"0.50832856",
"0.5081161",
"0.50666255",
"0.5064512",
"0.50535977",
"0.50422823",
"0.50412285",
"0.5035147",
"0.50270885",
"0.50269747",
"0.50213724",
"0.5020961",
"0.50176686",
"0.50171727",
"0.50114506",
"0.5001762",
"0.4997486",
"0.49960715",
"0.49871016",
"0.4980303",
"0.49748483",
"0.49663517",
"0.49608415",
"0.49548203",
"0.4947288",
"0.49385074",
"0.49350956",
"0.49316493",
"0.49290556",
"0.4923416",
"0.4919727",
"0.49193382",
"0.49149075",
"0.4914354",
"0.49132138",
"0.49130172",
"0.49129623",
"0.49074727",
"0.49052912",
"0.49038348",
"0.49015105",
"0.49007767",
"0.48984858",
"0.48957804",
"0.48937607",
"0.48884296",
"0.4887341",
"0.4885501",
"0.4883286",
"0.48791236",
"0.48757327",
"0.4870988",
"0.4864888",
"0.4848633",
"0.48448938",
"0.48448002",
"0.48412466",
"0.48337647",
"0.4832921",
"0.4826596",
"0.48258924",
"0.48252204",
"0.4818976",
"0.4815945",
"0.48116514",
"0.4809689",
"0.48072287",
"0.48036894",
"0.4800689",
"0.47945675",
"0.47875866",
"0.47838363"
] |
0.6423155
|
1
|
Despawns an entity given for the player. Simply passes it along to despawnEntity(Player, int) with the entityID
|
public static void despawnEntity(Player p, Entity entity){
despawnEntity(p, entity.getId());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static void despawnEntity(Player p, int entityID){\n PacketPlayOutEntityDestroy deadEntity = new PacketPlayOutEntityDestroy(entityID);\n ((CraftPlayer) p.getPlayer()).getHandle().playerConnection.sendPacket(deadEntity);\n\n }",
"@SuppressWarnings(\"unused\")\n void spawn(Entity entity);",
"void entityDestroyed(Entity entity);",
"void spawnEntityAt(String typeName, int x, int y);",
"public void killPlayer() {\n \tdungeon.removeentity(getX(), getY(), name);\n \t\tdungeon.deleteentity(getX(),getY(),name);\n \t\t//System.out.println(\"YOU LOSE MAMA\");\n \t\t//System.exit(0);\n \t\t\n }",
"public void removeEntity(Entity entity) {\n\t\tif (entity instanceof Bullet) {\n\t\t\tif (((Bullet) entity).getName().equals(\"bullet\")) {\n\t\t\t\tbullet.remove(entity);\n\t\t\t} else if (((Bullet) entity).getName().equals(\"enemy_bullet\")\n\t\t\t\t\t|| ((Bullet) entity).getName().equals(\"boss_bullet\")) {\n\t\t\t\tenemy_bullet.remove(entity);\n\t\t\t}\n\t\t} else if (entity instanceof Enemy) {\n\t\t\tint enemyX = entity.getX();\n\t\t\tint enemyY = entity.getY();\n\t\t\t\n\t\t\tif (!((Enemy) entity).getName().equals(\"boss\")) {\n\t\t\t\tenemy.remove(entity);\n\t\t\t\t// play enemy explosion sfx\n\t\t\t\tsound.get(\"enemyExplosionEffect\").playAsSoundEffect(1.0f, 1.0f, false);\n\t\t\t\t\n\t\t\t\t// add enemy explosion\n\t\t\t\texplosion.add(new Explosion(this, \"enemy_explosion\", enemyX - 5, enemyY - 5, entity));\n\t\t\t\tpowerupCheck(enemyX, enemyY);\n\t\t\t} else if (((Enemy) entity).getName().equals(\"boss\") && bossExplosionNum == 0) {\n\t\t\t\tbossExplosionNum = 1;\n\t\t\t\t\n\t\t\t\tsound.get(\"bossExplosionEffect\").playAsSoundEffect(1.0f, 1.0f, false);\n\t\t\t\texplosion.add(new Explosion(this, \"enemy_explosion\", enemyX, enemyY, entity));\n\t\t\t}\n\t\t\t\n\t\t\t// add cash and points to score\n\t\t\tif (!stopDrawingPlayer && ((Enemy) entity).getName().equals(\"green_box\")) {\n\t\t\t\tcash += 30;\n\t\t\t\ttotalCash += 30;\n\t\t\t} else if (!stopDrawingPlayer && ((Enemy) entity).getName().equals(\"red_box\")) {\n\t\t\t\tcash += 50;\n\t\t\t\ttotalCash += 50;\n\t\t\t} else if (!stopDrawingPlayer && ((Enemy) entity).getName().equals(\"boss\")) {\n\t\t\t\ttotalCash += 500;\n\t\t\t}\n\t\t} else if (entity instanceof Powerup) {\n\t\t\t// play obtain powerup sfx\n\t\t\tsound.get(\"powerupGetEffect\").playAsSoundEffect(1.0f, 1.0f, false);\n\t\t\t\n\t\t\tEnemy boss = null;\n\t\t\t\n\t\t\tpowerup.remove(entity);\n\t\t\tif (((Powerup) entity).getName() == \"powerup_explosion\") {\n\t\t\t\tfor (int i = 0; i < enemy.size(); i++) {\n\t\t\t\t\tif (!enemy.get(i).getName().equals(\"boss\")) {\n\t\t\t\t\t\texplosion.add(new Explosion(this, \"enemy_explosion\", enemy.get(i).getX() - 5,\n\t\t\t\t\t\t\t\tenemy.get(i).getY() - 5, entity));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tboss = enemy.get(i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < enemy.size(); i++) {\n\t\t\t\t\tif (enemy.get(i).getName().equals(\"green_box\")) {\n\t\t\t\t\t\tcash += 30;\n\t\t\t\t\t\ttotalCash += 30;\n\t\t\t\t\t} else if (enemy.get(i).getName().equals(\"red_box\")) {\n\t\t\t\t\t\tcash += 50;\n\t\t\t\t\t\ttotalCash += 50;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// play enemy explosion sfx\n\t\t\t\tsound.get(\"enemyExplosionEffect\").playAsSoundEffect(1.0f, 1.0f, false);\n\t\t\t\tenemy.clear();\n\t\t\t\t\n\t\t\t\tif (boss != null)\n\t\t\t\t\tenemy.add(boss);\n\t\t\t}\n\t\t} else if (entity instanceof Player) {\n\t\t\t// play player explosion sfx\n\t\t\tsound.get(\"playerExplosionEffect\").playAsSoundEffect(1.0f, 1.0f, false);\n\t\t\t\n\t\t\texplosion.add(new Explosion(this, \"player_explosion\", player.getX() - 5, player.getY() - 5,\n\t\t\t\t\tentity));\n\t\t\tstopDrawingPlayer = true;\n\t\t}\n\t}",
"private void hideEntity(int entityId) {\n Object idArray = Array.newInstance(int.class, 1);\n Array.set(idArray, 0, entityId);\n\n Object packet = ReflectUtils.newInstance(\"PacketPlayOutEntityDestroy\", new Class[]{}, new Object[]{});\n ReflectUtils.setField(packet, \"a\", idArray);\n sendPacket(packet);\n }",
"@Override\n\tpublic void despawn() {\n\t\t\n\t}",
"public boolean shootoutEntity(Entity ent, boolean simulate);",
"@EventHandler\n\tpublic void onEntityKill(EntityDeathEvent e) {\n\n\t\tif (!(e.getEntity().getKiller() instanceof Player)) {\n\t\t\treturn;\n\t\t}\n\n\t\tPlayerTR trPlayer = TaskRun.getPlayer(e.getEntity().getKiller());\n\t\tLivingEntity entityKilled = e.getEntity();\n\n\t\tif (entityKilled instanceof PigZombie) {\n\t\t\ttrPlayer.completeTask(4);\n\t\t} else if (entityKilled instanceof Creeper) {\n\t\t\ttrPlayer.completeTask(10);\n\t\t} else if (entityKilled instanceof Ghast) {\n\t\t\ttrPlayer.completeTask(14);\n\t\t} else if ((entityKilled instanceof Skeleton && ((Skeleton) entityKilled).getSkeletonType() == SkeletonType.WITHER)\n\t\t\t\t|| (NMSUtils.isAtLeastOneTwelve() && entityKilled.getType() == EntityType.valueOf(\"WITHER_SKELETON\"))) {\n\t\t\ttrPlayer.completeTask(29);\n\t\t}\n\t}",
"public void respawnAll(Player player) {\r\n\t\tfor(Integer eid : entityIDs) {\r\n\t\t\tItem3DInfo info = entityInfo.get(eid);\r\n\t\t\tint standID = standIDs.get(eid);\r\n\t\t\t\r\n\t\t\tspawnOldZombie(player, info.getWorldName(), info.getX(), info.getY(), info.getZ(),\r\n\t\t\t\t\tinfo.getRotation(), info.getItemID(), eid, standID);\r\n\t\t}\r\n\t}",
"public abstract void endDXFEntity();",
"InviteEntity decline(Integer inviteId);",
"void delete(int entityId);",
"public void kill() {\n // leben abziehen und geister sowie pacman respawnen\n lives--;\n pacman.respawn(level.getRandomPacmanSpawn());\n for (GameEntity entity : entities)\n if (entity instanceof Ghost)\n ((Ghost) entity).respawn(level.getNextGhostSpawn());\n }",
"void delete(Entity entity);",
"@EventHandler\n\tpublic void entityDeath(EntityDeathEvent e){\n\t\tRandom random = new Random();\n\n\t\tdouble chance = 0.4f;\n\t\tif(random.nextDouble() <= chance) {\n\t\t\te.getEntity().getWorld().dropItem(e.getEntity().getLocation(), new ItemStack(Material.LEATHER));\n\t\t}\n\t}",
"public void onExplosionDestroy(World worldIn, BlockPos pos, Explosion explosionIn)\n {\n if (!worldIn.isRemote)\n {\n EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(worldIn, (double)((float)pos.getX() + 0.5F), (double)pos.getY(), (double)((float)pos.getZ() + 0.5F), explosionIn.getExplosivePlacedBy());\n entitytntprimed.setFuse((short)(worldIn.rand.nextInt(entitytntprimed.getFuse() / 4) + entitytntprimed.getFuse() / 8));\n worldIn.addEntity0(entitytntprimed);\n }\n }",
"@Override\n\tpublic void updateEntity() {\n\t\t\n\t\tif (this.mobID != null && !this.worldObj.isRemote) {\n\t\t\t\n\t\t\tif (this.delay > 0) {\n\t\t\t\tthis.delay--;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tEntity entity = EntityList.createEntityByName(this.mobID, this.worldObj);\n\t\t\t\n\t\t\t// L'entity n'existe pas\n\t\t\tif (entity == null) {\n\t\t\t\tModGollumCoreLib.log.warning(\"This mob \"+this.mobID+\" isn't register\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tthis.worldObj.setBlockToAir(this.xCoord , this.yCoord , this.zCoord);\n\t\t\t\n\t\t\tdouble x = (double)this.xCoord + 0.5D;\n\t\t\tdouble y = (double)(this.yCoord);// + this.worldObj.rand.nextInt(3) - 1);\n\t\t\tdouble z = (double)this.zCoord + 0.5D;\n\t\t\tEntityLiving entityLiving = entity instanceof EntityLiving ? (EntityLiving)entity : null;\n\t\t\tentity.setLocationAndAngles(x, y, z, this.worldObj.rand.nextFloat() * 360.0F, this.worldObj.rand.nextFloat() * 360.0F);\n\t\t\tthis.worldObj.spawnEntityInWorld(entity);\n\t\t\t\n\t\t\tif (entityLiving == null || entityLiving.getCanSpawnHere()) {\n\t\t\t\t\n\t\t\t\tthis.worldObj.playSoundEffect (this.xCoord, this.yCoord, this.zCoord, \"dig.stone\", 0.5F, this.worldObj.rand.nextFloat() * 0.25F + 0.6F);\n\t\t\t\t\n\t\t\t\tif (entityLiving != null) {\n\t\t\t\t\tentityLiving.spawnExplosionParticle();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public synchronized void spawnMe()\n\t{\n\t\t_itemInstance = ItemTable.getInstance().createItem(\"Combat\", _itemId, 1, null, null);\n\t\t_itemInstance.dropMe(null, _location.getX(), _location.getY(), _location.getZ());\n\t}",
"private void showEntity(Entity entity, Vector locationOverride, Vector directionOverride, int entityId) {\n if(entity.isDead()) {return;}\n Object nmsEntity = ReflectUtils.runMethod(entity, \"getHandle\");\n\n // Use either the entities location, or the override\n Vector location = locationOverride == null ? getEntityPosition(entity, nmsEntity) : locationOverride;\n Vector direction = directionOverride == null ? entity.getLocation().getDirection() : directionOverride;\n\n // Create the correct type of spawn packet, depending on the entity\n Object spawnPacket;\n if(entity instanceof Painting) {\n spawnPacket = ReflectUtils.newInstance(\"PacketPlayOutSpawnEntityPainting\", new Class[]{ReflectUtils.getMcClass(\"EntityPainting\")}, new Object[]{nmsEntity});\n \n // Painting spawn packets are slightly different, as they use a BlockPosition and EnumDirection\n Object blockPosition = ReflectUtils.newInstance(\"BlockPosition\", new Class[]{int.class, int.class, int.class},\n new Object[]{location.getBlockX(), location.getBlockY(), location.getBlockZ()});\n ReflectUtils.setField(spawnPacket, \"c\", blockPosition);\n\n Object enumDirection = ReflectUtils.getEnumDirection(direction);\n ReflectUtils.setField(spawnPacket, \"d\", enumDirection);\n } else if(entity instanceof ExperienceOrb) {\n spawnPacket = ReflectUtils.newInstance(\"PacketPlayOutSpawnEntityExperienceOrb\", new Class[]{ReflectUtils.getMcClass(\"EntityExperienceOrb\")}, new Object[]{nmsEntity});\n setSpawnLocation(spawnPacket, location, \"b\", \"c\", \"d\");\n } else if(entity instanceof HumanEntity) {\n spawnPacket = ReflectUtils.newInstance(\"PacketPlayOutNamedEntitySpawn\", new Class[]{ReflectUtils.getMcClass(\"EntityHuman\")}, new Object[]{nmsEntity});\n setSpawnLocation(spawnPacket, location, \"c\", \"d\", \"e\");\n } else if(entity instanceof LivingEntity) {\n spawnPacket = ReflectUtils.newInstance(\"PacketPlayOutSpawnEntityLiving\", new Class[]{ReflectUtils.getMcClass(\"EntityLiving\")}, new Object[]{nmsEntity});\n setSpawnLocation(spawnPacket, location, \"d\", \"e\", \"f\");\n } else {\n // If we are on 1.14 and up, the contructor for PacketPlayOutSpawnEntity can find all the entity type stuff for us\n // Otherwise, we use a function that gets EntityTrackerEntry to do everything\n if(ReflectUtils.useNewEntitySpawnAndMoveImpl) {\n spawnPacket = ReflectUtils.newInstance(\"PacketPlayOutSpawnEntity\", new Class[]{ReflectUtils.getMcClass(\"Entity\")}, new Object[]{nmsEntity});\n } else {\n spawnPacket = generateEntitySpawnPacket_Old(nmsEntity);\n }\n setSpawnLocation(spawnPacket, location, \"c\", \"d\", \"e\");\n }\n\n ReflectUtils.setField(spawnPacket, \"a\", entityId);\n sendPacket(spawnPacket);\n\n // Force the entity to update its data, since it just spawned\n sendMetadataPacket(nmsEntity, entityId);\n\n // If the entity is living, we have to set its armor and hand/offhand\n if(entity instanceof LivingEntity) {\n sendEntityEquipmentPackets((LivingEntity) entity, entityId);\n }\n }",
"public MobDeathEvent(Entity entity, EntityPlayer player) {\n\t\tthis.entity = entity;\n\t\tthis.position = entity.getPosition();\n\t\tthis.mobType = getMobType(entity);\n\t\tthis.thePlayer = player;\n\t\tSystem.out.println(\"MobDeathEvent\");\n\t}",
"public void destroy(@Entity int entity) {\n nDestroy(mNativeObject, entity);\n }",
"abstract protected void removeEntity(Entity entity);",
"public void executeStrategy(NPC entity);",
"public void deregisterEntity(MapEntity entity) {\n\t\tint visLayer = entity.getVisLayer();\n\t\tif (-1 == visLayer) {\n\t\t\tlayerNegOneEntities.remove(entity);\n\t\t} else if (0 == visLayer) {\n\t\t\tlayerZeroEntities.remove(entity);\n\t\t} else if (1 == visLayer) {\n\t\t\tlayerOneEntities.remove(entity);\n\t\t}\n\t\tdynamicEntities.remove(entity);\n\t}",
"public int removeEntity(Entity e) {\n Entity removed = this.entity_list_.remove(e.name_);\n if (removed != null) {\n System.out.println(removed.name_ + \" has been removed from the map\");\n } else {\n System.err.println(\"The entity to be removed does not exist in the list of entities\");\n }\n if (this.map_grid_[e.getMapRelation().getMyYCoordinate()][e.getMapRelation().getMyXCoordinate()].getEntity() == e) {\n this.map_grid_[e.getMapRelation().getMyYCoordinate()][e.getMapRelation().getMyXCoordinate()].removeEntity();\n //e.setMapRelation(null);\n //System.gc();\n return 0;\n } else {\n System.err.println(\"The avatar to be removed cannot be found on the map.\");\n System.exit(-88);\n return -1;\n }\n }",
"public void onKill(EntityDeathEvent evt) {\r\n }",
"public void spawnEntity(AEntityB_Existing entity){\r\n\t\tBuilderEntityExisting builder = new BuilderEntityExisting(entity.world.world);\r\n\t\tbuilder.loadedFromSavedNBT = true;\r\n\t\tbuilder.setPositionAndRotation(entity.position.x, entity.position.y, entity.position.z, (float) -entity.angles.y, (float) entity.angles.x);\r\n\t\tbuilder.entity = entity;\r\n\t\tworld.spawnEntity(builder);\r\n }",
"void delete(E entity);",
"void delete(E entity);",
"@Override\r\n\tpublic void onEntityHit(LivingEntity ent) {\n\t\tParUtils.createParticle(Particles.EXPLOSION, loc, 0, 0, 0, 1, 0);\r\n\t\tplaySound(Sound.ENTITY_DRAGON_FIREBALL_EXPLODE,loc,1,1);\r\n\t\tent.setVelocity(dir.multiply(speed));\r\n\t\tdamage(ent, 2, caster);\r\n\t}",
"@EventHandler\n void OnEntityDeath(EntityDeathEvent e){\n Entity killer = e.getEntity().getKiller();\n int exp = e.getDroppedExp();\n if(killer instanceof Player){\n GuildMCFunctions functions = new GuildMCFunctions();\n functions.spawnExperiencesInfos((Player) killer, exp);\n }\n\n }",
"void delete(Object entity);",
"public static void combatPlayer(Player atk, EnemyObject def){\n\t\tif(atk.stat.getType() != def.stat.getType() ){\n\n\t\t\t\tint atkDamage = 0;\n\t\t\t\tatkDamage = atk.stat.toDamage();\n\t\t\t\tdef.stat.getDamage(atkDamage);\n\t\t\t\t//System.out.println(\"Attack!\");\n\t\t\t\t//System.out.println(\"Enemy get \"+ atkDamage + \" Damage\");\n\t\t\t\tif(def.stat.checkAlive()==false){\n\t\t\t\t\t//check the object die or not.\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(def.stat.getType()==1){\n\t\t\t\t\t//System.out.println(\"Enemy Die\");\n\t\t\t\t\t\t//def.remove(0);\n\t\t\t\t\t\t//enemy die.\n\t\t\t\t\t\t//give exp to the user.\n\t\t\t\t\t\tint exp = def.stat.giveExp();\n\t\t\t\t\t\t\n\t\t\t\t\t\tatk.stat.getExp(exp);\n\t\t\t\t\t\t//System.out.println(\"Player get \"+exp+ \" exp\");\n\t\t\t\t\t\t//destroy the enemy object.-> ??\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\n\t\t\t\t//System.out.println(\"\\n\\nEvent number : \" + atk.stat.getEventNum()+\" \\n\");\n /*\n\t\t\t\tSystem.out.println(\"Enemy Health: \" + def.stat.getHP());\n\t\t\t\tSystem.out.println(\"\\n\\n Player Stat: \");\n\t\t\t\tSystem.out.println(\"\\nPlayer HP: \"+atk.stat.getHP());\n\t\t\t\tSystem.out.println(\"Level: \"+atk.stat.getLv());\n\t\t\t\tSystem.out.println(\"STR: \"+atk.stat.getStr());\n\t\t\t\tSystem.out.println(\"DEX: \"+atk.stat.getDex());\n\t\t\t\tSystem.out.println(\"Wis: \"+atk.stat.getWis());\n\t\t\t\tSystem.out.println(\"Con: \"+atk.stat.getCon()+\"\\n\");\t*/\t\t\t\n\t\t}\n\t}",
"public void dealCard(Player player){\n TrainCard removedCard = draw();\n player.addTrainCard(removedCard);\n }",
"public void spawnEntity(String entityToSpawn,World world, int xplane, int yplane, int zplane)\n { \n \t//Spawn a creeper\n \tif(entityToSpawn.contentEquals(\"Cr\"))\n \t{\t\n \t\tEntityCreeper creeper = new EntityCreeper(world);\n \t\tcreeper.entityAge = -24000;\n \t\tcreeper.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(creeper);\n \t\treturn;\n \t}\n \t//Spawn an Enderman\n \tif(entityToSpawn.contentEquals(\"En\"))\n \t{\n \t\tEntityEnderman enderman = new EntityEnderman(world);\n \t\tenderman.entityAge = -24000;\n \t\tenderman.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(enderman);\n \t\treturn;\n \t}\n \t//Spawn a Skeleton\n \tif(entityToSpawn.contentEquals(\"Sk\"))\n \t{\n \t\tEntitySkeleton skeleton = new EntitySkeleton(world);\n \t\tskeleton.entityAge = -24000;\n \t\tskeleton.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(skeleton);\n \t\treturn;\n \t}\n \t//Spawn a Zombie\n \tif(entityToSpawn.contentEquals(\"Zo\"))\n \t{\n \t\tEntityZombie zombie = new EntityZombie(world);\n \t\tzombie.entityAge = -24000;\n \t\tzombie.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(zombie);\n \t\treturn;\n \t}\n \t//Spawn a Slime\n \tif(entityToSpawn.contentEquals(\"Sl\"))\n \t{\n \t\tEntitySlime slime = new EntitySlime(world);\n \t\tslime.entityAge = -24000;\n \t\tslime.setSlimeSize(3);\n \t\tslime.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(slime);\n \t\treturn;\n \t}\n \t//Spawn a Spider\n \tif(entityToSpawn.contentEquals(\"Sp\"))\n \t{\n \t\tEntitySpider spider = new EntitySpider(world);\n \t\tspider.entityAge = -24000;\n \t\tspider.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(spider);\n \t\treturn;\n \t}\n \t//Spawn a Cave Spider\n \tif(entityToSpawn.contentEquals(\"Cs\"))\n \t{\n \t\tEntityCaveSpider cavespider = new EntityCaveSpider(world);\n \t\tcavespider.entityAge = -24000;\n \t\tcavespider.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(cavespider);\n \t\treturn;\n \t}\n \t//Spawn a Ghast\n \tif(entityToSpawn.contentEquals(\"Gh\"))\n \t{\n \t\tEntityGhast ghast = new EntityGhast(world);\n \t\tghast.entityAge = -24000;\n \t\tghast.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(ghast);\n \t\treturn;\n \t}\n \t//Spawn a Blaze\n \tif(entityToSpawn.contentEquals(\"Bl\"))\n \t{\n \t\tEntityBlaze blaze = new EntityBlaze(world);\n \t\tblaze.entityAge = -24000;\n \t\tblaze.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(blaze);\n \t\treturn;\n \t}\n \t//Spawn a Magma Cube\n \tif(entityToSpawn.contentEquals(\"Ma\"))\n \t{\n \t\tEntityMagmaCube magmacube = new EntityMagmaCube(world);\n \t\tmagmacube.entityAge = -24000;\n \t\tmagmacube.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(magmacube);\n \t\treturn;\n \t}\n \t//Spawn a Dragon\n \tif(entityToSpawn.contentEquals(\"Dr\"))\n \t{\n \t\tEntityDragon dragon = new EntityDragon(world);\n \t\tdragon.entityAge = -24000;\n \t\tdragon.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(dragon);\n \t\treturn;\n \t}\n \t//Spawn a sheep\n \tif(entityToSpawn.contentEquals(\"Sh\"))\n \t{\n \t\tEntitySheep sheep = new EntitySheep(world);\n \t\tsheep.entityAge = -2;\n \t\tsheep.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(sheep);\n \t\treturn;\n \t}\n \t//Spawn a Cow\n \tif(entityToSpawn.contentEquals(\"Co\"))\n \t{\n \t\tEntityCow cow = new EntityCow(world);\n \t\tcow.entityAge = -2;\n \t\tcow.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(cow);\n \t\treturn;\n \t}\n \t//Spawn a Pig\n \tif(entityToSpawn.contentEquals(\"Pi\"))\n \t{\n \t\tEntityPig pig = new EntityPig(world);\n \t\tpig.entityAge = -2;\n \t\tpig.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(pig);\n \t\treturn;\n \t}\n \t//Spawn a Chicken\n \tif(entityToSpawn.contentEquals(\"Ch\"))\n \t{\n \t\tEntityChicken chicken = new EntityChicken(world);\n \t\tchicken.entityAge = -2;\n \t\tchicken.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(chicken);\n \t\treturn;\n \t}\n \t//Spawn a Ocelot\n \tif(entityToSpawn.contentEquals(\"Ch\"))\n \t{\n \t\tEntityOcelot ocelot = new EntityOcelot(world);\n \t\tocelot.entityAge = -2;\n \t\tocelot.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(ocelot);\n \t\treturn;\n \t}\n \t//Spawn a Pig Zombie\n \tif(entityToSpawn.contentEquals(\"Pz\"))\n \t{\n \t\tEntityPigZombie pigzombie = new EntityPigZombie(world);\n \t\tpigzombie.entityAge = -24000;\n \t\tpigzombie.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(pigzombie);\n \t\treturn;\n \t}\n \t//Spawn a boat\n \tif(entityToSpawn.contentEquals(\"Bo\"))\n \t{\n \t\tEntityBoat boat = new EntityBoat(world);\n \t\t//boat.entityAge = -2;\n \t\tboat.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(boat);\n \t\treturn;\n \t}\n \t//Spawn a Iron Golem\n \tif(entityToSpawn.contentEquals(\"Ir\"))\n \t{\n \t\tEntityIronGolem irongolem = new EntityIronGolem(world);\n \t\tirongolem.entityAge = -24000;\n \t\tirongolem.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(irongolem);\n \t\treturn;\n \t}\n \t//Spawn a Giant Zombie\n \tif(entityToSpawn.contentEquals(\"Gi\"))\n \t{\n \t\tEntityGiantZombie giant = new EntityGiantZombie(world);\n \t\tgiant.entityAge = -24000;\n \t\tgiant.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(giant);\n \t\treturn;\n \t}\n \t//Spawn a Mine Cart\n \tif(entityToSpawn.contentEquals(\"Mi\"))\n \t{\n \t\tEntityMinecart cart = new EntityMinecart(world);\n \t\t//cart.entityAge = -24000;\n \t\tcart.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(cart);\n \t\treturn;\n \t}\n \t//Spawn a Mooshroom\n \tif(entityToSpawn.contentEquals(\"Gi\"))\n \t{\n \t\tEntityMooshroom moosh = new EntityMooshroom(world);\n \t\tmoosh.entityAge = -2;\n \t\tmoosh.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(moosh);\n \t\treturn;\n \t}\n \t//Spawn a Sliver Fish\n \tif(entityToSpawn.contentEquals(\"Si\"))\n \t{\n \t\tEntitySilverfish silverfish = new EntitySilverfish(world);\n \t\tsilverfish.entityAge = -24000;\n \t\tsilverfish.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(silverfish);\n \t\treturn;\n \t}\n \t//Spawn a Snowman\n \tif(entityToSpawn.contentEquals(\"Sn\"))\n \t{\n \t\tEntitySnowman frosty = new EntitySnowman(world);\n \t\tfrosty.entityAge = -24000;\n \t\tfrosty.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(frosty);\n \t\treturn;\n \t}\n \t//Spawn a Squid\n \tif(entityToSpawn.contentEquals(\"Sq\"))\n \t{\n \t\tEntitySquid squid = new EntitySquid(world);\n \t\tsquid.entityAge = -2;\n \t\tsquid.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(squid);\n \t\treturn;\n \t}\n \t//Spawn a Villager\n \tif(entityToSpawn.contentEquals(\"Vi\"))\n \t{\n \t\tEntityVillager villager = new EntityVillager(world);\n \t\tvillager.entityAge = -2;\n \t\tvillager.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(villager);\n \t\treturn;\n \t}\n \t//Spawn a Wolf\n \tif(entityToSpawn.contentEquals(\"Wo\"))\n \t{\n \t\tEntityWolf wolf = new EntityWolf(world);\n \t\twolf.entityAge = -2;\n \t\twolf.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(wolf);\n \t\treturn;\n \t}\n }",
"public void kill()\r\n {\n if(isTouching(TopDownPlayer.class))\r\n {\r\n health(1);\r\n\r\n getWorld().removeObject(player);\r\n //getWorld().addObject (new Test(), 20, 20);\r\n\r\n }\r\n // if(healthCount >= 1)\r\n // {\r\n // World world;\r\n // world = getWorld();\r\n // getWorld().removeObject(player);\r\n // \r\n // getWorld().addObject (new Test(), 20, 20);\r\n // }\r\n }",
"@Override\n public void removed(Entity e) {\n AI ai = AIm.get(e);\n if (ai.active) {\n ai.active = false;\n startMove = startAction = true;\n groupAiDone= false;\n screen.processTurn();\n // Future note: This transition comes quite abruptly.\n // It would be nice to somehow delay it, but because\n // the entity has just been removed, it won't be\n // processed any more. Perhaps give processTurn()\n // a boolean argument which will pause for a second\n // or so before selecting the new entity and moving\n // the camera on.\n\n }\n }",
"@SuppressWarnings(\"deprecation\")\r\n public static void startDeath(Entity entity, Entity killer) {\r\n if (!isDead(entity)) {\r\n entity.getPulseManager().clear();\r\n if (killer == null) {\r\n killer = entity;\r\n }\r\n if (entity instanceof Player) {\r\n Player player = (Player) entity;\r\n NodeTask deathTask = player.getZoneMonitor().deathTaskOverride(killer);\r\n if (deathTask == null) {\r\n deathTask = SINGLETON;\r\n }\r\n Pulse pulse = deathTask.schedule(entity, killer);\r\n pulse.start();\r\n entity.getPulseManager().set(pulse);\r\n } else {\r\n Pulse pulse = SINGLETON.schedule(entity, killer);\r\n pulse.start();\r\n entity.getPulseManager().set(pulse);\r\n }\r\n }\r\n }",
"public void dealDamage(int x, int y, int damage) {\r\n\t\tint id;\r\n\t\tMessage damageMessage;\r\n\t\tsynchronized (this) {\r\n\t\t\tid = localMessageCounter++;\r\n\t\t\r\n\t\t\tdamageMessage = new Message();\r\n\t\t\tdamageMessage.put(\"request\", MessageRequest.dealDamage);\r\n\t\t\tdamageMessage.put(\"x\", x);\r\n\t\t\tdamageMessage.put(\"y\", y);\r\n\t\t\tdamageMessage.put(\"damage\", damage);\r\n\t\t\tdamageMessage.put(\"id\", id);\r\n\t\t\tdamageMessage.put(\"origin\", \"D\" + unitID);\r\n\t\t}\r\n\t\t\r\n\t\t// Send a spawn message\r\n\t\tsendMessage(damageMessage);\r\n\t}",
"public void attack(Entity entity) {\n\t}",
"public void removeEntity(Entity entity){\n entityList.remove(entity);\n }",
"private Object generateEntitySpawnPacket_Old(Object nmsEntity) {\n Object trackerEntry = ReflectUtils.newInstance(\"EntityTrackerEntry\", new Class[] {ReflectUtils.getMcClass(\"Entity\"), int.class, int.class, int.class, boolean.class},\n new Object[]{nmsEntity, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, true});\n\n Object packet = ReflectUtils.runMethod(trackerEntry, \"e\");\n return packet;\n }",
"public void onKillEntity(EntityLivingBase entityLivingIn)\n {\n super.onKillEntity(entityLivingIn);\n }",
"public void killedByPlayer() {\r\n\t\tscreen.enemiesKilled++;\r\n\t\tMazeCrawler mc = screen.mazeHandler.mazeCrawler;\r\n\t\tint n = 2; //if enemy is large do movement n+1 times\r\n\t\tswitch (enemyType) {\r\n\t\tcase DOWN:\r\n\t\t\tmc.moveDown();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveDown();}\r\n\t\t\tbreak;\r\n\t\tcase LEFT:\r\n\t\t\tmc.moveLeft();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveLeft();}\r\n\t\t\tbreak;\r\n\t\tcase RIGHT:\r\n\t\t\tmc.moveRight();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveRight();}\r\n\t\t\tbreak;\r\n\t\tcase UP:\r\n\t\t\tmc.moveUp();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveUp();}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tscreen.enemyDeath.play(.5f);\r\n\t\tdestroy();\r\n\t}",
"void removeEntity(IViewEntity entity);",
"@Listener\n public void onDeath(DestructEntityEvent.Death event) {\n if (!(event.getTargetEntity() instanceof Player))\n return;\n\n Optional<EntityDamageSource> source = event.getCause().first(EntityDamageSource.class);\n if (!source.isPresent())\n return; // did not die from pvp\n\n Player killed = (Player) event.getTargetEntity();\n\n Player killer = null;\n ItemStack weapon = null;\n Entity damager = source.get().getSource();\n if (damager instanceof Player) {\n killer = (Player) damager;\n weapon = killer.getItemInHand(HandTypes.MAIN_HAND).get();\n }\n\n if (damager instanceof Projectile) {\n Projectile proj = (Projectile) damager;\n if (proj.getShooter() instanceof Player) {\n killer = (Player) proj.getShooter();\n weapon = killer.getItemInHand(HandTypes.MAIN_HAND).get();\n }\n }\n\n if (damager.get(TameableData.class).isPresent()) {\n Optional<UUID> opOwnerUUID = damager.get(TameableData.class).get().owner().get();\n if (opOwnerUUID.isPresent()) {\n UUID uuid = opOwnerUUID.get();\n if (plugin.getServer().getOfflinePlayer(uuid).map(OfflinePlayer::isOnline).orElse(false)) {\n killer = ((SpongePlayer) plugin.getServer().getPlayer(uuid).get()).getHandle();\n // Use a bone to show the case was a wolf\n weapon = ItemStack.builder().itemType(ItemTypes.BONE).quantity(1).build();\n }\n }\n }\n\n if (killer == null)\n return;\n\n // Check the killers world just incase for some reason the\n // killed player was teleported to another world\n if (plugin.getConfigManager().getPvPConfig().getNode(\"ignoredWorlds\").getCollectionValue(String.class).contains(killer.getWorld().getName()))\n return;\n\n TrackerUtil.updatePvPStats(plugin.getServer().getOfflinePlayer(killed.getUniqueId().toString()).get(),\n plugin.getServer().getOfflinePlayer(killer.getUniqueId().toString()).get());\n\n TrackerInterface pvpTracker = plugin.getTrackerManager().getPvPInterface();\n if (pvpTracker.getDeathMessageManager().isDefaultMessagesOverriden())\n event.setMessageCancelled(true);\n\n pvpTracker.getDeathMessageManager().sendItemMessage(killer.getName(), killed.getName(), weapon.getType().getName().toLowerCase());\n pvpTracker.getRecapManager().getDeathRecaps().get(killed.getName()).setVisible(true);\n }",
"private void spawnPlayer() {\n\t\tplayer.show(true);\n\t\tplayer.resetPosition();\n\t\tplayerDead = false;\n\t\tplayerDeadTimeLeft = 0.0;\n\t}",
"public void tick()\n{\n y+=speed;\n\n for(int i=0; i<game.ea.size(); i++)\n {\n EntityA tempEnt= game.ea.get(i);\n if(Physics.Coliision(this,tempEnt))\n {\n c.removeEntity(tempEnt); //zeby po trafieniu znikal pocisk\n c.removeEntity(this);\n game.setEnemy_killed(game.getEnemy_killed()+1);\n\n }\n }\n\n/*\n* If Enemy is out of bounds player get - points\n* and loses some stamina.\n*\n* Enemies are removed from list after disapears\n */\n\n if(y>(App.getHEIGHT()-20)*2)\n {\n App.addHealth(-10);\n App.addPOINTS(-3);\n c.removeEntity(this);\n }\n\n anim.runAnimation();\n\n /*\n * If App is not in game state it doesn't\n * need to have any enemies\n */\n\n if(App.State != App.STATE.GAME)\n {\n delEnemies();\n\n }\n}",
"public void entityRemoved() {}",
"void delete(T entity);",
"void delete(T entity);",
"@EventHandler\n\tpublic void onPlayerDeath(final PlayerDeathEvent event) {\n\t\tif (event.getEntity().getKiller() != null) {\n\t\t\tif (event.getEntity().getKiller() instanceof Player && event.getEntity() instanceof Player && pli.global_players.containsKey(event.getEntity().getName()) && pli.global_players.containsKey(event.getEntity().getKiller().getName())) {\n\t\t\t\tevent.getDrops().clear();\n\t\t\t\tevent.getEntity().setHealth(20);\n\t\t\t\t// final Location l = event.getEntity().getLocation();\n\t\t\t\tfinal String killername = event.getEntity().getKiller().getName();\n\t\t\t\tfinal String entityKilled = event.getEntity().getName();\n\n\t\t\t\tBukkit.getScheduler().runTask(this, new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tpli.getRewardsInstance().giveKillReward(killername, 2);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tfinal Player p1 = event.getEntity().getKiller();\n\t\t\t\tfinal Player p2 = event.getEntity();\n\n\t\t\t\tIArena a = (IArena) pli.global_players.get(p1.getName());\n\t\t\t\tUtil.teleportPlayerFixed(p2, a.getSpawns().get(r.nextInt(a.getSpawns().size())));\n\n\t\t\t\tInteger gpkiller = 2;\n\t\t\t\tInteger gploser = 0;\n\t\t\t\tif (getConfig().isSet(\"player.\" + killername)) {\n\t\t\t\t\tgpkiller = getConfig().getInt(\"player.\" + killername + \".gp\") + 2; // +2 gp\n\t\t\t\t}\n\t\t\t\tif (getConfig().isSet(\"player.\" + entityKilled)) {\n\t\t\t\t\tgploser = Math.max(getConfig().getInt(\"player.\" + entityKilled + \".gp\") - 1, 0); // -1 gp\n\t\t\t\t}\n\t\t\t\tgetConfig().set(\"player.\" + killername + \".gp\", gpkiller);\n\t\t\t\tgetConfig().set(\"player.\" + entityKilled + \".gp\", gploser);\n\t\t\t\tthis.saveConfig();\n\n\t\t\t\ttry {\n\t\t\t\t\tmainsql.updateStats(p1.getName(), 2);\n\t\t\t\t\tmainsql.updateStats(p2.getName(), -1);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(\"Failed updating sql gp.\");\n\t\t\t\t}\n\n\t\t\t\tBukkit.getScheduler().runTaskLater(this, new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tp2.getInventory().clear();\n\t\t\t\t\t\tp2.getInventory().setHelmet(null);\n\t\t\t\t\t\tp2.getInventory().setChestplate(null);\n\t\t\t\t\t\tp2.getInventory().setLeggings(null);\n\t\t\t\t\t\tp2.getInventory().setBoots(null);\n\t\t\t\t\t\tp2.getInventory().setArmorContents(null);\n\t\t\t\t\t\tfor (ItemStack item : start_items) {\n\t\t\t\t\t\t\tp2.getInventory().addItem(item);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tp2.updateInventory();\n\t\t\t\t\t}\n\t\t\t\t}, 20L);\n\n\t\t\t\tp2.playSound(p2.getLocation(), Sound.CAT_MEOW, 1F, 1);\n\t\t\t\tlv.put(p2.getName(), 0);\n\n\t\t\t\tArrayList<String> keys = new ArrayList<String>();\n\t\t\t\tif (getConfig().isConfigurationSection(\"player.\" + p2.getName() + \".items\")) {\n\t\t\t\t\tgetConfig().set(\"player.\" + p2.getName() + \".items\", null);\n\t\t\t\t\tthis.saveConfig();\n\t\t\t\t}\n\n\t\t\t\tfor (PotionEffect effect : p2.getActivePotionEffects())\n\t\t\t\t\tp2.removePotionEffect(effect.getType());\n\n\t\t\t\tfor (PotionEffect effect : p1.getActivePotionEffects())\n\t\t\t\t\tp1.removePotionEffect(effect.getType());\n\n\t\t\t\tp1.playEffect(p1.getLocation(), Effect.POTION_BREAK, 5);\n\t\t\t\tInteger current = lv.get(p1.getName());\n\t\t\t\tlv.put(p1.getName(), current + 1);\n\t\t\t\tp1.sendMessage(im.upgrade.replaceAll(\"<level>\", Integer.toString(lv.get(p1.getName()))));\n\t\t\t\tLevel.updatelv(m, lv, p1);\n\n\t\t\t\tscoreboard.updateScoreboard(a);\n\n\t\t\t\tp1.setFoodLevel(20);\n\t\t\t\tp1.setHealth(20);\n\t\t\t\tp2.setHealth(20);\n\t\t\t\tp2.setFoodLevel(20);\n\n\t\t\t\tthis.addextraitems(p1);\n\t\t\t}\n\t\t} else {\n\t\t\t// death by something else -> respawn\n\n\t\t\tif (pli.global_players.containsKey(event.getEntity().getName())) {\n\t\t\t\tevent.getEntity().setHealth(20);\n\t\t\t\tif (event.getEntity() != null) {\n\t\t\t\t\tif (event.getEntity() instanceof Player) {\n\t\t\t\t\t\tevent.getDrops().clear();\n\t\t\t\t\t\tfinal Player p = (Player) event.getEntity();\n\t\t\t\t\t\tIArena a = (IArena) pli.global_players.get(p.getName());\n\t\t\t\t\t\tif (a != null && p != null) {\n\t\t\t\t\t\t\tUtil.teleportPlayerFixed(p, a.getSpawns().get(r.nextInt(a.getSpawns().size())));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tp.playSound(p.getLocation(), Sound.CAT_MEOW, 1F, 1);\n\n\t\t\t\t\t\tp.setFoodLevel(20);\n\n\t\t\t\t\t\tlv.put(p.getName(), 0);\n\n\t\t\t\t\t\tBukkit.getScheduler().runTaskLater(this, new Runnable() {\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tp.getInventory().clear();\n\t\t\t\t\t\t\t\tp.getInventory().setHelmet(null);\n\t\t\t\t\t\t\t\tp.getInventory().setChestplate(null);\n\t\t\t\t\t\t\t\tp.getInventory().setLeggings(null);\n\t\t\t\t\t\t\t\tp.getInventory().setBoots(null);\n\t\t\t\t\t\t\t\tp.getInventory().setArmorContents(null);\n\t\t\t\t\t\t\t\tfor (ItemStack item : start_items) {\n\t\t\t\t\t\t\t\t\tp.getInventory().addItem(item);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tp.updateInventory();\n\n\t\t\t\t\t\t\t\tm.addextraitems(p);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 20L);\n\n\t\t\t\t\t\tfor (PotionEffect effect : p.getActivePotionEffects())\n\t\t\t\t\t\t\tp.removePotionEffect(effect.getType());\n\n\t\t\t\t\t\tp.setHealth(20);\n\t\t\t\t\t\tp.setFoodLevel(20);\n\n\t\t\t\t\t\tthis.addextraitems(p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@EventHandler\n public void onEntityDeath(EntityDeathEvent event){\n if(RandomEncounters.getInstance().getLogLevel()>11){\n RandomEncounters.getInstance().logMessage(\"Something died, let me figure out if it means anything.\");\n }\n PlacedMob placedMob = PlacedMob.getInstance(event.getEntity().getUniqueId());\n if(placedMob!=null){\n placedMob.die();\n }else{\n if(RandomEncounters.getInstance().getLogLevel()>11){\n RandomEncounters.getInstance().logMessage(\"The death was not of importance, carry on.\");\n }\n }\n }",
"public void entityDeactivating() {}",
"@EventHandler\n\tpublic void onDeath(PlayerDeathEvent e){\n\t\tLocation loc = e.getEntity().getLocation();\n\t\t\n\t\t/*Block b = loc.getBlock();\n\t\tb.setType(Material.SKULL);\n\t\tBlockState bs = b.getState();\n\t\t//b.setData((byte)0x1);\n\t\t\n\t\tif (bs instanceof Skull){\n\t\t Skull skull = (Skull)bs;\n\t\t \n\t\t skull.setRotation(BlockFace.SOUTH_SOUTH_EAST);\n\t\t skull.setSkullType(SkullType.PLAYER);\n\t\t skull.setOwner(e.getEntity().getName());\n\t\t skull.update();\n\t\t}*/\n\t\t\n\t\trp.resetPoints(e.getEntity());\n\t\tVaultMethods.updateMoney(e.getEntity());\n\t}",
"public boolean onEntitySpawned(Entity e, ItemStack stack, @Nullable Player player) {\n return true;\n }",
"public abstract void removeCreature(Point p);",
"public void enemyoff(){\n getWorld().removeObject(this);\n }",
"public abstract void destroyPlayer();",
"@Override\r\n public void uncall() {\r\n Player player = MbPets.getInstance().getServer().getPlayer(getOwner());\r\n if (player != null) {\r\n if (getEntity().getInventory().getDecor() != null) {\r\n if (player.getInventory().firstEmpty() >= 0) {\r\n player.getInventory().addItem(getEntity().getInventory().getDecor());\r\n } else {\r\n player.getWorld().dropItemNaturally(player.getLocation(),\r\n getEntity().getInventory().getDecor());\r\n }\r\n }\r\n }\r\n super.uncall();\r\n }",
"@Override\r\n\tpublic void delete(PartyType entity) {\n\t\t\r\n\t}",
"private void deleteFakeTeam(Player player) {\n\t\tPacketContainer packet = new PacketContainer(PacketType.Play.Server.SCOREBOARD_TEAM);\n\t\tpacket.getStrings().write(0, FakeTeamName);\n\t\tpacket.getIntegers().write(1, 1); // Set remove mode\n\t\t\n\t\ttry {\n\t\t\tProtocolLibrary.getProtocolManager().sendServerPacket(player, packet);\n\t\t} catch (InvocationTargetException e) {\n\t\t\t// Should never happen unless packet changes\n\t\t\tthrow new AssertionError(e);\n\t\t}\n\t}",
"@Override\n\tpublic void onCollision(ICollidableObject collideWith) {\n\t\t\n\t\tif(collideWith != expediteur)\n\t\t{\n\t\t\tif(collideWith instanceof ActiveEntity)\n\t\t\t\tcollideWith.onCollision(this);\n\t\t\t\n\t\t\tMessage m = new Message();\n\t\t\tm.instruction = MessageKey.I_REMOVE_ENTITY;\n\t\t\tm.i_data.put(MessageKey.P_ID, id);\n\t\t\tm.engine = EngineManager.LOGIC_ENGINE;\n\t\t\t\n\t\t\tengineManager.receiveMessage(m);\n\t\t}\n\t}",
"@Listener\n public void onEntityDeath(DestructEntityEvent.Death event) {\n final Entity entity = event.getTargetEntity();\n Optional<EntityDamageSource> optDamageSource = event.getCause().first(EntityDamageSource.class);\n if (optDamageSource.isPresent()) {\n EntityDamageSource damageSource = optDamageSource.get();\n Entity killer = damageSource.getSource();\n if (killer instanceof Player) {\n Player player = (Player) killer;\n String entityName;\n if (entity.get(Keys.DISPLAY_NAME).isPresent()) {\n entityName = entity.get(Keys.DISPLAY_NAME).get().toPlain();\n } else {\n entityName = entity.getType().getName();\n }\n killCountDao.incrementKillCount(player.getName(), entityName);\n }\n }\n }",
"@EventHandler(priority = EventPriority.NORMAL)\n public void Playerdeath(PlayerDeathEvent e) {\n if (plugin.hardcore) {\n //if the dead entity is Player\n if (e.getEntity() instanceof Player) {\n //get the Player\n Player player = (Player) e.getEntity();\n //System.out.println(\"onDeath\");\n\n if (player.getWorld() == plugin.skyworld) {\n\n plugin.write(null, \"debug.player-death\", \"info\", true, player.getName());\n plugin.write(player, \"plugin.ondeath.starting\", \"info\", false);\n\n Island island = new Island(player.getName(), plugin);\n try {\n island.load();\n }\n catch (SQLException ex) {\n plugin.write(null, \"admin.sql.ex-load\", \"severe\", player.getName());\n }\n if (island.exists) {\n\n try {\n island.reset();\n }\n catch (Exception ex) {\n plugin.write(null, \"admin.sql.ex-reset\", \"severe\", player.getName());\n }\n\n plugin.write(player, \"plugin.ondeath.finished\", \"info\");\n }\n }\n }\n }\n }",
"public void spawnEntity(Entity entity)\n\t{\n\t\tif(!entity.isLoadedResources() && !entity.loadResources())\n\t\t{\n\t\t\t//Don't add entity if an error occurs\n\t\t\treturn;\n\t\t}\n\t\tthis.newEntityBuffer.add(entity);\n\t\tLoggingHandler.logger.log(Level.FINE, \"Added entity to spawn queue: \" + entity);\n\t}",
"public static ItemDespawnEvent callItemDespawnEvent(EntityItem entityitem) {\n/* 327 */ Item entity = (Item)entityitem.getBukkitEntity();\n/* */ \n/* 329 */ ItemDespawnEvent event = new ItemDespawnEvent(entity, entity.getLocation());\n/* */ \n/* 331 */ entity.getServer().getPluginManager().callEvent((Event)event);\n/* 332 */ return event;\n/* */ }",
"@EventHandler(ignoreCancelled = true)\n public void onEntityTeleport(EntityTeleportEvent event) {\n if (Util.isTrackable(event.getEntity())) {\n AbstractHorse abstractHorse = (AbstractHorse) event.getEntity();\n Entity passenger = Util.getPassenger(abstractHorse);\n if (passenger instanceof Player) {\n Player player = (Player) passenger;\n getState(player).clearHorseDistance();\n }\n }\n }",
"void playerHit() {\n if (lives == 0) {//if no lives left\n isDead = true;\n } else {//remove a life and reset positions\n lives -=1;\n immortalityTimer = 100;\n resetPositions();\n }\n }",
"int defend(Unit unit, Unit enemy);",
"private void removeEntity(int index)\n\t{\n\t\tthis.entities.get(index).onDespawn();\n\t\tthis.spatialHashGrid.remove(this.entities.get(index).getSpatialHashGridHandle());\n\t\t\n\t\tthis.entities.set(index, this.entities.get(this.entities.size() - 1));\n\t\tthis.entities.remove(this.entities.size() - 1);\n\t}",
"public void onPlayerDestroy(World worldIn, BlockPos pos, IBlockState state)\n {\n this.func_180692_a(worldIn, pos, state, (EntityLivingBase)null);\n }",
"@Override\n public void destroy() {\n super.destroy();\n dungeon.removeEntity(this);\n }",
"public default boolean shouldSpawnEntity(){ return false; }",
"@Override\n\tpublic void detach(Object entity) {\n\t\t\n\t}",
"public void dies(PlayerSprite player, boolean labyrinth, SpawnRate spawnValues) {\n\t}",
"public void removeEntityFromTeam(LivingEntity livingEntity, String teamName) {\n getTeam(teamName).removeEntry(livingEntity.getUniqueId().toString());\n }",
"@Override\r\n\tpublic void Death(Player arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void Death(Player arg0) {\n\t\t\r\n\t}",
"void killPlayerByPlayerMove()\n {\n movePlayerToCell(getMonsterCell());\n }",
"public Enemy summon() {\n\t\treturn null;\n\t}",
"public void closeEntity();",
"public void dropEntity(String entityName)\n {\n for(int i = 0; i < entityList.size(); i++)\n {\n if(entityList.get(i).getName().equals(entityName)){\n entityList.remove(entityList.get(i));\n }\n }\n }",
"public boolean attackEntityFrom(DamageSource var1, int var2)\n {\n if (this.isDead)\n {\n return true;\n }\n else\n {\n this.entityDropItem(this.mapStack, 0.0F);\n attemptUntrackHangableMap(this);\n this.setDead();\n return true;\n }\n }",
"void onRespawned(Need need, NeedLevel level, PlayerEntity player, PlayerEntity oldPlayer);",
"public void removePlayer(EntityPlayerMP player)\r\n {\r\n int var2 = (int)player.managedPosX >> 4;\r\n int var3 = (int)player.managedPosZ >> 4;\r\n\r\n for (int var4 = var2 - this.playerViewRadius; var4 <= var2 + this.playerViewRadius; ++var4)\r\n {\r\n for (int var5 = var3 - this.playerViewRadius; var5 <= var3 + this.playerViewRadius; ++var5)\r\n {\r\n PlayerManager.PlayerInstance var6 = this.getPlayerInstance(var4, var5, false);\r\n\r\n if (var6 != null)\r\n {\r\n var6.removePlayer(player);\r\n }\r\n }\r\n }\r\n\r\n this.players.remove(player);\r\n }",
"public void act() \r\n {\r\n Controller world = (Controller) getWorld();\r\n player = world.getPlayer();\r\n if (this.isTouching(Player.class))\r\n {\r\n player.minusHealth(5);\r\n world.removeObject(this);\r\n }\r\n }",
"public void tick() {\n\t\tif (Math.abs(disToPlayerX()) > Math.abs(disToPlayerY())) {\r\n\t\t\tif (disToPlayerX()<0) {\r\n\t\t\t\tx -= speed;\t//moves enemy to the left\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tx += speed; //moves enemy to the right\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (disToPlayerY()<0) {\r\n\t\t\t\ty-=speed; //moves enemy up\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ty+=speed; //moves enemy down\r\n\t\t\t}\r\n\t\t}\r\n\t\tenemyRectangle.setLocation((int)x,(int) y); //updates hitbox of enemy\r\n\r\n\t\t//checks all enemies and see if they run into player\r\n\t\tfor (int i=0;i<c.getEnemys().size();i++) {\r\n\t\t\tif (enemyRectangle.getBounds().intersects(player.getRectangle().getBounds())) {\r\n\t\t\t\tkillEnemy(); //removes the enemy\r\n\t\t\t\tPlayer.health -=10; //removes 10 health\r\n\t\t\t\tbreak; //doesn't work without this BREAK. DO NOT REMOVE\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//checks all bullets if they hit an enemy\r\n\t\tfor (int i = 0;i<c.getBullets().size();i++) {\r\n\t\t\tif (enemyRectangle.getBounds().intersects(c.getBullets().get(i).getRect().getBounds())) {\r\n\t\t\t\tkillEnemy(); //removes enemy\r\n\t\t\t\tc.removeBullet(c.getBullets().get(i)); //removes the bullet\r\n\t\t\t\tPlayer.score += 50; //adds 50 to the score\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void declineInvite(String player) {\r\n connection.declineInvite(player);\r\n }",
"public void sendEntity(Entity entity);",
"@Override\r\n\tpublic void delete(Player t) {\n\r\n\t}",
"@EventHandler\n\tpublic void onPlayerDeath(EntityDamageEvent e){\n\n\t\t//Is the player in the game?\n\t\tif (!isPlayerInGame(e.getEntity())) return;\n\t\tPlayer killed = (Player) e.getEntity();\n\n\t\t//Is it disabled damage?\n\t\tif (MeleeGame.damageCauseIsProtected(e.getCause())) {\n\t\t\te.setCancelled(true);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Is the damage lethal?\n\t\tif (!isDamageLethal(e, killed)) return;\n\t\t\n\t\tPlayer killer = null;\n\t\tEntityDamageByEntityEvent edbee = null;\n\t\t\n\t\t//Was the player killed by an entity?\n\t\tif (e instanceof EntityDamageByEntityEvent){\n\t\t\tedbee = (EntityDamageByEntityEvent) e;\n\t\t\tEntity killingEntity = edbee.getDamager();\n\t\t\t\n\t\t\t// Determine killer\n\t\t\tif (isPlayerInGame(killingEntity)){\n\t\t\t\tkiller = (Player) killingEntity;\t\n\t\t\t} else if (isShotByPlayerInGame(killingEntity)){\n\t\t\t\tkiller = (Player) ((Projectile) killingEntity).getShooter();\n\t\t\t\tkillingEntity.remove(); // Don't keep arrows around\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (killer != null) {\n\t\t\tgame.handleKill(killer, killed, edbee);\n\t\t} else {\n\t\t\tgame.handleDeath(killed, e); //Killed by non-entity, or an entity not in the game\n\t\t}\n\t\t\n\t}",
"@Override\r\n public void deleteEntity(String entityName) {\n\r\n }",
"public void method_1896(@NotNull EntityOtherPlayerMP var1) {\n if (Minecraft.getMinecraft().world != null) {\n Minecraft.getMinecraft().world.removeEntityFromWorld(var1.getEntityId());\n }\n\n field_1241.remove(var1);\n field_1242.remove(var1);\n }",
"@Override\n\tpublic void disinvite(Party party) throws CTPException {\n\t\t\n\t}",
"public abstract BossBar removePlayer(UUID uuid);",
"public void EjectStackOnMilled( ItemStack stack )\r\n {\r\n \tint iFacing = 2 + worldObj.rand.nextInt( 4 ); // random direction to the sides\r\n \t\r\n \tVec3 ejectPos = Vec3.createVectorHelper( worldObj.rand.nextDouble() * 1.25F - 0.125F, \r\n \t\tworldObj.rand.nextFloat() * ( 1F / 16F ) + ( 7F / 16F ), \r\n \t\t-0.2F );\r\n \t\r\n \tejectPos.RotateAsBlockPosAroundJToFacing( iFacing );\r\n \t\r\n EntityItem entity = new EntityItem( worldObj, xCoord + ejectPos.xCoord, \r\n \t\tyCoord + ejectPos.yCoord, zCoord + ejectPos.zCoord, stack );\r\n\r\n \tVec3 ejectVel = Vec3.createVectorHelper( worldObj.rand.nextGaussian() * 0.025D, \r\n \t\tworldObj.rand.nextGaussian() * 0.025D + 0.1F, \r\n \t\t-0.06D + worldObj.rand.nextGaussian() * 0.04D );\r\n \t\r\n \tejectVel.RotateAsVectorAroundJToFacing( iFacing );\r\n \t\r\n entity.motionX = ejectVel.xCoord;\r\n entity.motionY = ejectVel.yCoord;\r\n entity.motionZ = ejectVel.zCoord;\r\n \r\n entity.delayBeforeCanPickup = 10;\r\n \r\n worldObj.spawnEntityInWorld( entity );\r\n }",
"@Override\n\tpublic void remove(Object entity) {\n\t\t\n\t}"
] |
[
"0.8241512",
"0.66241205",
"0.61561936",
"0.61206746",
"0.60491574",
"0.60446906",
"0.60429204",
"0.6012981",
"0.59421086",
"0.5872555",
"0.57472694",
"0.565024",
"0.5615062",
"0.5604329",
"0.56026125",
"0.56001073",
"0.5597541",
"0.55941504",
"0.55903286",
"0.55783725",
"0.55764896",
"0.55453175",
"0.5541485",
"0.5524734",
"0.5500247",
"0.54899627",
"0.54812306",
"0.5477991",
"0.54646856",
"0.5441263",
"0.5441263",
"0.54262817",
"0.53971505",
"0.5387684",
"0.5383452",
"0.5382744",
"0.5368575",
"0.53558177",
"0.53442085",
"0.53080225",
"0.52992654",
"0.52979183",
"0.52711105",
"0.5258683",
"0.5210181",
"0.5202316",
"0.51978904",
"0.5196833",
"0.5195405",
"0.518429",
"0.51821405",
"0.5162339",
"0.5162339",
"0.5162235",
"0.5135933",
"0.51189744",
"0.51059383",
"0.5094875",
"0.50926554",
"0.5092037",
"0.50878704",
"0.5083913",
"0.50800216",
"0.50792736",
"0.5078644",
"0.507664",
"0.5076625",
"0.50736445",
"0.5064716",
"0.50597584",
"0.50572747",
"0.5057104",
"0.50409114",
"0.5037404",
"0.50228506",
"0.5020467",
"0.4999296",
"0.4995498",
"0.49946955",
"0.4992979",
"0.4992979",
"0.49914026",
"0.49910745",
"0.49850723",
"0.49691132",
"0.4966755",
"0.49666253",
"0.49629912",
"0.49538916",
"0.49521455",
"0.49515495",
"0.4951414",
"0.49497783",
"0.49443728",
"0.49311697",
"0.49297917",
"0.49277434",
"0.49273142",
"0.4923969",
"0.49222705"
] |
0.80737156
|
1
|
Despawns an entity given for the player
|
public static void despawnEntity(Player p, int entityID){
PacketPlayOutEntityDestroy deadEntity = new PacketPlayOutEntityDestroy(entityID);
((CraftPlayer) p.getPlayer()).getHandle().playerConnection.sendPacket(deadEntity);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static void despawnEntity(Player p, Entity entity){\n despawnEntity(p, entity.getId());\n }",
"@SuppressWarnings(\"unused\")\n void spawn(Entity entity);",
"public void killPlayer() {\n \tdungeon.removeentity(getX(), getY(), name);\n \t\tdungeon.deleteentity(getX(),getY(),name);\n \t\t//System.out.println(\"YOU LOSE MAMA\");\n \t\t//System.exit(0);\n \t\t\n }",
"void spawnEntityAt(String typeName, int x, int y);",
"public boolean shootoutEntity(Entity ent, boolean simulate);",
"@Override\n\tpublic void despawn() {\n\t\t\n\t}",
"public void kill() {\n // leben abziehen und geister sowie pacman respawnen\n lives--;\n pacman.respawn(level.getRandomPacmanSpawn());\n for (GameEntity entity : entities)\n if (entity instanceof Ghost)\n ((Ghost) entity).respawn(level.getNextGhostSpawn());\n }",
"public void removeEntity(Entity entity) {\n\t\tif (entity instanceof Bullet) {\n\t\t\tif (((Bullet) entity).getName().equals(\"bullet\")) {\n\t\t\t\tbullet.remove(entity);\n\t\t\t} else if (((Bullet) entity).getName().equals(\"enemy_bullet\")\n\t\t\t\t\t|| ((Bullet) entity).getName().equals(\"boss_bullet\")) {\n\t\t\t\tenemy_bullet.remove(entity);\n\t\t\t}\n\t\t} else if (entity instanceof Enemy) {\n\t\t\tint enemyX = entity.getX();\n\t\t\tint enemyY = entity.getY();\n\t\t\t\n\t\t\tif (!((Enemy) entity).getName().equals(\"boss\")) {\n\t\t\t\tenemy.remove(entity);\n\t\t\t\t// play enemy explosion sfx\n\t\t\t\tsound.get(\"enemyExplosionEffect\").playAsSoundEffect(1.0f, 1.0f, false);\n\t\t\t\t\n\t\t\t\t// add enemy explosion\n\t\t\t\texplosion.add(new Explosion(this, \"enemy_explosion\", enemyX - 5, enemyY - 5, entity));\n\t\t\t\tpowerupCheck(enemyX, enemyY);\n\t\t\t} else if (((Enemy) entity).getName().equals(\"boss\") && bossExplosionNum == 0) {\n\t\t\t\tbossExplosionNum = 1;\n\t\t\t\t\n\t\t\t\tsound.get(\"bossExplosionEffect\").playAsSoundEffect(1.0f, 1.0f, false);\n\t\t\t\texplosion.add(new Explosion(this, \"enemy_explosion\", enemyX, enemyY, entity));\n\t\t\t}\n\t\t\t\n\t\t\t// add cash and points to score\n\t\t\tif (!stopDrawingPlayer && ((Enemy) entity).getName().equals(\"green_box\")) {\n\t\t\t\tcash += 30;\n\t\t\t\ttotalCash += 30;\n\t\t\t} else if (!stopDrawingPlayer && ((Enemy) entity).getName().equals(\"red_box\")) {\n\t\t\t\tcash += 50;\n\t\t\t\ttotalCash += 50;\n\t\t\t} else if (!stopDrawingPlayer && ((Enemy) entity).getName().equals(\"boss\")) {\n\t\t\t\ttotalCash += 500;\n\t\t\t}\n\t\t} else if (entity instanceof Powerup) {\n\t\t\t// play obtain powerup sfx\n\t\t\tsound.get(\"powerupGetEffect\").playAsSoundEffect(1.0f, 1.0f, false);\n\t\t\t\n\t\t\tEnemy boss = null;\n\t\t\t\n\t\t\tpowerup.remove(entity);\n\t\t\tif (((Powerup) entity).getName() == \"powerup_explosion\") {\n\t\t\t\tfor (int i = 0; i < enemy.size(); i++) {\n\t\t\t\t\tif (!enemy.get(i).getName().equals(\"boss\")) {\n\t\t\t\t\t\texplosion.add(new Explosion(this, \"enemy_explosion\", enemy.get(i).getX() - 5,\n\t\t\t\t\t\t\t\tenemy.get(i).getY() - 5, entity));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tboss = enemy.get(i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < enemy.size(); i++) {\n\t\t\t\t\tif (enemy.get(i).getName().equals(\"green_box\")) {\n\t\t\t\t\t\tcash += 30;\n\t\t\t\t\t\ttotalCash += 30;\n\t\t\t\t\t} else if (enemy.get(i).getName().equals(\"red_box\")) {\n\t\t\t\t\t\tcash += 50;\n\t\t\t\t\t\ttotalCash += 50;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// play enemy explosion sfx\n\t\t\t\tsound.get(\"enemyExplosionEffect\").playAsSoundEffect(1.0f, 1.0f, false);\n\t\t\t\tenemy.clear();\n\t\t\t\t\n\t\t\t\tif (boss != null)\n\t\t\t\t\tenemy.add(boss);\n\t\t\t}\n\t\t} else if (entity instanceof Player) {\n\t\t\t// play player explosion sfx\n\t\t\tsound.get(\"playerExplosionEffect\").playAsSoundEffect(1.0f, 1.0f, false);\n\t\t\t\n\t\t\texplosion.add(new Explosion(this, \"player_explosion\", player.getX() - 5, player.getY() - 5,\n\t\t\t\t\tentity));\n\t\t\tstopDrawingPlayer = true;\n\t\t}\n\t}",
"public synchronized void spawnMe()\n\t{\n\t\t_itemInstance = ItemTable.getInstance().createItem(\"Combat\", _itemId, 1, null, null);\n\t\t_itemInstance.dropMe(null, _location.getX(), _location.getY(), _location.getZ());\n\t}",
"public void respawnAll(Player player) {\r\n\t\tfor(Integer eid : entityIDs) {\r\n\t\t\tItem3DInfo info = entityInfo.get(eid);\r\n\t\t\tint standID = standIDs.get(eid);\r\n\t\t\t\r\n\t\t\tspawnOldZombie(player, info.getWorldName(), info.getX(), info.getY(), info.getZ(),\r\n\t\t\t\t\tinfo.getRotation(), info.getItemID(), eid, standID);\r\n\t\t}\r\n\t}",
"public void executeStrategy(NPC entity);",
"@Override\n\tpublic void updateEntity() {\n\t\t\n\t\tif (this.mobID != null && !this.worldObj.isRemote) {\n\t\t\t\n\t\t\tif (this.delay > 0) {\n\t\t\t\tthis.delay--;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tEntity entity = EntityList.createEntityByName(this.mobID, this.worldObj);\n\t\t\t\n\t\t\t// L'entity n'existe pas\n\t\t\tif (entity == null) {\n\t\t\t\tModGollumCoreLib.log.warning(\"This mob \"+this.mobID+\" isn't register\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tthis.worldObj.setBlockToAir(this.xCoord , this.yCoord , this.zCoord);\n\t\t\t\n\t\t\tdouble x = (double)this.xCoord + 0.5D;\n\t\t\tdouble y = (double)(this.yCoord);// + this.worldObj.rand.nextInt(3) - 1);\n\t\t\tdouble z = (double)this.zCoord + 0.5D;\n\t\t\tEntityLiving entityLiving = entity instanceof EntityLiving ? (EntityLiving)entity : null;\n\t\t\tentity.setLocationAndAngles(x, y, z, this.worldObj.rand.nextFloat() * 360.0F, this.worldObj.rand.nextFloat() * 360.0F);\n\t\t\tthis.worldObj.spawnEntityInWorld(entity);\n\t\t\t\n\t\t\tif (entityLiving == null || entityLiving.getCanSpawnHere()) {\n\t\t\t\t\n\t\t\t\tthis.worldObj.playSoundEffect (this.xCoord, this.yCoord, this.zCoord, \"dig.stone\", 0.5F, this.worldObj.rand.nextFloat() * 0.25F + 0.6F);\n\t\t\t\t\n\t\t\t\tif (entityLiving != null) {\n\t\t\t\t\tentityLiving.spawnExplosionParticle();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void spawnPlayer() {\n\t\tplayer.show(true);\n\t\tplayer.resetPosition();\n\t\tplayerDead = false;\n\t\tplayerDeadTimeLeft = 0.0;\n\t}",
"public void spawnEntity(AEntityB_Existing entity){\r\n\t\tBuilderEntityExisting builder = new BuilderEntityExisting(entity.world.world);\r\n\t\tbuilder.loadedFromSavedNBT = true;\r\n\t\tbuilder.setPositionAndRotation(entity.position.x, entity.position.y, entity.position.z, (float) -entity.angles.y, (float) entity.angles.x);\r\n\t\tbuilder.entity = entity;\r\n\t\tworld.spawnEntity(builder);\r\n }",
"public default boolean shouldSpawnEntity(){ return false; }",
"@EventHandler\n\tpublic void onEntityKill(EntityDeathEvent e) {\n\n\t\tif (!(e.getEntity().getKiller() instanceof Player)) {\n\t\t\treturn;\n\t\t}\n\n\t\tPlayerTR trPlayer = TaskRun.getPlayer(e.getEntity().getKiller());\n\t\tLivingEntity entityKilled = e.getEntity();\n\n\t\tif (entityKilled instanceof PigZombie) {\n\t\t\ttrPlayer.completeTask(4);\n\t\t} else if (entityKilled instanceof Creeper) {\n\t\t\ttrPlayer.completeTask(10);\n\t\t} else if (entityKilled instanceof Ghast) {\n\t\t\ttrPlayer.completeTask(14);\n\t\t} else if ((entityKilled instanceof Skeleton && ((Skeleton) entityKilled).getSkeletonType() == SkeletonType.WITHER)\n\t\t\t\t|| (NMSUtils.isAtLeastOneTwelve() && entityKilled.getType() == EntityType.valueOf(\"WITHER_SKELETON\"))) {\n\t\t\ttrPlayer.completeTask(29);\n\t\t}\n\t}",
"public void kill()\r\n {\n if(isTouching(TopDownPlayer.class))\r\n {\r\n health(1);\r\n\r\n getWorld().removeObject(player);\r\n //getWorld().addObject (new Test(), 20, 20);\r\n\r\n }\r\n // if(healthCount >= 1)\r\n // {\r\n // World world;\r\n // world = getWorld();\r\n // getWorld().removeObject(player);\r\n // \r\n // getWorld().addObject (new Test(), 20, 20);\r\n // }\r\n }",
"public void spawnEntity(String entityToSpawn,World world, int xplane, int yplane, int zplane)\n { \n \t//Spawn a creeper\n \tif(entityToSpawn.contentEquals(\"Cr\"))\n \t{\t\n \t\tEntityCreeper creeper = new EntityCreeper(world);\n \t\tcreeper.entityAge = -24000;\n \t\tcreeper.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(creeper);\n \t\treturn;\n \t}\n \t//Spawn an Enderman\n \tif(entityToSpawn.contentEquals(\"En\"))\n \t{\n \t\tEntityEnderman enderman = new EntityEnderman(world);\n \t\tenderman.entityAge = -24000;\n \t\tenderman.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(enderman);\n \t\treturn;\n \t}\n \t//Spawn a Skeleton\n \tif(entityToSpawn.contentEquals(\"Sk\"))\n \t{\n \t\tEntitySkeleton skeleton = new EntitySkeleton(world);\n \t\tskeleton.entityAge = -24000;\n \t\tskeleton.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(skeleton);\n \t\treturn;\n \t}\n \t//Spawn a Zombie\n \tif(entityToSpawn.contentEquals(\"Zo\"))\n \t{\n \t\tEntityZombie zombie = new EntityZombie(world);\n \t\tzombie.entityAge = -24000;\n \t\tzombie.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(zombie);\n \t\treturn;\n \t}\n \t//Spawn a Slime\n \tif(entityToSpawn.contentEquals(\"Sl\"))\n \t{\n \t\tEntitySlime slime = new EntitySlime(world);\n \t\tslime.entityAge = -24000;\n \t\tslime.setSlimeSize(3);\n \t\tslime.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(slime);\n \t\treturn;\n \t}\n \t//Spawn a Spider\n \tif(entityToSpawn.contentEquals(\"Sp\"))\n \t{\n \t\tEntitySpider spider = new EntitySpider(world);\n \t\tspider.entityAge = -24000;\n \t\tspider.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(spider);\n \t\treturn;\n \t}\n \t//Spawn a Cave Spider\n \tif(entityToSpawn.contentEquals(\"Cs\"))\n \t{\n \t\tEntityCaveSpider cavespider = new EntityCaveSpider(world);\n \t\tcavespider.entityAge = -24000;\n \t\tcavespider.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(cavespider);\n \t\treturn;\n \t}\n \t//Spawn a Ghast\n \tif(entityToSpawn.contentEquals(\"Gh\"))\n \t{\n \t\tEntityGhast ghast = new EntityGhast(world);\n \t\tghast.entityAge = -24000;\n \t\tghast.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(ghast);\n \t\treturn;\n \t}\n \t//Spawn a Blaze\n \tif(entityToSpawn.contentEquals(\"Bl\"))\n \t{\n \t\tEntityBlaze blaze = new EntityBlaze(world);\n \t\tblaze.entityAge = -24000;\n \t\tblaze.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(blaze);\n \t\treturn;\n \t}\n \t//Spawn a Magma Cube\n \tif(entityToSpawn.contentEquals(\"Ma\"))\n \t{\n \t\tEntityMagmaCube magmacube = new EntityMagmaCube(world);\n \t\tmagmacube.entityAge = -24000;\n \t\tmagmacube.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(magmacube);\n \t\treturn;\n \t}\n \t//Spawn a Dragon\n \tif(entityToSpawn.contentEquals(\"Dr\"))\n \t{\n \t\tEntityDragon dragon = new EntityDragon(world);\n \t\tdragon.entityAge = -24000;\n \t\tdragon.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(dragon);\n \t\treturn;\n \t}\n \t//Spawn a sheep\n \tif(entityToSpawn.contentEquals(\"Sh\"))\n \t{\n \t\tEntitySheep sheep = new EntitySheep(world);\n \t\tsheep.entityAge = -2;\n \t\tsheep.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(sheep);\n \t\treturn;\n \t}\n \t//Spawn a Cow\n \tif(entityToSpawn.contentEquals(\"Co\"))\n \t{\n \t\tEntityCow cow = new EntityCow(world);\n \t\tcow.entityAge = -2;\n \t\tcow.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(cow);\n \t\treturn;\n \t}\n \t//Spawn a Pig\n \tif(entityToSpawn.contentEquals(\"Pi\"))\n \t{\n \t\tEntityPig pig = new EntityPig(world);\n \t\tpig.entityAge = -2;\n \t\tpig.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(pig);\n \t\treturn;\n \t}\n \t//Spawn a Chicken\n \tif(entityToSpawn.contentEquals(\"Ch\"))\n \t{\n \t\tEntityChicken chicken = new EntityChicken(world);\n \t\tchicken.entityAge = -2;\n \t\tchicken.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(chicken);\n \t\treturn;\n \t}\n \t//Spawn a Ocelot\n \tif(entityToSpawn.contentEquals(\"Ch\"))\n \t{\n \t\tEntityOcelot ocelot = new EntityOcelot(world);\n \t\tocelot.entityAge = -2;\n \t\tocelot.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(ocelot);\n \t\treturn;\n \t}\n \t//Spawn a Pig Zombie\n \tif(entityToSpawn.contentEquals(\"Pz\"))\n \t{\n \t\tEntityPigZombie pigzombie = new EntityPigZombie(world);\n \t\tpigzombie.entityAge = -24000;\n \t\tpigzombie.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(pigzombie);\n \t\treturn;\n \t}\n \t//Spawn a boat\n \tif(entityToSpawn.contentEquals(\"Bo\"))\n \t{\n \t\tEntityBoat boat = new EntityBoat(world);\n \t\t//boat.entityAge = -2;\n \t\tboat.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(boat);\n \t\treturn;\n \t}\n \t//Spawn a Iron Golem\n \tif(entityToSpawn.contentEquals(\"Ir\"))\n \t{\n \t\tEntityIronGolem irongolem = new EntityIronGolem(world);\n \t\tirongolem.entityAge = -24000;\n \t\tirongolem.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(irongolem);\n \t\treturn;\n \t}\n \t//Spawn a Giant Zombie\n \tif(entityToSpawn.contentEquals(\"Gi\"))\n \t{\n \t\tEntityGiantZombie giant = new EntityGiantZombie(world);\n \t\tgiant.entityAge = -24000;\n \t\tgiant.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(giant);\n \t\treturn;\n \t}\n \t//Spawn a Mine Cart\n \tif(entityToSpawn.contentEquals(\"Mi\"))\n \t{\n \t\tEntityMinecart cart = new EntityMinecart(world);\n \t\t//cart.entityAge = -24000;\n \t\tcart.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(cart);\n \t\treturn;\n \t}\n \t//Spawn a Mooshroom\n \tif(entityToSpawn.contentEquals(\"Gi\"))\n \t{\n \t\tEntityMooshroom moosh = new EntityMooshroom(world);\n \t\tmoosh.entityAge = -2;\n \t\tmoosh.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(moosh);\n \t\treturn;\n \t}\n \t//Spawn a Sliver Fish\n \tif(entityToSpawn.contentEquals(\"Si\"))\n \t{\n \t\tEntitySilverfish silverfish = new EntitySilverfish(world);\n \t\tsilverfish.entityAge = -24000;\n \t\tsilverfish.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(silverfish);\n \t\treturn;\n \t}\n \t//Spawn a Snowman\n \tif(entityToSpawn.contentEquals(\"Sn\"))\n \t{\n \t\tEntitySnowman frosty = new EntitySnowman(world);\n \t\tfrosty.entityAge = -24000;\n \t\tfrosty.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(frosty);\n \t\treturn;\n \t}\n \t//Spawn a Squid\n \tif(entityToSpawn.contentEquals(\"Sq\"))\n \t{\n \t\tEntitySquid squid = new EntitySquid(world);\n \t\tsquid.entityAge = -2;\n \t\tsquid.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(squid);\n \t\treturn;\n \t}\n \t//Spawn a Villager\n \tif(entityToSpawn.contentEquals(\"Vi\"))\n \t{\n \t\tEntityVillager villager = new EntityVillager(world);\n \t\tvillager.entityAge = -2;\n \t\tvillager.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(villager);\n \t\treturn;\n \t}\n \t//Spawn a Wolf\n \tif(entityToSpawn.contentEquals(\"Wo\"))\n \t{\n \t\tEntityWolf wolf = new EntityWolf(world);\n \t\twolf.entityAge = -2;\n \t\twolf.setLocationAndAngles(xplane, yplane, zplane, 0, 0.0F);\n \t\tworld.spawnEntityInWorld(wolf);\n \t\treturn;\n \t}\n }",
"public void act() \n {\n \n move(1);\n \n Player2 player2 = new Player2();\n myWorld2 world = (myWorld2)getWorld();\n \n \n checkForDeath();\n }",
"private void showEntity(Entity entity, Vector locationOverride, Vector directionOverride, int entityId) {\n if(entity.isDead()) {return;}\n Object nmsEntity = ReflectUtils.runMethod(entity, \"getHandle\");\n\n // Use either the entities location, or the override\n Vector location = locationOverride == null ? getEntityPosition(entity, nmsEntity) : locationOverride;\n Vector direction = directionOverride == null ? entity.getLocation().getDirection() : directionOverride;\n\n // Create the correct type of spawn packet, depending on the entity\n Object spawnPacket;\n if(entity instanceof Painting) {\n spawnPacket = ReflectUtils.newInstance(\"PacketPlayOutSpawnEntityPainting\", new Class[]{ReflectUtils.getMcClass(\"EntityPainting\")}, new Object[]{nmsEntity});\n \n // Painting spawn packets are slightly different, as they use a BlockPosition and EnumDirection\n Object blockPosition = ReflectUtils.newInstance(\"BlockPosition\", new Class[]{int.class, int.class, int.class},\n new Object[]{location.getBlockX(), location.getBlockY(), location.getBlockZ()});\n ReflectUtils.setField(spawnPacket, \"c\", blockPosition);\n\n Object enumDirection = ReflectUtils.getEnumDirection(direction);\n ReflectUtils.setField(spawnPacket, \"d\", enumDirection);\n } else if(entity instanceof ExperienceOrb) {\n spawnPacket = ReflectUtils.newInstance(\"PacketPlayOutSpawnEntityExperienceOrb\", new Class[]{ReflectUtils.getMcClass(\"EntityExperienceOrb\")}, new Object[]{nmsEntity});\n setSpawnLocation(spawnPacket, location, \"b\", \"c\", \"d\");\n } else if(entity instanceof HumanEntity) {\n spawnPacket = ReflectUtils.newInstance(\"PacketPlayOutNamedEntitySpawn\", new Class[]{ReflectUtils.getMcClass(\"EntityHuman\")}, new Object[]{nmsEntity});\n setSpawnLocation(spawnPacket, location, \"c\", \"d\", \"e\");\n } else if(entity instanceof LivingEntity) {\n spawnPacket = ReflectUtils.newInstance(\"PacketPlayOutSpawnEntityLiving\", new Class[]{ReflectUtils.getMcClass(\"EntityLiving\")}, new Object[]{nmsEntity});\n setSpawnLocation(spawnPacket, location, \"d\", \"e\", \"f\");\n } else {\n // If we are on 1.14 and up, the contructor for PacketPlayOutSpawnEntity can find all the entity type stuff for us\n // Otherwise, we use a function that gets EntityTrackerEntry to do everything\n if(ReflectUtils.useNewEntitySpawnAndMoveImpl) {\n spawnPacket = ReflectUtils.newInstance(\"PacketPlayOutSpawnEntity\", new Class[]{ReflectUtils.getMcClass(\"Entity\")}, new Object[]{nmsEntity});\n } else {\n spawnPacket = generateEntitySpawnPacket_Old(nmsEntity);\n }\n setSpawnLocation(spawnPacket, location, \"c\", \"d\", \"e\");\n }\n\n ReflectUtils.setField(spawnPacket, \"a\", entityId);\n sendPacket(spawnPacket);\n\n // Force the entity to update its data, since it just spawned\n sendMetadataPacket(nmsEntity, entityId);\n\n // If the entity is living, we have to set its armor and hand/offhand\n if(entity instanceof LivingEntity) {\n sendEntityEquipmentPackets((LivingEntity) entity, entityId);\n }\n }",
"void killPlayerByPlayerMove()\n {\n movePlayerToCell(getMonsterCell());\n }",
"@Override\n public void removed(Entity e) {\n AI ai = AIm.get(e);\n if (ai.active) {\n ai.active = false;\n startMove = startAction = true;\n groupAiDone= false;\n screen.processTurn();\n // Future note: This transition comes quite abruptly.\n // It would be nice to somehow delay it, but because\n // the entity has just been removed, it won't be\n // processed any more. Perhaps give processTurn()\n // a boolean argument which will pause for a second\n // or so before selecting the new entity and moving\n // the camera on.\n\n }\n }",
"public void attack(Entity entity) {\n\t}",
"void entityDestroyed(Entity entity);",
"public void act() \r\n {\r\n Controller world = (Controller) getWorld();\r\n player = world.getPlayer();\r\n if (this.isTouching(Player.class))\r\n {\r\n player.minusHealth(5);\r\n world.removeObject(this);\r\n }\r\n }",
"public void dispara()\r\n {\r\n BulletEnemy bala = new BulletEnemy();\r\n getWorld().addObject(bala,getX(),getY()+25);\r\n }",
"public void dealCard(Player player){\n TrainCard removedCard = draw();\n player.addTrainCard(removedCard);\n }",
"public Enemy summon() {\n\t\treturn null;\n\t}",
"public void tick()\n{\n y+=speed;\n\n for(int i=0; i<game.ea.size(); i++)\n {\n EntityA tempEnt= game.ea.get(i);\n if(Physics.Coliision(this,tempEnt))\n {\n c.removeEntity(tempEnt); //zeby po trafieniu znikal pocisk\n c.removeEntity(this);\n game.setEnemy_killed(game.getEnemy_killed()+1);\n\n }\n }\n\n/*\n* If Enemy is out of bounds player get - points\n* and loses some stamina.\n*\n* Enemies are removed from list after disapears\n */\n\n if(y>(App.getHEIGHT()-20)*2)\n {\n App.addHealth(-10);\n App.addPOINTS(-3);\n c.removeEntity(this);\n }\n\n anim.runAnimation();\n\n /*\n * If App is not in game state it doesn't\n * need to have any enemies\n */\n\n if(App.State != App.STATE.GAME)\n {\n delEnemies();\n\n }\n}",
"private void hideEntity(int entityId) {\n Object idArray = Array.newInstance(int.class, 1);\n Array.set(idArray, 0, entityId);\n\n Object packet = ReflectUtils.newInstance(\"PacketPlayOutEntityDestroy\", new Class[]{}, new Object[]{});\n ReflectUtils.setField(packet, \"a\", idArray);\n sendPacket(packet);\n }",
"public void spawn(Location location) {\r\n Packet<?>[] packets = {\r\n new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER),\r\n new PacketPlayOutNamedEntitySpawn(),\r\n new PacketPlayOutEntityHeadRotation()\r\n };\r\n\r\n setFieldCastValue(packets[0], \"b\", Collections.singletonList(this.getPlayerInfoData((PacketPlayOutPlayerInfo) packets[0])));\r\n\r\n setFieldValue(packets[1], \"a\", this.entityId); // Just change entity id to prevent client-side problems\r\n setFieldValue(packets[1], \"b\", this.profile.getId());\r\n setFieldValue(packets[1], \"c\", location.getX());\r\n setFieldValue(packets[1], \"d\", location.getY());\r\n setFieldValue(packets[1], \"e\", location.getZ());\r\n setFieldValue(packets[1], \"f\", (byte) (location.getYaw() * 256.0F / 360.0F));\r\n setFieldValue(packets[1], \"g\", (byte) (location.getPitch() * 256.0F / 360.0F));\r\n setFieldValue(packets[1], \"h\", this.player.getPlayer().getHandle().getDataWatcher());\r\n\r\n setFieldValue(packets[2], \"a\", this.entityId);\r\n setFieldValue(packets[2], \"b\", (byte) (location.getYaw() * 256.0F / 360.0F));\r\n\r\n for (GamePlayer player : this.plugin.getGameManager().getAllPlayers())\r\n for (Packet<?> packet : packets)\r\n player.sendPacket(packet);\r\n }",
"public abstract void destroyPlayer();",
"public void act() \n {\n advance(); // move forward in the correct direction\n\n if(canSee(Ground.class) || atWorldEdge()) {\n getWorld().removeObject(this);\n return; \n }\n\n bImpact();\n takeExplosionTimer();\n }",
"public boolean onEntitySpawned(Entity e, ItemStack stack, @Nullable Player player) {\n return true;\n }",
"@EventHandler\n\tpublic void entityDeath(EntityDeathEvent e){\n\t\tRandom random = new Random();\n\n\t\tdouble chance = 0.4f;\n\t\tif(random.nextDouble() <= chance) {\n\t\t\te.getEntity().getWorld().dropItem(e.getEntity().getLocation(), new ItemStack(Material.LEATHER));\n\t\t}\n\t}",
"@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\t\r\n\t\t\t\t\tfor(Entity as: Bukkit.getWorld(\"world\").getEntities()) {\r\n\t\t\t\t\t\tif(as instanceof ArmorStand) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tas.remove();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//TOPS\r\n\t\t\t\t\r\n\t\t\t\t\tif(MetodosWarps.containsWarp(\"topkills\")) {\r\n\t\t\t\t\t getTop(locTopKILLS,\"Kills\");\r\n\t\t\t\t\t\tBukkit.getConsoleSender().sendMessage(\" \\n žAžlTOP KILLS ATUALIZADO COM SUCESSO! \\n \");\t\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tBukkit.getConsoleSender().sendMessage(\" \\n žcžlO TOP KILLS NAO PODE SER CARREGADO, POIS A WARP topkills NAO ESTA SETADA! \\n \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(MetodosWarps.containsWarp(\"topcoins\")) {\r\n\t\t\t\t\t getTop(locTopCoins,\"Coins\");\r\n\t\t\t\t\t\tBukkit.getConsoleSender().sendMessage(\" \\n žAžlTOP COINS ATUALIZADO COM SUCESSO! \\n \");\t\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tBukkit.getConsoleSender().sendMessage(\" \\n žcžlO TOP COINS NAO PODE SER CARREGADO, POIS A WARP topkills NAO ESTA SETADA! \\n \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(MetodosWarps.containsWarp(\"top1v1\")) {\r\n\t\t\t\t\t getTop(locTop1v1,\"wins\");\r\n\t\t\t\t\t\tBukkit.getConsoleSender().sendMessage(\" \\n žAžlTOP 1v1 ATUALIZADO COM SUCESSO! \\n \");\t\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tBukkit.getConsoleSender().sendMessage(\" \\n žcžlO TOP 1v1 NAO PODE SER CARREGADO, POIS A WARP top1v1 NAO ESTA SETADA! \\n \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Caixa misteriosa\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(MetodosWarps.containsWarp(\"misteryBox\")) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t Spawn(misteryBox, \"žažlCAIXA MISTERIOSA\",misteryBox.getY()-1.7);\r\n\t\t\t\t\t Spawn(misteryBox, \"žežlEM BREVE!\",misteryBox.getY()-2);\r\n\t\t\t\t\t\tBukkit.getConsoleSender().sendMessage(\" \\n žAžlMYSTERYBOX ATUALIZADO COM SUCESSO! \\n \");\t\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tBukkit.getConsoleSender().sendMessage(\" \\n žcžlO TOP COINS NAO PODE SER CARREGADO, POIS A WARP misteryBox NAO ESTA SETADA! \\n \");\r\n\t\t\t\t\t}\r\n\t\t\t\t}",
"public abstract void removeCreature(Point p);",
"public void onKill(EntityDeathEvent evt) {\r\n }",
"public void respawnPlayer() {\n \tboard.swapTile(board.getTile(player.getPos()), board.getTile(new Point(8,0)));\n player.setPlayerPos(new Point(8,0));\n resetAmmo();\n }",
"@EventHandler\n\tpublic void onDeath(PlayerDeathEvent e){\n\t\tLocation loc = e.getEntity().getLocation();\n\t\t\n\t\t/*Block b = loc.getBlock();\n\t\tb.setType(Material.SKULL);\n\t\tBlockState bs = b.getState();\n\t\t//b.setData((byte)0x1);\n\t\t\n\t\tif (bs instanceof Skull){\n\t\t Skull skull = (Skull)bs;\n\t\t \n\t\t skull.setRotation(BlockFace.SOUTH_SOUTH_EAST);\n\t\t skull.setSkullType(SkullType.PLAYER);\n\t\t skull.setOwner(e.getEntity().getName());\n\t\t skull.update();\n\t\t}*/\n\t\t\n\t\trp.resetPoints(e.getEntity());\n\t\tVaultMethods.updateMoney(e.getEntity());\n\t}",
"public void onExplosionDestroy(World worldIn, BlockPos pos, Explosion explosionIn)\n {\n if (!worldIn.isRemote)\n {\n EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(worldIn, (double)((float)pos.getX() + 0.5F), (double)pos.getY(), (double)((float)pos.getZ() + 0.5F), explosionIn.getExplosivePlacedBy());\n entitytntprimed.setFuse((short)(worldIn.rand.nextInt(entitytntprimed.getFuse() / 4) + entitytntprimed.getFuse() / 8));\n worldIn.addEntity0(entitytntprimed);\n }\n }",
"public void killedByPlayer() {\r\n\t\tscreen.enemiesKilled++;\r\n\t\tMazeCrawler mc = screen.mazeHandler.mazeCrawler;\r\n\t\tint n = 2; //if enemy is large do movement n+1 times\r\n\t\tswitch (enemyType) {\r\n\t\tcase DOWN:\r\n\t\t\tmc.moveDown();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveDown();}\r\n\t\t\tbreak;\r\n\t\tcase LEFT:\r\n\t\t\tmc.moveLeft();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveLeft();}\r\n\t\t\tbreak;\r\n\t\tcase RIGHT:\r\n\t\t\tmc.moveRight();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveRight();}\r\n\t\t\tbreak;\r\n\t\tcase UP:\r\n\t\t\tmc.moveUp();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveUp();}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tscreen.enemyDeath.play(.5f);\r\n\t\tdestroy();\r\n\t}",
"public abstract void endDXFEntity();",
"public void enemyoff(){\n getWorld().removeObject(this);\n }",
"@Override\n public void run() {\n World world=Bukkit.getWorld(\"world\");\n world.spawnEntity(world.getHighestBlockAt(world.getSpawnLocation()).getLocation(), EntityType.VILLAGER);\n }",
"public int removeEntity(Entity e) {\n Entity removed = this.entity_list_.remove(e.name_);\n if (removed != null) {\n System.out.println(removed.name_ + \" has been removed from the map\");\n } else {\n System.err.println(\"The entity to be removed does not exist in the list of entities\");\n }\n if (this.map_grid_[e.getMapRelation().getMyYCoordinate()][e.getMapRelation().getMyXCoordinate()].getEntity() == e) {\n this.map_grid_[e.getMapRelation().getMyYCoordinate()][e.getMapRelation().getMyXCoordinate()].removeEntity();\n //e.setMapRelation(null);\n //System.gc();\n return 0;\n } else {\n System.err.println(\"The avatar to be removed cannot be found on the map.\");\n System.exit(-88);\n return -1;\n }\n }",
"void onRespawned(Need need, NeedLevel level, PlayerEntity player, PlayerEntity oldPlayer);",
"void delete(Entity entity);",
"@EventHandler(ignoreCancelled = true)\n public void onEntityTeleport(EntityTeleportEvent event) {\n if (Util.isTrackable(event.getEntity())) {\n AbstractHorse abstractHorse = (AbstractHorse) event.getEntity();\n Entity passenger = Util.getPassenger(abstractHorse);\n if (passenger instanceof Player) {\n Player player = (Player) passenger;\n getState(player).clearHorseDistance();\n }\n }\n }",
"public void c(EntityPlayer paramahd) {}",
"@Override\r\n\tpublic void delete(Player t) {\n\r\n\t}",
"public void die(){\n\t\tboolean success = false;\n\t\ttile.setAnimal(null);\n\t\treleasePandas();\n\n\t\twhile(!success){\n\t\t\tRandom rng = new Random();\n\t\t\tInteger idx =rng.nextInt(gf.gp.getTiles().size());\n\t\t\tif(gf.gp.getTiles().get(idx).getAnimal() == null && gf.gp.getTiles().get(idx).getEntity() == null) {\n\t\t\t\tsuccess = spawn(gf.gp.getTiles().get(idx)); break;\n\t\t\t}\n\t\t}\n\t}",
"public static void combatPlayer(Player atk, EnemyObject def){\n\t\tif(atk.stat.getType() != def.stat.getType() ){\n\n\t\t\t\tint atkDamage = 0;\n\t\t\t\tatkDamage = atk.stat.toDamage();\n\t\t\t\tdef.stat.getDamage(atkDamage);\n\t\t\t\t//System.out.println(\"Attack!\");\n\t\t\t\t//System.out.println(\"Enemy get \"+ atkDamage + \" Damage\");\n\t\t\t\tif(def.stat.checkAlive()==false){\n\t\t\t\t\t//check the object die or not.\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(def.stat.getType()==1){\n\t\t\t\t\t//System.out.println(\"Enemy Die\");\n\t\t\t\t\t\t//def.remove(0);\n\t\t\t\t\t\t//enemy die.\n\t\t\t\t\t\t//give exp to the user.\n\t\t\t\t\t\tint exp = def.stat.giveExp();\n\t\t\t\t\t\t\n\t\t\t\t\t\tatk.stat.getExp(exp);\n\t\t\t\t\t\t//System.out.println(\"Player get \"+exp+ \" exp\");\n\t\t\t\t\t\t//destroy the enemy object.-> ??\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\n\t\t\t\t//System.out.println(\"\\n\\nEvent number : \" + atk.stat.getEventNum()+\" \\n\");\n /*\n\t\t\t\tSystem.out.println(\"Enemy Health: \" + def.stat.getHP());\n\t\t\t\tSystem.out.println(\"\\n\\n Player Stat: \");\n\t\t\t\tSystem.out.println(\"\\nPlayer HP: \"+atk.stat.getHP());\n\t\t\t\tSystem.out.println(\"Level: \"+atk.stat.getLv());\n\t\t\t\tSystem.out.println(\"STR: \"+atk.stat.getStr());\n\t\t\t\tSystem.out.println(\"DEX: \"+atk.stat.getDex());\n\t\t\t\tSystem.out.println(\"Wis: \"+atk.stat.getWis());\n\t\t\t\tSystem.out.println(\"Con: \"+atk.stat.getCon()+\"\\n\");\t*/\t\t\t\n\t\t}\n\t}",
"public void onPlayerCollide(Player player) {\n \tplayer.x().set(getX());\r\n \tplayer.y().set(getY());\r\n \t\r\n \t// One ladder at a time\r\n \tif (player.getInventory().findEntity(this) == null) {\r\n \t\tplayAudio(\"sounds/pickup.wav\");\r\n \t\tplayer.getInventory().addEntity(this);\r\n \tdisplayInventory();\r\n \t}\n }",
"void forceSpawn() throws SpawnException;",
"@EventHandler(priority = EventPriority.NORMAL)\n public void Playerdeath(PlayerDeathEvent e) {\n if (plugin.hardcore) {\n //if the dead entity is Player\n if (e.getEntity() instanceof Player) {\n //get the Player\n Player player = (Player) e.getEntity();\n //System.out.println(\"onDeath\");\n\n if (player.getWorld() == plugin.skyworld) {\n\n plugin.write(null, \"debug.player-death\", \"info\", true, player.getName());\n plugin.write(player, \"plugin.ondeath.starting\", \"info\", false);\n\n Island island = new Island(player.getName(), plugin);\n try {\n island.load();\n }\n catch (SQLException ex) {\n plugin.write(null, \"admin.sql.ex-load\", \"severe\", player.getName());\n }\n if (island.exists) {\n\n try {\n island.reset();\n }\n catch (Exception ex) {\n plugin.write(null, \"admin.sql.ex-reset\", \"severe\", player.getName());\n }\n\n plugin.write(player, \"plugin.ondeath.finished\", \"info\");\n }\n }\n }\n }\n }",
"void playerHit() {\n if (lives == 0) {//if no lives left\n isDead = true;\n } else {//remove a life and reset positions\n lives -=1;\n immortalityTimer = 100;\n resetPositions();\n }\n }",
"public void spawnEntity(Entity entity)\n\t{\n\t\tif(!entity.isLoadedResources() && !entity.loadResources())\n\t\t{\n\t\t\t//Don't add entity if an error occurs\n\t\t\treturn;\n\t\t}\n\t\tthis.newEntityBuffer.add(entity);\n\t\tLoggingHandler.logger.log(Level.FINE, \"Added entity to spawn queue: \" + entity);\n\t}",
"public void tick() {\n\t\tif (Math.abs(disToPlayerX()) > Math.abs(disToPlayerY())) {\r\n\t\t\tif (disToPlayerX()<0) {\r\n\t\t\t\tx -= speed;\t//moves enemy to the left\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tx += speed; //moves enemy to the right\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (disToPlayerY()<0) {\r\n\t\t\t\ty-=speed; //moves enemy up\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ty+=speed; //moves enemy down\r\n\t\t\t}\r\n\t\t}\r\n\t\tenemyRectangle.setLocation((int)x,(int) y); //updates hitbox of enemy\r\n\r\n\t\t//checks all enemies and see if they run into player\r\n\t\tfor (int i=0;i<c.getEnemys().size();i++) {\r\n\t\t\tif (enemyRectangle.getBounds().intersects(player.getRectangle().getBounds())) {\r\n\t\t\t\tkillEnemy(); //removes the enemy\r\n\t\t\t\tPlayer.health -=10; //removes 10 health\r\n\t\t\t\tbreak; //doesn't work without this BREAK. DO NOT REMOVE\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//checks all bullets if they hit an enemy\r\n\t\tfor (int i = 0;i<c.getBullets().size();i++) {\r\n\t\t\tif (enemyRectangle.getBounds().intersects(c.getBullets().get(i).getRect().getBounds())) {\r\n\t\t\t\tkillEnemy(); //removes enemy\r\n\t\t\t\tc.removeBullet(c.getBullets().get(i)); //removes the bullet\r\n\t\t\t\tPlayer.score += 50; //adds 50 to the score\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@EventHandler\n\tpublic void onPlayerDeath(final PlayerDeathEvent event) {\n\t\tif (event.getEntity().getKiller() != null) {\n\t\t\tif (event.getEntity().getKiller() instanceof Player && event.getEntity() instanceof Player && pli.global_players.containsKey(event.getEntity().getName()) && pli.global_players.containsKey(event.getEntity().getKiller().getName())) {\n\t\t\t\tevent.getDrops().clear();\n\t\t\t\tevent.getEntity().setHealth(20);\n\t\t\t\t// final Location l = event.getEntity().getLocation();\n\t\t\t\tfinal String killername = event.getEntity().getKiller().getName();\n\t\t\t\tfinal String entityKilled = event.getEntity().getName();\n\n\t\t\t\tBukkit.getScheduler().runTask(this, new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tpli.getRewardsInstance().giveKillReward(killername, 2);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tfinal Player p1 = event.getEntity().getKiller();\n\t\t\t\tfinal Player p2 = event.getEntity();\n\n\t\t\t\tIArena a = (IArena) pli.global_players.get(p1.getName());\n\t\t\t\tUtil.teleportPlayerFixed(p2, a.getSpawns().get(r.nextInt(a.getSpawns().size())));\n\n\t\t\t\tInteger gpkiller = 2;\n\t\t\t\tInteger gploser = 0;\n\t\t\t\tif (getConfig().isSet(\"player.\" + killername)) {\n\t\t\t\t\tgpkiller = getConfig().getInt(\"player.\" + killername + \".gp\") + 2; // +2 gp\n\t\t\t\t}\n\t\t\t\tif (getConfig().isSet(\"player.\" + entityKilled)) {\n\t\t\t\t\tgploser = Math.max(getConfig().getInt(\"player.\" + entityKilled + \".gp\") - 1, 0); // -1 gp\n\t\t\t\t}\n\t\t\t\tgetConfig().set(\"player.\" + killername + \".gp\", gpkiller);\n\t\t\t\tgetConfig().set(\"player.\" + entityKilled + \".gp\", gploser);\n\t\t\t\tthis.saveConfig();\n\n\t\t\t\ttry {\n\t\t\t\t\tmainsql.updateStats(p1.getName(), 2);\n\t\t\t\t\tmainsql.updateStats(p2.getName(), -1);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(\"Failed updating sql gp.\");\n\t\t\t\t}\n\n\t\t\t\tBukkit.getScheduler().runTaskLater(this, new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tp2.getInventory().clear();\n\t\t\t\t\t\tp2.getInventory().setHelmet(null);\n\t\t\t\t\t\tp2.getInventory().setChestplate(null);\n\t\t\t\t\t\tp2.getInventory().setLeggings(null);\n\t\t\t\t\t\tp2.getInventory().setBoots(null);\n\t\t\t\t\t\tp2.getInventory().setArmorContents(null);\n\t\t\t\t\t\tfor (ItemStack item : start_items) {\n\t\t\t\t\t\t\tp2.getInventory().addItem(item);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tp2.updateInventory();\n\t\t\t\t\t}\n\t\t\t\t}, 20L);\n\n\t\t\t\tp2.playSound(p2.getLocation(), Sound.CAT_MEOW, 1F, 1);\n\t\t\t\tlv.put(p2.getName(), 0);\n\n\t\t\t\tArrayList<String> keys = new ArrayList<String>();\n\t\t\t\tif (getConfig().isConfigurationSection(\"player.\" + p2.getName() + \".items\")) {\n\t\t\t\t\tgetConfig().set(\"player.\" + p2.getName() + \".items\", null);\n\t\t\t\t\tthis.saveConfig();\n\t\t\t\t}\n\n\t\t\t\tfor (PotionEffect effect : p2.getActivePotionEffects())\n\t\t\t\t\tp2.removePotionEffect(effect.getType());\n\n\t\t\t\tfor (PotionEffect effect : p1.getActivePotionEffects())\n\t\t\t\t\tp1.removePotionEffect(effect.getType());\n\n\t\t\t\tp1.playEffect(p1.getLocation(), Effect.POTION_BREAK, 5);\n\t\t\t\tInteger current = lv.get(p1.getName());\n\t\t\t\tlv.put(p1.getName(), current + 1);\n\t\t\t\tp1.sendMessage(im.upgrade.replaceAll(\"<level>\", Integer.toString(lv.get(p1.getName()))));\n\t\t\t\tLevel.updatelv(m, lv, p1);\n\n\t\t\t\tscoreboard.updateScoreboard(a);\n\n\t\t\t\tp1.setFoodLevel(20);\n\t\t\t\tp1.setHealth(20);\n\t\t\t\tp2.setHealth(20);\n\t\t\t\tp2.setFoodLevel(20);\n\n\t\t\t\tthis.addextraitems(p1);\n\t\t\t}\n\t\t} else {\n\t\t\t// death by something else -> respawn\n\n\t\t\tif (pli.global_players.containsKey(event.getEntity().getName())) {\n\t\t\t\tevent.getEntity().setHealth(20);\n\t\t\t\tif (event.getEntity() != null) {\n\t\t\t\t\tif (event.getEntity() instanceof Player) {\n\t\t\t\t\t\tevent.getDrops().clear();\n\t\t\t\t\t\tfinal Player p = (Player) event.getEntity();\n\t\t\t\t\t\tIArena a = (IArena) pli.global_players.get(p.getName());\n\t\t\t\t\t\tif (a != null && p != null) {\n\t\t\t\t\t\t\tUtil.teleportPlayerFixed(p, a.getSpawns().get(r.nextInt(a.getSpawns().size())));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tp.playSound(p.getLocation(), Sound.CAT_MEOW, 1F, 1);\n\n\t\t\t\t\t\tp.setFoodLevel(20);\n\n\t\t\t\t\t\tlv.put(p.getName(), 0);\n\n\t\t\t\t\t\tBukkit.getScheduler().runTaskLater(this, new Runnable() {\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tp.getInventory().clear();\n\t\t\t\t\t\t\t\tp.getInventory().setHelmet(null);\n\t\t\t\t\t\t\t\tp.getInventory().setChestplate(null);\n\t\t\t\t\t\t\t\tp.getInventory().setLeggings(null);\n\t\t\t\t\t\t\t\tp.getInventory().setBoots(null);\n\t\t\t\t\t\t\t\tp.getInventory().setArmorContents(null);\n\t\t\t\t\t\t\t\tfor (ItemStack item : start_items) {\n\t\t\t\t\t\t\t\t\tp.getInventory().addItem(item);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tp.updateInventory();\n\n\t\t\t\t\t\t\t\tm.addextraitems(p);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 20L);\n\n\t\t\t\t\t\tfor (PotionEffect effect : p.getActivePotionEffects())\n\t\t\t\t\t\t\tp.removePotionEffect(effect.getType());\n\n\t\t\t\t\t\tp.setHealth(20);\n\t\t\t\t\t\tp.setFoodLevel(20);\n\n\t\t\t\t\t\tthis.addextraitems(p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void chasePlayer() {\n refreshObstructionMatrix();\n Coordinate currPosition = new Coordinate(getX(), getY());\n Player player = this.dungeon.getPlayer();\n Coordinate playerPosition = new Coordinate(player.getX(), player.getY());\n\n if (currPosition.equals(playerPosition)) {\n // Debug.printC(\"Enemy has reached the player!\", Debug.RED);\n player.useItem(this);\n } else {\n this.pathToDest = pathFinder.getPathToDest(currPosition, playerPosition);\n if (!this.pathToDest.empty()) {\n Coordinate nextPosition = this.pathToDest.pop();\n // this.setCoordinate(nextPosition);\n if (getX() + 1 == nextPosition.x) {\n moveRight();\n } else if (getX() - 1 == nextPosition.x) {\n moveLeft();\n } else if (getY() + 1 == nextPosition.y) {\n moveDown();\n } else if (getY() - 1 == nextPosition.y) {\n moveUp();\n }\n }\n }\n }",
"public final void respawn() {\r\n World.submit(new Pulse(getRespawnRate()) {\r\n\r\n @Override\r\n public boolean pulse() {\r\n GroundItemManager.create(GroundSpawn.this);\r\n return true;\r\n }\r\n });\r\n }",
"public static void teleportAway(ClientContext ctx) {\n Item sceptre = ctx.inventory.select().id(Items.SKULL_SCEPTRE_I_21276).poll();\n\n if (sceptre.valid()) {\n sceptre.interact(\"Invoke\", sceptre.name());\n sleep(3000);\n } else {\n // Teletab\n Item tab = ctx.inventory.select().select(new Filter<Item>() {\n @Override\n public boolean accept(Item item) {\n return item.name().toLowerCase().contains(\"teleport\");\n }\n }).poll();\n\n if (tab.valid()) {\n tab.click();\n } else {\n // Glory Teleport\n ctx.game.tab(Game.Tab.EQUIPMENT);\n Item ammy = ctx.equipment.itemAt(Equipment.Slot.NECK);\n if (ammy.name().toLowerCase().contains(\"glory\")) {\n ammy.interact(\"Edgeville\");\n sleep(4000);\n }\n }\n }\n }",
"Entity getShooter();",
"@EventHandler\n void OnEntityDeath(EntityDeathEvent e){\n Entity killer = e.getEntity().getKiller();\n int exp = e.getDroppedExp();\n if(killer instanceof Player){\n GuildMCFunctions functions = new GuildMCFunctions();\n functions.spawnExperiencesInfos((Player) killer, exp);\n }\n\n }",
"abstract protected void removeEntity(Entity entity);",
"public void onKillEntity(EntityLivingBase entityLivingIn)\n {\n super.onKillEntity(entityLivingIn);\n }",
"@Override\n protected void sendSpawnPackets(AttachmentViewer viewer, Vector motion) {\n if (isLivingEntity()) {\n // Spawn living entity\n PacketPlayOutSpawnEntityLivingHandle spawnPacket = PacketPlayOutSpawnEntityLivingHandle.createNew();\n spawnPacket.setEntityId(this.entityId);\n spawnPacket.setEntityUUID(this.entityUUID);\n spawnPacket.setEntityType(this.entityType);\n spawnPacket.setPosX(this.syncAbsPos.getX() - motion.getX());\n spawnPacket.setPosY(this.syncAbsPos.getY() - motion.getY());\n spawnPacket.setPosZ(this.syncAbsPos.getZ() - motion.getZ());\n spawnPacket.setMotX(motion.getX());\n spawnPacket.setMotY(motion.getY());\n spawnPacket.setMotZ(motion.getZ());\n spawnPacket.setYaw(this.syncYaw);\n spawnPacket.setPitch(this.syncPitch);\n spawnPacket.setHeadYaw((this.syncMode == SyncMode.ITEM) ? 0.0f : this.syncYaw);\n viewer.sendEntityLivingSpawnPacket(spawnPacket, getUsedMeta());\n } else {\n // Spawn entity (generic)\n PacketPlayOutSpawnEntityHandle spawnPacket = PacketPlayOutSpawnEntityHandle.T.newHandleNull();\n spawnPacket.setEntityId(this.entityId);\n spawnPacket.setEntityUUID(this.entityUUID);\n spawnPacket.setEntityType(this.entityType);\n spawnPacket.setPosX(this.syncAbsPos.getX() - motion.getX());\n spawnPacket.setPosY(this.syncAbsPos.getY() - motion.getY());\n spawnPacket.setPosZ(this.syncAbsPos.getZ() - motion.getZ());\n spawnPacket.setMotX(motion.getX());\n spawnPacket.setMotY(motion.getY());\n spawnPacket.setMotZ(motion.getZ());\n spawnPacket.setYaw(this.syncYaw);\n spawnPacket.setPitch(this.syncPitch);\n viewer.send(spawnPacket);\n\n PacketPlayOutEntityMetadataHandle metaPacket = PacketPlayOutEntityMetadataHandle.createNew(this.entityId, getUsedMeta(), true);\n viewer.send(metaPacket.toCommonPacket());\n }\n\n if (this.syncMode == SyncMode.SEAT) {\n PacketPlayOutRelEntityMoveLookHandle movePacket = PacketPlayOutRelEntityMoveLookHandle.createNew(\n this.entityId,\n motion.getX(), motion.getY(), motion.getZ(),\n this.syncYaw,\n this.syncPitch,\n false);\n viewer.send(movePacket);\n } else if (motion.lengthSquared() > 0.001) {\n CommonPacket movePacket = PacketType.OUT_ENTITY_MOVE.newInstance(this.entityId, motion.getX(), motion.getY(), motion.getZ(), false);\n viewer.send(movePacket);\n }\n\n // Resend velocity if one is set\n if (this.syncVel > 0.0) {\n viewer.send(PacketPlayOutEntityVelocityHandle.createNew(this.entityId, this.syncVel, 0.0, 0.0));\n }\n }",
"public void entityDeactivating() {}",
"@Override\r\n\tpublic void Death(Player arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void Death(Player arg0) {\n\t\t\r\n\t}",
"public void b(EntityPlayer paramahd) {}",
"public void respawn(Vector2 spawnPos){\n position.x = spawnPos.x;\n position.y = spawnPos.y;\n }",
"@Override\n\tpublic void onUpdate() {\n\t\tif (this.isEntityAlive()) {\n\t\t\tthis.lastActiveTime = this.timeSinceIgnited;\n\t\t\tint i = this.getCreeperState();\n\t\t\tif (i > 0 && this.timeSinceIgnited == 0) {\n\t\t\t\tthis.playSound(\"random.fuse\", 1.0F, 0.5F);\n\t\t\t}\n\t\t\tthis.timeSinceIgnited += i;\n\t\t\tif (this.timeSinceIgnited < 0) {\n\t\t\t\tthis.timeSinceIgnited = 0;\n\t\t\t}\n\t\t\tif (this.timeSinceIgnited >= this.fuseTime) {\n\t\t\t\tthis.timeSinceIgnited = this.fuseTime;\n\t\t\t\tif (!this.worldObj.isRemote) {\n\t\t\t\t\tthis.worldObj.spawnParticle(\"portal\", this.posX, this.posY,\n\t\t\t\t\t\t\tthis.posZ, 4D, 4D, 4D);\n\t\t\t\t\tthis.worldObj.playSoundEffect(this.posX, this.posY,\n\t\t\t\t\t\t\tthis.posZ, \"mob.endermen.portal\", 2.0F,\n\t\t\t\t\t\t\tthis.worldObj.rand.nextFloat() * 0.1F + 0.9F);\n\t\t\t\t\tList players = worldObj.getEntitiesWithinAABB(\n\t\t\t\t\t\t\tEntityPlayer.class, this.boundingBox.expand(\n\t\t\t\t\t\t\t\t\t3 + Math.floor(this.ticksExisted / 50), 2,\n\t\t\t\t\t\t\t\t\t3 + Math.floor(this.ticksExisted / 50)));\n\t\t\t\t\tObject[] playerArray = players.toArray();\n\t\t\t\t\tfor (Object o : playerArray) {\n\t\t\t\t\t\tEntityPlayer e = (EntityPlayer) o;\n\t\t\t\t\t\tint entityId = e.getEntityId();\n\t\t\t\t\t\tif (!this.worldObj.isRemote) {\n\t\t\t\t\t\t\tint dimensionId = e.dimension == 0 ? 1 : 0;\n\t\t\t\t\t\t\tPacketDispatcher.getSimpleNetworkWrapper()\n\t\t\t\t\t\t\t.sendToServer(\n\t\t\t\t\t\t\t\t\tnew MessageTeleportToDimension(\n\t\t\t\t\t\t\t\t\t\t\t\t\tdimensionId, entityId));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.setDead();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsuper.onUpdate();\n\t}",
"private boolean spawn(int x, int y) {\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic void onEntityHit(LivingEntity ent) {\n\t\tParUtils.createParticle(Particles.EXPLOSION, loc, 0, 0, 0, 1, 0);\r\n\t\tplaySound(Sound.ENTITY_DRAGON_FIREBALL_EXPLODE,loc,1,1);\r\n\t\tent.setVelocity(dir.multiply(speed));\r\n\t\tdamage(ent, 2, caster);\r\n\t}",
"public MobDeathEvent(Entity entity, EntityPlayer player) {\n\t\tthis.entity = entity;\n\t\tthis.position = entity.getPosition();\n\t\tthis.mobType = getMobType(entity);\n\t\tthis.thePlayer = player;\n\t\tSystem.out.println(\"MobDeathEvent\");\n\t}",
"@Override\n public void removePlayer(Player player){\n this.steadyPlayers.remove(player);\n }",
"@Override\n public void onTouch(Entity entity) {\n if (entity.getClass() == Player.class) {\n Player player = (Player) entity;\n if (player.invincibleTime().get() == 0) {\n DungeonSound.playPotionPickup();\n player.setInvincible();\n this.destroy();\n }\n }\n }",
"void delete(Object entity);",
"@Override\n\tpublic void execute() {\n\t\tif (!Variables.decreaseTask) {\n\t\t\tVariables.decreaseTask = true;\n\t\t} else {\n\t\t\tVariables.taskAmount--;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Killing npcs\");\n\t\t\n\t\tif (Variables.status != \"Completing task...\") {\n\t\tVariables.status = \"Completing task...\";\n\t\t}\n\t\t\n\t\tNpc[] slayerMonster = Npcs.getNearest(slayerMonsterFilter);\n\n\t\ttry {\n\t\tslayerMonster[0].interact(1);\n\t\t} catch (ArrayIndexOutOfBoundsException | NullPointerException e) {\n\t\t\t\n\t\t} \n\t\t\n\t\tTime.sleep(new SleepCondition() {\n\t\t\t@Override\n\t\t\tpublic boolean isValid() {\n\t\t\t\treturn Players.getMyPlayer().isInCombat();\n\t\t\t}\n\t\t}, 5000);\n\t\t\n\t\tTime.sleep(new SleepCondition() {\n\t\t\t@Override\n\t\t\tpublic boolean isValid() {\n\t\t\t\treturn !Players.getMyPlayer().isInCombat();\n\t\t\t}\n\t\t}, 5000);\n\t}",
"private Object generateEntitySpawnPacket_Old(Object nmsEntity) {\n Object trackerEntry = ReflectUtils.newInstance(\"EntityTrackerEntry\", new Class[] {ReflectUtils.getMcClass(\"Entity\"), int.class, int.class, int.class, boolean.class},\n new Object[]{nmsEntity, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, true});\n\n Object packet = ReflectUtils.runMethod(trackerEntry, \"e\");\n return packet;\n }",
"@Listener\n public void onDeath(DestructEntityEvent.Death event) {\n if (!(event.getTargetEntity() instanceof Player))\n return;\n\n Optional<EntityDamageSource> source = event.getCause().first(EntityDamageSource.class);\n if (!source.isPresent())\n return; // did not die from pvp\n\n Player killed = (Player) event.getTargetEntity();\n\n Player killer = null;\n ItemStack weapon = null;\n Entity damager = source.get().getSource();\n if (damager instanceof Player) {\n killer = (Player) damager;\n weapon = killer.getItemInHand(HandTypes.MAIN_HAND).get();\n }\n\n if (damager instanceof Projectile) {\n Projectile proj = (Projectile) damager;\n if (proj.getShooter() instanceof Player) {\n killer = (Player) proj.getShooter();\n weapon = killer.getItemInHand(HandTypes.MAIN_HAND).get();\n }\n }\n\n if (damager.get(TameableData.class).isPresent()) {\n Optional<UUID> opOwnerUUID = damager.get(TameableData.class).get().owner().get();\n if (opOwnerUUID.isPresent()) {\n UUID uuid = opOwnerUUID.get();\n if (plugin.getServer().getOfflinePlayer(uuid).map(OfflinePlayer::isOnline).orElse(false)) {\n killer = ((SpongePlayer) plugin.getServer().getPlayer(uuid).get()).getHandle();\n // Use a bone to show the case was a wolf\n weapon = ItemStack.builder().itemType(ItemTypes.BONE).quantity(1).build();\n }\n }\n }\n\n if (killer == null)\n return;\n\n // Check the killers world just incase for some reason the\n // killed player was teleported to another world\n if (plugin.getConfigManager().getPvPConfig().getNode(\"ignoredWorlds\").getCollectionValue(String.class).contains(killer.getWorld().getName()))\n return;\n\n TrackerUtil.updatePvPStats(plugin.getServer().getOfflinePlayer(killed.getUniqueId().toString()).get(),\n plugin.getServer().getOfflinePlayer(killer.getUniqueId().toString()).get());\n\n TrackerInterface pvpTracker = plugin.getTrackerManager().getPvPInterface();\n if (pvpTracker.getDeathMessageManager().isDefaultMessagesOverriden())\n event.setMessageCancelled(true);\n\n pvpTracker.getDeathMessageManager().sendItemMessage(killer.getName(), killed.getName(), weapon.getType().getName().toLowerCase());\n pvpTracker.getRecapManager().getDeathRecaps().get(killed.getName()).setVisible(true);\n }",
"public void killPlayer(){\n setInPlay(false);\n setDx(0.0f);\n setDy(0.04f);\n }",
"public void die() {\r\n final Entity e = entity;\r\n final EnchantArrow arrow = this;\r\n Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(Storage.zenchantments, () -> {\r\n if (Storage.advancedProjectiles.containsKey(e)) {\r\n if (Storage.advancedProjectiles.get(e).size() == 1) {\r\n Storage.advancedProjectiles.remove(e);\r\n } else {\r\n Storage.advancedProjectiles.get(e).remove(arrow);\r\n }\r\n }\r\n }, 1);\r\n }",
"void delete(E entity);",
"void delete(E entity);",
"public void onPlayerDestroy(World worldIn, BlockPos pos, IBlockState state)\n {\n this.func_180692_a(worldIn, pos, state, (EntityLivingBase)null);\n }",
"public void giveUp() {\n if (!finished)\n player.kill();\n }",
"void killPlayerByMonsterMove()\n {\n moveMonsterToCell(getPlayerCell());\n }",
"@SuppressWarnings(\"deprecation\")\r\n public static void startDeath(Entity entity, Entity killer) {\r\n if (!isDead(entity)) {\r\n entity.getPulseManager().clear();\r\n if (killer == null) {\r\n killer = entity;\r\n }\r\n if (entity instanceof Player) {\r\n Player player = (Player) entity;\r\n NodeTask deathTask = player.getZoneMonitor().deathTaskOverride(killer);\r\n if (deathTask == null) {\r\n deathTask = SINGLETON;\r\n }\r\n Pulse pulse = deathTask.schedule(entity, killer);\r\n pulse.start();\r\n entity.getPulseManager().set(pulse);\r\n } else {\r\n Pulse pulse = SINGLETON.schedule(entity, killer);\r\n pulse.start();\r\n entity.getPulseManager().set(pulse);\r\n }\r\n }\r\n }",
"@Override\r\n public void uncall() {\r\n Player player = MbPets.getInstance().getServer().getPlayer(getOwner());\r\n if (player != null) {\r\n if (getEntity().getInventory().getDecor() != null) {\r\n if (player.getInventory().firstEmpty() >= 0) {\r\n player.getInventory().addItem(getEntity().getInventory().getDecor());\r\n } else {\r\n player.getWorld().dropItemNaturally(player.getLocation(),\r\n getEntity().getInventory().getDecor());\r\n }\r\n }\r\n }\r\n super.uncall();\r\n }",
"@Override\n\tpublic void deletePlayer(Joueur joueur) {\n\t\t\n\t}",
"private void createPlayer() {\n Entity entity = engine.createEntity();\n B2dBodyComponent b2dbody = engine.createComponent(B2dBodyComponent.class);\n TransformComponent position = engine.createComponent(TransformComponent.class);\n TextureComponent texture = engine.createComponent(TextureComponent.class);\n PlayerComponent player = engine.createComponent(PlayerComponent.class);\n CollisionComponent colComp = engine.createComponent(CollisionComponent.class);\n TypeComponent type = engine.createComponent(TypeComponent.class);\n StateComponent stateCom = engine.createComponent(StateComponent.class);\n\n // create the data for the components and add them to the components\n b2dbody.body = bodyFactory.makeCirclePolyBody(10,10,1, BodyFactory.STONE, BodyType.DynamicBody,true);\n // set object position (x,y,z) z used to define draw order 0 first drawn\n position.position.set(10,10,0);\n texture.region = atlas.findRegion(\"player\");\n type.type = TypeComponent.PLAYER;\n stateCom.set(StateComponent.STATE_NORMAL);\n b2dbody.body.setUserData(entity);\n\n // add the components to the entity\n entity.add(b2dbody);\n entity.add(position);\n entity.add(texture);\n entity.add(player);\n entity.add(colComp);\n entity.add(type);\n entity.add(stateCom);\n\n // add the entity to the engine\n engine.addEntity(entity);\n }",
"private void attackPlayer()\n\t{\n\t\tif(shootTimer.done())\n\t\t{\n\t\t\tProjectile spiderWeb = new SpiderWeb(x, y);\n\t\t\tGame.objectWaitingRoom.add(spiderWeb);\n\t\t\tspiderWeb.shoot();\n\t\t\tshootTimer.setTime(200);\n\t\t}\n\t}",
"public void act() \n {\n World w = getWorld();\n int height = w.getHeight();\n \n setLocation(getX(),getY()+1);\n if (getY() <=0 || getY() >= height || getX() <= 0) // off the world\n {\n w.removeObject(this);\n return;\n }\n \n \n SaboWorld thisWorld = (SaboWorld) getWorld();\n Turret turret = thisWorld.getTurret();\n Actor turretActor = getOneIntersectingObject(Turret.class);\n Actor bullet = getOneIntersectingObject(Projectile.class);\n \n if (turretActor!=null && bullet==null) // hit the turret!\n {\n \n turret.bombed(); //Turret loses health\n explode();\n w.removeObject(this);\n } else if (turret==null && bullet!=null) //hit by a bullet!\n {\n explode();\n w.removeObject(this);\n }\n \n }",
"public boolean itemInteractionForEntity(ItemStack itemstack, EntityPlayer player, EntityLivingBase entity) {\n/* 91 */ if (entity.worldObj.isRemote)\n/* */ {\n/* 93 */ return false;\n/* */ }\n/* 95 */ if (entity instanceof EntityPlayer)\n/* */ {\n/* 97 */ giveTargetStand((EntityPlayer)entity, itemstack);\n/* */ }\n/* 99 */ return false;\n/* */ }",
"private void remove() {\n disableButtons();\n clientgui.getClient().sendDeleteEntity(cen);\n cen = Entity.NONE;\n }",
"public void attack(int idx)\n {\n CreatureWorld playerWorld = ;\n \n }",
"public void act() \n {\n move(-2);\n\n if(getX() <= 0)\n {\n getWorld().removeObject(this);\n } \n\n }"
] |
[
"0.7968404",
"0.7255613",
"0.6778221",
"0.6608599",
"0.64964724",
"0.6386171",
"0.63132924",
"0.62546104",
"0.625033",
"0.621213",
"0.6179366",
"0.6169414",
"0.6161136",
"0.60896844",
"0.6081819",
"0.606805",
"0.6016935",
"0.6010349",
"0.59389144",
"0.59095407",
"0.58876896",
"0.58435094",
"0.5842719",
"0.582716",
"0.58158344",
"0.5809205",
"0.5784315",
"0.5749505",
"0.5727469",
"0.56882167",
"0.5678957",
"0.5673384",
"0.56694525",
"0.5669331",
"0.56502676",
"0.5646437",
"0.5637384",
"0.5637169",
"0.5635561",
"0.5627776",
"0.56264687",
"0.56264657",
"0.5624398",
"0.5624239",
"0.5611804",
"0.56104636",
"0.56052786",
"0.56017756",
"0.55960107",
"0.55954427",
"0.5588385",
"0.5566832",
"0.5556172",
"0.55560935",
"0.55556154",
"0.5551017",
"0.55506843",
"0.5543451",
"0.5541008",
"0.55409735",
"0.55243224",
"0.55234706",
"0.5523367",
"0.5509699",
"0.5509397",
"0.5508069",
"0.5507187",
"0.5505205",
"0.5504222",
"0.55021256",
"0.55021256",
"0.5496379",
"0.5488062",
"0.5486836",
"0.54861474",
"0.54776746",
"0.5474519",
"0.5469854",
"0.5465542",
"0.5457311",
"0.5456041",
"0.5452648",
"0.54498017",
"0.54485214",
"0.5438256",
"0.54350704",
"0.54350704",
"0.5434363",
"0.54306483",
"0.5424256",
"0.5419439",
"0.5416534",
"0.54122335",
"0.54092604",
"0.5396722",
"0.53943163",
"0.53834116",
"0.5381208",
"0.53786105",
"0.5377891"
] |
0.76698625
|
1
|
Sets the status of a chest (opened/closed) for a player
|
public static void setChestStatus(Player p, Location loc, boolean open){
BlockPosition pos = new BlockPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
PacketPlayOutBlockAction packet = new PacketPlayOutBlockAction(pos, Blocks.CHEST, 1, open ? 1 : 0);
((CraftPlayer) p).getHandle().playerConnection.sendPacket(packet);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void updatePlayerClaim(){\n if(chestProgressLevel!=1){\n return; //the chest isnt unlocked!\n }\n\n //count the total players, and the players who unlocked it.\n int totalPlayers = 0;\n int unlockedPlayers = 0;\n for(JuggernautPlayer player: JuggernautGame.getInstance().getPlayers()){\n if(!player.isSurvivor() || !player.isAlive()){\n continue; //they be dead, they dont count! (Juggy also doesnt count, he doesnt get to unlock items)\n }\n totalPlayers++; //+1 total players\n if(player.isSurvivor() && player.getChestBonus(chestID)>=level){\n unlockedPlayers++; //they unlocked it, +1 unlocked players\n }\n }\n\n //all players unlocked it\n if(totalPlayers<=unlockedPlayers && chestProgressLevel==1){\n //lock the chest before respawning.\n lockChest();\n new BukkitRunnable() {\n\n int timeTillRespawn = 3; //3 seconds to respawn a chest\n @Override\n public void run() {\n //runs every second\n for(JuggernautPlayer jp : JuggernautGame.getInstance().getAllPeople()){\n //check if the player is in the radius of the chest (ignore Y)\n if(SkyMathHelper.isInRadius(location, jp.getPlayer().getLocation(), nametagRadius, false)) {\n //show them the hologram. Update if they already have the hologram active.\n //If this chest will not respawn, we tell them \"Good Luck!\" instead of the respawning message.\n if (jp.getLoadedEntities().containsKey(armorstandResetChestID)) {\n if(level==getMaxLevel()){\n jp.updateHologram(armorstandResetChestID, \"\\u00A76Good Luck!\");\n }else {\n jp.updateHologram(armorstandResetChestID, \"\\u00A76Respawning in \" + timeTillRespawn);\n }\n } else {\n if(level==getMaxLevel()) {\n jp.displayHologram(location.getX(), location.getY() + armorstandProgressbarHeight, location.getZ(), \"\\u00A76Good Luck!\", armorstandResetChestID);\n }else{\n jp.displayHologram(location.getX(), location.getY() + armorstandProgressbarHeight, location.getZ(), \"\\u00A76Respawning in \" + timeTillRespawn, armorstandResetChestID);\n }\n }\n }else{\n //they arent in range, so we remove this entity for them\n jp.removeEntities(armorstandResetChestID);\n }\n }\n\n //check if its time to respawn.\n if(timeTillRespawn--<=0){\n //its time! respawn the chest!\n respawnChest();\n for(JuggernautPlayer jp: JuggernautGame.getInstance().getPlayers()){\n //remove the countdown armorstand for all players\n jp.removeEntities(armorstandResetChestID);\n }\n this.cancel(); //cancel this runnable, we no longer need it.\n return;\n }\n }\n }.runTaskTimer(Juggernaut.pluginInstance, 0L, 20L); //every 20 ticks (1s)\n }else{\n //not all players unlocked the item yet. Lets indicate how many did.\n String emptyDisplayText = unlockedPlayers + \"/\" + totalPlayers + \" Claimed\";\n for(JuggernautPlayer JP: JuggernautGame.getInstance().getPlayers()){\n if(!SkyMathHelper.isInRadius(location, JP.getPlayer().getLocation(), nametagRadius, false)){\n //they arent in the radius, so we remove their armorstand again (if they had it).\n if(JP.getLoadedEntities().containsKey(this.armorstandClaimProgressID)) {\n JP.removeEntities(armorstandClaimProgressID);\n }\n continue;\n }\n\n //generate the color of the display text we need to show them. green if they claimed it, otherwise red.\n String displayText;\n if(JP.getChestBonus(chestID)>=level){\n displayText = \"\\u00A72\" + emptyDisplayText;\n }else{\n displayText = \"\\u00A7c\" + emptyDisplayText;\n }\n\n //update, or show the hologram to them.\n if(JP.getLoadedEntities().containsKey(this.armorstandClaimProgressID)){\n JP.updateHologram(armorstandClaimProgressID, displayText);\n }else{\n JP.displayHologram(this.location.getX(), this.location.getY()+this.armorstandClaimProgressHeight, this.location.getZ(), displayText, armorstandClaimProgressID);\n }\n }\n }\n }",
"public void setState(Player player) {\n\t\tstate = player;\n\t\tstateChanged();\n\t}",
"private void respawnChest(){\n //remove the physical chest\n this.location.getBlock().setType(Material.AIR);\n\n //increment the level of the chest. If its higher than its max level, shut down.\n if(++this.level >= getMaxLevel()){\n deleteInstance();\n return;\n }\n\n //play a sound effect for all players (INCLUDING juggernaut) to indicate a chest respawned.\n for(JuggernautPlayer jp: JuggernautGame.getInstance().getPlayers()){\n PacketHelper.playSound(jp.getPlayer(), location, Sound.DIG_WOOD, 1f, 1f);\n }\n\n //set the seconds to unlock depending on the level of the chest\n this.secondsToUnlock = this.level==0 ? 15 : this.level==1 ? 30 : 60;\n\n //reset all old values\n this.claimProgress.clear();\n this.unlockedPercentage = 0;\n this.chestProgressLevel = 0;\n\n //get a new location to spawn the new chest in.\n this.location = JuggernautGame.getInstance().getRandomChestLocation().use();\n\n //log\n System.out.println(\"[Jugg] Respawned chest \" + this.getClass().getSimpleName() + \" Level \" + this.level + \" at \" + location.getBlockX() + \",\" + location.getBlockY() + \",\" + location.getBlockZ());\n\n //set the new location to a chest block\n this.location.getBlock().setType(Material.CHEST);\n }",
"public void setTileStatus(int r, int c, int val) {\n\t\tgameBoard.setTileStatus(r, c, val);\n\t}",
"private void setHealth(Player p, int health)\n {\n int current = p.getHealth();\n \n // If the health is 20, just leave it at that no matter what.\n int regain = health == 20 ? 20 : health - current;\n \n // Set the health, and fire off the event.\n p.setHealth(health);\n EntityRegainHealthEvent event = new EntityRegainHealthEvent(p, regain, RegainReason.CUSTOM);\n Bukkit.getPluginManager().callEvent(event);\n }",
"public synchronized void setMyGameStatus(boolean status)\n {\n \tgameStatus=status;\n }",
"public void setObjectiveScore(String name, Player player, int value) {\n scoreboard.getObjective(name).getScore(player.getName()).setScore(value);\n }",
"public void setStatus(Player owner, int numberHouses){\n this.owner = owner;\n this.numberHouses = numberHouses;\n }",
"public void SetHealth(int h)\n{\n\thealth=h;\n}",
"private void wins(Player player){\n int win = 1;\n player.setWins(win);\n }",
"@Test\n\tpublic void testSetHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(10);\n\t\tassertTrue(npc.getBaseHealth() == 10);\n\t\tnpc.setHealth(35);\n\t\tassertFalse(npc.getBaseHealth() == 10);\n\t\tassertTrue(npc.getBaseHealth() == 35);\n\t}",
"public void setOpenChest(boolean openChest) {\n this.openChest = openChest;\n }",
"public void changeTurnOfPlayer(PlayerState player)\n {\n if(player.getColorOfPlayer() == Color.BLACK)\n {\n this.turnOfPlayer = playerWhite;\n }\n else\n {\n this.turnOfPlayer = playerBlack;\n }\n }",
"public void setStatus(int v) \n {\n \n if (this.status != v)\n {\n this.status = v;\n setModified(true);\n }\n \n \n }",
"@Override\r\n\tpublic void setHealth(int strike) {\n\t\t\r\n\t}",
"public void statusChanged(GameStatusEvent e) {\n gameRunning = false;\n if(e.isGameOver()) {\n gameWon = false;\n hauptfenster.getSounds().playGameOver(); // abspielen der Sounds\n } else if(e.isGameWon()) {\n gameWon = true;\n hauptfenster.getSounds().playGameWon(); // abspielen der Sounds\n }\n hauptfenster.getSpielfeld().drawNew(); // Spielfeld neu zeichnen\n hauptfenster.getToolbar().updateToolbar(hauptfenster.getDionaRapModel().getShootAmount(), hauptfenster.getDionaRapModel().getScore(), hauptfenster.getProgress());\n hauptfenster.getSpielfeld().gameStatusEnd(hauptfenster.getPlayer(), gameWon); // das Icon bei gewonnen oder verloren setzen\n hauptfenster.getToolbar().setEnabled(); // den \"Neues Spiel\"-Button auf aktiv setzen\n hauptfenster.getMenubar().setGameSettingsEnabled(); // den \"Spieleinstellungen\"-Button auf aktiv setzen\n\n int end_position = HighScoreFile.SCORE_TO_LOW_FOR_HIGHSCORE;\n try{\n end_position = HighScoreFile.getInstance().getScorePosition(hauptfenster.getDionaRapModel().getScore()); // auslesen der Position\n } catch (IOException ex) {\n System.err.println(\"File kann nicht gelesen werden: \" + ex);\n }\n if(end_position != HighScoreFile.SCORE_TO_LOW_FOR_HIGHSCORE && gameWon) {\n addBestlist(); // Bestenliste Dialog zeichnen\n }\n addDialog(gameWon); // den Dialog zeichnen\n }",
"public void setChest(double chest) {\n this.chest = chest;\n }",
"public void setHealth(int h) {\n setStat(h, health);\n }",
"public void setStatus(int value) {\n this.status = value;\n }",
"public void setStatus(int value) {\n this.status = value;\n }",
"public void setSidePlayerOpening(final boolean status) {\n this.sidePlayer = status;\n }",
"public void setOwnerStatus(String ownerStatus)\n {\n // put your code here\n this.ownerStatus = ownerStatus;\n }",
"public void setOpenedChestId(int id) {\n this.openedChestId=id;\n }",
"public void setSeatStatus(int row, int col, boolean status) {\n seatPlan[row][col].setStatus(status);\n }",
"public void setPlayer(int row, int col, int value) {\n\t\tplayer[row][col] = value;\n\t}",
"public abstract void setHealth(int health);",
"protected void apply() {\r\n\t\tplayer.setAutoRoll(autoroll);\r\n\t\tplayer.setMission(mission);\r\n\t\tplayer.setState(state);\r\n\t\tplayer.getCards().setArtillery(cards.getArtillery());\r\n\t\tplayer.getCards().setCavalry(cards.getCavalry());\r\n\t\tplayer.getCards().setInfantry(cards.getInfantry());\r\n\t\tplayer.getCards().setJokers(cards.getJokers());\r\n\t\tMember member = player.getMember();\r\n\t\tif(score == Score.WIN) {\r\n\t\t\tmember.setScore(member.getScore() + player.getGame().getPlayers().size() - 1);\r\n\t\t\tmember.setWins(member.getWins() + 1);\r\n\t\t} else if(score == Score.LOSS) {\r\n\t\t\tmember.setScore(member.getScore() - 1);\r\n\t\t\tmember.setLosses(member.getLosses() + 1);\r\n\t\t}\r\n\t}",
"public void setStatus(String stat)\n {\n status = stat;\n }",
"public void setScoreboard(final Player player) {\n ConfigurationSection scoreboardSettings = ConfigurationManager.getInstance().getMainConfiguration().getConfigurationSection(Strings.CONFIG_SCOREBOARD_SECTION);\n\n ScoreboardManager scoreboardManager = CustomGUIShop.getInstance().getServer().getScoreboardManager();\n final Scoreboard scoreboard = scoreboardManager.getNewScoreboard();\n addPlayerToGroup(scoreboard, player);\n final Objective objective = scoreboard.registerNewObjective(\"sb\", \"dummy\");\n objective.setDisplaySlot(DisplaySlot.SIDEBAR);\n\n final Objective objective2 = scoreboard.registerNewObjective(\"sb2\", \"dummy\");\n objective2.setDisplaySlot(DisplaySlot.PLAYER_LIST);\n\n // SERVER\n objective.getScore(ChatColor.translateAlternateColorCodes('&', scoreboardSettings.getString(Strings.CONFIG_SCOREBOARD_REPUTATION_TITLE))).setScore(15);\n final Team reputation = scoreboard.registerNewTeam(\"reputation\");\n reputation.addPlayer(Bukkit.getOfflinePlayer(\" \"));\n objective.getScore(\" \").setScore(14);\n objective.getScore(\" \").setScore(13);\n\n // COINS\n objective.getScore(ChatColor.translateAlternateColorCodes('&', scoreboardSettings.getString(Strings.CONFIG_SCOREBOARD_LEVEL_TITLE))).setScore(12);\n final Team level = scoreboard.registerNewTeam(\"level\");\n level.addPlayer(Bukkit.getOfflinePlayer(\" \"));\n objective.getScore(\" \").setScore(11);\n objective.getScore(\" \").setScore(10);\n\n // PIXELITES\n objective.getScore(ChatColor.translateAlternateColorCodes('&', scoreboardSettings.getString(Strings.CONFIG_SCOREBOARD_NEXTLEVEL_TITLE))).setScore(9);\n final Team nextLevel = scoreboard.registerNewTeam(\"nextLevel\");\n nextLevel.addPlayer(Bukkit.getOfflinePlayer(\" \"));\n objective.getScore(\" \").setScore(8);\n objective.getScore(\" \").setScore(7);\n\n // RANK\n objective.getScore(ChatColor.translateAlternateColorCodes('&', scoreboardSettings.getString(Strings.CONFIG_SCOREBOARD_BALANCE_TITLE))).setScore(6);\n final Team balance = scoreboard.registerNewTeam(\"balance\");\n balance.addPlayer(Bukkit.getOfflinePlayer(\" \"));\n objective.getScore(\" \").setScore(5);\n objective.getScore(\" \").setScore(4);\n\n final String title = ChatColor.translateAlternateColorCodes('&', scoreboardSettings.getString(Strings.CONFIG_SCOREBOARD_DISPLAY_NAME));\n\n new BukkitRunnable() {\n public void run() {\n try {\n objective.setDisplayName(title);\n reputation.setPrefix(String.valueOf(ReputationManager.getReputation(player)));\n level.setPrefix(String.valueOf(ReputationManager.getReputationLevel(player)));\n nextLevel.setPrefix(String.valueOf(ReputationManager.getReputation(player)) + \"/\" + String.valueOf(ReputationManager.getReputation(player) + ReputationManager.getNextLevel(player)));\n balance.setPrefix(String.valueOf(CustomGUIShop.getInstance().getEconomy().getBalance(player)));\n objective2.getScore(player).setScore(ReputationManager.getReputationLevel(player));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }.runTaskTimer(CustomGUIShop.getInstance(), 0, 5);\n player.setScoreboard(scoreboard);\n }",
"public void setNewScore(String player, int score) {\n\t\t\n\t}",
"public void setStatus(PlayerControllerStatus status) {\r\n\t\tthis.status = status;\r\n\t}",
"public void setStatus(int row, int column, int status) {\n\t\tthis.grid[row][column].setStatus(status);\n\t}",
"public void changePlayer(int disc){\n if (AvailableMoves(disc)==0){\n lastDiscPlayed = disc;\n\n if(disc==B){\n System.out.println(\"B player has no availabe moves!\");\n }else {\n System.out.println(\"W player has no other moves!\");\n }\n }\n }",
"public void setStatus(StatusOfCause status) {\n\t\tthis.statusValue = status.value;\n\t}",
"public void setHealth(double h){\n health = h;\n }",
"void setCurrentHP(final int newHP);",
"void setTileColor(int a_player)\n {\n if (a_player == 0)\n {\n this.tileColor = \"BLACK\";\n }\n else if (a_player == 1)\n {\n this.tileColor = \"RED\";\n }\n else\n {\n this.tileColor = null;\n }\n }",
"@Test\n\tpublic void testChangeHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(23);\n\t\tint tempHealth = npc.getHealth();\n\t\tnpc.changeHealth(10);\n\t\tassertTrue(npc.getHealth() == tempHealth + 10);\n\t\tnpc.changeHealth(100);\n\t\tassertTrue(npc.getHealth() == npc.getMaxHealth());\n\t\tnpc.changeHealth(-999);\n\t\tassertTrue(npc.isDead());\n\t}",
"private void setPlayer(BoardSquaresState player){\n\t\tif(player == BoardSquaresState.CROSS){\n\t\t\tselectedPlayer = BoardSquaresState.CROSS;\n\t\t\tplayerSelectionButton.setText(R.id.button_title, \"Cross\");\n\t\t\tplayerSelectionButton.setText(R.id.button_subtitle, \"You go first!\");\n\t\t\tplayerSelectionButton.setImageResource(R.id.selector_button_image, R.drawable.cross_1);\n\t\t\tplayerSelectionButton.setImageResource(R.id.item_set_image, R.drawable.btn_check_on_focused_holo_light);\n\t\t}\n\t\telse{\n\t\t\tselectedPlayer = BoardSquaresState.NOUGHT;\n\t\t\tplayerSelectionButton.setText(R.id.button_title, \"Nought\");\n\t\t\tplayerSelectionButton.setText(R.id.button_subtitle, \"Computer goes first!\");\n\t\t\tplayerSelectionButton.setImageResource(R.id.selector_button_image, R.drawable.nought_1);\n\t\t\tplayerSelectionButton.setImageResource(R.id.item_set_image, R.drawable.btn_check_on_focused_holo_light);\n\t\t}\n\n\t}",
"public void setHealth(int health)\r\n {\r\n this.health = health;\r\n }",
"public void setStatus(Status newStatus){\n status = newStatus;\n }",
"@External\n\tpublic void set_game_status(String _status,Address _scoreAddress) {\n\t\tAddress sender = Context.getCaller();\n\t\tif ( !this.get_admin().contains(sender)) {\n\t\t\tContext.revert(\"Sender not an admin\");\n\t\t}\n\t\tif (!STATUS_TYPE.contains(_status)) {\n\t\t\tContext.revert(\"Invalid status\");\n\t\t}\n\t\tString statusScoreAddress = this.status_data.get(_scoreAddress);\n\t\tif(_status.equals(\"gameRejected\") && !statusScoreAddress.equals(\"gameReady\") ) {\n\t\t\tContext.revert(\"This game cannot be rejected from state \" +statusScoreAddress );\n\t\t}\n\t\tif(_status.equals(\"gameApproved\") && !(\n\t\t\t\tstatusScoreAddress.equals(\"gameReady\") || statusScoreAddress.equals(\"gameSuspended\")\n\t\t\t\t)) {\n\t\t\tContext.revert(\"This game cannot be approved from state \" +statusScoreAddress );\n\t\t}\n\t\tif(_status.equals(\"gameSuspended\") && !statusScoreAddress.equals(\"gameApproved\")) {\n\t\t\tContext.revert(\"Only approved games may be suspended.\");\n\t\t}\n\t\tif(_status.equals(\"gameDeleted\") && !statusScoreAddress.equals(\"gameSuspended\")) {\n\t\t\tContext.revert(\"Only suspended games may be deleted.\");\n\t\t}\n\t\t\n\t\tthis.status_data.set(_scoreAddress, statusScoreAddress); \t\n\t\t\n\t}",
"public void setPlayer(Player newPlayer) {\n roomPlayer = newPlayer;\n }",
"public void win(int player)\r\n\t{\r\n\t\taccountValue[player]+=pool;\r\n\t\tendRund();\r\n\t}",
"public void setStatus(boolean newStatus);",
"public void changeActiveMonster(){\n //todo\n }",
"public void updateContestStatus(ContestStatus arg0) throws ContestManagementException {\r\n }",
"private void setPlayerScore(Player player, int newScore) {\n\t\tplayer.score = Math.max(newScore, 0);\n\t\tfor (ScoreMarker scoreMarker : playerScoreMarkers) {\n\t\t\tif (scoreMarker.getOwner() == player) {\n\t\t\t\tscoreMarker.value = String.valueOf(player.score);\n\t\t\t}\n\t\t}\n\t}",
"public void setToPlayer(Player player)\n \t{\n \t\t// Define the inventory\n \t\tPlayerInventory inventory = player.getInventory();\n \n \t\t// Clear it all first\n \t\tinventory.clear();\n \t\tinventory.setHelmet(new ItemStack(Material.AIR));\n \t\tinventory.setChestplate(new ItemStack(Material.AIR));\n \t\tinventory.setLeggings(new ItemStack(Material.AIR));\n \t\tinventory.setBoots(new ItemStack(Material.AIR));\n \n \t\t// Set the armor contents\n \t\tif(this.helmet != null) inventory.setHelmet(this.helmet.toItemStack());\n \t\tif(this.chestplate != null) inventory.setChestplate(this.chestplate.toItemStack());\n \t\tif(this.leggings != null) inventory.setLeggings(this.leggings.toItemStack());\n \t\tif(this.boots != null) inventory.setBoots(this.boots.toItemStack());\n \n \t\t// Set items\n \t\tfor(int i = 0; i < 35; i++)\n \t\t{\n\t\t\tinventory.setItem(i, this.items[i].toItemStack());\n \t\t}\n \n \t\t// Delete\n \t\tDemigodsData.jOhm.delete(PlayerCharacterInventory.class, id);\n \t}",
"public void updatePlayer(Player player) {\n\t\t// update the flag GO TO JAIL in Player class\n\t}",
"public void setUserStatus(int online, int id){\n\n try{\n\n String query = \"UPDATE PlayerF \"\n + \"SET Online = \" + online\n + \" WHERE Id = \"+ id;\n\n int result = stmt.executeUpdate(query);\n\n if(result > 0){\n\n System.out.println(\"@setUserStatus: possible success\");\n\n }\n else{\n System.out.println(\"@setUserStatus: Error result returned false\");\n }\n\n }catch (SQLException e){\n e.printStackTrace();\n }\n\n }",
"public void setStatus(EnumVar status) {\n this.status = status;\n }",
"public void setMainPlayerOpening(final boolean status) {\n this.mainPlayer = status;\n }",
"public void setEntitystatus(int entitystatus);",
"public void setStatus(boolean newstatus){activestatus = newstatus;}",
"public void setPlayer(Player player) {\n this.currentPlayer = player;\n }",
"@Override\n\tpublic void chechStatus(int idu) {\n\t\t\n\t}",
"public Kingdom setOpen(boolean status) {\n if (status && this.open) {\n //Set open\n try {\n java.sql.PreparedStatement s = QuartzKingdoms.DBKing.prepareStatement(\"UPDATE Kingdoms SET invite_only=0 WHERE id=?;\");\n s.setInt(1, this.id);\n if (s.executeUpdate() == 1) {\n this.open = false;\n return this;\n } else {\n return this;\n }\n } catch (SQLException e) {\n return this;\n }\n } else if (!status && !this.open) {\n //Set closed\n try {\n java.sql.PreparedStatement s = QuartzKingdoms.DBKing.prepareStatement(\"UPDATE Kingdoms SET invite_only=1 WHERE id=?;\");\n s.setInt(1, this.id);\n if (s.executeUpdate() == 1) {\n this.open = true;\n return this;\n } else {\n return this;\n }\n } catch (SQLException e) {\n return this;\n }\n } else {\n return this;\n }\n }",
"public void winGame() {\r\n if (data.gameState == 3) \r\n data.winner = 1;\r\n else if (data.gameState == 4) \r\n data.winner = 2;\r\n data.victoryFlag = true;\r\n data.gameState = 5;\r\n }",
"public void setStatus(int status);",
"public void setStatus(int status);",
"@Override\n public void setValue(String name, int value) {\n this.StatusRepository.update(name,value);\n }",
"public void setHarvesterStatus(String val) {\n\n\t\tharvesterStatus = val;\n\n\t}",
"public void setStatus(Condition con) {\n\t\t\n\t}",
"public void setPlayer(Player myPlayer){\n battlePlayer=myPlayer;\n }",
"public void setStatus(boolean stat) {\n\t\tstatus = stat;\n\t}",
"public void setStatus(int status) {\n\t\tswitch (status) {\r\n\t\tcase 1:\r\n\t\t\tthis.status = FRESHMAN;\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tthis.status = SOPHOMORE;\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tthis.status = JUNIOR;\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tthis.status = SENIOR;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"@Override\r\n public void handleAttack(Player player) {\r\n player.decreaseHealth(3);\r\n player.setColor(true);\r\n }",
"private void updateAggroLevel(EntityPlayer player, boolean visibility) {\n if (!world.isRemote) {\n // Server side...\n // Rapidly increase the aggro level if this Monolith can see the player\n if (visibility) {\n if (world.provider instanceof WorldProviderLimbo) {\n if (isDangerous()) {\n aggro++;\n } else {\n aggro += 36;\n }\n } else {\n // Aggro increases faster outside of Limbo\n aggro += 3;\n }\n } else {\n if (isDangerous()) {\n if (aggro > aggroCap) {\n // Decrease aggro over time\n aggro--;\n } else if (player != null && aggro < aggroCap) {\n // Increase aggro if a player is within range and aggro < aggroCap\n aggro++;\n }\n } else {\n aggro -= 3;\n }\n }\n // Clamp the aggro level\n int maxAggro = isDangerous() ? MAX_AGGRO : 180;\n aggro = (short) MathHelper.clamp(aggro, 0, maxAggro);\n dataManager.set(AGGRO, aggro);\n } else {\n // Client side...\n aggro = dataManager.get(AGGRO);\n }\n }",
"void setStatus(final UserStatus status);",
"private void strengthenPlayer(int player, double value) {\n\t\tif (player == LOCAL) {\n\t\t\tif (locStatBonus + value < 2) {\n\t\t\t\tlocStatBonus += value;\n\t\t\t}\n\t\t} else if (player == OPPONENT) {\n\t\t\tif (oppStatBonus + value < 2) {\n\t\t\t\toppStatBonus += value;\n\t\t\t}\n\t\t}\n\t\tstrengthenPlayerAnimation(player);\n\t}",
"public void setHealth(int health) {\n this.health = health;\n }",
"private void battleTickStatuses(){\n updateStatuses(battleEnemies);\n updateStatuses(battleAllies);\n }",
"public void changeStats(gameCharacter toAffect);",
"public void setStatus(String newStatus){\n\n //assigns the value of newStatus to the status field\n this.status = newStatus;\n }",
"public void onboard_control_sensors_health_SET(@MAV_SYS_STATUS_SENSOR int src)\n { set_bits(- 1 + src, 26, data, 204); }",
"public void setValue(Player player, T value) {\n\t\tsetValue(player.getUniqueId(), value);\n\t}",
"@Override\r\n\tpublic void set(final Player t) {\n\r\n\t}",
"public void setStatus(int newStatus) {\n status = newStatus;\n }",
"public Equipment openChest( int floorLvl, Hero h )\n {\n Equipment equip = super.openChest( floorLvl + 3, h );\n // make sure hero can get usable item (ex: mage can't get shield)\n boolean equipUsable = h.equipUsable( equip );\n while( equipUsable == false )\n {\n setIsOpen( false );\n equip = super.openChest( floorLvl + 3, h );\n equipUsable = h.equipUsable( equip );\n } // end while\n \n equip.setStats();\n equip.setName( \"Shiny \" + equip.getName() );\n return equip;\n }",
"void setStatus(int status);",
"public void setStatus( short newStatus )\r\n {\r\n setStatus( newStatus, -1, null );\r\n }",
"public void updatePlayer(Player player) {\n Duration playDuration = Duration.ofMinutes(player.getStatistic(Statistic.PLAY_ONE_MINUTE) / 20 / 60);\n int hoursPlayed = Math.toIntExact(playDuration.toHours());\n this.objective.getScore(player.getName()).setScore(hoursPlayed);\n }",
"public void setActivePlayer(Piece.COLOR activePlayer) {\n this.activePlayer = activePlayer;\n }",
"public void setStatus(JobStatus status);",
"public void setTileStatus(int x, int y, TileStatus ts) throws IndexOutOfBoundsException{\n if(x < 0 || y < 0 || x >= grid.length || y >= grid[0].length) {\n throw new IndexOutOfBoundsException(\"Il n'existe pas de tuile à la position (\"+x+\",\"+y+\")\");\n }\n grid[x][y].setStatus(ts);\n }",
"public static void setScoreBoard(Player p) {\n\t\n}",
"public void setStatus(boolean value) {\n this.status = value;\n }",
"public void setStatus(boolean value) {\n this.status = value;\n }",
"public static void setPlayerScore(int score)\r\n\t{\r\n\t\tGame.playerScore = score;\r\n\t}",
"private void setHighScore(int hs) {\n setStat(hs, highScore);\n }",
"public void setPlayer(Player player) {\n this.player = player;\n }",
"public void setHealth(double Health){\r\n health = Health;\r\n }",
"@Override\n\tpublic void collision(Dungeon dungeon, Player player) {\n\t\tplayer.getPlayerState().toGameOver(player); // from vulnerable state to game over\n\t\tplayer.getPlayerState().toGameOver(player); // TODO game over state just change to game over scene \n\t}",
"public HrCStatitem update(HrCStatitem entity);",
"void setStatus(org.hl7.fhir.ObservationStatus status);",
"private void processPlayerStatusChange(JSONObject playerjson, PlayerModel playerModel, int id) throws JSONException {\n\t\tplayerModel.setPlayerStatus(playerjson.getString(\"Status\"));\n\t\tif (!playerModel.isInitalized()) {\n\t\t\ttry {\n\t\t\t\tplayerModel.setPlayerName(playerjson.getString(\"Name\"));\n\t\t\t\tplayerModel.setPlayerColor(parsePlayerColor(playerjson.getString(\"Farbe\")));\n\t\t\t\tplayerModel.setInitalized(true);\n\t\t\t} catch (JSONException npe) {\n\t\t\t\tlog.warning(\"Farbe oder Name von \" + id + \" ist noch nicht bekannt\");\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tJSONObject ressources = playerjson.getJSONObject(\"Rohstoffe\");\n\t\t\tplayerModel.setResourceCards(parseRessourcesArray(ressources));\n\n\t\t} catch (JSONException npe) {\n\t\t\tplayerModel.setResourceCardSum(playerjson.getInt(\"Rohstoffe\"));\n\t\t}\n\n\t\tint newvp = playerjson.getInt(\"Siegpunkte\");\n\n\t\t// Setze die Siegpunkte neu wenn sie sich geändert haben\n\t\tif (newvp != playerModel.getVictoryPoints()) {\n\t\t\tplayerModel.setVictoryPoints(newvp);\n\n\t\t\t// Zeichne sie neu sobald die View da ist\n\t\t\tif (controller.getView() != null) {\n\t\t\t\tSystem.out.println(\"Neue Siegespunkte für andere Spieler: \" + playerModel.getVictoryPoints());\n\t\t\t\tPlayerPanel playerPanel = controller.getView().getPlayerpanels().get(id);\n\t\t\t\tplayerPanel.getVictoryPoints().setText(playerModel.getVictoryPoints() + \"\");\n\t\t\t\tplayerPanel.repaint();\n\t\t\t}\n\t\t}\n\t}",
"public void setStatus(Boolean s){ status = s;}",
"public void setFoodLevel ( int value ) {\n\t\texecute ( handle -> handle.setFoodLevel ( value ) );\n\t}",
"private void setWinner(Player player, String reason) {\n game.setWinner(player);\n for (PlayerController controller : playerControllers) {\n if (controller == null) continue;\n try {\n if (controller.getPlayer().equals(player)) {\n controller.getClient().notifyWin(reason);\n } else {\n controller.getClient().notifyLoss(reason, player);\n }\n } catch (IOException e) {\n // no need to handle disconnection, game is over\n }\n }\n }"
] |
[
"0.56490654",
"0.5646008",
"0.56221765",
"0.56121075",
"0.5600494",
"0.55736405",
"0.55657417",
"0.55585355",
"0.55443835",
"0.5495136",
"0.5493031",
"0.54515445",
"0.54195565",
"0.54099035",
"0.5385893",
"0.53707814",
"0.5355562",
"0.5345966",
"0.5340677",
"0.5340677",
"0.53360456",
"0.53313595",
"0.5316628",
"0.5313692",
"0.53091604",
"0.53068453",
"0.53002346",
"0.52975416",
"0.5297273",
"0.52793646",
"0.5276197",
"0.52668035",
"0.5257603",
"0.52567655",
"0.5251031",
"0.5250863",
"0.52369857",
"0.52345514",
"0.5216457",
"0.5205793",
"0.5196533",
"0.5179338",
"0.51688886",
"0.51677483",
"0.5157326",
"0.51531327",
"0.51479745",
"0.513201",
"0.51306105",
"0.5129398",
"0.51220894",
"0.51178133",
"0.51142",
"0.51009566",
"0.5098188",
"0.509487",
"0.50902075",
"0.50882125",
"0.5087531",
"0.5086418",
"0.5086418",
"0.50807005",
"0.50803936",
"0.5070669",
"0.5070028",
"0.50639963",
"0.5063657",
"0.5046879",
"0.5045971",
"0.5040686",
"0.50359094",
"0.5028858",
"0.50250006",
"0.5023576",
"0.5020544",
"0.501975",
"0.5018282",
"0.5017282",
"0.50146246",
"0.50101644",
"0.50074553",
"0.50024456",
"0.5002215",
"0.49864212",
"0.49783862",
"0.49777272",
"0.49711168",
"0.49672613",
"0.49672613",
"0.49627608",
"0.4954694",
"0.49529642",
"0.49521887",
"0.4950608",
"0.49492094",
"0.49463773",
"0.4942732",
"0.49407426",
"0.49402574",
"0.4938189"
] |
0.6898191
|
0
|
Plays a sound to the player
|
public static void playSound(Player p, Location loc, Sound sound, float pitch, float volume){
p.playSound(loc, sound, volume, pitch);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void playSound() {\n\t\tmediaPlayer.play();\n\t}",
"private void playSound() {\n\t\tif (controllerVars.isLoaded() && !controllerVars.isPlays()) {\n\t\t\tcontrollerVars.getSoundPool().play(controllerVars.getSoundID(), controllerVars.getVolume(), controllerVars.getVolume(), 1, 0, 1f);\n\t\t\tcontrollerVars.COUNTER++;\n\t\t\t//Toast.makeText(act, \"Played sound\", Toast.LENGTH_SHORT).show();optional Playing message \n\t\t\tcontrollerVars.setPlays(true);\n\t\t\tonComplete(controllerVars.getMediaPlayer().getDuration());\n\t\t}\n\t\t//controllerVars.getMediaPlayer().start();\n\t\t//controllerVars.setPlays(true);\n\t}",
"private void play() {\n\t\tlog.finest(\"Playing sound\");\n\t\ttone.trigger();\n\t}",
"public static void playShootingSound(){\n String musicFile = \"Sounds\\\\Shoot.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }",
"public void play() {\n if (audio != null) {\n audio.play(sfxVolume);\n }\n }",
"public void playSoundAt(IPos pos, String sound, float volume, float pitch);",
"@Override\n public void playSound(int soundId) {\n\n }",
"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 }",
"PlaySound getSound();",
"public void playSound(File soundFile);",
"private static void playSound(String s) {\n try {\n Media hit = new Media(new File(s).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(hit);\n mediaPlayer.play();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }",
"public void playSound(String soundURL){\n if (mySoundPlayer == null){\n logMessage(TAG, \"playSound() -> mSoundPlayer is null\");\n return;\n }\n mySoundPlayer.play(soundURL);\n }",
"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}",
"private void play()\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return;\n }\n\n stop();\n musicPlayer.play();\n }",
"public static void playSound(){\r\n try{\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(AudioSystem.getAudioInputStream(new File(\"Cheering.wav\")));\r\n clip.start();\r\n }\r\n catch (Exception exc){\r\n exc.printStackTrace(System.out);\r\n } \r\n }",
"protected void playTheSound(int position) {\n if (mp != null) {\n mp.reset();\n mp.release();\n }\n mp = MediaPlayer.create(this, sons[position]);\n mp.start();\n }",
"public void foodSound(){\n if (enableSound){\r\n\t clip.play();\r\n }\r\n\t\t\r\n\t}",
"public void playSound ( Location location , Sound sound , float volume , float pitch ) {\n\t\texecute ( handle -> handle.playSound ( location , sound , volume , pitch ) );\n\t}",
"@Override\n\tpublic void playLivingSound() {\n\t\tgetSoundManager().playLivingSound();\n\t}",
"public void play() {\n\t\tplay(true, true);\n\t}",
"public void play(Sound s, PlayMode mode) throws IOException {\n if (s != null) getClip(s).play(mode);\n }",
"public void playAudio() {\n\t\tmusic[currentSong].stop();\n\t\tcurrentSong++;\n\t\tcurrentSong %= music.length;\n\t\tmusic[currentSong].play();\n\t}",
"public String play(String sound) {\r\n return play(SoundLibrarian.getInstance(), sound);\r\n }",
"private void playSound(@NonNull final String path, @Nullable AssetFileDescriptor assetFileDescriptor) {\n\t\tif (mMode == PLAY_SINGLE) {\n\t\t\tstopAll();\n\t\t}\n\n\t\t// sound already playing\n\t\tif (mMediaMap.containsKey(path)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// stop all currently playing sounds\n\t\tif (mMode == PLAY_SINGLE_CONTINUE) {\n\t\t\tstopAll();\n\t\t}\n\n\t\t// init media player\n\t\tMediaPlayer mediaPlayer;\n\t\ttry {\n\t\t\tmediaPlayer = new MediaPlayer();\n\t\t\tmMediaMap.put(path, mediaPlayer);\n\n\t\t\t// data source\n\t\t\tif (assetFileDescriptor != null) {\n\t\t\t\tmediaPlayer.setDataSource(assetFileDescriptor.getFileDescriptor(), assetFileDescriptor.getStartOffset(), assetFileDescriptor.getLength());\n\t\t\t} else {\n\t\t\t\tmediaPlayer.setDataSource(path);\n\t\t\t}\n\n\t\t\tmediaPlayer.prepareAsync();\n\t\t} catch (@NonNull IllegalArgumentException | IllegalStateException | IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}\n\n\t\t// play sound\n\t\tmediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {\n\t\t\t@Override\n\t\t\tpublic void onPrepared(@NonNull MediaPlayer mediaPlayer) {\n\t\t\t\tmediaPlayer.start();\n\t\t\t}\n\t\t});\n\n\t\t// release media player\n\t\tmediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n\t\t\t@Override\n\t\t\tpublic void onCompletion(@Nullable MediaPlayer mediaPlayer) {\n\t\t\t\tmMediaMap.remove(path);\n\t\t\t\tif (mediaPlayer != null) {\n\t\t\t\t\tmediaPlayer.release();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"public void playSound(String sound) {\n\t\t \n\t\t // open the sound file as a Java input stream\n\t\tString soundFile = null;\n\t\tswitch (sound) {\n\t\tcase \"opening\":\n\t\t\tsoundFile = \"ConfigFiles\\\\opening.wav\";\n\t\t\tbreak;\n\t\tcase \"ending\":\n\t\t\tsoundFile = \"ConfigFiles\\\\ending.wav\";\n\t\t\tbreak;\n\t\tcase \"shop\":\n\t\t\tsoundFile = \"ConfigFiles\\\\shop.wav\";\n\t\t\tbreak;\n\t\tcase \"monsterbattle\":\n\t\t\tsoundFile = \"ConfigFiles\\\\monsterbattle.wav\";\n\t\t\tbreak;\n\t\tcase \"battlewin\":\n\t\t\tsoundFile = \"ConfigFiles\\\\monstervictory.wav\";\n\t\t\tbreak;\n\t\tcase \"trainerbattle\":\n\t\t\tsoundFile = \"ConfigFiles\\\\trainerBattle.wav\";\n\t\t\tbreak;\n\t\tcase \"trainerbattlewin\":\n\t\t\tsoundFile = \"ConfigFiles\\\\trainerVictory.wav\";\n\t\t\tbreak;\n\t\tcase \"map\":\n\t\t\tsoundFile = \"ConfigFiles\\\\map.wav\";\n\t\t\tbreak;\n\t\t}\n\t\t\t\n\t\t \n\t\t InputStream in = null;\n\t\t\ttry {\n\t\t\t\tin = new FileInputStream(soundFile);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t \n\t\t\tif(audioStream != null ) {\n\t\t\t\tAudioPlayer.player.stop(audioStream);\n\t\t\t}\n\t\t\t // create an audiostream from the inputstream\n\t\t\ttry {\n\t\t\t\taudioStream = new AudioStream(in);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t // play the audio clip with the audioplayer class\n\t\t\t\n\t\t AudioPlayer.player.start(audioStream);\n\t\t \n\t}",
"public void play() {\n\t\tmusic.play();\n\t\tsyncPosition();\n\t}",
"private void playSound() {\n if (isFlashOn) {\n mp = MediaPlayer.create(this, R.raw.light_switch_off);\n } else {\n mp = MediaPlayer.create(this, R.raw.light_switch_on);\n }\n mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n\n @Override\n public void onCompletion(MediaPlayer mp) {\n // TODO Auto-generated method stub\n mp.release();\n }\n });\n mp.start();\n }",
"public void play(int soundID) {\n System.out.println(\"PlaySound: \" + soundID);\n// if (soundID == SOUND_EAT)\n// return;\n play(soundID, 1);\n }",
"public void play()\n\t{\n\t\tif (canPlay)\n\t\t{\n\t\t\tsong.play();\n\t\t\tsong.rewind();\n\t\t\tif (theSong == \"SG1\" || theSong == \"SG2\")\n\t\t\t\tcanPlay = false;\n\t\t}\n\t}",
"public static void playerRun()\n {\n runSound.playLooped();\n }",
"public void playSoundtrack() {\n if(this.musicEnabled) {\n try {\n Clip soundtrackClip = AudioSystem.getClip();\n AudioInputStream inputStream = AudioSystem.getAudioInputStream(new BufferedInputStream(Assets.soundTrack));\n soundtrackClip.open(inputStream);\n soundtrackClip.start();\n soundtrackClip.loop(Clip.LOOP_CONTINUOUSLY);\n } catch (Exception e) {\n e.printStackTrace();\n System.err.println(e.getMessage());\n }\n }\n }",
"public static void game_sound() {\n\t\tm_player_game.start();\n\t\tm_player_game.setMediaTime(new Time(0));\n\t}",
"public void playSound(Location loc) {\n if (_sound != null) {\n loc.getWorld().playSound(loc, _sound, _soundVolume, _soundPitch);\n }\n }",
"public void playSound ( Location location , String sound , float volume , float pitch ) {\n\t\texecute ( handle -> handle.playSound ( location , sound , volume , pitch ) );\n\t}",
"public void playSound(String filename) {\r\n\t\tif (debugLevel > 1)\r\n\t\t\tSystem.out.println(\" ... play audio file: \" + filename);\r\n\t\ttry {\r\n\t\t\tFile file = new File(filename);\r\n\t\t\tAudioInputStream in = AudioSystem.getAudioInputStream(file);\r\n\t\t\tclip = AudioSystem.getClip();\r\n\t\t\tclip.open(in);\r\n\t\t\tclip.start();\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t}\r\n\t}",
"public void StartSound(ISoundOrigin origin, int sound_id);",
"public static void playSoundEffect(String path) {\n Thread thread = new Thread(() -> {\n Player soundEffectPlayer = new Player();\n soundEffectPlayer.setSourceLocation(path);\n soundEffectPlayer.play();\n });\n thread.setDaemon(true);\n thread.start();\n }",
"private void playSound(String sound) {\r\n try {\r\n BufferedInputStream soundFileStream = new BufferedInputStream(this\r\n .getClass().getResourceAsStream(sound));\r\n AudioInputStream audioInputStream = AudioSystem\r\n .getAudioInputStream(soundFileStream);\r\n AudioFormat audioFormat = audioInputStream.getFormat();\r\n DataLine.Info dataLineInfo = new DataLine.Info(Clip.class, audioFormat);\r\n Clip clip = (Clip) AudioSystem.getLine(dataLineInfo);\r\n clip.open(audioInputStream);\r\n clip.start();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public void run()\n\t{\t\t\t\t\n\t\tif (player!=null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tplayer.play();\t\t\t\t\n\t\t\t}\n\t\t\tcatch (JavaLayerException ex)\n\t\t\t{\n\t\t\t\tSystem.err.println(\"Problem playing audio: \"+ex);\n\t\t\t}\t\t\t\n\t\t}\n\t}",
"public void playSound(SoundType type) {\n if (!gameController.getGameStatPanel().getUserData().isSoundDisabled()) soundMap.get(type).play();\n }",
"public static void playPickupSound(){\n String musicFile = \"Sounds\\\\Pickup.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }",
"public void StartSound(ISoundOrigin origin, sfxenum_t sound_id);",
"public static void PlaySound(String soundToPlay)\n {\n AudioNode sound = new AudioNode(Game.getInstance().getAssetManager(), soundToPlay);\n sound.setReverbEnabled(false);\n sound.play();\n }",
"public void playSoundGameWon() {\n\t\tcompletedGameSound.play();\n\t}",
"public void startSound() {\n\t\ttry {\n\t\t\t// Open an audio input stream.\n\t\t\tURL url = this.getClass().getResource(\"/\"+wavMusicFile);\n\t\t\t//System.out.println(\"url: \" + url);\n\t\t\tAudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n\t\t\t// Get a sound clip resource.\n\t\t\tclip = AudioSystem.getClip();\n\t\t\t// Open audio clip and load samples from the audio input stream.\n\t\t\tclip.open(audioIn);\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}",
"void play(final Context context, final int soundId, final OnCompletionPlayNextListener playNextListener);",
"public void play() {\n\n String filename = (String)audioList.getSelectedValue();\n if(filename == null) { // nothing selected\n return;\n }\n slider.setValue(0);\n boolean successful = player.play(new File(AUDIO_DIR, filename));\n if(successful) {\n showInfo(filename + \" (\" + player.getDuration() + \" seconds)\");\n }\n else {\n showInfo(\"Could not play file - unknown format\");\n }\n }",
"protected void playS()\n\t\t{\n\t\t\tplayer.start();\n\t\t}",
"void play(int soundIndex) {\n\t\tsounds.get(soundIndex).play();\n\t}",
"private void playAudio() {\r\n Play.au(audioFileName, false);\r\n }",
"public void play() {\n\t\ttry {\n\t\t\tthis.mMediaPlayer.start();\n\t\t\tLog.w(\"AUDIO PLAYER\", \"just started playing\");\n\t\t} catch (IllegalStateException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthis.isPlaying = true;\n\t\tthis.incrementPlaybackTime();\n\t}",
"public final void play() {\n\t\tinitialize();\n\t\tstartPlay();\n\t\tendPlay();\n\t}",
"public void playSoundSuccess() {\n\t\tsucceededSound.play();\n\t}",
"public void playAudio() {\n\n }",
"public void play (int index) {\n try {\n sendHeader (PLAYER_MSGTYPE_CMD, PLAYER_SOUND_CMD_IDX, 4);\n XdrBufferEncodingStream xdr = new XdrBufferEncodingStream (4);\n xdr.beginEncoding (null, 0);\n xdr.xdrEncodeInt (index);\n xdr.endEncoding ();\n os.write (xdr.getXdrData (), 0, xdr.getXdrLength ());\n xdr.close ();\n os.flush ();\n } catch (IOException e) {\n throw new PlayerException\n (\"[Sound] : Couldn't send play command request: \" +\n e.toString (), e);\n } catch (OncRpcException e) {\n throw new PlayerException\n (\"[Sound] : Couldn't XDR-encode play command request: \" +\n e.toString (), e);\n }\n }",
"public abstract String play(SoundLibrary library, String... sound);",
"public void playClickSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, CLICK);\n\t}",
"public static void play(String filename) {\n\t\tSoundPlayer player = playerFromResource(filename);\n\t\tif (player != null)\n\t\t\tplayer.play();\n\t}",
"public void playGoombaSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, GOOMBA);\n\t}",
"public void play(String soundName)\n {\n try{\n Clip clip = AudioSystem.getClip();\n AudioInputStream inputStream = AudioSystem.getAudioInputStream(new File(soundName));\n clip.open(inputStream);\n clip.start();\n }\n catch (Exception e){\n System.out.println(\"Play sound error: \" + e.getMessage() + \" for \" + soundName);\n }\n }",
"public void PlaySound(Context context) {\r\n\t\tif (!this.mp.isPlaying()) {\r\n\t\t\tmp.start();\r\n\t\t}\r\n\t}",
"private void playYouWinSound()\n {\n try\n {\n java.io.File soundFile = new java.io.File(\n \"C:\\\\Windows\\\\Media\\\\tada.wav\");\n javax.sound.sampled.AudioInputStream audioIn =\n javax.sound.sampled.AudioSystem.getAudioInputStream(\n soundFile);\n javax.sound.sampled.Clip clip =\n javax.sound.sampled.AudioSystem.getClip();\n\n clip.open(audioIn);\n clip.start();\n }\n catch (Exception ex)\n {\n System.out.println(ex);\n }\n }",
"public void PauseSound();",
"public void playSound(int sound) {\n \t currentstreamID=soundPool.play(soundPoolMap.get(sound), 0.5f, 0.5f, 1, -1, 1f);\n Log.e(\"MYT\",currentstreamID+\" play output\"); \n }",
"public void playLocal(String audiofile);",
"public void play()\n {\n this.mediaPlayer = new MediaPlayer(file);\n this.mediaPlayer.setVolume(volume);\n\n // Listener for end of media.\n mediaPlayer.setOnEndOfMedia(() -> {\n this.mediaPlayer.stop();\n });\n\n mediaPlayer.play();\n }",
"public void play() {\n\t\tif(hasAudioLoaded()) {\n\t\t\tcurrentClip.start();\n\t\t\tisPlaying = true;\n\t\t}\n\t}",
"public void playSound(String soundName) {\r\n try {\r\n audioInputStream = AudioSystem.getAudioInputStream(new File(soundName).getAbsoluteFile());\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(audioInputStream);\r\n clip.start();\r\n } catch (Exception ex) {\r\n System.out.println(\"Error with playing sound.\");\r\n ex.printStackTrace();\r\n }\r\n }",
"public void playSound ( Location location , Sound sound , SoundCategory category , float volume , float pitch ) {\n\t\texecute ( handle -> handle.playSound ( location , sound , category , volume , pitch ) );\n\t}",
"public void playSound(int sample, boolean looped) {\n\t\t\tm_soundManager.playSound(sample, looped);\n\t\t}",
"public void playMusic() {\n\t\tthis.music.start();\n\t}",
"public void playSong() {\n player.reset();\n Song playedSong;\n //get the right song\n if (shuffle) {\n int newSong = shuffleIndexes.get(songPosn);\n playedSong = songs1.get(newSong);\n } else {\n playedSong = songs1.get(songPosn);\n }\n songTitle = playedSong.getSongName();\n Uri uri = Uri.parse(playedSong.getSongLocation());\n try {\n player.setDataSource(getApplicationContext(), uri);\n } catch (Exception e) {\n Log.e(\"MUSIC SERVICE\", \"Error setting data source\", e);\n }\n state = PlaybackStateCompat.STATE_PLAYING;\n player.prepareAsync();\n showNotification();\n }",
"public void play() {\n\t\t\r\n\t}",
"public static void playInternal( LayeredSound.SoundClip s )\r\n\t{\r\n\t\tif ( Settings.isSoundOn() )\r\n\t\t\tnew SpeakerThread( s ).start();\r\n\t}",
"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 playSound(String fileName) {\n\t\tAudioClip sound = JApplet.newAudioClip(getClass().getResource(fileName));\n\t\tsound.play();\n\t}",
"public static Action playSound(final InputStream sound) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n //MP3.play(sound);\n }\n\n @Override\n public int getCost() {\n return 5;\n }\n\n @Override\n public boolean isExclusive() {\n return false;\n }\n\n @Override\n public Object getData() {\n return sound;\n }\n\n @Override\n public String toString() {\n return \"PlaySound(\" + (sound != null ? sound.toString() : \"null\") + \")\";\n }\n };\n }",
"public Clip playSound(int soundId) {\r\n\t\treturn soundManager.playSound(soundId);\r\n\t}",
"public static void playSound(final String name, final float volume, final float pitch)\n {\n if (FMLCommonHandler.instance().getSide().isServer())\n {\n return;\n }\n final Minecraft mc = Minecraft.getMinecraft();\n final float d4 = (float) mc.renderViewEntity.posX;\n final float d5 = (float) mc.renderViewEntity.posY;\n final float d6 = (float) mc.renderViewEntity.posZ;\n mc.sndManager.playSound(name, d4, d5, d6, volume, pitch);\n }",
"private void playSound(String soundFile){\n try {\n AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(new File(soundFile).getAbsoluteFile());\n Clip clip = AudioSystem.getClip();\n clip.open(audioInputStream);\n clip.start();\n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void gameSound(int attack){\n switch (attack){\n case 1:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_lightattack);\n break;\n case 2:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_strongattack);\n break;\n case 3:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_brutalattack);\n break;\n }\n mediaPlayer.start();\n }",
"public void playMusic() {\n\t\ttry {\n\t\t\tsoundManager.playMusic(\"bgroundmusic\");\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public void playSound() {\n if (this.mIsSupportVibrator) {\n this.mVibratorEx.setHwVibrator(\"haptic.control.time_scroll\");\n }\n if (this.mSoundPool == null || this.mSoundId == 0 || !this.mSoundLoadFinished) {\n Log.w(TAG, \"SoundPool is not initialized properly!\");\n } else {\n this.mSoundPool.play(this.mSoundId, 1.0f, 1.0f, 0, 0, 1.0f);\n }\n }",
"private void play()\r\n {\r\n String filename = (String)fileList.getSelectedValue();\r\n if(filename == null) { // nothing selected\r\n return;\r\n }\r\n // slider.setValue(0);\r\n boolean successful = player.play(new File(AUDIO_DIR, filename));\r\n if(successful) {\r\n showInfo(filename + \" (\" + player.getDuration() + \" seconds)\");\r\n }\r\n else {\r\n showInfo(\"Could not play file - unknown format\");\r\n }\r\n }",
"public void startSound()\n \n {try\n { \n URL url = this.getClass().getClassLoader().getResource(\"Mario Kart Start 2.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n startClip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n startClip.open(audioIn); \n \n startClip.start();\n \n \n } \n catch (UnsupportedAudioFileException e)\n {\n e.printStackTrace();\n } \n catch (IOException e) \n {\n e.printStackTrace();\n } \n catch (LineUnavailableException e) \n {\n e.printStackTrace();\n } \n \n }",
"private void play() {\n /** Memanggil File MP3 \"indonesiaraya.mp3\" */\n try {\n mp.prepare();\n } catch (IllegalStateException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n /** Menjalankan Audio */\n mp.start();\n\n /** Penanganan Ketika Suara Berakhir */\n mp.setOnCompletionListener(new OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n stateAwal();\n }\n });\n }",
"public void play() { player.resume();}",
"public abstract void play(ChunkedByteBuffer soundData, String name);",
"public static void playSound(Activity a, int index) {\n MediaPlayer mp = new MediaPlayer();\n mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n mp.reset(); // fix bug app show warning \"W/MediaPlayer: mediaplayer went away with unhandled events\"\n mp.release();\n mp = null;\n }\n });\n try {\n String []listMusic = a.getAssets().list(AppConstant.ASSETSMUSIC);\n AssetFileDescriptor afd = a.getAssets().openFd(\"music\"\n + System.getProperty(\"file.separator\") + listMusic[index]);\n mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());\n afd.close();\n mp.prepare();\n } catch (IOException e) {\n e.printStackTrace();\n }\n mp.start();\n }",
"private void clickSound() {// this function Plays a sound when a button is clicked.\n\t\tif (mp != null) {\n\t\t\tmp.release();\n\t\t}\n\t\tmp = MediaPlayer.create(getApplicationContext(), R.raw.music2);\n\t\tmp.start();// media player is started\n\t}",
"public static void playScream()\n {\n scream.play();\n }",
"public void playSound(View view) {\n\n Button button = (Button) view;\n\n if(mediaPlayer.isPlaying()){\n mediaPlayer.pause();\n button.setText(getString(R.string.play_music_btr));\n }\n else {\n mediaPlayer.start();\n button.setText(getString(R.string.pause_music_btr));\n }\n }",
"public Sound play(String path)\n\t{\n\t//\tSystem.out.println(\"Playing sound: \" + path);\n\t\t\t\n\t\tSound newSound;\n\t\t\n\t\tif(volume == 0)\n\t\t\treturn null;\n\t\t\n\t\tif(sounds.containsKey(path))\n\t\t{\n\t\t//\tSystem.out.println(\"\\tSound loaded from sound cache\");\n\t\t\tnewSound = sounds.get(path);\n\t\t}\n\t\telse\n\t\t{\n\t\t//\tSystem.out.println(\"\\tloading sound into sound cache\");\n\t\t\tnewSound = new Sound(path);\n\t\t\tsounds.put(path,newSound);\n\t\t}\n\n\t\tnewSound.play(volume);\n\t\t\n\t\treturn newSound;\n\t}",
"public void playSoundGameLost() {\n\t\tlostGameSound.play();\n\t}",
"public void playWinSound()\n {\n InputStream pathSoundFile = getClass().getResourceAsStream(\"bellringing.wav\");\n playSound(pathSoundFile);\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}",
"public void play(Song song)\n {\n\n String location = song.getLocation();\n File file = new File(location);\n filePath = file.toURI().toString();\n media = new Media(filePath);\n mediaPlayer = new MediaPlayer(media);\n mediaPlayer.play();\n\n }",
"public static synchronized void playSound(final String url) {\n\t\t new Thread(new Runnable() {\n\t\t 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(\"/res/\" + 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 }\n\t\t }).start();\n\t\t}",
"public void soundPressed() {\n // display\n TextLCD.print(SOUND);\n // sound\n Sound.beep();\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsp1.play(sound_id1, 1.0F, 1.0F, 0, 0, 1.0F);\n\t\t\t}"
] |
[
"0.8611261",
"0.8394212",
"0.8025647",
"0.7868521",
"0.77755153",
"0.7691145",
"0.7680005",
"0.7635915",
"0.7596374",
"0.758016",
"0.75640845",
"0.7557988",
"0.7509002",
"0.7480204",
"0.74650687",
"0.74189353",
"0.74153197",
"0.7408028",
"0.7379522",
"0.7374013",
"0.73607004",
"0.7342275",
"0.7337443",
"0.7333893",
"0.73300606",
"0.731767",
"0.7307466",
"0.73020476",
"0.7291863",
"0.7290421",
"0.72865987",
"0.7286535",
"0.7286335",
"0.72613955",
"0.72526366",
"0.7215073",
"0.71963114",
"0.7195421",
"0.7190946",
"0.7190758",
"0.71790963",
"0.71576464",
"0.7154082",
"0.7150454",
"0.7150063",
"0.71256",
"0.71225685",
"0.7120203",
"0.7118492",
"0.71178323",
"0.7110375",
"0.71094793",
"0.71025676",
"0.7101775",
"0.7090231",
"0.7074325",
"0.7066071",
"0.7065246",
"0.70622253",
"0.7058456",
"0.7052987",
"0.7045545",
"0.70409316",
"0.7039749",
"0.7014636",
"0.70072556",
"0.7006101",
"0.70044935",
"0.69824624",
"0.69824535",
"0.6965677",
"0.69566005",
"0.69509006",
"0.69505167",
"0.69501853",
"0.6939968",
"0.6939176",
"0.6937061",
"0.6931092",
"0.6929933",
"0.6919346",
"0.6913494",
"0.69014716",
"0.6892463",
"0.68892163",
"0.68849146",
"0.68779933",
"0.687566",
"0.6873422",
"0.6869844",
"0.6868134",
"0.68669194",
"0.68520445",
"0.68453205",
"0.68389606",
"0.68367034",
"0.6834119",
"0.6827489",
"0.6821994",
"0.68117845"
] |
0.7549443
|
12
|
Shows a particle(Type) to the player
|
public static void showParticle(Player p, Location loc, EnumParticle particle, int amount){
PacketPlayOutWorldParticles pckt = new PacketPlayOutWorldParticles(particle, false, (float) loc.getX(), (float) loc.getY(), (float) loc.getZ(), 0f, 0f, 0f, /*speed*/0f, amount);
((CraftPlayer) p).getHandle().playerConnection.sendPacket(pckt);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"protected void playParticle(){\n\t\teffectData.getPlayParticles().playParticles(effectData, effectData.getDisplayAt());\n\t}",
"public static void displaySingleParticle(Player p, float x, float y, float z, ParticleColor color){\n PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(EnumParticle.REDSTONE, true, x, y, z, color.getRed(), color.getGreen(), color.getBlue(), 1, 0, 0);\n ((CraftPlayer) p).getHandle().playerConnection.sendPacket(packet);\n }",
"public void spawnParticle ( Particle particle , double x , double y , double z , int count ) {\n\t\thandleOptional ( ).ifPresent ( handle -> {\n\t\t\tof ( particle ).display ( new Location ( getWorld ( ) , x , y , z ) ,\n\t\t\t\t\t\t\t\t\t 0.0F , 0.0F , 0.0F , 1.0F , count , null , handle );\n\t\t} );\n\t}",
"public void spawnParticle ( Particle particle , Location location , int count ) {\n\t\thandleOptional ( ).ifPresent ( handle -> {\n\t\t\tof ( particle ).display ( location , 0.0F , 0.0F , 0.0F , 1.0F , count , null , handle );\n\t\t} );\n\t}",
"public void place (Particle particle)\n {\n _layer.pointToLayer(place(particle.getPosition()), true);\n }",
"public void spawnParticle ( Particle particle , double x , double y , double z , int count , double offsetX ,\n\t\t\tdouble offsetY , double offsetZ ) {\n\t\thandleOptional ( ).ifPresent ( handle -> {\n\t\t\tof ( particle ).display ( new Location ( getWorld ( ) , x , y , z ) ,\n\t\t\t\t\t\t\t\t\t ( float ) offsetX , ( float ) offsetY , ( float ) offsetZ ,\n\t\t\t\t\t\t\t\t\t 1.0F , count , null , handle );\n\t\t} );\n\t}",
"public void drawParticles() {}",
"private void displayParticles(Player p, double radius, ParticleColor color){\n //just some math to create a circle, and send it to the player. z+0.1f so they arent inside of the bottom block.\n double part = 2 * Math.PI / particlePoints;\n for (int i = 0; i < particlePoints; i++)\n {\n double alpha = part * i;\n float x = (float) (location.getX() + radius * Math.cos(alpha));\n float z = (float) (location.getZ() + radius * Math.sin(alpha));\n float y = (float) (location.getY()+0.1f);\n PacketHelper.displaySingleParticle(p, x, y, z, color);\n }\n }",
"public void spawnParticle ( Particle particle , Location location , int count ,\n\t\t\tdouble offsetX , double offsetY , double offsetZ ) {\n\t\thandleOptional ( ).ifPresent ( handle -> {\n\t\t\tof ( particle ).display ( location ,\n\t\t\t\t\t\t\t\t\t ( float ) offsetX , ( float ) offsetY , ( float ) offsetZ ,\n\t\t\t\t\t\t\t\t\t 1.0F , count , null , handle );\n\t\t} );\n\t}",
"public void spawnParticle ( Particle particle , Location location , int count , double offsetX , double offsetY ,\n\t\t\tdouble offsetZ , double extra ) {\n\t\thandleOptional ( ).ifPresent ( handle -> {\n\t\t\tof ( particle ).display ( location ,\n\t\t\t\t\t\t\t\t\t ( float ) offsetX , ( float ) offsetY , ( float ) offsetZ ,\n\t\t\t\t\t\t\t\t\t 1.0F , count , null , handle );\n\t\t} );\n\t}",
"@Override\n\tpublic void onClick(View arg0) {\n\t\tParticleSystem ps = new ParticleSystem(this, 100, R.drawable.star_pink, 800);\n\t\tps.setScaleRange(0.7f, 1.3f);\n\t\tps.setSpeedRange(0.1f, 0.25f);\n\t\tps.setAcceleration(0.0001f, 90);\n\t\tps.setRotationSpeedRange(90, 180);\n\t\tps.setFadeOut(200, new AccelerateInterpolator());\n\t\tps.oneShot(arg0, 100);\n\t}",
"Particles particles();",
"@Override\r\n\tpublic void display() {\n\t\tif (silenced.contains(caster))\r\n\t\t\tdead = true;\r\n\t\tif (lastloc == null)\r\n\t\t\tlastloc = loc;\r\n\t\tdir = loc.toVector().subtract(lastloc.toVector());\r\n\t\tif (speed > 2)\r\n\t\t\tParUtils.dropItemEffectVector(loc.clone().add(0,1,0), Material.CACTUS, 1,1, 1,dir);\r\n\t\t\t\r\n\t\t\t//ParUtils.createFlyingParticle(Particles.CRIT, loc.clone().add(0,2.5,0), 0, 0, 0, 1, 5, dir.normalize());\r\n\t\t//ParUtils.createRedstoneParticle(loc.clone().add(0,2.5,0), 0.5,0.5, 0.5, 1, Color.GREEN, 1.5F);\r\n\t}",
"public void spawnParticle(String particle, double x, double y, double z, double dx, double dy, double dz, double speed, int count);",
"private static void updateParticle(int index) {\n\n\t\tfloat posX = particles[index].getPositionX(); // Current X position of the particle\n\t\tfloat posY = particles[index].getPositionY(); // Current Y position of the particle\n\t\tfloat vX = particles[index].getVelocityX(); // Current horizontal velocity of the particle\n\t\tfloat vY = particles[index].getVelocityY();\t// Current vertical velocity of the particle\n\t\tint age = particles[index].getAge();\t// Current age of the particle\n\t\t\n\t\t// Fill the circle's color and transparency\n\t\tUtility.fill(particles[index].getColor(), particles[index].getTransparency());\n\t\t\n\t\t// Draw the circle\n\t\tUtility.circle(posX, posY, particles[index].getSize());\n\t\t\n\t\t// Update vertical velocity effected by gravity\n\t\tvY = vY + 0.3f;\n\t\t// Update the particle's vertical velocity, XY positions and its age\n\t\tparticles[index].setVelocityY(vY);\n\t\tparticles[index].setPositionX(posX + vX);\n\t\tparticles[index].setPositionY(posY + vY);\n\t\tparticles[index].setAge(age + 1);\n\t\t\n\t\t// Call this method to remove the old particles\n\t\tremoveOldParticles(80);\n\t\t\n\n\t}",
"public void add(Particle particle) {\n this.particles.add(particle);\n }",
"@Override\n \t\t\t\tpublic void doCreateQuadParticle() {\n \n \t\t\t\t}",
"public void magicTeleported(int type) {\n\t\tdungeon.playMusic(player, dungeon.getCurrentRoomReference(player.getNextWorldTile()));\n\t\thideBar();\n\t}",
"public void spawnParticle ( Particle particle , double x , double y , double z , int count , double offsetX ,\n\t\t\tdouble offsetY , double offsetZ , double extra ) {\n\t\tspawnParticle ( particle , x , y , z , count , offsetX , offsetY , offsetZ );\n\t}",
"private void createParticle(double par1, double par3, double par5, double par7, double par9, double par11, int[] par13ArrayOfInteger, int[] par14ArrayOfInteger, boolean par15, boolean par16)\n {\n EntityFireworkSparkFX entityfireworksparkfx = new EntityFireworkSparkFX(this.worldObj, par1, par3, par5, par7, par9, par11, this.theEffectRenderer);\n entityfireworksparkfx.setTrail(par15);\n entityfireworksparkfx.setTwinkle(par16);\n int i = this.rand.nextInt(par13ArrayOfInteger.length);\n entityfireworksparkfx.setColour(par13ArrayOfInteger[i]);\n\n if (par14ArrayOfInteger != null && par14ArrayOfInteger.length > 0)\n {\n entityfireworksparkfx.setFadeColour(par14ArrayOfInteger[this.rand.nextInt(par14ArrayOfInteger.length)]);\n }\n\n this.theEffectRenderer.addEffect(entityfireworksparkfx);\n }",
"public void explosion(){\n explosionEffect.play(pitch, volume);\n }",
"public synchronized void emit(int x, int y, int color) {\n int dir = 0;\n if (mType == MovementType.SINK) dir = 1;\n if (mType == MovementType.SPREAD) dir = Statc.random(3, 0);\n \n getActiveParticles().add(new ActiveParticle(x, y, dir, color, this));\n }",
"public Particle(int id, int xTile, int yTile, int lifetime, MovementType mType) {\n this.id = id;\n this.lifetime = lifetime;\n \n this.mType = mType;\n \n //Insert this particle type into the list of particle types\n particles[id] = this;\n \n //Calculate the indexed location of this particle on the SpriteSheet\n tileID = xTile + yTile * (Screen.TILE_SHEET_SIZE / Screen.TILE_SIZE);\n }",
"public void place (Particle particle) {\n float exp = solid ? 3f : 2f;\n float distance = FloatMath.pow(FloatMath.random(\n FloatMath.pow(nearDistance, exp), FloatMath.pow(farDistance, exp)),\n 1f / exp);\n\n // find the location of the edges at the distance\n Camera camera = layer.getCamera();\n float scale = distance / camera.getNear();\n float left = camera.getLeft() * scale;\n float right = camera.getRight() * scale;\n float bottom = camera.getBottom() * scale;\n float top = camera.getTop() * scale;\n\n // if it's solid, choose a random point in the rect; otherwise, choose an edge\n // pair according to their lengths\n Vector3f position = particle.getPosition();\n if (solid) {\n position.set(\n FloatMath.random(left, right),\n FloatMath.random(bottom, top),\n -distance);\n } else {\n float width = right - left;\n float height = top - bottom;\n Randoms r = Randoms.threadLocal();\n if (r.getFloat(width + height) < width) {\n position.set(\n r.getInRange(left, right),\n r.getBoolean() ? top : bottom,\n -distance);\n } else {\n position.set(\n r.getBoolean() ? left : right,\n r.getInRange(top, bottom),\n -distance);\n }\n }\n\n // transform into world space, then into layer space\n layer.pointToLayer(camera.getWorldTransform().transformPointLocal(position),\n false);\n }",
"@SideOnly(Side.CLIENT)\n\tpublic void randomDisplayTick(World world, int x, int y, int z, Random random) {\n\t\tif (this.isActive) {\n\t\t\tint direction = world.getBlockMetadata(x, y, z);\n\n\t\t\tfloat x1 = (float) x + 0.5F;\n\t\t\tfloat y1 = (float) y + 0.6F;\n\t\t\tfloat z1 = (float) z + 0.5F;\n\n\t\t\tfloat f = 0.52F;\n\t\t\tfloat f1 = random.nextFloat() * 0.6F - 0.3F;\n\n\t\t\t// facing west\n\t\t\tif (direction == 4) {\n\t\t\t\tworld.spawnParticle(\"smoke\", (double) (x1 - f + 0.2F), (double) (y1), (double) (z1 + f1), 0D, 0D, 0D);\n\t\t\t\tworld.spawnParticle(\"flame\", (double) (x1 - f + 0.2F), (double) (y1), (double) (z1 + f1), 0D, 0D, 0D);\n\t\t\t}\n\n\t\t\t// facing east\n\t\t\tif (direction == 2) {\n\t\t\t\tworld.spawnParticle(\"smoke\", (double) (x1 + f - 0.2F), (double) (y1), (double) (z1 + f1), 0D, 0D, 0D);\n\t\t\t\tworld.spawnParticle(\"flame\", (double) (x1 + f - 0.2F), (double) (y1), (double) (z1 + f1), 0D, 0D, 0D);\n\t\t\t}\n\n\t\t\t// facing north\n\t\t\tif (direction == 5) {\n\t\t\t\tworld.spawnParticle(\"smoke\", (double) (x1 + f1), (double) (y1), (double) (z1 - f + 0.2F), 0D, 0D, 0D);\n\t\t\t\tworld.spawnParticle(\"flame\", (double) (x1 + f1), (double) (y1), (double) (z1 - f + 0.2F), 0D, 0D, 0D);\n\t\t\t}\n\n\t\t\t// facing south\n\t\t\tif (direction == 3) {\n\t\t\t\tworld.spawnParticle(\"smoke\", (double) (x1 + f1), (double) (y1), (double) (z1 + f - 0.2F), 0D, 0D, 0D);\n\t\t\t\tworld.spawnParticle(\"flame\", (double) (x1 + f1), (double) (y1), (double) (z1 + f - 0.2F), 0D, 0D, 0D);\n\t\t\t}\n\t\t}\n\t}",
"@SideOnly(Side.CLIENT)\r\n public void randomDisplayTick(World world, int x, int y, int z, Random random)\r\n {\r\n int meta = world.getBlockMetadata(x, y, z);\r\n if(meta != 1) {\r\n \tif(this.litLevel > 0) {\r\n\t if(random.nextInt(36) == 0) {\r\n\t world.playSound((double)((float)x + 0.5F), (double)((float)y + 0.5F), (double)((float)z + 0.5F), \"fire.fire\", 1.0F + random.nextFloat(), 0.3F + random.nextFloat() * 0.7F, false);\r\n\t }\r\n\t\r\n//\t TileCampfire tile = (TileCampfire)world.getTileEntity(x, y, z);\r\n\t float xOffset = 0.5F;\r\n\t float yOffset = 0.7F;\r\n\t float zOffset = 0.5F;\r\n\t double d0 = (double)((float)x + xOffset);\r\n\t double d1 = (double)((float)y + yOffset);\r\n\t double d2 = (double)((float)z + zOffset);\r\n\t GL11.glPushMatrix();\r\n\t MainRegistry.proxy.spawnParticle(\"largesmoke\", d0, d1, d2, 0.0D, 0.0D, 0.0D, 1.5F * this.litLevel);\r\n\t MainRegistry.proxy.spawnParticle(\"flame\", d0, d1, d2, 0.0D, 0.0D, 0.0D, 2.5F * this.litLevel);\r\n\t GL11.glPopMatrix();\r\n\t }\r\n }\r\n }",
"public void draw() {\n\t\tfor (int i = 0; i < particleCount; i++) {\r\n\t\t\tif (particles[i] != null) {\r\n\t\t\t\tglBegin(GL_QUADS);\r\n\t\t\t\t{\r\n\t\t\t\t\tparticles[i].draw();\r\n\t\t\t\t}\r\n\t\t\t\tglEnd();\r\n\t\t\t}\r\n\t\t}\r\n\t\tglColor3f(1, 1, 1);\r\n\t}",
"public static void sendSmokeParticle(double x, double y, double z) {\n\t\tPacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(EnumParticle.SMOKE_LARGE, true, (float) x, (float) y, (float) z, 0.5F, 0, 0.5F, 0, 20);\n\t\tfor(Player online : Bukkit.getOnlinePlayers()) {\n ((CraftPlayer)online).getHandle().playerConnection.sendPacket(packet);\n\t\t}\n\t}",
"public boolean getShowParticles()\r\n/* 90: */ {\r\n/* 91: 91 */ return this.showParticles;\r\n/* 92: */ }",
"public void showAnimalInfo(Player p, Entity e){\r\n\tif(this.checkifHasOwner(e.getUniqueId().toString())){\r\n\t\tAnimals a = new Animals(plugin, e.getUniqueId().toString(), p.getUniqueId().toString());\r\n\t\tint hp = (int) a.getHeartPoints();\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"+++++ Animal Info +++++\");\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Animal Name: \" + ChatColor.GREEN+ a.getAnimalName());\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Animal Owner: \" + ChatColor.GREEN+ a.getOwnerName());\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Heart Level: \" + ChatColor.GREEN + hp);\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Is Clean: \" + ChatColor.GREEN + a.getIsWashed());\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Is happy: \" + ChatColor.GREEN + a.isHappy());\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Is lonely: \" + ChatColor.GREEN + a.getIsPet());\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Is Hungry: \" + ChatColor.GREEN + a.getHunger());\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Is Healthy: \" + ChatColor.GREEN + a.isHealthy());\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Is Weight: \" + ChatColor.GREEN + a.getWeight());\r\n\t\t}\r\n\t}",
"public ParticleEmotion(World world, Entity host, double posX, double posY, double posZ, float height, int hostType, int emoType)\r\n {\r\n super(world, posX, posY, posZ);\r\n this.host = host;\r\n this.setSize(0F, 0F);\r\n this.setPosition(posX, posY, posZ);\r\n this.prevPosX = posX;\r\n this.prevPosY = posY;\r\n this.prevPosZ = posZ;\r\n this.motionX = 0D;\r\n this.motionZ = 0D;\r\n this.motionY = 0D;\r\n this.particleType = emoType;\r\n this.particleScale = this.rand.nextFloat() * 0.05F + 0.275F;\r\n this.particleAlpha = 0F;\r\n this.playSpeed = 1F;\r\n this.playSpeedCount = 0F;\r\n this.stayTick = 10;\r\n this.stayTickCount = 0;\r\n this.fadeTick = 0;\r\n this.fadeState = 0; //0:fade in, 1:normal, 2:fade out, 3:set dead\r\n this.frameSize = 1;\r\n this.addHeight = height;\r\n this.hostType = hostType; //0:any entity, 1:entity, 2:block\r\n this.particleAge = -1; //prevent showing the emo's initial moving from posY = 0\r\n this.canCollide = false;\r\n \r\n //set icon position\r\n switch(this.particleType)\r\n {\r\n case 1: //小愛心\r\n \tthis.particleIconX = 0.0625F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 4;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n\t\t\tbreak;\r\n case 2: //噴汗\r\n \tthis.particleIconX = 0.0625F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 3;\r\n \t//cancel fade in\r\n \tthis.particleAlpha = 1F;\r\n \tthis.fadeState = 1;\r\n \tthis.fadeTick = 5;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n \tbreak;\r\n case 3: //問號\r\n \tthis.particleIconX = 0.125F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n\t\t\tbreak;\r\n case 4: //驚嘆號\r\n \tthis.particleIconX = 0.125F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//long stay\r\n \tthis.stayTick = 20;\r\n \tbreak;\r\n case 5: //點點點\r\n \tthis.particleIconX = 0.1875F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 20;\r\n \t//slow play\r\n \tthis.playSpeed = 0.5F;\r\n\t\t\tbreak;\r\n case 6: //冒青筋\r\n \tthis.particleIconX = 0.1875F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \tbreak;\r\n case 7: //音符\r\n \tthis.particleIconX = 0.25F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 15;\r\n \tthis.playTimes = 1;\r\n \t//cancel fade in\r\n \tthis.particleAlpha = 1F;\r\n \tthis.fadeState = 1;\r\n \tthis.fadeTick = 3;\r\n \t//short stay\r\n \tthis.stayTick = 3;\r\n \t//slow play\r\n \tthis.playSpeed = 0.7F;\r\n \tbreak;\r\n case 8: //cry\r\n \tthis.particleIconX = 0.3125F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 3;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n \t//slow play\r\n \tthis.playSpeed = 0.5F;\r\n \tbreak;\r\n case 9: //流口水\r\n \tthis.particleIconX = 0.3125F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 2;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//no stay\r\n \tthis.stayTick = 1;\r\n \t//slow play\r\n \tthis.playSpeed = 0.5F;\r\n \tbreak;\r\n case 10: //混亂\r\n \tthis.particleIconX = 0.375F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 4;\r\n \t//cancel fade in\r\n \tthis.particleAlpha = 1F;\r\n \tthis.fadeState = 1;\r\n \tthis.fadeTick = 3;\r\n \t//short stay\r\n \tthis.stayTick = 1;\r\n \tbreak;\r\n case 11: //尋找\r\n \tthis.particleIconX = 0.375F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 2;\r\n \t//cancel fade in\r\n \tthis.particleAlpha = 1F;\r\n \tthis.fadeState = 1;\r\n \tthis.fadeTick = 3;\r\n \t//short stay\r\n \tthis.stayTick = 0;\r\n \t//slow play\r\n \tthis.playSpeed = 0.75F;\r\n \tbreak;\r\n case 12: //驚嚇\r\n \tthis.particleIconX = 0.4375F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 14;\r\n \tthis.playTimes = 1;\r\n \t//cancel fade in\r\n \tthis.particleAlpha = 1F;\r\n \tthis.fadeState = 1;\r\n \tthis.fadeTick = 3;\r\n \t//long stay\r\n \tthis.stayTick = 20;\r\n \t//slow play\r\n \tthis.playSpeed = 0.75F;\r\n \t//large frame\r\n \tthis.frameSize = 2;\r\n \tbreak;\r\n case 13: //點頭\r\n \tthis.particleIconX = 0.5F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 2;\r\n \t//cancel fade in\r\n \tthis.particleAlpha = 1F;\r\n \tthis.fadeState = 1;\r\n \tthis.fadeTick = 3;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n \t//slow play\r\n \tthis.playSpeed = 0.75F;\r\n \tbreak;\r\n case 14: //+_+\r\n \tthis.particleIconX = 0.5F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 2;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n \tbreak;\r\n case 15: //kiss\r\n \tthis.particleIconX = 0.5625F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//long stay\r\n \tthis.stayTick = 15;\r\n \t//slow play\r\n \tthis.playSpeed = 0.7F;\r\n \tbreak;\r\n case 16: //lol\r\n \tthis.particleIconX = 0.5625F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 3;\r\n \t//cancel fade in\r\n \tthis.particleAlpha = 1F;\r\n \tthis.fadeState = 1;\r\n \tthis.fadeTick = 3;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n \tbreak;\r\n case 17: //奸笑\r\n \tthis.particleIconX = 0.625F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 15;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//slow play\r\n \tthis.playSpeed = 0.5F;\r\n \tbreak;\r\n case 18: //殘念\r\n \tthis.particleIconX = 0.6875F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n \t//slow play\r\n \tthis.playSpeed = 0.4F;\r\n \tbreak;\r\n case 19: //舔舔\r\n \tthis.particleIconX = 0.6875F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 3;\r\n \t//cancel fade in\r\n \tthis.particleAlpha = 1F;\r\n \tthis.fadeState = 1;\r\n \tthis.fadeTick = 3;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n \t//slow play\r\n \tthis.playSpeed = 0.75F;\r\n \tbreak;\r\n case 20: //orz\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//long stay\r\n \tthis.stayTick = 20;\r\n \t//slow play\r\n \tthis.playSpeed = 0.5F;\r\n \tbreak;\r\n case 21: //O\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 40;\r\n \tbreak;\r\n case 22: //X\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0.5625F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 40;\r\n \tbreak;\r\n case 23: //!?\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0.625F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 40;\r\n \tbreak;\r\n case 24: //rock\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0.6875F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 40;\r\n \tbreak;\r\n case 25: //paper\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0.75F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 40;\r\n \tbreak;\r\n case 26: //scissors\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0.8125F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 40;\r\n \tbreak;\r\n case 27: //-w-\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0.875F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 40;\r\n \tbreak;\r\n case 28: //-口-\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0.9375F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 40;\r\n \tbreak;\r\n case 29: //blink\r\n \tthis.particleIconX = 0.8125F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//slow play\r\n \tthis.playSpeed = 0.35F;\r\n \t//long stay\r\n \tthis.stayTick = 20;\r\n \tbreak;\r\n case 30: //哼\r\n \tthis.particleIconX = 0.8125F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//slow play\r\n \tthis.playSpeed = 0.75F;\r\n \t//short stay\r\n \tthis.stayTick = 3;\r\n \tbreak;\r\n case 31: //臉紅紅\r\n \tthis.particleIconX = 0.875F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 3;\r\n \tthis.particleScale += 0.2F;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//slow play\r\n \tthis.playSpeed = 0.75F;\r\n \t//long stay\r\n \tthis.stayTick = 30;\r\n \tbreak;\r\n case 32: //尷尬\r\n \tthis.particleIconX = 0.875F;\r\n \tthis.particleIconY = 0.25F;\r\n \tthis.particleMaxAge = 5;\r\n \tthis.playTimes = 4;\r\n \t//slow play\r\n \tthis.playSpeed = 0.75F;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n \tbreak;\r\n case 33: //:P\r\n \tthis.particleIconX = 0.875F;\r\n \tthis.particleIconY = 0.625F;\r\n \tthis.particleMaxAge = 4;\r\n \tthis.playTimes = 1;\r\n \t//slow play\r\n \tthis.playSpeed = 0.25F;\r\n \t//long stay\r\n \tthis.stayTick = 30;\r\n \tbreak;\r\n case 34: //|||\r\n \tthis.particleIconX = 0.875F;\r\n \tthis.particleIconY = 0.9375F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.particleScale += 0.3F;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 50;\r\n \tbreak;\r\n default: //汗\r\n \tthis.particleIconX = 0F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 15;\r\n \tthis.playTimes = 1;\r\n\t\t\tbreak;\r\n }\r\n \r\n //init position\r\n this.px = posX;\r\n this.py = posY;\r\n this.pz = posZ;\r\n this.addx = 0D;\r\n this.addy = 0D;\r\n this.addz = 0D;\r\n \r\n calcParticlePosition();\r\n }",
"@Override\n public void show() {\n Label title = new Label(\"Hall of Fame\", new Label.LabelStyle(fonts.getInstance().getClouds(), Color.WHITE));\n title.setPosition(MENU_WIDTH / 2 - title.getWidth() / 2, MENU_HEIGHT / 1.9f + 3*title.getHeight());\n stage.addActor(title);\n }",
"@Override\n public void applyParticleAtAttacker(int type, Entity target, float[] vec)\n {\n \t\tTargetPoint point = new TargetPoint(this.dimension, this.posX, this.posY, this.posZ, 64D);\n \n \t\tswitch (type)\n \t\t{\n \t\tcase 1: //light cannon\n \t double shotHeight = 1.85D;\n \t \n \t if(this.isRiding() && this.getRidingEntity() instanceof BasicEntityMount)\n \t {\n \t \tshotHeight = 0.8D;\n \t }\n \t \n \t\t\tCommonProxy.channelP.sendToAllAround(new S2CSpawnParticle(this, target, shotHeight, 0D, 0D, 0, true), point);\n \t\tbreak;\n \t\tcase 2: //heavy cannon\n \t\tcase 3: //light aircraft\n \t\tcase 4: //heavy aircraft\n\t\tdefault: //melee\n\t\t\tCommonProxy.channelP.sendToAllAround(new S2CSpawnParticle(this, 0, true), point);\n\t\tbreak;\n \t\t}\n \t}",
"public static void sendGenericParticle(Main plugin, double x, double y, double z, EnumParticle particle) {\n\t\tPacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(particle, true, (float) x, (float) y, (float) z, 0, 0, 0, 0, 3);\n\t\tnew BukkitRunnable() {\n\t\t\tint i = 0;\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tfor(Player online : Bukkit.getOnlinePlayers()) {\n ((CraftPlayer)online).getHandle().playerConnection.sendPacket(packet);\n }\n\t\t\t\ti++;\n\t\t\t\tif (i > 2) {\n\t\t\t\t\tthis.cancel();\n\t\t\t\t}\n\t\t\t}\n\t\t}.runTaskTimer(plugin, 0, 5);\n\t}",
"void show() {\n if (!isDead) {\n for (int i = 0; i < bullets.size(); i++) {//show bullets\n bullets.get(i).show();\n }\n if (immortalityTimer >0) {//no need to decrease immortalityCounter if its already 0\n immortalityTimer--;\n }\n\n if (immortalityTimer >0 && floor(((float)immortalityTimer)/5)%2 ==0) {//needs to appear to be flashing so only show half of the time\n } else {\n\n Constants.processing.pushMatrix();\n Constants.processing.translate(this.position.x, this.position.y);\n Constants.processing.rotate(rotation);\n\n //actually draw the player\n Constants.processing.fill(0);\n Constants.processing.noStroke();\n Constants.processing.beginShape();\n int size = 12;\n\n //black triangle\n Constants.processing.vertex(-size - 2, -size);\n Constants.processing.vertex(-size - 2, size);\n Constants.processing.vertex(2 * size - 2, 0);\n Constants.processing.endShape(CLOSE);\n Constants.processing.stroke(255);\n\n //white out lines\n Constants.processing.line(-size - 2, -size, -size - 2, size);\n Constants.processing.line(2 * size - 2, 0, -22, 15);\n Constants.processing.line(2 * size - 2, 0, -22, -15);\n if (boosting) {//when boosting draw \"flames\" its just a little triangle\n boostCount--;\n if (floor(((float)boostCount)/3)%2 ==0) {//only show it half of the time to appear like its flashing\n Constants.processing.line(-size - 2, 6, -size - 2 - 12, 0);\n Constants.processing.line(-size - 2, -6, -size - 2 - 12, 0);\n }\n }\n Constants.processing.popMatrix();\n }\n }\n for (int i = 0; i < asteroids.size(); i++) {//show asteroids\n asteroids.get(i).show();\n }\n }",
"@Override\n\tpublic void show() {\n\t\tmusic.play();\n\t}",
"public void randomDisplayTick(World world, int i, int j, int k, Random random)\n {\n TileEntityGrinder sdktileentitygrinder = (TileEntityGrinder)world.getBlockTileEntity(i, j, k);\n if (sdktileentitygrinder.isActive)\n {\n world.spawnParticle(\"smoke\", (float)i + (random.nextFloat() * 10F + 3F) / 16F, (float)j + 1.0F, (float)k + (random.nextFloat() * 10F + 3F) / 16F, 0.0D, 0.0D, 0.0D);\n }\n }",
"boolean emitParticleMaybe(RenderState renderData, IParticle reusedParticle, PointF point, PointF vec);",
"public Particle(String id, String spritename) {\r\n\t\tsuper(id);\r\n\t\tsprite = Sprite.getSprite(spritename); //FIXME: use a generic particle sprite\r\n\t}",
"public void display() {\n PVector d = location.get();\n float diam = d.y/height;\n println(diam);\n\n stroke(0);\n fill(255,0,0);\n ellipse (location.x, location.y, diameter, diameter);\n }",
"public void secrete() {\n\t\t/* Instantiate a new virus particle */\n\t\tSim.lps.add(new Lambda_phage(prob_surface, prob_enzymes));\n\t}",
"public void setParticles(int particles) {\r\n\t\tthis.particles = particles;\r\n\t}",
"@Override\r\n public void show() {\r\n // makes sure the controller is ready for new inputs\r\n controller.reset();\r\n // tell the game to take input data via our controller\r\n Gdx.input.setInputProcessor(controller);\r\n // update the preferences\r\n parent.updateActivePreferences();\r\n // set the volume to our new preference\r\n bgMusic.setVolume(musicVol);\r\n bgMusic.play();\r\n }",
"public abstract void info(Player p);",
"public void func_180435_a(TextureAtlasSprite p_180435_1_) {\n/* 215 */ int var2 = getFXLayer();\n/* */ \n/* 217 */ if (var2 == 1) {\n/* */ \n/* 219 */ this.particleIcon = p_180435_1_;\n/* */ }\n/* */ else {\n/* */ \n/* 223 */ throw new RuntimeException(\"Invalid call to Particle.setTex, use coordinate methods\");\n/* */ } \n/* */ }",
"@External\r\n\t@ClientFunc\r\n\tpublic MetaVarCLuaParticle Add(MetaVarString materialVar,MetaVarVector positionVar);",
"@Override\n \t\t\t\tpublic void doCreateLineParticle() {\n \n \t\t\t\t}",
"public void say (String txt) {\n\t\tApp.addBlueInfo(npc.getName() + \" : \"+txt);\n\t}",
"@Override\n public void show () {\n g.prefs = Gdx.app.getPreferences(\"potions_master_preferences\");\n g.lang = g.prefs.getInteger(\"language\", 0);\n g.atlas = new TextureAtlas(\"textures/textures.atlas\");\n g.textSystem = new TextSystem(g.lang);\n g.sounds = new Sounds();\n g.fonts = new Fonts(g.textSystem.get(\"FONT_CHARS\"));\n g.ingredients = new Ingredients(g);\n g.potions = new Potions();\n\n g.w = Gdx.graphics.getWidth();\n g.h = Gdx.graphics.getHeight();\n\n g.pixel_size = .00625f * g.w;\n g.tile_size = g.pixel_size * 16f;\n\n String[] inv = g.prefs.getString(\"inventory\", \"\").split(\" \");\n for (String s : inv) {\n for (Ingredient i : g.ingredients.list) {\n if (i.getId().equals(s))\n g.ingredients.inventory.add(i);\n }\n }\n\n String[] add = g.prefs.getString(\"added\", \"\").split(\" \");\n for (String s : add) {\n for (Ingredient i : g.ingredients.list) {\n if (i.getId().equals(s))\n g.ingredients.added.add(i);\n }\n }\n\n g.is_music = g.prefs.getBoolean(\"is_music_on\", true);\n g.is_sound = g.prefs.getBoolean(\"is_sound_on\", true);\n\n g.music_volume = g.prefs.getFloat(\"music_volume\", 1f);\n g.sound_volume = g.prefs.getFloat(\"sound_volume\", 1f);\n\n g.week = g.prefs.getInteger(\"week\", 1);\n g.money = g.prefs.getInteger(\"money\", 0);\n g.potions_cooked = g.prefs.getInteger(\"potion_cooked\", 0);\n\n g.is_potion_cooked = false;\n g.potion_color = new Color();\n\n for (int i = 0; i < g.potions_cooked; ++i) {\n String[] p_h = g.prefs.getString(\"potion_history_\" + i, \"\").split(\" \");\n g.potions.list.add(new Potion(\n new String[] {p_h[4], p_h[5], p_h[6], p_h[7]},\n new int[] {\n Integer.parseInt(p_h[0]),\n Integer.parseInt(p_h[1]),\n Integer.parseInt(p_h[2]),\n Integer.parseInt(p_h[3])\n },\n Integer.parseInt(p_h[8]),\n Integer.parseInt(p_h[9])\n ));\n }\n\n if (g.is_music) {\n g.sounds.music_1.setLooping(true);\n g.sounds.music_1.setVolume(g.music_volume);\n g.sounds.music_1.play();\n }\n\n }",
"public ParticleSystemPainter(EffectManager effectManager) {\r\n\t\tthis.effectManager = effectManager;\r\n\t}",
"public abstract void placeSmoke(ShortPoint2D position, boolean smokeOn);",
"public void act() \n {\n if (Greenfoot.mouseClicked(this))\n {\n Peter.lb=2; \n Greenfoot.playSound(\"click.mp3\");\n Greenfoot.setWorld(new StartEngleza());\n };\n }",
"public void onUpdate() {\n super.onUpdate();\n\n if (this.world.isRemote) {\n double d0 = this.posX + (this.rand.nextDouble() * 2.0D - 1.0D) * (double) this.width * 0.5D;\n double d1 = this.posY + 0.05D + this.rand.nextDouble() * 1.0D;\n double d2 = this.posZ + (this.rand.nextDouble() * 2.0D - 1.0D) * (double) this.width * 0.5D;\n //double d3 = (this.rand.nextDouble() * 2.0D - 1.0D) * 0.3D;\n double d4 = this.rand.nextDouble() * 0.1D;\n //double d5 = (this.rand.nextDouble() * 2.0D - 1.0D) * 0.3D;\n this.world.spawnParticle(ticksExisted % 2 == 0 ? EnumParticleTypes.FLAME : EnumParticleTypes.SMOKE_NORMAL, d0, d1, d2, 0, d4, 0);\n } else if (--this.lifeTicks < 0) {\n this.setDead();\n }\n }",
"public void draw(Position p, TETile te) {\n world[p.x][p.y] = te;\n }",
"public void doExplosionB(boolean spawnParticles) {\n this.world.playSound((EntityPlayer) null, this.x, this.y, this.z, SoundEvents.ENTITY_GENERIC_EXPLODE, SoundCategory.BLOCKS, 4.0F, (1.0F + (this.world.rand.nextFloat() - this.world.rand.nextFloat()) * 0.2F) * 0.7F);\n\n if (world instanceof WorldServer) {\n if (this.size >= 2.0F) {\n ((WorldServer) world).spawnParticle(EnumParticleTypes.EXPLOSION_HUGE, true, this.x, this.y, this.z, 2, 0, 0, 0, 0d);\n } else {\n ((WorldServer) world).spawnParticle(EnumParticleTypes.EXPLOSION_LARGE, true, this.x, this.y, this.z, 2, 0, 0, 0, 0d);\n }\n }\n\n }",
"private void diplay() {\n\t\tSystem.out.println(new StringBuilder(HUMIDITY_CONSTANT + humidity + TEMPRETURE_CONSTANT + temp\n\t\t\t\t+ PRESSURE_CONSTANT + pressure));\n\n\t}",
"EffectCommandPluto(Field field, Point aster) {\r\n\t\tthis.aster = aster;\r\n\t}",
"@Override\r\n public void show()\r\n {\r\n // De inmediato, ponemos en marcha una melodia\r\n if (!juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).isPlaying())\r\n {\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).play();\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).setLooping(true);\r\n }\r\n }",
"@Override\n public void show() {\n player = new Player(game.getAssetManager().get(\"player.png\", Texture.class), world, new Vector2(1, 2));\n floor = new Floor(game.getAssetManager().get(\"floor.png\", Texture.class), world, new Vector2(0, 0 + 0.5f), 20f, 1f);\n hud = new HUD();\n\n stage.addActor(floor);\n stage.addActor(player);\n\n //TODO: AUTOGENERATE when the player goes up.\n platforms.clear();\n int ax = (int) (Math.random() * 5 + 0);\n platforms.add(new Platform(game.getAssetManager().get(\"platform.png\", Texture.class), world, new Vector2(ax, 3), 1.2f, 0.3f));\n for (int i = 3; i <= 25; i++) {\n\n int x, y;\n x = (int) (Math.random() * 4.5 + 0.5);\n y = ((int) (Math.random() * 3 + 1)) + i;\n\n while ((x < ax && x > ax + 1f) && (x > ax && x < ax - 1f)) {\n x = (int) (Math.random() * 4.5 + 0.5);\n }\n Gdx.app.log(\"kk\",x+\"x\"+y);\n platforms.add(new Platform(game.getAssetManager().get(\"platform.png\", Texture.class), world, new Vector2(x, y), 1f, 0.3f));\n ax = x;\n }\n\n for (Platform platform : platforms) {\n stage.addActor(platform);\n }\n\n stage.getCamera().position.set(cameraInitialPosition);\n stage.getCamera().update();\n\n playing = false;\n jumps = 0;\n lastPlatformTouched = 0;\n\n song.play();\n\n }",
"private void draw() {\n ctx.clearRect(0, 0, width, height);\n\n for (ImageParticle p : particles) {\n p.opacity = p.remainingLife / p.life * 0.5;\n\n // Draw particle from image\n ctx.save();\n ctx.translate(p.x, p.y);\n ctx.scale(p.size, p.size);\n //ctx.translate(p.image.getWidth() * (-0.5), p.image.getHeight() * (-0.5));\n ctx.translate(-HALF_WIDTH, -HALF_HEIGHT);\n ctx.setGlobalAlpha(p.opacity);\n ctx.drawImage(p.image, 0, 0);\n ctx.restore();\n\n //p.remainingLife--;\n p.remainingLife *= 0.98;\n //p.size *= 0.99;\n p.x += p.vX;\n p.y += p.vY;\n\n //regenerate particles\n if (p.remainingLife < 0 || p.size < 0 || p.opacity < 0.01) {\n if (running) {\n p.reInit();\n } else {\n particles.remove(p);\n }\n }\n }\n }",
"@Override\n\tprotected void onInitializeParticle(final Particle pParticle, final float pAlpha) {\n\t\tpParticle.setAlpha(pAlpha);\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\tcontainer = new Table();\n//\t\tcontainer.background(skin.getDrawable(\"darkenWorld\"));\n\t\tcontainer.setSize(width, height);\n\t\t\n\t\tdarken = new Image(skin.getDrawable(\"darkenWorld\"));\n\t\tdarken.setSize(width, height);\n\t\t\n\t\ttimer.start();\n\t\t\n\t\ttrainingBag = new TrainingBag(width, height);\n\t\t\n\t\tBitmapFont font = new BitmapFont(Gdx.files.internal(\"fontSmall-export.fnt\"),\n\t\t Gdx.files.internal(\"fontSmall-export.png\"), false);\n\t\t\n\t\t\n\t\tLabelStyle labelStyle = new LabelStyle();\n\t\tlabelStyle.font = font;\n\t\t\n\t\ttimeLeft = new Label(timeString + \" 20\", labelStyle);\n\t\ttimeLeft.setPosition(width - timeLeft.getWidth(), height - timeLeft.getHeight());\n\t\t\n\t\thits = new Label(hitsString + \"0\" + amountString, labelStyle);\n\t\thits.setPosition(0, height - timeLeft.getHeight());\n\t\t\n\t\t\n\t\tcontainer.row();\n\t\tcontainer.add(trainingBag);\n\t\t\n\t\tgroup.addActor(darken);\n\t\tgroup.addActor(container);\n\t\tgroup.addActor(timeLeft);\n\t\tgroup.addActor(hits);\n\t}",
"@Override\n\tpublic void show() {\n\t\tworld = new Worlds();\n\t\trenderer = new WorldRenderer(world, false);\n\t\tcontroller = new WorldController(world);\n\t\tGdx.input.setInputProcessor(this);\n\t}",
"public void spawnExplosion(Point3d location, double strength, boolean flames){\r\n\t\tworld.newExplosion(null, location.x, location.y, location.z, (float) strength, flames, ConfigSystem.configObject.general.blockBreakage.value);\r\n\t}",
"public void poke(int mouse_x, int mouse_y) {\n\t\tint distance = 0;\n\t\tint i=0;\n\t\tfor (Particle p : pm.particlesystem) {\n\t\t\t//distance = p.getDistance(mouse_x, mouse_y);\n\t\t\tif(distance <= orad+200){//Ändern!\n\t\t\t\tSystem.out.println(i);\n\t\t\t\tparticle = p;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Poke erkannt!\");\n\t\tSystem.out.println(particle.getSpeed(0));\n\t\tSystem.out.println(particle.getSpeed(1));\n\t\tparticle.setSpeed(20, 20);\n\t\t\n\t\t\n\t\tSystem.out.println(particle.getSpeed(0));\n\t\tSystem.out.println(particle.getSpeed(1));\n\t\t\n\t\t\n//\t\tfor(int i = 0; i < 100; i++){\n//\t\t\tTestController.wait(300);\n//\t\t\tgui.repaint();\n//\t\t}\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\tSystem.out.println(\"SHOWWWW_ACCUEIL\");\n\t\tMusicManager.playLoop(typeSong.accueil);\n\t\tfond = new Texture(Gdx.files.internal(LauncherScreen.accueil));\n\t\tbatch = new SpriteBatch();\n\t\tGdx.input.setInputProcessor(this.inputHandler());\n\t}",
"private static void createNewParticles(int number) {\n\t\t// The following declarations are to initialize the random range for the \n\t\t// particle's feature\n\t\tint maxX = Fountain.positionX + 3;\n\t\tint minX = Fountain.positionX - 3;\n\t\tint boundX = maxX - minX;\n\t\tint maxY = Fountain.positionY + 3;\n\t\tint minY = Fountain.positionY - 3;\n\t\tint boundY = maxY - minY;\n\t\t\n\t\tint particleCount = 0; // For counting the new particles' amount\n\n\t\t\n\t\t\tfor (int i = 0; i < particles.length; i++) {\n\t\t\t\tif (particles[i] == null) {\n\t\t\t\t\t++particleCount;\n\t\t\t\t\t\n\t\t\t\t\t// Following codes are to prepare the setting for the particle\n\t\t\t\t\tint positionX = randGen.nextInt(boundX + 1) + maxX;\n\t\t\t\t\tint positionY = randGen.nextInt(boundY + 1) + maxY;\n\t\t\t\t\tfloat xVelocity = -1 + randGen.nextFloat() * (2);\n\t\t\t\t\tfloat yVelocity = -10 + randGen.nextFloat() * (5);\n\t\t\t\t\tfloat amount = randGen.nextFloat() * 1;\n\t\t\t\t\tint color = Utility.lerpColor(Fountain.startColor, Fountain.endColor, amount);\n\t\t\t\t\tfloat size = randGen.nextFloat() * (11 - 4);\n\t\t\t\t\tint age = randGen.nextInt(40 + 1);\n\t\t\t\t\tint transparency = randGen.nextInt((96)) + 32;\n\t\t\t\t\t\n\t\t\t\t\t// TO set the new particle with random feature\n\t\t\t\t\tparticles[i] = new Particle();\n\t\t\t\t\tparticles[i].setPositionX(positionX);\n\t\t\t\t\tparticles[i].setPositionY(positionY);\n\t\t\t\t\tparticles[i].setVelocityX(xVelocity);\n\t\t\t\t\tparticles[i].setVelocityY(yVelocity);\n\t\t\t\t\tparticles[i].setSize(size);\n\t\t\t\t\tparticles[i].setColor(color);\n\t\t\t\t\tparticles[i].setAge(age);\n\t\t\t\t\tparticles[i].setTransparency(transparency);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Once after creating 10 new particles, ends this method\n\t\t\t\tif (particleCount >= number) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"@Override\r\n\tpublic void show() {\n\t\t\r\n\t\t\r\n\t}",
"public interface Particle extends VisualValue, Point\n{\n}",
"@Override\r\n\tpublic void show() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void show() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void show() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void show() {\n\t\tint Width = Gdx.graphics.getWidth();\r\n\t\tint Height = Gdx.graphics.getHeight();\r\n\t\t\r\n\t\tcamera = new OrthographicCamera(Width,Height);\r\n\t\tbatch = new SpriteBatch();\r\n\t\t\r\n\t\tballspell = new BallTargetSpell(tweenManager);\r\n\t\t\r\n\t\tTween.setWaypointsLimit(10);\r\n\t\tTween.registerAccessor(Sprite.class, new SpriteAccessor());\r\n\t\tGdx.input.setInputProcessor(inputProcessor);\r\n\t}",
"public PotionEffect(int id, int duration, int amplifier, boolean ambient, boolean showParticles)\r\n/* 26: */ {\r\n/* 27: 36 */ this.id = id;\r\n/* 28: 37 */ this.duration = duration;\r\n/* 29: 38 */ this.amplifier = amplifier;\r\n/* 30: 39 */ this.ambient = ambient;\r\n/* 31: 40 */ this.showParticles = showParticles;\r\n/* 32: */ }",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"private void play(Player p){\r\n\t\tSystem.out.println(\"What pet would you like to play with?\");\r\n\t\tint c = 1;\r\n\t\tArrayList<Toy> toys = p.getToys();\r\n\r\n\t\tfor(Pet pet : p.getPets()){\r\n\t\t\tSystem.out.println(c + \". \" + pet.getPetname());\r\n\t\t\tc++;\r\n\t\t}\r\n\t\tint selectedpetindex = getNumber(1, p.getPets().size());\r\n\t\tPet selectedpet = p.getPets().get(selectedpetindex - 1);\r\n\t\tSystem.out.println(\"What toy do you want to use to play with \" + selectedpet.getPetname());\r\n\r\n\t\tc = 1;\r\n\t\tfor(Toy t : toys){\r\n\t\t\tSystem.out.println(c + \". \" + t.getName());\r\n\t\t\tc++;\r\n\t\t}\r\n\t\tint toyindex = getNumber(1, toys.size());\r\n\t\tToy selectedtoy = toys.get(toyindex);\r\n\r\n\t\tselectedpet.play(selectedtoy);\r\n\t\tselectedtoy.setDurability(selectedtoy.getDurability() - selectedpet.getRoughness());\r\n\r\n\t\tif(selectedtoy.getDurability() < 1){\r\n\t\t\ttoys.remove(toyindex);\r\n\t\t}else{\r\n\t\t\ttoys.set(toyindex, selectedtoy);\r\n\t\t}\r\n\r\n\t\tp.setToys(toys);\r\n\t\tp.setActions(p.getActions() - 1);\r\n\t}",
"@Override\n\tpublic void show()\n\t{\n\t\tsuper.show();\n\t\tSystem.out.println(\"with a pistol\");\n\t}",
"public void vertex(PointType p)\r\n\t{\r\n\t // System.out.println(\"vert: \"+p.x+\", \"+p.y+\", \"+p.z);\r\n\t\tgl.glVertex3d(p.x, p.y, p.z);\r\n\t}"
] |
[
"0.7332679",
"0.73198223",
"0.6678613",
"0.6677359",
"0.6485583",
"0.64844465",
"0.6409122",
"0.6384558",
"0.6371494",
"0.62813187",
"0.62638944",
"0.62533873",
"0.6213498",
"0.5908226",
"0.5849058",
"0.5773498",
"0.57701695",
"0.5718345",
"0.5702032",
"0.5676386",
"0.5654341",
"0.5607851",
"0.5606423",
"0.5591166",
"0.5581765",
"0.55613846",
"0.55350405",
"0.55180895",
"0.54840106",
"0.5469666",
"0.5458545",
"0.54351366",
"0.54312575",
"0.5400391",
"0.5394814",
"0.53792953",
"0.53468937",
"0.53381234",
"0.5337733",
"0.5328558",
"0.5327332",
"0.53212905",
"0.52939713",
"0.5292118",
"0.52822065",
"0.526236",
"0.5255663",
"0.5237599",
"0.52078414",
"0.5206003",
"0.52033657",
"0.51998585",
"0.5178719",
"0.51732415",
"0.5154296",
"0.5153292",
"0.51473147",
"0.514414",
"0.51421034",
"0.51368374",
"0.5112951",
"0.5108135",
"0.5108135",
"0.5108135",
"0.5108135",
"0.5108135",
"0.5108135",
"0.5108135",
"0.5108135",
"0.5108135",
"0.5108135",
"0.5108135",
"0.5108135",
"0.5108135",
"0.5108135",
"0.5108135",
"0.50994307",
"0.50968146",
"0.5077628",
"0.5076114",
"0.5074046",
"0.50703835",
"0.50612223",
"0.5051407",
"0.5050205",
"0.5050205",
"0.5050205",
"0.5044464",
"0.5032205",
"0.5032085",
"0.5032085",
"0.5032085",
"0.5032085",
"0.5032085",
"0.5032085",
"0.5032085",
"0.5032085",
"0.502214",
"0.5017519",
"0.5017341"
] |
0.7557621
|
0
|
Creates a new instance of the PointRecord class.
|
public PointRecord(){
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Point() {\n }",
"public Point() {\n }",
"@Override\r\n\tpublic Point getPoint(String pointRecord) {\r\n\r\n\t\ttry {\r\n\t\t\tString fieldSeparator = \" \";\r\n\r\n\t\t\t// parse data from vector\r\n\t\t\tStringTokenizer st = new StringTokenizer(pointRecord);\r\n\t\t\tPoint point = new Point();\r\n\t\t\tString[] data = new String[5];\r\n\t\t\tint i = 0;\r\n\t\t\twhile (st.hasMoreTokens()) {\r\n\t\t\t\tdata[i] = st.nextToken(fieldSeparator);\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\t// set point data\r\n\t\t\tpoint.setName(data[0]);\r\n\t\t\tpoint.setFirstCoordinate(Integer.parseInt(data[1]));\r\n\t\t\tpoint.setSecondCoordinate(Integer.parseInt(data[2]));\r\n\t\t\tpoint.setThirdCoordinate(Integer.parseInt(data[3]));\r\n\t\t\tpoint.setFourthCoordinate(Integer.parseInt(data[4]));\r\n\r\n\t\t\treturn point;\r\n\t\t} catch (Exception ex) {\r\n\t\t\tSystem.out.println(\"Invalid record : \" + pointRecord + \" . This record will be ignored.\");\r\n\t\t\tLogger.getLogger().severe(\"Invalid record : \" + pointRecord + \" . This record will be ignored.\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"Point createPoint();",
"public static Points createEntity() {\n Points points = new Points()\n .date(DEFAULT_DATE)\n .exercise(DEFAULT_EXERCISE)\n .meals(DEFAULT_MEALS)\n .alcohol(DEFAULT_ALCOHOL)\n .notes(DEFAULT_NOTES);\n return points;\n }",
"public Point()\n\t{ \n\t\t// Instantiate default properties\n\t\tx = 0;\n\t\ty = 0;\n\t}",
"Point()\n\t{\n\t\t//default point\n\t\t//this = properties of this object we are working with\n\t\tthis.x=0;\n\t\tthis.y=0;\n\t\tcountOfPoints++;\n\t}",
"public Point(Point point) {\n super(point.getReferenceX(), point.getReferenceY());\n this.x = point.x;\n this.y = point.y;\n this.setHeight(point.getHeight());\n }",
"public PersonRecord() {}",
"public Point(Point point) {\n this.x = point.x;\n this.y = point.y;\n }",
"public Point(){\n this.x = 0;\n this.y = 0;\n }",
"public FieldPoint(double x, double y) {\n setX(x);\n setY(y);\n }",
"public FieldPoint() {\n setX( DEFAULT_VALUE );\n setY( DEFAULT_VALUE );\n }",
"public NotifyPointerRecord() {\n\t\tsuper(NotifyPointer.NOTIFY_POINTER);\n\t}",
"Point() {\n this.x = 0;\n this.y = 0;\n }",
"public PrecisePoint() {\n }",
"public Point() {\n\t\tthis.hasSrsName = false;\n\t}",
"Point() {\n\t\tthis.x = 0;\n\t\tthis.y = 0;\n\t}",
"public FieldPoint(FieldPoint fieldPoint) {\n setX( fieldPoint.getX() );\n setY( fieldPoint.getY() );\n }",
"private Record parseRecord(final String[] record) {\n final Record object = this.recordFactory.createRecord(this.recordDefinition);\n for (int i = 0; i < this.recordDefinition.getFieldCount(); i++) {\n String value = null;\n if (i < record.length) {\n value = record[i];\n if (value != null) {\n final DataType dataType = this.recordDefinition.getFieldType(i);\n final Object convertedValue = StringConverterRegistry.toObject(\n dataType, value);\n object.setValue(i, convertedValue);\n }\n }\n }\n if (this.hasPointFields) {\n final Double x = Maps.getDouble(object, this.pointXFieldName);\n final Double y = Maps.getDouble(object, this.pointYFieldName);\n if (x != null && y != null) {\n final Geometry geometry = this.geometryFactory.point(x, y);\n object.setGeometryValue(geometry);\n }\n }\n return object;\n }",
"public GeoPoint(Geometry geometry, Point3D point) {\n\tsuper();\n\tthis.geometry = geometry;\n\tthis.point = point;\n}",
"public MyPoint1 (double x, double y) {}",
"public RecordRecord() {\n\t\tsuper(org.jooq.examples.cubrid.demodb.tables.Record.RECORD);\n\t}",
"public Point() {\n\t\tthis.x = 0;\n\t\tthis.y = 0;\n\t}",
"public PointOfInterest() {\n }",
"@Override\n public MapPoint clone(){\n MapPoint pl = new MapPoint();\n pl.setId(this.pointId);\n pl.setX(this.pointX);\n pl.setY(this.pointY);\n pl.setTags(this.tags);\n return pl;\n }",
"public LocationPoint(){\n this.mLocationID = UUID.randomUUID();\n }",
"public Point(Point obj)\n\t{\n\t\t// Instantiate properties with parameter values \n\t\tthis.x = obj.x;\t\t\t\t\t\t\t\t\t\t\t\t// Shallow copy point's x-coordinate\t\n\t\tthis.y = obj.y;\t\t\t\t\t\t\t\t\t\t\t\t// Shallow copy point's y-coordinate\n\t}",
"public Point(Point p)\r\n\t{\r\n\t\tx = p.x;\r\n\t\ty = p.y;\r\n\t}",
"public Point(Vector position) {\n\t\tthis(position, 5.0);\n\t}",
"public CheckpointRecord(BasicLogRecord rec) {\r\n\t\tint txCount = (Integer) rec.nextVal(INTEGER).asJavaVal();\r\n\t\tthis.lsn = rec.getLSN();\r\n\t\tthis.txNums = new ArrayList<Long>();\r\n\t\tfor (int i = 0; i < txCount; i++) {\r\n\t\t\ttxNums.add((Long) rec.nextVal(BIGINT).asJavaVal());\r\n\t\t}\r\n\t}",
"@Test\n\tpublic void testCreation() {\n\n\t\tnew Point(20, 10).save();\n\n\t\tList<Point> points = Point.findByAll();\n\n\t\tassertEquals(1, points.size());\n\t\tassertEquals(points.get(0).x, 20);\n\t\tassertEquals(points.get(0).y, 10);\n\n\t}",
"public Point()\r\n\t{\r\n\t\tx = y = 0;\r\n\t}",
"Point(int x_, int y_){\n x = x_;\n y = y_;\n }",
"public Point(double x, double y){\n this.x = x;\n this.y = y;\n }",
"public Point(double x, double y) {\r\n this.x = x;\r\n this.y = y;\r\n }",
"public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }",
"public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }",
"public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }",
"public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }",
"public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }",
"public LocationPoint(int type, long trailDBId, String latitude, String longitude, String title, String description) {\n this.latitude = latitude;\n this.longitude = longitude;\n this.type = type;\n this.title = title;\n this.description = description;\n this.trailDBId = trailDBId;\n }",
"Point(Double x, Double y) {\n\t\tthis.setX(x);\n\t\tthis.setY(y);\n\t}",
"public Point() {\n this.x = Math.random();\n this.y = Math.random();\n }",
"public com.vodafone.global.er.decoupling.binding.request.PricePointType createPricePointType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.PricePointTypeImpl();\n }",
"@Override\n public Class<AnchorPointsRecord> getRecordType() {\n return AnchorPointsRecord.class;\n }",
"public Point(double x, double y) {\r\n\t\t//Constructors\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}",
"public Point(int x, int y)\n\t{\n\t\t// Instantiate properties with parameter values \n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}",
"public static Point createPoint(double x, double y) {\n Point point = new Point();\n point.setX(x);\n point.setY(y);\n\n return point;\n }",
"public Point(double x, double y) {\n this.xPosition = x;\n this.yPosition = y;\n }",
"public Point(double x, double y){\n\t\tsuper();\n\t\tthis.x = x; \n\t\tthis.y = y;\n\t}",
"public PrecisePoint(double x, double y) {\n this.x = x;\n this.y = y;\n }",
"public CheckpointRecord() {\r\n\t\tthis.txNums = new ArrayList<Long>();\r\n\t}",
"public Point(double x, double y) {\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t}",
"public PointSET() {\n pointSet = new SET<Point2D>();\n }",
"public Point(double a, double b) {\n this.x = a;\n this.y = b;\n }",
"public Point(int x, int y) {\n /* DO NOT MODIFY */\n this.x = x;\n this.y = y;\n }",
"public Point(int x, int y) {\n /* DO NOT MODIFY */\n this.x = x;\n this.y = y;\n }",
"public Point(int x, int y) {\n /* DO NOT MODIFY */\n this.x = x;\n this.y = y;\n }",
"public ParkingSpot createSpot() {\n ParkingSpot spot = new ParkingSpot();\n spot.setTime(time);\n spot.setId(id);\n spot.setLongitude(longitude);\n spot.setLatitude(latitude);\n spot.setAccuracy(accuracy);\n return spot;\n }",
"public Point(int x, int y) {\r\n this.x = x;\r\n this.y = y;\r\n }",
"public Point(int x,int y){\r\n\t\tthis.pos = x;\r\n\t\tthis.id = y;\r\n\t}",
"public Point getTestPoint() {\n WKTReader reader = new WKTReader();\n try {\n Point point = (Point) reader.read(TEST_POINT_WKT);\n point.setSRID(getTestSrid());\n return point;\n } catch (ParseException e) {\n throw new RuntimeException(e);\n }\n }",
"public Point(int x, int y) {\n this.x = x;\n this.y = y;\n }",
"protected Point(double x, double y) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}",
"public PointSET() {\n\n point2DSET = new SET<>();\n }",
"public Point(float x, float y)\n {\n this.x = x;\n this.y = y;\n }",
"public ARecord() {\n super(A.A);\n }",
"public org.astrogrid.stc.coords.v1_10.beans.Double3Type addNewPoint()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.astrogrid.stc.coords.v1_10.beans.Double3Type target = null;\n target = (org.astrogrid.stc.coords.v1_10.beans.Double3Type)get_store().add_element_user(POINT$0);\n return target;\n }\n }",
"public Point(String name, int x, int y) {\n setName(name);\n setX(x);\n setY(y);\n }",
"private GoodPoint(double x, double y) {\n this.x = x;\n this.y = y;\n }",
"public Point(int x, int y)\r\n\t{\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}",
"public Point(int x, int y){\n this.x = x;\n this.y = y;\n }",
"public Point(Point other) {\n super(other);\n this.x = other.x;\n this.y = other.y;\n this.activity = other.activity;\n this.frame = other.frame;\n this.trajectoryid = other.trajectoryid;\n }",
"public Vec4 expectPoint() {\n if(!isPoint()) throw new IllegalArgumentException(\"expected point: \" + this);\n return this;\n }",
"public AnchorPoints() {\n this(DSL.name(\"b2c_anchor_points\"), null);\n }",
"public MyPoint1(double x, int y) {\n this.x = x;\n this.y = y;\n }",
"public LocationPoint(int type, long trailDBId, String latitude, String longitude, String title, String description, String imageUri) {\n this.latitude = latitude;\n this.longitude = longitude;\n this.type = type;\n this.title = title;\n this.description = description;\n this.trailDBId = trailDBId;\n this.imageUri = imageUri;\n }",
"public Point(int x, int y) {\n /* DO NOT MODIFY */\n this.x = x;\n this.y = y;\n SLOPE_ORDER = new SlopeOrder();\n }",
"public MetricSchemaRecord() { }",
"public Point(int x, int y) {\r\n\t\tthis.x = x;\tthis.y = y;\r\n\t}",
"public Point(int x, int y) {\n\t\tsuper();\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}",
"public LocationPoint(UUID mLocationID) {\n this.mLocationID = mLocationID;\n }",
"PointDouble() {\n x = y = 0.0;\n }",
"public Point(int x, int y) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}",
"public Point(int x, int y) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}",
"public Point(int x, int y) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}",
"public PointSET() { // construct an empty set of points\n\n }",
"public Point(String str) {\n String[] parsed = str.substring(1,-1).split(\" \");\n setName(parsed[0]);\n setX(Integer.parseInt(parsed[1]));\n setY(Integer.parseInt(parsed[2]));\n }",
"void addRecord(DistRecord record, boolean persistPoints);",
"public PointItem(int x, int y) {\r\n\r\n\t\tthis.x = (int) x;\r\n\t\tthis.y = (int) y;\r\n\t\t\r\n\r\n\t}",
"public Point(int x, int y){\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}",
"public Point(int x, int y){\n\t\tthis.x=x; this.y=y;\n\t}",
"public AKeyCallPoint() {\n\t\t\t\tthis.name = \"\";\n\t\t\t\tthis.longitude = \"0.0\";\n\t\t\t\tthis.latitude = \"0.0\";\n\t\t\t}",
"public Point(float x, float y, int id) {\r\n super(x, y, 0);\r\n this.xf = x;\r\n this.yf = y;\r\n this.x = x;\r\n this.y = y;\r\n this.z = 0;\r\n this.id = id;\r\n }",
"public Point(double xCoordinate, double yCoordinate){\r\n\t\tthis.xCoordinate = xCoordinate;\r\n\t\tthis.yCoordinate = yCoordinate;\r\n\t}",
"public Point(int y, int x)\n\t\t{\n\t\t\tthis.y = y;\n\t\t\tthis.x = x;\n\t\t}",
"public PointSET() {\n points = new SET<Point2D>();\n }",
"private Point(int param, double value) {\r\n this(param, value, false);\r\n }",
"P createP();"
] |
[
"0.6585782",
"0.6585782",
"0.65747875",
"0.6281532",
"0.61590147",
"0.6112901",
"0.60574925",
"0.60321575",
"0.60234153",
"0.60057306",
"0.59572184",
"0.5900534",
"0.5897679",
"0.58637",
"0.5862979",
"0.5852873",
"0.5852245",
"0.58315027",
"0.5830728",
"0.57791394",
"0.5721634",
"0.5720998",
"0.5720247",
"0.5713259",
"0.57008886",
"0.5700875",
"0.56991404",
"0.5681704",
"0.5681683",
"0.56762725",
"0.56515145",
"0.5641312",
"0.5639211",
"0.5630296",
"0.56296474",
"0.5595279",
"0.55867773",
"0.55867773",
"0.55867773",
"0.55867773",
"0.55867773",
"0.5573188",
"0.55695957",
"0.5555661",
"0.55513275",
"0.5541859",
"0.55365133",
"0.55360854",
"0.5531152",
"0.55152494",
"0.54870063",
"0.54772735",
"0.54573977",
"0.54448485",
"0.5428435",
"0.5426036",
"0.5386576",
"0.5386576",
"0.5386576",
"0.5384618",
"0.5380349",
"0.5374595",
"0.53714216",
"0.5370815",
"0.5366981",
"0.5363643",
"0.5360332",
"0.53582364",
"0.5357804",
"0.53553563",
"0.5345497",
"0.5338311",
"0.5338277",
"0.53348356",
"0.53230053",
"0.53159493",
"0.53011787",
"0.5293758",
"0.5290936",
"0.5287159",
"0.5286217",
"0.5284252",
"0.5276166",
"0.52692235",
"0.5261168",
"0.5261168",
"0.5261168",
"0.5250171",
"0.5248468",
"0.5231013",
"0.5227479",
"0.52162075",
"0.5209944",
"0.52063894",
"0.5185137",
"0.51778674",
"0.51765627",
"0.51748747",
"0.5173189",
"0.5165679"
] |
0.81916827
|
0
|
returns the image depending on the index of the image selected
|
private int getInstr(int index) {
switch (index) {
case 0:
return R.drawable.chickpeacurry;
case 1:
return R.drawable.sweetpotatoblackbeanburger;
case 2:
return R.drawable.cabbagedietsoup;
case 3:
return R.drawable.instantpotvegetablesoup;
case 4:
return R.drawable.veganpumpkinsoup;
default:
return -1;
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"BufferedImage getSelectedImage();",
"public void getImage(int index) {\n\t\tcurrentIndex = index;\n Intent pickPhoto = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(pickPhoto, 1);//one can be replaced with any action code\n }",
"public YuiImage getSelectedImg() {\r\n\t\treturn selectedImg;\r\n\t}",
"private Image getImage(boolean isSelected) {\n\t\tString key = isSelected ? CHECKED_IMAGE : UNCHECKED_IMAGE;\n\t\treturn imageRegistry.get(key);\n\t}",
"public ImageObj currentImage() {\n if (model.getImageList().size() == 0) {\n noImages = true;\n return new ImageObj(\"http://www.xn--flawiler-fachgeschfte-n2b.ch/wp-content/uploads/2016/09/sample-image.jpg\", \"No Image\");\n }\n return model.getImageList().get(position);\n }",
"public ImageFlowItem getSelectedValue()\r\n {\r\n if (getAvatars() == null || getAvatars().isEmpty() || getSelectedIndex() >= getAvatars().size() || getSelectedIndex() < 0)\r\n {\r\n return null;\r\n }\r\n\r\n return getAvatars().get(getSelectedIndex());\r\n }",
"public int getImage();",
"private Image getCurrentPicture(){\r\n\t\tif (i >= images.size()) {\r\n\t\t\ti = 0;\r\n\t\t}else if(i<0){\r\n\t\t\ti = images.size() -1;\r\n\t\t}\r\n\t\treturn new Image(images.get(i).getUrl());\r\n\t}",
"protected int getImageIndex() {\n/* 216 */ return this.mlibImageIndex;\n/* */ }",
"int getSrcId(int index);",
"void selectImage(String path);",
"String avatarImageSelected();",
"private void findSelectedImageEntry() {\n\t\tPanImageEntry oldSelected = selectedPanImageEntry;\n\t\tPanImageEntry panImageEntry = findPanImageEntryClosestToCenter();\n\t\tif ((panImageEntry != null) && (panImageEntry != oldSelected)) {\n\t\t\tselectedPanImageEntry = panImageEntry;\n\t\t\teditor.setSelectedImage(selectedPanImageEntry.imageListEntry, false);\n\t\t}\n\t}",
"public YuiImage getSelectedImgOver() {\r\n\t\treturn selectedImgOver;\r\n\t}",
"@Override\r\n\tpublic ArrayList<theaterImageVo> selectImageView(int bnum) {\n\t\treturn theaterRentalDaoImpl.selectImageView(bnum);\r\n\t}",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByHandler(int index);",
"int getSelectedSpriteValue();",
"public Image getPokeImg(int index) {\n\t\treturn pokemonImgs[index];\n\t}",
"static int getIndexSelected() {\n return indexSelected;\n }",
"private int seleccionarImagenPago(int position){\n if(pedido.get(position).getCategoria().equalsIgnoreCase(\"dinero\")){\n return R.drawable.amigos;\n }else if (pedido.get(position).getCategoria().equalsIgnoreCase(\"favor\")){\n return R.drawable.herramientas;\n }\n\n return 0;\n }",
"public ImageIcon getSelectionHandlerImageIcon();",
"@Override\r\n\tpublic ArrayList<theaterImageVo> selectImage() {\n\t\treturn theaterRentalDaoImpl.selectImage();\r\n\t}",
"public int getSelectedIndex()\r\n {\r\n return avatarIndex;\r\n }",
"public Point findImage(BufferedImage image, int index) {\n int smallWidth = image.getWidth();\n int smallHeight = image.getHeight();\n int[][] smallPixels = new int[smallWidth][smallHeight];\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n smallPixels[x][y] = image.getRGB(x, y);\n }\n }\n boolean good;\n int count = 0;\n for(int X = 0; X <= bigWidth - smallWidth; X++) {\n for(int Y = 0; Y <= bigHeight - smallHeight; Y++) {\n good = true;\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n if(smallPixels[x][y] != bigPixels[X + x][Y + y]) {\n good = false;\n break;\n }\n }\n if(!good) {\n break;\n }\n }\n if(good) {\n if(count == index) {\n return(new Point(X, Y));\n }\n count++;\n }\n }\n }\n return(null);\n }",
"private File getNextPicture() {\r\n File retVal = null;\r\n\r\n if (listFiles.size() > 0) {\r\n if (fileList.getSelectedIndex() == listFiles.size() - 1) {\r\n retVal = listFiles.get(0);\r\n fileList.setSelectedIndex(0);\r\n } else {\r\n retVal = listFiles.get(fileList.getSelectedIndex() + 1);\r\n fileList.setSelectedIndex(fileList.getSelectedIndex() + 1);\r\n }\r\n }\r\n\r\n return retVal;\r\n }",
"public int getSelectionIndex () {\r\n\tcheckWidget();\r\n\tint [] args = {OS.Pt_ARG_PG_CURRENT_INDEX, 0, 0};\r\n\tOS.PtGetResources (handle, args.length / 3, args);\r\n\treturn args [1] == OS.Pt_PG_INVALID ? -1 : args [1];\r\n}",
"public Bitmap getImage(){\n return images[currentFrame];\n }",
"public Image getOne();",
"ImageViewTouchBase getMainImage();",
"private Image getImage(Proposal proposal, boolean selected) {\n\t\tif (proposal == null)\n\t\t\treturn null;\n\t\t// return labelProvider.getImage(proposal);\n\t\tif (proposal.isPartial() && partialContentImage != null)\n\t\t\treturn selected ? partialContentImageSelected : partialContentImage;\n\t\tif (proposal.isFunction() && functionContentImage != null)\n\t\t\treturn selected ? functionContentImageSelected : functionContentImage;\n\t\treturn null;\n\t}",
"public BufferedImage getImage(int index) {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\n\tRenderedImage img = ((ImageComponent3DRetained)this.retained).getImage(index);\n\tif ((img != null) && !(img instanceof BufferedImage)) {\n\t throw new IllegalStateException(J3dI18N.getString(\"ImageComponent3D9\"));\n\t}\n\treturn (BufferedImage) img;\n }",
"private int seleccionarImagenTipo(int position){\n if(pedido.get(position).getCategoria().equalsIgnoreCase(\"compañia\")){\n return R.drawable.amigos;\n }else if (pedido.get(position).getCategoria().equalsIgnoreCase(\"informatica\")){\n return R.drawable.ordenador;\n }else if (pedido.get(position).getCategoria().equalsIgnoreCase(\"clases\")){\n return R.drawable.clases;\n }else if (pedido.get(position).getCategoria().equalsIgnoreCase(\"menaje/hogar\")){\n return R.drawable.herramientas;\n }\n return 0;\n }",
"public ImageObj nextImage() {\n if (position == model.getImageList().size() - 1) {\n position = 0;\n }\n else {\n position++;\n }\n return model.getImageList().get(position);\n }",
"@Override\n public void onListSelection(int index) {\n temp = index;\n if (!mImageFragment.isAdded()) {\n FragmentTransaction fragmentTransaction = mFragmentManager\n .beginTransaction();\n fragmentTransaction.add(R.id.image_fragment_container, mImageFragment);\n fragmentTransaction.addToBackStack(null);\n fragmentTransaction.commit();\n mFragmentManager.executePendingTransactions();\n }\n\n if (mImageFragment.getShownIndex() != index) {\n mImageFragment.showImageAtIndex(index);\n }\n }",
"public Image getSeven();",
"protected final RenderedImage getSource(final int index) {\n if (sources != null) return sources[index];\n else throw new IndexOutOfBoundsException();\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByTransform(int index);",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n ImageView imageView=new ImageView(mContext);\n imageView.setImageResource(drawable1[position%drawable1.length]);\n//取余,让图片循环浏览\n\n if(selectItem==position){\n// Animation animation = AnimationUtils.loadAnimation(mContext, R.anim.my_scale_action); //实现动画效果\n Gallery.LayoutParams params = new Gallery.LayoutParams(width*3/5, 500);\n imageView.setLayoutParams(params);\n// imageView.startAnimation(animation); //选中时,这是设置的比较大\n }\n else{\n imageView.setLayoutParams(new Gallery.LayoutParams(width/5,400));\n//未选中\n }\n return imageView;\n }",
"public BufferedImage getRandomImage() {\n\n Random randomRow = new Random();\n int rowIndex = (randomRow.nextInt(16)) * 8;\n\n Random randomColumn = new Random();\n int columnIndex = (randomColumn.nextInt(16)) * 12;\n\n System.out.println(\"rowIndex = \" + rowIndex + \", columnIndex = \" + columnIndex);\n\n return input.getSubimage(rowIndex, columnIndex, subImageWidth, subImageHeight);\n }",
"public ImageObj prevImage() {\n if (position != 0) {\n position--;\n }\n else {\n position = model.getImageList().size() - 1;\n }\n\n return model.getImageList().get(position);\n }",
"@Override\n\tpublic ImgRep getRep(int num) {\n\t\treturn dao.select(num);\n\t}",
"public interface ImageSelectClicked {\n void clickImage(int position);\n}",
"int seachImage(Image img) {\r\n\t\treturn 1;\r\n\t}",
"private void selectImage() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(\n Intent.createChooser(\n intent,\n \"Select Image from here...\"),\n PICK_IMAGE_REQUEST);\n }",
"private File getPreviousPicture() {\r\n File retVal = null;\r\n\r\n if (listFiles.size() > 0) {\r\n if (fileList.getSelectedIndex() <= 0) {\r\n retVal = listFiles.get(listFiles.size() - 1);\r\n fileList.setSelectedIndex(listFiles.size() - 1);\r\n } else {\r\n retVal = listFiles.get(fileList.getSelectedIndex() - 1);\r\n fileList.setSelectedIndex(fileList.getSelectedIndex() - 1);\r\n }\r\n }\r\n\r\n return retVal;\r\n }",
"public void handleActionChosenImageView(MouseEvent event){\n Integer actionSelected = buttonAction.get(event.getSource());\n System.out.println(\"input sent from gameboard Controller : execute action \" + actionSelected.toString());\n sender.sendInput(\"execute action \" + actionSelected.toString());\n\n for (Map.Entry<Integer, ImageView> entry : coverImages.entrySet()) {\n\n entry.getValue().setVisible(false);\n }\n\n }",
"public Image getFour();",
"public RenderedImage getRenderedImage(int index) {\n\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_IMAGE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D3\"));\n\treturn ((ImageComponent3DRetained)this.retained).getImage(index);\n }",
"public int getSrcId(int index) {\n return instance.getSrcId(index);\n }",
"public Image getTwo();",
"public Image getImg(){\n\t\treturn imgs[count];\n\t}",
"PicInfo selectByPrimaryKey(Integer r_p_i);",
"String getItemImage();",
"public Image getSix();",
"public void changeImage(){\n if(getImage()==storeItemImg) setImage(selected);\n else setImage(storeItemImg);\n }",
"public Image getThree();",
"@Override\n\t\tpublic Object getItem(int position)\n\t\t{\n\t\t\treturn imageIds[position];\n\t\t}",
"public BufferedImage GetImage(String name) { return ImageList.get(name); }",
"@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\timgView.setImageResource(imageIds[position]);\n\t\t\t}",
"@Override\n\tpublic List<ImageVo> s_counselSubImage(int index) throws SQLException {\n\t\treturn sqlSession.selectList(\"yes.s_counselSubImage\", index);\n\t}",
"public Image getDefault(int player, boolean ep) {if (player==1) return defaultImg1; else return defaultImg2;}",
"public Image getEight();",
"public int getColorAt(float index){\n\n\t\tint i = Math.round((img.width-1)*index);\n\t\tint c = img.get(i,0);\n\t\treturn c;\n\n\t}",
"public View getView(int index, View view, ViewGroup viewGroup)\n {\n // TODO Auto-generated method stub\n ImageView img = new ImageView(context);\n\n //imageloader.DisplayImage(GlobalVariable.link+\"files/\"+array_image_id.get(index), R.drawable.ic_temp_logo, img);\n img.setLayoutParams(new Gallery.LayoutParams(200, 200));\n img.setScaleType(ImageView.ScaleType.FIT_XY);\n\n return img;\n }",
"public Image getFive();",
"@Override\n\tpublic List<ImageVo> c_counselSubImage(int index) throws SQLException {\n\t\treturn sqlSession.selectList(\"yes.c_counselSubImage\", index);\n\t}",
"public int getIconImageNumber(){return iconImageNumber;}",
"public void setCurrentImage(int index) {\n if ((index >= 0) && (index < mTexIdArray.length)) {\n mTexId = mTexIdArray[index];\n }\n }",
"public int getSelectedShapeIndex(){\n return this.selectedShapeIndex;\n}",
"java.lang.String getImage();",
"public Image getImage(int imageID) {\n\t if(imageID >= 0 && imageID < images.size()) {\n\t return images.get(imageID).getImage();\n\t }\n\t \n\t return null;\n\t}",
"public void selectImage(View view){\n Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n startActivityForResult(intent,PICK_IMAGE);\n }",
"@Override\n\tpublic ImageIcon getSelectedIcon() {\n\t\treturn new ImageIcon(highlightedImage);\n\t}",
"int getSelectedButton() {\n for (int i = 0; i < buttons.length; i++) {\n if (buttons[i].isSelected()) {\n return (i);\n }\n }\n return (-1);\n }",
"public BufferedImage open() {\n\t\tJFileChooser choose = new JFileChooser(); //Removed path from the chooser!\n\n\t\tif (choose.showOpenDialog(null) != JFileChooser.APPROVE_OPTION)\n\t\t\treturn null;\n\t\tString file = choose.getSelectedFile().getAbsolutePath();\n\t\ttry {\n\t\t\tthis.x = 0;\n\t\t\tthis.y = 0;\n\t\t\tFileInputStream fis = new FileInputStream(file); \n\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\t\t\tString iden = \"\";\n\t\t\tiden += ois.readChar();\n\t\t\tiden += ois.readChar();\n\t\t\tiden += ois.readChar();\n\t\t\t\n\t\t\tif (iden.compareTo(\"PPL\") != 0)\treturn null;\n\t\t\tbyte by = ois.readByte();\n\t\t\tSystem.out.println(by);\n\t\t\t\n\t\t\tswitch (by) {\n\t\t\t\tcase 0:\n\t\t\t\t\tthis.image = loadRGB(ois);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tthis.image = loadCMY(ois);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tthis.image = loadGS(ois);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tthis.image = loadBW(ois);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tthis.image = loadLT(ois);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tois.close();\n\t\t\t//int b = ois.readByte(); //lee 8 bits, lee -16, y no 240\n\t\t\t//si el bit mas significativo del byte antes de introducirse fue 1, el numero leido se interpreta como negativo\n\t\t\t//if(b < 0) b += 256; //para leer bytes sin signo\n\t\t\t//int i = ois.readInt(); //lee 32 bits, lee 3500\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn image;\n\t}",
"String getImage();",
"public View getView(int index, View view, ViewGroup viewGroup)\n {\n // TODO Auto-generated method stub\n ImageView i = new ImageView(mContext);\n\n// i.setImageResource(mImageIds.get(index));\n\n if(mImageIds.size() > 0 ){\n Picasso.with(mContext).load(mImageIds.get(index)).into(i);\n }\n\n\n i.setLayoutParams(new Gallery.LayoutParams(200, 200));\n\n i.setScaleType(ImageView.ScaleType.FIT_XY);\n\n\n return i;\n }",
"static public AppImage browseForImage() {\n // If there is no image ask the user to choose image from file:\n JFileChooser file_chooser = new JFileChooser();\n file_chooser.setAcceptAllFileFilterUsed(false);\n file_chooser.addChoosableFileFilter(new FileFilter() {\n public boolean accept(File file) {\n if (file.isDirectory()) return true;\n String extension = FileUtils.getFileExtension(file);\n return extension.equals(\"png\");\n }\n\n public String getDescription() {\n return \"Portable Network Graphics (PNG)\";\n }\n });\n int ret_value = file_chooser.showOpenDialog(App.instance);\n AppImage app_image = null;\n if (ret_value == JFileChooser.APPROVE_OPTION) {\n // Read the selected file and do scaling on it:\n File file = file_chooser.getSelectedFile();\n String path = file.getAbsolutePath();\n\n // Create the image and add it to cache:\n app_image = Resources.loadAppImage(path);\n addImage(app_image);\n writeRepository();\n }\n\n return app_image;\n }",
"public BufferedImage getImage(int x, int y){\n\t\treturn images[x][y];\n\t}",
"private void actionViewOriginalImage ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tint tableSize = DataController.getTable().getTableSize();\r\n\r\n\t\t\tif (tableSize != 0)\r\n\t\t\t{\r\n\t\t\t\tint imagIndex = mainFormLink.getComponentPanelLeft().getComponentComboboxFileName().getSelectedIndex();\r\n\r\n\t\t\t\t//---- Get path to the original image\r\n\t\t\t\tString filePath = DataController.getTable().getElement(imagIndex).getDataFile().getFilePath();\r\n\r\n\t\t\t\t//---- Load the image into the image viewer\r\n\t\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().displayPolygonStop();\r\n\t\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().loadImage(filePath);\r\n\r\n\t\t\t\t//---- Change button icon\r\n\t\t\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_ORIGINAL_IMAGE);\r\n\r\n\t\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewImage().setIcon(iconButton);\r\n\t\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewImage().setActionCommand(FormMainHandlerCommands.AC_VIEW_CELL);\r\n\t\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewImage().setToolTipText(\"View cells\");\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tcatch (ExceptionMessage exception)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(exception);\r\n\t\t}\r\n\t}",
"public int displayRandomImage() {\n\n int randomImageIndex;\n\n do\n { // making sure that the same images aren't repeated & images of the same car makes aren't shown together\n\n randomCarMake = allCarMakes[getRandomBreed()]; // get a random breed\n randomImageIndex = getRandomImage(); // get a random image of a particular breed\n\n randomImageOfChosenCarMake = displayRelevantImage(randomCarMake, randomImageIndex);\n\n } while (displayingCarMakes.contains(randomCarMake) || allDisplayedImages.contains(randomImageOfChosenCarMake));\n\n allDisplayedImages.add(randomImageOfChosenCarMake); // to make sure that the image isn't repeated\n displayingCarMakes.add(randomCarMake); // to make sure that images of the same breed aren't shown at once\n displayingImageIndexes.add(randomImageIndex); // to recall indexes when the device is rotated\n\n // return chosen random image\n return getResources().getIdentifier(randomImageOfChosenCarMake, \"drawable\", \"com.example.car_match_game_app\");\n }",
"public void onClick(View v) {\n currentIndex++;\n // Check If index reaches maximum then reset it\n if (currentIndex == count)\n currentIndex = 0;\n simpleImageSwitcher.setImageResource(imageIds[currentIndex]); // set the image in ImageSwitcher\n }",
"private void selectImage(){\n final CharSequence[] options = { \"Choose from Gallery\",\"Cancel\" };\n AlertDialog.Builder builder = new AlertDialog.Builder(activity);\n builder.setItems(options, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int item) {\n if (options[item].equals(\"Choose from Gallery\"))\n {\n Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n startActivityForResult(intent, 2);\n }\n else if (options[item].equals(\"Cancel\")) {\n dialog.dismiss();\n }\n }\n });\n builder.show();\n }",
"@Override public BufferedImage getSlice(int i) {\n\t\tBufferedImage slice = null;\n\t\ttry {\n\t\t\tslice = ImageIO.read(tiffs[i]);\n\t\t} catch (IOException e) {\n\t\t\treturn null;\n\t\t}\n\t\treturn slice;\n\t}",
"@Override\n public List<SpriteDefinition> getChosen () {\n return mySelected.getListView().getItems();\n }",
"int index();",
"public abstract int getSourceIndex(int index);",
"public ImageIdentifier getImageIdentifier() {\n synchronized (this.imageLock) {\n return this.animation.getCurrentImage();\n }\n }",
"private static void openImageMenu(OrganizedImage image, int index)\n {\n\t// True if the 'Back to 'Browse organized images' menu...' option has been selected.\n\tboolean backToBrowseOrganized = false;\n\n\twhile(!backToBrowseOrganized)\n\t {\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\">>Main>Browse organized images>Open image:\");\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"1: View image.\");\n\t\tSystem.out.println(\"2: Image options...\");\n\t\tSystem.out.println(\"3: Back to 'Browse organized images' menu...\");\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.print(\"\\t>> \");\n\t\t\n\t\tswitch(getUserOption())\n\t\t {\n\t\t case(1):\n\t\t\timage.view();\n\t\t\tbreak;\n\t\t case(2):\n\t\t\timageOptionsMenu(image, index);\n\t\t\tbreak;\n\t\t case(3):\n\t\t\tbackToBrowseOrganized = true;\n\t\t\tbreak;\n\t\t default:\n\t\t\tSystem.out.println(\"That was not a valid option, please try again:\");\n\t\t }\n\t }\n }",
"public Texture getImage(){\n\t\treturn images[0];\t\t\n\t}",
"public com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByHandler(int index) {\n if (imagesByHandlerBuilder_ == null) {\n return imagesByHandler_.get(index);\n } else {\n return imagesByHandlerBuilder_.getMessage(index);\n }\n }",
"void imageChooser() {\n\n // create an instance of the\n // intent of the type image\n Intent i = new Intent();\n i.setType(\"image/*\");\n i.setAction(Intent.ACTION_GET_CONTENT);\n\n\n // pass the constant to compare it\n // with the returned requestCode\n startActivityForResult(Intent.createChooser(i, \"Select Picture\"), SELECT_PICTURE);\n }",
"public static ImageUse getByNum(int i) {\n\t\tswitch (i) {\n\t\t\tcase Boardx.BOULDER:\n\t\t\t\treturn BOULDER;\n\t\t\tcase Boardx.CAVEMAN:\n\t\t\t\treturn PLAYER;\n\t\t\tcase Boardx.EMPTY:\n\t\t\t\treturn EMPTY;\n\t\t\tcase Boardx.EXIT:\n\t\t\t\treturn EXIT;\n\t\t\tcase Boardx.HOLE:\n\t\t\t\treturn HOLE;\n\t\t\tcase Boardx.WALL:\n\t\t\t\treturn WALL;\n\t\t\tdefault:\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t}",
"protected ImageView getImageView(){\n\t\treturn iv1;\n\t}",
"public Image getState () {\n\t\treturn images[state];\n\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(\n\t\t\t\t\t\tIntent.ACTION_PICK,\n\t\t\t\t\t\tandroid.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\t\t\t\tstartActivityForResult(i, RESULT_LOAD_IMAGE);\n\n\t\t\t refreshResult();\n\t\t\t LeftEdge.setImageResource(R.drawable.left_edgeicon);\n\t\t\t RightEdge.setImageResource(R.drawable.right_edgeicon);\n\t\t\t// ChannelCheck0.setImageResource(R.drawable.control);\n\t\t\t \n\t\t\t}",
"public String getImg(){\n switch(image){\n case 0: // Case 0: Ant looks up/north\n return \"imgs/ant_n.png\";\n case 1: // Case 1: Ant looks right/east\n return \"imgs/ant_e.png\";\n case 2: // Case 2: Ant looks down/south\n return \"imgs/ant_s.png\";\n case 3: // Case 3: Ant looks left/west\n return \"imgs/ant_w.png\";\n default: // Default: This shouldn't happen on a normal run. It returns an empty string and prints an error.\n System.err.println(\"Something went wrong while the ant was trying change direction\");\n return \"\";\n }\n }",
"public com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByHandler(int index) {\n return imagesByHandler_.get(index);\n }",
"public native int getSelectedIndex();",
"public BufferedImage getImage() {\n\t\tTelaInterna ti = ( TelaInterna )contentPane.getSelectedFrame();\n\t\tBufferedImage img;\n\t\timg = ti.getImage();\n\t\treturn img;\n\t}"
] |
[
"0.759889",
"0.73154145",
"0.6873801",
"0.6650802",
"0.6536647",
"0.6520964",
"0.6506482",
"0.64515716",
"0.6385056",
"0.63798696",
"0.63563687",
"0.631572",
"0.6311396",
"0.630932",
"0.6259378",
"0.62448794",
"0.61996573",
"0.61829966",
"0.6102789",
"0.6102435",
"0.610095",
"0.60963786",
"0.6094596",
"0.608244",
"0.6081378",
"0.6078152",
"0.60553825",
"0.6049329",
"0.60327953",
"0.6010642",
"0.60063165",
"0.600089",
"0.5975423",
"0.5970224",
"0.5969244",
"0.5968727",
"0.5955499",
"0.59423083",
"0.5931485",
"0.59077996",
"0.59006226",
"0.5889616",
"0.58872294",
"0.58810395",
"0.5875379",
"0.58735925",
"0.58626014",
"0.585388",
"0.58465666",
"0.58455706",
"0.58316594",
"0.5809962",
"0.58076304",
"0.5796046",
"0.5786912",
"0.57810944",
"0.5771085",
"0.57641405",
"0.57552654",
"0.5747444",
"0.57461184",
"0.5744048",
"0.57375693",
"0.5732899",
"0.5729302",
"0.57283765",
"0.57217455",
"0.57211924",
"0.5716358",
"0.5696032",
"0.56929874",
"0.56842357",
"0.56839883",
"0.56805235",
"0.5676504",
"0.56715",
"0.5664216",
"0.56641406",
"0.56629664",
"0.5649323",
"0.5646969",
"0.5644278",
"0.5635273",
"0.5633901",
"0.5617477",
"0.5610264",
"0.56042963",
"0.56016356",
"0.559858",
"0.55974215",
"0.5596205",
"0.55934125",
"0.5590391",
"0.5589016",
"0.558647",
"0.557826",
"0.5576915",
"0.5572974",
"0.55709887",
"0.5566135"
] |
0.66035
|
4
|
TODO: noop for now;
|
@Override
public void populateServiceNotUpDiagnostics() {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private stendhal() {\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"public void method_4270() {}",
"private void kk12() {\n\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"private void test() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"public void smell() {\n\t\t\n\t}",
"private void strin() {\n\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"protected boolean func_70814_o() { return true; }",
"private void poetries() {\n\n\t}",
"@Override\n\tpublic void apply() {\n\t\t\n\t}",
"public abstract void mo70713b();",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"private void init() {\n\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\r\n\tpublic void 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}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"public void gored() {\n\t\t\n\t}",
"public abstract void mo56925d();",
"zzafe mo29840Y() throws RemoteException;",
"protected void h() {}",
"protected OpinionFinding() {/* intentionally empty block */}",
"@Override\n\tpublic void call() {\n\t\t\n\t}",
"@Override\n\tpublic void function() {\n\t\t\n\t}",
"@Override\n public void apply() {\n }",
"@Override\r\n\tpublic void just() {\n\t\t\r\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"public abstract void mo27386d();",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"private test5() {\r\n\t\r\n\t}",
"@Override\n\tpublic void exucute() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n protected void init() {\n }",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n public Object preProcess() {\n return null;\n }",
"public void mo38117a() {\n }",
"private void m50366E() {\n }",
"void unableToListContents();",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"void berechneFlaeche() {\n\t}",
"@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}",
"private void initialize() {\n\t\t\n\t}",
"public abstract void mo30696a();",
"@Override\n\tpublic void jugar() {}",
"@Override\n public void init() {\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 Util() { }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo21877s() {\n }",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"public abstract void mo6549b();",
"public abstract void mo42331g();",
"public abstract void mo27385c();",
"@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}"
] |
[
"0.62321657",
"0.591718",
"0.5903624",
"0.5838562",
"0.5836476",
"0.57916",
"0.5780065",
"0.57593113",
"0.5724375",
"0.5714353",
"0.5713362",
"0.5706591",
"0.56853783",
"0.56721103",
"0.5670527",
"0.5653584",
"0.56435233",
"0.5640647",
"0.5612246",
"0.5602618",
"0.5602576",
"0.559718",
"0.55942476",
"0.5581111",
"0.5579354",
"0.55724156",
"0.55724156",
"0.55647415",
"0.5557728",
"0.555541",
"0.555541",
"0.5543654",
"0.5535706",
"0.5530057",
"0.5530057",
"0.5530057",
"0.5530057",
"0.5530057",
"0.5530057",
"0.55254436",
"0.55248725",
"0.55248725",
"0.5524757",
"0.551659",
"0.5507126",
"0.55042255",
"0.5499036",
"0.54892045",
"0.54886556",
"0.5476736",
"0.54681325",
"0.5462104",
"0.5444085",
"0.543942",
"0.5433489",
"0.5428334",
"0.5424242",
"0.5423856",
"0.54224443",
"0.5420981",
"0.54200643",
"0.54189557",
"0.54183507",
"0.5417576",
"0.5415509",
"0.5408221",
"0.54064727",
"0.5401293",
"0.5401293",
"0.5400208",
"0.5399844",
"0.5397826",
"0.5395668",
"0.53956187",
"0.5392947",
"0.5389478",
"0.53862053",
"0.5385869",
"0.5383426",
"0.53832155",
"0.53817147",
"0.53794926",
"0.53794926",
"0.53794706",
"0.53736424",
"0.5372896",
"0.5371402",
"0.5369769",
"0.5368929",
"0.53670514",
"0.53670514",
"0.53670514",
"0.53670514",
"0.53670514",
"0.5352949",
"0.534952",
"0.53456336",
"0.5344756",
"0.5344544",
"0.53409094",
"0.5339546"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
public static void main(String[] args) {
int n = 6;
// Using recursion(top-down DP) with TIme O(n) Space O(n)+StackSpace
// int[] dp = new int[n+1];
// int res = getNumberOfWays(n,dp);
// System.out.println(res);
// Using recursion(bottom-up DP) with TIme O(n) Space O(n)
int[ ] dp = new int[n+1];
dp[0] = 0;
dp[1] = 1;
dp[2] = 2;
for(int i =3;i<=n;i++) {
dp[i] = dp[i-1]+dp[i-2];
}
System.out.println(dp[n]);
}
|
{
"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
|
private static int getNumberOfWays(int n, int[] dp) {
if(n==0) {
dp[n] = 0;
return 0;
}
if(n == 1) {
dp[1] = 1;
return 1;
}
if(n == 2) {
dp[2] = 2;
return 2;
}
if(dp[n] == 0){
dp[n] = getNumberOfWays(n-1, dp) + getNumberOfWays(n-2, dp);
}
return dp[n];
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
Created by XR on 2016/10/21.
|
public interface ShopOrderService {
Page<OrderBiz> queryPageOrderInfo(ShopOrderQuery query);
OrderRechargeBiz queryOrderRechargeInfoByOrderId(Long orderid);
void send(Long orderid,String remark) throws ManagerException;
void rechargeOrder(Long orderid) throws ManagerException;
void rechargeResult(Long orderid,Integer resultstatus);
boolean updateSendRemarkById(Long orderid, String sendremark);
boolean updateRemarkById(Long orderid, String remark);
String queryRemarkById(Long orderid);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public final void mo51373a() {\n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void anular() {\n\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\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"public void mo38117a() {\n }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private void kk12() {\n\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"public void 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 one() {\n\t\t\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"private void m50366E() {\n }",
"protected boolean func_70814_o() { return true; }",
"private void init() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void init() {\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"private void poetries() {\n\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\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 init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n void init() {\n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"public void mo6081a() {\n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\n public void init() {}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void init() {}",
"@Override\n protected void init() {\n }",
"public void mo55254a() {\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"public void mo21877s() {\n }",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"public void mo3376r() {\n }",
"public void mo12930a() {\n }",
"public void mo12628c() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"public void mo21779D() {\n }",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"protected void mo6255a() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}"
] |
[
"0.6027123",
"0.58900213",
"0.5873047",
"0.58331823",
"0.5789442",
"0.5789442",
"0.57832015",
"0.5753766",
"0.57435346",
"0.57003653",
"0.5690382",
"0.5688937",
"0.5678093",
"0.56743854",
"0.565588",
"0.56521475",
"0.5638154",
"0.5637874",
"0.56211877",
"0.5602408",
"0.56002146",
"0.56002146",
"0.56002146",
"0.56002146",
"0.56002146",
"0.5597807",
"0.55828315",
"0.55790913",
"0.5578442",
"0.5565011",
"0.5560258",
"0.55535096",
"0.5532269",
"0.5521083",
"0.5520009",
"0.5520009",
"0.5512076",
"0.5512076",
"0.5512076",
"0.5512076",
"0.5512076",
"0.5512076",
"0.5512076",
"0.5510367",
"0.5495114",
"0.54860055",
"0.54818666",
"0.54807127",
"0.54797876",
"0.5479385",
"0.5476295",
"0.54760927",
"0.5473104",
"0.5473104",
"0.5466167",
"0.5466167",
"0.5466167",
"0.5453336",
"0.5453336",
"0.5453336",
"0.545023",
"0.545023",
"0.545023",
"0.544749",
"0.543751",
"0.543751",
"0.54368377",
"0.5421091",
"0.5412333",
"0.54064935",
"0.54008406",
"0.5398744",
"0.5394383",
"0.5388794",
"0.53863525",
"0.53843594",
"0.53843594",
"0.53843594",
"0.53843594",
"0.53843594",
"0.53843594",
"0.53787297",
"0.53778857",
"0.53735375",
"0.537225",
"0.5366686",
"0.5364207",
"0.5348236",
"0.53457266",
"0.53315324",
"0.53289354",
"0.5321049",
"0.53204465",
"0.5313128",
"0.53064066",
"0.53050506",
"0.5304373",
"0.5297979",
"0.5294114",
"0.52880824",
"0.528564"
] |
0.0
|
-1
|
can't change, because remote fs use it info to find data.
|
@Override
public void modifyProperties(Map<String, String> properties) throws DdlException {
List<String> cantChangeProperties = Arrays.asList(S3_ENDPOINT, S3_REGION, S3_ROOT_PATH, S3_BUCKET);
Optional<String> any = cantChangeProperties.stream().filter(properties::containsKey).findAny();
if (any.isPresent()) {
throw new DdlException("current not support modify property : " + any.get());
}
// modify properties
replaceIfEffectiveValue(this.properties, S3_ACCESS_KEY, properties.get(S3_ACCESS_KEY));
replaceIfEffectiveValue(this.properties, S3_SECRET_KEY, properties.get(S3_SECRET_KEY));
replaceIfEffectiveValue(this.properties, S3_MAX_CONNECTIONS, properties.get(S3_MAX_CONNECTIONS));
replaceIfEffectiveValue(this.properties, S3_REQUEST_TIMEOUT_MS, properties.get(S3_REQUEST_TIMEOUT_MS));
replaceIfEffectiveValue(this.properties, S3_CONNECTION_TIMEOUT_MS, properties.get(S3_CONNECTION_TIMEOUT_MS));
notifyUpdate();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void fetchingInfo(String remotePath);",
"public FileInfo getFileInformation(SrvSession sess, TreeConnection tree, String name)\n throws IOException {\n\n // Check for the null file name\n \n if (name == null)\n return null;\n\n // Access the JDBC context\n\n DBDeviceContext dbCtx = (DBDeviceContext) tree.getContext();\n\n // Check if the database is online\n \n if ( dbCtx.getDBInterface().isOnline() == false)\n throw new DiskOfflineException( \"Database is offline\");\n \n // Check if the path is a file stream\n \n FileState fstate = null;\n FileInfo finfo = null;\n \n if ( FileName.containsStreamName(name)) {\n\n // Check if there is an active file state for the stream\n \n fstate = getFileState(name,dbCtx,true);\n \n if ( fstate != null) {\n \n // Check if the file information is available\n \n finfo = (FileInfo) fstate.findAttribute(FileState.FileInformation);\n }\n\n // If the cached file information is not available then create it\n \n if ( finfo == null) { \n\n // Split the path into directory, file and stream name components\n \n String[] paths = FileName.splitPathStream(name); \n \n // Get, or create, the file state for main file path\n \n String filePath = paths[0] + paths[1];\n FileState parent = getFileState(filePath,dbCtx,true);\n \n // Check if the top level file exists\n \n if ( parent != null && parent.fileExists() == true) {\n \n // Get the top level file details\n \n DBFileInfo dbInfo = getFileDetails(name,dbCtx,parent);\n \n if ( dbInfo != null) {\n \n // Get the list of available streams\n \n StreamInfoList streams = loadStreamList(parent, dbInfo, dbCtx, true);\n \n if ( streams != null && streams.numberOfStreams() > 0) {\n \n // Get the details for the stream, if the information is valid copy it to a file information\n // object\n \n StreamInfo sInfo = streams.findStream(paths[2]);\n \n if ( sInfo != null) {\n \n // Create a file information object, copy the stream details to it\n \n finfo = new DBFileInfo(paths[1], name, dbInfo.getFileId(), dbInfo.getDirectoryId());\n finfo.setFileId(sInfo.getFileId());\n finfo.setFileSize(sInfo.getSize());\n \n // Use the parent files timestamps for now\n \n finfo.setCreationDateTime(dbInfo.getCreationDateTime());\n finfo.setAccessDateTime(dbInfo.getAccessDateTime());\n finfo.setModifyDateTime(dbInfo.getModifyDateTime());\n \n // Attach to the file state\n \n fstate.addAttribute(FileState.FileInformation, finfo);\n \n // DEBUG\n \n if ( Debug.EnableInfo && hasDebug())\n Debug.println(\"getFileInformation() stream=\" + name + \", info=\" + finfo);\n }\n }\n }\n }\n }\n }\n else {\n\n // Get, or create, the file state for the path\n \n fstate = getFileState(name, dbCtx, true);\n \n // Get the file details for the path\n \n DBFileInfo dbInfo = getFileDetails(name, dbCtx, fstate);\n \n // Set the full file/path name\n \n if ( dbInfo != null)\n dbInfo.setFullName(name);\n finfo = dbInfo;\n }\n\n // DEBUG\n \n if ( Debug.EnableInfo && hasDebug() && finfo != null)\n Debug.println(\"getFileInformation info=\" + finfo.toString());\n\n // Return the file information\n\n return finfo;\n }",
"public void updateLocations() throws IOException {\n Path path = new Path(getPath());\n FileSystem fs = path.getFileSystem(FileFactory.getConfiguration());\n RemoteIterator<LocatedFileStatus> iter = fs.listLocatedStatus(path);\n LocatedFileStatus fileStatus = iter.next();\n location = fileStatus.getBlockLocations()[0].getHosts();\n length = fileStatus.getLen();\n }",
"public byte[] do_get (String pathOnServer) throws RemoteException {\r\n\t\tFile toClient = new File (pathOnServer)\t;\r\n\t\tSystem.out.println(\"Searching file name= \" + pathOnServer);\r\n\t\tbyte[] data = new byte[getFileSize(pathOnServer)];\t\r\n\t\ttry {\r\n\t\t\tif (toClient.exists()) {\r\n\t\t\tFileInputStream fis = new FileInputStream(toClient);\r\n\t\t\tfis.read(data, 0, data.length);\t\r\n\t\t\tfis.close(); \r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"File \" + pathOnServer + \" does not exist.\");\r\n\t\t\t}\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\r\n\t\treturn data;\r\n\t}",
"public interface FSInterface extends Remote\n{\n\tpublic String browseDirs(String dir) throws RemoteException;\n\tpublic String browseFiles(String dir) throws RemoteException;\n\tpublic String search(String file, String startDir) throws RemoteException;\n\tpublic boolean createFile(String file) throws RemoteException;\n\tpublic boolean createDir(String dir) throws RemoteException;\n\tpublic boolean delete(String file) throws RemoteException;\n\tpublic boolean rename(String oldName, String newName) throws RemoteException;\n\tpublic String getOSName()throws RemoteException;\n\tpublic String getHostName() throws RemoteException;\n\tpublic String getHostAddress() throws RemoteException;\n\tpublic void sendClientAddress(String clientAddress) throws RemoteException;\n\tpublic String getClientAddress() throws RemoteException;\n\tpublic Path [] getFileList() throws RemoteException;\n\t//public String sendClientName(String clientName) throws RemoteException; //ToDo\n\t//public String sendClientOS(String clientOS) throws RemoteException; //ToDo\n}",
"@Override\n public Collection<AbstractFile> visit(FileSystem fs) {\n \n SleuthkitCase sc = Case.getCurrentCase().getSleuthkitCase();\n \n StringBuilder queryB = new StringBuilder();\n queryB.append(\"SELECT * FROM tsk_files WHERE (fs_obj_id = \").append(fs.getId());\n queryB.append(\") AND (size > 0)\");\n queryB.append(\" AND ( (meta_type = \").append(TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_REG.getMetaType());\n queryB.append(\") OR (meta_type = \").append(TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_DIR.getMetaType());\n queryB.append( \"AND (name != '.') AND (name != '..')\");\n queryB.append(\") )\");\n if (getUnallocatedFiles == false) {\n queryB.append( \"AND (type = \");\n queryB.append(TskData.TSK_DB_FILES_TYPE_ENUM.FS.getFileType());\n queryB.append(\")\");\n }\n \n try {\n final String query = queryB.toString();\n logger.log(Level.INFO, \"Executing query: \" + query);\n ResultSet rs = sc.runQuery(query);\n List<AbstractFile> contents = sc.resultSetToAbstractFiles(rs);\n Statement s = rs.getStatement();\n rs.close();\n if (s != null) {\n s.close();\n }\n return contents;\n } catch (SQLException ex) {\n logger.log(Level.WARNING, \"Couldn't get all files in FileSystem\", ex);\n return Collections.emptySet();\n }\n }",
"public void getContentsIntoFile(String remotePath, String localFilePath) throws Exception\r\n {\r\n byte[] bytes = getBytes(remotePath);\r\n if (bytes == null) {\r\n bytes = new byte[0];\r\n }\r\n if (!ZkUtils.isHdfs(localFilePath))\r\n FileUtils.writeByteArrayToFile(new File(localFilePath), bytes);\r\n else {\r\n // write to Hdfs\r\n OutputStream os = ZkUtils.getOutPutStream(localFilePath);\r\n PrintStream file_stream = new PrintStream(os);\r\n file_stream.write(bytes);\r\n file_stream.flush();\r\n file_stream.close();\r\n }\r\n }",
"public void testGetCachedFileObject() throws IOException {\n FileObject fobj = getFileObject(testFile);\n FileObject parent = fobj.getParent();\n parent = parent.createFolder(\"parent\");\n FileObject child = parent.createData(\"child\");\n monitor.reset();\n FileObject ch = parent.getFileObject(\"child\");\n monitor.getResults().assertResult(0, StatFiles.ALL);\n //second time\n monitor.reset();\n ch = parent.getFileObject(\"child\");\n monitor.getResults().assertResult(0, StatFiles.ALL);\n }",
"public void getFileData(int dLength,String charset) throws FileSystemUtilException\r\n\t{\r\n\t\tlogger.debug(\"Begin: \"+getClass().getName()+\":getFileData()\");\r\n\t\tFileOutputStream fOut=null;\r\n\t\tByteArrayOutputStream bOut = null;\r\n\t\tFileSystemUtilsPlugin zu = new FileSystemUtilPluginFactory().getFileUtils(FileSystemTypeConstants.ZIP);\r\n\t\tlong fileLen = 0;\r\n\t\tlong dataLength = dLength;\r\n\t\tif(isSample)\r\n\t\t{\r\n\t\t\tbOut = new ByteArrayOutputStream();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tlogger.debug(\"Opening output stream to file \"+localFilePath);\r\n\t\t\t\tlogger.debug(\"localFilePath:\"+localFilePath);\r\n\t\t\t\tfOut=new FileOutputStream(\"temp.txt\");\r\n\t\t\t\tlogger.debug(\"Output stream to file \"+localFilePath+\" is opened\");\r\n\t\t\t} \r\n\t\t\tcatch(FileNotFoundException fnfEx) \r\n\t\t\t{ fnfEx.printStackTrace();\r\n\t\t\t\t logger.info(new Date()+\":: File not found on connecting with parameters, \" +\r\n\t\t\t\t\t\t\t\" username= \"+ username +\" , remotefilePath = \"+remoteFilePath +\", \" +\r\n\t\t\t\t\t\t\t\"localFilePath = \"+ localFilePath +\" , host= \"+ hostname +\" and port =\"+ port );\r\n\t\t\t\tthrow new FileSystemUtilException(\"ET0028\",null,Level.ERROR,fnfEx);\r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\t\tString command = \"scp -f \"+remoteFilePath;\r\n\t\tObject[] ios= execCommand(command);\r\n\t\toutputstream=(OutputStream)ios[0];\r\n\t\tinputstream=(InputStream)ios[1];\r\n\t\tbyte[] buf = new byte[1024];\r\n\t\t// send '\\0'\r\n\t\tbuf[0] = 0;\r\n\t\ttry \r\n\t\t{\r\n\t\t\t//returning acknowledgement\r\n\t\t\toutputstream.write(buf, 0, 1);\t\t\r\n\t\t\toutputstream.flush();\r\n\t\t\tcheckAcknowledgement(inputstream);\r\n\t\t\t//getting filesize\r\n\t\t\t// read '0644 '\r\n\t\t\tinputstream.read(buf, 0, 5);\r\n\t\t\twhile (true) \r\n\t\t\t{\r\n\t\t\t\tinputstream.read(buf, 0, 1);\r\n\t\t\t\tif (buf[0] == ' ')\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tfileLen = fileLen * 10 + (buf[0] - '0');\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tString file = null;\r\n\t\t\tfor (int i = 0;; i++) \r\n\t\t\t{\r\n\t\t\t\tinputstream.read(buf, i, 1);\r\n\t\t\t\tif (buf[i] == (byte) 0x0a) \r\n\t\t\t\t{\r\n\t\t\t\t\tfile = new String(buf, 0, i);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlogger.debug(\"filesize=\"+fileLen+\", file=\"+file);\r\n\t\t\tif(dataLength == 0)\r\n\t\t\t{\r\n\t\t\t\tdataLength = fileLen;\r\n\t\t\t}\r\n\t\t\telse if(dataLength >= fileLen)\r\n\t\t\t{\r\n\t\t\t\tdataLength = fileLen;\r\n\t\t\t}else if(fileLen > dataLength * 10){\r\n\t\t\t\tdataLength = 1024 * 10;\r\n\t\t\t}\r\n\t\t\t// send '\\0'\r\n\t\t\tbuf[0] = 0;\r\n\t\t\toutputstream.write(buf, 0, 1);\r\n\t\t\toutputstream.flush();\r\n\t\t\tlong b=0;\r\n\t\t\tint l=0;\r\n\t\t\tint len=10240;\r\n\t\t\tif(len >= dataLength)\r\n\t\t\t{\r\n\t\t\t\tlen = (int)dataLength;\r\n\t\t\t}\r\n\t\t\tbyte[] barray = new byte[len];\r\n\t\t\tboolean noData = false;\r\n\t\t\tlong startTime = System.currentTimeMillis();\r\n\t\t\twhile( b < dataLength)\r\n\t\t\t{\r\n\t\t\t\tl=inputstream.read(barray,0,len);\r\n\t\t\t\tif(l != -1)\r\n\t\t\t\t{\r\n\t\t\t\t noData = false;\r\n\t\t\t\t\tb=b+l;\r\n\t\t\t\t\tif(isSample)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbOut.write(barray,0,l);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//check whether the data is crossed fileLength\r\n\t\t\t\t\t\tif(b > dataLength)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tl = l - (int)(b - dataLength);\t\r\n\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t\tfOut.write(barray,0,l);\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t/* BUG-FIX thread hang due to network outage */\r\n\t\t\t\t //implementing readTImeout at client side.\r\n\t\t\t\t if(noData == false)\r\n\t\t\t\t {\r\n\t\t\t\t //this is first iteration with out data \r\n\t\t\t\t startTime = System.currentTimeMillis();\r\n\t\t\t\t noData = true;\r\n\t\t\t\t }\r\n\t\t\t\t else\r\n\t\t\t\t {\r\n\t\t\t\t //there is no data on prev iteration too\r\n\t\t\t\t if((System.currentTimeMillis()-startTime) >= this.readTimeOut)\r\n\t\t\t\t {\r\n\t\t\t\t throw new Exception(\"SCP fileDownload failed. readTimeout occured\");\r\n\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\t}\r\n //check stop flag, if true throw FileSystemUtilException with errorcode 999\r\n if(stop)\r\n {\r\n \tthrow new FileSystemUtilException(\"999\");\r\n }\r\n\t\t\t}\t\r\n\t\t\t// send '\\0'\r\n\t\t\tbuf[0] = 0;\r\n\t\t\toutputstream.write(buf, 0, 1);\r\n\t\t\toutputstream.flush();\r\n\t\t\tif(isSample)\r\n\t\t\t{\r\n\t\t\t\tString s=null;\r\n\t\t\t if(zu.isZip(remoteFilePath))\r\n\t\t\t {\r\n\t\t\t \tbyte [] stUnZip=bOut.toByteArray(); \r\n\t\t\t \tbyte [] sample = zu.streamUnZipper(stUnZip);\r\n\t\t\t \tbOut.reset();\r\n\t\t\t \tbOut.write(sample);\r\n\t\t\t //create a byte array stream with bOut\r\n\t\t\t //unzip the stream here and use that stream\r\n\t\t\t }\r\n\t\t\t if(true)/*if(!\"cp1252\".equalsIgnoreCase(charset))*/\r\n\t\t\t {\r\n\t\t\t \tsampleData = new String(bOut.toByteArray(),charset);\r\n\t\t\t }\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t \tsampleData = new String(bOut.toByteArray());\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t\tlogger.debug(\"Sample data is : \"+sampleData);\r\n\t\t\t}else{\r\n\t\t\t\tsampleData = new String(barray,charset);\r\n\t\t\t}\r\n\t\t} \r\n\t\tcatch(UnsupportedEncodingException use)\r\n\t\t{\r\n\t\t\t logger.info(new Date()+\":: Unable to get data on connecting with parameters, \" +\r\n\t\t\t\t\t\t\" username= \"+ username +\" , remotefilePath = \"+remoteFilePath +\", \" +\r\n\t\t\t\t\t\t\"localFilePath = \"+ localFilePath +\" , host= \"+ hostname +\" and port =\"+ port );\r\n\t\t\tthrow new FileSystemUtilException(\"ET0564\",null,Level.ERROR,use);\r\n\t\t}\t\r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\tlogger.info(new Date()+\":: Unable to get data on connecting with parameters, \" +\r\n\t\t\t\t\t\" username= \"+ username +\" , remotefilePath = \"+remoteFilePath +\", \" +\r\n\t\t\t\t\t\"localFilePath = \"+ localFilePath +\" , host= \"+ hostname +\" and port =\"+ port );\r\n\t\t\tthrow new FileSystemUtilException(\"EL0004\",null,Level.ERROR,e);\r\n\t\t}\r\n\t\tcatch(FileSystemUtilException ebizEx)\r\n\t\t{\r\n //suppress if errorcode is 999\r\n\t\t\t\r\n if(!ebizEx.getErrorCode().equals(\"999\"))\r\n\t\t\t{\r\n \tlogger.info(new Date()+\":: Unable to get data on connecting with parameters, \" +\r\n \t\t\t\t\t\" username= \"+ username +\" , remotefilePath = \"+remoteFilePath +\", \" +\r\n \t\t\t\t\t\"localFilePath = \"+ localFilePath +\" , host= \"+ hostname +\" and port =\"+ port );\r\n\t\t\t\tthrow ebizEx;\r\n }\r\n\t\t}\r\n\t\tcatch(Exception ex)\r\n\t\t{\r\n\t\t\tlogger.info(new Date()+\":: Unable to get data on connecting with parameters, \" +\r\n\t\t\t\t\t\" username= \"+ username +\" , remotefilePath = \"+remoteFilePath +\", \" +\r\n\t\t\t\t\t\"localFilePath = \"+ localFilePath +\" , host= \"+ hostname +\" and port =\"+ port );\r\n\t\t\tthrow new FileSystemUtilException(\"EL0360\",null,Level.ERROR,ex);\t\t\t\t\r\n\t\t}\r\n\t\tfinally \r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tif(fOut != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tfOut.flush(); \r\n\t\t\t\t\tfOut.close();\r\n\t\t\t\t\tfOut = null;\r\n\t\t\t\t}\r\n\t\t\t\tif(bOut != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tbOut.flush(); \r\n\t\t\t\t\tbOut.close();\r\n\t\t\t\t\tbOut = null;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t} \r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\t\t//log warning\t\t\t\t\r\n\t\t\t}\t\t \r\n\t\t}\r\n\t\tlogger.debug(\"End: \"+getClass().getName()+\":getFileData()\");\r\n\t}",
"public interface FileConnection {\r\n\r\n\t/**\r\n\t * Execute a SFTP get and write the file to the passed output stream.\r\n\t * \r\n\t * @param path\r\n\t * @param stream\r\n\t * @throws IOException \r\n\t */\r\n\tvoid getFile(String path, OutputStream stream) throws NotFoundException, IOException;\r\n\t\r\n\t/**\r\n\t * Request a range of bytes from the given file.\r\n\t * \r\n\t * @param path\r\n\t * @param stream\r\n\t * @param startByteIndex The index of the start of the byte range to be read.\r\n\t * @param endByteIndex The index of the end of the byte range to be read.\r\n\t * @return True if the end of the file was reached with this read.\r\n\t * \r\n\t * @throws NotFoundException\r\n\t * @throws IOException \r\n\t */\r\n\tboolean getFileRange(String path, OutputStream stream, long startByteIndex, long endByteIndex) throws NotFoundException, IOException;\r\n\r\n\t/**\r\n\t * Get the size of a given file.\r\n\t * @param path\r\n\t * @return\r\n\t */\r\n\tlong getFileSize(String path) throws NotFoundException;\r\n\t\r\n\t/**\r\n\t * Get the last modified date of the file in UTC.\r\n\t * @param path\r\n\t * @return\r\n\t * @throws NotFoundException\r\n\t */\r\n\tlong getLastModifiedDate(String path) throws NotFoundException;\r\n}",
"public interface VFSFile extends VFSEntry {\n /**\n * Get current length of this file.\n *\n * @return current length of file\n * @throws IOException I/O exception happened during operation\n */\n int getLength() throws IOException;\n\n /**\n * Set current read/write pointer of file relative to file start.\n *\n * @param offsetFromStart offset from beginning of file\n */\n void seek(int offsetFromStart);\n\n /**\n * Read block of data from file. Read operation starts from current pointer in file, then pointer advances to next\n * byte after last successfully read byte.\n *\n * @param buffer destination buffer to read into\n * @param bufferOffset offset in destination buffer where read bytes must be placed\n * @param length length of bytes to read from file\n * @return amount of successfully read bytes, -1 if there are no more bytes left in file\n * @throws IOException I/O exception happened during operation\n */\n int read(byte[] buffer, int bufferOffset, int length) throws IOException;\n\n /**\n * Write block of data to file, expanding it if necessary. Write operation starts from current pointer in file, then pointer advances to next\n * byte after last successfully written byte. File must be opened for write for this method to succeed.\n *\n * @param buffer source buffer to read bytes from\n * @param bufferOffset offset in source buffer from where bytes must be written to file\n * @param length length of bytes to write to file\n * @throws IOException I/O exception happened during operation\n */\n void write(byte[] buffer, int bufferOffset, int length) throws IOException;\n}",
"private static IRubyObject read19(ThreadContext context, IRubyObject recv, IRubyObject path, IRubyObject length, IRubyObject offset, RubyHash options) {\n // FIXME: process options\n \n RubyString pathStr = RubyFile.get_path(context, path);\n Ruby runtime = context.getRuntime();\n failIfDirectory(runtime, pathStr);\n RubyIO file = newFile(context, recv, pathStr);\n \n try {\n if (!offset.isNil()) file.seek(context, offset);\n return !length.isNil() ? file.read(context, length) : file.read(context);\n } finally {\n file.close();\n }\n }",
"@Override\n\tpublic byte[] fetchFile(String fileName) throws RemoteException {\n return null;\n\n\t}",
"@Override\n protected File getDataFile(String relFilePath) {\n return new File(getDataDir(), relFilePath);\n }",
"entities.Torrent.FileInfo getFileInfo();",
"entities.Torrent.FileInfo getFileInfo();",
"public void getPeerFiles(){\n\t\t\n\t\tFile[] files = new File(path).listFiles();\n\t\tfor (File file : files) {\n\t\t\tfileNames.add(file.getName());\n\t\t}\n\t\tSystem.out.println(\"Number of Files Registerd to the server - \"+fileNames.size());\n\t\tSystem.out.println(\"To search for file give command: get <Filename>\");\n\t\tSystem.out.println(\"To refresh type command: refresh\");\n\t\tSystem.out.println(\"To disconnect type command: disconnect\");\n\t}",
"public void getFile(byte[] data, String name,String server) throws RemoteException;",
"static void refreshFileSystem() {\n \t// Clear all existing registrations on the server via CORBA for this username\n server.clearSharedFiles(username);\n server.clearNotSharedFiles(username);\n // Register the files on the server through CORBA that have been added to the directories manually\n server.registerFiles(username);\n System.out.println();\n return;\n }",
"private static boolean readReadWriteFile() {\n File mountFile = new File(\"/proc/mounts\");\n StringBuilder procData = new StringBuilder();\n if (mountFile.exists()) {\n try {\n FileInputStream fis = new FileInputStream(mountFile.toString());\n DataInputStream dis = new DataInputStream(fis);\n BufferedReader br = new BufferedReader(new InputStreamReader(\n dis));\n String data;\n while ((data = br.readLine()) != null) {\n procData.append(data).append(\"\\n\");\n }\n\n br.close();\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n\n String[] tmp = procData.toString().split(\"\\n\");\n for (String aTmp : tmp) {\n // Kept simple here on purpose different devices have\n // different blocks\n if (aTmp.contains(\"/dev/block\")\n && aTmp.contains(\"/system\")) {\n if (aTmp.contains(\"rw\")) {\n // system is rw\n return true;\n } else if (aTmp.contains(\"ro\")) {\n // system is ro\n return false;\n } else {\n return false;\n }\n }\n }\n }\n return false;\n }",
"private static void testFileSearch(TrackingServer ts) {\r\n\t\tString requestFormat = \"FIND=%s|FAILED_SERVERS=%s\";\r\n\t\tString finalRequest = null;\r\n\t\tStringBuilder failedPeer = null;\r\n\t\tts.readL.lock();\r\n\t\ttry {\r\n\t\t\tfor (Entry<String, HashSet<Machine>> entry : ts.filesServersMap.entrySet()) {\r\n\t\t\t\tfailedPeer = new StringBuilder();\r\n\t\t\t\tfor (Machine m : entry.getValue()) {\r\n\t\t\t\t\tfailedPeer.append(m.toString());\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tfinalRequest = String.format(requestFormat, entry.getKey(), failedPeer.toString());\r\n\t\t\t\tbyte[] result = ts.handleSpecificRequest(finalRequest);\r\n\t\t\t\tSystem.out.println(\"result of find=\" + Utils.byteToString(result) + \" entrySet=\" + entry.getValue());\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tts.readL.unlock();\r\n\t\t}\r\n\r\n\t}",
"@Override\n public Collection<FsContent> visit(FileSystem fs) {\n\n SleuthkitCase sc = Case.getCurrentCase().getSleuthkitCase();\n\n String query = \"SELECT * FROM tsk_files WHERE fs_obj_id = \" + fs.getId()\n + \" AND (meta_type = \" + TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_REG.getMetaType()\n + \") AND (size > 0)\";\n try {\n ResultSet rs = sc.runQuery(query);\n List<FsContent> contents = sc.resultSetToFsContents(rs);\n Statement s = rs.getStatement();\n rs.close();\n if (s != null) {\n s.close();\n }\n return contents;\n } catch (SQLException ex) {\n logger.log(Level.WARNING, \"Couldn't get all files in FileSystem\", ex);\n return Collections.emptySet();\n }\n }",
"@Override\n public boolean pullFile(String remoteFilePath, File localFile)\n throws DeviceNotAvailableException {\n boolean found = false;\n for (String[] item : dirs) {\n if (String.format(\"%s/%s\", item[0], item[1]).equals(remoteFilePath)) {\n found = true;\n break;\n }\n }\n assertTrue(\"trying to pull non-existent file: \" + remoteFilePath, found);\n try {\n return localFile.createNewFile();\n } catch (IOException ioe) {\n throw new RuntimeException(\"failed to create empty file\", ioe);\n }\n }",
"public List<LsFileEntry> lsFiles() \n \tthrows CorruptObjectException, IOException {\n \t\tMap<String, LsFileEntry> cachedEntries = new TreeMap<String, LsFileEntry>(); \n \t\t\n \t\t//first read all the files which are the Index\n \t\tfinal DirCache cache = DirCache.read(db);\n \t\tfor (int i = 0; i < cache.getEntryCount(); i++) {\n \t\t\tfinal DirCacheEntry ent = cache.getEntry(i);\n \t\t\t\n \t\t\t//X TODO this is surely not enough ;)\n \t\t\tLsFileStatus fs = LsFileStatus.CACHED;\n \t\t\tLsFileEntry fileEntry = new LsFileEntry(ent.getPathString(), fs, ent.getObjectId());\n \t\t\tcachedEntries.put(ent.getPathString(), fileEntry);\n \t\t}\n \n \t\t// now read all the files on the disk\n \t\tSet<String> filesOnDisk = new TreeSet<String>(); \n \t\tFile workDir = db.getWorkDir();\n \t\taddFiles(filesOnDisk, \"\", workDir);\n \t\t\n \t\t// and now compare them. since both are already sorted because we used TreeMap and TreeSort\n \t\t// we can simply crawl over them end compare them. kind of a merge sort though...\n \t\tArrayList<LsFileEntry> fileEntries = new ArrayList<LsFileEntry>();\n \n \t\tIterator<String> cacheIt = cachedEntries.keySet().iterator();\n \t\tIterator<String> fileIt = filesOnDisk.iterator();\n \t\t\n \t\tString cachedPath = null;\n \t\tString fsPath = null;\n \t\twhile (cacheIt.hasNext() || fileIt.hasNext()) {\n \t\t\t\n \t\t\tif (cachedPath == null && cacheIt.hasNext()) {\n \t\t\t\tcachedPath = cacheIt.next();\n \t\t\t}\n \t\t\t\n \t\t\tif (fsPath == null && fileIt.hasNext()) {\n \t\t\t\tfsPath = fileIt.next();\n \t\t\t}\n \t\t\t\n \t\t\tif (cachedPath != null && cachedPath.equals(fsPath)) {\n \t\t\t\t// oh found in both systems\n \t\t\t\tfileEntries.add(cachedEntries.get(cachedPath));\n \t\t\t\tcachedPath = null;\n \t\t\t\tfsPath = null;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tif (cachedPath != null && !fileEntries.contains(cachedPath)) {\n \t\t\t\tfileEntries.add(new LsFileEntry(cachedPath, LsFileStatus.REMOVED, null));\n \t\t\t\tcachedPath = null;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tif (fsPath != null && !cachedEntries.keySet().contains(fsPath)) {\n \t\t\t\tfileEntries.add(new LsFileEntry(fsPath, LsFileStatus.OTHER, null));\n \t\t\t\tfsPath = null;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tcachedPath = null;\n \t\t\tfsPath = null;\n \t\t\t\n \t\t}\n \t\t\n \t\treturn fileEntries;\n \t}",
"public DBFileInfo getStreamInfo(FileState parent, String[] paths, DBDeviceContext dbCtx) {\n\n // Check if the file is in the cache\n\n String streamPath = paths[0] + paths[1] + paths[2]; \n FileState state = getFileState(streamPath, dbCtx, true);\n \n if ( state != null && state.getFileId() != -1) {\n \n // Debug\n \n if ( Debug.EnableInfo && hasDebug())\n Debug.println(\"@@ Cache hit - getStreamInfo() path=\" + streamPath);\n \n // Return the file information\n \n DBFileInfo finfo = (DBFileInfo) state.findAttribute(FileState.FileInformation);\n if ( finfo != null)\n return finfo;\n }\n\n // DEBUG\n \n if ( Debug.EnableInfo && hasDebug())\n Debug.println(\"DBDiskDriver getStreamInfo parent=\" + parent.getPath() + \", stream=\" + paths[2]);\n \n // Get a list of the streams for the parent file\n \n DBFileInfo finfo = null;\n \n try {\n \n // Get the list of streams\n\n StreamInfoList sList = (StreamInfoList) parent.findAttribute(DBStreamList);\n \n if ( sList == null) {\n \n // No cached stream information, get the list from the database\n\n sList = dbCtx.getDBInterface().getStreamsList(parent.getFileId(), DBInterface.StreamAll);\n \n // Cache the information\n \n parent.addAttribute(DBStreamList, sList);\n }\n\n // Find the required stream information\n \n if ( sList != null) {\n \n // Find the required stream information\n \n StreamInfo sInfo = sList.findStream(paths[2]);\n \n // Convert the stream information to file information\n \n if ( sInfo != null) {\n \n // Load the stream information\n \n finfo = new DBFileInfo();\n finfo.setFileId(parent.getFileId());\n \n // Copy the stream information\n \n finfo.setFileName(sInfo.getName());\n finfo.setSize(sInfo.getSize());\n \n // Get the file creation date, or use the current date/time\n\n if ( sInfo.hasCreationDateTime())\n finfo.setCreationDateTime(sInfo.getCreationDateTime());\n \n // Get the modification date, or use the current date/time\n \n if ( sInfo.hasModifyDateTime())\n finfo.setModifyDateTime(sInfo.getModifyDateTime());\n else if ( sInfo.hasCreationDateTime())\n finfo.setModifyDateTime(sInfo.getCreationDateTime());\n \n // Get the last access date, or use the current date/time\n \n if ( sInfo.hasAccessDateTime())\n finfo.setAccessDateTime(sInfo.getAccessDateTime());\n else if ( sInfo.hasCreationDateTime())\n finfo.setAccessDateTime(sInfo.getCreationDateTime());\n }\n }\n }\n catch ( DBException ex) {\n Debug.println(ex);\n finfo = null;\n }\n\n // Set the full path for the file\n \n if ( finfo != null)\n finfo.setFullName(streamPath);\n \n // Update the cached information, if available\n \n if ( state != null && finfo != null) {\n state.addAttribute(FileState.FileInformation, finfo);\n state.setFileStatus( FileStatus.FileExists);\n }\n \n // Return the file information for the stream\n\n return finfo;\n }",
"protected int DoLoadMissingFile(java.sql.Connection pConnection, ChannelSftp channelSftp, int pFtpID, String pReceiveFrom, String pDirReceive, int pRemoteFileSplitByDay, int pZipAfterDownload, int pRenameAfterDownload, int pSeqFrom, int pSeqTo, int pRenameType, String pNewPreFix, String pNewExt, String pCurrMissedDir) throws Exception\n {\n \tSimpleDateFormat sdf = new SimpleDateFormat(\"EEE MMM dd HH:mm:ss zzz yyyy\");\n \tSimpleDateFormat sdfComparator = new SimpleDateFormat(\"yyyyMMddHHmmss\");\n SimpleDateFormat sdf2 = new SimpleDateFormat(\"yyyyMMdd\");\n File file = null;\n File fileRename = null;\n String mSourceName = null;\n String mDestinationName = null;\n int mRetValue;\n String mReceiveFrom = null;\n String mNewFileName = null;\n IOUtils IOUtil = new IOUtils();\n ResultSet rs = null;\n Statement stmt1 = mConnection.createStatement();\n SmartZip zip = new SmartZip();\n Statement stmt = null;\n String mSQL = \"select distinct a.current_dir_missed,\" + \"to_char(sysdate-b.time_check,'yyyymmddhh24miss') min_date_check \" + \"from missed_file a,data_param b \" + \"where a.status=0 and a.switch_id=b.id and b.id=\" + pFtpID;\n ResultSet rs1 = stmt1.executeQuery(mSQL);\n try\n {\n mReceiveFrom = pReceiveFrom;\n \n channelSftp.cd(pReceiveFrom);\n\n //FTPFile[] listings = pFtp.dirDetails(\"\"); //Duyet cac thu muc tren ftp\n Vector<LsEntry> fileList = channelSftp.ls(pReceiveFrom);\n for (LsEntry contain : fileList)\n {\n if (contain.getAttrs().isDir())\n {\n if (!contain.getFilename().startsWith(\".\") )\n {\n if (pRemoteFileSplitByDay == 1)\n {\n\n if (Global.isNumeric(contain.getFilename()))\n {\n while (rs1.next() && miThreadCommand != THREAD_STOP)\n {\n if ((rs1.getString(\"current_dir_missed\") != null) && ((Integer.parseInt(rs1.getString(\"current_dir_missed\"))) == (Integer.parseInt(contain.getFilename()))))\n {\n if (\"/\".compareTo(pReceiveFrom.substring(pReceiveFrom.length() - 1)) != 0)\n {\n mReceiveFrom = pReceiveFrom + \"/\" + contain.getFilename();\n }\n else\n {\n mReceiveFrom = pReceiveFrom + contain.getFilename();\n }\n \n if (Long.parseLong(sdfComparator.format(sdf.parse(contain.getAttrs().getMtimeString()))) > Long.parseLong(rs1.getString(\"min_date_check\")))\n {\n writeLogFile(\" - Subdirectory listing: \" + contain.getFilename());\n if (DoLoadMissingFile(pConnection, channelSftp, pFtpID, mReceiveFrom, pDirReceive, pRemoteFileSplitByDay, pZipAfterDownload, pRenameAfterDownload, pSeqFrom, pSeqTo, pRenameType, pNewPreFix, pNewExt, contain.getFilename()) != 0)\n {\n return ( -1);\n }\n }\n }\n\n }\n\n }\n }\n }\n\n }\n else\n {\n if (pCurrMissedDir != null && !pCurrMissedDir.equals(\"\"))\n {\n mSQL = \"select a.id,a.file_name,a.current_dir_missed,\" + \"b.id,b.header_file_send,b.remote_getfile_dir,\" + \"b.local_getfile_dir,b.remote_split_file_by_day,\" + \"b.local_split_file_by_day,\" + \"to_char(sysdate-b.time_check,'yyyymmddhh24miss') min_date_check \" + \"from missed_file a,data_param b \" + \"where a.status=0 and a.switch_id=b.id and b.id=\" + pFtpID + \"and a.current_dir_missed='\" + pCurrMissedDir + \"'\";\n }\n else\n {\n mSQL = \"select a.id,a.file_name,a.current_dir_missed,\" + \"b.id,b.header_file_send,b.remote_getfile_dir,\" + \"b.local_getfile_dir,b.remote_split_file_by_day,\" + \"b.local_split_file_by_day,\" + \"to_char(sysdate-b.time_check,'yyyymmddhh24miss') min_date_check \" + \"from missed_file a,data_param b \" + \"where a.status=0 and a.switch_id=b.id and b.id=\" + pFtpID;\n }\n\n stmt = mConnection.createStatement();\n rs = stmt.executeQuery(mSQL);\n\n // Duyet cac file bao thieu\n while (rs.next() && miThreadCommand != THREAD_STOP)\n {\n\n // Kiem tra gia tri Seq cua file trong bang missed_file co trung voi gia tri Seq cua\n // mot file tren FTP server khong\n String seqFileStr = \"\";\n String seqMissedFileStr = \"\";\n if (pRenameAfterDownload == 1)\n {\n if (pRenameType == 1)\n {\n seqFileStr = contain.getFilename().substring(pSeqFrom - 1, pSeqTo - 1);\n seqMissedFileStr = rs.getString(\"file_name\").substring(pSeqFrom - 1, pSeqTo - 1);\n }\n else\n {\n seqFileStr = contain.getFilename().substring(pSeqFrom, pSeqTo);\n seqMissedFileStr = rs.getString(\"file_name\").substring(pSeqFrom, pSeqTo);\n }\n\n }\n else\n {\n if (pSeqFrom >= 0 && pSeqTo > 0)\n {\n try\n {\n seqFileStr = contain.getFilename().substring(pSeqFrom - 1, pSeqTo - 1);\n seqMissedFileStr = rs.getString(\"file_name\").substring(pSeqFrom - 1, pSeqTo - 1);\n }\n catch (Exception ex)\n {\n seqFileStr = \"\";\n seqMissedFileStr = \"\";\n }\n }\n }\n boolean isMissedFile = false;\n if (!seqFileStr.equals(\"\") && !seqMissedFileStr.equals(\"\") && seqFileStr.equalsIgnoreCase(seqMissedFileStr))\n {\n String currMissedDir = (rs.getString(\"current_dir_missed\") == null ? \"\" : rs.getString(\"current_dir_missed\"));\n if (currMissedDir.length() > 0 && Global.isNumeric(currMissedDir))\n {\n if (sdf2.format(sdf.parse(contain.getAttrs().getMtimeString())).equals(currMissedDir))\n {\n isMissedFile = true;\n }\n }\n }\n // Kiem tra hoac ten file, hoac gia tri Seq cua ten file tren FTP Server\n // co trung voi ten hoac gia tri Seq cua file trong bang missed_file.\n if ((rs.getString(\"file_name\").toLowerCase().compareTo(contain.getFilename().toLowerCase()) == 0) || isMissedFile)\n {\n if (sdf.parse(contain.getAttrs().getMtimeString()).compareTo(rs1.getDate(\"min_date_check\")) > 0)\n {\n mSourceName = IOUtil.FillPath(pReceiveFrom, Global.mSeparate) + contain.getFilename(); //+ rs.getString(\"file_name\");\n if (Global.mSeparate.compareTo(pDirReceive.substring(pDirReceive.length() - 1)) == 0)\n {\n if (rs.getInt(\"local_split_file_by_day\") == 0)\n {\n mDestinationName = pDirReceive;\n }\n else\n {\n mDestinationName = pDirReceive + rs.getString(\"current_dir_missed\") + Global.mSeparate;\n }\n }\n else if (rs.getInt(\"local_split_file_by_day\") == 0)\n {\n mDestinationName = pDirReceive + Global.mSeparate;\n }\n else\n {\n mDestinationName = pDirReceive + Global.mSeparate + rs.getString(\"current_dir_missed\") + Global.mSeparate;\n }\n\n IOUtil.forceFolderExist(mDestinationName);\n IOUtil.chmod(new File(mDestinationName), \"750\");\n file = new File(mDestinationName);\n if (file.exists() != true)\n {\n writeLogFile(\"The system cannot find the path specified : '\" + mDestinationName + \"'\");\n return ( -1);\n }\n writeLogFile(\" .Loading file \" + mSourceName + \" - Size : \" + contain.getAttrs().getSize() + \" bytes.\");\n channelSftp.get(mSourceName, mDestinationName + \"cdr.tmp\");\n file = new File(mDestinationName + \"cdr.tmp\");\n if (pRenameAfterDownload == 1)\n {\n if (pRenameType == 1) // HexToDec\n {\n mNewFileName = pNewPreFix + Global.Format(Global.Hex2Dec(contain.getFilename().substring(pSeqFrom - 1, pSeqTo - 1)), Global.rpad(\"\", pSeqTo - pSeqFrom + 1, \"0\")) + \".\" + pNewExt;\n }\n else\n {\n mNewFileName = pNewPreFix + Global.Format(Integer.parseInt(contain.getFilename().substring(pSeqFrom, pSeqTo)), Global.rpad(\"\", pSeqTo - pSeqFrom, \"0\")) + \".\" + pNewExt;\n }\n }\n else\n {\n mNewFileName = contain.getFilename();\n }\n\n fileRename = new File(mDestinationName + mNewFileName);\n file.renameTo(fileRename);\n fileRename.setLastModified(sdf.parse(contain.getAttrs().getMtimeString()).getTime());\n //.getFileDateLongTime());\n\n if (fileRename.length() != contain.getAttrs().getSize())\n {\n writeLogFile(\" .File downloaded error.Size of file downloaded (\" + fileRename.length() + \") not equal file origination.\");\n return (0);\n }\n IOUtil.chmod(fileRename, \"750\");\n if (pZipAfterDownload == 1)\n {\n\n zip.ZipFile(fileRename.getAbsolutePath(), fileRename.getAbsolutePath() + \".zip\");\n fileRename = new File(fileRename.getAbsolutePath() + \".zip\");\n //fileRename.setLastModified(listLoad\n //.getFileDateLongTime());\n fileRename.setLastModified(sdf.parse(contain.getAttrs().getMtimeString()).getTime());\n IOUtil.chmod(fileRename, \"750\");\n IOUtil.deleteFile(mDestinationName + mNewFileName);\n }\n\n mSQL = \"update import_header set current_dir = '\" + rs.getString(\"current_dir_missed\") + \"',status=\" + Global.StateFileFtpOK + \" where status in (\" + Global.StateFileFtpOK + \",\" + Global.StateConvertedError + \")\" + \" and file_name='\" + contain.getFilename() + \"' and ftp_id=\" + pFtpID; //+ rs.getString(\"file_name\")\n mRetValue = Global.ExecuteSQL(pConnection, mSQL);\n if (mRetValue == 0)\n {\n \t\n \tDate createDate = sdf.parse(contain.getAttrs().getMtimeString());\n \tString createDateStr = sdfComparator.format(createDate);\n mSQL = \"insert into import_header(status,ftp_id,\" + \"file_name,file_size,date_getfile,current_dir,\" + \"date_createfile) values(\" + Global.StateFileFtpOK + \",\" + pFtpID + \",'\" + contain.getFilename() + \"',\" + contain.getAttrs().getSize() + \",sysdate,'\" + (rs.getString(\"current_dir_missed\") == null ? \"\" : rs.getString(\"current_dir_missed\")) + \"','\" + createDateStr + \"')\"; //+ rs.getString(\"file_name\")\n Global.ExecuteSQL(pConnection, mSQL);\n }\n mSQL = \"update missed_file set status=1,date_getfile=sysdate \" + \"where id=\" + rs.getString(\"id\");\n Global.ExecuteSQL(pConnection, mSQL);\n pConnection.commit();\n writeLogFile(\" .File \" + contain.getFilename() + \" had been loaded again successful.\");\n \n \n }\n }\n\n }\n rs.close();\n stmt.close();\n }\n }\n fileList = null;\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n throw ex;\n }\n finally\n {\n try\n {\n IOUtil = null;\n rs1.close();\n rs1 = null;\n if (rs != null)\n {\n rs.close();\n }\n rs = null;\n stmt.close();\n stmt = null;\n stmt1.close();\n stmt1 = null;\n \n }\n catch (Exception e)\n {\n }\n }\n return (0);\n }",
"void lookup(String fileName) throws UnknownHostException {\n Random random = new Random();\n int child = random.nextInt(3);\n int hashVal = findHash(fileName, 2,child );\n InetAddress address = systemMap.get(hashVal);\n StringBuilder sb = new StringBuilder();\n sb.append(\"name \"); sb.append(fileName);\n sb.append(\" operation \"); sb.append(\"lookup\");\n sb.append(\" client IP \"); sb.append(InetAddress.getLocalHost());\n sb.append(\" Level \"); sb.append(2);\n sb.append(\" Child \"); sb.append(child);\n byte[] sendBuffer = sb.toString().getBytes();\n DatagramPacket sendPacket = new DatagramPacket(sendBuffer, sendBuffer.length, address, recPort);\n try {\n socket.send(sendPacket);\n }\n catch (IOException e){\n\n System.out.println(\"\\nIssue in sending packet\");\n }\n }",
"private void receiveIHave(DataInputStream dis) throws IOException {\n String parent = dis.readUTF();\n String name = dis.readUTF();\n int index = GUITracker.metaFilesTracker.getIndexMetaFileWithPath(parent, name);\n GUITracker.metaFilesTracker.list.get(index).owners.add(addressPort);\n }",
"public File getFile()\r\n \t{\r\n \t\tFile result = null;\r\n \t\t\r\n \t\tString hostName = getAuthority();\r\n \t\t\r\n \t\tif((hostName == null) || hostName.equals(\"\") || hostName.equalsIgnoreCase(\"localhost\"))\r\n \t\t{\r\n \t\t\tString filePath = getPath();\r\n \t\t\tresult = new File(filePath);\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tthrow new RuntimeException(\"Can't resolve files on remote host machines\");\r\n \t\t}\r\n \t\t\r\n \t\treturn result;\r\n \t}",
"public java.lang.String[] getNewFiles(){\r\n return localNewFiles;\r\n }",
"public abstract String getFileLocation();",
"private RemoteIterator<FileStatus> list(Path path) throws IOException {\n return new StoppableRemoteIterator(fs.listStatusIterator(path));\n }",
"public interface BlockFileSystem {\n\n \n /**\n * The size of a block in bytes.\n */\n int BLOCK_SIZE = 512;\n\n\n /**\n * Returns the root entry of the file system. Subfiles and directories\n * can be found by searching the returned entry.\n * \n * @return the root entry\n * @throws IOException if an IO error occurs\n */\n public abstract Entry getRoot() throws IOException;\n\n \n /**\n * Returns the number of the block that follows the given block.\n * The internal block allocation tables are consulted to determine the\n * next block. A return value that is less than zero indicates that\n * there is no next block.\n * \n * @param block the number of block whose successor to return\n * @return the successor of that block\n * @throws IOException if an IO error occurs\n */\n public abstract int getNextBlock(int block) throws IOException;\n\n\n /**\n * Returns the raw input stream for this file system. \n * Typically this will be the random access file containing the .doc.\n * \n * @return the raw input stream for this file system\n */\n public abstract SeekInputStream getRawInput();\n\n}",
"@Test\r\n public void testReadWhenShared() {\n System.out.println(\"Test : Alice shares her file with Bob and Bob can read it\");\r\n System.out.println();\r\n String userId = \"Alice\";\r\n String filePath = \"/home/Alice/shared/Af1.txt\";\r\n String targetUserId = \"Bob\";\r\n String fileName = \"Af1.txt\";\r\n File file = new File (filePath, userId, fileName);\r\n List<File> fileList = FileList.getFileList();\r\n fileList.add(file);\r\n service.shareFile(userId, targetUserId, filePath);\r\n try {\r\n assertNotNull(service.readFile(targetUserId, filePath));\r\n } catch (Exception e) {\r\n assertFalse(\"Should not throw any exception\", true);\r\n }\r\n System.out.println();\r\n\r\n }",
"public static void main(String[] args) {\n IPFS ipfs = new IPFS(\"/ip4/127.0.0.1/tcp/5001\");\n\n /* Add a file */\n //can be done via NamedStreamable.FileWrapper(File file) -> files\n //NamedStreamable.ByteWrapper(byte[]) -> bytes\n //added files are always pinned\n //using file chooser (for now)\n JFileChooser chooser = new JFileChooser();\n\n chooser.setCurrentDirectory(new File(\".\"));\n chooser.setDialogTitle(\"Select file to host\");\n chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\n\n //filter different types of files to add\n //FileNameExtensionFilter filter = new FileNameExtensionFilter(\"txt & HTML \", \"txt\", \"html\");\n int returnVal = chooser.showOpenDialog(null);\n if (returnVal == JFileChooser.APPROVE_OPTION) {\n File file = chooser.getSelectedFile();\n\n //add file to ipfs and store version/s\n /*@EDIT better to use JSON format!! */\n try {\n List<MerkleNode> nodes;\n if (file.isDirectory()) {\n System.out.println(\"directory\");\n System.out.println(file.getAbsolutePath());\n System.out.println(file.getName());\n nodes = ipfs.add(new NamedStreamable.FileWrapper(file));\n for (MerkleNode node : nodes) {\n System.out.println(node.toJSONString());\n }\n MerkleNode addResult = nodes.get(nodes.size()-1);\n } else {\n //get merkle node/s of the file (multiple nodes for a large file)\n nodes = ipfs.add(new NamedStreamable.FileWrapper(file));\n\n// //output the hashes to a file\n// File versionedFile = new File(file.getParent() + \"/\" + file.getName() + \".ipfs\"); //add extension to file (hope it works)\n// if(!versionedFile.exists()){\n// versionedFile.createNewFile();\n// System.out.println(\"Created new file in: \" + versionedFile.getAbsolutePath());\n// }\n //new line for storing new version merkel nodes\n// BufferedWriter writer = new BufferedWriter(new FileWriter(versionedFile, true)); //ensure to append to file\n for (MerkleNode node : nodes) {\n// writer.append(node.hash.toString() + \" \"); //hashes seperated by spaces..\n System.out.println(node.toJSONString()); //testing what output is!\n }\n// writer.append(\"\\n\"); //new line for end of version\n// writer.close();\n }\n } catch (IOException ex) {\n System.err.println(\"Issue when adding file\");\n }\n }\n\n }",
"public byte[] getData(String path, Stat stat, Watcher watcher) throws KeeperException.NoNodeException {\n return dataTree.getData(path, stat, watcher);\n }",
"public void findFile(Packet packet) {\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tchar reqFile;\r\n\t\t// If packet has circled network\r\n\t\tif(peerNode.peerClientID == packet.packetSenderID) {\r\n\t\t\t// If peer has file in its own DHT\r\n\t\t\tif(peerNode.distributedHashTable.containsKey(packet.fileName)) {\r\n\t\t\t\tjava.util.Date hasFileDate = new java.util.Date();\r\n\t\t\t\tSystem.out.print(hasFileDate + \": File is in my Distributed Hash Table at \" );\r\n\t\t\t\tfor(int i = 0; i < peerNode.distributedHashTable.get(packet.fileName).size(); i++) {\t\r\n\t\t\t\t\tSystem.out.println(peerNode.distributedHashTable.get(packet.fileName).get(i) + \" \");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tArrayList<InetSocketAddress> fileLocations = new ArrayList<InetSocketAddress>();\r\n\t\t\t\tfor(int i = 0; i < peerNode.distributedHashTable.get(packet.fileName).size(); i++) {\r\n\t\t\t\t\tfileLocations.add(peerNode.distributedHashTable.get(packet.fileName).get(i));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Propmpt user if they want to transfer file\r\n\t\t\t\tjava.util.Date inDate = new java.util.Date();\r\n\t\t\t\tSystem.out.println(inDate + \": Request the file? Yes: 'y' | No: 'n'\");\r\n\t\t\t\treqFile = input.next().charAt(0);\r\n\t\t\t\t// input validation\r\n\t\t\t\twhile(reqFile == 0 && (reqFile != 'y' || reqFile != 'n')) {\r\n\t\t\t\t\tjava.util.Date errDate = new java.util.Date();\r\n\t\t\t\t\tSystem.out.println(errDate + \": You did not enter a valid command. Try Again. Request the file? Yes: 'y' | No: 'n'\");\r\n\t\t\t\t\treqFile = input.next().charAt(0);\r\n\t\t\t\t}\r\n\t\t\t\t// if yes to transfer\r\n\t\t\t\tif(reqFile == 'y') {\r\n\t\t\t\t\tif(fileLocations.size() == 1) {\r\n\t\t\t\t\t\tif(fileLocations.get(0).getPort() == peerNode.peerClientListenPort) {\r\n\t\t\t\t\t\t\tjava.util.Date haveFile = new java.util.Date();\r\n\t\t\t\t\t\t\tSystem.out.println(haveFile + \": I already have this file\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tjava.util.Date reqDate = new java.util.Date();\r\n\t\t\t\t\t\t\tSystem.out.println(reqDate + \": Requesting the file named \" + packet.fileName + \" from Peer at IP\" + fileLocations.get(0).getAddress() + \":\" + fileLocations.get(0).getPort());\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tPacket reqFilePckt = new Packet();\r\n\t\t\t\t\t\t\treqFilePckt.eventCode = 5;\r\n\t\t\t\t\t\t\treqFilePckt.packetSenderID = peerNode.peerClientID;\r\n\t\t\t\t\t\t\treqFilePckt.peerClientIP = peerNode.peerClientIP;\r\n\t\t\t\t\t\t\treqFilePckt.peerClientListenPort = peerNode.peerClientListenPort;\r\n\t\t\t\t\t\t\treqFilePckt.fileName = packet.fileName;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t// req file\r\n\t\t\t\t\t\t\t\tpeerNode.peer2Peer = new Socket(fileLocations.get(0).getAddress(), fileLocations.get(0).getPort());\r\n\t\t\t\t\t\t\t\tpeerNode.peer2PeerOutStream = new ObjectOutputStream(peerNode.peer2Peer.getOutputStream());\r\n\t\t\t\t\t\t\t\tpeerNode.peer2PeerInStream = new ObjectInputStream(peerNode.peer2Peer.getInputStream());\r\n\t\t\t\t\t\t\t\tpeerNode.peer2PeerOutStream.writeObject(reqFilePckt);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Close socket/connection\r\n\t\t\t\t\t\t\t\tcloseConnection();\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\tcatch (IOException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch blo\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tint index = (int) (Math.random() * (fileLocations.size()+1));\r\n\t\t\t\t\t\twhile( fileLocations.get(index).getPort() == peerNode.peerClientListenPort) {\r\n\t\t\t\t\t\t\tindex = (int) (Math.random() * (fileLocations.size()+1));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tjava.util.Date reqDate = new java.util.Date();\r\n\t\t\t\t\t\tSystem.out.println(reqDate + \": Requesting the file named \" + packet.fileName + \" from Peer at IP\" + packet.fileLocations.get(index).getAddress() + \":\" + packet.fileLocations.get(index).getPort());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tPacket reqFilePckt = new Packet();\r\n\t\t\t\t\t\treqFilePckt.eventCode = 5;\r\n\t\t\t\t\t\treqFilePckt.packetSenderID = peerNode.peerClientID;\r\n\t\t\t\t\t\treqFilePckt.peerClientIP = peerNode.peerClientIP;\r\n\t\t\t\t\t\treqFilePckt.peerClientListenPort = peerNode.peerClientListenPort;\r\n\t\t\t\t\t\treqFilePckt.fileName = packet.fileName;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t// req file\r\n\t\t\t\t\t\t\tpeerNode.peer2Peer = new Socket(packet.fileLocations.get(index).getAddress(), packet.fileLocations.get(index).getPort());\r\n\t\t\t\t\t\t\tpeerNode.peer2PeerOutStream = new ObjectOutputStream(peerNode.peer2Peer.getOutputStream());\r\n\t\t\t\t\t\t\tpeerNode.peer2PeerInStream = new ObjectInputStream(peerNode.peer2Peer.getInputStream());\r\n\t\t\t\t\t\t\tpeerNode.peer2PeerOutStream.writeObject(reqFilePckt);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Close socket/connection\r\n\t\t\t\t\t\t\tcloseConnection();\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t\tcatch (IOException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch blo\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if(reqFile == 'n') {\r\n\t\t\t\t\tjava.util.Date noReqDate = new java.util.Date();\r\n\t\t\t\t\tSystem.out.println(noReqDate + \": File transfer is not requested\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tjava.util.Date notFndDate = new java.util.Date();\r\n\t\t\t\tSystem.out.println(notFndDate + \": File was not found in the network. Please try again later\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Check if peer DHT has file and if so, send response\r\n\t\telse if(peerNode.peerClientID != packet.packetSenderID && peerNode.distributedHashTable.containsKey(packet.fileName)) {\r\n\t\t\tjava.util.Date fileFoundDate = new java.util.Date();\r\n\t\t\tSystem.out.println(fileFoundDate + \": I have the file in my Distributed Hash Table\");\r\n\t\t\tPacket fileLocationPacket = new Packet();\r\n\t\t\tfileLocationPacket.eventCode = 4;\r\n\t\t\tfileLocationPacket.fileName = packet.fileName;\r\n\t\t\tfileLocationPacket.packetSenderID = peerNode.peerClientID;\r\n\t\t\tfileLocationPacket.packetRecipientID = packet.packetSenderID;\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < peerNode.distributedHashTable.get(packet.fileName).size(); i++) {\r\n\t\t\t\tfileLocationPacket.fileLocations.add(peerNode.distributedHashTable.get(packet.fileName).get(i));\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tjava.util.Date fileLocSentDate = new java.util.Date();\r\n\t\t\t\tSystem.out.println(fileLocSentDate + \": Sending file location to Peer Node \" + packet.packetSenderID);\r\n\t\t\t\tpeerNode.peer2Peer = new Socket(packet.peerClientIP, packet.peerClientListenPort);\r\n\t\t\t\tpeerNode.peer2PeerOutStream = new ObjectOutputStream(peerNode.peer2Peer.getOutputStream());\r\n\t\t\t\tpeerNode.peer2PeerInStream = new ObjectInputStream(peerNode.peer2Peer.getInputStream());\r\n\t\t\t\tpeerNode.peer2PeerOutStream.writeObject(fileLocationPacket);\r\n\t\t\t\t\r\n\t\t\t\t// Close socket/connection\r\n\t\t\t\tcloseConnection();\r\n\t\t\t\t\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// Forward packet to Successor Peer Nodes until Peer with file in their Distributed Hash Table is found\r\n\t\telse {\r\n\t\t\tPacket p = packet;\r\n\t\t\ttry {\r\n\t\t\t\tpeerNode.peer2Peer = new Socket(peerNode.succPeerIP, peerNode.succPeerPort);\r\n\t\t\t\tpeerNode.peer2PeerOutStream = new ObjectOutputStream(peerNode.peer2Peer.getOutputStream());\r\n\t\t\t\tpeerNode.peer2PeerInStream = new ObjectInputStream(peerNode.peer2Peer.getInputStream());\r\n\t\t\t\tpeerNode.peer2PeerOutStream.writeObject(p);\r\n\t\t\t\t\r\n\t\t\t\t// Close socket/connection\r\n\t\t\t\tcloseConnection();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\tcloseConnection();\r\n\t}",
"public boolean isRemoteFile() {\n\t\tif (this.serverFileInfo == null)\n\t\t\tthis.fetchInfo();\n\t\treturn this.serverFileInfo != null && this.serverFileInfo.exists();\n\t}",
"private void getBinaryFileFromPeer(Host h, String nombre, ObjectOutputStream out) {\n\n log.info(\"Starting thread to download binary from peer in \" + h.getIp() + \":\" + h.getPort() );\n ClientDownloadThread c = new ClientDownloadThread(h,nombre,this.sharedFolder);\n c.start();\n try {\n c.join();\n\n Consulta c2 = new Consulta();\n c2.setFileName(c.getFileName());\n c2.setMethod(ADD_FILE);\n\n log.info(\"Updating server w new file downloaded\");\n\n out.writeObject(c2);\n\n log.info(\"Update sucessfuly\");\n\n } catch (InterruptedException | IOException e) {\n log.info(\"Error while joining download thread\",e);\n }\n\n\n }",
"@Override\r\n protected String getDiskLocation()\r\n {\r\n return dataFile.getFilePath();\r\n }",
"public Stack<Entry> readNodeEntries() {\n FileLocation thisNode = null;\n Stack<Entry> nodeEntries = new Stack<Entry>();\n try {\n int port = FileApp.getMyPort();\n thisNode = new FileLocation(port);\n } catch (UnknownHostException ex) {\n System.err.println(\"Mapper.read node entries uknown host exception\");\n }\n Stack<Integer> nodeHashes = FileApp.getHashes();\n while (!nodeHashes.empty()) {\n nodeEntries.push(new Entry(nodeHashes.pop(), thisNode));\n }//while (!nodeHashes.empty()\n printAct(\">scanned my node's files\");\n return nodeEntries;\n }",
"private String handleFindFileRequest(String request) {\r\n\t\tString[] commandFragments = Utils.splitCommandIntoFragments(request);\r\n\t\t// TODO validation here\r\n\t\tString[] filesFromCommandFrag = Utils.getKeyAndValuefromFragment(commandFragments[0]);\r\n\t\tString[] failedPeerList = Utils.getKeyAndValuefromFragment(commandFragments[1], SharedConstants.NO_LIMIT_SPLIT);\r\n\r\n\t\tString peers = findPeersForFile(filesFromCommandFrag[1], failedPeerList[1]);\r\n\t\treturn peers;\r\n\t}",
"public SortedMap<String, RemoteFileInfo> getAllFileInfo() {\r\n return remotes;\r\n }",
"public FileLocation findFile(int k) {\n RemoteMapper rm = findMapper(k);\n FileLocation fl = null;\n try {\n return rm.lookup(k);\n } catch (RemoteException ex) {\n System.err.println(\"Mapper.findFile remote Exception\");\n }\n\n return fl;\n }",
"DiscFileSystemInfo getFileSystemInfo(String path) throws IOException;",
"public String[] listFiles() throws FileSystemUtilException \r\n\t{\r\n\t\tString remoteDir = null;\r\n\t\tString remoteFileName = null;\r\n\t\tString command = null;\r\n\t\tint signal = -1;\r\n\t\tlogger.debug(\"Begin: \"+getClass().getName()+\":listFiles()\");\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tconnect(); \r\n\t\t\t\r\n\t\t\tint lastSeperatorIndex = -1;\r\n\t\r\n\t\t\tif(remoteFilePath.lastIndexOf(\"/\") != -1){\r\n\t\t\t\tlastSeperatorIndex = remoteFilePath.lastIndexOf(\"/\");\r\n\t\t\t}else if(remoteFilePath.lastIndexOf(\"\\\\\") != -1){\r\n\t\t\t\tlastSeperatorIndex = remoteFilePath.lastIndexOf(\"\\\\\");\r\n\t\t\t}\r\n\t\t\tif(lastSeperatorIndex == remoteFilePath.length()-1)\r\n\t\t\t{\r\n\t\t\t\tremoteDir = remoteFilePath;\r\n\t\t\t\tremoteFileName = \"\";\r\n\t\t\t\tlogger.debug(\"file path ends with / - directory is \"+remoteDir+\" , filename is \"+remoteFileName);\r\n\t\t\t\tcommand = \"cd \"+remoteDir;\t\t\t\r\n\t\t\t\tsignal = executeSimpleCommand(command);\r\n\t\r\n\t\t\t\tif(signal != 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t//invlid directory/file\r\n\t\t\t\t\tthrow new FileSystemUtilException(\"ET0017\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tremoteDir = remoteFilePath.substring(0,lastSeperatorIndex+1);\r\n\t\t\t\tremoteFileName = remoteFilePath.substring(lastSeperatorIndex+1,remoteFilePath.length());\r\n\t\t\t\tlogger.debug(\"file path not ends with / - directory is \"+remoteDir+\" , filename is \"+remoteFileName);\r\n\t\t\t\tcommand = \"cd \"+remoteDir;\r\n\t\t\t\tsignal = executeSimpleCommand(command);\r\n\t\t\t\tif(signal != 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t//invlid directory/file\r\n\t\t\t\t\tthrow new FileSystemUtilException(\"ET0017\");\r\n\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\tif(!remoteFileName.startsWith(\"*.\") && !remoteFileName.endsWith(\".*\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tlogger.debug(\"file/directory name \"+remoteFileName+\" not started with *. or ends wirh .*\");\r\n\t\t\t\t\tcommand = \"cd \"+remoteDir+remoteFileName;\r\n\t\t\t\t\tsignal = executeSimpleCommand(command);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\tif(signal != 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tboolean isFile = false;\r\n\t\t\t\t\t\tcommand = \"ls \"+remoteDir;\r\n\t\t\t\t\t\texecuteSimpleCommand(command);\r\n\t\t\t\t\t\tString[] tempFileNames = getFileNamesArray(output);\r\n\t\t\t\t\t\tfor(int j = 0; j < tempFileNames.length; j++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(remoteFileName.equals(tempFileNames[j]))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tisFile = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(!isFile)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t//invlid directory/file\r\n\t\t\t\t\t\t\tthrow new FileSystemUtilException(\"ET0017\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tlogger.debug(remoteFileName+\" is a file\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlogger.debug(remoteFileName+\" is a directory\");\r\n\t\t\t\t\t\tremoteDir = remoteDir+remoteFileName;\r\n\t\t\t\t\t\tremoteFileName = \"\";\r\n\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlogger.debug(\"Before getting list of files : current dir \"+remoteDir+\" getting files list for \"+remoteFileName);\r\n\t\t\tcommand = \"cd \"+remoteDir+\";ls -F \"+remoteFileName;\r\n\t\t\tsignal = executeSimpleCommand(command);\r\n\t\t\tdisconnect();\r\n\t\t\tif(signal != 0)\r\n\t\t\t{\t\t\t \r\n\t\t\t\tthrow new FileSystemUtilException(\"ET0017\");\r\n\t\t\t}\r\n\t\t\tString[] filesList = getFileNamesArray(output);\t\t\r\n\t\t\tlogger.debug(\"End: \"+getClass().getName()+\":listFiles()\");\r\n\t\t\treturn filesList;\r\n\t\t}\r\n\t\t\r\n\t\tcatch(FileSystemUtilException e)\r\n\t\t{\r\n\t\t disconnect();\r\n\t\t if(e.getMessage() != null && e.getMessage().equals(\"FL0071\")){\r\n\t\t \tthrow new FileSystemUtilException(\"FL0071\");\r\n\t\t }\r\n\t\t\tthrow new FileSystemUtilException(e.getErrorCode(),e.getException());\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\r\n public Object getBufferedFileInputStream(String name) {\n return null; \r\n }",
"java.lang.String getFileLoc();",
"public interface FileSystemEntry {\n public long getCount();\n public long getSize();\n public String getName();\n}",
"@Override\n\tpublic void run() {\n\t\t\n\t\t\n\t\tOpenFileRequest.Builder openFileReqObj = OpenFileRequest.newBuilder();\n\t\topenFileReqObj.setFileName(fileName);\t\t\n\t\topenFileReqObj.setForRead(true);\n\t\t\n\t\t\n\t\tFileWriterClass fileWriteObj = new FileWriterClass(localOutFile);\n\t\tfileWriteObj.createFile();\n\t\t\n\t\tbyte[] responseArray;\n\t\t\n\t\ttry {\n\t\t\tRegistry registry=LocateRegistry.getRegistry(Constants.NAME_NODE_IP,Registry.REGISTRY_PORT);\n\t\t\tINameNode nameStub;\n\t\t\tnameStub=(INameNode) registry.lookup(Constants.NAME_NODE);\n\t\t\tresponseArray = nameStub.openFile(openFileReqObj.build().toByteArray());\n\t\t\t\n\t\t\ttry {\n\t\t\t\tOpenFileResponse responseObj = OpenFileResponse.parseFrom(responseArray);\n\t\t\t\tif(responseObj.getStatus()==Constants.STATUS_NOT_FOUND)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"File not found fatal error\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tList<Integer> blockNums = responseObj.getBlockNumsList();\n\t\t\t\tBlockLocationRequest.Builder blockLocReqObj = BlockLocationRequest.newBuilder();\n\t\t\t\t\n//\t\t\t\tSystem.out.println(blockNums);\n\t\t\t\t/**Now perform Read Block Request from all the blockNums**/\n\t\t\t\tblockLocReqObj.addAllBlockNums(blockNums);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tresponseArray = nameStub.getBlockLocations(blockLocReqObj.build().toByteArray());\n\t\t\t\t} catch (RemoteException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tBlockLocationResponse blockLocResObj = BlockLocationResponse.parseFrom(responseArray);\n//\t\t\t\tSystem.out.println(blockLocResObj.toString());\n\t\t\t\t\n\t\t\t\tif(blockLocResObj.getStatus()==Constants.STATUS_FAILED)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Fatal error!\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tList<BlockLocations> blockLocations = blockLocResObj.getBlockLocationsList();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfor(int i=0;i<blockLocations.size();i++)\n\t\t\t\t{\n\t\t\t\t\tBlockLocations thisBlock = blockLocations.get(i);\n\t\t\t\t\t\n\t\t\t\t\tint blockNumber = thisBlock.getBlockNumber();\t\t\t\t\t\n\t\t\t\t\tList<DataNodeLocation> dataNodes = thisBlock.getLocationsList();\n\t\t\t\t\t\n\t\t\t\t\tif(dataNodes==null || dataNodes.size()==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"All nodes are down :( \");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tint dataNodeCounter=0;\n\t\t\t\t\t\n\t\t\t\t\tDataNodeLocation thisDataNode = null;//dataNodes.get(dataNodeCounter);\t\t\t\t\t\n\t\t\t\t\tString ip;// = thisDataNode.getIp();\n\t\t\t\t\tint port ; //= thisDataNode.getPort();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tIDataNode dataStub=null;\n\t\t\t\t\t\n\t\t\t\t\tboolean gotDataNodeFlag=false;\n\t\t\t\t\t\n\t\t\t\t\tdo\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthisDataNode = dataNodes.get(dataNodeCounter);\n\t\t\t\t\t\t\tip = thisDataNode.getIp();\n\t\t\t\t\t\t\tport = thisDataNode.getPort();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tRegistry registry2=LocateRegistry.getRegistry(ip,port);\t\t\t\t\t\n\t\t\t\t\t\t\tdataStub = (IDataNode) registry2.lookup(Constants.DATA_NODE_ID);\n\t\t\t\t\t\t\tgotDataNodeFlag=true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (RemoteException e) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tgotDataNodeFlag=false;\n//\t\t\t\t\t\t\tSystem.out.println(\"Remote Exception\");\n\t\t\t\t\t\t\tdataNodeCounter++;\n\t\t\t\t\t\t} \n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\twhile(gotDataNodeFlag==false && dataNodeCounter<dataNodes.size());\n\t\t\t\t\t\n\t\t\t\t\tif(dataNodeCounter == dataNodes.size())\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"All data nodes are down :( \");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\n\t\t\t\t\t/**Construct Read block request **/\n\t\t\t\t\tReadBlockRequest.Builder readBlockReqObj = ReadBlockRequest.newBuilder();\n\t\t\t\t\treadBlockReqObj.setBlockNumber(blockNumber);\n\t\t\t\t\t\n\t\t\t\t\t/**Read block request call **/\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tresponseArray = dataStub.readBlock(readBlockReqObj.build().toByteArray());\n\t\t\t\t\t\tReadBlockResponse readBlockResObj = ReadBlockResponse.parseFrom(responseArray);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(readBlockResObj.getStatus()==Constants.STATUS_FAILED)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"In method openFileGet(), readError\");\n\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tresponseArray = readBlockResObj.getData(0).toByteArray();\t\t\t\t\t\t\n\t\t\t\t\t\tString str = new String(responseArray, StandardCharsets.UTF_8);\t\t\t\t\t\t\n\t\t\t\t\t\tfileWriteObj.writeonly(str);\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t} catch (InvalidProtocolBufferException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} catch (NotBoundException e) {\n\t\t\tSystem.out.println(\"Exception caught: NotBoundException \");\t\t\t\n\t\t} catch (RemoteException e2) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te2.printStackTrace();\n\t\t}\n\t\tfileWriteObj.closeFile();\n\t\t\n\t\t\n\t}",
"abstract String getFileRoute() throws IOException;",
"public void fileInfo(String info);",
"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}",
"private boolean isLocalRepository() {\n\r\n File file = new File(m_Path.toString() + \"/.magit/Remote\");\r\n return file.exists();\r\n }",
"private void updateStatusInternal(){\n\t\tFile dataPath = Environment.getDataDirectory();\n\t\tStatFs stat = new StatFs(dataPath.getPath());\n\t\tlong blockSize = stat.getBlockSize();\n\t\tlong availableBlocks = stat.getAvailableBlocks();\n\t\t//show the space of internal storage\n\t\tmExternalTotalSpace=formatSize(availableBlocks * blockSize);\n\t}",
"@Override\r\n\tpublic void updateFileData(FileMetaDataEntity userInfo) {\n\t\t\r\n\t}",
"@Override\n\tpublic void loadData() throws FileNotFoundException {\n\t\tthis.getPromoShare();\n\t}",
"private void searchLocalFiles(TwitchVideoInfo videoInfo) {\n if (videoInfo.getState().equals(INITIAL)) {\n File playlist = new File(playlistFolderPath + videoInfo.getId() + \".m3u\");\n if (playlist.exists() && playlist.isFile() && playlist.canRead()) {\n videoInfo.setMainRelatedFileOnDisk(playlist);\n videoInfo.putRelatedFile(\"playlist\", playlist);\n\n try {\n InputStream is = new FileInputStream(playlist);\n Scanner sc = new Scanner(is);\n int i = 0;\n while (sc.hasNextLine()) {\n String line = sc.nextLine();\n File file = new File(line);\n if (file.exists()) {\n i++;\n String key = String.format(\"playlist_item_%04d\", i);\n videoInfo.putRelatedFile(key, file);\n }\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n videoInfo.setState(DOWNLOADED);\n }\n\n ffmpegFileListFile = new File(playlistFolderPath + videoInfo.getId() + \".ffmpeglist\");\n if (ffmpegFileListFile.exists()) {\n videoInfo.putRelatedFile(\"ffmpegFileListFile\", ffmpegFileListFile);\n }\n\n File mp4Video = getVideoFile(videoInfo, true);\n\n if (mp4Video.exists() && mp4Video.isFile() && mp4Video.canRead()) {\n videoInfo.setMainRelatedFileOnDisk(mp4Video);\n videoInfo.putRelatedFile(\"mp4Video\", mp4Video);\n videoInfo.setState(CONVERTED);\n }\n }\n }",
"public byte[] read(String filePath, int offset, int dataLength) throws IOException {\n\t\tint ret;\n\t\t\n\t\tTFSClientFile file = getFileFromCache(filePath);\n\t\tif (file == null) {\t\t// cannot find the file, try to get file info from the master\n\t\t\tret = getFileInfo(filePath);\n\t\t\t\n\t\t\tif (ret != OK)\n\t\t\t\treturn null;\n\t\t\telse {\n\t\t\t\tfile = getFileFromCache(filePath);\t\t\t\t\n\t\t\t\tassert(file != null);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// now the file info is ready\n\t\t// pick-up a chunkserver to read from\n\t\tList<String> servers = new LinkedList<String>();\n\t\tfor (String server : file.getChunkServers())\n\t\t\tservers.add(server);\n\t\t\n\t\tRandom rand = new Random();\n\t\tint index = 0;\n\t\twhile (!servers.isEmpty()) {\n\t\t\tindex = rand.nextInt(servers.size());\n\t\t\t\n\t\t\tString[] strs = servers.get(index).split(\" \");\n\t\t\tservers.remove(index);\n\t\t\t\n\t\t\tSocketIO sockIO = new SocketIO(strs[0], Integer.parseInt(strs[1]));\n\t\t\t\n\t\t\tif (dataLength > 0)\n\t\t\t\tsockIO.write((READ + \" \" + filePath + \" \" + offset + \" \" + dataLength + \"\\r\\n\").getBytes());\n\t\t\telse\n\t\t\t\tsockIO.write((READ + \" \" + filePath + \" \" + offset + \"\\r\\n\").getBytes());\n\t\t\t\n\t\t\tsockIO.flush();\n\t\t\t\n\t\t\tString line = sockIO.readLine();\n\t\t\tif (line.startsWith(STR_OK)) {\n\t\t\t\tstrs = line.split(\" \");\n\t\t\t\tint length = Integer.parseInt(strs[1]);\n\t\t\t\t\n\t\t\t\tbyte[] data = new byte[length];\n\t\t\t\tsockIO.read(data);\n\t\t\t\tsockIO.close();\n\t\t\t\treturn data;\n\t\t\t} else {\n\t\t\t\tsockIO.close();\n\t\t\t\treturn null;\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"@Override\n\tprotected InputStream getData(GFile file, TaskMonitor monitor)\n\t\t\tthrows IOException, CancelledException, CryptoException {\n\n\t\tISO9660Directory dir = fileToDirectoryMap.get(file);\n\t\tInputStream inputStream = dir.getDataBytes(provider, logicalBlockSize);\n\n\t\treturn inputStream;\n\t}",
"private void recoverINodes()\n {\n Map<String, DFSNode.SerializedDFSNode> serInodeMap = new HashMap<>();\n try (BufferedReader reader = new BufferedReader(new FileReader(dfsNodeFile)))\n {\n String line;\n while((line=reader.readLine())!=null)\n {\n DFSNode.SerializedDFSNode serializedINode = (DFSNode.SerializedDFSNode) JSONUtil.fromJSON(line, DFSNode.SerializedDFSNode.class);\n DFSNode inode = new DFSNode();\n inode.fqpn = serializedINode.fqpn;\n inode.dataBlockMetas = serializedINode.dataBlockMeta;\n inode.dirOrFile= serializedINode.dirOrFile;\n inodeMap.put(inode.fqpn,inode);\n\n\n serInodeMap.put(serializedINode.fqpn,serializedINode);\n if (NumberUtils.isCreatable(inode.fqpn))\n fileNodeCounter = Math.max(fileNodeCounter,Integer.valueOf(inode.fqpn));\n\n /* if (inode.dataBlockMetas!=null) {\n\n DFSDataBlockMeta meta = inode.dataBlockMetas.get(inode.dataBlockMetas.size()-1);\n\n meta.fileSystem = resolve(meta.fileSystemName);\n\n }*/\n\n\n }\n } catch (Exception ex) {\n ex.printStackTrace();}\n\n\n inodeMap.values().stream().forEach(inode->{\n\n DFSNode.SerializedDFSNode serializedINode = serInodeMap.get(inode.fqpn);\n\n // inode.next = inodeMap.get(serializedINode.nextNodeName);\n\n if (serializedINode.getNodeNames()!=null) {\n List<DFSNode> nodes = serializedINode.getNodeNames().stream().map(name -> {\n return inodeMap.get(name) ;\n }).collect(Collectors.toList());\n\n inode.setNodes(nodes);\n }\n });\n\n }",
"@Override\n\tpublic File get(String url, String uid) {\n\t\tFile f = super.get(url, uid);\n\t\tif(f!=null && f.exists()){\n\t\t\treturn f;\n\t\t}else{\n\t\t\ttry{\n\t\t\t\tString key = MD5.encode((uid+url).getBytes());\n\t\t\t\tSqlMediaManager smm = SqlMediaManager.getInstance();\n\t\t\t\tMediaValue mv = smm.getMedia(key);\n\t\t\t\tif(mv!=null && mv.localpath!=null){\n\t\t\t\t\tf = new File(Environment.getExternalStorageDirectory(), mv.localpath);\n\t\t\t\t\tLog.e(\"TAG\", \"zhw found f:\" + f.getAbsolutePath() + \", old name:\" + key);\n\t\t\t\t\treturn f;\n\t\t\t\t}\n\t\t\t}catch(Exception e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\treturn f;\n\t\t}\n\n\t}",
"protected FileSystem getFileSystem() {\n return _fileSystem;\n }",
"public byte[] readall(String filePath) throws IOException {\n\t\tint ret;\n\t\t\n\t\tTFSClientFile file = getFileFromCache(filePath);\n\t\tif (file == null) {\t\t// cannot find the file, try to get file info from the master\n\t\t\tret = getFileInfo(filePath);\n\t\t\t\n\t\t\tif (ret != OK)\n\t\t\t\treturn null;\n\t\t\telse {\n\t\t\t\tfile = getFileFromCache(filePath);\t\t\t\t\n\t\t\t\tassert(file != null);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// now the file info is ready\n\t\t// pick-up a chunkserver to read from\n\t\tList<String> servers = new LinkedList<String>();\n\t\tfor (String server : file.getChunkServers())\n\t\t\tservers.add(server);\n\t\t\n\t\tRandom rand = new Random();\n\t\tint index = 0;\n\t\twhile (!servers.isEmpty()) {\n\t\t\tindex = rand.nextInt(servers.size());\n\t\t\t\n\t\t\tString[] strs = servers.get(index).split(\" \");\n\t\t\tservers.remove(index);\n\t\t\t\n\t\t\tSocketIO sockIO = new SocketIO(strs[0], Integer.parseInt(strs[1]));\n\t\t\tsockIO.write((READALL + \" \" + filePath + \"\\r\\n\").getBytes());\n\t\t\tsockIO.flush();\n\t\t\t\n\t\t\tString line = sockIO.readLine();\n\t\t\tif (line.startsWith(STR_OK)) {\n\t\t\t\tstrs = line.split(\" \");\n\t\t\t\tint length = Integer.parseInt(strs[1]);\n\t\t\t\t\n\t\t\t\tbyte[] data = new byte[length];\n\t\t\t\tsockIO.read(data);\n\t\t\t\tsockIO.close();\n\t\t\t\treturn data;\n\t\t\t} else {\n\t\t\t\tsockIO.close();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"private static OIFitsFile loadOIFits(final String fileLocation, final OIFitsChecker checker) throws IOException {\n //@todo test if file has already been loaded before going further ??\n\n final OIFitsFile oifitsFile;\n try {\n // retrieve oifits if remote or use local one\n if (FileUtils.isRemote(fileLocation)) {\n // TODO let the user customize the application file storage preference:\n final String parentPath = SessionSettingsPreferences.getApplicationFileStorage();\n\n final File localCopy = FileUtils.retrieveRemoteFile(fileLocation, parentPath, MimeType.OIFITS);\n\n if (localCopy != null) {\n // TODO: remove StatusBar !\n StatusBar.show(\"loading file: \" + fileLocation + \" ( local copy: \" + localCopy.getAbsolutePath() + \" )\");\n\n oifitsFile = OIFitsLoader.loadOIFits(checker, localCopy.getAbsolutePath());\n oifitsFile.setSourceURI(new URI(fileLocation));\n } else {\n // download failed:\n oifitsFile = null;\n }\n } else {\n // TODO: remove StatusBar !\n StatusBar.show(\"loading file: \" + fileLocation);\n\n oifitsFile = OIFitsLoader.loadOIFits(checker, fileLocation);\n }\n } catch (AuthenticationException ae) {\n throw new IOException(\"Could not load the file : \" + fileLocation, ae);\n } catch (IOException ioe) {\n throw new IOException(\"Could not load the file : \" + fileLocation, ioe);\n } catch (FitsException fe) {\n throw new IOException(\"Could not load the file : \" + fileLocation, fe);\n } catch (URISyntaxException use) {\n throw new IOException(\"Could not load the file : \" + fileLocation, use);\n }\n\n if (oifitsFile == null) {\n throw new IOException(\"Could not load the file : \" + fileLocation);\n }\n return oifitsFile;\n }",
"public void testGetFileObject() throws IOException {\n FileObject fobj = getFileObject(testFile);\n FileObject parent = fobj.getParent();\n parent = parent.createFolder(\"parent\");\n assertTrue(new File(getFile(parent), \"child\").createNewFile());\n monitor.reset();\n FileObject ch = parent.getFileObject(\"child\");\n monitor.getResults().assertResult(2, StatFiles.ALL);\n monitor.getResults().assertResult(2, StatFiles.READ);\n //second time\n monitor.reset();\n ch = parent.getFileObject(\"child\");\n monitor.getResults().assertResult(0, StatFiles.ALL);\n }",
"public interface IOCRService {\n\n\n String identifyByLocal(File file);\n\n String identifyByRemote(File file);\n}",
"private WrapperList getWplObject() throws IOException{\n WrapperList wpl = new WrapperList();\n wpl.setFileList(getDownloadableFiles());\n wpl.setServerHost(new Host(this.serverPeerIp,InetAddress.getLocalHost().getHostAddress()));\n log.info(\"Registering server + files \" + wpl.toString());\n return wpl;\n\n }",
"private static void read(Client client,String user,String filename) throws SystemException, TException {\n\t\t\n\t\tString keyString = user + \":\" + filename;\n\t\tString key = sha_256(keyString);\n\t\t\n\t\t\n\t\tNodeID succNode = client.findSucc(key);\n\t\tString predIP = succNode.ip;\n\t\t// predIP = \"127.0.0.1\";\n\t\tint predPort = succNode.port;\n\t\ttry {\n\t\t\tTSocket transport = new TSocket(predIP, predPort);\n\t\t\ttransport.open();\n\t\t\tTBinaryProtocol protocol = new TBinaryProtocol(transport);\n\t\t\tchord_auto_generated.FileStore.Client client1 = new chord_auto_generated.FileStore.Client(protocol);\n\t\t\tSystem.out.println(\"Reading file location : \" + predPort + \" File :\"+filename+\"Owner : \"+user);\n\t\t\tRFile rFile = new RFile();\n\t\t\trFile = client1.readFile(filename, user);\n\t\t\tSystem.out.println(rFile.getContent());\n\t\t\tSystem.out.println(rFile.getMeta().getVersion());\n\t\t\tSystem.out.println(rFile.getMeta().getContentHash());\n\t\t\tSystem.out.println(\"Reading file Done----------\");\n\t\t\ttransport.close();\n\t\t} catch (TTransportException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"private void readMetaFile() throws Exception, ErrorMessageException {\n System.out.println(\"Read Meta File\");\n DataInputStream dis = new DataInputStream(is);\n metaFilesPeer = new MetaFilesPeer();\n while (true) {\n /* read parent */\n String parent = dis.readUTF();\n if (parent.equals(\"//\")) {\n break;\n }\n String name = dis.readUTF();\n boolean isfile = dis.readBoolean();\n byte[] sha = null;\n if (isfile) {\n String shaBase64 = dis.readUTF();\n sha = Util.convertBase64ToBytes(shaBase64);\n }\n long timeadded = dis.readLong();\n metaFilesPeer.addMetaFile(parent, name, isfile, sha, timeadded);\n }\n }",
"public File getDataFile();",
"public String getFileTransferServer();",
"entities.Torrent.FileInfo getFileInfo(int index);",
"void set(File local,String name,UserFileType ft)\n{\n user_file = local;\n if (user_file != null && (name == null || name.length() == 0)) \n name = user_file.getName();\n if (name.startsWith(\"/s6/\")) {\n name = name.substring(4);\n }\n else if (name.startsWith(\"s:\")) {\n name = name.substring(2);\n }\n access_name = name;\n file_mode = ft;\n}",
"Object getUptodatefile();",
"@Test\n public void testGetFileChecksum() throws IOException {\n final Path path = new Path(\"/tmp/someFile\");\n FileSystem mockFS = Mockito.mock(FileSystem.class);\n InodeTree.ResolveResult<FileSystem> res =\n new InodeTree.ResolveResult<FileSystem>(null, mockFS, null,\n new Path(\"someFile\"), true);\n @SuppressWarnings(\"unchecked\")\n InodeTree<FileSystem> fsState = Mockito.mock(InodeTree.class);\n Mockito.when(fsState.resolve(path.toString(), true)).thenReturn(res);\n ViewFileSystem vfs = Mockito.mock(ViewFileSystem.class);\n vfs.fsState = fsState;\n\n Mockito.when(vfs.getFileChecksum(path)).thenCallRealMethod();\n Mockito.when(vfs.getUriPath(path)).thenCallRealMethod();\n vfs.getFileChecksum(path);\n\n Mockito.verify(mockFS).getFileChecksum(new Path(\"someFile\"));\n }",
"public byte[] getBytes(String remotePath) throws Exception {\r\n\r\n if (cf.checkExists().forPath(remotePath) == null)\r\n return null;\r\n\r\n byte[] data = cf.getData().forPath(remotePath);\r\n if(data==null)\r\n return null;\r\n else\r\n return data;\r\n }",
"private void seekBy() {\n Queue<File> queue = new LinkedList<>();\n queue.offer(new File(root));\n while (!queue.isEmpty()) {\n File file = queue.poll();\n File[] list = file.listFiles();\n if (file.isDirectory() && list != null) {\n for (File tempFile : list) {\n queue.offer(tempFile);\n }\n } else {\n if (args.isFullMatch() && searchingFile.equalsIgnoreCase(file.getName())) {\n result.add(file);\n }\n if (args.isMask() && searchingFile.replaceAll(\"\\\\*\", \".*\").equalsIgnoreCase(file.getName())) {\n result.add(file);\n }\n if (args.isRegex() && file.getName().matches(args.getName())) {\n result.add(file);\n }\n }\n }\n this.writeLog(output, result);\n }",
"@Override\n public void prepare() {\n //Caching as file resource.\n File file = this.getResource().file;\n logger.info(\"Preparing {} streams for file: {}\", this.getTransferType(), file.getName());\n\n if (this.getTransferType() == ResourceTransferType.OUTBOUND) {\n //Sending\n try {\n buffer = new byte[BUFFER_SIZE];\n sent = 0;\n inputChannel = new FileInputStream(file).getChannel();\n inputBuffer = inputChannel.map(FileChannel.MapMode.READ_ONLY, 0, inputChannel.size());\n } catch (FileNotFoundException e) { //File doesn't exist.\n //Calling a transfer error.\n callError(e);\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else {\n //Receiving\n //Checking if file already exists.\n written = 0;\n saved = 0;\n if (getResource().isLocal()) {\n getResource().calcNetworkId();\n if (getResource().getNetworkID().equals(getTunnel().getDestination())) {\n //The file is already stored locally.\n getTunnel().sendMessage(new ResourceTransferControlMessage(this.getTransferId(), -2));\n this.close();\n return;\n }\n }\n\n //Creating or replacing the file.\n buffer = new byte[BUFFER_SIZE * 16];\n if (file.exists()) {\n file.delete();\n }\n try { //Creating new file.\n file.createNewFile();\n outputStream = new FileOutputStream(file);\n } catch (IOException e) {\n //Calling a transfer error.\n callError(e);\n return;\n }\n\n //Requesting the first chunk.\n getTunnel().sendMessage(new ResourceTransferControlMessage(this.getTransferId(), 0));\n }\n }",
"public void insertFile(Packet packet) {\r\n\t\t\r\n\t\t// Use hashCode function to get a hash of the file name in the range 0 - 2^n - 1\r\n\t\tint fileHash = (int) (packet.fileName.hashCode() % (Math.pow(2, 4) - 1));\r\n\t\t\r\n\t\t// If hash is a negative number, multiply by -1 to get a positive hash value\r\n\t\tif(fileHash < 0) {\r\n\t\t\tfileHash = fileHash * -1;\r\n\t\t}\r\n\t\t\r\n\t\t// Create InetSocketAddress ArrayList, add InetSocketAddress\r\n\t\tArrayList<InetSocketAddress> fileLocationList = new ArrayList<InetSocketAddress>();\r\n\t\tInetSocketAddress fileLocation = new InetSocketAddress(packet.peerClientIP, packet.peerClientListenPort);\r\n\t\t\r\n\t\t// Check if fileHash is equal to Peer Node ID, check if file is in the DHT - if so, just add inet address else add file name and location to the DHT\r\n\t\tif(fileHash == peerNode.peerClientID) {\r\n\t\t\tjava.util.Date date = new java.util.Date();\r\n\t\t\tif(peerNode.distributedHashTable.containsKey(packet.fileName)) {\r\n\t\t\t\tpeerNode.distributedHashTable.get(packet.fileName).add(fileLocation);\r\n\t\t\t\tSystem.out.println(date + \": Entered file: \" + packet.fileName + \" into Distributed Hash Table\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tfileLocationList.add(fileLocation);\r\n\t\t\t\tpeerNode.distributedHashTable.put(packet.fileName, fileLocationList);\r\n\t\t\t\tSystem.out.println(date + \": Entered file: \" + packet.fileName + \" into Distributed Hash Table\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Check if fileHash < Peer Node ID and Peer Node ID < Peer Node Predecessor Peer ID - if so, add file\r\n\t\telse if(fileHash < peerNode.peerClientID && peerNode.peerClientID < peerNode.predPeerID) {\r\n\t\t\tjava.util.Date date2 = new java.util.Date();\r\n\t\t\tif(peerNode.distributedHashTable.containsKey(packet.fileName)) {\r\n\t\t\t\tpeerNode.distributedHashTable.get(packet.fileName).add(fileLocation);\r\n\t\t\t\tSystem.out.println(date2 + \": Entered file: \" + packet.fileName + \" into Distributed Hash Table\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tfileLocationList.add(fileLocation);\r\n\t\t\t\tpeerNode.distributedHashTable.put(packet.fileName, fileLocationList);\r\n\t\t\t\tSystem.out.println(date2 + \": Entered file: \" + packet.fileName + \" into Distributed Hash Table\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Check if fileHash < Peer Node ID and fileHash > Peer Node Predecessor Peer ID - if so, add file\r\n\t\telse if(fileHash < peerNode.peerClientID && fileHash > peerNode.predPeerID) {\r\n\t\t\tjava.util.Date date3 = new java.util.Date();\r\n\t\t\tif(peerNode.distributedHashTable.containsKey(packet.fileName)) {\r\n\t\t\t\tpeerNode.distributedHashTable.get(packet.fileName).add(fileLocation);\r\n\t\t\t\tSystem.out.println(date3 + \": Entered file: \" + packet.fileName + \" into Distributed Hash Table\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tfileLocationList.add(fileLocation);\r\n\t\t\t\tpeerNode.distributedHashTable.put(packet.fileName, fileLocationList);\r\n\t\t\t\tSystem.out.println(date3 + \": Entered file: \" + packet.fileName + \" into Distributed Hash Table\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// Check if fileHash > Peer Node ID and Peer Node Successor Peer ID < Peer Node ID - if so, add file\r\n\t\telse if(fileHash > peerNode.peerClientID && peerNode.succPeerID < peerNode.peerClientID) {\r\n\t\t\tjava.util.Date date4 = new java.util.Date();\r\n\t\t\tif(peerNode.distributedHashTable.containsKey(packet.fileName)) {\r\n\t\t\t\tpeerNode.distributedHashTable.get(packet.fileName).add(fileLocation);\r\n\t\t\t\tSystem.out.println(date4 + \": Entered file: \" + packet.fileName + \" into Distributed Hash Table\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tfileLocationList.add(fileLocation);\r\n\t\t\t\tpeerNode.distributedHashTable.put(packet.fileName, fileLocationList);\r\n\t\t\t\tSystem.out.println(date4 + \": Entered file: \" + packet.fileName + \" into Distributed Hash Table\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Otherwise, forward packet on\r\n\t\telse {\r\n\t\t\tPacket p = packet;\r\n\t\t\ttry {\r\n\t\t\t\tpeerNode.peer2Peer = new Socket(peerNode.succPeerIP, peerNode.succPeerPort);\r\n\t\t\t\tpeerNode.peer2PeerOutStream = new ObjectOutputStream(peerNode.peer2Peer.getOutputStream());\r\n\t\t\t\tpeerNode.peer2PeerInStream = new ObjectInputStream(peerNode.peer2Peer.getInputStream());\r\n\t\t\t\tpeerNode.peer2PeerOutStream.writeObject(p);\r\n\t\t\t\t\r\n\t\t\t\t// Close connection/socket\r\n\t\t\t\tcloseConnection();\r\n\t\t\t\t\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private InputSource filesystemLookup(ResourceLocation matchingEntry) {\n\n String uri = matchingEntry.getLocation();\n // the following line seems to be necessary on Windows under JDK 1.2\n uri = uri.replace(File.separatorChar, '/');\n URL baseURL;\n\n //\n // The ResourceLocation may specify a relative path for its\n // location attribute. This is resolved using the appropriate\n // base.\n //\n if (matchingEntry.getBase() != null) {\n baseURL = matchingEntry.getBase();\n } else {\n try {\n baseURL = FILE_UTILS.getFileURL(getProject().getBaseDir());\n } catch (MalformedURLException ex) {\n throw new BuildException(\"Project basedir cannot be converted to a URL\");\n }\n }\n\n URL url = null;\n try {\n url = new URL(baseURL, uri);\n } catch (MalformedURLException ex) {\n // this processing is useful under Windows when the location of the DTD\n // has been given as an absolute path\n // see Bugzilla Report 23913\n File testFile = new File(uri);\n if (testFile.exists() && testFile.canRead()) {\n log(\"uri : '\"\n + uri + \"' matches a readable file\", Project.MSG_DEBUG);\n try {\n url = FILE_UTILS.getFileURL(testFile);\n } catch (MalformedURLException ex1) {\n throw new BuildException(\n \"could not find an URL for :\" + testFile.getAbsolutePath());\n }\n } else {\n log(\"uri : '\"\n + uri + \"' does not match a readable file\", Project.MSG_DEBUG);\n\n }\n }\n\n InputSource source = null;\n if (url != null && \"file\".equals(url.getProtocol())) {\n String fileName = FILE_UTILS.fromURI(url.toString());\n if (fileName != null) {\n log(\"fileName \" + fileName, Project.MSG_DEBUG);\n File resFile = new File(fileName);\n if (resFile.exists() && resFile.canRead()) {\n try {\n source = new InputSource(Files.newInputStream(resFile.toPath()));\n String sysid = JAXPUtils.getSystemId(resFile);\n source.setSystemId(sysid);\n log(\"catalog entry matched a readable file: '\"\n + sysid + \"'\", Project.MSG_DEBUG);\n } catch (IOException ex) {\n // ignore\n }\n }\n }\n }\n return source;\n }",
"public void processFileLocation(Packet packet) {\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tchar reqFile;\r\n\t\tjava.util.Date recFileLocDate = new java.util.Date();\r\n\t\tSystem.out.println(recFileLocDate + \": Received the file locations from Peer Node \" + packet.packetSenderID);\r\n\t\t\r\n\t\tif(packet.fileLocations.size() == 0) {\r\n\t\t\tjava.util.Date fileNotFoundDate = new java.util.Date();\r\n\t\t\tSystem.out.println(fileNotFoundDate + \": File location was not found in any other Peer Node's Distributed Hash Table. Try again later when new Peer Nodes connect to the network\");\r\n\t\t}\r\n\t\t\r\n\t\t// Print File Locations\r\n\t\telse {\r\n\t\t\tfor(int i = 0; i < packet.fileLocations.size(); i++) {\r\n\t\t\t\tjava.util.Date fileLocDate = new java.util.Date();\r\n\t\t\t\tInetAddress fileIP = packet.fileLocations.get(i).getAddress();\r\n\t\t\t\tint filePort = packet.fileLocations.get(i).getPort();\r\n\t\t\t\tSystem.out.println(fileLocDate + \": The file is located at \" + fileIP + \" : \" + filePort);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// input to request file transfer\r\n\t\t\tjava.util.Date inDate = new java.util.Date();\r\n\t\t\tSystem.out.println(inDate + \": Request the file? Yes: 'y' | No: 'n'\");\r\n\t\t\treqFile = input.next().charAt(0);\r\n\t\t\t// input validation\r\n\t\t\twhile(reqFile == 0 && (reqFile != 'y' || reqFile != 'n')) {\r\n\t\t\t\tjava.util.Date errDate = new java.util.Date();\r\n\t\t\t\tSystem.out.println(errDate + \": You did not enter a valid command. Try Again. Request the file? Yes: 'y' | No: 'n'\");\r\n\t\t\t\treqFile = input.next().charAt(0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// user wants to request file transfer\r\n\t\t\tif(reqFile == 'y') {\r\n\t\t\t\tif(packet.fileLocations.size() == 1) {\r\n\t\t\t\t\tjava.util.Date reqDate = new java.util.Date();\r\n\t\t\t\t\tSystem.out.println(reqDate + \": Requesting the file named \" + packet.fileName + \" from Peer at IP\" + packet.fileLocations.get(0).getAddress() + \":\" + packet.fileLocations.get(0).getPort());\r\n\t\t\t\t\t\r\n\t\t\t\t\tPacket reqFilePckt = new Packet();\r\n\t\t\t\t\treqFilePckt.eventCode = 5;\r\n\t\t\t\t\treqFilePckt.packetSenderID = peerNode.peerClientID;\r\n\t\t\t\t\treqFilePckt.peerClientIP = peerNode.peerClientIP;\r\n\t\t\t\t\treqFilePckt.peerClientListenPort = peerNode.peerClientListenPort;\r\n\t\t\t\t\treqFilePckt.fileName = packet.fileName;\r\n\t\t\t\t\t\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t// req file\r\n\t\t\t\t\t\tpeerNode.peer2Peer = new Socket(packet.fileLocations.get(0).getAddress(), packet.fileLocations.get(0).getPort());\r\n\t\t\t\t\t\tpeerNode.peer2PeerOutStream = new ObjectOutputStream(peerNode.peer2Peer.getOutputStream());\r\n\t\t\t\t\t\tpeerNode.peer2PeerInStream = new ObjectInputStream(peerNode.peer2Peer.getInputStream());\r\n\t\t\t\t\t\tpeerNode.peer2PeerOutStream.writeObject(reqFilePckt);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Close socket/connection\r\n\t\t\t\t\t\tcloseConnection();\r\n\t\t\t\t\t} \r\n\t\t\t\t\tcatch (IOException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch blo\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if(packet.fileLocations.size() > 1) {\r\n\t\t\t\t\tint index = (int) (Math.random() * (packet.fileLocations.size()+1));\r\n\t\t\t\t\t\r\n\t\t\t\t\twhile(packet.fileLocations.get(index).getPort() == peerNode.peerClientListenPort) {\r\n\t\t\t\t\t\tindex = (int) (Math.random() * (packet.fileLocations.size()+1));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tjava.util.Date reqDate = new java.util.Date();\r\n\t\t\t\t\tSystem.out.println(reqDate + \": Requesting the file named \" + packet.fileName + \" from Peer at IP\" + packet.fileLocations.get(index).getAddress() + \":\" + packet.fileLocations.get(index).getPort());\r\n\t\t\t\t\t\r\n\t\t\t\t\tPacket reqFilePckt = new Packet();\r\n\t\t\t\t\treqFilePckt.eventCode = 5;\r\n\t\t\t\t\treqFilePckt.packetSenderID = peerNode.peerClientID;\r\n\t\t\t\t\treqFilePckt.peerClientIP = peerNode.peerClientIP;\r\n\t\t\t\t\treqFilePckt.peerClientListenPort = peerNode.peerClientListenPort;\r\n\t\t\t\t\treqFilePckt.fileName = packet.fileName;\r\n\t\t\t\t\t\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t// req file\r\n\t\t\t\t\t\tpeerNode.peer2Peer = new Socket(packet.fileLocations.get(index).getAddress(), packet.fileLocations.get(index).getPort());\r\n\t\t\t\t\t\tpeerNode.peer2PeerOutStream = new ObjectOutputStream(peerNode.peer2Peer.getOutputStream());\r\n\t\t\t\t\t\tpeerNode.peer2PeerInStream = new ObjectInputStream(peerNode.peer2Peer.getInputStream());\r\n\t\t\t\t\t\tpeerNode.peer2PeerOutStream.writeObject(reqFilePckt);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t// Close socket/connection\r\n\t\t\t\t\t\tcloseConnection();\r\n\t\t\t\t\t} \r\n\t\t\t\t\tcatch (IOException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch blo\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(reqFile == 'n') {\r\n\t\t\t\tjava.util.Date noReqDate = new java.util.Date();\r\n\t\t\t\tSystem.out.println(noReqDate + \": File transfer is not requested\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void listingFiles(String remoteFolder);",
"public FSLockWithShared(File baseFile) {\n file = baseFile;\n }",
"void sendReceive(){\r\n\r\n String remotePath=\"Batch\\\\Export\\\\\" + DAL.getStoreID();\r\n String localPath=\"Batch\\\\Import\\\\\";\r\n String filename=\"\";\r\n File dir;\r\n String[] children;//list of files at local\r\n\r\n CustomFtpClient ftpClient = new CustomFtpClient();\r\n try {\r\n //1---------- connect Ftp\r\n//System.out.println(DAL.getStoreID()+\" \"+DAL.getFtpServer()+\" \"+DAL.getFtpUser()+\" \"+DAL.getFtpPassword());\r\n ftpClient.openServer(DAL.getFtpServer());\r\n ftpClient.login(DAL.getFtpUser(), DAL.getFtpPassword());\r\n ftpClient.cd(remotePath);\r\n ftpClient.binary();\r\n\r\n //2---------- copy from SIM Export to POS Export\r\n StringBuffer pathList = new StringBuffer();\r\n InputStream is = ftpClient.list();\r\n int c;\r\n\r\n //read all file and directory at remote\r\n while ( (c = is.read()) != -1) {\r\n String s = (new Character( (char) c)).toString();\r\n pathList.append(s);\r\n }\r\n\r\n StringTokenizer st = new StringTokenizer(pathList.toString(),\"\\r\\n\");\r\n //get file from SIM Export\r\n while (st.hasMoreTokens()){\r\n filename=st.nextToken().substring(55);\r\n if(filename.indexOf(\".txt\")!=-1){\r\n is = ftpClient.get(filename);\r\n File file_out = new File(localPath + filename);\r\n FileOutputStream os = new\r\n FileOutputStream(file_out);\r\n byte[] bytes = new byte[1024];\r\n\r\n while ( (c = is.read(bytes)) != -1) {\r\n os.write(bytes, 0, c);\r\n }\r\n is.close();\r\n os.close();\r\n //3--------- delete SIM Export\r\n ftpClient.delete(filename);\r\n }\r\n }\r\n\r\n //4--------- copy POS Import to SIM Backup\r\n remotePath=\"..\\\\..\\\\..\\\\Batch\\\\Backup\\\\Export\";\r\n localPath=\"Batch\\\\Import\\\\\";\r\n\r\n ftpClient.cd(remotePath);\r\n\r\n //get list of file\r\n dir = new File(localPath);\r\n children = dir.list();\r\n if (children != null) {\r\n for (int i = 0; i < children.length; i++) {\r\n // Get filename of file or directory\r\n filename = children[i];\r\n TelnetOutputStream os = ftpClient.put(filename);\r\n File file_in = new File(localPath + filename);\r\n is = new FileInputStream(file_in);\r\n byte[] bytes = new byte[1024];\r\n\r\n while ( (c = is.read(bytes)) != -1) {\r\n os.write(bytes, 0, c);\r\n }\r\n is.close();\r\n os.close();\r\n }\r\n }\r\n\r\n //5--------- copy from POS Export to SIM Import\r\n remotePath=\"..\\\\..\\\\..\\\\Batch\\\\Import\";\r\n localPath=\"Batch\\\\Export\\\\\";\r\n ftpClient.cd(remotePath);\r\n\r\n //get list of file\r\n dir = new File(localPath);\r\n children = dir.list();\r\n if (children != null) {\r\n for (int i = 0; i < children.length; i++) {\r\n // Get filename of file or directory\r\n filename = children[i];\r\n TelnetOutputStream os = ftpClient.put(filename);\r\n File file_in = new File(filename);\r\n is = new FileInputStream(localPath + file_in);\r\n byte[] bytes = new byte[1024];\r\n while ( (c = is.read(bytes)) != -1) {\r\n os.write(bytes, 0, c);\r\n }\r\n is.close();\r\n os.close();\r\n }\r\n }\r\n\r\n //---------- close ftp\r\n ftpClient.closeServer();\r\n }\r\n catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }",
"private static byte[] m2539e(Context context) {\n Throwable th;\n int i = 0;\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n byte[] bArr = new byte[0];\n String a = Log.m2547a(context, Log.f1857e);\n DiskLruCache diskLruCache = null;\n try {\n diskLruCache = DiskLruCache.m2767a(new File(a), 1, 1, 10240);\n File file = new File(a);\n if (file != null && file.exists()) {\n String[] list = file.list();\n int length = list.length;\n while (i < length) {\n String str = list[i];\n if (str.contains(\".0\")) {\n byteArrayOutputStream.write(StatisticsManager.m2535a(diskLruCache, str.split(\"\\\\.\")[0]));\n }\n i++;\n }\n }\n bArr = byteArrayOutputStream.toByteArray();\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n try {\n diskLruCache.close();\n } catch (Throwable th2) {\n th = th2;\n }\n }\n } catch (IOException th3) {\n BasicLogHandler.m2542a(th3, \"StatisticsManager\", \"getContent\");\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e2) {\n e2.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n diskLruCache.close();\n }\n } catch (Throwable th4) {\n th3 = th4;\n }\n return bArr;\n th3.printStackTrace();\n return bArr;\n }",
"protected abstract void refresh() throws RemoteException, NotBoundException, FileNotFoundException;",
"public void saveRemote() throws IOException {\n File f = Utils.join(Main.REMOTE, _name);\n f.createNewFile();\n Utils.writeObject(f, this);\n }",
"public fileGather(Path input,String namefilter,FileSystem fs) throws IOException\r\n\t{\r\n\t FileStatus[] fstat = fs.listStatus(input,new QRFactorMultiply.MyPathFilter(namefilter));\r\n\t gatherFile(fstat);\r\n\t}",
"private SensorData collectFSInfo() throws SigarException {\n \n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Collecting File System Information\");\n }\n \n SensorData data = new SensorData();\n \n FileSystem[] fileSystems = sigar.getFileSystemList();\n \n List<FileSystemInfo> fsInfoList = new ArrayList<FileSystemInfo>();\n \n for (FileSystem fs : fileSystems) {\n \n FileSystemInfo info = new FileSystemInfo();\n \n info.setDiskName(fs.getDevName());\n info.setLocation(fs.getDirName());\n info.setType(fs.getSysTypeName());\n \n FileSystemUsage fsu = sigar.getFileSystemUsage(fs.getDirName());\n \n info.setTotalMB(fsu.getTotal() / 1024);\n info.setUsedMB(fsu.getUsed() / 1024);\n \n fsInfoList.add(info);\n }\n \n data.add(SensorAttributeConstants.FileSystemConstants.FS_DATA, fsInfoList);\n \n return data;\n }",
"com.google.protobuf.ByteString\n getFileLocBytes();",
"public void putContentsFromFile(String localFilePath, String remotePath) throws Exception\r\n {\r\n byte[] bytes = null;\r\n if (!ZkUtils.isHdfs(localFilePath))\r\n bytes = FileUtils.readFileToByteArray(new File(localFilePath));\r\n else {\r\n // get the content from hdfs.\r\n InputStream is = ZkUtils.getInputStream(localFilePath);\r\n bytes = IOUtils.toByteArray(is);\r\n }\r\n if (bytes != null) {\r\n putBytes(bytes, remotePath);\r\n log.info(\"copied \" + localFilePath + \" to \" + remotePath + \"; \" + bytes.length + \"bytes\");\r\n }\r\n }",
"@Override\n\tprotected String getFileArress() {\n\t\treturn fileAddress;\n\t}",
"public FileSystemManager getVFS();",
"public void addOrReplaceDatastreamWithFile(String pid, String dsName, ControlGroup controlGroup, String label, String mimetype, boolean versionable, File file, String message) throws IOException, FedoraException {\r\n if (this.readOnly) {\r\n throw new FedoraIllegalAccessException(\"This FedoraClient is READ ONLY!\");\r\n }\r\n long start = System.currentTimeMillis();\r\n String md5hash = getMD5Checksum(file);\r\n long end = System.currentTimeMillis();\r\n LOGGER.debug(this.fedoraBaseUrl + \": Computed checksum for new \" + dsName + \" datastream in \" + (end - start) + \"ms (MD5=\" + md5hash + \")\");\r\n \r\n String remoteMD5hash = this.hasDatastream(pid, dsName) ? this.getMD5Checksum(pid, dsName) : \"null\";\r\n if (md5hash.equalsIgnoreCase(remoteMD5hash)) {\r\n LOGGER.info(this.fedoraBaseUrl + \": Datastream \" + dsName + \" was unaltered.\");\r\n } else {\r\n if (this.hasDatastream(pid, dsName)) {\r\n // replace current copy\r\n String url = this.fedoraBaseUrl + \"/objects/\" + pid + \"/datastreams/\" + dsName + \"?controlGroup=\" + controlGroup + \"&dsLabel=\" + URLEncoder.encode(truncateLabel(label), \"UTF-8\") + \"&versionable=\" + (versionable ? \"true\" : \"false\") + \"&dsState=A&mimeType=\" + mimetype + \"&checksumType=MD5\" + (message != null ? \"&logMessage=\" + URLEncoder.encode(message, \"UTF-8\") : \"\");\r\n PostMethod filePost = new PostMethod(url);\r\n Part[] parts = {\r\n new FilePart(file.getName(), file)\r\n };\r\n filePost.setRequestEntity(\r\n new MultipartRequestEntity(parts, filePost.getParams())\r\n );\r\n try {\r\n client.executeMethod(filePost);\r\n int status = filePost.getStatusCode();\r\n if (status != HttpStatus.SC_OK && status != HttpStatus.SC_CREATED) {\r\n throw new RuntimeException(\"REST action \\\"\" + url + \"\\\" failed: \" + filePost.getStatusLine());\r\n }\r\n LOGGER.info(this.fedoraBaseUrl + \": Replaced datastream \" + dsName + \" on \" + pid + \".\");\r\n } finally {\r\n filePost.releaseConnection();\r\n }\r\n } else {\r\n // create a new copy\r\n String url = this.fedoraBaseUrl + \"/objects/\" + pid + \"/datastreams/\" + dsName + \"?controlGroup=\" + controlGroup + \"&dsLabel=\" + URLEncoder.encode(truncateLabel(label), \"UTF-8\") + \"&versionable=\" + (versionable ? \"true\" : \"false\") + \"&dsState=A&mimeType=\" + mimetype + \"&checksumType=MD5\" + (message != null ? \"&logMessage=\" + URLEncoder.encode(message, \"UTF-8\") : \"\");\r\n PostMethod filePost = new PostMethod(url);\r\n Part[] parts = {\r\n new FilePart(file.getName(), file)\r\n };\r\n filePost.setRequestEntity(\r\n new MultipartRequestEntity(parts, filePost.getParams())\r\n );\r\n try {\r\n client.executeMethod(filePost);\r\n int status = filePost.getStatusCode();\r\n if (status != HttpStatus.SC_CREATED && status != HttpStatus.SC_OK) {\r\n throw new RuntimeException(\"REST action \\\"\" + url + \"\\\" failed: \" + filePost.getStatusLine());\r\n }\r\n LOGGER.info(this.fedoraBaseUrl + \": Added datastream \" + dsName + \" on \" + pid + \".\");\r\n } finally {\r\n filePost.releaseConnection();\r\n }\r\n }\r\n }\r\n }",
"public void readEntries() throws FileAccessException;",
"phaseI.Hdfs.DataNodeLocation getLocation();",
"private static void readFileOnClient(FileStore.Client client) throws SystemException, TException {\n String fileName = \"sample.txt\";\n NodeID nodeId = client.findSucc(getSHA(fileName));\n TTransport transport = new TSocket(nodeId.getIp(), nodeId.getPort());\n transport.open();\n\n TProtocol protocol = new TBinaryProtocol(transport);\n FileStore.Client readFileClient = new FileStore.Client(protocol);\n\n RFile rFile = readFileClient.readFile(fileName);\n System.out.println(\"Filename - \" + rFile.getMeta().getFilename());\n System.out.println(\"Version Number - \" + rFile.getMeta().getVersion());\n System.out.println(\"Content - \" + rFile.getContent());\n transport.close();\n }",
"public String getFilePath() {\n return theRemoteFilePath;\n }",
"private void readSourceData() throws Exception {\n\t\tthis.fileDataList = new ArrayList<String>();\n\t\tReader reader = new Reader(this.procPath);\n\t\treader.running();\n\t\tthis.fileDataList = reader.getFileDataList();\n\t}",
"public abstract FStat stat(UnixRuntime r, String path) throws ErrnoException;"
] |
[
"0.60168856",
"0.5990522",
"0.59530777",
"0.5936578",
"0.5895466",
"0.5834189",
"0.5826813",
"0.57345563",
"0.573162",
"0.5685193",
"0.56631464",
"0.55384725",
"0.55373156",
"0.5529983",
"0.55106276",
"0.55106276",
"0.55080247",
"0.54993623",
"0.5477945",
"0.5449027",
"0.5442883",
"0.54408234",
"0.5423004",
"0.54175323",
"0.541698",
"0.5412756",
"0.5394454",
"0.53939116",
"0.5379949",
"0.5345493",
"0.5344471",
"0.53122485",
"0.53075933",
"0.53050077",
"0.53037935",
"0.5294201",
"0.52929986",
"0.5287289",
"0.5263966",
"0.5259468",
"0.52550864",
"0.52275836",
"0.5223981",
"0.5222816",
"0.52201563",
"0.52131474",
"0.5208149",
"0.52075315",
"0.5206258",
"0.5206153",
"0.5198987",
"0.51934785",
"0.5190013",
"0.51884127",
"0.51775336",
"0.5166817",
"0.5164899",
"0.5162809",
"0.51573426",
"0.51558375",
"0.51265657",
"0.51149035",
"0.5109783",
"0.51064634",
"0.5105537",
"0.5103704",
"0.5097891",
"0.5095434",
"0.5083002",
"0.50787306",
"0.50778306",
"0.50777626",
"0.5074287",
"0.50724155",
"0.50715065",
"0.50655067",
"0.5064485",
"0.5058469",
"0.5057476",
"0.5049698",
"0.50462365",
"0.5045816",
"0.50379014",
"0.50374925",
"0.50371814",
"0.5034829",
"0.5031302",
"0.5018787",
"0.5018583",
"0.50182545",
"0.5016352",
"0.50101197",
"0.50100416",
"0.5009545",
"0.5008337",
"0.50076467",
"0.5004576",
"0.49998084",
"0.49972442",
"0.49965212",
"0.49950087"
] |
0.0
|
-1
|
Create internal class for date.
|
public static Date date(String str) throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
return sdf.parse( str );
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private ARXDate() {\r\n this(\"Default\");\r\n }",
"public Date() {\r\n }",
"private CreateDateUtils()\r\n\t{\r\n\t}",
"private DateUtil() {\n\t}",
"private DateUtil() {\n\t}",
"private DateUtil(){\n\n }",
"DateConstant createDateConstant();",
"public DateUtil ()\n {\n\n }",
"public MyDate(){\n this.day = 0;\n this.month = 0;\n this.year = 0;\n }",
"protected DateFieldMetadata() {\r\n\r\n\t}",
"private BusinessDateUtility() {\n\t}",
"public DateCheckTag() { }",
"public ExceptionDate(){\n\t\tsuper();\n\t}",
"public Date(){\n\t\tyear=0;\n\t\tmonth=0;\n\t\tday=0;\n\t}",
"public CinemaDate() {\n }",
"DateLiteral createDateLiteral();",
"public ImmutableClass(Integer number, String name, Date date, Test test) {\n\t\tthis.number = number;\n\t\tthis.name = name;\n\t\tthis.date = date;\n\t\t// this.mutableField = new Date(date.getTime());\n\t\tthis.test = test;\n\t}",
"private DateTimeAdjusters() {\n\n }",
"public DateUtil (int yyyy, int mm, int dd)\n {\n set(yyyy, mm, dd, CHECK);\n }",
"public MyDate(int inYear, int inDay, int inMonth)\n {\n year = inYear;\n day = inDay;\n month = inMonth;\n }",
"public final DateWithTypeDateFormat newDate() throws RIFCSException {\n return new DateWithTypeDateFormat(this.newElement(\n Constants.ELEMENT_DATE));\n }",
"@Test\r\n public void testSimpleDate() {\r\n SimpleDate d1 = new SimpleDate();\r\n }",
"public Date(String dateType, int year, int month, int day)\r\n\t\t\tthrows BogusDataException\r\n\t{\r\n\t\tsuper(dateType, \"\");\r\n\r\n\t\tthis.year = year;\r\n\t\tthis.month = month;\r\n\t\tthis.day = day;\r\n\t\tthis.hour = this.minute = this.second = 0;\r\n\t\tthis.dateOnly = true;\r\n\r\n\t\tString yearStr, monthStr, dayStr;\r\n\r\n\t\tyearStr = \"\" + year;\r\n\t\tmonthStr = \"\" + month;\r\n\t\tdayStr = \"\" + day;\r\n\t\twhile (yearStr.length() < 4)\r\n\t\t\tyearStr = '0' + yearStr;\r\n\t\tif (monthStr.length() < 2)\r\n\t\t\tmonthStr = '0' + monthStr;\r\n\t\tif (dayStr.length() < 2)\r\n\t\t\tdayStr = '0' + dayStr;\r\n\t\tvalue = yearStr + monthStr + dayStr;\r\n\r\n\t\t// Add attribute that says date-only\r\n\t\taddAttribute(\"VALUE\", \"DATE\");\r\n\t}",
"public MyDate(){\t\n\t\tthis(\"00/00/0000\");\n\t}",
"private DateFormatterManager()\r\n\t{\r\n\r\n\t}",
"public FillDate() {\n }",
"public void makeValidDate() {\n\t\tdouble jd = swe_julday(this.year, this.month, this.day, this.hour, SE_GREG_CAL);\n\t\tIDate dt = swe_revjul(jd, SE_GREG_CAL);\n\t\tthis.year = dt.year;\n\t\tthis.month = dt.month;\n\t\tthis.day = dt.day;\n\t\tthis.hour = dt.hour;\n\t}",
"public DateUtility () {\n dateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\n }",
"public Date() {\r\n\t\tGregorianCalendar c = new GregorianCalendar();\r\n\t\tmonth = c.get(Calendar.MONTH) + 1; // our month starts from 1\r\n\t\tday = c.get(Calendar.DAY_OF_MONTH);\r\n\t\tyear = c.get(Calendar.YEAR);\r\n\t}",
"public CpFldValidDate() { super(10018, 1); }",
"public DateUtil ( DateUtil b)\n {\n this.ordinal = b.ordinal;\n this.yyyy = b.yyyy;\n this.mm = b.mm;\n this.dd = b.dd;\n }",
"public Sad(){\n\t\tthis.date = new Date(System.currentTimeMillis());\n\t}",
"public Date(int y) {\r\n\r\n\t\tmonth = LAST_MONTH;\r\n\t\tday = DAYS[LAST_MONTH];\r\n\t\tyear = y;\r\n\t}",
"public DateCustom(int __day, int __month, int __year) {\n this._day = __day;\n this._month = __month;\n this._year = __year;\n }",
"@Override\n\tpublic void initDate() {\n\n\t}",
"public Date(int m, int d, int y) {\r\n\t\tif (!isValid(m, d, y))\r\n\t\t\tthrow new RuntimeException(\"Invalid date\");\r\n\t\tmonth = m;\r\n\t\tday = d;\r\n\t\tyear = y;\r\n\t}",
"public Date(int day, int month, int year) {\r\n this.day = day;\r\n this.month = month;\r\n this.year = year;\r\n\r\n }",
"public CustomDateSerializer(Class<Date> T) {\n super(T);\n }",
"public Date(int month, int day) {\r\n this.month = month;\r\n this.day = day;\r\n }",
"public DateUtil (int ordinal)\n {\n // save ordinal field and compute Gregorian equivalent\n set(ordinal);\n }",
"public static native JsDate create() /*-{\n return new Date();\n }-*/;",
"public DateTime() {\n this((BusinessObject) null);\n }",
"protected GeometricObject() \n\t{\n\t\tdateCreated = new java.util.Date();\n\t}",
"public MyDate(long inElapsedTime)\n {\n //put in logic here\n elapsedTime = inElapsedTime;\n this.setDate(elapsedTime);\n }",
"public LocalDateAdapter() {\r\n\t\tsuper();\r\n\t}",
"public SIPDate() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e6 in method: gov.nist.javax.sip.header.SIPDate.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: gov.nist.javax.sip.header.SIPDate.<init>():void\");\n }",
"private GuessDate(){\n }",
"public Date(int year, int month, int day) {\n this.year = year;\n this.day = day;\n this.month = month;\n }",
"public Date(String dateType, int year, int month, int day, int hour,\r\n\t\t\tint min, int sec, int ehour, int emin, int esec)\r\n\t\t\tthrows BogusDataException\r\n\t{\r\n\t\tsuper(dateType, \"\");\r\n\r\n\t\tthis.dateType = dateType;\r\n\t\tthis.year = year;\r\n\t\tthis.month = month;\r\n\t\tthis.day = day;\r\n\t\tthis.hour = hour;\r\n\t\tthis.minute = min;\r\n\t\tthis.second = sec;\r\n\t\tthis.ehour = ehour;\r\n\t\tthis.eminute = emin;\r\n\t\tthis.esecond = esec;\r\n\t\tthis.dateOnly = false;\r\n\r\n\t\tString yearStr, monthStr, dayStr, hourStr, minStr, secStr, ehourStr, eminStr, esecStr;\r\n\r\n\t\tyearStr = \"\" + year;\r\n\t\tmonthStr = \"\" + month;\r\n\t\tdayStr = \"\" + day;\r\n\t\thourStr = \"\" + hour;\r\n\t\tminStr = \"\" + min;\r\n\t\tsecStr = \"\" + sec;\r\n\t\tehourStr = \"\" + ehour;\r\n\t\teminStr = \"\" + emin;\r\n\t\tesecStr = \"\" + esec;\r\n\r\n\t\twhile (yearStr.length() < 4)\r\n\t\t\tyearStr = '0' + yearStr;\r\n\t\tif (monthStr.length() < 2)\r\n\t\t\tmonthStr = '0' + monthStr;\r\n\t\tif (dayStr.length() < 2)\r\n\t\t\tdayStr = '0' + dayStr;\r\n\t\tif (hourStr.length() < 2)\r\n\t\t\thourStr = '0' + hourStr;\r\n\t\tif (minStr.length() < 2)\r\n\t\t\tminStr = '0' + minStr;\r\n\t\tif (secStr.length() < 2)\r\n\t\t\tsecStr = '0' + secStr;\r\n\t\tif (ehourStr.length() < 2)\r\n\t\t\tehourStr = '0' + ehourStr;\r\n\t\tif (eminStr.length() < 2)\r\n\t\t\teminStr = '0' + eminStr;\r\n\t\tif (esecStr.length() < 2)\r\n\t\t\tesecStr = '0' + esecStr;\r\n\r\n\t\t// TODO: use StringBuffer to speed this up\r\n\t\t// TODO: validate values\r\n\t\tvalue = yearStr + monthStr + dayStr + 'T' + hourStr + minStr + secStr\r\n\t\t\t\t+ ehourStr + eminStr + esecStr;\r\n\r\n\t\t// Add attribute that says date has a time\r\n\t\taddAttribute(\"VALUE\", \"DATE-TIME\");\r\n\t}",
"public MyDate(String date){\n \t\tStringTokenizer st;\n\n \t\tst = new StringTokenizer(date,\"/\");\t//tokenizer will always result in 3 tokens \n\n\t\tthis.day = Integer.parseInt(st.nextToken());\n\t\tthis.month = Integer.parseInt(st.nextToken());\n\t\tthis.year = Integer.parseInt(st.nextToken());\t\n\t}",
"public Date (final Integer d, final Integer m, final Integer y) throws CGException {\n\n try {\n setSentinel();\n }\n catch (Exception e){\n\n e.printStackTrace(System.out);\n System.out.println(e.getMessage());\n }\n if (!this.pre_Date(d, m, y).booleanValue()) \n UTIL.RunTime(\"Run-Time Error:Precondition failure in Date\");\n {\n\n day = UTIL.NumberToInt(UTIL.clone(d));\n month = UTIL.NumberToInt(UTIL.clone(m));\n year = UTIL.NumberToInt(UTIL.clone(y));\n }\n }",
"abstract Date getDefault();",
"public Date GetDate();",
"public Date(int m, int d, int y) {\n\t\t\n\t\tmonth = m;\n\t\tday = d;\n\t\tyear = y;\n\t\t\n\t}",
"private TimestampUtils(){}",
"public Date(int d, int m, int a) {\n\t\tthis.dia = d;\n\t\tthis.mes = m;\n\t\tthis.ano = a;\n\t}",
"public MyDate(int month, int day, int year) {\n\t\tsetDate(month, day, year);\n\t}",
"public Date212 (String s){ //initial constructor\n full_Date = s;\n // System.out.println(full_Date + \"jdjdj\");\n if (!isValidDate(full_Date)) throw new IllegalArgumentException(\"Invalid Date Format!\"); \n //If it is not true that the date is valid then throw a error.\n /* \n The substring methods to pull out the Year, Month, and Day.\n */\n Year = Integer.parseInt(full_Date.substring(0,3)); \n Month = Integer.parseInt(full_Date.substring(4,5));\n Day = Integer.parseInt(full_Date.substring(6,7));\n count++; \n addArray(this); //Calling the function \"addArray\" with 'this isntance of date212'\n // System.out.println(myDates[i]);\n\n }",
"public Date(int m, int y) {\r\n\r\n\t\tif (!isValid(m, DAYS[m], y))\r\n\t\t\tthrow new RuntimeException(\"Invalid date; correct input\");\r\n\t\tmonth = m;\r\n\t\tday = DAYS[m];\r\n\t\tyear = y;\r\n\t}",
"public abstract Timestamp getDate();",
"public CustomDateSerializer() {\n this(null);\n }",
"public Date(String dateType, int year, int month, int day, int hour,\r\n\t\t\tint min, int sec) throws BogusDataException\r\n\t{\r\n\t\tsuper(dateType, \"\");\r\n\t\t// code below by Jeremy//\r\n\t\tthis.dateType = dateType;\r\n\t\t// code above by Jeremy//\r\n\t\tthis.year = year;\r\n\t\tthis.month = month;\r\n\t\tthis.day = day;\r\n\t\tthis.hour = hour;\r\n\t\tthis.minute = min;\r\n\t\tthis.second = sec;\r\n\t\tthis.dateOnly = false;\r\n\r\n\t\tString yearStr, monthStr, dayStr, hourStr, minStr, secStr;\r\n\r\n\t\tyearStr = \"\" + year;\r\n\t\tmonthStr = \"\" + month;\r\n\t\tdayStr = \"\" + day;\r\n\t\thourStr = \"\" + hour;\r\n\t\tminStr = \"\" + min;\r\n\t\tsecStr = \"\" + sec;\r\n\r\n\t\twhile (yearStr.length() < 4)\r\n\t\t\tyearStr = '0' + yearStr;\r\n\t\tif (monthStr.length() < 2)\r\n\t\t\tmonthStr = '0' + monthStr;\r\n\t\tif (dayStr.length() < 2)\r\n\t\t\tdayStr = '0' + dayStr;\r\n\t\tif (hourStr.length() < 2)\r\n\t\t\thourStr = '0' + hourStr;\r\n\t\tif (minStr.length() < 2)\r\n\t\t\tminStr = '0' + minStr;\r\n\t\tif (secStr.length() < 2)\r\n\t\t\tsecStr = '0' + secStr;\r\n\r\n\t\t// TODO: use StringBuffer to speed this up\r\n\t\t// TODO: validate values\r\n\t\tvalue = yearStr + monthStr + dayStr + 'T' + hourStr + minStr + secStr;\r\n\r\n\t\t// Add attribute that says date has a time\r\n\t\taddAttribute(\"VALUE\", \"DATE-TIME\");\r\n\t}",
"public Rates() {\n }",
"Date getForDate();",
"@Override\n\tpublic boolean create(Dates obj) {\n\t\treturn false;\n\t}",
"private Date init(InputStream ouiData) throws IOException {\n DataInputStream din = new DataInputStream(ouiData);\n Date result = new Date(din.readLong());\n while (din.available() > 0) {\n Oui oui = new Oui(din);\n _byHashCode.put(oui.hashCode(), oui);\n }\n return result;\n }",
"public int MagicDate(){\n return month = day = year = 1;\n \n }",
"public DateTime(final BusinessObject parent) {\n super(parent);\n if (clock == null) {\n throw new ApplicationException(\"Clock not set up\");\n }\n setValue(new java.util.Date(clock.getTime()));\n isNull = false;\n }",
"public CustomDate getDate() {\n return new CustomDate(date.getTime());\n }",
"public DateUtil (int yyyy, int mm, int dd, int how)\n {\n // save yyyy, mm, dd, and compete the ordinal equivalent\n set(yyyy, mm, dd, how);\n }",
"public Entry(Calendar date){\n this.date = date; \n }",
"public void testCreateInstance() throws ParseException {\n DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n Date date = df.parse(\"2008-08-08 12:34:56.789\");\n \n AbstractTemporalLiteral d = AbstractTemporalLiteral.createInstance(TemporalType.DATE, date);\n assertTrue(d instanceof DateLiteral);\n d = AbstractTemporalLiteral.createInstance(TemporalType.TIME, date);\n assertTrue(d instanceof TimeLiteral);\n d = AbstractTemporalLiteral.createInstance(TemporalType.TIMESTAMP, date);\n assertTrue(d instanceof TimestampLiteral);\n \n Calendar cal = Calendar.getInstance();\n cal.setTime(date);\n \n d = AbstractTemporalLiteral.createInstance(TemporalType.DATE, cal);\n assertTrue(d instanceof DateLiteral);\n d = AbstractTemporalLiteral.createInstance(TemporalType.TIME, cal);\n assertTrue(d instanceof TimeLiteral);\n d = AbstractTemporalLiteral.createInstance(TemporalType.TIMESTAMP, cal);\n assertTrue(d instanceof TimestampLiteral);\n }",
"public DefaultImpl() {\n this(DEFAULT_DATE_FORMAT);\n }",
"@Test\r\n\tpublic void testSetDate() {\n\t\tfail(\"Not yet implemented\");\r\n\t}",
"Date getDate();",
"Date getDate();",
"Date getDate();",
"protected Time() {\n\t}",
"public static Date createDate(int yyyy, int month, int day) {\n/* 75 */ CALENDAR.clear();\n/* 76 */ CALENDAR.set(yyyy, month - 1, day);\n/* 77 */ return CALENDAR.getTime();\n/* */ }",
"public Date getDateObject(){\n \n Date date = new Date(this.getAnio(), this.getMes(), this.getDia());\n return date;\n }",
"public HISDate(Date date) {\r\n DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, Locale.GERMAN);\r\n Calendar cal = df.getCalendar();\r\n cal.setTime(date);\r\n this.year = cal.get(Calendar.YEAR);\r\n //logger.debug(\"year = \" + year);\r\n this.month = cal.get(Calendar.MONTH) + 1;\r\n //logger.debug(\"month = \" + month);\r\n this.day = cal.get(Calendar.DAY_OF_MONTH);\r\n //logger.debug(\"day = \" + day);\r\n this.weekday = cal.get(Calendar.DAY_OF_WEEK);\r\n this.weekOfYear = cal.get(Calendar.WEEK_OF_YEAR);\r\n this.weekOfMonth = cal.get(Calendar.WEEK_OF_MONTH);\r\n }",
"private QaCalendar() {\n }",
"public Date getCreateDate();",
"public Date getCreateDate();",
"public Date getCreateDate();",
"abstract public Date getServiceAppointment();",
"public interface DateInterface \n{\n /*\n Dada uma data, determina a sua estação do ano (Primavera, Verão, Outono ou Inverno) de acordo com o hemisfério Norte.\n */\n public String estacaoDoAno(LocalDate d);\n \n /*\n Determina o dia da semana do primeiro dia de um ano.\n */\n public DayOfWeek primeiroDiaSemanaAno(int ano);\n \n /*\n Determina o dia da semana de uma data.\n */\n public DayOfWeek diaDaSemana(LocalDate d);\n \n /*\n Determina o dia do ano de uma data (por exemplo, 10/01/2018 corresponde ao 10º dia do ano de 2018).\n */\n public int diaDoAno(LocalDate d);\n \n /*\n Determina em que trimestre do ano uma data se situa.\n */\n public int trimestre(LocalDate d);\n \n /*\n Determina o número de semanas completas entre duas datas, sendo uma delas a atual.\n */\n public long numSemanasAteData(LocalDate d);\n \n /*\n Determina se um ano é bissexto ou não.\n */\n public boolean anoBissexto(Year ano);\n \n /*\n Determina o século, o milénio e a era de uma data.\n */\n public TuploSeculoMilenioEra seculoMilenioEraData(LocalDate d);\n \n /*\n Determina quanto tempo falta até à próxima passagem do cometa Halley. Mostra o resultado em dias totais, meses totais\n e anos totais.\n */\n public ParDataDiaMesAno cometaHalley();\n \n /*\n Determina o número de dias úteis entre duas dadas datas.\n */\n public int diasUteisEntreDatas(LocalDate d1, LocalDate d2);\n \n /*\n Determina quantos fins-de-semanas completos um ano tem. Caso o ano inserido possua um sábado ou um domingo extra, \n estes também são sinalizados.\n */\n public ParFimDeSemana numFinsDeSemanaAno(int ano);\n \n /*\n Determina quantos dias faltam até ao próximo Natal.\n */\n public long diasAteNatal();\n \n /*\n Determina o salário de um indivíduo sabendo quanto ganha por hora e o ano que pretende calcular. Apresenta o resultado\n em dias, semanas, meses e ano.\n */\n public SalarioAno salarioDiaMesSemanaAno(float salarioHora, int ano); \n \n /*\n Determina o número de dias úteis (isto é, que não são fins-de-semana) de um ano.\n */\n public int numDiasUteisAno(int ano);\n \n /*\n Determina em que dias são os fins-de-semana de um dado mês. Por exemplo, em Janeiro de 2018 o primeiro fim-de-semana\n ocorre nos dias 6 (Sábado) e 7 (Domingo).\n */\n public Map<Integer, DayOfWeek> finsDeSemanaDoMes(int ano, int mes);\n \n /*\n A uma dada data são somados anos, meses, semanas e dias.\n */\n public LocalDate somaData(LocalDate d, int ano, int mes, int semanas, int dias);\n \n /*\n A uma dada data são subtraidos anos, meses, semanas e dias.\n */\n public LocalDate subtraiData(LocalDate d, int ano, int mes, int semanas, int dias);\n \n /*\n Dado um número de dias, calcula a data daqui a esse número de dias e apresenta ainda qual o dia da semana e quantos\n dias úteis faltam até lá.\n */\n public TuploDataDia_SemanaDias_Uteis eventoDaquiXDias(int dias);\n \n /*\n Dado um número de dias úteis, calcula a data daqui a esse número de dias e apresenta ainda qual o dia da semana.\n */\n public ParDataDiaDaSemana eventoDaquiXDiasUteis(int dias);\n \n /*\n Determina qual a data da próxima Black Friday e quantos dias faltam até essa data.\n */\n public ParDataDia proxBlackFriday();\n \n /*\n Calcula a data da Páscoa de um determinado ano.\n */\n public LocalDate proxPascoa(int ano);\n \n /*\n Para um dado ano apresenta a data dos feriados nacionais e em que dia da semana ocorrem.\n */\n public Map<String, MonthDay> dataFeriadosNacionais(int ano);\n \n /*\n Calcula a diferença entre duas datas. Apresenta o resultado em anos, meses e dias. Por exemplo, de 01/01/2018 até \n 10/02/2018 existe uma diferença de 0 anos, 1 mês e 9 dias.\n */\n public static TuploAnosMesesDias difEntreDatas(LocalDate d1, LocalDate d2)\n { \n boolean stop = false;\n boolean stop2 = false;\n long dias;\n int meses;\n int anos;\n \n anos = 0;\n meses = 0;\n dias = 0;\n\n while((d1.getYear() != d2.getYear() || d1.getMonthValue() != d2.getMonthValue())&&!stop && !stop2)\n {\n \n \n while(d1.getMonthValue() != d2.getMonthValue() && !stop2)\n {\n if(d1.getYear() == (d2.getYear() - 1) && d1.getMonthValue() == 12 && d2.getMonthValue() == 1 && d2.getDayOfMonth() < d1.getDayOfMonth())\n {\n stop2 = true;\n dias = 31 - d1.getDayOfMonth() + d2.getDayOfMonth();\n }\n if(stop2 == false)\n {\n YearMonth anoMes = YearMonth.of(d1.getYear(), d1.getMonth());\n int daysInMonth = anoMes.lengthOfMonth(); \n\n if(((d2.getYear() - d1.getYear()) == 0) \n &&((d2.getMonthValue() - d1.getMonthValue()) == 1)\n &&(d1.getDayOfMonth() > d2.getDayOfMonth()))\n {\n\n dias = d2.getDayOfMonth() + daysInMonth - d1.getDayOfMonth(); \n stop = true;\n break;\n }\n\n meses++;\n\n d1 = d1.plusMonths(1);\n }\n }\n if(stop2 == false)\n {\n if(d1.getMonthValue() == d2.getMonthValue() && d1.getYear() !=d2.getYear())\n {\n meses++;\n d1 = d1.plusMonths(1);\n }\n }\n }\n \n if(d1.getMonthValue() == d2.getMonthValue())\n {\n dias = d2.getDayOfMonth() - d1.getDayOfMonth();\n }\n\n while(meses > 12)\n {\n anos++;\n meses-=12;\n }\n \n return new TuploAnosMesesDias(anos, meses, dias);\n \n }\n}",
"@Override\n\tpublic Date getCreateDate();",
"@Override\n\tpublic Date getCreateDate();",
"private TimeUtil() {}",
"public Date(int y, int m, int d){\n\t\tif((y<2015 || m<=0 || m>12 || d<=0 || d>31)){\n\t\t\tyear=0;\n\t\t\tmonth=0;\n\t\t\tday=0;\n\t\t}else{\n\t\t\tyear=y;\n\t\t\tmonth=m;\n\t\t\tday=d;\n\t\t}\n\t\t\n\t}",
"@Override\n public Date generate() {\n int year = 2000 + Rng.instance().nextInt(20);\n int date = Rng.instance().nextInt(28) + 1;\n int month = Rng.instance().nextInt(10) + 1;\n\n Calendar calendar = Calendar.getInstance();\n calendar.set(year, month, date);\n\n return calendar.getTime();\n }",
"@Override\n public void date_()\n {\n }",
"@Override\n\tprotected void setDate() {\n\n\t}",
"public Date(int month, int day, int year) {\n if (!isValid(month, day, year)) throw new IllegalArgumentException(\"Invalid date\");\n this.month = month;\n this.day = day;\n this.year = year;\n }",
"public Date(int day, Month month, int year){\n\tif (day > 0 && day <= month.nbJours(year)){\n\t this.day = day;\n\t}\t\n\tthis.month = month;\n\tif (year > 0){\n\t this.year = year;\n\t}\n }",
"private DatePickerUtil() {\n\n }",
"Date getCreateDate();",
"Date getCreateDate();",
"public SimpleDate(final int year, final int month, final int day) {\n\t\tthis.year = year;\n\t\tthis.month = month;\n\t\tthis.day = day;\n\t}",
"public DateTitle() {\n this(DateFormat.LONG);\n }"
] |
[
"0.7314813",
"0.72313386",
"0.71974117",
"0.7169514",
"0.7169514",
"0.7075324",
"0.69290453",
"0.6796698",
"0.675896",
"0.6739426",
"0.6675855",
"0.65453327",
"0.6497834",
"0.6497278",
"0.64665335",
"0.643067",
"0.63909185",
"0.6381703",
"0.6373715",
"0.6370181",
"0.63458234",
"0.63203883",
"0.6317904",
"0.63169694",
"0.6285787",
"0.62618685",
"0.62584966",
"0.62515324",
"0.62466466",
"0.61801755",
"0.6176389",
"0.61129236",
"0.6081691",
"0.6077607",
"0.6076224",
"0.60624516",
"0.605854",
"0.6035702",
"0.6029288",
"0.60055274",
"0.60048777",
"0.59998655",
"0.595291",
"0.59462523",
"0.5943288",
"0.5941426",
"0.5925923",
"0.5913036",
"0.5908554",
"0.58827806",
"0.5877728",
"0.58701766",
"0.5868706",
"0.5864711",
"0.58538824",
"0.5852166",
"0.5848379",
"0.5847422",
"0.5843205",
"0.58406574",
"0.5813948",
"0.5811183",
"0.5810752",
"0.58054936",
"0.5799246",
"0.57925034",
"0.57879966",
"0.57664305",
"0.5764607",
"0.5760766",
"0.57596517",
"0.57592034",
"0.57568485",
"0.5749027",
"0.57414603",
"0.57414603",
"0.57414603",
"0.57347053",
"0.5723274",
"0.5717474",
"0.5711018",
"0.5707305",
"0.57001543",
"0.57001543",
"0.57001543",
"0.56979656",
"0.5696278",
"0.5694644",
"0.5694644",
"0.5670333",
"0.56684196",
"0.56679326",
"0.56620324",
"0.5647766",
"0.5640284",
"0.563764",
"0.56334525",
"0.5632239",
"0.5632239",
"0.5631177",
"0.5626516"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public List<?> infoObraRecursoEquipo(ObraRecursoEquipoDTO dto) {
return null;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public boolean deleteObraRecursoEquipo(ObraRecursoEquipoDTO dto) {
return false;
}
|
{
"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 ObraRecursoPersonaDTO insertObraRecursoPersona(
ObraRecursoPersonaDTO dto) {
return null;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public ObraRecursoPersonaDTO updateObraRecursoPersona(
ObraRecursoPersonaDTO dto) {
return null;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public List<?> infoObraRecursoPersona(ObraRecursoPersonaDTO dto) {
return null;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public boolean deleteObraRecursoEquipo(ObraRecursoPersonaDTO dto) {
return false;
}
|
{
"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
|
Creating constructors Constructors are called automatically and only called once at the start when we are creating the object TIP : Constructors can be overloaded If an empty constructor is called you can call a constructor with parameters to pass default values NOTE: when creating a default/empty constructor the this method has to be the first line
|
public BankAccount() {
this(12346, 5.00, "Default Name", "Default Address", "default phone");
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void DefaultConstructor(){}",
"defaultConstructor(){}",
"ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}",
"TypesOfConstructor(){\n System.out.println(\"This is default constructor\");\n }",
"ConstuctorOverloading(){\n\t\tSystem.out.println(\"I am non=argument constructor\");\n\t}",
"public Constructor(){\n\t\t\n\t}",
"private void __sep__Constructors__() {}",
"public Employee()\n\t{\n\t\tthis(\"(2)Invoke Employee's overload constructor\");\n\t\tSystem.out.println(\"(3)Employee's no-arg constructor is invoked\");\n\t}",
"DefaultConstructor(int a){}",
"@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }",
"public Student() {\n//\t\tname = \"\";\n//\t\tage = 0;\n\t\t\n\t\t\n\t\t//call constructors inside of other constructors\n\t\tthis(999,0);\n\t}",
"private Instantiation(){}",
"public static void main(String[] args) {\nconstructorDemo obj=new constructorDemo();\nconstructorDemo obj1=new constructorDemo(\"My Parameter\");\nconstructorDemo obj2=new constructorDemo(123);\nconstructorDemo obj3=new constructorDemo(123,6);\nSystem.out.println(\"code after creating object\");\nobj.hello();\nobj.hello(\"hi\");\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"private SingleObject()\r\n {\r\n }",
"public Demo3() {}",
"Employees() { \r\n\t\t this(100,\"Hari\",\"TestLeaf\");\r\n\t\t System.out.println(\"default Constructor\"); \r\n\t }",
"public Overview() {\n\t\t// It will work whenever i create object with using no parameter const\n\t\tSystem.out.println(\"This is constructor\");\n\t}",
"private Default()\n {}",
"public ObjectFactory() {\r\n\t}",
"public ObjectFactory() {\n\t}",
"ConstuctorOverloading(int num){\n\t\tSystem.out.println(\"I am contructor with 1 parameter\");\n\t}",
"public Calculator() {\r\n\t\t/*\r\n\t\t * Constructor - Method name which has the same class name is called a Consatructor\r\n\t\t */\r\n\t\tSystem.out.println(\"Calling constructor\");\r\n\t}",
"public Bicycle() {\n // You can also call another constructor:\n // this(1, 50, 5, \"Bontrager\");\n System.out.println(\"Bicycle.Bicycle- no arguments\");\n gear = 1;\n cadence = 50;\n speed = 5;\n name = \"Bontrager\";\n }",
"Reproducible newInstance();",
"public static void main(String[] args) {\n\t\t\r\n\t\tdefaultconstructor d = new defaultconstructor();\r\n\tSystem.out.println(d.Age);\t\r\n\tSystem.out.println(d.Name);\r\n\r\n\t\t\r\n\t\t\r\n\r\n\t}",
"public Methods() { // ini adalah sebuah construktor kosong tidak ada parameternya\n System.out.println(\"Ini adalah Sebuah construktor \");\n }",
"public static void main(String[] args) {\n My obj2=new My(9);//--->called overloaded Constructor\n }",
"public ConstructorsDemo() \n\t {\n\t x = 5; // Set the initial value for the class attribute x\n\t }",
"@Test\n public void constructorDefault() {\n final CourseType courseType = new CourseType();\n\n assertNull(courseType.getId());\n assertNull(courseType.getName());\n assertNull(courseType.getPicture());\n assertNull(courseType.getPosition());\n assertNull(courseType.getStatus());\n assertNull(courseType.getCourses());\n assertNull(courseType.getAllowedDishes());\n }",
"public Dog() {\n // Default constructor\n }",
"public TennisCoach() {\r\n\t\t// just to check whether it is called or not(just for own debugging)\r\n\t\tSystem.out.println(\">> TennisCoach: inside default constructor\");\r\n\t}",
"Car()\r\n\t{\r\n\t\tSystem.out.println(\"hello\");\r\n\t}",
"@Test\r\n\tpublic void test002_EmptyArgumentConstructor() {\r\n\t\tCustomer c = new Customer( \"\", \"\", \"\" );\r\n\t\tassertEquals( c.getId(), \"\" );\r\n\t\tassertEquals( c.getFirstName(), \"\" );\r\n\t\tassertEquals( c.getLastName(), \"\" );\r\n\t\tassertEquals( c.getContact(), \"\" );\r\n\t}",
"public Field(){\n\n // this(\"\",\"\",\"\",\"\",\"\");\n }",
"public CyanSus() {\n\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"private void addConstructors() {\n\t\tthis.rootBindingClass.getConstructor().body.line(\"super({}.class);\\n\", this.name.getTypeWithoutGenerics());\n\t\tGMethod constructor = this.rootBindingClass.getConstructor(this.name.get() + \" value\");\n\t\tconstructor.body.line(\"super({}.class);\", this.name.getTypeWithoutGenerics());\n\t\tconstructor.body.line(\"this.set(value);\");\n\t}",
"public Pitonyak_09_02() {\r\n }",
"private SingleObject(){\n }",
"public AbstractClass() { //Sobrecarga del constructor AbstractClass ya que se puede inicializar de 2 maneras\n }",
"private SingleObject(){}",
"public Student()\r\n {\r\n //This is intended to be empty\r\n }",
"public Employee() {\r\n\t\t// super should be 1st line \r\n\t\tsuper();\r\n\t\tSystem.out.println(\"Hi i'm from constructor \");\r\n\t}",
"public Demo() {\n\t\t\n\t}",
"public Person()\n {\n //intentionally left empty\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }"
] |
[
"0.7992246",
"0.7876699",
"0.7822816",
"0.7606885",
"0.7605632",
"0.7418558",
"0.720135",
"0.7089356",
"0.7064354",
"0.6984426",
"0.69521",
"0.6942063",
"0.6863239",
"0.6854809",
"0.6851202",
"0.68051547",
"0.675745",
"0.67555267",
"0.67478716",
"0.6705515",
"0.6697836",
"0.6692477",
"0.66336673",
"0.6629315",
"0.6593343",
"0.6526335",
"0.65201426",
"0.65141684",
"0.6499443",
"0.64969593",
"0.64844704",
"0.6477297",
"0.6462978",
"0.6444694",
"0.6441581",
"0.643848",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.6429335",
"0.64274025",
"0.6402897",
"0.6401018",
"0.6398454",
"0.63950795",
"0.6392911",
"0.6388192",
"0.638363",
"0.63697445",
"0.636662",
"0.636662",
"0.636662",
"0.636662",
"0.636662",
"0.636662",
"0.636662",
"0.636662"
] |
0.0
|
-1
|
Setter Methods Account Number
|
public void setAccountNumber(int accountNumber) {
this.accountNumber = accountNumber;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setAccountNo (String AccountNo);",
"public void setAccountNo(int number){\n\t\taccountNo = number;\n\t}",
"public synchronized void setAccountNumber(int number) {\n this.accountNumber = number;\n }",
"void setAccountNumber(java.lang.String accountNumber);",
"public int getAccountNumber() {\n return accountNumber;\n }",
"private void setAccountNumber() // setare numar de cont\n {\n int random = ThreadLocalRandom.current().nextInt(1, 100 + 1);\n accountNumber = ID + \"\" + random + SSN.substring(0,2);\n System.out.println(\"Your account number is: \" + accountNumber);\n }",
"public int getAccountNumber() {\n\t\treturn accNum;\n\t}",
"java.lang.String getAccountNumber();",
"public\n void\n setAccount(Account account)\n {\n itsAccount = account;\n }",
"public Integer getAccountNumber() {\n return accountNumber;\n }",
"public Integer getAccountNumber() {\n return accountNumber;\n }",
"public int getAccountNo() {\n return accountNo;\n }",
"public int getAccountNo()\r\n\t{\r\n\t\t\r\n\t\treturn accountNo;\r\n\t\t\r\n\t}",
"public String getAccountNumber() {\n return accountNumber;\n }",
"public String getAccountNumber() {\n return accountNumber;\n }",
"public String getAccountNumber() {\n return accountNumber;\n }",
"public void setAccountNo(String AccountNo) {\n super.setAccountNo(MPaymentValidate.checkNumeric(AccountNo));\n }",
"void setAccount(final Account account);",
"public BankAccount() {\n numberOfAccounts++;\n this.accountNumber = accountNumberGenerator(); \n }",
"public int getAccountNo() {\n\t\treturn this.accountNo;\r\n\t}",
"public String getAccountNo();",
"public String getAccountNo() {\n return accountNo;\n }",
"public void setAccountNumer(int accountNumber) {\n\t\tif (this.accountNumber == 0) {\n\t\t\tthis.accountNumber = accountNumber;\n\t\t} else {\n\t\t\tSystem.out.println(\"The account number is already assigned to this Customer.\");\n\t\t}\n\t}",
"public boolean setAccountNumber(int account) {\n\t\tif (account > 0)\n\t\t\tthis.account = String.valueOf(account);\n\t\telse\n\t\t\treturn false;\n\t\treturn true;\n\t}",
"public String getAccountNumber() {\n\t\treturn accountNumber;\n\t}",
"public String getAccountNumber() {\n\t\treturn accountNumber;\n\t}",
"public void setAccountNumber(int accountNumberIn)\r\n\t{\r\n\t\t\r\n\t\tif (accountNumberIn >= ACCOUNT_NUM_MIN && accountNumberIn <= ACCOUNT_NUM_MAX)\r\n\t\t\r\n\t\t\taccountNumber = accountNumberIn;\r\n\t\t\r\n\t\telse\r\n\t\t\taccountNumber = -1;\r\n\t\t\r\n\t}",
"public java.lang.String getAccount_number() {\n return account_number;\n }",
"public void setAccountId(String s) { accountId = s;}",
"public static String getAccountNumber() {\n\t\treturn accountNumber;\n\t}",
"public java.lang.String getAccountNumber() {\r\n return accountNumber;\r\n }",
"public void setAccountNumber(String newAccountNumber) \n\t{\n\t\taccountNumber = newAccountNumber;\n\t}",
"public String getAccountNumber() {\n\t\tthis.setAccountNumber(this.account);\n\t\treturn this.account;\n\t}",
"public account(){\n this.accNo = 000;\n this.id = 000;\n this.atype = \"\";\n this.abal = 0.00;\n }",
"void unsetAccountNumber();",
"public void setAccount(Account account) {\n this.account = account;\n }",
"public void setC_BankAccount_ID (int C_BankAccount_ID);",
"void setAccountId(Long accountId);",
"public java.lang.String getAccountNumber() {\n return accountNumber;\n }",
"public String getAccountNr() {\r\n\t\treturn accountNr;\r\n\t}",
"Account(int account_number,double balance) //pramiterized constrector\n {\n this.account_number=account_number;\n this.balance=balance;\n }",
"public void setAccountType(int value) {\r\n this.accountType = value;\r\n }",
"public void setAccountId(long value) {\n this.accountId = value;\n }",
"public void setAccountId(Integer value) {\n this.accountId = value;\n }",
"public void setAccNo(int accNo) {\r\n\t\tthis.accNo = accNo+1;\r\n\t}",
"public void setAccountNo( String accountNo ) {\r\n this.accountNo = accountNo;\r\n }",
"public void setAccount(String account) {\n this.account = account;\n }",
"public void setAccount(String account) {\n this.account = account;\n }",
"public void setAccount(String account) {\n this.account = account;\n }",
"public void setAccount(String account) {\n this.account = account;\n }",
"public java.lang.String getAccountNumberString()\r\n\t{\r\n\t\t\r\n\t}",
"public void setAccount(String account) {\r\n\t\tthis.account = account;\r\n\t}",
"public void setAccountID(Long value) {\n this.accountID = value;\n }",
"public void setAccountID(Long value) {\n this.accountID = value;\n }",
"public void setAccountNo(String accountNo) {\n this.accountNo = accountNo;\n }",
"public void setCardNo(int cardNumber);",
"public saccoAccount (int account_num, double initial_balance) \r\n {\r\n\r\n account = account_num;\r\n balance = initial_balance;\r\n\r\n }",
"Account(int balance) {\n if(balance <0) this.balance=0;\n this.balance = balance;\n }",
"void updateAccount();",
"public int getBankAccountNumber() {\n return bankAccountNumber;\n }",
"public void setAccount(String bank, String account)\n\t{\n\t\tbank = bank.trim().replaceAll(\" +\",\" \");\n\t\t\n\t\tif(account.length() == 19) //length of digits including hyphen(-)\n\t\t{\n\t\t this.account = MaskDigits.mask(account, \"xxxx-xxxx-xxxx-####\");\n\t\t}\n\t\tif(bank.equals(\"HSBC Canada\"))\n\t\t{\n\t\t\t\n\t\t\tthis.account = MaskDigits.mask(account, \"##xx-xxxx-xxxx-xxxx\");\n\t\t}\n\t\t\n\t\tif(bank.equals(\"Royal Bank of Canada\"))\n\t\t{\n\t\t\tthis.account = MaskDigits.mask(account, \"####-xxxx-xxxx-xxxx\");\n\t\t}\n\t\t\n\t\tif(bank.equals(\"American Express\"))\n\t\t{\n\t\t\tthis.account = MaskDigits.mask(account, \"xxxx-xxxx-xxxx-###\");\n\t\t}\n\t}",
"void accountSet(boolean admin, String username, String password, String fName, String lName, int accountId);",
"public SavingsAccount(String n) {\n super(n); \n balance = 0;\n }",
"public boolean setAccountNumber(String account) {\n\t\tif (account == null)\n\t\t\taccount = \"\";\n\t\ttry {\n\t\t\treturn this.setAccountNumber(Integer.parseInt(account));\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"void xsetAccountNumber(org.apache.xmlbeans.XmlString accountNumber);",
"public String getAcctNo(){\n\t\treturn acctNo;\n\t}",
"public Builder setAccount(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n account_ = value;\n onChanged();\n return this;\n }",
"public void setAccountId(int accountId) {\n this.accountId = accountId;\n }",
"void updateAccount(Account account);",
"public BankAccount() {\t\n\t\tthis.accountNumber = UUID.randomUUID().toString().substring(0, 6);\n\t\tthis.balance = 0;\n\t\tthis.accountType = \"Bank account\";\n\t}",
"Account getAccount(Integer accountNumber);",
"protected void setAccountName(final String account) {\n this.account = account;\n }",
"public String getAccount(){\n\t\treturn account;\n\t}",
"public Account() //default constructor \n {\n this.balance = 0;\n this.account_number = 0;\n }",
"public BankAccount(int accountNum, String customerName){\n this.accountNum = accountNum;\n this.customerName = customerName;\n balance = 0;\n }",
"@Override\n protected void setBankNum(int bankNum) {\n }",
"public Builder setAccount(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n account_ = value;\n onChanged();\n return this;\n }",
"public void setAccountNumber(String accountNumber) {\n this.accountNumber = accountNumber;\n }",
"public int getBankAccount() {\n return bankAccount;\n }",
"public void setJP_BankAccount_Value (String JP_BankAccount_Value);",
"public void setAccountId(Integer accountId) {\n this.accountId = accountId;\n }",
"public String getAccount() {\r\n return account;\r\n }",
"public Saving accountNumber(String accountNumber) {\n this.accountNumber = accountNumber;\n return this;\n }",
"int updateAccountInfo(Account account);",
"public CheckingAccount(String n) {\n super(n);\n balance = 0;\n }",
"public void setAccountNumber(java.lang.String accountNumber) {\r\n this.accountNumber = accountNumber;\r\n }",
"public String getCardNumber() {\n return this.account;\n }",
"private void initial(){\n storeAccount(\"201799990001030047\");\n }",
"public void setAccount(String accountID) {\n this.account = accountID;\n }",
"public BankAccount(int balance) {\n\n this.balance = balance;\n\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }"
] |
[
"0.81330585",
"0.7886689",
"0.77453214",
"0.76600975",
"0.73574483",
"0.73118746",
"0.7189251",
"0.71862525",
"0.7116745",
"0.7075299",
"0.7075299",
"0.7056886",
"0.70493156",
"0.7004812",
"0.7004812",
"0.7004812",
"0.7003366",
"0.6957539",
"0.6950599",
"0.6884383",
"0.6850513",
"0.6828352",
"0.681822",
"0.68091846",
"0.6802965",
"0.6802965",
"0.6760726",
"0.6753943",
"0.67481625",
"0.67193764",
"0.6711911",
"0.6705468",
"0.66868275",
"0.66850466",
"0.66840976",
"0.66771686",
"0.66557544",
"0.6645542",
"0.662511",
"0.6614216",
"0.6579378",
"0.6576661",
"0.6571569",
"0.6571455",
"0.6562991",
"0.6559402",
"0.65474623",
"0.65474623",
"0.65474623",
"0.65474623",
"0.64949226",
"0.64525753",
"0.6451452",
"0.6451452",
"0.6436049",
"0.64024293",
"0.6366883",
"0.6354091",
"0.63527185",
"0.6344736",
"0.63406044",
"0.6338795",
"0.633746",
"0.6331973",
"0.6312022",
"0.63116664",
"0.631157",
"0.6309855",
"0.6275846",
"0.6264252",
"0.62572765",
"0.62515986",
"0.6248285",
"0.624394",
"0.62412155",
"0.623257",
"0.6227427",
"0.6227347",
"0.6221615",
"0.62205714",
"0.6216771",
"0.6198713",
"0.61941063",
"0.61900425",
"0.6189907",
"0.61796343",
"0.61702627",
"0.6143144",
"0.613479",
"0.6128389",
"0.6109376",
"0.6109376",
"0.6109376",
"0.6109376",
"0.6109376",
"0.6109376",
"0.6109376",
"0.6109376",
"0.6109376",
"0.6109376"
] |
0.6887552
|
19
|
reverse first K elements
|
public void rotateLeftWithReverse(int arr[], int n, int k) {
reverse(arr, 0, k-1);
//reverse last k elements
reverse(arr, n-k-1, n-1);
//reverse all array
reverse(arr, 0, n-1);
printArray(arr);
/*
* Time Complexity : O(n) loop ran for k times
* Space Complexity : O(1)
*/
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public ListNode reverseKGroup(ListNode head, int k) {\n int len = getLength(head);\n ListNode dummy = new ListNode(-1);\n dummy.next = head;\n ListNode prepare = dummy;\n\n for (int i = 0; i <= len - k; i = i + k) {\n prepare = reverse(prepare, k);\n }\n return dummy.next;\n }",
"public static ListNode reverseKGroup(ListNode head, int k) {\n\t\tListNode runner = head;\n\t\tint counter = 0;\n\t\twhile(runner != null){\n\t\t\trunner = runner.next;\n\t\t\tcounter++;\n\t\t}\n\t\tif(counter < k){return head;}\n\t\t\n\t\t// reverse first k nodes\n\t\tListNode dummy = new ListNode(0);\n\t\tdummy.next = head;\n\t\t\n\t\tListNode oriHead = head;\n\t\tListNode prev = null;\n\t\t\n\t\tfor(int i=0; i<k; i++){\n\t\t\tListNode temp = head.next;\n\t\t\thead.next = prev;\n\t\t\tprev = head;\n\t\t\thead = temp;\n\t\t}\n\t\t\n\t\t// append rest nodes by recur\n\t\tdummy.next = prev;\n\t\toriHead.next = reverseKGroup(head, k);\n\t\t\n\t\treturn dummy.next;\n\t\n\t}",
"public void rotateReverse(int[] nums, int k){\n int n = nums.length;\n \n //in case k is greater than the length\n k = k % n;\n \n reverse(nums, 0, n-1);\n reverse(nums, 0, k-1);\n reverse(nums, k, n-1);\n }",
"private static int[] reverseFromKtoEnd(int[] digits, int k, int length) {\r\n\t\tint temp[] = Arrays.copyOfRange(digits, k + 1, length);\r\n\t\tint l = temp.length;\r\n\t\tfor (int i = k + 1; i < length; i++) {\r\n\t\t\tdigits[i] = temp[l - 1];\r\n\t\t\tl--;\r\n\t\t}\r\n\t\treturn digits;\r\n\t}",
"public ListNode reverseKGroup(ListNode head, int k) {\n if(head == null || head.next == null || k < 2)\n return head;\n \n ListNode dummy = new ListNode(0);\n ListNode curr = dummy;\n ListNode tail = head;\n int count = 0;\n while(head != null) {\n count++;\n if(count == k) {\n // Reverse nodes \n // Store location of head next\n // Store location of rear, this will be used to know where to continue next\n ListNode temp = head.next;\n ListNode last = tail;\n \n // Move pointers around to reverse the nodes\n ListNode next = tail;\n while(next != temp) {\n ListNode prev = tail;\n tail = next == tail ? tail.next : next;\n next = tail.next;\n tail.next = prev;\n }\n curr.next = head;\n curr = last;\n head = temp;\n tail = temp;\n count = 0;\n }\n else {\n head = head.next;\n }\n }\n curr.next = tail;\n return dummy.next;\n }",
"public MyListNode reverseKGroup(MyListNode head, int k) {\n if (k == 1)\n return head;\n MyListNode H = new MyListNode(0);\n H.next = head;\n MyListNode q = H;\n for (MyListNode p = head; p != null; p = p.next) {\n p = reverseK(q, k);\n if (p == null)\n break;\n q = p;\n }\n return H.next;\n }",
"ListNode kAltReverse(ListNode head, int k) {\r\n\t\tListNode curr = head, next = null, prev = null;\r\n\t\tint count = 0;\r\n\t\t/*1) LL Revese Alg: reverse first k nodes of the linked list */\r\n\t\twhile (curr != null && count < k) {\r\n\t\t\tnext = curr.next;\r\n\t\t\tcurr.next = prev;\r\n\t\t\tprev = curr;\r\n\t\t\tcurr = next;\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\t/* 2) Now head points to the kth node. So change next of head to (k+1)th node*/\r\n\t\tif (head != null) {\r\n\t\t\thead.next = curr;\r\n\t\t}\r\n\t\t/* 3) We do not want to reverse next k nodes. So move the curr pointer to skip next k nodes */\r\n\t\tcount = 0;\r\n\t\twhile (count < k - 1 && curr != null) {\r\n\t\t\tcurr = curr.next;\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\t/* 4) Recursively call for the list starting from curr->next. \r\n\t\tAnd make rest of the list as next of first node */\r\n\t\tif (curr != null) {\r\n\t\t\tcurr.next = kAltReverse(curr.next, k);\r\n\t\t}\r\n\t\t/* 5) prev is new head of the input list */\r\n\t\treturn prev;\r\n\t}",
"public static ListNode reverse(ListNode head, int k) {\n\t\tListNode curr = head;\n\t\tListNode prev = null;\n\t\twhile (true) {\n\t\t\tListNode prevLast = prev; // null for head,1 for 4,5,6\n\t\t\tListNode first = curr;\n\n\t\t\t// reversing\n\t\t\tprev = null;\n\t\t\tfor (int i = 0; i < k && curr != null; i++) {\n\t\t\t\tListNode temp = curr.next;\n\t\t\t\tcurr.next = prev;\n\t\t\t\tprev = curr;\n\t\t\t\tcurr = temp;\n\t\t\t}\n\n\t\t\t// setting prevElement next pointer\n\t\t\tif (prevLast == null) {\n\t\t\t\thead = prev;\n\n\t\t\t} else {\n\t\t\t\tprevLast.next = prev;\n\t\t\t}\n\n\t\t\tif (curr == null)\n\t\t\t\tbreak;\n\n\t\t\tprev = first;\n\n\t\t}\n\n\t\treturn head;\n\n\t}",
"public ListNode reverseKGroup(ListNode head, int k) {\n if(head==null || head.next==null || k==0)\n return head;\n ListNode left = head;\n ListNode right = head;\n int count = 1;\n while(count<=k && right!=null){\n right = right.next;\n count++;\n }\n if(count-1!=k && right==null)\n return left;\n ListNode pre = null;\n ListNode cur = left;\n while(cur!=right){\n ListNode next = cur.next;\n cur.next = pre;\n pre = cur;\n cur = next;\n }\n left.next = reverseKGroup(cur, k);\n return pre;\n }",
"public void rotateReverse(int[] nums, int k) {\n\t\tint n = nums.length;\n\t\tk %= n;\n\t\treverse(nums, 0, n - 1);\n\t\treverse(nums, 0, k - 1);\n\t\treverse(nums, k, n - 1);\n\t}",
"public ListNode reverseKGroup(ListNode head, int k) {\r\n\t\tif (head == null) return head;\r\n\t\tint count = 0;\r\n\t\tListNode curr = head, prev = null, next = null;\r\n\t\t// Find the k+1 node\r\n\t\twhile (count != k && curr != null) {\r\n\t\t\tcurr = curr.next;\r\n\t\t\tcount++;\r\n\t\t}\r\n\r\n\t\tif (count != k) return head;\r\n\t\t// reverse list with k+1 node as head\r\n\t\tprev = reverseKGroup(curr, k);\r\n\t\t// LL Reversal Alg: reverse current k-group from head ptr\r\n\t\twhile (count-- > 0) {\r\n\t\t\tnext = head.next;\r\n\t\t\thead.next = prev;\r\n\t\t\tprev = head;\r\n\t\t\thead = next;\r\n\t\t}\r\n\t\treturn prev;\r\n\t}",
"public Node reverse(Node headNode, int k) {\n\n Node currNode = headNode;\n Node next = null;\n Node prev = null;\n\n int count = 0;\n\n /* reverse first k nodes of the linked list */\n while (currNode != null && count < k) {\n next = currNode.getNextNode();\n currNode.setNextNode(prev);\n prev = currNode;\n currNode = next;\n count++;\n }\n if (next != null) {\n headNode.setNextNode(reverse(next, k));\n }\n\n return prev;\n }",
"private ListNode kthNodeInReverseOrder(ListNode head, int k) {\n if (k == 0 || head == null) {\n return head;\n }\n\n ListNode node = head;\n for (int i = 1; i <= k-1; i++) {\n if (node.next != null) {\n node = node.next;\n } else {\n return null;\n }\n }\n\n ListNode kthNodeInReverse = head;\n\n while (node.next != null) {\n kthNodeInReverse = kthNodeInReverse.next;\n node = node.next;\n }\n\n return kthNodeInReverse;\n }",
"public static void removeKthToLast(Node head, int k) {\n if (head == null) return;\n if (k <= 0) return;\n\n Node first = head;\n Node second = head;\n int i = 0;\n while (i < k) {\n if (first == null) return;\n first = first.next;\n i++;\n }\n\n while (first != null) {\n first = first.next;\n second = second.next;\n }\n Node next = second.next;\n if (next == null) {\n second.next = null;\n } else {\n second.data = next.data;\n second.next = next.next;\n }\n }",
"public String removeKthElement(int k) {\n for (int i = 1; i < k; i++) {\n next();\n }\n String kElement = elements[index];\n remove();\n return kElement;\n }",
"private static void back(int k) {\r\n\t\tfor (int i = 0; i < SIZE; i++) {\r\n\t\t\tcurrentPerm[k] = i;\r\n\t\t\tif (validateCurrentPerm(currentPerm, k)) {\r\n\t\t\t\tif (k == SIZE - 1) {\r\n\t\t\t\t\tString currentPermString = \"\";\r\n\t\t\t\t\tfor (int t : currentPerm) {\r\n\t\t\t\t\t\tcurrentPermString += t;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tperms.add(currentPermString);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tback(k + 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void rotateNoSpace(int[] nums, int k){\n //in case k is greater than the length\n k = k % nums.length;\n \n for(int i = 0; i < k; i++){\n int last = nums[nums.length-1];\n for(int j = nums.length - 1; j >= 1; j--){\n nums[j] = nums[j-1];\n }\n nums[0] = last;\n }\n }",
"public void rotate2(int[] nums, int k) {\n int start = 0, n = nums.length;\n k %= n;\n while (n > 0 && k > 0) {\n // Swap the last k elements with the first k elements.\n // The last k elements will be in the correct positions\n // but we need to rotate the remaining (n - k) elements\n // to the right by k steps.\n for (int i = 0; i < k; i++) {\n swap(nums, i + start, n - k + i + start);\n }\n n -= k;\n start += k;\n k %= n;\n }\n }",
"private static SLLNode removeKthLast(SLLNode node, int k) {\n\n if (node == null) {\n throw new IllegalArgumentException(\"Node is empty\");\n }\n\n SLLNode first = node;\n while (k + 1 > 0) {\n first = first.next;\n k = k - 1;\n }\n\n SLLNode second = node;\n while (first != null) {\n second = second.next;\n first = first.next;\n }\n\n if (second != null && second.next != null) {\n second.next = second.next.next;\n }\n return node;\n }",
"public void rotate1(int[] nums, int k) {\n k %= nums.length;\n reverse(nums, 0, nums.length - 1);\n reverse(nums, 0, k - 1);\n reverse(nums, k, nums.length - 1);\n }",
"public void rotate(int[] nums, int k) {\n \n k = k % nums.length;\n reverse(nums, 0, nums.length-1);\n reverse(nums, 0, k-1);\n reverse(nums, k, nums.length-1);\n }",
"private static void rightRotate(int[] nums, int k) {\r\n\t if (nums.length == 0) return;\r\n\t \r\n\t k %= nums.length;\r\n\t \r\n\t if (k == 0) return;\r\n\t \r\n\t int left=0, right=nums.length-1, tmp;\r\n\t \r\n\t while(left < right) {\r\n\t tmp = nums[left];\r\n\t nums[left] = nums[right];\r\n\t nums[right] = tmp;\r\n\t \r\n\t left++;\r\n\t right--;\r\n\t }\r\n\t \r\n\t left=0;\r\n\t right=k-1;\r\n\t \r\n\t while(left < right) {\r\n\t \ttmp = nums[left];\r\n\t \tnums[left] = nums[right];\r\n\t \tnums[right] = tmp;\r\n\t \t \r\n\t \tleft++;\r\n\t \tright--;\r\n\t }\r\n\t \r\n\t left=k;\r\n\t right=nums.length-1;\r\n\t \r\n\t while(left < right) {\r\n\t \ttmp = nums[left];\r\n\t \tnums[left] = nums[right];\r\n\t \tnums[right] = tmp;\r\n\t \t \r\n\t \tleft++;\r\n\t \tright--;\r\n\t }\r\n\t }",
"public ListNode rotateRight(ListNode head, int k) {\n \tif (head == null || k == 0 || head.next == null)\n \t\treturn head;\n \tint size = 1;\n \tListNode curr = head,end=head;\n \tListNode newHead = new ListNode(0);\n \twhile (end.next != null){\n \t\tend = end.next;\n \t\tsize++;\n \t}\n \tif (k%size == 0)\n\t return head;\n \tint start = 1;\n \twhile(start < size - k%size){\n \t\tcurr = curr.next;\n \t\tstart++;\n \t}\n \tnewHead.next = curr.next;\n \tcurr.next = null;\n \tend.next = head;\n \treturn newHead.next;\n }",
"public ListNode rotateRight(ListNode head, int k) {\r\n\t\tint size = listSize(head);\r\n\t\tif (head == null || k <= 0 || k == size) return head;\r\n\t\tif (k > size) k %= size;\r\n\t\tint count = 1;\r\n\t\tListNode curr = head;\r\n\t\tk = size - k;\r\n\t\twhile (count < k && curr != null) {\r\n\t\t\tcurr = curr.next;\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\tListNode nextHead = curr;\r\n\t\twhile (curr.next != null)\r\n\t\t\tcurr = curr.next;\r\n\t\tcurr.next = head;\r\n\t\thead = nextHead.next;\r\n\t\tnextHead.next = null;\r\n\t\treturn head;\r\n\t}",
"public static int[] rotate(int[] nums, int k) {\n int[] temp = new int[k];\n int acc = k % nums.length;\n for (int i = 0; i < acc; i++) {\n temp[i] = nums[(nums.length - acc) + i];\n }\n for (int i = nums.length - acc - 1; i >= 0; i--) {\n nums[i + acc] = nums[i];\n }\n for (int i = 0; i < acc; i++) {\n nums[i] = temp[i];\n }\n return nums;\n }",
"public static void rotate(int[] nums, int k) {\n // get the kth index from the end to rotate\n\t\tint n = nums.length;\n\t\tk = k % n ;\n\t\tif(k == 0) return ;\n\t\tint prev = 0, tmp = 0;\n\t\tfor(int i = 0 ; i < k ; i++) {\n\t\t\tprev = nums[n - 1];\n\t\t\tfor(int j = 0 ; j < nums.length ; j++) {\n\t\t\t\ttmp = nums[j];\n\t\t\t\tnums[j] = prev;\n\t\t\t\tprev = tmp;\n\t\t\t}\n\t\t}\n }",
"static int reverseRecursiveTravesal(Node node, int k) {\n\t\tif(node == null)\n\t\t\treturn -1;\n\t\t\n\t\tint indexFromLast = reverseRecursiveTravesal(node.getNext(), k) + 1;\n\t\tif(indexFromLast == k) \n\t\t\tSystem.out.println(node.getData());\n\t\t\n\t\treturn indexFromLast;\n\t\t\n\t}",
"public void rotateold2(int[] a, int k) {\n\n\t\tif (a == null || a.length == 0)\n\t\t\treturn;\n\n\t\tint jump = 0, len = a.length, cur = a[0], next, count = 0;\n\n\t\tk %= len; \n\t\tif (k == 0) return;\n\n\t\tif (len % k != 0 || k == 1)\n\t\t{ \n\t\t\tint i = 0;\n\t\t\twhile (i < len)\n\t\t\t{\n\t\t\t\tjump = (jump + k) % len;\n\t\t\t\tnext = a[jump];\n\t\t\t\ta[jump] = cur;\n\t\t\t\tcur = next;\n\t\t\t\ti++;\n\t\t\t} \n\t\t} \n\t\telse\n\t\t{\n\t\t\tfor (int i = 0; i <= len/k; i ++)\n\t\t\t{\n\t\t\t\tint start = 0;\n\t\t\t\tjump = i;\n\t\t\t\tnext = a[jump];\n\t\t\t\tcur = a[i];\n\t\t\t\twhile (start <= len/k)\n\t\t\t\t{\n\t\t\t\t\tjump = (jump + k) % len;\n\t\t\t\t\tnext = a[jump];\n\t\t\t\t\ta[jump] = cur;\n\t\t\t\t\tcur = next;\n\t\t\t\t\tstart++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void mo2476b() {\n Collections.reverse(mo2625k());\n }",
"public void rotate(int[] nums, int k) {\n\t\tif(nums == null || nums.length == 0 || k <= 0){\n\t\t\treturn;\n\t\t}\n\t\tint n = nums.length, count = 0;\n\t\tk %= n;\n\t\tfor(int start = 0; count < n; start++){\n\t\t\tint cur = start;\n\t\t\tint prev = nums[start];\n\t\t\tdo{\n\t\t\t\tint next = (cur + k) % n;\n\t\t\t\tint temp = nums[next];\n\t\t\t\tnums[next] = prev;\n\t\t\t\tcur = next;\n\t\t\t\tprev = temp;\n\t\t\t\tcount++;\n\t\t\t}while(start != cur);\n\t\t}\n\t}",
"private List<MyPair> sortAndTrim(int k, List<MyPair> neighbours) {\n\n for (int i = 0; i <= neighbours.size() - 2; i++) {\n for (int j = 0; j <= neighbours.size() - 2 - i; j++) {\n if (neighbours.get(j + 1).getValue() > neighbours.get(j).getValue()) {\n Collections.swap(neighbours, j, j + 1);\n }\n }\n }\n if (k != -1) {\n try {\n neighbours = neighbours.subList(0, k);\n } catch (IndexOutOfBoundsException e) {\n return neighbours;\n }\n }\n return neighbours;\n }",
"public int kToTheEnd(int k) {\n\n if(k<1 || k > this.size())\n return 0;\n\n Node p1=head, p2=head;\n\n for(int i=0; i<k; i++) {\n p2=p2.next;\n }\n\n while(null!=p2.next) {\n p1=p1.next;\n p2=p2.next;\n }\n\n print(\"k to end, k:\" + k + \" data: \" + p1.data);\n return p1.data;\n\n }",
"public ReturnKthToLast() {\n\t\thead = null;\n\t}",
"public void rotate(int[] nums, int k) {\n int[] tmp = new int[nums.length];\n for (int i = 0; i < nums.length; ++i) {\n tmp[(i + k) % nums.length] = nums[i];\n }\n\n for (int i = 0; i < nums.length; ++i) {\n nums[i] = tmp[i];\n }\n }",
"public static ListNode swapNodes2(ListNode head, int k) {\n ListNode KthFromStart = head, out = head, KthFromLast = head;\n for (int i = 1; i < k; i++) {\n KthFromStart = KthFromStart.next;\n }\n ListNode temp_Node = KthFromStart;\n while (temp_Node.next != null) {\n temp_Node = temp_Node.next;\n KthFromLast = KthFromLast.next;\n }\n int temp = KthFromLast.val;\n KthFromLast.val = KthFromStart.val;\n KthFromStart.val = temp;\n return out;\n }",
"private void siftDown(int k, T x) {\n int half = size >>> 1;\n while (k < half) {\n int child = (k << 1) + 1;\n Object c = heap[child];\n int right = child + 1;\n if (right < size &&\n comparator.compare((T) c, (T) heap[right]) > 0)\n c = heap[child = right];\n if (comparator.compare(x, (T) c) <= 0)\n break;\n heap[k] = c;\n k = child;\n }\n heap[k] = x;\n }",
"public static void rotate1 (int [] nums, int k ) {\n\t\tint n = nums.length;\n\t\tk = k % n ;\n\t\tif(k == 0) return ;\n\t\tint prev = 0, currIndex = 0, temp = 0, count = 0;\n\t\tfor(int start = 0 ; count < nums.length ; start++) {\n\t\t\tprev = nums[start];\n\t\t\tcurrIndex = start;\n\t\t\t// keep rotating till reach the initial point\n\t\t\tdo {\n\t\t\t\tint nextIndex = (currIndex + k) % n;\n\t\t\t\ttemp = nums[nextIndex];\n\t\t\t\tnums[nextIndex] = prev;\n\t\t\t\tprev = temp;\n\t\t\t\tcurrIndex = nextIndex;\n\t\t\t\tcount++;\n\t\t\t\t\n\t\t\t} while(start != currIndex);\n\t\t}\n\t}",
"public static int[] solution(int[] A, int K) {\n for (int counter = 1; counter <= K; counter++) {\n int n = A.length - 1;\n int temp = A[n];\n for (int i = 0; i < n; i++) {\n A[n - i] = A[n - i - 1];\n }\n A[0] = temp;\n }\n return A;\n }",
"public List<Integer> rotateEfficiently(List<Integer> a, int k, List<Integer> queries) {\n\n List<Integer> newList = new ArrayList<>(a);\n int counter=0;\n int size = a.size();\n for (int count=k;count<k+size;count++) {\n newList.set(counter++, a.get(count%size));\n }\n\n return putInSpecifiedQueries(newList,queries);\n }",
"K last();",
"Node nthToLast(int k) {\n Node p1 = head;\n Node p2 = head;\n for (int i = 0; i < k; i++) {\n if (p1 == null) return null;\n p1 = p1.getNext();\n }\n\n while (p1 != null) {\n p1 = p1.getNext();\n p2 = p2.getNext();\n }\n return p2;\n }",
"public int kthFromEnd(int k) {\r\n\r\n if (head == null) {\r\n return 0;\r\n }\r\n Node lead = head;\r\n while (k >= 0) {\r\n lead = lead.next;\r\n k--;\r\n }\r\n Node tail = head;\r\n while (lead != null) {\r\n lead = lead.next;\r\n tail = tail.next;\r\n }\r\n int i = tail.data;\r\n return i;\r\n }",
"public void flipBit(int k) {\n if (this.inBitRange(k)) {\n int i = k / 8;\n int j = k % 8;\n int b = this.data.get(i);\n int c = 1 << (7 - j);\n b = b ^ c;\n byte d = (byte) b;\n this.data.set(i, d);\n }\n }",
"private static <Key extends Comparable<Key> > void swim(Key []a, int k){\n while(k>1 &&less(a, k/2, k)){\n exch(a, k/2, k);\n k=k/2;\n }\n }",
"public void reverseDi() {\n int hi = size - 1;\n int lo = 0;\n\n while (lo < hi) {\n Node left = getNodeAt(lo);\n Node right = getNodeAt(hi);\n\n Object temp = left.data;\n left.data = right.data;\n right.data = temp;\n\n lo++;\n hi--;\n }\n }",
"public int[] solution(int[] A, int K) {\n\t\tfor (int i = 0 ; i < K ; i++) {\n\t\t\tfor (int j = 0 ; j < A.length ; j++) {\n\t\t\t\tint tmp = A[j];\n\t\t\t\tA[j] = A[A.length-1];\n\t\t\t\tA[A.length-1] = tmp;\n\t\t\t}\n\t\t}\n\t\treturn A;\n }",
"public void reverseArray(int[] arr1) {\n int k = arr1.length;\n int arr2[] = new int[arr1.length];\n for (int i = 0; i < arr1.length; i++) {\n arr2[k - 1] = arr1[i];\n k = k - 1;\n }\n System.out.println( \"After Reversing Elemenst\" );\n dispArray( arr2 );\n // Swap\n int temp;\n for (int i = 0; i < arr1.length / 2; i++) {\n temp = arr1[i];\n arr1[i] = arr1[arr1.length - i - 1];\n arr1[arr1.length - i - 1] = temp;\n }\n dispArray( arr1 );\n\n\n }",
"private void swim(int k) {\r\n while (k > 1 && greater(k/2, k)) {\r\n swap(k, k / 2);\r\n k = k/2;\r\n }\r\n }",
"public int getKthNodeFromEnd(int k){\n // [10 -> 20 -> 30 -> 40 -> 50]\n // k = 1(50) dist = 0;\n // k = 2(40) dist = 1\n\n if(isEmpty()) throw new IllegalStateException();\n\n int distance = k - 1;\n var pointerOne = first;\n var pointerSecond = first;\n\n for(int i = 0; i < distance; i++){\n if(pointerSecond.next != null)\n pointerSecond = pointerSecond.next;\n else\n throw new IllegalArgumentException();\n }\n\n while(pointerSecond.next != null){\n pointerOne = pointerOne.next;\n pointerSecond = pointerSecond.next;\n }\n\n return pointerOne.value;\n }",
"public static void rotateArray(final int[] nums, final int k) {\n final var rot = k % nums.length;\n\n int temp, previous;\n for (int i = 0; i < rot; i++) {\n previous = nums[nums.length - 1];\n for (int j = 0; j < nums.length; j++) {\n temp = nums[j];\n nums[j] = previous;\n previous = temp;\n }\n }\n }",
"public int getRear() {\n if (isEmpty()) {\n return -1;\n }\n return arr[(tail - 1 + k) % k];\n\n\n }",
"public ListNode SolveByMovingPointers(ListNode head, int k)\n {\n // Edge cases\n if (head == null)\n return null;\n if (k == 0)\n return head;\n\n // Calculate list length + actual number of rotations\n int listLength = FindLength(head);\n int numberOfRotations = k >= listLength? k % listLength : k;\n\n // Another edge case - may not need to rotate at all\n if (listLength == 1 || numberOfRotations == 0)\n return head;\n\n // Iterate to the node before the node with number that needs to be rotated to beginning...\n ListNode oldHeadIterator = head;\n int counter = listLength - numberOfRotations - 1;\n while (counter != 0)\n {\n counter -= 1;\n oldHeadIterator = oldHeadIterator.next;\n }\n\n // ... Then make the following node be the beginning of new head + nullify tail of old head\n ListNode newHead = oldHeadIterator.next;\n oldHeadIterator.next = null;\n\n // Iterate to end of the new head, then simply add the old head contents to the tail\n ListNode newHeadIterator = newHead;\n while (newHeadIterator.next != null)\n newHeadIterator = newHeadIterator.next;\n newHeadIterator.next = head;\n\n return newHead;\n }",
"public static Nodelink rotate(Nodelink node, int k){ 1 2 3 4 5\n //\n\n Nodelink head = node;\n Nodelink temp = null;\n Nodelink temp2 = null;\n\n for(int i = 0; i < k; i++){\n while(node != null){\n\n temp = node;\n temp2 = node.next;\n\n node.next = temp;\n\n\n node = node.next;\n\n }\n\n head = node;\n }\n\n\n return head;\n }",
"private void reverseAfter(int i) {\n int start = i + 1;\n int end = n - 1;\n while (start < end) {\n swap(index, start, end);\n start++;\n end--;\n }\n }",
"public static Node lastKNode(Node head, int lastK) {\n int k = lastK;\n // 快指针\n Node p = head;\n while((k = k-1) > 0 && p != null) {\n p = p.getNext();\n }\n\n // 慢指针\n Node q = head;\n while(p.getNext() != null) {\n p = p.getNext();\n q = q.getNext();\n }\n return q;\n }",
"@NonNull\n ConsList<E> reverse();",
"private static int[] cycliRotation(int[] A, int K) {\n\t\tfor(int i = 0; i < K; i++)\n\t\t{\n\t\t\t//Variable\n\t\t\tint tempStorage = 0;\n\t\t\tint nextCounter = 1;\n\t\t\tint currentCounter = 0;\n\t\t\t\n\t\t\tfor(int j=0;j<A.length;j++)\n\t\t\t{\n\t\t\t\tif(nextCounter > A.length)\n\t\t\t\t{\n\t\t\t\t\ttempStorage = A[j];\n\t\t\t\t\t\n\t\t\t\t\tA[j] = A[currentCounter];\n\t\t\t\t\t\n\t\t\t\t\tA[currentCounter] = tempStorage;\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(j == A.length-1)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\ttempStorage = A[nextCounter]; // Move the next element to a temporary storage\n\t\t\t\t\t\n\t\t\t\t\tA[nextCounter] = A[currentCounter]; // Swap the position of the next element with the first\n\t\t\t\t\t\n\t\t\t\t\tA[currentCounter] = tempStorage;\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tnextCounter++;\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn A;\n\t}",
"public List<Integer> rotate(List<Integer> a, int k, List<Integer> queries) {\n\n List<Integer> arrAfterRotation = new ArrayList<>(a);\n\n List<Integer> lastArrAfterRotation = new ArrayList<>(a);\n\n //Set the last one after rotation equal to provided array at initialization\n lastArrAfterRotation = a;\n\n for(int i=0; i<k; i++) {\n arrAfterRotation.set(0,lastArrAfterRotation.get(lastArrAfterRotation.size()-1));\n int counter=1;\n for (int elem=1; elem<lastArrAfterRotation.size();elem++ ) {\n arrAfterRotation.set(counter++, lastArrAfterRotation.get(elem-1));\n }\n List<Integer> tempList = new ArrayList<>(arrAfterRotation);\n lastArrAfterRotation= tempList;\n }\n printList(lastArrAfterRotation);\n\n List<Integer> returnList = new ArrayList<>(lastArrAfterRotation);\n\n for (int i : queries) {\n returnList.set(i,lastArrAfterRotation.get(i));\n }\n\n return returnList;\n\n }",
"static Node reserveIterativeTraversal(MyLinkedList l, int k) {\n\t\tNode p1 = l.getHead();\n\t\tNode p2 = l.getHead();\n\t\t\n\t\tfor(int i = 0; i < k; i++) \n\t\t\tp1 = p1.getNext();\n\t\t\t\n\t\twhile(p1.getNext() != null) {\n\t\t\tp1 = p1.getNext();\n\t\t\tp2 = p2.getNext();\n\t\t}\n\t\t\n\t\treturn p2;\n\t}",
"public ListNode SolveUsingAdditionalLinkedList(ListNode head, int k)\n {\n // Edge cases\n if (head == null)\n return null;\n if (k == 0)\n return head;\n\n // Create blank list to store new result\n ListNode result = new ListNode(-1, null);\n\n // Find the length of the list\n int listLength = FindLength(head);\n\n // Calculate the actual number of rotations (since k can be greater than list length)\n int numberOfRotations = k >= listLength? k % listLength : k;\n\n // Another edge case - may not need to rotate at all\n if (listLength == 1 || numberOfRotations == 0)\n return head;\n\n // Iterate through list until we get to the numbers that need to be moved to beginning...\n int counter = listLength - numberOfRotations;\n ListNode temp = head;\n while (counter != 0)\n {\n temp = temp.next;\n counter -= 1;\n }\n\n // ... Then add the rotated numbers to list\n while (temp != null)\n {\n AddLast(result, temp.val);\n temp = temp.next;\n }\n\n // Lastly, reset counters and add the remaining numbers to the back\n counter = listLength - numberOfRotations;\n temp = head;\n while (counter != 0)\n {\n AddLast(result, temp.val);\n temp = temp.next;\n counter -= 1;\n }\n\n // Since result is dummy node, return result.next\n return result.next;\n }",
"public static ListNode swapNodes(ListNode head, int k) {\n if(head == null || head.next == null){\n return head;\n }\n ListNode tail = head;\n int begin = k;\n int len = 0;\n int index = 1;\n Map<Integer,Integer> map = new HashMap<>();\n while(tail != null){\n len++;\n map.put(index++,tail.val);\n tail = tail.next;\n }\n int end = len - k + 1;\n tail = head;\n index = 1;\n while(tail != null){\n if(index == begin){\n tail.val = map.get(end);\n }\n if(index == end){\n tail.val = map.get(begin);\n }\n index++;\n tail = tail.next;\n }\n return head;\n }",
"public static String reverseStr(String s, int k) {\n\n\t\tchar[] chars = s.toCharArray();\n\n\t\tint i = 0;\n\t\tint j = k - 1;\n\t\tint skip = 2 * k;\n\n\t\tif (j >= chars.length) {\n\t\t\tj = chars.length - 1;\n\t\t}\n\n\t\twhile (j < chars.length) {\n\t\t\t\n\t\t\treverseString(chars, i, j);\n\t\t\ti = i + skip;\n\t\t\tj = i + k - 1;\n\n\t\t\tif (i < chars.length && j >= chars.length) {\n\t\t\t\tj = chars.length - 1;\n\t\t\t}\n\t\t}\n\n\t\treturn new String(chars);\n\t}",
"public static <V> ListNode<V> Rotate (\n\t\tfinal ListNode<V> head,\n\t\tfinal int k)\n\t{\n\t\tif (null == head || 0 >= k)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tint rotationCount = 0;\n\t\tListNode<V> prevNode = null;\n\t\tListNode<V> currentNode = head;\n\n\t\tListNode<V> nextNode = head.next();\n\n\t\twhile (++rotationCount < k)\n\t\t{\n\t\t\tif (null == nextNode)\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tprevNode = currentNode;\n\t\t\tcurrentNode = nextNode;\n\n\t\t\tnextNode = nextNode.next();\n\t\t}\n\n\t\tif (!prevNode.setNext (\n\t\t\tnull\n\t\t))\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tListNode<V> rotatedHead = currentNode;\n\n\t\tnextNode = currentNode.next();\n\n\t\twhile (null != nextNode)\n\t\t{\n\t\t\tcurrentNode = nextNode;\n\n\t\t\tnextNode = nextNode.next();\n\t\t}\n\n\t\treturn currentNode.setNext (\n\t\t\thead\n\t\t) ? rotatedHead : null;\n\t}",
"void reverse()\n\t{\n\t\tint a;\n\t\tif(isEmpty())\n\t\t\treturn;\n\t\telse\n\t\t{\t\n\t\t\ta = dequeue();\n\t\t\treverse(); \n\t\t\tenqueue(a);\n\t\t}\n\t}",
"void reverse();",
"void reverse();",
"public static void rotateAntiClockWise(int[] arr, int k)\r\n {\r\n\t for(int i=0; i< k; i++)\r\n\t {\r\n\t\t for(int j=0; j<arr.length-1; j++)\r\n\t\t {\r\n\t\t\t int temp = arr[j+1];\r\n\t\t\t arr[j+1] = arr[j];\r\n\t\t\t arr[j] = temp;\r\n\t\t\t\r\n\t\t }\r\n\t }\r\n }",
"public DoubleLinkedSeq reverse(){\r\n\t DoubleLinkedSeq rev = new DoubleLinkedSeq();\r\n\t for(cursor = head; cursor != null; cursor = cursor.getLink()){\r\n\t\t rev.addBefore(this.getCurrent());\r\n\t }\r\n\t \r\n\t return rev; \r\n }",
"public ListNode rotateLeft(ListNode head, int k) {\r\n\t\tif (k <= 0) return head;\r\n\t\tListNode curr = head;\r\n\t\tint count = 1;\r\n\t\twhile (count++ < k && curr != null)\r\n\t\t\tcurr = curr.next;\r\n\t\tif (curr == null) return head;\r\n\t\tListNode nextHead = curr;\r\n\t\twhile (curr.next != null)\r\n\t\t\tcurr = curr.next;\r\n\t\tcurr.next = head;\r\n\t\thead = nextHead.next;\r\n\t\tnextHead.next = null;\r\n\t\treturn head;\r\n\t}",
"public List<cc> top(int k) {\n\t\tList<cc> topK = new ArrayList<>();\n\t\t\n for(int i = 0; i < k; i++){\n topK.add(ccList.get(i));\n }\n \n return topK;\n\t}",
"private static SingleLinkedNode findFromEnd(SinglyLinkedList sll, int k) {\n\t\tSingleLinkedNode fast = sll.getHead();\r\n\t\tSingleLinkedNode slow = fast;\r\n\t\tint count = 1;\r\n\t\twhile (fast != null && count < k) {\r\n\t\t\tfast = fast.getNext();\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\tif (fast == null) {\r\n\t\t\treturn null; // not enough elements.\r\n\t\t}\r\n\t\tif (fast.getNext() == null) {\r\n\t\t\t// remove 1st element.\r\n\t\t\tsll.setHead(slow.getNext());\r\n\t\t\treturn slow;\r\n\t\t}\r\n\t\t// Now slow and fast are k elements apart.\r\n\t\t// look 2 ahead so we can remove the element\r\n\t\twhile (fast.getNext().getNext() != null) {\r\n\t\t\tfast = fast.getNext();\r\n\t\t\tslow = slow.getNext();\r\n\t\t}\r\n\t\tfast = slow.getNext(); // temp pointer\r\n\t\tslow.setNext(slow.getNext().getNext());\r\n\t\treturn fast;\r\n\t\t\r\n\t}",
"default @NotNull Iterator<E> reverseIterator() {\n final int ks = this.knownSize();\n if (ks == 0) {\n return Iterators.empty();\n }\n Iterator<E> it = this.iterator();\n if (!it.hasNext()) {\n return it;\n }\n ArrayBuffer<E> buffer = ks > 0\n ? new ArrayBuffer<>(ks)\n : new ArrayBuffer<>();\n while (it.hasNext()) {\n buffer.append(it.next());\n }\n\n @SuppressWarnings(\"unchecked\")\n Iterator<E> res = (Iterator<E>) GenericArrays.reverseIterator(buffer.toArray());\n return res;\n }",
"K first();",
"@Test\n public void correctnessReverse() {\n final Iterator<Partition<Integer>> it = Partitions.lexicographicEnumeration(Helper.newHashSet(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), new int[]{3, 5}, ImmutablePartition::new);\n final Iterator<Partition<Integer>> itr = Partitions.reverseLexicographicEnumeration(Helper.newHashSet(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), new int[]{3, 5}, ImmutablePartition::new);\n final List<Partition<Integer>> partitions = new ArrayList<>();\n final List<Partition<Integer>> partitionsReverse = new ArrayList<>();\n while (it.hasNext() && itr.hasNext()) {\n final Partition<Integer> p = it.next();\n final Partition<Integer> pr = itr.next();\n partitions.add(p);\n partitionsReverse.add(pr);\n }\n Assert.assertTrue(!it.hasNext() && !itr.hasNext());\n Collections.reverse(partitionsReverse);\n Assert.assertEquals(partitions, partitionsReverse);\n }",
"final private void decrementMirrorIndexesOfLast(int index, int size) {\n // indexIsCenter - odd number of digits in the last palindrome\n boolean indexIsCenter = (((size % 2) == 1) && ((size/2) == index));\n int digitValue = last.get(index);\n\n int newDigitValue = (digitValue+9) % 10;\n // decrement digit with index\n last.set(index, newDigitValue);\n if (!indexIsCenter) {\n // decrement also digit with mirror index\n last.set(\n LargestPalindromeProduct.mirror.applyAsInt(index, size),\n newDigitValue\n );\n }\n\n // decrement newghbrs\n if ((digitValue == 0) && (index < (size-1))) {\n decrementMirrorIndexesOfLast(index+1, size);\n } else if ((digitValue == 1) && (index == (size-1))) { //no zeros on borders\n // drop the last element from list and set all element values to 9\n last.remove(last.size()-1);\n for (int i = 0; i < last.size(); i++) {\n last.set(i, 9);\n }\n }\n\n }",
"public void reverse() {\n var previous = first;\n var current = first.next;\n\n last = first;\n last.next = null;\n while (current != null) {\n var next = current.next;\n current.next = previous;\n previous = current;\n current = next;\n\n }\n first = previous;\n\n }",
"public static void main(String[] args) {\n\n\n Node head = MyList.getList();\n MyList.printList(head);\n\n System.out.println(\"After Reverse\");\n head = reverseAlternateKNodes(head, 3);\n System.out.println(\"Reversed\");\n MyList.printList(head);\n\n }",
"protected void sink(int k) {\n\n while (2*k <= N) {\n int j = 2*k;\n\n if (j < N && less(j, j+1)) j++;\n if (!less(k, j)) break;\n exchange(k, j);\n k = j;\n }\n }",
"k value.\nFor 2nd tallest group (and the rest), insert each one of them into (S) by k value. So on and so forth.\n\npublic class Solution {\n public int[][] reconstructQueue(int[][] people) {\n Arrays.sort(people,new Comparator<int[]>() {\n @Override\n public int compare(int[] o1, int[] o2){\n return o1[0] != o2[0]? -o1[0] + o2[0]: o1[1] - o2[1];\n }\n });\n\n List<int[]> res = new ArrayList<>();\n for (int[] cur : people) {\n res.add(cur[1], cur); \n }\n return res.toArray(new int[people.length][]);\n }",
"public static void rotateAntiClockBetter(int[] arr, int k)\r\n {\r\n\t int[] arr2 = arr.clone();\r\n\t for(int i =0; i< arr.length; i++)\r\n\t {\r\n\t\t arr2[i] = arr[(i+k)%arr.length];\r\n\t }\r\n\t System.out.println(Arrays.toString(arr2));\r\n }",
"public E findKthNodeFromEnd(int k) {\n\t\tif (k <= 0 || k > size())\n\t\t\tthrow new IllegalArgumentException();\n\n\t\tNode current = first;\n\t\tNode next = current;\n\n\t\twhile (k > 0) {\n\t\t\tnext = next.next;\n\t\t\tk--;\n\t\t}\n\n\t\twhile (next != null) {\n\t\t\tcurrent = current.next;\n\t\t\tnext = next.next;\n\t\t}\n\t\treturn (E) current.value;\n\t}",
"private static int solution2( int[] arr, int k) {\n\t\tif ( arr == null || arr.length < k ) {\n\t\t\treturn Integer.MIN_VALUE;\n\t\t}\n\t\t\n\t\tint[] a = Arrays.copyOfRange( arr, 0, arr.length );\n\t\t\n\t\tfor ( int i = 1; i <= k; ++i ) {\n\t\t\tfor ( int j = 0; j < a.length - i; ++j ) {\n\t\t\t\tif ( a[j] > a[j+1] ) {\n\t\t\t\t\tint tmp = a[j];\n\t\t\t\t\ta[j] = a[j+1];\n\t\t\t\t\ta[j+1] = tmp;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//displayArray(a);\n\t\t}\n\t\t\n\t\treturn a[a.length-k];\n\t}",
"public void reverse() {\n\t\tif (!this.isEmpty()) {\n\t\t\tT x = this.peek();\n\t\t\tthis.pop();\n\t\t\treverse();\n\t\t\tinsert_at_bottom(x);\n\t\t} else\n\t\t\treturn;\n\t}",
"public static void reverseOptimized(int[] elements) {\n int cursor = elements.length - 1;\n for (int i = 0; i < elements.length / 2; i++) {\n swap(elements, i, cursor);\n cursor--;\n }\n }",
"public int solution1(int[] nums, int k) {\n final int N = nums.length;\n Arrays.sort(nums);\n \n return nums[N-k];\n }",
"public static ArrayList<ArrayList<Integer>> combine1(int n, int k) {\r\n\tArrayList<ArrayList<Integer>> result = new ArrayList<ArrayList<Integer>>();\r\n\tif (n < 1 || k < 1) {\r\n\t return result;\r\n\t}\r\n\tif (n < k) {\r\n\t return result;\r\n\t}\r\n\tif (k == 1) {\r\n\t for (int i = 1; i <= n; i++) {\r\n\t\tArrayList<Integer> aResult = new ArrayList<Integer>();\r\n\t\taResult.add(i);\r\n\t\tresult.add(aResult);\r\n\t }\r\n\t return result;\r\n\t}\r\n\r\n\tfor (int i = n; i > 0; i--) {\r\n\t ArrayList<ArrayList<Integer>> temp = combine1(i - 1, k - 1);\r\n\t for (ArrayList<Integer> aResult : temp) {\r\n\t\taResult.add(i);\r\n\t }\r\n\t result.addAll(temp);\r\n\t}\r\n\r\n\t// get rid of duplicate sets\r\n\tLinkedHashSet<ArrayList<Integer>> finalResult = new LinkedHashSet<ArrayList<Integer>>();\r\n\tfor (ArrayList<Integer> aResult : result) {\r\n\t Collections.sort(aResult);\r\n\t finalResult.add(aResult);\r\n\t}\r\n\tresult = new ArrayList<ArrayList<Integer>>(finalResult);\r\n\r\n\treturn result;\r\n }",
"public int[] rotate2(int[] arr, int k) {\n\t\tif (arr == null || k < 0)// handles exceptions\n\t\t\tthrow new IllegalArgumentException(\"Illegal argument!\");\n\n\t\t// Goes through entire array for each space shifted\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\t// Go through the array starting at the end\n\t\t\tfor (int j = arr.length - 1; j > 0; j--) {\n\n\t\t\t\t// Shifts the value at the current index back one space:\n\t\t\t\tint temp = arr[j];\n\t\t\t\tarr[j] = arr[j - 1];\n\t\t\t\tarr[j - 1] = temp;\n\t\t\t} // end for loop\n\t\t} // end for loop\n\n\t\treturn arr;\n\n\t}",
"public void reversePrint()\n {\n reversePrint(size-1);\n }",
"public static void KswapPermutation(int arr[], int n, int k) {\n\t\tint[] pos = new int[n + 1];\r\n\r\n\t\tfor (int i = 0; i < n; ++i)\r\n\t\t\tpos[arr[i]] = i;\r\n\r\n\t\tfor (int i = 0; i < n && k > 0; ++i) {\r\n\t\t\t// If element is already i'th largest,\r\n\t\t\t// then no need to swap\r\n\t\t\tif (arr[i] == n - i)\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\t// Find position of i'th largest value, n-i\r\n\t\t\tint temp = pos[n - i];\r\n\r\n\t\t\t// Swap the elements position\r\n\t\t\tpos[arr[i]] = pos[n - i];\r\n\t\t\tpos[n - i] = i;\r\n\r\n\t\t\t// Swap the ith largest value with the\r\n\t\t\t// current value at ith place\r\n\t\t\tswap(arr, temp, i);\r\n\r\n\t\t\t// decrement number of swaps\r\n\t\t\t--k;\r\n\t\t}\r\n\t}",
"public void pruneK(Integer k) {\n\n Integer sum = (Integer)root.element;\n if (largestPath(root.left, sum) >= k) {\n pruneRecur(root.left, sum, k);\n } else {\n root.left = null;\n }\n if (largestPath(root.right, sum) >= k) {\n pruneRecur(root.right, sum, k);\n } else {\n root.right = null;\n }\n }",
"@Override\n public Object remove(int k) {\n long startTime = System.currentTimeMillis();\n Object value = super.remove(k);\n long endTime = System.currentTimeMillis();\n if (value == null) {\n elements--;\n startTime = System.currentTimeMillis();\n for (int i = 1; i < super.size() && value == null; i++) {\n int hash = (k + i) % size();\n MapElement me = hashTable[hash];\n if (me == null) {\n value = null;\n } else if (me.getKey() != k) {\n value = null;\n } else {\n hashTable[hash] = null;\n value = me.getValue();\n }\n }\n endTime = System.currentTimeMillis();\n }\n System.out.println(\"------REMOVE------\");\n System.out.println(\"TIME: \" + (endTime - startTime));\n return value;\n }",
"@Override\r\n public NavigableSet<K> descendingKeySet() {\n return null;\r\n }",
"@Override\n protected void downHeap(int k)\n {\n while (2 * k <= this.count)\n {\n //identify which of the 2 children are smaller\n int j = 2 * k;\n if (j < this.count && this.isGreater(j, j + 1))\n {\n j++;\n }\n //if the current value is < the smaller child, we're done\n if (!this.isGreater(k, j))\n {\n break;\n }\n //if not, swap and continue testing\n this.swap(k, j);\n k = j;\n }\n \tthis.elementsToArrayIndex.put(elements[k], k);\n }",
"void percolateDown(int index) {\n T x = (T) pq[index];\n int c = (2*index)+1;\n while(c<=size-1) {\n if((c<size-1) && (pq[c].compareTo(pq[c+1])==1))\n c++;\n if(pq[c].compareTo(x)>0)\n break;\n pq[index] = pq[c];\n index = c;\n c = (2*index)+1;\n pq[index]=x;\n }\n }",
"public void _reverse() {\n\n var prev = first;\n var current = first.next;\n last = first;\n last.next = null;\n while (current != null) {\n var next = current.next;\n current.next = prev;\n prev = current;\n current = next;\n\n }\n first = prev;\n\n }",
"static final void debruijn2(final int _k, final byte[] _res)\n\t{\n\t\t// byte[] p;\n\t\tbyte[] t = new byte[_k << 1];\n\t\t// Arrays.fill( t, (byte)0 );\n\t\t// p = &_res[_k * _k];\n\t\tdeb2_impl( t, _res, _k * _k, _k, 1, 1 );\n\t\tt = null;\n\t}",
"public LinkedListNode kth(LinkedListNode head, int k){\n\t\tif(head==null) return null;\n\t\t\n\t\tNode p1=head;\n\t\tNdde p2=head;\n\t\t\n\t\tfor(int i=0;i<k;i++){\n\t\t\tif(p2==null) return null;\n\t\t\tp2=p2.next\n\t\t}\n\t\t\n\t\tif(p2==null) return null;\n\t\t\n\t\twhile(p2.next!=null){\n\t\t\tp2=p2.next;\n\t\t\tp1=p1.next;\n\t\t}\n\t\treturn p1;\n\t}",
"protected abstract List<LayoutHelper> reverse();",
"public static void backtrack(int first, ArrayList<Integer> curr, int[] nums\n , List<List<Integer>> output, int n, int k) {\n if (curr.size() == k) {\n output.add(new ArrayList(curr));\n }\n for (int i = first; i < n; ++i) {\n // add i into the current combination\n curr.add(nums[i]);\n // use next integers to complete the combination\n backtrack(i + 1, curr, nums, output, n, k);\n // backtrack\n curr.remove(curr.size() - 1);\n }\n }",
"public ListNode findK(ListNode head,int k) {\n\t\tListNode fast,slow;\n\t\tfast=slow=head;\n\t\t//Move Kth first\n\t\twhile (k-->0) {\n\t\t\tfast=fast.next();\n\t\t}\n\t\twhile(fast!=null & fast.next()!=null) {\n\t\t\tfast=fast.next();\n\t\t\tslow=slow.next();\t\t\n\t\t}\n\t\treturn slow;\n\t}"
] |
[
"0.69716823",
"0.6900129",
"0.6867325",
"0.68459606",
"0.6789085",
"0.6720402",
"0.6717691",
"0.6701672",
"0.6643645",
"0.6558022",
"0.653661",
"0.6510691",
"0.6476568",
"0.6432147",
"0.642962",
"0.6357956",
"0.6321903",
"0.6122957",
"0.6091263",
"0.59990495",
"0.5963736",
"0.59590125",
"0.5922521",
"0.58593374",
"0.5795011",
"0.57848865",
"0.5755032",
"0.57331854",
"0.5723278",
"0.5703829",
"0.56875867",
"0.5649674",
"0.56447095",
"0.56239605",
"0.55879146",
"0.55830586",
"0.5562115",
"0.55507207",
"0.5544386",
"0.55263466",
"0.5522812",
"0.55114895",
"0.54630893",
"0.5459955",
"0.5458588",
"0.5450227",
"0.54231066",
"0.54136586",
"0.54118335",
"0.5381158",
"0.53798366",
"0.5373144",
"0.5366446",
"0.5361374",
"0.53574586",
"0.5352503",
"0.53265953",
"0.53259635",
"0.5319732",
"0.5317644",
"0.53144276",
"0.53109944",
"0.53043914",
"0.52987903",
"0.5294823",
"0.5294823",
"0.5286021",
"0.52766633",
"0.52741945",
"0.5273551",
"0.52599585",
"0.5246566",
"0.52370024",
"0.5234916",
"0.5228753",
"0.5226667",
"0.52245206",
"0.521819",
"0.52151227",
"0.52048564",
"0.51976496",
"0.51833344",
"0.51822406",
"0.5182233",
"0.517541",
"0.51696414",
"0.51685274",
"0.5162106",
"0.5161963",
"0.5161074",
"0.51584625",
"0.51546985",
"0.51389575",
"0.5122718",
"0.5119459",
"0.51191944",
"0.5105913",
"0.509606",
"0.5090786",
"0.508872"
] |
0.6572239
|
9
|
Write a function rotate(ar[], d, n) that rotates arr[] of size n by d elements. / Input > 1, 2, 3, 4, 5, 6, 7 Rotate the above array by 2 Output > 3, 4, 5, 6, 7, 1, 2
|
public static void main(String[] args) {
Rotate rotate = new Rotate();
/* int[] arr = new int[] {1,2,3,4,5,6,7};
rotate.printArray(arr);
System.out.println(" ");*/
/*rotate.rotateWithNewArray(arr, arr.length,3);
System.out.println(" ");
rotate.rotateWithNewArrayBetter(arr, arr.length,3);
System.out.println(" ");
int[] arr1 = new int[] {1,2,3,4,5,6,7};
rotate.rotateLeftWithJugglingSolution(arr1, 3, 7);*/
int[] arr2 = new int[] {1,2,3,4,5};
rotate.printArray(arr2);
System.out.println(" ");
rotate.rotateLeftWithReverse(arr2,5,2);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static void main (String[] args) \n { \n int arr[] = {1, 2, 3, 4, 5, 6, 7}; \n int n = arr.length; \n int d = 2; \n \n // in case the rotating factor is \n // greater than array length \n d = d % n; \n leftRotate(arr, 2, 7); // Rotate array by d \n printArray(arr); \n }",
"private static int[] rotateArray(int a[],int d) {\n int len = a.length;\n int a2[] = new int[len];\n int i=0;\n while(i<len-d) {\n a2[i] = a[d+i];\n i++;\n }\n int j=0;\n while(j<d && i < a.length) {\n a2[i] = a[j];\n j++;\n i++;\n }\n return a2;\n }",
"static int[] rotLeft(int[] a, int d) {\r\n // Gets length of input array\r\n int size = a.length;\r\n \r\n // Creates output array\r\n int[] result = new int[size];\r\n \r\n // We start cycling through the input array with index d instead of the very beginning\r\n int index = d;\r\n \r\n // Cycles through the input array\r\n for (int i = 0; i < size; i++) {\r\n // If the index is bigger than the size of the array, it starts again from 0 in order to not overflow\r\n if (index >= size) {\r\n index = 0;\r\n }\r\n result[i] = a[index]; // We save the current value in result\r\n index += 1; // We refresh the index\r\n }\r\n \r\n return result;\r\n}",
"static void leftRotate(int arr[], int d, int n) \n\t{\n\t\tint i, j;\n\t\tif (d == 0 || d == n)\n\t\t\treturn;\n\t\ti = d;\n\t\tj = n - d;\n\t\twhile (i != j) {\n\t\t\tif (i < j) /* A is shorter */\n\t\t\t{\n\t\t\t\tswap(arr, d - i, d + j - i, i);\n\t\t\t\tj -= i;\n\t\t\t} else /* B is shorter */\n\t\t\t{\n\t\t\t\tswap(arr, d - i, d, j);\n\t\t\t\ti -= j;\n\t\t\t}\n\t\t\t// printArray(arr, 7);\n\t\t}\n\t\t/* Finally, block swap A and B */\n\t\tswap(arr, d - i, d, i);\n\t}",
"@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 double[] rotate(double [] x, int n)\n {\n for(int i = 0; i < n; i++)\n {\n for(int j = 0; j < x.length - 1; j++)\n {\n double temp = x[j];\n x[j] = x[j + 1];\n x[j + 1] = temp;\n }\n }\n\n return x;\n\n }",
"public static int[] rotateRight(int[] arr) {\n int[] newArr=new int[arr.length];\n for (int i =0;i< arr.length;i++){\n if (!(i== (arr.length-1))){\n newArr[i+1]=arr[i];\n }\n else{\n newArr[0]=arr[i];\n }\n }\n return newArr;\n }",
"static int[] rotLeft(int[] a, int d) {\n int temp = a[a.length - 1];\n for (int i = a.length - 1; i > 1; i--) {\n if (i > 2) {\n a[i - 2] = temp;\n temp = a[i - 3];\n } else {\n a[0] = a[a.length - 1];\n }\n }\n\n return a;\n }",
"public static void rotate(int[] arr, int order) {\n\t\torder = order % arr.length;\n\t \n\t\tif (arr == null || order < 0) {\n\t\t\tthrow new IllegalArgumentException(\"Illegal argument!\");\n\t\t}\n\t \n\t\t//length of first part\n\t\tint a = arr.length - order; \n\t \n\t\treverse(arr, 0, a-1);\n\t\treverse(arr, a, arr.length-1);\n\t\treverse(arr, 0, arr.length-1);\n\t \n\t}",
"public int[] rotate(int[] arr, int k) {\n\t\tif (k > arr.length)// if k>n or (steps rotated)>(num of elts)\n\t\t\tk = k % arr.length;// then k is changed to k mod n\n\n\t\t// Create a new array of the same length\n\t\tint[] result = new int[arr.length];\n\n\t\tfor (int i = 0; i < k; i++)\n\t\t\tresult[i] = arr[arr.length - k + i];\n\n\t\tint j = 0;\n\t\tfor (int i = k; i < arr.length; i++) {\n\t\t\tresult[i] = arr[j];\n\t\t\tj++;\n\t\t}\n\n\t\t// Copy the shifted array into the original\n\t\tSystem.arraycopy(result, 0, arr, 0, arr.length);\n\t\treturn arr;\n\n\t}",
"static int[] rotLeft(int[] a, int d) {\r\n if (d<=0) {return a;}\r\n int n = a.length;\r\n int[] subArrayBack = new int[d];\r\n int[] subArrayFront = new int[n-d]; \r\n for ( int i = 0; i < d; i++){\r\n subArrayBack[i] = a[i];\r\n } \r\n for( int i = 0; i < n-d; i++){\r\n subArrayFront[i] = a[i+d];\r\n } \r\n int[] newArray = new int[n];\r\n for(int i = 0; i < subArrayFront.length; i++){\r\n newArray[i] = subArrayFront[i];\r\n }\r\n for(int i = 0; i < subArrayBack.length; i++){\r\n newArray[n-d+i] = subArrayBack[i];\r\n }\r\n return newArray;\r\n }",
"static void rotate_right(int[] arr, int rotate){\n for (int j = 0; j < rotate; j++) {\n int temp = arr[j];\n for (int i = j; i < arr.length+rotate; i+=rotate) {\n if(i-rotate < 0)\n temp = arr[i];\n else if(i >= arr.length)\n arr[i-rotate] = temp;\n else\n arr[i-rotate] = arr[i]; \n }\n }\n }",
"private void rightRotate(int[] nums, int n) {\n\t\tint temp;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ttemp = nums[nums.length - 1];\n\t\t\tfor (int j = nums.length - 1; j > 0; j--) {\n\t\t\t\tnums[j] = nums[j - 1];\n\n\t\t\t}\n\n\t\t\tnums[0] = temp;\n\n\t\t}\n\t\tSystem.out.println(Arrays.toString(nums));\n\n\t}",
"public static int[] RotateByGivenNumber(int[] num, int k) \n\t{\n\t\tif(num == null || num.length == 0 || k < 0)\n\t\t\tthrow new IllegalArgumentException(\"Illegal argument!\");\n\t\t// This will take care of the value of k greater then the length of array\n\t\tif(k > num.length)\n\t\t\tk = k % num.length;\n\t\tint div = num.length - k; // get the remaining segment of the array.\n\t\t//Reverse(num,0,num.length-1); // rotate left side\n\t\tReverse(num,0,div-1); // rotate right side\n\t\tReverse(num,div,num.length-1); // keep in middle to rotate right and left\n\t\tReverse(num,0,num.length-1); // rotate right side\n\t\t//Reverse(num,0,div-1); // rotate left side\n\t\t//for(int e : Reverse(num,0,num.length-1))\n\t\t//\tSystem.out.println(e);\n\t\t\n\t\treturn num;\n\t}",
"public int[] rotate2(int[] arr, int k) {\n\t\tif (arr == null || k < 0)// handles exceptions\n\t\t\tthrow new IllegalArgumentException(\"Illegal argument!\");\n\n\t\t// Goes through entire array for each space shifted\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\t// Go through the array starting at the end\n\t\t\tfor (int j = arr.length - 1; j > 0; j--) {\n\n\t\t\t\t// Shifts the value at the current index back one space:\n\t\t\t\tint temp = arr[j];\n\t\t\t\tarr[j] = arr[j - 1];\n\t\t\t\tarr[j - 1] = temp;\n\t\t\t} // end for loop\n\t\t} // end for loop\n\n\t\treturn arr;\n\n\t}",
"public static void rotateArray(final int[] nums, final int k) {\n final var rot = k % nums.length;\n\n int temp, previous;\n for (int i = 0; i < rot; i++) {\n previous = nums[nums.length - 1];\n for (int j = 0; j < nums.length; j++) {\n temp = nums[j];\n nums[j] = previous;\n previous = temp;\n }\n }\n }",
"public void rotate(int[] nums, int k) {\n int[] tmp = new int[nums.length];\n for (int i = 0; i < nums.length; ++i) {\n tmp[(i + k) % nums.length] = nums[i];\n }\n\n for (int i = 0; i < nums.length; ++i) {\n nums[i] = tmp[i];\n }\n }",
"static <T> T[] rotateAnArray(T array[], int shift) {\n shift %= array.length;\n\n for (int i = 0; i < array.length / 2; i++) Utilities.swap(array, i, array.length - i - 1);\n\n for (int i = 0; i < shift / 2; i++) Utilities.swap(array, i, shift - i - 1);\n for (int i = shift; i < shift + (array.length - shift) / 2; i++) Utilities.swap(array, i, array.length - i + shift - 1);\n\n return array;\n }",
"public void rotate2(int[] nums, int k) {\n int start = 0, n = nums.length;\n k %= n;\n while (n > 0 && k > 0) {\n // Swap the last k elements with the first k elements.\n // The last k elements will be in the correct positions\n // but we need to rotate the remaining (n - k) elements\n // to the right by k steps.\n for (int i = 0; i < k; i++) {\n swap(nums, i + start, n - k + i + start);\n }\n n -= k;\n start += k;\n k %= n;\n }\n }",
"@Test\n\tpublic void rotateArray_rotateLeftOneItem() {\n\t\tint[] nums = prepareInputArray(5);\n\t\tint[] rotatedArray = ArrayLeftRotation.rotateArray(nums, 1);\n\t\tassertThat(rotatedArray[0], equalTo(2));\n\t\tassertThat(rotatedArray[1], equalTo(3));\n\t\tassertThat(rotatedArray[2], equalTo(4));\n\t\tassertThat(rotatedArray[3], equalTo(5));\n\t\tassertThat(rotatedArray[4], equalTo(1));\n\t}",
"static void rotateArrayOnce(int[] arr) {\n int temp = 0;\n for (int i = arr.length -1 ; i > 0; i++) {\n temp = arr[i];\n arr[i] = arr[i - 1];\n arr[i -1] = temp;\n }\n\n }",
"public static void main(String[] args) {\n Scanner kb=new Scanner(System.in);\n System.out.println(\"Enter the number of elements in array\");\n int n=kb.nextInt();\n int arr[]=new int[n];\n for(int i=0;i<n;i++)\n {\n System.out.println(\"Enter the number\");\n arr[i]=kb.nextInt();\n \n }\n \n System.out.println(\"Enter the amount of rotation\");\n int rotation= kb.nextInt();\n for(int i=rotation;i<n;i++)\n {\n System.out.println(arr[i]);\n }\n for(int i=0;i<rotation;i++)\n {\n System.out.println(arr[i]);\n }\n \n \n \n \n }",
"public int[] rotate3(int[] arr, int k) {\n\t\tk = k % arr.length;\n\n\t\tif (arr == null || k < 0)// handles exceptions\n\t\t\tthrow new IllegalArgumentException(\"Illegal argument!\");\n\n\t\tint a = arr.length - k;// length of the first part\n\t\treverse(arr, 0, a - 1);// rotate the first part\n\t\treverse(arr, a, arr.length - 1);// rotate the second part\n\t\treverse(arr, 0, arr.length - 1);// rotate the whole array\n\n\t\treturn arr;\n\n\t}",
"public void rotateNnumOfTimes(int[] data, int numOfTimes) {\n\t\tfor (int i = 1; i <= numOfTimes; i++) {\n\t\t\tleftRotateByOne(data);\n\t\t}\n\t}",
"public static int[] rotate(int[] nums, int k) {\n int[] temp = new int[k];\n int acc = k % nums.length;\n for (int i = 0; i < acc; i++) {\n temp[i] = nums[(nums.length - acc) + i];\n }\n for (int i = nums.length - acc - 1; i >= 0; i--) {\n nums[i + acc] = nums[i];\n }\n for (int i = 0; i < acc; i++) {\n nums[i] = temp[i];\n }\n return nums;\n }",
"public static void rotate(int[] nums, int k) {\n // get the kth index from the end to rotate\n\t\tint n = nums.length;\n\t\tk = k % n ;\n\t\tif(k == 0) return ;\n\t\tint prev = 0, tmp = 0;\n\t\tfor(int i = 0 ; i < k ; i++) {\n\t\t\tprev = nums[n - 1];\n\t\t\tfor(int j = 0 ; j < nums.length ; j++) {\n\t\t\t\ttmp = nums[j];\n\t\t\t\tnums[j] = prev;\n\t\t\t\tprev = tmp;\n\t\t\t}\n\t\t}\n }",
"public static int[] rotateLeft(int[] array, int n) {\n\t\tif(n >= array.length) {\n\t\t\tn = n % array.length; \n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n; ++i) {\n\t\t\t//hold the first element\n\t\t\tint placeholder = array[0];\n\t\t\tfor(int j = 0; j < array.length - 1; ++j) {\n\t\t\t\tarray[j] = array[j + 1];\n\t\t\t}\n\t\t\t//replace last element with first\n\t\t\tarray[array.length - 1] = placeholder;\n\t\t}\n\t\treturn array;\n\t}",
"public void rotate(int[] nums, int k) {\n \n k = k % nums.length;\n reverse(nums, 0, nums.length-1);\n reverse(nums, 0, k-1);\n reverse(nums, k, nums.length-1);\n }",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int T= sc.nextInt();\n for(int i=0;i<T; i++){\n System.out.println(\"Number of test cases are :\" + T);\n int size = sc.nextInt();\n System.out.println(size);\n System.out.println(\"Array size is \" + size);\n int[] arr = new int[size];\n for(int j=0;j<size;j++)\n {\n arr[j] = sc.nextInt();\n }\n System.out.println(\"Input array is :\");\n for(int k=0;k<size;k++)\n System.out.print(arr[k] + \" \");\n\n int rotation_size = sc.nextInt();\n System.out.println(rotation_size);\n System.out.println(rotateArray(arr,rotation_size,size-1));\n\n }\n\n }",
"private static void rearrange(int arr[], int n) {\n\n // Your code here\n int left = 0;\n int right = n - 1;\n boolean flag = true;\n int[] temp = arr.clone();\n for (int i = 0; i < n; i++) {\n if (flag) {\n arr[i] = temp[right--];\n } else {\n arr[i] = temp[left++];\n }\n flag = !flag;\n }\n }",
"public static List<Integer> rotateLeft(int d, List<Integer> arr) {\n // Write your code here\n List<Integer> resultList = arr.subList(d, arr.size());\n resultList.addAll(arr.subList(0, d));\n return resultList;\n }",
"private static void rotate(int[][] a) {\n\t\tint len = a.length;\n\t\tint k,l=0;\n\t\tint b[][] = new int[len][len];\n\t\tfor(int i=len-1;i>=0;i--)\n\t\t{\n\t\t\tk=0;\n\t\t\tfor(int j=0;j<len && k<3 && l<3;j++)\n\t\t\t{\n\t\t\t b[k][l]=a[i][j];\n\t\t\t k++;\n\t\t\t if(k>2)\n\t\t\t \t l++;\n\t }\n\t\t}\n\t\tfor(int c[]:b) {\n\t\t\tfor( int d : c) {\n\t\t\t\tSystem.out.print(d + \" \");\n\t\t\t}\n\t\tSystem.out.println();\n\t}\n\t\t\n\t}",
"public void rotate(int [] a, int k)\n\t{\n\t\tif (a == null || k == 0)\n\t\t\treturn;\n\n\t\tint [] b = new int[a.length];\n\t\tfor (int i = 0; i < a.length; i++)\n\t\t{\n\t\t\tint jump = (i + k) % a.length;\n\t\t\tb[jump] = a[i];\n\t\t}\n\t\tfor (int i = 0; i <a.length;i++)\n\t\t{\n\t\t\ta[i] = b[i];\n\t\t}\n\t}",
"@Test\n\tpublic void rotateArrayUsingCalculatePositionAlgorithm_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}",
"private static void rotateArray(int[] arr, int gcd, int k) {\n\t\t// gcd is the set length for which the rotation will happen\n\t\tint len = arr.length;\n\t\tfor (int i = 0; i < gcd; i++) {\n\t\t\tint temp = arr[i];\n\t\t\tint j = i;\n\t\t\tint l = -1;\n\t\t\twhile (true) {\n\t\t\t\tl = ((j + k) % len);\n\t\t\t\tif (l == i) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tarr[j] = arr[l];\n\t\t\t\tj = l;\n\t\t\t}\n\t\t\tarr[j] = temp;\n\t\t}\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tSystem.out.print(arr[i] + \" \");\n\t\t}\n\t}",
"private static void rotate(int[][] a, start, end){\n for (int current = 0; start+current < end; current++){\n int temp = a[start][start+current]; // save the top \n a[start][start+current] = a[end-current][start]; // left to top moveing left elemnt to top\n a[end-current][start] = a[end][end-current]; // bottom element to left \n a[end][end-current] = a[start+current][end]; // right element to bottom \n a[start+current][end] = temp; // top elemrnt to right\n }\n}",
"public void rotateold2(int[] a, int k) {\n\n\t\tif (a == null || a.length == 0)\n\t\t\treturn;\n\n\t\tint jump = 0, len = a.length, cur = a[0], next, count = 0;\n\n\t\tk %= len; \n\t\tif (k == 0) return;\n\n\t\tif (len % k != 0 || k == 1)\n\t\t{ \n\t\t\tint i = 0;\n\t\t\twhile (i < len)\n\t\t\t{\n\t\t\t\tjump = (jump + k) % len;\n\t\t\t\tnext = a[jump];\n\t\t\t\ta[jump] = cur;\n\t\t\t\tcur = next;\n\t\t\t\ti++;\n\t\t\t} \n\t\t} \n\t\telse\n\t\t{\n\t\t\tfor (int i = 0; i <= len/k; i ++)\n\t\t\t{\n\t\t\t\tint start = 0;\n\t\t\t\tjump = i;\n\t\t\t\tnext = a[jump];\n\t\t\t\tcur = a[i];\n\t\t\t\twhile (start <= len/k)\n\t\t\t\t{\n\t\t\t\t\tjump = (jump + k) % len;\n\t\t\t\t\tnext = a[jump];\n\t\t\t\t\ta[jump] = cur;\n\t\t\t\t\tcur = next;\n\t\t\t\t\tstart++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static void rotateMatrix(int[][] a]){\n if (a == null || a.length == 0 || a.length != a[0].length){\n return;\n }\n \n // we olny need half of the layers as other layers will be processed automatically\n for (int layer = 0; layer < a.length/2; layer++){\n // rotate (array, start, end), this will take us to the end\n rotate(a, layer, a.length-1-layer)\n }\n}",
"private int[] leftrotate(int[] arr, int times) {\n assert (arr.length == 4);\n if (times % 4 == 0) {\n return arr;\n }\n while (times > 0) {\n int temp = arr[0];\n System.arraycopy(arr, 1, arr, 0, arr.length - 1);\n arr[arr.length - 1] = temp;\n --times;\n }\n return arr;\n }",
"public void rotateReverse(int[] nums, int k){\n int n = nums.length;\n \n //in case k is greater than the length\n k = k % n;\n \n reverse(nums, 0, n-1);\n reverse(nums, 0, k-1);\n reverse(nums, k, n-1);\n }",
"public void rotateLeftWithReverse(int arr[], int n, int k) {\n reverse(arr, 0, k-1);\n\n //reverse last k elements\n reverse(arr, n-k-1, n-1);\n\n //reverse all array\n reverse(arr, 0, n-1);\n printArray(arr);\n\n /*\n * Time Complexity : O(n) loop ran for k times\n * Space Complexity : O(1)\n */\n }",
"public void rotate(int[] nums, int k) {\n\t\tif(nums == null || nums.length == 0 || k <= 0){\n\t\t\treturn;\n\t\t}\n\t\tint n = nums.length, count = 0;\n\t\tk %= n;\n\t\tfor(int start = 0; count < n; start++){\n\t\t\tint cur = start;\n\t\t\tint prev = nums[start];\n\t\t\tdo{\n\t\t\t\tint next = (cur + k) % n;\n\t\t\t\tint temp = nums[next];\n\t\t\t\tnums[next] = prev;\n\t\t\t\tcur = next;\n\t\t\t\tprev = temp;\n\t\t\t\tcount++;\n\t\t\t}while(start != cur);\n\t\t}\n\t}",
"public void rotateNoSpace(int[] nums, int k){\n //in case k is greater than the length\n k = k % nums.length;\n \n for(int i = 0; i < k; i++){\n int last = nums[nums.length-1];\n for(int j = nums.length - 1; j >= 1; j--){\n nums[j] = nums[j-1];\n }\n nums[0] = last;\n }\n }",
"private static void rightRotate(int[] nums, int k) {\r\n\t if (nums.length == 0) return;\r\n\t \r\n\t k %= nums.length;\r\n\t \r\n\t if (k == 0) return;\r\n\t \r\n\t int left=0, right=nums.length-1, tmp;\r\n\t \r\n\t while(left < right) {\r\n\t tmp = nums[left];\r\n\t nums[left] = nums[right];\r\n\t nums[right] = tmp;\r\n\t \r\n\t left++;\r\n\t right--;\r\n\t }\r\n\t \r\n\t left=0;\r\n\t right=k-1;\r\n\t \r\n\t while(left < right) {\r\n\t \ttmp = nums[left];\r\n\t \tnums[left] = nums[right];\r\n\t \tnums[right] = tmp;\r\n\t \t \r\n\t \tleft++;\r\n\t \tright--;\r\n\t }\r\n\t \r\n\t left=k;\r\n\t right=nums.length-1;\r\n\t \r\n\t while(left < right) {\r\n\t \ttmp = nums[left];\r\n\t \tnums[left] = nums[right];\r\n\t \tnums[right] = tmp;\r\n\t \t \r\n\t \tleft++;\r\n\t \tright--;\r\n\t }\r\n\t }",
"@Test\n\tpublic void rotateArrayUsingCalculatePositionAlgorithm_rotateLeftOneItem() {\n\t\tint[] nums = prepareInputArray(5);\n\t\tint[] rotatedArray = ArrayLeftRotation.rotateArray(nums, 1);\n\t\tassertThat(rotatedArray[0], equalTo(2));\n\t\tassertThat(rotatedArray[1], equalTo(3));\n\t\tassertThat(rotatedArray[2], equalTo(4));\n\t\tassertThat(rotatedArray[3], equalTo(5));\n\t\tassertThat(rotatedArray[4], equalTo(1));\n\t}",
"public void rotate1(int[] nums, int k) {\n k %= nums.length;\n reverse(nums, 0, nums.length - 1);\n reverse(nums, 0, k - 1);\n reverse(nums, k, nums.length - 1);\n }",
"static void rotate(int[][] matrix) {\n int n = matrix.length;\n for (int i = 0; i < (n + 1) / 2; i++) {\n for (int j = 0; j < n / 2; j++) {\n int temp = matrix[n - 1 - j][i];\n matrix[n - 1 - j][i] = matrix[n - 1 - i][n - j - 1];\n matrix[n - 1 - i][n - j - 1] = matrix[j][n - 1 - i];\n matrix[j][n - 1 - i] = matrix[i][j];\n matrix[i][j] = temp;\n }\n }\n }",
"public static void rotate1 (int [] nums, int k ) {\n\t\tint n = nums.length;\n\t\tk = k % n ;\n\t\tif(k == 0) return ;\n\t\tint prev = 0, currIndex = 0, temp = 0, count = 0;\n\t\tfor(int start = 0 ; count < nums.length ; start++) {\n\t\t\tprev = nums[start];\n\t\t\tcurrIndex = start;\n\t\t\t// keep rotating till reach the initial point\n\t\t\tdo {\n\t\t\t\tint nextIndex = (currIndex + k) % n;\n\t\t\t\ttemp = nums[nextIndex];\n\t\t\t\tnums[nextIndex] = prev;\n\t\t\t\tprev = temp;\n\t\t\t\tcurrIndex = nextIndex;\n\t\t\t\tcount++;\n\t\t\t\t\n\t\t\t} while(start != currIndex);\n\t\t}\n\t}",
"static int[] circularArrayRotation(int[] a, int[] m) {\n k = a.length - (k % a.length);\n int first = 0;\n int runner = 0;\n int aux = a[first];\n\n for (int i = 0; i < a.length; i++) {\n if (adjInd(runner + k, a.length) == first) {\n a[runner] = aux;\n first = adjInd(++first, a.length);\n runner = first;\n aux = a[first];\n }\n else {\n a[runner] = a[adjInd(runner + k, a.length)];\n runner = adjInd(runner + k, a.length);\n }\n }\n\n int[] result = new int[m.length];\n for (int i = 0; i < m.length; i++) {\n result[i] = a[m[i]];\n }\n\n return result;\n }",
"public static void rotate(int [][]matrix, int n){\n for(int layer = 0; layer < n / 2 ; ++layer){\n int first = layer;\n int last = n - 1 - layer;\n for(int i = first; i < last; ++i){\n int offset = i - first;\n //save top\n int top = matrix[first][i];\n //left to top\n matrix[first][i] = matrix[last-offset][first];\n //bottom to left\n matrix[last-offset][first] = matrix[last][last-offset];\n //right to bottom\n matrix[last][last-offset] = matrix[i][last];\n //top to right\n matrix[i][last] = top;\n }\n }\n }",
"public int[] cyclic_rot(int i, int[] D) {\n int L = D.length;\n\n int[] doubled_D = new int[2 * L];\n int[] return_D = new int[L];\n\n for (int j = 0; j < L; j++)\n doubled_D[j] = D[j];\n\n for (int j = 0; j < L; j++)\n doubled_D[j + L] = D[j];\n\n int shift = i % L;\n for (int j = 0; j < L; j++)\n return_D[j] = doubled_D[j + shift];\n\n return return_D;\n }",
"public static void main(String[] args) {\n // put your code here\n Scanner readIn = new Scanner(System.in);\n String[] arrayOfValues = readIn.nextLine().split(\" \");\n int rotate = readIn.nextInt();\n int length = arrayOfValues.length;\n int newIndex = 0; //the next index to place the values in\n int count = 0; //used to count the\n int runCount = 0; //loop the array length times to get all values swapped.\n\n //Store the start value which is the value at index 0\n String tempA = arrayOfValues[count];\n //run the loop length - 1 times\n while (runCount++ < length) {\n newIndex = (newIndex + rotate) % length; //Circular Buffer type\n String tempB = arrayOfValues[newIndex]; //Keep a copy of the old value\n arrayOfValues[newIndex] = tempA; //replace the new Index with the the previous value\n tempA = tempB; //The new temp value is now going to be replace for the next iteration.\n //count = newIndex; //Reset the count for the next iteration.\n }\n Arrays.asList(arrayOfValues).forEach(element -> System.out.print(element + \" \"));\n }",
"public void rotate(int n) {\n\t\t\twhile(n > 0) {\n\t\t\t\tthis.data = rotateGrid(data);\n\t\t\t\tn--;\n\t\t\t}\n\t\t\tcomputeHashes();\n\t\t}",
"public static List<Integer> rotLeft(List<Integer> a, int d) {\n for(int count = 0; count < d; count++) {\n shiftElements(a);\n }\n return a;\n }",
"private static int[] ArraySwapper(int[] arr) {\n\t\tint size=Array.getLength(arr),temp;\n\t\tfor(int i=0;i<size/2;i++) {\n\t\t\ttemp =arr[i];\n\t\t\tarr[i]=arr[size-i-1];\n\t\t\tarr[size-i-1]=temp;\n\t\t}\n\t\treturn arr;\n\t\t\n\t}",
"public void rotateReverse(int[] nums, int k) {\n\t\tint n = nums.length;\n\t\tk %= n;\n\t\treverse(nums, 0, n - 1);\n\t\treverse(nums, 0, k - 1);\n\t\treverse(nums, k, n - 1);\n\t}",
"public static List<Integer> rotLeft(List<Integer> a, int d) {\n\t\tint len = a.size();\n\t\t// 1,2,3,4,5\n\t\tList<Integer> result = new ArrayList<Integer>();\n\t\tresult.addAll(a);\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\t// i = 0 , 1, 2, 3, 4\n\t\t\t// j = 1 , 2, 3, 4, 0\n\t\t\tint j = (i + (len - d)) % len;\n\t\t\tresult.set(j, a.get(i));\n\t\t}\n\t\treturn result;\n\t}",
"public static void rotateAntiClockBetter(int[] arr, int k)\r\n {\r\n\t int[] arr2 = arr.clone();\r\n\t for(int i =0; i< arr.length; i++)\r\n\t {\r\n\t\t arr2[i] = arr[(i+k)%arr.length];\r\n\t }\r\n\t System.out.println(Arrays.toString(arr2));\r\n }",
"public static void main(String[] args) {\n\n\n int b[] = ArrayHelper.generateSequenceArray(10);\n ArrayHelper.printArray(b);\n rotate(b,6);\n ArrayHelper.printArray(b);\n\n\n\n }",
"public static void rotate(int[][] arr,int row,int col){\n for (int i = 0; i <(row+1)/2 ; i++) {\n for (int j = i; j <(col+1)/2 ; j++) {\n int temp=arr[i][j];\n arr[i][j]=arr[row-1-j][i];\n arr[row-1-j][i]=arr[row-1-i][col-1-j];\n arr[row-1-i][col-1-j]=arr[j][col-1-i];\n arr[j][col-1-i]=temp;\n }\n }\n for (int i = 0; i < row; i++) {\n for (int j = 0; j < col; j++) {\n System.out.print(arr[i][j]+\" \");\n }\n System.out.println();\n }\n }",
"public static void rotateAntiClockWise(int[] arr, int k)\r\n {\r\n\t for(int i=0; i< k; i++)\r\n\t {\r\n\t\t for(int j=0; j<arr.length-1; j++)\r\n\t\t {\r\n\t\t\t int temp = arr[j+1];\r\n\t\t\t arr[j+1] = arr[j];\r\n\t\t\t arr[j] = temp;\r\n\t\t\t\r\n\t\t }\r\n\t }\r\n }",
"public static int[] rotaDerechaArrayInt(int array[], int n) {\n int aux[] = array.clone();\n int a;\n for (int i = 0; i < n; i++) {\n a = aux[aux.length - 1];\n for (int j = aux.length - 2; j >= 0; j--) {\n aux[j + 1] = aux[j];\n }\n aux[0] = a;\n }\n return aux;\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"Rotate array by method 1:\");\n\t\tint[] arr = new int[] { 1, 2, 3, 4, 5, 6, 7 };\n\t\tdisplay(arr);\n\t\t// Rotate the array by two numbers\n\t\trotate1(arr, arr.length, 2);\n\t\tdisplay(arr);\n\t\tSystem.out.println(\"\\nRotate array by method 2:\");\n\t\tarr = new int[] { 1, 2, 3, 4, 5, 6, 7 };\n\t\tdisplay(arr);\n\t\t// Rotate the array by two numbers\n\t\trotate2(arr, arr.length, 2);\n\t\tdisplay(arr);\n\t}",
"public static int[] rotateLeft(int[] arr) {\n int[] newArr=new int[arr.length];\n for (int i =0;i< arr.length;i++){\n if (!(i==0)){\n newArr[i-1]=arr[i];\n }\n else{\n newArr[arr.length-1]=arr[i];\n }\n }\n return newArr;\n }",
"static void randomize(int arr[], Random r) {\n for (int i = arr.length - 1; i > 0; i--) {\n\n // Pick a random index from 0 to i\n int j = r.nextInt(i);\n\n // Swap arr[i] with the element at random index\n int temp = arr[i];\n arr[i] = arr[j];\n arr[j] = temp;\n }\n\n }",
"public static void main(String[] args) {\n int[] a = new int[] {1,2,3,4,5,6,7};\n rotate(a,3);\n }",
"public static void main(String[] args) {\n\t\tint[] rotatearray= {1,2,3,4,5,6,7};\r\n\t\tint order=3;\r\n\t\trotate(rotatearray,order);\r\n\r\n\t}",
"public void rotate(int[][] matrix) {\n if (matrix == null || matrix.length == 0) return;\n int n = matrix.length-1;\n for (int i = 0; i <= n / 2; i++) {\n for (int j = i; j < n; j++) {\n int temp = matrix[i][j];\n matrix[i][j] = matrix[n - j][i];\n matrix[n - j][i] = matrix[n - i][n - j];\n matrix[n - i][n - j] = matrix[j][n - i];\n matrix[j][n - i] = temp;\n }\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 void leftRotateByOne(int[] array) {\n int tmp = array[0];\n for (int i = 0; i < array.length - 1; i++) {\n array[i] = array[i + 1];\n }\n array[array.length - 1] = tmp;\n }",
"public void rotate() \n {\n \tint[] rotatedState = new int[state.length];\n \tfor (int i = 0; i < state.length; ++i)\n \t\trotatedState[(i+7)%14] = state[i];\n \tstate = rotatedState;\n }",
"public void Reverse(int arr[], int n){\r\n\t\tint newArray[] = new int[n];\r\n\t\tfor(int i=(n-1); i>=0; i--){\r\n\t\t\tnewArray[i] = arr[n-(i+1)];\r\n\t\t}\r\n\t\tSystem.out.print(\"\\nReversed array : [\");\r\n\t\tfor(int j=0; j<n; j++){\r\n\t\t\tSystem.out.print(newArray[j]+\",\");\r\n\t\t}\r\n\t\tSystem.out.print(\"\\b]\\n\\n\");\r\n\t}",
"public void rotate(int[][] matrix) {\n if(matrix.length <= 0) {\n return;\n }\n \n int N= matrix.length;\n \n for(int i = 0 ; i < N/2; i++) {\n for(int j = i ; j < N-i-1; j ++) {\n int temp = matrix[i][j];\n matrix[i][j] = matrix[N-1-j][i];\n matrix[N-1-j][i] = matrix[N-1-i][N-1-j];\n matrix[N-1-i][N-1-j] = matrix[j][N-1-i];\n matrix[j][N-1-i] = temp;\n }\n \n }\n }",
"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 void rotate(int[][] matrix) {\n int m = matrix.length;\n int n = matrix[0].length;\n if (m != n) {\n return;\n }\n int[][] result = new int[n][n];\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n result[i][j] = matrix[n - j - 1][i];\n }\n }\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n matrix[i][j] = result[i][j];\n }\n }\n }",
"public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\t\n\t\tint n=sc.nextInt();\n\t\tint d=sc.nextInt();\n\t\t\n\t\tint arr[]=new int[n];\n\t\t\n\t\tfor(int i=0;i<n;i++)\n\t\t\tarr[i]=sc.nextInt();\n\t\t\n\t\tint out[]=leftRot(arr,n,d);\n\t\t\n\t\tfor(int a:out)\n\t\t\tSystem.out.print(a+\" \");\n\t\t\n\t\tsc.close();\n\t}",
"public static int arrayRotateCheck(int[] arr){\r\n int check=0;\r\n for (int i=0 ; i<arr.length ; i++){\r\n if (arr[i]>arr[i+1]){\r\n check=i+1;\r\n break;}\r\n }\r\n return check;\r\n\r\n\t}",
"public int[] shift(int n) {\n\t\tif(n > 0){\r\n\t\t\tfor(int i = 0; i < n; i++){ \r\n\t int last = arr[arr.length-1]; \r\n\t for(int j = arr.length-1; j > 0; j--){ \r\n\t arr[j] = arr[j-1]; \r\n\t } \r\n\t arr[0] = last;\r\n\t }\r\n\t\t\treturn arr;\r\n\t\t}\r\n\t\t//shift left if negative\r\n\t\telse {\r\n\t\t\tint absVal = Math.abs(n);\r\n\t\t\t//This outer for loop helps repeat the number of shifts over and over again\r\n\t\t\tfor(int i = 0; i < absVal; i++){ \r\n\t\t\t\t//Storing the First element\r\n\t\t int first = arr[0];\r\n\t\t //This inner loop shifts only once\r\n\t\t for(int j = 0; j < arr.length-1; j++){ \r\n\t\t \tarr[j] = arr[j+1]; \r\n\t\t }\r\n\t\t arr[arr.length - 1] = first; \r\n\t\t }\r\n\t\t\t return arr;\r\n\t\t}\r\n\t}",
"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 }",
"@Override\n\tpublic void rotateRight(int numberOfTurns) {\n\t\tint[] array = numbers();\n\t\t//converts the array into a new Squarelotron\n\t\tSquarelotron copySquarelotron = makeSquarelotron(array);\n\t\tint[][] arrayCopy = copySquarelotron.squarelotron;\n\t\tfor(int i = 0; i <=size-1; i++){\n\t\t\tfor(int j = 0; j<=size-1; j++){\n\t\t\t\t//checks for each rotation to account for repeats and negatives and rotates accordingly\n\t\t\t\tif((numberOfTurns-1)%4==0){\n\t\t\t\t\tarrayCopy[i][j]=this.squarelotron[size-j-1][i];\n\t\t\t\t}\n\t\t\t\telse if((numberOfTurns-2)%4==0){\n\t\t\t\t\tarrayCopy[i][j]=this.squarelotron[size-i-1][size-j-1];\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if((numberOfTurns-3)%4==0){\n\t\t\t\t\tarrayCopy[i][j]=this.squarelotron[j][size-i-1];\t\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\tthis.squarelotron = arrayCopy;\n\t}",
"public static void main(String[] args) {\nint arr[]= {1,2,3,4,5};\r\nint i;\r\nint temp;\r\nfor(i=0; i<arr.length/2;i++)\r\n{\r\n\ttemp=arr[i];\r\n\tarr[i]=arr[arr.length-1-i];\r\n\tarr[arr.length-1-i]=temp;\r\n\t}\r\nfor(i=0; i<=arr.length-1;i++ )\r\n{\r\nSystem.out.print(arr[i]);\r\n\r\n\r\n}\r\n\t}",
"public static int[] rotaIzquierdaArrayInt(int array[], int n) {\n int aux[] = array.clone();\n int a;\n for (int i = 0; i < n; i++) {\n a = aux[0];\n for (int j = 0; j < aux.length - 1; j++) {\n aux[j] = aux[j + 1];\n }\n aux[aux.length - 1] = a;\n }\n return aux;\n\n }",
"public ListNode rotateRight(ListNode head, int n) {\n if(n == 0 || head == null) {\r\n return head;\r\n } \r\n ListNode curr = head;\r\n int length = 0;\r\n while(curr!=null) {\r\n length++;\r\n curr = curr.next;\r\n }\r\n n = n % length;\r\n //skip the zero\r\n if(n == 0) {\r\n return head;\r\n }\r\n //do the rotating\r\n ListNode newHead = new ListNode(-1);\r\n newHead.next = head;\r\n \r\n int step = length - n;\r\n curr = newHead;\r\n for(int i = 0; i < step; i++) {\r\n curr = curr.next;\r\n }\r\n \r\n //be aware need to break the loop\r\n ListNode tmp = curr.next;\r\n curr.next = null;\r\n curr = tmp;\r\n \r\n newHead.next = curr;\r\n while(curr.next != null) {\r\n curr = curr.next;\r\n }\r\n curr.next = head;\r\n \r\n return newHead.next;\r\n }",
"public int[] sortEvenPositionArray(int[] arr) {\n for (int i = 0; i < arr.length; i += 2) {\n for (int a = 0; a < arr.length - 1 - i; a += 2) {\n if (arr[a] > arr[a + 2]) {\n int temp = arr[a];\n arr[a] = arr[a + 2];\n arr[+2] = temp;\n }\n }\n }\n return arr;\n\n }",
"public static void reverse(int[] a){\n \n int n = a.length;\n \n for(int i = 0; i<n/2;i++){\n int c = a[i];\n int d = a[n-1-i];\n int temp=0;\n \n temp =c;\n c= d;\n d=temp;\n a[i]= c;\n a[n-1-i]=d;\n }\n \n \n \n }",
"private static int[] cycliRotation(int[] A, int K) {\n\t\tfor(int i = 0; i < K; i++)\n\t\t{\n\t\t\t//Variable\n\t\t\tint tempStorage = 0;\n\t\t\tint nextCounter = 1;\n\t\t\tint currentCounter = 0;\n\t\t\t\n\t\t\tfor(int j=0;j<A.length;j++)\n\t\t\t{\n\t\t\t\tif(nextCounter > A.length)\n\t\t\t\t{\n\t\t\t\t\ttempStorage = A[j];\n\t\t\t\t\t\n\t\t\t\t\tA[j] = A[currentCounter];\n\t\t\t\t\t\n\t\t\t\t\tA[currentCounter] = tempStorage;\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(j == A.length-1)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\ttempStorage = A[nextCounter]; // Move the next element to a temporary storage\n\t\t\t\t\t\n\t\t\t\t\tA[nextCounter] = A[currentCounter]; // Swap the position of the next element with the first\n\t\t\t\t\t\n\t\t\t\t\tA[currentCounter] = tempStorage;\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tnextCounter++;\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn A;\n\t}",
"public static void shiftArray(int[] arr, int num) \n\t{ /* to be implemented in part (a) */ \n\t\tArrayList<Integer> arr2 = new ArrayList<Integer>();\n\t\tfor (int value: arr) {\n\t\t\tarr2.add(value);\n\t\t}\n\t\tarr2.add(0, num);\n\t\tarr2.remove(arr2.size() - 1);\n\t\t\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tarr[i] = arr2.get(i);\n\t\t}\n\t}",
"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 }",
"void rotate();",
"public void rotateRight(int numberOfTurns);",
"public static char[][] rotate(char[][] array) {\n\n char[][] rotateArray = array;\n char[][] tempArray = new char[8][8];\n\n for (int i = 0; i < 8; i++ ){\n\n for (int j = 0; j < 8; j++){\n\n tempArray[i][j] = rotateArray[7-j][i];\n }\n }\n return tempArray;\n }",
"public void rotate (int row) {\n\t\tif ( row < n / 2)\n\t\t\trotate(row + 1);\n\t\telse\n\t\t\treturn;\n\t\t//rotate the outter most row and col\n\t\trotateRow(row);\n\t}",
"public List<Integer> rotate(List<Integer> a, int k, List<Integer> queries) {\n\n List<Integer> arrAfterRotation = new ArrayList<>(a);\n\n List<Integer> lastArrAfterRotation = new ArrayList<>(a);\n\n //Set the last one after rotation equal to provided array at initialization\n lastArrAfterRotation = a;\n\n for(int i=0; i<k; i++) {\n arrAfterRotation.set(0,lastArrAfterRotation.get(lastArrAfterRotation.size()-1));\n int counter=1;\n for (int elem=1; elem<lastArrAfterRotation.size();elem++ ) {\n arrAfterRotation.set(counter++, lastArrAfterRotation.get(elem-1));\n }\n List<Integer> tempList = new ArrayList<>(arrAfterRotation);\n lastArrAfterRotation= tempList;\n }\n printList(lastArrAfterRotation);\n\n List<Integer> returnList = new ArrayList<>(lastArrAfterRotation);\n\n for (int i : queries) {\n returnList.set(i,lastArrAfterRotation.get(i));\n }\n\n return returnList;\n\n }",
"public ListNode rotateRight(ListNode head, int n) {\n \n int len = 0;\n \n if (head == null) return head;\n \n ListNode node = head;\n ListNode prev = head;\n \n while (node != null) {\n prev = node;\n node = node.next;\n len++;\n }\n \n n = n % len;\n \n if (n == 0) return head;\n \n int current = 1;\n \n prev.next = head;\n \n node = head;\n \n while (current < len - n) {\n node = node.next;\n current++;\n }\n \n prev = node.next;\n node.next = null;\n \n return prev;\n }",
"static void primitiveRightShift(int[] a, int len, int n) {\n int n2 = 32 - n;\n for (int i=len-1, c=a[i]; i > 0; i--) {\n int b = c;\n c = a[i-1];\n a[i] = (c << n2) | (b >>> n);\n }\n a[0] >>>= n;\n }",
"public int[][] rotate(){\r\n\t\tpos = (pos == (limit - 1))? 1:pos + 1;\r\n\t\treturn coords(pos);\r\n\t}",
"public static void rotateMatrix(int[][] data) {\n\t\tint N = data.length;\n\t\tfor (int x = 0; x < N / 2; x++) {\n\t\t\tfor (int y = x; y < N - 1 - x; y++) {\n\t\t\t\tint tmp = data[x][y];\n\t\t\t\tdata[x][y] = data[y][N-1-x];\n\t\t\t\tdata[y][N-1-x] = data[N-1-x][N-1-y];\n\t\t\t\tdata[N-1-x][N-1-y] = data[N-1-y][x];\n\t\t\t\tdata[N-1-y][x] = tmp;\n\t\t\t}\n\t\t}\n\t}",
"public static void shift(){\n int[] x= {1, 5, 10, 7, -2};\n \n for (int i =0; i<x.length-1; i++){\n x[i]=x[i+1];\n }\n x[x.length-1]=0;\n for (int j=0; j<x.length; j++){\n System.out.println(x[j]);\n }\n\n\n\n }",
"public void shiftRows(int[][] arr) {\n for (int i = 1; i < arr.length; i++) {\n arr[i] = leftrotate(arr[i], i);\n }\n }",
"private <T> void shiftArrayElements(T[] orderedArray, int i) {\n\t\tfor (int j = orderedArray.length - 1; i < j; j--) {\r\n\t\t\torderedArray[j] = orderedArray[j - 1];\r\n\t\t}\r\n\t}"
] |
[
"0.7978551",
"0.75681293",
"0.7185133",
"0.6763945",
"0.6756597",
"0.66687703",
"0.6641818",
"0.66188264",
"0.6605048",
"0.6599324",
"0.6556982",
"0.6553357",
"0.6460762",
"0.6423503",
"0.64234227",
"0.63982815",
"0.6382085",
"0.6374323",
"0.6314432",
"0.63139546",
"0.6295601",
"0.62753797",
"0.6260225",
"0.6259349",
"0.6259173",
"0.62263596",
"0.61989295",
"0.6197625",
"0.61935145",
"0.6135586",
"0.6128902",
"0.6116016",
"0.61133254",
"0.61131257",
"0.6052088",
"0.60205334",
"0.5986569",
"0.5962426",
"0.5931022",
"0.5925916",
"0.5919641",
"0.59127444",
"0.5833078",
"0.58213377",
"0.5798294",
"0.5797813",
"0.5766977",
"0.575684",
"0.5756812",
"0.57177246",
"0.5717568",
"0.5709491",
"0.5705247",
"0.56866646",
"0.56786287",
"0.5671857",
"0.5655229",
"0.56411386",
"0.56248415",
"0.5605518",
"0.5577569",
"0.5575125",
"0.5560755",
"0.55607224",
"0.55435556",
"0.5543549",
"0.5502873",
"0.54794216",
"0.5453766",
"0.5449925",
"0.5449223",
"0.5439558",
"0.5432266",
"0.54173875",
"0.5409789",
"0.5395806",
"0.53835076",
"0.53771067",
"0.5374117",
"0.53625226",
"0.536184",
"0.53597957",
"0.53537977",
"0.5346999",
"0.5346333",
"0.5343548",
"0.5328541",
"0.5317542",
"0.53087956",
"0.527953",
"0.5269963",
"0.52692336",
"0.5267601",
"0.5255283",
"0.52550596",
"0.52370304",
"0.5223562",
"0.5221919",
"0.52211314",
"0.5220322"
] |
0.6369798
|
18
|
Inflate the menu; this adds items to the action bar if it is present.
|
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.home, menu);
return true;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}",
"public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}",
"public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}",
"@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }"
] |
[
"0.7248419",
"0.7203426",
"0.71970934",
"0.7178769",
"0.71092147",
"0.7040898",
"0.7039756",
"0.70138675",
"0.70115006",
"0.6982194",
"0.694743",
"0.69407934",
"0.6935566",
"0.6919299",
"0.6919299",
"0.68929094",
"0.68849903",
"0.68766844",
"0.6876271",
"0.68636256",
"0.68636256",
"0.68636256",
"0.68636256",
"0.6854109",
"0.68480504",
"0.6820776",
"0.6818706",
"0.6814043",
"0.6813815",
"0.6813815",
"0.68068254",
"0.68020743",
"0.67990345",
"0.67923975",
"0.6791024",
"0.67896056",
"0.678515",
"0.6760927",
"0.675885",
"0.67495245",
"0.6745266",
"0.6745266",
"0.6742506",
"0.6741604",
"0.6727088",
"0.6725067",
"0.6723812",
"0.6723812",
"0.6722497",
"0.67132807",
"0.67085123",
"0.6705967",
"0.6700925",
"0.6700648",
"0.6697868",
"0.66955",
"0.6687731",
"0.668506",
"0.668506",
"0.66843635",
"0.6681463",
"0.6680261",
"0.66784567",
"0.6669599",
"0.66681015",
"0.6664503",
"0.66586685",
"0.66586685",
"0.66586685",
"0.66579777",
"0.6656066",
"0.6656066",
"0.6656066",
"0.66539526",
"0.66533065",
"0.66516966",
"0.66501826",
"0.66485864",
"0.6647828",
"0.6647722",
"0.66475946",
"0.6646866",
"0.66465396",
"0.6644725",
"0.6643858",
"0.66436946",
"0.66398877",
"0.66358364",
"0.6635283",
"0.6633633",
"0.6633633",
"0.6633633",
"0.6633544",
"0.6630286",
"0.66293216",
"0.6628571",
"0.662773",
"0.66257316",
"0.6621922",
"0.66203994",
"0.66203994"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
public static void main(String[] args) {
int a = 2;
if (a%2 == 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
|
Created by mahesaiqbal on 11/23/2017.
|
public interface ApiServices {
@GET("/api/jadwal-bioskop")
Observable<ListKota> getListKota();
@GET("/api/jadwal-bioskop")
Observable<JadwalBioskop> getjadwalBioskop(@Query("id") int id);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"public final void mo51373a() {\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"public void mo38117a() {\n }",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"private void poetries() {\n\n\t}",
"public void mo4359a() {\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@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}",
"@Override\n\tprotected void interr() {\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 rozmnozovat() {\n\t}",
"private void init() {\n\n\t}",
"@Override\n protected void getExras() {\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\n\tpublic void sacrifier() {\n\t\t\n\t}",
"public void mo6081a() {\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n public void init() {\n }",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n void init() {\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"private void m50366E() {\n }",
"@Override\n public void memoria() {\n \n }",
"@Override\r\n\tpublic void anularFact() {\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}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"private void kk12() {\n\n\t}",
"@Override\n protected void init() {\n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n public void init() {}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public Pitonyak_09_02() {\r\n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"public void mo12930a() {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"public void mo55254a() {\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"public void mo12628c() {\n }",
"Constructor() {\r\n\t\t \r\n\t }",
"protected void mo6255a() {\n }",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"Petunia() {\r\n\t\t}",
"private void init() {\n\n\n\n }",
"protected boolean func_70814_o() { return true; }",
"@Override\n public void initialize() {\n \n }",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}"
] |
[
"0.6099085",
"0.592625",
"0.59012705",
"0.578741",
"0.5785783",
"0.5785783",
"0.5779265",
"0.57618046",
"0.57123697",
"0.571196",
"0.5682567",
"0.56746864",
"0.5671885",
"0.5661663",
"0.564636",
"0.5641392",
"0.5626935",
"0.56092846",
"0.5570425",
"0.556535",
"0.55643183",
"0.5551407",
"0.55498326",
"0.55451035",
"0.5526941",
"0.5526941",
"0.5526941",
"0.5526941",
"0.5526941",
"0.55133593",
"0.5512838",
"0.5512838",
"0.55128175",
"0.55075103",
"0.55056655",
"0.54881364",
"0.54881364",
"0.54881364",
"0.54881364",
"0.54881364",
"0.54881364",
"0.54881364",
"0.5485663",
"0.5482808",
"0.54802865",
"0.54761946",
"0.54761946",
"0.54761946",
"0.54761946",
"0.54761946",
"0.54761946",
"0.5475013",
"0.5470289",
"0.54695886",
"0.54693943",
"0.54669297",
"0.54573536",
"0.54570585",
"0.54514855",
"0.54514855",
"0.5437492",
"0.5437492",
"0.5437492",
"0.5435351",
"0.54302233",
"0.54302233",
"0.54302233",
"0.5422225",
"0.54137206",
"0.5409797",
"0.54044867",
"0.54044867",
"0.54031587",
"0.5398891",
"0.53967696",
"0.53900033",
"0.53900033",
"0.53900033",
"0.5382539",
"0.538241",
"0.53786796",
"0.5377594",
"0.5358605",
"0.53536314",
"0.5347189",
"0.53390694",
"0.53384537",
"0.5331628",
"0.53189796",
"0.5313868",
"0.5312915",
"0.5311251",
"0.53095",
"0.5289721",
"0.5283005",
"0.5280887",
"0.5280249",
"0.52763903",
"0.52763534",
"0.5274628",
"0.5274128"
] |
0.0
|
-1
|
isi RESUT_CODE tergantung tipe lokasi yg dipilih. titik jmput atau tujuan
|
private void showPlaceAutoComplete(int typeLocation) {
REQUEST_CODE = typeLocation;
// Filter hanya tmpat yg ada di Indonesia
AutocompleteFilter typeFilter = new AutocompleteFilter.Builder().setCountry("ID").build();
try {
// Intent untuk mengirim Implisit Intent
Intent mIntent = new PlaceAutocomplete.IntentBuilder(PlaceAutocomplete.MODE_OVERLAY)
.setFilter(typeFilter)
.build(getActivity());
// jalankan intent impilist
startActivityForResult(mIntent, REQUEST_CODE);
} catch (GooglePlayServicesRepairableException e) {
e.printStackTrace(); // cetak error
} catch (GooglePlayServicesNotAvailableException e) {
e.printStackTrace(); // cetak error
// Display Toast
Toast.makeText(getContext(), "Layanan Play Services Tidak Tersedia", Toast.LENGTH_SHORT).show();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"Integer getSesscode();",
"java.lang.String getCode();",
"java.lang.String getCode();",
"public String getCode() {\t\t\t\t\t\t\t\t\treturn code;\t\t\t\t\t\t\t}",
"int getCodeValue();",
"public String getCode() {\n return super.getString(Constants.Properties.CODE);\n }",
"String getCode();",
"String getCode();",
"String getCode();",
"String getCode();",
"String getCode();",
"static String getDesc(String code) {\n\t\tString[] str = errorMap.get(code);\n\t\tif (str == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn str[1];\n\t}",
"public String getCode()\r\n\t{\r\n\t\treturn code;\r\n\t}",
"public void setRecapitoCode(String recapitoCode) {\n\t\tthis.recapitoCode = recapitoCode;\n\t}",
"Integer getCode();",
"public String onChangeResidenceCode()\r\n {\r\n\ttry\r\n\t{\r\n\r\n\t SessionCO sessionCO = returnSessionObject();\r\n\t residenceTypesSC.setCompCode(sessionCO.getCompanyCode());\r\n\t residenceTypesSC.setPreferredLanguage(sessionCO.getPreferredLanguage());\r\n\t residenceTypesVO = residenceTypesBO.returnDependencyByCode(residenceTypesSC);\r\n\t if(residenceTypesVO == null)\r\n\t {\r\n\t\tthrow new BOException(MessageCodes.INVALID_MISSING_CODE);\r\n\t }\r\n\r\n\t}\r\n\tcatch(Exception e)\r\n\t{\r\n\t residenceTypesVO = new RESIDENCE_TYPESVO();\r\n\t handleException(e, null, null);\r\n\t}\r\n\treturn SUCCESS;\r\n }",
"public void setResultCode(java.lang.String param) {\r\n localResultCodeTracker = param != null;\r\n\r\n this.localResultCode = param;\r\n }",
"public String getCode(){\n\t\treturn code;\n\t}",
"public String getLBR_ProtestCode();",
"public void setComuneResidenzaCod(int value) {\r\n this.comuneResidenzaCod = value;\r\n }",
"public long getCode () {\r\n\t\treturn code;\r\n\t}",
"public String getLBR_InterestCode();",
"Code getCode();",
"public short getCode() {\n/* 92 */ return this.code;\n/* */ }",
"public String getCode () {\r\n\t\treturn code;\r\n\t}",
"public String getLcode()\n/* */ {\n/* 47 */ return this.lcode;\n/* */ }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"int getCode();",
"int getCode();",
"int getCode();",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public int code() {\n return code;\n }",
"public String code() {\n return this.code;\n }",
"public String code() {\n return this.code;\n }",
"public int getCode() {\r\n return code;\r\n }",
"public int getCode() {\r\n return code;\r\n }",
"public String getCode();",
"public String getCode();",
"String getMapCode();",
"public void setCode(Long code) {\n this.code = code;\n }",
"public void setCode(Long code) {\n this.code = code;\n }",
"public Long getCode() {\n return code;\n }",
"public Long getCode() {\n return code;\n }",
"public void setCode(String code){\n\t\tthis.code = code;\n\t}",
"public String getCode()\n {\n return code;\n }",
"public int getCode()\n {\n return code;\n }",
"@Override\r\n\tpublic String getCode() {\n\t\treturn code;\r\n\t}",
"public int getCode();",
"public String getCode() {\r\n\t\treturn code;\r\n\t}",
"public String getCode() {\r\n\t\treturn code;\r\n\t}",
"public long getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public int getCode () {\n return code;\n }",
"public int getCode() {\n return code;\n }",
"public int getCode() {\n return code;\n }",
"public int getCode() {\n return code;\n }",
"public int getCode() {\n return code;\n }",
"public int getCode() {\n return code;\n }",
"public int getCode() {\r\n\t\t\treturn code;\r\n\t\t}",
"public static String kenan (String codeValidate ) {\n\t\tString obj = null;\n\t\t\n\t\ttry {\n\t\t\tJdbcTemplate jdbcTemplate = JdbcFeatcDao.getJdbcTemplate(); // inicia o invoca la conexion a la db\n\t\t\t\n\t\t\t// Senstivio\n\t\t\tjdbcTemplate.setResultsMapCaseInsensitive(true); // indica que sera sensitivo a mayusculas y minusculas\n\t\t\tSimpleJdbcCall ProcListMarca; // crea la variable donde se relizará el llamado\n\t\t\t\n\t\t\t/*\n\t\t\t// seteas el datasource(conexion). con el esuqema del sp (usuario de la bd).el nombre del procedure. la variable de salida soo en caso de que sea un cursor\n\t\t\tProcListMarca = new SimpleJdbcCall(jdbcTemplate.getDataSource()). withSchemaName(\"pnnprod\").\n\t\t\t\t\twithProcedureName(\"sp_iccid_type\")\t\t\t\t\t\n\t\t\t\t\t.returningResultSet(\"cv_results\", BeanPropertyRowMapper.newInstance(ImsiDetail.class));\t\t \n\t\t\t;\n\t\t\t*/\n\t\t\t\n\t\t\tProcListMarca = new SimpleJdbcCall(jdbcTemplate.getDataSource()).withCatalogName(\"pkg_featc_valid_sim\").\n\t\t\t\t\twithProcedureName(\"featc_validate_type_sim\");\t\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(codeValidate);\n\t\t\t\n\t\t\t//crea parametro de entrada del sp\n\t\t\tSqlParameterSource in = new MapSqlParameterSource()\n\t\t\t\t\t.addValue(\"p_sim\", codeValidate);\n\t\t\t\n\t\t\t\n\t\t\t//resultMap.get(\"p_type\");\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// ejecuta el sp con las variales de entrada\n\t\t\tMap<String, Object> resultMap = ProcListMarca.execute(in);\t\n\t\t\t// imprime respiuesta en log\n\t\t\t\n\t\t\tSystem.out.println(resultMap); \n\t\t\tobj=(String) resultMap.get(\"p_type\");\n\t\t\t\n\t\t\t\n\t\t\t// obteniendo las lista de respuesta del sp\n//\t\t\tObjectList = (List<ImsiDetail>) resultMap.get(\"cv_results\");\n\t\t\t//obj.setImsiDetails(ObjectList);\n\t\t\t\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n//\t\t\tObjectList = null;\n\t\t\tobj = null;\n\t\t\te.printStackTrace();\n\t\t\n\t\t}\n\t\t\n\t\treturn obj;\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}",
"public String getCode() {\n\t\treturn code;\n\t}",
"public String getCode() {\n\t\treturn code;\n\t}",
"public String getCode() {\n\t\treturn code;\n\t}",
"public String getCode() {\n\t\treturn code;\n\t}",
"public String getCode() {\n\t\treturn code;\n\t}",
"public String getCode() {\n\t\treturn code;\n\t}",
"public String code() {\r\n return code == null ? String.format(\"%s%04d\", type, num) : code;\r\n }",
"public String getRecapitoCode() {\n\t\treturn this.recapitoCode;\n\t}",
"public String getCode() {\n return _code;\n }",
"@Override\n\t\t\t\t\t\tpublic void gotResult(int code, String arg1, Set<String> arg2) {\n\t\t\t\t\t\t\tSystem.out.println(\"code\"+code);\n\t\t\t\t\t\t\tLog.i(\"注册极光结果放回\", String.valueOf(code));\n\t//\t\t\t\t\t\tToast.makeText(RegisterAcountActivity.this, code, 0).show();\n\t\t\t\t\t\t}",
"public int getCode() {\n\t\treturn code;\n\t}",
"public void setCode (String code) {\r\n\t\tthis.code = code;\r\n\t}",
"public void setCode (java.lang.Long code) {\r\n\t\tthis.code = code;\r\n\t}"
] |
[
"0.60903865",
"0.6001085",
"0.6001085",
"0.59940726",
"0.5957329",
"0.59364825",
"0.5928584",
"0.5928584",
"0.5928584",
"0.5928584",
"0.5928584",
"0.59040546",
"0.5903972",
"0.58932143",
"0.5888268",
"0.58792317",
"0.5869633",
"0.5868127",
"0.58680093",
"0.5834798",
"0.5830604",
"0.5816465",
"0.58077985",
"0.5804649",
"0.57931733",
"0.57916903",
"0.5766163",
"0.5766163",
"0.5766163",
"0.5766163",
"0.5766163",
"0.5766163",
"0.5766163",
"0.5763273",
"0.5763273",
"0.5763273",
"0.5763146",
"0.5763146",
"0.5763146",
"0.5763146",
"0.57526815",
"0.5750965",
"0.5750965",
"0.57377297",
"0.57377297",
"0.57341546",
"0.57341546",
"0.5729411",
"0.57291526",
"0.57291526",
"0.5724077",
"0.5724077",
"0.5723173",
"0.5718496",
"0.5712024",
"0.57076037",
"0.5700283",
"0.56989855",
"0.56989855",
"0.5686023",
"0.5683869",
"0.5683869",
"0.5683869",
"0.5683869",
"0.5683869",
"0.5683869",
"0.5683869",
"0.5683869",
"0.5683869",
"0.5683869",
"0.5683869",
"0.5683869",
"0.5683869",
"0.5683869",
"0.5683869",
"0.5683869",
"0.5683869",
"0.5683869",
"0.5683869",
"0.5683869",
"0.56803966",
"0.56560796",
"0.56560796",
"0.56560796",
"0.56560796",
"0.56560796",
"0.5652975",
"0.5650252",
"0.5638889",
"0.5638889",
"0.5638889",
"0.5638889",
"0.5638889",
"0.5638889",
"0.5636745",
"0.56366473",
"0.562192",
"0.56122327",
"0.560622",
"0.5595638",
"0.55850375"
] |
0.0
|
-1
|
Inflate the custom layout
|
@Override
public TweetsAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View tweetView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_tweet, parent, false);
// Return a new holder instance
ViewHolder viewHolder = new ViewHolder(tweetView);
return viewHolder;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n protected void onFinishInflate() {\n super.onFinishInflate();\n mTitleContent = (TextView) findViewById(R.id.title_content);\n mLeftTv = (TextView) findViewById(R.id.title_left_tv);\n mRightTv = (TextView) findViewById(R.id.title_right_tv);\n mRightImg = (ImageView) findViewById(R.id.title_right_img);\n mMessageView = (RelativeLayout) findViewById(R.id.toolbar_message_view);\n mUnReadImg = (ImageView) findViewById(R.id.toolbar_message_unread_img);\n }",
"public void onFinishInflate() {\n super.onFinishInflate();\n this.mIconView = (ImageView) findViewById(R.id.icon);\n this.mTitleView = (TextView) findViewById(R.id.title);\n this.mSummaryView = (TextView) findViewById(R.id.summary);\n this.mSlidingButton = findViewById(R.id.sliding_button);\n }",
"@Override\n protected void onFinishInflate() {\n super.onFinishInflate();\n\n //'this' refers to the LinearLayout, cause we are currently in LinearLayout\n\n //access the day UI element\n mTextDate = (TextView) this.findViewById(R.id.tv_day);\n\n //access the month UI element\n mTextMonth = (TextView) this.findViewById(R.id.tv_month);\n\n //access the year UI element\n mTextYear = (TextView) this.findViewById(R.id.tv_year);\n\n //setOnTouchListener on the UI elements\n\n mTextDate.setOnTouchListener(this);\n mTextMonth.setOnTouchListener(this);\n mTextYear.setOnTouchListener(this);\n\n //get the current date from the Calendar\n int date = mCalendar.get(Calendar.DATE);\n\n //get current month\n int month = mCalendar.get(Calendar.MONTH);\n\n //get current year\n int year = mCalendar.get(Calendar.YEAR);\n\n //pass the date, month and year to update method which will update the UI\n update(date, month, year, 0, 0, 0);\n\n\n }",
"@Override\n\tprotected int initView() {\n\t\treturn R.layout.activity_zhusu_detail;\n\t}",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t\tCustomLayout layout = new CustomLayout(this);\r\n\t\tsetContentView(layout);\r\n\t}",
"@Override\n public void setContentView(int layoutResID){\n }",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tinflater = LayoutInflater.from(getApplicationContext());\n\t}",
"@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}",
"public void onFinishInflate() {\n super.onFinishInflate();\n this.logo = findViewById(C1167R.C1170id.channel_logo);\n this.logoTitle = findViewById(C1167R.C1170id.logo_title);\n this.actionsHint = findViewById(C1167R.C1170id.actions_hint);\n this.sponsoredChannelBackground = findViewById(C1167R.C1170id.sponsored_channel_background);\n this.channelViewMainLinearLayout = findViewById(C1167R.C1170id.main_linear_layout);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmRoot = inflater.inflate(R.layout.mouse_layout, container, false); \n\t\tinitializeUI();\n\t\treturn mRoot; \n }",
"public final void onFinishInflate() {\n super.onFinishInflate();\n TextView textView = (TextView) findViewById(C0126R.C0129id.title);\n this.f110062a = textView;\n C1280ps.m19893a(textView, \"excludeViewFromChangeBounds\");\n this.f110062a.setTag(C0126R.C0129id.summary_expander_transition_name, \"summaryField\");\n TextView textView2 = (TextView) findViewById(C0126R.C0129id.subtitle);\n this.f110063b = textView2;\n textView2.setTag(C0126R.C0129id.summary_expander_transition_name, \"summaryField\");\n LinearLayout linearLayout = (LinearLayout) findViewById(C0126R.C0129id.collapsed_image_container);\n this.f110064c = linearLayout;\n linearLayout.setTag(C0126R.C0129id.summary_expander_transition_name, \"summaryField\");\n LinearLayout linearLayout2 = (LinearLayout) findViewById(C0126R.C0129id.expanded_image_container);\n this.f110065d = linearLayout2;\n linearLayout2.setTag(C0126R.C0129id.summary_expander_transition_name, \"summaryField\");\n this.f110066e = (ImageView) findViewById(C0126R.C0129id.expand_collapse_icon);\n ImageWithCaptionView imageWithCaptionView = (ImageWithCaptionView) findViewById(C0126R.C0129id.tooltip_view);\n this.f110068g = imageWithCaptionView;\n imageWithCaptionView.setDefaultImageResId(bkfr.m105543a(getContext(), (int) ErrorInfo.TYPE_SDU_MEMORY_FULL, -1));\n this.f110068g.setOnClickListener(this);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.day_layout, container,false);\n setPieMap(v);\n loadDatas();\n simulator();\n return v;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tv = inflater.inflate(R.layout.wisata, container, false);\r\n \r\n\t\t\r\n\t\t\r\n\t\treturn v;\r\n\t}",
"@Override\n protected void onFinishInflate() {\n super.onFinishInflate();\n tv_slider_icon = (TextView) findViewById(R.id.slider_icon);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }",
"private void inflateView() {\n\t\tLog.v(T, \"inflateView\");\n\t\tif (!isInEditMode()) {\n\t\t\tString inflaterService = Context.LAYOUT_INFLATER_SERVICE;\n\n\t\t\tLayoutInflater layoutInflater = (LayoutInflater) getContext()\n\t\t\t\t\t.getSystemService(inflaterService);\n\t\t\tlayoutInflater.inflate(R.layout.dms_coordinate, this, true);\n\n\t\t\t// Get child control references\n\t\t\teditDegrees = (EditText) findViewById(R.id.editDegrees);\n\t\t\teditMinutes = (EditText) findViewById(R.id.editMinutes);\n\t\t\teditSeconds = (EditText) findViewById(R.id.editSeconds);\n\t\t}\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n ctx = getActivity();\n View view = inflater.inflate(getLayoutID(),null);\n mPreenter = createPresenter();\n loading = new MyProgressLoading(ctx, R.style.DialogStyle);\n sp = ctx.getSharedPreferences(SpUtiles.SP_Mode,Context.MODE_PRIVATE);\n HideUtil.init(getActivity());\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n initListener();\n return view;\n }",
"@Override\n public void setContentView(int layoutResID) {\n if (view_stub != null) {\n LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);\n ViewGroup.LayoutParams lp = new ViewGroup.LayoutParams(\n ViewGroup.LayoutParams.MATCH_PARENT,\n ViewGroup.LayoutParams.MATCH_PARENT);\n View stubView = inflater.inflate(layoutResID, view_stub, false);\n view_stub.addView(stubView, lp);\n }\n }",
"@Override\n public void setContentView(int layoutResID) {\n if (view_stub != null) {\n LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);\n ViewGroup.LayoutParams lp = new ViewGroup.LayoutParams(\n ViewGroup.LayoutParams.MATCH_PARENT,\n ViewGroup.LayoutParams.MATCH_PARENT);\n View stubView = inflater.inflate(layoutResID, view_stub, false);\n view_stub.addView(stubView, lp);\n }\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\n\n view = inflater.inflate(LAYOUT, container, false);\n return view;\n }",
"@Override\n public void baseSetContentView() {\n View layout = View.inflate(this, R.layout.crm_vistor_signaddinfo, mContentLayout);\n mContext = this;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.layout_number_full,container,false);\n itemView(view);\n return view;\n }",
"@Override\r\n protected void onFinishInflate() {\r\n initComponents();\r\n }",
"@Override\n\tpublic void init(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tsuper.init(inflater, container, savedInstanceState);\n\n\t\tmDxCountTextView = (TextView) findViewById(R.id.dx_count);\n\t\tmDxTotalTextView = (TextView) findViewById(R.id.dx_total);\n\t\tmZyCountTextView = (TextView) findViewById(R.id.zy_count);\n\t\tmZyTotalTextView = (TextView) findViewById(R.id.zy_total);\n\t\tmTimeTextView = (TextView) findViewById(R.id.time);\n\t\t\n\t\tmDxTipText = (TextView) findViewById(R.id.dx_count_tip);\n\t\tmZyTipText = (TextView) findViewById(R.id.zy_count_tip);\n\t\tmDxBottonText = (TextView) findViewById(R.id.dx_total_tip);\n\t\tmXyBottonText = (TextView) findViewById(R.id.zy_total_tip);\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.information_view, container, false);\n mFillContentCallback.invoke(view);\n\n return view;\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.xxh_gamelayout3, container, false);\n\t}",
"public void onFinishInflate() {\n super.onFinishInflate();\n this.titleIconContainer = findViewById(C1167R.C1170id.watch_next_info_icon_title_container);\n this.message = findViewById(C1167R.C1170id.watch_next_info_message);\n Resources res = getContext().getResources();\n this.selectedMessageWidth = res.getDimensionPixelSize(C1167R.dimen.watch_next_info_card_selected_message_width);\n this.selectedCardHeight = res.getDimensionPixelSize(C1167R.dimen.program_default_height);\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tif (mObjView == null) {\n\t\t\tmObjView = inflater.inflate(R.layout.jeep_airset, container, false);\n\t\t\tinit();\n\t\t}\n\n\t\treturn mObjView;\n\t}",
"public void onFinishInflate() {\n super.onFinishInflate();\n this.mTextAndBackground = (ViewGroup) findViewById(C0622R.C0625id.text_and_background);\n ColorDrawable colorDrawable = (ColorDrawable) this.mTextAndBackground.getBackground();\n this.mBackgroundColor = colorDrawable.getColor();\n this.mTextAndBackground.setBackground(new RippleDrawable(ColorStateList.valueOf(Themes.getAttrColor(getContext(), 16843820)), colorDrawable, null));\n this.mTitleView = (TextView) this.mTextAndBackground.findViewById(C0622R.C0625id.title);\n this.mTextView = (TextView) this.mTextAndBackground.findViewById(C0622R.C0625id.text);\n }",
"@Override\n protected void loadViewLayout() {\n setContentView(R.layout.ui_imgs_graffit);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View layout = inflater.inflate(R.layout.custom_row, container, false);\n recyclerView = (RecyclerView) layout.findViewById(R.id.rv);\n adapter = new WebCrawlerRecyclerViewAdapter(getActivity(), getData());\n recyclerView.setAdapter(adapter);\n LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());\n layoutManager.setOrientation(LinearLayoutManager.VERTICAL);\n recyclerView.setLayoutManager(layoutManager);\n return layout;\n\n }",
"public void onFinishInflate() {\n super.onFinishInflate();\n this.mTvMain = (TextView) findViewById(R.id.tv_main);\n this.mTvSub = (TextView) findViewById(R.id.tv_second);\n this.mIvIcon = (ImageView) findViewById(R.id.iv_icon);\n this.mIvIcon.setVisibility(8);\n this.mTvSub.setMovementMethod(ScrollingMovementMethod.getInstance());\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.main_fhmx, container, false);\r\n\t}",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.read_layout,container,false);\n mContext = view.getContext();\n if(readPresenter ==null)\n readPresenter = new ReadPresenter(getContext(),this);\n initUI(view);\n return view;\n\n }",
"private void initView() {\n\n LayoutInflater inflater = getLayoutInflater();\n final int screenWidth = MyUtils.getScreenMetrics(this).widthPixels;\n final int screenHeight = MyUtils.getScreenMetrics(this).heightPixels;\n for (int i = 0; i < 3; i++) {\n ViewGroup layout = (ViewGroup) inflater.inflate(\n R.layout.content_layout, myHorizontal, false);\n layout.getLayoutParams().width = screenWidth;\n TextView textView = (TextView) layout.findViewById(R.id.title);\n textView.setText(\"page \" + (i + 1));\n layout.setBackgroundColor(Color.rgb(255 / (i + 1), 255 / (i + 1), 0));\n createList(layout);\n myHorizontal.addView(layout);\n }\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.activity_click_product_layout, container, false);\n\n ivList=view.findViewById(R.id.iv_list);\n txtProductDescription=view.findViewById(R.id.txt_productDescription);\n txtShowOfeerPrice=view.findViewById(R.id.txt_showOfferPrice);\n txtShowPrice=view.findViewById(R.id.txt_showPrice);\n txtTitleName=view.findViewById(R.id.tv_list_name);\n edtEnterPinCode=view.findViewById(R.id.edt_enterPinCode);\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.list_base, container, false);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) \n {\n super.onCreate(savedInstanceState);\n\n setContentView(R.layout.main); \n createLayout();\n }",
"@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\r\n\t\tView view = (View) inflater.inflate(R.layout.customprogress, null);\r\n//\t\tButton buttonPositive = (Button) view.findViewById(R.id.dialog_button_positive);\r\n//\t\tButton buttonNegative = (Button) view.findViewById(R.id.dialog_button_negative);\r\n\t\tmProgressBar = (ProgressBar) view.findViewById(R.id.progress_bar);\r\n\t\tmProgressTextView = (TextView) view.findViewById(R.id.progress_txt);\r\n\t\tmProgressBarfile = (ProgressBar) view.findViewById(R.id.progress_bar2);\r\n\t\tmProgressTextViewFile = (TextView) view.findViewById(R.id.progress_txt2);\r\n\r\n//\t\tbuttonNegative.setOnClickListener(this);\r\n//\t\tbuttonPositive.setEnabled(false);\r\n//\t\tbuttonPositive.setOnClickListener(this);\r\n\t\tgetDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE);\r\n\t\treturn view;\r\n\t}",
"@Override\n\t\tpublic void layout(int l, int t, int r, int b) {\n\t\t\tsuper.layout(l, t, r, b);\n\t\t\tLog.e(\"FYF\", getId() + \" ImageView layout\");\n\t\t}",
"@Override\r\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\r\n setContentView(layoutId);\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.results_screen, container, false);\n settingsView = (RelativeLayout) view.findViewById(R.id.setting_layout);\n setBasicContents(view);\n return view;\n }",
"public final void onFinishInflate() {\n super.onFinishInflate();\n m118789x();\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }",
"@Override \n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.article_reader_layout, container, false);\n textView = (TextView)view.findViewById(R.id.text) ;\n return view;\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.activity_adddatacat, container, false);\n\n }",
"protected void onLoadLayout(View view) {\n }",
"@Override\n public View onCreateView(\n LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState\n ) {\n return inflater.inflate(R.layout.select_game, container, false);\n }",
"@Override\n\tprotected void initContentView() {\n\t\t\n\t}",
"public void onFinishInflate() {\n AppMethodBeat.i(103009);\n if (getChildCount() > 0) {\n View childAt = getChildAt(0);\n if (!(childAt instanceof RadarSpecialTableLayout)) {\n childAt = null;\n }\n this.pCL = (RadarSpecialTableLayout) childAt;\n }\n AppMethodBeat.o(103009);\n }",
"private void initView(Context context) {\n\t\tLinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, 0);\n\t\tmContainer = (LinearLayout)LayoutInflater.from(context).inflate(R.layout.pullable_refresh, null);\n\t\taddView(mContainer, params);\n\t\tsetGravity(Gravity.BOTTOM);\n\t\t\n\t\trefreshArrowView = (ImageView)findViewById(R.id.pull_down_arrow);\n\t\trefreshingView = (ImageView)findViewById(R.id.pull_down_refreshing_view);\n\t\trefreshStateTextView = (TextView)findViewById(R.id.pull_down_state_text);\n\t\t\n\t\trotateAnimation = (RotateAnimation)AnimationUtils.loadAnimation(context, R.anim.reverse_anim);\n\t\trefreshingAnimation = (RotateAnimation)AnimationUtils.loadAnimation(context, R.anim.rotating);\n\t\tLinearInterpolator lir = new LinearInterpolator();\n\t\trotateAnimation.setInterpolator(lir);\n\t\trefreshingAnimation.setInterpolator(lir);\n\t}",
"@Override\n\tpublic int bindLayout() {\n\t\treturn R.layout.activity_init;\n\t}",
"@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(getLayoutViewId());\n// presenter = getPresenter(typePresenter);\n init();\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.word_list, container, false);\n }",
"private void initView() {\n\n main_ll_rl = (LinearLayout) findViewById(R.id.main_ll_rili);\n main_ll_xw = (LinearLayout) findViewById(R.id.main_ll_xw);\n main_ll_wode = (LinearLayout) findViewById(R.id.main_ll_wd);\n main_ll_self = (LinearLayout) findViewById(R.id.main_ll_self);\n main_ll_hq = (LinearLayout) findViewById(R.id.main_ll_hq);\n main_zt_color = (LinearLayout) findViewById(R.id.main_zt_color);\n\n main_zt_color.setBackgroundColor(Color.parseColor(\"#e9e9ea\"));\n\n imgrl = (ImageView) findViewById(R.id.imgrili);\n imgxw = (ImageView) findViewById(R.id.imgxw);\n imgwd = (ImageView) findViewById(R.id.imgwd);\n imggr = (ImageView) findViewById(R.id.imgself);\n imghq = (ImageView) findViewById(R.id.imghq);\n\n main_rl_tv = (TextView) findViewById(R.id.main_rl_tv);\n main_xw_tv = (TextView) findViewById(R.id.main_xw_tv);\n main_wd_tv = (TextView) findViewById(R.id.main_wd_tv);\n main_gr_tv = (TextView) findViewById(R.id.main_self_tv);\n main_hq_tv = (TextView) findViewById(R.id.main_hq_tv);\n\n main_ll_rl.setOnClickListener(this);\n main_ll_xw.setOnClickListener(this);\n main_ll_wode.setOnClickListener(this);\n main_ll_hq.setOnClickListener(this);\n main_ll_self.setOnClickListener(this);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.book_list, container, false);\n\n /** RETURN THE VIEW INSTANCE TO SETUP THE LAYOUT **/\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.activity_recetas, parent, false);\n }",
"@Override\n public void baseSetContentView() {\n View layout = View.inflate(this,\n R.layout.ac_ext_sharedfilesd_grouphome, mContentLayout);\n // mContentLayout.addView(layout);\n intent1 = getIntent();\n context = this;\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.first_step_layout, container, false);\n initView();\n return view;\n }",
"protected void setupView(Context context, final ViewGroup parent) {\n\n\t\tLayoutInflater inflater = (LayoutInflater) context\n\t\t.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\tView v = inflater.inflate(R.layout.map_popup_layout, parent);\n\t\timage = (ImageView) v.findViewById(R.id.statusImgOnMAP);\n\t\tBitmap weatherImg = UtilityFunctions.StringToBitMap(\"\");\n\t\tif(weatherImg!=null)\n\t\t\timage.setImageBitmap(weatherImg);\n\t\theader = (TextView) v.findViewById(R.id.locationHeaderOnMap);\n\t\ttitle1 = (TextView) v.findViewById(R.id.descripOnMap);\n\t\ttitle2 = (TextView) v.findViewById(R.id.dateOnMap);\n\t\ttitle3 = (TextView) v.findViewById(R.id.minTempOnMapValue);\n\t\ttitle4 = (TextView) v.findViewById(R.id.maxTempOnMapValue);\n\n\t}",
"@Override\n\tprotected int getLayoutRes() {\n\t\treturn R.layout.holiday_meals_item_layout;\n\t}",
"@Override\n \tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n \t\t\tBundle savedInstanceState) {\n \t\treturn inflater.inflate(R.layout.list, container, false);\n \t}",
"@Override\n public View onCreateView(\n LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState\n ) {\n return inflater.inflate(R.layout.activity_person_info, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }",
"public void onFinishInflate() {\n super.onFinishInflate();\n if (16 != this.h) {\n setBgtype(this.h);\n }\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"private void initBaseLayout() {\n if (topText != null) {\n TextView topicText = new TextView(mainContext);\n topicText.setText(topText);\n dimensionsContainer.setViewStyle(KEY_TOPIC_TEXT, topicText);\n topicText.setTag(new BlankTagHandler(BlankTagHandler.CeilType.NONE, R.id.blank_topic));\n topicText.setClickable(true);\n topicText.setOnClickListener(generalClickListener);\n blankLayout.addView(topicText);\n }\n//Add topLayout\n //if (topLayout == null) {\n topLayout = new LinearLayout(mainContext);\n topLayout.setOrientation(LinearLayout.HORIZONTAL);\n topLayout.setLayoutParams(layoutParams_WC_WC);\n topLayout.setBackgroundColor(bgColor_Table);\n blankLayout.addView(topLayout);\n//Add numTop\n TextView numTop = new TextView(mainContext);\n numTop.setText(R.string.symbol_num);\n dimensionsContainer.setViewStyle(KEY_NUM_TOP, numTop);\n numTop.setTag(new BlankTagHandler(BlankTagHandler.CeilType.NONE, R.id.blank_num_top));\n numTop.setClickable(true);\n numTop.setOnClickListener(generalClickListener);\n topLayout.addView(numTop);\n//Add nameTop\n TextView nameTop = new TextView(mainContext);\n nameTop.setText(nameTopTextResId);\n dimensionsContainer.setViewStyle(KEY_NAME_TOP, nameTop);\n nameTop.setTag(new BlankTagHandler(BlankTagHandler.CeilType.NONE, R.id.blank_name_top));\n nameTop.setClickable(true);\n nameTop.setOnClickListener(generalClickListener);\n topLayout.addView(nameTop);\n\n\n\n\n\n\n//Add topHScrollView\n// if (layoutHandler.topHScrollView == null) {\n topHScrollView = new SyncedHorizontalScrollView(mainContext);\n topHScrollView.setLayoutParams(layoutParams_WC_MP);\n topHScrollView.setHorizontalScrollBarEnabled(false);\n if (dimensionsContainer.findDimensions(KEY_NAME_TOP).getBgColor() !=\n null) //OverScrollColor\n {\n topHScrollView.setBackgroundColor(\n dimensionsContainer.findDimensions(KEY_NAME_TOP).getBgColor());\n }\n topLayout.addView(topHScrollView);\n\n//Add topScrollLayout\n // if(layoutHandler.topScrollLayout == null) {\n topScrollLayout = new LinearLayout(mainContext);\n topScrollLayout.setBackgroundColor(bgColor_Table);\n topHScrollView.addView(topScrollLayout);\n\n//Add bodyScrollView\n //if(layoutHandler.bodyScrollView == null) {\n bodyScrollView = new ScrollView(mainContext);\n bodyScrollView.setLayoutParams(layoutParams_MP_WC);\n bodyScrollView.setVerticalScrollBarEnabled(false);\n //bodyScrollView.setOverScrollMode(View.OVER_SCROLL_NEVER);\n blankLayout.addView(bodyScrollView);\n//Add bodyLayout\n //if(layoutHandler.bodyLayout == null) {\n bodyLayout = new LinearLayout(mainContext);\n bodyLayout.setOrientation(LinearLayout.HORIZONTAL);\n bodyLayout.setLayoutParams(layoutParams_WC_WC);\n bodyScrollView.addView(bodyLayout);\n\n//Add bodyLeftLayout\n //if(layoutHandler.bodyLeftLayout == null) {\n bodyLeftLayout = new LinearLayout(mainContext);\n bodyLeftLayout.setOrientation(LinearLayout.VERTICAL);\n bodyLeftLayout.setLayoutParams(layoutParams_WC_WC);\n bodyLeftLayout.setBackgroundColor(bgColor_Table);\n bodyLayout.addView(bodyLeftLayout);\n\n//Add bodyHScrollView\n //if(layoutHandler.bodyHScrollView == null) {\n bodyHScrollView = new SyncedHorizontalScrollView(mainContext);\n bodyHScrollView.setLayoutParams(layoutParams_WC_WC);\n bodyHScrollView.setHorizontalScrollBarEnabled(false);\n if (dimensionsContainer.findDimensions(KEY_NAME_LEFT).getBgColor() !=\n null)//OverScrollColor\n {\n bodyHScrollView.setBackgroundColor(\n dimensionsContainer.findDimensions(KEY_NAME_LEFT).getBgColor());\n }\n bodyLayout.addView(bodyHScrollView);\n\n//Add bodyRightLayout\n //if(layoutHandler.bodyRightLayout == null) {\n bodyRightLayout = new LinearLayout(mainContext);\n bodyRightLayout.setOrientation(LinearLayout.VERTICAL);\n bodyRightLayout.setBackgroundColor(bgColor_Table);\n bodyHScrollView.addView(bodyRightLayout);\n\n//Add Scroll Listeners\n\n ScrollManager scrollManager = new ScrollManager();\n scrollManager.setScrollDirection(ScrollManager.SCROLL_HORIZONTAL);\n scrollManager.addScrollClient(topHScrollView);\n scrollManager.addScrollClient(bodyHScrollView);\n\n// bodyScrollView.setOnTouchListener(new View.OnTouchListener() {\n// @Override\n// public boolean onTouch(View v, MotionEvent event) {\n// bodyHScrollView.getParent().requestDisallowInterceptTouchEvent(false);\n// return false;\n// }\n// });\n// bodyHScrollView.setOnTouchListener(new View.OnTouchListener() {\n// @Override\n// public boolean onTouch(View v, MotionEvent event) {\n// v.getParent().requestDisallowInterceptTouchEvent(true);\n// return false;\n// }\n// });\n\n //ScrollManager.disallowParentScroll(bodyHScrollView, 100);\n //ScrollManager.disallowChildScroll(bodyHScrollView, bodyLayout, 100);\n //bodyHScrollView.getWidth());\n //Dimensions.dipToPixels(mainContext, 800));\n// ScrollManager\n// .disallowParentScroll(bodyHScrollView, Dimensions.dipToPixels(mainContext, 200));\n //TODO: disallowParentScroll(bodyHScrollView, Dimensions.dipToPixels(mainContext, 50));\n\n }",
"@Override\n protected int layoutId() {\n return R.layout.activity_appraise_imageshow;\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.flight_data, container, false);\r\n\r\n // Obtain references to the UI elements\r\n mHeadingTextView = (TextView) view.findViewById(R.id.heading_value);\r\n mAltitudeTextView = (TextView) view.findViewById(R.id.altitude_value);\r\n mAirspeedTextView = (TextView) view.findViewById(R.id.airspeed_value);\r\n mVertSpeedTextView = (TextView) view.findViewById(R.id.vs_or_dist_value);\r\n mHeadingTextView.setText(String.valueOf(FlightDirector.FD_MIN_HEADING));\r\n mAltitudeTextView.setText(String.valueOf(FlightDirector.FD_MIN_ALTITUDE));\r\n mAirspeedTextView.setText(String.valueOf(FlightDirector.FD_MIN_AIRSPEED));\r\n mVertSpeedTextView.setText(String.valueOf(FlightDirector.FD_MIN_VERT_SPEED));\r\n\r\n // Set onclick listeners to make buttons from layouts\r\n LinearLayout layout = updateLayout(view, R.id.heading_bearing_layout);\r\n layout.setOnClickListener(new OnNumberButtonClickListener(getActivity(), this,\r\n FlightDirector.FD_MIN_HEADING, HEADING_MAX_DEGREES, R.id.heading_value,\r\n HEADING_REQUEST, \"Set heading\"));\r\n\r\n layout = updateLayout(view, R.id.altitude_layout);\r\n layout.setOnClickListener(new OnNumberButtonClickListener(getActivity(), this,\r\n FlightDirector.FD_MIN_ALTITUDE, getResources().getInteger(\r\n R.integer.max_waypoint_altitude), R.id.altitude_value, ALTITUDE_REQUEST,\r\n \"Set altitude (max \" + getResources().getInteger(R.integer.max_waypoint_altitude)\r\n + \" m)\"));\r\n\r\n layout = updateLayout(view, R.id.airspeed_layout);\r\n layout.setOnClickListener(new OnNumberButtonClickListener(getActivity(), this,\r\n FlightDirector.FD_MIN_AIRSPEED, MAX_SPEED, R.id.airspeed_value, SPEED_REQUEST,\r\n \"Set airspeed (max \" + MAX_SPEED + \" m/s)\"));\r\n\r\n layout = updateLayout(view, R.id.vs_layout);\r\n layout.setOnClickListener(new OnNumberButtonClickListener(getActivity(), this,\r\n FlightDirector.FD_MIN_VERT_SPEED, MAX_VS, R.id.vs_or_dist_value, VS_REQUEST,\r\n \"Set vertical speed (max \" + MAX_VS + \" m/s)\"));\r\n\r\n return view;\r\n }",
"private void initializeViews(Context context) {\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n inflater.inflate(R.layout.number_picker, this);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return Utils.setCustomAdapterTheme(getActivity(), inflater, R.layout.slide_result, container, false);\n }",
"private void InitView() {\n\t\tmLinearLayout = new LinearLayout(getContext());\n\t\t//mLinearLayout.setBackgroundResource(MusicApplication.getInstance().getBgResource());\n\t\t\n\t\t//Modify by LiYongNam 2012.9.19_start\n\t\tMusicUtil.setBackgroundOfView ( mLinearLayout, getContext() );\t\t\t\t\n\t\t//Modify by LiYongNam 2012.9.19_end\n\t\t\n\t\tmLinearLayout.setOrientation(LinearLayout.VERTICAL);\n\t\tmLinearLayout.setPadding(1, 1, 1, Util.dipTopx(getContext(), 60));\n\t\t// 导航条\n\t\taddTitleBar(-1, \"编辑列表\", R.drawable.check_off, R.drawable.title_bar);\n\n\t\tmControlBar = new ControlBar(getContext());\n\t\tmControlBar.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,\n\t\t\t\tUtil.dipTopx(getContext(), 60)));\n\n//\t\taddControlButton(\"全选\", CONTROL1, 0);\n\t\taddControlButton(\"播放\", CONTROL2, 1);\n\t\taddControlButton(\"加入\", CONTROL3, 2);\n\t\taddControlButton(\"删除\", CONTROL4, 3);\n\n\t}",
"@Nullable\n public View onCreateView(LayoutInflater inflater,\n @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n if (null == view) {\n myContainer = new LinearLayout(mContext);\n view = inflater.inflate(R.layout.listitem_banner, null);\n view.setMinimumHeight(((WindowManager) getActivity()\n .getSystemService(Context.WINDOW_SERVICE))\n .getDefaultDisplay().getHeight());\n view.setMinimumWidth(((WindowManager) getActivity()\n .getSystemService(Context.WINDOW_SERVICE))\n .getDefaultDisplay().getWidth());\n initData();\n myContainer.addView(view);\n } else {\n myContainer.removeAllViews();\n myContainer = new LinearLayout(getActivity());\n myContainer.addView(view);\n }\n return myContainer;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\treturn inflater.inflate(R.layout.activity_main, container, false);\n }",
"public CustomView(Context context, AttributeSet attrs) {\n super(context, attrs);\n init();\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tView v=inflater.inflate(R.layout.notepad_main, container, false);\r\n\t\tbody=(LineEditText) v.findViewById(R.id.body);\r\n\t\tdel=(Button) v.findViewById(R.id.delAll);\r\n\t\tdel.setOnClickListener(this);\r\n\t\treturn v;\r\n\t}",
"public void onFinishInflate() {\n super.onFinishInflate();\n bringChildToFront(this.menuButton);\n this.buttonsCount = getChildCount();\n createLabels();\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }",
"public void layout() {\n TitleLayout ll1 = new TitleLayout(getContext(), sourceIconView, titleTextView);\n\n // All items in ll1 are vertically centered\n ll1.setGravity(Gravity.CENTER_VERTICAL);\n ll1.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,\n LayoutParams.WRAP_CONTENT));\n ll1.addView(sourceIconView);\n ll1.addView(titleTextView);\n\n // Container layout for all the items\n if (mainLayout == null) {\n mainLayout = new LinearLayout(getContext());\n mainLayout.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,\n LayoutParams.WRAP_CONTENT));\n mainLayout.setPadding(adaptSizeToDensity(LEFT_PADDING),\n adaptSizeToDensity(TOP_PADDING),\n adaptSizeToDensity(RIGHT_PADDING),\n adaptSizeToDensity(BOTTOM_PADDING));\n mainLayout.setOrientation(LinearLayout.VERTICAL);\n }\n\n mainLayout.addView(ll1);\n\n if(syncModeSet) {\n mainLayout.addView(syncModeSpinner);\n }\n\n this.addView(mainLayout);\n }",
"public int onCreateContentView() {\n return R.layout.activity_network_diagnostics;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tView v=inflater.inflate(R.layout.onbusway, container, false);\r\n\t\ttv_bus=(TextView) v.findViewById(R.id.et_myendPosition_bus);\r\n\t\t//setOnClick();\r\n\t\treturn v;\r\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initView(View view) {\n\t\trly_personal_info = (RelativeLayout) view.findViewById(R.id.rly_personal_info);\r\n\t\t\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n context = getActivity().getApplicationContext();\n View inflaterview = inflater.inflate(R.layout.fragment_order_detail, container, false);\n collectName = (TextView)inflaterview.findViewById(R.id.txtResName);\n collectAddress = (TextView)inflaterview.findViewById(R.id.txtResAddress);\n collectPhone = (TextView)inflaterview.findViewById(R.id.txtResPhone);\n deliverAddress = (TextView)inflaterview.findViewById(R.id.txtDeliverAddress);\n deliverPhone = (TextView)inflaterview.findViewById(R.id.txtDeliverPhone);\n layItem = (LinearLayout)inflaterview.findViewById(R.id.layoutItem);\n btnRequest = (Button)inflaterview.findViewById(R.id.btnRequest);\n btnMap = (Button)inflaterview.findViewById(R.id.btnMap);\n txtordercode = (TextView)inflaterview.findViewById(R.id.txtOrderCode);\n txtdelicharge = (TextView)inflaterview.findViewById(R.id.txtDelivcharge);\n txttotalamount = (TextView)inflaterview.findViewById(R.id.txtTotalAmount);\n return inflaterview;\n }",
"private void init(Context context) {\n getViewTreeObserver().addOnGlobalLayoutListener(this);\n inflate(context, R.layout.new_rp_resultview, this);\n mMainPanel = (ViewAnimator) findViewById(R.id.viewanimator);\n mInfoPanel = (ViewAnimator) findViewById(R.id.va_text);\n \n \n mInfoPanelText1 = (TextView) mInfoPanel.findViewById(R.id.tv1);\n mMainPanel.setDisplayedChild(0);\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.activity_post_property_screen, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.motor_home_ui, container, false);\n }",
"@Override\n protected int getNormalLayoutResId() {\n return itemCommonBinder.layout;\n }",
"@Override\n\tprotected void loadXml() {\n\t\tsetContentView(R.layout.activity_my_message);\n\t}",
"@Override\n\tpublic void onFinishLayout(View lay) {\n\t}",
"@Override\n public View onCreateView(\n LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState\n ) {\n View view = inflater.inflate(R.layout.bottom_sheet, container, false);\n calendarGroup = view.findViewById(R.id.calendar_group);\n calendarView = view.findViewById(R.id.calendar_view);\n calendarButton = view.findViewById(R.id.today_calendar_button);\n enterTodo = view.findViewById(R.id.enter_todo_et);\n saveButton = view.findViewById(R.id.save_todo_button);\n priorityButton = view.findViewById(R.id.priority_todo_button);\n priorityRadioGroup = view.findViewById(R.id.radioGroup_priority);\n Chip todayChip = view.findViewById(R.id.today_chip);\n todayChip.setOnClickListener(this);\n Chip tommorowChip = view.findViewById(R.id.tomorrow_chip);\n tommorowChip.setOnClickListener(this);\n Chip nextWeekChip = view.findViewById(R.id.next_week_chip);\n nextWeekChip.setOnClickListener(this);\n priority = Priority.LOW;\n return view;\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tView view = inflater.inflate(R.layout.authentication_layout, container, false);\n\t\tbtnLogin = (ButtonRectangle) view.findViewById(R.id.btn_login);\n\t\tbtnLoginAsGuest = (ButtonRectangle) view.findViewById(R.id.btn_login_as_guest);\n\n\t\treturn view;\n\t}",
"public void onFinishInflate() {\n super.onFinishInflate();\n this.mPreviewImageContainer = findViewById(C1188R.C1191id.preview_image_container);\n this.mPreviewImageBackground = (ImageView) findViewById(C1188R.C1191id.preview_image_background);\n this.mPreviewImage = (ImageView) findViewById(C1188R.C1191id.preview_image);\n this.mPreviewVideo = findViewById(C1188R.C1191id.preview_video_view);\n this.mPreviewDelayProgress = findViewById(C1188R.C1191id.preview_delay_progress);\n this.mPlaybackProgress = (ProgressBar) findViewById(C1188R.C1191id.playback_progress);\n this.mPlaybackProgressDimmer = findViewById(C1188R.C1191id.program_playback_progress_dimmer);\n this.mLogoAndBadgesContainer = findViewById(C1188R.C1191id.program_logo_and_badges_container);\n this.mLogo = (ImageView) findViewById(C1188R.C1191id.program_card_logo);\n this.mLogoVisibility = this.mLogo.getVisibility();\n if (Util.isRtl(getContext())) {\n this.mLogo.setScaleType(ImageView.ScaleType.FIT_END);\n }\n this.mLogoDimmer = findViewById(C1188R.C1191id.program_logo_dimmer);\n this.mLogoDimmerVisibility = this.mLogoDimmer.getVisibility();\n this.mLiveBadge = (TextView) findViewById(C1188R.C1191id.program_live_badge);\n this.mLiveBadgeVisibility = this.mLiveBadge.getVisibility();\n this.mLiveIcon = (ImageView) findViewById(C1188R.C1191id.program_live_icon);\n this.mLiveIconVisibility = this.mLiveIcon.getVisibility();\n this.mDurationBadge = (TextView) findViewById(C1188R.C1191id.program_duration_badge);\n this.mDurationBadgeVisibility = this.mDurationBadge.getVisibility();\n View badgesContainer = (View) this.mLiveBadge.getParent();\n badgesContainer.setOutlineProvider(new ViewOutlineProvider(this) {\n public void getOutline(View view, Outline outline) {\n outline.setRoundRect(0, 0, view.getWidth(), view.getHeight(), (float) view.getResources().getDimensionPixelSize(C1188R.dimen.program_badge_background_corner_radius));\n }\n });\n badgesContainer.setClipToOutline(true);\n this.mPreviewImageDimmedFactorValue = Util.getFloat(getResources(), C1188R.dimen.unfocused_channel_dimming_factor);\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater,\n\t\t\t@Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\t\tweatherView = LayoutInflater.from(getActivity()).inflate(\n\t\t\t\tR.layout.weather_layout, null);\n\t\ttry {\n\t\t\tinitLayoutParams();\n\t\t\tinitView();\n\t\t\tinitListener();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn weatherView;\n\t}",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n Fabric.with(getContext(), new Crashlytics());\r\n View view = inflater.inflate(R.layout.fragment_open_ticket_general_enquiries_department, container, false);\r\n unbinder = ButterKnife.bind(this, view);\r\n\r\n\r\n intialize();\r\n return view;\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.register_one, container, false);\n userName = (EditText)rootView.findViewById(R.id.edit_register_user_id);\n userPhone = (EditText)rootView.findViewById(R.id.edit_register_phone);\n code = (EditText)rootView.findViewById(R.id.edit_register_code);\n userMail = (EditText)rootView.findViewById(R.id.edit_register_mail);\n userPwd = (EditText)rootView.findViewById(R.id.edit_register_pwd);\n userPwdSubmit = (EditText)rootView.findViewById(R.id.edit_register_pwd_sub);\n getCode = (Button)rootView.findViewById(R.id.register_new_code_btn);\n next = (Button)rootView.findViewById(R.id.register_next);\n getCode.setOnClickListener(this);\n next.setOnClickListener(this);\n code.addTextChangedListener(watcher);\n\n //设置按钮不可点击时的颜色\n getCode.setBackgroundResource(R.color.gray_text_color);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){\n View layout = inflater.inflate(R.layout.setup_chatroom_dialog, container, false);\n Button setupButton = (Button)layout.findViewById(R.id.setup_chatRoom_dialog_setup_button);\n Button cancelButton = (Button)layout.findViewById(R.id.setup_chatRoom_dialog_cancel_button);\n editText = (EditText)layout.findViewById(R.id.setup_chatRoom_dialog_edit_text);\n setupButton.setOnClickListener(setupListener);\n cancelButton.setOnClickListener(cancelListener);\n return layout;\n }"
] |
[
"0.6893219",
"0.6887089",
"0.66509247",
"0.65904486",
"0.6546712",
"0.6546558",
"0.6533843",
"0.6497789",
"0.64898795",
"0.6447765",
"0.641688",
"0.6400788",
"0.6394702",
"0.63895404",
"0.6386258",
"0.63836515",
"0.63513196",
"0.63465226",
"0.6330183",
"0.63298297",
"0.63298297",
"0.6327786",
"0.6317278",
"0.6298148",
"0.6283669",
"0.62827206",
"0.6280131",
"0.62547135",
"0.6253015",
"0.6252483",
"0.6252474",
"0.62467825",
"0.6242378",
"0.6241163",
"0.62323076",
"0.6229429",
"0.6223926",
"0.62071705",
"0.61763346",
"0.616164",
"0.6158333",
"0.61345786",
"0.6123405",
"0.6109327",
"0.61090356",
"0.61079365",
"0.6105565",
"0.6102138",
"0.60871494",
"0.6084029",
"0.60694194",
"0.606638",
"0.6064611",
"0.6058111",
"0.60558975",
"0.6053618",
"0.6042259",
"0.60412973",
"0.6041149",
"0.6037904",
"0.6032116",
"0.60269487",
"0.6021035",
"0.60202795",
"0.60193586",
"0.601009",
"0.6009904",
"0.60078996",
"0.60041463",
"0.60024995",
"0.6000634",
"0.59990525",
"0.59899783",
"0.5988171",
"0.5985778",
"0.59788066",
"0.5977439",
"0.59742546",
"0.59663135",
"0.5964203",
"0.59638417",
"0.5962351",
"0.59620726",
"0.5961122",
"0.5960625",
"0.5960287",
"0.59592795",
"0.59559095",
"0.5955349",
"0.59528184",
"0.59517324",
"0.59500587",
"0.5949529",
"0.5947083",
"0.5946284",
"0.5946163",
"0.5944518",
"0.59426606",
"0.5936833",
"0.5935577",
"0.5935079"
] |
0.0
|
-1
|
Pass in the contact array into the constructor
|
public TweetsAdapter(Context context, List<Tweet> tweets) {
mTweets = tweets;
mContext = context;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Contact(){\n\t\t\n\t}",
"public Contact(String[] a , boolean encrypted){\r\n\t\tif (encrypted)\r\n\t\t{\r\n\t\t\tthis.lastName = \tMethod.encrypt(a[0].trim() ,false);\r\n\t\t\tthis.firstName \t = \tMethod.encrypt(a[1].trim() ,false);\r\n\t\t\tthis.address \t =\tMethod.encrypt(a[2].trim() ,false);\r\n\t\t\tthis.city \t\t = \tMethod.encrypt(a[3].trim() ,false);\r\n\t\t\tthis.phoneNumber = Method.encrypt(a[4].trim() ,false);\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\tthis.lastName = \ta[0].trim();\r\n\t\t\tthis.firstName \t = \ta[1].trim();\r\n\t\t\t\r\n\t\t\tthis.address \t =\ta[2].trim();\r\n\t\t\tif(address.length()==0)\r\n\t\t\t\tthis.address = \"??\";\r\n\t\t\t\r\n\t\t\tthis.city \t\t = \ta[3].trim();\r\n\t\t\tif(city.length()==0)\r\n\t\t\t\tthis.city = \"??\";\r\n\t\t\t\r\n\t\t\tthis.phoneNumber = a[4].trim();\r\n\t\t}\r\n\t}",
"public Person(String name, ArrayList<String> pnArray) {\n\n\t}",
"public Contact(){}",
"public ContactList(int size) {\n\t\tcontactList = new Person[size];\n\t\tcontactCounter = 0;\n\t}",
"public Contact() {\n\t}",
"public Contact() {\n }",
"public Contact() {\n }",
"public Contact() {\n }",
"public Contact(Parcel in){\n\n readFromParcel(in);\n\n }",
"public Contact() {\n super();\n }",
"public void setContactInfo(ContactInfo[] contactInfo) {\n this.contactInfo = contactInfo;\n }",
"public void loadContacts()\n {\n Contact sdhb = new Contact(\"SDHB\", \"(03) 474 00999\");\n //Hospitals\n Contact southland = new Contact(\"Southland Hospital\", \"(03) 218 1949\");\n Contact lakes = new Contact(\"Lakes District Hostpital\", \"(03) 441 0015\");\n Contact dunedin = new Contact(\"Dunedin Hospital\", \"(03) 474 0999\");\n Contact wakari = new Contact(\"Wakari Hospital\", \"(03) 476 2191\");\n //Departments\n Contact compD = new Contact(\"Complements & Complaints (Otago)\", \"(03) 470 9534\");\n Contact compS = new Contact(\"Complements & Complaints (Southland)\", \"(03) 214 5738\");\n\n contacts = new Contact[]{sdhb, dunedin, southland, lakes, wakari, compD, compS};\n }",
"public BatchAdapter(List<ToddyBatch> contacts) {\n mContacts = contacts;\n }",
"public P2PFirstContact() {\n // The empty constructor\n }",
"ContactsManager(){\n friendsCount = 0;\n myFriends = new Contact[500];\n }",
"public Person1(int[] celNumber, int age, String name) {\n\t\tsuper();\n\t\tthis.celNumber = celNumber;\n\t\tthis.age = age;\n\t\tthis.name = name;\n\t}",
"public ContactInfo() {\n\n }",
"protected void setContacts(ArrayList<Contact> contacts){\n this.contacts = contacts;\n }",
"private Constructor getConstructor() throws Exception {\r\n return type.getConstructor(Contact.class, label, Format.class);\r\n }",
"public Contact(String name, String phoneNumber) {\n this.name = name;\n this.phoneNumber = phoneNumber;\n\n }",
"private void processContact() {\n String[] myArray = new String[getMyContacts().size()];\n myArray = getMyContacts().toArray(myArray);\n System.out.println(Arrays.toString(myArray));\n }",
"void addContact(String name, int number)\r\n\t{\r\n\t\t\r\n\t\tContact a = new Contact(number,name);\r\n\t\tthis.add(a);\r\n\t}",
"public PDContactSend() {\n this.email = new ArrayList<>();\n this.phone = new ArrayList<>();\n this.active_flag = true;\n }",
"public Company(int size) {\n employees = new Person[size];\n }",
"public static void fileToContactObjs() {\n contactObjList.clear();\n List<String> myList = fileToList();\n String strList = String.join( \",\", myList);\n String[] strArr = strList.split(\",\");\n for(String contact : strArr) {\n contact = contact.replace(\"|\", \"&\");\n String[] contactElems = contact.split(\"&\");\n String[] nameArr = contactElems[0].split(\" \");\n //danger code. comment out for demo\n contactElems[1] = contactElems[1].replace(\"(\", \"\");\n contactElems[1] = contactElems[1].replace(\")\", \"\");\n contactElems[1] = contactElems[1].replace(\"-\", \"\");\n //\n //ArrayIndexOutOfBoundsException below.\n Contact newContact = new Contact(nameArr[0].trim(), nameArr[1].trim(), contactElems[1], contactElems[2]);\n contactObjList.add(newContact);\n }\n }",
"public Contact (String fname, String sname, String id, String phone){\r\n\t\tfirstName = fname;\r\n\t\tsurname = sname;\r\n\t\tuniqueID = id;\r\n\t\tphoneNumber = phone;\r\n\t}",
"public AddressBook() {\r\n contacts = new ArrayList<AddressEntry>();\r\n }",
"public ContactList(String inFileName)\n {\n filename = inFileName;\n }",
"public Contact() {\n\t\tsuper(org.jooq.examples.sqlserver.adventureworks.person.tables.Contact.Contact);\n\t}",
"public static Contacts createContacts(String name,String phoneNumber){\n //it calling the constuctor to create an new contact record\n return new Contacts(name,phoneNumber);\n\n }",
"private TradeContact(String contactName, String contactTel, String contactMail) {\r\n\t\tsetContactPoint(contactName);\r\n\t\tsetContactTelephone(contactTel);\r\n\t\tsetContactEmail(contactMail);\r\n\t}",
"public College(int number) {\n this.number = number;\n labs = new Lab[number];\n }",
"Contact(int instanceId, String name, String phone){\n\t\tthis.name = name;\n\t\tthis.phone = phone;\n\t\tthis.instanceId = instanceId;\n\t}",
"@Override\n\tpublic void initializeContacts(EvolutionState state) {\n\t}",
"public Contacts(int contactID, String contactName, String email) {\r\n this.contactID = contactID;\r\n this.contactName = contactName;\r\n this.email = email;\r\n }",
"public Individual(char[] c){\n this.dna = c;\n }",
"public FancyArray(Object[] arr) {\r\n\t\t/*\r\n\t\t * Statt eines Konstruktors der Oberklasse kann ich auch\r\n\t\t * einen anderen Konstruktor der Klasse selbst aufrufen!\r\n\t\t * \r\n\t\t * Auch dazu benutzen wir das Schlüsselwort this,\r\n\t\t * so rufen wir den parameterlosen Konstruktor auf -\r\n\t\t * so kann ich auch Konstruktoren der gleichen Klasse verketten\r\n\t\t */\r\n\t\tthis();\r\n\t\t//nach dem Aufruf wird dieser Konstruktor weiter ausgeführt:\r\n\t\taddAll(arr);\r\n\t}",
"public Person(String name, int age, String city /* ,*ArrayList friends*/) {\n this.name = name;\n this.age = age;\n this.city = city;\n //this.friends = new ArrayList<>();\n }",
"public void recreateContact(JsonArray jsonArray);",
"public Contact(String name)\n {\n if(name == null || name.equals(\"\")) {\n throw new IllegalArgumentException(\"Name cannot be null.\");\n }\n \n this.name = name;\n this.agenda = new ArrayList<Appointment>();\n }",
"public Group(long[] groupIDs, long[] contactIDs) {\n\t\t\t\t\n\t\tthis.groupIDs = groupIDs;\n\t\tthis.contactIDs = contactIDs;\n\t}",
"public GetContactRequest()\r\n {\r\n }",
"public Contact() {\n accumulatedNormalImpulse = 0.0;\n accumulatedTangentImpulse = 0.0;\n }",
"void addContact(String name,String number);",
"public HLCContactDetails() {\n }",
"public IndividualAddress(final byte[] address)\n\t{\n\t\tsuper(address);\n\t}",
"void addContact(String name, String number);",
"private Contact createBaseContact()\n {\n Contact contact = new Contact();\n contact.setName(new Name(new LastName(\"Doe\"), new FirstName(\"John\")));\n contact.setAddress(new Address(new StreetAddress(\"123 Main St\"),\n null,\n new GeneralProperty(\"Tucson\"),\n new State(\"AZ\"),\n new Zip(\"85750\")));\n contact.setPhone(new Phone(\"(520) 123-4567\"));\n contact.setEmail(new Email(\"[email protected]\"));\n\n return contact;\n }",
"public Contact(String nameInput, String phoneInput, String emailInput){\n this.name = nameInput;\n this.phone = phoneInput;\n this.email = emailInput;\n }",
"public void setOtherContacts(long[] contactIds) {\n\t\tcontactIdsArray = contactIds;\n\t}",
"public Person(String name, String address, String postalCode, String city, String phone){\n // initialise instance variables\n this.name = name;\n this.address = address;\n this.postalCode = postalCode;\n this.city = city;\n this.phone = phone;\n }",
"public Contact(String lastName, String firstName, \r\n\t\t\tString address, String city, String phoneNumber) {\r\n\t\t\r\n\t\tthis.lastName = lastName.trim();\r\n\t\tthis.firstName = firstName.trim();\r\n\t\tthis.address = address.trim();\r\n\t\tthis.city = city.trim();\r\n\t\tthis.phoneNumber = phoneNumber.trim();\r\n\t\t\r\n\t}",
"public void addContact() {\n Contacts contacts = new Contacts();\n System.out.println(\"Enter first name\");\n contacts.setFirstName(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter last name\");\n contacts.setLastName(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter address\");\n contacts.setAddress(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter city\");\n contacts.setCity(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter state\");\n contacts.setState(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter email\");\n contacts.setEmail(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter zip\");\n contacts.setZip(scannerForAddressBook.scannerProvider().nextInt());\n System.out.println(\"Enter phone number\");\n contacts.setPhoneNumber(scannerForAddressBook.scannerProvider().nextLine());\n contactList.add(contacts);\n }",
"public Polygon(float... xyArray)\n {\n points = floatArrayToPointList(xyArray);\n recenter();\n }",
"public Employee(String code, Name name, Address address, String[] emails){\n super(code, address);\n this.emails = emails;\n this.name = name;\n }",
"public ContactInfo(String name, Integer age, PhoneNo phoneNo, CurrAddress currAddress, String email) {\n this.name = name;\n this.age = age;\n this.phoneNo = phoneNo;\n this.currAddress = currAddress;\n this.email = email;\n }",
"public RAMContactoDAO() {\r\n /*contacto.add(c1);\r\n contacto.add(c2);\r\n contacto.add(c3);\r\n contacto.add(c4);*/\r\n }",
"public SuperArray() { \n \t_data = new Comparable[10];\n \t_lastPos = -1; //flag to indicate no lastpos yet\n \t_size = 0;\t\n }",
"public Person(String name, String address, String phoneNumber, String emailAddress)\n {\n this.name = name;\n this.address = address;\n this.phoneNumber = phoneNumber;\n this.emailAddress = emailAddress;\n }",
"public Student(String myname, int myid , double[] theGradeArray){ \r\n\r\n\t\tname = myname;\r\n\t\tid = myid;\r\n\t\tgrades = theGradeArray;\r\n\t\t\r\n\t// use the static variable from StudentArray Class to keep count of the number of student object\r\n\t\tnumberOfStudents++;\r\n\t}",
"public void setContact(Contact contact) {\n this.contact = contact;\n }",
"public void setContact(Contact contact) {\n this.contact = contact;\n }",
"public Complex(String[] cStr){\r\n\t this(cStr[0], cStr[1]);\r\n\t}",
"public static void main(String[] args) {\n\t\tint numberOfContacts = 3;\t// How many contacts the contact list has.\r\n\r\n\t\tContact contact[] = new Contact[numberOfContacts];\r\n// ---------------------------------------------------------------------------------\r\n\t\tcontact[0] = new Contact(\"John\", \"Smith\", 123456789, \"Apple St\");\r\n\t\tcontact[1] = new Contact(\"Jan\", \"Kowalski\", 951384897, \"Miodowa\");\r\n\t\tcontact[2] = new Contact(\"Ania\", \"Lewandowska\", 674356829, \"Dluga\");\r\n// ---------------------------------------------------------------------------------\t\t\r\n\r\n\t\tint contactNo = 0; // Which contact number from the list should be printed?\r\n\t\t\r\n\t\tString nameSurname = contact[contactNo].getNameSurname();\r\n\t\tint number = contact[contactNo].getNumber();\r\n\t\tString address = contact[contactNo].getAddress();\r\n\r\n\t\tContact.result(nameSurname, number, address);\r\n\t\t\t\t\r\n\t}",
"public MyContactListener(){\n super();\n bodiesToRemove = new Array<Body>();\n EnemyToRemove = new Array<Body>();\n\n\n\n }",
"public void addContact() {\n\t\tif (contactCounter == contactList.length) {\n\t\t\tSystem.err.println(\"Maximum contacts reached. \"\n\t\t\t\t\t\t\t\t+ \"No more contact can be added\");\n\t\treturn;\n\t\t}\n\t\t\n\t\treadContactInfo();\t\n\t}",
"public myContact(Address address, String type, Object identity, Object boss){\n\t\tmyAddress = address;\n\t\tmyType = type;\n\t\tmyIdentity = identity;\n\t\tmyBoss = boss;\n\t}",
"public SpecimenArray()\r\n\t{\r\n\t\tsuper();\r\n\t}",
"public Sock( /*int n , int ar[]*/)\n{\n\t//this.n=n;\n\t//this.ar=ar;\n}",
"public ArrayAccess()\r\n {\r\n }",
"public FormatableArrayHolder(Object[] array)\n\t{\n\t\tif (SanityManager.DEBUG)\n\t\t{\n\t\t\tSanityManager.ASSERT(array != null, \n\t\t\t\t\t\"array input to constructor is null, code can't handle this.\");\n\t\t}\n\n\t\tsetArray( array );\n\t}",
"public NumberAnalyzer(T[] array){\n this.array = array;\n }",
"@Override\n public void init(float[] data) {\n this.data = data;\n\n //\n shapeArr = new Rectangle2D.Float[data.length];\n colorArr = new Color[data.length];\n pointArr = new Point2D.Float[data.length];\n }",
"public ContactList()\n {\n myList = new ArrayList<>();\n }",
"public UIContactTransferable(List<UIContact> uiContacts)\n {\n this.uiContacts = uiContacts;\n }",
"public Person (String firstName, String lastName, String address) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.address = address;\n\n }",
"public Student(Name name, Phone phone, Email email, Address address, Set<Tag> tags) {\n super(name, phone, email, address, tags);\n subjectList = new ArrayList<>();\n }",
"public void addContact() \n\t{\n\t\tSystem.out.printf(\"%n--[ Add Contact ]--%n\");\n\t\tScanner s = new Scanner(System.in);\n\t\tSystem.out.printf(\"%nFirst Name: \");\n\t\tString firstName = s.next();\n\t\tSystem.out.printf(\"%nLast Name: \");\n\t\tString lastName = s.next();\n\t\tSystem.out.printf(\"%nPhone Number: \");\n\t\tString phoneNumber = s.next();\n\t\tSystem.out.printf(\"%nEmail Address: \");\n\t\tString emailAddress = s.next();\n\t\tSystem.out.printf(\"%nCompany: \");\n\t\tString company = s.next();\n\t\tBusinessContact b = new BusinessContact(firstName, lastName,\n\t\t\t\tphoneNumber, emailAddress, company);\n\t\tcontacts.add(b);\n\t}",
"public void addContacts() {\r\n\t\t\r\n\t\t\r\n\t}",
"public Record(String[] input){\r\n\t\tsetData(input);\r\n\t}",
"public VehicleaccountcontactjunctionC()\n {\n\t\tsuper();\n }",
"public ArrayRegister(int size) {\r\n persons = new Person[size];\r\n count = 0;\r\n }",
"public Persona(){\n /*super(nombresPosibles\n [r.nextInt(nombresPosibles.length)],(byte)r.nextInt(101));\n */\n super(\"Anónimo\",(byte)5);\n String[] nombresPosibles={\"Patracio\",\"Eusequio\",\"Bartolo\",\"Mortadelo\",\"Piorroncho\",\"Tiburcio\"};\n String[] apellidosPosibles={\"Sánchez\",\"López\",\"Martínez\",\"González\",\"Páramos\",\"Jiménez\",\"Parra\"};\n String[] nacionalidadesPosibles={\"Española\",\"Francesa\",\"Alemana\",\"Irlandesa\",\"Japonesa\",\"Congoleña\",\"Bielorrusa\",\"Mauritana\"};\n Random r=new Random();\n this.apellido=apellidosPosibles\n [r.nextInt(apellidosPosibles.length)];\n this.nacionalidad=nacionalidadesPosibles\n [r.nextInt(nacionalidadesPosibles.length)];\n mascota=new Mascota[5];\n this.saldo=r.nextInt(101);\n }",
"public void addContact() {\n System.out.println(\"enter a number to how many contacts you have to add\");\n Scanner scanner = new Scanner(System.in);\n int number = scanner.nextInt();\n\n for (int i = 1; i <= number; i++) {\n Contact person = new Contact();\n System.out.println(\"you can countinue\");\n System.out.println(\"enter your first name\");\n String firstName = scanner.next();\n if (firstName.equals(person.getFirstName())) {\n try {\n throw new InvalidNameException(\"duplicate name\");\n } catch (InvalidNameException e) {\n e.printStackTrace();\n }\n } else {\n person.setFirstName(firstName);\n }\n System.out.println(\"enter your last name\");\n String lastName = scanner.next();\n person.setLastName(lastName);\n System.out.println(\"enter your address :\");\n String address = scanner.next();\n person.setAddress(address);\n System.out.println(\"enter your state name\");\n String state = scanner.next();\n person.setState(state);\n System.out.println(\"enter your city :\");\n String city = scanner.next();\n person.setCity(city);\n System.out.println(\"enter your email\");\n String email = scanner.next();\n person.setEmail(email);\n System.out.println(\"enter your zip :\");\n int zip = scanner.nextInt();\n person.setZip(zip);\n System.out.println(\"enter your contact no\");\n int mobile = scanner.nextInt();\n person.setPhoneNo(mobile);\n list.add(person);\n }\n System.out.println(list);\n }",
"public Student(int level, String first, String last, long gnum, String major, \n String degree) {\n // TODO initialize the instance variables\n // Also use the parameter variable \"level\" as follows\n // 1) use its value to initialized the PROGRAM constant\n // 2) create the transcripts array to be of size [50] if is level 0, \n // or to be of size [15] if level is 1. \n // note that level refers to the student type and we use a value of 0 for \n // an undergrad and a value of 1 for a grad\n PROGRAM = level;\n this.first = first;\n this.last = last;\n this.gnum = gnum;\n this.major = major;\n this.degree = degree;\n if (PROGRAM == 0){\n transcripts = new TranscriptEntry[50];\n }\n else{\n transcripts = new TranscriptEntry[15];\n }\n }",
"public Person(String lastName, String firstName, String street, long tid, String phone, String mobile, String email) {\n this.lastName = lastName;\n this.firstName = firstName;\n this.address = street;\n this.tid = tid;\n this.phone = phone;\n this.mobile = mobile;\n this.email = email;\n }",
"public AddContactFrame(TableFrame tableFrame) {\n this(tableFrame, new Contact());\n }",
"protected Individual(float[] _genes)\n\t\t{\tgenes = _genes;\n\t\t\tcreateMe();\n\t\t\twait = 0;\n\t\t\tmove = 0;\n\t\t}",
"private ContactManager() {\n }",
"public ContactInfo[] getContactInfo() {\n return contactInfo;\n }",
"void setContactMeansArray(org.apache.xmlbeans.XmlObject[] contactMeansArray);",
"public IntArrays()\n\t{\n\t\tthis(10);\n\t}",
"public void setContact(String contact) {\n this.contact = contact;\n }",
"public void setContact(String contact) {\n this.contact = contact;\n }",
"public void setContact(String contact) {\n this.contact = contact;\n }",
"public void setContact(String contact) {\n this.contact = contact;\n }",
"private Labels(ArrayMixedObject array) {\n\t\tthis.array = array != null ? array : new ArrayMixedObject();\n\t}",
"public Customer(String name, String surname, String address, String email, long tel) {\n this.name = name;\n this.surname = surname;\n this.address = address;\n this.email = email;\n this.tel = tel;\n }",
"public GameWorld()\n { super(3000, 1000, 1);\n planet[1][0]=new HomePlanet();\n planet[0][1]=new AlienPlanet();\n planet[0][2]=new AlienPlanet();\n planet[1][1]=new AlienPlanet();\n planet[1][2]=new AlienPlanet();\n prepare();\n \n }",
"public Staff (String firstName, String lastName, String cpr, String type, \n String[] address, String phoneNr, String password, int hours, \n double salary, int vacation, int accessLevel) \n {\n this.firstName = firstName;\n this.lastName = lastName;\n this.cpr = cpr;\n this.type = type;\n this.address = address;\n this.phoneNumber = phoneNr;\n this.password = password;\n this.hours = hours;\n this.salary = salary;\n this.vacation = vacation;\n this.accessLevel = accessLevel;\n }"
] |
[
"0.6712669",
"0.6616947",
"0.65435797",
"0.6542758",
"0.6354581",
"0.626717",
"0.6253353",
"0.6253353",
"0.6253353",
"0.6220471",
"0.62171644",
"0.6201283",
"0.615539",
"0.6145132",
"0.6134552",
"0.61172587",
"0.609793",
"0.60616434",
"0.59840953",
"0.5967899",
"0.5875382",
"0.5847715",
"0.5834972",
"0.5742211",
"0.5733942",
"0.5728089",
"0.572362",
"0.5720693",
"0.567544",
"0.56597877",
"0.562139",
"0.56184906",
"0.56151336",
"0.5610653",
"0.55952555",
"0.55920184",
"0.55711055",
"0.5562186",
"0.55575365",
"0.5557123",
"0.55516833",
"0.55499965",
"0.5539479",
"0.5511216",
"0.5508358",
"0.5504351",
"0.54626477",
"0.5454661",
"0.5426513",
"0.5413022",
"0.54029065",
"0.5397371",
"0.5393657",
"0.5378876",
"0.5365517",
"0.5350143",
"0.5334332",
"0.5327027",
"0.53240377",
"0.5320582",
"0.53149843",
"0.5312535",
"0.5312535",
"0.53053844",
"0.52992356",
"0.52881026",
"0.52866346",
"0.5281517",
"0.52726805",
"0.52611613",
"0.5258352",
"0.5249307",
"0.5248395",
"0.5238624",
"0.5229958",
"0.52259487",
"0.5217623",
"0.5213282",
"0.5212575",
"0.52125657",
"0.5192525",
"0.51862603",
"0.51781756",
"0.5169551",
"0.5167812",
"0.5152646",
"0.51483685",
"0.5139548",
"0.5135578",
"0.51346594",
"0.5129714",
"0.51282376",
"0.512284",
"0.5121525",
"0.5121525",
"0.5121525",
"0.5121525",
"0.51156473",
"0.5103343",
"0.5101552",
"0.5093567"
] |
0.0
|
-1
|
Easy access to the context object in the recyclerview
|
private Context getContext() {
return mContext;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Context getContext() {\n return mContext;\n }",
"public final Context getContext() {\n return mContext;\n }",
"@Override\r\n\tpublic Context getContext()\r\n\t{\n\t\treturn this.getActivity().getApplicationContext();\r\n\t}",
"public CardViewKelasAdapter(Context context){this.context = context;}",
"public Context getContext() {\n\t\treturn mContext;\n\t}",
"public Context getContext() {\n return this.mContext;\n }",
"public Context getContext() {\n return this.mContext;\n }",
"@Override\n public Context getContext() {\n return this.getApplicationContext();\n }",
"Context getContext();",
"@Override\r\n\tpublic Context getContext() {\r\n\t\treturn this.context;\r\n\t}",
"@Override\n public Context getApplicationContext() {\n return mView.get().getApplicationContext();\n }",
"void getSchoolData(RecyclerView recyclerView, Context context);",
"@Override\n public Context getActivityContext() {\n return mView.get().getActivityContext();\n }",
"public Context getContext() {\n return this.mService.mContext;\n }",
"Context getContext() {\n Context context = mContextRef.get();\n return context != null ? context : AppUtil.getAppContext();\n }",
"public Context getThis()\r\n {\r\n return this.context;\r\n }",
"public Object getContextObject() {\n return context;\n }",
"public cl_context getContext() {\r\n return context;\r\n }",
"@NonNull\n public final AutoRef<Context> getContext() throws IllegalStateException, ReferenceNullException {\n return AutoRef.of(getView().get().getContext());\n }",
"@Override\n\tpublic BaseActivity getContext() {\n\t\treturn this;\n\t}",
"@Override\n\tpublic BaseActivity getContext() {\n\t\treturn this;\n\t}",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n context=getContext();\n\n }",
"public ExtendRecyclerView(Context context) {\n super(context);\n init();\n }",
"public Context getContext() {\n return context;\n }",
"@Override\n public ChatViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n View view = LayoutInflater.from(parent.getContext())\n .inflate(R.layout.chat_row, parent, false);\n ctx=view.getContext();\n\n\n ChatViewHolder myViewHolder = new ChatViewHolder(view);\n return myViewHolder;\n }",
"Context context();",
"Context context();",
"@Override\n public void onContext() {\n }",
"public Context getContext() {\r\n\t\treturn context;\r\n\t}",
"void getContext() {\n playerName = getIntent().getExtras().getString(\"player_name\");\n Log.i(\"DiplomaActivity\", \"getContext - Player name: \" + playerName);\n }",
"public Context getActivityContext(){\n return mActivityContext;\n }",
"public Context getContext() {\n\t\treturn context;\n\t}",
"public String getContext() { return context; }",
"public ViewHolder(@NonNull View view, Context ctx) {\n super(view);\n context = ctx;\n\n taskName = view.findViewById(R.id.item_name);\n taskDescription = itemView.findViewById(R.id.item_description);\n taskPriority = itemView.findViewById(R.id.item_priority);\n dateAdded = itemView.findViewById(R.id.item_date);\n\n editButton = itemView.findViewById(R.id.editButton);\n deleteButton = itemView.findViewById(R.id.deleteButton);\n\n editButton.setOnClickListener(this);\n deleteButton.setOnClickListener(this);\n\n }",
"protected Activity getContext() {\n return contextWeakReference.get();\n }",
"public ItemListAdapter(Context inContext) {\n context = inContext;\n }",
"public IContentContext getContentContext(\n )\n {return contents.getContentContext();}",
"public static Context getContext(){\n return appContext;\n }",
"protected final TranslationContext context() {\n\t\treturn context;\n\t}",
"public Context getContext() {\n return (Context)this;\n }",
"public Context getContext() {\n return this;\n }",
"public static Context getContext() {\n\t\treturn context;\n\t}",
"public static Context getContext() {\n\t\treturn context;\n\t}",
"@Override\n\tprotected Context getContext() {\n\t\treturn getActivity();\n\t}",
"public String getContext() {\n return context;\n }",
"public String getContext() {\n return context;\n }",
"public String getContext() {\n return context;\n }",
"public String getContext() {\r\n\t\treturn context;\r\n\t}",
"static synchronized Context getContext() {\n checkState();\n return sInstance.mContext;\n }",
"public Context getContext() {\n\t\treturn ctx;\n\t}",
"public static Context getAppContext() {\n return mContext;\n }",
"long getCurrentContext();",
"public ComponentContext getContext()\n\t{\n\t\treturn context;\n\t}",
"public ModuleContext getContext() {\r\n return context;\r\n }",
"public Converter( Context mContext){\n this.mContext=mContext;\n\n\n }",
"public static Activity getContext() {\n return instance;\n\n }",
"public String getContext() {\n\t\treturn context;\n\t}",
"private Context getContextAsync() {\n return getActivity() == null ? IotSensorsApplication.getApplication().getApplicationContext() : getActivity();\n }",
"public Context getContext() {\n return contextMain;\n }",
"public CategoryAdapter(Context context, FragmentManager fm) {\n super(fm);\n mContext = context;\n }",
"@Override\n public void onAttach(Context context) {\n mcontext = context;\n super.onAttach( context );\n }",
"MyRecyclerViewAdapter(Context context, ArrayList<Answer> answers) {\n this.mInflater = LayoutInflater.from(context);\n this.answers=answers;\n }",
"private Context getApplicationContext() {\n\t\treturn this.cordova.getActivity().getApplicationContext();\n\t}",
"private Context getApplicationContext() {\n\t\treturn this.cordova.getActivity().getApplicationContext();\n\t}",
"public abstract Context context();",
"MyRecyclerViewAdapter(Context context, List<String> data,List<String> giorno,List<String> primo,List<String> secondo,List<String> contorno,List<String> dolce) {\n this.mInflater = LayoutInflater.from(context);\n this.mdata = data;\n this.mgiorno = giorno;\n this.mprimo = primo;\n this.msecondo = secondo;\n this.mcontorno = contorno;\n this.mdolce = dolce;\n\n\n\n }",
"public ModelRecyclerAdapter(Context context, ArrayList<Model> myDataset) {\n mDataset = myDataset;\n mContext = context.getApplicationContext();\n mInflater = LayoutInflater.from(context);\n }",
"public ProjectItemAdapter(Context context)\r\n {\r\n super();\r\n \r\n inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\r\n projects = new ArrayList<Project>();\r\n }",
"Map<String, Object> getContext();",
"public DataPenemuanListAdapter(Context context) { mInflater = LayoutInflater.from(context); }",
"public interface FeatherContext {\n\n\t\t/**\n\t\t * Gets the Activity main image view.\n\t\t * \n\t\t * @return the main image\n\t\t */\n\t\tImageViewTouchBase getMainImage();\n\n\t\t/**\n\t\t * Gets the Activity bottom bar view.\n\t\t * \n\t\t * @return the bottom bar\n\t\t */\n\t\tBottombarViewFlipper getBottomBar();\n\n\t\t/**\n\t\t * Gets the Activity options panel container view.\n\t\t * \n\t\t * @return the options panel container\n\t\t */\n\t\tViewGroup getOptionsPanelContainer();\n\n\t\t/**\n\t\t * Gets the Activity drawing image container view.\n\t\t * \n\t\t * @return the drawing image container\n\t\t */\n\t\tViewGroup getDrawingImageContainer();\n\n\t\t/**\n\t\t * There's a special container drawn on top of all views, which can be used to add custom dialogs/popups.\n\t\t * \n\t\t * This is invisible by default and must be activated in order to be used\n\t\t * \n\t\t * @return\n\t\t */\n\t\tViewGroup activatePopupContainer();\n\n\t\t/**\n\t\t * When the there's no need to use the popup container anymore, you must deactivate it\n\t\t */\n\t\tvoid deactivatePopupContainer();\n\n\t\t/**\n\t\t * Show tool progress.\n\t\t */\n\t\tvoid showToolProgress();\n\n\t\t/**\n\t\t * Hide tool progress.\n\t\t */\n\t\tvoid hideToolProgress();\n\n\t\t/**\n\t\t * Show a modal progress\n\t\t */\n\t\tvoid showModalProgress();\n\n\t\t/**\n\t\t * Hide the modal progress\n\t\t */\n\t\tvoid hideModalProgress();\n\n\t\t/**\n\t\t * Gets the toolbar.\n\t\t * \n\t\t * @return the toolbar\n\t\t */\n\t\tToolbarView getToolbar();\n\t}",
"public MyRecyclerViewAdapter(Context context, ArrayList<itemView> data) {\n this.mInflater = LayoutInflater.from(context);\n this.mData = data;\n }",
"public AdapterForDisplayRecipes(Context context, ArrayList<RecipeModel> data) {\n mMainActivity = (MainActivity) context;\n this.mInflater = LayoutInflater.from(context);\n this.mData = data;\n// this.listener = listener;\n }",
"public static Context getContext() {\r\n\t\tif (mContext == null)\r\n\t\t\treturn null;\r\n\t\telse\r\n\t\t\treturn mContext;\r\n\r\n\t}",
"public Context getContext() {\n if (context == null) {\n context = Model.getSingleton().getSession().getContext(this.contextId);\n }\n return context;\n }",
"public static Context getContext() {\n\t\treturn instance;\n\t}",
"protected RestContext getContext() {\n\t\tif (context.get() == null)\n\t\t\tthrow new InternalServerError(\"RestContext object not set on resource.\");\n\t\treturn context.get();\n\t}",
"public Context getContext() {\n\t\treturn null;\n\t}",
"public ThingAdapter(Context context) {\n mInflater = LayoutInflater.from(context);\n this.context = context;\n }",
"public interface IView {\n Context getContexts();\n}",
"@Override\n public ListsAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int position) {\n View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.singleview, parent, false);\n ViewHolder vh = new ViewHolder(view);\n context = view.getContext();\n return vh;\n }",
"public static LifecycleContext getLifecycleContext()\n {\n return context;\n }",
"public MyServiceDataSingleton(Context context) {\r\n myContext = context;\r\n }",
"MyRecyclerViewAdapter(Context context, List<Integer> data) {\n this.mInflater = LayoutInflater.from(context);\n this.mData = data;\n }",
"@Override\n public boolean onContextItemSelected(MenuItem item) {\n\n try {\n title = ((MyRecyclerViewAdapter) mRecyclerView.getAdapter()).getTitle();\n notes = ((MyRecyclerViewAdapter) mRecyclerView.getAdapter()).getNotes();\n position = ((MyRecyclerViewAdapter) mRecyclerView.getAdapter()).getPosition();\n Log.i(TAG, \"title: \" + title);\n Log.i(TAG, \"note: \" + notes);\n Log.i(TAG, \"position: \" + position);\n } catch (Exception e) {\n Log.d(TAG, e.getLocalizedMessage());\n return super.onContextItemSelected(item);\n }\n if (item.getTitle() == \"Edit\") {\n editItem(title, notes);\n } else if (item.getTitle() == \"Delete\") {\n removeItem(title, position);\n } else if (item.getTitle() == \"Share via\") {\n shareItem(title, notes);\n } else if (item.getTitle() == \"Share via Facebook\") {\n shareItemFacebook(title, notes);\n } else {\n item.collapseActionView();\n }\n return super.onContextItemSelected(item);\n }",
"public DataBaseCache(Context context) {\n mContext = context;\n }",
"@Override\n public CallContext getCallContext() {\n return this.context;\n }",
"public Object getConnectionContext() {\n return connectionContext;\n }",
"public ContextInstance getContextInstance() {\n\t\treturn token.getProcessInstance().getContextInstance();\r\n\t}",
"@Override\n public Object getItem(int position) {\n return lsct.get(position);\n }",
"ContextBucket getContext() {\n\treturn context;\n }",
"@Override\r\n\tpublic Context getContext() {\n\t\treturn null;\r\n\t}",
"public static Context getInstance(){\n\t\treturn (Context) t.get();\n\t}",
"public MultimediaSuggestionsAdapter(Context context) {\n this.context = context;\n\n }",
"public Context getApplicationContext();",
"public static synchronized TodoDatabaseHelper getInstance(Context context) {\n if (todoDatabaseHelper == null) {\n todoDatabaseHelper = new TodoDatabaseHelper(context.getApplicationContext());\n }\n return todoDatabaseHelper;\n }",
"public abstract ItemListAdapter getAdapter(RecyclerView recyclerView);",
"public NoticiaViewHolder(View itemView) {\n super(itemView);\n itemView.setOnClickListener(this);\n txtTitulo = (TextView) itemView.findViewById(R.id.titulo);\n\n\n }",
"public WordListAdapter(Context context) { mInflater = LayoutInflater.from(context); }"
] |
[
"0.6935629",
"0.6893739",
"0.68284655",
"0.67745674",
"0.6695324",
"0.66205424",
"0.66205424",
"0.6593364",
"0.6539916",
"0.6522282",
"0.64545107",
"0.64112276",
"0.6409094",
"0.63815504",
"0.6375692",
"0.6347404",
"0.6282574",
"0.6268342",
"0.6234746",
"0.6234051",
"0.6234051",
"0.62312466",
"0.62186986",
"0.62116516",
"0.61830795",
"0.61583805",
"0.61583805",
"0.61559004",
"0.6127672",
"0.6123908",
"0.606364",
"0.6046586",
"0.60026413",
"0.5976985",
"0.5960545",
"0.5957842",
"0.59335685",
"0.5919235",
"0.59185433",
"0.5917333",
"0.5903577",
"0.58861434",
"0.58861434",
"0.58817387",
"0.587521",
"0.587521",
"0.587521",
"0.58700025",
"0.58494663",
"0.5849016",
"0.58488214",
"0.5831565",
"0.58176756",
"0.579715",
"0.5796332",
"0.5788487",
"0.578549",
"0.5784766",
"0.5743901",
"0.57311743",
"0.5698558",
"0.56979555",
"0.5693931",
"0.5693931",
"0.56573796",
"0.56457865",
"0.56410384",
"0.5636574",
"0.56301737",
"0.5597867",
"0.5595976",
"0.5592346",
"0.5591268",
"0.55907774",
"0.558055",
"0.5572443",
"0.5568391",
"0.5566083",
"0.55588984",
"0.55321336",
"0.55308354",
"0.5518582",
"0.55146277",
"0.55095744",
"0.5509007",
"0.5506139",
"0.5505256",
"0.55044556",
"0.54987526",
"0.5496025",
"0.5478623",
"0.54697645",
"0.54653406",
"0.54619634",
"0.545946",
"0.54557323",
"0.5451085",
"0.54509264",
"0.54500043"
] |
0.72587705
|
0
|
TODO Autogenerated method stub
|
@Override
public List<BuffetSendInfo> findPageInfoByOption(Session sess,
Integer stuId, Integer subId, Integer isfinish, Integer teaId, String sDate,
String eDate, Integer pageNo, Integer pageSize) {
String hql = " from BuffetSendInfo as bs where bs.studyLogInfo.user.id ="+stuId;
if(!subId.equals(0)){
hql+=" and bs.studyLogInfo.subject.id ="+subId;
}
if(!isfinish.equals(-1)){
hql+=" and bs.studyResult="+isfinish;
}
if(teaId > 0){//网络导师
hql += " and bs.studyLogInfo.teaId = "+teaId;
}
if (!sDate.equals("") && !eDate.equals("")){
hql += " and substring(bs.sendTime,1,10) >= '"+ sDate + "'";
hql += " and substring(bs.sendTime,1,10) <='" + eDate +"'";
}
int offset = (pageNo - 1) * pageSize;
if (offset < 0) {
offset = 0;
}
return sess.createQuery(hql).setFirstResult(offset).setMaxResults(pageSize).list();
}
|
{
"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
|
Run the machine, per the docs
|
public void execute() {
int loop = 0;
while (true) {
List<PatternItem> pattern;
List<TemplItem> template;
if (loop % 1000 == 0) {
System.out.println("Loop " + loop);
System.out.println(" rna: " + rna.getLength());
}
long start = System.currentTimeMillis();
pattern = pattern();
System.out.println("pattern time: " + (System.currentTimeMillis() - start) / 1000.0);
start = System.currentTimeMillis();
template = template();
System.out.println("template time: " + (System.currentTimeMillis() - start) / 1000.0);
System.out.println("pattern: " + patternToString(pattern));
System.out.println("template: " + templateToString(template));
matchreplace(pattern, template);
loop += 1;
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void runProgram() {\n\n\t\tSystem.out.println(\"\\n Time to start the machine... \\n\");\n\n\t\tpress.pressOlive(myOlives);\n\n\t\tSystem.out.println(\"Total amount of oil \" + press.getTotalOil());\n\t}",
"public void start() {\n System.out.println(\"Machine started.\");\n }",
"public static void main(String [] args){\n SmartPhone sm = new SmartPhone();\n sm.run();\n // System.out.println(sm.run());\n }",
"public static void main(String[] args) {\n\r\n\t\tMachine mac = new Machine();\r\n\t\t\r\n\t\tmac.start();\r\n\t\tmac.stop();\r\n\t\tSystem.out.println(\"----------------------\");\r\n\t\t\r\n\t\tCar bmw = new Car();\r\n\t\tbmw.start();\r\n\t\tbmw.stop();\r\n\t\tbmw.re_strat();\r\n\t\tSystem.out.println(\"-------------------\");\r\n\t\t\r\n\t\tMachine alto = new Car();\r\n\t\t\t\talto.start();\r\n\t\talto.stop();\r\n\t\tSystem.out.println(alto.engsize);\r\n\t\tSystem.out.println(\"---------------------------\");\t\r\n\t}",
"private static void sample1() {\n\t\tIComputer computer = new Computer();\n\t\tcomputer.setProgram(\n\t\t\t(byte) 0x70,\n\t\t\t(byte) 0x71,\n\t\t\t(byte) 0xc0,\n\t\t\t(byte) 0xc1,\n\t\t\t(byte) 0x70,\n\t\t\t(byte) 0xc0,\n\t\t\t(byte) 0xff);\n\t\tTestContext context = new TestContext(\n\t\t (byte) 0xa1, (byte) 0x9b, (byte) 0x3c);\n\t\tcomputer.run(context);\n\t\tSystem.out.println(context.outputToString());\n\t}",
"public static void main(String[] args) {\r\n\r\n run();\r\n }",
"public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\r\n\t\t\r\n\t\t//prompt for user input \r\n\t\tSystem.out.println(\"Enter a line of text to control the machine.\\n\");\r\n\t\t\r\n\t\t//enter the text\r\n\t\tString text = input.nextLine();\r\n\t\t\r\n\t\t//create a switch statement for text\r\n\t\tswitch(text){\r\n\t\t\tcase \"start\":\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"\\nMachine Started!!\\n\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase \"stop\":\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Machine Stopped!!\\n\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase \"speed up\":\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Speed increased!!\\n\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase \"speed down\":\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Speed Decreased!!\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tdefault:\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Wrong input.Please try again.\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t\tMachine mach1 = new Machine();\n\t\t\n\t\tmach1.start();\n\t\tmach1.stop();\n\t\t\n\t\tCar car1 = new Car();\n\t\t\n\t\t//Using 'extends' in the Car class we made it inherit all the methods of Machine class\n\t\tcar1.start();\n\t\tcar1.stop();\n\t\t//We can also add methods that aren't included in the 'parent' class\n\t\tcar1.wipe();\n\t\t//\n\t\tcar1.showInfo();\n\t}",
"public void run() {\n\t\trun(null, CommunicationDefaults.CONSOLE_PORT);\n\t}",
"public static void main(String[] args) {\n Simulation sim = new Simulation();\n //runs it.\n sim.Run();\n }",
"public static void main(String[] args) {\n Computer computer = new Computer();\n computer.description();\n for (int i = 0; i != computer.resource; i++) {\n computer.on();\n computer.off();\n }\n }",
"public static void main(String[] args){\n\t\tXenVM vm22 = new XenVM(\"vm22\", \"172.16.1.22\", 22, \"root\", \"welcome\");\n\t\t//XenVM vm31 = new XenVM(\"vm31\", \"172.16.1.31\", 22, \"root\", \"welcome\");\n\t\t//XenVM vm31 = new XenVM(\"vm31\", \"172.16.1.31\", 22, \"root\", \"welcome\");\n\t\t//XenVM vm21 = new XenVM(\"vm21\", \"172.16.1.21\", 22, \"root\", \"welcome\");\n\t\t//StartApp s11 = new StartApp(vm11);\n\t\tStartApp s22 = new StartApp(vm22);\n\t\t//StartApp s31 = new StartApp(vm31);\n\t\t//StartApp s31 = new StartApp(vm31);\n\t\t//StartApp s21 = new StartApp(vm21);\n\t\t//s11.start();\n\t\ts22.start();\n\t\t//s31.start();\n\t\t//s11.join();\n\t\t//s12.join();\n\t\t//s31.join();\n\t\t//s21.start();\n\t\ts22.join();\n\t}",
"public static void main(String[] args) {\n Run();\n }",
"public static void main(String[] args) throws Exception {\n run();\n }",
"public static void main(String[] args) {\n\t\trun();\n\t\t//runTest();\n\n\t}",
"public static void run() {\n }",
"public static void main(String[] args) {\n\t\tTestProgram et = new TestProgram();\n\t\tet.Slotmachine();\n\t}",
"public static void main(String[] args) {\n //launch it\n launch();\n }",
"public void runProgram()\n\t{\n\t\tintro();\n\t\tfindLength();\n\t\tguessLetter();\n\t\tguessName();\n\t}",
"public static void main(String[] args) {\n\t\tVendingMachine machine = new VendingMachine();\n\t}",
"private static void sample2() {\n\t\tIComputer computer = new Computer();\n\t\tcomputer.setProgram(\n\t\t\t(byte) 0x70,\n\t\t\t(byte) 0xff,\n\t\t\t(byte) 0xc0,\n\t\t\t(byte) 0xc1,\n\t\t\t(byte) 0x70,\n\t\t\t(byte) 0xc0,\n\t\t\t(byte) 0xff);\n\t\tTestContext context = new TestContext(\n\t\t (byte) 0xa1, (byte) 0x9b, (byte) 0x3c);\n\t\tcomputer.run(context);\n\t\tSystem.out.println(context.outputToString());\n\t}",
"public static void main(String[] args) {\n Computer computer = new Computer.Builder()\n .withCase(\"Tower\")\n .withCPU(\"Intel i5\")\n .withMotherboard(\"MSI B360M-MORTAR\")\n .withGPU(\"nVidia Geforce GTX 750ti\")\n .withHDD(\"Toshiba 1TB\")\n .withOperatingSystem(\"Windows 10\")\n .withPowerSupply(500)\n .withAmountOfRam(8)\n .build();\n /* Not as clean as first example\n\n Computer computer = new Computer(\"Tower\", \"Intel i5\", \"MSI B360M-MORTAR\",\n \"nVidia GeForce GTX 750ti\", \"Toshiba 1TB\", \"Windows 10\", 500, 8);\n */\n }",
"void run() {\n\t\trunC();\n\t\trunPLMISL();\n\t\trunTolerance();\n\t\trunMatrix();\n\t}",
"public static void main(String[] args) {\n\n experiment();\n }",
"public static void main(String[] args) {\t\t\r\n\t\tRunning runningApple = new Apple(\"Name\",\"Apple\");\r\n\t\trunningApple.run();\r\n\t}",
"public static void main(String... args) {\n doMain().run();\n }",
"void run();",
"void run();",
"void run();",
"void run();",
"public void run() {\n\t\t\t\tui = new GUI();\n\t\t\t\tui.generateUI();\n\t\t\t\tui.showUI(true);\n\n\t\t\t\t// Start sim ticking - sim is initialized below *before* this is called\n\t\t\t\tsim.newSim();\n\t\t\t\tsim.start();\n\t\t\t}",
"public static void main (String[] args) {\n\n Config config = ConfigUtils.loadConfig(\"/home/gregor/git/matsim/examples/scenarios/pt-tutorial/0.config.xml\");\n// config.controler().setLastIteration(0);\n// config.plans().setHandlingOfPlansWithoutRoutingMode(PlansConfigGroup.HandlingOfPlansWithoutRoutingMode.useMainModeIdentifier);\n// Scenario scenario = ScenarioUtils.loadScenario(config);\n// Controler controler = new Controler(scenario);\n// controler.run();\n\n\n// Config config = this.utils.loadConfig(IOUtils.extendUrl(ExamplesUtils.getTestScenarioURL(\"pt-tutorial\"), \"0.config.xml\"));\n config.controler().setLastIteration(1);\n config.plans().setHandlingOfPlansWithoutRoutingMode(PlansConfigGroup.HandlingOfPlansWithoutRoutingMode.useMainModeIdentifier);\n\n\n// try {\n Controler controler = new Controler(config);\n// final EnterVehicleEventCounter enterVehicleEventCounter = new EnterVehicleEventCounter();\n// final StageActivityDurationChecker stageActivityDurationChecker = new StageActivityDurationChecker();\n// controler.addOverridingModule( new AbstractModule(){\n// @Override public void install() {\n// this.addEventHandlerBinding().toInstance( enterVehicleEventCounter );\n// this.addEventHandlerBinding().toInstance( stageActivityDurationChecker );\n// }\n// });\n controler.run();\n }",
"public static void main(String[] args) \n throws InterruptedException {\n // instantiate remote control test instance\n RemoteControlTest remoteControlTest = new RemoteControlTest();\n // create remote control sensor\n RemoteControlSensor sensor = new RemoteControlSensor();\n sensor.addRemoteControlListener(remoteControlTest);\n // reset engine\n remoteControlTest.reset();\n // just run until RUN button is pressed again\n Button.RUN.waitForPressAndRelease();\n System.exit( 0);\n }",
"@Override\n\tpublic void run() {\n\t\tSystem.out.println(\"hi deepali\");\n\t\t\n\t}",
"public void run() {\n // The run method should be overridden by the subordinate class. Please\n // see the example applications provided for more details.\n }",
"public static void main(String[] args) {\n\t\tlaunch();\n\t}",
"void launch();",
"void launch();",
"void launch();",
"default void run() {\n\t\tSystem.out.println(\"run\");\r\n\t}",
"public static void main(String[] args) {\n\t launch(args);\n\t }",
"public static void main(String[] args) {\n\t launch(args);\n\t }",
"public static void main(String[] args) throws Exception {\r\n\t\tSimulatorApp toyRobotSimulator = new SimulatorApp();\t\r\n\t\ttoyRobotSimulator.simulate();\r\n\t}",
"public void run(){\n\n Thread t;\n try {\n t = new Thread(command);\n t.start();\n if (DEBUG) System.out.println(\"Virtual Machine: \" + command_file + \" started\");\n exit_state = command.getExitStatus();\n } catch (Exception e){\n e.printStackTrace();\n System.out.println(\"error executing \" + command_file + \": \" + e.toString());\n exit_state = false;\n }\n\n\n }",
"public void run() throws IOException{\t\n\t\t\tString command;\n\t\t\tprintUsage();\n\t\t\tSystem.out.print(\">> \");\n\t\t\twhile(!(command = consoleIn.readLine()).trim().equals(\"exit\")){\n\t\t\t\ttry{\n\t\t\t\t\tswitch(command){\n\t\t\t\t\tcase \"1\":\n\t\t\t\t\t\tsimulatable = MordorFrameBuilds.getInstance();\n\t\t\t\t\t\trunSimulation();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"2\":\n\t\t\t\t\t\tsimulatable = CastSimulator.getInstance();\n\t\t\t\t\t\t((CastSimulator)simulatable).configureFor(CastAlias.TRAPRUNE_TRAP);\n\t\t\t\t\t\trunSimulation();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"3\":\n\t\t\t\t\t\tsimulatable = CastSimulator.getInstance();\n\t\t\t\t\t\t((CastSimulator)simulatable).configureFor(CastAlias.TRAPRUNE_TOWER);\n\t\t\t\t\t\trunSimulation();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"4\":\n\t\t\t\t\t\tsimulatable = TroopStepSimulator.getInstance();\n\t\t\t\t\t\t((TroopStepSimulator)simulatable)\n\t\t\t\t\t\t\t.configureFor(TroopStepSimulator.TroopStepAlias.DEFAULT);\n\t\t\t\t\t\trunSimulation();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"5\":\n\t\t\t\t\t\tsimulatable = TroopStepSimulator.getInstance();\n\t\t\t\t\t\t((TroopStepSimulator)simulatable)\n\t\t\t\t\t\t\t.configureFor(TroopStepSimulator.TroopStepAlias.TRAP_AFFECTS);\n\t\t\t\t\t\trunSimulation();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"6\":\n\t\t\t\t\t\tsimulatable = MissileDamageSimulator.getInstance();\n\t\t\t\t\t\trunSimulation();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"7\":\n\t\t\t\t\t\tsimulatable = TroopStepSimulator.getInstance();\n\t\t\t\t\t\t((TroopStepSimulator)simulatable)\n\t\t\t\t\t\t\t.configureFor(TroopStepSimulator.TroopStepAlias.TOWER_FIRES);\n\t\t\t\t\t\trunSimulation();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"8\":\n\t\t\t\t\t\tsimulatable = CastSimulator.getInstance();\n\t\t\t\t\t\t((CastSimulator)simulatable).configureFor(CastAlias.TOWER_GROUND);\n\t\t\t\t\t\trunSimulation();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"9\":\n\t\t\t\t\t\tsimulatable = CastSimulator.getInstance();\n\t\t\t\t\t\t((CastSimulator)simulatable).configureFor(CastAlias.TRAP_ROAD);\n\t\t\t\t\t\trunSimulation();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"10\":\n\t\t\t\t\t\tsimulatable = CastSimulator.getInstance();\n\t\t\t\t\t\t((CastSimulator)simulatable).configureFor(CastAlias.MAGIC);\n\t\t\t\t\t\trunSimulation();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"11\":\n\t\t\t\t\t\tsimulatable = TroopStepSimulator.getInstance();\n\t\t\t\t\t\t((TroopStepSimulator)simulatable)\n\t\t\t\t\t\t\t.configureFor(TroopStepSimulator.TroopStepAlias.DAMAGES_MOUNTAIN);\n\t\t\t\t\t\trunSimulation();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: printUsage();\n\t\t\t\t\t}\n\t\t\t\t}catch(IOException e){\n\t\t\t\t\tSystem.out.println(\"io error: \"+e.getClass().getName()+\": \"+e.getMessage());\n\t\t\t\t}catch(Exception ex){\n\t\t\t\t\tSystem.out.println(\"exception in main thread: \"+ex.getClass()+\": \"+ex.getMessage());\n\t\t\t\t}finally{\n\t\t\t\t\tSystem.out.print(\">> \");\n\t\t\t\t}\n\t\t\t}\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tlaunch(args);\r\n\r\n\t}",
"public static void main(String[ ] args) {\r\n Machine m1 = new Machine() {\r\n @Override public void start() {\r\n System.out.println(\"Wooooo\");\r\n }\r\n };\r\n Machine m2 = new Machine();\r\n m2.start();\r\n m2.end();\r\n }",
"public static void main(String[] args) {\r\n\t\tlaunch(args);\r\n\t}",
"public static void main(String[] args) {\r\n\t\tlaunch(args);\r\n\t}",
"public static void main(String[] args) {\r\n\t\tlaunch(args);\r\n\t}",
"public static void main(String[] args) {\r\n\t\tlaunch(args);\r\n\t}",
"public void run() {\n\t\t\tconsole.run();\n\t\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\r\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\r\n\t}",
"public static void main(String[] args){\r\n\t\tstart();\r\n\t}",
"public void _run() {\n String[] args = (String[])tEnv.getObjRelation(\"ARGS\");\n\n log.println(\"Running with arguments:\");\n for (int i=0; i< args.length; i++)\n log.println(\"#\" + i + \": \" + args[i]);\n\n oObj.run(args);\n\n tRes.tested(\"run()\", true);\n }",
"public static void main(String[] args) {\n\t\t\n\t\tRobot robot = new Robot();\n\t\trobot.drive();\n\t\trobot.honk();\n\t\trobot.fly();\n\t}",
"public static void main(String[] args) {\n launch(args);\r\n \r\n }",
"public static void main(String[] args) throws Exception {\n int portNumber = 9876;\n new Controller(portNumber).run();\n\n }",
"public static void run(String[] args) {\n launch(args);\n }",
"public static void main(String[] args) {\n\t\tnew Simulation();\n\n\t}",
"public void run(){\n\t\tstartServer();\n\t}",
"public static void main(String[] args) {\n\r\n\t\tMachine machine = new Machine(5);\r\n\t\tSystem.out.println(machine);\r\n\t\t\r\n\t\tmachine.insertQuarter();\r\n\t\tmachine.turnCrank();\r\n\t\t\r\n\t\tSystem.out.println(machine);\r\n\t\t\r\n\t\tmachine.insertQuarter();\r\n\t\tmachine.turnCrank();\r\n\t\tmachine.insertQuarter();\r\n\t\tmachine.turnCrank();\r\n\t\t\r\n\t\tSystem.out.println(machine);\r\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\r\n\t\t\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main(String[] args) {\n\t\tlaunch(args);\n\t}",
"public static void main (String[] args) {\n launch(args);\n }",
"public static void main(String[] args) throws IOException{\n\t\trunProgram();\n\t}",
"@Override\n\tpublic void run() {\n\t\tList<ProfileData> base=this.readBattery(this.batteryBasedFile);\n\t\tList<ProfileData> cpuFull=this.readBattery(this.batteryCPUFile);\n\t\t\n\t\tDefaultNetworkEnergyManager nem = MANAGER_FACTORY.createNetworkEnergyManager(networkEnergyManagerEnable, wifiSignalStrength);\n\t\tDefaultBatteryManager sb=MANAGER_FACTORY.createBatteryManager(2, startCharge, startUptime, batteryCapacityInJoules);\n\t\tfor(ProfileData b:base)\n\t\t\tsb.addProfileData(0, b);\n\t\tfor(ProfileData b:cpuFull)\n\t\t\tsb.addProfileData(1, b);\n\t\t\n\t\tDefaultExecutionManager se=MANAGER_FACTORY.createExecutionManager();\t\t\n\t\tse.setMips(this.flops);\n\t\tDevice d= MANAGER_FACTORY.createDevice(this.nodeId, sb, se, nem);\n\t\t\n\t\tsimLock.lock();\n\t\tNetworkModel.getModel().addNewNode(d);\n\t\tSimulation.addEntity(d);\n\t\tthis.dId=Simulation.getEntityId(this.nodeId);\n\t\tsimLock.unlock();\n\t\t\n\t\tsb.setDevice(d);\n\t\tse.setDevice(d);\n\t\tnem.setDevice(d);\n\t\tse.setBatteryManager(sb);\n\t\tnem.setBatteryManager(sb);\n\t\tsb.setSEASExecutionManager(se);\n\t\t\t\t\t\t\n\t\tthis.readCPUEvents();\n\t\t\n\t\tthis.eventLock.lock();\n\t\tEvent e=Event.createEvent(Event.NO_SOURCE, this.startTime, this.dId, Device.EVENT_TYPE_DEVICE_START, null);\n\t\tthis.eventLock.unlock();\n\t\tthis.simLock.lock();\n\t\tSimulation.addEvent(e);\n\t\tthis.simLock.unlock();\n\t}",
"public static void main(String[] args) {\nMaestro go = new Maestro();\n\t\t\n\t\tgo.Start();\n\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tAbstractexample c =new Abstractexample();\r\n\t\tc.run();\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n Dimensions dimensions = new Dimensions(20, 20, 5);\r\n Case theCase = new Case(\"220B\", \"Dell\", \"240\", dimensions);\r\n\r\n Monitor theMonitor = new Monitor(\"27inch Beast\", \"Acer\", 27, new Resolution(2540, 1440));\r\n\r\n Motherboard theMotherboard = new Motherboard(\"BJ-200\", \"Asus\", 4, 6, \"v2.44\");\r\n\r\n PC thePC = new PC(theCase, theMonitor, theMotherboard);\r\n thePC.powerUp();\r\n\r\n Table theTable = new Table(\"Dark Wood\", 1, 2, 1, 6);\r\n Couch theCouch = new Couch(\"Beige\", \"Fethers\", 4);\r\n LivingRoom livingRoom = new LivingRoom(4, 10, theTable, theCouch);\r\n\r\n livingRoom.getTable().serveTable();\r\n livingRoom.confyGuests();\r\n }",
"public static void main(String[] args) {\n Dimensions dimensions = new Dimensions(20, 20, 5);\n\t Case theCase = new Case(\"220B\", \"Dell\", \"240\", dimensions);\n\n\t Monitor theMonitor = new Monitor(\"Chromebook\", \"Google\", 27, new Resolution(2540, 1440));\n\t Motherboard theMotherboard = new Motherboard(\"BJ-200\", \"Asus\", 4, 6, \"v2.44\");\n\n\t // created PC class by passing 3 objects into our PC constructor\n\t PC thePC = new PC(theCase, theMonitor, theMotherboard);\n\t // we can access methods and variable from our various objects by accessing the returned object in our getter\n\t\tthePC.powerUp();\n\n }",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t\ttest testt = new test();\r\n\t\ttestt.oninIt();\r\n\t\ttry {\r\n\t\t\ttestt.pingServer();\r\n\t\t} catch (DeploymentException | IOException | URISyntaxException | InterruptedException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"private void runEm() {\n renameOriginalDomainConfig();\n\n testV3_0_1Domain();\n\n // after all the tests have run, move back the old domain\n restoreOriginalDomainConfig();\n\n // print results\n stat.printSummary();\n }",
"public static void main(String[] args){\n\t\tnew VanRentalSystem().run(args[0]);\n\t}",
"private void runSimulation() throws Exception{\n\t\tsimulatable.simulate();\n\t\tprintUsage();\n\t}",
"public abstract String run(String args);",
"public void run(String... args) throws Exception {\n\t\t\n\t}",
"public static void main(String[] args) {\n PC pc = new PC();\n pc.setCPU(\"AMD R9\");\n pc.setDisk(\"sanxing\");\n pc.setMemory(1024);\n pc.setBrand(\"macbook\");\n pc.printInfo();\n }",
"public static void run(){}",
"public static void main(String[] args) {\n launch(args);\r\n }",
"public static void main(String[] args) {\n launch(args);\r\n }",
"public static void main(String[] args) {\n launch(args);\r\n }",
"public void run() {\n TasksCounter tc = new TasksCounter(tasks);\n new Window(tc);\n Ui.welcome();\n boolean isExit = false;\n Scanner in = new Scanner(System.in);\n while (!isExit) {\n try {\n String fullCommand = Ui.readLine(in);\n Command c = Parser.commandLine(fullCommand);\n c.execute(tasks, members, storage);\n isExit = c.isExit();\n } catch (DukeException e) {\n Ui.print(e.getMessage());\n }\n }\n }",
"public void run() {\n Runtime.getRuntime().addShutdownHook(new MNOSManagerShutdownHook(this));\n\n OFNiciraVendorExtensions.initialize();\n\n this.startDatabase();\n\n try {\n final ServerBootstrap switchServerBootStrap = this\n .createServerBootStrap();\n\n this.setServerBootStrapParams(switchServerBootStrap);\n\n switchServerBootStrap.setPipelineFactory(this.pfact);\n final InetSocketAddress sa = this.ofHost == null ? new InetSocketAddress(\n this.ofPort) : new InetSocketAddress(this.ofHost,\n this.ofPort);\n this.sg.add(switchServerBootStrap.bind(sa));\n }catch (final Exception e){\n throw new RuntimeException(e);\n }\n\n }",
"private static void simpleRun(String [] args){\n\t\tString applicationPath = convertApplication(args[2], null);\n\t\tboolean testHardware = args[0].equals(\"-testCGRAVerilog\");\n\t\t\n\t\t\n\t\tboolean synthesis = false;\n\t\tif(args[0].equals(\"-testCGRAVerilog\") || args[3].equals(\"true\")){\n\t\t\tsynthesis = true;\n\t\t} else if (args[3].equals(\"false\")){\n\t\t\tsynthesis = false;\n\t\t} else{\n\t\t\tSystem.out.println(\"Synthesis parameter not set correctly: \" + args[3]+ \"\");\n\t\t\tSystem.out.println(\"Valid values are \\\"true\\\" and \\\"false\\\"\");\n\t\t\tSystem.out.println(\"Aborting...\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\tConfMan configManager = new ConfMan(args[1], applicationPath, synthesis);\n\t\t\n\t\tTrace simpleRunTrace = new Trace(System.out, System.in, \"\", \"\");\n\t\tif(configManager.getTraceActivation(\"config\")){\n\t\t\tsimpleRunTrace.setPrefix(\"config\");\n\t\t\tconfigManager.printConfig(simpleRunTrace);\n\t\t}\n\n\t\tDecimalFormatSymbols symbols = new DecimalFormatSymbols();\n\t\tsymbols.setGroupingSeparator(',');\n\t\tsymbols.setDecimalSeparator('.');\n\t\tDecimalFormat formater = new DecimalFormat(\"#.000\", symbols);\n\t\t\n\t\tAmidarSimulationResult results = run(configManager, null, testHardware);\n\t\t\n\t\tif(configManager.getTraceActivation(\"results\")){\n\t\t\tsimpleRunTrace.setPrefix(\"results\");\n\t\t\tsimpleRunTrace.printTableHeader(\"Simulated \"+applicationPath+\" - Synthesis \"+(configManager.getSynthesis()?\"ON\":\"OFF\"));\n\t\t\tsimpleRunTrace.println(\"Ticks: \"+results.getTicks());\n\t\t\tsimpleRunTrace.println(\"Bytecodes: \"+results.getByteCodes());\n\t\t\tsimpleRunTrace.println(\"Energy consumption: \"+formater.format(results.getEnergy()));\n\t\t\tsimpleRunTrace.println(\"Execution Time: \"+results.getExecutionDuration()+\" ms\");\n\t\t\tsimpleRunTrace.printTableHeader(\"Loop Profiling\");\n\t\t\tresults.getProfiler().reportProfile(simpleRunTrace);\n\t\t\tsimpleRunTrace.printTableHeader(\"Kernel Profiling\");\n\t\t\tresults.getKernelProfiler().reportProfile(simpleRunTrace, results.getTicks());\n\t\t}\n\t\t\n\t\tif(testHardware){\n\t\t\tsimpleRunTrace.setPrefix(\"CGRA verilog test\");\n\t\t\tsimpleRunTrace.printTableHeader(\"Testing CGRA Verilog descrption\");\n\t\t\tAmidar core = results.getAmidarCore();\n\t\t\tCGRA myCGRA = (CGRA)core.functionalUnits[core.functionalUnits.length-1]; // CGRA is the last one\n\t\t\t\n\t\t VerilogGenerator gen = target.Processor.Instance.getGenerator();\n\t\t CgraModel model = myCGRA.getModel();\n\t\t model.finalizeCgra();\n\t\t simpleRunTrace.println(\"Generate Verilog...\");\n\t\t gen.printVerilogDescription(\"out\",model);\n\t\t TestbenchGeneratorAmidar tbgen = new TestbenchGeneratorAmidar((VerilogGeneratorAmidar) gen);\n\t\t StimulusAmidar[] stimuli = new StimulusAmidar[1];\n\t\t stimuli = myCGRA.getStimulus().toArray(stimuli);\n\t\t TestbenchContextGenerator tbcongen = new TestbenchContextGenerator(model);\n\t\t tbcongen.exportContext(myCGRA.getContextCopyPEs(), myCGRA.getContextCopyCBOX(), myCGRA.getContextCopyCCU());\n//\t\t for(Stimulus stim : stimuli){\n//\t\t \tSystem.out.println(stim);\n//\t\t }\n\t\t \n\t\t tbgen.exportAppAndPrintTestbench(stimuli);\n\t\t \n//\t\t tbgen.importAppAndPrintTestbench(\"SimpleTest.main\");\n\t\t TestbenchExecutor tbex = new TestbenchExecutor();\n\t\t \n\t\t if(tbex.runTestbench()){\n\t\t \tsimpleRunTrace.println(\"Run was successful - Cosimulation succeeded\");\n\t\t }\n\t\t else{\n\t\t \tConsistencyChecker sammi = new ConsistencyChecker();\n\t\t \tboolean mismatch = sammi.findRegfileMismatch();\n\t\t \tif(mismatch){\n\t\t \t\tsimpleRunTrace.println(\"Error(s) during Simulation. Something went wrong in the data path\");\n\t\t \t}\n\t\t \telse{\n\t\t \t\tsimpleRunTrace.println(\"Emulation / HDL missmatch. Maybe there's is something not equal concerning the communication or FSM.\");\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\n\t}",
"public static void main(String[] args) {\r\n launch(args);\r\n }",
"public static void main(String[] args) {\r\n launch(args);\r\n }",
"public static void main(String[] args) {\r\n launch(args);\r\n }"
] |
[
"0.7206172",
"0.67959577",
"0.67029256",
"0.66467494",
"0.66244906",
"0.659175",
"0.65730083",
"0.65424705",
"0.6499886",
"0.6494567",
"0.6491655",
"0.64461374",
"0.6405388",
"0.6386811",
"0.63726574",
"0.63714254",
"0.636954",
"0.63503486",
"0.63409746",
"0.63331467",
"0.6332327",
"0.63296926",
"0.6326885",
"0.6293121",
"0.6290129",
"0.6281598",
"0.62747616",
"0.62747616",
"0.62747616",
"0.62747616",
"0.6274511",
"0.62698627",
"0.62539434",
"0.6253583",
"0.6242092",
"0.62283486",
"0.6228199",
"0.6228199",
"0.6228199",
"0.6225334",
"0.6220409",
"0.6220409",
"0.62181276",
"0.6209038",
"0.6200854",
"0.61754835",
"0.6159836",
"0.61578286",
"0.61578286",
"0.61578286",
"0.61578286",
"0.6154028",
"0.6151144",
"0.6151144",
"0.6146417",
"0.614576",
"0.6144244",
"0.6142291",
"0.61366415",
"0.61304826",
"0.61280566",
"0.61191547",
"0.61150134",
"0.61143446",
"0.6109708",
"0.6109708",
"0.6109708",
"0.6109708",
"0.6109708",
"0.6109708",
"0.6109708",
"0.6109708",
"0.6109708",
"0.6109708",
"0.6109708",
"0.6109708",
"0.6109708",
"0.6101421",
"0.60967934",
"0.60955584",
"0.60897475",
"0.60806245",
"0.60782254",
"0.60714966",
"0.6070473",
"0.6070437",
"0.6066533",
"0.60646164",
"0.6064434",
"0.60559857",
"0.6038267",
"0.6035572",
"0.6035173",
"0.6035173",
"0.6035173",
"0.60350114",
"0.6033136",
"0.6032007",
"0.60306656",
"0.60299116",
"0.60299116"
] |
0.0
|
-1
|
Specify the file to write the final RNA to
|
public void setOutputFile(File out) {
rnaFile = out;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"protected abstract void writeFile();",
"public void outputToFile(MethodCallExpr original, MethodCallExpr mutant) {\n if (comp_unit == null || currentMethodSignature == null){\n return;\n }\n num++;\n String f_name = getSourceName(\"ARGR\");\n String mutant_dir = getMuantID(\"ARGR\");\n try {\n PrintWriter out = getPrintWriter(f_name);\n ARGR_Writer writer = new ARGR_Writer(mutant_dir, out);\n writer.setMutant(original, mutant);\n writer.setMethodSignature(currentMethodSignature);\n writer.writeFile(comp_unit);\n out.flush();\n out.close();\n }\n catch (IOException e) {\n System.err.println(\"ARGR: Fails to create \" + f_name);\n logger.error(\"Fails to create \" + f_name);\n }\n }",
"public void outputToFile(String filemame)\n {\n }",
"public void finish() {\n if (rnaFile != null) {\n try {\n FileWriter writer = new FileWriter(rnaFile);\n writer.write(rna.toString());\n writer.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }\n\n System.exit(0);\n }",
"public abstract void writeToFile( );",
"public void writeToFile(File file) {\n\n\t}",
"private static void writeToFile(String[] data) {\n\t\t// Regatta hasn't been calculated.\n\t\tif(r == null) {\n\t\t\tSystem.out.println(\"\\nYou haven't processed a regatta yet! \\nUse regatta to begin processing.\\n\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Just the command was specified, we need to get the filename.\n\t\tif(data.length == 1) {\n\t\t\tSystem.out.println(\"Oops, looks like you didn't specify an output file.\\n\");\n\t\t\tinitializeOutput(getFilename());\n\t\t}\n\n\t\t// Filename was specified but is invalid. Need to get another one.\n\t\tif(!isValidFileName(data[1])) {\n\t\t\tSystem.out.println(\"Looks like your filename is incorrect.\\n\");\n\t\t\tinitializeOutput(getFilename());\n\t\t}\n\n\t\tinitializeOutput(data[1]);\n\n\t\t// Write out.\n\t\tfileOutput.print(r.podium());\n\t\tfileOutput.close();\n\t}",
"public final void saveToFile() {\n\t\tWrite.midi(getScore(), getName()+\".mid\"); \n\t}",
"public void saveGame(File fileLocation);",
"public void writeToFile() {\n try {\n // stworz plik\n File file = new File(\"../Alice.ids\");\n // stworz bufor zapisu do pliku\n FileWriter fileWriter = new FileWriter(file);\n for(int i = 0; i < identificationNumbers.length; i++) {\n for(int j = 0; j < identificationNumbers[i].length; j++)\n fileWriter.write(Integer.toString(identificationNumbers[i][j]));\n\t\t\t fileWriter.write(\"\\n\");\n }\n\t\t\tfileWriter.flush();\n\t\t\tfileWriter.close();\n } catch(Exception e) {\n e.printStackTrace();\n }\n }",
"public void save (File argFile) throws IOException;",
"private static void writeToOutput() {\r\n FileWriter salida = null;\r\n String archivo;\r\n JFileChooser jFC = new JFileChooser();\r\n jFC.setDialogTitle(\"KWIC - Seleccione el archivo de salida\");\r\n jFC.setCurrentDirectory(new File(\"src\"));\r\n int res = jFC.showSaveDialog(null);\r\n if (res == JFileChooser.APPROVE_OPTION) {\r\n archivo = jFC.getSelectedFile().getPath();\r\n } else {\r\n archivo = \"src/output.txt\";\r\n }\r\n try {\r\n salida = new FileWriter(archivo);\r\n PrintWriter bfw = new PrintWriter(salida);\r\n System.out.println(\"Índice-KWIC:\");\r\n for (String sentence : kwicIndex) {\r\n bfw.println(sentence);\r\n System.out.println(sentence);\r\n }\r\n bfw.close();\r\n System.out.println(\"Se ha creado satisfactoriamente el archivo de texto\");\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public void setOutputFile(File params) {\n outputFile = params;\n }",
"public abstract void saveToFile(PrintWriter out);",
"public void writeFile()\n\t{\n\t\t//Printwriter object\n\t\tPrintWriter writer = FileUtils.openToWrite(\"TobaccoUse.txt\");\n\t\twriter.print(\"Year, State, Abbreviation, Percentage of Tobacco Use\\n\");\n\t\tfor(int i = 0; i < tobacco.size(); i++)\n\t\t{\n\t\t\tStateTobacco state = tobacco.get(i);\n\t\t\tString name = state.getState();\n\t\t\tString abbr = state.getAbbreviation();\n\t\t\tdouble percent = state.getPercentUse();\n\t\t\tint year = state.getYear();\n\t\t\twriter.print(\"\"+ year + \", \" + name + \", \" + abbr + \", \" + percent + \"\\n\");\n\t\t} \n\t\twriter.close(); //closes printwriter object\n\t}",
"private void save() throws FileNotFoundException {\n\t\tm.write(new FileOutputStream(OUTPUT), \"RDF/XML\");\n\t}",
"public void sequenceWriter(String sequence) {\n try {\n Files.write(file, ((sequence + \"\\r\\n\")).getBytes(), StandardOpenOption.APPEND);\n } catch (IOException e) {\n System.out.println(\"Error:\" + e);\n }\n }",
"public void SerialWriteFile() {\r\n\r\n PrintWriter pwrite = null;\r\n File fileObject = new File(getName());\r\n QuizPlayer q = new QuizPlayer(getName(), getNickname(), getTotalScore());\r\n\r\n try {\r\n ObjectOutputStream outputStream =\r\n new ObjectOutputStream(new FileOutputStream(fileObject));\r\n\r\n outputStream.writeObject(q); //Writes the object to the serialized file.\r\n outputStream.close();\r\n\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Problem with file output.\");\r\n }\r\n\r\n }",
"public void saveFile() {\n\t\tPrintWriter output = null;\n\t\ttry {\n\t\t\toutput = new PrintWriter(\"/Users/katejeon/Documents/Spring_2020/CPSC_35339/avengers_project/game_result.txt\");\n\t\t\toutput.println(textArea.getText());\n\t\t\toutput.flush();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"File doesn't exist.\");\n\t\t} finally {\n\t\t\toutput.close();\n\t\t}\n\t}",
"public void writeToFile(RandomAccessFile fio) {\n try {\n fio.writeInt(number);\n fio.writeUTF(name);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }",
"public static void main(String[] args) throws IOException {\n\t\tString FinalContigWritePath = args[0];\n\t\tString ContigAfterPath = args[1];\n\t\tString DataName = args[2];\n\t\tString RealString = CommonClass.readContigFile(ContigAfterPath);\n\t\t//Write.\n\t\tFileWriter writer1 = new FileWriter(FinalContigWritePath + \"contig.\" + DataName + \".changgeLines.fa\", true);\n\t\twriter1.write(RealString);\n\t\twriter1.close();\n\t\tSystem.out.println(\"File write process end!\");\n\t}",
"public void writeFile() \r\n\t{\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\tfor(String str : scorers)\r\n\t\t\tbuilder.append(str).append(\",\");\r\n\t\tbuilder.deleteCharAt(builder.length() - 1);\r\n\t\t\r\n\t\ttry(DataOutputStream output = new DataOutputStream(new FileOutputStream(HIGHSCORERS_FILE)))\r\n\t\t{\r\n\t\t\toutput.writeChars(builder.toString());\r\n\t\t} \r\n\t\tcatch (FileNotFoundException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.err.println(\"[ERROR]:[FileManager] File \" + HIGHSCORERS_FILE + \" was not found \" \r\n\t\t\t\t\t+ \"while writing.\");\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.err.println(\"[ERROR]:[FileManager] Error while reading the file \" + HIGHSCORERS_FILE);\r\n\t\t}\r\n\t}",
"public void Write() throws IOException {\n\tRandomAccessFile ancFile = new RandomAccessFile(filename, \"rw\");\n\ttry {\n\t \n\t ancFile.writeInt(numOfControl);\n\t for (int kk=0; kk < numOfControl; kk++ ) {\n\t\tparamFile[kk].Write(ancFile);\n\t }\n\t ancFile.close();\n\t return;\n\t}\n\tcatch ( IOException ex ) {\n\t System.out.println(\"Error writing Ancillary File \" + \n\t\t\t filename );\n\t ex.printStackTrace();\n\t throw new IOException();\n\t}\n\t\n }",
"protected void fileSet() throws IOException {\n//\t\tfos = new FileOutputStream(outFile, false);\n//\t\tdos = new DataOutputStream(fos);\n\t\trealWriter = new BufferedWriter(new FileWriter(outFile.getAbsolutePath()));\n\t}",
"void saveAs() {\n writeFile.Export();\n }",
"@Override\n public void writeDataToTxtFile() {\n\n }",
"public void setOutput(File file){\n outputDir = file;\n }",
"private void writeToFile() {\n try {\n FileOutputStream fos = new FileOutputStream(f);\n String toWrite = myJSON.toString(4);\n byte[] b = toWrite.getBytes();\n fos.write(b);\n fos.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void saveToFile(final File file) throws IOException, AnalysisConfigurationException;",
"public void write(File output) throws IOException {\n }",
"public void writeMCPToFile() throws FileNotFoundException\n\t{\n\t\t try {\n\t\t\t String a = null;\n\t\t\t switch (sortingAlgorithm) {\n\t\t\t\tcase SelectionSort:\n\t\t\t\t\ta = \"SelectionSort.txt\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase InsertionSort:\n\t\t\t\t\ta = \"InsertionSort.txt\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase MergeSort:\n\t\t\t\t\ta = \"MergeSort.txt\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase QuickSort:\n\t\t\t\t\ta = \"QuickSort.txt\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t FileWriter myWriter = new FileWriter(a);\n\t\t myWriter.write(this.toString());\n\t\t myWriter.close();\n\t\t System.out.println(\"File generated: SUCCESS\");\n\t\t } catch (IOException e) {\n\t\t System.out.println(\"File generated: ERROR\");\n\t\t e.printStackTrace();\n\t\t }\n\t}",
"private static void save(Aircraft ac, String fileName) {\n\t\ttry {\n\t\t\tbw = new BufferedWriter(new FileWriter(fileName, true));\n\t\t\tbw.append(ac.toString().replace(\"\\n\", \"\\r\\n\"));\n\t\t\tbw.newLine();\n\t\t\tbw.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"IO ERROR received: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public String toFile(){\n return String.format(\"%s:%s:%s:%s:%s:%s:%s\",hashIndex,id,super.toFile(), \r\n facultyAbbr.getAbbreviation(), courseName.getCourseName(),tutorialGroup,session);\r\n }",
"@Override\n\tpublic void writeFile(String file_out) {\n\t\tthis.writeFile(Mode.POINT_ONLY, 0, DEFAULT_AND_LOAD_FACTOR, file_out);\n\t}",
"private static void writeToOutput(String path, Apriori apriori){\n try{\n BufferedWriter output = new BufferedWriter(new FileWriter(path, false));\n for (String s : apriori.mItemSet){\n output.write(s);\n }\n output.close();\n } catch (IOException e){\n e.printStackTrace();\n }\n }",
"public void toFile() throws IOException {\n toFile(null);\n }",
"public String writeFileUnderGrad(String fileName) {\n Formatter f = new Formatter();//Use Formatter\r\n f.format(\"%s (%d, %s, %s)%n\", super.getStudentName(), super.getStudentNumber(), super.getStudentSex(), super.getStudentDOB());//Format Student Output\r\n //System.out.println(f);\r\n BufferedWriter out = null; //BufferedWriter\r\n PrintWriter out1 = null; //Use PrintWriter\r\n //Try and Catch method to create the txt file, flush and close\r\n try {\r\n\r\n out = new BufferedWriter(new FileWriter(fileName, true));\r\n out1 = new PrintWriter(out);\r\n out1.write(f.toString());\r\n out1.flush();//Flush text file\r\n } catch (IOException e) {\r\n System.out.println(\"Exception \");\r\n } finally {\r\n try {\r\n out.close();\r\n out1.close();\r\n } catch (IOException ex) {\r\n Logger.getLogger(UnderGraduate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n return \"\";\r\n\r\n }",
"public EnigmaFile() throws Exception\n {\n\n String path = Main.class.getClassLoader().getResource(\"filein.txt\").getPath();\n File currentDirectory=new File(path);\n finstream = new FileInputStream(currentDirectory);\n\n\n String pathToWrite = path.replaceFirst(\"filein.txt\",\"fileout.txt\");\n File outputFile = new File(pathToWrite);\n br = new BufferedReader(new InputStreamReader(finstream));\n outputFile.createNewFile();\n FileWriter fileWrite = new FileWriter(outputFile.getAbsoluteFile());\n writer = new BufferedWriter(fileWrite);\n\n\n }",
"private void outputFile() {\n // Define output file name\n Scanner sc = new Scanner(System.in);\n System.out.println(\"What do you want to call this file?\");\n String name = sc.nextLine();\n\n // Output to file\n Path outputFile = Paths.get(\"submissions/\" + name + \".java\");\n try {\n Files.write(outputFile, imports);\n if (imports.size() > 0)\n Files.write(outputFile, Collections.singletonList(\"\"), StandardOpenOption.APPEND);\n Files.write(outputFile, lines, StandardOpenOption.APPEND);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }",
"public void saveMap() {\n this.scanMap();\n String userHome = System.getProperty(\"user.home\");\n BinaryExporter export = BinaryExporter.getInstance();\n File file = new File(userHome + \"world.j3o\");\n try {\n export.save(this.testNode, file); \n } catch (IOException ex) {\n Logger.getLogger(mapDevAppState_2.class.getName()).log(Level.SEVERE, \"File write error\");\n }\n }",
"public void writeFile() {\n\t\ttry {\n\t\t\tFile dir = Environment.getExternalStorageDirectory();\n\t\t\tFile myFile = new File(dir.toString() + File.separator + FILENAME);\n\t\t\tLog.i(\"MyMovies\", \"SeSus write : \" + myFile.toString());\n\t\t\tmyFile.createNewFile();\n\t\t\tFileOutputStream fOut = new FileOutputStream(myFile);\n\t\t\tOutputStreamWriter myOutWriter = \n\t\t\t\t\tnew OutputStreamWriter(fOut);\n\t\t\tfor (Map.Entry<String, ValueElement> me : hm.entrySet()) {\n\t\t\t\tString refs = (me.getValue().cRefMovies>0? \"MOVIE\" : \"\");\n\t\t\t\trefs += (me.getValue().cRefBooks>0? \"BOOK\" : \"\");\n\t\t\t\tString line = me.getKey() + DELIMITER + me.getValue().zweiteZeile \n\t\t\t\t\t\t //+ DELIMITER\n\t\t\t\t\t\t //+ me.getValue().count\n\t\t\t\t\t \t+ DELIMITER\n\t\t\t\t\t \t+ refs\n\t\t\t\t\t \t + System.getProperty(\"line.separator\");\n\t\t\t\t//Log.i(\"MyMovies\", \"SeSus extracted : \" + line);\n\t\t\t\tmyOutWriter.write(line);\n\t\t\t}\n\t\t\tmyOutWriter.close();\n\t\t\tfOut.close();\n\t\t} catch (IOException e) {\n\t\t\t//\n\t\t\tLog.i(\"MyMovies\", \"SeSus write Exception : \");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void save() {\r\n File distDataFile = new File(path);\r\n\r\n //String basePath = path;\r\n String endOfPath = path.substring(path.lastIndexOf(\"/\"));\r\n\r\n File rootDataFile;\r\n if (!path.contains(\"artists\")) {\r\n rootDataFile = new File(BASEDIR + \"/resources/data\" + endOfPath);\r\n } else {\r\n rootDataFile = new File(BASEDIR + \"/resources/data/artists\" + endOfPath);\r\n }\r\n\r\n File distTempFile = new File(path.substring(0, path.lastIndexOf(\"/\")) + \"/myTempFile.txt\");\r\n\r\n File rootTempFile;\r\n if (!path.contains(\"artists\")) {\r\n rootTempFile = new File(BASEDIR + \"/resources/data/myTempFile.txt\");\r\n } else {\r\n rootTempFile = new File(BASEDIR + \"/resources/data/artists/myTempFile.txt\");\r\n }\r\n \r\n try {\r\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(\r\n new FileOutputStream(distTempFile), \"UTF-8\"));\r\n\r\n for (String line : data) {\r\n bw.write(line);\r\n bw.newLine();\r\n }\r\n\r\n bw.close();\r\n distDataFile.delete();\r\n distTempFile.renameTo(distDataFile);\r\n\r\n BufferedWriter bw2 = new BufferedWriter(new OutputStreamWriter(\r\n new FileOutputStream(rootTempFile), \"UTF-8\"));\r\n\r\n for (String line : data) {\r\n bw2.write(line);\r\n bw2.newLine();\r\n }\r\n\r\n bw2.close();\r\n rootDataFile.delete();\r\n rootTempFile.renameTo(rootDataFile);\r\n } catch (IOException ex) {\r\n System.out.println(\"IOExceptoin in save1 : FileData\");\r\n }\r\n }",
"public static void Save(String filename) throws IOException {\n\t\tFileWriter fw=new FileWriter(filename);\r\n\t\tround=A1063307_GUI.round;\r\n\t\twho=A1063307_GUI.who2;\r\n\t\tfw.write(\"Round:\"+round+\",Turn:\"+who+\"\\n\");\r\n\t\tint t2=1;\r\n\t\twhile(t2<(linenumber)) {\r\n\t\t\tint zz=0;\r\n\t\t\twhile(zz<5) {\r\n\t\t\t\tif(zz==0) {\t\t\r\n\t\t\t\t\tch[t2].location=ch[t2].location%20;\r\n\t\t\t\t fw.write(Integer.toString(ch[t2].location)+\",\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(zz==1){\r\n\t\t\t\t fw.write(Integer.toString(ch[t2].CHARACTER_NUMBER)+\",\");\r\n\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\telse if(zz==2){\r\n\t\t\t\t\tfw.write(Integer.toString(ch[t2].money)+\",\");\r\n\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t else if(zz==3){\r\n\t\t\t \tfw.write(Integer.toString(ch[t2].status)+\",\");\r\n\t\t\t \r\n\t\t\t \t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tfw.write(ch[t2].IMAGE_FILENAME);\t\t\t\t\r\n\t\t\t\t\t }\r\n\t\t\t\tzz++;\r\n\t\t\t}\r\n\t\t\tfw.write(\"\\n\");\r\n\t\t\tt2++;\r\n\t\t}\r\n\t\tfw.close();\r\n\t\tFileWriter fw1=new FileWriter(\"Land.txt\");\r\n\t\tfw1.write(\"LOCATION_NUMBER, owner\\n\");\r\n\t\tfor(int i=1;i<17;i++) {\r\n\t\t\tfw1.write(Land[i].PLACE_NUMBER+\",\"+Land[i].owner+\"\\n\");\r\n\t\t}\r\n\t\tfw1.close();\r\n\t}",
"public static void writeFile(String inputFile, String outputFile, String[] encodings){\n File iFile = new File(inputFile);\n File oFile = new File(outputFile);\n //try catch for creating the output file\n try {\n //if it doesn't exist it creates the file. else if clears the output file\n\t if (oFile.createNewFile()){\n System.out.println(\"File is created!\");\n\t } else{\n PrintWriter writer = new PrintWriter(oFile);\n writer.print(\"\");\n writer.close();\n System.out.println(\"File cleared.\");\n\t }\n }\n catch(IOException e){\n e.printStackTrace();\n }\n //try catch to scan the input file\n try {\n Scanner scan = new Scanner(iFile);\n PrintWriter writer = new PrintWriter(oFile);\n //loop to look at each word in the file\n while (scan.hasNext()) {\n String s = scan.next();\n //loop to look at each character in the word\n for(int i = 0; i < s.length(); i++){\n if((int)s.charAt(i)-32 <= 94) {\n writer.print(encodings[(int)s.charAt(i)-32]);\n }\n }\n //gives the space between words\n writer.print(encodings[0]);\n }\n scan.close();\n }\n catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }",
"void save(File file);",
"private void createFile(String outputData, File file) {\n try {\n FileWriter writer = new FileWriter(file);\n writer.write(outputData);\n writer.close();\n } catch (IOException e) {\n e.getSuppressed();\n }\n }",
"public void save() {\n\t\tWriteFile data = new WriteFile( this.name + \".txt\" );\n\t\ttry {\n\t\t\t data.writeToFile(this.toString());\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tSystem.out.println(\"Couldn't print to file\");\n\t\t}\n\t}",
"public void write(final File out) throws IOException;",
"void toFile (String fileName);",
"public void printDataToFile(){\n\ttry {\n\t File file = new File(\"media/gameOutput.txt\");\n \n\t // if file doesnt exists, then create it\n\t if (!file.exists()) {\n\t\tfile.createNewFile();\n\t }\n \n\t FileWriter fw = new FileWriter(file.getAbsoluteFile());\n\t BufferedWriter bw = new BufferedWriter(fw);\n\t bw.write(printString);\n\t bw.close();\n\t} catch (IOException e) {\n\t e.printStackTrace();\n\t}\n }",
"private void writeToFile(){\n try(BufferedWriter br = new BufferedWriter(new FileWriter(filename))){\n for(Teme x:getAll())\n br.write(x.toString()+\"\\n\");\n br.close();\n }catch (IOException e){\n e.printStackTrace();\n }\n }",
"public ThingToWriteFile(String filename) { \n\t\ttry { \t\n\t\t\tout = new BufferedWriter(new FileWriter(filename));\n\t\t}\n\t\tcatch (FileNotFoundException ee){\n\t\t\tSystem.out.println(\"File \" + filename + \" not found.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tcatch (IOException e){\n\t\t\tSystem.out.println(\"File \" + filename + \" cannot be read.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"private void writeToFile(){\n Calendar c = Calendar.getInstance();\n String dateMedTaken = DateFormat.getDateInstance(DateFormat.FULL).format(c);\n FileOutputStream fos = null;\n\n try {\n fos = openFileOutput(FILE_NAME, MODE_APPEND);\n fos.write(dateMedTaken.getBytes());\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if(fos != null){\n try {\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n }",
"public OutputStream writeFile( String filename, FileType type );",
"public abstract String FileOutput();",
"private void writeTextFile(\r\n\t\t\tGDMSMain theMainHomePage,\r\n\t\t\tArrayList<QtlDetailElement> listOfAllQTLDetails, HashMap<Integer, String> hmOfQtlPosition, HashMap<String, Integer> hmOfQtlNameId,\r\n\t\t\tHashMap<Integer, String> hmOfQtlIdandName, String strSelectedExportType, boolean bQTLExists) throws GDMSException {\n\t\t\r\n\t\t\r\n\t\tString strFlapjackTextFile = \"Flapjack\";\r\n\t\tFile baseDirectory = theMainHomePage.getMainWindow().getApplication().getContext().getBaseDirectory();\r\n\t\tFile absoluteFile = baseDirectory.getAbsoluteFile();\r\n\r\n\t\tFile[] listFiles = absoluteFile.listFiles();\r\n\t\tFile fileExport = baseDirectory;\r\n\t\tfor (File file : listFiles) {\r\n\t\t\tif(file.getAbsolutePath().endsWith(\"Flapjack\")) {\r\n\t\t\t\tfileExport = file;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tString strFilePath = fileExport.getAbsolutePath();\r\n\t\t//System.out.println(\"strFilePath=:\"+strFilePath);\r\n\t\tgeneratedTextFile = new File(strFilePath + \"\\\\\" + strFlapjackTextFile + \".txt\");\r\n\r\n\t\t/**\twriting tab delimited qtl file for FlapJack \r\n\t\t * \tconsisting of marker chromosome & position\r\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\t//factory = new ManagerFactory(GDMSModel.getGDMSModel().getLocalParams(), GDMSModel.getGDMSModel().getCentralParams());\r\n\t\t\tfactory=GDMSModel.getGDMSModel().getManagerFactory();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tOntologyDataManager ontManager=factory.getOntologyDataManager();\r\n\t\t\t*/\r\n\t\t\tFileWriter flapjackTextWriter = new FileWriter(generatedTextFile);\r\n\t\t\tBufferedWriter flapjackBufferedWriter = new BufferedWriter(flapjackTextWriter);\r\n\t\t\t//getAllelicValuesByGidsAndMarkerNames\r\n\t\t\t//genoManager.getAlle\r\n\t\t\t//\t\t\t fjackQTL.write(\"QTL\\tChromosome\\tPosition\\tMinimum\\tMaximum\\tTrait\\tExperiment\\tTrait Group\\tLOD\\tR2\\tFlanking markers in original publication\");\r\n\t\t\tflapjackBufferedWriter.write(\"QTL\\tChromosome\\tPosition\\tMinimum\\tMaximum\\tTrait\\tExperiment\\tTrait Group\\tLOD\\tR2\\tFlanking markers in original publication\\teffect\");\r\n\t\t\tflapjackBufferedWriter.write(\"\\n\");\r\n\t\t\tfor (int i = 0 ; i < listOfAllQTLDetails.size(); i++){\r\n\t\t\t\t//System.out.println(listOfAllQTLDetails.get(i));\r\n\t\t\t\tQtlDetailElement qtlDetails = listOfAllQTLDetails.get(i);\r\n\t\t\t\t\r\n\t\t\t\t/*QtlDetailsPK id = qtlDetails.getQtlName().get.getId();\r\n\t\t\t\tInteger qtlId = id.getQtlId();*/\r\n\t\t\t\t//String strQtlName = hmOfQtlIdandName.get(qtlId);\r\n\t\t\t\tString strQtlName =qtlDetails.getQtlName();\r\n\t\t\t\tint qtlId=hmOfQtlNameId.get(strQtlName);\r\n\t\t\t\t//qtlDetails.get\r\n\t\t\t\t//Float clen = qtlDetails.getClen();\r\n\t\t\t\t//Float fEffect = qtlDetails.getEffect();\r\n\t\t\t\tint fEffect = qtlDetails.getEffect();\r\n\t\t\t\tFloat fMaxPosition = qtlDetails.getMaxPosition();\r\n\t\t\t\tFloat fMinPosition = qtlDetails.getMinPosition();\r\n\t\t\t\t//Float fPosition = qtlDetails.getPosition();\r\n\t\t\t\tString fPosition = hmOfQtlPosition.get(qtlId);\r\n\t\t\t\tFloat frSquare = qtlDetails.getRSquare();\r\n\t\t\t\tFloat fScoreValue = qtlDetails.getScoreValue();\r\n\t\t\t\tString strExperiment = qtlDetails.getExperiment();\r\n\t\t\t\t//String strHvAllele = qtlDetails..getHvAllele();\r\n\t\t\t\t//String strHvParent = qtlDetails.getHvParent();\r\n\t\t\t\t//String strInteractions = qtlDetails.getInteractions();\r\n\t\t\t\tString strLeftFlankingMarker = qtlDetails.getLeftFlankingMarker();\r\n\t\t\t\tString strLinkageGroup = qtlDetails.getChromosome();\r\n\t\t\t\t//String strLvAllele = qtlDetails.getLvAllele();\r\n\t\t\t\t//String strLvParent = qtlDetails.getLvParent();\r\n\t\t\t\tString strRightFM = qtlDetails.getRightFlankingMarker();\r\n\t\t\t\t//String strSeAdditive = qtlDetails.getSeAdditive();\r\n\t\t\t\t\r\n\t\t\t\t//String strTrait = qtlDetails.getTrait();\r\n\t\t\t\tString strTrait = qtlDetails.getTRName();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tflapjackBufferedWriter.write(strQtlName + \"\\t\" + strLinkageGroup + \"\\t\" + fPosition + \"\\t\" + fMinPosition + \"\\t\" + fMaxPosition + \"\\t\" +\r\n\t\t\t\t\t\tstrTrait + \"\\t\" + strExperiment + \"\\t \\t\" + fScoreValue + \"\\t\" + frSquare+\r\n\t \"\\t\" + strLeftFlankingMarker+\"/\"+strRightFM + \"\\t\" + fEffect);\r\n\t\t\t\t\r\n\t\t\t\tflapjackBufferedWriter.write(\"\\n\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tflapjackBufferedWriter.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new GDMSException(e.getMessage());\r\n\t\t} \r\n\t\t\r\n\t}",
"@Override\n public void setSaveFile(File file)\n {\n \n }",
"@Override\r\n public String toFile() {\r\n String toReturn = \"straight,\";\r\n toReturn += xCoord + \",\" + yCoord + \",\" + currentDirection;\r\n toReturn += \"\\n\";\r\n return toReturn;\r\n }",
"private void createDecodedFile(String decodedValues, String encodedFileName) throws Exception {\r\n\r\n\r\n\t\tString decodedFileName = encodedFileName.substring(0, encodedFileName.lastIndexOf(\".\")) + \"_decoded.txt\";\r\n\t\t//FileWriter and BufferedWriter to write and it overwrites into the file.\r\n\t\tFileWriter fileWriter = new FileWriter(decodedFileName, false);\r\n\t\tBufferedWriter bufferedWriter = new BufferedWriter(fileWriter);\r\n\r\n\t\tbufferedWriter.write(decodedValues);\r\n\t\t//Flush and Close the bufferedWriter\r\n\t\tbufferedWriter.flush();\r\n\t\tbufferedWriter.close();\t\r\n\t}",
"private void writeFile(String path)\n {\n FileIO fileIO = new FileIO();\n StringBuffer stringBuf = new StringBuffer();\n for(int i = 0; i< getDrivers().getSize(); i++) // go through each driver in the collection\n {\n stringBuf.append(getDrivers().getDriver(i).getName() + \",\" + getDrivers().getDriver(i).getRanking() \n + \",\" + getDrivers().getDriver(i).getSpecialSkill() + ((i == (getDrivers().getSize() - 1)) ? \"\" :\"\\n\")); // append details to buffer\n }\n fileIO.setFileName(path);\n fileIO.writeFile(stringBuf.toString());\n }",
"private void outputToFile(String filename) throws FileNotFoundException, IOException {\n\t\tBufferedWriter writer = new BufferedWriter(\n\t\t\t\tnew FileWriter(filename+\".tmp\"));\n\t\twriter.write(VERIFY_STRING + \"\\n\");\n\n\t\t// output automata info\n\t\twriter.write(machine.getName() + \"\\n\");\n\t\twriter.write(machine.getType() + \"\\n\");\n\n\t\t// output state info\n\t\tfor (State state : machine.getStates()) {\n\t\t\twriter.write(\"STATE\\n\");\n\t\t\twriter.write(state.getName() + \"\\n\");\n\t\t\twriter.write(state.isAccept() + \" \" + state.isStart() + \" \" + \n\t\t\t\t\tstate.getID() + \" \" + state.getGraphic().getX() + \" \" + \n\t\t\t\t\tstate.getGraphic().getY() + \"\\n\");\n\n\t\t\t// output transitions\n\t\t\tfor (Transition t : state.getTransitions())\n\t\t\t\twriter.write(t.getID() + \" \" + t.getInput() + \" \" + \n\t\t\t\t\t\tt.getNext().getID() + \"\\n\");\n\t\t}\n\t\twriter.close();\n\t}",
"void saveSimpleCodesToFile() {\n\t\tPrintWriter writer;\r\n\t\ttry {\r\n\t\t\t//writer = new PrintWriter(pathStr + \"/../pt.iscte.pidesco.codegenerator/Settings/Code.cg\", \"UTF-8\");\r\n\t\t\twriter = new PrintWriter(\"Code.cg\", \"UTF-8\");\r\n\t\t\tfor (SimpleCode sc : SimpleCodeMap.values()) {\r\n\t\t\t\twriter.print(sc.getCodeName() + \"-CGSeparator-\" + sc.resultCodeToWrite());\r\n\t\t\t\twriter.print(\"-CGCodeSeparator-\");\r\n\t\t\t}\r\n\t\t\twriter.close();\r\n\t\t} catch (FileNotFoundException | UnsupportedEncodingException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"void saveToFile(String filename) throws IOException;",
"public void writeFile() {\n try {\n FileWriter writer = new FileWriter(writeFile, true);\n writer.write(user + \" \" + password);\n writer.write(\"\\r\\n\"); // write new line\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n \n }",
"public void writeFile(String data){\n\t\t\n\t\tcurrentLine = data;\n\t\t\n\t\t\ttry{ \n\t\t\t\tFile file = new File(\"/Users/bpfruin/Documents/CSPP51036/hw3-bpfruin/src/phfmm/output.txt\");\n \n\t\t\t\t//if file doesnt exists, then create it\n\t\t\t\tif(!file.exists()){\n\t\t\t\t\tfile.createNewFile();\n\t\t\t\t}\n \n\t\t\t\t//true = append file\n\t\t\t\tFileWriter fileWriter = new FileWriter(file,true);\n \t \tBufferedWriter bufferWriter = new BufferedWriter(fileWriter);\n \t \tbufferWriter.write(data);\n \t \tbufferWriter.close();\n \n \n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t\n\t}",
"public void outputToFile(StatementList original, StatementList mutant)\n {\n if (comp_unit == null) \n \t return;\n\t\tif(original.toString().equalsIgnoreCase(mutant.toString()))\n\t\t\treturn;\n String f_name;\n num++;\n f_name = getSourceName(\"SDL\");\n String mutant_dir = getMuantID(\"SDL\");\n\n try \n {\n\t\t PrintWriter out = getPrintWriter(f_name);\n\t\t SDL_Writer writer = new SDL_Writer(mutant_dir, out);\n\t\t writer.setMutant(original, mutant);\n writer.setMethodSignature(currentMethodSignature);\n\t\t comp_unit.accept( writer );\n\t\t out.flush(); \n\t\t out.close();\n } catch ( IOException e ) \n {\n\t\t System.err.println( \"fails to create \" + f_name );\n } catch ( ParseTreeException e ) {\n\t\t System.err.println( \"errors during printing \" + f_name );\n\t\t e.printStackTrace();\n }\n }",
"public FileOutput(String filename) {\n\t\tthis.filename = filename;\n\t\ttry {\n\t\t\twriter = new PrintWriter(new BufferedWriter(new FileWriter(filename,false)));\n\t\t\tSystem.out.println(\"Created\\t\\\"\" + filename + \"\\\" sucessfully\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not create\\t\" + filename);\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\twriter.close();\n\t\t}\n\t\t\n\t}",
"public void writeToRestaurantFile()\r\n {\r\n\ttry(ObjectOutputStream toRestaurantFile = \r\n new ObjectOutputStream(new FileOutputStream(\"listfiles/restaurant.dta\")))\r\n\t{\r\n toRestaurantFile.writeObject(restaurant);\r\n\t}\r\n\tcatch(NotSerializableException nse)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Restaurant objektene er ikke \"\r\n + \"serialiserbare.\\nIngen registrering på fil!\"\r\n + nse.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n\tcatch(IOException ioe)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Det oppsto en feil ved skriving \"\r\n + \"til fil.\\n\" + ioe.getMessage());\r\n\t}\r\n }",
"public ReduceRecordWriter(ReduceTask task) throws FileNotFoundException {\n\t\traf = new RandomAccessFile(Utils.getReduceOutputFileName(task.reducerInputFileNumber, task.outputDir), \"rws\");\n\t\tf = new File(Utils.getReduceOutputFileName(task.reducerInputFileNumber, task.outputDir));\n\t}",
"void saveToFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile target = new File(directory, FILE_NAME);\n\t\t\tif (!target.exists()) {\n\t\t\t\ttarget.createNewFile();\n\t\t\t}\n\t\t\tJsonWriter writer = new JsonWriter(new FileWriter(target));\n\t\t\twriter.setIndent(\" \");\n\t\t\twriter.beginArray();\n\t\t\tfor (Scoreboard scoreboard : scoreboards.values()) {\n\t\t\t\twriteScoreboard(writer, scoreboard);\n\t\t\t}\n\t\t\twriter.endArray();\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void WriteFile()throws java.io.FileNotFoundException,java.io.IOException\n {\n FileOutputStream out1= new FileOutputStream(\"Sample.bin\") ; \n String ab=\"Welcome to sample file\";\n out1.write(ab.getBytes());\n out1.flush();\n out1.close();\n }",
"private void writeToFile(SVGGraphics2D generator, String path) throws IOException {\n\t\tFile file = new File(path);\n\t\tif (!file.exists())\n\t\t\tfile.createNewFile();\n\t\tFileWriter fw = new FileWriter(file);\n\t\tPrintWriter writer = new PrintWriter(fw);\n\t\tgenerator.stream(writer);\n\t\twriter.close();\n\t}",
"public void setOutFile(final File val) {\n outFile = val;\n }",
"private void saveResourceFile()\r\n\t{\t\r\n\t\tFile file = null;\r\n\t\tFileWriter fw = null;\r\n\t\t//File complete = null;//New file for the completed list\r\n\t\t//FileWriter fw2 = null;//Can't use the same filewriter to do both the end task and the complted products.\r\n\t\ttry{\r\n\t\t\tfile = new File(outFileName);\r\n\t\t\tfile.createNewFile();\r\n\t\t\tfw = new FileWriter(outFileName,true);\r\n\t\t\tfor(FactoryObject object : mFObjects)\r\n\t\t\t{\r\n\t\t\t\tif(object instanceof FactoryReporter) {\r\n\t\t\t\t\t((FactoryReporter)object).report(fw);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.out.println(ioe.getMessage());\r\n\t\t\tif(file != null) {\r\n\t\t\t\tfile.delete();\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tif(fw != null) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\tfw.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tSystem.out.println(\"Failed to close the filewriter!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void storeToFile() throws IOException {\n\t\t\n\t\tDLProgramStorer storer = new DLProgramStorerImpl();\n\t\t\n\t\t//String datalogFile = inputCKR.getGlobalOntologyFilename() + \".dlv\";\n\t\t//String datalogFile = \"./testcase/output.dlv\";\n\t\t//System.out.println(datalogGlobal.getStatements().size());\n\t\t\n\t\tFileWriter writer = new FileWriter(outputFilePath);\n\t\tstorer.store(datalogCKR, writer);\n\t\t//writer.flush();\n\t\twriter.close();\n\t\t\n\t\t//System.out.println(\"CKR program saved in: \" + outputFilePath);\n\t}",
"public void recordOrder(){ \n PrintWriter output = null;\n try{\n output = \n new PrintWriter(new FileOutputStream(\"record.txt\", true));\n }\n catch(Exception e){\n System.out.println(\"File not found\");\n System.exit(0);\n }\n output.println(Tea);//writes into the file contents of String Tea\n output.close();//closes file\n }",
"public RandomAccessOutputStream(String file) throws IOException {\n raos = new ome.scifio.io.RandomAccessOutputStream(file);\n }",
"public static void saveMD(Matchdata out, String region)\n {\n Gson outGS = new Gson();\n String outStream = outGS.toJson(out);\n \n \n FileOutputStream outputStream;\n\n try \n {\n outputStream = new FileOutputStream(\"Saves/\"+region+\"/\"+out.getPlayerName()+\"/\"+Long.toString(out.getMatchID())+\".txt\");\n outputStream.write(outStream.getBytes());\n outputStream.close();\n } \n \n catch (Exception e) \n {\n e.printStackTrace();\n }\n \n }",
"void writeFile(File file, String password, String cnt);",
"@Override\n public void saveFile(String fileString, String filename) throws IOException {\n }",
"public static void main(String[] args) throws IOException {\n PrintWriter outputFile = new PrintWriter(\"ResultFile.txt\");\n\n outputFile.println(\"Line 1\");\n outputFile.println(\"Line 2\");\n outputFile.println(\"Line 3\");\n outputFile.println(\"Line 4\");\n\n\n outputFile.close();\n\n }",
"public static void main(String [] args){\n writeFile1(\"1234567890987654321\");\n }",
"public void writeFile(Context context){\n Writer writer = null;\n\n try {\n OutputStream out = context.openFileOutput(filename, Context.MODE_PRIVATE);\n writer = new OutputStreamWriter(out);\n writer.write(userName + \"~\" + color + \"~\" + level);\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n\n } catch (IOException e) {\n e.printStackTrace();\n\n } finally {\n if (writer != null) {\n try {\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n }",
"void save(String filename);",
"public void writeToFile(){\n\t\ttry {\r\n\t\t\tFile f = new File(\"E:\\\\Study\\\\Course\\\\CSE215L\\\\ProjectModify\\\\src\\\\Railway.txt\");\r\n\t\t\tFileWriter fw = new FileWriter(f);\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < persons.length; i++){\r\n\t\t\t\tif(persons[i] != null){\r\n\t\t\t\t\tfw.write(\"Name :\" +persons[i].getName());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Phone Number :\"+persons[i].getPhn()); \r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Age :\"+persons[i].getAge());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Train Name :\"+persons[i].getStrain());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Destination :\"+persons[i].getDestination());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Starting Point :\"+persons[i].getStpoint());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Seat Class :\"+persons[i].getSclass());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Fare :\"+persons[i].getFare());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfw.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}",
"public void saveArchive() throws FileNotFoundException {\n jsonWriter.open();\n Archive archive = new Archive(cameraCollection, filmCollection);\n jsonWriter.write(archive);\n jsonWriter.close();\n }",
"private void outputToFile() {\n\t\tPath filePath = Paths.get(outputFile);\n\n\t\ttry (BufferedWriter writer = Files.newBufferedWriter(filePath,\n\t\t\t\tCharset.forName(\"UTF-8\"));) {\n\t\t\tRowIterator iterator = currentGen.iterateRows();\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tElemIterator elem = iterator.next();\n\t\t\t\twhile (elem.hasNext()) {\n\t\t\t\t\tMatrixElem mElem = elem.next();\n\t\t\t\t\twriter.write(mElem.rowIndex() + \",\" + mElem.columnIndex());\n\t\t\t\t\twriter.newLine();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Unable to write to the provided file\");\n\t\t}\n\n\t}",
"public void saveReciept(String outputFileName){\n this.reciept.printReciept();\n this.reciept.save(outputFileName);\n }",
"public void generate(File file) throws IOException;",
"public void writeObject(RandomAccessFile arq) throws IOException{\n byte[] dados = this.getByteArray();\n arq.writeChar(' ');\n arq.writeShort(dados.length);\n arq.write(dados);\n }",
"public void saveToFile(File outputFile) throws IOException {\n PrintWriter writer = new PrintWriter(outputFile);\n\n writer.write(\"# Exported by FrogLord\" + Constants.NEWLINE);\n for (Tuple3<Float, Float, Float> vertex : this.vertices)\n writer.write(\"v \" + vertex.getA() + \" \" + vertex.getB() + \" \" + vertex.getC() + Constants.NEWLINE);\n\n for (Tuple2<Float, Float> normal : this.normals)\n writer.write(\"vt \" + normal.getA() + \" \" + normal.getB() + Constants.NEWLINE);\n\n writer.close();\n }",
"public void writeToTextFile(String filename){\n try{\n FileWriter myWriter = new FileWriter(filename); \n myWriter.write(toString());\n myWriter.close();\n } \n catch(IOException e) { \n System.out.println(\"An error occurred.\"); \n e.printStackTrace();\n } \n }",
"static void save() {\n String fileName, line = \"\"; char answer;\n System.out.print(\"Enter file name to save: \"); fileName = scan.nextLine();\n File file = new File(fileName);\n \n if ( file.isFile() ) {\n System.out.printf(\"WARNING: %s exists.\\n\", fileName);\n System.out.print(\"Overwrite (y/n)? \");\n \n while (line.length() < 1) line = scan.nextLine().toUpperCase();\n answer = line.charAt(0);\n\n switch (answer) {\n case 'N': save(); // reprompt\n case 'Y': break; // save the file\n default: save();\n }\n }\n pgmInf.savePgmFileAs(fileName);\n System.out.println(\"Terrain file saved.\");\n }",
"public void writeToFile() {\n\t\ttry {\n\t\t\tFileOutputStream file = new FileOutputStream(pathName);\n\t\t\tObjectOutputStream output = new ObjectOutputStream(file);\n\n\t\t\tMap<String, HashSet<String>> toSerialize = tagToImg;\n\t\t\toutput.writeObject(toSerialize);\n\t\t\toutput.close();\n\t\t\tfile.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private static void createFileUmidade() throws IOException {\r\n\t\tInteger defaultUmidade = 30;\r\n\t\tarqUmidade = new File(pathUmidade);\r\n\t\tif(!arqUmidade.exists()) {\r\n\t\t\tarqUmidade.createNewFile();\r\n\t\t\tFileWriter fw = new FileWriter(getArqUmidade());\r\n\t\t\tBufferedWriter buffWrite = new BufferedWriter(fw);\r\n\t\t\tbuffWrite.append(defaultUmidade.toString() + String.valueOf('\\n'));/*Inicializa o arquivo com uma umidade Inicial*/\r\n\t\t\tbuffWrite.close();\r\n\t\t}else {\r\n\t\t\tFileReader fr = new FileReader(getArqUmidade());\r\n\t\t\tBufferedReader buffRead = new BufferedReader(fr);\r\n\t\t\tif(!buffRead.ready()) {/*Se o arquivo se encontar criado mas estiver vazio*/\r\n\t\t\t\tFileWriter fw = new FileWriter(arqUmidade);\r\n\t\t\t\tBufferedWriter buffWrite = new BufferedWriter(fw);\r\n\t\t\t\tbuffWrite.append(defaultUmidade.toString() + String.valueOf('\\n'));/*Inicializa o arquivo com uma umidade Inicial*/\r\n\t\t\t\tbuffWrite.close();\r\n\t\t\t}\r\n\t\t\tbuffRead.close();\r\n\t\t}\r\n\t}",
"public static void saveArffFile(String path,\n String filename,\n String relName,\n ArrayList<Attribute> attributes,\n DataSet dataSet) throws IOException {\n\n BufferedWriter bw = new BufferedWriter(new FileWriter(path + File.separator + filename + \".arff\"));\n String header = createArffHeader(relName, attributes);\n String data = createArffData(dataSet);\n bw.write(header);\n bw.write(\"\\n\");\n bw.write(data);\n bw.close();\n }",
"public void setOutput(File out) {\r\n this.output = out;\r\n incompatibleWithSpawn = true;\r\n }",
"private void saveGenres(){\n\t\tFile genreList = new File(Paths.get(\"genres.txt\").toString());\n\t\ttry{\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(genreList));\n\t\t\tfor (String s : genres){\n\t\t\t\twriter.write(s);\n\t\t\t\twriter.newLine();\n\t\t\t}\n\t\t\twriter.close();\n\t\t} catch(IOException ex){\n\t\t\t\n\t\t}\n\t}",
"void save(String fileName);",
"public void saveAsset() throws IOException {\n file.saveAsset();\n }"
] |
[
"0.65252405",
"0.63782257",
"0.63474584",
"0.6231936",
"0.6230559",
"0.6158849",
"0.6142909",
"0.6113925",
"0.60638803",
"0.6000587",
"0.5998682",
"0.59736395",
"0.59467643",
"0.5946036",
"0.59455955",
"0.59277874",
"0.5887121",
"0.58862674",
"0.5852921",
"0.5850893",
"0.5832142",
"0.5784805",
"0.5773358",
"0.57582116",
"0.5746893",
"0.5737454",
"0.57257473",
"0.5717557",
"0.57094806",
"0.57024056",
"0.5698985",
"0.5694696",
"0.5676953",
"0.5671142",
"0.5669125",
"0.5656028",
"0.56401044",
"0.5629637",
"0.56275284",
"0.5626571",
"0.5611538",
"0.5607785",
"0.560612",
"0.55993426",
"0.5598089",
"0.55915034",
"0.5590385",
"0.5586248",
"0.5583661",
"0.55832803",
"0.5579302",
"0.5576965",
"0.5575047",
"0.5572226",
"0.5569848",
"0.55594903",
"0.5557925",
"0.55438375",
"0.55407876",
"0.55342954",
"0.55339134",
"0.55330396",
"0.5528397",
"0.55281836",
"0.55207145",
"0.55033153",
"0.54949576",
"0.5494926",
"0.549341",
"0.54884374",
"0.5478194",
"0.5474315",
"0.547232",
"0.54714406",
"0.54702026",
"0.5465569",
"0.5444549",
"0.54364073",
"0.5435886",
"0.54349536",
"0.54319686",
"0.54240555",
"0.5414099",
"0.5413603",
"0.5411862",
"0.54022694",
"0.5402098",
"0.5398043",
"0.53932667",
"0.53913",
"0.5387437",
"0.538163",
"0.5380133",
"0.53756976",
"0.5372018",
"0.5371641",
"0.5368342",
"0.5366132",
"0.5355267",
"0.53436166"
] |
0.72888696
|
0
|
Parse a patter, per the docs
|
public List<PatternItem> pattern() {
List<PatternItem> out = new ArrayList<>();
int level = 0;
int n = 0;
String c;
boolean done = false;
while (!done) {
DNAToken token = parser.step();
switch (token) {
case CONT:
break;
case C:
out.add(new PatternItem(PatternItem.Type.BASE, 'I'));
break;
case F:
out.add(new PatternItem(PatternItem.Type.BASE, 'C'));
break;
case P:
out.add(new PatternItem(PatternItem.Type.BASE, 'F'));
break;
case IC:
out.add(new PatternItem(PatternItem.Type.BASE, 'P'));
break;
case IP:
n = parser.nat();
out.add(new PatternItem(PatternItem.Type.JUMP, n));
break;
case IF:
parser.next(); // Consume one more character for no good reason
c = parser.consts();
out.add(new PatternItem(PatternItem.Type.SEARCH, c));
break;
case IIP:
level += 1;
out.add(new PatternItem(PatternItem.Type.OPEN));
break;
case IIF:
case IIC:
if (level == 0) {
done = true;
} else {
level -= 1;
out.add(new PatternItem(PatternItem.Type.CLOSE));
}
break;
case III:
rna.concat(dna.substring(0, 7));
dna.trunc(7);
break;
default:
finish();
}
}
return out;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private TraceParser genParser() throws ParseException {\n TraceParser parser = new TraceParser();\n parser.addRegex(\"^(?<VTIME>)(?<TYPE>)$\");\n parser.addPartitionsSeparator(\"^--$\");\n return parser;\n }",
"public Pattern parsePattern(SyntaxTreeNode parent, String pattern) {\n return (Pattern)parseTopLevel(parent, \"<PATTERN>\"+pattern, pattern);\n }",
"public void parse( IFilter<? extends IDescribable> filter ) throws ParseException;",
"public RegexFormatter(Pattern pattern) {\n this();\n setPattern(pattern);\n }",
"protected abstract void parse(String line);",
"public E parse(String argument);",
"void parse(String[] args);",
"public static LogDataParser praseLogRequestLine(String line)\n\t\t\tthrows NumberFormatException, PatternSyntaxException, PatternNotMatchedException {\n\t\tPATTERN = Pattern.compile(LOG_LINE_ENTRY_PATTERN);\n\t\tMatcher matcher = PATTERN.matcher(line);\n\t\tif (!matcher.find()) {\n\t\t\tthrow new PatternNotMatchedException(\"Cannot parse \" + line);\n\t\t}\n\t\treturn new LogDataParser(matcher.group(1), matcher.group(9));\n\t}",
"public void parse(String filename);",
"public abstract T parse(String s);",
"private static void parseToBuilder(DateTimeFormatterBuilder builder, String pattern) {\n int length = pattern.length();\n int[] indexRef = new int[1];\n\n for (int i=0; i<length; i++) {\n indexRef[0] = i;\n String token = parseToken(pattern, indexRef);\n i = indexRef[0];\n\n int tokenLen = token.length();\n if (tokenLen == 0) {\n break;\n }\n char c = token.charAt(0);\n\n if (c == '%' && token.charAt(1) != '%') {\n c = token.charAt(1);\n switch(c) {\n case 'a':\n builder.appendDayOfWeekShortText();\n break;\n case 'A':\n builder.appendDayOfWeekText();\n break;\n case 'b':\n case 'h':\n builder.appendMonthOfYearShortText();\n break;\n case 'B':\n builder.appendMonthOfYearText();\n break;\n case 'c':\n builder.appendDayOfWeekShortText();\n builder.appendLiteral(' ');\n builder.appendMonthOfYearShortText();\n builder.appendLiteral(' ');\n builder.appendDayOfMonth(2);\n builder.appendLiteral(' ');\n builder.appendHourOfDay(2);\n builder.appendLiteral(':');\n builder.appendMinuteOfHour(2);\n builder.appendLiteral(':');\n builder.appendSecondOfMinute(2);\n builder.appendLiteral(' ');\n builder.appendYear(4,4);\n break;\n case 'C':\n builder.appendCenturyOfEra(1,2);\n break;\n case 'd':\n builder.appendDayOfMonth(2);\n break;\n case 'D':\n builder.appendMonthOfYear(2);\n builder.appendLiteral('/');\n builder.appendDayOfMonth(2);\n builder.appendLiteral('/');\n builder.appendTwoDigitYear(2019);\n break;\n case 'e':\n builder.appendOptional(DateTimeFormat.forPattern(\"' '\").getParser());\n builder.appendDayOfMonth(2);\n break;\n case 'F':\n builder.appendYear(4,4);\n builder.appendLiteral('-');\n builder.appendMonthOfYear(2);\n builder.appendLiteral('-');\n builder.appendDayOfMonth(2);\n break;\n case 'g':\n case 'G':\n break; //for output only, accepted and ignored for input\n case 'H':\n builder.appendHourOfDay(2);\n break;\n case 'I':\n builder.appendClockhourOfHalfday(2);\n break;\n case 'j':\n builder.appendDayOfYear(3);\n break;\n case 'k':\n builder.appendOptional(DateTimeFormat.forPattern(\"' '\").getParser());\n builder.appendHourOfDay(2);\n break;\n case 'l':\n builder.appendOptional(DateTimeFormat.forPattern(\"' '\").getParser());\n builder.appendClockhourOfHalfday(2);\n break;\n case 'm':\n builder.appendMonthOfYear(2);\n break;\n case 'M':\n builder.appendMinuteOfHour(2);\n break;\n case 'n':\n break;\n case 'p':\n builder.appendHalfdayOfDayText();\n break;\n case 'r':\n builder.appendClockhourOfHalfday(2);\n builder.appendLiteral(':');\n builder.appendMinuteOfHour(2);\n builder.appendLiteral(':');\n builder.appendSecondOfMinute(2);\n builder.appendLiteral(' ');\n builder.appendHalfdayOfDayText();\n break;\n case 'R':\n builder.appendHourOfDay(2);\n builder.appendLiteral(':');\n builder.appendMinuteOfHour(2);\n break;\n case 'S':\n builder.appendSecondOfMinute(2);\n break;\n case 't':\n break;\n case 'T':\n builder.appendHourOfDay(2);\n builder.appendLiteral(':');\n builder.appendMinuteOfHour(2);\n builder.appendLiteral(':');\n builder.appendSecondOfMinute(2);\n break;\n/* case 'U': //FIXME Joda does not support US week start (Sun), this will be wrong\n builder.appendWeekOfYear(2);\n break;\n case 'u':\n builder.appendDayOfWeek(1);\n break;*/\n case 'V':\n break; //accepted and ignored\n/* case 'w': //FIXME Joda does not support US week start (Sun), this will be wrong\n builder.appendDayOfWeek(1);\n break;\n case 'W':\n builder.appendWeekOfYear(2);\n break;*/\n case 'x':\n builder.appendTwoDigitYear(2019);\n builder.appendLiteral('/');\n builder.appendMonthOfYear(2);\n builder.appendLiteral('/');\n builder.appendDayOfMonth(2);\n break;\n/* case 'X': //Results differ between OSX and Linux\n builder.appendHourOfDay(2);\n builder.appendLiteral(':');\n builder.appendMinuteOfHour(2);\n builder.appendLiteral(':');\n builder.appendSecondOfMinute(2);\n break;*/\n case 'y': //POSIX 2004 & 2008 says 69-99 -> 1900s, 00-68 -> 2000s\n builder.appendTwoDigitYear(2019);\n break;\n case 'Y':\n builder.appendYear(4,4);\n break;\n case 'z':\n builder.appendTimeZoneOffset(null, \"z\", false, 2, 2);\n break;\n case 'Z':\n break; //for output only, accepted and ignored for input\n default: // No match, ignore\n builder.appendLiteral('\\'');\n builder.appendLiteral(token);\n throw new IllegalArgumentException(token + \"is not acceptted as a parse token, treating as a literal\");\n }\n } else {\n if (c == '\\'') {\n String sub = token.substring(1);\n if (sub.length() > 0) {\n // Create copy of sub since otherwise the temporary quoted\n // string would still be referenced internally.\n builder.appendLiteral(new String(sub));\n }\n } else throw new IllegalArgumentException(\"Unexpected token encountered parsing format string:\" + c);\n }\n }\n }",
"public abstract T parse(String str);",
"public void parse() {\n if (commandSeparate.length == 1) {\n parseTaskType();\n } else if (commandSeparate.length == 2) {\n parseTaskType();\n index = commandSeparate[1];\n taskName = commandSeparate[1];\n } else {\n parseTaskType();\n parseTaskName();\n parseTaskDate();\n }\n }",
"static Extractor byRegex(String format, Object... args) {\n\t\t\treturn byRegex(RegexUtil.compile(format, args));\n\t\t}",
"private void compilePattern() {\r\n\r\n pattern_startOfPage = Pattern.compile(regex_startOfPage);\r\n pattern_headerAttribute = Pattern.compile(regex_headerAttribute);\r\n pattern_messageFirstLine = Pattern.compile(regex_messageFirstLine);\r\n pattern_messageContinuationLine = Pattern.compile(regex_messageContinuationLine);\r\n }",
"void parse(String[] args) throws Exception;",
"public abstract T parseLine(String inputLine);",
"public StringParser getStringParser();",
"Argument<T> parse(Function<String, ParseResult<T>> parser);",
"void parse();",
"public T parse(String value);",
"public static FontModifier parse(String value) throws ParseException {\n\t\tList<String> modifierValues = ThemeValueUtils.parseGroupings(value, '[', ']');\n\t\tif (modifierValues.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\tFontModifier modifier = new FontModifier();\n\t\tfor (String modifierString : modifierValues) {\n\t\t\tif (setSize(modifier, modifierString)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (setStyle(modifier, modifierString)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tsetFamily(modifier, modifierString);\n\t\t}\n\t\tif (modifier.hadModifications()) {\n\t\t\treturn modifier;\n\t\t}\n\t\treturn null;\n\t}",
"public JsonParser createParser(String content)\n/* */ throws IOException, JsonParseException\n/* */ {\n/* 879 */ int strLen = content.length();\n/* */ \n/* 881 */ if ((this._inputDecorator != null) || (strLen > 32768) || (!canUseCharArrays()))\n/* */ {\n/* */ \n/* 884 */ return createParser(new StringReader(content));\n/* */ }\n/* 886 */ IOContext ctxt = _createContext(content, true);\n/* 887 */ char[] buf = ctxt.allocTokenBuffer(strLen);\n/* 888 */ content.getChars(0, strLen, buf, 0);\n/* 889 */ return _createParser(buf, 0, strLen, ctxt, true);\n/* */ }",
"void Parse(Source source);",
"public void parse() {\n }",
"public RegexFormatter(String pattern) throws PatternSyntaxException {\n this();\n setPattern(Pattern.compile(pattern));\n }",
"public void parse(String string) {\n\t\t\n\t}",
"public Pattern parsePattern(SyntaxTreeNode parent,\n String attr, String def) {\n // Get the textual representation of the pattern (if any)\n String pattern = parent.getAttribute(attr);\n // Use the default pattern if none was found\n if ((pattern.length() == 0) && (def != null)) pattern = def;\n // Invoke the XPath parser\n return (Pattern)parseTopLevel(parent, \"<PATTERN>\"+pattern, pattern);\n }",
"public JsonParser createParser(char[] content, int offset, int len)\n/* */ throws IOException\n/* */ {\n/* 908 */ if (this._inputDecorator != null) {\n/* 909 */ return createParser(new CharArrayReader(content, offset, len));\n/* */ }\n/* 911 */ return _createParser(content, offset, len, _createContext(content, true), false);\n/* */ }",
"private Command parse() throws ParseException {\n next();\n expect(Token.COMMAND);\n cmd = new Command(text);\n next();\n while (!((token == Token.WHERE) || (token == Token.RETURN) || (token == Token.EOL))) {\n param();\n }\n if (token == Token.WHERE) {\n where();\n }\n if (token == Token.RETURN) {\n returns();\n }\n expect(Token.EOL);\n return cmd;\n }",
"protected abstract Regex pattern();",
"@Override\n\tpublic void parse(String s) throws MalformedFileException {\n\t\t\n\t}",
"private List<FormatSpecifier> parse(final String s) {\n final List<FormatSpecifier> sl = new ArrayList<FormatSpecifier>();\n final Matcher m = SPECIFIER_PATTERN.matcher(s);\n int i = 0;\n while (i < s.length()) {\n if (m.find(i)) {\n // Anything between the start of the string and the\n // beginning of the format specifier is either fixed text or contains\n // an invalid format string.\n if (m.start() != i) {\n // Make sure we didn't miss any invalid format\n // specifiers\n checkText(s.substring(i, m.start()));\n\n // Assume previous characters were fixed text\n // al.add(new FixedString(s.substring(i, m.start())));\n }\n\n // Expect 6 groups in regular expression\n final String[] sa = new String[6];\n for (int j = 0; j < m.groupCount(); j++) {\n sa[j] = m.group(j + 1);\n }\n sl.add(new FormatSpecifier(sa));\n i = m.end();\n } else {\n // No more valid format specifiers. Check for possible\n // invalid format specifiers.\n checkText(s.substring(i));\n\n // The rest of the string is fixed text\n // al.add(new FixedString(s.substring(i)));\n break;\n }\n }\n return sl;\n }",
"@Test\n public void test() throws ParseException {\n String test1 = \"klasse Test{ voeruit() { getal number is 1; } }\";\n parse(test1, \"program\");\n }",
"private PLPParser makeParser(String input) throws LexicalException {\n\t\t\tshow(input); //Display the input \n\t\t\tPLPScanner scanner = new PLPScanner(input).scan(); //Create a Scanner and initialize it\n\t\t\tshow(scanner); //Display the Scanner\n\t\t\tPLPParser parser = new PLPParser(scanner);\n\t\t\treturn parser;\n\t\t}",
"@Test\r\n\tpublic void typeParserTest() {\n\t\tvalidateTypeParse(\r\n\t\t\t\t\"(function that takes a number and outputs a number)\");\r\n\t\t// validateTypeParse(\r\n\t\t// \"(function that takes a number and a (function that takes a number)\r\n\t\t// and outputs a number)\");\r\n\t\t// validateTypeParse(\r\n\t\t// \"(function that takes a number, a string, and an element_of_type_3\r\n\t\t// and outputs a number)\");\r\n\t\t// validateTypeParse(\"(function that takes a number)\");\r\n\t\t// assertEquals(\"procedure\", cdLoopType(\"function\"));\r\n\t\t// validateTypeParse(\"(function that outputs a number)\");\r\n\t\t// validateTypeParse(\"procedure\");\r\n\t}",
"private Object parse(\n String value\n ){\n return \n value.startsWith(\"P\") || value.startsWith(\"-P\") ? Datatypes.create(Duration.class, value) : \n value.indexOf('T') < 0 ? Datatypes.create(XMLGregorianCalendar.class, value) : \n Datatypes.create(java.util.Date.class, value);\n }",
"public void applyPattern(final String pat) {\n\t\tthis.pattern = pat;\n\t\tsetLocale(null, null);\n\t\t// reset parsed pattern items\n\t\tpatternItems = null;\n\t}",
"@Override\n\tpublic void parse() throws IOException {\n\t}",
"public interface Parser<T> {\n\t\n\t/**\n\t * Il metodo che deve essere completato per poter analizzare la stringa\n\t * @param value la stringa da analizzare\n\t * @return il tipo di dato voluto\n\t */\n\tpublic T parse(String value);\n\t\n}",
"public void parse(String fileName) throws Exception;",
"protected void initializeFromFormat(String p_150269_1_) {\n\t\tfinal Matcher var3 = stringVariablePattern.matcher(p_150269_1_);\n\t\tint var4 = 0;\n\t\tint var5 = 0;\n\n\t\ttry {\n\t\t\tint var7;\n\n\t\t\tfor (; var3.find(var5); var5 = var7) {\n\t\t\t\tfinal int var6 = var3.start();\n\t\t\t\tvar7 = var3.end();\n\n\t\t\t\tif (var6 > var5) {\n\t\t\t\t\tfinal ChatComponentText var8 = new ChatComponentText(\n\t\t\t\t\t\t\tString.format(p_150269_1_.substring(var5, var6),\n\t\t\t\t\t\t\t\t\tnew Object[0]));\n\t\t\t\t\tvar8.getChatStyle().setParentStyle(getChatStyle());\n\t\t\t\t\tchildren.add(var8);\n\t\t\t\t}\n\n\t\t\t\tfinal String var14 = var3.group(2);\n\t\t\t\tfinal String var9 = p_150269_1_.substring(var6, var7);\n\n\t\t\t\tif (\"%\".equals(var14) && \"%%\".equals(var9)) {\n\t\t\t\t\tfinal ChatComponentText var15 = new ChatComponentText(\"%\");\n\t\t\t\t\tvar15.getChatStyle().setParentStyle(getChatStyle());\n\t\t\t\t\tchildren.add(var15);\n\t\t\t\t} else {\n\t\t\t\t\tif (!\"s\".equals(var14))\n\t\t\t\t\t\tthrow new ChatComponentTranslationFormatException(this,\n\t\t\t\t\t\t\t\t\"Unsupported format: \\'\" + var9 + \"\\'\");\n\n\t\t\t\t\tfinal String var10 = var3.group(1);\n\t\t\t\t\tfinal int var11 = var10 != null ? Integer.parseInt(var10) - 1\n\t\t\t\t\t\t\t: var4++;\n\t\t\t\t\tchildren.add(getFormatArgumentAsComponent(var11));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (var5 < p_150269_1_.length()) {\n\t\t\t\tfinal ChatComponentText var13 = new ChatComponentText(\n\t\t\t\t\t\tString.format(p_150269_1_.substring(var5),\n\t\t\t\t\t\t\t\tnew Object[0]));\n\t\t\t\tvar13.getChatStyle().setParentStyle(getChatStyle());\n\t\t\t\tchildren.add(var13);\n\t\t\t}\n\t\t} catch (final IllegalFormatException var12) {\n\t\t\tthrow new ChatComponentTranslationFormatException(this, var12);\n\t\t}\n\t}",
"@Test\r\n\tpublic void test3() throws IOException, LexerException, ParserException {\r\n\t\tStringReader ex = new StringReader(\"(lam^s f.\\n\\t(lam^s x.x) (f 1))\\n(lam^c y.\\n\\t(lam^s z.z) y)\");\r\n\r\n\t\tParser parser = new Parser();\r\n\t\tTerm result = parser.Parsing(ex);\r\n\t}",
"UsagePattern getUsagePattern();",
"@Test\n public void macroParseTest1() throws TapisException\n {\n var s = \"$varname\";\n var m = _pattern.matcher(s);\n var b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), s, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), null, \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"varname\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), s, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), null, \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname,/path/name\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), \"/path/name\", \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname ,/path/name\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), \"/path/name\", \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname , /path/name\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), \"/path/name\", \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname , /path/name \";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), \"/path/name\", \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname \";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), null, \"Failed on \\\"\"+ s + \"\\\"\");\n\n s = \"$varname,\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, false, \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname /path/name\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, false, \"Failed on \\\"\"+ s + \"\\\"\");\n }",
"List<ThingPackage> parseLines(List<String> line);",
"public abstract ArgumentParser makeParser();",
"private String[] getPatterns(StreamTokenizer st) throws IOException {\n\t\t// get language\n\t\tString lang = getLanguageFromTokenizer(st);\n\n\t\tif (st.nextToken() != StreamTokenizer.TT_EOF)\n\t\t\tthrow new IOException(\n\t\t\t\t\t\"PATTERNS takes exactly one (language) or no arguments (default language)!\");\n\n\t\treturn ng.getPatterns(lang);\n\t}",
"public void parse(Lexer lex);",
"Pattern getTagPattern();",
"@Override\n public void parse(String sentence) {\n String[] tmp = sentence.split(DELIM);\n if (tmp.length > 4) {\n // fits example 1\n updateTimeStamp(parseTimeToDate(tmp[5]));\n if (!\"A\".equals(tmp[6])) {\n return;\n }\n mFixLatitude = parseCoordinate(tmp[1], tmp[2]);\n mFixLongitude = parseCoordinate(tmp[3], tmp[4]);\n } else if (tmp.length > 3) {\n // fits example 2\n mFixLatitude = parseCoordinate(tmp[1], tmp[2]);\n mFixLongitude = parseCoordinate(tmp[3], tmp[4]);\n }\n }",
"static Extractor byRegex(Pattern pattern) {\n\t\t\treturn Splitter.regexGroupExtractor(pattern);\n\t\t}",
"protected void parse() throws ParseException {\n String s;\n try {\n s=getFullText();\n } catch (IOException ioe) {\n if (ioe instanceof FileNotFoundException) {\n throw new DataNotFoundException (\"Could not find log file.\", ioe);\n } else {\n throw new ParseException (\"Error getting log file text.\", new File (getFileName()));\n }\n }\n StringTokenizer sk = new StringTokenizer(s);\n ArrayList switches = new ArrayList(10);\n while (sk.hasMoreElements()) {\n String el =sk.nextToken().trim();\n if (el.startsWith(\"-J\")) {\n if (!(el.equals(\"-J-verbose:gc\"))) {\n if (!(el.startsWith(\"-J-D\"))) {\n JavaLineswitch curr = new JavaLineswitch(el.substring(2));\n addElement (curr); \n }\n }\n }\n }\n }",
"public void addPattern(String pattern) {\n\t\tArrayList<String> patterns = new ArrayList<String>();\n\t\tStringTokenizer entries = new StringTokenizer(pattern, \":,\");\n\t\twhile (entries.hasMoreTokens()) {\n\t\t\tpatterns.add(entries.nextToken());\n\t\t}\n\n\t\taddPatterns((String[]) patterns.toArray(new String[patterns.size()]));\n\t}",
"protected abstract SimpleType doParseString(String s);",
"private ReaderWorld() {\r\n pattern = Pattern.compile(regularExpression);\r\n matcher = pattern.matcher(getText());\r\n }",
"CParser getParser();",
"@Test\n\tpublic void aPatternCanEndWithAComma() {\n\t\tfinal Tokenizable line = line(\"(Cons { head: 0, })\");\n\t\tcontext.checking(new Expectations() {{\n\t\t\toneOf(builder).accept(with(CtorPatternMatcher.ctor(\"Cons\").field(\"head\", ConstPatternMatcher.number(0))));\n\t\t}});\n\t\tTDAPatternParser parser = new TDAPatternParser(errors, vnamer, builder, topLevel);\n\t\tTDAParsing canContinue = parser.tryParsing(line);\n\t\tassertNotNull(canContinue);\n\t\tassertNull(parser.tryParsing(line));\n\t}",
"public void readCommand(Scanner s) throws WrongCommandFormatException {\n String next = s.next();\n if (next.equals(\"/by\")) {\n throw new WrongCommandFormatException(\"Wrong keyword used. Please try again with /at\");\n } else if (next.equals(\"/at\")) {\n parseTimeframe(s);\n } else {\n this.description += next + \" \";\n }\n }",
"private static List<TokenInfo> parsePara(String args) {\n\t\tList<TokenInfo> tokens = new ArrayList<TokenInfo>();\n\t\tStringBuffer token = new StringBuffer();\n\t\tint status = 0;\n\t\tfor_bp: for (int i = 0; i < args.length(); i++) {\n\t\t\tchar c = args.charAt(i);\n\t\t\tswitch (c) {\n\t\t\tcase ' ': {\n\t\t\t\tswitch (status) {\n\t\t\t\tcase 0:\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\ttokenIn(tokens, token, status);\n\t\t\t\t\tstatus = 0;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\ttokenIn(tokens, token, status);\n\t\t\t\t\tstatus = 0;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstatus = -1;\n\t\t\t\t\tbreak for_bp;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase '-': {\n\t\t\t\tswitch (status) {\n\t\t\t\tcase 0:\n\t\t\t\t\tstatus = 1;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstatus = -1;\n\t\t\t\t\tbreak for_bp;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'a':\n\t\t\tcase 'b':\n\t\t\tcase 'c':\n\t\t\tcase 'd':\n\t\t\tcase 'e':\n\t\t\tcase 'f':\n\t\t\tcase 'g':\n\t\t\tcase 'h':\n\t\t\tcase 'i':\n\t\t\tcase 'j':\n\t\t\tcase 'k':\n\t\t\tcase 'l':\n\t\t\tcase 'm':\n\t\t\tcase 'n':\n\t\t\tcase 'o':\n\t\t\tcase 'p':\n\t\t\tcase 'q':\n\t\t\tcase 'r':\n\t\t\tcase 's':\n\t\t\tcase 't':\n\t\t\tcase 'u':\n\t\t\tcase 'v':\n\t\t\tcase 'w':\n\t\t\tcase 'x':\n\t\t\tcase 'y':\n\t\t\tcase 'z':\n\t\t\tcase 'A':\n\t\t\tcase 'B':\n\t\t\tcase 'C':\n\t\t\tcase 'D':\n\t\t\tcase 'E':\n\t\t\tcase 'F':\n\t\t\tcase 'G':\n\t\t\tcase 'H':\n\t\t\tcase 'I':\n\t\t\tcase 'J':\n\t\t\tcase 'K':\n\t\t\tcase 'L':\n\t\t\tcase 'M':\n\t\t\tcase 'N':\n\t\t\tcase 'O':\n\t\t\tcase 'P':\n\t\t\tcase 'Q':\n\t\t\tcase 'R':\n\t\t\tcase 'S':\n\t\t\tcase 'T':\n\t\t\tcase 'U':\n\t\t\tcase 'V':\n\t\t\tcase 'W':\n\t\t\tcase 'X':\n\t\t\tcase 'Y':\n\t\t\tcase 'Z': {\n\t\t\t\tswitch (status) {\n\t\t\t\tcase 1:\n\t\t\t\tcase 2:\n\t\t\t\t\ttoken.append(c);\n\t\t\t\t\tstatus = 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0:\n\t\t\t\tcase 3:\n\t\t\t\t\ttoken.append(c);\n\t\t\t\t\tstatus = 3;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstatus = -1;\n\t\t\t\t\tbreak for_bp;\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase '0':\n\t\t\tcase '1':\n\t\t\tcase '2':\n\t\t\tcase '3':\n\t\t\tcase '4':\n\t\t\tcase '5':\n\t\t\tcase '6':\n\t\t\tcase '7':\n\t\t\tcase '8':\n\t\t\tcase '9': {\n\t\t\t\tswitch (status) {\n\t\t\t\tcase 0:\n\t\t\t\t\ttoken.append(c);\n\t\t\t\t\tstatus = 3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\ttoken.append('-');\n\t\t\t\t\ttoken.append(c);\n\t\t\t\t\tstatus = 3;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\ttoken.append(c);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\tswitch (status) {\n\t\t\t\tcase 0:\n\t\t\t\t\ttoken.append(c);\n\t\t\t\t\tstatus = 3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\tcase 3:\n\t\t\t\t\ttoken.append(c);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstatus = -1;\n\t\t\t\t\tbreak for_bp;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttokenIn(tokens, token, status);\n\n\t\treturn tokens;\n\t}",
"public interface RegExp {\n String NUMBER_OF_COMPOSITION = \"^[1-2][0-9]|[1-9]$\";\n String BREAK_DATE_BY_DOT = \"[.]\";\n String IDENTIFY_BUMDLE = \"^([E|e][N|n])|[У|у][К|к][Р|р]$\";\n String DURATION = \"^[1-9]|[1-9][0-9]|[1-4][0-9][0-9]$\";\n}",
"public ModemPMParser()\n\t{\n\t\tsuper();\n\t}",
"public parser(Scanner s) {super(s);}",
"public Task parseLine(String line) {\n assert(line != null && !line.equals(\"\"));\n\n String[] x = line.split(\"\\\\|\");\n String taskType = x[0].strip();\n boolean isDone = !x[1].strip().equals(\"0\");\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"d MMM yyyy HH:mm\");\n\n if (taskType.equals(\"T\")) {\n return new ToDo(x[2].strip(), isDone);\n } else if (taskType.equals(\"D\")) {\n String by = x[x.length - 1].strip();\n LocalDateTime byy = LocalDateTime.parse(by, formatter);\n return new Deadline(x[2].strip(), isDone, byy);\n } else { // Event\n String at = x[x.length - 1].strip();\n LocalDateTime att = LocalDateTime.parse(at, formatter);\n return new Event(x[2].strip(), isDone, att);\n }\n }",
"public static String parseDataFromPAT(String dataFromPAT) throws Exception {\n\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n\t\t// Get a Document Builder from the factory\n\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\t// Create a new Input Source from PATData / takes other formats too such\n\t\t// as file\n\t\tInputSource inputSource = new InputSource(new StringReader(dataFromPAT));\n\t\t// Create a DOM (Data object model) object\n\t\tDocument doc = dBuilder.parse(inputSource);\n\t\t// some sort of formatter\n\t\tdoc.getDocumentElement().normalize();\n\t\t// get all nodes of prefix prd\n\t\tNodeList nList = doc.getElementsByTagName(\"prd\");\n\n\t\tString modifiedData = \"\";\n\t\tString route, predictedTime;\n\t\tfor (int nodeId = 0; nodeId < nList.getLength(); nodeId++) {\n\t\t\tNode nNode = nList.item(nodeId);\n\t\t\tif (nNode.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\tElement eElement = (Element) nNode;\n\t\t\t route = modifiedData + eElement.getElementsByTagName(\"rt\").item(0).getTextContent();\n\t\t\t\tpredictedTime = eElement.getElementsByTagName(\"prdtm\").item(0).getTextContent();\n\t\t\t\t// modifying the data and formatting it as required. Substring function to use parts of data \n\t\t\t\t\n\t\t\t\t\n\t\t\t\tString expectedPattern = \"yyyyMMdd HH:mm\";\n\t\t\t\tSimpleDateFormat formatter = new SimpleDateFormat(expectedPattern);\n\t\t\t\tDate dateBus = formatter.parse(predictedTime);\n\t\t\t\tDateTime datetimeBus = new DateTime(dateBus);\n\t\t\t\tDateTime datetimeNow = new DateTime();\n\t\t\t\tmodifiedData = route + \"-\" + Minutes.minutesBetween(datetimeNow, datetimeBus).getMinutes() + \"\\n\";\n\t\t\t}\n\t\t}\n\t\treturn modifiedData;\n\t}",
"public AvalonFormatter( final String pattern )\n {\n this( pattern, DEFAULT_STACK_DEPTH, DEFAULT_PRINT_CASCADING );\n }",
"public FractalParser(java_cup.runtime.Scanner s) {super(s);}",
"public static ArrayList<Task> parse(String toParse) {\n ArrayList<Task> result = new ArrayList<>();\n Scanner ps = new Scanner(toParse); // passes whole file into the scanner\n while (ps.hasNextLine()) {\n String nLine = ps.nextLine(); // parse one line at a time\n int ref = 3; // reference point\n char taskType = nLine.charAt(ref);\n switch (taskType) {\n case 'T':\n parseTodo(ref, nLine, result);\n break;\n case 'D':\n parseDeadline(ref, nLine, result);\n break;\n case 'E':\n parseEvent(ref, nLine, result);\n break;\n default:\n System.out.println(\"Unknown input\");\n break;\n }\n }\n return result;\n }",
"@Inject(\n method = \"readPattern\",\n at = @At(value = \"JUMP\", ordinal = 0, shift = At.Shift.AFTER),\n slice = @Slice(\n from = @At(\n value = \"INVOKE\",\n target = \"Lnet/minecraft/nbt/ListTag;size()I\"\n )\n )\n )\n private void parseBppPatternDataInline(CallbackInfo info) {\n int nextIndex = this.patterns.size() - 1;\n while(nextLoomPatternIndex < loomPatterns.size()) {\n LoomPatternData data = loomPatterns.get(nextLoomPatternIndex);\n if(data.index == nextIndex) {\n this.patternCacheKey += partialCacheKey(data);\n nextLoomPatternIndex++;\n } else {\n break;\n }\n }\n }",
"private void parse(String str) {\n if (str == null) {\n throw new IllegalArgumentException(\"Empty job execution instruction found!\");\n }\n String[] parts = str.split(\" \");\n if (parts.length == 1) {\n parseSpecial(str);\n } else if (parts.length == 5) {\n try {\n setMinutes(parseMinutes(parts[0].trim().toLowerCase()));\n setHours(parseHours(parts[1].trim().toLowerCase()));\n setDaysOfMonth(parseDaysOfMonth(parts[2].trim().toLowerCase()));\n setMonths(parseMonths(parts[3].trim().toLowerCase()));\n setDaysOfWeek(parseDaysOfWeek(parts[4].trim().toLowerCase()));\n } catch (NumberFormatException e) {\n throw new IllegalArgumentException(\"Schedule \" + str + \" is malformed:\" + e.getMessage());\n }\n } else {\n throw new IllegalArgumentException(\"Schedule \" + str + \" is malformed!\");\n }\n }",
"@Override\n public void parse(String sentence) {\n String[] tmp = sentence.split(DELIM);\n if (tmp.length > 3) {\n updateTimeStamp(parseTimeToDate(tmp[1]));\n if (!\"A\".equals(tmp[2])) {\n return;\n }\n mFixLatitude = parseCoordinate(tmp[3], tmp[4]);\n mFixLongitude = parseCoordinate(tmp[5], tmp[6]);\n mFixSpeed = parseSpeedInKnots(tmp[7]);\n mFixBearing = parseStringToFloat(tmp[8]);\n }\n }",
"private void parse () throws Exception\n\t{\n\t\tStringTokenizer selectors = new StringTokenizer(this.selectorString, \";\");\n\t\tList selectorList = new ArrayList();\n\t\tthis.noneFacilitySet = new HashSet();\n\t\t\n\t\twhile (selectors.hasMoreTokens()) {\n\t\t\tString selector = selectors.nextToken();\n\t\t\t\n\t\t\t// now have basically facility.severity\n\t\t\tStringTokenizer facilitySeverity = new StringTokenizer(selector, \".\");\n\t\t\t\n\t\t\tString facilityMatchString = facilitySeverity.nextToken();\n\t\t\tString severityMatchString = facilitySeverity.nextToken();\n\t\t\t\n\t\t\t// facility match is in form facility, facility, ...\n\t\t\tint facilityMatch[] = parseFacilityMatchString(facilityMatchString);\n\t\t\tint severityMatch = parseSeverityMatchString(severityMatchString);\n\t\t\t\n\t\t\t// handle \"<facility>.none\"\n\t\t\tif (severityMatch == -1) {\n\t\t\t\tfor (int i = 0; i < facilityMatch.length; i++) {\n\t\t\t\t\tnoneFacilitySet.add(new Integer(facilityMatch[i]));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// add to selector list\n\t\t\t\tselectorList.add(new FacilitySeveritySelector(facilityMatch, severityMatch));\n\t\t\t}\n\t\t}\n\n\t\t// construct an array for matching purposes - will be better performance\n\t\tthis.selectorArray = \n\t\t\tnew FacilitySeveritySelector[selectorList.size()];\n\t\t\n\t\tint j = 0;\n\t\tfor (Iterator i = selectorList.iterator(); i.hasNext(); j++) {\n\t\t\tthis.selectorArray[j] = (FacilitySeveritySelector) i.next();\n\t\t}\n\t}",
"protected LogParserMatch() {\n\t}",
"private void parseLine(String line) throws ParsingException {\n if (line.startsWith(COMMENT_PREFIX)) //Ignore comments\n return;\n String parts[] = line.split(SEPARATOR_PARAMETER);\n if (parts.length == 2) { //PARAMETER=VALUE\n if (isValidParameter(parts[0])) //If the parameter is present in the config list then add it\n parameters.put(parts[0], parts[1]);\n } else if (parts.length == 1 && parts[0].startsWith(OPTION_PREFIX)) { //-OPTION\n String option = parts[0].substring(OPTION_PREFIX.length());\n if (isValidOption(option))\n parameters.put(option, null); //Null in value differs options from parameters\n } else\n throw new ParsingException(buildErrorMessage(EXCEPTION_BAD_FORMAT));\n }",
"private String parseParameter(String[] args, int parameterIndex) throws ExceptionMalformedInput\n {\n if (parameterIndex >= args.length)\n throw new ExceptionMalformedInput(\"Missing value for the parameter: \" + args[parameterIndex]);\n return args[parameterIndex];\n }",
"private void parseProtocol(String protocol) {\n try (Scanner sc = new Scanner(protocol)) {\n //parse first line\n this.method = Method.valueOf(sc.next());\n this.url = sc.next();\n String httpVersion = sc.next();\n this.version = Double.parseDouble(httpVersion.substring(5));\n\n while (sc.hasNext(\".+:\")) {\n String header = sc.next();\n header = header.substring(0, header.indexOf(':'));\n String value = sc.next() + sc.nextLine();\n this.headings.put(header, value);\n }\n }\n\n }",
"protected abstract void parseArgs() throws IOException;",
"public abstract void parse() throws IOException;",
"public void addPattern(TokenPattern pattern)\n throws ParserCreationException {\n\n switch (pattern.getType()) {\n case TokenPattern.STRING_TYPE:\n try {\n stringDfaMatcher.addPattern(pattern);\n } catch (Exception e) {\n throw new ParserCreationException(\n ParserCreationException.INVALID_TOKEN_ERROR,\n pattern.getName(),\n \"error adding string token: \" +\n e.getMessage());\n }\n break;\n case TokenPattern.REGEXP_TYPE:\n try {\n nfaMatcher.addPattern(pattern);\n } catch (Exception ignore) {\n try {\n regExpMatcher.addPattern(pattern);\n } catch (Exception e) {\n throw new ParserCreationException(\n ParserCreationException.INVALID_TOKEN_ERROR,\n pattern.getName(),\n \"regular expression contains error(s): \" +\n e.getMessage());\n }\n }\n break;\n default:\n throw new ParserCreationException(\n ParserCreationException.INVALID_TOKEN_ERROR,\n pattern.getName(),\n \"pattern type \" + pattern.getType() + \" is undefined\");\n }\n }",
"List<LoggingEvent> parse(InputStream is) throws ParseException;",
"public interface Validator {\n\n /**\n * Validates a pattern against formatting rules. The rules must match the {@link Formatter} this validator will be\n * used with.\n *\n * @param pattern formatting pattern\n * @param types list of parameter types\n * @throws InvalidPatternException if the format is incorrect or the parameter types do not match the pattern\n */\n void validate(String pattern, Type... types) throws InvalidPatternException;\n}",
"public Pattern( PatternAnalyser patternAnalyser ) {\n this.patternAnalyser = patternAnalyser;\n }",
"private void parse(Reader reader) throws IOException {\n/* 260 */ BufferedReader buf_reader = new BufferedReader(reader);\n/* 261 */ String line = null;\n/* 262 */ String continued = null;\n/* */ \n/* 264 */ while ((line = buf_reader.readLine()) != null) {\n/* */ \n/* */ \n/* 267 */ line = line.trim();\n/* */ \n/* */ try {\n/* 270 */ if (line.charAt(0) == '#')\n/* */ continue; \n/* 272 */ if (line.charAt(line.length() - 1) == '\\\\') {\n/* 273 */ if (continued != null) {\n/* 274 */ continued = continued + line.substring(0, line.length() - 1); continue;\n/* */ } \n/* 276 */ continued = line.substring(0, line.length() - 1); continue;\n/* 277 */ } if (continued != null) {\n/* */ \n/* 279 */ continued = continued + line;\n/* */ \n/* */ try {\n/* 282 */ parseLine(continued);\n/* 283 */ } catch (MailcapParseException e) {}\n/* */ \n/* */ \n/* 286 */ continued = null;\n/* */ \n/* */ continue;\n/* */ } \n/* */ try {\n/* 291 */ parseLine(line);\n/* */ }\n/* 293 */ catch (MailcapParseException e) {}\n/* */ \n/* */ \n/* */ }\n/* 297 */ catch (StringIndexOutOfBoundsException e) {}\n/* */ } \n/* */ }",
"public void parse(String line)\n\t{\n\t\tif(line.length() == 0)\n\t\t\treturn;\n\t\tif(line.startsWith(\";\"))\n\t\t\treturn;\n\t\tline = line.toUpperCase();\n\t\t\n\t\tif(Utils.isCommand(line)){\n\t\t\texecuteCommand(line);\n\t\t\treturn;\n\t\t}\n\t\t//line syntax = <TYPE> <NAME> = {EXPR}\n\t\tStringBuilder build = new StringBuilder();\n\t\tString name = \"\";\n\t\tString type = \"\";\n\t\tint i = 0;\n\t\t//check if the line starts with a letter, we expect a Type declaration, made of letters :P\n\t\tif(!Utils.isLetter(line.charAt(i)))\n\t\t\terror(\"LETTER EXPECTED, NOT \" + line.charAt(i));\t\n\t\t\n\t\tchar c = line.charAt(i); //current character to analyze.\n\t\t\n\t\twhile(i < line.length() && Utils.isLetter(c))\n\t\t{\n\t\t\t//build.append(c);\n\t\t\tc = line.charAt(i); \t\n\t\t\ti++;\t\t\n\t\t}\n\t\t//space char expected before the type declaration.\n\t\tif(!Utils.isSpace(c) && i < line.length())\n\t\t\terror(\"INVALID CHARACTER \\\" \" + c + \"\\\" \");\n\t\t\n\t\t//here we obtain the type.\n\t\t//String t = build.toString();\n\t\tString t = line.substring(0, i-1);\n\t\tif(Utils.isValidType(t))\n\t\t{\n\t\t\ttype = t;\n\t\t}\n\t\telse\n\t\t\terror(t + \" IS NOT A VALID TYPE.\");\n\t\t\n\t\t//re-init stringbuilder.\n\t\tbuild = new StringBuilder();\t\n\t\t\n\t\t//ignore all whitespace chars.\n\t\twhile(i < line.length() && Utils.isSpace(line.charAt(i)))\n\t\t\ti++;\n\t\t\n\t\t//if name is not present, but the index reached the \" = \" sign, throw an Exception.\n\t\tif(line.charAt(i) == '=')\n\t\t\terror(\"NAME NOT FOUND, WHAT THE HECK ARE YOU TIPYING???\");\n\t\t\n\t\t//Names MUST start with a letter.\n\t\tif(!Utils.isLetter(line.charAt(i)))\n\t\t\terror(\"LETTER EXPECTED, NOT \" + line.charAt(i));\n\t\t\n\t\t//update the c char.\n\t\tc = line.charAt(i);\n\t\t\n\t\t//now we must obtain the name token.\n\t\twhile(i < line.length() && Utils.isLetter(c))\n\t\t{\n\t\t\tbuild.append(c);\n\t\t\ti++;\n\t\t\tc = line.charAt(i); \t\t\t\n\t\t}\n\t\t//here we have reached the edge of the name, this MUST be followed by a space char.\n\t\tif(i < line.length() && Utils.isSpace(c))\n\t\t{\n\t\t\tString n = build.toString();\n\t\t\tif(t.length() > 8)\n\t\t\t\terror(\"NAME LENGTH CAN'T BE GREATER THAN 8 CHARS\");\n\t\t\tif(t.length() == 8)\n\t\t\t\tSystem.out.println(\"name token hit the length limit, please use short names.\");\n\t\t\tname = n;\n\t\t}\n\t\telse\n\t\t\terror(\"ERROR IN CHARACTER \\\" \" + c + \" \\\", SPACE EXPECTED.\");\n\t\t\n\t\t//re-init stringbuilder.\n\t\tbuild = new StringBuilder();\n\t\t\n\t\t//ignore all whitespace chars.\n\t\twhile(i < line.length() && Utils.isSpace(line.charAt(i)))\n\t\t\ti++;\n\t\t\n\t\t//here we expect a \" = \" character.\n\t\tif(line.charAt(i) != '=')\n\t\t\terror(\"MISSING \\\" = \\\" SIMBOL\");\n\t\t\n\t\t//advance to next char, idk why, but without this, the compiler crashes.\n\t\ti++;\n\t\t\n\t\t//ignore all whitespace chars.\n\t\twhile(i < line.length() && Utils.isSpace(line.charAt(i)))\n\t\t\ti++;\n\t\t\n\t\t//get expr text.\n\t\tString e = line.substring(i);\n\t\t//solve any reference to other vars, only for basic types.\n\t\tif(Utils.containRefs(e) && Utils.isBasicType(type))\n\t\t\te = solveRefs(e);\n\t\te = e.trim();\n\t\tif(type.equals(\"INTEGER\"))\n\t\t\tints.add(new Int(name, solveMath(e)));\n\t\tif(type.equals(\"STRING\"))\n\t\t\tstrs.add(new Str(name,e));\n\t\tif(type.equals(\"BOOLEAN\"))\n\t\t\tbools.add(new Bool(name,Boolean.parseBoolean(e)));\n\t\tif(Utils.isFuncType(type))\n\t\t{}\n\t\tif(Utils.isCallType(type))\n\t\t{\n\t\t\tExecutable ex = null;\n\t\t\tif(type.equals(\"CALLX\"))\t\n\t\t\t\tex = solveCallx(name, e);\n\t\t\tif(type.equals(\"RETURN\"))\n\t\t\t\tex = solveReturn(name, e);\n\t\t\texecution.executionList.add(ex);\n\t\t}\n\t\tlnumber += 10;\n\t\tlines.add(line);\n\t}",
"private Pattern ConvertToPattern(String configEntry)\n {\n String finalResult = configEntry;\n int regexFlags = 0;\n\n finalResult = finalResult.replace(\", \",\"|\");\n\n finalResult = finalResult.substring(1,finalResult.length()-1);\n\n regexFlags = ConvertRegExOptions(finalResult);\n\n return(Pattern.compile(finalResult, regexFlags));\n }",
"public abstract void parseValue(String value);",
"long parse(Consumer<Line> lineConsumer, Consumer<JSaParException> errorConsumer) throws IOException;",
"public interface Parser<T> {\n T parse(String source) throws JAXBException;\n\n\n List<String> groupContent(String content);\n\n}",
"public void parseQuery(String queryString) {\r\n\t\t// call the methods\r\n\t\tgetSplitStrings(queryString);\r\n\t\tgetFile(queryString);\r\n\t\tgetBaseQuery(queryString);\r\n\t\tgetConditionsPartQuery(queryString);\r\n\t\tgetConditions(queryString);\r\n\t\tgetLogicalOperators(queryString);\r\n\t\tgetFields(queryString);\r\n\t\tgetOrderByFields(queryString);\r\n\t\tgetGroupByFields(queryString);\r\n\t\tgetAggregateFunctions(queryString);\r\n\t}",
"@Test\n public void parse_validArgs_returnsGroupCommand() {\n GroupCommand expectedGroupCommand =\n new GroupCommand(new GroupPredicate(new Group(\"CS2101\")));\n assertParseSuccess(parser, \"CS2101\", expectedGroupCommand);\n\n // multiple whitespaces between keywords\n assertParseSuccess(parser, \" \\n CS2101 \\n \\t \", expectedGroupCommand);\n }",
"private SourceFile _parseString(String txt) throws ParseException {\n ACParser p = new ACParser(txt);\n return p.SourceFile();\n }",
"public NFA parse() throws ParseException;",
"private String parseRegExp(String exp) throws Exception {\r\n\t\treturn RegexpTranslationHelper.translateANTLRToAutomatonStyle(exp);\r\n\t}",
"public TokenData(Pattern pattern,TokenType type)\n\t{\n\t\tthis.pattern=pattern;\n\t\tthis.type=type;\n\t}",
"private static String parseToken(String pattern, int[] indexRef) {\n StringBuilder buf = new StringBuilder();\n\n int i = indexRef[0];\n int length = pattern.length();\n\n char c = pattern.charAt(i);\n if (c == '%' && i + 1 < length && pattern.charAt(i+1) != '%') {\n //Grab pattern tokens\n c = pattern.charAt(++i);\n //0 is ignored for input, and this ignores alternative religious eras\n if ((c == '0' || c == 'E') && i + 1 >= length) c = pattern.charAt(++i);\n buf.append('%');\n buf.append(c);\n } else { // Grab all else as text\n buf.append('\\''); // mark literals with ' in first place\n buf.append(c);\n for (i++; i < length;i++) {\n c = pattern.charAt(i);\n if (c == '%' ) { // consume literal % otherwise break\n if (i + 1 < length && pattern.charAt(i + 1) == '%') i++;\n else { i--; break; }\n }\n buf.append(c);\n }\n }\n\n indexRef[0] = i;\n return buf.toString();\n }",
"public LineInspector(final Pattern p) {\n pattern = p;\n }",
"@Override\n public void parse(String sentence) {\n String[] tmp = sentence.split(DELIM);\n if (tmp.length > 7) {\n // always parse timestamp\n updateTimeStamp(parseTimeToDate(tmp[1]));\n mFixQuality = Integer.parseInt(tmp[6]);\n if (mFixQuality == 0) {\n // return invalid location\n isValid = false;\n return;\n }\n mFixLatitude = parseCoordinate(tmp[2], tmp[3]);\n mFixLongitude = parseCoordinate(tmp[4], tmp[5]);\n mFixSatsTracked = parseStringToInt(tmp[7]);\n mFixAccuracy = parseStringToFloat(tmp[8]) * HEPE_FACTOR;\n mFixAltitude = parseStringToFloat(tmp[9]);\n isValid = true;\n }\n }",
"private Module parse(InputStream input)\r\n\t\t\t\t\tthrows ModuleParseException\r\n\t{\n\t\treturn null;\r\n\t}",
"private Command parseCommand(String s) {\n\t\tif (constantMatch.matcher(s).matches()) {\n\t\t\treturn new Constant(Double.parseDouble(s));\n\t\t}\n\t\tif (variableMatch.matcher(s).matches()) {\n\t\t\treturn myDictionary.getVariable(s);\n\t\t}\n\t\tif (s.equals(START_LIST)) {\n\t\t\treturn createListCommand();\n\t\t}\n\t\tif(s.equals(START_GROUP)) {\n\t\t\tCommand c = getCommandOrFunction(codeReader.next());\n\t\t\tif(c.howManyArguments() <= 0) {\n\t\t\t\tthrow new SLogoException(\"Attempting to group command that takes no arguments\");\n\t\t\t}\n\t\t\tcreateGroupCommand(c); \n\t\t\treturn c;\n\t\t}\n\t\treturn findTrueCommand(s);\n\t}",
"private void parseLocation(String location) {\n //Match it.\n Matcher matcher = this.locationMatches(PATTERN, location);\n\n //If it doesn't match. Don't do anything.\n if (!matcher.matches())\n return;\n\n //Parse the components.\n String user = (matcher.group(1) != null ? matcher.group(1) : matcher.group(4));\n String repository = (matcher.group(2) != null ? matcher.group(2) : matcher.group(5));\n String reference = (matcher.group(3) != null ? matcher.group(3) : \"master\");\n\n //Hydrate the model.\n this.setUser(user);\n this.setRepository(repository);\n this.setReference(reference);\n }",
"Parse createParse();"
] |
[
"0.5435524",
"0.5404423",
"0.5404279",
"0.53899455",
"0.5331775",
"0.5321181",
"0.5304134",
"0.5278253",
"0.5223602",
"0.52036124",
"0.5199519",
"0.51990426",
"0.51952684",
"0.51400226",
"0.5076566",
"0.50483954",
"0.50469637",
"0.49946678",
"0.49801013",
"0.49727786",
"0.49642164",
"0.49585244",
"0.4955171",
"0.4949655",
"0.49454543",
"0.49397632",
"0.49362844",
"0.48956475",
"0.4879243",
"0.48697472",
"0.48612353",
"0.48604318",
"0.48460287",
"0.4842919",
"0.48299122",
"0.48295698",
"0.48255584",
"0.48230597",
"0.48019326",
"0.47881004",
"0.4786556",
"0.47833896",
"0.4779604",
"0.47761723",
"0.4754145",
"0.4749549",
"0.47459552",
"0.47363418",
"0.47297978",
"0.47284663",
"0.4727784",
"0.4724095",
"0.47100428",
"0.4702868",
"0.46963254",
"0.4669226",
"0.4666071",
"0.46628094",
"0.46583366",
"0.4658243",
"0.46580565",
"0.46533933",
"0.46471837",
"0.46382836",
"0.46343774",
"0.46341926",
"0.46271384",
"0.4617615",
"0.46137947",
"0.46129507",
"0.46118173",
"0.46059796",
"0.46046305",
"0.4599865",
"0.4599393",
"0.4596852",
"0.45926282",
"0.45881772",
"0.45815873",
"0.45815107",
"0.45805755",
"0.457862",
"0.45747378",
"0.45742118",
"0.4571834",
"0.4570577",
"0.4567805",
"0.45668483",
"0.45601615",
"0.45599842",
"0.45554426",
"0.45499012",
"0.45496893",
"0.45395097",
"0.4533396",
"0.45333207",
"0.4530536",
"0.4530454",
"0.45249838",
"0.45212933",
"0.4519666"
] |
0.0
|
-1
|
Parse a template, per the docs
|
public List<TemplItem> template() {
List<TemplItem> items = new ArrayList<>();
int l;
int n;
boolean done = false;
while (!done) {
DNAToken token = parser.step();
switch (token) {
case CONT:
break;
case C:
items.add(new TemplItem(TemplItem.Type.BASE, 'I'));
break;
case F:
items.add(new TemplItem(TemplItem.Type.BASE, 'C'));
break;
case P:
items.add(new TemplItem(TemplItem.Type.BASE, 'F'));
break;
case IC:
items.add(new TemplItem(TemplItem.Type.BASE, 'P'));
break;
case IP:
case IF:
l = parser.nat();
n = parser.nat();
items.add(new TemplItem(TemplItem.Type.PROT, n, l));
break;
case IIP:
n = parser.nat();
items.add(new TemplItem(TemplItem.Type.LEN, n));
break;
case IIF:
case IIC:
done = true;
break;
case III:
rna.concat(dna.substring(0, 7));
dna.trunc(7);
break;
case DONE:
done = true;
break;
default:
finish();
}
}
return items;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Jtpl(Reader template) throws IOException {\n fileText = readFile(template);\n makeTree(fileText);\n pattern = Pattern.compile(\"\\\\{([\\\\w\\\\.]+)\\\\}\");\n blockPattern = Pattern.compile(\"_BLOCK_\\\\.(.+)\");\n }",
"public ResolvedTemplate(Template template){\n\t\tthis.template = template;\n\t\tthis.postParseReplacement = \"\";\n\t\tcheckPreParseReplacement();\n\t}",
"public ParsedPage parse(String src);",
"Parse createParse();",
"String getTemplate();",
"public String parseFile(String path, HashMap<String, Object> params) {\n\n ClasspathResourceLoader resourceLoader = new ClasspathResourceLoader(\"doc\");\n Configuration cfg = null;\n try {\n cfg = Configuration.defaultConfiguration();\n cfg.setPlaceholderStart(\"[\");\n cfg.setPlaceholderEnd(\"]\");\n cfg.setCharset(\"UTF-8\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n GroupTemplate gt = new GroupTemplate(resourceLoader, cfg);\n Template t = gt.getTemplate(File.separator + path);\n // System.out.println(t.render().toString());\n\n for (String key : params.keySet()) {\n Object o = params.get(key);\n t.binding(key, o);\n }\n return t.render();\n }",
"private TemplateLiteralExpressionTree parseTemplateLiteral(@Nullable ParseTree operand) {\n SourcePosition start = operand == null ? getTreeStartLocation() : operand.location.start;\n Token token = nextToken();\n if (!(token instanceof TemplateLiteralToken)) {\n reportError(token, \"Unexpected template literal token %s.\", token.type.toString());\n }\n boolean isTaggedTemplate = operand != null;\n TemplateLiteralToken templateToken = (TemplateLiteralToken) token;\n if (!isTaggedTemplate) {\n reportTemplateErrorIfPresent(templateToken);\n }\n ImmutableList.Builder<ParseTree> elements = ImmutableList.builder();\n elements.add(new TemplateLiteralPortionTree(templateToken.location, templateToken));\n if (templateToken.type == TokenType.NO_SUBSTITUTION_TEMPLATE) {\n return new TemplateLiteralExpressionTree(getTreeLocation(start), operand, elements.build());\n }\n\n // `abc${\n ParseTree expression = parseExpression();\n elements.add(new TemplateSubstitutionTree(expression.location, expression));\n while (!errorReporter.hadError()) {\n templateToken = nextTemplateLiteralToken();\n if (templateToken.type == TokenType.ERROR || templateToken.type == TokenType.END_OF_FILE) {\n break;\n }\n if (!isTaggedTemplate) {\n reportTemplateErrorIfPresent(templateToken);\n }\n elements.add(new TemplateLiteralPortionTree(templateToken.location, templateToken));\n if (templateToken.type == TokenType.TEMPLATE_TAIL) {\n break;\n }\n\n expression = parseExpression();\n elements.add(new TemplateSubstitutionTree(expression.location, expression));\n }\n\n return new TemplateLiteralExpressionTree(getTreeLocation(start), operand, elements.build());\n }",
"public boolean processTemplateFile( String templateFile )\r\n {\r\n if( templateFile.length() == 0 ) return false;\r\n try {\r\n ArrayList<Template> lijst = templateParser.parseFile(templateFile); \r\n if( lijst != null ) templates.addAll(lijst);\r\n else return false;\r\n }catch( ParserConfigurationException e ) {\r\n e.printStackTrace();\r\n return false;\r\n // TODO: Handle exception\r\n }catch( SAXException e ) {\r\n e.printStackTrace();\r\n return false;\r\n // TODO: Handle exception\r\n }catch( IOException e ) {\r\n e.printStackTrace();\r\n return false;\r\n // TODO: Handle exception\r\n }\r\n return true;\r\n }",
"void parser() throws TemplateException {\n this.config.resolver.outputdir =\n PropertiesParser.parser(this.config.resolver.outputdir);\n this.config.resolver.sourcepackage = \n PropertiesParser.parser(this.config.resolver.sourcepackage);\n this.config.resolver.templatedir = \n PropertiesParser.parser(this.config.resolver.templatedir);\n }",
"protected void page () throws HTMLParseException {\r\n while (block.restSize () == 0) {\r\n switch (nextToken) {\r\n case END:\r\n return;\r\n case LT:\r\n lastTagStart = tagStart;\r\n tagmode = true;\r\n match (LT);\r\n tag (lastTagStart);\r\n break;\r\n case COMMENT:\r\n //block.addToken (new Token (pagepart, Token.COMMENT, tagStart, stringLength));\r\n // 2009.05.28 by in-koo cho\r\n addTokenCheck(new Token (pagepart, Token.COMMENT, tagStart, stringLength));\r\n match (COMMENT);\r\n break;\r\n case SCRIPT:\r\n //block.addToken (new Token (pagepart, Token.SCRIPT, tagStart, stringLength));\r\n addTokenCheck(new Token (pagepart, Token.SCRIPT, tagStart, stringLength));\r\n match (SCRIPT);\r\n break;\r\n case STRING:\r\n if(stringLength > -1){\r\n //block.addToken (new Token (pagepart, Token.TEXT, tagStart, stringLength));\r\n // 2009.05.28 by in-koo cho\r\n addTokenCheck(new Token (pagepart, Token.TEXT, tagStart, stringLength));\r\n }\r\n match (nextToken);\r\n break;\r\n case MT:\r\n if(!tagmode) {\r\n scanString();\r\n }\r\n default:\r\n if(stringLength > -1){\r\n //block.addToken (new Token (pagepart, Token.TEXT, tagStart, stringLength));\r\n // 2009.05.28 by in-koo cho\r\n addTokenCheck(new Token (pagepart, Token.TEXT, tagStart, stringLength));\r\n }\r\n match (nextToken);\r\n }\r\n }\r\n }",
"private PSTemplate importTemplate(String siteId, FileItem item)\n\t throws PSExtractHTMLException\n\t {\n\n\t PSTemplate convertedTemplate = new PSTemplate();\n\t \n\t try(InputStream fileInput = item.getInputStream())\n\t {\n\n\t \t //Build a string with the InputStream\n\t \t BufferedReader br = new BufferedReader(new InputStreamReader(item.getInputStream()));\n\t \t StringBuilder sb = new StringBuilder();\n\t \t String line = null;\n\t \t while ((line = br.readLine()) != null) {\n\t \t sb.append(line).append(\"\\n\");\n\t \t }\n\t \t br.close();\n\t \t \n\t \t String validStringXml = sb.toString();\n\t \t validStringXml = validStringXml.trim().replaceFirst(\"^([\\\\W]+)<\",\"<\");\n\t \t convertedTemplate = PSSerializerUtils.unmarshal(validStringXml, PSTemplate.class);\n\n\t \t //Import the template\n\t return templateService.importTemplate(convertedTemplate,siteId);\n\n\t } catch (PSDataServiceException | IPSPathService.PSPathNotFoundServiceException | IOException e) {\n\t\t\tthrow new PSExtractHTMLException(e);\n\t\t }\n\t }",
"String template();",
"Node getTemplateTextNode();",
"public static String parse(String template, Map<String, String> map){\n Matcher matcher = PROCESS_REGEX_PATTERN.matcher(template);\n int count = 0;\n StringBuffer sb = null;\n while(matcher.find()) {\n count++;\n if(sb == null) sb = new StringBuffer();\n String key = (String)matcher.group(1);\n if(map.containsKey(key)){\n matcher.appendReplacement(sb, map.get(key));\n }\n }\n if(count == 0){\n return template;\n } else {\n matcher.appendTail(sb);\n return sb.toString();\n }\n }",
"public Function2<Object, TemplateOptions, String> template(String templateString);",
"private void parse() {\n stack.push(documentNode);\n try {\n Token token = lexer.nextToken();\n boolean tagOpened = false;\n\n while (token.getType() != TokenType.EOF) {\n\n if (token.getType() == TokenType.TEXT) {\n TextNode textNode = new TextNode((String) token.getValue());\n ((Node) stack.peek()).addChild(textNode);\n\n } else if (token.getType() == TokenType.TAG_OPEN) {\n if (tagOpened) {\n throw new SmartScriptParserException(\"The tag was previously open but is not yet closed.\");\n }\n tagOpened = true;\n lexer.setState(LexerState.TAG);\n\n } else if (token.getType() == TokenType.TAG_NAME && token.getValue().equals(\"=\")) {\n parseEchoTag(tagOpened);\n tagOpened = false;\n\n } else if (token.getType() == TokenType.TAG_NAME && ((String) token.getValue()).matches(\"[Ff][Oo][Rr]\")) {\n parseForTag(tagOpened);\n tagOpened = false;\n\n } else if (token.getType() == TokenType.TAG_NAME && ((String) token.getValue()).matches(\"[Ee][Nn][Dd]\")) {\n parseEndTag();\n tagOpened = false;\n } else {\n throw new SmartScriptParserException(PARSE_ERROR);\n }\n token = lexer.nextToken();\n }\n if (!(stack.peek() instanceof DocumentNode)) {\n throw new SmartScriptParserException(PARSE_ERROR);\n }\n } catch (LexerException | EmptyStackException exc) {\n throw new SmartScriptParserException(PARSE_ERROR);\n }\n}",
"String getTemplateContent(){\r\n \t\tStringBuffer templateBuffer = new StringBuffer();\r\n \t\tfor(String templatePart:templateParts){\r\n \t\t\ttemplateBuffer.append(templatePart);\r\n \t\t}\r\n \t\treturn templateBuffer.toString();\r\n \t}",
"private String getTemplate(String templateFile) throws IOException{\r\n \t\tStringBuffer templateBuffer = new StringBuffer();\r\n \t\tFileReader in;\r\n \t\tint c;\r\n \t\tin = new FileReader(new File(templateFolder,templateFile));\r\n \r\n \t\twhile ((c = in.read()) != -1){\r\n \t\t\ttemplateBuffer.append((char) c);\r\n \t\t}\r\n \r\n \t\tString templateString = templateBuffer.toString();\r\n \t\tif (templateString.indexOf(\"startCell\") == (-1)){\r\n \t\t\treturn templateString;\r\n \t\t}else{\r\n \t\t\ttemplateString = templateString.substring(templateString.indexOf(\"startCell\") + 12, templateString.indexOf(\"<!--endCell\"));\r\n \t\t\treturn templateString;\r\n \t\t}\r\n \t}",
"@Override\n\tpublic TemplatePage extract(String htmlContent) {\n\t\ttry {\n\t\t\t\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tParser parser = new Parser(htmlContent);\n\t\t\tMyNodeVisitor visitor = new MyNodeVisitor(true, true);\n\t\t\tparser.visitAllNodesWith(visitor);\n\t\t\t\n\t\t\tString content = visitor.getContent();\n\t\t\tif ( content == null || content.length() == 0 ) {\n\t\t\t\treturn new TemplatePage(\"\", \"\");\n\t\t\t}\n\t\t\t\n\t\t\tcontent = HtmlContentHelper.escape(content);\t\n\t\t\t\n\t\t\tString title = visitor.getTitle();\n\t\t\tif ( title == null ) {\n\t\t\t\ttitle = \"\";\n\t\t\t} else {\n\t\t\t\ttitle = HtmlContentHelper.escape(title);\n\t\t\t}\n\t\t\t\n\t\t\treturn new TemplatePage(title, content);\n\t\t\t\n\t\t} catch(ParserException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn new TemplatePage(\"\", \"\");\n\t\t\n\t}",
"StringTemplate createStringTemplate();",
"@Override\n public String doMapping(String template)\n {\n log.debug(\"doMapping({})\", template);\n // Copy our elements into an array\n List<String> components\n = new ArrayList<>(Arrays.asList(StringUtils.split(\n template,\n String.valueOf(TemplateService.TEMPLATE_PARTS_SEPARATOR))));\n int componentSize = components.size() - 1 ;\n\n // This method never gets an empty string passed.\n // So this is never < 0\n String templateName = components.get(componentSize);\n components.remove(componentSize--);\n\n log.debug(\"templateName is {}\", templateName);\n\n // Last element decides, which template Service to use...\n TemplateService templateService = (TemplateService)TurbineServices.getInstance().getService(TemplateService.SERVICE_NAME);\n TemplateEngineService tes = templateService.getTemplateEngineService(templateName);\n\n if (tes == null)\n {\n return null;\n }\n\n String defaultName = \"Default.vm\";\n\n // This is an optimization. If the name we're looking for is\n // already the default name for the template, don't do a \"first run\"\n // which looks for an exact match.\n boolean firstRun = !templateName.equals(defaultName);\n\n for(;;)\n {\n String templatePackage = StringUtils.join(components.iterator(), String.valueOf(separator));\n\n log.debug(\"templatePackage is now: {}\", templatePackage);\n\n StringBuilder testName = new StringBuilder();\n\n if (!components.isEmpty())\n {\n testName.append(templatePackage);\n testName.append(separator);\n }\n\n testName.append((firstRun)\n ? templateName\n : defaultName);\n\n // But the Templating service must look for the name with prefix\n StringBuilder templatePath = new StringBuilder();\n if (StringUtils.isNotEmpty(prefix))\n {\n templatePath.append(prefix);\n templatePath.append(separator);\n }\n templatePath.append(testName);\n\n log.debug(\"Looking for {}\", templatePath);\n\n if (tes.templateExists(templatePath.toString()))\n {\n log.debug(\"Found it, returning {}\", testName);\n return testName.toString();\n }\n\n if (firstRun)\n {\n firstRun = false;\n }\n else\n {\n // We run this loop only two times. The\n // first time with the 'real' name and the\n // second time with \"Default\". The second time\n // we will end up here and break the for(;;) loop.\n break;\n }\n }\n\n log.debug(\"Returning default\");\n return getDefaultName(template);\n }",
"public void parse(String filename);",
"private void selectTemplateFieldsFromXML(IdentifiedRecordTemplate template) throws FormException {\n \n GenericRecordTemplate genericRecordTemplate = null;\n \n try {\n PublicationTemplate publicationTemplateImpl = PublicationTemplateManager.getInstance()\n .loadPublicationTemplate(template.getTemplateName());\n genericRecordTemplate = (GenericRecordTemplate) publicationTemplateImpl\n .getRecordTemplate();\n template.setEncrypted(publicationTemplateImpl.isDataEncrypted());\n } catch (PublicationTemplateException e) {\n throw new FormException(\"GenericRecordSetManager\",\n \"form.EXP_UNKNOWN_TEMPLATE\", e);\n }\n \n GenericRecordTemplate wrapped = (GenericRecordTemplate) template.\n getWrappedTemplate();\n FieldTemplate[] fields = genericRecordTemplate.getFieldTemplates();\n \n for (FieldTemplate field : fields) {\n String displayName = field.getDisplayerName();\n GenericFieldTemplate fieldTemplate = new GenericFieldTemplate(field.\n getFieldName(), field.getTypeName());\n \n fieldTemplate.setMandatory(field.isMandatory());\n fieldTemplate.setReadOnly(field.isReadOnly());\n fieldTemplate.setHidden(field.isHidden());\n fieldTemplate.setDisabled(field.isDisabled());\n fieldTemplate.setSearchable(field.isSearchable());\n fieldTemplate.setDisplayerName((displayName != null) ? displayName : \"\");\n fieldTemplate.setLabel(field.getLabel());\n fieldTemplate.setUsedAsFacet(field.isUsedAsFacet());\n fieldTemplate.setParametersObj(field.getParametersObj());\n \n wrapped.addFieldTemplate(fieldTemplate);\n }\n }",
"void parse();",
"void Parse(Source source);",
"void processModelTemplate(NamedTemplate template, AmqpVersion version)\n {\n }",
"@Test\n public void fieldTemplate() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n // We can set a template name using by the fields. This property is used when the \"doc.AttachedTemplate\" is empty.\n // If this property is empty the default template file name \"Normal.dotm\" is used.\n doc.getFieldOptions().setTemplateName(\"\");\n\n FieldTemplate field = (FieldTemplate) builder.insertField(FieldType.FIELD_TEMPLATE, false);\n Assert.assertEquals(field.getFieldCode(), \" TEMPLATE \");\n\n builder.writeln();\n field = (FieldTemplate) builder.insertField(FieldType.FIELD_TEMPLATE, false);\n field.setIncludeFullPath(true);\n\n Assert.assertEquals(field.getFieldCode(), \" TEMPLATE \\\\p\");\n\n doc.updateFields();\n doc.save(getArtifactsDir() + \"Field.TEMPLATE.docx\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"Field.TEMPLATE.docx\");\n\n field = (FieldTemplate) doc.getRange().getFields().get(0);\n Assert.assertEquals(\" TEMPLATE \", field.getFieldCode());\n Assert.assertEquals(\"Normal.dotm\", field.getResult());\n\n field = (FieldTemplate) doc.getRange().getFields().get(1);\n Assert.assertEquals(\" TEMPLATE \\\\p\", field.getFieldCode());\n Assert.assertEquals(\"Normal.dotm\", field.getResult());\n }",
"private void parseRawText() {\n\t\t//1-new lines\n\t\t//2-pageObjects\n\t\t//3-sections\n\t\t//Clear any residual data.\n\t\tlinePositions.clear();\n\t\tsections.clear();\n\t\tpageObjects.clear();\n\t\tcategories.clear();\n\t\tinterwikis.clear();\n\t\t\n\t\t//Generate data.\n\t\tparsePageForNewLines();\n\t\tparsePageForPageObjects();\n\t\tparsePageForSections();\n\t}",
"Expression compileTemplate(Expression exp){\r\n\t\tif (exp.isVariable()){\r\n\t\t\texp = compile(exp.getVariable());\r\n\t\t}\r\n\t\telse if (isMeta(exp)){\r\n\t\t\t// variables of meta functions are compiled as kg:pprint()\r\n\t\t\t// variable of xsd:string() is not\r\n\t\t\texp = compileTemplateMeta((Term) exp);\r\n\t\t}\r\n\t\treturn exp;\r\n\t}",
"private Templated parseFromFormat(String string, Text text) {\n int br = 0;\n int start = 0; // basically pattern matching but without regex cuz regex is slow\n List<String> remainingSparse = new ArrayList<>();\n List<String> orderedArgs = new ArrayList<>();\n // same args map as in classic, placeholder id -> it's args\n Map<String, PlaceholderArgs> args = new HashMap<>();\n int last = 0;\n char[] starr = string.toCharArray();\n boolean quoted = false; // pass over quotes and single quotes. '\"' ignores the \", and vice versa.\n boolean singlequoted = false;\n for (int i = 0; i < starr.length; i++) {\n char c = starr[i];\n if (c == '\\\\') {\n i++;\n continue;\n }\n if (c == '\\\"' && !singlequoted) {\n quoted = !quoted;\n continue;\n }\n if (c == '\\'' && !quoted) {\n singlequoted = !singlequoted;\n continue;\n }\n if (quoted || singlequoted) {\n continue; // quoted text ignored, this suck\n }\n // We don't parse JSON Arrays in this house -> placeholders are base json objects only.\n if (c == '{') { // starting new json bracket\n if (br == 0) {\n start = i;\n }\n br++;\n }\n if (c == '}') {\n br--;\n if (br == 0) { // ayy we found a complete placeholder json string.\n String json = string.substring(start, i + 1); // get that string\n Tuple<String, PlaceholderArgs> parsed = parseJSON(json, args); // parse that string\n if (parsed == null) { // ops failed give up\n continue;\n } // get in-between text for last placeholder and this one, don't omit anything\n remainingSparse.add(string.substring(last, start));\n last = i + 1; // shift frame of lsat\n remainingSparse.add(null); // add null to take 'slot' of placeholder, for iteration's sake.\n args.put(parsed.getFirst(), parsed.getSecond()); // put args yay\n orderedArgs.add(parsed.getFirst()); // put ordered args? i suppose this is nice\n }\n }\n }\n remainingSparse.add(string.substring(last)); // add last part of string (could be empty)\n TextTemplate t = TextTemplate.of(); // build template\n for (String s : remainingSparse) {\n if (s == null) { // if placeholder\n String arg = orderedArgs.remove(0); // remove next arg -> that's why this is nice (no hashmap)\n t = t.concat(TextTemplate.of(buildArg(arg, args.get(arg)))); // -> new arg in template\n } else {\n t = t.concat(TextTemplate.of(s)); // just string thanks :)\n }\n }\n return new Templated(t, args, text); // all done\n }",
"private String parse(String fileText) throws InvalidFileContentsException {\n if (!validFileText(fileText)) {\n throw new InvalidFileContentsException(\"Invalid text found in file.\");\n }\n\n return fileText.substring(fileText.indexOf(\"{\") + 1, fileText.indexOf(\"}\"));\n }",
"static boolean stringTemplate(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"stringTemplate\")) return false;\n if (!nextTokenIs(b, OPEN_QUOTE)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_);\n r = consumeToken(b, OPEN_QUOTE);\n p = r; // pin = 1\n r = r && report_error_(b, stringTemplate_1(b, l + 1));\n r = p && consumeToken(b, CLOSING_QUOTE) && r;\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }",
"private SourceFile _parseString(String txt) throws ParseException {\n ACParser p = new ACParser(txt);\n return p.SourceFile();\n }",
"protected abstract void parseSource(final Document doc, final Resource.Builder resource);",
"public void parse() {\n }",
"private TemplateReader() {\n }",
"void mo25968e(TemplateInfo templateInfo);",
"private static boolean stringTemplate_1_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"stringTemplate_1_0\")) return false;\n boolean r;\n r = consumeToken(b, REGULAR_STRING_PART);\n if (!r) r = shortTemplateEntry(b, l + 1);\n if (!r) r = longTemplateEntry(b, l + 1);\n return r;\n }",
"public void loadTemplate() throws Exception {\n\t\tScanner fs = new Scanner(this.getClass().getClassLoader().getResourceAsStream(template));\n\t\t\n\t\tStringBuffer sql = new StringBuffer();\n\t\ttry {\n\t\t\twhile(fs.hasNextLine()) {\n\t\t\t\tsql.append(fs.nextLine() + \"\\n\");\n\t\t\t}\n\t\t}finally {\n\t\t\tfs.close();\n\t\t}\n\t\tsqlText = sql.toString();\n\t}",
"public Document getParserTemplateByRequestType(String serviceReq, String method, String version) throws TransformersException {\n\t\tString resourceName, xmlTemplateResourcePath;\n\t\tDocument res = null;\n\n\t\tLOGGER.debug(CaibEsbLanguage.getFormatResIntegra(ILogConstantKeys.TF_LOG009, new Object[ ] { serviceReq, method, TransformersConstants.PARSER_CTE, version }));\n\n\t\ttry {\n\t\t\tresourceName = transformersProperties.getProperty(serviceReq + \".\" + method + \".\" + version + \".\" + TransformersConstants.PARSER_CTE + \".\" + TransformersConstants.TEMPLATE_CTE);\n\t\t\tLOGGER.debug(CaibEsbLanguage.getFormatResIntegra(ILogConstantKeys.TF_LOG005, new Object[ ] { resourceName }));\n\n\t\t\txmlTemplateResourcePath = \"/\" + TRANSFORMERS_TEMPLATES_ROOT_PATH + \"/\" + TRANSFORMERS_TEMPLATES_RESPONSE_PATH + \"/\" + resourceName;\n\n\t\t\tLOGGER.debug(CaibEsbLanguage.getFormatResIntegra(ILogConstantKeys.TF_LOG010, new Object[ ] { \"/\" + TRANSFORMERS_TEMPLATES_ROOT_PATH + \"/\" + TRANSFORMERS_TEMPLATES_RESPONSE_PATH }));\n\t\t\tLOGGER.debug(CaibEsbLanguage.getResIntegra(ILogConstantKeys.TF_LOG008));\n\n\t\t\tInputStream xmlResourceInputStream = CaibEsbTransformersFacade.class.getResourceAsStream(xmlTemplateResourcePath);\n\t\t\t\n\t\t\tres = CaibEsbUtilsXML.parseDocument(new InputStreamReader(xmlResourceInputStream));\n\n\t\t\tLOGGER.debug(CaibEsbLanguage.getFormatResIntegra(ILogConstantKeys.TF_LOG006, new Object[ ] { res.getDocumentElement().getTagName() }));\n\t\t} catch (Exception e) {\n\t\t\tString errorMsg = CaibEsbLanguage.getResIntegra(ILogConstantKeys.TF_LOG003);\n\t\t\tLOGGER.error(errorMsg, e);\n\t\t\tthrow new TransformersException(errorMsg, e);\n\t\t}\n\n\t\treturn res;\n\t}",
"private String extractBodyAndScriptsFromTemplate(String html) {\n \n // Replace UID:s\n html = html.replaceAll(\"_UID_\", pid + \"__\");\n \n // Exctract script-tags\n scripts = \"\";\n int endOfPrevScript = 0;\n int nextPosToCheck = 0;\n String lc = html.toLowerCase();\n String res = \"\";\n int scriptStart = lc.indexOf(\"<script\", nextPosToCheck);\n while (scriptStart > 0) {\n res += html.substring(endOfPrevScript, scriptStart);\n scriptStart = lc.indexOf(\">\", scriptStart);\n int j = lc.indexOf(\"</script>\", scriptStart);\n scripts += html.substring(scriptStart + 1, j) + \";\";\n nextPosToCheck = endOfPrevScript = j + \"</script>\".length();\n scriptStart = lc.indexOf(\"<script\", nextPosToCheck);\n }\n res += html.substring(endOfPrevScript);\n \n // Extract body\n html = res;\n lc = html.toLowerCase();\n int startOfBody = lc.indexOf(\"<body\");\n if (startOfBody < 0) {\n res = html;\n } else {\n res = \"\";\n startOfBody = lc.indexOf(\">\", startOfBody) + 1;\n int endOfBody = lc.indexOf(\"</body>\", startOfBody);\n if (endOfBody > startOfBody) {\n res = html.substring(startOfBody, endOfBody);\n } else {\n res = html.substring(startOfBody);\n }\n }\n \n return res;\n }",
"@Test\n public void test() throws ParseException {\n String test1 = \"klasse Test{ voeruit() { getal number is 1; } }\";\n parse(test1, \"program\");\n }",
"public SupervisedTemplates() {\n\t\tsuper();\n\t\tm_analyzer = new InteriorAnalyzer();\n\t\t// Explore the supervised template path\n\t\tString stpath = System.getProperty(STXML_PATH_PROPERTY);\n\t\tif (stpath != null) {\n\t\t\ttraversePath(stpath,\n\t\t\t\tnew DefDocumentProcessor() { \n\t\t\t\t\tpublic void processElement(File documentPath) \n\t\t\t\t\t\tthrows XMLFormatException\n\t\t\t\t\t{ m_analyzer.absorbDefinitions(documentPath); }\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}",
"static String[] getChunksOfTemplate(String template) {\n int p = template.indexOf(DELIM);\n if (p >= 0) {\n String[] result = new String[2];\n result[0] = template.substring(0, p);\n result[1] = template.substring(p + DELIM.length());\n return result;\n } else {\n String[] result = new String[1];\n result[0] = template;\n return result;\n }\n\n }",
"private TemplateLiteralToken nextTemplateLiteralToken() {\n TemplateLiteralToken token = scanner.nextTemplateLiteralToken();\n lastSourcePosition = token.location.end;\n return token;\n }",
"public void parsePage() {\n seen = true;\n int first = id.indexOf('_', 0);\n int second = id.indexOf('_', first + 1);\n String firstDir = \"result_\" + id.substring(0, first);\n String secondDir = id.substring(0, second);\n String fileName = id + \".page\";\n String wholePath = pagePath + firstDir + File.separator + secondDir\n + File.separator + fileName;\n try {\n BufferedReader reader = new BufferedReader(new FileReader(wholePath));\n String line = null;\n while((line = reader.readLine()) != null) {\n if (line.equals(\"#ThisURL#\")) {\n url = reader.readLine();\n }\n// else if (line.equals(\"#Length#\")) {\n// length = Integer.parseInt(reader.readLine());\n// }\n else if (line.equals(\"#Title#\")) {\n title = reader.readLine();\n }\n else if (line.equals(\"#Content#\")) {\n content = reader.readLine();\n lowerContent = content.toLowerCase();\n break;\n }\n }\n reader.close();\n if (content == null) {\n return;\n }\n valid = true;\n } catch (IOException e) {\n// System.out.println(\"Parse page \" + id + \" not successful\");\n }\n }",
"static public int DIALOG_ParseTemplate32(int template, DLG_TEMPLATE result) {\n int p = template;\n int signature;\n int dlgver;\n\n dlgver = readw(p);\n p += 2;\n signature = readw(p);\n p += 2;\n\n if (dlgver == 1 && signature == 0xffff) { /* DIALOGEX resource */\n result.dialogEx = true;\n result.helpId = readd(p);\n p += 4;\n result.exStyle = readd(p);\n p += 4;\n result.style = readd(p);\n p += 4;\n } else {\n result.style = readd(p - 4);\n result.dialogEx = false;\n result.helpId = 0;\n result.exStyle = readd(p);\n p += 4;\n }\n result.nbItems = readw(p);\n p += 2;\n result.x = readw(p);\n p += 2;\n result.y = readw(p);\n p += 2;\n result.cx = readw(p);\n p += 2;\n result.cy = readw(p);\n p += 2;\n\n /* Get the menu name */\n\n switch (readw(p)) {\n case 0x0000:\n result.menuName = 0;\n p += 2;\n break;\n case 0xffff:\n result.menuName = readw(p + 2);\n p += 4;\n break;\n default:\n result.menuName = p;\n p += (StringUtil.strlenW(result.menuName) + 1) * 2;\n break;\n }\n\n /* Get the class name */\n\n switch (readw(p)) {\n case 0x0000:\n result.className = DIALOG_CLASS_ATOM;\n p += 2;\n break;\n case 0xffff:\n result.className = readw(p + 2);\n p += 4;\n break;\n default:\n result.className = p;\n p += (StringUtil.strlenW(result.className) + 1) * 2;\n break;\n }\n\n /* Get the window caption */\n\n result.caption = p;\n p += (StringUtil.strlenW(result.caption) + 1) * 2;\n\n /* Get the font name */\n\n result.pointSize = 0;\n result.faceName = NULL;\n result.weight = FW_DONTCARE;\n result.italic = false;\n\n if ((result.style & DS_SETFONT) != 0) {\n result.pointSize = readw(p);\n p += 2;\n\n /* If pointSize is 0x7fff, it means that we need to use the font\n * in NONCLIENTMETRICSW.lfMessageFont, and NOT read the weight,\n * italic, and facename from the dialog template.\n */\n if (result.pointSize == 0x7fff) {\n /* We could call SystemParametersInfo here, but then we'd have\n * to convert from pixel size to point size (which can be\n * imprecise).\n */\n // log(\" FONT: Using message box font\\n\");\n } else {\n if (result.dialogEx) {\n result.weight = readw(p);\n p += 2;\n result.italic = (readw(p) & 0xFF) != 0;\n p += 2;\n }\n result.faceName = p;\n p += (StringUtil.strlenW(result.faceName) + 1) * 2;\n }\n }\n\n /* First control is on dword boundary */\n return (p + 3) & ~3;\n }",
"private Template makeTemplate() {\n return new Template(\"spamHardGenerated\", \"SPAM HARD\\n$$template_EOO\\n\" + sendedWorld.getText() + \"\\n$$template_EOF\\n$$var_name osef\\n$$var_surname osef\");\n }",
"private String getHtmPart(TemplateTag tag){\r\n \t\tString returnString;\r\n \t\treturnString = template.substring(devidePointer, tag.startposition);\r\n \t\tdevidePointer = tag.endposition;\r\n \t\treturn returnString;\r\n \t}",
"private String parseMaterialTemplateName(String line) {\n int space_index = line.indexOf(' ') + 1;\n String mtl_name = line.substring(space_index);\n mtl_name = mtl_name.trim();\n return mtl_name;\n }",
"public abstract T parse(String s);",
"protected void postParse(T fileParsed) {\n\t}",
"@Override\r\n public FirstElement documentBodyParse(String filePath) {\n return null;\r\n }",
"@Test\n public void testParse()\n {\n System.out.println(\"parse\");\n System.out.println(\" Test simple case\");\n final File file = new File(\"src/test/data/test.example.txt\");\n final Lexer lexer = new Lexer();\n final Token token = lexer.analyze(file);\n Model model = token.parse();\n assertTrue(model.isCompiled());\n System.out.println(\" Test complex case\");\n final File complexFile = new File(\"src/test/data/balancer.example.txt\");\n final Token complexToken = lexer.analyze(complexFile);\n model = complexToken.parse();\n assertTrue(model.isCompiled());\n }",
"public Template getTemplate( Reader reader ) throws IOException, TemplateCompilationException,\n MissingShebangException, UnknownEngineException;",
"private String extractBodyAndScriptsFromTemplate(String html) {\n \t\t\n \t\t// Exctract script-tags\n \t\tscripts =\"\";\n \t\tint endOfPrevScript = 0;\n \t\tint nextPosToCheck = 0;\n \t\tString lc = html.toLowerCase();\n \t\tString res = \"\";\n \t\tint scriptStart = lc.indexOf(\"<script\", nextPosToCheck);\n \t\twhile (scriptStart > 0) {\n \t\t\tres += html.substring(endOfPrevScript, scriptStart);\n \t\t\tscriptStart = lc.indexOf(\">\", scriptStart);\n \t\t\tint j = lc.indexOf(\"</script>\",scriptStart);\n \t\t\tscripts += html.substring(scriptStart+1,j) + \";\";\n \t\t\tnextPosToCheck = endOfPrevScript = j + \"</script>\".length();\n \t\t\tscriptStart = lc.indexOf(\"<script\", nextPosToCheck);\n \t\t}\n \t\tres += html.substring(endOfPrevScript);\n \t\t\n \t\t// Extract body\n \t\thtml = res;\n \t\tlc = html.toLowerCase();\n \t\tint startOfBody = lc.indexOf(\"<body\");\n \t\tif (startOfBody < 0) {\n \t\t\tres = html;\n \t\t} else {\n \t\t\tres = \"\";\n \t\t\tstartOfBody = lc.indexOf(\">\",startOfBody)+1;\n \t\t\tint endOfBody = lc.indexOf(\"</body>\",startOfBody);\n \t\t\tif (endOfBody > startOfBody)\n \t\t\t\tres = html.substring(startOfBody,endOfBody);\n \t\t\telse \n \t\t\t\tres = html.substring(startOfBody);\n\t\t}\n \t\t\n \t\treturn res;\n \t}",
"void mo25969f(TemplateInfo templateInfo);",
"Term compileTemplateMeta(Term exp){\t\t\r\n\t\tTerm t;\r\n\t\tif (exp.isFunction()){\r\n\t\t\tt = Term.function(exp.getName());\r\n\t\t}\r\n\t\telse {\r\n\t\t\tt = Term.create(exp.getName());\r\n\t\t}\r\n\t\tboolean isIF = isIF(exp);\r\n\t\tint count = 0;\r\n\t\t\r\n\t\tfor (Expression ee : exp.getArgs()){\r\n\t\t\tif (count == 0 && isIF){\r\n\t\t\t\t// not compile the test of if(test, then, else)\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tee = compileTemplate(ee);\r\n\t\t\t}\r\n\t\t\tcount++;\r\n\t\t\tt.add(ee);\r\n\t\t}\r\n\t\t\r\n t.setArg(exp.getArg());\r\n\t\tt.setModality(exp.getModality());\r\n\t\tt.setDistinct(exp.isDistinct());\r\n\t\treturn t;\r\n\t\t\r\n\t}",
"public String processTemplate(final Template template,\n final Object rootMap)\n {\n try\n {\n final StringWriter writer = new StringWriter();\n try\n {\n template.process(rootMap, writer);\n return writer.toString();\n }\n finally\n {\n writer.close();\n }\n }\n catch (final TemplateException e)\n {\n throw new FreemarkerException(\"Unable to process template: \"\n + e, e);\n }\n catch (final IOException e)\n {\n throw new FreemarkerException(\"Unable to process template: \"\n + e, e);\n }\n }",
"private String loadTemplate(String fileName)\n throws IOException, URISyntaxException\n {\n File file = new File(resolveResourcePath(this.TEMPLATE_PATH + fileName));\n BufferedReader reader = new BufferedReader(new FileReader(file));\n \n StringBuilder builder = new StringBuilder();\n String str = reader.readLine();\n while (str != null)\n {\n builder.append(str);\n str = reader.readLine();\n }\n return builder.toString();\n }",
"public void parse(String fileName) throws Exception;",
"public String parse(File file);",
"private Map retrieveTemplateMap() {\n Map templateMap = new TreeMap();\n for (int j=0;j<mRemoteSourceDirs.length;j++) {\n String remoteSource = mRemoteSourceDirs[j];\n if (!remoteSource.endsWith(\"/\")) {\n remoteSource = remoteSource + \"/\";\n }\n \n try {\n HttpClient tsClient = getTemplateServerClient(remoteSource);\n\n HttpClient.Response response = tsClient.setURI(createTemplateServerRequest(remoteSource,null))\n .setPersistent(true).getResponse(); \n\n if (response != null && response.getStatusCode() == 200) {\n\n Reader rin = new InputStreamReader\n (new BufferedInputStream(response.getInputStream()));\n \n StreamTokenizer st = new StreamTokenizer(rin);\n st.resetSyntax();\n st.wordChars('!','{');\n st.wordChars('}','}');\n st.whitespaceChars(0,' ');\n st.parseNumbers();\n st.quoteChar('|');\n st.eolIsSignificant(true);\n String templateName = null; \n int tokenID = 0;\n // ditching the headers by looking for \"\\r\\n\\r\\n\"\n /* \n * no longer needed now that HttpClient is being used but leave\n * in for the moment.\n *\n * while (!((tokenID = st.nextToken()) == StreamTokenizer.TT_EOL \n * && st.nextToken() == StreamTokenizer.TT_EOL) \n * && tokenID != StreamTokenizer.TT_EOF) {\n * }\n */\n while ((tokenID = st.nextToken()) != StreamTokenizer.TT_EOF) {\n if (tokenID == '|' || tokenID == StreamTokenizer.TT_WORD) {\n \n templateName = st.sval;\n }\n else if (tokenID == StreamTokenizer.TT_NUMBER \n && templateName != null) {\n templateName = templateName.substring(1);\n //System.out.println(templateName);\n templateMap.put(templateName.replace('/','.'),\n new TemplateSourceInfo(\n templateName,\n remoteSource,\n (long)st.nval));\n templateName = null;\n }\n }\n }\n }\n catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }\n //System.out.println(\"retrieving templateMap\");\n return templateMap;\n }",
"public HTMLBlock parse () throws HTMLParseException {\r\n block = new HTMLBlock (pagepart, length);\r\n nextToken = START;\r\n match (START);\r\n page ();\r\n\r\n return block;\r\n }",
"public static final Document loadTemplate(final String absoluteFilePath) {\r\n if ((absoluteFilePath == null) || (absoluteFilePath.length() == 0)) {\r\n logB.error(\"XmlFactory.loadTemplate : unable to load template : empty file name !\");\r\n\r\n return null;\r\n }\r\n\r\n Document doc = cacheDOM.get(absoluteFilePath);\r\n\r\n if (doc == null) {\r\n final File file = new File(absoluteFilePath);\r\n\r\n if (!file.exists()) {\r\n logB.error(\"XmlFactory.loadTemplate : unable to load template : no file found for : \" + absoluteFilePath);\r\n\r\n return null;\r\n }\r\n\r\n if (logB.isDebugEnabled()) {\r\n logB.debug(\"XmlFactory.loadTemplate : file : \" + file);\r\n }\r\n\r\n doc = parse(file);\r\n\r\n if (doc != null) {\r\n cacheDOM.put(absoluteFilePath, doc);\r\n\r\n if (logB.isDebugEnabled()) {\r\n logB.debug(\r\n \"XmlFactory.loadTemplate : template : \" + Integer.toHexString(doc.hashCode()) + \" : \\n\" + asString(doc));\r\n }\r\n }\r\n }\r\n\r\n if (doc != null) {\r\n if (logB.isDebugEnabled()) {\r\n logB.debug(\"XmlFactory.loadTemplate : template in use : \" + Integer.toHexString(doc.hashCode()));\r\n }\r\n\r\n doc = (Document) doc.cloneNode(true);\r\n }\r\n\r\n if (logB.isDebugEnabled()) {\r\n logB.debug(\"XmlFactory.loadTemplate : xml document :\\n\" + asString(doc));\r\n }\r\n\r\n return doc;\r\n }",
"private List<JsonObject> parseDynamicTemplate(WebHookConfig webhookConfig, String message) {\n\t\tInsightsDynamicJsonParser dynamicParser = new InsightsDynamicJsonParser();\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tList<JsonObject> responceDynamicTemplateFinalDataList = new ArrayList<>(0);\n\t\ttry {\n\t\t\tJsonNode nodePayloadData = mapper.readTree(message);\n\t\t\tJsonNode nodeResponseTemplate = mapper.readTree(webhookConfig.getDynamicTemplate());\n\t\t\tresponceDynamicTemplateFinalDataList = dynamicParser.parserResponseTemplate(nodeResponseTemplate,\n\t\t\t\t\tnodePayloadData);\n\t\t} catch (Exception e) {\n\t\t\tLOG.error(\" Error while parseDynamicTemplate \", e);\n\t\t}\n\t\treturn responceDynamicTemplateFinalDataList;\n\t}",
"protected Parser getParser() throws TemplateException {\n try {\n return (Parser) _broker.getValue(\"parser\",\"wm\"); \n } catch (Exception e) {\n Engine.log.exception(e);\n throw new TemplateException(\"Could not load parser type \\\"\" + \n _parserName + \"\\\": \" + e);\n }\n }",
"public void parse(Lexer lex);",
"@Test\n public void testSingleParamTemplate() {\n assertEquals(\"{\\\"param\\\":\\\"value\\\"}\", util.fillTemplate(\"test.template.singleparam\", \"value\", \"value1\", null));\n }",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/AST/DeclTemplate.cpp\", line = 955,\n FQN=\"clang::VarTemplateDecl::CreateDeserialized\", NM=\"_ZN5clang15VarTemplateDecl18CreateDeserializedERNS_10ASTContextEj\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.ast/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/AST/DeclTemplate.cpp -nm=_ZN5clang15VarTemplateDecl18CreateDeserializedERNS_10ASTContextEj\")\n //</editor-fold>\n public static VarTemplateDecl /*P*/ CreateDeserialized(final ASTContext /*&*/ C, \n /*uint*/int ID) {\n return /*NEW_EXPR [Decl::new]*//*new (C, ID)*/ Decl.$new(C, ID, (type$ptr<?> Mem)->{\n return new VarTemplateDecl(C, (DeclContext /*P*/ )null, new SourceLocation(), \n new DeclarationName(), (TemplateParameterList /*P*/ )null, (NamedDecl /*P*/ )null);\n });\n }",
"private static boolean stringTemplate_1(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"stringTemplate_1\")) return false;\n while (true) {\n int c = current_position_(b);\n if (!stringTemplate_1_0(b, l + 1)) break;\n if (!empty_element_parsed_guard_(b, \"stringTemplate_1\", c)) break;\n }\n return true;\n }",
"@Test\n public void previewTemplateFromModelTest() throws IdfyException, Exception {\n TemplatePreview model = new TemplatePreview.Builder().build();\n String xmlTemplate = new String(\"123\");\n api.previewTemplateFromModel(model, xmlTemplate);\n }",
"public String p_extractStaticSegment(ParsePosition currentIndex, String template) {\n String segment;\n\n if (currentIndex.getIndex() >= template.length()) {\n return \"\";\n }\n\n int quoteStartIndex = template.indexOf(QUOTE_START_CHAR, currentIndex.getIndex());\n\n if (quoteStartIndex == -1) {\n // if QUOTE_START is not found\n segment = template.substring(currentIndex.getIndex());\n currentIndex.setIndex(template.length());\n } else if (quoteStartIndex != 0 && template.charAt(quoteStartIndex - 1) == ESCAPE_CHAR) {\n // if the QUOTE_START char is ESCAPED\n // look for the next QUOTE_START\n // extract everything before the ESCAPE_CHAR\n String part = template.substring(currentIndex.getIndex(), quoteStartIndex - 1);\n\n // increment index to skip the current QUOTE_START\n currentIndex.setIndex(quoteStartIndex + QUOTE_START_CHAR.length());\n String remaining = p_extractStaticSegment(currentIndex, template);\n segment = part + QUOTE_START_CHAR + remaining;\n\n //current index should be set by the recursive calls\n } else {\n // if QUOTE_START is found\n segment = template.substring(currentIndex.getIndex(), quoteStartIndex);\n currentIndex.setIndex(quoteStartIndex);\n }\n\n return segment;\n }",
"private void parse() {\n if (workingDirectory != null) {\n Parser.initConstants(this, workingDirectory, remainderFile);\n Parser.parseIt();\n workingDirectory = null;\n remainderFile = null;\n jbParse.setEnabled(false);\n }\n }",
"public void parse() {\n MessageBlockLexer lexer = new MessageBlockBailLexer(name, postNumber, CharStreams.fromString(raw));\n\n // remove ConsoleErrorListener\n lexer.removeErrorListeners();\n\n // create a buffer of tokens pulled from the lexer\n CommonTokenStream tokens = new CommonTokenStream(lexer);\n\n // create a parser that feeds off the tokens buffer\n MessageBlockParser parser = new MessageBlockParser(tokens);\n\n // remove ConsoleErrorListener\n parser.removeErrorListeners();\n\n // Create/add custom error listener\n MessageBlockErrorListener errorListener = new MessageBlockErrorListener(name, topic, postNumber);\n parser.addErrorListener(errorListener);\n\n // Begin parsing at the block rule\n ParseTree tree = parser.block();\n\n // Check for parsing errors\n errorListener.throwIfErrorsPresent();\n\n LOGGER.trace(tree.toStringTree(parser));\n\n // Walk the tree\n ParseTreeWalker walker = new ParseTreeWalker();\n walker.walk(new Listener(this), tree);\n }",
"public LitTemplateInitializer(LitTemplate template, VaadinService service) {\n this.template = template;\n\n boolean productionMode = service.getDeploymentConfiguration()\n .isProductionMode();\n\n Class<? extends LitTemplate> templateClass = template.getClass();\n\n ParserData data = null;\n if (productionMode) {\n data = CACHE.get(templateClass);\n }\n if (data == null) {\n data = new LitTemplateDataAnalyzer(templateClass).parseTemplate();\n }\n parserData = data;\n }",
"@Test\n void testParser() {\n VmParsingHelper.DEFAULT.parse(VM_SRC);\n }",
"public Template(String html) {\r\n\t\tjsObj = create(html.replaceAll(\"'\", \"\\\"\"));\r\n\t\tthis.html = html;\r\n\t}",
"private Template() {\r\n\r\n }",
"private void processTag(String p_content)\n {\n StringBuffer tagName = new StringBuffer();\n Hashtable attributes = new Hashtable();\n boolean bEndTag;\n\n int i = eatWhitespaces(p_content, 0);\n\n bEndTag = i < p_content.length() && p_content.charAt(i) == '/';\n\n //read the tag name...\n while (i < p_content.length() &&\n !Character.isWhitespace(p_content.charAt(i)))\n {\n tagName.append(p_content.charAt(i));\n\n i++;\n }\n\n i = eatWhitespaces(p_content, i);\n\n //read the attributes...\n StringBuffer attributeName = new StringBuffer();\n StringBuffer attributeValue = new StringBuffer();\n\n while (i < p_content.length())\n {\n try\n {\n i = eatWhitespaces(p_content, i);\n\n //read the name...\n while (!Character.isWhitespace(p_content.charAt(i)) &&\n p_content.charAt(i) != '=')\n {\n attributeName.append(p_content.charAt(i));\n i++;\n }\n\n i = eatWhitespaces(p_content, i);\n if (p_content.charAt(i) == '=')\n {\n while (p_content.charAt(i) != '\"')\n {\n i++;\n }\n i++;\n while (p_content.charAt(i) != '\"')\n {\n attributeValue.append(p_content.charAt(i));\n i++;\n }\n i++;\n }\n\n attributes.put(attributeName.toString(),\n attributeValue.toString());\n\n attributeName.setLength(0);\n attributeValue.setLength(0);\n }\n catch (IndexOutOfBoundsException e)\n {\n // tough luck the TMX wasn't as well written as we thought...\n // CvdL: TODO: throw an exception!!\n }\n }\n\n if (bEndTag)\n {\n m_handler.processEndTag(tagName.substring(1),\n \"<\" + p_content + \">\");\n }\n else\n {\n m_handler.processTag(tagName.toString(), attributes,\n \"<\" + p_content + \">\");\n }\n }",
"public void setTemplate(Template template)\n/* */ {\n/* 62 */ this.template = template;\n/* */ }",
"public void parseSyntax( TextLayout layout )\r\n\t{\r\n\t\t// Obtain the text to parse\r\n\t\tString text = layout.getText();\r\n\t\t// Do not process null or blank text\r\n\t\tif (text == null || text.length()==0) return;\r\n\t\t// Default style\r\n\t\tlayout.setStyle(m_scheme.getDefaultStyle(), 0, text.length());\r\n\r\n\t\t// Create a source for the tokenizer with the text\r\n\t\tStringSource source = new StringSource( text );\r\n\t\t// Create the tokenizer using the current configuration\r\n\t\tStandardTokenizer tokenizer = new StandardTokenizer(m_properties);\r\n\t\t// Assign the source\r\n\t\ttokenizer.setSource(source);\r\n\t\tboolean inBlockComment = false;\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// For each token recognised in the text\r\n\t\t\twhile(tokenizer.hasMoreToken())\r\n\t\t\t{\r\n\t\t\t\tToken token = tokenizer.nextToken();\r\n\t\t\t\tint type = token.getType();\r\n\t\t\t\t// This is the token text\r\n\t\t\t\tString word = tokenizer.currentImage();\r\n\t\t\t\t// When the image is null, we are processing EOL\r\n\t\t\t\tif (word == null) break;\r\n\t\t\t\tboolean isDocString = (type == Token.SPECIAL_SEQUENCE && word.equals(\"\\\"\\\"\\\"\")); \r\n\t\t\t\tif (isDocString)\r\n\t\t\t\t{\r\n\t\t\t\t\tinBlockComment = !inBlockComment;\r\n\t\t\t\t}\r\n\t\t\t\t// Find the applicable style, depending on the token type\r\n\t\t\t\tTextStyle toApply = null; \r\n\t\t\t\tif (inBlockComment || isDocString)\r\n\t\t\t\t{\r\n\t\t\t\t\ttoApply = m_scheme.getStyle(TokenTypes.COMMENT);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\ttoApply = getApplicableStyle(word,type);\r\n\t\t\t\t}\r\n\t\t\t\t// If no style is returned, continue to next token\r\n\t\t\t\tif (toApply == null) continue;\r\n\t\t\t\t// Get the applicable range (find token position)\r\n\t\t\t\tRange range = getApplicableRange(text, word, token);\r\n\t\t\t\t// Apply the style to the layout\r\n\t\t\t\tlayout.setStyle(toApply, range.start, range.end);\r\n\t\t\t}\r\n\t\t\t// Close tokenizer\r\n\t\t\ttokenizer.close();\r\n\t\t\ttokenizer = null;\r\n\t\t}\r\n\t\tcatch (TokenizerException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public abstract T parse(String str);",
"List<ParseData> parse(ParseDataSettings parseData);",
"private JSONDocument parseString(String data){\n JSONDocument temp = null;\n int pointer = 0;\n boolean firstValidCharReached = false;\n do{\n char c = data.charAt(pointer ++);\n switch (c) {\n case '{':\n HashMap thm = this.parseMap(this.getFull(data.substring(pointer),0));\n temp = new JSONDocument(thm);\n firstValidCharReached = true;\n break;\n case '[':\n ArrayList tal = this.parseList(this.getFull(data.substring(pointer),1));\n temp = new JSONDocument(tal);\n firstValidCharReached = true;\n break;\n }\n }while (!firstValidCharReached);\n return temp;\n }",
"@Override\n\tpublic void parse() throws IOException {\n\t}",
"private static SkinLayoutDefinition loadFromTokens(Iterator<String> tokens) {\n ImmutableMap.Builder<String, SkinLayoutDefinition> children = ImmutableMap.builder();\n ImmutableMap.Builder<String, String> properties = ImmutableMap.builder();\n while (tokens.hasNext()) {\n String key = tokens.next();\n if (key.equals(\"}\")) { // We're done with this block, return.\n break;\n }\n\n String value = tokens.next();\n if (value.equals(\"{\")) { // Start of a nested block, recursively load that block.\n children.put(key, loadFromTokens(tokens));\n } else { // Otherwise, it's a string property, and we'll store it.\n properties.put(key, value);\n }\n }\n return new SkinLayoutDefinition(properties.build(), children.build());\n }",
"public Template(String name) throws IOException, TemplateException, JDOMException {\n this(Assets.loadTemplate(name));\n }",
"public void compile(Template t, TemplateModel model, XmlResult out) throws TemplateCompileException;",
"public File getTemplateFile();",
"protected void processTemplate(Map<String,?> attributes, Writer out, Template template, String encoding) throws IOException {\n long startTime = System.currentTimeMillis();\n\n Context context = buildContext(attributes);\n template.setEncoding(encoding);\n\n try {\n template.merge(context, out);\n log.debug(\"Velocity template transform processed in \" + \n (System.currentTimeMillis() - startTime) + \" ms\");\n } catch (ResourceNotFoundException errAny) {\n throw new RuntimeException(\"Error merging the velocity template\", errAny);\n } catch (ParseErrorException errAny) {\n throw new RuntimeException(\"Error merging the velocity template\", errAny);\n } catch (Exception errAny) {\n throw new RuntimeException(\"Error merging the velocity template\", errAny);\n }\n }",
"public static String getTemplate(String template) {\n return templates.get(template);\n }",
"public interface TemplateResolver \n{\n\n\t@Nonnull String resolve(@Nonnull String template, @Nullable Object model);\n}",
"protected Document getTemplate() throws TransformException {\n\t\ttry {\n\t\t\treturn XMLUtils.getDocument(FileSystemReader.getInstance().getValidationTemplate());\n\t\t} catch (ToolsException e) {\n\t\t\tString msg = Language.getMessage(LanguageKeys.TRAN_006);\n\t\t\tLOGGER.error(msg, e);\n\t\t\tthrow new TransformException(TransformException.TEMPLATE_ERROR, msg);\n\t\t}\n\t}",
"public String processTemplate(String name, String templateString, Object context)\r\n\t{\r\n\t\treturn freeMarkerEngine.processTemplate(name, templateString, context);\r\n\t}",
"private static Template template(Configuration configuration, TemplateSource templateSource) {\n switch (templateSource.getOrigin()) {\n case TEMPLATE_LOADER:\n return fromTemplatePath(configuration, templateSource);\n case TEMPLATE_CODE:\n return fromTemplateCode(configuration, templateSource);\n default:\n throw new IllegalArgumentException(\"Don't know how to create a template: \" + templateSource.getOrigin());\n }\n }",
"@Override\n\tpublic Document parse(final CharSequence content) {\n\t\tfinal LagartoParser lagartoParser = new LagartoParser(config.parserConfig, content);\n\t\treturn parseWithLagarto(lagartoParser);\n\t}",
"public void addFromStream(InputStream stream) throws CoreException {\n\ttry {\n\t DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t DocumentBuilder parser = factory.newDocumentBuilder();\n\t Document document = parser.parse(new InputSource(stream));\n\t NodeList elements = document.getElementsByTagName(TEMPLATE_TAG);\n\n\t int count = elements.getLength();\n\t for (int i = 0; i != count; i++) {\n\t\tNode node = elements.item(i);\n\t\tNamedNodeMap attributes = node.getAttributes();\n\n\t\tif (attributes == null)\n\t\t continue;\n\n\t\tString name = getAttributeValue(attributes, NAME_ATTRIBUTE);\n\t\tString description = getAttributeValue(attributes, DESCRIPTION_ATTRIBUTE);\n\t\tString context = getAttributeValue(attributes, CONTEXT_ATTRIBUTE);\n\t\tNode enabledNode = attributes.getNamedItem(ENABLED_ATTRIBUTE);\n\n\t\tif (name == null || description == null || context == null)\n\t\t throw new SAXException(TemplateMessages.getString(\"TemplateSet.error.missing.attribute\")); //$NON-NLS-1$\n\n\t\tboolean enabled = (enabledNode == null) || (enabledNode.getNodeValue().equals(\"true\")); //$NON-NLS-1$\n\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tNodeList children = node.getChildNodes();\n\t\tfor (int j = 0; j != children.getLength(); j++) {\n\t\t String value = children.item(j).getNodeValue();\n\t\t if (value != null)\n\t\t\tbuffer.append(value);\n\t\t}\n\t\tString pattern = buffer.toString().trim();\n\n\t\tTemplate template = new Template(name, description, context, pattern);\n\t\ttemplate.setEnabled(enabled);\n\t\tadd(template);\n\t }\n\n\t sort();\n\n\t} catch (ParserConfigurationException e) {\n\t throwReadException(e);\n\t} catch (IOException e) {\n\t throwReadException(e);\n\t} catch (SAXParseException e) {\n\t\t\tSystem.out.println(\"SAXParseException in line:\"+e.getLineNumber()+\" column:\"+e.getColumnNumber());\n\t throwReadException(e);\n\t} catch (SAXException e) {\n\t throwReadException(e);\n\t}\n }",
"public static void validateTemplate(Template template) throws TemplateManagerException {\n //todo: no need mostly.\n }",
"@Override\n\tpublic Document parse(final char[] content) {\n\t\tfinal LagartoParser lagartoParser = new LagartoParser(config.parserConfig, content);\n\t\treturn parseWithLagarto(lagartoParser);\n\t}"
] |
[
"0.6050095",
"0.59534776",
"0.5441738",
"0.53724086",
"0.5366541",
"0.53517926",
"0.53277105",
"0.53270906",
"0.5320297",
"0.53158045",
"0.5314903",
"0.53088504",
"0.5307279",
"0.52636856",
"0.5228637",
"0.5163472",
"0.5150583",
"0.51395714",
"0.50993985",
"0.509701",
"0.5081631",
"0.5077299",
"0.50431395",
"0.5017371",
"0.50120914",
"0.49923643",
"0.49839962",
"0.49634793",
"0.4960921",
"0.4960648",
"0.49574023",
"0.49554512",
"0.49527976",
"0.49498358",
"0.49286076",
"0.49206063",
"0.49114332",
"0.48983264",
"0.4895334",
"0.48922586",
"0.48745275",
"0.4847154",
"0.48400718",
"0.48378062",
"0.4833356",
"0.48255244",
"0.48143604",
"0.47900712",
"0.47814158",
"0.47813952",
"0.47812203",
"0.47810036",
"0.4774654",
"0.47670767",
"0.4767006",
"0.47669306",
"0.47547635",
"0.47494504",
"0.47131976",
"0.47079486",
"0.4707225",
"0.46857747",
"0.46734238",
"0.46701783",
"0.4669805",
"0.4658519",
"0.46508235",
"0.46415836",
"0.46388543",
"0.463393",
"0.46221825",
"0.46058026",
"0.46008015",
"0.45985144",
"0.45963165",
"0.45939946",
"0.45857984",
"0.45853838",
"0.45747402",
"0.45739552",
"0.45718107",
"0.45708072",
"0.45692793",
"0.45672604",
"0.45655903",
"0.4554506",
"0.45541906",
"0.455247",
"0.4548406",
"0.45411867",
"0.45399916",
"0.45236492",
"0.45233232",
"0.45190528",
"0.4507358",
"0.45040852",
"0.45034292",
"0.45029372",
"0.44914153",
"0.44898117"
] |
0.49932677
|
25
|
Protect a string, per the docs
|
private Rope protect(int lvl, Rope d) {
if (lvl == 0) {
return d.substring(0);
}
int size = d.getLength();
int bufSize = size * 2;
char[] scratch = new char[bufSize];
char[] out = new char[bufSize];
for (int ndx = 0; ndx < d.getLength(); ndx += 1) {
out[ndx] = d.get(ndx);
}
for (int loop = 0; loop < lvl; loop += 1) {
int outNdx = 0;
char[] tmp = scratch;
scratch = out;
out = tmp;
if (out.length < scratch.length) {
out = new char[bufSize];
}
for (int ndx = 0; ndx < size; ndx += 1) {
if (scratch[ndx] == 'I') {
out[outNdx] = 'C';
outNdx += 1;
} else if (scratch[ndx] == 'C') {
out[outNdx] = 'F';
outNdx += 1;
} else if (scratch[ndx] == 'F') {
out[outNdx] = 'P';
outNdx += 1;
} else if (scratch[ndx] == 'P') {
out[outNdx] = 'I';
outNdx += 1;
out[outNdx] = 'C';
outNdx += 1;
}
}
size = outNdx;
if (bufSize < (size * 2)) {
bufSize *= 2;
scratch = new char[bufSize];
}
}
return new Rope(new String(out).trim());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"PasswordProtection protection();",
"public void checkSafeString(IRubyObject object) {\n if (getSafeLevel() > 0 && object.isTaint()) {\n ThreadContext tc = getCurrentContext();\n if (tc.getFrameName() != null) {\n throw newSecurityError(\"Insecure operation - \" + tc.getFrameName());\n }\n throw newSecurityError(\"Insecure operation: -r\");\n }\n secure(4);\n if (!(object instanceof RubyString)) {\n throw newTypeError(\n \"wrong argument type \" + object.getMetaClass().getName() + \" (expected String)\");\n }\n }",
"public String addStringProtectedStatus(String input)\n\t{\n\t\tif (PROTECT_AMOUNT.equals(\"Yes\")) {input += AMOUNT;}\n\t\tif (REB_PROTECT.equals(\"Yes\")) {input += REBILLING + REB_CYCLES + REB_AMOUNT + REB_EXPR + REB_FIRST_DATE;}\n\t\tif (PROTECT_CUSTOM_ID1.equals(\"Yes\")) {input += CUSTOM_ID1;}\n\t\tif (PROTECT_CUSTOM_ID2.equals(\"Yes\")) {input += CUSTOM_ID2;}\n\t\treturn input;\n\t}",
"public interface Sanitizer {\n String sanitize(String input);\n }",
"String encryptString(String toEncrypt) throws NoUserSelectedException;",
"boolean isProtected(String name);",
"public String encrypt(final String value) {\n\t\treturn encryptor.encrypt(value);\n\t}",
"public void setADD_STRING1_PROTECTED(String ADD_STRING1_PROTECTED) {\r\n this.ADD_STRING1_PROTECTED = ADD_STRING1_PROTECTED == null ? null : ADD_STRING1_PROTECTED.trim();\r\n }",
"public void setADD_STRING1_PROTECTED(String ADD_STRING1_PROTECTED) {\r\n this.ADD_STRING1_PROTECTED = ADD_STRING1_PROTECTED == null ? null : ADD_STRING1_PROTECTED.trim();\r\n }",
"public String encrypt(String value) throws Exception \n\t{\n\t\treturn value;\n\t}",
"java.lang.String getSecret();",
"public void setWackyString(String string) {\r\n if (string == null) {\r\n throw new IllegalArgumentException(\"Input cannot be null.\");\r\n }\r\n this.string = string;\r\n }",
"public void setADD_STRING2_PROTECTED(String ADD_STRING2_PROTECTED) {\r\n this.ADD_STRING2_PROTECTED = ADD_STRING2_PROTECTED == null ? null : ADD_STRING2_PROTECTED.trim();\r\n }",
"public void setADD_STRING2_PROTECTED(String ADD_STRING2_PROTECTED) {\r\n this.ADD_STRING2_PROTECTED = ADD_STRING2_PROTECTED == null ? null : ADD_STRING2_PROTECTED.trim();\r\n }",
"public String getADD_STRING1_PROTECTED() {\r\n return ADD_STRING1_PROTECTED;\r\n }",
"public String getADD_STRING1_PROTECTED() {\r\n return ADD_STRING1_PROTECTED;\r\n }",
"public void setADD_STRING12_PROTECTED(String ADD_STRING12_PROTECTED) {\r\n this.ADD_STRING12_PROTECTED = ADD_STRING12_PROTECTED == null ? null : ADD_STRING12_PROTECTED.trim();\r\n }",
"public void setADD_STRING12_PROTECTED(String ADD_STRING12_PROTECTED) {\r\n this.ADD_STRING12_PROTECTED = ADD_STRING12_PROTECTED == null ? null : ADD_STRING12_PROTECTED.trim();\r\n }",
"String getSecret();",
"public String Crypt(String s);",
"public void setADD_STRING11_PROTECTED(String ADD_STRING11_PROTECTED) {\r\n this.ADD_STRING11_PROTECTED = ADD_STRING11_PROTECTED == null ? null : ADD_STRING11_PROTECTED.trim();\r\n }",
"public void setADD_STRING11_PROTECTED(String ADD_STRING11_PROTECTED) {\r\n this.ADD_STRING11_PROTECTED = ADD_STRING11_PROTECTED == null ? null : ADD_STRING11_PROTECTED.trim();\r\n }",
"String promptSecureString();",
"public boolean canProvideString();",
"public String getADD_STRING9_PROTECTED() {\r\n return ADD_STRING9_PROTECTED;\r\n }",
"public String getADD_STRING9_PROTECTED() {\r\n return ADD_STRING9_PROTECTED;\r\n }",
"public String getADD_STRING13_PROTECTED() {\r\n return ADD_STRING13_PROTECTED;\r\n }",
"public String getADD_STRING13_PROTECTED() {\r\n return ADD_STRING13_PROTECTED;\r\n }",
"@Override\n public String encrypt(String s) throws NotInAlphabetException{ \n passwordPos = 0; //initialize to 0\n return super.encrypt(s); //invoke parent\n }",
"public abstract String getSecret();",
"public String getADD_STRING12_PROTECTED() {\r\n return ADD_STRING12_PROTECTED;\r\n }",
"public String getADD_STRING12_PROTECTED() {\r\n return ADD_STRING12_PROTECTED;\r\n }",
"public String getADD_STRING15_PROTECTED() {\r\n return ADD_STRING15_PROTECTED;\r\n }",
"public String getADD_STRING15_PROTECTED() {\r\n return ADD_STRING15_PROTECTED;\r\n }",
"public void setADD_STRING15_PROTECTED(String ADD_STRING15_PROTECTED) {\r\n this.ADD_STRING15_PROTECTED = ADD_STRING15_PROTECTED == null ? null : ADD_STRING15_PROTECTED.trim();\r\n }",
"public void setADD_STRING15_PROTECTED(String ADD_STRING15_PROTECTED) {\r\n this.ADD_STRING15_PROTECTED = ADD_STRING15_PROTECTED == null ? null : ADD_STRING15_PROTECTED.trim();\r\n }",
"public String getADD_STRING11_PROTECTED() {\r\n return ADD_STRING11_PROTECTED;\r\n }",
"public String getADD_STRING11_PROTECTED() {\r\n return ADD_STRING11_PROTECTED;\r\n }",
"public String getADD_STRING2_PROTECTED() {\r\n return ADD_STRING2_PROTECTED;\r\n }",
"public String getADD_STRING2_PROTECTED() {\r\n return ADD_STRING2_PROTECTED;\r\n }",
"public String encrypt(String text) {\n return content.encrypt(text);\n }",
"public void setADD_STRING10_PROTECTED(String ADD_STRING10_PROTECTED) {\r\n this.ADD_STRING10_PROTECTED = ADD_STRING10_PROTECTED == null ? null : ADD_STRING10_PROTECTED.trim();\r\n }",
"public void setADD_STRING10_PROTECTED(String ADD_STRING10_PROTECTED) {\r\n this.ADD_STRING10_PROTECTED = ADD_STRING10_PROTECTED == null ? null : ADD_STRING10_PROTECTED.trim();\r\n }",
"public String getADD_STRING4_PROTECTED() {\r\n return ADD_STRING4_PROTECTED;\r\n }",
"public String getADD_STRING4_PROTECTED() {\r\n return ADD_STRING4_PROTECTED;\r\n }",
"public String encrypt(String plainText);",
"public void setADD_STRING9_PROTECTED(String ADD_STRING9_PROTECTED) {\r\n this.ADD_STRING9_PROTECTED = ADD_STRING9_PROTECTED == null ? null : ADD_STRING9_PROTECTED.trim();\r\n }",
"public void setADD_STRING9_PROTECTED(String ADD_STRING9_PROTECTED) {\r\n this.ADD_STRING9_PROTECTED = ADD_STRING9_PROTECTED == null ? null : ADD_STRING9_PROTECTED.trim();\r\n }",
"public String encode( String password );",
"public String getADD_STRING3_PROTECTED() {\r\n return ADD_STRING3_PROTECTED;\r\n }",
"public String getADD_STRING3_PROTECTED() {\r\n return ADD_STRING3_PROTECTED;\r\n }",
"@Override\n\tpublic void setPlainPassword(String arg0) {\n\t\t\n\t}",
"private Object String(char[] password) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"public void setADD_STRING4_PROTECTED(String ADD_STRING4_PROTECTED) {\r\n this.ADD_STRING4_PROTECTED = ADD_STRING4_PROTECTED == null ? null : ADD_STRING4_PROTECTED.trim();\r\n }",
"public void setADD_STRING4_PROTECTED(String ADD_STRING4_PROTECTED) {\r\n this.ADD_STRING4_PROTECTED = ADD_STRING4_PROTECTED == null ? null : ADD_STRING4_PROTECTED.trim();\r\n }",
"String password();",
"public String getADD_STRING8_PROTECTED() {\r\n return ADD_STRING8_PROTECTED;\r\n }",
"public String getADD_STRING8_PROTECTED() {\r\n return ADD_STRING8_PROTECTED;\r\n }",
"protected testString(String text)\r\n\t{\r\n\t\tthis.text = text;\r\n\t}",
"@Override\n\t\t\tpublic void onTextChanged(CharSequence s, int start, int before, int count) {\n\t\t\t\tu.setPassword(s.toString());\n\t\t\t\n\t\t\t}",
"public String encryptAsNeeded(final String value) {\n\t\ttry {\n\t\t\t// Try a decryption\n\t\t\tdecrypt(value);\n\n\t\t\t// Value is already encrypted\n\t\t\treturn value;\n\t\t} catch (final EncryptionOperationNotPossibleException ignored) {\n\t\t\t// This value could be encrypted, but was not\n\t\t\treturn encrypt(value);\n\t\t}\n\t}",
"protected static String sanitise(final String name) {\n // Replace illegal chars with\n return name.replaceAll(\"[^\\\\w\\\\.\\\\s\\\\-#&_]\", \"_\");\n }",
"void setPassword(String password);",
"void setPassword(String password);",
"void setPassword(String password);",
"private void m29113h(String str) {\n String str2 = \"mqBRboGZkQPcAkyk\";\n if (this.mContext.checkCallingOrSelfPermission(Constants.PERMISSION_WRITE_SETTINGS) == 0 && m29108b(str)) {\n if (str.endsWith(\"\\n\")) {\n str = str.substring(0, str.length() - 1);\n }\n if (24 == str.length()) {\n String str3 = null;\n try {\n str3 = System.getString(this.mContext.getContentResolver(), str2);\n } catch (Exception unused) {\n }\n if (!m29108b(str3)) {\n try {\n System.putString(this.mContext.getContentResolver(), str2, str);\n } catch (Exception unused2) {\n }\n }\n }\n }\n }",
"void setProtection(boolean value);",
"public String getADD_STRING5_PROTECTED() {\r\n return ADD_STRING5_PROTECTED;\r\n }",
"public String getADD_STRING5_PROTECTED() {\r\n return ADD_STRING5_PROTECTED;\r\n }",
"public String getADD_STRING10_PROTECTED() {\r\n return ADD_STRING10_PROTECTED;\r\n }",
"public String getADD_STRING10_PROTECTED() {\r\n return ADD_STRING10_PROTECTED;\r\n }",
"@NonNull\n @Override\n public byte[] encryptString(@NonNull final Key key, @NonNull final String value)\n throws GeneralSecurityException, IOException {\n\n return encryptString(key, value, IV.encrypt);\n }",
"public void setADD_STRING13_PROTECTED(String ADD_STRING13_PROTECTED) {\r\n this.ADD_STRING13_PROTECTED = ADD_STRING13_PROTECTED == null ? null : ADD_STRING13_PROTECTED.trim();\r\n }",
"public void setADD_STRING13_PROTECTED(String ADD_STRING13_PROTECTED) {\r\n this.ADD_STRING13_PROTECTED = ADD_STRING13_PROTECTED == null ? null : ADD_STRING13_PROTECTED.trim();\r\n }",
"public void setProtection(boolean value);",
"private void setPassword(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n password_ = value;\n }",
"private void setPassword(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n password_ = value;\n }",
"String attack();",
"@Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n oldPasword = s.toString();\n }",
"public String encrypt(String geheimtext);",
"public void setADD_STRING8_PROTECTED(String ADD_STRING8_PROTECTED) {\r\n this.ADD_STRING8_PROTECTED = ADD_STRING8_PROTECTED == null ? null : ADD_STRING8_PROTECTED.trim();\r\n }",
"public void setADD_STRING8_PROTECTED(String ADD_STRING8_PROTECTED) {\r\n this.ADD_STRING8_PROTECTED = ADD_STRING8_PROTECTED == null ? null : ADD_STRING8_PROTECTED.trim();\r\n }",
"public boolean isSecret() {\r\n \treturn false;\r\n }",
"public String getADD_STRING14_PROTECTED() {\r\n return ADD_STRING14_PROTECTED;\r\n }",
"public String getADD_STRING14_PROTECTED() {\r\n return ADD_STRING14_PROTECTED;\r\n }",
"public EncryptorReturn encrypt(String in) throws CustomizeEncryptorException;",
"public void setADD_STRING3_PROTECTED(String ADD_STRING3_PROTECTED) {\r\n this.ADD_STRING3_PROTECTED = ADD_STRING3_PROTECTED == null ? null : ADD_STRING3_PROTECTED.trim();\r\n }",
"public void setADD_STRING3_PROTECTED(String ADD_STRING3_PROTECTED) {\r\n this.ADD_STRING3_PROTECTED = ADD_STRING3_PROTECTED == null ? null : ADD_STRING3_PROTECTED.trim();\r\n }",
"public String addDefProtectedStatus(String input)\n\t{\n\t\tif (PROTECT_AMOUNT.equals(\"Yes\")) {input += \" AMOUNT\";}\n\t\tif (REB_PROTECT.equals(\"Yes\")) {input += \" REBILLING REB_CYCLES REB_AMOUNT REB_EXPR REB_FIRST_DATE\";}\n\t\tif (PROTECT_CUSTOM_ID1.equals(\"Yes\")) {input += \" CUSTOM_ID\";}\n\t\tif (PROTECT_CUSTOM_ID2.equals(\"Yes\")) {input += \" CUSTOM_ID2\";}\n\t\treturn input;\n\t}",
"public static String encrypt(String rawPassword) {\n\t\treturn rawPassword;\r\n\t}",
"public void setADD_STRING5_PROTECTED(String ADD_STRING5_PROTECTED) {\r\n this.ADD_STRING5_PROTECTED = ADD_STRING5_PROTECTED == null ? null : ADD_STRING5_PROTECTED.trim();\r\n }",
"public void setADD_STRING5_PROTECTED(String ADD_STRING5_PROTECTED) {\r\n this.ADD_STRING5_PROTECTED = ADD_STRING5_PROTECTED == null ? null : ADD_STRING5_PROTECTED.trim();\r\n }",
"public void setGuardExpression(String guardExpression)\n\t{\n\t\ttry\n\t\t{\n\t\t\tif(this.hasAttribute(guardExpressionString))\n\t\t\t\tthis.getAttribute(guardExpressionString).setValue(guardExpression);\n\t\t\telse\n\t\t\t\tthis.addAttribute(new Attribute(guardExpressionString, \"ptolemy.kernel.util.StringAttribute\"));\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n\tpublic void setEncryptedPassword(String arg0) {\n\t\t\n\t}",
"String encrypt(String input) throws IllegalArgumentException, EncryptionException;",
"public static String secretWord(String s) {\r\n\t\tfor (int i = 0; i < s.length(); i++) {\r\n\t\t\ts = s.replace(s.charAt(i), '*');\r\n\t\t}\r\n\t\treturn s;\r\n\t}",
"public String getADD_STRING6_PROTECTED() {\r\n return ADD_STRING6_PROTECTED;\r\n }",
"public String getADD_STRING6_PROTECTED() {\r\n return ADD_STRING6_PROTECTED;\r\n }",
"public void setADD_STRING14_PROTECTED(String ADD_STRING14_PROTECTED) {\r\n this.ADD_STRING14_PROTECTED = ADD_STRING14_PROTECTED == null ? null : ADD_STRING14_PROTECTED.trim();\r\n }",
"public void setADD_STRING14_PROTECTED(String ADD_STRING14_PROTECTED) {\r\n this.ADD_STRING14_PROTECTED = ADD_STRING14_PROTECTED == null ? null : ADD_STRING14_PROTECTED.trim();\r\n }",
"static String validate(String username_or_password) {\r\n if (username_or_password.indexOf('\\'') != -1) {\r\n throw new IllegalArgumentException(\"invalid input: \" + username_or_password);\r\n }\r\n return username_or_password;\r\n }"
] |
[
"0.65738064",
"0.6272571",
"0.5989192",
"0.58309627",
"0.5816644",
"0.5816255",
"0.56597",
"0.56116766",
"0.56116766",
"0.55586475",
"0.5557055",
"0.5551956",
"0.5497115",
"0.5497115",
"0.54842275",
"0.54842275",
"0.5466013",
"0.5466013",
"0.5460811",
"0.5446496",
"0.5421933",
"0.5421933",
"0.54101926",
"0.5409965",
"0.53891546",
"0.53891546",
"0.538035",
"0.538035",
"0.5376304",
"0.5353477",
"0.5348333",
"0.5348333",
"0.53317004",
"0.53317004",
"0.5327193",
"0.5327193",
"0.5318833",
"0.5318833",
"0.5311154",
"0.5311154",
"0.531073",
"0.5289315",
"0.5289315",
"0.528826",
"0.528826",
"0.5285565",
"0.5281888",
"0.5281888",
"0.5266761",
"0.52557373",
"0.52557373",
"0.52451617",
"0.5243209",
"0.52421606",
"0.52421606",
"0.5241063",
"0.52367103",
"0.52367103",
"0.52352685",
"0.523414",
"0.5233157",
"0.52226293",
"0.52059776",
"0.52059776",
"0.52059776",
"0.52032405",
"0.5192229",
"0.5191502",
"0.5191502",
"0.51855737",
"0.51855737",
"0.5182615",
"0.51823336",
"0.51823336",
"0.5181387",
"0.5161613",
"0.5161613",
"0.51614136",
"0.51577413",
"0.51568407",
"0.5147007",
"0.5147007",
"0.51362735",
"0.512509",
"0.512509",
"0.5124132",
"0.512163",
"0.512163",
"0.5105819",
"0.5103312",
"0.51000166",
"0.51000166",
"0.5092606",
"0.5091005",
"0.50772876",
"0.5072117",
"0.5070467",
"0.5070467",
"0.50694567",
"0.50694567",
"0.5069351"
] |
0.0
|
-1
|
Encode the given number, per the docs
|
private String asnat(int n) {
char ch;
if (n == 0) {
return "IP";
}
// Encode the number as binary, least significant digit first, with I for 0's
// and C for 1's. Terminates with a P
// i.e. 6 => ICCP
int bitCount = 0;
for (int tmp = 1; tmp <= n; tmp <<= 1) {
bitCount += 1;
}
// This whole thing is memory intensive, so try to use as little as possible.
// This could be done with a StringBuilder, but don't want to risk the memory
// usage. Ergo, create a buffer with enough slots for all the digits and fill
// that buffer as we go.
char[] buffer = new char[bitCount + 1];
int ndx = 0;
while (n > 0) {
ch = ((n & 1) == 1) ? 'C' : 'I';
buffer[ndx] = ch;
ndx += 1;
n /= 2;
}
buffer[ndx] = 'P';
String nat = new String(buffer);
return nat;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public CNumberEncode get_encode();",
"void writeNumber(Number num);",
"public static String base64Encode(int value)\n {\n StringBuffer buffer = new StringBuffer(6);\n\n // For now, let's just use the lower 3 bytes. This increases\n // the possibility of collisions, but it allows us to go\n // from a 6 char to 4 char id.\n\n for (int i = 0; i < 4; i++)\n buffer.append(_BASE_64_CHARS[((value >> (6 * i)) & 0x3f)]);\n\n return buffer.toString();\n }",
"public abstract void encode(ByteBuffer buffer, int offset, int value);",
"public long encode(long value) {\n\n return value ^ (value >> 1);\n }",
"public String encode(long... numbers) {\n if (numbers.length == 0) {\n throw new IllegalArgumentException(\"At least one number must be specified.\");\n }\n\n for (final long number : numbers) {\n if (number < 0) {\n return \"\"; // we must throw an exception here (like the case when we compare with MAX_NUMBER)\n }\n\n if (number > MAX_NUMBER) {\n throw new IllegalArgumentException(\"Number can not be greater than \" + MAX_NUMBER + '.');\n }\n }\n\n return this._encode(numbers);\n }",
"static void encodeInt(DataOutput os, int i) throws IOException {\n if (i >> 28 != 0)\n os.write((i >> 28) & 0x7f);\n if (i >> 21 != 0)\n os.write((i >> 21) & 0x7f);\n if (i >> 14 != 0)\n os.write((i >> 14) & 0x7f);\n if (i >> 7 != 0)\n os.write((i >> 7) & 0x7f);\n os.write((i & 0x7f) | (1 << 7));\n }",
"@Test\n public void encodeAsString()\n {\n int value = 3;\n BinaryEncoder encoder = new BinaryEncoder(16);\n String result = encoder.encodeAsString(value);\n if (IS_VERBOSE)\n {\n System.out.println(\"result = \" + result);\n }\n assertNotNull(result);\n assertEquals(\"0011\", result);\n\n value = 20; // > 16 outside range\n result = encoder.encodeAsString(value);\n if (IS_VERBOSE)\n {\n System.out.println(\"result = \" + result);\n }\n assertNotNull(result);\n assertEquals(\"0100\", result); // Best fit into 4 digits; ignores higher bits\n\n encoder = new BinaryEncoder(0.0, 360.0, 1.0);\n assertEquals(9, encoder.getLength());\n assertEquals(\"000000000\", encoder.encodeAsString(0.0));\n assertEquals(\"000000001\", encoder.encodeAsString(1.0));\n assertEquals(\"000101101\", encoder.encodeAsString(45.0));\n assertEquals(\"001011010\", encoder.encodeAsString(90.0));\n assertEquals(\"010110100\", encoder.encodeAsString(180.0));\n assertEquals(\"101101000\", encoder.encodeAsString(360.0));\n }",
"public void writeNumber(BigInteger value)\n/* */ throws IOException\n/* */ {\n/* 676 */ _verifyValueWrite(\"write a number\");\n/* 677 */ if (value == null) {\n/* 678 */ _writeNull();\n/* 679 */ } else if (this._cfgNumbersAsStrings) {\n/* 680 */ _writeQuotedRaw(value.toString());\n/* */ } else {\n/* 682 */ writeRaw(value.toString());\n/* */ }\n/* */ }",
"private void serializeInteger(final int number, final StringBuffer buffer)\n {\n buffer.append(\"i:\");\n buffer.append(number);\n buffer.append(';');\n }",
"public void encode(int value, BitOutput arithOut, BitOutput monoOut) throws IOException {\n\t\tif (value >= -arithmeticCodeThreshold && value <= arithmeticCodeThreshold) { // encode value by arithmetic coder\n\t\t\tarithmeticEncoder.encode(value + arithmeticCodeThreshold, arithOut);\n\t\t} else {\n\t\t\t// escape to switch fusion decoder to monotone decoder\n\t\t\tarithmeticEncoder.encode(FusionCoderConstants.ESCAPE_TO_SWITCH_TO_MONOTONE_CODE, arithOut);\n\t\t\tmonotoneEncoder.encode(value, monoOut);\n\t\t}\n\t}",
"public StringBuilder encodeKey(StringBuilder key, long seed) {\n\t\tif (getStringBuilder()!=null && isNumber(key,false)) {\n\t\t\tint sVar = ((int) (seed % 200));\n\t\t\tStringBuilder s = new StringBuilder();\n\t\t\tString str = \"\";\n\t\t\tint\tval = 0;\n\t\t\tint idx = 0;\n\t\t\tint end = 0;\n\t\t\tchar[] characters = new char[getStringBuilder().length()];\n\t\t\tgetStringBuilder().getChars(0, getStringBuilder().length(), characters, 0);\n\t\t\tfor (int p = 0; p < characters.length; p++) {\n\t\t\t\tidx = p % key.length();\n\t\t\t\tend = idx + 3;\n\t\t\t\tif (end > key.length()) {\n\t\t\t\t\tend = key.length();\n\t\t\t\t}\n\t\t\t\tval = (Character.valueOf(characters[p]) + ((Integer.parseInt(key.substring(idx,end))) / 2) + sVar);\n\t\t\t\tstr = \"\" + val;\n\t\t\t\twhile (str.length() < 3) {\n\t\t\t\t\tstr = \"0\" + str;\n\t\t\t\t}\n\t\t\t\ts.append(str);\n\t\t\t}\n\t\t\tsetStringBuilder(s);\n\t\t\tcompress(getCharCompressForKey(key,seed));\n\t\t}\n\t\treturn getStringBuilder();\n\t}",
"String getIntegerEncoding();",
"public void addNumber(int number) {\r\n\t\tadd(Integer.toString(number).getBytes(charset));\r\n\t}",
"public void encode(int c, Writer out)\n throws IOException {\n out.write(c);\n }",
"private static String convertP(int value)\n {\n String output = Integer.toBinaryString(value);\n\n for(int i = output.length(); i < 6; i++) // pad zeros\n output = \"0\" + output;\n\n return output;\n }",
"public String NumberToString(int number){return \"\"+number;}",
"public void encodeBinary(Buf out)\n {\n out.u2(val.length()+1);\n for (int i=0; i<val.length(); ++i)\n out.u1(val.charAt(i));\n out.u1(0);\n }",
"public String encode(String longUrl) {\n\t int key = longUrl.hashCode();\n\t map.put(key, longUrl);\n\t return Integer.toString(key);\n\t }",
"@Test\n public void encodeTiming()\n {\n final int max = 10000;\n final int value = 236;\n final BinaryEncoder encoder = new BinaryEncoder(256);\n\n long start = System.currentTimeMillis();\n\n for (int i = 0; i < max; i++)\n {\n encoder.encodeAsDoubleArray(value);\n }\n\n long end = System.currentTimeMillis();\n logElapsedTime(\"double array\", start, end);\n\n start = System.currentTimeMillis();\n\n for (int i = 0; i < max; i++)\n {\n encoder.encodeAsIntArray(value);\n }\n\n end = System.currentTimeMillis();\n logElapsedTime(\"int array\", start, end);\n\n start = System.currentTimeMillis();\n\n for (int i = 0; i < max; i++)\n {\n encoder.encodeAsBitSet(value);\n }\n\n end = System.currentTimeMillis();\n logElapsedTime(\"bit set\", start, end);\n\n start = System.currentTimeMillis();\n\n for (int i = 0; i < max; i++)\n {\n encoder.encodeAsString(value);\n }\n\n end = System.currentTimeMillis();\n logElapsedTime(\"string\", start, end);\n }",
"void writeInt(int value);",
"public String encode() {\n\t\tString retval = new Long(time).toString();\n\t\tretval += Separators.SP;\n\t\tif (sign != null) retval += sign;\n\t\tretval += offset.encode();\n\t\treturn retval;\n\t}",
"String intWrite();",
"private String encode(String value) {\n String encoded = \"\";\n try {\n encoded = URLEncoder.encode(value, \"UTF-8\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n String sb = \"\";\n char focus;\n for (int i = 0; i < encoded.length(); i++) {\n focus = encoded.charAt(i);\n if (focus == '*') {\n sb += \"%2A\";\n } else if (focus == '+') {\n sb += \"%20\";\n } else if (focus == '%' && i + 1 < encoded.length() && encoded.charAt(i + 1) == '7' && encoded.charAt(i + 2) == 'E') {\n sb += '~';\n i += 2;\n } else {\n sb += focus;\n }\n }\n return sb.toString();\n }",
"public static String num2Bin(int a) {\n StringBuilder sb = new StringBuilder();\n for (int bitPow2 = 1, i = 0; i < Integer.SIZE; bitPow2 <<= 1,\n ++i) {\n if ((a & bitPow2) == bitPow2) {\n sb.append(\"1\");\n } else {\n sb.append(\"0\");\n }\n }\n return sb.reverse().toString();\n }",
"public BinaryEncoder writeInt(int i) throws IOException {\n // Compute the zig-zag value. First double the value and flip the bit if the input is negative.\n int val = (i << 1) ^ (i >> 31);\n\n if ((val & ~0x7f) != 0) {\n output.write(0x80 | val & 0x7f);\n val >>>= 7;\n while (val > 0x7f) {\n output.write(0x80 | val & 0x7f);\n val >>>= 7;\n }\n }\n output.write(val);\n\n return this;\n }",
"@Override\n\tpublic String str(int number) {\n\t\treturn \"C3(\"+number+\")\";\n\t}",
"String intToBinaryNumber(int n){\n return Integer.toBinaryString(n);\n }",
"public StreamWriter write(int value) {\r\n\t\tif(order() == ByteOrder.LITTLE_ENDIAN){\r\n\t\t\t_buffer[0] = (byte) (value & 0xFF);\r\n\t\t\t_buffer[1] = (byte) ((value & 0xFF00) >> 8);\r\n\t\t\t_buffer[2] = (byte) ((value & 0xFF0000) >> 16);\r\n\t\t\t_buffer[3] = (byte) ((value & 0xFF000000) >> 24);\r\n\t\t}else{\r\n\t\t\t_buffer[0] = (byte) (value >> 24);\r\n\t\t\t_buffer[1] = (byte) (value >> 16);\r\n\t\t\t_buffer[2] = (byte) (value >> 8);\r\n\t\t\t_buffer[3] = (byte) value;\r\n\t\t}\r\n\t\t_stream.write(_buffer,0,4);\r\n\t\treturn this;\r\n\t}",
"public void encodeInt() {\n charToInt = new int[uniqueChars.size()];\n Iterator<Character> mover = uniqueChars.iterator();\n for(int b = 0; b < uniqueChars.size(); b++) {\n charToInt[b] = mover.next();\n }\n System.out.print(\"\\nEncoding integer value to its ASCII characters:\\n\");\n intToChars = new char[uniqueChars.size()];\n for(int c = 0; c < uniqueChars.size(); c++) {\n intToChars[c] = (char)charToInt[c];\n charToInt[c] = charToInt[c] / charToInt[c] + c - 1;\n System.out.print(charToInt[c] + \" : \" + intToChars[c] + \", \");\n }\n\n }",
"private void serializeLong(final long number, final StringBuffer buffer)\n {\n if ((number >= Integer.MIN_VALUE) && (number <= Integer.MAX_VALUE))\n {\n buffer.append(\"i:\");\n }\n else\n {\n buffer.append(\"d:\");\n }\n buffer.append(number);\n buffer.append(';');\n }",
"public void writeNumber(short s)\n/* */ throws IOException\n/* */ {\n/* 602 */ _verifyValueWrite(\"write a number\");\n/* 603 */ if (this._cfgNumbersAsStrings) {\n/* 604 */ _writeQuotedShort(s);\n/* 605 */ return;\n/* */ }\n/* */ \n/* 608 */ if (this._outputTail + 6 >= this._outputEnd) {\n/* 609 */ _flushBuffer();\n/* */ }\n/* 611 */ this._outputTail = NumberOutput.outputInt(s, this._outputBuffer, this._outputTail);\n/* */ }",
"public void set(int value) {\n this.value = BigInteger.valueOf(value).toByteArray();\n }",
"public static String toBinary(int number)\n\t{\n\t\tString total = \"\";\n\t\tint a;\n\t\twhile (number > 0) {\n\n\t\t\ta = number % 2;\n\n\t\t\ttotal = total + \"\" + a;\n// divide number by 2 \n\t\t\tnumber = number / 2;\n\n\t\t\t}\n\n// return value \n\t\treturn (new StringBuilder(total)).reverse().toString();\n\t\t\n\t}",
"abstract String convertEnglishNumber(String number);",
"public StringBuffer format(BigInteger number, StringBuffer toAppendTo, FieldPosition pos)\n/* */ {\n/* 1137 */ return format(new com.ibm.icu.math.BigDecimal(number), toAppendTo, pos);\n/* */ }",
"public String covertToAscii(int num){\n\t\t\n\t\tString result=\"\";\n\t\t//int i=result.length -1;\n\t\tint rem;\n\t\tif(num==0){\n\t\t\treturn \"0\";\n\t\t}\n\t\tboolean negative=(num<0);\n\t\tif(negative){\n\t\t\tnum=0-num;\n\t\t}\n\t\t//works for integers with base 10\n\t\twhile(num>0){\n\t\t\trem=num%10;\n\t\t\tnum=num/10;\n\t\t\tresult=(char)(rem+'0')+result;\n\t\t}\n\t\tif(negative){\n\t\t\tresult=\"-\"+result;\n\t\t}\n\t\treturn result;\n\t}",
"private String intString(int n){\r\n String s=\"\";\r\n if(n>9){\r\n s+=(char)(Math.min(n/10,9)+'0');\r\n }\r\n s+=(char)(n%10+'0');\r\n return s; \r\n }",
"public String encode(String longUrl) {\n if (longToShort.containsKey(longUrl)) {\n return longToShort.get(longUrl);\n }\n String encode = intToBase62(longUrl.hashCode());\n List<String> list;\n if (shortToLong.containsKey(encode)) {\n list = shortToLong.get(encode);\n } else {\n list = new ArrayList<>();\n shortToLong.put(encode, list);\n }\n encode += SEPERATE + list.size();\n list.add(longUrl);\n longToShort.put(longUrl, encode);\n return PREFIX + encode;\n }",
"public Builder setEncodingValue(int value) {\n encoding_ = value;\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }",
"public void encode(ByteBuffer bb, Number[] values) {\r\n formatter.encode(bb, values);\r\n }",
"private String idToShortURL(int n)\n {\n char map[] = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\".toCharArray();\n\n StringBuffer shorturl = new StringBuffer();\n\n // Convert given integer id to a base 62 number\n while (n > 0)\n {\n // use above map to store actual character\n // in short url\n shorturl.append(map[n%62]);\n n = n/62;\n }\n\n // Reverse shortURL to complete base conversion\n\n\n return shorturl.reverse().toString();\n }",
"@Override\n\tpublic String convert2Binary(int num) {\n\t\treturn null;\n\t}",
"public String convert(int num) {\n if (num == 0)\n return ZERO_STRINGS;\n\n long tmpNum = num;\n StringBuilder buffer = new StringBuilder();\n if (tmpNum < 0) { // Negative number\n tmpNum *= -1;\n buffer.append(\"minus \");\n }\n\n for (int i : NUMERIC_INDEXES) {\n long pow = (int)Math.pow(10, i);\n if (tmpNum >= pow) {\n long numberAtIndex = tmpNum/pow; // The number at position 3\n tmpNum -= numberAtIndex*pow;\n buffer.append(convert((int)numberAtIndex)).append(\" \");\n buffer.append(NUMERIC_STRINGS.get(pow)).append(\" \");\n }\n }\n if (tmpNum >= 20) { // second number in the integer\n long numberAtIndex = ((tmpNum % 100)/10)*10; // The number at position 2\n tmpNum -= numberAtIndex;\n buffer.append(NUMERIC_STRINGS.get(numberAtIndex)).append(\" \");\n }\n if (NUMERIC_STRINGS.containsKey(tmpNum))\n buffer.append(NUMERIC_STRINGS.get(tmpNum));\n return buffer.toString().trim();\n }",
"private String number() {\n switch (this.value) {\n case 1:\n return \"A\";\n case 11:\n return \"J\";\n case 12:\n return \"Q\";\n case 13:\n return \"K\";\n default:\n return Integer.toString(getValue());\n }\n }",
"public static String toBinaryString(int number) {\r\n\t\tString result = \"\";\r\n\t\tint origin = Math.abs(number);\r\n\r\n\t\twhile (origin > 0) {\r\n\t\t\tif (origin % 2 == 0)\r\n\t\t\t\tresult = \"0\" + result;\r\n\t\t\telse\r\n\t\t\t\tresult = \"1\" + result;\r\n\t\t\torigin = origin / 2;\r\n\t\t}\r\n\t\twhile (result.length() < 16)\r\n\t\t\tresult = \"0\" + result;\r\n\r\n\t\tif (number > 0)\r\n\t\t\treturn result;\r\n\t\telse {\r\n\t\t\tString result2 = \"\";\r\n\t\t\tfor (int i = 0; i < result.length(); i++)\r\n\t\t\t\tresult2 += result.charAt(i) == '1' ? \"0\" : \"1\";\r\n\t\t\tchar[] result2Array = result2.toCharArray();\r\n\t\t\tfor (int i = result2Array.length - 1; i >= 0; i--)\r\n\t\t\t\tif (result2Array[i] == '0') {\r\n\t\t\t\t\tresult2Array[i] = '1';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else\r\n\t\t\t\t\tresult2Array[i] = '0';\r\n\t\t\tresult2 = \"\";\r\n\t\t\tfor (int i = 0; i < result2Array.length; i++)\r\n\t\t\t\tresult2 += String.valueOf(result2Array[i]);\r\n\t\t\treturn result2;\r\n\t\t}\r\n\t}",
"private static String writeEqualsSigns(int number) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i < number; i++) {\n\t\t\tsb.append((\"=\"));\n\t\t}\n\t\treturn sb.toString();\n\t}",
"protected abstract void write( int value ) throws IOException;",
"private String Hexa(int num) {\n if (num < 0)\n {\n return Integer.toHexString(num).substring(4);\n }\n String str = Integer.toHexString(num);\n while (str.length()<4)\n {\n str = \"0\" + str;\n }\n return str;\n }",
"@Test\n public void encodeAsStringNegative()\n {\n final int value = -5;\n final BinaryEncoder encoder = new BinaryEncoder(-8, 8, 1.0);\n final String result = encoder.encodeAsString(value);\n if (IS_VERBOSE)\n {\n System.out.println(\"result = \" + result);\n }\n assertNotNull(result);\n assertEquals(\"0011\", result);\n }",
"public static String toHex(int num) {\n if(num==0) return \"0\";\n StringBuilder sb=new StringBuilder();\n while(num!=0){\n sb.append(intToHex(num&15));\n num >>>= 4; //Its not >> but >>>. >> will copy the sign bit. 10000 will become 11000 with >>, and 01000 with >>>.\n } //>> is called arithmetic shift. >>> is logical shift.\n return sb.reverse().toString();\n }",
"String longWrite();",
"private static String NUmberToEnglishString(long number) {\n\t\tString s;\r\n\t\tif(number<0)\r\n\t\t{\r\n\t\t\ts=\"error\";\r\n\t\t\treturn s;\r\n\t\t}\r\n\t\tif(number<20)\r\n\t\t{\r\n\t\t\tswitch ((int)number)\r\n\t\t\t{\r\n\t\t\tcase 0:\r\n\t\t\t\ts=\"zero\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 1:\r\n\t\t\t\ts=\"one\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 2:\r\n\t\t\t\ts=\"two\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 3:\r\n\t\t\t\ts=\"three\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 4:\r\n\t\t\t\ts=\"four\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 5:\r\n\t\t\t\ts=\"five\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 6:\r\n\t\t\t\ts=\"six\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 7:\r\n\t\t\t\ts=\"seven\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 8:\r\n\t\t\t\ts=\"eight\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 9:\r\n\t\t\t\ts=\"nine\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 10:\r\n\t\t\t\ts=\"ten\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 11:\r\n\t\t\t\ts=\"eleven\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 12:\r\n\t\t\t\ts=\"twelve\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 13:\r\n\t\t\t\ts=\"thirteen\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 14:\r\n\t\t\t\ts=\"fourteen\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 15:\r\n\t\t\t\ts=\"fifteen\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 16:\r\n\t\t\t\ts=\"sixteen\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 17:\r\n\t\t\t\ts=\"seventeen\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 18:\r\n\t\t\t\ts=\"eighteen\";\r\n\t\t\t\treturn s;\r\n\t\t\tcase 19:\r\n\t\t\t\ts=\"nineteen\";\r\n\t\t\t\treturn s;\r\n\t\t\tdefault:\r\n\t\t\t\ts=\"error\";\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(number<100) //21-99\r\n\t\t{\r\n\t\t\tif (number % 10 == 0) //20,30,40,...90的输出\r\n\t\t\t{\r\n\t\t\t\tswitch ((int)number)\r\n\t\t\t\t{\r\n\t\t\t\tcase 20:\r\n\t\t\t\t\ts=\"twenty\";\r\n\t\t\t\t\treturn s;\r\n\t\t\t\tcase 30:\r\n\t\t\t\t\ts=\"thirty\";\r\n\t\t\t\t\treturn s;\r\n\t\t\t\tcase 40:\r\n\t\t\t\t\ts=\"forty\";\r\n\t\t\t\t\treturn s;\r\n\t\t\t\tcase 50:\r\n\t\t\t\t\ts=\"fifty\";\r\n\t\t\t\t\treturn s;\r\n\t\t\t\tcase 60:\r\n\t\t\t\t\ts=\"sixty\";\r\n\t\t\t\t\treturn s;\r\n\t\t\t\tcase 70:\r\n\t\t\t\t\ts=\"seventy\";\r\n\t\t\t\t\treturn s;\r\n\t\t\t\tcase 80:\r\n\t\t\t\t\ts=\"eighty\";\r\n\t\t\t\t\treturn s;\r\n\t\t\t\tcase 90:\r\n\t\t\t\t\ts=\"ninety\";\r\n\t\t\t\t\treturn s;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\ts=\"error\";\r\n\t\t\t\t\treturn s;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ts=NUmberToEnglishString(number/10*10)+' '+NUmberToEnglishString(number%10);\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tif(number<1000) //100-999\r\n\t\t{\r\n\t\t\tif(number%100==0)\r\n\t\t\t{\r\n\t\t\t\ts=NUmberToEnglishString(number/100)+\" hundred\";\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ts=NUmberToEnglishString(number/100)+\" hundred and \"+NUmberToEnglishString(number%100);\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(number<1000000) //1000-999999 百万以下\r\n\t\t{\r\n\t\t\tif(number%1000==0)\r\n\t\t\t{\r\n\t\t\t\ts=NUmberToEnglishString(number/1000)+\" thousand\";\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ts=NUmberToEnglishString(number/1000)+\" thousand \"+NUmberToEnglishString(number%1000);\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(number<1000000000) //十亿以下\r\n\t\t{\r\n\t\t\tif(number%1000000==0)\r\n\t\t\t{\r\n\t\t\t\ts=NUmberToEnglishString(number/1000000)+\" million\";\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ts=NUmberToEnglishString(number/1000000)+\" million \"+NUmberToEnglishString(number%1000000);\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (number>999999999)\r\n\t\t{\r\n\t\t\ts=\"error\";\r\n\t\t\treturn s;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public String covertIng(int num) {\n\t\tchar[] digits = new char[10];\r\n\t\t\r\n\t\tboolean sign = num >= 0 ? true : false;\r\n\t\tint idx = 0;\r\n\t\t\r\n\t\twhile(idx <digits.length){\r\n\t\t\tdigits[idx] = toChar(num % 10);\r\n\t\t\tnum = num /10;\r\n\t\t\tif(num== 0)\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tidx++;\r\n\t\t}\r\n\t\t\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tif(!sign)\r\n\t\t\tsb.append('-');\r\n\t\t\r\n\t\twhile(idx>=0){\r\n\t\t\tsb.append(digits[idx--]);\r\n\t\t}\r\n\t\t\r\n\t\treturn sb.toString();\r\n\t\t\r\n\t}",
"public static String intToBinaryString(int value) {\r\n String bin = \"00000000000000000000000000000000\" + Integer.toBinaryString(value);\r\n\r\n return bin.substring(bin.length() - 32, bin.length() - 24)\r\n + \" \"\r\n + bin.substring(bin.length() - 24, bin.length() - 16)\r\n + \" \"\r\n + bin.substring(bin.length() - 16, bin.length() - 8)\r\n + \" \"\r\n + bin.substring(bin.length() - 8, bin.length());\r\n }",
"@Test\n public void encodeParameter() {\n assertEquals(\"abcABC123\", OAuth10.encodeParameter(\"abcABC123\"));\n assertEquals(\"-._~\", OAuth10.encodeParameter(\"-._~\"));\n assertEquals(\"%25\", OAuth10.encodeParameter(\"%\"));\n assertEquals(\"%2B\", OAuth10.encodeParameter(\"+\"));\n assertEquals(\"%26%3D%2A\", OAuth10.encodeParameter(\"&=*\"));\n assertEquals(\"%0A\", OAuth10.encodeParameter(\"\\n\"));\n assertEquals(\"%20\", OAuth10.encodeParameter(\"\\u0020\"));\n assertEquals(\"%7F\", OAuth10.encodeParameter(\"\\u007F\"));\n assertEquals(\"%C2%80\", OAuth10.encodeParameter(\"\\u0080\"));\n assertEquals(\"%E3%80%81\", OAuth10.encodeParameter(\"\\u3001\"));\n assertEquals(\"%C2%80\", OAuth10.encodeParameter(\"\\u0080\"));\n }",
"com.google.protobuf.ByteString getNumberBytes();",
"public String encode(String longUrl) {\n \n String key = getRand();\n while (mapper.containsKey (key))\n key = getRand();\n \n mapper.put (key, longUrl);\n return key;\n }",
"private static String create50DigitString(){\n StringBuilder sb = new StringBuilder(\"1\");\n for(int i = 1; i < 50; i++){\n sb.append(\"0\");\n }\n return sb.toString();\n }",
"@Override\n\t\tprotected byte[] encode(OffsetSnap value) {\n\t\t\tByteBuffer buf = ByteBuffer.allocate(16);\n\t\t\tbuf.putLong(value.offset);\n\t\t\tbuf.putLong(value.snap ^ Long.MIN_VALUE);\n\t\t\treturn buf.array();\n\t\t}",
"public static String encode(double latitude, double longitude) {\n double[] latInterval = {-90.0, 90.0};\n double[] lngInterval = {-180.0, 180.0};\n\n final StringBuilder geohash = new StringBuilder();\n\n // the even bits are taken for the longitude code (0111110000000),\n // while the odd bits are taken for the latitude code (101111001001).\n boolean isEven = true;\n\n int bit = 0;\n int ch = 0;\n\n while (geohash.length() < PRECISION) {\n double mid = 0.0;\n if (isEven) { // for longitude\n mid = (lngInterval[0] + lngInterval[1]) / 2D;\n if (longitude > mid) { // belong to right interval\n // it means at current bit, it should be set to 1\n // because we need to write bit from left to right\n // so ch will do OR operation on high bit from BITS[]\n // for example lat: 40.5187, lng: 74.4121\n // it will calculate as 1 1 0 0 1 -> 25 -> BASE_32[25] -> t as first character\n // ch will grow if coordinate > mid at current binary reduction\n ch |= BITS[bit]; // set current bit as 1\n // System.out.println(\"EVEN \" + ch);\n lngInterval[0] = mid;\n } else {\n lngInterval[1] = mid;\n }\n } else {\n mid = (latInterval[0] + latInterval[1]) / 2D;\n if (latitude > mid) {\n // System.out.println(\"ODD \" + ch);\n // ch will grow if coordinate > mid at current binary reduction\n ch |= BITS[bit]; // set current bit as 1\n latInterval[0] = mid;\n } else {\n latInterval[1] = mid;\n }\n }\n\n isEven = !isEven;\n\n if (bit < 4) {\n bit++;\n } else { // convert to character in BASE_32 by each 5 bits\n // System.out.println(\"CURRENT \" + ch);\n geohash.append(BASE_32[ch]);\n bit = 0;\n ch = 0;\n }\n }\n return geohash.toString();\n }",
"public String\ttoString() { return Integer.toString(value); }",
"@Override\n\tpublic String encode(UUID uuid) {\n\t\tUuidValidator.validate(uuid);\n\t\treturn URN_PREFIX + StringCodec.INSTANCE.encode(uuid);\n\t}",
"public static String dexToBin(int value) {\n\tString binVal = Integer.toBinaryString(value);\n\t\treturn binVal;\n\t\t\n\t}",
"public static void toBinary (int number) {\r\n String binary = \"\";\r\n \r\n if (number > 0) {\r\n toBinary(number / 2); \r\n System.out.print(number % 2 + binary);\r\n }\r\n }",
"public static String binConvertInt(long num) {\n\t\tString binString = \"\";\n\n\t\t// ORIGINAL CODE FOR INT BINCONVERT\n\n\t\tlong binary = 0;\n\t\tint count = 0;\n\n\t\tif (num >= 0) {\n\t\t\twhile (num > 0) {\n\t\t\t\tbinary = num % 2;\n\t\t\t\tif (binary == 1) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tbinString = binary + \"\" + binString;\n\t\t\t\tnum = num / 2;\n\t\t\t}\n\n\t\t}\n\n\t\telse {\n\n\t\t\tnum = -1 * num;\n\n\t\t\twhile (num > 0) {\n\t\t\t\tbinary = num % 2;\n\t\t\t\tif (binary == 1) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\n\t\t\t\tbinString = binary + \"\" + binString;\n\t\t\t\tnum = num / 2;\n\t\t\t}\n\n\t\t\t// flip the binary to negative conversion\n\n\t\t\tchar ch[] = binString.toCharArray();\n\t\t\tboolean addedOne = false;\n\n\t\t\tfor (int i = binString.length() - 1; i >= 0; i--) {\n\t\t\t\tif (ch[i] == '0') {\n\t\t\t\t\tch[i] = '1';\n\t\t\t\t} else {\n\t\t\t\t\tch[i] = '0';\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (ch[binString.length() - 1] == '0') {\n\n\t\t\t\tch[binString.length() - 1] = '1';\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tch[binString.length() - 1] = '0';\n\t\t\t\tfor (int i = binString.length() - 1; i >= 0; i--) {\n\t\t\t\t\tif(ch[i] == '1') {\n\t\t\t\t\t\tch[i] = '0';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tch[i] = '1';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\tbinString = new String(ch);\n\t\t}\n\n\t\t\n\t\treturn binString;\n\t}",
"private static String shortUrlFrom(int num) {\n char[] digits = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\".toCharArray(); // 62 possible characters\n\n StringBuilder shorturl = new StringBuilder();\n\n while (num > 0) {\n shorturl.append(digits[num % 62]); // store the actual character in shortUrl\n num = num/62;\n }\n // Reverse shortURL to complete base conversion\n return shorturl.reverse().toString();\n }",
"public static String encodeAscii(String in, String key) {\r\n String m = \"\", ts = \"\";\r\n String result = \"\";\r\n int tmp;\r\n for (int i = 0; i < in.length(); i++) {\r\n tmp = (int) (in.charAt(i) + key\r\n .charAt((key.length() % (i + 1) == 0) ? 0\r\n : (key.length() % (i + 1)) - 1)) + 18;\r\n m += String.valueOf((char) (tmp / 100 * 10 + tmp % 10 + 65 + i))\r\n + String\r\n .valueOf((char) (tmp / 100 * 10\r\n + (tmp - tmp / 100 * 100 - tmp % 10) / 10\r\n + 68 + i));\r\n }\r\n\r\n for (int i = 0; i < m.length(); i++) {\r\n ts = String.valueOf((int) m.charAt(i) + 288 + i);\r\n tmp = 3 - ts.length();\r\n for (int j = 0; j < tmp; j++) {\r\n ts = \"0\" + ts;\r\n }\r\n result += ts;\r\n }\r\n return result;\r\n }",
"private\tNum(int num) { value = num; }",
"public String formatAs32BitString(int i) {\r\n\t\tString retVal = Integer.toBinaryString(i);\r\n\t\tif(i >= 0) {\r\n\t\t\tretVal = \"00000000000000000000000000000000\" + retVal;\r\n\t\t\tretVal = retVal.substring(retVal.length()-32);\r\n\t\t}\r\n\t\treturn retVal;\r\n\t}",
"public String encode(String longUrl) {\n while(map.containsKey(key)){\n key = r.nextInt(Integer.MAX_VALUE);//直到找到没有用过的key\n }\n map.put(key, longUrl);\n return \"http://tinyurl.com/\" + key;\n }",
"private String encodeValue(String value) {\r\n try {\r\n return URLEncoder.encode(value, \"UTF8\");\r\n } catch (UnsupportedEncodingException e) {\r\n // it should not occur since UTF8 should be supported universally\r\n throw new ExcelWrapperException(\"UTF8 encoding is not supported : \" + e.getMessage());\r\n }\r\n }",
"public static String bytesToPositiveNumString(byte[] in) {\n BigInteger num = new BigInteger(1, in);\n return num.toString();\n }",
"public CodePointIterator base32Encode() {\n return base32Encode(Base32Alphabet.STANDARD, true);\n }",
"@Override\n\tpublic void write(int value) {\n\t\tint lowByte = getFirstArg();\n\t\tint highByte = getSecondArg();\n\t\tint address = highByte;\n\t\taddress = address << 8;\n\t\taddress |= lowByte;\n\t\tCpuMem.getInstance().writeMem(address, value);\n\t}",
"public String encode(List<String> strs) {\r\n StringBuilder sb = new StringBuilder();\r\n for(String s: strs) {\r\n sb.append(intToString(s));\r\n sb.append(s);\r\n }\r\n return sb.toString();\r\n }",
"@Override\n public String toString() {\n return number.toString();\n }",
"private static final void encodeBEInt(int paramInt1, byte[] paramArrayOfByte, int paramInt2)\r\n/* 137: */ {\r\n/* 138:209 */ paramArrayOfByte[(paramInt2 + 0)] = ((byte)(paramInt1 >>> 24));\r\n/* 139:210 */ paramArrayOfByte[(paramInt2 + 1)] = ((byte)(paramInt1 >>> 16));\r\n/* 140:211 */ paramArrayOfByte[(paramInt2 + 2)] = ((byte)(paramInt1 >>> 8));\r\n/* 141:212 */ paramArrayOfByte[(paramInt2 + 3)] = ((byte)paramInt1);\r\n/* 142: */ }",
"public String toString(){\r\n return \"(\" + num + \")\";\r\n }",
"public static int encodeAsInt(short high, short low) {\n\n // Store the first short value in the highest 16 bits of the int\n int key = high | 0x00000000;\n key <<= 16;\n\n // Store the second short value in the lowest 16 bits of the int\n int lowInt = low & 0x0000FFFF;\n key |= lowInt;\n\n return key;\n\n }",
"public String encode(String longUrl) {\n String key = \"\"+longUrl.hashCode();\n map.put(key, longUrl);\n return key;\n }",
"BigInteger getNumber();",
"void mo107677b(Integer num);",
"@Override\n\tpublic void convertNumber(int number, String totype) {\n\t\tif(totype.equalsIgnoreCase(\"hex\")){\n\t\t\tSystem.out.println(\"Hex (\"+number+\") - \" + Integer.toHexString(number));\n\t\t}\n\t\telse{\n\t\t\tif(converter!=null)\n\t\t\t\tconverter.convertNumber(number, totype);\n\t\t\telse\n\t\t\t\tSystem.out.println(\"Can't Process Request !\");\n\t\t}\n\t\t\n\t}",
"@Override\n\tprotected int[] innerEncode( int[] numbers ){\n\t\t//数组长额\n\t\tint dataNum\t\t=\tnumbers.length;\n\t\t//需要多少个buffer去装,没128为一个buffer\n\t\tint bufferBlock =\t( dataNum + limitDataNum - 1 ) / limitDataNum;\n\n\t\tint[][] frames = new int[ bufferBlock ][];\n\t\tfor( int offset = 0, term = 0 ; term < bufferBlock ; offset += limitDataNum , term++ ){\n\n\t\t\tint diff\t=\tdataNum - offset;\n\t\t\tint length\t=\tdiff <= limitDataNum ? diff : limitDataNum;\n\n\t\t\tint[] params = optimizedCompressBits( numbers, offset, length );\n\t\t\tint b\t\t\t\t=\tparams[0];\t// numFrameBits\n\t\t\tint exceptionNum\t=\tparams[1];\n\n\t\t\tint[] exceptionList\t= new int[exceptionNum];\n\n\t\t\tboolean lastFlag = false;\n\t\t\tif(term == bufferBlock-1)\n\t\t\t\tlastFlag = true;\n\t\t\t//执行压缩方法\n\t\t\tint[] frameData\t= compress( length, b, offset, numbers, exceptionList, lastFlag );\n\n\t\t\tframes[term] = frameData;\n\n\t\t}\n\n\t\treturn toBitFrame( dataNum, frames );\n\t}",
"public void send(int number){\n\t\ttry{\n\t\t\tSystem.out.println(\"Sende \" + number);\n\t\t\tout.writeInt(number);\n\t\t\tout.flush();\n\t\t} catch (IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private String toImmediate(int val) {\n\t\tString field = \"\";\n\n\t\tfor (int i = 0; i < 15; i++) {\n\t\t\tfield = (val % 2) + field;\n\t\t\tval /= 2;\n\t\t}\n\t\treturn field;\n\t}",
"public String getRandomNumberString() {\n Random rnd = new Random();\n int number = rnd.nextInt(899999) + 100000;\n\n // this will convert any number sequence into 6 character.\n String formatted_code = String.format(\"%06d\", number);\n\n return formatted_code;\n }",
"private String formatNumberForDotNet(String val)\n/* */ {\n/* 348 */ if (val == null)\n/* */ {\n/* 350 */ return \"-\";\n/* */ }\n/* */ \n/* 353 */ String ret = FormatUtil.formatNumber(val);\n/* 354 */ String troubleshootlink = com.adventnet.appmanager.util.OEMUtil.getOEMString(\"company.troubleshoot.link\");\n/* 355 */ if (ret.indexOf(\"-1\") != -1)\n/* */ {\n/* */ \n/* 358 */ return \"- <a class=\\\"staticlinks\\\" href=\\\"http://\" + troubleshootlink + \"#m44\\\" target=\\\"_blank\\\">\" + FormatUtil.getString(\"am.webclient.dotnet.troubleshoot\") + \"</a>\";\n/* */ }\n/* */ \n/* */ \n/* 362 */ return ret;\n/* */ }",
"Object encodeObject(Object value);",
"public String encode() {\n\t\tString coded = \"\";\n\t\tfor (Character c: this.input.toCharArray()) {\n\t\t\tcoded += this.mapping.get(c);\n\t\t}\n\t\treturn coded;\n\t}",
"@Override\n public void encode(BigEndianEncoder encoderV)\n {\n encoderV.encodeShort(this.id);\n // then encode the 16-bit flags\n encoderV.encodeShort(this.flag);\n // then encode QCOUNT\n encoderV.encodeShort(this.questionCount);\n // then encode ANCOUNT\n encoderV.encodeShort(this.answerCount);\n // then encode NSCOUNT\n encoderV.encodeShort(this.nameServerCount);\n // then encode ARCOUNT\n encoderV.encodeShort(this.additionalFullRRCount);\n\n\n }",
"public void toStr()\r\n {\r\n numar = Integer.toString(read());\r\n while(numar.length() % 3 != 0){\r\n numar = \"0\" + numar; //Se completeaza cu zerouri pana numarul de cifre e multiplu de 3.\r\n }\r\n }",
"private String formatNumberForDotNet(String val)\n/* */ {\n/* 342 */ if (val == null)\n/* */ {\n/* 344 */ return \"-\";\n/* */ }\n/* */ \n/* 347 */ String ret = FormatUtil.formatNumber(val);\n/* 348 */ String troubleshootlink = com.adventnet.appmanager.util.OEMUtil.getOEMString(\"company.troubleshoot.link\");\n/* 349 */ if (ret.indexOf(\"-1\") != -1)\n/* */ {\n/* */ \n/* 352 */ return \"- <a class=\\\"staticlinks\\\" href=\\\"http://\" + troubleshootlink + \"#m44\\\" target=\\\"_blank\\\">\" + FormatUtil.getString(\"am.webclient.dotnet.troubleshoot\") + \"</a>\";\n/* */ }\n/* */ \n/* */ \n/* 356 */ return ret;\n/* */ }",
"static byte[] encode(BigInteger n) {\n\t\tbyte[] encodedN;\n\t\tif (n.signum() == 0) {\n\t\t\t// If n is zero, return an zero-length byte array\n\t\t\tencodedN = new byte[0];\n\t\t} else {\n\t\t\t// No need to reverse as C# original does at this point, as Java is always Big Endian.\n\t\t\tbyte[] nAsByteArray = n.toByteArray();\n\t\t\tint firstNonZeroIndex = 0;\n\t\t\twhile ((nAsByteArray[firstNonZeroIndex] == 0) && (firstNonZeroIndex < nAsByteArray.length)) {\n\t\t\t\tfirstNonZeroIndex++;\n\t\t\t}\n\t\t\t// Finally copy the non-zero bytes in to a new array\n\t\t\tencodedN = new byte[nAsByteArray.length - firstNonZeroIndex];\n\t\t\tSystem.arraycopy(nAsByteArray, firstNonZeroIndex, encodedN, 0, nAsByteArray.length - firstNonZeroIndex);\n\t\t}\n\n\t\treturn encodedN;\n\t}",
"private String setProtocolNumber() {\n\t\tRandom rnd = new Random();\n\t\treturn Integer.toString(rnd.nextInt(999999));\n\t}",
"private String formatNumberForDotNet(String val)\n/* */ {\n/* 339 */ if (val == null)\n/* */ {\n/* 341 */ return \"-\";\n/* */ }\n/* */ \n/* 344 */ String ret = FormatUtil.formatNumber(val);\n/* 345 */ String troubleshootlink = com.adventnet.appmanager.util.OEMUtil.getOEMString(\"company.troubleshoot.link\");\n/* 346 */ if (ret.indexOf(\"-1\") != -1)\n/* */ {\n/* */ \n/* 349 */ return \"- <a class=\\\"staticlinks\\\" href=\\\"http://\" + troubleshootlink + \"#m44\\\" target=\\\"_blank\\\">\" + FormatUtil.getString(\"am.webclient.dotnet.troubleshoot\") + \"</a>\";\n/* */ }\n/* */ \n/* */ \n/* 353 */ return ret;\n/* */ }",
"com.google.protobuf.ByteString\n getNumberBytes();",
"private static String zeroPaddedBitString(int value) {\n String bitString = Integer.toBinaryString(value);\n return String.format(\"%32s\", bitString).replace(\" \", \"0\");\n }",
"public String generateNumber(String value) {\r\n\r\n\t\tif (getOperand().length() == Config.MAX_SIZE) {\r\n\t\t\treturn getOperand().toString();\r\n\t\t}\r\n\r\n\t\tif (\"0\".equals(value) && getOperand().length() == 0) {\r\n\t\t\treturn \"0\";\r\n\t\t}\r\n\r\n\t\treturn getOperand().append(value).toString();\r\n\t}",
"@Transaction()\n public Number createNumber(final Context ctx, final String key, final int number) {\n ChaincodeStub stub = ctx.getStub();\n\n String numberState = stub.getStringState(key);\n if (!numberState.isEmpty()) {\n String errorMessage = String.format(\"Number %s already exists\", key);\n System.out.println(errorMessage);\n throw new ChaincodeException(errorMessage, Errors.NUM_ALREADY_EXISTS.toString());\n }\n\n Number num = new Number(number);\n numberState = genson.serialize(num);\n stub.putStringState(key, numberState);\n\n return num;\n }"
] |
[
"0.67588973",
"0.6563208",
"0.652436",
"0.6413912",
"0.6359804",
"0.62182117",
"0.6131568",
"0.6096562",
"0.6090201",
"0.59865195",
"0.59145474",
"0.58471525",
"0.583912",
"0.5824932",
"0.58168805",
"0.574157",
"0.56534135",
"0.56421834",
"0.5608583",
"0.55531365",
"0.5472055",
"0.54624164",
"0.545831",
"0.5438224",
"0.54368347",
"0.54308647",
"0.541802",
"0.54164886",
"0.5366306",
"0.5332929",
"0.53023124",
"0.5302273",
"0.52957237",
"0.5292517",
"0.5290472",
"0.5283756",
"0.52761495",
"0.5270869",
"0.52611744",
"0.52574074",
"0.52561444",
"0.5256114",
"0.5244469",
"0.5243382",
"0.5240671",
"0.5235871",
"0.5221908",
"0.52122647",
"0.52030295",
"0.5200348",
"0.5199674",
"0.51897174",
"0.51730233",
"0.5171456",
"0.5165665",
"0.5164923",
"0.5157624",
"0.51573485",
"0.51566505",
"0.5148754",
"0.51327205",
"0.5129583",
"0.51282614",
"0.5123129",
"0.5116089",
"0.51083076",
"0.51024985",
"0.51015764",
"0.50982416",
"0.5090481",
"0.5086735",
"0.50863785",
"0.50840014",
"0.50824475",
"0.50769156",
"0.5071121",
"0.5057778",
"0.50509894",
"0.50475526",
"0.5042944",
"0.5041989",
"0.50345284",
"0.50222516",
"0.50204617",
"0.5016099",
"0.5014386",
"0.5011898",
"0.50074196",
"0.5000685",
"0.4998547",
"0.49947628",
"0.49914825",
"0.49893963",
"0.4973936",
"0.49712804",
"0.4966985",
"0.49582914",
"0.49570385",
"0.49508247",
"0.49486235",
"0.49478963"
] |
0.0
|
-1
|
Use the template and given environment list to replace parts of the DNA, per the docs
|
public void replace(List<TemplItem> template, List<Rope> env) {
Rope r = new Rope();
// StringBuilder bases = new StringBuilder();
// Stack<DNAChunk> r = new Stack<>();
int ndx;
int len;
for (TemplItem item : template) {
switch (item.getType()) {
case BASE:
// bases.append((char) item.getValue());
// r.push(new StringChunk("" + (char) item.getValue()));
r.concat(new Rope("" + (char) item.getValue()));
break;
case PROT:
// if (bases.length() > 0) {
// r.add(new StringChunk(bases.toString()));
// bases = new StringBuilder();
// }
ndx = item.getValue();
if (ndx < env.size()) {
if (item.getProtLevel() == 0) {
Rope envRope = env.get(item.getValue());
r.concat(envRope);
// r.append(env.get(item.getValue()).substring(0));
// r.add(env.get(item.getValue()));
} else {
Rope envStr = protect(item.getProtLevel(), env.get(item.getValue()).substring(0));
// System.out.println(
// " prot(" + item.getProtLevel() + ") " + env.get(item.getValue()).substring(0)
// + " => " + envStr);
r.concat(envStr);
// r.add(new StringChunk(envStr));
}
// if (item.getProtLevel() < 1) {
// r.add(env.get(item.getValue()));
// } else {
// System.out.println("Protection level " + item.getProtLevel());
// DNAChunk envStr = env.get(item.getValue());
// String prot = protect(item.getProtLevel(), envStr.substring(0));
// r.add(new StringChunk(prot));
// }
}
break;
case LEN:
// if (bases.length() > 0) {
// r.add(new StringChunk(bases.toString()));
// bases = new StringBuilder();
// }
ndx = item.getValue();
if (ndx < env.size()) {
Rope envStr = env.get(item.getValue()).substring(0);
len = envStr.getLength();
} else {
len = 0;
}
// r.add(new StringChunk(asnat(len)));
r.concat(new Rope(asnat(len)));
break;
default:
throw new RuntimeException("replace unhandled template " + item.getType());
}
}
// if (bases.length() > 0) {
// r.add(new StringChunk(bases.toString()));
// }
if (r.getLength() > 0) {
dna.prepend(r);
}
// while (!r.empty()) {
// DNAChunk chunk = r.pop();
// if (chunk.size() > 10) {
// System.out.println(" prepend " + chunk.substring(0, 10) + "...");
// } else {
// System.out.println(" prepend " + chunk.substring(0));
// }
// dna.prepend(chunk);
// }
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void matchreplace(List<PatternItem> pattern, List<TemplItem> template) {\n int i = 0;\n int ndx = 0;\n int srch = 0;\n Rope matched;\n List<Rope> env = new ArrayList<>();\n Stack<Integer> c = new Stack<>();\n\n for (PatternItem item : pattern) {\n switch (item.getType()) {\n case BASE:\n if (dna.get(i) == item.getValue()) {\n i += 1;\n } else {\n return;\n }\n break;\n case JUMP:\n i += item.getValue();\n if (!dna.isValidIndex(i - 1)) {\n return;\n }\n break;\n case OPEN:\n c.push(i);\n break;\n case CLOSE:\n ndx = c.pop();\n matched = dna.substring(ndx, i);\n env.add(matched);\n break;\n case SEARCH:\n srch = dna.search(item.getSearch());\n i = srch;\n break;\n default:\n // The docs don't say what to do here, so bail out\n throw new RuntimeException(\"matchreplace unhandled pattern \" + item.getType());\n }\n }\n\n dna.trunc(i);\n replace(template, env);\n }",
"public void setEnvironment(Map<String, String> environment);",
"private String expandVariables(final String value, final EnvVars environment,\n final Map<String, String> buildVariables) throws IOException, InterruptedException {\n\n String result = value;\n if (result != null) {\n for (Entry<String, String> entry : environment.entrySet()) {\n result = result.replaceAll(\"\\\\$\\\\{\" + entry.getKey() + \"\\\\}\", entry.getValue());\n }\n for (Entry<String, String> entry : buildVariables.entrySet()) {\n result = result.replaceAll(\"\\\\$\\\\{\" + entry.getKey() + \"\\\\}\", entry.getValue());\n }\n }\n return result;\n }",
"public void replaceLemma (SentenceList list, String replacementLemma, String key){\n\n \n int sentenceListSize = list.sentenceList.size();\n // iterate over sentence lists\n for (int i = 0; i < sentenceListSize; i++){\n SentenceObj sentenceObjTemp = list.sentenceList.get(i);\n\n // get a word list from each sentence\n LinkedList<WordObj> wordListTemp = sentenceObjTemp.wordList;\n int wordListSize = sentenceObjTemp.wordList.size();\n\n // iterate over wordListTemp and get individual wordObjects\n for (int j = 0; j < wordListSize; j++){\n\n WordObj wordObjTemp = wordListTemp.get(j);\n\n if (wordObjTemp.getName().equals(key)){\n wordObjTemp.setLemma(replacementLemma);\n continue;\n }\n }\n }\n }",
"public lexeme update(lexeme variable, lexeme value, lexeme env){\n\t\tlexeme oldE = env;\n\t\twhile (env != null){\n\t\t\tlexeme vars = car(env);\n\t\t\tlexeme vals = cadr(env);\n\t\t\t\n\t\t\twhile(vars != null && vars.type != \"EMPTY\"){\n\t\t\t\t//System.out.println(\"variable is \" + variable.type + \" vars \" + car(vars).type);\n\t\t\t\tif (sameVariable(variable, car(vars))){\n\t\t\t\t\treturn setCar(vals, value);\n\t\t\t\t}\n\t\t\t\tvars = cdr(vars);\n\t\t\t\tvals = cdr(vals);\n\t\t\t}\n\t\t\tenv = cdr(cdr(env));\n\t\t}\n\t\t\n\t\t//System.out.printf(\"Variable %s is undefined\\n\", variable.stringToken);\n\t\treturn insert(variable, value, oldE);\n\t}",
"public void changeDna(char[] c){\n dna = c;\n }",
"private static void anonymize(String patientId, AttributeList attributeList, AttributeList replacementAttributeList) {\r\n for (Attribute attribute : getAttributeListValues(attributeList).values()) {\r\n AttributeTag tag = attribute.getTag();\r\n if (attribute instanceof SequenceAttribute) {\r\n Iterator<?> si = ((SequenceAttribute)attribute).iterator();\r\n while (si.hasNext()) {\r\n SequenceItem item = (SequenceItem)si.next();\r\n anonymize(patientId, item.getAttributeList(), replacementAttributeList);\r\n }\r\n }\r\n else {\r\n Attribute replacement = replacementAttributeList.get(tag);\r\n if (replacement != null) {\r\n anonymizeNonSequenceAttribute(patientId, attribute, replacement);\r\n }\r\n }\r\n }\r\n }",
"public static String replacePlaceHolderOfTemplate(String templateString, String... arguments) {\n\t\tif (AppUtils.isBlank(arguments)) {\n\t\t\treturn null;\n\t\t}\n\t\tStringBuilder result = new StringBuilder(templateString);\n\t\tfor (int i = 0; i < arguments.length; i++) {\n\t\t\tStringConverter.replacePlaceHolderOfTemplate(result, \"{\" + i + \"}\", arguments[i]);\n\t\t}\n\t\treturn result.toString();\n\t}",
"private void randomizeEnvironment() {\n }",
"public static String getTemplate(String template, Pair<String, String>... replacements) {\n String ret = getTemplate(template);\n if (ret != null) {\n for (Pair<String, String> p : replacements) {\n ret = ret.replaceAll(p.fst, p.snd);\n }\n }\n return ret;\n }",
"public String change_template(Map<String, String> variables) {\n current_template_index = PrayerTemplates.get_next_template(my_prayer_part_type, current_template_index);\r\n int template_size = PrayerTemplates.get_template_size(my_prayer_part_type);\r\n my_prayer_part_text = PrayerTemplates.get_template_text(my_prayer_part_type, current_template_index);\r\n\r\n // step #2 - plug variables into new template\r\n Iterator it = variables.entrySet().iterator();\r\n while (it.hasNext()) {\r\n Map.Entry pair = (Map.Entry) it.next();\r\n substitute(pair.getKey().toString(), pair.getValue().toString());\r\n }\r\n\r\n return String.valueOf(current_template_index + 1) + \"/\" + String.valueOf(template_size);\r\n }",
"private void plantMotifSite(Motif motif, char[] pattern, String bindingsequence, int position, double score, int orientation, RegionSequenceData targetSequence, DNASequenceData dnasequence) {\n // insert DNA sequence into target at selected position\n for (int j=0;j<pattern.length;j++) {\n dnasequence.setValueAtRelativePosition(position+j, pattern[j]);\n }\n // create new region for the TFBS and add it to targetSitesSequence\n Region bindingsite=new Region(targetSequence, position, position+motif.getLength()-1, motif.getName(), score, orientation);\n bindingsite.setProperty(\"sequence\", bindingsequence);\n targetSequence.addRegion(bindingsite); \n }",
"public void setEnvironmentParams(String[] environmentParams)\r\n\t{\r\n\t\tthis.environmentParams = environmentParams;\r\n\t}",
"public void createEnvironment() {\n //create a list of collidable objects and a list of sprite objects\n List<Collidable> collidables = new ArrayList<Collidable>();\n List<Sprite> spriteList = new ArrayList<Sprite>();\n //update the game's environment to be the collidables list.\n this.environment = new GameEnvironment(collidables);\n //update the game's sprites collection to be the list of sprites.\n this.sprites = new SpriteCollection(spriteList);\n }",
"public void create(Environment environment);",
"public void setEnvironment(String environment1) {\n this.environment = environment1;\n }",
"public synchronized void setEnvironment(TestEnvironment environment) {\n if (!isMutable()) {\n throw new IllegalStateException(\n \"This TestResult is no longer mutable!\");\n }\n for (TestEnvironment.Element elem : environment.elementsUsed()) {\n // this is stunningly inefficient and should be fixed\n env = PropertyArray.put(env, elem.getKey(), elem.getValue());\n }\n }",
"@Override\n\tpublic void setEnvironmentVars(String environmentVars) {\n\t\tmodel.setEnvironmentVars(environmentVars);\n\t}",
"@Override\r\n protected void addParameters() {\r\n super.addParameters();\r\n addParameter(new AlgorithmParameter(\r\n PARAMETER_CENTER_TEMPLATES,\r\n GT._T(\"Possible replacements for {0} tags\", HtmlTagType.CENTER.getOpenTag()),\r\n new AlgorithmParameterElement[] {\r\n new AlgorithmParameterElement(\r\n \"template name\",\r\n GT._T(\"Template for replacing {0} tag\", HtmlTagType.CENTER.getOpenTag())),\r\n new AlgorithmParameterElement(\r\n \"parameter name\",\r\n GT._T(\"Parameter to use in the template for the text\"),\r\n true),\r\n new AlgorithmParameterElement(\r\n \"true/false\",\r\n GT._T(\"If replacement can be automatic\"),\r\n true),\r\n new AlgorithmParameterElement(\r\n \"explanation\",\r\n GT._T(\"Description of the template\"),\r\n true)\r\n },\r\n true));\r\n addParameter(new AlgorithmParameter(\r\n PARAMETER_STRIKE_TEMPLATES,\r\n GT._T(\"Possible replacements for {0} tags\", HtmlTagType.STRIKE.getOpenTag()),\r\n new AlgorithmParameterElement[] {\r\n new AlgorithmParameterElement(\r\n \"template name\",\r\n GT._T(\"Template for replacing {0} tag\", HtmlTagType.STRIKE.getOpenTag())),\r\n new AlgorithmParameterElement(\r\n \"parameter name\",\r\n GT._T(\"Parameter to use in the template for the text\"),\r\n true),\r\n new AlgorithmParameterElement(\r\n \"true/false\",\r\n GT._T(\"If replacement can be automatic\"),\r\n true),\r\n new AlgorithmParameterElement(\r\n \"explanation\",\r\n GT._T(\"Description of the template\"),\r\n true)\r\n },\r\n true));\r\n addParameter(new AlgorithmParameter(\r\n PARAMETER_TT_TEMPLATES,\r\n GT._T(\"Possible replacements for {0} tags\", HtmlTagType.TT.getOpenTag()),\r\n new AlgorithmParameterElement[] {\r\n new AlgorithmParameterElement(\r\n \"template name\",\r\n GT._T(\"Template for replacing {0} tag\", HtmlTagType.TT.getOpenTag())),\r\n new AlgorithmParameterElement(\r\n \"parameter name\",\r\n GT._T(\"Parameter to use in the template for the text\"),\r\n true),\r\n new AlgorithmParameterElement(\r\n \"true/false\",\r\n GT._T(\"If replacement can be automatic\"),\r\n true),\r\n new AlgorithmParameterElement(\r\n \"explanation\",\r\n GT._T(\"Description of the template\"),\r\n true)\r\n },\r\n true));\r\n }",
"public abstract void replaceBuffer(Array<Array<Boolean>> pattern);",
"protected void setEnvironment(Map<String, String> env) {\n\t\tthis.environment = env;\n\t}",
"public Environment(Environment e){\r\n\t\tthis.creatureList = new ArrayList<Creature>();\r\n\t\tsandboxMap = new int[e.sandboxMap.length][e.sandboxMap[0].length];\r\n\t\tfor (int i = 0; i < sandboxMap.length; i++){\r\n\t\t\tfor (int j = 0; j < sandboxMap[i].length; j++){\r\n\t\t\t\tsandboxMap[i][j] = e.sandboxMap[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void updateEnvironmentDetails(\n\t\t\tList<EnvironmentVO> environmentVOs) {\n\t\tfor (EnvironmentVO eVO : environmentVOs) {\n\t\t\tif (eVO.getMarathonJson() != null && JSONUtil.isJSONValid(eVO.getMarathonJson())) {\n\t\t\t\tupdateWestMarathonJson(eVO);\n\t\t\t}\n\t\t\tif (eVO.getEastMarathonJson() != null && JSONUtil.isJSONValid(eVO.getEastMarathonJson())) {\n\t\t\t\tupdateEastMarathonJson(eVO);\n\t\t\t}\n\t\t}\n\t}",
"public final void setSamenv(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String samenv)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.Samenv.toString(), samenv);\n\t}",
"public final void anonymize(final boolean[] list) {\r\n\r\n if (list.length != FileInfoDicom.anonymizeTagIDs.length) {\r\n throw new IllegalArgumentException(\"Anonymize list not of correct size!\");\r\n }\r\n\r\n // DICOM type 2 fields. Existance is required, although value is not.\r\n for (int i = 0; i < 2; i++) {\r\n\r\n try {\r\n\r\n if (list[i]) {\r\n\r\n for (int varIndex = 0; varIndex < getVarArray().length; varIndex++) {\r\n\r\n // System.out.println(\"looking for \" + \"dicom_0x\" +\r\n // getDicomTag(FileInfoDicom.anonymizeTagIDs[i])); System.out.println(\"found \" +\r\n // getVarElem(varIndex).name);\r\n if (getVarElem(varIndex).name.equals(\"dicom_0x\"\r\n + FileInfoMinc.getTagGroup(FileInfoDicom.anonymizeTagIDs[i]))) {\r\n\r\n for (int attIndex = 0; attIndex < getVarElem(varIndex).vattArray.length; attIndex++) {\r\n\r\n // System.out.println(\"looking for \" + \"el_0x\" +\r\n // getDicomElem(FileInfoDicom.anonymizeTagIDs[i])); System.out.println(\"found \" +\r\n // getVarElem(varIndex).getVattElem(attIndex).name);\r\n if (getVarElem(varIndex).getVattElem(attIndex).name.equals(\"el_0x\"\r\n + FileInfoMinc.getTagElem(FileInfoDicom.anonymizeTagIDs[i]))) {\r\n\r\n // System.out.println(\"want to erase \" + FileInfoDicom.anonymizeTagIDs[i] + \" -- \"\r\n // + getVarElem(varIndex).getVattElem(attIndex).toString());\r\n getVarElem(varIndex).getVattElem(attIndex).nelems = 1;\r\n getVarElem(varIndex).getVattElem(attIndex).values = new Object[] {Character.valueOf(' ')};\r\n // System.out.println(\"value now \" + FileInfoDicom.anonymizeTagIDs[i] + \" -- \" +\r\n // getVarElem(varIndex).getVattElem(attIndex).toString());\r\n }\r\n }\r\n }\r\n }\r\n }\r\n } catch (final NullPointerException npe) {\r\n\r\n // an IllegalArgumentException is probably not right here....\r\n throw new IllegalArgumentException(\"(\" + FileInfoDicom.anonymizeTagIDs[i]\r\n + \") is a required type 2 tag.\");\r\n }\r\n }\r\n\r\n // all other fields to anonymize are DICOM type 3 fields and\r\n // are neither required to have an entry nor required to exist\r\n // in the image info.\r\n for (int i = 2; i < FileInfoDicom.anonymizeTagIDs.length; i++) {\r\n // change each of the following tags to (empty) if we are asked to anonymize this info and if the tag exists\r\n // in the hashtable.\r\n\r\n if (list[i]) {\r\n\r\n for (int varIndex = 0; varIndex < getVarArray().length; varIndex++) {\r\n\r\n // System.out.println(\"looking for \" + \"dicom_0x\" + getDicomTag(FileInfoDicom.anonymizeTagIDs[i]));\r\n // System.out.println(\"found \" + getVarElem(varIndex).name);\r\n if (getVarElem(varIndex).name.equals(\"dicom_0x\"\r\n + FileInfoMinc.getTagGroup(FileInfoDicom.anonymizeTagIDs[i]))) {\r\n\r\n for (int attIndex = 0; attIndex < getVarElem(varIndex).vattArray.length; attIndex++) {\r\n\r\n // System.out.println(\"looking for \" + \"el_0x\" +\r\n // getDicomElem(FileInfoDicom.anonymizeTagIDs[i])); System.out.println(\"found \" +\r\n // getVarElem(varIndex).getVattElem(attIndex).name);\r\n if (getVarElem(varIndex).getVattElem(attIndex).name.equals(\"el_0x\"\r\n + FileInfoMinc.getTagElem(FileInfoDicom.anonymizeTagIDs[i]))) {\r\n\r\n // System.out.println(\"want to erase \" + FileInfoDicom.anonymizeTagIDs[i] + \" -- \" +\r\n // getVarElem(varIndex).getVattElem(attIndex).toString());\r\n getVarElem(varIndex).getVattElem(attIndex).nelems = 0;\r\n getVarElem(varIndex).getVattElem(attIndex).values = new Object[] {};\r\n // System.out.println(\"value now \" + FileInfoDicom.anonymizeTagIDs[i] + \" -- \" +\r\n // getVarElem(varIndex).getVattElem(attIndex).toString());\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n // *** anonymize fields which may be saved directly in the minc var format (but not converted from dicom tags)\r\n for (int i = 0; i < FileInfoDicom.anonymizeTagIDs.length; i++) {\r\n\r\n if (list[i] && (FileInfoMinc.dicomToMincVarMap[i] != null)) {\r\n\r\n for (int varIndex = 0; varIndex < getVarArray().length; varIndex++) {\r\n\r\n // System.out.println(\"looking for \" + getTagGroup(FileInfoMinc.dicomToMincVarMap[i]));\r\n // System.out.println(\"found \" + getVarElem(varIndex).name);\r\n if (getVarElem(varIndex).name.equals(FileInfoMinc.getTagGroup(FileInfoMinc.dicomToMincVarMap[i]))) {\r\n\r\n for (int attIndex = 0; attIndex < getVarElem(varIndex).vattArray.length; attIndex++) {\r\n\r\n // System.out.println(\"looking for \" + getTagElem(FileInfoMinc.dicomToMincVarMap[i]));\r\n // System.out.println(\"found \" + getVarElem(varIndex).getVattElem(attIndex).name);\r\n if (getVarElem(varIndex).getVattElem(attIndex).name.equals(FileInfoMinc\r\n .getTagElem(FileInfoMinc.dicomToMincVarMap[i]))) {\r\n\r\n // System.out.println(\"want to erase \" + FileInfoMinc.dicomToMincVarMap + \" -- \" +\r\n // getVarElem(varIndex).getVattElem(attIndex).toString());\r\n getVarElem(varIndex).getVattElem(attIndex).nelems = 0;\r\n getVarElem(varIndex).getVattElem(attIndex).values = new Object[] {};\r\n // System.out.println(\"value now \" + FileInfoMinc.dicomToMincVarMap + \" -- \" +\r\n // getVarElem(varIndex).getVattElem(attIndex).toString());\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n // this fileInfo is now an expurgated/sanitised version\r\n }",
"public final void setEnvironmentCode(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String environmentcode)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.EnvironmentCode.toString(), environmentcode);\r\n\t}",
"public abstract SAMEnvironmentDetails createSAMEnvironment(String envName,\n\t\t\tString description, List<ServiceEnvironmentMapping> services);",
"void setEnvironment(CudaEnvironment environment);",
"public static synchronized void anonymize(AttributeList attributeList, AttributeList replacementAttributeList) {\r\n anonymize(establishNewPatientId(replacementAttributeList), attributeList, replacementAttributeList);\r\n }",
"@Override\n public String doMapping(String template)\n {\n log.debug(\"doMapping({})\", template);\n // Copy our elements into an array\n List<String> components\n = new ArrayList<>(Arrays.asList(StringUtils.split(\n template,\n String.valueOf(TemplateService.TEMPLATE_PARTS_SEPARATOR))));\n int componentSize = components.size() - 1 ;\n\n // This method never gets an empty string passed.\n // So this is never < 0\n String templateName = components.get(componentSize);\n components.remove(componentSize--);\n\n log.debug(\"templateName is {}\", templateName);\n\n // Last element decides, which template Service to use...\n TemplateService templateService = (TemplateService)TurbineServices.getInstance().getService(TemplateService.SERVICE_NAME);\n TemplateEngineService tes = templateService.getTemplateEngineService(templateName);\n\n if (tes == null)\n {\n return null;\n }\n\n String defaultName = \"Default.vm\";\n\n // This is an optimization. If the name we're looking for is\n // already the default name for the template, don't do a \"first run\"\n // which looks for an exact match.\n boolean firstRun = !templateName.equals(defaultName);\n\n for(;;)\n {\n String templatePackage = StringUtils.join(components.iterator(), String.valueOf(separator));\n\n log.debug(\"templatePackage is now: {}\", templatePackage);\n\n StringBuilder testName = new StringBuilder();\n\n if (!components.isEmpty())\n {\n testName.append(templatePackage);\n testName.append(separator);\n }\n\n testName.append((firstRun)\n ? templateName\n : defaultName);\n\n // But the Templating service must look for the name with prefix\n StringBuilder templatePath = new StringBuilder();\n if (StringUtils.isNotEmpty(prefix))\n {\n templatePath.append(prefix);\n templatePath.append(separator);\n }\n templatePath.append(testName);\n\n log.debug(\"Looking for {}\", templatePath);\n\n if (tes.templateExists(templatePath.toString()))\n {\n log.debug(\"Found it, returning {}\", testName);\n return testName.toString();\n }\n\n if (firstRun)\n {\n firstRun = false;\n }\n else\n {\n // We run this loop only two times. The\n // first time with the 'real' name and the\n // second time with \"Default\". The second time\n // we will end up here and break the for(;;) loop.\n break;\n }\n }\n\n log.debug(\"Returning default\");\n return getDefaultName(template);\n }",
"public RelaxedApplyTemplateMethod(final ActualEnvironment environment)\n {\n super(environment);\n }",
"private void makeReplacementText() throws IOException {\n valueBuf.clear();\n Token t = new Token();\n int start = currentTokenStart + 1;\n final int end = bufStart - 1;\n try {\n for (;;) {\n\tint tok;\n\tint nextStart;\n\ttry {\n\t tok = Tokenizer.tokenizeEntityValue(buf, start, end, t);\n\t nextStart = t.getTokenEnd();\n\t}\n\tcatch (ExtensibleTokenException e) {\n\t tok = e.getTokenType();\n\t nextStart = end;\n\t}\n\thandleEntityValueToken(valueBuf, tok, start, nextStart, t);\n\tstart = nextStart;\n }\n }\n catch (PartialTokenException e) {\n currentTokenStart = end;\n fatal(\"NOT_WELL_FORMED\");\n }\n catch (InvalidTokenException e) {\n currentTokenStart = e.getOffset();\n reportInvalidToken(e);\n }\n catch (EmptyTokenException e) { }\n }",
"static String applyTemplate(final String template, final Map<String, String> props) {\n String data = template;\n Set<Entry<String, String>> entries = props.entrySet();\n for (Entry<String, String> entry : entries) {\n data = replacePropertyWithValue(data, entry.getKey(), entry.getValue());\n }\n return data;\n }",
"private void replace( int ix, int len, short code, boolean deleted[] )\n {\n text[ix] = code;\n \n Arrays.fill( deleted, ix+1, ix+len, true );\n }",
"public void replaceWord(int index, List<Word> pre, List<Word> post, String text) {\n Word replacement;\n if (index > 0 && index <= post.size()) {\n replacement = new Word(text, post.get(index - 1).getPosTag());\n post.remove(index - 1);\n post.add(index - 1, replacement);\n }\n if (index < 0 && Math.abs(index) <= pre.size()) {\n int size = pre.size();\n replacement = new Word(text, pre.get(size + index).getPosTag());\n pre.remove(size + index);\n pre.add(size + index, replacement);\n }\n }",
"public static void main(String[] args) {\n String one= \"semiha\";\n String two= \"h\";\n if(one.contains(two)){\n one=one.replaceAll(two, \"[\"+two+\"]\");\n }else{\n one=\"[\"+one+\"]\";\n }\n\n }",
"void mo25968e(TemplateInfo templateInfo);",
"@Override\n\tpublic void setEnvironment(Environment environment) {\n\t\tSystem.out.println(\"call setEnvironment()...\");\n\t\tenv = environment;\n\t}",
"public void setEGasNLEG(List<String> rawTP, List<String> newDedTP) {\n\n List<String> currEGouterTP = null;\n List<String> currEGinnerTP = null;\n List<List<String>> pairEGtoNested = new LinkedList<>();\n\n for (int keyEG : mapTmpEGtoAllTPs.keySet()) {\n\n List<String> currEG = mapTmpEGtoAllTPs.get(keyEG);\n if ((mapEGtoOccurs.get(currEG) != null && mapEGtoOccurs.get(currEG) > 1)\n || (mapEGtoOccurs.get(currEG) != null && mapEGtoOccurs.get(currEG) == 1)) {\n\n for (int k = 0; k < currEG.size(); k += 3) {\n\n currEGouterTP = new LinkedList<>(currEG.subList(k, k + 3));\n if (currEGouterTP.equals(rawTP) && !currEGouterTP.contains(\"ontology\")) {\n\n //Identify a EG as a nested loop with EG\n for (int l = k + 3; l < currEG.size(); l += 3) {\n\n currEGinnerTP = new LinkedList<>(currEG.subList(l, l + 3));\n pairEGtoNested = Arrays.asList(newDedTP, currEGinnerTP);\n myDedUtils.pairJoinRelation(newDedTP, currEGinnerTP, pairEGtoNested, 1, \"nestedLoop\", true);\n }\n\n }\n\n }\n }\n\n }\n\n }",
"private void loadEnvironment(String filename){\n // Code here to read from the file and set up the environment\n try (BufferedReader br = new BufferedReader(new FileReader(filename))) {\n String line;\n while((line = br.readLine()) != null) {\n String[] values = line.split(\",\");\n String type = values[0].replaceAll(\"[^a-zA-Z0-9]\", \"\"); // remove special characters\n double x = Double.parseDouble(values[1]);\n double y = Double.parseDouble(values[2]);\n switch (type) {\n case \"Zombie\":\n Zombie zombie = new Zombie(x, y);\n this.zombies.put(zombie.getPosition(), zombie);\n break;\n case \"Sandwich\":\n Sandwich sandwich = new Sandwich(x, y);\n this.sandwiches.put(sandwich.getPosition(), sandwich);\n break;\n case \"Player\":\n this.player = new Player(x, y, Integer.parseInt(values[3]));\n break;\n case \"Treasure\":\n this.treasure = new Treasure(x, y);\n break;\n default:\n throw new BagelError(\"Unknown type: \" + type);\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"void setAdress(String generator, String address);",
"private void setupAnts() {\n IntStream.range(0, numberOfAnts)\n .forEach(i -> {\n ants.forEach(ant -> {\n ant.clear();\n ant.visitCity(-1, random.nextInt(numberOfCities));\n });\n });\n currentIndex = 0;\n }",
"void setEnvironmentFile(File environmentFile);",
"public static void main(String[] args) {\n Arrays.asList(\"abc def gh\".split(\" \")).forEach(System.out::println);\n\n //Section2: string replace\n System.out.println(\"abca\".replace('a','d'));\n\n\n }",
"void setEnvironment(Environment environment) {\n this.environment = environment;\n }",
"public static String replace(String target, List<String> groups) {\n for (int index = 0; index < groups.size(); index++) {\n target = target.replace(\"$\" + (index + 1), groups.get(index));\n }\n return target;\n }",
"private void loadEnvironment(String filename){\n try (BufferedReader reader = new BufferedReader(new FileReader(filename))) {\n String line;\n while ((line = reader.readLine()) != null) {\n String[] info = line.split(\",\");\n String type = info[TYPE_INDEX];\n type = type.replaceAll(\"[^a-zA-Z0-9]\", \"\"); // remove special characters\n Point coordinate = new\n Point(Double.parseDouble(info[POS_X_INDEX]), Double.parseDouble(info[POS_Y_INDEX]));\n\n switch (type) {\n case \"Player\" -> this.player = new Player(coordinate, Integer.parseInt(info[ENERGY_INDEX]));\n case \"Zombie\" -> {\n entityList.add(new Zombie(coordinate, type));\n zombieCounter++;\n }\n case \"Sandwich\" -> {\n entityList.add(new Sandwich(coordinate, type));\n sandwichCounter++;\n }\n case \"Treasure\" -> this.treasure = new Treasure(coordinate, type);\n default -> throw new BagelError(\"Unknown type: \" + type);\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(-1);\n }\n }",
"String getReplacementString();",
"public void setGameEnvironment(GameEnvironment gameEnvironment) {\r\n this.gameE = gameEnvironment;\r\n }",
"@Override\n\tpublic Expression replacedVar(Map<Variable, Variable> replacement) {\n\t\tList<Tuple<String, Variable>> newVars = new ArrayList<Tuple<String, Variable>>(this.variables);\n\t\tnewVars.replaceAll(itm -> {\n\t\t\tif (itm.second() != null && replacement.containsKey(itm.second())) {\n\t\t\t\treturn new Tuple<String, Variable>(itm.first(), replacement.get(itm.second()));\n\t\t\t}\n\t\t\treturn itm;\n\t\t});\n\t\treturn new Expression(this.desc, newVars);\n\t}",
"public String equivLetters(String name, String[][] letterList) {\n\t\tfor (int i = 0; i < letterList.length; i++) {\n\t\t\tfor (int j = 0; j < letterList[i].length - 1; j++) {\n\t\t\t\t// Replace the found letter with a special letter designated per\n\t\t\t\t// group.\n\t\t\t\tname = name.replaceAll(letterList[i][j],\n\t\t\t\t\t\tletterList[i][letterList[i].length - 1]);\n\t\t\t}\n\t\t}\n\t\treturn name;\n\t}",
"@InsertProvider(type = ReplaceListProvider.class, method = \"dynamicSQL\")\n int replaceList(List<? extends T> recordList);",
"void setTemplate(ITemplateKey key, Template template);",
"public static void main(String pOptions[]) {\n \n String parameterDirectory = \"[ENTER DEBUGGING DIRECORY]\";\n NamedEntityExtractorParameter neParameter =\n new NamedEntityExtractorParameter(\n parameterDirectory + \"ForenamesDE.txt\",\n parameterDirectory + \"SurnamesDE.txt\",\n parameterDirectory + \"SurnameSuffixesDE_HeinsUndPartner21.txt\",\n parameterDirectory + \"MiddleInitialsDE_HeinsUndPartner21.txt\",\n parameterDirectory + \"TitlesDE_HeinsUndPartner21.txt\",\n parameterDirectory + \"PlacesDE.txt\",\n parameterDirectory + \"OrganizationsStartDE_HeinsUndPartner21.txt\",\n parameterDirectory + \"OrganizationsEndDE_HeinsUndPartner21.txt\",\n parameterDirectory + \"CompositeNE_HeinsUndPartner21.txt\",\n parameterDirectory + \"RegexNE_HeinsUndPartner21.txt\",\n parameterDirectory + \"NameAffixesDE_HeinsUndPartner21.txt\",\n parameterDirectory + \"PlaceAffixesDE_HeinsUndPartner21.txt\",\n parameterDirectory + \"OrganizationsAffixesDE_HeinsUndPartner21.txt\",\n parameterDirectory + \"OrganizationsDE_HeinsUndPartner21.tokenized.txt\",\n \"TestMetaDataAttribute\", false,\n parameterDirectory + \"PlaceIndicatorsDE_HeinsUndPartner21.txt\",\n false, null,\n parameterDirectory + \"PersonNameIndicatorsDE_HeinsUndPartner21.txt\",\n parameterDirectory + \"ProfessionsDE_HeinsUndPartner21.txt\", true,\n parameterDirectory + \"StreetExceptionsDE.txt\",\n parameterDirectory + \"StreetSuffixesDE_HeinsUndPartner21.txt\",\n \"([A-Z][A-Za-z\\\\-\\\\.]*)\",\n \"([0-9\\\\-]{1,4}[a-zA-Z]?|[a-zA-Z\\\\-\\\\/]?|[Nn][Rr][\\\\.]?)\",\n \"(.*-$|^Die.*|^Der.*|^Das.*|[\\\\p{Alpha}]*ring$|.*\\\\/$)\", 2, \n \"([0-9\\\\.]{2,}|^<<.*)\");\n \n NamedEntityExtractor21 neExtractor = new NamedEntityExtractor21(\n neParameter);\n neExtractor.addTempOrganizationName(\"DiE Test ABC GmbH\");\n TestNamedEntityOwner neOwner = new TestNamedEntityOwner();\n \n for (int i = 0; i < neOwner.getNumberOfProcessedTextUnits(); i++) {\n neOwner.replaceProcessedTextUnitFromString(i,\n neExtractor.extractNamedEntities(neOwner\n .getInputTextUnitAsString(i), neOwner));\n }\n System.out.println(neOwner.toString());\n \n }",
"public static void main (String args []) {\n\r\n String str = \"\\\"क\\\", \\\"का\\\", \\\"कि\\\", \\\"की\\\", \\\"कु\\\", \\\"कू\\\", \\\"के\\\", \\\"कै\\\", \\\"को\\\", \\\"कौ\\\", \\\"कं\\\", \\\"क:\\\"\" ;\r\n String strEng = \"\\\"ka\\\", \\\"kā\\\", \\\"ki\\\", \\\"kī\\\", \\\"ku\\\", \\\"kū\\\", \\\"kē\\\", \\\"kai\\\", \\\"ko\\\", \\\"kau\\\", \\\"kṁ\\\", \\\"ka:\\\"\" ;\r\n\r\n String additionalConsonants = \"\\\"क़\\\", \\\"क़ा\\\", \\\"क़ि\\\", \\\"क़ी\\\", \\\"क़ु\\\", \\\"क़ू\\\", \\\"क़े\\\", \\\"क़ै\\\", \\\"क़ो\\\", \\\"क़ौ\\\", \\\"क़ं\\\", \\\"क़:\\\"\"; \r\n String additionalConsonantsEng = \"\\\"qa\\\", \\\"qā\\\", \\\"qi\\\", \\\"qī\\\", \\\"qu\\\", \\\"qū\\\", \\\"qē\\\", \\\"qai\\\", \\\"qo\\\", \\\"qau\\\", \\\"qṁ\\\", \\\"qa:\\\"\" ;\r\n\r\n //String str = \"क, का, कि, की, कु, कू, के, कै, को, कौ, कं, क:\" ;\r\n \r\n \r\n \r\n //generateNP(str);\r\n //generateEN(strEng);\r\n //System.out.println();\r\n generateNPAdditionalConsonants(additionalConsonants);\r\n generateENAdditionalConsonants(additionalConsonantsEng);\r\n\r\n\r\n\r\n }",
"public lexeme insert(lexeme variable, lexeme value, lexeme env){\n\t\tsetCar(env, new lexeme(\"GLUE\", variable, car(env)));\n\t setCar(cdr(env), new lexeme(\"GLUE\", value, cadr(env)));\n\t return value;\n }",
"public abstract void deleteSAMEnvironment(String envName);",
"public void setup()\n {\n // we use a separate ArrayList to keep track of each animal. \n // our room is 50 x 50.\n creatures = new ArrayList<Creature>();\n for (int i = 0; i < 55; i++) {\n if (i < 5) {\n creatures.add(new Fox((int)(Math.random()*48)+1, 1, (int)(Math.random()*48)+1)); \n } else {\n creatures.add(new Tux((int)(Math.random()*48)+1, 1, (int)(Math.random()*48)+1));\n }\n }\n \n env.setRoom(new Room());\n \n // Add all the animals into to the environment for display\n for (Creature c : creatures) {\n env.addObject(c);\n }\n \n // Sets up the camera\n env.setCameraXYZ(25, 50, 55);\n env.setCameraPitch(-63);\n \n // Turn off the default controls\n env.setDefaultControl(false);\n env.setShowController(false);\n \n }",
"public void setEnvironment(Object environment) {\n this.environment = environment;\n }",
"public void setCurrentEnvironment(String environment) {\n currentEnvironment = environment;\n }",
"public static String replaceEach(String text, String[] searchList,\n String[] replacementList, boolean repeat, int timeToLive) {\n\n if (text == null || text.length() == 0 || searchList == null\n || searchList.length == 0 || replacementList == null\n || replacementList.length == 0) {\n return text;\n }\n\n // if recursing, this shouldnt be less than 0\n if (timeToLive < 0) {\n throw new IllegalStateException(\"TimeToLive of \" + timeToLive\n + \" is less than 0: \" + text);\n }\n\n int searchLength = searchList.length;\n int replacementLength = replacementList.length;\n\n // make sure lengths are ok, these need to be equal\n if (searchLength != replacementLength) {\n throw new IllegalArgumentException(\n \"Search and Replace array lengths don't match: \" + searchLength\n + \" vs \" + replacementLength);\n }\n\n // keep track of which still have matches\n boolean[] noMoreMatchesForReplIndex = new boolean[searchLength];\n\n // index on index that the match was found\n int textIndex = -1;\n int replaceIndex = -1;\n int tempIndex = -1;\n\n // index of replace array that will replace the search string found\n // NOTE: logic duplicated below START\n for (int i = 0; i < searchLength; i++) {\n if (noMoreMatchesForReplIndex[i] || searchList[i] == null\n || searchList[i].length() == 0 || replacementList[i] == null) {\n continue;\n }\n tempIndex = text.indexOf(searchList[i]);\n\n // see if we need to keep searching for this\n if (tempIndex == -1) {\n noMoreMatchesForReplIndex[i] = true;\n } else {\n if (textIndex == -1 || tempIndex < textIndex) {\n textIndex = tempIndex;\n replaceIndex = i;\n }\n }\n }\n // NOTE: logic mostly below END\n\n // no search strings found, we are done\n if (textIndex == -1) {\n return text;\n }\n\n int start = 0;\n\n // get a good guess on the size of the result buffer so it doesnt have to\n // double if it goes over a bit\n int increase = 0;\n\n // count the replacement text elements that are larger than their\n // corresponding text being replaced\n for (int i = 0; i < searchList.length; i++) {\n if (searchList[i] == null || replacementList[i] == null) {\n continue;\n }\n int greater = replacementList[i].length() - searchList[i].length();\n if (greater > 0) {\n increase += 3 * greater; // assume 3 matches\n }\n }\n // have upper-bound at 20% increase, then let Java take over\n increase = Math.min(increase, text.length() / 5);\n\n StringBuffer buf = new StringBuffer(text.length() + increase);\n\n while (textIndex != -1) {\n\n for (int i = start; i < textIndex; i++) {\n buf.append(text.charAt(i));\n }\n buf.append(replacementList[replaceIndex]);\n\n start = textIndex + searchList[replaceIndex].length();\n\n textIndex = -1;\n replaceIndex = -1;\n tempIndex = -1;\n // find the next earliest match\n // NOTE: logic mostly duplicated above START\n for (int i = 0; i < searchLength; i++) {\n if (noMoreMatchesForReplIndex[i] || searchList[i] == null\n || searchList[i].length() == 0 || replacementList[i] == null) {\n continue;\n }\n tempIndex = text.indexOf(searchList[i], start);\n\n // see if we need to keep searching for this\n if (tempIndex == -1) {\n noMoreMatchesForReplIndex[i] = true;\n } else {\n if (textIndex == -1 || tempIndex < textIndex) {\n textIndex = tempIndex;\n replaceIndex = i;\n }\n }\n }\n // NOTE: logic duplicated above END\n\n }\n int textLength = text.length();\n for (int i = start; i < textLength; i++) {\n buf.append(text.charAt(i));\n }\n String result = buf.toString();\n if (!repeat) {\n return result;\n }\n\n return replaceEach(result, searchList, replacementList, repeat,\n timeToLive - 1);\n }",
"private static String[] placeInBag(String item, String[] inventory){\r\n for(int i=0; i<inventory.length; i++){\r\n if(inventory[i].equals(\"\")){\r\n inventory[i] = item;\r\n break;\r\n }\r\n }\r\n return inventory;\r\n }",
"public void test() {\r\n PropertiesSubstitutor ps = new PropertiesSubstitutor(MockParametersCallbacks.NAME);\r\n\r\n char[] fillC = new char[1000];\r\n Arrays.fill(fillC, '-');\r\n String fill = new String(fillC);\r\n\r\n String line = \"Text ${subst1} $subst2 \" + fill + \":$end //\";\r\n String exp = \"Text subst1 subst2 \" + fill + \":end //\";\r\n\r\n for (int i = 0; i < 100000; i++) {\r\n String s = ps.substitute(line);\r\n assertEquals(exp, s);\r\n }\r\n }",
"@Test\n public void testSubstitute() {\n System.out.println(\"substitute\");\n StringBuilder sb = new StringBuilder();\n String tag = \"__TAG__\";\n String content = \"aa __TAG__ cc\";\n boolean expResult = false;\n boolean result = ConnectionManager.substitute(sb, tag, content);\n assertEquals(expResult, result);\n }",
"public void replace(int index, Code code, Attribute... attributes) {\r\n\t\tstmts.set(index,new Entry(code,attributes));\r\n\t}",
"private void doReplace(LValue lv, List<LValue> replaceThese, List<Op04StructuredStatement> inThese) {\n\n for (int x=0;x<inThese.size()-1;++x) {\n LValue replaceThis = replaceThese.get(x);\n Op04StructuredStatement inThis = inThese.get(x);\n ExpressionReplacingRewriter err = new ExpressionReplacingRewriter(new LValueExpression(replaceThis), new LValueExpression(lv));\n StructuredAssignment statement = (StructuredAssignment)inThis.getStatement();\n statement.rewriteExpressions(err);\n inThis.replaceStatement(new StructuredAssignment(BytecodeLoc.TODO, lv, statement.getRvalue()));\n }\n Op04StructuredStatement last = inThese.get(inThese.size()-1);\n StructuredAssignment structuredAssignment = (StructuredAssignment)last.getStatement();\n last.replaceStatement(new StructuredAssignment(BytecodeLoc.TODO, lv, structuredAssignment.getRvalue(), true));\n }",
"private void apply() {\n\t\tArrayList<NPC> templates = new ArrayList<NPC>();\n\t\tfor (int i = 0; i < npcList.size(); i++) {\n\t\t\tDocument doc = ParserHelper.LoadXML(\"assets/data/npcs/\" + npcList.get(i) + \".xml\");\n\t\t\tElement root = doc.getDocumentElement();\n\t\t\tElement n = (Element) doc.getFirstChild();\n\t\t\tNPC template = new NPC(n, new Vec2f(0, 0), npcList.get(i));\n\t\t\ttemplates.add(template);\n\t\t}\n\n\t\tfor (int i = 0; i < blockGrid.length; i++) {\n\t\t\tfor (int j = 0; j < blockGrid[i].length; j++) {\n\t\t\t\tif (blockGrid[i][j] < 0 && blockGrid[i][j] > -100) {\n\t\t\t\t\tkeyBlocks.get((blockGrid[i][j] * -1) - 1).apply(i, j, zoneGrid, zone, widgetLoader, templates);\n\t\t\t\t}\n\t\t\t\tif (blockGrid[i][j] > 0 && blockGrid[i][j] < 100) {\n\t\t\t\t\tblockList.get(blockGrid[i][j] - 1).apply(i, j, zoneGrid, zone, widgetLoader, templates);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void setUpTextures(int program, GL2 gl2) {\n\t\t// sets the parameters for texture\n\t\tgl2.glGenTextures(1, buffer);\n\t\tgl2.glActiveTexture(gl2.GL_TEXTURE0);\n\t\tgl2.glBindTexture(gl2.GL_TEXTURE_2D,\n\t\t\t\tgl2.glGetUniformLocation(program, \"abc\"));\n\t\tgl2.glTexParameteri(gl2.GL_TEXTURE_2D, gl2.GL_TEXTURE_MIN_FILTER,\n\t\t\t\tgl2.GL_LINEAR);\n\t\tgl2.glTexParameteri(gl2.GL_TEXTURE_2D, gl2.GL_TEXTURE_MAG_FILTER,\n\t\t\t\tgl2.GL_LINEAR);\n\t\tgl2.glTexImage2D(gl2.GL_TEXTURE_2D, 0, gl2.GL_RGBA,\n\t\t\t\tbufferimage.getWidth(), bufferimage.getHeight(), 0,\n\t\t\t\tgl2.GL_BGRA, gl2.GL_UNSIGNED_BYTE, buffer);\n\t}",
"public void setAngularVariables(List<String> angularVariables)\n {\n this.angularVariables = angularVariables;\n }",
"public Builder setEnv(\n int index, java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureEnvIsMutable();\n env_.set(index, value);\n onChanged();\n return this;\n }",
"void fillblanks(String templateVelocity, DatosEmail datosEmail,Map<String,Object> model) throws IOException;",
"void postGen(World world, int x, int y, int z);",
"interface WithEnvironmentVariables {\n /**\n * Specifies environmentVariables.\n * @param environmentVariables Batch AI service sets the following environment variables for all jobs: AZ_BATCHAI_INPUT_id, AZ_BATCHAI_OUTPUT_id, AZ_BATCHAI_NUM_GPUS_PER_NODE. For distributed TensorFlow jobs, following additional environment variables are set by the Batch AI Service: AZ_BATCHAI_PS_HOSTS, AZ_BATCHAI_WORKER_HOSTS\n * @return the next update stage\n */\n Update withEnvironmentVariables(List<EnvironmentSetting> environmentVariables);\n }",
"public static HashMap<String, HashMap<String, TemplateString>> expandTemplate(Template template, String baseFormat) {\r\n\t\t// This map is a different format than the output map despite same dimensions - the key is the template format\r\n\t\tHashMap<String, ArrayList<TemplateString>> rawExpandedData = new HashMap<>();\r\n\t\tfor(TemplateFormat format : template.values()) {\r\n\t\t\trawExpandedData.put(format.formatName, format.baseProgression.getPossibilities());\r\n\t\t}\r\n\t\t\r\n\t\t// Find matching formats\r\n\t\tArrayList<TemplateString> baseStrings = rawExpandedData.get(baseFormat);\r\n\t\tif(baseStrings == null) {\r\n\t\t\t// If base format not found, return an empty result\r\n\t\t\treturn new HashMap<String, HashMap<String, TemplateString>>();\r\n\t\t}\r\n\t\t\r\n\t\tHashMap<String, HashMap<String, TemplateString>> result = new HashMap<>();\r\n\t\tfor(TemplateString baseString : baseStrings) {\r\n\t\t\t// Initialize array \r\n\t\t\tHashMap<String, TemplateString> stringList = new HashMap<>();\r\n\t\t\tstringList.put(baseFormat, baseString);\r\n\t\t\t\r\n\t\t\t// Check other formats to find the possibility with the most variable matches\r\n\t\t\touter:\r\n\t\t\tfor(Entry<String, ArrayList<TemplateString>> entry : rawExpandedData.entrySet()) {\r\n\t\t\t\tif(entry.getKey().equals(baseFormat)) continue; // Skip the base format\r\n\t\t\t\t\r\n\t\t\t\t// Find the string with the most matches to the base string \r\n\t\t\t\tint maxMatches = -1;\r\n\t\t\t\tTemplateString currentMatch = null;\r\n\t\t\t\tfor(TemplateString otherString : entry.getValue()) {\r\n\t\t\t\t\tint matches = 0;\r\n\t\t\t\t\tfor(VarData var : otherString.variables.values()) {\r\n\t\t\t\t\t\tVarData baseVar = baseString.variables.get(var.id);\r\n\t\t\t\t\t\tif(baseVar == null) continue; // If the variable simply doesn't exist in the base string do nothing\r\n\t\t\t\t\t\tif(baseVar.choice != var.choice) {\r\n\t\t\t\t\t\t\tcontinue outer; // Variable is mismatched so skip\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tmatches++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(matches > maxMatches) { // Check for most matches\r\n\t\t\t\t\t\tcurrentMatch = otherString;\r\n\t\t\t\t\t\tmaxMatches = matches;\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// Add any found string (there should be one) to the list\r\n\t\t\t\tif(currentMatch != null) {\r\n\t\t\t\t\tstringList.put(entry.getKey(), currentMatch);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tresult.put(baseString.string, stringList);\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}",
"public static EvalEnv genExampleEnv2()\n {\n EvalEnv result = new EvalEnv();\n result.createVariable(Boolean.class, true);\n result.createVariable(Boolean.class, true);\n for (int x = 0; x < Environment.HalfObsWidth * 2; x++)\n {\n for (int y = 0; y < Environment.HalfObsHeight * 2; y++)\n {\n result.createVariable(Integer.class, 0);\n }\n }\n\n for (int i = 0; i < 5; i++)\n {\n result.createVariable(Integer.class, -1);\n result.createVariable(Float.class, -100.0);\n result.createVariable(Float.class, 10.0);\n }\n return result;\n }",
"public final void setEnvironmentCode(java.lang.String environmentcode)\r\n\t{\r\n\t\tsetEnvironmentCode(getContext(), environmentcode);\r\n\t}",
"public void setTemplate(Template template)\n/* */ {\n/* 62 */ this.template = template;\n/* */ }",
"private void modifyIndividuals(){\n for(AbstractBehaviour behaviour: entityBehaviours){\n JSONObject jsonPop = null;\n GeneticInterface gi = interfaceMap.get(behaviour);\n try {\n jsonPop = gi.receiveNewPopulation();\n } catch (IOException e) {\n e.printStackTrace();\n }\n for(String key: jsonPop.keySet()){\n JSONArray funArray = jsonPop.getJSONObject(key).getJSONArray(\"functions\");\n List<Function> functions = new LinkedList<>();\n for(int a = 0; a <funArray.length(); a++){\n String tree = funArray.getString(a);\n Function functionTree = Node.treeFromString(tree, behaviour.getNumberOfInputs());\n functions.add(functionTree);\n }\n behaviour.setEntityByName(key, functions);\n }\n behaviour.resetEntities();\n }\n }",
"void setEnvironment(Properties properties);",
"public static String formatIndexed(String template, Object... params) {\n checkNotNull(template);\n checkNotNull(params);\n String result = template;\n for (int i = 0; i < params.length; i++) {\n if (params[i] == null) continue;\n result = result.replaceAll(\"\\\\{\" + i + \"\\\\}\", params[i].toString());\n }\n return result;\n }",
"public static void replace (Object[] list, Object original, Object replacement)\n {\n // You will write this method in lab.\n \t\n \tfor(int pos = 0; pos < list.length; pos++)\n \t\tif(list[pos] == original)\n \t\t\tlist[pos] = replacement;\n }",
"public String replaceFrom(CharSequence sequence, CharSequence replacement, CountMethod countMethod, UnicodeSet.SpanCondition spanCondition) {\n/* 182 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Override\n public void setTemplateArgumentTypes(List<Type> argsTypes) {\n // System.out.println(\"ARRIVED AT TEMPLATE ARGS\");\n // System.out.println(\n // \"SETTING TYPES:\" + argsTypes.stream().map(Type::getCode).collect(Collectors.joining(\"\\n\")));\n // System.out.println(\"ARGS BEFORE:\" + getTemplateArgumentStrings(null));\n setInPlace(TEMPLATE_ARGUMENTS, argsTypes.stream()\n .map(TemplateArgumentType::new)\n .collect(Collectors.toList()));\n // System.out.println(\"ARGS AFTER:\" + getTemplateArgumentStrings(null));\n // setTemplateArgumentTypes(argsTypes, true);\n\n hasUpdatedArgumentTypes = true;\n }",
"public static void main(String[] args) {\n MapDictionary<String> dictionary = new MapDictionary<String>();\r\n dictionary.addEntry(new DictionaryEntry<String>(\"50 Cent\",\"\"));\r\n dictionary.addEntry(new DictionaryEntry<String>(\"XYZ120 DVD Player\",\"\"));\r\n dictionary.addEntry(new DictionaryEntry<String>(\"cent\",\"\"));\r\n dictionary.addEntry(new DictionaryEntry<String>(\"dvd player\",\"\"));\r\n\r\n // build the dictionary-chunker:\r\n // dictionary, tokenizer factory, flag1, flag2\r\n // tokenizer will ignore thre blank space in the matching process\r\n // all matches flag:\r\n // sensitive flag: when case sensitivity is enabled, \r\n ExactDictionaryChunker dictionaryChunkerTT\r\n = new ExactDictionaryChunker(dictionary,\r\n IndoEuropeanTokenizerFactory.INSTANCE,\r\n true,true);\r\n\r\n ExactDictionaryChunker dictionaryChunkerTF\r\n = new ExactDictionaryChunker(dictionary,\r\n IndoEuropeanTokenizerFactory.INSTANCE,\r\n true,false);\r\n\r\n ExactDictionaryChunker dictionaryChunkerFT\r\n = new ExactDictionaryChunker(dictionary,\r\n IndoEuropeanTokenizerFactory.INSTANCE,\r\n false,true);\r\n\r\n ExactDictionaryChunker dictionaryChunkerFF\r\n = new ExactDictionaryChunker(dictionary,\r\n IndoEuropeanTokenizerFactory.INSTANCE,\r\n false,false);\r\n\r\n\r\n\r\n System.out.println(\"\\nDICTIONARY\\n\" + dictionary);\r\n \r\n String text = \"50 Cent is hard to distinguish from 50 cent and just plain cent without case.\";\r\n System.out.println(\"TEXT=\" + text);\r\n chunk(dictionaryChunkerFF,text);\r\n \r\n text = \"The product xyz120 DVD player won't match unless it's exact like XYZ120 DVD Player.\";\r\n System.out.println(\"TEXT=\" + text);\r\n chunk(dictionaryChunkerFF,text);\r\n\r\n }",
"public void gen(CodeSeq code, ICodeEnv env) {\n\r\n\t}",
"public void replaceFormats(List<Format> formats);",
"void setSymbol(Environment environment, Character newSymbol);",
"public void overwriteAst(Asteroid[] ast){\n this.field = ast;\n }",
"void replace(int offset, int length, String text) throws BadLocationException;",
"public static void main(String[] args) {\n TrieReplaceWordsAndSearchAssist obj = new TrieReplaceWordsAndSearchAssist();\n obj.insert(\"home\");\n obj.insert(\"homemade\");\n obj.insert(\"homework\");\n obj.search(\"home\");\n \n TrieN pre = obj.baseNode(\"hom\");\n if (pre != null)\n System.out.println(\"Base/partial node exists!!\");\n else {\n System.out.println(\"No such base node\");\n }\n \n // assist\n System.out.println(\"Search Assist...\");\n obj.searchAssist(pre, \"hom\");\n \n // replace with shorter words.\n System.out.println(\"Sentence compaction.\");\n obj.insert(\"cat\");\n obj.insert(\"bat\");\n obj.insert(\"rat\");\n String sentence = \"I am cattle batman I hate rattles\";\n String sentenceArray[] = sentence.split(\" \");\n System.out.println(Arrays.toString(sentenceArray));\n obj.replaceWordsWithShorterWords(sentenceArray);\n System.out.println(Arrays.toString(sentenceArray));\n }",
"public void replace(int index, Code code, Collection<Attribute> attributes) {\r\n\t\tstmts.set(index, new Entry(code, attributes));\r\n\t}",
"void setContents(T[] contents);",
"public void setupAssociations( String ... list )\n {\n if( list.length != 0 )\n {\n for( String word : list )\n {\n associations[numAssocs] = word;\n numAssocs++;\n }\n }\n }",
"public final void setEnvironmentDescription(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String environmentdescription)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.EnvironmentDescription.toString(), environmentdescription);\r\n\t}",
"private void fillAdjective1a()\n {\n adjective1a.add(\"Epic\");\n adjective1a.add(\"Brilliant\");\n adjective1a.add(\"Mighty\");\n adjective1a.add(\"Great\");\n adjective1a.add(\"Wonderful\");\n adjective1a.add(\"Crazy\");\n adjective1a.add(\"Sparkling\");\n adjective1a.add(\"Shiny\");\n adjective1a.add(\"Lustful\");\n adjective1a.add(\"Precious\");\n\n }",
"private native void buildTemplate(long i, long j);",
"public void replaceListOfArticles(List<Article> list) {\n this.listOfArticles = list;\n }",
"File prepareEnvironment();",
"private void setupEnvironment(Execute exe) {\r\n String[] environment = env.getVariables();\r\n if (environment != null) {\r\n for (int i = 0; i < environment.length; i++) {\r\n log(\"Setting environment variable: \" + environment[i], Project.MSG_VERBOSE);\r\n }\r\n }\r\n exe.setNewenvironment(newEnvironment);\r\n exe.setEnvironment(environment);\r\n }",
"public void replaceThesarusWordwithGoogleWord ( ) {\r\n\t \t\t \t\r\n\t \tfor (Map.Entry<String, List<String>> entry : GoogleToThesarus.entrySet()) {\r\n\t String key = entry.getKey();\r\n\t List<String> values = entry.getValue();\r\n\t //String wordIsReplaced=null;\r\n\t \r\n\t for (String temp: values) {\r\n\t \t//why is this null\r\n\t \t\r\n\t \tif (splitto.equals(temp)) {\r\n\t \t\tsplitto=key;\r\n\t \t\tif(!replacedWordList.contains(splitto))\r\n\t \t\t\treplacedWordList.add(splitto);\r\n \t\t\r\n\t \t \t\t \t\t}\r\n\t \telse {\r\n\t \t\t//wordIsReplaced=splitto;\r\n\t \t\t//System.out.println(\"failed\");\r\n\t \t}\r\n\t \t\t }\r\n\t \t}\r\n\t }"
] |
[
"0.5399623",
"0.49711114",
"0.48787212",
"0.48335165",
"0.46770528",
"0.46418777",
"0.45891112",
"0.45582518",
"0.45169848",
"0.45162034",
"0.4501879",
"0.4459003",
"0.4436377",
"0.44193706",
"0.44168308",
"0.44162047",
"0.43667853",
"0.43313754",
"0.4322179",
"0.4317188",
"0.43125397",
"0.43073928",
"0.43034068",
"0.4300428",
"0.428609",
"0.42722115",
"0.4268343",
"0.42611307",
"0.42447305",
"0.42441523",
"0.42384174",
"0.4220314",
"0.42123038",
"0.4211898",
"0.42083582",
"0.41981584",
"0.41967797",
"0.41574445",
"0.41482776",
"0.4146546",
"0.4143162",
"0.41323453",
"0.41234154",
"0.41209456",
"0.41204292",
"0.41093123",
"0.41069433",
"0.40942204",
"0.40917787",
"0.4086309",
"0.40831938",
"0.40743816",
"0.4072601",
"0.40715054",
"0.4067547",
"0.4067045",
"0.40576443",
"0.40512684",
"0.40456298",
"0.40427554",
"0.40425447",
"0.40305907",
"0.40288705",
"0.40171447",
"0.4015622",
"0.40068486",
"0.40060776",
"0.40055013",
"0.39990312",
"0.39966956",
"0.39960113",
"0.39957362",
"0.39922336",
"0.39910752",
"0.39881152",
"0.3986801",
"0.39867666",
"0.39845982",
"0.39815468",
"0.39800563",
"0.39799863",
"0.39799163",
"0.39767128",
"0.39746496",
"0.3967461",
"0.39624318",
"0.39594164",
"0.39558423",
"0.39534962",
"0.39530674",
"0.39449164",
"0.39380687",
"0.3933946",
"0.39326745",
"0.39280036",
"0.39210337",
"0.39080384",
"0.39063698",
"0.39040244",
"0.3896164"
] |
0.7352719
|
0
|
Match the DNA against the given pattern and then call replace with the given template, per the docs
|
public void matchreplace(List<PatternItem> pattern, List<TemplItem> template) {
int i = 0;
int ndx = 0;
int srch = 0;
Rope matched;
List<Rope> env = new ArrayList<>();
Stack<Integer> c = new Stack<>();
for (PatternItem item : pattern) {
switch (item.getType()) {
case BASE:
if (dna.get(i) == item.getValue()) {
i += 1;
} else {
return;
}
break;
case JUMP:
i += item.getValue();
if (!dna.isValidIndex(i - 1)) {
return;
}
break;
case OPEN:
c.push(i);
break;
case CLOSE:
ndx = c.pop();
matched = dna.substring(ndx, i);
env.add(matched);
break;
case SEARCH:
srch = dna.search(item.getSearch());
i = srch;
break;
default:
// The docs don't say what to do here, so bail out
throw new RuntimeException("matchreplace unhandled pattern " + item.getType());
}
}
dna.trunc(i);
replace(template, env);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"default HtmlFormatter replace(Pattern pattern, String replacement) {\n return andThen(s -> pattern.matcher(s).replaceAll(replacement));\n }",
"public void execute() {\n int loop = 0;\n\n while (true) {\n List<PatternItem> pattern;\n List<TemplItem> template;\n\n if (loop % 1000 == 0) {\n System.out.println(\"Loop \" + loop);\n System.out.println(\" rna: \" + rna.getLength());\n }\n\n long start = System.currentTimeMillis();\n pattern = pattern();\n System.out.println(\"pattern time: \" + (System.currentTimeMillis() - start) / 1000.0);\n start = System.currentTimeMillis();\n template = template();\n System.out.println(\"template time: \" + (System.currentTimeMillis() - start) / 1000.0);\n\n System.out.println(\"pattern: \" + patternToString(pattern));\n System.out.println(\"template: \" + templateToString(template));\n\n matchreplace(pattern, template);\n\n loop += 1;\n }\n }",
"public abstract void replaceBuffer(Array<Array<Boolean>> pattern);",
"String getReplacementString();",
"public String match (String frameSeq)\n {\n // keeps track of how many times match is called (i.e. how many codons/AA's there are) \n \n\n StringBuffer newSeq = new StringBuffer (\"\");\n int begin = 0;\n int end = 3;\n int countAA = 0;\n\n for (int i = 0; i < frameSeq.length(); i += 3)\n {\n // keeps track of how many codons/AA's there are so that breaks can be inserted\n countAA++;\n\n if (frameSeq.length() < 3)\n break;\n String codon = frameSeq.substring(begin,end); // takes one codon at a time\n\n String letter = lookupCodon(codon);\n \n newSeq.append(letter);\n\n begin +=3;\n end +=3;\n\n if ((end > frameSeq.length())||(begin > frameSeq.length()-1)) // reached end of translational sequence\n break;\n else if (countAA == 50) // format the output 50 chars per line\n {\n newSeq.append(\"<BR>\");\n countAA = 0; // reset counter\n }\n }\n \n // returns the sequence in typewriter font (for standard spacing)\n return (\"<TT>\" + newSeq.toString() + \"</TT>\");\n }",
"public static CharSequence literalReplaceAll(CharSequence pattern, CharSequence replacement, CharSequence in, boolean ignoreCase) {\n if (in.length() < pattern.length()) {\n return in;\n }\n if (pattern.length() == 0) {\n throw new IllegalArgumentException(\"Pattern is the empty string\");\n }\n if (pattern.equals(replacement)) {\n throw new IllegalArgumentException(\"Replacing pattern with itself: \" + pattern);\n }\n int max = in.length();\n StringBuilder result = new StringBuilder(in.length() + replacement.length());\n int patternEnd = pattern.length() - 1;\n int testPos = pattern.length() - 1;\n int lastMatch = -1;\n for (int i = max - 1; i >= 0; i--) {\n char realChar = in.charAt(i);\n char testChar = pattern.charAt(testPos);\n if (ignoreCase) {\n realChar = Character.toLowerCase(realChar);\n testChar = Character.toLowerCase(testChar);\n }\n if (realChar == testChar) {\n testPos--;\n if (lastMatch == -1) {\n lastMatch = i;\n }\n if (testPos < 0) {\n result.insert(0, replacement);\n testPos = patternEnd;\n lastMatch = -1;\n }\n } else {\n if (lastMatch != -1) {\n CharSequence missed = in.subSequence(i, lastMatch + 1);\n result.insert(0, missed);\n lastMatch = -1;\n } else {\n result.insert(0, realChar);\n }\n testPos = patternEnd;\n }\n }\n return result;\n }",
"public void match(ReaderBuffer buffer, TokenMatch match)\n throws IOException {\n\n for (int i = 0; i < regExps.length; i++) {\n int length = regExps[i].match(buffer);\n if (length > 0) {\n match.update(length, patterns[i]);\n }\n }\n }",
"public String replace(String input);",
"private StringBuffer replace(StringBuffer b,String oldPattern,String newPattern) {\r\n int i = 0;\r\n while((i=b.indexOf(oldPattern,i))!=-1) {\r\n b.replace(i,i+oldPattern.length(),newPattern);\r\n i = i+oldPattern.length();\r\n }\r\n return b;\r\n }",
"public void match(ReaderBuffer buffer, TokenMatch match)\n throws IOException {\n TokenPattern res = automaton.match(buffer, ignoreCase);\n\n if (res != null) {\n match.update(res.getPattern().length(), res);\n }\n }",
"public String replaceFrom(CharSequence sequence, CharSequence replacement) {\n/* 150 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public static String parse(String template, Map<String, String> map){\n Matcher matcher = PROCESS_REGEX_PATTERN.matcher(template);\n int count = 0;\n StringBuffer sb = null;\n while(matcher.find()) {\n count++;\n if(sb == null) sb = new StringBuffer();\n String key = (String)matcher.group(1);\n if(map.containsKey(key)){\n matcher.appendReplacement(sb, map.get(key));\n }\n }\n if(count == 0){\n return template;\n } else {\n matcher.appendTail(sb);\n return sb.toString();\n }\n }",
"public static String replaceAllOccurrences(String saInput, String saMatchPattern, String saReplaceString) {\r\n\t\tif ( (null == saInput) || (saInput.indexOf(saMatchPattern) == AppConstants.NEG_ONE) || (null == saMatchPattern) || (saMatchPattern.length() <= 0)) {\r\n\t\t\treturn saInput;\r\n\t\t}\r\n\r\n\t\tString slInput = saInput;\r\n\r\n\t\t// StringBuffer sblTemp = new StringBuffer();\r\n\r\n\t\t// int ilIndex = slInput.indexOf(saMatchPattern);\r\n\r\n\t\tStringBuffer sblTemp = new StringBuffer(slInput);\r\n\t\tint ilIndex = sblTemp.toString().indexOf(saMatchPattern);\r\n\r\n\t\twhile (ilIndex >= 0) {\r\n\t\t\tsblTemp = sblTemp.delete(ilIndex, saMatchPattern.length() + ilIndex);\r\n\t\t\tsblTemp = sblTemp.insert(ilIndex, saReplaceString);\r\n\r\n\t\t\tilIndex = sblTemp.toString().indexOf(saMatchPattern);\r\n\t\t}\r\n\r\n\t\treturn sblTemp.toString();\r\n\t}",
"public String replaceFrom(CharSequence sequence, CharSequence replacement, CountMethod countMethod, UnicodeSet.SpanCondition spanCondition) {\n/* 182 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void applyPattern(String pattern) {\n applyPattern(pattern, false);\n }",
"public String replaceLine(String line) {\n int length = line.length();\n StringBuilder outputString = new StringBuilder();\n matcher = pattern.matcher(line);\n int start = 0;\n int end = 0;\n int range = 0;\n\n while (matcher.find()) {\n start = matcher.start();\n if (start > end) {\n //append characters which do not match\n outputString.append(line.substring(end, start));\n }\n end = matcher.end();\n // calculate the total of searched characters and then apply rules to replace\n range = end - start;\n if (range == 1) {\n //apply RULE 1: single-character\n outputString.append(FIRST_SIGN_CHARACTER);\n } else {\n //apply RULE 2: multi-character\n outputString.append(SEARCH_CHARACTER);\n for (int i = 0; i < range - 1; i++) {\n outputString.append(SECOND_SIGN_CHARACTER);\n }\n }\n }\n if (end < length) {\n outputString.append(line.substring(end, length));\n }\n return outputString.toString();\n }",
"@Override\r\n\tpublic void search(Pattern pattern) {\r\n\t\tregularSearch.setPattern(pattern);\r\n\t\tStringBuffer result = regularSearch.lookAt(new StringBuffer(source\r\n\t\t\t\t.toString()));\r\n\t\tmatchFound(result, source);\r\n\t}",
"protected abstract Regex pattern();",
"public static void replaceAll(File file, String substitute, String substituteReplacement) throws IOException {\r\n log.debug(\"Replace \" + substitute + \" by \" + substituteReplacement);\r\n\r\n Pattern pattern = Pattern.compile(substitute);\r\n\r\n // Open the file and then get a channel from the stream\r\n FileInputStream fis = new FileInputStream(file);\r\n FileChannel fc = fis.getChannel();\r\n\r\n // Get the file's size and then map it into memory\r\n int sz = (int)fc.size();\r\n MappedByteBuffer bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, sz);\r\n\r\n // Decode the file into a char buffer\r\n // Charset and decoder for ISO-8859-15\r\n Charset charset = Charset.forName(\"ISO-8859-15\");\r\n CharsetDecoder decoder = charset.newDecoder();\r\n CharBuffer cb = decoder.decode(bb);\r\n\r\n Matcher matcher = pattern.matcher(cb);\r\n String outString = matcher.replaceAll(substituteReplacement);\r\n log.debug(outString);\r\n\r\n\r\n FileOutputStream fos = new FileOutputStream(file.getAbsolutePath());\r\n PrintStream ps =new PrintStream(fos);\r\n ps.print(outString);\r\n ps.close();\r\n fos.close();\r\n }",
"public void addGenderSubstitution(String find, String replace)\n {\n addSubstitution(this.genderSubstitutions, find, replace);\n }",
"public void replaceSelection(CharSequence replacement) {\n getLock().getWriteLock();\n try {\n replaceRange(replacement, getSelectionStart(), getSelectionEnd());\n } finally {\n getLock().relinquishWriteLock();\n }\n }",
"SearchResult replace(SearchResult result, String replacement);",
"public String replaceFrom(CharSequence sequence, CharSequence replacement, CountMethod countMethod) {\n/* 165 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"private String replaceStr(String src, String oldPattern, \n String newPattern) {\n\n String dst = \"\"; // the new bult up string based on src\n int i; // index of found token\n int last = 0; // last valid non token string data for concat \n boolean done = false; // determines if we're done.\n\n if (src != null) {\n // while we'er not done, try finding and replacing\n while (!done) {\n // search for the pattern...\n i = src.indexOf(oldPattern, last);\n // if it's not found from our last point in the src string....\n if (i == -1) {\n // we're done.\n done = true;\n // if our last point, happens to be before the end of the string\n if (last < src.length()) {\n // concat the rest of the string to our dst string\n dst = dst.concat(src.substring(last, (src.length())));\n }\n } else {\n // we found the pattern\n if (i != last) {\n // if the pattern's not at the very first char of our searching point....\n // we need to concat the text up to that point..\n dst = dst.concat(src.substring(last, i));\n }\n // update our last var to our current found pattern, plus the lenght of the pattern\n last = i + oldPattern.length();\n // concat the new pattern to the dst string\n dst = dst.concat(newPattern);\n }\n }\n } else {\n dst = src;\n }\n // finally, return the new string\n return dst;\n }",
"public static void main(String[] args) {\n\t\n\tString str=\"Hello Deannochka, How are you? How have you been?\";\n\tSystem.out.println(str.replace(\" y\", \" th\"));\n\tSystem.out.println(str.replace(\"Hello\", \"Hey\"));\n//\tSystem.out.println(str.replaceAll(regex, replacement));\n\t\n}",
"private void plantMotifSite(Motif motif, char[] pattern, String bindingsequence, int position, double score, int orientation, RegionSequenceData targetSequence, DNASequenceData dnasequence) {\n // insert DNA sequence into target at selected position\n for (int j=0;j<pattern.length;j++) {\n dnasequence.setValueAtRelativePosition(position+j, pattern[j]);\n }\n // create new region for the TFBS and add it to targetSitesSequence\n Region bindingsite=new Region(targetSequence, position, position+motif.getLength()-1, motif.getName(), score, orientation);\n bindingsite.setProperty(\"sequence\", bindingsequence);\n targetSequence.addRegion(bindingsite); \n }",
"@Test\n public void testSubstitute() {\n System.out.println(\"substitute\");\n StringBuilder sb = new StringBuilder();\n String tag = \"__TAG__\";\n String content = \"aa __TAG__ cc\";\n boolean expResult = false;\n boolean result = ConnectionManager.substitute(sb, tag, content);\n assertEquals(expResult, result);\n }",
"public void applyPattern(final String pat) {\n\t\tthis.pattern = pat;\n\t\tsetLocale(null, null);\n\t\t// reset parsed pattern items\n\t\tpatternItems = null;\n\t}",
"public void replace(int start, int end, String fragment);",
"private static String replaceAll(Matcher matcher, String rep) {\n try {\n StringBuffer sb = null ; // Delay until needed\n while(matcher.find()) {\n if ( sb == null )\n sb = new StringBuffer() ;\n else {\n // Do one match of zerolength string otherwise filter out.\n if (matcher.start() == matcher.end() )\n continue ;\n }\n matcher.appendReplacement(sb, rep);\n }\n if ( sb == null )\n return null ;\n matcher.appendTail(sb);\n return sb.toString();\n } catch (IndexOutOfBoundsException ex) {\n throw new ExprEvalException(\"IndexOutOfBounds\", ex) ;\n }\n }",
"protected String maskFullDomainRandomly(String address, String replacement, int count) {\n return address.substring(0, count + 1) + replacement;\n }",
"private String replaceAll(Matcher matcher, String input, String replacement) {\n // Process substitution string to replace group references with groups\n int cursor = 0;\n StringBuilder result = new StringBuilder();\n\n while (cursor < replacement.length()) {\n char nextChar = replacement.charAt(cursor);\n if (nextChar == '\\\\') {\n cursor++;\n nextChar = replacement.charAt(cursor);\n result.append(nextChar);\n cursor++;\n } else if (nextChar == '$') {\n // Skip past $\n cursor++;\n // The first number is always a group\n int refNum = (int)replacement.charAt(cursor) - '0';\n if ((refNum < 0)||(refNum > 9))\n throw new IllegalArgumentException(\n \"Illegal group reference\");\n cursor++;\n\n // Capture the largest legal group string\n boolean done = false;\n while (!done) {\n if (cursor >= replacement.length()) {\n break;\n }\n int nextDigit = replacement.charAt(cursor) - '0';\n if ((nextDigit < 0)||(nextDigit > 9)) { // not a number\n break;\n }\n int newRefNum = (refNum * 10) + nextDigit;\n if (matcher.groupCount() < newRefNum) {\n done = true;\n } else {\n refNum = newRefNum;\n cursor++;\n }\n }\n // Append group\n if (matcher.group(refNum) != null)\n result.append(matcher.group(refNum));\n } else {\n result.append(nextChar);\n cursor++;\n }\n }\n\n return matcher.replaceAll(result.toString());\n }",
"public void setReplacement(String pReplacement) {\n replacement = pReplacement;\n }",
"public static void main(String[] args) throws Exception {\n String patronA = \"[0-5]\";\n\n // conjunto de letras de \"a\" a \"c\"\n String patronB = \"[a-c]\";\n\n // conjunto de todas las letras minusculas\n String patronC = \"[a-z]\";\n\n // conjunto de numeros\n String patronD = \"[0-9]\";\n\n // ejemplo con tipo de dato string\n String textoAlfanumerico = \"0123aaaa\";\n System.out.println(\"Texto alfanumerico:\" + textoAlfanumerico);\n\n String replace1 = textoAlfanumerico.replaceAll(patronA, \"X\");\n System.out.println(\"Reemplazo de numeros con X: \" + replace1);\n\n String replace2 = textoAlfanumerico.replaceAll(patronB, \"X\");\n System.out.println(\"Reemplazo de letras con X: \" + replace2);\n\n\n //[0-5][a-c];\n //String patronComplejo = patronA + patronB;\n\n //[a-c]*[0-5]*\n //String patronComplejo = patronA + \"*\" + patronB + \"*\";\n\n //\"[a-z]+\"\n\n // + = una coincidencia\n // * = ninguna o muchas\n\n //String patronComplejo = \"(\" + patronA + patronC + \")+\";\n String patronComplejo = \"(\" + patronC + \")+\";\n\n String texto = \"hola, aacc este bbcc es mi 55222aaa texto 2663aaaa blah blah\";\n System.out.println(\"patron complejo:\" + patronComplejo);\n System.out.println(texto);\n\n Pattern pattern = Pattern.compile(patronComplejo);\n Matcher matcher = pattern.matcher(texto);\n\n // buscar ocurrencias\n while (matcher.find()) {\n System.out.println(\"Encontrado:\" + matcher.group());\n }\n\n\n }",
"public void readReplace(String fname, String oldPattern, String replPattern) {\n\t\tString line;\n\n\t\tStringBuffer sb = new StringBuffer();\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(fname);\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\t\tfis));\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tMatcher matcher = Pattern.compile(oldPattern).matcher(line);\n\t\t\t\tif (matcher.find()){\n\t\t\t\t\tmatcher = Pattern.compile(oldPattern).matcher(line);\n\t\t\t\t\tline = matcher.replaceAll(replPattern);\n\t\t\t\t}\n\t\t\t\tsb.append(line + Constants.RETURN);\n\t\t\t}\n\t\t\treader.close();\n\t\t\tBufferedWriter out = new BufferedWriter(new FileWriter(fname));\n\t\t\tout.write(sb.toString());\n\t\t\tout.close();\n\t\t\t// logger.debug(\"Fichero remplazado con exito \" + fname);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(LOG, e);\n\t\t}\n\t}",
"public void addPersonSubstitution(String find, String replace)\n {\n addSubstitution(this.personSubstitutions, find, replace);\n }",
"private String substitution(String s) {\r\n\t\t// System.out.println(\"ExPar.substitution() Substitution for: \" + s);\r\n\t\tint i = s.indexOf(substitutionChar);\r\n\t\tif (i < 0) {\r\n\t\t\treturn (s);\r\n\t\t} else {\r\n\t\t\tStringBuffer t = new StringBuffer();\r\n\t\t\tint i0 = 0;\r\n\t\t\tboolean finished = false;\r\n\t\t\twhile (!finished) {\r\n\t\t\t\t// System.out.println(\" Buffer = \" + t);\r\n\t\t\t\tint i1 = s.indexOf(substitutionChar, i0);\r\n\t\t\t\tif (i1 < 0) {\r\n\t\t\t\t\tt.append(s.substring(i0));\r\n\t\t\t\t\t// System.out.println(\" i1 = \" + i1 + \" Buffer = \" + t);\r\n\t\t\t\t\tfinished = true;\r\n\t\t\t\t} else if ((i1 > i0) && (s.charAt(i1 - 1) == escapeChar)) {\r\n\t\t\t\t\tt.append(s.substring(i0, i1 - 1));\r\n\t\t\t\t\tt.append(substitutionChar);\r\n\t\t\t\t\ti0 = i1 + 1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// found first substitution character\r\n\t\t\t\t\tint i2 = s.indexOf(substitutionChar, i1 + 2);\r\n\t\t\t\t\tif (i2 < 0) {\r\n\t\t\t\t\t\tt.append(s.substring(i0));\r\n\t\t\t\t\t\t// System.out.println(\" i2 = \" + i2 + \" Buffer = \" +\r\n\t\t\t\t\t\t// t);\r\n\t\t\t\t\t\tfinished = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// found second substitution character\r\n\t\t\t\t\t\tif (i0 < i1) {\r\n\t\t\t\t\t\t\tt.append(s.substring(i0, i1));\r\n\t\t\t\t\t\t\t// System.out.println(\" Buffer = \" + t);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// Check for trailing format character\r\n\t\t\t\t\t\tString name = s.substring(i1 + 1, i2);\r\n\t\t\t\t\t\tint n = name.length();\r\n\t\t\t\t\t\tchar fmt = '0';\r\n\t\t\t\t\t\tif ((n > 2) && (name.charAt(n - 2) == formatChar)) {\r\n\t\t\t\t\t\t\tfmt = name.charAt(n - 1);\r\n\t\t\t\t\t\t\tname = name.substring(0, n - 2);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//\r\n\t\t\t\t\t\t// System.out.println(\"ExPar.substitution() Parameter = \"\r\n\t\t\t\t\t\t// + name);\r\n\t\t\t\t\t\tExPar sx = get(name);\r\n\t\t\t\t\t\tif (sx != null) {\r\n\t\t\t\t\t\t\t// Force parameter evaluation\r\n\t\t\t\t\t\t\tExParValue sxv = sx.getValue().getValue();\r\n\t\t\t\t\t\t\t// t.append(sx.getString());\r\n\t\t\t\t\t\t\t// If this is a string then remove the quotes\r\n\t\t\t\t\t\t\tString ss = sxv.toFormattedString(fmt);\r\n\t\t\t\t\t\t\t// System.out.println(\"ExPar.substitution() Value = \"\r\n\t\t\t\t\t\t\t// + ss);\r\n\t\t\t\t\t\t\tif (ss.startsWith(\"\\\"\") && (ss.endsWith(\"\\\"\")))\r\n\t\t\t\t\t\t\t\tss = StringExt.unquote(ss);\r\n\t\t\t\t\t\t\tt.append(ss);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tt.append(s.substring(i1, i2 + 1));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// System.out.println(\" Buffer = \" + t);\r\n\t\t\t\t\t\ti0 = i2 + 1;\r\n\t\t\t\t\t\tfinished = (i0 >= s.length());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn (t.toString());\r\n\t\t}\r\n\t}",
"void replace(int offset, int length, String text) throws BadLocationException;",
"public void setPattern (String pattern) {\n this.pattern = pattern;\n }",
"public PatternBuilderResult build(String specification) throws PatternBuilderException {\n StringBuilder patternStringBuilder = new StringBuilder();\n Matcher captureTokenMatcher = pattern.matcher(specification);\n List<String> locations = new ArrayList<>();\n\n int charLoc = 0;\n while(captureTokenMatcher.find()) {\n String match = captureTokenMatcher.group(1);\n\n String regexReplacement = genRegex(captureTokenMatcher.end(), match, specification);\n String literalReplacement = escapeLiteralRegexChars(specification.substring(charLoc, captureTokenMatcher.start()));\n\n patternStringBuilder\n .append(literalReplacement)\n .append(regexReplacement);\n\n locations.add(match);\n\n charLoc = captureTokenMatcher.end();\n\n\n }\n\n patternStringBuilder\n .append(escapeLiteralRegexChars(specification.substring(charLoc, specification.length())));\n\n return new PatternBuilderResult(\n compilePattern(patternStringBuilder.toString()),\n ensureUniqueIndex(locations));\n\n }",
"public void setPattern(String pattern) {\r\n\t\tthis.pattern = pattern;\r\n\t}",
"String getReplaced();",
"public void addSubstitute(String match, String replace) {\n/* 206 */ if (!this.substitutes.containsKey(match))\n/* */ {\n/* 208 */ this.substitutes.put(match, new ArrayList<String>());\n/* */ }\n/* 210 */ ((List<String>)this.substitutes.get(match)).add(replace);\n/* */ }",
"public void writeToHTML(Match match) {\n ArrayList<String> template = new ArrayList<>();\n ArrayList<String> html = new ArrayList<>();\n ArrayList<Player> roster = new ArrayList<>();\n roster.addAll(match.getRoster().getAllPlayers());\n \n Scanner read = null;\n String fileTemplate = \"template.html\";\n String filePrint = match.getDate().toStringShort() \n + \"_\" + match.getOpponent() + \".html\";\n \n try {\n FileInputStream fileIn = new FileInputStream(fileTemplate);\n read = new Scanner(fileIn);\n }\n catch(FileNotFoundException e) {\n displayErrorMessage(\"File not found\", filePrint);\n }\n while(read.hasNext()) {\n template.add(read.nextLine());\n }\n read.close();\n \n String line = \"\";\n \n for(int i=0; i<template.size(); i++) {\n line = template.get(i);\n \n // Check match for null values\n String date, opponent, start, location, type;\n if(match.getDate().toStringShort().equals(\"0-00-00\")) {\n date = \"\"; \n } else {\n date = match.getDate().toStringShort();\n }\n if(match.getOpponent() == null) {\n opponent = \"\";\n } else {\n opponent = match.getOpponent();\n }\n if(match.getDate().toStringTime().equals(\"00:00\")) {\n start = \"\";\n } else {\n start = match.getDate().toStringTime();\n }\n if(match.getLocation() == null) {\n location = \"\";\n } else {\n location = match.getLocation();\n }\n if(match.getMatchType() == MatchType.none) {\n type = \"\";\n } else {\n type = match.getMatchType().toString();\n }\n \n // Replace values\n if(line.contains(\"$match\")) {\n line = line.replace(\"$match\",\n date + \" - \" + opponent);\n html.add(line);\n } else if(line.contains(\"$start\")) {\n line = line.replace(\"$start\", start);\n html.add(line);\n } else if(line.contains(\"$location\")) {\n line = line.replace(\"$location\", location);\n html.add(line);\n } else if(line.contains(\"$type\")) {\n line = line.replace(\"$type\", type);\n html.add(line);\n } else if(line.contains(\"$number\")) {\n \n // Replace values for each player\n for(int j=0; j<roster.size(); j++) {\n String temp = line;\n Player player = roster.get(j);\n String number, firstName=null, lastName, name=\"\", position;\n \n // Check player for null values\n if(player.getNumber() < 0) {\n number = \"\";\n } else {\n number = Integer.toString(player.getNumber());\n }\n if(player.getLastname() == null) {\n lastName = \"\"; \n } else {\n lastName = player.getLastname();\n name += lastName;\n }\n if(player.getFirstname() == null) {\n firstName = \"\";\n } else {\n firstName = String.valueOf(player.getFirstname().charAt(0));\n if(!(lastName.equals(\"\"))) {\n name += \", \";\n }\n name += firstName + \".\";\n }\n if(player.getPreferredPosition() == PositionType.none) {\n position = \"\";\n } else {\n position = player.getPreferredPosition().toString();\n }\n \n // Replace values in temp line\n temp = temp.replace(\"$number\", number);\n temp = temp.replace(\"$name\", name);\n temp = temp.replace(\"$position\",position);\n \n html.add(temp);\n } \n } else {\n html.add(line);\n }\n }\n PrintWriter write = null;\n try {\n FileOutputStream fileOut = new FileOutputStream(filePrint);\n write = new PrintWriter(fileOut);\n \n for(int i=0; i < html.size(); i++) {\n write.println(html.get(i));\n }\n }\n catch(FileNotFoundException e)\n {\n displayErrorMessage(\"File not found\", filePrint);\n }\n write.close();\n \n Alert printAlert = new Alert(Alert.AlertType.INFORMATION, filePrint + \" is ready for printing\", ButtonType.OK);\n printAlert.setTitle(\"Print Information\");\n printAlert.setHeaderText(null);\n printAlert.showAndWait();\n if(printAlert.getResult() == ButtonType.OK);\n }",
"public void setPattern(Pattern pattern) {\n this.pattern = pattern;\n }",
"@Handler\n private void replace( ReceivePrivmsg event )\n {\n String text = event.getText();\n Matcher sedMatcher = replacePattern.matcher( text );\n\n String nick = event.getSender();\n\n if ( sedMatcher.matches() )\n {\n String correction = \"Correction: \";\n\n /**\n * If the last group of the regex captures a non-null string, the user is fixing another user's message.\n */\n if ( sedMatcher.group( 5 ) != null )\n {\n nick = sedMatcher.group( 5 );\n correction = nick + \", ftfy: \";\n }\n\n if ( lastMessageMapByNick.containsKey( nick ) )\n {\n String regexp = sedMatcher.group( 2 );\n String replacement = sedMatcher.group( 3 );\n String endFlag = sedMatcher.group( 4 );\n\n synchronized ( lastMessageMapByNickMutex )\n {\n String lastMessage = lastMessageMapByNick.get( nick );\n\n if ( !lastMessage.contains( regexp ) )\n {\n event.reply( \"Wow. Seriously? Try subbing out a string that actually occurred. Do you even sed, bro?\" );\n }\n else\n {\n String replacedMsg;\n String replacedMsgWHL;\n\n String replacementWHL = Colors.bold( replacement );\n\n // TODO: Probably can be simplified via method reference in Java 8\n if ( \"g\".equals( endFlag ) )\n {\n replacedMsg = lastMessage.replaceAll( regexp, replacement );\n replacedMsgWHL = lastMessage.replaceAll( regexp, replacementWHL );\n }\n else\n {\n replacedMsg = lastMessage.replaceFirst( regexp, replacement );\n replacedMsgWHL = lastMessage.replaceFirst( regexp, replacementWHL );\n }\n\n event.reply( correction + replacedMsgWHL );\n lastMessageMapByNick.put( nick, replacedMsg );\n }\n }\n }\n }\n else\n {\n synchronized ( lastMessageMapByNickMutex )\n {\n lastMessageMapByNick.put( nick, text );\n }\n }\n }",
"int replaceAll(SearchOptions searchOptions, String replacement);",
"@Override\n\tpublic Expression replacedVar(Map<Variable, Variable> replacement) {\n\t\tList<Tuple<String, Variable>> newVars = new ArrayList<Tuple<String, Variable>>(this.variables);\n\t\tnewVars.replaceAll(itm -> {\n\t\t\tif (itm.second() != null && replacement.containsKey(itm.second())) {\n\t\t\t\treturn new Tuple<String, Variable>(itm.first(), replacement.get(itm.second()));\n\t\t\t}\n\t\t\treturn itm;\n\t\t});\n\t\treturn new Expression(this.desc, newVars);\n\t}",
"private void addSubstitution(Map<String, String> substitutionMap, String find, String replace)\n {\n if (find != null && replace != null)\n {\n substitutionMap.put(find.toUpperCase(), replace);\n } \n }",
"private int matchLiteral(final String text, int pos, final Object[] items, final int itemIndex, final boolean[] complete) {\n\t\tint originalPos = pos;\n\t\tString patternLiteral = (String) items[itemIndex];\n\t\tint plen = patternLiteral.length();\n\t\tint tlen = text.length();\n\t\tint idx = 0;\n\t\twhile (idx < plen && pos < tlen) {\n\t\t\tchar pch = patternLiteral.charAt(idx);\n\t\t\tchar ich = text.charAt(pos);\n\t\t\tif (PatternProps.isWhiteSpace(pch) && PatternProps.isWhiteSpace(ich)) {\n\t\t\t\t// White space characters found in both patten and input.\n\t\t\t\t// Skip contiguous white spaces.\n\t\t\t\twhile ((idx + 1) < plen && PatternProps.isWhiteSpace(patternLiteral.charAt(idx + 1))) {\n\t\t\t\t\t++idx;\n\t\t\t\t}\n\t\t\t\twhile ((pos + 1) < tlen && PatternProps.isWhiteSpace(text.charAt(pos + 1))) {\n\t\t\t\t\t++pos;\n\t\t\t\t}\n\t\t\t} else if (pch != ich) {\n\t\t\t\tif (ich == '.' && pos == originalPos && 0 < itemIndex && isLenient()) {\n\t\t\t\t\tObject before = items[itemIndex - 1];\n\t\t\t\t\tif (before instanceof PatternItem) {\n\t\t\t\t\t\tboolean isNumeric = ((PatternItem) before).isNumeric;\n\t\t\t\t\t\tif (!isNumeric) {\n\t\t\t\t\t\t\t++pos; // just update pos\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t++idx;\n\t\t\t++pos;\n\t\t}\n\t\tcomplete[0] = idx == plen;\n\t\tif (complete[0] == false && isLenient() && 0 < itemIndex && itemIndex < items.length - 1) {\n\t\t\t// If fully lenient, accept \" \"* for any text between a date and a time field\n\t\t\t// We don't go more lenient, because we don't want to accept \"12/31\" for \"12:31\".\n\t\t\t// People may be trying to parse for a date, then for a time.\n\t\t\tif (originalPos < tlen) {\n\t\t\t\tObject before = items[itemIndex - 1];\n\t\t\t\tObject after = items[itemIndex + 1];\n\t\t\t\tif (before instanceof PatternItem && after instanceof PatternItem) {\n\t\t\t\t\tchar beforeType = ((PatternItem) before).type;\n\t\t\t\t\tchar afterType = ((PatternItem) after).type;\n\t\t\t\t\tif (DATE_PATTERN_TYPE.contains(beforeType) != DATE_PATTERN_TYPE.contains(afterType)) {\n\t\t\t\t\t\tint newPos = originalPos;\n\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\tchar ich = text.charAt(newPos);\n\t\t\t\t\t\t\tif (!PatternProps.isWhiteSpace(ich)) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t++newPos;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcomplete[0] = newPos > originalPos;\n\t\t\t\t\t\tpos = newPos;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn pos;\n\t}",
"@Override\n public void highlightPattern(Optional<Pattern> newPattern) {\n update();\n }",
"public static String literalReplaceAll(String pattern, String replacement, String in) {\n return literalReplaceAll(pattern, replacement, in, false).toString();\n }",
"@Test\n public void shouldReplaceSingleWord() throws IOException {\n String searchStr = \"Bacon\";\n\n // replace all occurrences of search word with replacement\n String expected = srcContent.replaceAll(searchStr, replacementStr);\n\n // call main()\n invoke(searchStr);\n\n // read destination file\n String destContent = Files.readString(destFile.toPath());\n\n // does the expected content of the destination file meet the expected.\n assertEquals(expected.trim(),destContent.trim());\n }",
"public void replace(List<TemplItem> template, List<Rope> env) {\n Rope r = new Rope();\n // StringBuilder bases = new StringBuilder();\n // Stack<DNAChunk> r = new Stack<>();\n int ndx;\n int len;\n\n for (TemplItem item : template) {\n switch (item.getType()) {\n case BASE:\n // bases.append((char) item.getValue());\n // r.push(new StringChunk(\"\" + (char) item.getValue()));\n r.concat(new Rope(\"\" + (char) item.getValue()));\n break;\n case PROT:\n // if (bases.length() > 0) {\n // r.add(new StringChunk(bases.toString()));\n // bases = new StringBuilder();\n // }\n ndx = item.getValue();\n if (ndx < env.size()) {\n if (item.getProtLevel() == 0) {\n Rope envRope = env.get(item.getValue());\n r.concat(envRope);\n // r.append(env.get(item.getValue()).substring(0));\n // r.add(env.get(item.getValue()));\n } else {\n Rope envStr = protect(item.getProtLevel(), env.get(item.getValue()).substring(0));\n // System.out.println(\n // \" prot(\" + item.getProtLevel() + \") \" + env.get(item.getValue()).substring(0)\n // + \" => \" + envStr);\n\n r.concat(envStr);\n // r.add(new StringChunk(envStr));\n }\n // if (item.getProtLevel() < 1) {\n // r.add(env.get(item.getValue()));\n // } else {\n // System.out.println(\"Protection level \" + item.getProtLevel());\n // DNAChunk envStr = env.get(item.getValue());\n // String prot = protect(item.getProtLevel(), envStr.substring(0));\n // r.add(new StringChunk(prot));\n // }\n }\n break;\n case LEN:\n // if (bases.length() > 0) {\n // r.add(new StringChunk(bases.toString()));\n // bases = new StringBuilder();\n // }\n ndx = item.getValue();\n if (ndx < env.size()) {\n Rope envStr = env.get(item.getValue()).substring(0);\n len = envStr.getLength();\n } else {\n len = 0;\n }\n // r.add(new StringChunk(asnat(len)));\n r.concat(new Rope(asnat(len)));\n break;\n default:\n throw new RuntimeException(\"replace unhandled template \" + item.getType());\n }\n }\n // if (bases.length() > 0) {\n // r.add(new StringChunk(bases.toString()));\n // }\n\n if (r.getLength() > 0) {\n dna.prepend(r);\n }\n // while (!r.empty()) {\n // DNAChunk chunk = r.pop();\n\n // if (chunk.size() > 10) {\n // System.out.println(\" prepend \" + chunk.substring(0, 10) + \"...\");\n // } else {\n // System.out.println(\" prepend \" + chunk.substring(0));\n // }\n // dna.prepend(chunk);\n // }\n }",
"public static void replaceAll1(){\n System.out.println(\">>>>>>>>>>>>\");\n String class0 = \"this is an example\";\n String ret0 = class0.replaceAll(\"are\", \"ARE\");\n assert(ret0.equals(\"this is an example\"));\n System.out.println(ret0);\n }",
"public static String getTemplate(String template, Pair<String, String>... replacements) {\n String ret = getTemplate(template);\n if (ret != null) {\n for (Pair<String, String> p : replacements) {\n ret = ret.replaceAll(p.fst, p.snd);\n }\n }\n return ret;\n }",
"void setPartialMatch(Match partialMatch);",
"public void setPattern(String pattern)\n/* */ {\n/* 71 */ setPatterns(new String[] { pattern });\n/* */ }",
"public static String replace(String from, String text, int nth) {\r\n\t\t// YOUR CODE HERE\r\n\t\treturn \"\"; // Dummy return\r\n\t}",
"private String DoFindReplace(String line)\n {\n String newLine = line;\n\n for (String findKey : lineFindReplace.keySet())\n {\n String repValue = lineFindReplace.get(findKey).toString();\n\n Pattern findPattern = Pattern.compile(findKey);\n Matcher repMatcher = findPattern.matcher(newLine);\n\n newLine = repMatcher.replaceAll(repValue);\n }\n return(newLine);\n }",
"public String searchAndReplaceTemplate(final Map<String, String> kvPairs,\n final String str) {\n String result = str;\n for (final String key : kvPairs.keySet()) {\n // Search first and avoid constantly rebuilding the string.\n if (result.contains(key)) {\n final String search = key.replaceAll(\"\\\\$\", \"\\\\\\\\\\\\$\");\n result = result.replaceAll(search, kvPairs.get(key));\n }\n }\n return result;\n }",
"public static void main(String[] args) {\n\t\t\r\n\t\tSystem.out.println(\"Plate number exercise\");\r\n\t\tSystem.out.println(\"------------------------------------------------------\");\r\n\t\tString ABC1234aaa = \"ABC1234aaa\";\r\n\t\tSystem.out.println(\"Is ABC1234aaa valid? -- \" + ABC1234aaa.matches(PLATE_NUMBER_FORMAT));\r\n\t\t\r\n\t\tString AB1234DF= \"AB1234DF\";\r\n\t\tSystem.out.println(\"Is AB1234DF valid? -- \" + AB1234DF.matches(PLATE_NUMBER_FORMAT));\r\n\t\t\r\n\t\t\r\n\t\tString AB1234DFG = \"AB1234DFG\";\r\n\t\tSystem.out.println(\"Is AB1234DFG valid? -- \" + AB1234DFG.matches(PLATE_NUMBER_FORMAT));\r\n\r\n\t\tSystem.out.println(\"------------------------------------------------------\");\r\n\t\t\r\n\t\tSystem.out.println(\"Replace All exercise\");\r\n\t\tSystem.out.println(\"------------------------------------------------------\");\r\n\t\t\r\n\t\tString str1 = \"123458\";\r\n\t\t\r\n\t\tSystem.out.println(str1 + \" replace 8 with 'eight' \\t\" +str1.replaceAll(\"8\", EIGHT));\r\n\t\t\r\n\t\tString str2 = \"ABC82348GHIJ8\";\r\n\t\tSystem.out.println(str2 + \" replace 8 with 'eight' \\t\" +str2.replaceAll(\"8\", EIGHT));\r\n\t\t\r\n\t\tSystem.out.println(\"Regular Expression exercise\");\r\n\t\t\r\n\t\tSystem.out.println(\"Count words exercise\");\r\n\t\tSystem.out.println(\"------------------------------------------------------\");\r\n\t\t\r\n\t\tString myString = \"I am currently very hungry.\";\r\n\t\t\r\n\t\tSystem.out.println(\"Word count: \" + myString.split(WORD).length);\r\n\t\t\r\n\t\tSystem.out.println(\"Check area code exercise\");\r\n\t\tSystem.out.println(\"------------------------------------------------------\");\r\n\t\t\r\n\t\tString phone1 = \"651-345-6789\";\r\n\t\tString phone2 = \"641-451-3222\";\r\n\t\tString phone3 = \"231-651-3442\";\r\n\t\t\r\n\t\tSystem.out.println(\"Is phone number: \" + phone1 + \" from IA?\\t\" + phone1.matches(IA_AREA_CODE) );\r\n\t\tSystem.out.println(\"Is phone number: \" + phone2 + \" from IA?\\t\" + phone2.matches(IA_AREA_CODE) );\r\n\t\tSystem.out.println(\"Is phone number: \" + phone3 + \" from IA?\\t\" + phone3.matches(IA_AREA_CODE) );\r\n\t\t\r\n\t\tSystem.out.println(\"Email address format checker\");\r\n\t\tSystem.out.println(\"------------------------------------------------------\");\r\n\t\t\r\n\t\tString email1 = \"[email protected]\";\r\n\t\tString email2 = \"[email protected]\";\r\n\t\tString email3 = \"abc.def*gmail.com\";\r\n\t\t\r\n\t\tSystem.out.println(\"Is email address: \" + email1 + \" valid?\\t\" + email1.matches(EMAIL_ADDRESS_FORMAT));\r\n\t\tSystem.out.println(\"Is email address: \" + email2 + \" valid?\\t\" + email2.matches(EMAIL_ADDRESS_FORMAT));\r\n\t\tSystem.out.println(\"Is email address: \" + email3 + \" valid?\\t\" + email3.matches(EMAIL_ADDRESS_FORMAT));\r\n\t\t\r\n\t\tSystem.out.println(\"======================================================\\n\");\r\n\t\tSystem.out.println(\"Using Pattern and Matcher Classes\");\r\n\t\t\r\n\t\tMatcher matcher;\r\n\t\tPattern pattern = Pattern.compile(PLATE_NUMBER_FORMAT);\r\n\t\t\r\n\t\tmatcher = pattern.matcher(ABC1234aaa);\r\n\t\tSystem.out.println(\"Is ABC1234aaa valid? -- \" + matcher.matches());\r\n\t\t\r\n\t\tmatcher = pattern.matcher(AB1234DF);\r\n\t\tSystem.out.println(\"Is AB1234DF valid? -- \" + matcher.matches());\r\n\t\t\r\n\t\tmatcher = pattern.matcher(AB1234DFG);\r\n\t\tSystem.out.println(\"Is AB1234DFG valid? -- \" + matcher.matches());\r\n\t\t\r\n\t\tSystem.out.println(\"======================================================\");\r\n\t\tpattern = Pattern.compile(\"8\");\r\n\t\tmatcher = pattern.matcher(str1);\r\n\t\t\r\n\t\tSystem.out.println(str1 + \" replace 8 with 'eight' \\t\" +matcher.replaceAll(EIGHT));\r\n\t\t\r\n\t\tmatcher = pattern.matcher(str2);\r\n\t\tSystem.out.println(str2 + \" replace 8 with 'eight' \\t\" +matcher.replaceAll(EIGHT));\r\n\t\t\r\n\t\t\r\n\t}",
"public void replace(int offset, String str, AttributeSet attr) \r\n throws BadLocationException{\n String strFinal=str;\r\n if (notRepeat != null){\r\n String txt= super.getText(0, super.getLength());\r\n JOptionPane.showMessageDialog(null, txt);\r\n if ((txt.contains(notRepeat)) && (str.contains(notRepeat))){\r\n strFinal= str.replaceAll(\"[\"+notRepeat+\"]\", \"\");\r\n }\r\n }\r\n super.insertString(offset, strFinal.replaceAll(teclas, \"\"), attr);\r\n }",
"void solution() {\n\t\t/* Write a RegEx matching repeated words here. */\n\t\tString regex = \"(?i)\\\\b([a-z]+)\\\\b(?:\\\\s+\\\\1\\\\b)+\";\n\t\t/* Insert the correct Pattern flag here. */\n\t\tPattern p = Pattern.compile(regex, Pattern.CASE_INSENSITIVE);\n\n\t\tString[] in = { \"I love Love to To tO code\", \"Goodbye bye bye world world world\",\n\t\t\t\t\"Sam went went to to to his business\", \"Reya is is the the best player in eye eye game\", \"in inthe\",\n\t\t\t\t\"Hello hello Ab aB\" };\n\t\tfor (String input : in) {\n\t\t\tMatcher m = p.matcher(input);\n\n\t\t\t// Check for subsequences of input that match the compiled pattern\n\t\t\twhile (m.find()) {\n\t\t\t\t// /* The regex to replace */, /* The replacement. */\n\t\t\t\tinput = input.replaceAll(m.group(), m.group(1));\n\t\t\t}\n\n\t\t\t// Prints the modified sentence.\n\t\t\tSystem.out.println(input);\n\t\t}\n\n\t}",
"private void createIpat(Code32 code, int pat) {\r\n\t\tcode.instructions[code.iCount] = pat;\r\n\t\tcode.incInstructionNum();\r\n\t}",
"public String rep(String str, String reg_ex, String rep) {\n Pattern p;\n Matcher m;\n StringBuffer sb;\n\n str = repNull(str);\n p = Pattern.compile(reg_ex);\n m = p.matcher(str);\n sb = new StringBuffer();\n\n while (m.find()) {\n m.appendReplacement(sb, rep);\n }\n\n m.appendTail(sb);\n\n str = sb.toString();\n\n return str;\n }",
"Pattern getTagPattern();",
"public NaiveStringMatcher(String pattern) {\n super(pattern);\n }",
"private String replaceVariable(String statement) {\r\n String pattern = \"\\\\$\\\\{(.+?)\\\\}\";\r\n Pattern p = Pattern.compile(pattern);\r\n Matcher m = p.matcher(statement);\r\n StringBuffer sb = new StringBuffer();\r\n while (m.find()) {\r\n String key = m.group(1);\r\n String value = this.getSqlFragment(key);\r\n m.appendReplacement(sb, \"\");\r\n sb.append(value == null ? \"\" : value);\r\n }\r\n m.appendTail(sb);\r\n return sb.toString();\r\n }",
"public IPv4Address replace(int startIndex, int endIndex, IPv4Address replacement, int replacementIndex) {\n\t\treturn checkIdentity(getSection().replace(startIndex, endIndex, replacement.getSection(), replacementIndex, replacementIndex + (endIndex - startIndex)));\n\t}",
"public void addPerson2Substitution(String find, String replace)\n {\n addSubstitution(this.person2Substitutions, find, replace);\n }",
"void setCompleteMatch(Match completeMatch);",
"private String matchGap(String expression) {\n\n\t\tString replaceText = null;\n\t\tint index = expression.indexOf(\":\");\n\t\tif (index > 0) {\n\t\t\tString value = expression.substring(0, index).trim();\n\t\t\tString answer = expression.substring(index + 1).trim();\n\t\t\tString id = baseId + \"-\" + idCounter;\n\t\t\tidCounter++;\n\t\t\treplaceText = \"<input id='\" + id + \"' type='edit' data-gap='editable' data-gap-value='\\\\gap{\" + answer + \"}' size='\"\n\t\t\t\t\t+ answer.length() + \"' class='ic_gap'\" + (editorMode ? \"readonly\" : \"\") + \"/>\";\n\n\t\t\tGapInfo gi = new GapInfo(id, Integer.parseInt(value),\n\t\t\t\t\tisCaseSensitive, isIgnorePunctuation, gapMaxLength);\n\t\t\tString[] answers = answer.split(\"\\\\|\");\n\t\t\tfor (int i = 0; i < answers.length; i++) {\n\n\t\t\t\tgi.addAnswer(answers[i]);\n\t\t\t}\n\t\t\tparserResult.gapInfos.add(gi);\n\t\t}\n\n\t\treturn replaceText;\n\t}",
"public void replace(int start, int limit, char srcChar, AttributeMap charStyle) {\r\n checkStartLimit(start, limit);\r\n\r\n updateDamagedRange(start, limit, 1);\r\n\r\n fCharBuffer.replace(start, limit, srcChar);\r\n\r\n replaceCharStylesWith(start, limit, start + 1, charStyle);\r\n\r\n if (start < limit) {\r\n fParagraphBuffer.deleteText(start, limit, fDamagedRange);\r\n }\r\n\r\n fParagraphBuffer.insertText(start, srcChar);\r\n\r\n fTimeStamp += 1;\r\n }",
"String replaceStringIgnoreCase(String text, final String pattern,\r\n\t\t\tfinal String replace)\r\n\t{\r\n\t\tint startIndex = 0;\r\n\t\tint foundIndex;\r\n\t\tStringBuffer result = new StringBuffer();\r\n\r\n\t\t// Look for a pattern to replace\r\n\t\twhile ((foundIndex = text.toLowerCase().indexOf(pattern.toLowerCase(),\r\n\t\t\t\tstartIndex)) >= 0) {\r\n\t\t\tresult.append(text.substring(startIndex, foundIndex));\r\n\t\t\tresult.append(replace);\r\n\t\t\tstartIndex = foundIndex + pattern.length();\r\n\t\t}\r\n\t\tresult.append(text.substring(startIndex));\r\n\t\treturn result.toString();\r\n\t}",
"public static String replaceEach(String text, String[] searchList,\n String[] replacementList, boolean repeat, int timeToLive) {\n\n if (text == null || text.length() == 0 || searchList == null\n || searchList.length == 0 || replacementList == null\n || replacementList.length == 0) {\n return text;\n }\n\n // if recursing, this shouldnt be less than 0\n if (timeToLive < 0) {\n throw new IllegalStateException(\"TimeToLive of \" + timeToLive\n + \" is less than 0: \" + text);\n }\n\n int searchLength = searchList.length;\n int replacementLength = replacementList.length;\n\n // make sure lengths are ok, these need to be equal\n if (searchLength != replacementLength) {\n throw new IllegalArgumentException(\n \"Search and Replace array lengths don't match: \" + searchLength\n + \" vs \" + replacementLength);\n }\n\n // keep track of which still have matches\n boolean[] noMoreMatchesForReplIndex = new boolean[searchLength];\n\n // index on index that the match was found\n int textIndex = -1;\n int replaceIndex = -1;\n int tempIndex = -1;\n\n // index of replace array that will replace the search string found\n // NOTE: logic duplicated below START\n for (int i = 0; i < searchLength; i++) {\n if (noMoreMatchesForReplIndex[i] || searchList[i] == null\n || searchList[i].length() == 0 || replacementList[i] == null) {\n continue;\n }\n tempIndex = text.indexOf(searchList[i]);\n\n // see if we need to keep searching for this\n if (tempIndex == -1) {\n noMoreMatchesForReplIndex[i] = true;\n } else {\n if (textIndex == -1 || tempIndex < textIndex) {\n textIndex = tempIndex;\n replaceIndex = i;\n }\n }\n }\n // NOTE: logic mostly below END\n\n // no search strings found, we are done\n if (textIndex == -1) {\n return text;\n }\n\n int start = 0;\n\n // get a good guess on the size of the result buffer so it doesnt have to\n // double if it goes over a bit\n int increase = 0;\n\n // count the replacement text elements that are larger than their\n // corresponding text being replaced\n for (int i = 0; i < searchList.length; i++) {\n if (searchList[i] == null || replacementList[i] == null) {\n continue;\n }\n int greater = replacementList[i].length() - searchList[i].length();\n if (greater > 0) {\n increase += 3 * greater; // assume 3 matches\n }\n }\n // have upper-bound at 20% increase, then let Java take over\n increase = Math.min(increase, text.length() / 5);\n\n StringBuffer buf = new StringBuffer(text.length() + increase);\n\n while (textIndex != -1) {\n\n for (int i = start; i < textIndex; i++) {\n buf.append(text.charAt(i));\n }\n buf.append(replacementList[replaceIndex]);\n\n start = textIndex + searchList[replaceIndex].length();\n\n textIndex = -1;\n replaceIndex = -1;\n tempIndex = -1;\n // find the next earliest match\n // NOTE: logic mostly duplicated above START\n for (int i = 0; i < searchLength; i++) {\n if (noMoreMatchesForReplIndex[i] || searchList[i] == null\n || searchList[i].length() == 0 || replacementList[i] == null) {\n continue;\n }\n tempIndex = text.indexOf(searchList[i], start);\n\n // see if we need to keep searching for this\n if (tempIndex == -1) {\n noMoreMatchesForReplIndex[i] = true;\n } else {\n if (textIndex == -1 || tempIndex < textIndex) {\n textIndex = tempIndex;\n replaceIndex = i;\n }\n }\n }\n // NOTE: logic duplicated above END\n\n }\n int textLength = text.length();\n for (int i = start; i < textLength; i++) {\n buf.append(text.charAt(i));\n }\n String result = buf.toString();\n if (!repeat) {\n return result;\n }\n\n return replaceEach(result, searchList, replacementList, repeat,\n timeToLive - 1);\n }",
"public ModifyingWriter createRegexModifyingWriter(Writer output, String regex, int flags, String replacement,\r\n int minimumLengthOfLookBehind, int requestedCapacityOfCharacterBuffer) {\n if (!(output instanceof BufferedWriter)) {\r\n output = new BufferedWriter(output);\r\n }\r\n\r\n // create modifier\r\n Modifier modifier = new RegexModifier(regex, flags, replacement, minimumLengthOfLookBehind,\r\n requestedCapacityOfCharacterBuffer);\r\n\r\n // create and return Writer\r\n return new ModifyingWriter(output, modifier);\r\n }",
"private String translatePattern(final String pat, final String from, final String to) {\n\t\tStringBuilder result = new StringBuilder();\n\t\tboolean inQuote = false;\n\t\tfor (int i = 0; i < pat.length(); ++i) {\n\t\t\tchar c = pat.charAt(i);\n\t\t\tif (inQuote) {\n\t\t\t\tif (c == '\\'')\n\t\t\t\t\tinQuote = false;\n\t\t\t} else {\n\t\t\t\tif (c == '\\'') {\n\t\t\t\t\tinQuote = true;\n\t\t\t\t} else if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) {\n\t\t\t\t\tint ci = from.indexOf(c);\n\t\t\t\t\tif (ci != -1) {\n\t\t\t\t\t\tc = to.charAt(ci);\n\t\t\t\t\t}\n\t\t\t\t\t// do not worry on translatepattern if the character is not listed\n\t\t\t\t\t// we do the validity check elsewhere\n\t\t\t\t}\n\t\t\t}\n\t\t\tresult.append(c);\n\t\t}\n\t\tif (inQuote) {\n\t\t\tthrow new IllegalArgumentException(\"Unfinished quote in pattern\");\n\t\t}\n\t\treturn result.toString();\n\t}",
"public void caseARegExp(ARegExp node)\n {\n Iterator<PConcat> iter = node.getConcats().iterator();\n iter.next().apply(this);\n\n // further PConcat nodes are unioned (| operator) together\n while (iter.hasNext()) {\n buffer.append('|');\n iter.next().apply(this);\n }\n }",
"private String findReplace(String str, String find, String replace)\n/* */ {\n/* 944 */ String des = new String();\n/* 945 */ while (str.indexOf(find) != -1) {\n/* 946 */ des = des + str.substring(0, str.indexOf(find));\n/* 947 */ des = des + replace;\n/* 948 */ str = str.substring(str.indexOf(find) + find.length());\n/* */ }\n/* 950 */ des = des + str;\n/* 951 */ return des;\n/* */ }",
"Match createMatch();",
"private void compilePattern() {\r\n\r\n pattern_startOfPage = Pattern.compile(regex_startOfPage);\r\n pattern_headerAttribute = Pattern.compile(regex_headerAttribute);\r\n pattern_messageFirstLine = Pattern.compile(regex_messageFirstLine);\r\n pattern_messageContinuationLine = Pattern.compile(regex_messageContinuationLine);\r\n }",
"public static String parseMarkupCodes(String format) {\r\n for (Map.Entry<String, String> entry : markupReplaceMap.entrySet()) {\r\n format = format.replace(entry.getKey(), entry.getValue());\r\n }\r\n return format;\r\n }",
"boolean matched(int index, String pattern, T value);",
"public static String replacePlaceHolderOfTemplate(String templateString, String... arguments) {\n\t\tif (AppUtils.isBlank(arguments)) {\n\t\t\treturn null;\n\t\t}\n\t\tStringBuilder result = new StringBuilder(templateString);\n\t\tfor (int i = 0; i < arguments.length; i++) {\n\t\t\tStringConverter.replacePlaceHolderOfTemplate(result, \"{\" + i + \"}\", arguments[i]);\n\t\t}\n\t\treturn result.toString();\n\t}",
"public void addPattern(TokenPattern pattern) throws Exception {\n if (pattern.getType() == TokenPattern.STRING_TYPE) {\n automaton.addTextMatch(pattern.getPattern(), ignoreCase, pattern);\n } else {\n automaton.addRegExpMatch(pattern.getPattern(), ignoreCase, pattern);\n }\n super.addPattern(pattern);\n }",
"public String getAssembledAndReplaced(Statement statement) {\n\t\treturn this.strat.getReplacer()\n\t\t\t\t\t.apply(statement, \n\t\t\t\t\t\t this.assemble(statement));\n\t}",
"public void test() {\r\n PropertiesSubstitutor ps = new PropertiesSubstitutor(MockParametersCallbacks.NAME);\r\n\r\n char[] fillC = new char[1000];\r\n Arrays.fill(fillC, '-');\r\n String fill = new String(fillC);\r\n\r\n String line = \"Text ${subst1} $subst2 \" + fill + \":$end //\";\r\n String exp = \"Text subst1 subst2 \" + fill + \":end //\";\r\n\r\n for (int i = 0; i < 100000; i++) {\r\n String s = ps.substitute(line);\r\n assertEquals(exp, s);\r\n }\r\n }",
"protected abstract boolean replace(String string, Writer w, Status status) throws IOException;",
"public void match(ReaderBuffer buffer, TokenMatch match)\n throws IOException {\n automaton.match(buffer, match);\n }",
"private String findReplace(String str, String find, String replace)\n/* */ {\n/* 938 */ String des = new String();\n/* 939 */ while (str.indexOf(find) != -1) {\n/* 940 */ des = des + str.substring(0, str.indexOf(find));\n/* 941 */ des = des + replace;\n/* 942 */ str = str.substring(str.indexOf(find) + find.length());\n/* */ }\n/* 944 */ des = des + str;\n/* 945 */ return des;\n/* */ }",
"@Override\n\tpublic void fillCmd(DNSCmd cmd) {\n\t\tAssert.isTrue(startNum <= endNum);\n\n\t\tfor (int i = startNum; i < endNum; i++) {\n\t\t\tString record;\n\t\t\trecord = template.replaceAll(\"\\\\$\", new Integer(i).toString());\n\t\t\t\n\t\t\tDNSRecord newRecord;\n\t\t\t\n\t\t}\n\t}",
"@Test\n public void shouldReplaceNoWords() throws IOException {\n String searchStr = \"spinach\";\n\n // replace all occurrences of search word with replacement\n String expected = srcContent.replaceAll(searchStr, replacementStr);\n\n // call main()\n invoke(searchStr);\n\n // read destination file\n String destContent = Files.readString(destFile.toPath());\n\n // does the expected content of the destination file meet the expected.\n assertEquals(expected.trim(),destContent.trim());\n }",
"public void addPattern(String pattern, Handler<Match> handler) {\n Matcher m = Pattern.compile(\":([A-Za-z][A-Za-z0-9]*)\").matcher(pattern);\n StringBuffer sb = new StringBuffer();\n Set<String> groups = new HashSet<>();\n while (m.find()) {\n String group = m.group().substring(1);\n if (groups.contains(group)) {\n throw new IllegalArgumentException(\"Cannot use identifier \" + group + \" more than once in pattern string\");\n }\n m.appendReplacement(sb, \"(?<$1>[^\\\\/]+)\");\n groups.add(group);\n }\n m.appendTail(sb);\n String regex = sb.toString();\n PatternBinding binding = new PatternBinding(Pattern.compile(regex), groups, handler);\n bindings.add(binding);\n }",
"public ResolvedTemplate(Template template){\n\t\tthis.template = template;\n\t\tthis.postParseReplacement = \"\";\n\t\tcheckPreParseReplacement();\n\t}",
"public static void matchMaker()\n {\n \n }",
"public String substitute(String message, Map<String, String> replacings)\n {\n for (Map.Entry<String, String> entry : replacings.entrySet()) {\n if (message.contains(entry.getKey())) {\n message = message.replaceAll(entry.getKey(), entry.getValue());\n }\n }\n return message;\n }",
"public String replace(String word)\n {\n int flags = 0;\n if (ignoreCase)\n {\n flags = flags | Pattern.CASE_INSENSITIVE;\n }\n return Pattern.compile(pattern, flags).matcher(word).replaceAll(replacement);\n }",
"public void select(String pattern) {\n RTGraphComponent.RenderContext myrc = (RTGraphComponent.RenderContext) getRTComponent().rc; if (myrc == null) return;\n if (pattern == null || pattern.length()==0) return;\n // Extract the set operation first\n char first = pattern.charAt(0); boolean invert = false;\n if (first == '!') { pattern = pattern.substring(1,pattern.length()); invert = true; }\n first = pattern.charAt(0); \n if (first == '*' || first == '-' || first == '+') pattern = pattern.substring(1,pattern.length());\n\n // Get the various sets...\n Set<String> matched_entities = new HashSet<String>(), \n all_entities = new HashSet<String>(), \n already_selected_entities = myrc.filterEntities(getRTParent().getSelectedEntities());\n if (already_selected_entities == null) already_selected_entities = new HashSet<String>();\n\n if (Utils.isIPv4CIDR(pattern)) {\n Iterator<String> it = myrc.visible_entities.iterator();\n while (it.hasNext()) {\n String str = it.next(); String orig_str = str; if (str.indexOf(BundlesDT.DELIM) >= 0) str = str.substring(str.lastIndexOf(BundlesDT.DELIM)+1,str.length());\n if (Utils.isIPv4(str) && Utils.ipMatchesCIDR(str,pattern)) matched_entities.add(orig_str);\n }\n } else if (Utils.isIPv4(pattern)) {\n Iterator<String> it = myrc.visible_entities.iterator();\n while (it.hasNext()) {\n String str = it.next(); String orig_str = str; if (str.indexOf(BundlesDT.DELIM) >= 0) str = str.substring(str.lastIndexOf(BundlesDT.DELIM)+1,str.length());\n\tif (str.equals(pattern)) matched_entities.add(orig_str);\n }\n } else if (pattern.startsWith(\"tag\" + BundlesDT.DELIM)) {\n Set<String> tagged_entities = getRTParent().getEntitiesWithTag(pattern.substring(4,pattern.length()));\n if (tagged_entities.size() < myrc.visible_entities.size()) {\n Iterator<String> it = tagged_entities.iterator();\n while (it.hasNext()) {\n String entity = it.next();\n if (myrc.visible_entities.contains(entity)) matched_entities.add(entity);\n }\n } else {\n Iterator<String> it = myrc.visible_entities.iterator();\n while (it.hasNext()) {\n String entity = it.next();\n if (tagged_entities.contains(entity)) matched_entities.add(entity);\n }\n }\n } else if (pattern.startsWith(\"REGEX:\")) {\n Pattern regex = Pattern.compile(pattern.substring(6));\n Iterator<String> it = myrc.visible_entities.iterator();\n while (it.hasNext()) {\n String entity = it.next();\n\tif (regex.matcher(entity).matches()) matched_entities.add(entity);\n }\n } else {\n Iterator<String> it = myrc.visible_entities.iterator();\n while (it.hasNext()) {\n String str = it.next(); if (str.toLowerCase().indexOf(pattern.toLowerCase()) >= 0) matched_entities.add(str);\n }\n }\n\n // Apply the set operation\n if (invert) { \n all_entities.removeAll(matched_entities);\n if (first == '*') { Set<String> set = new HashSet<String>();\n Iterator<String> it = all_entities.iterator();\n while (it.hasNext()) { \n String str = it.next(); \n if (already_selected_entities.contains(str)) \n set.add(str); \n }\n getRTParent().setSelectedEntities(set);\n } else if (first == '-') { already_selected_entities.removeAll(all_entities); getRTParent().setSelectedEntities(already_selected_entities);\n } else if (first == '+') { already_selected_entities.addAll(all_entities); getRTParent().setSelectedEntities(already_selected_entities);\n } else { getRTParent().setSelectedEntities(all_entities); }\n } else if (first == '*') { Set<String> set = new HashSet<String>();\n Iterator<String> it = matched_entities.iterator();\n while (it.hasNext()) { \n String str = it.next(); \n if (already_selected_entities.contains(str)) \n set.add(str); \n }\n getRTParent().setSelectedEntities(set);\n } else if (first == '-') { already_selected_entities.removeAll(matched_entities); getRTParent().setSelectedEntities(already_selected_entities);\n } else if (first == '+') { already_selected_entities.addAll(matched_entities); getRTParent().setSelectedEntities(already_selected_entities);\n } else { getRTParent().setSelectedEntities(matched_entities); }\n }",
"public WildcardPattern(String pattern) {\r\n this.pattern = pattern;\r\n }"
] |
[
"0.57652164",
"0.53937465",
"0.53189266",
"0.52744085",
"0.5178705",
"0.5154873",
"0.5095691",
"0.508364",
"0.50565755",
"0.5053754",
"0.4998329",
"0.49891645",
"0.49816415",
"0.49671528",
"0.49577072",
"0.49569076",
"0.49290007",
"0.49093992",
"0.490912",
"0.48966935",
"0.48935613",
"0.48928115",
"0.488341",
"0.48595306",
"0.48505852",
"0.4847711",
"0.48401135",
"0.4835175",
"0.48323414",
"0.4802097",
"0.48002535",
"0.47929206",
"0.47902292",
"0.47808862",
"0.4742293",
"0.47279108",
"0.471772",
"0.4713563",
"0.47120735",
"0.4701381",
"0.4699124",
"0.46917745",
"0.46847233",
"0.46785268",
"0.46623576",
"0.46615598",
"0.46316585",
"0.4628458",
"0.4627719",
"0.4619043",
"0.46186686",
"0.46075383",
"0.46053532",
"0.46014282",
"0.4591261",
"0.45862973",
"0.4581636",
"0.45337307",
"0.45151305",
"0.45113152",
"0.44941965",
"0.4492109",
"0.44882548",
"0.44850618",
"0.44802794",
"0.4470265",
"0.44687968",
"0.44612002",
"0.44554037",
"0.44531116",
"0.44498345",
"0.44449884",
"0.442971",
"0.44291487",
"0.4424338",
"0.442067",
"0.44127664",
"0.4407056",
"0.44050378",
"0.4398025",
"0.4391373",
"0.4390353",
"0.438836",
"0.4381083",
"0.43751532",
"0.43730882",
"0.43609998",
"0.4340773",
"0.4339106",
"0.4338698",
"0.43377072",
"0.43312308",
"0.4324715",
"0.43201575",
"0.43201217",
"0.43101385",
"0.4310083",
"0.4304898",
"0.4304517",
"0.43036285"
] |
0.6951433
|
0
|
Finish processing. Write the RNA to a file and exit, per the docs
|
public void finish() {
if (rnaFile != null) {
try {
FileWriter writer = new FileWriter(rnaFile);
writer.write(rna.toString());
writer.close();
} catch (Exception ex) {
ex.printStackTrace();
}
}
System.exit(0);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void finishFile() {\n\t\twriter.println();\n\t\twriter.println(\"; wait for any key press:\");\n\t\twriter.println(\"mov ah, 0\");\n\t\twriter.println(\"int 16h\");\n\t\twriter.println();\n\t\twriter.println(\"ret\");\n\t}",
"public void finish() throws IOException {\n\t\tthis.writeEOFRecord();\n\t\t}",
"public void onFinish() {\n \t\tmdrFile.write();\n \n \t\t// Close everything\n \t\tfor (Closeable file : toClose)\n \t\t\tUtils.closeFile(file);\n \t}",
"public static void endWrite()\r\n\t{\r\n\t\r\n\t}",
"public void endFlatFile() {\n }",
"private void onFinish() {\r\n\t\t//used for create end html tags\r\n\t\tendHtmlPage(fout);\r\n\r\n\t\t//used for write every thing in html file\r\n\t\tfout.flush();\r\n\t\tfout.close();\r\n\t\t\r\n\t}",
"public void finish() throws IOException;",
"public void endGame(){\r\n\t\tupdateRecord();\r\n\t\tgameStats.writeToFile();\r\n\t\tstatisticsList = gameStats.makeArrayList();\r\n\t\tgameStats.writeListToFile(statisticsList);\r\n\t}",
"boolean fileEnd();",
"public void close(){\n\t\ttry {\n\t\t\tout.close();\n\t\t\tout = null;\n\t\t}\n\t\tcatch (IOException e){\n\t\t\tSystem.out.println(\"Problem closing file.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"public void endDocument()\r\n\t{\r\n\t /* marc_out.add(\"=008 \" + running_date + \"s\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\dcu\\\\\\\\\\\\\\\\\\\\sbm\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" + language + \"\\\\d\"); */ /** 008/24-27: biblio+thesis codes **/\r\n\t marc_out.add(\"=008 \" + running_date + \"s\" + comp_date + \"\\\\\\\\\\\\\\\\dcu\\\\\\\\\\\\\\\\\\\\obm\\\\\\\\\\\\000\\\\0\\\\\" + language + \"\\\\d\"); /** 008/24-27: biblio+thesis codes **/\r\n\t marc_out.add(\"=264 30$a[Washington, D. C.] :$bGeorge Washington University,$c\" + comp_date + \".\"); /** 20130430: rev 260*/\r\n\t}",
"@Override\r\n public boolean close() {\r\n\r\n if (clearOutputFolder) {\r\n if (!args.hasValue(LaraiKeys.OUTPUT_FOLDER)) {\r\n KadabraLog.warning(\"No output folder defined, skipping cleaning\");\r\n } else {\r\n try {\r\n FileUtils.cleanDirectory(outputDir);\r\n } catch (final IOException e) {\r\n KadabraLog.warning(\"Output folder could not be cleaned before code generation: \" + e.getMessage());\r\n }\r\n }\r\n\r\n }\r\n\r\n if (args.get(JavaWeaverKeys.WRITE_CODE)) {\r\n if (prettyPrint) {\r\n spoon.prettyprint();\r\n spoon = newSpoon(Arrays.asList(temp), outputDir);\r\n // spoon.getEnvironment().setNoClasspath(true);\r\n // spoon.getEnvironment().setNoClasspath(false);\r\n buildAndProcess();\r\n spoon.prettyprint();\r\n } else {\r\n // System.out.println(\"PRESERVE? \" + spoon.getEnvironment().isPreserveLineNumbers());\r\n spoon.prettyprint();\r\n }\r\n }\r\n\r\n // Write XML files\r\n jApp.getAndroidResources().write(outputDir);\r\n\r\n // writeCode(temp, outputDir, true);\r\n\r\n if (reportGear.isActive()) {\r\n\r\n KadabraLog.info(\"REPORT: \");\r\n KadabraLog.info(\"Advised Join Points: \" + reportGear.getAdvisedJoinPoints().size());\r\n }\r\n return true;\r\n }",
"public void finalize()\n\t{\n\t\tif (!isClosed) {\n\t\t\t// System.out.println(\"SimWriter: finalize() - writing closing bracket to file...\");\n\t\t\twList.writeToFile(\"\\n ]\", 0);\n\t\t\tisClosed = true;\n\t\t}\n\t\t//System.out.println(\"SimWriter: finalize() done\");\n\t}",
"String endFile();",
"public void searchFinished(Search search)\r\n {\r\n if (this.filename.equals(\"\"))\r\n return;\r\n this.writeTrace();\r\n }",
"@Override\n\t\tpublic void finishIteration() {\n\t\t\trailroad.save();\n\t\t\tSystem.out.println(\"SAVING!\");\n\t\t\tsuper.finishIteration();\n\t\t}",
"public void closeFile() throws IOException{\r\n\t\toutRCVictim.close();\r\n\t\tf[0][0].close();\r\n\t\t\r\n\t}",
"protected void end() {\n \tRobot.telemetry.setAutonomousStatus(\"Finishing \" + commandName + \": \" + distance);\n Robot.driveDistancePID.disable();\n \tRobot.drivetrain.arcadeDrive(0.0, 0.0);\n }",
"public void finish() {\n printReport();\n printGlobalOpsPerSec();\n }",
"public void complete() throws JournalException {\n try {\n // NOTE: The extending class should be able to handle the case of\n // a failure before we can write this complete marker, logging a\n // file version is probably the sanest way of doing so (if the version\n // of the file we were modifying has changed from the journal entry\n // we must've completed the op, but not written to the log).\n log.write(COMPLETE_TOKEN + \"\\n\");\n } catch (IOException e) {\n throw new JournalException(\"Failed to write completion to journal.\");\n }\n\n // garbage collect\n if (pendingOps.isEmpty()) {\n // we want to empty the file, but keep it around\n try {\n this.log = this.node.getWriter(this.filename, false);\n } catch (IOException e) {\n throw new JournalException(\"Failed to garbage collect log file.\");\n }\n }\n }",
"public void finish() throws IOException {\n // Default implementation does nothing.\n }",
"public void endTime() throws IOException {\n\t\t\t long finish = System.currentTimeMillis();\n\t\t\t \n\t\t\t// Cleaning:\n\t\t\t fileCleaner(\"match.log\");\n\t\t\t fileCleaner(\"max.log\");\n\t\t\t fileCleaner(\"order.log\");\n\t\t\t fileCleaner(\"xml.log\");\n\t\t\t fileCleaner(\"error.log\");\n\t\t\t fileCleaner(\"reason.log\");\n\t\t\t fileCleaner(\"finish.time\");\n\t\t\t \n\t\t\t fileWriter(\"finish.time\", convertLongToString(finish));\n\t\t\t// Scanning Test Counter record:\n\t\t\t int n = 1;\n\t\t\t if (fileExist(\"test.num\", false)) { \n\t\t\t\t if (! fileScanner(\"test.num\").equals(null)) { n = Integer.valueOf(fileScanner(\"test.num\")); }\n\t\t\t }\n\t\t\t fileWriterPrinter(\"\\n Finish: \" + getCurrentDateTimeFull());\n\t\t\t fileWriterPrinter( \" Duration: \" + testRunTime(\"start.time\", finish)); \n\t\t\t if (n > 1) { fileWriterPrinter(\" Subtotal: \" + testRunTime(\"ini.time\", finish) + \"\\n\"); }\n\t\t\t else { fileWriterPrinter(); }\n\t\t\t// Append an End Log record:\n\t\t if (fileExist(\"run.log\", false)) {\n\t\t \t fileWriter(\"run.log\", \"\\n Finish: \" + getCurrentDateTimeFull());\n\t\t \t fileWriter(\"run.log\", \" Duration: \" + testRunTime(\"start.time\", finish));\n \t if (n > 1) { fileWriter(\"run.log\", \" Subtotal: \" + testRunTime(\"ini.time\", finish)); }\n\t\t }\n }",
"public void Close() throws IOException {\n\n\t\ttermFile = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(Path.ResultHM1+type+Path.TermDir), \"utf-8\"));\n\t\t// Write to term file\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor(String term: term2termid.keySet()){\n\t\t\tsb.append(term + \" \" + term2termid.get(term) + \"\\n\");\n\t\t}\n\t\ttermFile.write(sb.toString());\n\t\ttermFile.close();\n\t\tterm2termid.clear();\n\n\t\t// Write to docVector\n\t\tWriteDocFile();\n\t\t// Write to posting file\n\t\tWritePostingFile();\n\n\t}",
"void endGeneration();",
"public void processSaveAndClose() {\n\n\t\tPrintWriter writer = null;\n\t\ttry {\n\t\t\ttry {\n\t\t\t\twriter = new PrintWriter(classesOutFile);\n\n\t\t\t\tint i = 0;\n\t\t\t\tfor (FitnessClass fc: fitnessClass) {\n\n\t\t\t\t\tif (fc == null) {\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tString fileOutput = fc.toStringClassesOut();\n\t\t\t\t\t\twriter.print(fileOutput);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally {\n\n\t\t\t\tif (writer != null) {\n\t\t\t\t\twriter.close();\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t} \t\n\t\t}\n\t\tcatch (IOException ioe) {\n\t\t\tJOptionPane.showMessageDialog(null, \"File not found\",\n\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE);\n\n\t\t}\t\t\t\t\n\n\t}",
"public void close(){\r\n\t\tif (this.fileWriter != null){\r\n\t\t\ttry {\r\n\t\t\t\tthis.fileWriter.flush();\r\n\t\t\t\tthis.fileWriter.close();\r\n\t\t\t\tthis.fileWriter = null;\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tlogger.error(\"Cannot close the file handle \"+this.myfilename+\". Your results might be lost. Cause: \"+e.getMessage());\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\r\n\t\t}\r\n\t}",
"private void finish() {\n }",
"public void finished() {\n\n\t\tencodeCounter = 0;\n\t}",
"public static void end()\n {\n if(out!=null) {\n out.println(\"close \" + name);\n out.flush();\n }\n }",
"public void endGameFrame() {\r\n\t\tcreateWarning(3000, \"Time Out!\"); //show warning message\r\n\t\t\r\n\t\ttry {\t\t\t\t\t\t\t //creates a file when the game is over\r\n\t\t\tString ExitFilename = \"EXIT.txt\";\r\n\t\t\tFileWriter ExitFile = new FileWriter(\"src/Signals./\"+ExitFilename);\r\n\t\t\tExitFile.write(\"EXIT\");\r\n\t\t\tExitFile.close();\r\n\t\t} \r\n\t\t catch (IOException e) {\r\n\t\t System.out.println(\"An error occurred.\");\r\n\t\t e.printStackTrace();\r\n\t\t }\r\n\t\t//close all interface\r\n\t\tframe.setVisible(false);\r\n\t\tframe.dispose();\r\n\t\tSystem.exit(0);\r\n\t\t\r\n\t\t\r\n\t}",
"public void finishCapturingLog() {\n if (logFileHandle_ == null) {\n // Either starting the capture failed, or we were erroneously called\n // when capture is not running.\n endCfg_ = getCurrentConfigFile();\n syncEndingConfig();\n return;\n }\n\n final String logFileName = logFileName_;\n\n core_.logMessage(\"Problem Report: End of log capture\");\n try {\n core_.stopSecondaryLogFile(logFileHandle_);\n } catch (Exception ignore) {\n // This is an unlikely error unless there are programming errors.\n // Let's continue and see if we can read the file anyway.\n }\n logFileHandle_ = null;\n logFileName_ = null;\n\n File logFile = new File(logFileName);\n capturedLogContent_ = null;\n try {\n capturedLogContent_ = readTextFile(logFile);\n } catch (IOException ioe) {\n ReportingUtils.logError(ioe);\n }\n if (capturedLogContent_ == null) {\n capturedLogContent_ = \"<<<Failed to read captured log file>>>\";\n }\n if (reportDir_ == null) { // We used an ad-hoc temporary file\n logFile.delete();\n }\n\n endCfg_ = getCurrentConfigFile();\n syncEndingConfig();\n }",
"public void endDocument ()\n\t\t{\n\t\t\t//System.out.println(\"End document\");\n\t\t}",
"public void postRun() {\n if (manageFileSystem && fs != null) {\n try {\n fs.close();\n }\n catch (IOException e) {\n System.out.println(String.format(\"Failed to close AlluxioFileSystem: %s\", e.getMessage()));\n }\n }\n // only to close the FileOutputStream when manageRecordFile=true\n if (manageRecordFile && recordOutput != null) {\n try {\n recordOutput.close();\n }\n catch (IOException e) {\n System.out.println(String.format(\"Failed to close File %s: %s\", recordFileName, e.getMessage()));\n }\n }\n }",
"public void finish() {}",
"public void finishUp() throws IOException {\n log.close();\r\n }",
"protected void exit() {\n (new CSVFile(bankDB)).writeCSV();\n try{\n FileUtil.writeTransactions(bankDB.getTransactions());\n }catch(IOException e){\n AlertBox.display(ERROR, \"There was an error printing the transactions\");\n }\n System.exit(0);\n }",
"public void closeFile(){\n\t\t\n\t\ttry{\n\n\t\t\tbufferedInput.close();\n\t\t}\n\t\tcatch(IOException ex) {\n \t\tSystem.err.println(\"Error: Some problem while closing file\");; \n\t\t\tSystem.exit(1); \n \t}\n\t}",
"public void setOutputFile(File out) {\n rnaFile = out;\n }",
"public void finish() { \n\t\t\n\t}",
"private void saveResourceFile()\r\n\t{\t\r\n\t\tFile file = null;\r\n\t\tFileWriter fw = null;\r\n\t\t//File complete = null;//New file for the completed list\r\n\t\t//FileWriter fw2 = null;//Can't use the same filewriter to do both the end task and the complted products.\r\n\t\ttry{\r\n\t\t\tfile = new File(outFileName);\r\n\t\t\tfile.createNewFile();\r\n\t\t\tfw = new FileWriter(outFileName,true);\r\n\t\t\tfor(FactoryObject object : mFObjects)\r\n\t\t\t{\r\n\t\t\t\tif(object instanceof FactoryReporter) {\r\n\t\t\t\t\t((FactoryReporter)object).report(fw);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.out.println(ioe.getMessage());\r\n\t\t\tif(file != null) {\r\n\t\t\t\tfile.delete();\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tif(fw != null) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\tfw.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tSystem.out.println(\"Failed to close the filewriter!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void endWrite() throws ThingsException;",
"static public void exit() {\n // We close our printStream ( can be a log so we do things properly )\n out.flush();\n System.exit(0);\n }",
"@Override\n public void cleanup() throws Exception {\n outputStream.close();\n }",
"public void endDocument() { }",
"public void closeFile() \r\n {\r\n try // close file and exit\r\n {\r\n if ( input != null )\r\n input.close();\r\n } // end try\r\n catch ( IOException ioException )\r\n {\r\n System.err.println( \"Error closing file.\" );\r\n System.exit( 1 );\r\n } // end catch\r\n }",
"public void writeResults() {\n gfmBroker.storeResults(this.responses, fileOutputPath);\n }",
"@Override\r\n\tpublic void finishProcess() {\r\n\t\tfor (String soaFolder : this.SOA_Folders) {\r\n\t\t\tString strConfig = soaFolder;\r\n\t\t\tFile f = new File(strConfig + \"/exit\");\r\n\t\t\ttry {\r\n\t\t\t\tf.createNewFile();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}",
"public void close() {\n try { out.flush(); } catch (Exception e) {}; // just to be sure\n \n cleanup();\n }",
"public void finish() {\n\n\t}",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; // indicate end of file\n zzEndRead = zzStartRead; // invalidate buffer\n\n if (zzReader != null) {\n zzReader.close();\n }\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; // indicate end of file\n zzEndRead = zzStartRead; // invalidate buffer\n\n if (zzReader != null) {\n zzReader.close();\n }\n }",
"final public void yyclose() throws java.io.IOException {\n yy_atEOF = true; /* indicate end of file */\n yy_endRead = yy_startRead; /* invalidate buffer */\n\n if (yy_reader != null)\n yy_reader.close();\n }",
"final public void yyclose() throws java.io.IOException {\n yy_atEOF = true; /* indicate end of file */\n yy_endRead = yy_startRead; /* invalidate buffer */\n\n if (yy_reader != null)\n yy_reader.close();\n }",
"public void finalize() {\r\n byteBuffer2 = null;\r\n byteBuffer4 = null;\r\n byteBuffer8 = null;\r\n progressBar = null;\r\n tagBuffer = null;\r\n\r\n if (raFile != null) {\r\n\r\n try {\r\n raFile.close();\r\n } catch (final IOException ioe) {\r\n // Do nothing\r\n }\r\n }\r\n\r\n raFile = null;\r\n }",
"public static void finishALl() {\n\t\tSystem.exit(-1);\r\n\t}",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public void graceful_ending() throws FileNotFoundException\n {\n PrintWriter output = new PrintWriter(db_rooms);\n output.println(toString());\n output.close();\n }",
"public synchronized void close() throws IOException {\n\t\t\tfinish();\n\t\t\tout.close();\n\t\t}",
"public void closeFile() throws IOException {\n finstream.close();\n writer.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\r\n zzAtEOF = true; /* indicate end of file */\r\n zzEndRead = zzStartRead; /* invalidate buffer */\r\n\r\n if (zzReader != null)\r\n zzReader.close();\r\n }",
"public final void yyclose() throws java.io.IOException {\r\n zzAtEOF = true; /* indicate end of file */\r\n zzEndRead = zzStartRead; /* invalidate buffer */\r\n\r\n if (zzReader != null)\r\n zzReader.close();\r\n }",
"public final void yyclose() throws java.io.IOException {\r\n zzAtEOF = true; /* indicate end of file */\r\n zzEndRead = zzStartRead; /* invalidate buffer */\r\n\r\n if (zzReader != null)\r\n zzReader.close();\r\n }",
"public final void yyclose() throws java.io.IOException {\r\n zzAtEOF = true; /* indicate end of file */\r\n zzEndRead = zzStartRead; /* invalidate buffer */\r\n\r\n if (zzReader != null)\r\n zzReader.close();\r\n }",
"public final void yyclose() throws java.io.IOException {\r\n zzAtEOF = true; /* indicate end of file */\r\n zzEndRead = zzStartRead; /* invalidate buffer */\r\n\r\n if (zzReader != null)\r\n zzReader.close();\r\n }",
"protected void finish() {\n }",
"public void saveFile() {\r\n final String file = \"respuestaConjuntoDeDatosCon\" + this.numberOfBees + \"abejas.txt\";\r\n try {\r\n int count = 0;\r\n PrintWriter writer = new PrintWriter(file, \"UTF-8\");\r\n for (int i = 0; i < this.numberOfBees; i++) {\r\n if (beesArray[i].isInCollisionRisk()) {\r\n writer.println(beesArray[i].getLatitude() + \",\" + beesArray[i].getLongitude() + \",\" + beesArray[i].getHeight());\r\n count++;\r\n }\r\n }\r\n System.out.println(\"Number of bees in collision risk: \" + count);\r\n writer.close();\r\n } catch (IOException ioe) {\r\n System.out.println(\"Something went wrong writing the exit file\");\r\n }\r\n }",
"public static void main(String[] args) throws IOException {\n\t\tString FinalContigWritePath = args[0];\n\t\tString ContigAfterPath = args[1];\n\t\tString DataName = args[2];\n\t\tString RealString = CommonClass.readContigFile(ContigAfterPath);\n\t\t//Write.\n\t\tFileWriter writer1 = new FileWriter(FinalContigWritePath + \"contig.\" + DataName + \".changgeLines.fa\", true);\n\t\twriter1.write(RealString);\n\t\twriter1.close();\n\t\tSystem.out.println(\"File write process end!\");\n\t}",
"public void tileFinish() {\r\n isTiling=false;\r\n\r\n restoreCamera();\r\n\r\n // save large image to TGA\r\n tileFilename+=\"_\"+(p.width*tileNum)+\"x\"+\r\n (p.height*tileNum)+tileFileextension;\r\n p.println(\"Save: \"+\r\n tileFilename.substring(\r\n tileFilename.lastIndexOf(java.io.File.separator)+1));\r\n// tileImg.save(tileFilename);\r\n \r\n // DAVE: stop output streaming\r\n finishTGA();\r\n\r\n p.println(\"Done tiling.n\");\r\n\r\n // clear buffer for garbage collection\r\n tileImg=null;\r\n done=true;\r\n }",
"protected void end() {\n isFinished();\n }",
"public void endDocument() {\n }",
"protected void close() {\r\n\t\ttry {\r\n\t\t\t_asciiIn.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"Error ocurred while closing file \" + _directory + _filename + _filetype + \":\" + e.getMessage());\r\n\t\t} // catch\r\n\t}",
"private void finishProcessing() {\n // Restore original system output streams\n System.setOut(origStdOut);\n System.setErr(origStdErr);\n // Print out each log to the output\n for (int i = 0; i < processingNodes.size; i++) {\n System.out.println(processingNodes.get(i).getLog());\n }\n processingNodes.clear();\n processedCount.set(0);\n processing = false;\n listener.onProcessingFinished();\n executorService.shutdown();\n }",
"protected void exit() throws IOException {\r\n\t\tstop();\r\n\t\tkeepRunning = false;\r\n\t}",
"void gameFinished(Turn turn) throws IOException;",
"public void finish() throws Exception {\n\t\t\n\t}",
"private static void record (final String outFileName, final String... command) throws IOException {\r\n\t\tstdout.printf (\"Recoding: %s\\t\", String.join (\" \", command));\r\n\t\tFile out = new File (DIR, outFileName);\r\n\t\ttry {\r\n\t\t\tnew ProcessBuilder(command)\r\n\t\t\t\t.directory (DIR)\r\n\t\t\t\t.redirectErrorStream (true)\r\n\t\t\t\t.redirectOutput (out)\r\n\t\t\t\t.start()\r\n\t\t\t\t.waitFor ();\r\n\t\t} catch (InterruptedException e) { /* ignore */ }\r\n\t\tstdout.println (\"(Done)\");\r\n\t}",
"public void saveFile() {\n\t\tPrintWriter output = null;\n\t\ttry {\n\t\t\toutput = new PrintWriter(\"/Users/katejeon/Documents/Spring_2020/CPSC_35339/avengers_project/game_result.txt\");\n\t\t\toutput.println(textArea.getText());\n\t\t\toutput.flush();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"File doesn't exist.\");\n\t\t} finally {\n\t\t\toutput.close();\n\t\t}\n\t}"
] |
[
"0.6583941",
"0.63514143",
"0.6324613",
"0.62038916",
"0.61485094",
"0.60442775",
"0.60336107",
"0.60013765",
"0.5968424",
"0.5956575",
"0.5910731",
"0.58441764",
"0.58161914",
"0.5814469",
"0.5710541",
"0.56833047",
"0.5679714",
"0.5645867",
"0.562775",
"0.5623614",
"0.5601933",
"0.5590265",
"0.5586621",
"0.55763215",
"0.55700177",
"0.55678517",
"0.55552536",
"0.5526418",
"0.5496895",
"0.54860705",
"0.5483162",
"0.5448166",
"0.5446854",
"0.5431142",
"0.54211164",
"0.5413939",
"0.54074705",
"0.5401006",
"0.5399336",
"0.5398383",
"0.53889304",
"0.5387128",
"0.53871214",
"0.5377464",
"0.53718746",
"0.53635925",
"0.53629184",
"0.53578645",
"0.5356113",
"0.53412",
"0.53412",
"0.5338072",
"0.5338072",
"0.5322189",
"0.5308193",
"0.530765",
"0.5279907",
"0.5278781",
"0.52784544",
"0.5276497",
"0.5276497",
"0.5276497",
"0.5276497",
"0.5276497",
"0.5276497",
"0.5276497",
"0.5276497",
"0.5276497",
"0.5276497",
"0.5276497",
"0.5276497",
"0.5276497",
"0.5276497",
"0.5276497",
"0.5276497",
"0.5276497",
"0.5276497",
"0.5276497",
"0.5276497",
"0.5276497",
"0.5276497",
"0.5276497",
"0.5275338",
"0.5275338",
"0.5275338",
"0.5275338",
"0.5275338",
"0.52703327",
"0.5265121",
"0.52650017",
"0.52548355",
"0.5252749",
"0.5242551",
"0.5235156",
"0.5228122",
"0.52266246",
"0.5219642",
"0.5214815",
"0.52083206",
"0.5202146"
] |
0.8508643
|
0
|
Get the current DNA as a string. Useful for testing purposes.
|
public String getDNA() {
return dna.toString();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String makeString()\n {\n return \"ArcanaDungeonSource\";\n }",
"public String toString()\r\n\t{\r\n\t\treturn toCharSequence().toString();\r\n\t}",
"public String toString()\n {\n if (stringRep == null)\n {\n StringBuilder sb = new StringBuilder();\n switch (type)\n {\n case THREE_PRIME:\n sb.append(\"DNA 3'-\");\n break;\n case FIVE_PRIME:\n sb.append(\"DNA 5'-\");\n break;\n case RNA:\n sb.append(\"RNA \");\n break;\n }\n \n for (int i = 0; i < seq.length; i++)\n {\n sb.append(seq[i]); // Java magic with Enum types -- converts to string.\n }\n \n switch (type)\n {\n case THREE_PRIME:\n sb.append(\"-5'\");\n break;\n case FIVE_PRIME:\n sb.append(\"-3'\");\n break;\n }\n \n stringRep = sb.toString();\n }\n \n return stringRep;\n }",
"public String toString() {\n String stringName = \"\";\n stringName = getName();\n return stringName;\n }",
"public String toString() {\n\t\tString svar = \"\" + vaerdi; // vaerdi som streng, f.eks. \"4\"\n\t\treturn svar;\n\t}",
"public String asString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"public String toString() { return stringify(this, true); }",
"public java.lang.String getA() {\n java.lang.Object ref = a_;\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 a_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String toString() {\r\n if (chromosomeName == null) {\r\n return \"\";\r\n } else {\r\n return chromosomeName;\r\n }\r\n }",
"public String toString() {\n\t\treturn toString(0, 0);\n\t}",
"public String toString(){\r\n\t\treturn \"\" + letter;\r\n\t}",
"@Override\n public final String toString() {\n return asString(0, 4);\n }",
"public static String rndString() {\r\n char[] c = RBytes.rndCharArray();\r\n return new String(c);\r\n\r\n }",
"String string() {\n return _charsString;\n }",
"public String toString() {\n\t\treturn toString(this);\n\t}",
"public String toString()\n\t{\n\t\tchar [] ToStringChar = new char[length];\n recursiveToString(0, ToStringChar, firstC);\n String contents = new String(ToStringChar);\n return contents;\n\t\t\n\t}",
"public String getAsString() {\n\t\treturn new String(this.getAsBytes());\n\t}",
"public String toString()\n {\n return Native.getNumeralString(getContext().nCtx(), getNativeObject());\n }",
"public String toString() {\n StringWriter writer = new StringWriter();\n this.write(writer);\n return writer.toString();\n }",
"public String randomString() {\n return new BigInteger(130, random).toString(32);\n }",
"public String toString()\n {\n return this.string;\n }",
"public static String randomeString() {\n\t\t\tString generatedString = RandomStringUtils.randomAlphabetic(8);\n\t\t\tSystem.out.println(generatedString);\n\t\t\treturn generatedString;\n\t\t\t\n\t\t}",
"public java.lang.String toString()\n {\n return this.stringValue;\n }",
"public String getString() {\n\t\treturn renderResult(this._result).trim();\n\t}",
"public final String toString() {\n\t\tStringWriter write = new StringWriter();\n\t\tString out = null;\n\t\ttry {\n\t\t\toutput(write);\n\t\t\twrite.flush();\n\t\t\tout = write.toString();\n\t\t\twrite.close();\n\t\t} catch (UnsupportedEncodingException use) {\n\t\t\tuse.printStackTrace();\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\t\treturn (out);\n\t}",
"public String fullString();",
"public String toString()\n {\n return _xstr.subSequence(_start, _end).toString();\n }",
"public String getFullName() {\n return proteinIdentifier.getFullName() + \"_\" + chainId;\n }",
"public String toString() {\n\t\t\treturn aliases[0];\n\t\t}",
"public java.lang.String toString() {\n return this.stringValue;\n }",
"public final String d() {\n return Base64.encodeToString(this.f14146a.getPrivate().getEncoded(), 11);\n }",
"public String toString() {\n switch (this) {\n case INDIAN_ROSEWOOD:\n return \"Indian Rosewood\";\n case BRAZILIAN_ROSEWOOD:\n return \"Brazilian Rosewood\";\n case MAHOGANY:\n return \"Mahogany\";\n case MAPLE:\n return \"Maple\";\n case COCOBOLO:\n return \"Cocobolo\";\n case CEDAR:\n return \"Cedar\";\n case ADIRONDACK:\n return \"Adirondack\";\n case ALDER:\n return \"Alder\";\n case SITKA:\n return \"Sitka\";\n }\n return null;\n }",
"public final String getTargetString() {\n/* 97 */ return this.m_targetString;\n/* */ }",
"public String toString()\n {\n String output = new String();\n output = \"The student's first name is \" + fname + \", and his/her last name is \" + lname + \". His/her grade is \" + grade + \" and his/her student number is \" + studentNumber + \".\";\n return output;\n }",
"public String toString()\n\t\t{\n\t\t\treturn name + \"\\t\" + characterName;\n\t\t}",
"public String toString() {\n\t\treturn toString(true);\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn this.getFullName();\n\t}",
"public String generateString() {\n\t\tint maxLength = 9;\n\t\tRandom random = new Random();\n\t\tStringBuilder builder = new StringBuilder(maxLength);\n\n\t\t// Looping 9 times, one for each char\n\t\tfor (int i = 0; i < maxLength; i++) {\n\t\t\tbuilder.append(ALPHABET.charAt(random.nextInt(ALPHABET.length())));\n\t\t}\n\t\t// Generates a random ID that has may have a quintillion different combinations\n\t\t// (1/64^9)\n\t\treturn builder.toString();\n\t}",
"@Override()\n public String toString()\n {\n final StringBuilder buffer = new StringBuilder();\n toString(buffer);\n return buffer.toString();\n }",
"public String genotypeToString()\n {\n StringBuilder s = new StringBuilder();\n s.append( Code.encode( genome.length ) );\n for( int i = 0 ; i < genome.length ; i++ ) {\n s.append(Code.encode(genome[i].toString()));\n }\n return s.toString();\n }",
"public static String getDnaSequence(final DnaComponent component) {\n String rtn = \"\";\n if (component instanceof Part) {\n final Part part = (Part) component;\n rtn = part.getDnaSequence();\n }\n if (component instanceof Gate) {\n final Gate gate = (Gate) component;\n rtn = SBOLDataUtils.getDnaSequence(gate);\n }\n if (component instanceof InputSensor) {\n final InputSensor sensor = (InputSensor) component;\n rtn = SBOLDataUtils.getDnaSequence(sensor);\n }\n if (component instanceof OutputDevice) {\n final OutputDevice reporter = (OutputDevice) component;\n rtn = SBOLDataUtils.getDnaSequence(reporter);\n }\n return rtn;\n }",
"public java.lang.String getD() {\n java.lang.Object ref = d_;\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 d_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getCurrent() {\n\t\t\tString result=\"\";\n\t\t\treturn result ;\n\t\t}",
"public String toString() {\n\t\treturn str;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn this.toAnticipatedString();\n\t}",
"public final String c() {\n return Base64.encodeToString(this.f14146a.getPublic().getEncoded(), 11);\n }",
"public String str() {\n/* 207 */ String str = this.m_DTMXRTreeFrag.getDTM().getStringValue(this.m_dtmRoot).toString();\n/* */ \n/* 209 */ return (null == str) ? \"\" : str;\n/* */ }",
"public String toString()\n {\n return id() + location().toString() + direction().toString();\n }",
"@Override\n public String toString() {\n if (arrayLen != 1) {\n setLength(stringArray, arrayLen);\n String s = join(stringArray);\n // Create a new array to allow everything to get GC'd.\n stringArray = new String[] {s};\n arrayLen = 1;\n }\n return stringArray[0];\n }",
"public String toString()\n\t{\n\t\tString result = \"\";\n\t\tresult += this.data;\n\t\treturn result;\n\t}",
"public static String coder(){\n Random randomGen = new Random();\n \n String letter1, letter2 = \"\";\n int random1, random2, random3, random4 = 0;\n String genome = \"\";\n \n int i = 0;\n int first = (int)((Math.random()*26)+97);\n char firstChar = Character.toUpperCase((char) first);\n genome += firstChar;\n \n int second = (int)((Math.random()*26)+97);\n char secondChar = Character.toUpperCase((char) second);\n genome += secondChar;\n \n random1 = randomGen.nextInt(10);\n genome += random1;\n \n random2 = randomGen.nextInt(10);\n genome += random2;\n \n random3 = randomGen.nextInt(10);\n genome += random3;\n \n random4 = randomGen.nextInt(10);\n genome += random4;\n \n return genome;\n }",
"public String toString() {\n String result = \"\";\n Iterator<NucleiSelected> itr = nucleiSelected.iterator();\n while (itr.hasNext()) {\n result = result + itr.next().toString() + \"\\n\";\n }\n return result;\n }",
"public String toString() {\n return name();\n }",
"public String toString(){\n\t\tString abbrv = this.name().substring(0,1);\t\t\n\t\treturn abbrv;\n\t}",
"String getATCUD();",
"private final String getRandomString() {\n StringBuffer sbRan = new StringBuffer(11);\n String alphaNum = \"1234567890abcdefghijklmnopqrstuvwxyz\";\n int num;\n for (int i = 0; i < 11; i++) {\n num = (int) (Math.random() * (alphaNum.length() - 1));\n sbRan.append(alphaNum.charAt(num));\n }\n return sbRan.toString();\n }",
"public String toString()\n {\n String outString = \n getLid() + \" \" +\n getAgency_code() + \" \" +\n getOffice() + \" \" +\n \"\" ;\n return outString;\n }",
"@java.lang.Override\n public java.lang.String getA() {\n java.lang.Object ref = a_;\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 a_ = s;\n return s;\n }\n }",
"public String toString() {\n return \"Name: \" + firstName + \" \" + lastName +\n \", Grade: \" + grade + \", Unique Student Number: \" + randomNumb;\n }",
"@Override\n public String toString() {\n String str = \"\";\n\n //TODO: Complete Method\n\n return str;\n }",
"public abstract String getAdUnitString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();"
] |
[
"0.67224914",
"0.6259286",
"0.623294",
"0.6226706",
"0.6193723",
"0.61484927",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.61320937",
"0.6120087",
"0.61192197",
"0.6112668",
"0.60916924",
"0.6070513",
"0.6051617",
"0.60439277",
"0.60128486",
"0.5999878",
"0.59906656",
"0.5985677",
"0.59832597",
"0.59801525",
"0.5968994",
"0.59666944",
"0.5965337",
"0.5961982",
"0.5961791",
"0.59595776",
"0.5951294",
"0.59505284",
"0.5947842",
"0.5945763",
"0.59409636",
"0.5915106",
"0.591476",
"0.5911371",
"0.5907654",
"0.5905526",
"0.5904845",
"0.58811486",
"0.5880764",
"0.5879868",
"0.58798665",
"0.5863564",
"0.5861817",
"0.5836996",
"0.5826832",
"0.5826136",
"0.5822699",
"0.5813837",
"0.58131826",
"0.58090204",
"0.5805165",
"0.5803863",
"0.57995886",
"0.5783015",
"0.57823664",
"0.5781984",
"0.5773783",
"0.5770678",
"0.5753766",
"0.57534057",
"0.5745469",
"0.5743819",
"0.57403404",
"0.57403404",
"0.57403404",
"0.57403404",
"0.57403404",
"0.57403404",
"0.57403404",
"0.57403404",
"0.57403404",
"0.57403404",
"0.57403404"
] |
0.78210634
|
0
|
Helper function to print a template in an easier format
|
public String templateToString(List<TemplItem> list) {
StringBuilder builder = new StringBuilder();
for (TemplItem item : list) {
switch (item.getType()) {
case BASE:
builder.append((char) item.getValue());
break;
case PROT:
builder.append('[').append(item.getValue()).append('_').append(item.getProtLevel()).append(']');
break;
case LEN:
builder.append('|').append(item.getValue()).append('|');
break;
}
}
return builder.toString();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void printWithTemplate(String text) {\n String line = \"____________________________________________________________\";\n\n out.println(line);\n out.println(text);\n out.println(line);\n }",
"String template();",
"private String getTemplate(boolean all){ \r\n\t\t\t StringBuilder sb = new StringBuilder();\t\t\t \r\n\t\t\t if(!all){\r\n\t\t\t \tsb.append(\"<tpl if=\\\"age > 30\\\">\");\r\n\t\t\t }else{\r\n\t\t\t \tsb.append(\"<tpl>\");\r\n\t\t\t }\r\n\t\t\t sb.append(\"<p>Age: {age}</p>\");\r\n\t\t\t\tsb.append(\"<p>Sex: {gender}</p>\");\r\n\t\t\t\tsb.append(\"<p>Name: {name}</p>\"); \t\t\t \t\r\n\t\t\t\tsb.append(\"<p>Email: {email}</p>\");\r\n\t\t\t\tsb.append(\"<p>Reviews : </p>\");\r\n\t\t\t\tsb.append(\"<ul>\");\r\n\t\t\t\tsb.append(\"<tpl for=\\\"reviews\\\">\");\t\r\n\t\t\t\tsb.append(\"<li>{title}</li>\");\r\n\t\t\t\tsb.append(\"</tpl>\");\r\n\t\t\t\tsb.append(\"</ul>\");\r\n\t\t\t\tsb.append(\"<hr />\");\r\n\t\t\t\tsb.append(\"</tpl>\");\r\n\t\t\t return sb.toString();\r\n\t\t\t}",
"String getTemplateContent(){\r\n \t\tStringBuffer templateBuffer = new StringBuffer();\r\n \t\tfor(String templatePart:templateParts){\r\n \t\t\ttemplateBuffer.append(templatePart);\r\n \t\t}\r\n \t\treturn templateBuffer.toString();\r\n \t}",
"private native String getTemplate()/*-{\r\n\t\t\t\treturn ['<tpl for=\".\">', \r\n\t\t\t '<div class=\"x-customer-item\">', \r\n\t\t\t\t '<div class=\"name\">{name}</div>', \r\n\t\t\t\t '<div class=\"email\">E-mail:{email}</div>', \r\n\t\t\t\t '<div class=\"purchases\">Purchases:{purchases}</div>', \r\n\t\t\t '</div>', \r\n\t\t\t '</tpl>', \r\n\t\t\t ''].join(\"\");\r\n\t\t\t}-*/;",
"protected String formatTemplate(String template, FaxJob faxJob) {\n return SpiUtil.formatTemplate(template, faxJob, null, true, false);\n }",
"StringTemplate createStringTemplate();",
"String getTemplate();",
"public String print() {\n\t\treturn new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)\n\t\t\t\t.append(\"ItemTemplate\", super.print())\n\t\t\t\t.append(\"smallCost\", smallCost)\n\t\t\t\t.append(\"mediumCost\", mediumCost)\n\t\t\t\t.append(\"bigCost\", bigCost)\n\t\t\t\t.append(\"largeCost\", largeCost)\n\t\t\t\t.append(\"weightPercent\", weightPercent)\n\t\t\t\t.append(\"armorType\", armorType)\n\t\t\t\t.toString();\n\t}",
"public String print(){\r\n\t\t\r\n\t\treturn String.format(\"%9d\\t%-5s\\t\\t%-3d\\t\\t%-15s\",\r\n\t\t\t\tthis.engineNumber, \r\n\t\t\t\tthis.companyName, \r\n\t\t\t\tthis.numberOfRailCars, \r\n\t\t\t\tthis.destinationCity);\r\n\t}",
"private String getTemplate(){ \r\n\t\t\t StringBuilder sb = new StringBuilder();\r\n\t\t\t sb.append(\"<tpl for=\\\".\\\">\");\r\n\t\t\t\tsb.append(\"<div class=\\\"x-combo-list-item\\\" >\");\r\n\t\t\t\tsb.append(\"<span><b>{name}</b></span>\"); \t\t\t \t\r\n\t\t\t\tsb.append(\"</div>\");\r\n\t\t\t\tsb.append(\"</tpl>\");\r\n\t\t\t return sb.toString();\r\n\t\t\t}",
"void format(Printer printer);",
"@Override\n public String toPrintToFile() {\n return \"[T]\" + super.toString();\n }",
"public void formatPrint() {\n\t\tSystem.out.printf(\"%8d \", codigo);\n\t\tSystem.out.printf(\"%5.5s \", clase);\n\t\tSystem.out.printf(\"%5.5s \", par);\n\t\tSystem.out.printf(\"%5.5s \", nombre);\n\t\tSystem.out.printf(\"%8d \", comienza);\n\t\tSystem.out.printf(\"%8d\", termina);\n\t}",
"String renderTemplate(String filename, Map<String, Object> context) {\n if (sEngine == null) {\n // PebbleEngine caches compiled templates by filename, so as long as we keep using the\n // same engine instance, it's okay to call getTemplate(filename) on each render.\n sEngine = new PebbleEngine();\n sEngine.addExtension(new PebbleExtension());\n }\n try {\n StringWriter writer = new StringWriter();\n sEngine.getTemplate(filename).evaluate(writer, context);\n return writer.toString();\n } catch (Exception e) {\n StringWriter writer = new StringWriter();\n e.printStackTrace(new PrintWriter(writer));\n return \"<div style=\\\"font-size: 150%\\\">\" + writer.toString().replace(\"&\", \"&\").replace(\"<\", \"<\").replace(\"\\n\", \"<br>\");\n }\n }",
"public String outputTemplateBase() throws IOException {\n\t\tVelocityEngine ve = new VelocityEngine();\n\t\tve.setProperty(RuntimeConstants.RESOURCE_LOADER, \"classpath\");\n\t\tve.setProperty(\"classpath.resource.loader.class\",\n\t\t\t\tClasspathResourceLoader.class.getName());\n\n\t\tve.init();\n\t\t/* next, get the Template */\n\t\tTemplate t = ve.getTemplate(\"de/velocityTest/helloworld.vm\");\n\t\t/* create a context and add data */\n\t\tVelocityContext context = new VelocityContext();\n\t\tcontext.put(\"name\", \"World\");\n\t\t/* now render the template into a StringWriter */\n\t\tFile file = new File(\"./test.txt\");\n\t\tFileWriter out = new FileWriter(file);\n\t\tBufferedWriter w = new BufferedWriter(out);\n\t\tStringWriter writer = new StringWriter();\n\t\tt.merge(context, w);\n\t\tw.flush();\n\t\t/* show the World */\n\t\treturn w.toString();\n\t}",
"public String print(){\r\n\t\treturn String.format(\"%9d\\t%-5s\\t\\t%-3d\\t\\t%-15s\",\r\n\t\t\t\tthis.trackNumber, \r\n\t\t\t\tthis.engineNumber, \r\n\t\t\t\tthis.numRailCars, \r\n\t\t\t\tthis.destCity);\r\n\t\t}",
"private Template makeTemplate() {\n return new Template(\"spamHardGenerated\", \"SPAM HARD\\n$$template_EOO\\n\" + sendedWorld.getText() + \"\\n$$template_EOF\\n$$var_name osef\\n$$var_surname osef\");\n }",
"@VTID(8)\r\n java.lang.String format();",
"TemplateOutputStream getOutput();",
"public void print() {\n \tfor (int i=0; i < this.table.height; i++) {\n \t\tfor (int j=0; j < this.table.width; j++) {\n \t\t\tString tmp = \"e\";\n \t\t\tif(this.table.field[i][j].head != null) {\n \t\t\t\ttmp = \"\";\n \t\t\t\tswitch (this.table.field[i][j].head.direction) {\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\ttmp+=\"^\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\ttmp+=\">\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\ttmp+=\"V\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\ttmp+=\"<\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n \t\t\t}\n \t\t\telse if(this.table.field[i][j].obj != null) {\n \t\t\t\ttmp = this.table.field[i][j].obj.name;\n \t\t\t}\n \t\t\tSystem.out.print(\" \" + tmp);\n \t\t}\n \t\t\tSystem.out.println(\"\");\n \t}\n }",
"@Override\n public void displayReportTemplate(String reportFormat, int entries) {\n }",
"public String printFormat(){\n return \"The workout: \" + getName() + \" should be done for \" + getSets() + \" sets and in each set should be \"\n + getReps() + \" reps.\";\n }",
"public String print(int format);",
"public String outputTemplatePetMail() throws IOException {\n\t\tVelocityEngine ve = new VelocityEngine();\n\t\tve.setProperty(RuntimeConstants.RESOURCE_LOADER, \"classpath\");\n\t\tve.setProperty(\"classpath.resource.loader.class\",\n\t\t\t\tClasspathResourceLoader.class.getName());\n\n\t\tve.init();\n\t\t/* next, get the Template */\n\t\tTemplate t = ve.getTemplate(\"de/velocityTest/petEmail.vm\");\n\t\t/* create a context and add data */\n\t\tArrayList list = new ArrayList();\n\t\tMap map = new HashMap();\n\t\tmap.put(\"name\", \"horse\");\n\t\tmap.put(\"price\", \"00.00\");\n\t\tlist.add(map);\n\n\t\tmap = new HashMap();\n\t\tmap.put(\"name\", \"dog\");\n\t\tmap.put(\"price\", \"9.99\");\n\t\tlist.add(map);\n\t\tmap = new HashMap();\n\t\tmap.put(\"name\", \"bear\");\n\t\tmap.put(\"price\", \".99\");\n\t\tlist.add(map);\n\t\t/* add that list to a VelocityContext */\n\t\tVelocityContext context = new VelocityContext();\n\t\tcontext.put(\"petList\", list);\n\t\t\n\t\tFile file = new File(\"./petMail.txt\");\n\t\tFileWriter out = new FileWriter(file);\n\t\tBufferedWriter w = new BufferedWriter(out);\n\t\tStringWriter writer = new StringWriter();\n\t\tt.merge(context, w);\n\t\tw.flush();\n\t\t/* show the World */\n\t\treturn w.toString();\n\t}",
"public String print()\n\t{\n\t\tString s = \"\";\n\t\t\n\t\ts = \"<explanation text=\\\"\" + text + \"\\\">\";\n\t\ts = s + commentContainer.printComments();\n\t\tif (expression != null)\n\t\t{\n\t\t\ts = s + expression.print(); \n\t\t}\n\t\ts = s + \"</explanation>\";\n\t\t\n\t\treturn s;\n\t}",
"private String getAdvTemplate(){ \r\n\t\t\t StringBuilder sb = new StringBuilder();\r\n\t\t\t sb.append(\"<tpl for=\\\".\\\">\");\r\n\t\t\t\tsb.append(\"<div class=\\\"x-combo-list-item\\\" >\");\r\n\t\t\t\tsb.append(\"<span class=\\\"tpl-lft {gender}\\\"></span>\");\r\n\t\t\t\tsb.append(\"<span class=\\\"tpl-lft\\\">{name}</span>\");\r\n\t\t\t\tsb.append(\"<span class=\\\"tpl-rgt\\\">{age} Yrs</span>\");\r\n\t\t\t\tsb.append(\"</div>\");\r\n\t\t\t\tsb.append(\"</tpl>\");\r\n\t\t\t return sb.toString();\r\n\t\t\t}",
"public static String format(String template, String param0, String param1, String param2, String param3, String param4) {\r\n return MessageFormat.format(template, new Object[] { param0, param1, param2, param3, param4 });\r\n }",
"public static <T> String format(String template, String key, T value) {\n return template.replaceAll(\"\\\\{\" + key + \"\\\\}\", value.toString());\n }",
"public String getPrintableFormat() {\n String output = new String(\"Articoli del gruppo \" + groupName + \":\\n\");\n for (int i = 0; i < list.size(); i++) {\n Article article = list.get(i);\n output += String.format(\"%2d %s\\n\",i,article.getPrintableFormat());\n }\n return output;\n }",
"private ConfigurationHTMLPrinter print(final String s) {\n return printIndent().print0(s);\n }",
"@Override\n\t\t\tpublic void print() {\n\t\t\t\t\n\t\t\t}",
"public static void main(String[] args) {\n\t\tint i = 0;\r\n\t\tif( i == 0) {\r\n\t\t\tSystem.out.println(\"HTML_Template\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Italic String\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Underline, select, UL & OL\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Textbox, Button\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Textbox, Button value Special Characters\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Textbox, Blank\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Textbox, Special Chars\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Radio & Checkbox\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Blank Commit Msg \");\r\n\t\t\tSystem.out.println(\"HTML_Template : Image Check New\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Kovair To Jira\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Kovair To Jira at 11.07AM\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Kovair To Jira at 11.07AM SyncBack\");\r\n\t\t\tSystem.out.println(\"HTML_Template : TP-134\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Any Random Key\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Test Flowqqq\");\r\n\t\t}\r\n\t}",
"private static void render(String s)\n {\n if (s.equals(\"{\"))\n {\n buf_.append(\"\\n\");\n indent();\n buf_.append(s);\n _n_ = _n_ + INDENT_WIDTH;\n buf_.append(\"\\n\");\n indent();\n }\n else if (s.equals(\"(\") || s.equals(\"[\"))\n buf_.append(s);\n else if (s.equals(\")\") || s.equals(\"]\"))\n {\n backup();\n buf_.append(s);\n buf_.append(\" \");\n }\n else if (s.equals(\"}\"))\n {\n int t;\n _n_ = _n_ - INDENT_WIDTH;\n for(t=0; t<INDENT_WIDTH; t++) {\n backup();\n }\n buf_.append(s);\n buf_.append(\"\\n\");\n indent();\n }\n else if (s.equals(\",\"))\n {\n backup();\n buf_.append(s);\n buf_.append(\" \");\n }\n else if (s.equals(\";\"))\n {\n backup();\n buf_.append(s);\n buf_.append(\"\\n\");\n indent();\n }\n else if (s.equals(\"\")) return;\n else\n {\n buf_.append(s);\n buf_.append(\" \");\n }\n }",
"protected abstract String format();",
"void format();",
"@Override\n\t\tpublic void print() {\n\n\t\t}",
"public void print() {\n System.out.println();\n for (int level = 0; level < 4; level++) {\n System.out.print(\" Z = \" + level + \" \");\n }\n System.out.println();\n for (int row = 3; row >= 0; row--) {\n for (int level = 0; level < 4; level++) {\n for (int column = 0; column < 4; column++) {\n System.out.print(get(column, row, level));\n System.out.print(\" \");\n }\n System.out.print(\" \");\n }\n System.out.println();\n }\n System.out.println();\n }",
"public String formatTags() {\n String toPrint = \" \";\n for (String tag : tags) {\n toPrint += (\"#\" + tag + \" \");\n }\n return toPrint;\n }",
"@Override\r\n\t\t\tpublic void print() {\n\t\t\t\t\r\n\t\t\t}",
"public void print()\n {\n System.out.println();\n System.out.println(\"Ticket to \" + destination +\n \" Price : \" + price + \" pence \" + \n \" Issued \" + issueDateTime);\n System.out.println();\n }",
"@Override\n\tpublic String toString() {\n\t\treturn text.replaceAll(\"\\\\\\\\\", \"\\\\\\\\\\\\\\\\\").replaceAll(\"[{]\\\\$\", \"\\\\\\\\{\\\\$\");\n\t}",
"public String change_template(Map<String, String> variables) {\n current_template_index = PrayerTemplates.get_next_template(my_prayer_part_type, current_template_index);\r\n int template_size = PrayerTemplates.get_template_size(my_prayer_part_type);\r\n my_prayer_part_text = PrayerTemplates.get_template_text(my_prayer_part_type, current_template_index);\r\n\r\n // step #2 - plug variables into new template\r\n Iterator it = variables.entrySet().iterator();\r\n while (it.hasNext()) {\r\n Map.Entry pair = (Map.Entry) it.next();\r\n substitute(pair.getKey().toString(), pair.getValue().toString());\r\n }\r\n\r\n return String.valueOf(current_template_index + 1) + \"/\" + String.valueOf(template_size);\r\n }",
"public static String printTree()\n {\n \tString tree = \"\";\n ArrayList<String> letters = converter.toArrayList();\n for(int i = 0; i < letters.size(); i++)\n {\n tree += letters.get(i);\n if(i + 1 < letters.size())\n \t tree += \" \";\n }\n \n return tree;\n }",
"public abstract String format(T t);",
"static void print(Collection c) {\n\t\tSystem.out.print(\"{\");\n\t\tfor(Iterator iterator=c.iterator();iterator.hasNext();) {\n\t\t\tSystem.out.printf(\"\\\"%s\\\"\", iterator.next());\n\t\t\tSystem.out.print(iterator.hasNext()?\", \":\"}\\n\");\n\t\t}\n\t}",
"private ConfigurationHTMLPrinter println(final String s) {\n return printIndent().print0ln(s);\n }",
"private void tagBracketPrinter(String tag, int printType, String... token) {\n String temp = Arrays.toString(token).substring(1, Arrays.toString(token).length() - 1);\n tabPrinter();\n if (printType == 0) {\n writer.println(\"<\" + tag + \">\");\n tabs++;\n } else if (printType == 1) {\n tabs--;\n writer.println(\"</\" + tag + \">\");\n } else if (printType == 2)\n\n writer.println(\"<\" + tag + \"> \" + temp + \" </\" + tag + \">\");\n\n }",
"public String printableString()\r\n {\r\n String answer=\"\";\r\n answer=\"\\n Title:\\t\"+title+\"\\n Author:\\t\"+author+\"\\n Asking Price:\\t\"+askingPrice+\r\n \"\\n Purchased for:\\t\"+purchasePrice+\"\\n Date Acquired:\\t\"+dateAcquired+\"\\n Genre:\\t\"+genre+\"\\n Number on hand:\\t\"+bookCount+\"\\n\";\r\n return answer;\r\n }",
"public String display(){\n return \"\\tId: \" + id + \"\\n\" +\n \"\\tName: \" + name + \"\\n\" +\n \"\\tDescription: \" + description + \"\\n\" +\n \"\\tTeacher(s): \" + teacherString() + \"\\n\";\n }",
"public String printStory() {\r\n\t\tString output = \"\";\r\n\t\tboolean start = true;\r\n\t\tArrayList<String> list = null;\r\n\t\ttry {\r\n\t\t\tlist = load();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Load has failed.\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfor (String str : list) {\r\n\t\t\tif (start == true) { // if this is the first line passed in\r\n\t\t\t\toutput = output + str;\r\n\t\t\t\tstart = false;\r\n\t\t\t} else {\r\n\t\t\t\toutput = output + \" \" + str;\r\n\t\t\t\t// add this after the first story line has been passed in\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn output;\r\n\t}",
"public static String display(Object obj) throws JspTagException {\n if (obj == null) return \"\"; \n if (obj instanceof String) return obj.toString();\n /*\n if (obj instanceof Collection) {\n return \"FIXME\";\n }\n if (obj instanceof Map) {\n return \"FIXME\";\n } \n if (obj instanceof Iterator) {\n Iterator iter = (Iterator)obj;\n while (iter.hasNext()) {\n iter.next();\n }\n return \"FIXME\";\n } \n if (obj instanceof Enumeration) {\n Enumeration enum = (Enumeration)obj;\n while (enum.hasMoreElements()) {\n enum.nextElement();\n }\n return \"FIXME\";\n }\n */\n try {\n StringBuffer buf = new StringBuffer();\n int count = Array.getLength(obj);\n for (int i=0; i<count; i++) {\n buf.append(Array.get(obj, i).toString());\n if (i<count-1) buf.append(\"<font color='red'> • </font>\");\n }\n return buf.toString();\n } catch (IllegalArgumentException ex) {}\n throw new JspTagException(\"Bad Item\"); \n }",
"private void outputHeader(){\n System.out.printf(\"\\n%9s%11s%7s%5s%7s%8s\\n\",\"Last Name\",\"First Name\",\"Gender\",\"Rate\",\"Tenure\",\"Salary\");\n pw.printf(\"\\n%9s%11s%7s%5s%7s%8s\\n\",\"Last Name\",\"First Name\",\"Gender\",\"Rate\",\"Tenure\",\"Salary\");\n }",
"String localizedTemplateString(String templateName);",
"private void generateOutputHTML() {\n\n\t\t\n\t\ttry {\n\t\t\tScanner in = new Scanner(new File(\"data/web/template.html\"));\n\t\t\tPrintStream out = new PrintStream(\"data/web/output\"+count+\".html\");\n\t\t\tSystem.setOut(out);\n\t\t\t\n\t\t\twhile (in.hasNext()) {\n\t\t\t\tString line = in.nextLine();\n\t\t\t\tSystem.out.print(line);\n\t\t\t\t\n\t\t\t\tif (line.equals(\"<title>\")) System.out.println(\"Path #\" +count);\n\t\t\t\t\n\t\t\t\n\t\t\t\tif (line.equals(\"<body>\")) { \t\t\t\t// this is where all the good stuff goes..\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"<div class='bodyHeader'>\");\n\t\t\t\t\tSystem.out.println(\"<p><strong>in order path for driver #\" +count+ \" \" + \"</strong></p>\");\n\t\t\t\t\tSystem.out.println(\"</div>\");\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"<br><br><hr class='hrStyle'/>\");\n\t\t\t\t\t\n\t\t\t\t\t// Creating info about the path in a table format\n\t\t\t\t\tSystem.out.println(\"<div class='pathInfo'>\");\n\t\t\t\t\tSystem.out.println(\"<table class='infoTable' cellpadding='3' cellspacing='10'>\");\n\t\t\t\t\tSystem.out.println(\"<tr><td>City: </td><td> \" + list.get(0).getCity()+ \" - \" + list.get(0).getState() + \"</td></tr>\");\n\t\t\t\t\tSystem.out.println(\"<tr><td>Number of stops: </td><td> \" + (list.size()-1) + \"</td></tr>\");\n\t\t\t\t\tSystem.out.println(\"<tr><td>Store: </td><td> \" + list.get(1).getName().toUpperCase()+ \"</td></tr>\");\n\t\t\t\t\tSystem.out.println(\"</table>\");\n\t\t\t\t\t\n//TODO: get starting address --- System.out.println(\"Starting address: \" + list.get(0).getAddress());\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"</div>\");\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tlist.remove(0);\n\t\t\t\t\t\n\t\t\t\t\t//create ordered table/list of path\n\t\t\t\t\tSystem.out.println(\"<div class='pathList'>\");\t\n\t\t\t\t\tSystem.out.println(\"<table class='pathTable' cellspacing='15'>\");\n\t\t\t\t\tSystem.out.println(\"<tr><th>Order</th><th>Address</th><th></th><th>Latitude , Longitude</th></tr>\");\n\t\t\t\t\tint i = 1;\n\t\t\t\t\tfor (Location c: list) {\n\t\t\t\t\t// creating table row for each stop in route\n\t\t\t\t\t\tSystem.out.println(\"<tr>\" + \"<td>\"+(i++)+\"</td>\" + c.toHTMLString() +\"</tr>\");\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"</ol>\");\n\t\t\t\t\tSystem.out.println(\"<br>\");\n\t\t\t\t\tSystem.out.println(\"</div>\");\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tin.close();\n\t\t\tout.close();\n\t\t\t\n\t\t\t//opening html file to the default browser in the system\n\t\t\tFile htmlFile = new File(\"data/web/output\"+count+\".html\");\n\t\t\tDesktop.getDesktop().browse(htmlFile.toURI());\n\t\t}\n\t\t\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(e.getLocalizedMessage());\n\t\t} \n\t}",
"@Override\n\tpublic void print(int indent) {\n\t}",
"Expression compileTemplate(Expression exp){\r\n\t\tif (exp.isVariable()){\r\n\t\t\texp = compile(exp.getVariable());\r\n\t\t}\r\n\t\telse if (isMeta(exp)){\r\n\t\t\t// variables of meta functions are compiled as kg:pprint()\r\n\t\t\t// variable of xsd:string() is not\r\n\t\t\texp = compileTemplateMeta((Term) exp);\r\n\t\t}\r\n\t\treturn exp;\r\n\t}",
"public String print() {\n\n String returnString = \"\";\n\n if (kv1 != null) {\n returnString += kv1.toString();\n }\n\n if (kv2 != null) {\n returnString += \" \" + kv2.toString();\n }\n\n return returnString;\n }",
"String format(T value);",
"public void display() {\n\tString tm = \"{ \";\n\tIterator it = entrySet().iterator();\n\twhile(it.hasNext()) {\n\t\ttm += it.next() + \" ,\";\n\t}\n\ttm = tm.substring(0, tm.length() - 2) + \" }\";\n\tSystem.out.println(tm);\n }",
"public String toString()\r\n\t{\r\n\t\tString output = \" \";\r\n\t\tString specialModifier = \" \";\r\n\t\tif(this.isSpecial())\r\n\t\t{\r\n\t\t\tspecialModifier = \" *\";\r\n\t\t}\r\n\t\t\t\r\n\t\toutput = String.format(\"%-9s%-5s%-19s%s%.2f\",getType(), specialModifier, this.getName(),\"$ \", this.getPrice());\r\n\t\t//code to be done here\r\n\t\t\r\n\t\t\r\n\t\treturn output;\r\n\t}",
"public String print() {\n\t\tString offID = getID();\n\t\tString offName = getName();\n\t\tint offAge = getAge();\n\t\tString offState = getState();\n\t\tString data = String.format(\"ID: %-15s \\t Name: %-35s \\t Age: %-15s \\t State: %s\", offID, offName, offAge, offState);\n\t\treturn data;\n\t}",
"private static void printTerrainInfo(ParkerPaulTerrain taxable, int count) {\r\n System.out.printf(\"%1$-25s%2$17.2f%3$10.2f%4$13.3f%5$8d%6$10.2f%n\", count + \" \" + taxable.getDescription(), taxable.getArea(), taxable.getUnitPrice(), taxable.getAgroFraction(), taxable.getNumberOfTrees(), taxable.getTax());\r\n }",
"@Override\n\tpublic String generateHTML() {\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\tString level = \"\\t\";\n\t\tstringBuilder.append(level.repeat(levelCount)+\"<div>\\n\");\n\t\tlevelCount++;\n\t\tfor (HTMLGenerator htmlGenerator : tags) {\n\t\t\tstringBuilder.append(level.repeat(levelCount)+htmlGenerator.generateHTML());\n\t\t}\n\t\tstringBuilder.append(\"</div>\\n\");\n\t\treturn stringBuilder.toString();\n\t}",
"public String getTemplateName()\n {\n return MY_TEMPLATE;\n }",
"String documentFormat();",
"public String printToList() {\n\t\tif (hierarchy.equals(\"n\")) {\n\t\t\treturn \"<HTML>\" + visability + \" class \" + className\n\t\t\t\t\t+ \"{ <BR> <BR>\";\n\t\t} else if (isFinished == true) {\n\n\t\t\treturn \"}\";\n\t\t} else {\n\t\t\treturn \"<HTML>\" + visability + \" \" + hierarchy + \" class \"\n\t\t\t\t\t+ className + \"{ <BR> <BR>\";\n\t\t}\n\t}",
"public void printToScreen() {\n String type = \"\";\n switch (this.type) {\n case 1:\n type = \"Fashion\";\n break;\n case 2:\n type = \"Electronic\";\n break;\n case 3:\n type = \"Consumable\";\n break;\n case 4:\n type = \"Household appliance\";\n break;\n }\n// System.out.println(\"Type : \" + type);\n System.out.printf(\"%6d%15s%6f%20s\\n\", id, name, price, type);\n }",
"public String printTree() {\n printSideways();\n return \"\";\n }",
"private static String printNode(Node node) {\n\t\tif (node instanceof TextNode) {\n\t\t\tTextNode textNode = (TextNode) node;\n\t\t\treturn addEscapes(\n\t\t\t\t\ttextNode.getText(),\n\t\t\t\t\tEscapableArrays.textEscapable(),\n\t\t\t\t\tParserDelimiters.ESCAPE_DELIMITER.getValue()\n\t\t\t);\n\t\t}\n\t\t\n\t\tif (node instanceof ForLoopNode) {\n\t\t\treturn printForLoopNode((ForLoopNode) node);\n\t\t}\n\t\t\n\t\tif (node instanceof EchoNode) {\n\t\t\treturn printEchoNode((EchoNode) node);\n\t\t}\n\t\t\n\t\treturn \"\";\n\t}",
"private void print(String toBeWritten)\n\t\t{ pw.print(getIndentString() + toBeWritten); }",
"public String generateFromContext(Map<String, Object> mailContext, String template);",
"private String toStringBody(int depth) {\n if (depth <= 1) return \"\";\n\n String ret;\n if (operator == null) {\n ret = \"\\nOperator: null\";\n }\n else {\n ret = \"\\nOperator: \" + operator.getName().toString() + \" \"\n + operator.getUid() + \" \";\n }\n\n if (unboundedBoundSymbols!=null && unboundedBoundSymbols.length > 0) {\n ret += \"\\nUnbounded bound symbols: \";\n for (int i = 0; i < unboundedBoundSymbols.length; i++) {\n ret += Strings.indent(2,unboundedBoundSymbols[i].toString(depth-1));\n }\n }\n\n if (boundedBoundSymbols != null && boundedBoundSymbols.length > 0) {\n ret += \"\\nBounded bound symbols: \" + getNumberOfBoundedBoundSymbols();\n for (int i = 0; i < boundedBoundSymbols.length; i++) {\n if (boundedBoundSymbols[i] != null && boundedBoundSymbols[i].length > 0) {\n for (int j = 0; j < boundedBoundSymbols[i].length; j++) {\n ret += Strings.indent(2, \"\\n[\" + i + \",\" + j + \"]\" +\n Strings.indent(2,boundedBoundSymbols[i][j].toString(depth-1)));\n }\n }\n }\n }\n\n if (ranges.length > 0) {\n ret += \"\\nRanges: \";\n for (int i = 0; i < ranges.length; i++)\n ret += Strings.indent(2,(ranges[i] != null ?\n ranges[i].toString(depth-1) : \"null\" ));\n }\n\n if (tupleOrs != null && tupleOrs.length > 0 /* && tupleOrs[0] */) {\n ret += \"\\nTupleOrs: \";\n for (int i = 0; i < tupleOrs.length; i++) {\n ret += Strings.indent(2, (tupleOrs[i] ? \"\\ntrue\" : \"\\nfalse\"));\n }\n }\n\n if (operands != null) {\n if (operands.length > 0) {\n ret += \"\\nOperands: \" + operands.length;\n for (int i = 0; i < operands.length; i++) {\n ret += Strings.indent(2,\n (operands[i] == null ? \"\\nnull\" : operands[i].toString(depth-1)));\n }\n }\n }\n else {\n ret += \"\\nOperands: null\";\n }\n return Strings.indent(2, ret);\n }",
"@Override\r\n\tpublic void print() {\n\t}",
"public String toString()\r\n\t\t{\n\t\t\treturn MessageFormat.format(\"<{1}{0}>\", tagName, isEnding? \"/\" : \"\" );\r\n\t\t}",
"private String getTemplate(String templateFile) throws IOException{\r\n \t\tStringBuffer templateBuffer = new StringBuffer();\r\n \t\tFileReader in;\r\n \t\tint c;\r\n \t\tin = new FileReader(new File(templateFolder,templateFile));\r\n \r\n \t\twhile ((c = in.read()) != -1){\r\n \t\t\ttemplateBuffer.append((char) c);\r\n \t\t}\r\n \r\n \t\tString templateString = templateBuffer.toString();\r\n \t\tif (templateString.indexOf(\"startCell\") == (-1)){\r\n \t\t\treturn templateString;\r\n \t\t}else{\r\n \t\t\ttemplateString = templateString.substring(templateString.indexOf(\"startCell\") + 12, templateString.indexOf(\"<!--endCell\"));\r\n \t\t\treturn templateString;\r\n \t\t}\r\n \t}",
"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 print() {\n for (int i = 0; i < 8; i--) {\n System.out.print(\" \");\n for (int j = 0; j < 8; j++) {\n System.out.print(_pieces[i][j].textName());\n }\n System.out.print(\"\\n\");\n }\n }",
"@Override\n public void printable()\n {\n\tfor (int i = 0; i < width; i++)\n\t{\n\t for (int k = 0; k < length; k++)\n\t {\n\t\tif (k == 0 || k == length - 1)\n\t\t System.out.print(\"O \");\n\t\telse if (i == 0 || i == width - 1)\n\t\t System.out.print(\"O \");\n\t\telse\n\t\t System.out.print(\" \");\n\t }\n\n\t System.out.println();\n\t}\n }",
"PrintStatement createPrintStatement();",
"public static String printTree(Tree t) {\n\tStringWriter sw = new StringWriter();\n\tPrintWriter pw = new PrintWriter(sw);\n\tTreePrint tp = new TreePrint(\"penn\", \"markHeadNodes\", tlp);\n\ttp.printTree(t, pw);\n\treturn sw.toString();\n }",
"static public String generateHeaderAndBodyLineForPrinting(Imprimable imprimable)\r\n\t{\r\n\t\tStringBuffer buf = new StringBuffer();\r\n\t\t\r\n\t\tbuf.append(\"<!DOCTYPE html>\");\r\n\t\tbuf.append(\"<html>\");\r\n\t\tbuf.append(\"<head>\");\r\n\t\tbuf.append(\"<meta charset=\\\"utf-8\\\">\");\r\n\t\tbuf.append(\"<title></title>\");\r\n\t\tbuf.append(\"</head>\");\r\n\t\tbuf.append(generateBodyLineForPrinting(imprimable));\r\n\t\t\r\n\t\treturn buf.toString();\r\n\t}",
"@Override\n public String print() {\n return this.text + \"\\n\" + \"1. \" + this.option1.text + \"\\n\" + \"2. \" + this.option2.text;\n }",
"public String fomatToPrint() {\n\t\treturn String.format(FORMAT_FOR_PRINT, author, ibn, year);\n\t}",
"@Override\n\tpublic void print() {\n\n\t}",
"protected void print(Node node, int level, PrintWriter out)\n{\n int endtagLevel = level;\n // is there anything to do?\n if (node == null)\n {\n return;\n }\n\n for (int i=0; i<level; i++)\n {\n out.print(\" \");\n }\n int type = node.getNodeType();\n switch (type)\n {\n case Node.DOCUMENT_NODE:\n {\n out.println(docHeader);\n this.print(((Document)node).getDoctype(), 0, out);\n this.print(((Document)node).getDocumentElement(), 0, out);\n break;\n }\n\n // print document type\n case Node.DOCUMENT_TYPE_NODE:\n {\n out.println(docType);\n break;\n }\n // print element with attributes\n case Node.ELEMENT_NODE:\n {\n out.print('<');\n out.print(node.getNodeName());\n Attr attrs[] = sortAttributes(node.getAttributes());\n for (int i = 0; i < attrs.length; i++)\n {\n Attr attr = attrs[i];\n out.print(' ');\n out.print(attr.getNodeName());\n out.print(\"=\\\"\");\n out.print(attr.getNodeValue());\n out.print('\"');\n }\n\n NodeList children = node.getChildNodes();\n int len = (children != null) ? children.getLength() : 0;\n if (len == 1 \n && \n (children.item(0).getNodeType() == Node.CDATA_SECTION_NODE\n ||\n children.item(0).getNodeType() == Node.TEXT_NODE))\n {\n out.print('>');\n this.print(children.item(0), 0, out);\n endtagLevel = 0;\n }\n else\n {\n out.println('>');\n for (int i = 0; i < len; i++)\n {\n this.print(children.item(i), (level+1), out);\n }\n }\n break;\n }\n\n // handle entity nodes\n case Node.ENTITY_NODE:\n {\n out.print(\"ENTITY \");\n out.print(node.getNodeName());\n Entity ent = (Entity)node;\n String sId = ent.getSystemId();\n if (sId != null)\n {\n out.print(\" SYSTEM \\\"\" + sId + \"\\\"\");\n }\n break;\n }\n\n // handle entity reference nodes\n case Node.ENTITY_REFERENCE_NODE:\n {\n if (canonical)\n {\n NodeList children = node.getChildNodes();\n if (children != null)\n {\n int len = children.getLength();\n for (int i = 0; i < len; i++)\n {\n this.print(children.item(i), level, out);\n }\n }\n } \n else\n {\n out.print('&');\n out.print(node.getNodeName());\n out.print(';');\n }\n break;\n }\n\n // print cdata sections\n case Node.CDATA_SECTION_NODE:\n {\n // have to normalize it.\n out.print(normalize(node.getNodeValue()));\n break;\n }\n\n // print text\n case Node.TEXT_NODE:\n {\n out.print(node.getNodeValue());\n break;\n }\n\n // print processing instruction\n case Node.PROCESSING_INSTRUCTION_NODE:\n {\n out.print(\"<?\");\n out.print(node.getNodeName());\n String data = node.getNodeValue();\n if (data != null && data.length() > 0)\n {\n out.print(' ');\n out.print(data);\n }\n out.print(\"?>\");\n break;\n }\n default:\n {\n out.print(\"Unknown type \" + type);\n }\n }\n\n if (type == Node.ELEMENT_NODE)\n {\n for (int i=0; i<endtagLevel; i++)\n {\n out.print(\" \");\n }\n out.print(\"</\");\n out.print(node.getNodeName());\n out.println('>');\n }\n\n}",
"static boolean stringTemplate(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"stringTemplate\")) return false;\n if (!nextTokenIs(b, OPEN_QUOTE)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_);\n r = consumeToken(b, OPEN_QUOTE);\n p = r; // pin = 1\n r = r && report_error_(b, stringTemplate_1(b, l + 1));\n r = p && consumeToken(b, CLOSING_QUOTE) && r;\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }",
"private String print(BSTNode<T> node, int level) {\r\n\t\tString ret = \"\";\r\n\t\tif(node!= null) {\r\n\t\t\tfor(int i = 0; i< level; i++) {\r\n\t\t\t\tret += \"\\t\";\r\n\t\t\t}\r\n\t\t\tret+= node.data;\r\n\t\t\tret +=\"\\n\";\r\n\t\t\tret += print(node.left, level +1);\r\n\t\t\tret += print(node.right, level+1);\r\n\t\t}\r\n\t\treturn ret;\r\n\t}",
"@Override\n\tpublic void print() {\n\t\t\n\t}",
"@FormatMethod\n void print(String format, Object... args);",
"@Test\n public void fieldTemplate() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n // We can set a template name using by the fields. This property is used when the \"doc.AttachedTemplate\" is empty.\n // If this property is empty the default template file name \"Normal.dotm\" is used.\n doc.getFieldOptions().setTemplateName(\"\");\n\n FieldTemplate field = (FieldTemplate) builder.insertField(FieldType.FIELD_TEMPLATE, false);\n Assert.assertEquals(field.getFieldCode(), \" TEMPLATE \");\n\n builder.writeln();\n field = (FieldTemplate) builder.insertField(FieldType.FIELD_TEMPLATE, false);\n field.setIncludeFullPath(true);\n\n Assert.assertEquals(field.getFieldCode(), \" TEMPLATE \\\\p\");\n\n doc.updateFields();\n doc.save(getArtifactsDir() + \"Field.TEMPLATE.docx\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"Field.TEMPLATE.docx\");\n\n field = (FieldTemplate) doc.getRange().getFields().get(0);\n Assert.assertEquals(\" TEMPLATE \", field.getFieldCode());\n Assert.assertEquals(\"Normal.dotm\", field.getResult());\n\n field = (FieldTemplate) doc.getRange().getFields().get(1);\n Assert.assertEquals(\" TEMPLATE \\\\p\", field.getFieldCode());\n Assert.assertEquals(\"Normal.dotm\", field.getResult());\n }",
"void print() {\r\n\t\tOperations.print(lexemes, tokens);\r\n\t}",
"public static String getTemplate(String template, Pair<String, String>... replacements) {\n String ret = getTemplate(template);\n if (ret != null) {\n for (Pair<String, String> p : replacements) {\n ret = ret.replaceAll(p.fst, p.snd);\n }\n }\n return ret;\n }",
"private void tabPrinter() {\n IntStream.range(0, tabs).forEach(i -> writer.print(\" \"));\n }",
"public void printString()\r\n\t\t{\r\n\t\t\tTreeNode previousTreeNode = null; //holds the previous node\r\n\t\t\tTreeNode currentTreeNode = null; //holds current node\r\n\r\n\t\t\tData currentData = head; //start at the head of our data which is a linked list\r\n\t\t\twhile (currentData != null) //while the currentData is not null\r\n\t\t\t{\r\n\t\t\t\tcurrentTreeNode = currentData.getLT(); //get the Less Than tree\r\n\t\t\t\tif (currentTreeNode != previousTreeNode)\r\n\t\t\t\t\tcurrentTreeNode.printString(); //print the Less Than tree\r\n\t\t\t\tpreviousTreeNode = currentTreeNode;\r\n\r\n\t\t\t\tcurrentData.getWord(); //get the current word\r\n\t\t\t\tSystem.out.printf(\"%-20s\", currentData.getWord()); //print the current word\r\n\t\t\t\tArrayList locations = currentData.getLocations(); //get the word's locations in the file\r\n\t\t\t\tfor (int i = 0; i < locations.size(); i++) //print all of those\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.printf(\" (%s,%s)\", ((Point) locations.get(i)).x, ((Point) locations.get(i)).y);\r\n\t\t\t\t\tif ((((i + 1) % 8) == 0) && ((i + 1) != locations.size())) //only print 8 items per line\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.printf(\"\\n%-20s\", \"\\\"\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(); //print a newline\r\n\r\n\t\t\t\tcurrentTreeNode = currentData.getGT(); //get the Greater Than tree\r\n\t\t\t\tif (currentTreeNode != previousTreeNode)\r\n\t\t\t\t\tcurrentTreeNode.printString(); //print the Greater Than tree\r\n\t\t\t\tpreviousTreeNode = currentTreeNode;\r\n\t\t\t\tcurrentData = currentData.nextData();\r\n\t\t\t}\r\n\t\t}",
"public String generateContents(Collection<Reference> references) {\n String contents = references.stream().map(\n ref -> formatReference(ref)\n ).collect(Collectors.joining(\"\\n\"));\n\n return escapeScandicCharacters(contents);\n }",
"public void print(){\n\t\tif(isEmpty()){\n\t\t\tSystem.out.printf(\"Empty %s\\n\", name);\n\t\t\treturn;\n\t\t}//end if\n\n\t\tSystem.out.printf(\"The %s is: \", name);\n\t\tListNode current = firstNode;\n\n\t\t//while not at end of list, output current node's data\n\t\twhile(current != null){\n\t\t\tSystem.out.printf(\"%s \", current.data);\n\t\t\tcurrent = current.nextNode;\n\t\t}//end while\n\n\t\tSystem.out.println(\"\\n\");\n\t}",
"public List<String> stringFormat(int depth) {\n\t\tList<String> out = new ArrayList<String>();\n\t\tString prepend = new String(new char[depth])\n\t\t\t\t.replace('\\0', '\\t');\n\n\t\tout.add(prepend + \"{\\n\");\n\t\tout.add(prepend + \"\\tid: \" + id + \",\\n\");\n\t\tout.add(prepend + \"\\tuname: \" + uname + \",\\n\");\n\t\tout.add(prepend + \"\\tteam: \" + t + \",\\n\");\n\t\tout.add(prepend + \"\\tcards: \" + numCards + \",\\n\");\n\t\tout.add(prepend + \"}\");\n\n\t\treturn out;\n\t}",
"public void printStack(){\n\t\tswitch (type) {\n\t\tcase 's' : {\n\t\t\tSystem.out.print(\"[XX]\");\n\t\t}\n\t\tbreak;\n\t\tcase 'w' : {\n\t\t\tSystem.out.print(this.peek().toString());\n\t\t}\n\t\tbreak;\n\t\tcase 't' : {\n\t\t\tStack<Card> temp = new Stack<Card>();\n\t\t\tCard currentCard = null;\n\t\t\tString fullStack = \"\";\n\t\t\twhile(!this.isEmpty()){\n\t\t\t\ttemp.push(this.pop());\n\t\t\t}\n\t\t\twhile(!temp.isEmpty()){\n\t\t\t\tcurrentCard = temp.pop();\n\t\t\t\tfullStack += currentCard.isFaceUp() ? currentCard.toString() : \"[XX]\";\n\t\t\t\tthis.push(currentCard);\n\t\t\t}\n\t\t\tSystem.out.println(fullStack);\n\t\t}\n\t\tbreak;\n\t\tcase 'f' : {\n\t\t\tSystem.out.print(this.peek().toString());\n\t\t}\n\t\tbreak;\n\t\t}\n\t}",
"public static void main(String args[]) {\n System.out.println(\"test program for template printing\");\n String kk = \"src/Printer.java\";\n if (true || args.length > 0) {\n File file = new File(kk);\n System.out.println(\"printing file: \" + file.getName());\n if (file.exists()) {\n // this will be the standard future use of this class: fire and\n // forget\n new Printer(file);\n } else {\n System.out.println(\"file \" + file.getAbsolutePath()\n + \" doesn't exist!\");\n }\n } else {\n System.out.println(\"usage: <filename>\");\n }\n\n }"
] |
[
"0.72115546",
"0.6712386",
"0.6419044",
"0.6238163",
"0.61529976",
"0.61394274",
"0.6041774",
"0.60311675",
"0.5824609",
"0.5791506",
"0.5753546",
"0.5732949",
"0.5674613",
"0.5665229",
"0.5663164",
"0.564755",
"0.56302047",
"0.56122863",
"0.5605861",
"0.5602077",
"0.5600834",
"0.5567506",
"0.55420625",
"0.55177224",
"0.5510809",
"0.5505382",
"0.54780895",
"0.54634064",
"0.54593956",
"0.5459277",
"0.5452596",
"0.5436004",
"0.53898907",
"0.5389753",
"0.5339278",
"0.53066736",
"0.5282722",
"0.52822924",
"0.52820355",
"0.52606297",
"0.52295744",
"0.5227604",
"0.5225063",
"0.52222174",
"0.5216244",
"0.5213472",
"0.5207595",
"0.51702976",
"0.516796",
"0.5160498",
"0.5154314",
"0.5152311",
"0.514806",
"0.51439714",
"0.51413774",
"0.51397413",
"0.51287687",
"0.5112946",
"0.5109493",
"0.51083136",
"0.5105384",
"0.50988895",
"0.50936234",
"0.50765413",
"0.5072237",
"0.50589144",
"0.5058537",
"0.5054698",
"0.5053612",
"0.5052678",
"0.5041738",
"0.50413406",
"0.5038968",
"0.50357586",
"0.5033861",
"0.5030586",
"0.5027484",
"0.5026757",
"0.5026146",
"0.50212556",
"0.5016564",
"0.50164056",
"0.50151634",
"0.5005446",
"0.500435",
"0.49992093",
"0.49959996",
"0.49847576",
"0.49786243",
"0.49710864",
"0.49691838",
"0.49667162",
"0.49478492",
"0.49427712",
"0.49408475",
"0.4940134",
"0.49326643",
"0.49298754",
"0.4929035",
"0.49254206"
] |
0.61693937
|
4
|
Helper function to print a pattern in a more readable format
|
public String patternToString(List<PatternItem> list) {
StringBuilder builder = new StringBuilder();
for (PatternItem item : list) {
switch (item.getType()) {
case BASE:
builder.append((char) item.getValue());
break;
case JUMP:
builder.append('!').append(item.getValue());
break;
case SEARCH:
builder.append('[').append('?').append(item.getSearch()).append(']');
break;
case OPEN:
builder.append('(');
break;
case CLOSE:
builder.append(')');
break;
}
}
return builder.toString();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String toString() {\n/* 664 */ return this.pattern;\n/* */ }",
"public String toString() {\n/* 666 */ return this.pattern;\n/* */ }",
"public void DisplayPatterns(){\r\n\t\t\tPattern Current = First;\r\n\t\t\twhile( Current != null ){\r\n\t\t\t\tCurrent.Display();\r\n\t\t\t\tCurrent = Current.Next;\r\n\t\t\t\t}\r\n\t\t\t}",
"public static void main(String[] args)\r\n\t{\r\n\t\tSystem.out.println(\"1st pattern\");\r\n\t\tfor(int i=0;i<=8;i++)\r\n\t\t{\r\n\t\t\tfor(int j=i;j<8;j++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t}\r\n\t\t/*\r\n\t\t*\r\n \t\t**\r\n\t\t***\r\n\t\t****\r\n\t\t*****\r\n\t\t******\r\n\t\t*******\r\n\t\t********\r\n\t\t */\r\n\t\tSystem.out.println(\"2nd pattern\");\r\n\t\tfor(int i=8;i>=0;i--)\r\n\t\t{\r\n\t\t\tfor(int j=i;j<8;j++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t/* for printing this pattern\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\t */\r\n\t\tSystem.out.print(\"3rd pattern\");\r\n\t\tfor(int i=0;i<=8;i++)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<=8;j++)\r\n\t\t\t{\r\n\t\t\t\tif(i<j || j<8-i)\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\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t/* for printing 4th pattern \r\n\t\t ********* \r\n\t\t ******* \r\n\t\t ***** \r\n\t\t *** \r\n\t\t * \r\n\t\t */\r\n\t\tSystem.out.println(\"4th pattern\\n\\n\");\r\n\t\tfor(int i=8;i>=0;i--)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<=8;j++)\r\n\t\t\t{\r\n\t\t\t\tif(i<j || j<8-i)\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\t\r\n\t\t}\r\n\t\tSystem.out.println(\"5th pattern \");\r\n\t\tfor(int i=1;i<=10;i++)\r\n\t\t{\r\n\t\t\tfor(int j=1;j<=10;j++)\r\n\t\t\t{\r\n\t\t\t\tif(i<j || i==j)\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 if(j>i || j<10-i)\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\t}",
"public static void printPattern(int n){\n int c=1;\n for(int i=1;i<=(n+1)/2;i++){\n for(int j=1;j<=n;j++){\n System.out.print(c+\" \");\n c++;\n }\n c=c+n;\n System.out.println();\n }\n if(n%2==0)\n c=c-n;\n else\n c=c-3*n;\n for(int i=(n+1)/2;i<n;i++){\n for(int j=1;j<=n;j++){\n System.out.print(c+\" \");\n c++;\n }\n c=c-3*n;\n System.out.println();\n }\n\n\t}",
"public String toString() {\n StringBuffer buffer = new StringBuffer();\n\n for (int i = 0; i < patterns.length; i++) {\n buffer.append(patterns[i]);\n buffer.append(\"\\n\\n\");\n }\n return buffer.toString();\n }",
"@Override\n public String toString() {\n String pattern = printerParser.toString();\n return pattern.startsWith(\"[\") ? pattern : pattern.substring(1, pattern.length() - 1);\n }",
"public static void printAllCombinations(String pattern)\n {\n // create an empty stack (we can also use set, queue, vector\n // or any other container)\n Stack<String> stack = new Stack();\n stack.push(pattern); // push the pattern into the stack\n \n int index;\n \n // do till stack is not empty\n while (!stack.empty())\n {\n // pop string from stack and process it\n String curr = stack.pop();\n \n // index stores position of first occurrence of wildcard\n // pattern in curr\n if ((index = curr.indexOf('?')) != -1)\n {\n // replace '?' with 0 and 1 and push it to the stack\n for (char ch = '0'; ch <= '1'; ch++)\n {\n curr = curr.substring(0, index) + ch + \n curr.substring(index + 1);\n stack.push(curr);\n }\n }\n \n // If no wildcard pattern is found, print the string\n else\n System.out.println(curr);\n }\n }",
"public String print(int format);",
"public static void main(String[] args) {\n System.out.println(\"1.)\");\n int i,j;\n int n=6;\n for(i =1;i<=n;i++){\n\n for(j=1;j<=n-i;j++){\n System.out.print(\" \");\n }\n for(j=1;j<=i;j++){\n System.out.print(\"* \");\n }\n System.out.println();\n }\n\n // pattern 2\n int num=1;\n System.out.println(\"2.)\");\n for(i =1;i<=n;i++){\n\n for(j=1;j<=n-i;j++){\n System.out.print(\" \");\n }\n for(j=1;j<=i;j++){\n System.out.print(num+\" \");\n num=num+2;\n }\n System.out.println();\n }\n //pattern3\n System.out.println(\"3.)\");\n int rows = 2*n-1;\n for(i=1;i<=rows;i++){\n\n if(i<=n) {\n for (j = 1; j <= i; j++) {\n System.out.print(\"* \");\n }\n }\n else{\n for (j=1;j<=rows-i+1;j++)\n {\n System.out.print(\"* \");\n }\n }\n System.out.println();\n\n }\n\n //pattern4\n System.out.println(\"4.)\");\n System.out.println(\"*\");\n\n for(i=2;i<=n-1;i++){\n System.out.print(\"* \");\n for(j=1;j<=i-2;j++){\n System.out.print(\" \");\n }\n System.out.print(\" *\");\n System.out.println();\n\n }\n for(i=1;i<=n;i++){\n System.out.print(\"* \");\n }\n }",
"public String toPattern() {\n\t\treturn pattern;\n\t}",
"public void printNumberPattern1(int number) {\n\t\t//Outer loop for iterating till number times \n\t\tfor (int counter = 0; counter < number ; counter++ ) {\n\t\t\t//Inner loop for iterating and printing number pattern \n\t\t\tfor(int printNumber = number-counter ; printNumber <= number ; printNumber++ ) {\n\t\t\t\tSystem.out.print(printNumber);\n\t\t\t}\n\t\t\t\n\t\t\t//Moving to next line and incrementing count \n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t}",
"private static String format(String pattern, Object... params) {\n\t\tStringBuffer result = new StringBuffer();\n\t\tnew MessageFormat(pattern, getLocale()).format(params, result, null);\n\t\treturn result.toString();\n\t}",
"public static void pattern12(int input){\n\t\tfor(int i= 1;i <= input;i++){\n\t\t\tfor(int j=i;j>1;j--){\n\t\t\t\tSystem.out.print(j+\" \");\n\t\t\t}\n\t\t\tfor(int k=1;k<=i;k++){\n\t\t\t\tSystem.out.print(k+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public String getPattern() {\r\n \treturn pattern;\r\n }",
"public String toPattern() {\n return toPattern(false);\n }",
"public String getPattern () {\n return pattern;\n }",
"public String getPattern() {\r\n\t\treturn pattern;\r\n\t}",
"public String getPattern() {\n\treturn pattern;\n }",
"public String getPattern() {\n return pattern;\n }",
"public static void main(String[] args) {\n\t\t\n\t\tfor(int i=1;i<6;i++)\n\t\t\t{\n\t\t\t\tfor(int j=1;j<=i;j++)\n\t\t\t\t\tSystem.out.print(i);\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t\n\t\t//pattern 1 23 456 789\n\t\tint k=1;\n\t\tfor(int i=0;i<4;i++)\n\t\t{\n\t\t\tfor(int j=0;j<=i;j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(k);\n\t\t\t\tk++;\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\n\t}",
"public static void pattern7(int input){\n\t\tfor(int i=1;i<=input;i++){\n\t\t\tfor(int j=1;j<=i;j++){\n\t\t\t\tSystem.out.print(j+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public static String format(int val, String pattern)\n {\n return format(Integer.valueOf(val), pattern);\n }",
"@VTID(8)\r\n java.lang.String format();",
"public static void pattern6(int input){\n\t\tint counter=1;\n\t\tfor(int i=1;i<=input;i++){\n\t\t\tfor(int j=counter;j<=(i*(i+1)/2);j++){\n\t\t\t\tSystem.out.print(counter++ + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public String getPattern() {\n\t\treturn pattern;\n\t}",
"public String getPattern() {\n\t\treturn pattern;\n\t}",
"public String printFormat(){\n return \"The workout: \" + getName() + \" should be done for \" + getSets() + \" sets and in each set should be \"\n + getReps() + \" reps.\";\n }",
"public static String format(Object val, String pattern)\n {\n try\n { \n\t return format(val, pattern, null, null);\n }\n catch(Exception ex)\n {\n\t log.error(ex, \"[NumberUtil] Error caught in method format\");\n\t return \"\";\n }\n }",
"private String printRoute() {\n String r = String.valueOf(this.route.get(0));\n int index = 1;\n while (index < this.route.size()) {\n r = r + \" - \" + this.route.get(index);\n index++;\n }\n return r;\n }",
"public RegexFormatter(Pattern pattern) {\n this();\n setPattern(pattern);\n }",
"public static void pattern10(int input){\n\t\tfor(int i= input;i >0;i--){\n\t\t\tfor(int j=i;j<=input;j++){\n\t\t\t\tSystem.out.print(j+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public static String pattern(int n) {\n\t\tif(n < 1) {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\tString sa[] = new String[n];\n\t\tString s = \"\";\n\n\t\tint x = 0;\n\t\tsa[0] = Integer.toString(n);\n\t\twhile(x < sa.length-1) {\n\t\t\tsa[x+1] = sa[x]+Integer.toString(n-1);\n\t\t\tx++; n--;\n\t\t}\n\t\t\n\n\t\tint i = sa.length;\n\t\t//int i =0;\n\t\twhile(i > 0) {\n\t\t\t//if(s.substring(0, i-1).length() >= m.length()) \n\t\t\t\t//s += \"\\n\"+s.substring(0, i-1);\n\t\t\t//s += \"\\n\"+s.substring(0,i-1);\n\t\t\ts += sa[i-1]+\"\\n\";\n\t\t\ti--;\n\t\t}\t\n\t\t\n\t\t\n\t\treturn s.trim();\n\t}",
"public final String getPattern() {\n/* 187 */ return this.m_pattern;\n/* */ }",
"public String listPatterns() {\n return \"Full list of patterns\";\n }",
"protected abstract String format();",
"public Pattern getPattern(){\n\t\treturn pattern;\n\t}",
"public String getPattern() {\r\n return this.currPattern;\r\n }",
"public static void pattern9(int input){\n\t\tfor(int i= 1;i <= input;i++){\n\t\t\tfor(int j=i;j<=input;j++){\n\t\t\t\tSystem.out.print(j+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"private String printRoute(Rota r) {\n StringBuilder s = new StringBuilder();\n\n for (String d : r.getPontos()) {\n s.append(d + \"->\");\n }\n s = s.replace(s.length() - 2, s.length(), \".\");\n\n return s.toString();\n }",
"public Pattern getPattern() {\n return pattern;\n }",
"@Override\n public void print() {\n for (int i = 1; i <= itertion; i++) {\n if(n <0){\n this.result = String.format(\"%-3d %-3s (%-3d) %-3s %d \", i, \"*\", n, \"=\", (n * i));\n System.out.println(this.result);\n }else {\n this.result = String.format(\"%-3d %-3s %-3d %-3s %d \", i, \"*\", n, \"=\", (n * i));\n System.out.println(this.result);\n }\n }\n }",
"Pattern pattern() {\r\n\t\tArrayList<String> patternSpecs = new ArrayList<String>();\r\n\t\t\r\n\t\tif (delimiters.size() > 0) {\r\n\t\t delimiters.forEach(d -> patternSpecs.add(d.pattern().pattern()));\r\n\t\t} else {\r\n\t\t\tpatternSpecs.add(\"^.*$\");\r\n\t\t}\r\n\t\t\r\n\t\tString completeSpec = Joiner.on(\"|\").join(patternSpecs); // \r\n\t\t\r\n\t\tPattern pattern = Pattern.compile(completeSpec);\r\n\t\t\r\n\t\treturn pattern;\r\n\t}",
"public static void pattern1(int input) {\n\n\t\tint c = 0;\n\t\tfor (int i = 1; i <= input; i++) {\n\t\t\tif (i % 2 != 0) {\n\t\t\t\tfor (int j = 0; j < input; j++) {\n\t\t\t\t\tc++;\n\t\t\t\t\tSystem.out.print(c + \" \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t} else {\n\t\t\t\tc += input;\n\t\t\t\tfor (int j = c; j > c - input; j--) {\n\t\t\t\t\tSystem.out.print(j + \" \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t}",
"private String getPatternRatio() {\n if(mAppUi.isZoomSwitchSupport() && isAngleCamera()){\n return \"x\" + String.format(Locale.ENGLISH, PATTERN, getAngleRatio(mCurZoomRatio));\n }\n //add by huangfei for zoom switch end\n return String.format(Locale.ENGLISH, PATTERN, mCurZoomRatio) ;\n }",
"static void print4(int n) {\n\t\tint blank = 0;\n\t\tint star = (n/2) + 1;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 0; j < blank; j++) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor (int j = 0; j < Math.abs(star); j++) {\n\t\t\t\tSystem.out.print(\"*\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tstar--;\n\t\t\tif(star == 0) {\n\t\t\t\tstar = -2;\n\t\t\t}\n\t\t\tblank++;\n\t\t\tif(blank > n/2)\n\t\t\t\tblank = n >> 1;\n\t\t}\n\t}",
"private static String format(final String pattern, final Object... args) {\n\t\tString message = pattern;\r\n\t\tif (Constants.ZERO < args.length) {\r\n\t\t\ttry {\r\n\t\t\t\tmessage = MessageFormat.format(pattern, args);\r\n\t\t\t} catch (final Exception ex) {\r\n\t\t\t\tmessage = pattern;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn message;\r\n\t}",
"public String getPatternDescription(int id) {\n TokenPattern pattern;\n\n pattern = stringDfaMatcher.getPattern(id);\n if (pattern == null) {\n pattern = nfaMatcher.getPattern(id);\n }\n if (pattern == null) {\n pattern = regExpMatcher.getPattern(id);\n }\n return (pattern == null) ? null : pattern.toShortString();\n }",
"public AvalonFormatter( final String pattern )\n {\n this( pattern, DEFAULT_STACK_DEPTH, DEFAULT_PRINT_CASCADING );\n }",
"public int getPattern() {\n return this.pattern;\n }",
"public static void main(String[] args) {\n\t\tint num=4;\r\n\t\tfor(int i=0;i<=num;i++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor(int j=0;j<=num;j++) {\r\n\t\t\t\t\t\tif(j<=i && i+j>=num) \r\n\t\t\t\t\t\r\n\t\t\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t\t\t}\r\n\t\t\t}",
"public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\t// Get the number of rows from the user\n\t\tSystem.out.println(\"Enter the number of rows to print the pattern \");\n\t\tint rows = scanner.nextInt();\n\t\tSystem.out.println(\"**Printing the pattern...**\");\n\t\tfor(int i = 1; i <= rows; i++) {\n\t\t\tfor(int j = 1; j <= i; j++) {\n\t\t\t\tSystem.out.print(j + \"\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public static void pattern7(int n) {\r\n\r\n\t\tfor (int i = 1; i <= 7; i++) {\r\n\t\t\tfor (int j = 1; j <= i; j++) {\r\n\t\t\t\tSystem.out.print(j + \" \");\r\n\t\t\t}\r\n\t\t\tint temp = i;\r\n\t\t\tif (temp > 1 && temp<=7) {\r\n\t\t\t\tfor (int k = i - 1; k > 0; k--) {\r\n\t\t\t\t\tSystem.out.print(k + \" \");\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}",
"public String getPrintableFormat() {\n String output = new String(\"Articoli del gruppo \" + groupName + \":\\n\");\n for (int i = 0; i < list.size(); i++) {\n Article article = list.get(i);\n output += String.format(\"%2d %s\\n\",i,article.getPrintableFormat());\n }\n return output;\n }",
"public static void main(String[] args) \n\t{\n\t\t\n\t\tfor(int i=5;i>=1;i--) \n\t\t{\n\t\t\tfor(int j=1;j<=5-i;j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\n\t\t\t}\n\t\t\tfor(int k=1;k<=i;k++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"*\"+\" \");\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t// -------Pattern 5-------\n//\t\tfor(int i=1;i<=5;i++)\n//\t\t{\n//\t\t\tfor(int j=1;j<=5-i;j++) \n//\t\t\t{\n//\t\t\t\tSystem.out.print(\" \");\n//\t\t\t\t\n//\t\t\t}\n//\t\t\t\n//\t\t\tfor(int k=1;k<=i;k++)\n//\t\t\t{\n//\t\t\t\tSystem.out.print(\"*\"+\" \");\n//\t\t\t}\n//\t\t\t\n//\t\t\tSystem.out.println();\n//\t\t}\n\n\n\t}",
"public void setPattern(Pattern pattern) {\n this.pattern = pattern;\n }",
"public String print(){\r\n\t\treturn String.format(\"%9d\\t%-5s\\t\\t%-3d\\t\\t%-15s\",\r\n\t\t\t\tthis.trackNumber, \r\n\t\t\t\tthis.engineNumber, \r\n\t\t\t\tthis.numRailCars, \r\n\t\t\t\tthis.destCity);\r\n\t\t}",
"public static void main(String[] args) {\n\t\tint q = 1;\n\t\tint\tw = 0;\n\t\tint n = 100;\n\n\t\tint[] array1 = new int[40];\n\t\tSystem.out.print(\"The pattern output is shown : \");\n\n\t\twhile (n > 0) {\n\t\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t\tSystem.out.print(n);\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t\tarray1[w] = n;\n\t\t\t\tn = n-q;\n\t\t\t\tw++;\n\n\t\t\t}\n\t\t\tq++;\n\t\t}\n\n\n\t}",
"public String toString()\n {\n try\n {\n return Native.patternToString(Context().nCtx(), NativeObject());\n } catch (Z3Exception e)\n {\n return \"Z3Exception: \" + e.getMessage();\n }\n }",
"public static void main(String[] args) {\n\n\t\tint i, j, k;\n\n\t\tfor (i = 1; i <= 9; i++)\n\t\t{\n\t\t for (j = 1; j <= i; ++j)\n\t\t System.out.print(j);\n\n\t\t for (k = 9 - i; k >= 1; k--)\n\t\t System.out.print(\"*\");\n\n\t\t System.out.println(\"\");\n\t\t}\n\n\t}",
"protected String formatPatternRun( LogEvent event, PatternFormatter.PatternRun run )\n {\n switch( run.m_type )\n {\n case TYPE_CLASS:\n return getClass( run.m_format );\n default:\n return super.formatPatternRun( event, run );\n }\n }",
"void format();",
"public void formatPrint() {\n\t\tSystem.out.printf(\"%8d \", codigo);\n\t\tSystem.out.printf(\"%5.5s \", clase);\n\t\tSystem.out.printf(\"%5.5s \", par);\n\t\tSystem.out.printf(\"%5.5s \", nombre);\n\t\tSystem.out.printf(\"%8d \", comienza);\n\t\tSystem.out.printf(\"%8d\", termina);\n\t}",
"public void setPattern (String pattern) {\n this.pattern = pattern;\n }",
"private static void writeRiddle(int[][] a) {\n for (int i=0; i<9; ++i) {\n for (int j=0; j<9; ++j) {\n System.out.print(a[i][j]+ \" \");\n if ((j+1)%3==0) System.out.print(\" | \");\n }\n \n if ( (i+1)%3==0 && i!=8 ) {\n System.out.print(\"\\n--------------------------\");\n }\n \n System.out.print(\"\\n\");\n }\n \n System.out.println(\"\\n\");\n }",
"public static void main(String[] args) {\n\n\n for(int a=0; a<7;a++){\n for(int b=0;b<7-a;b++){\n System.out.print(\" \");\n }\n for(int c=0; c<=a;c++){\n System.out.print(\"* \");\n }\n System.out.println(\" \");\n }\n\n }",
"static void printPossible (int[][][] P){\n for(int i=1; i<P.length; i++){\n for (int j=1; j<P[i].length; j++){\n if (P[i][j][0]==0){\n System.out.print(\"- \");\n } else System.out.print(P[i][j][0]+\" \");\n if ( j==3) System.out.print(\" \");\n if ( j==6) System.out.print(\" \");\n if ( j==9) System.out.print(\"\\n\");\n }\n if ( i==3) System.out.print(\"\\n\");\n if ( i==6) System.out.print(\"\\n\");\n }\n }",
"private String toPattern(boolean localized) {\n StringBuffer result = new StringBuffer();\n for (int j = 1; j >= 0; --j) {\n if (j == 1)\n appendAffix(result, posPrefixPattern, positivePrefix, localized);\n else\n appendAffix(result, negPrefixPattern, negativePrefix, localized);\n int i;\n int digitCount = useExponentialNotation ? getMaximumIntegerDigits() : Math.max(groupingSize, getMinimumIntegerDigits()) + 1;\n for (i = digitCount; i > 0; --i) {\n if (i != digitCount && isGroupingUsed() && groupingSize != 0 && i % groupingSize == 0) {\n result.append(localized ? symbols.getGroupingSeparator() : PATTERN_GROUPING_SEPARATOR);\n }\n result.append(i <= getMinimumIntegerDigits() ? (localized ? symbols.getZeroDigit() : PATTERN_ZERO_DIGIT) : (localized ? symbols.getDigit()\n : PATTERN_DIGIT));\n }\n if (getMaximumFractionDigits() > 0 || decimalSeparatorAlwaysShown)\n result.append(localized ? symbols.getDecimalSeparator() : PATTERN_DECIMAL_SEPARATOR);\n for (i = 0; i < getMaximumFractionDigits(); ++i) {\n if (i < getMinimumFractionDigits()) {\n result.append(localized ? symbols.getZeroDigit() : PATTERN_ZERO_DIGIT);\n } else {\n result.append(localized ? symbols.getDigit() : PATTERN_DIGIT);\n }\n }\n if (useExponentialNotation) {\n result.append(localized ? symbols.getExponentialSymbol() : PATTERN_EXPONENT);\n for (i = 0; i < minExponentDigits; ++i)\n result.append(localized ? symbols.getZeroDigit() : PATTERN_ZERO_DIGIT);\n }\n if (j == 1) {\n appendAffix(result, posSuffixPattern, positiveSuffix, localized);\n if ((negSuffixPattern == posSuffixPattern && // n == p == null\n negativeSuffix.equals(positiveSuffix))\n || (negSuffixPattern != null && negSuffixPattern.equals(posSuffixPattern))) {\n if ((negPrefixPattern != null && posPrefixPattern != null && negPrefixPattern.equals(\"'-\" + posPrefixPattern))\n || (negPrefixPattern == posPrefixPattern && // n ==\n // p ==\n // null\n negativePrefix.equals(symbols.getMinusSign() + positivePrefix)))\n break;\n }\n result.append(localized ? symbols.getPatternSeparator() : PATTERN_SEPARATOR);\n } else\n appendAffix(result, negSuffixPattern, negativeSuffix, localized);\n }\n return result.toString();\n }",
"public static String format(double val, String pattern)\n {\n return format(Double.valueOf(val), pattern);\n }",
"public static String format(float val, String pattern)\n {\n return format(Float.valueOf(val), pattern);\n }",
"String toLocalizedPattern() {\n return toPattern(true);\n }",
"public static String format(final String _pattern, final Object _argument) {\r\n return MessageFormat.format(_pattern, new Object[] { _argument });\r\n }",
"public static void m13() {\r\n\tfor(int i=1;i<=4;i++) {\r\n\t\tfor(int j =1;j<=(4-i);j++) {\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t\tchar ch ='A';\r\n\t\tfor(int j=1;j<=i;j++) {\r\n\t\t\tSystem.out.print(ch+\" \");\r\n\t\t\tch++;\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}\r\n}",
"public static void m12() {\r\n\tint m =1;\r\n\tfor(int i =1;i<=4;i++) {\r\n\t\tfor(int j =1;j<=(4-i);j++) {\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t\tchar ch ='A';\r\n\t\tfor(int k =1;k<=m;k++) {\r\n\t\t\tSystem.out.print(ch);\r\n\t\t\tch++;\r\n\t\t}\r\n\t\tm+=2;\r\n\t\tSystem.out.println();\r\n\t}\r\n}",
"public static void fourthProgram() {\n\t\tfor (int i = 1; i <= 4; i++) {\n\t\t\tfor (int j = 4; j > i; j--) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor (int k = 1; k <= i; k++) {\n\t\t\t\tSystem.out.print(\"*\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"private String translatePattern(String pattern) {\r\n StringBuffer sb = new StringBuffer();\r\n boolean escaped = false;\r\n for (int i = 0; i < pattern.length(); i++) {\r\n char c = pattern.charAt(i);\r\n if (c == '\\\\') {\r\n sb.append('\\\\');\r\n escaped = true;\r\n continue;\r\n }\r\n if (escaped) {\r\n sb.append(c);\r\n }\r\n else if (c == '*') {\r\n sb.append('%');\r\n }\r\n else if (c == '?') {\r\n sb.append('_');\r\n }\r\n else {\r\n if ((c == '%') || (c == '_')) {\r\n sb.append('\\\\');\r\n }\r\n sb.append(c);\r\n }\r\n\r\n escaped = false;\r\n }\r\n return sb.toString();\r\n }",
"public final Pattern getPattern() {\n return pattern;\n }",
"private void toStringHelper(StringBuffer buffer, int level)\n {\n\t for ( int i = 0; i < level; i++ )\n\t buffer.append(\" \");\n\t \n\t if ( this.operator != null )\n buffer.append(\"opcode:\" + this.operator + \" \");\n\t \n\t if ( this.arity != null )\n\t buffer.append(\"Arity: \" + this.arity.m_minimum + \":\" + this.arity.m_maximum + \" \");\n \n\t if ( finiteCostMatch != null )\n\t buffer.append(\"cost:\" + finiteCostMatch + \" \");\n\t \n for ( JBurgPatternMatcher matcher: this.subPatterns )\n {\n buffer.append(\"\\n\");\n matcher.toStringHelper(buffer, level+1);\n }\n \n buffer.append(\"\\n\");\n\n }",
"public static void main(String[] args) {\n\r\n\t\t\r\n\t\tfor(int i=0;i<7;i++){\r\n\t\t\tfor(int j=0;j<4;j++){\r\n\t\t\t\t\r\n\t\t\t\tif((i==0 || i==3 || i==6) && j<4){\r\n\t\t\t\t\tSystem.out.print(\" * \");\r\n\t\t\t\t}else if((j==0 || j==3) && i<7){\r\n\t\t\t\t\tSystem.out.print(\" * \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"public String print(){\r\n\t\t\r\n\t\treturn String.format(\"%9d\\t%-5s\\t\\t%-3d\\t\\t%-15s\",\r\n\t\t\t\tthis.engineNumber, \r\n\t\t\t\tthis.companyName, \r\n\t\t\t\tthis.numberOfRailCars, \r\n\t\t\t\tthis.destinationCity);\r\n\t}",
"public void printPatch() {\r\n\t\t\tfor(int i =0; i <numOfPathes; i++)\r\n\t\t\t{\r\n\t\t\t\tfor(int j =0; j <numOfPathes; j++)\r\n\t\t\t\t{\t\t\t\t\r\n\t\t\t\t\tif (patches[i][j].getPerson().size() > 0) {\r\n\t\t\t\t\t\tif (patches[i][j].isCop()) {\r\n\t\t\t\t\t\t\tSystem.out.print(\"\\t*\");\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t} else if (patches[i][j].isActiveAgent()) {\r\n\t\t\t\t\t\t\tSystem.out.print(\"\\tA\");\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tint jail = ((Agent)patches[i][j].getPerson().get(0))\r\n\t\t\t\t\t\t\t\t\t.returnJailTerm();\r\n\t\t\t\t\t\tSystem.out.print(\"\\t\" + jail);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"\\t \");\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\tSystem.out.println(\"------------------------------------\");\r\n\t\t}",
"public static void main(String[] args) {\n\r\n\t\t\r\n\t\tint n = 7;\r\n\t\tfor (int i = n; i >= 0; i--) {\r\n\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t for(int j=0; j<n-i; j++) {\r\n\t\t\t \r\n\t\t\t System.out.print(\" \");\r\n\t\t\t \r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t \r\n\r\n\t\t\tfor (int j = n; j >= n-i; j--) {\r\n\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t}\r\n\r\n\t\t\r\n\t}",
"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 main(String[] args) {\n\t\t\r\n\t\tint k,n=10;\r\n\t\tk=n-1;\r\n\t\tfor(int i=0;i<=n;i++)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<=k;j++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\tk=k-1;\r\n\t\t\tfor(int j=0;j<=i;j++)\r\n\t\t\t\tSystem.out.print(\"*\"+\" \");\r\n\t\t\tSystem.out.println(\"\\r\");\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void printMe(int i, int num, int j, int k, StringBuffer strText) {\n\t\tif (i == k || j == k)\r\n\t\t\tstrText.append(\"*\");\r\n\t\telse\r\n\t\t\tstrText.append(\" \");\r\n\r\n\t}",
"@Override\n public DescribeLogPatternResult describeLogPattern(DescribeLogPatternRequest request) {\n request = beforeClientExecution(request);\n return executeDescribeLogPattern(request);\n }",
"public void print()\n {\n System.out.println();\n for (int i = 0; i < 6; i++) {\n for (int j = 0; j < 6; j++) {\n int index=0;\n if(j>2)\n index++;\n if(i>2)\n index+=2;\n char c='○';\n if(blocks[index].getCells()[i%3][j%3]==CellType.Black)\n c='B';\n if(blocks[index].getCells()[i%3][j%3]==CellType.Red)\n c='R';\n System.out.print(c+\" \");\n if(j==2)\n System.out.print(\"| \");\n }\n System.out.println();\n if(i==2)\n System.out.println(\"-------------\");\n }\n }",
"public static String format(Object val, String pattern, String groupsepa, String decimalsepa)\n {\n try\n {\n \t String theGrpSep = groupsepa;\n \t String theDecSep = decimalsepa;\n \t if(theGrpSep == null || theGrpSep.isEmpty() || theDecSep == null || theDecSep.isEmpty())\n \t {\n \t // return group and decimal separator from session if any\n \t String[] grpDecArr = returnGroupDecimalSep();\n \t if(theGrpSep == null || theGrpSep.isEmpty())\n \t {\n \t\t theGrpSep = grpDecArr[0];\n \t }\n \t if(theDecSep == null || theDecSep.isEmpty())\n \t {\n \t\t theDecSep = grpDecArr[1];\n \t }\n \t }\n \t return format(val,pattern, theGrpSep.charAt(0), theDecSep.charAt(0));\n }\n catch(Exception e )\n {\n \t log.error(e, \"[NumberUtil] Error caught in method format\");\n \t return \"\";\n }\n }",
"public static void printDP(){\r\n for (int i = 0; i < sequence.length(); i++) {\r\n for (int j = 0; j < sequence.length(); j++) {\r\n System.out.print(DPMatrix[i][j] + \" \");\r\n }\r\n System.out.println(\"\");\r\n }\r\n }",
"public String format(String pattern, Object o0) {\r\n return MessageFormat.format(getString(pattern), new Object[] {o0});\r\n }",
"public String getPattern() {\n return pattern == null ? null : pattern.pattern();\n }",
"public void setPattern(String pattern) {\r\n\t\tthis.pattern = pattern;\r\n\t}",
"private static void printPlan(String[][] salle) {\n for (int i = salle.length - 1; i >= 0; i--) {\n System.out.printf(\"R \" + i + \"| \");\n for (int j = 0; j < salle[i].length; j++) {\n System.out.print(salle[i][j]);\n }\n System.out.println();\n }\n System.out.println(\" __________________________________________ \");\n System.out.println(\" | ECRAN | \");\n System.out.println(\" ------------------------------------------ \");\n }",
"public static void main(String[] args) {\n\t\tint n=5;\n\t\tfor(int i=n-1;i>=0;i--)\n\t\t{\n\t\t\tfor(int space=0;space<n-1-i;space++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int j=0;j<=i*2;j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}\n\n}",
"public void print() {\n \tfor (int i=0; i < this.table.height; i++) {\n \t\tfor (int j=0; j < this.table.width; j++) {\n \t\t\tString tmp = \"e\";\n \t\t\tif(this.table.field[i][j].head != null) {\n \t\t\t\ttmp = \"\";\n \t\t\t\tswitch (this.table.field[i][j].head.direction) {\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\ttmp+=\"^\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\ttmp+=\">\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\ttmp+=\"V\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\ttmp+=\"<\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n \t\t\t}\n \t\t\telse if(this.table.field[i][j].obj != null) {\n \t\t\t\ttmp = this.table.field[i][j].obj.name;\n \t\t\t}\n \t\t\tSystem.out.print(\" \" + tmp);\n \t\t}\n \t\t\tSystem.out.println(\"\");\n \t}\n }",
"public String printRoute()\r\n {\r\n String res = this.getRoute().stream()\r\n .map(entry -> entry.getKey().getId()\r\n + \":\"\r\n + entry.getValue()\r\n + \";\")\r\n .collect(Collectors.joining());\r\n System.out.println(res);\r\n return res;\r\n }",
"public String printAsterisk(){\n return \"*\";\n }",
"String getErrorLinePattern();",
"public String toString() {\n\t\tStringBuilder buff = new StringBuilder();\n\t\tfor (int y = height-1; y>=0; y--) {\n\t\t\tbuff.append('|');\n\t\t\tfor (int x=0; x<width; x++) {\n\t\t\t\tif (getGrid(x,y)) buff.append('+');\n\t\t\t\telse buff.append(' ');\n\t\t\t}\n\t\t\tbuff.append(\"|\\n\");\n\t\t}\n\t\tfor (int x=0; x<width+2; x++) buff.append('-');\n\t\treturn(buff.toString());\n\t}",
"public String toString() {\n\t\tStringBuilder buff = new StringBuilder();\n\t\tfor (int y = height-1; y>=0; y--) {\n\t\t\tbuff.append('|');\n\t\t\tfor (int x=0; x<width; x++) {\n\t\t\t\tif (getGrid(x,y)) buff.append('+');\n\t\t\t\telse buff.append(' ');\n\t\t\t}\n\t\t\tbuff.append(\"|\\n\");\n\t\t}\n\t\tfor (int x=0; x<width+2; x++) buff.append('-');\n\t\treturn(buff.toString());\n\t}"
] |
[
"0.72167355",
"0.71845454",
"0.69937575",
"0.6898173",
"0.66656655",
"0.66175514",
"0.6534431",
"0.6456972",
"0.6417534",
"0.64096576",
"0.6344982",
"0.6299392",
"0.6241234",
"0.60647684",
"0.6053657",
"0.60479134",
"0.6017627",
"0.6016482",
"0.6005206",
"0.59919393",
"0.5953841",
"0.5952108",
"0.59506935",
"0.5948792",
"0.59323275",
"0.5928039",
"0.5928039",
"0.588998",
"0.58891803",
"0.5883464",
"0.5882667",
"0.5876372",
"0.5863419",
"0.5851533",
"0.5837749",
"0.58239955",
"0.5822817",
"0.5808449",
"0.58021766",
"0.57951474",
"0.5792574",
"0.5781427",
"0.5752331",
"0.57465965",
"0.5742027",
"0.5741001",
"0.5732664",
"0.57244617",
"0.5723109",
"0.5716365",
"0.57143945",
"0.57137746",
"0.57050467",
"0.56913275",
"0.5689745",
"0.56810516",
"0.5659048",
"0.56583107",
"0.5655726",
"0.56402534",
"0.5637705",
"0.5635796",
"0.56288123",
"0.5620409",
"0.5610686",
"0.56061405",
"0.5596501",
"0.5581832",
"0.55724853",
"0.5572392",
"0.55696553",
"0.55627054",
"0.5562256",
"0.5560723",
"0.5554341",
"0.5550355",
"0.5545208",
"0.5541212",
"0.5540443",
"0.5531839",
"0.552103",
"0.5514005",
"0.55070597",
"0.55037606",
"0.55003893",
"0.5485474",
"0.54788405",
"0.54618394",
"0.54599065",
"0.5459133",
"0.5457168",
"0.54492545",
"0.5443026",
"0.5441653",
"0.5440686",
"0.54346603",
"0.5433731",
"0.54303116",
"0.5429078",
"0.5429078"
] |
0.5977978
|
20
|
todo: has to be static??
|
public DatabaseConnector() {
HikariConfig config = new HikariConfig();
config.setJdbcUrl("jdbc:postgresql://localhost:5547/go_it_homework");
config.setUsername("postgres");
config.setPassword("Sam@64hd!+4");
this.ds = new HikariDataSource(config);
ds.setMaximumPoolSize(5);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private stendhal() {\n\t}",
"static void init() {}",
"public void method_4270() {}",
"private Util() { }",
"private void init() {\n\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\n protected void init() {\n }",
"private void strin() {\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 void init() {\n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n }",
"private void init() {\n\n\n\n }",
"protected boolean func_70814_o() { return true; }",
"@Override\n public void perish() {\n \n }",
"protected abstract Set method_1559();",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"public void smell() {\n\t\t\n\t}",
"@Override\n public void init() {}",
"private void someUtilityMethod() {\n }",
"private void someUtilityMethod() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tpublic void comer() {\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}",
"private void kk12() {\n\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"private void init() {\n }",
"private MetallicityUtils() {\n\t\t\n\t}",
"public abstract void mo70713b();",
"@Override\n\tprotected void getExras() {\n\n\t}",
"private Utils() {}",
"private Utils() {}",
"private Utils() {}",
"private Utils() {}",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public abstract Object mo26777y();",
"@Override\n\tpublic void sacrifier() {\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}",
"public void mo38117a() {\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"private void test() {\n\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"public abstract void mo56925d();",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"private void poetries() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"public abstract String mo13682d();",
"public abstract String mo118046b();",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"private void m50366E() {\n }",
"@Override\n\t\tpublic void init() {\n\t\t}",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}",
"public abstract String mo41079d();",
"public static void init() {\n\t\t\n\t}",
"private BuilderUtils() {}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n protected void getExras() {\n }",
"public abstract void mo27386d();",
"public abstract Object mo1771a();",
"static void sm() {\n }",
"public abstract void mo27385c();",
"abstract int pregnancy();",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"private static void staticFun()\n {\n }",
"@Override\n protected void prot() {\n }",
"static void feladat9() {\n\t}",
"public abstract String mo9239aw();",
"private ReportGenerationUtil() {\n\t\t\n\t}",
"private void _init() {\n }",
"public void mo21877s() {\n }",
"@Override\n public void init() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"public abstract String use();",
"protected void init() {\n // to override and use this method\n }"
] |
[
"0.60961527",
"0.58044726",
"0.5777372",
"0.5761395",
"0.57135123",
"0.56350464",
"0.5611441",
"0.56037885",
"0.56037277",
"0.55979687",
"0.55843383",
"0.55789864",
"0.55789864",
"0.55789864",
"0.55789864",
"0.55789864",
"0.5564838",
"0.55620456",
"0.556124",
"0.5556413",
"0.5552752",
"0.5547813",
"0.5542692",
"0.5511004",
"0.5511004",
"0.5511004",
"0.5509531",
"0.55089605",
"0.5508494",
"0.5508494",
"0.5505441",
"0.5505113",
"0.54911995",
"0.54911995",
"0.54911995",
"0.5487151",
"0.54819316",
"0.5481191",
"0.5477227",
"0.54699445",
"0.5452059",
"0.5450431",
"0.5450431",
"0.5450431",
"0.5450431",
"0.5450158",
"0.54491377",
"0.5442734",
"0.5435684",
"0.5429287",
"0.5429287",
"0.5429287",
"0.54290533",
"0.54289633",
"0.5427622",
"0.5426091",
"0.5424567",
"0.54131126",
"0.54131",
"0.54131",
"0.5410413",
"0.54090154",
"0.54080045",
"0.53995454",
"0.53977877",
"0.5395837",
"0.5393371",
"0.53909856",
"0.5385649",
"0.5383371",
"0.5380143",
"0.53779346",
"0.53772736",
"0.5375584",
"0.5375584",
"0.53698653",
"0.536834",
"0.5366901",
"0.5366262",
"0.53657144",
"0.53593314",
"0.535891",
"0.535891",
"0.535891",
"0.535891",
"0.5358446",
"0.53525853",
"0.5351078",
"0.5340155",
"0.5340093",
"0.5329083",
"0.5324483",
"0.53236085",
"0.53170174",
"0.53170174",
"0.53170174",
"0.53170174",
"0.53170174",
"0.53170174",
"0.5316304",
"0.5312774"
] |
0.0
|
-1
|
Constructor for handler class.
|
public PaymentInstruction18Handler(
ParserTask application
, XMLReader reader
, XMLFragmentHandler<?> parentH
, String elementName
, PaymentInstruction18.Allocator allocator
, DataSetter pSetter
, boolean doProcess) {
super(application, reader, parentH, elementName, allocator, pSetter, doProcess);
// code for linking children..
registerHandler(
new PartyIdentification43Handler.Proxy(
application
, reader // XML reader
, this // 'this' is parent of PartyIdentification43Handler
, "Cdtr" // XML element name
, doLink("Cdtr") // linking to parent
? new CdtrSetter(this) // ON
: null // OFF
, doProcess("Cdtr")) // processing active or not
);
registerHandler(
new CashAccount24Handler.Proxy(
application
, reader // XML reader
, this // 'this' is parent of CashAccount24Handler
, "CdtrAcct" // XML element name
, doLink("CdtrAcct") // linking to parent
? new CdtrAcctSetter(this) // ON
: null // OFF
, doProcess("CdtrAcct")) // processing active or not
);
registerHandler(
new BranchAndFinancialInstitutionIdentification5Handler.Proxy(
application
, reader // XML reader
, this // 'this' is parent of BranchAndFinancialInstitutionIdentification5Handler
, "CdtrAgt" // XML element name
, doLink("CdtrAgt") // linking to parent
? new CdtrAgtSetter(this) // ON
: null // OFF
, doProcess("CdtrAgt")) // processing active or not
);
registerHandler(
new CashAccount24Handler.Proxy(
application
, reader // XML reader
, this // 'this' is parent of CashAccount24Handler
, "CdtrAgtAcct" // XML element name
, doLink("CdtrAgtAcct") // linking to parent
? new CdtrAgtAcctSetter(this) // ON
: null // OFF
, doProcess("CdtrAgtAcct")) // processing active or not
);
registerHandler(
new PartyIdentification43Handler.Proxy(
application
, reader // XML reader
, this // 'this' is parent of PartyIdentification43Handler
, "CdtrSchmeId" // XML element name
, doLink("CdtrSchmeId") // linking to parent
? new CdtrSchmeIdSetter(this) // ON
: null // OFF
, doProcess("CdtrSchmeId")) // processing active or not
);
registerHandler(
new CashAccount24Handler.Proxy(
application
, reader // XML reader
, this // 'this' is parent of CashAccount24Handler
, "ChrgsAcct" // XML element name
, doLink("ChrgsAcct") // linking to parent
? new ChrgsAcctSetter(this) // ON
: null // OFF
, doProcess("ChrgsAcct")) // processing active or not
);
registerHandler(
new BranchAndFinancialInstitutionIdentification5Handler.Proxy(
application
, reader // XML reader
, this // 'this' is parent of BranchAndFinancialInstitutionIdentification5Handler
, "ChrgsAcctAgt" // XML element name
, doLink("ChrgsAcctAgt") // linking to parent
? new ChrgsAcctAgtSetter(this) // ON
: null // OFF
, doProcess("ChrgsAcctAgt")) // processing active or not
);
registerHandler(
new DirectDebitTransactionInformation19Handler.Proxy(
application
, reader // XML reader
, this // 'this' is parent of DirectDebitTransactionInformation19Handler
, "DrctDbtTxInf" // XML element name
, doLink("DrctDbtTxInf") // linking to parent
? new DrctDbtTxInfSetter(this) // ON
: null // OFF
, doProcess("DrctDbtTxInf")) // processing active or not
);
registerHandler(
new PaymentTypeInformation24Handler.Proxy(
application
, reader // XML reader
, this // 'this' is parent of PaymentTypeInformation24Handler
, "PmtTpInf" // XML element name
, doLink("PmtTpInf") // linking to parent
? new PmtTpInfSetter(this) // ON
: null // OFF
, doProcess("PmtTpInf")) // processing active or not
);
registerHandler(
new PartyIdentification43Handler.Proxy(
application
, reader // XML reader
, this // 'this' is parent of PartyIdentification43Handler
, "UltmtCdtr" // XML element name
, doLink("UltmtCdtr") // linking to parent
? new UltmtCdtrSetter(this) // ON
: null // OFF
, doProcess("UltmtCdtr")) // processing active or not
);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public GenericHandler() {\n\n }",
"CreateHandler()\n {\n }",
"public ConfigParserHandler() {\n\t}",
"private HandlerBuilder() {\n }",
"public MessageHandler() {\n }",
"public DictionaryHandler() {\n\t}",
"private PersonHandler() {\n }",
"public Hello(Handler handler){\n this.handler = handler;\n }",
"public ModuliHandler() {\n\t}",
"protected FedoraContentModelHandler() {\r\n }",
"public ExLoggingHandler() {\n super();\n }",
"public Handling() {\n this(\"handling\", null);\n }",
"public CallbackHandler() {\r\n // TODO Auto-generated constructor stub\r\n }",
"public InternalNameServiceHandler() {\n }",
"public RESTWorkItemHandler() {\n\t}",
"public Handler(Class<?> implementation) {\r\n this.implementation = implementation;\r\n }",
"private AuctionFileHandler()\n {\n }",
"public HttpClientHandler(java.lang.Object instance) throws Throwable {\n super(instance);\n if (instance instanceof JCObject) {\n classInstance = (JCObject) instance;\n } else\n throw new Exception(\"Cannot manage object, it is not a JCObject\");\n }",
"public\n /* Constructor */\n AVRProgrammer(Handler _handler) {\n handler = _handler;\n }",
"public InputDataHandler() {}",
"default Handler asHandler() {\n return new HandlerBuffer(this);\n }",
"protected CommunicationsHandler(){}",
"void init(HandlerContext context);",
"public PacketHandler() {}",
"public LoggingServerEventHandler(final NHttpServerEventHandler handler) {\n super();\n if (handler == null) {\n throw new IllegalArgumentException(\"HTTP service handler must not be null\");\n }\n this.handler = handler;\n this.log = LogFactory.getLog(handler.getClass());\n }",
"public genericHandler(String fileName) \r\n {\r\n this.fileName = fileName;\r\n }",
"public CategoryTransferHandler() {\n }",
"public InputHandler() {\n arrowKeyHandler = null;\n keyHandler = null;\n }",
"public Handler(Socket socket) {\n this.socket = socket;\n }",
"public Handler(Socket socket) {\n this.socket = socket;\n }",
"public FileHandlerImpl(){\n\t\tfilepath = null;\n\t}",
"public StringHttpResponseHandler() {\n\t\tsuper();\n\t}",
"private Route(\n Class<? extends RouteHandler> handlerClass,\n RouteTemplate routeTemplate,\n RouteHandler handler,\n Method method) {\n\n this.handlerClass = handlerClass;\n this.routeTemplate = routeTemplate;\n this.handler = handler;\n this.method = method;\n\n routeMap.put(handlerClass, this);\n }",
"public Handler(AdmServer server)\r\n\t{\r\n\t\tm_authServer = server;\r\n\t\t\r\n\t\t/*\r\n\t\tTextCat.setServer(serv); //refer to static/singleton!!!\r\n\r\n\t\tCatIns.m_columnId = -1;\r\n\t\tCatIns.m_columnDesc = 0;\r\n\t\tCatIns.m_columnTags = 1;\r\n\t\tCatIns.m_columnTaxo = -1;\r\n\t\tCatIns.m_columnVendor = -1;\r\n\t*/\r\n\t}",
"public BusHandler(Looper looper) {\n super(looper);\n }",
"public PSProviderCatalogHandler()\n {\n super();\n }",
"public FileHandler(byte[] data) {\n this.data = data;\n }",
"private CallbackHandlerImpl(String username, String password) {\r\n this.username = username;\r\n this.password = password;\r\n }",
"public SwitchYardServiceTaskHandler() {\n }",
"DispatchingProperties() {\r\n\t\tsuper();\r\n\t\t// if (handler != null) {\r\n\t\t// throw new\r\n\t\t// RuntimeException(\"ServicePropertiesHandler: class already instantiated!\");\r\n\t\t// }\r\n\t\t// handler = this;\r\n\t}",
"public TrackClientPacketHandler() \n {\n super(Constants.DEVICE_CODE);\n }",
"public AsyncHttpCallback() {\n\t\tif(Looper.myLooper() != null) mHandler = new Handler(this);\n\t}",
"public EventHandlerRegistry() {\n }",
"private ServerConnectionParser() {\n }",
"private JavaUtilLogHandlers() { }",
"void createHandler(final String handlerClassName);",
"public JsonHttpChannel() {\n this.defaultConstructor = new JsonHttpEventFactory();\n }",
"private DatabaseHandler(){\n createConnection();\n }",
"public void setHandler(Handler handler) {\r\n this.handler = handler;\r\n }",
"public void setHandler(Handler handler) {\r\n this.handler = handler;\r\n }",
"public InternalConnectionHandler() {\r\n\t\tthis.setPacketProcessor(InternalPacketProcessor.getInstance());\r\n\t}",
"@Override\n public void onCreate() {\n super.onCreate();\n handler = new Handler();\n BusProvider.register(this);\n }",
"protected BlobByteArrayTypeHandler(LobHandler lobHandler) {\r\n super(lobHandler);\r\n logger.debug(\"BlobByteArrayTypeHandler created,LobHander is [{}]\", lobHandler);\r\n }",
"public StreetBrawlerState(PocketHandler handler){\n\t\tsuper(handler);\n\n\t}",
"protected StreamParser()\n {\n }",
"private void startHandler() {\n mHandler = new MessageHandler();\n }",
"public EchoCallbackHandler() {\n this.clientData = null;\n }",
"protected NamedHandler(String name) {\n\t\tif (name == null)\n\t\t\tname = \"\";\n\t\tthis.name = name;\n\t}",
"public MEventHandler() {\r\n this(false);\r\n }",
"public CrawlHandler(){\n\t\tthis.idToItem=new HashMap<String,Item>();\n\t\tthis.parser=new ItemReviewsPageParser();\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"private void initializeHandler() {\n if (handler == null) {\n handler = AwsHelpers.initSpringBootHandler(Application.class);\n }\n }",
"public SQLiteHandler(Context context) {\n\n super(context, DATABASE_NAME, null, DATABASE_VERSION);\n }",
"public PDF()\n {\n \n i_hdl = create_Handler();\n }",
"public JaccsCommandHandler(JaccsCommandHandler handler) \r\n\t{\r\n\t\tif((handler!=null)) \r\n\t\t{\r\n\t\t\tthis.counterNames.addAll(handler.counterNames);\r\n\t\t\tthis.fastSpells=handler.fastSpells;\r\n\t\t\tthis.names.addAll(handler.names);\r\n\t\t\tthis.noConjunctions=handler.noConjunctions;\r\n\t\t\tthis.noReasons=handler.noReasons;\r\n\t\t\tthis.quickSpells=handler.quickSpells;\r\n\t\t}\r\n\t}",
"public NotificationHubWorkItemHandler() {}",
"public ClientHandler(InputStream inputFromClient) {\n try {\n this.inputFromClient = new ObjectInputStream(inputFromClient);\n } catch (IOException e) {\n System.out.println(\"Could not create ObjectInputStream from ClientHandler\");\n }\n }",
"private void initHandler(Class<? extends Handler> handlerClass) throws InstantiationException, IllegalAccessException {\n\t\tsynchronized (waitingThreads) {\n\t\t\t/* start waiting handler threads */\n\t\t\twhile (waitingThreads.size() < handlers) {\n\t\t\t\tHandler h = addHandler(handlerClass.newInstance());\n\n\t\t\t\th.setHandlerPool(this);\n\t\t\t\th.start(); // start this handler thread\n\t\t\t}\n\t\t\t\n\t\t\tclosed = Boolean.FALSE;\n\t\t}\n\t}",
"public DBHandler(Context context) {\n super(context, DB_NAME, null, DB_VERSION);\n }",
"protected AuctionServer()\n\t{\n\t}",
"public FoodNotificationReceiver(Handler handler) {\n\t super(handler);\n\t }",
"protected Proxy(InvocationHandler h) { }",
"@Override\n public void onCreate() {\n super.onCreate();\n mHandler = new Handler();\n }",
"public fileServer() {\n }",
"private TelemetryMessageHandler(){\n super();\n messageList = new TelemetryMessageList();\n telemetryArrivalMap = new TelemetryArrivalMap();\n }",
"public MouseHandler()\n {\n // initialise instance variables:\n //INSTANTIATE listeners list:\n _listeners = new ArrayList<IMouseListener>();\n \n }",
"ByteHandler getInstance();",
"public void setHandler(String handler) {\n this.Handler = handler;\n }",
"protected SAXParser() {\n // Does nothing.\n }",
"public SQLHandler(Context context) {\n super(context, DB_NAME, null, DB_VERSION);\n }",
"public RequestHandler(ThreadPoolExecutor taskExecutor) {\n super();\n this.taskExecutor = taskExecutor;\n }",
"public BaseLogic()\n {\n this(new EventBus());\n }",
"ResponseHandler getInstance() {\n \t\treturn this;\n \t}",
"public PDFConversionImageHandler() {\r\n\t\tsuper(null, true);\r\n\t}",
"public HttpGetSocket(SocketHandler h)\r\n {\r\n super(h);\r\n }",
"private BroadcastReceiverHandler() {\n\n }",
"public Handler getHandler();",
"private ClientLoader() {\r\n }",
"private Request() {}",
"private Request() {}",
"public HGDClient() {\n \n \t}",
"public Http2MultiplexHandler(ChannelHandler inboundStreamHandler) {\n/* 115 */ this(inboundStreamHandler, (ChannelHandler)null);\n/* */ }",
"public DatabaseHandler(Context context){\n super(context, \"tienda.db\", null, 1);\n }",
"private IOHandler(){\n download_queue = new ArrayList<>(); \n initialize();\n }",
"private Response() {}",
"private Response() {}",
"public InscriptionThread(Handler handler, User user) {\n super();\n this.handler = handler;\n this.userToSave = user;\n }",
"public DefaultHttpRequest() {\n }",
"public RequestHandler(DatagramPacket requestPacket) {\n this.requestPacket = requestPacket;\n }",
"public Event() {\n }",
"public Event() {\n }"
] |
[
"0.7993427",
"0.78867626",
"0.7243095",
"0.7148456",
"0.7145024",
"0.7121116",
"0.7117521",
"0.7016652",
"0.69522166",
"0.69301546",
"0.69258463",
"0.69109803",
"0.67938745",
"0.67262924",
"0.6706992",
"0.6658248",
"0.66298425",
"0.6623817",
"0.6590794",
"0.6588602",
"0.657967",
"0.65627474",
"0.65577525",
"0.6543239",
"0.652987",
"0.6488058",
"0.64576477",
"0.6443665",
"0.6407195",
"0.6407195",
"0.6377458",
"0.6286491",
"0.62856215",
"0.6233259",
"0.6203069",
"0.62011915",
"0.61941636",
"0.6183197",
"0.6180003",
"0.61730665",
"0.6168043",
"0.6167166",
"0.6131999",
"0.6064115",
"0.60635287",
"0.6057168",
"0.59843904",
"0.59821403",
"0.5967874",
"0.5967874",
"0.5963368",
"0.59615",
"0.59474254",
"0.5944972",
"0.594413",
"0.59390765",
"0.5935651",
"0.5920923",
"0.59167534",
"0.59109163",
"0.5910038",
"0.5904908",
"0.58973455",
"0.5896466",
"0.589029",
"0.5887694",
"0.5887505",
"0.5883284",
"0.5880733",
"0.5875387",
"0.5856635",
"0.5847895",
"0.5835205",
"0.5831205",
"0.5829083",
"0.582766",
"0.58180106",
"0.58111197",
"0.5807344",
"0.5797046",
"0.5792307",
"0.5791865",
"0.5790153",
"0.5789982",
"0.5775959",
"0.5772817",
"0.57708037",
"0.5766567",
"0.57656974",
"0.57656974",
"0.57600147",
"0.5754395",
"0.57525367",
"0.5742594",
"0.57402533",
"0.57402533",
"0.5735768",
"0.57298064",
"0.572792",
"0.57217944",
"0.57217944"
] |
0.0
|
-1
|
This method overrides the getData() of the super type, returning the more specific type.
|
@Override
public PaymentInstruction18 getData() {
return (PaymentInstruction18)super.getData();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public byte getType() {\n return TYPE_DATA;\n }",
"@Override\n\tpublic int getDataType()\n\t{\n\t\treturn dataType;\n\t}",
"public abstract Object getData();",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"public T getData()\n\t{ \treturn this.data; }",
"@Override\r\n\t\tpublic Meta_data getData() {\n\t\t\treturn this.data;\r\n\t\t}",
"@Override\r\n\tprotected Object getData() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic E getData() {\n\t\treturn data;\r\n\t}",
"protected String getDataType()\n {\n return dataType;\n }",
"public GenericItemType getData() {\n return this.data;\n }",
"public Object getData();",
"public Object getData()\r\n\t\t{\r\n\t\t\treturn data;\r\n\t\t}",
"public abstract Object getCustomData();",
"public T getData() {\r\n return data;\r\n }",
"public T getData()\n\t{\n\t\treturn this.data;\n\t}",
"public E getData() { return data; }",
"public T getData() {\n return this.data;\n }",
"public Object getData() {\r\n\t\t\treturn data;\r\n\t\t}",
"public String getDataType() ;",
"@Override\n\tpublic void getData() {\n\t\t\n\t}",
"public Object getData(){\n\t\treturn this.data;\n\t}",
"T getData();",
"Object getData();",
"Object getData();",
"@Override\n public String getData() {\n return \"T \" + super.getData();\n }",
"public Object getData() {\n\t\treturn data;\n\t}",
"public int getDataType();",
"public T getData(){\n return this.data;\n }",
"public T getData() {\r\n\t\t\treturn t;\r\n\t\t}",
"protected abstract Object[] getData();",
"java.lang.String getDataType();",
"Object getData() { /* package access */\n\t\treturn data;\n\t}",
"T getData() {\n\t\treturn data;\n\t}",
"public DataType getDataType() {\n return this.dataType;\n }",
"@java.lang.Override\n public godot.wire.Wire.ValueOrBuilder getDataOrBuilder() {\n return getData();\n }",
"public E getData(){\n\t\t\treturn data;\n\t\t}",
"@Override\n public byte getSubtype() {\n return SUBTYPE_DATA_TAGGED_DATA_EXTEND;\n }",
"public abstract Class getDataClass();",
"public E getData() {\r\n\t\treturn data;\r\n\t}",
"public DerivedWord getData() {\n \treturn this.data;\n }",
"public String getDataType() {\r\n return dataType;\r\n }",
"public Object getData() \n {\n return data;\n }",
"public DataType getDataType() {\r\n\t\treturn dataType;\r\n\t}",
"public D getData(){\n\t\treturn data;\n\t}",
"int getDataType();",
"public String getDataType() {\n return dataType;\n }",
"@Override\n\tpublic DataType getDataType() {\n\t\tif (dataType == null) {\n\t\t\tdataType = getDataType(getProgram());\n\t\t}\n\t\treturn dataType;\n\t}",
"public T getData() {\n return mData;\n }",
"java.lang.String getData();",
"@Nonnull Class<? extends DataElement> getDataElementType();",
"public Object data() {\n return this.data;\n }",
"DataType getBase_DataType();",
"@java.lang.Override\n public godot.wire.Wire.Value getData() {\n return data_ == null ? godot.wire.Wire.Value.getDefaultInstance() : data_;\n }",
"public D getData() {\n return data;\n }",
"public D getData() {\n return data;\n }",
"public Data getData(HelperDataType type);",
"public E getData() {\n return data;\n }",
"public E getData()\n {\n return data;\n }",
"public E getData()\n {\n return data;\n }",
"public A getData()\n\t{\n\t\treturn data;\n\t}",
"DataTypeInstance getDataInstance();",
"public Data getData() {\n return data;\n }",
"public Data getData() {\n return data;\n }",
"public T getData() {\n return null;\n }",
"public Class dataType() {\n return this.dataType;\n }",
"public IData getData() {\n return data;\n }",
"public com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType getDataType() {\n @SuppressWarnings(\"deprecation\")\n com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType result = com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType.valueOf(dataType_);\n return result == null ? com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType.UNRECOGNIZED : result;\n }",
"public com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType getDataType() {\n @SuppressWarnings(\"deprecation\")\n com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType result = com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType.valueOf(dataType_);\n return result == null ? com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType.UNRECOGNIZED : result;\n }",
"@RestrictTo(RestrictTo.Scope.LIBRARY)\n @DataType\n public int getDataType() {\n return mBundle.getInt(DATA_TYPE_FIELD, -1);\n }",
"@Override\n public String getData()\n {\n return null;\n }",
"T getData() {\n return this.data;\n }",
"public Class getDataClass();",
"public String getData() {\r\n return this.data;\r\n }",
"public final DATATYPE getDataType(){\n\t\t\n\t\treturn wDataType;\n\t}",
"public DataItem getData() {\n return data;\n }",
"public Class getDataType() {\n return datatype;\n }",
"public String getData() {\r\n return Data;\r\n }",
"public String getData() {\r\n return Data;\r\n }",
"@Override\n public Object getData(String mimeType) {\n return data;\n }",
"@Override\n\tprotected DataTypes getDataType() {\n\t\treturn DataTypes.ITEM;\n\t}",
"public Object getDataObject() {\n return dataObject;\n }",
"@Override\n public Object getData() {\n return outputData;\n }",
"com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType getDataType();",
"public Item getData()\r\n\t{\r\n\t\treturn theItem;\r\n\t}",
"@Override\n public byte getSubtype() {\n return SUBTYPE_DATA_TAGGED_DATA_UPLOAD;\n }",
"public T value()\r\n {\r\n return data;\r\n }",
"public int getDataType()\n {\n return dtype;\n }",
"public java.lang.String getData() {\r\n return data;\r\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }",
"public String getData() {\n\t\treturn this.data;\n\t}",
"Object getRawData();",
"public synchronized Object getData() {\n return data;\n }",
"@Override\n public String getDataType() {\n return getPrimitiveType().name();\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }",
"public String getData() {\r\n\t\treturn data;\r\n\t}"
] |
[
"0.8031192",
"0.7634577",
"0.7634557",
"0.74694747",
"0.73625624",
"0.736244",
"0.7354901",
"0.7321735",
"0.7321501",
"0.7301179",
"0.7253596",
"0.72345746",
"0.7231101",
"0.7192032",
"0.71837026",
"0.7140248",
"0.7139759",
"0.71391654",
"0.71149635",
"0.7106404",
"0.7100793",
"0.7099086",
"0.7075905",
"0.7075905",
"0.70739067",
"0.70656925",
"0.7042799",
"0.7035672",
"0.7033204",
"0.7015637",
"0.7015152",
"0.70084846",
"0.70012736",
"0.6993628",
"0.69917494",
"0.6960838",
"0.6953096",
"0.6952397",
"0.6946953",
"0.69303143",
"0.690847",
"0.6865158",
"0.68487686",
"0.68484086",
"0.6847854",
"0.6834016",
"0.6825589",
"0.6825009",
"0.68002063",
"0.6769101",
"0.67642576",
"0.67435294",
"0.6737999",
"0.673304",
"0.673304",
"0.67326707",
"0.673109",
"0.67301685",
"0.67301685",
"0.67168415",
"0.67127717",
"0.67031366",
"0.67031366",
"0.66986877",
"0.6690619",
"0.6682546",
"0.66727495",
"0.6672277",
"0.6665381",
"0.66434336",
"0.66172475",
"0.6601484",
"0.6565936",
"0.6552838",
"0.6546606",
"0.6537316",
"0.6532783",
"0.6532783",
"0.65282893",
"0.6525265",
"0.6510633",
"0.65034163",
"0.6491933",
"0.64863634",
"0.6480993",
"0.64803624",
"0.647882",
"0.64645374",
"0.64569",
"0.64569",
"0.64569",
"0.64569",
"0.64559764",
"0.64289993",
"0.6426805",
"0.64194983",
"0.6417127",
"0.6417127",
"0.6417127",
"0.6417056"
] |
0.69127476
|
40
|
This method is called by the XML parser on an end of element event. If the localName == 'the name of the element that this handler handles' control is passed back to the parent handler (future events go there) and the data of the children of this handler is attached to the data associated to this handler. The data that is collected is connected to the parent data only if a parentDataSetter if found (getParentDataSetter()). If processing is enabled for a handler, the processor is called.
|
@Override
public void endElement(String uri, String localName, String name)
throws SAXException {
// collect data from children..
if (localName.equals("BtchBookg")) {
getData().setBtchBookg(getValue());
getContents().reset();
} else if (localName.equals("ChrgBr")) {
getData().setChrgBr(getValue());
getContents().reset();
} else if (localName.equals("CtrlSum")) {
getData().setCtrlSum(getValue());
getContents().reset();
} else if (localName.equals("NbOfTxs")) {
getData().setNbOfTxs(getValue());
getContents().reset();
} else if (localName.equals("PmtInfId")) {
getData().setPmtInfId(getValue());
getContents().reset();
} else if (localName.equals("PmtMtd")) {
getData().setPmtMtd(getValue());
getContents().reset();
} else if (localName.equals("ReqdColltnDt")) {
getData().setReqdColltnDt(getValue());
getContents().reset();
} else if (localName.equals(getXMLElementName())) {
handleElement();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void XML_endDocument(Atz_XML_SAX_DataHandler sourceHandler) {\n }",
"@Override\n\t\tpublic void endElement(String uri, String localName, String qName)\n\t\t\t\tthrows SAXException {\n\t\t\tNode lastElement = nodeStack.lastElement();\n\t\t\tlastElement.setValue(buffer.toString());\n\t\t\tLog.d(\"xml\", \"\\\\ \" + uri + \" \" + localName + \" | found data: \" + lastElement.getValue());\n\t\t\tnodeStack.pop();\n\t\t\t\n\t\t\t\n\t\t}",
"public void processEndChildElement(String uri, String localName, String qName, String nestedText)\n {\n }",
"@Override\n\tvoid endHandling() {\n\t}",
"@Override\n\tvoid endHandling() {\n\t}",
"@Override\n\tvoid endHandling() {\n\t}",
"@Override\n\tvoid endHandling() {\n\t}",
"public void handleCustomNodeEnd(IParserHandler parserHandler, BeanNode node, XMLAttributeMap att, Locator locator);",
"@Override\n public void endElement(String uri, String localName, String qName)\n throws SAXException {\n\n elementOn = false;\n\n /**\n * Sets the values after retrieving the values from the XML tags\n * */\n if (localName.equalsIgnoreCase(\"TODAY_CALL\"))\n data.setToday_call(elementValue);\n else if (localName.equalsIgnoreCase(\"MTD_CALL\"))\n data.setMtd_call(elementValue);\n }",
"@Override\r\n\tpublic void endElement(String uri, String localName, String qName)\r\n\t\t\tthrows SAXException {\n\t\tif(qName.equalsIgnoreCase(\"item\")){\r\n\t\t\t//tempEvent = new PragyanEventData();\r\n\t\t}\r\n\t\tif(qName.equalsIgnoreCase(\"item\")){\r\n\t\t\ttempEvent = new PragyanEventData();\r\n\t\t}\r\n\t\tif(qName.equalsIgnoreCase(\"itemname\")){\r\n\t\t\ttempEvent.setEventName(tempString);\r\n\t\t}\r\n\t\tif(qName.equalsIgnoreCase(\"one\")){\r\n\t\t\ttempEvent.setEventCaption(tempString);\r\n\t\t}\r\n\t\t\r\n\t\tif(qName.equalsIgnoreCase(\"imgurl\")){\r\n\t\t\ttempEvent.setEventImage(tempString);\r\n\t\t}\r\n\t\tif(qName.equalsIgnoreCase(\"starttime\")){\r\n\t\t\ttry { \r\n\t\t\t\t//Log.d(\"TIMESTART\", tempString);\r\n\t\t\t Date time = format.parse(dateWriter.toString()); \r\n\t\t\t \r\n\t\t\t tempEvent.addStartTime(time);\r\n\t\t\t\t\r\n\t\t\t\twritingDate = false;\r\n\t\t\t\tdateWriter.reset();\r\n\t\t\t} catch (java.text.ParseException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\ttempString=\"\";\r\n\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tfinally{}\r\n\t\t}\r\n\t\t\r\n\t\tif(qName.equalsIgnoreCase(\"endtime\")){\r\n\t\t\ttry { \r\n\t\t\t\t//Log.d(\"TIMEEND\", tempString);\r\n\t\t\t Date time = format.parse(dateWriter.toString()); \r\n\t\t\t\ttempEvent.addEndTime(time);\r\n\t\t\t\ttempString=\"\";\r\n\t\t\t\twritingDate = false;\r\n\t\t\t\tdateWriter.reset();\r\n\r\n\t\t\t} catch (java.text.ParseException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t//Log.d(\"ERROR\", tempEvent.getEventName());\r\n\t\t\t\t//Log.d(\"ERROR\", tempString);\r\n\t\t\t\ttempString=\"\";\r\n\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tfinally{}\r\n\t\t}\r\n\t\t\r\n\t\tif(qName.equalsIgnoreCase(\"children\")){\r\n\t\t\ttempEvent =stackEvents.pop();\r\n\t\t}\r\n\t\tif(qName.equalsIgnoreCase(\"main\")){\r\n\t\t\ttempEvent.addPageTitle(\"About\");\r\n\t\t\ttempString = tempString.replace(\"$$##$$\", \"\\n\");\r\n\t\t\ttempString = tempString.replace(\"$$!!$$\", \" \");\r\n\t\t\ttempString = tempString.replace(\"$$%%$$\", \" \");\r\n\t\t\t//Log.d(\"MAIN\",tempString);\r\n\t\t\ttempEvent.addPageContent(tempString);\r\n\t\t\tstartPage=false;\r\n\t\t}\r\n\t\tif(qName.equalsIgnoreCase(\"pagename\")){\r\n\t\t\tif(startPage){\r\n\t\t\t\t////Log.d(\"FIXIT\",tempString.trim());\r\n\t\t\t\ttempEvent.addPageTitle(tempString.trim());\r\n\t\t\t\ttempString=\"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(qName.equalsIgnoreCase(\"pgimg\")){\r\n\t\t\tif(startPage){\r\n\t\t\t\ttempEvent.setEventSecondaryImage(rootUrl+tempString);\r\n\t\t\t\ttempString=\"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(qName.equalsIgnoreCase(\"content\")){\r\n\t\t\t//Log.d(\"ACTION\",\"hit contentend\"+String.valueOf(startPage)+\":\"+tempString);\r\n\t\t\tif(startPage){\r\n\t\t\t\ttempEvent.addPageContent(charWriter.toString());\r\n\t\t\t\t////Log.d(\"CONT\",charWriter.toString());\r\n\t\t\t\ttempString=\"\";\r\n\t\t\t\tcharWriter.reset();\r\n\t\t\t\tstartContent = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(qName.equalsIgnoreCase(\"page\")){\r\n\t\t\t////Log.d(\"FOXIT\",\"pageend:\"+String.valueOf(tempEvent.pageTitles.size()));\r\n\t\t\tstartPage=false;\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override \n\t public void endElement(String namespaceURI, String localName, String qName) throws SAXException { \n\t \n\t }",
"public void endElement(String namespaceURI, String localName,\n String rawName) throws SAXException {\n if (rawName.equals(\"rukovodstvo\")) {\n pcData = 0;\n klub.setLoaded(true);\n }\n if (rawName.equals(\"osoba\")) {\n pcData = 1;\n }\n if(rawName.equals(\"napomena\"))\n currentOsoba.setNapomena(textBuffer.toString());\n }",
"public void elementEnd() {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"public interface EndElementHandler {\n\n /**\n * Called after all attributes and sub-elements have been set.\n * @throws Exception any exception\n */\n public void endElement() throws Exception; \n}",
"public void finish(Record data, boolean success) {\n\t\tif (((DefaultMutableTreeNode)this.getParent()).getSiblingCount()>1) { // NB nodes are their own siblings, so even the root has 1 sibling - itself.\r\n\t\t\t// This is one in a queue. Execute the next\r\n\t\t\t((OperationInfo)(this.getParent())).finish(data, success);\r\n\t\t}\r\n\t}",
"@Override\n\t\t\t\tpublic void endDocument() throws SAXException {\n\t\t\t\t\tsuper.endDocument();\n\t\t\t\t}",
"public void endElement (String uri, String localName, String qName) throws SAXException {\n\t\tif(this.fieldName != null) {\n\t\t\tif(this.addHeader) {\n\t\t\t\tthis.header.add(this.fieldName);\n\t\t\t}\n\t\t\tthis.row.add(this.fieldValue);\n\t\t}\n\t\t// Reset values\n\t\tthis.fieldName = null;\n\t\tthis.fieldValue = \"\";\n\t\tthis.level--;\n\n\t\t// At end of row level, add contents of current row\n\t\tif(this.level == 1) {\n\t\t\tif(this.addHeader) {\n\t\t\t\tthis.contents.add(this.header);\n\t\t\t\tthis.addHeader = false;\n\t\t\t}\n\t\t\tthis.contents.add(this.row);\n\t\t}\n\t}",
"public void endElement(String namespaceURI, String name, \n\t\t\t String qName) throws SAXException\n {\n\tif (bTracing)\n\t { \n\t System.out.println(nestString + \"endElement is called: \" + qName);\n\t nestLevel--;\n\t nestString = getLevelString();\n\t }\n\n\tXMLTag elementTag = XMLTag.lookUp(qName);\n\tif (elementTag == null)\n\t throw new SAXException(\"No tag found for element \" + name);\n\n\tif (bParseOnly)\n\t return;\n\n\t// store the current item in the appropriate temp table and\n\t// then null it out.\n\tif (elementTag == XMLTag.CONTROLSPEC)\n\t {\n\t if (currentControl == null)\n\t return;\n\t FieldInfo existingField = (FieldInfo)\n fieldTable.get(currentControl.getName());\n\t if (existingField == null)\n\t {\n\t\tfieldTable.put(currentControl.getName(), currentControl);\n\t\t}\n\t else\n\t {\n\t\tSystem.out.println(\"*************************************\");\n\t\tSystem.out.println(\"Found duplicate field of class \" +\n\t\t\t\t currentControl.getClass().getName() +\n\t\t\t\t \" with ID \" + currentControl.getName());\n\t\tSystem.out.println(\"*************************************\");\n\t\t}\n\t currentControl = null;\n\t }\n\telse if (elementTag == XMLTag.PANELSPEC)\n\t {\n\t panelTable.put(currentPanel.getName(),currentPanel);\n\t currentPanel = null;\n\t }\n\telse if ((elementTag == XMLTag.HELP) ||\n\t\t (elementTag == XMLTag.LABEL) ||\n\t\t (elementTag == XMLTag.TITLE) ||\n\t\t (elementTag == XMLTag.TOOLTIP) ||\n\t\t (elementTag == XMLTag.DEFAULT) ||\n\t\t (elementTag == XMLTag.CHOICES))\n\t {\n\t processTextElement(elementTag);\n\t }\n\telse if (elementTag == XMLTag.UI)\n\t {\n\t // do Nothing\n\t }\n\t}",
"public void endCDATA() throws SAXException {\n this.saxHandler.endCDATA();\n }",
"@Override\n public void endElement(String aUri, String aLocalName, String aName)\n throws SAXException\n {\n if (!inTextElement && TAG_TITLE.equals(aName)) {\n DocumentMetaData meta = DocumentMetaData.get(getJCas());\n // Read only the first title and hope it is the main title\n if (!titleSet) {\n meta.setDocumentTitle(getBuffer().toString().trim());\n titleSet = true;\n }\n meta.setDocumentId(documentId);\n getBuffer().setLength(0);\n captureText = false;\n }\n else if (TAG_TEXT.equals(aName)) {\n captureText = false;\n inTextElement = false;\n }\n else if (inTextElement && (TAG_SUNIT.equals(aName) ||\n (utterancesAsSentences && TAG_U.equals(aName)))) {\n if (readSentence) {\n Sentence s = new Sentence(getJCas(), sentenceStart, getBuffer().length());\n if (elementsToTrim.contains(aName)) {\n TrimUtils.trim(getBuffer(), s);\n }\n s.addToIndexes();\n }\n sentenceStart = -1;\n }\n else if (inTextElement && TAG_PARAGRAPH.equals(aName)) {\n if (readParagraph) {\n Paragraph para = new Paragraph(getJCas(), paragraphStart, getBuffer().length());\n if (elementsToTrim.contains(aName)) {\n TrimUtils.trim(getBuffer(), para);\n }\n para.addToIndexes();\n }\n paragraphStart = -1;\n }\n else if (readNamedEntity && inTextElement && TAG_RS.equals(aName)) {\n NamedEntity ne = namedEntities.pop();\n ne.setEnd(getBuffer().length());\n if (elementsToTrim.contains(aName)) {\n TrimUtils.trim(getBuffer(), ne);\n }\n ne.addToIndexes();\n }\n else if (readConstituent && inTextElement && TAG_PHRASE.equals(aName)) {\n ConstituentWrapper wrapper = constituents.pop();\n wrapper.constituent.setBegin(wrapper.children.get(0).getBegin());\n wrapper.constituent\n .setEnd(wrapper.children.get(wrapper.children.size() - 1).getEnd());\n if (!constituents.isEmpty()) {\n ConstituentWrapper parent = constituents.peek();\n wrapper.constituent.setParent(parent.constituent);\n parent.children.add(wrapper.constituent);\n }\n wrapper.constituent.setChildren(FSCollectionFactory.createFSArray(getJCas(),\n wrapper.children));\n wrapper.constituent.addToIndexes();\n \n // Close off the ROOT\n if (constituents.peek().constituent instanceof ROOT) {\n ConstituentWrapper rootWrapper = constituents.pop();\n rootWrapper.constituent.setBegin(wrapper.children.get(0).getBegin());\n rootWrapper.constituent\n .setEnd(wrapper.children.get(wrapper.children.size() - 1).getEnd());\n rootWrapper.constituent.setChildren(FSCollectionFactory.createFSArray(\n getJCas(), rootWrapper.children));\n rootWrapper.constituent.addToIndexes();\n }\n }\n else if (inTextElement\n && (TAG_WORD.equals(aName) || TAG_CHARACTER.equals(aName) || TAG_MULTIWORD\n .equals(aName))) {\n if (isNotBlank(getBuffer().substring(tokenStart, getBuffer().length()))) {\n Token token = new Token(getJCas(), tokenStart, getBuffer().length());\n \n if (elementsToTrim.contains(aName)) {\n TrimUtils.trim(getBuffer(), token);\n }\n \n if (posTag != null && readPOS) {\n Type posTagType = posMappingProvider.getTagType(posTag);\n POS pos = (POS) getJCas().getCas().createAnnotation(posTagType,\n token.getBegin(), token.getEnd());\n pos.setPosValue(posTag);\n POSUtils.assignCoarseValue(pos);\n pos.addToIndexes();\n token.setPos(pos);\n }\n\n if (lemma != null && readLemma) {\n Lemma l = new Lemma(getJCas(), token.getBegin(), token.getEnd());\n l.setValue(lemma);\n l.addToIndexes();\n token.setLemma(l);\n }\n\n // FIXME: if readToken is disabled, the JCas wrapper should not be generated\n // at all!\n if (readToken) {\n if (!constituents.isEmpty()) {\n ConstituentWrapper parent = constituents.peek();\n token.setParent(parent.constituent);\n parent.children.add(token);\n }\n \n token.addToIndexes();\n }\n }\n\n tokenStart = -1;\n }\n }",
"private void processEndObject() {\n\t\tif (parentNode != null) {\r\n\t\t\t// go up the param tree from the current field name\r\n\t\t\tFieldFilterTree tmpIncludes = parentNode.getParent();\r\n\t\t\tcurNode = parentNode;\r\n\t\t\tparentNode = tmpIncludes;\r\n\r\n\t\t\tcurrentFieldName = curNode.getData().getValue();\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void endElement(String uri, String localName, String qName)\n\t\t\tthrows SAXException {\n\t\tsuper.endElement(uri, localName, qName);\n\t}",
"public void endElement(String namespaceURI, String localName, String qName)\n throws SAXException {\n log.info(\"endElement : noeud = \"+localName);\n if (N_GENERATION.equalsIgnoreCase(localName)){\n endElement_Generation(namespaceURI, localName, qName);\n }\n if (N_CLASSE.equalsIgnoreCase(localName)){\n endElement_Generer(namespaceURI, localName, qName);\n }\n if (N_TEMPLATE.equalsIgnoreCase(localName)){\n endElement_Template(namespaceURI, localName, qName);\n }\n }",
"@Override\n public void writeEndElement() throws XMLStreamException {\n closeStartTag();\n if(_depth == 0){\n return;\n }\n if(_ncContextState[_depth]){\n nsContext.popContext();\n }\n try {\n _stream .write(_END_TAG);\n //writeStringToUtf8 (qname,_stream);\n ElementName en =elementNames[--_depth];\n _stream.write(en.getUtf8Data().getBytes(), 0,en.getUtf8Data().getLength());\n en.getUtf8Data().reset();\n _stream .write('>');\n } catch (IOException ex) {\n throw new RuntimeException(ex);\n }\n }",
"protected void endOutput() throws JspException, SAXException {\n if (uriExpr != null && uri == null)\n uri = evalString(\"uri\", uriExpr);\n if (nameExpr != null && qname == null) {\n qname = evalString(\"name\", nameExpr);\n int colonIndex = qname.indexOf(':');\n if (colonIndex != -1)\n name = qname.substring(colonIndex + 1);\n else\n name = qname;\n }\n serializer.getHandler().endElement(uri, name, qname);\n }",
"public void handleCloseElement(String elementName, int line, int col) {\r\n // TODO: Implement this.\r\n System.out.println(\"End element: \" + elementName);\r\n }",
"public void endCDATA() throws SAXException {\n\t\tmCDataSection = false;\n\t\tif (mParsedObject != null) mParsedObject.endCDATA();\n\t}",
"protected void parseEndEvents(XmlElement endEventElement) {\n\n for (XmlElement endEventXmlElement : endEventElement.getElements(\"endEvent\")) {\n\n Node endEventNode = BpmnNodeFactory.createBpmnEndEventNode(processBuilder);\n\n parseGeneralInformation(endEventXmlElement, endEventNode);\n\n getNodeXmlIdTable().put((String) endEventNode.getAttribute(\"idXml\"), endEventNode);\n\n // Doing some afterwork\n for (BpmnXmlParseListener parseListener : parseListeners) {\n parseListener.parseEndEvent(endEventXmlElement, endEventNode, processBuilder);\n }\n }\n }",
"@Override\n public void endElement(String uri, String localName, String qName)\n throws SAXException {\n super.endElement(uri, localName, qName);\n tagName=null;\n }",
"@Override\n\tpublic void endElement(String uri, String localName, String qName) throws SAXException {\n\t\ttry {\n\t\t\tif (startTagIsClosed) {\n\t\t\t\twrite(\"</\");\n\t\t\t\twrite(qName);\n\t\t\t\twrite('>');\n\t\t\t} else {\n\t\t\t\twrite(\"/>\");\n\t\t\t\tstartTagIsClosed = true;\n\t\t\t}\n\t\t\tsuper.endElement(uri, localName, qName);\n\t\t\t// nsSupport.popContext();\n\t\t\telementLevel--;\n\t\t} catch (IOException e) {\n\t\t\tthrow new SAXException(e);\n\t\t}\n\t}",
"@Override\r\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\r\n\t\tSystem.out.println(\"End Document\");\r\n\t}",
"@Override\r\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\r\n\t}",
"@Override\n public void endDocument() throws SAXException {\n System.out.println(\"End\");\n }",
"@Override\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\n\t}",
"@Override\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\n\t}",
"@Override\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\n\t}",
"@Override\n\tpublic void endElement(String arg0, String arg1, String arg2)\n\t\t\tthrows SAXException {\n\t\t\n\t}",
"@Override\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\n\n\t}",
"@Override\n\t\tpublic void endDocument() throws SAXException {\n\t\t\t\n\t\t}",
"public void endElement (String uri, String localName, String qName)\n throws SAXException\n {\n // no op\n }",
"public void endDocument() throws SAXException {\n\t\tSortedSet<Integer> parents = new TreeSet<Integer>();\n\t\tfor (int i : this.idMap.keySet()) {\n\t\t\tparents.add(Integer.parseInt(this.idMap.get(i).get(1)));\n\t\t}\n\n\t\tmapChildren(parents);\n\n\t\tif (!parents.isEmpty()) {\n\t\t\trecursion(parents.first());\n\t\t}\n\t\tthis.string.append(\"</\" + this.idMap.get(this.root).get(2) + \">\");\n\n\t\tthis.string.append(\"</schema>\");\n\n\t}",
"public void endElement(String uri, String localName, String qName)\n throws SAXException {\n }",
"@Override\r\n\t\t\t\tpublic void autEndProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void autEndProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}",
"@Override \n\t public void endDocument() throws SAXException { \n\t \n\t }",
"@Override\n\tpublic void endElement(String arg0, String arg1, String arg2) throws SAXException {\n\t\tSystem.out.println(arg2+\"解析结束\");\n\t}",
"@Override\n\tpublic void endElement(QName qname) {\n\t\t\n\t}",
"public void visitEnd()\n\t{\n\t}",
"@Override\n public void endElement(String namespaceURI, String localName, String qName) throws SAXException {\n if (localName.equals(\"document\")) {\n // add tagiot to article\n curArticle.setTagiot(curTagiot);\n\n // add article to newSet\n newsSet.addItem(curArticle);\n }\n }",
"public void endElement() throws Exception;",
"@Override\r\n\tpublic void finishEvent() {\n\t\tif(!mEventStarted)\r\n\t\t\treturn;\r\n\t\t\r\n\t\tmEventStarted = false;\r\n\t\t\r\n\t\txmlStreamTracerService.postObsel(mURL, mTraceID, mCookie, mRoot.toString(),\r\n\t\t\t\tnew AsyncCallback<String>() {\r\n\t\t\tpublic void onFailure(Throwable caught) {\r\n\t\t\t\t// Show the RPC error message to the user\r\n\t\t\t\tSystem.out.println(\"XMLStreamTracer: Failed to post the event.\");\r\n\t\t\t}\r\n\r\n\t\t\tpublic void onSuccess(String result) {\r\n\t\t\t\tSystem.out.println(\"XMLStreamTracer: Event posted.\");\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tmDocument.removeChild(mRoot);\r\n\t}",
"public int onEnd() {\n\t\t\t\tflushMessageQueue();\n\t\t\t\treturn 0;\n\t\t\t}",
"@Override\n\tpublic void endDocument() throws SAXException {\n\t\tSystem.out.println(\"---解析文档结结束----\");\n\t}",
"public void endDocument() throws SAXException {\n super.endDocument();\n }",
"public void endElement(String uri, String localName,\n\t\t\t\tString qName) throws SAXException {\n\t\t \n\t\t\t}",
"@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}",
"public void endElement(String uri, String localName, String qName) throws SAXException {\n \r\n if(qName.equals(\"sensor\")){\r\n inSensor = false;\r\n }\r\n else if(qName.equals(\"description\")){\r\n if(inSensor){\r\n sensor.setDescription(innerTextBuilder.toString());\r\n }\r\n else{\r\n sensorGroup.setDescription(innerTextBuilder.toString());\r\n }\r\n }\r\n else if(qName.equals(\"type\")){\r\n sensor.setType(innerTextBuilder.toString());\r\n }\r\n else if(qName.equals(\"floor\")){\r\n sensor.setFloor(innerTextBuilder.toString());\r\n }\r\n else if(qName.equals(\"room\")){\r\n sensor.setRoom(innerTextBuilder.toString());\r\n }\r\n else if(qName.equals(\"positiondescription\")){\r\n sensor.setPositionDescription(innerTextBuilder.toString());\r\n }\r\n \r\n \r\n \r\n }",
"@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t}",
"@Override\n public void endDocument() throws SAXException {\n }",
"@Override\n void endElement(String uri, String localName, String qName);",
"@Override\n public void exitData(final ProgramParser.DataContext ctx) {\n }",
"public void endTag(String localName) {\n\t\tif (localName.equals(HORA_TAG)) {\n\t\t\tmIsParsingHora = false;\n\t\t} else if (localName.equals(NOMBRE_TAG)) {\n\t\t\tmIsParsingNombre = false;\n\t\t} else if (localName.equals(\"wpt\")) {\n\t\t\t//Cuando se acaba un waypoint, configuro el texto de su elemento de la lista\n\t\t\tif(!tieneHora){mHora = \"Sin datos\";}\n\t\t\tmResults.add(\"Nombre:\" + mNombre + \", Hora de paso:\"\n\t\t\t\t\t+ mHora);\n\t\t\tmNombre = null;\n\t\t\tmHora = null;\n\t\t\ttieneHora=false;\n\t\t}\n\t}",
"@Override\n\tpublic void endElement(String uri, String localName, String qName) {\n\n\t\tif (localName.equals(\"doc\")) {\n\t\t\t// Document end; caught before the call to super() because we need\n\t\t\t// to calculate document length correctly.\n\t\t\tendDoc();\n\t\t}\n\n\t\tsuper.endElement(uri, localName, qName);\n\t\tif (localName.equals(\"w\")) {\n\t\t\t// End of a word.\n\t\t\tendWord();\n\t\t} else if (localName.equals(\"doc\")) {\n\t\t\t// We've done this already; see above\n\t\t} else {\n\t\t\t// Huh?\n\t\t\tthrow new RuntimeException(\"Unknown end tag: \" + localName + \" at \"\n\t\t\t\t\t+ describePosition());\n\t\t}\n\t}",
"@Override\n\tpublic void endElement(String namespaceURI, String localName, String qName)\n\t{\n\t\ttry { \n\t\t\tif (localName.equals(\"Document\")) {\n\t\t\t\tthis.in_documenttag = false;\n\t\t\t\t// set folder in document\n\t\t\t\tkmlDocument.setPlacemarks(docDataPlacemarks);\n\t\t\t\tkmlDocument.setFolders(folders);\n\t\t\t} else if (localName.equals(\"Placemark\")) {\n\t\t\t\tthis.in_placemarktag = false;\n\t\t\t\tif (!in_foldertag) {\n\t\t\t\t\t\tthis.docDataPlacemarks.add(dpm);\n\t\t\t\t} else {\n\t\t\t\t\tthis.folderDataPlacemarks.add(dpm);\n\t\t\t\t}\n\t\t\t\tdpm = new Placemark();\n\t\t\t} else if (localName.equals(\"Folder\")) {\n\t\t\t\t// take care of the current folder...\n\t\t\t\tif (folderDataPlacemarks.size() > 0) {\n\t\t\t\t\tfolder.addPlacemarks(folderDataPlacemarks);\n\t\t\t\t}\n\t\t\t\t if (folderStack.size() == 0) {\n\t\t\t\t\t\tfolders.add(folder);\n\t\t\t\t\t folder.trailSystemName = folder.name;\n\t\t\t\t\tthis.in_foldertag = false;\n\t\t\t\t\t folder = new Folder(); \n\t\t\t\t\t folders = new ArrayList<Folder>();\n\t\t\t\t } else {\n\t\t\t\t\t Folder tmpFolder = folder;\n\n\t\t\t\t\t // now set the last folder from the stack as the current folder\n\t\t\t\t\t folder = folderStack.remove(folderStack.size()-1);\n\n\t\t\t\t\t // set parentFolder, trailSystem name\n\t\t\t\t\t tmpFolder.trailSystemName = folder.getName();\n\t\t\t\t\t tmpFolder.parentFolder = folder;\n\n\t\t\t\t\t folders.add(tmpFolder);\n\t\t\t\t\t folder.addFolders(folders);\n\n\t\t\t\t\t // set the folders list on the popped/current folder\n\t\t\t\t\t folders = new ArrayList<Folder>();\n\t\t\t\t }\n\t\t\t\t // reset variables\n\t\t\t\t folders = new ArrayList<Folder>();\n\t\t\t\t folderDataPlacemarks = new ArrayList<Placemark>();\n\t\t\t} else if (localName.equals(\"name\")) {\n\t\t\t\tif (in_placemarktag) {\n\t\t\t\t\tthis.in_placemarknametag = false;\n\t\t\t\t} else if (in_foldertag) {\n\t\t\t\t\tthis.in_foldernametag = false;\n\t\t\t\t} else if (in_documenttag) {\n\t\t\t\t\tthis.in_documentnametag = false;\n\t\t\t\t}\n\t\t\t} else if (localName.equals(\"description\")) {\n\t\t\t\tthis.in_descriptiontag = false;\n\t\t\t} else if (localName.equals(\"coordinates\")) {\n\t\t\t\tthis.in_coordinatestag = false;\n\t\t\t\tthis.dpm.addCoordinates(tmpStringList); // moved from in_placemarktag to here...\n\t\t\t\ttmpStringList = new ArrayList<String>();\n\t\t\t} else if (localName.equals(\"Address\")) {\n\t\t\t\tthis.in_addresstag = false;\n//\t\t\t\tLog.e(tag, \"pm.parkingAddress=[\" + this.dpm.parkingAddress + \"]\");\n\t\t\t} else {\n//\t\t\t\tLog.v(tag+\".endElement = \", localName);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLog.e(tag, \"Exception: \" + e.getMessage());\n\t\t\tLog.e(tag, \"Exception: \" + e.toString());\n\t\t}\n//\t\tLog.e(tag, \"\");\n\t}",
"protected void onEnd() {}",
"@Override\n\tpublic void endDocument() throws SAXException {\n\t\t\n\t}",
"@Override\n\tpublic void endDocument() throws SAXException {\n\t\t\n\t}",
"@Override\r\n public void endDocument() throws SAXException {\n }",
"public void endCollection() {\n if (recordHandler != null)\n recordHandler.endCollection();\n }",
"protected int exprElementEnd(\n MarinerRequestContext context,\n PAPIAttributes papiAttributes)\n throws PAPIException {\n\n if (skipped) {\n return CONTINUE_PROCESSING;\n }\n\n MarinerPageContext pageContext\n = ContextInternals.getMarinerPageContext(context);\n\n // Fake a close element so that whitespace is handled normally since we\n // have no element to represent pane at the moment.\n pageContext.getCurrentOutputBuffer()\n .handleCloseElementWhitespace();\n\n if (paneInstance != null) {\n pageContext.popContainerInstance(paneInstance);\n }\n return CONTINUE_PROCESSING;\n }",
"public void handleFinish()\n {\n }",
"public void endElement(String uri, String localName, String name)\n\t\t\t\tthrows SAXException {\n\t\t\tif(nextIsString) {\n\t\t\t\tint idx = Integer.parseInt(lastContents);\n\t\t\t\tlastContents = new XSSFRichTextString(sst.getEntryAt(idx)).toString();\n\t\t\t\tnextIsString = false;\n\t\t\t}\n\n\t\t\t// v => contents of a cell\n\t\t\t// Output after we've seen the string contents\n\t\t\tif(name.equals(\"v\")) {\n\t\t\t\tthis.row.add(lastContents);\n\t\t\t}\n\t\t\t\n\t\t\tif (name.equals(\"row\")) {\n\t\t\t\tif (!ignoreRow)\n\t\t\t\t\treader.readRow(row);\n\t\t\t\trow.clear();\n\t\t\t}\n\t\t}",
"public void endElement(String uri, String localName, String qName) throws SAXException {\n super.endElement(uri, localName, qName);\n if(TAG_THUMBNAILS.equals(localName)) {\n mThumbnailsMode.setThumbnailsModeList(mThumbnailList);\n } else if(TAG_THUMBNAIL_THUMBNAIL.equals(localName)) {\n mThumbnailList.add(mThumbnailMode);\n mThumbnailMode = null;\n }\n\n mPrefixTAG = null;\n }",
"public void endElement(String uri, String localName,\n\t\tString qName) throws SAXException {\n \n\t}",
"public void endElement(String uri, String localname, String qname) {\n _parentStack.pop();\n }",
"@Override\n\tpublic void endElement(String uri, String localName, String qName)\n\t\t\tthrows SAXException {\n\t\tsuper.endElement(uri, localName, qName);\n\n\t\ttag = \"\";\n\t\tif (qName.equals(\"entry\")) {\n\t\t\tlist.add(commentsInfo);\n\t\t}\n\n\t}",
"@Override\n public void endElement(String uri, String localName, String name) throws SAXException {\n super.endElement(uri, localName, name);\n if (localName.equals(KEY) == true) {\n LOGD(\"local Name = \" + localName + \" value = \" + mCurrentValue.toString().trim());\n mInterceptKey.add(mCurrentValue.toString().trim());\n mCurrentValue.setLength(0);\n } else if (localName.equals(PORT) == true) {\n LOGD(\"local Name = \" + localName + \" value = \" + mCurrentValue.toString().trim());\n mInterceptPort.add(mCurrentValue.toString().trim());\n mCurrentValue.setLength(0);\n } else if (mCurrentValue.length() > 0) {\n LOGD(\"local Name = \" + localName + \" value = \" + mCurrentValue.toString().trim());\n mChannelInfo.put(localName, mCurrentValue.toString().trim());\n mCurrentValue.setLength(0);\n }\n }",
"public void endRecord() {\n if (recordHandler != null)\n recordHandler.record(record);\n }",
"public void endData()\n\t\t\t{\n\t\t\t\tsend(\"</data>\", false);\n\t\t\t}",
"@Override\n\tpublic void endDocument() throws SAXException {\n\t\tSystem.out.println(\"文档解析完成\");\n\t}",
"public void endElement( final String uri, final String localName, final String qName ) throws SAXException {\r\n if( this.elementBuffer.length() > 0 ) {\r\n String name = getFieldName();\r\n \r\n if( localName != null && localName.startsWith( \"keyword\" ) ) {\r\n name = \"keywords\";\r\n } else if( \"creator\".equals( localName ) ) {\r\n name = \"author\";\r\n } else if( \"subject\".equals( localName ) || \"title\".equals( localName ) ) {\r\n name = \"title\";\r\n } else if( \"description\".equals( localName ) ) {\r\n name = \"description\";\r\n }\r\n \r\n if( this.elementContent.containsKey( name ) ) {\r\n final StringBuffer content = this.elementContent.get( name );\r\n \r\n content.append( ' ' );\r\n content.append( this.elementBuffer.toString().trim() );\r\n } else {\r\n this.elementContent.put( name, new StringBuffer( this.elementBuffer.toString().trim() ) );\r\n }\r\n }\r\n }",
"@Override\n public void endElement(String namespaceURI, String localName, String qName)\n throws SAXException {\n if (title) {\n title = false;\n }\n }",
"@Override\n\tpublic void processData() {\n\t\t\n\t}",
"public void endElement(String uri, String localName, String qualifiedName)\n\t\t\tthrows SAXException { if (\"title\".equals(qualifiedName))\n\t\t// title = false;\n\t\t//\n\t\tif (\"document\".equals(qualifiedName)) {\n\n\t\t\tdocumentList.add(doc);\n\t\t\tdoc = null;\n\t\t}\n\t\t// else if (\"author\".equals(qualifiedName)) {\n\t\t// author = false;\n\t\t// }\n\t\ttag = \"\";\n\t}",
"public void endElement(String uri, String localName, String gName) {\t\r\n\t}",
"public void endDTD() throws SAXException {\n this.saxHandler.endDTD();\n }",
"void endAll(GroupSG group) throws SAXException;",
"void endSequence(GroupSG group) throws SAXException;",
"public void endDocument() throws SAXException {\n }",
"protected void endCfgElement(String qName) throws SAXException {\n\t\ttry {\n\t\t\tif (STREAM_ELMT.equals(qName)) {\n\t\t\t\tcurrStream.setProperties(applyVariableProperties(currProperties.remove(qName)));\n\t\t\t\tcurrStream = null;\n\t\t\t} else if (PARSER_ELMT.equals(qName)) {\n\t\t\t\tcurrParser.setProperties(applyVariableProperties(currProperties.remove(qName)));\n\t\t\t\tcurrParser.organizeFields();\n\t\t\t\tcurrParser = null;\n\t\t\t} else if (StringUtils.equalsAny(qName, FIELD_ELMT, EMBEDDED_ACTIVITY_ELMT)) {\n\t\t\t\tif (currField != null) {\n\t\t\t\t\thandleActivityField(currField, qName);\n\t\t\t\t\tcurrParser.addField(currField.field);\n\t\t\t\t\tcurrField = null;\n\t\t\t\t}\n\t\t\t} else if (FIELD_LOC_ELMT.equals(qName)) {\n\t\t\t\tif (currLocatorData != null) {\n\t\t\t\t\thandleFieldLocator(currLocatorData);\n\n\t\t\t\t\tcurrLocatorData = null;\n\t\t\t\t}\n\t\t\t} else if (TNT4J_PROPERTIES_ELMT.equals(qName)) {\n\t\t\t} else if (JAVA_OBJ_ELMT.equals(qName)) {\n\t\t\t\tif (javaObjectData != null) {\n\t\t\t\t\thandleJavaObject(javaObjectData);\n\t\t\t\t\tjavaObjectData = null;\n\t\t\t\t}\n\t\t\t} else if (PROPERTY_ELMT.equals(qName)) {\n\t\t\t\tif (currProperty != null) {\n\t\t\t\t\thandleProperty(currProperty);\n\n\t\t\t\t\tcurrProperty = null;\n\t\t\t\t}\n\t\t\t} else if (FIELD_TRANSFORM_ELMT.equals(qName)) {\n\t\t\t\tif (currTransform != null) {\n\t\t\t\t\thandleFieldTransform(currTransform);\n\n\t\t\t\t\tcurrTransform = null;\n\t\t\t\t}\n\t\t\t} else if (FILTER_ELMT.equals(qName)) {\n\t\t\t\tif (currFilter != null) {\n\t\t\t\t\thandleFilter(currFilter);\n\n\t\t\t\t\tcurrFilter = null;\n\t\t\t\t}\n\t\t\t} else if (VALUE_ELMT.equals(qName)) {\n\t\t\t\tif (currFilterValue != null) {\n\t\t\t\t\thandleFilterValue(currFilterValue);\n\n\t\t\t\t\tcurrFilterValue = null;\n\t\t\t\t} else if (currCacheEntry != null) {\n\t\t\t\t\thandleValue(currCacheEntry);\n\t\t\t\t}\n\t\t\t} else if (EXPRESSION_ELMT.equals(qName)) {\n\t\t\t\tif (currFilterExpression != null) {\n\t\t\t\t\thandleFilterExpression(currFilterExpression);\n\n\t\t\t\t\tcurrFilterExpression = null;\n\t\t\t\t}\n\t\t\t} else if (CACHE_ELMT.equals(qName)) {\n\t\t\t\tStreamsCache.setProperties(applyVariableProperties(currProperties.remove(qName)));\n\t\t\t} else if (CACHE_ENTRY_ELMT.equals(qName)) {\n\t\t\t\tif (currCacheEntry != null) {\n\t\t\t\t\thandleCacheEntry(currCacheEntry);\n\n\t\t\t\t\tcurrCacheEntry = null;\n\t\t\t\t}\n\t\t\t} else if (CACHE_KEY_ELMT.equals(qName)) {\n\t\t\t\tif (currCacheEntry != null) {\n\t\t\t\t\thandleKey(currCacheEntry);\n\t\t\t\t}\n\t\t\t} else if (CACHE_DEFAULT_VALUE_ELMT.equals(qName)) {\n\t\t\t\tif (currCacheEntry != null) {\n\t\t\t\t\thandleDefault(currCacheEntry);\n\t\t\t\t}\n\t\t\t} else if (MATCH_EXP_ELMT.equals(qName)) {\n\t\t\t\tif (currParserRef != null) {\n\t\t\t\t\thandleMatchExp(currParserRef);\n\t\t\t\t}\n\t\t\t} else if (PARSER_REF_ELMT.equals(qName)) {\n\t\t\t\tif (currParserRef != null) {\n\t\t\t\t\thandleParserRef(currParserRef);\n\n\t\t\t\t\tcurrParserRef = null;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (SAXException exc) {\n\t\t\tthrow exc;\n\t\t} catch (Exception e) {\n\t\t\tthrow new SAXException(e.getLocalizedMessage() + getLocationInfo(), e);\n\t\t}\n\t}",
"@Override\n public void endElement(String uri, String localName, String qName) throws SAXException {\n\n //Verificar se a TAG 'produto' chegou ao fim. Se chegou podemos adicionar o produto no array\n if(qName.equals(\"produto\")) {\n\n produtos.add(produto);\n \n //Verificar se a TAG nome hegou ao fim. se chegou podemos atribui-la ao produto\n } else if(qName.equals(\"nome\")) {\n\n produto.setNome(conteudo.toString());\n\n //Verificar se a TAG preco hegou ao fim. se chegou podemos atribui-la ao produto\n } else if(qName.equals(\"preco\")) {\n\n produto.setPreco(Double.parseDouble(conteudo.toString()));\n }\n\n\n }",
"public void endElement(String uri, String localName, String qName) throws SAXException \n\t{ \n\t\tif(qName.equals(ReqifTags.TAG_OBJECT))\n\t\t{\n\t\t\tParsedReqifElement u=new ParsedReqifElement(buf.toString().trim(),dict.get(buf.toString().trim()));\n\t\t\ttemp=new DefaultMutableTreeNode(u);\n\t\t\tif(level==2)\n\t\t\t{\n\t\t\t\ttop1.add(temp);\n\t\t\t\ttop2=temp;\n\t\t\t}\n\t\t\telse if(level==3)\n\t\t\t{\n\t\t\t\ttop2.add(temp);\n\t\t\t\ttop3=temp;\n\t\t\t}\n\t\t\telse if(level==4)\n\t\t\t{\n\t\t\t\ttop3.add(temp);\n\t\t\t\ttop4=temp;\n\t\t\t}\n\t\t\telse if(level==5)\n\t\t\t{\n\t\t\t\ttop4.add(temp);\n\t\t\t}\n\t\t}\n\t\telse if(qName.equals(ReqifTags.TAG_SPEC_HIERARCHY)||qName.equals(ReqifTags.TAG_SPECIFICATION))\n\t\t\tlevel--;\n\t\telse if(qName.equals(ReqifTags.TAG_SPEC_OBJECT_REF) && isSource)\n\t\t{\n\t\t\treqId = buf.toString().trim();\n\t\t\tdescWithRelation = dict.get(reqId);\n\t\t\t//System.out.println(reqId);\n\t\t\tif(!descWithRelation.contains(\"[REFERENCES: \"))\n\t\t\t{\n\t\t\t\tdescWithRelation+=\"[REFERENCES: \";\n\t\t\t}\n\t\t\tisSource = false;\n\t\t}\n\t\telse if(qName.equals(ReqifTags.TAG_SPEC_OBJECT_REF) && isTarget)\n\t\t{\n\t\t//\tSystem.out.println(buf.toString().trim());\n\t\t\tif(descWithRelation.endsWith(\"]\"))\n\t\t\t{\n\t\t\t\tdescWithRelation = descWithRelation.substring(0, descWithRelation.length()-1);\n\t\t\t\tdescWithRelation+=\", \"+buf.toString().trim();\n\t\t\t\tdescWithRelation+=\"]\";\n\t\t\t}\n\t\t\telse if(descWithRelation.endsWith(\"[REFERENCES: \"))\n\t\t\t{\n\t\t\t\tdescWithRelation+=buf.toString().trim();\n\t\t\t\tdescWithRelation+=\"]\";\n\t\t\t}\n\t\t\t\n\t\t\tif(reqId!=null)\n\t\t\t\tdict.put(reqId, descWithRelation);\n\n\t\t\tisTarget = false;\n\t\t\tdescWithRelation = null;\n\t\t\treqId = null;\n\t\t}\n\t\t//System.out.println(buf.toString().trim());\n\t}",
"@Override\n public void endElement(String uri, String localName, String qName)\n throws SAXException {\n if(branchInXML.equalsIgnoreCase(ELEM_BOOK)) {\n if(localName.equalsIgnoreCase(ELEM_ID)) {\n currentBook.setId(new Integer(currentvalue.toString()));\n } else if(localName.equalsIgnoreCase(ELEM_TITLE)) {\n currentBook.setTitle(currentvalue.toString());\n } else if(localName.equalsIgnoreCase(ELEM_ISBN)) {\n currentBook.setIsbn(currentvalue.toString());\n } else if(localName.equalsIgnoreCase(ELEM_IMAGE_URL)) {\n currentBook.setImageURL(currentvalue.toString());\n } else if(localName.equalsIgnoreCase(ELEM_THUMBNAIL)) {\n currentBook.setThumbnailURL(currentvalue.toString());\n } else if(localName.equalsIgnoreCase(ELEM_THUMBNAIL)) {\n currentBook.setTitle(currentvalue.toString());\n } else if(localName.equalsIgnoreCase(ELEM_DESCRIPTION)) {\n currentBook.setDescription(currentvalue.toString());\n } else if(localName.equalsIgnoreCase(ELEM_RATING)) {\n currentBook.setRating(new Double(currentvalue.toString()).doubleValue());\n } else if(localName.equalsIgnoreCase(ELEM_RATING_COUNT)) {\n currentBook.setRatingCount(new Integer(currentvalue.toString()).intValue());\n } else if(localName.equalsIgnoreCase(ELEM_NUM_PAGES)) {\n currentBook.setNumPages(new Integer(currentvalue.toString()).intValue());\n } else if(localName.equalsIgnoreCase(ELEM_LINK)) {\n currentBook.setLink(currentvalue.toString());\n }\n \n } else if(branchInXML.equalsIgnoreCase(ELEM_REVIEW)) {\n if(localName.equalsIgnoreCase(ELEM_ID)) {\n currentReview.setId(new Integer(currentvalue.toString()).intValue());\n } else if(localName.equalsIgnoreCase(ELEM_RECOMMENDED_FOR)) {\n currentReview.setRecommendedFor(currentvalue.toString());\n } else if(localName.equalsIgnoreCase(ELEM_BODY)) {\n currentReview.setContent(currentvalue.toString());\n } else if(localName.equalsIgnoreCase(ELEM_DATE_ADDED)) {\n currentReview.setDateAdded(currentvalue.toString());\n }\n } else if(branchInXML.equalsIgnoreCase(ELEM_AUTHOR)) {\n if(localName.equalsIgnoreCase(ELEM_AUTHOR)) {\n currentBook.addAuthor(currentvalue.toString());\n }\n } else if(branchInXML.equalsIgnoreCase(ELEM_USER)) {\n if(localName.equalsIgnoreCase(ELEM_NAME)) {\n currentReview.setAuthor(currentvalue.toString());\n } else if(localName.equalsIgnoreCase(ELEM_LOCATION)) {\n currentReview.setAuthorLocation(currentvalue.toString());\n }\n }\n currentElement=false;\n //Close the branch if necessary and return to the parent branch.\n if(localName.equalsIgnoreCase(ELEM_BOOK)) {\n books.add(currentBook);\n } else if(localName.equalsIgnoreCase(ELEM_REVIEW)) {\n currentBook.addReview(currentReview);\n } else if(localName.equalsIgnoreCase(ELEM_USER)) {\n branchInXML = ELEM_REVIEW;\n } else if(localName.equalsIgnoreCase(ELEM_AUTHOR)) {\n branchInXML = ELEM_BOOK;\n }\n }",
"@Override\n\tpublic void endElement(String arg0, String arg1, String arg2) throws SAXException {\n\t\tSystem.out.println(\"此处Uri是:\"+arg0+\" 此处localName是:\"+arg0+\" 此处元素是:\"+arg2);\n\t}",
"void innerFinish() {\r\n\t\t\t\t\t\tobserver.finish();\r\n\t\t\t\t\t\tclose();\r\n\t\t\t\t\t}"
] |
[
"0.61808354",
"0.59380937",
"0.5605219",
"0.552807",
"0.552807",
"0.552807",
"0.552807",
"0.5493219",
"0.54754806",
"0.546031",
"0.5458512",
"0.54374474",
"0.5413311",
"0.54017276",
"0.53279585",
"0.53162533",
"0.5298274",
"0.52689946",
"0.5268381",
"0.52644014",
"0.52570224",
"0.5248314",
"0.5231511",
"0.5222851",
"0.5218824",
"0.52053875",
"0.5199921",
"0.5184953",
"0.51801926",
"0.5167799",
"0.51299506",
"0.5118532",
"0.51121813",
"0.5105313",
"0.5105313",
"0.5105313",
"0.51021963",
"0.5092499",
"0.5087286",
"0.5081516",
"0.5056711",
"0.5039165",
"0.50377727",
"0.50377727",
"0.50323975",
"0.50191164",
"0.50187147",
"0.5015148",
"0.49840394",
"0.497094",
"0.49691796",
"0.49602363",
"0.49513468",
"0.49413386",
"0.49394313",
"0.49318168",
"0.49318168",
"0.49318168",
"0.49318168",
"0.49318168",
"0.49254656",
"0.4924865",
"0.4924865",
"0.4924752",
"0.49139258",
"0.49123573",
"0.49111605",
"0.49107876",
"0.49044114",
"0.49039283",
"0.48951966",
"0.48951966",
"0.48950586",
"0.4894574",
"0.48915544",
"0.4888259",
"0.48601794",
"0.48554802",
"0.48519886",
"0.48415312",
"0.48396248",
"0.4837119",
"0.48326266",
"0.4823263",
"0.4823201",
"0.4822739",
"0.48216042",
"0.4812359",
"0.48031276",
"0.4799556",
"0.47987103",
"0.4766926",
"0.47549912",
"0.47536236",
"0.47391388",
"0.47340155",
"0.47298297",
"0.47033632",
"0.46845964",
"0.46760166"
] |
0.6310735
|
0
|
function to calculate minimum spanning tree
|
public static void mst(int n)
{
boolean[]visited=new boolean[n+1];
//sort queue with considering weight as a key
PriorityQueue<Node>queue=new PriorityQueue<>(new Comparator<Node>(){
public int compare(Node n1,Node n2)
{
return n1.weight-n2.weight;
}
});
visited[1]=true;
for(Edge e:list[1])
{
queue.add(new Node(e.weight,e.vertex,1));
}
while(queue.size()!=0)
{
Node node=queue.poll();
int weight=node.weight;
int curr=node.curr;
int parent=node.parent;
if(visited[curr])
continue;
visited[curr]=true;
arr.add(new Node(weight,curr,parent));
ans+=weight;
for(Edge e:list[curr])
{
queue.add(new Node(e.weight,e.vertex,curr));
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void getMinimumSpanningTree(GraphStructure graph) {\r\n\t\tdistanceArray = new int [graph.getNumberOfVertices()];\r\n\t\tint numberOfVertices=graph.getNumberOfVertices();\r\n\t\tSet<Integer> spanningTreeSet = new HashSet<Integer>();\r\n\t\tArrays.fill(distanceArray,Integer.MAX_VALUE);\r\n\t\tdistanceArray[0]=0;\r\n\t\tadjacencyList = graph.getAdjacencyList();\r\n\t\tList<Edge> list;\r\n\t\twhile(spanningTreeSet.size()!=numberOfVertices) {\r\n\t\t\tfor (int vertex=0; vertex<numberOfVertices;vertex++) {\r\n\t\t\t\tif(! spanningTreeSet.contains(vertex)) {\r\n\t\t\t\t\tspanningTreeSet.add(vertex);\r\n\t\t\t\t\tlist = adjacencyList[vertex];\r\n\t\t\t\t\tfor(Edge value : list) {\r\n\t\t\t\t\t\tint sumOfWeightAndSourceVertexDistanceValue = distanceArray[vertex] + value.getWeight();\r\n\t\t\t\t\t\tint distanceValueOfDestinationVertex = distanceArray[value.getVertex()];\r\n\t\t\t\t\t\tif( sumOfWeightAndSourceVertexDistanceValue < distanceValueOfDestinationVertex ) {\r\n\t\t\t\t\t\t\tdistanceArray[value.getVertex()] = sumOfWeightAndSourceVertexDistanceValue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"\\nvertex\\tdistance from source\");\r\n\t\tfor (int i=0;i<numberOfVertices;i++) {\r\n\t\t\tSystem.out.println(i+\"\\t\"+distanceArray[i]);\r\n\t\t}\r\n\t}",
"public int[] mRtreeFromSource(int s,int k){\n double INFINITY = Double.MAX_VALUE;\n boolean[] SPT = new boolean[intersection];\n double[] d = new double[intersection];\n int[] parent = new int[intersection];\n\n for (int i = 0; i <intersection ; i++) {\n d[i] = INFINITY;\n parent[i] = -1;\n }\n\n d[s] = 0;\n parent[s]=s;\n\n MinHeap minHeap = new MinHeap(k);\n for (int i = 0; i <intersection ; i++) {\n minHeap.add(i,d[i]);\n }\n while(!minHeap.isEmpty()){\n\n int extractedVertex = minHeap.extractMin();\n\n if(d[extractedVertex]==INFINITY)\n break;\n\n SPT[extractedVertex] = true;\n\n LinkedList<Edge> list = g.adjacencylist[extractedVertex];\n for (int i = 0; i <list.size() ; i++) {\n Edge edge = list.get(i);\n int destination = edge.destination;\n if(SPT[destination]==false ) {\n\n double newKey = edge.weight ; //the different part with previous method\n double currentKey = d[destination];\n if(currentKey>=newKey){\n if(currentKey==newKey){\n if(extractedVertex<parent[destination]){\n minHeap.updateKey(newKey, destination, d[destination]);\n parent[destination] = extractedVertex;\n d[destination] = newKey;\n }\n }\n else {\n minHeap.updateKey(newKey, destination, d[destination]);\n parent[destination] = extractedVertex;\n d[destination] = newKey;\n }\n }\n }\n }\n }\n return parent;\n }",
"public static <V> Graph<V> getMinimumSpanningTreeKruskal(Graph<V> graph) {\n class Arista {\n private V origen;\n private V destino;\n private double peso;\n\n private Arista(V pOrigen, double pPeso, V pDestino) {\n origen = pOrigen;\n peso = pPeso;\n destino = pDestino;\n }\n }\n\n V[] array = graph.getValuesAsArray();\n double[][] matrizPesos = graph.getGraphStructureAsMatrix();\n double[][] matrizCopia = new double[array.length][array.length];\n for (int x = 0; x < array.length; x++) {\n for (int y = 0; y < array.length; y++) {\n matrizCopia[x][y] = matrizPesos[x][y];\n }\n }\n\n List<Arista> aristas = new LinkedList<>();\n\n // Se buscan todas las aristas del grafo y se enlistan\n for (int x = 0; x < array.length; x++) {\n for (int y = 0; y < array.length; y++) {\n if (matrizCopia[x][y] != -1) {\n if (!graph.isDirected()) {\n matrizCopia[y][x] = -1;\n }\n Arista ar = new Arista(array[x], matrizCopia[x][y], array[y]);\n aristas.add(ar);\n }\n }\n }\n\n //Se ordenan las listas de menor a mayor, aplicando el ordenamiento de burbuja.\n if (aristas.size() > 1) {\n int i = 0;\n for (int x = 2; x < aristas.size(); x++) {\n for (int y = 1; y < aristas.size() - i; y++) {\n Arista temp = aristas.get(y);\n Arista temp2 = aristas.get(y+1);\n if (temp.peso > temp2.peso) {\n aristas.set(y, temp2);\n aristas.set(y+1, temp);\n }\n }\n i++;\n }\n }\n\n List<Graph<V>> bosque = new LinkedList<>();\n for (int x = 0; x < array.length; x++) {\n Graph<V> temp = new AdjacencyMatrix<>();\n temp.addNode(array[x]);\n bosque.add(temp);\n }\n\n Iterator<Arista> it1 = aristas.iterator();\n while (it1.hasNext()) {\n Arista aux = it1.next();\n int arbolOrigen = buscarArbol(aux.origen, bosque);\n int arbolDestino = buscarArbol(aux.destino, bosque);\n if (arbolDestino < arbolOrigen) {\n int temp = arbolDestino;\n arbolDestino = arbolOrigen;\n arbolOrigen = temp;\n }\n\n if (arbolDestino != arbolOrigen) { // Significa que estan en diferentes arboles.\n Graph<V> grafoDestino = bosque.remove(arbolDestino);\n Graph<V> grafoTemp = unirGrafos(bosque.get(arbolOrigen), grafoDestino);\n grafoTemp.addEdge(aux.origen, aux.destino, aux.peso);\n bosque.set(arbolOrigen, grafoTemp);\n }\n }\n if (bosque.size() != 1) { // Significa que hay vertices aislados.\n for (int x = 2; x <= bosque.size(); x++) {\n Graph<V> grafoTemp = bosque.remove(x);\n Graph<V> grafosUnidos = unirGrafos(bosque.get(1), grafoTemp);\n bosque.set(1, grafosUnidos);\n }\n }\n\n return bosque.get(1);\n }",
"public static <V> Graph<V> getMinimumSpanningTreePrim(Graph<V> graph) {\n V[] array = graph.getValuesAsArray();\n double[][] matriz = graph.getGraphStructureAsMatrix();\n\n double[][] matrizCopia = new double[array.length][array.length]; //Se hace una copia del array. Sino, se modificaria en el grafo original.\n for (int x = 0; x < array.length; x++) {\n for (int y = 0; y < array.length; y++) {\n matrizCopia[x][y] = matriz[x][y];\n }\n }\n\n boolean[] revisados = new boolean[array.length]; // Arreglo de booleanos que marca los valores por donde ya se paso.\n Set<V> conjuntoRevisados = new LinkedListSet<>(); //Conjunto donde se guardan los vertices por donde ya se paso\n Graph<V> nuevo = new AdjacencyMatrix<>(graph.isDirected(), true);\n\n if (array.length > 0) { // Grafo no vacio\n\n revisados[0] = true;\n conjuntoRevisados.put(array[0]);\n nuevo.addNode(array[0]);\n\n double menorArista = 50000;\n V verticeOrigen = null;\n V verticeDestino = null;\n\n while (conjuntoRevisados.size() != array.length) { // mientras hayan vertices sin revisar\n\n Iterator<V> it1 = conjuntoRevisados.iterator(); //Se recorren todos los vertices guardados\n while (it1.hasNext()) {\n\n V aux = it1.next();\n int posArray = buscarPosicion(aux, array);\n for (int x = 0; x < array.length; x++) {\n\n if (matrizCopia[posArray][x] != -1) { //Si existe arista\n //Si los 2 vertices no estan en el arbol, para evitar un ciclo\n if (!(conjuntoRevisados.isMember(aux) && conjuntoRevisados.isMember(array[x]))) {\n if (matrizCopia[posArray][x] < menorArista) {\n menorArista = matrizCopia[posArray][x];\n if (!graph.isDirected()) {\n matrizCopia[x][posArray] = -1;\n }\n verticeOrigen = aux;\n verticeDestino = array[x];\n }\n }\n }\n }\n }\n\n if (verticeOrigen != null) {\n if (!nuevo.contains(verticeDestino)) {\n nuevo.addNode(verticeDestino);\n if (!conjuntoRevisados.isMember(verticeDestino)) {\n conjuntoRevisados.put(verticeDestino);\n }\n revisados[buscarPosicion(verticeDestino, array)] = true;\n }\n nuevo.addEdge(verticeOrigen, verticeDestino, menorArista);\n\n verticeOrigen = null;\n menorArista = 50000;\n } else {\n for (int x = 0; x < array.length; x++) {\n if (revisados[x] == false) {\n conjuntoRevisados.put(array[x]);\n nuevo.addNode(array[x]);\n }\n }\n }\n }\n }\n return nuevo;\n }",
"public static Vector<Edge> computeMinimumSpanningTreeNaive(Graph g) {\r\n\t\t\r\n\t\t//minimum spanning tree\r\n\t\tVector<Edge> mst = new Vector<Edge>();\r\n\t\t\r\n\t\t//defining X\r\n\t\tint qntNodes = g.getNodes().length;\r\n\t\tbelongsToX = new boolean[qntNodes];\r\n\t\t\r\n\t\t//initializing X\r\n\t\tbelongsToX[0] = true;\r\n\t\t\r\n\t\t//main loop\r\n\t\tfor(int i = 1; i < qntNodes; i++){\r\n\t\t\tEdge min = null;\r\n\t\t\t\r\n\t\t\t//find minimum edge that crosses the frontier\r\n\t\t\tfor(Edge e : g.getEdges()){\r\n\t\t\t\tif(min == null || e.cost < min.cost){ // e is better than minimum\r\n\t\t\t\t\tif((belongsToX[e.n1.number] && !belongsToX[e.n2.number]) || (!belongsToX[e.n1.number] && belongsToX[e.n2.number])){ //e is in the frontier\r\n\t\t\t\t\t\tmin = e;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//add new node to X\r\n\t\t\tNode newNode = min.n1;\r\n\t\t\tif(belongsToX[min.n1.number] && !belongsToX[min.n2.number]){\r\n\t\t\t\tnewNode = min.n2;\r\n\t\t\t}\r\n\t\t\tbelongsToX[newNode.number] = true;\r\n\t\t\t\r\n\t\t\t//add minimum edge to tree\r\n\t\t\tmst.add(min);\r\n\t\t}\r\n\t\t\r\n\t\treturn mst;\r\n\t}",
"public int createSpanningTree() {\n\n\t\treturn primMST(edges);\n\t}",
"@Override\r\n\tpublic ArrayList<Edge<E>> primMinimumSpanningTree(E src) {\r\n\t\tArrayList<Edge<E>> prim = new ArrayList<Edge<E>>();\r\n\t\tif(containsVertex(src)) {\r\n\t\t\tlastSrc = vertices.get(src);\r\n\t\t\tPriorityQueue<Vertex<E>> pq = new PriorityQueue<Vertex<E>>();\r\n\t\t\tvertices.forEach((E t, Vertex<E> u) -> {\r\n\t\t\t\tu.setDistance(Integer.MAX_VALUE);\r\n\t\t\t\tu.setColor(Color.WHITE);\r\n\t\t\t\tu.setPredecessor(null);\r\n\t\t\t\tpq.offer(u);\r\n\t\t\t});\r\n\t\t\tpq.remove(lastSrc);\r\n\t\t\tlastSrc.setDistance(0);\r\n\t\t\tpq.offer(lastSrc);\r\n\r\n\t\t\twhile(!pq.isEmpty()) {\r\n\t\t\t\tVertex<E> u = pq.poll();\r\n\t\t\t\tfor(Edge<E> ale : adjacencyLists.get(u.getElement())) {\r\n\t\t\t\t\tVertex<E> s = vertices.get(ale.getSrc());\r\n\t\t\t\t\tVertex<E> d = vertices.get(ale.getDst());\r\n\t\t\t\t\tif(d.getColor() == Color.WHITE && d.getDistance() > ale.getWeight()) {\r\n\t\t\t\t\t\tpq.remove(d);\r\n\t\t\t\t\t\tVertex<E> pred = d.getPredecessor();\r\n\t\t\t\t\t\tif(pred != null) { //remove the edge that has ale.dst as dst vertex\r\n\t\t\t\t\t\t\tEdge<E> edgeToRemove = new Edge<>(pred.getElement(), ale.getDst(), 1);\r\n\t\t\t\t\t\t\tprim.remove(edgeToRemove);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\td.setDistance(ale.getWeight());\r\n\t\t\t\t\t\td.setPredecessor(s);\r\n\t\t\t\t\t\tpq.offer(d);\r\n\t\t\t\t\t\tprim.add(ale);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tu.setColor(Color.BLACK);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn prim;\r\n\t}",
"@Override\r\n\tpublic ArrayList<Edge<E>> kruskalMinimumSpannigTree() {\r\n\t\tUnionFind<E> uf = new UnionFind<>(getVertices());\r\n\t\tArrayList<Edge<E>> kruskal = new ArrayList<>();\r\n\t\tArrayList<Edge<E>> edges = new ArrayList<>();\r\n\t\tfor(ArrayList<Edge<E>> adjList : adjacencyLists.values()) {\r\n\t\t\tfor(Edge<E> edge : adjList) {\r\n\t\t\t\tif(!edges.contains(new Edge<>(edge.getDst(), edge.getSrc(), 1))) {\r\n\t\t\t\t\tedges.add(edge);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tCollections.sort(edges);\r\n\t\tfor(int i = 0; i < edges.size(); i++) {\r\n\t\t\tEdge<E> edge = edges.get(i);\r\n\t\t\tif(uf.find(edge.getSrc()) != uf.find(edge.getDst())) {\r\n\t\t\t\tuf.union(edge.getSrc(), edge.getDst());\r\n\t\t\t\tkruskal.add(edge);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn kruskal;\r\n\t}",
"public static Vector<Edge> computeMinimumSpanningTreeNodeHeap(Graph g){\r\n\t\t//minimum spanning tree\r\n\t\tVector<Edge> mst = new Vector<Edge>();\r\n\r\n\t\t//defining X\r\n\t\tint qntNodes = g.getNodes().length;\r\n\t\tbelongsToX = new boolean[qntNodes];\r\n\r\n\t\t//initializing X\r\n\t\tbelongsToX[0] = true;\r\n\t\t\r\n\t\t//initializing heap\r\n\t\tHeapNode heap = new HeapNode(qntNodes);\r\n\t\trestoreHeapProperties(g.getNodes()[0], heap);\r\n\r\n\t\t//main loop\r\n\t\tfor(int i = 1; i < qntNodes; i++){\t\t\t\r\n\t\t\t//find minimum edge that crosses the frontier\r\n\t\t\tNode newNode = heap.extractMin();\r\n\t\t\tEdge min = heap.getNodeMinEdge(newNode);\r\n\t\t\t\r\n\t\t\t//add new node to X\r\n\t\t\tbelongsToX[newNode.number] = true;\r\n\r\n\t\t\t//add minimum edge to tree\r\n\t\t\tmst.add(min);\r\n\t\t\t\r\n\t\t\t//restore heap properties\r\n\t\t\trestoreHeapProperties(newNode, heap);\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn mst;\r\n\t}",
"Node minValueNode(Node node) \n { \n Node current = node; \n \n /* loop down to find the leftmost leaf */\n while (current.left != null) \n current = current.left; \n \n return current; \n }",
"public static int minCostOfRoad(int n, ArrayList<ArrayList<Integer>> edges){\n Collections.sort(edges, new Comparator<ArrayList<Integer>>() { \n @Override\n public int compare(ArrayList<Integer> o1, ArrayList<Integer> o2) {\n return o1.get(2).compareTo(o2.get(2));\n } \n });\n //create a parent array and fill it with the self value\n int []parent = new int[n + 1];\n for(int i = 0;i <= n;i++){\n parent[i] = i;\n }\n\n ArrayList<ArrayList<Integer>> mst = new ArrayList<>();\n int minCost = 0;\n int i = 0;\n int countEdges = 0;\n //Pick the smallest edge. Check if it forms a cycle with the spanning tree formed so far. \n //If cycle is not formed, include this edge. Else, discard it.\n while(countEdges != n - 1){\n ArrayList<Integer>edge = edges.get(i);\n int source = edge.get(0);\n int dest = edge.get(1);\n int weight = edge.get(2);\n int sourceParent = findParent(source, parent);\n int destParent = findParent(dest, parent);\n if(sourceParent != destParent){\n mst.add(edge);\n countEdges++;\n minCost += weight;\n parent[sourceParent] = destParent;\n }\n i++;\n }\n return minCost;\n }",
"public ArrayList<Integer> min(int index)\n\t{\n\t\tArrayList<Integer> array2 = new ArrayList<Integer>();\n\t\tif(4*index + 3 >= size)\n\t\t{\n\t\t\tarray2.add(0, 0) ;\n\t\t\treturn array2;\n\t\t}\n\t\tint smallerIndex;\n\t\tint smallerIndex2;\n\t\tint smallest = 0;\n\n\t\tif(4*index + 6 < size)\n\t\t{\n\t\t\tif(array[4*index+6] != null)\n\t\t\t{\n\n\t\t\t\tsmallerIndex = grandChildMin(4*(index)+3, 4*index + 4);\n\t\t\t\tsmallerIndex2 = grandChildMin(4*(index)+5, 4*index + 6);\n\t\t\t\tsmallest = grandChildMin(smallerIndex, smallerIndex2);\n\n\t\t\t\tarray2.add(0, smallest) ;\n\t\t\t\treturn array2;\n\t\t\t}\n\t\t}\n\t\tif(4*index+5 < size)\n\t\t{\n\t\t\tif(array[4*index+5] != null && array[4*index+6] == null)\n\t\t\t{\n\n\t\t\t\tsmallerIndex = grandChildMin(4*(index)+3, 4*index + 4);\n\t\t\t\tsmallest = grandChildMin(smallerIndex, 4*index+5);\n\t\t\t\tarray2.add(0, smallest) ;\n\t\t\t\treturn array2;\n\n\n\t\t\t}\n\t\t}\n\t\tif(4*index+4 < size)\n\t\t{\n\t\t\tif(array[2*index + 2] != null )\n\t\t\t{\n\n\t\t\t\tsmallerIndex = grandChildMin(4*(index)+3, 4*(index)+4);\n\t\t\t\tsmallest = grandChildMin(smallerIndex, 2*index+2);\n\n\t\t\t\tarray2.add(0, smallest) ;\n\t\t\t\tarray2.add(1, 0);\n\t\t\t\treturn array2;\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsmallest = grandChildMin(4*(index)+3, 4*index + 4);\n\t\t\t\tarray2.add(0, smallest) ;\n\t\t\t\treturn array2;\n\t\t\t}\n\t\t}\n\n\n\t\tif(4*index+3 < size)\n\t\t{\n\n\t\t\tif(array[2*index + 2] != null)\n\t\t\t{\n\n\t\t\t\tsmallest = grandChildMin(4*index+3, 2*index + 2);\n\t\t\t\tarray2.add(0, smallest) ;\n\t\t\t\tarray2.add(1, 0);\n\t\t\t\treturn array2;\n\t\t\t}\n\n\t\t\telse\n\t\t\t{\n\n\t\t\t\tsmallest = 4*index +3;\n\t\t\t\tarray2.add(0, smallest) ;\n\t\t\t\treturn array2;\n\t\t\t}\n\n\n\t\t}\n\t\t\n\t\treturn array2;\n\n\t}",
"protected final IntervalNode treeMin() {\n\tIntervalNode x = this;\n\twhile(x.left != IntervalNode.nullIntervalNode) {\n\t x = x.left;\n\t}\n\treturn(x);\n }",
"public static Vector<Edge> computeMinimumSpanningTreeEdgeHeap(Graph g){\r\n\t\t//minimum spanning tree\r\n\t\tVector<Edge> mst = new Vector<Edge>();\r\n\r\n\t\t//defining X\r\n\t\tint qntNodes = g.getNodes().length;\r\n\t\tbelongsToX = new boolean[qntNodes];\r\n\r\n\t\t//initializing X\r\n\t\tbelongsToX[0] = true;\r\n\t\t\r\n\t\t//initializing heap\r\n\t\tHeap<Edge> heap = new Heap<Edge>(new EdgeComparator());\r\n\t\trestoreHeapProperties(g.getNodes()[0], heap);\r\n\r\n\t\t//main loop\r\n\t\tfor(int i = 1; i < qntNodes; i++){\t\t\t\r\n\t\t\t//find minimum edge that crosses the frontier\r\n\t\t\tEdge min = heap.extractMin();\r\n\r\n\t\t\t//add new node to X\r\n\t\t\tNode newNode = min.n1;\r\n\t\t\tif(belongsToX[min.n1.number] && !belongsToX[min.n2.number]){\r\n\t\t\t\tnewNode = min.n2;\r\n\t\t\t}\r\n\t\t\tbelongsToX[newNode.number] = true;\r\n\r\n\t\t\t//add minimum edge to tree\r\n\t\t\tmst.add(min);\r\n\t\t\t\r\n\t\t\t//restore heap properties\r\n\t\t\trestoreHeapProperties(newNode, heap);\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn mst;\r\n\t}",
"private Node minNode(Node node) {\n Node updt = node;\n // Finding the leftmost leaf\n while (updt.left != null) {\n updt = updt.left;\n }\n return updt;\n }",
"private List<Integer> findMinNodes() {\n\t\tint minLabel = Integer.MAX_VALUE;\n\t\tList<Integer> result = new ArrayList<Integer>();\n\n\t\tfor (int node = 0; node < vertices.length; node++) {\n\t\t\tint nodeLabel = connectivity[node][node];\n\t\t\tif (nodeLabel < minLabel) {\n\t\t\t\tresult.clear();\n\t\t\t\tresult.add(node);\n\t\t\t\tminLabel = nodeLabel;\n\t\t\t} else if (nodeLabel == minLabel) {\n\t\t\t\tresult.add(node);\n\t\t\t} else\n\t\t\t\tcontinue;\n\t\t}\n\t\treturn result;\n\t}",
"private Node getLowestNode(Set<Node> openSet)\r\n {\r\n // find the node with the least f\r\n double minF = Double.MAX_VALUE;\r\n Node[] openArray = openSet.toArray(new Node[0]);\r\n\r\n Node q = null;\r\n for (int i = 0; i < openArray.length; ++i)\r\n {\r\n if (openArray[i].f < minF) \r\n {\r\n minF = openArray[i].f;\r\n q = openArray[i];\r\n }\r\n }\r\n return q;\r\n }",
"public int findSpanningTree(List<Graph.Edge> edges) {\n while (!isSpanningTree()) {\n toZeroWeightGraph();\n shrinkComponents();\n }\n return populateEdges(edges);\n }",
"public int\ngetNodeIndexMin();",
"private Node<Value> min(Node<Value> x)\r\n {\r\n while (x.left != null) x = x.left;\r\n return x;\r\n }",
"public static int[][] optimalBST(double[] p,double[] q, int num){\n double[][] e = new double[num+2][num+2];//子树期望代价\n double[][] w = new double[num+2][num+2];//子树总概率\n //why e and w is two bigger than num?\n //because when i==j, e[i][i-1] + e[i+1][j] + w[i][j];\n //when i = 1 or j = num, so e[1][0]、e[num+1][num]\n //here w can use the size of num+1, but in order not to so much complexity in init to judge i\n //so add a bigger w is look good!\n\n int[][] root = new int[num+1][num+1];//记录根节点\n //root[i][j] -- 用来存放i-j组成的最优二叉查找树的根节点\n\n //init--初始化\n for(int i=1; i<num+2; i++){\n e[i][i-1] = q[i-1];\n w[i][i-1] = q[i-1];\n }\n\n for(int d = 0; d<num; d++){\n //插入个数 : 0 - num-1, 从0开始\n for(int i=1; i<=num-d; i++){\n //起始下标 : 1 - num, 从1开始\n int j = i + d;\n e[i][j] = 9999;\n w[i][j] = w[i][j-1] + p[j] + q[j];//\n for(int k=i; k<=j; k++){\n //中间下标\n double temp = e[i][k-1] + e[k+1][j] + w[i][j];\n if(temp < e[i][j]){\n e[i][j] = temp;\n //找到小的,记录下来\n System.out.println(\"i--> \"+i+\", j--> \"+j);\n root[i][j] = k;\n }\n }\n }\n }\n return root;\n }",
"@Override\n public TreeNode<E> tree_minimum() {\n return tree_minimum(root);\n }",
"private static <K extends Comparable<? super K>, V> Node<K, V> findSmallestNode(Node<K, V> root) {\n @Var Node<K, V> current = root;\n while (current.left != null) {\n current = current.left;\n }\n return current;\n }",
"public Website treeMinimum(Website site) {\r\n\t\tWebsite localSite = site; // Local pointer to given Site\r\n\t\twhile (localSite.getLeft() != null&&localSite.getLeft().getPageRank()!=0) { // Traversing Loop, stops at null node\r\n\t\t\tlocalSite = localSite.getLeft(); // incrementation Condition\r\n\t\t}\r\n\t\treturn localSite; // Returns minimum\r\n\t}",
"public int minCost(int[][] distance) {\n Map<Index, Integer> minCostDP = new HashMap<>();\n Map<Index, Integer> parent = new HashMap<>();\n\n List<Set<Integer>> allSets;\n\n for (Set<Integer> set : allSets) {\n for (int currentVertex = 1; currentVertex < distance.length; currentVertex++) {\n if (set.contains(currentVertex)) continue;\n Index index = Index.createIndex(currentVertex,set);\n int minCost = Integer.MAX_VALUE;\n int minPrevVertex = 0;\n\n Set<Integer> copySet = new HashSet<>();\n for (int prevVertex : set) {\n int cost = distance[prevVertex][currentVertex] + getCost(copySet, prevVertex, minCostDP);\n }\n }\n }\n }",
"private static Node min(Node root) {\n\t\tif(root.left == null) {\n\t\t\treturn root;\n\t\t}\n\t\treturn min(root.left);\n\t}",
"public static void kruskalMST(WeightedGraph graph) {\n\n System.out.println(\"_____________________________________Kruskal Algorithm_____________________________________\\n\");\n\n // initialize an array that will keep track of which vertices have been visited\n boolean[] visited = new boolean[graph.getVertices()];\n /* initialize a PriorityQueue to keep track of the possible edges that\n construct the minimum spanning tree. */\n PriorityQueue<Edge> priorityQueue = new PriorityQueue<>();\n // mark the initial vertex as visited\n visited[0] = true;\n\n //add all the edges to priority queue, sort the edges by it's weight. \n for (int i = 0; i < graph.getAdjacencylist(0).size(); i++) {\n priorityQueue.add(graph.getAdjacencylist(0).get(i));\n }\n\n // create parent array by the vertices size. \n int[] parent = new int[graph.getVertices()];\n\n // make set for all vertices of the graph\n makeSet(parent, graph);\n\n // the minumum spanning tree is store as ArrayList. \n ArrayList<Edge> mst = new ArrayList<>();\n\n // loop to visit all edges in priorityQueue\n while (priorityQueue.peek() != null) {\n // remove the front edge, which will be with the lowest value among the edges. \n Edge edge = priorityQueue.remove();\n // if we have already visited the opposite vertex, go to the next edge\n if (visited[edge.getDestination()]) {\n continue;\n }\n\n //check if adding this edge creates a cycle\n int x_set = find(parent, edge.getSource());\n int y_set = find(parent, edge.getDestination());\n\n if (x_set == y_set) {\n //ignore, will create cycle\n } else {\n //add the edge to the minimum spanning tree. \n mst.add(edge);\n\n // union the two elements \n union(parent, x_set, y_set);\n\n // make the opposite vertex of the edge as visited. \n visited[edge.getDestination()] = true;\n // for every edge connected to the opposite vertex, add it to the PriorityQueue\n for (int i = 0; i < graph.getAdjacencylist(edge.getDestination()).size(); i++) {\n priorityQueue.add(graph.getAdjacencylist(edge.getDestination()).get(i));\n }\n\n }\n }\n\n /* assume the graph is connected, but for example if the edges are less than vertices \n then the graph is not connectd. By for loop check the connection. \n */\n boolean connected = true;\n for (int i = 1; i < graph.getVertices(); i++) {\n // there is an unvisited vertix. \n if (!visited[i]) {\n System.out.println(\"Error! the graph is not connected. \");\n connected = false;\n return;\n\n }\n }\n\n }",
"private Node min(Node x) {\n if (x.left == null)\n return x;\n else\n return min(x.left);\n }",
"private AvlNode<E> findMin(AvlNode<E> node){\n if(node.left == null){\n return node;\n } else {\n return findMin(node.left);\n }\n }",
"public int minCost(int[][] costs) {\n\nif(costs== null || costs.length == 0)\nreturn 0;\n// int n_houses = costs.length ;\nint lastR = costs[0][0];\nint lastB = costs[0][1];\nint lastG = costs[0][2];\nint currR,currB,currG ;\nfor(int i = 1; i< costs.length ; i++ ){\ncurrR = costs[i][0] + Math.min(lastB,lastG);\ncurrB = costs[i][1] + Math.min(lastR,lastG);\ncurrG = costs[i][2] + Math.min(lastR,lastB);\nlastR = currR;\nlastB = currB;\nlastG = currG;\n}\n// return Math.min(Math.min(lastR,lastB),lastG);\nreturn Math.min(Math.min(lastR,lastB),lastG);\n}",
"static int downToZero(Node root) {\n /*\n * Write your code here.\n */\n Queue<Node> queue = new PriorityQueue<>();\n queue.add(root);\n int min = 100001;\n while (!queue.isEmpty()){\n Node current = queue.poll();\n if(current.value <= 4){\n if (current.value == 4){\n min = current.depth + 3;\n return min;\n }\n min = current.depth+current.value;\n return min;\n }\n Node toAdd1 = new Node(current.value-1, current.depth+1);\n queue.add(toAdd1);\n for(int i = 2; i<=Math.sqrt(current.value); i++){\n if(current.value%i==0){\n Node toAdd = new Node(current.value/i, current.depth+1);\n queue.add(toAdd);\n }\n }\n }\n return min;\n }",
"public static int[][] optimalBST2(double[] p,double[] q, int num){\n double[][] e = new double[num+2][num+2];//子树期望代价\n double[][] w = new double[num+2][num+2];//子树总概率\n //why e and w is two bigger than num?\n //because when i==j, e[i][i-1] + e[i+1][j] + w[i][j];\n\n int[][] root = new int[num+1][num+1];//记录根节点\n //root[i][j] -- 用来存放i-j组成的最优二叉查找树的根节点\n\n //init--初始化\n for(int i=1; i<num+2; i++){\n e[i][i-1] = q[i-1];\n w[i][i-1] = q[i-1];\n }\n\n for(int d = 0; d<num; d++){\n //插入个数 : 0 - num-1, 从0开始\n for(int i=1; i<=num-d; i++){\n //起始下标 : 1 - num, 从1开始\n int j = i + d;\n e[i][j] = 9999;\n w[i][j] = w[i][j-1] + p[j] + q[j];//\n\n //because of root[i][j-1] <= root[i][j] <= root[i+1][j]\n //so why?\n //\n //进行优化!!!\n if(i == j){\n root[i][j] = i;\n e[i][j] = e[i][i-1] + e[i+1][i] + w[i][i];\n }else{\n for(int k=root[i][j-1]; k<=root[i+1][j]; k++){\n //中间下标\n double temp = e[i][k-1] + e[k+1][j] + w[i][j];\n if(temp < e[i][j]){\n e[i][j] = temp;\n //找到小的,记录下来\n root[i][j] = k;\n }\n\n }\n }\n }\n }\n return root;\n }",
"public int findMin(){\n\t\tif(root==nil){\n\t\t\treturn 0;\n\t\t}\n\t\tNode temp = root;\n\t\twhile(temp.left != nil){\n\t\t\ttemp=temp.left;\n\t\t}\n\t\treturn temp.id;\n\t}",
"int nilaiMin(Node node){\n if (node.left != null) { // karena node yg nilainya minimum atau lebih kecil di sebelah kiri\n return nilaiMin(node.left);// maka jika != null akan me return node sebelah kiri\n }\n return node.data;\n }",
"private Node min(Node node){\n if(node == null)\n return null;\n else if(node.left == null)\n return node;\n\n //walk left nodes\n return min(node.left);\n }",
"public void deleteMin() {\r\n\t\tif (empty())\r\n\t\t\treturn;\r\n\t\telse {\r\n\t\t\tif (this.size > 0) {\r\n\t\t\t\tthis.size--;\r\n\t\t\t}\r\n\t\t\tif (this.size == 0) {\r\n\t\t\t\tthis.empty = true;\r\n\t\t\t}\r\n\r\n\t\t\tHeapNode hN = this.min;\r\n\t\t\tint rnkCount = 0;\r\n\t\t\tHeapNode hNIterator = null;\r\n\t\t\tif (hN != null) {\r\n\t\t\t\thNIterator = hN.theMostLeftChild;\r\n\t\t\t}\r\n\t\t\twhile (hNIterator != null) {\r\n\t\t\t\trnkCount++;\r\n\t\t\t\thNIterator = hNIterator.rightBrother;\r\n\t\t\t}\r\n\t\t\tthis.HeapTreesArray[rnkCount] = null;\r\n\t\t\tif (hN != null) {\r\n\t\t\t\thNIterator = hN.theMostLeftChild;\r\n\t\t\t}\r\n\t\t\trnkCount--;\r\n\t\t\tBinomialHeap bH = new BinomialHeap();\r\n\t\t\tif (hNIterator != null) {\r\n\t\t\t\tbH.empty = false;\r\n\t\t\t}\r\n\t\t\twhile (hNIterator != null) {\r\n\t\t\t\tbH.HeapTreesArray[rnkCount] = hNIterator;\r\n\t\t\t\thNIterator = hNIterator.rightBrother;\r\n\t\t\t\tbH.HeapTreesArray[rnkCount].rightBrother = null;\r\n\t\t\t\tif (hNIterator != null) {\r\n\t\t\t\t\thNIterator.leftBrother = null;\r\n\t\t\t\t}\r\n\t\t\t\trnkCount = rnkCount - 1;\r\n\t\t\t}\r\n\t\t\tthis.min = null;\r\n\t\t\tfor (int i = 0; i < this.HeapTreesArray.length; i++) {\r\n\t\t\t\tif (this.min == null) {\r\n\t\t\t\t\tif (this.HeapTreesArray[i] != null) {\r\n\t\t\t\t\t\tthis.min = this.HeapTreesArray[i];\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (this.HeapTreesArray[i] != null) {\r\n\t\t\t\t\t\tif (this.HeapTreesArray[i].value < this.min.value) {\r\n\t\t\t\t\t\t\tthis.min = this.HeapTreesArray[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!bH.empty()) {\r\n\t\t\t\tfor (int i = 0; i < bH.HeapTreesArray.length; i++) {\r\n\t\t\t\t\tif (bH.min == null) {\r\n\t\t\t\t\t\tif (bH.HeapTreesArray[i] != null) {\r\n\t\t\t\t\t\t\tbH.min = bH.HeapTreesArray[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (bH.HeapTreesArray[i] != null) {\r\n\t\t\t\t\t\t\tif (bH.HeapTreesArray[i].value < bH.min.value) {\r\n\t\t\t\t\t\t\t\tbH.min = bH.HeapTreesArray[i];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tthis.meld(bH);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}",
"private int first_leaf() { return n/2; }",
"public int minDistance(int distance[], Boolean span_tree[]) {\n\t\tint min_value=Integer.MAX_VALUE,min_node=-1;\n\t\tfor(int i=0;i<vertexs;i++) {\n\t\t\tif(span_tree[i]==false && distance[i]<=min_value) {\n\t\t\t\tmin_value=distance[i];\n\t\t\t\tmin_node=i;\n\t\t\t}\n\t\t}\n\t\treturn min_node;\n\t}",
"private BSTNode<T> minimum(BSTNode node){\r\n\t\twhile(node.left != null) {\r\n\t\t\tnode = node.left;\r\n\t\t}\r\n\t\treturn node;\r\n\t}",
"public void testFindMin() {\r\n assertNull(tree.findMin());\r\n tree.insert(\"apple\");\r\n tree.insert(\"act\");\r\n assertEquals(\"act\", tree.findMin());\r\n tree.remove(\"act\");\r\n assertEquals(\"apple\", tree.findMin());\r\n }",
"private BinaryNode<AnyType> findMin( BinaryNode<AnyType> t )\r\n\t{\r\n\t\tif( t == null )\r\n\t\t\treturn null;\r\n\t\telse if( t.left == null )\r\n\t\t\treturn t;\r\n\t\treturn findMin( t.left );\r\n\t}",
"public int minDiffInBST(TreeNode root) {\n PriorityQueue<Integer> tree = new PriorityQueue<>();\n dfs(root, tree);\n int min = Integer.MAX_VALUE;\n int pr = tree.poll();\n while (!tree.isEmpty()) {\n min = Math.min(min, Math.abs(pr - tree.peek()));\n pr = tree.poll();\n }\n return min;\n }",
"private static int findMinimumSumLevelInGivenTree(Node tree){\n Map<Integer, Integer> sumAtEachLevelMap = new HashMap<Integer, Integer>();\n \n //puts all level sums in map\n findLevelSums(tree, sumAtEachLevelMap, 1);\n \n // gets the level with least sum\n return getMinimumSumLevel(sumAtEachLevelMap);\n }",
"int[] primMST(float graph[][])\n {\n // Array to store constructed MST\n int parent[] = new int[V];\n \n // Key values used to pick minimum weight edge in cut\n float key[] = new float[V];\n \n // To represent set of vertices included in MST\n Boolean mstSet[] = new Boolean[V];\n \n // Initialize all keys as INFINITE\n for (int i = 0; i < V; i++) {\n key[i] = Integer.MAX_VALUE;\n mstSet[i] = false;\n }\n \n // Always include first 1st vertex in MST.\n key[0] = 0; // Make key 0 so that this vertex is\n // picked as first vertex\n parent[0] = 0; // First node is always root of MST\n \n // The MST will have V vertices\n for (int count = 0; count < V - 1; count++) {\n // Pick thd minimum key vertex from the set of vertices\n // not yet included in MST\n int u = minKey(key, mstSet);\n \n // Add the picked vertex to the MST Set\n mstSet[u] = true;\n \n // Update key value and parent index of the adjacent\n // vertices of the picked vertex. Consider only those\n // vertices which are not yet included in MST\n for (int v = 0; v < V; v++)\n \n // graph[u][v] is non zero only for adjacent vertices of m\n // mstSet[v] is false for vertices not yet included in MST\n // Update the key only if graph[u][v] is smaller than key[v]\n if (graph[u][v] != 0 && mstSet[v] == false && graph[u][v] < key[v]) {\n parent[v] = u;\n key[v] = graph[u][v];\n }\n }\n return parent;\n }",
"int minValue(Node node) {\r\n\t\tif (node == null) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\tNode root = node;\r\n\t\twhile (root.left != null) {\r\n\t\t\troot = root.left;\r\n\t\t}\r\n\t\treturn root.data;\r\n\t}",
"private void gotoMinOf(IntTree<V> node) {\n while (node.size > 0) {\n stack = stack.plus(node);\n key += node.key;\n node = node.left;\n }\n }",
"AVLTreeNode Min() {\r\n\r\n AVLTreeNode current = root;\r\n\r\n /* loop down to find the leftmost leaf */\r\n while (current.left != null)\r\n current = current.left;\r\n\r\n return current;\r\n\r\n\r\n }",
"public List<Integer> findMinHeightTrees(int n, int[][] edges) {\n List<Integer> ans = new ArrayList<>();\n if (n == 0) return ans;\n if (n == 1) {\n ans.add(0);\n return ans;\n }\n if (n == 2) {\n ans.add(0);\n ans.add(1);\n return ans;\n }\n\n //build graph\n List<Integer>[] graph = new ArrayList[n];\n for (int i = 0; i < n; i++) {\n graph[i] = new ArrayList<>();\n }\n for (int i = 0; i < edges.length; i++) {\n int v1 = edges[i][0];\n int v2 = edges[i][1];\n\n graph[v1].add(v2);\n graph[v2].add(v1);\n }\n\n //initial leaves\n List<Integer> leaves = new ArrayList<>();\n for (int i = 0; i < n; i++) {\n if (graph[i].size() == 1) {\n leaves.add(i);\n }\n }\n\n int count = n;\n\n while (count > 2) {\n int leasize = leaves.size();\n count -= leasize;\n List<Integer> newleaves = new ArrayList<Integer>();\n for (int i = 0; i < leasize; i++) {\n int leavenode = leaves.get(i);\n int verToleave = graph[leavenode].get(0);\n graph[verToleave].remove(Integer.valueOf(leavenode));\n if (graph[verToleave].size() == 1) {\n newleaves.add(verToleave);\n }\n }\n\n leaves = newleaves;\n }\n return leaves;\n\n\n }",
"private Node getSuccessorBasedOnMin(Node node) {\n Node successor = localMinAndItsParent(node)[0];\n Node successorParent = localMinAndItsParent(node)[1];\n if (successor != node.rightChild) {\n successorParent.leftChild = successor.rightChild;\n successor.rightChild = node.rightChild;\n }\n return successor;\n }",
"public static Node findMin(Node node){\n if(node.left!=null){\n return findMin(node.left); // recursive left-subtree จนตกเกือบ null แล้ว return node นั้น\n }\n else{\n return node;}\n }",
"private Node findMinimum(Node current)\r\n\t{\r\n\t\t// Current Node is the minimum\r\n\t\tif(current.getLeftChild() == null)\r\n\t\t{\r\n\t\t\treturn current;\r\n\t\t}\r\n\t\t// Current Node is not the minimum so keep traversing the left subtree of current Node\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn findMinimum(current.getLeftChild());\r\n\t\t}\r\n\t}",
"private static Node buildSmallerTree() {\n\t\tNode root = createNode(10);\n\t\troot.leftChild = createNode(25);\n\t\troot.rightChild = createNode(25);\n\t\troot.leftChild.leftChild = createNode(13);\n\t\troot.rightChild.rightChild = createNode(7);\n\t\troot.leftChild.rightChild = createNode(27);\n\t\t\n\t\treturn root;\n\t}",
"public static <E extends Comparable> int minDeep(TreeNode<E> root) {\r\n Queue<TreeNode<E>> queue = new LinkedList<>();\r\n \r\n int minDeep = 1;\r\n \r\n queue.add(root);\r\n \r\n while(true){\r\n for(int deep = 0; deep < Math.pow(2, minDeep); deep++) {\r\n TreeNode<E> node = queue.poll();\r\n if(node.getLeft() == null || node.getRight() == null) return minDeep;\r\n queue.add(node.getLeft());\r\n queue.add(node.getRight());\r\n }\r\n \r\n minDeep++;\r\n }\r\n }",
"public int minimumCost(int N, int[][] connections) {\n int[] parent = new int[N + 1];\n Arrays.fill(parent, -1);\n Arrays.sort(connections, (a,b) -> (a[2]-b[2]));\n int cnt = 0;\n int minCost = 0;\n \n for(int[] edge: connections){\n int src = edge[0];\n int dst = edge[1];\n int cost = edge[2];\n \n int srcSubsetId = find(parent, src);\n int dstSubsetId = find(parent, dst);\n \n if(srcSubsetId == dstSubsetId) {\n // Including this edge will cause cycles, then ignore it\n continue;\n }\n cnt += 1;\n minCost += cost;\n union(parent, src, dst);\n }\n return cnt==N-1? minCost : -1;\n}",
"private static int dfs( int n, int level, int min ) {\n\n if (n == 0 || level >= min) return level; //returns only number of perfect squares\n\n for (int i = (int) Math.sqrt(n); i > 0; i--) { //Math.sqrt = same as prime-sieve of prime numbers\n\n min = dfs(n - ((int) Math.pow(i, 2)), level + 1, min);\n\n }\n return min;\n }",
"private int kthSmallestTreeNode(Tree tree, int k){\n List<Integer> values = new ArrayList<>();\n List<Integer> arr = printTree(tree, values);\n System.out.println(\"\\nPrinting out the whole list created by In order traversal\\n\");\n System.out.print(arr);\n return arr.get(k);\n}",
"private static int minimum(BinarySearchTreeNode<Integer> root) {\n if (root == null) {\n return Integer.MAX_VALUE;\n }\n\n int leftMin = minimum(root.left);\n int rightMin = minimum(root.right);\n\n return Math.min(root.data, Math.min(leftMin, rightMin));\n }",
"private void setMinHeap() {\n // parentIndex is the last leaf node parentIndex\n int parentIndex = (array.length - 2) / 2;\n // from last parentIndex down on the depth path to the root\n // convert to minHeap\n while (parentIndex >= 0) { // when parentIndex = 0, the root\n minHeapify(parentIndex, array.length);\n // go to next index(parentIndex) on that level\n parentIndex--;\n }\n }",
"private BinaryNode<AnyType> findMin(BinaryNode<AnyType> t) {\r\n\t\tif (t == null)\r\n\t\t\treturn null;\r\n\t\telse if (t.left == null)\r\n\t\t\treturn t;\r\n\t\treturn findMin(t.left);\r\n\t}",
"private Node removeMin(Node node){\n if(node == null)\n return null;\n else if(node.left == null) {//use right child to replace this node (min value node)\n if(node.count!=0){ //multiple value in same node\n node.count--;\n return node;\n }\n else{\n decDepth(node.right); //maintain depth when chain in right tree\n return node.right;\n }\n }\n\n //walk through left branch\n node.left = removeMin(node.left);\n if(node!=null) node.size--; // the min value must be removed\n return node;\n }",
"public List<Integer> findMinHeightTrees(int n, int[][] edges) {\n List<Integer> res = new ArrayList<Integer>();\n if (n == 1) {\n res.add(0);\n return res;\n }\n\n List<List<Integer>> adjList = new ArrayList<List<Integer>>();\n for (int i=0; i<n; i++) {\n adjList.add(new ArrayList<Integer>());\n }\n int[] degree = new int[n];\n for (int i=0; i<edges.length; i++) {\n adjList.get(edges[i][0]).add(edges[i][1]);\n adjList.get(edges[i][1]).add(edges[i][0]);\n degree[edges[i][0]]++;\n degree[edges[i][1]]++;\n }\n\n Queue<Integer> queue = new ArrayDeque<Integer>();\n for (int i = 0; i < n; i++) {\n if (degree[i] == 1) {\n queue.offer(i);\n }\n }\n\n while (!queue.isEmpty()) {\n List leaves = new ArrayList<Integer>();\n int size = queue.size();\n for (int i = 0; i < size; i++){\n int curr = queue.poll();\n leaves.add(curr);\n for(int next : adjList.get(curr)) {\n degree[next]--;\n if (degree[next]==1) {\n queue.offer(next);\n }\n }\n }\n res = leaves;\n }\n return res;\n }",
"Node minValueNode(Node Node) {\n Node current = Node;\n\n /* loop down to find the leftmost leaf */\n while (current.left != null) {\n current = current.left;\n }\n\n return current;\n }",
"int[] primMST() {\n // Clone actual array\n int[][] graph = Arrays.stream(this.graph).map(int[]::clone).toArray(int[][]::new);\n\n // Array to store constructed MST\n int[] parent = new int[VERTICES];\n\n // Key values used to pick minimum weight edge in cut\n int[] key = new int[VERTICES];\n\n // To represent set of vertices included in MST\n Boolean[] mstSet = new Boolean[VERTICES];\n\n // Initialize all keys as INFINITE\n for (int i = 0; i < VERTICES; i++) {\n key[i] = Integer.MAX_VALUE;\n mstSet[i] = false;\n }\n\n // Always include first 1st vertex in MST.\n key[0] = 0; // Make key 0 so that this vertex is picked as first vertex\n parent[0] = -1; // zFirst node is always root of MST\n\n // The MST will have V vertices\n for (int count = 0; count < VERTICES - 1; count++) {\n // Pick thd minimum key vertex from the set of vertices\n // not yet included in MST\n int u = minKey(key, mstSet);\n\n // Add the picked vertex to the MST Set\n mstSet[u] = true;\n\n // Update key value and parent index of the adjacent\n // vertices of the picked vertex. Consider only those\n // vertices which are not yet included in MST\n for (int v = 0; v < VERTICES; v++)\n\n // graph[u][v] is non zero only for adjacent vertices of m\n // mstSet[v] is false for vertices not yet included in MST\n // Update the key only if graph[u][v] is smaller than key[v]\n if (graph[u][v] != 0 && mstSet[v] == false && graph[u][v] < key[v]) {\n parent[v] = u;\n key[v] = graph[u][v];\n }\n }\n\n return parent;\n }",
"private static int minDepthNoRecursion(TreeNode root) {\r\n\t\treturn Math.min(maxDepthNoRecursion(root, true), maxDepthNoRecursion(root, false)); \r\n\t}",
"public TreeNode<T> getMinElement(){\n TreeNode<T> t = this;\n while(t.left != null){\n t = t.left;\n }\n return t;\n }",
"private void buildTree(int nodeNum, AABB nodeBounds,\n ArrayList<AABB> allPrimBounds,\n IntArray primNums, int nPrims, int depth,\n int badRefines) {\n if (nPrims <= maxPrims || depth == 0) {\n if ((nPrims > 16) && (depth == 0)) {\n System.out.println(\"reached max. KdTree depth with \" + nPrims + \n \" primitives\");\n }\n \n nodesW.add(makeLeaf(primNums, nPrims, primitives));\n totalPrims += nPrims;\n totalDepth += (maxDepth - depth);\n totalLeafs += 1;\n return;\n }\n \n /* Split - Position bestimmen */\n \n int bestAxis = -1, bestOffset = -1;\n float bestCost = Float.POSITIVE_INFINITY;\n float oldCost = isectCost * (float)nPrims;\n Vector d = nodeBounds.max.sub(nodeBounds.min);\n float totalSA = (2.f * (d.x*d.y + d.x*d.z + d.y*d.z));\n float invTotalSA = 1.f / totalSA;\n \n /* Achse wählen */\n int axis = d.dominantAxis();\n int retries = 0;\n boolean retry = false;\n ArrayList<BoundEdge> edges = null;\n \n// final int splitCount = edges[axis].length;\n \n do {\n edges = mkEdges(allPrimBounds, primNums, axis);\n Collections.sort(edges);\n final int splitCount = edges.size();\n \n// java.util.Arrays.sort(edges[axis], 0, splitCount);\n \n /* beste Split - Position für diese Achse finden */\n int nBelow = 0, nAbove = nPrims;\n \n for (int i = 0; i < splitCount; ++i) {\n if (edges.get(i).type == EdgeType.END) --nAbove;\n float edget = edges.get(i).t;\n \n if (edget > nodeBounds.min.get(axis) &&\n edget < nodeBounds.max.get(axis)) {\n // Compute cost for split at _i_th edge\n int otherAxis[][] = { {1,2}, {0,2}, {0,1} };\n int otherAxis0 = otherAxis[axis][0];\n int otherAxis1 = otherAxis[axis][1];\n \n float belowSA = 2 * (d.get(otherAxis0) * d.get(otherAxis1) +\n (edget - nodeBounds.min.get(axis)) *\n (d.get(otherAxis0) + d.get(otherAxis1)));\n \n float aboveSA = 2 * (d.get(otherAxis0) * d.get(otherAxis1) +\n (nodeBounds.max.get(axis) - edget) *\n (d.get(otherAxis0) + d.get(otherAxis1)));\n \n float pBelow = belowSA * invTotalSA;\n float pAbove = aboveSA * invTotalSA;\n \n float eb = (nAbove == 0 || nBelow == 0) ? emptyBonus : 0.f;\n float cost = traversalCost + isectCost * (1.f - eb) *\n (pBelow * nBelow + pAbove * nAbove);\n \n if (cost < bestCost) {\n /* neuer bester gefunden */\n bestCost = cost;\n bestAxis = axis;\n bestOffset = i;\n }\n }\n \n if (edges.get(i).type == EdgeType.START) ++nBelow;\n }\n \n if (!(nBelow == nPrims && nAbove == 0))\n throw new IllegalStateException(\"hmm\");\n \n retry = ((bestAxis == -1) && (retries < 2));\n \n if (retry) {\n ++retries;\n axis = (axis+1) % 3;\n }\n \n } while (retry);\n \n if (bestCost > oldCost) ++badRefines;\n if ((bestCost > 4.f * oldCost && nPrims < 16) ||\n bestAxis == -1 || badRefines == 3) {\n nodesW.add(makeLeaf(primNums, nPrims, primitives));\n if (nPrims > 16)\n System.out.println(\"aborting KdTree build recursion (bc=\" +\n bestCost + \", oc=\" + oldCost + \", #prims=\" + \n nPrims + \", br=\" + badRefines + \")\");\n totalPrims += nPrims;\n totalDepth += (maxDepth - depth);\n totalLeafs += 1;\n return;\n }\n \n /* Primitive nach oben / unten sortieren */\n int n0 = 0, n1 = 0;\n \n final ArrayList<Integer> prims0Tmp = new ArrayList<Integer>();\n final ArrayList<Integer> prims1Tmp = new ArrayList<Integer>();\n \n for (int i = 0; i < bestOffset; ++i) {\n if (edges.get(i).type == EdgeType.START) {\n prims0Tmp.add(edges.get(n0++).primNum);\n// prims0.set(n0++, edges[bestAxis][i].primNum);\n }\n }\n \n for (int i = bestOffset + 1; i < edges.size(); ++i) {\n if (edges.get(i).type == EdgeType.END) {\n prims1Tmp.add(edges.get(n1++).primNum);\n// prims1.set(n1++, edges[bestAxis][i].primNum);\n }\n }\n \n /* rekursiver Abstieg */\n float tsplit = edges.get(bestOffset).t;\n \n nodesW.add(makeInterior(bestAxis, tsplit));\n \n AABB bounds[] = nodeBounds.split(tsplit, bestAxis);\n \n final IntArray prims0 = new IntArray(prims0Tmp.size());\n for (int i=0; i < prims0Tmp.size(); i++) {\n prims0.set(i, prims0Tmp.get(i));\n }\n \n final IntArray prims1 = new IntArray(prims1Tmp.size());\n for (int i=0; i < prims1Tmp.size(); i++) {\n prims1.set(i, prims1Tmp.get(i));\n }\n \n buildTree(nodeNum+1, bounds[0], allPrimBounds,\n prims0, n0, depth-1, badRefines);\n \n nodesW.get(nodeNum).setAboveChild(nodesW.size());\n \n buildTree(nodesW.size(), bounds[1], allPrimBounds,\n prims1, n1, depth-1, badRefines);\n }",
"static int minJumps(int[] arr){\n int n = arr.length;\n int[] dp = new int[n];\n for(int i = 0; i < n; i++) dp[i] = Integer.MAX_VALUE;\n dp[0] = 0;\n for(int i = 1; i < n; i++){\n //checking from 0 to index i that if there is a shorter path for \n //current position to reach from any of the previous indexes\n //also previous index should not be MAX_VALUE as this will show that\n //we were not able to reach this particular index\n for(int j = 0; j < i; j++){\n if(dp[j] != Integer.MAX_VALUE && arr[j] + j >= i){\n if(dp[j] + 1 < dp[i]){\n dp[i] = dp[j] + 1;\n }\n }\n }\n }\n \n if(dp[n - 1] != Integer.MAX_VALUE){\n return dp[n - 1];\n }\n \n return -1;\n }",
"public TreeNode smallest() {\n\t\tif(root == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tTreeNode current = root; \n\t\t\twhile(current.getLeftChild() != null) {\n\t\t\t\tcurrent = current.getLeftChild();\n\t\t\t}\n\t\t\treturn current;\n\t\t}\n\t}",
"public Queen[] lowestHeuristic(Queen[] state){\n Queen[] min = new Queen[n];\n int minHeuristic = general.getHeuristic(state);\n Queen[] curr = new Queen[n];\n\n //Copy the state in min and curr\n for(int i = 0; i < n; i++){\n min[i] = new Queen(state[i].getRow(), state[i].getColumn());\n curr[i] = new Queen(state[i].getRow(), state[i].getColumn());\n }\n\n //Iterate all columns\n for(int i = 0; i < n; i++){\n if (i>0)\n curr[i-1] = new Queen (state[i-1].getRow(), state[i-1].getColumn());\n curr[i] = new Queen (0, curr[i].getColumn());\n //Iterate rows\n for(int j = 0; j < n; j++){\n\n //Check if a minimum is found\n if(general.getHeuristic(curr) < minHeuristic){\n minHeuristic = general.getHeuristic(curr);\n\n for(int k = 0; k < n; k++)\n min[k] = new Queen(curr[k].getRow(), curr[k].getColumn());\n }\n\n //Move the queen\n if(curr[i].getRow() != n-1)\n curr[i].move();\n }\n }\n return min;\n }",
"public Node<T> extractMin() {\n Node<T> z = min;\n if (z != null) {\n if (z.child != null) {\n Node<T> leftChild = z.child.leftSibling;\n Node<T> rightChild = z.child;\n z.child.parent = null;\n while (leftChild != rightChild) {\n leftChild.parent = null;\n leftChild = leftChild.leftSibling;\n }\n leftChild = leftChild.rightSibling;\n\n // add child to the root list\n Node<T> tmp = z.rightSibling;\n z.rightSibling = leftChild;\n leftChild.leftSibling = z;\n tmp.leftSibling = rightChild;\n rightChild.rightSibling = tmp;\n }\n\n // remove z from the root list\n z.rightSibling.leftSibling = z.leftSibling;\n z.leftSibling.rightSibling = z.rightSibling;\n\n if (z == z.rightSibling) {\n min = null;\n } else {\n min = z.rightSibling;\n consolidate();\n }\n\n size--;\n }\n return z;\n }",
"protected BinaryNode<AnyType> findMin(BinaryNode<AnyType> t) {\n\t\tif (t != null)\n\t\t\twhile (t.left != null)\n\t\t\t\tt = t.left;\n\n\t\treturn t;\n\t}",
"public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNode q) {\n TreeNode cur = root;\n while (true) {\n if (cur.val > p.val && cur.val > q.val) cur = cur.left;\n else if (cur.val < p.val && cur.val < q.val) cur = cur.right;\n else return cur;\n }\n}",
"void prim(AdjacencyLists g, int start)\r\n\t{\r\n\t\t// whether the node is in the tree or not.\r\n\t\tboolean[] intree = new boolean[g.nvertices];\r\n\t\t\r\n\t\t// the cost of adding the edge to the tree\r\n\t\tint[] distance = new int[g.nvertices];\r\n\t\t\r\n\t\tint[] parent = new int[g.nvertices]; \r\n\t\t\r\n\t\tfor (int i = 0; i < g.nvertices; ++i) {\r\n\t\t\tintree[i] = false;\r\n\t\t\tdistance[i] = Integer.MAX_VALUE;\r\n\t\t\tparent[i] = -1;\r\n\t\t}\r\n\t\t\r\n\t\tdistance[start] = 0;\r\n\t\t\r\n\t\t// current vertex to process\r\n\t\tint v = start;\r\n\t\t// candidate next vertex\r\n\t\tint w; \r\n\t\t// edge weight\r\n\t\tint weight;\r\n\t\t// best current distance from start\r\n\t\tint dist;\r\n\t\t\r\n\t\twhile (!intree[v]) {\r\n\t\t\tintree[v] = true;\r\n\t\t\t\r\n\t\t\tEdgeNode p = g.edges[v];\r\n\t\t\t\r\n\t\t\t// for each node w that is not in the tree\r\n\t\t\t// identify the lowest cost\r\n\t\t\twhile (p != null) {\r\n\t\t\t\tw = p.y;\r\n\t\t\t\tweight = p.weight;\r\n\t\t\t\tif (!intree[w] && distance[w] > weight) {\r\n\t\t\t\t\t// pick the edge that is lowest cost from v.\r\n\t\t\t\t\tdistance[w] = weight;\r\n\t\t\t\t\tparent[w] = v;\r\n\t\t\t\t}\r\n\t\t\t\tp = p.next;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// find the node that is not in the list, \r\n\t\t\t// and has the smallest distance value.\r\n\t\t\tv = 0;\r\n\t\t\tdist = Integer.MAX_VALUE;\r\n\t\t\tfor (int i = 0; i < g.nvertices; ++i) {\r\n\t\t\t\tif (!intree[i] && dist > distance[i]) {\r\n\t\t\t\t\tdist = distance[i];\r\n\t\t\t\t\tv = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static int min(treenode root)\n {\n treenode curr=root;\n while(curr.left!=null)\n curr=curr.left;\n return curr.val;\n }",
"public T deleteMin()\n\t{\t\n\t\t//declating variables\n\t\tint minIndex = 0;\n\t\tboolean flag = false;\n\t\tboolean flag2 = false;\n\t\t//if size == 0; returns null\n\t\tif(size == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\t//if checks size and deletes accordingly.\n\t\tif(size == 1)\n\t\t{\n\t\t\tT tempo = array[0];\n\t\t\tarray[0] = null;\n\t\t\tsize--;\n\t\t\treturn tempo;\n\n\t\t}\n\n\t\tif(size == 2)\n\t\t{\n\t\t\tT temp = array[0];\n\t\t\tarray[0] = array[1];\n\t\t\tarray[1] = null;\n\t\t\tsize--;\n\t\t\treturn temp;\n\n\t\t}\n\t\tif(size == 3)\n\t\t{\n\t\t\tT tempo = array[0];\n\t\t\tint small = grandChildMin(1, 2);\n\t\t\tarray[0] = array[small];\n\t\t\tif(small == 2)\n\t\t\t{\n\t\t\t\tarray[small] = null;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tarray[1] = array[2];\n\t\t\t\tarray[2] = null;\n\t\t\t}\n\n\t\t\tsize--;\n\t\t\treturn tempo;\n\t\t}\n\n\t\t//if size > 3 does sophisticated deleting\n\t\tT temp = array[0];\n\t\tarray[0] = array[size-1];\n\t\tarray[size-1] = null;\n\t\tsize--;\n\t\tint index = 0;\n\n\t\t//gets the smallest of the children & grandchildren\n\t\tint smallest = min(index).get(0);\n\t\t//while it has grandchildren, keeps going\n\t\twhile(smallest != 0)\n\t\t{\n\t\t\t//doesn't switch if im less than the smallest grandchild\n\t\t\t//& breaks\n\t\t\tif(object.compare(array[index], array[smallest]) <= 0 )\n\t\t\t{\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//special case when i could switch with child or grandchild\n\t\t\tif( min(index).size() > 1)\n\t\t\t{\n\t\t\t\tflag2 = true;\n\t\t\t}\n\n\t\t\t//switches the locations and updates index\n\t\t\tT lemp = array[index];\n\t\t\tarray[index] = array[smallest];\n\t\t\tarray[smallest] = lemp;\n\t\t\tindex = smallest;\n\t\t\tsmallest = min(smallest).get(0);\n\n\t\t}\n\t\t//if i dont switch, i check if i have to switch then percolate back up\n\t\tif(flag == true)\n\t\t{\n\t\t\tif(object.compare(array[index], array[grandChildMin(2*index+1, 2*index+2)]) > 0)\n\t\t\t{\n\t\t\t\tint mIndex = grandChildMin(2*index+1, 2*index+2);\n\t\t\t\tT k = array[mIndex];\n\t\t\t\tarray[mIndex] = array[index];\n\t\t\t\tarray[index] = k;\n\n\t\t\t\tint y = mIndex;\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT f = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = f;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(object.compare(array[index], array[(index-1)/2]) > 0)\n\t\t\t{\n\t\t\t\tT m = array[(index-1)/2];\n\t\t\t\tarray[(index-1)/2] = array[index];\n\t\t\t\tarray[index] = m;\n\t\t\t\tint y = (index-1)/2;\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT k = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = k;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\telse if(flag2 == true)\n\t\t{\n\t\t\tint y = index;\n\n\t\t\tif(getLevel(y+1) % 2 == 1)\n\t\t\t{\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT k = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = k;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse{\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) < 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT k = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = k;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\n\t\telse if(object.compare(array[index], array[grandChildMin(2*index +1, 2*index+2)]) > 0 && grandChildMin(2*index +1, 2*index+2) != 0)\n\t\t{\n\t\t\tminIndex = grandChildMin(2*index+1, 2*index+2);\n\t\t\tT wemp = array[index];\n\t\t\tarray[index] = array[minIndex];\n\t\t\tarray[minIndex] = wemp;\n\n\t\t\tint y = minIndex;\n\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t{\n\t\t\t\tT demp = array[(y-3)/4];\n\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\tarray[y] = demp;\n\t\t\t\ty = (y-3)/4;\n\t\t\t}\n\t\t}\n\n\t\telse if (object.compare(array[index], array[(index-1)/2]) > 0) \n\t\t{\n\n\t\t\tT femp = array[(index-1)/2];\n\t\t\tarray[(index-1)/2] = array[index];\n\t\t\tarray[index] = femp;\n\n\t\t\tint y = (index-1)/2;\n\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t{\n\t\t\t\tT demp = array[(y-3)/4];\n\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\tarray[y] = demp;\n\t\t\t\ty = (y-3)/4;\n\t\t\t}\n\t\t}\n\n\t\t\n\t\treturn temp;\n\t}",
"public BSTMapNode findMin() \n\t{\n\t\t\n\t\t\n\t\treturn null;\n\t}",
"private void minimize(Node node) {\n // minimize:\n double min = Tree.MAXINT;\n List<Node> children = node.getChildren();\n \n// if(children.isEmpty()){\n// return;\n// }\n \n // String values = \"\";\n for (Node child : children) {\n if (child.getMove().getRating() < min) {\n min = child.getMove().getRating();\n }\n // values += \"\" + child.getMove().getRating() + \", \";\n }\n // set value\n // System.out.println(\"setting value for next parent (minimize): \" + min + \" (all values: \" + values + \")\");\n\n node.getMove().setRating(min);\n }",
"private Node smallest(Node p){\n if(p == null){\n return null;\n }\n Node smallest = p;\n while(smallest.left!=null){\n smallest = smallest.left;\n }\n return smallest;\n }",
"int getXMin();",
"public void kruskalMST()\n\t\t{\n\t\t\tPriorityQueue<Edge> pq = new PriorityQueue<>(allEdges.size(), Comparator.comparingInt(o -> o.roadCost));\n\n\t\t\tfor(int i = 0; i < allEdges.size(); i++)\n\t\t\t{\t\n\t\t\t\tpq.add(allEdges.get(i));\n\t\t\t}\t\t\t\n\n\t\t\tint [] parent = new int[edges];\n\t\t\tmakeSet(parent);\n\t\t\tArrayList<Edge> mst = new ArrayList<>();\n\t\t\tint index = 0, tempCost = 0;\n\n\t\t\t// Step 2: Pick the lowest cost edges to add to our result\n\t\t\twhile(index < edges - 1)\n\t\t\t{\n\t\t\t\tEdge edge = pq.remove();\n\t\t\t\tint x_set = find(parent, edge.source);\n\t\t\t\tint y_set = find(parent, edge.destination);\n\n\t\t\t\t// If creates a cycle, or a road with n wagons can't support the total weight ignore it\n\t\t\t\tif(x_set == y_set /* ||edge.weightCap * wagons < shipWeight */ ){\n\t\t\n\t\t\t\t}else{\n\t\t\t\t\t// These are valid edges for our MST\n\t\t\t\t\tmst.add(edge);\n\t\t\t\t\ttempCost += edge.roadCost;\n\t\t\t\t\tindex++;\n\t\t\t\t\tunion(parent, x_set, y_set);\n\t\t\t\t}\n\t\t\t\t// If there are no edges left, break out of the while loop\n\t\t\t\tif(pq.size() < 1)\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// ----------- Output working MSTs ----------- \n\t\t\t// printGraph(allEdges);\n\t\t\t// printCities(allCities);\n\n\t\t}",
"private IAVLNode minPointer(IAVLNode node) \r\n\t {\r\n\t\t\twhile (node.isRealNode())\r\n\t\t\t\tnode = node.getLeft();\r\n\t\t\treturn node.getParent();\t\r\n\t }",
"public Node min() {\n\t\tNode x = root;\n\t\tif (x == null) return null;\n\t\twhile (x.getLeft() != null)\n\t\t\tx = x.getLeft();\n\t\treturn x;\n\t}",
"public static int[][] optimalBST(double[] p, int num){\n double[][] e = new double[num+2][num+2];\n double[][] w = new double[num+1][num+1];\n //this will to easy count the sum of w from i to j\n //so use w[i][j] = w[i][j-1] + p[j]\n //therefor the size of w is also need num+1\n\n int[][] root = new int[num+1][num+1];//记录根节点\n //root[i][j] -- 用来存放i-j组成的最优二叉查找树的根节点\n\n for(int d = 0; d<num; d++){\n for(int i=1; i<=num-d; i++){\n int j = i + d;\n e[i][j] = Double.MAX_VALUE;\n w[i][j] = w[i][j-1] + p[j-1];//\n for(int k=i; k<=j; k++){\n double temp = w[i][j] + e[i][k-1] + e[k+1][j];;\n if(temp < e[i][j]){\n e[i][j] = temp;\n root[i][j] = k;\n }\n }\n }\n }\n ArrayTool.printDoubleMatrix(w);\n System.out.println(\"the total Search probability of this optimal BST is \"+ e[1][num]);\n return root;\n }",
"public K min();",
"private Node getMinimumOld() {\n Node tmp = null;\n\n // TODO: optimize by putting in 1 list and\n // provide 'starting offset' for remaining nodes to find mimimum\n // note: see new getMinimum method above\n\n if (null != nodeA) {\n tmp = nodeA;\n if (null != nodeB && tmp.data > nodeB.data) {\n tmp = nodeB;\n }\n if (null != nodeC && tmp.data > nodeC.data) {\n tmp = nodeC;\n }\n } else if (null != nodeB) {\n tmp = nodeB;\n if (null != nodeC && tmp.data > nodeC.data) {\n tmp = nodeC;\n }\n } else if (null != nodeC) {\n tmp = nodeC;\n }\n\n // System.out.println(tmp);\n\n if (null == tmp ) {\n // terminating condition\n return null;\n }\n\n if (tmp.equals(nodeA)) {\n nodeA = nodeA.next;\n }\n if (tmp.equals(nodeB)) {\n nodeB = nodeB.next;\n }\n if (tmp.equals(nodeC)) {\n nodeC = nodeC.next;\n }\n\n System.out.println(tmp.data);\n\n return tmp;\n }",
"public int minPathSum(int[][] grid) {\n\t\treturn 0;\r\n }",
"static int shortestCellPath(int[][] grid, int sr, int sc, int tr, int tc) {\n\n\n Queue<Pair> queue = new LinkedList<>();\n\n\n boolean visited[][] = new boolean[grid.length][grid[0].length];\n\n\n int dirs[][] = new int[][]{{1,0},{0,1},{-1,0},{0,-1}};\n\n queue.offer(new Pair(sr,sc,0));\n visited[sr][sc] = true;\n\n while(!queue.isEmpty()){\n\n Pair currentNode = queue.poll();\n\n if(currentNode.row == tr && currentNode.col == tc) {\n return currentNode.d;\n }\n\n\n\n\n for(int[] dir : dirs) {\n\n\n int row = currentNode.row + dir[0];\n int col = currentNode.col + dir[1];\n\n if(row >= 0 && row < grid.length && col >= 0 && col < grid[0].length && !visited[row][col] && grid[row][col] == 1) {\n queue.offer(new Pair(row,col,currentNode.d+1));\n visited[row][col] = true;\n }\n }\n\n\n\n }\n\n return -1;\n }",
"int successiveSPMinCostFlow(int d) {\n\t\tSystem.out.println(\"Running Successive Shortest Paths Algorithm:\");\n\t\t mcg = new MinCostGraph(g, source, terminal, capacity, cost);\n\t\tint minCost = mcg.successiveSPMinCostFlow(d);\n\t\tSystem.out.println(\"Flow: \" + mcg.getFlow() + \" Min Cost: \" + minCost);\n\n\t\treturn minCost;\n\t}",
"public int findMin(int[] nums) {\n\t\t// corner\n\t\tif (nums.length == 1) {\n\t\t\treturn nums[0];\n\t\t}\n\t\t// Not rotated.\n\t\tif (nums[0] < nums[nums.length - 1]) {\n\t\t\treturn nums[0];\n\t\t}\n\n\t\t// Binary Search.\n\t\tint left = 0;\n\t\tint right = nums.length - 1;\n\t\t// int right = nums.length; // NG! (R = M version)\n\t\twhile (left <= right) {\n\t\t\t// while (left < right) { // NG! (R = M version)\n\t\t\tint mid = left + (right - left) / 2;\n\n\t\t\t// Find the valley.\n\t\t\t// nums[mid + 1] could cause array index out of bound when nums[mid] is the last\n\t\t\t// element.\n\t\t\t// However, for this problem, when nums[mid] is the second to the last, it\n\t\t\t// returns and\n\t\t\t// nums[mid] never reaches to the last element.\n\t\t\t// R = M version is NG because nums[mid] skips the second to the last and hits\n\t\t\t// the last\n\t\t\t// element depending on the case, in which case, nums[mid + 1] causes array\n\t\t\t// index out of bound.\n\t\t\tif (nums[mid] > nums[mid + 1]) {\n\t\t\t\treturn nums[mid + 1];\n\t\t\t}\n\t\t\t// Assert nums[mid] < nums[mid + 1] (no duplicates)\n\n\t\t\t// nums[mid - 1] could cause array index out of bound when the target is the\n\t\t\t// first element or\n\t\t\t// the second element.\n\t\t\t// However, for this problem, the code above returns when mid is equal to 0.\n\t\t\t// To be exact, when you use R = M - 1 version, mid is approaching index 0 as\n\t\t\t// the following:\n\t\t\t// 1. 2 -> 0 -> 1\n\t\t\t// 2. 3 -> 1 -> 0\n\t\t\t// ex) 1. [ 5, 1, 2, 3, 4 ], 2. [ 6, 1, 2, 3, 4, 5]\n\t\t\t// For case 1, the code above returns when mid is equal to 0, and nums[-1] never\n\t\t\t// occurs.\n\t\t\t// For case 2, the code below returns when mid is equal to 1, and nums[-1] never\n\t\t\t// occurs.\n\t\t\t//\n\t\t\t// Be careful!\n\t\t\t// Not rotated array can cause nums[-1] here for both of the two cases above\n\t\t\t// because\n\t\t\t// the code above does not return when mid is equal to 0, which causes index out\n\t\t\t// of bound here.\n\t\t\t// So, eliminate this case in advance.\n\t\t\tif (nums[mid - 1] > nums[mid]) {\n\t\t\t\treturn nums[mid];\n\t\t\t}\n\n\t\t\t// If the mid does not hit the valley, then keep searching.\n\t\t\t// I don't know why nums[mid] > nums[0] is ok in the LeetCode solution yet.\n\t\t\t// (No need to explore any further)\n\t\t\tif (nums[mid] > nums[left]) {\n\t\t\t\t// The min is in the right subarray.\n\t\t\t\tleft = mid + 1;\n\t\t\t} else {\n\t\t\t\t// The min is in the left subarray.\n\t\t\t\tright = mid - 1;\n\t\t\t\t// right = mid; // NG! (R = M version)\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}",
"public List<Integer> findMinHeightTrees(int n, int[][] edges) {\n\n // edge list\n // Create adjacency list\n // find nodes with edge degree\n // fill a queue with edge degree one\n // do the bfs and keep marking their heights in the path\n // as we go along and find a node with lesser possible heights, update heights\n // of that node and keep updating in consequent nodes\n\n // edge case - disconnected tree\n\n List<List<Integer>> adjList = new ArrayList<>();\n\n createAdjList(n, edges, adjList);\n\n // Revise - How to print a list?\n System.out.println(Arrays.toString(adjList.toArray()));\n\n int[] edgeDegree = new int[n];\n int[] heights = new int[n];\n for (int[] edge:\n edges) {\n edgeDegree[edge[0]]++;\n edgeDegree[edge[1]]++;\n }\n\n System.out.println(\"edgeDegree\");\n System.out.println(Arrays.toString(edgeDegree));\n\n Queue<Integer> bfsQ = new LinkedList<>();\n boolean[] visited = new boolean[n];\n for (int i = 0; i < edgeDegree.length; i++) {\n if (edgeDegree[i] == 1) {\n bfsQ.add(i);\n heights[i] = 1;\n break;\n }\n }\n\n int maxHeight = Integer.MIN_VALUE;\n while (!bfsQ.isEmpty()) {\n Integer vertex = bfsQ.poll();\n visited[vertex] = true;\n System.out.println(\"Out from queue\");\n int heightParentVertex = heights[vertex];\n maxHeight = Math.max(maxHeight, heightParentVertex);\n List<Integer> adjNodes = adjList.get(vertex);\n for (Integer adjNode:\n adjNodes) {\n if (!visited[adjNode]) {\n heights[adjNode] = heightParentVertex+1;\n bfsQ.add(adjNode);\n }\n }\n }\n\n List<Integer> ans = new ArrayList<>();\n System.out.println(\"maxHeight\");\n System.out.println(maxHeight);\n\n // if even\n for (int i = 0; i < n; i++) {\n if ( heights[i] == ((maxHeight / 2) + 1)) {\n ans.add(i);\n } else if (maxHeight % 2 == 0 && heights[i] == maxHeight / 2) {\n ans.add(i);\n }\n }\n\n return ans;\n }",
"private WAVLNode min(WAVLNode x) {\n\t while(x.left!=EXT_NODE) {\r\n \tx=x.left;\r\n }\r\n return x;\r\n }",
"private T getMinUnvisited(){\n if (unvisited.isEmpty()) return null;\n T min = unvisited.get(0);\n for (int i = 1; i < unvisited.size(); i++){\n T temp = unvisited.get(i);\n if (distances[vertexIndex(temp)] < distances[vertexIndex(min)]){\n min = temp;\n }\n }\n return min;\n }",
"public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNode q) {\n if (root.val < p.val && root.val < q.val) return lowestCommonAncestor(root.right, p, q);\n else if (root.val > p.val && root.val > q.val) return lowestCommonAncestor(root.left, p, q);\n return root;\n}",
"private Node findSmallest(Node curr) {\n Node prev = null;\n while(curr != null && !curr.isNull) {\n prev = curr;\n curr = curr.left;\n }\n return prev != null ? prev : curr;\n }",
"private Node lowestCostThrough(List<Node> openSet, Map<Node, Double> costThrough){\n Node lowest = openSet.get(0);\n\n for(Node n: openSet){\n if(costThrough.get(n) < costThrough.get(lowest)){\n lowest = n;\n }\n }\n return lowest;\n }",
"@Override\r\n\tpublic double min_value(GameState s, int depthLimit)\r\n\t{\r\n\t\tdouble stateEvaluationValue = stateEvaluator(s);\r\n\t\r\n\t\tif (depthLimit == 0)\r\n\t\t{\r\n\t\t\treturn -(stateEvaluationValue);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tdouble currMin = Double.POSITIVE_INFINITY;\r\n\t\t\tint bestMove = 0;\r\n\t\t\tArrayList <Integer> succList = generateSuccessors(s.lastMove, s.takenList);\r\n\t\t\tif (succList.isEmpty())\r\n\t\t\t{\r\n\t\t\t\ts.leaf = true;\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t\tIterator <Integer> myItr = succList.iterator();\r\n\t\t\t\r\n\t\t\twhile (myItr.hasNext())\r\n\t\t\t{\r\n\t\t\t\tint currNumber = myItr.next();\r\n\t\t\t\t\r\n\t\t\t\tdouble tempMin = currMin;\r\n\t\t\t\tint [] newList = s.takenList;\r\n\t\t\t\tnewList [currNumber] = 2;\r\n\t\t\t\tGameState newGameState = new GameState(newList, currNumber);\r\n\t\t\t\tcurrMin = Math.min(currMin, max_value(newGameState, depthLimit - 1));\r\n\r\n\t\t\t\tif (currMin < tempMin)\r\n\t\t\t\t{\r\n\t\t\t\t\tbestMove = currNumber;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ts.bestMove = bestMove;\r\n\t\t\treturn currMin;\r\n\r\n\t\t}\r\n\t}",
"public Node<E> getMin(Node<E> x) {\n\t\tif (x.getLeftChild() != sentinel) {\n\t\t\treturn getMin(x.getLeftChild()); //Recurisvely go throughs the left side of the tree until a null node pops up\n\t\t} else {\n\n\t\t\treturn x; //x will be the node with the minimum value \n\t\t}\n\t}",
"void constructSTUtil(int arr[], int ss, int se, int si)\n {\n if (ss == se) {\n st[si] = arr[ss];\n //return arr[ss];\n } else {\n\n // If there are more than one elements, then recur for left and\n // right subtrees and store the sum of values in this node\n int mid = getMid(ss, se);\n constructSTUtil(arr, ss, mid, si * 2 + 1);\n constructSTUtil(arr, mid + 1, se, si * 2 + 2);\n st[si] = Math.min(st[si*2+1] , st[si*2+ 2]);\n }\n }",
"private int minChild(int ind)\n {\n int bestChild = kthChild(ind, 1);\n int k =2;\n int pos = kthChild(ind, k);\n while ((k <= d) && (pos < heapSize)){\n if(heap[pos] < heap[bestChild])\n {\n bestChild = pos;\n }\n else {\n pos = kthChild(ind, k++);\n }\n }\n return bestChild;\n\n }",
"public static void main(String[] args) {\n TreeNode root = new TreeNode(1);\n root.right = new TreeNode(2);/*\n root.right.left = new TreeNode(4);\n root.right.right = new TreeNode(11);*/\n\n Solution solution = new Solution();\n int minimumDifference = solution.getMinimumDifference(root);\n System.out.println(minimumDifference);\n\n }",
"abstract AbstractTree<T> maximize();"
] |
[
"0.7059066",
"0.6989901",
"0.696082",
"0.6791509",
"0.6764812",
"0.6726343",
"0.6716228",
"0.66977847",
"0.6586903",
"0.6584442",
"0.655755",
"0.64560974",
"0.6418315",
"0.64139515",
"0.64134747",
"0.6333691",
"0.63185394",
"0.6306126",
"0.6270449",
"0.6243946",
"0.6231013",
"0.62249166",
"0.6216747",
"0.62042964",
"0.61811924",
"0.6167768",
"0.61660576",
"0.6144417",
"0.61387575",
"0.61324316",
"0.6115042",
"0.6114169",
"0.61070323",
"0.6103631",
"0.60987675",
"0.6098103",
"0.60334986",
"0.603065",
"0.60264057",
"0.60175574",
"0.60059553",
"0.6005181",
"0.6001897",
"0.5996121",
"0.5967195",
"0.5961719",
"0.5960799",
"0.59558904",
"0.5943249",
"0.5936808",
"0.5933112",
"0.5928736",
"0.5925265",
"0.5923998",
"0.59194976",
"0.5915772",
"0.5913723",
"0.5911316",
"0.59095764",
"0.58988255",
"0.5896964",
"0.58837765",
"0.58782643",
"0.5870188",
"0.58649653",
"0.5860515",
"0.5859221",
"0.58572614",
"0.58536536",
"0.58516884",
"0.58512676",
"0.5836944",
"0.5832303",
"0.58276445",
"0.58218604",
"0.58183295",
"0.5814191",
"0.580902",
"0.5793014",
"0.5783367",
"0.57832867",
"0.57777923",
"0.5776154",
"0.57689893",
"0.576639",
"0.5761791",
"0.57607526",
"0.5756819",
"0.5750788",
"0.5746108",
"0.57422286",
"0.5741221",
"0.57409084",
"0.573125",
"0.5726321",
"0.5721202",
"0.5719079",
"0.57070416",
"0.5703181",
"0.57017636",
"0.56936055"
] |
0.0
|
-1
|
This listener is triggered whenever a monoflop timer reaches 0. The parameters contain the port, the involved pins and the current value of the pins (the value after the monoflop). .. versionadded:: 1.1.2~(Plugin)
|
public interface MonoflopDoneListener {
public void monoflopDone(char port, short selectionMask, short valueMask);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void onNewPulse(int pulse, int spo2 );",
"public abstract void inputChangeEvent( float time, int dstPin, boolean v );",
"public void inputChangeEvent( float time, int dstPin, boolean v ) {\n\tvalue = !v;\n\t Simulator.schedule(\n\t new Simulator.Event( time\n\t\t + (delay * 0.95f)\n\t\t + PRNG.randomFloat( delay * 0.1f ) ) {\n\t\t void trigger() {\n\t\t\t outputChangeEvent( this.time );\n\t\t }\n\t\t}\n\t );\n }",
"@Override\n\tpublic void teleopPeriodic() {\n\n\t\tif (Joy.getRawButtonPressed(1)) {\n\t\t\ttriggerValue = !triggerValue;\n\n\t\t\tif (triggerValue) {\n\t\t\t\tairCompressor.start();\n\t\t\t\tSystem.out.println(\"Compressor ON\");\n\n\t\t\t} else if (!triggerValue) {\n\t\t\t\tairCompressor.stop();\n\t\t\t\tSystem.out.println(\"Compressor OFF\");\n\t\t\t}\n\t\t}\n\n\t\tif (Joy.getRawButtonPressed(2)) {\n\t\t\ttriggerValue = !triggerValue;\n\n\t\t\tif (triggerValue) {\n\t\t\t\ts1.set(DoubleSolenoid.Value.kForward);\n\t\t\t\tTimer.delay(1);\n\t\t\t\ts2.set(DoubleSolenoid.Value.kForward);\n\t\t\t\tSystem.out.println(\"Solenoid Forward\");\n\n\t\t\t} else if (!triggerValue) {\n\t\t\t\ts1.set(DoubleSolenoid.Value.kReverse);\n\t\t\t\tTimer.delay(1);\n\t\t\t\ts2.set(DoubleSolenoid.Value.kReverse);\n\t\t\t\tSystem.out.println(\"Solenoid Reversed\");\n\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void onMove(int angle, int strength) {\n TextView text_view_angle = (TextView) findViewById(R.id.angle);\n text_view_angle.setText( \"Angle: \"+Integer.toString(angle) );\n\n TextView text_view_strength = (TextView) findViewById(R.id.strength);\n text_view_strength.setText( \"Strength: \"+Integer.toString(strength) );\n\n // don't process the input unless we've somewhere to send it\n if (hostname != null) {\n if (strength != 0) {\n if (zeroed_timer!= null) {\n zeroed_timer.cancel();\n zeroed_timer = null;\n }\n new SendPacket().execute(angle,strength);\n } else {\n if (zeroed_timer == null) {\n // start time\n zeroed_timer_start = System.currentTimeMillis();\n // actually initialise the timer\n zeroed_timer = new Timer();\n zeroed_timer.scheduleAtFixedRate(new TimerTask() {\n public void run() {\n new SendPacket().execute(0, 0);\n // if the current time is passed the timeout threshold\n if (zeroed_timer_start + zeroed_timer_timout < System.currentTimeMillis()) {\n // stop the timer\n System.out.println(\"Zeroing timer stopped\");\n zeroed_timer.cancel();\n zeroed_timer = null;\n }\n }\n }, 0, 50);\n }\n }\n\n }\n }",
"public void onRoundReset(PuyoBoardManager manager) {}",
"@Override\r\n public void onStart(ConnectedNode connectedNode) {\n Subscriber<diagnostic_msgs.DiagnosticStatus> inputSubscriber =\r\n connectedNode.newSubscriber(\"ftl_hardware_inputs\", diagnostic_msgs.DiagnosticStatus._TYPE);\r\n\r\n inputSubscriber.addMessageListener(new MessageListener<diagnostic_msgs.DiagnosticStatus>(){\r\n\r\n @Override\r\n public void onNewMessage(diagnostic_msgs.DiagnosticStatus msg) {\r\n // digitalIn, analogIn\r\n if (msg.getName() == \"digitalIn\") {\r\n // Handle Digital messages\r\n Map<Integer, Boolean> dInMap = new HashMap<>();\r\n for (diagnostic_msgs.KeyValue kvPair : msg.getValues()) {\r\n int port = Integer.parseInt(kvPair.getKey());\r\n boolean val = (kvPair.getValue() == \"true\" || kvPair.getValue() == \"1\");\r\n dInMap.put(port, val);\r\n }\r\n\r\n for (IHardwareListener listener: mListeners) {\r\n listener.onDigitalInputChanged(dInMap);\r\n }\r\n }\r\n else if (msg.getName() == \"analogIn\") {\r\n // Handle Analog messages\r\n Map<Integer, Double> aInMap = new HashMap<>();\r\n for (diagnostic_msgs.KeyValue kvPair : msg.getValues()) {\r\n int port = Integer.parseInt(kvPair.getKey());\r\n double val = Double.parseDouble(kvPair.getValue());\r\n aInMap.put(port, val);\r\n }\r\n\r\n for (IHardwareListener listener: mListeners) {\r\n listener.onAnalogInputChanged(aInMap);\r\n }\r\n }\r\n }\r\n });\r\n\r\n // Also set up the publisher\r\n Publisher<diagnostic_msgs.DiagnosticStatus> outputPublisher =\r\n connectedNode.newPublisher(\"ftl_hardware_outputs\", diagnostic_msgs.DiagnosticStatus._TYPE);\r\n\r\n // Set up the loop\r\n connectedNode.executeCancellableLoop(new CancellableLoop(){\r\n\r\n @Override\r\n protected void loop() throws InterruptedException {\r\n // Check to see if we have any new updates to send out\r\n if (mNewDigitalOutData) {\r\n // Make a local copy\r\n Map<Integer, Boolean> digitalOutCopy;\r\n\r\n synchronized(mDigitalOutLock) {\r\n digitalOutCopy = new HashMap<>();\r\n digitalOutCopy.putAll(mDigitalOutValues);\r\n mDigitalOutValues.clear();\r\n mNewDigitalOutData = false;\r\n }\r\n\r\n // Send it out\r\n if (digitalOutCopy != null) {\r\n diagnostic_msgs.DiagnosticStatus digitalMsg = outputPublisher.newMessage();\r\n digitalMsg.setName(\"digitalOut\");\r\n List<diagnostic_msgs.KeyValue> digitalOutKVs = new ArrayList<>();\r\n for (Entry<Integer, Boolean> valueEntry : digitalOutCopy.entrySet()) {\r\n String k = valueEntry.getKey().toString();\r\n String v = valueEntry.getValue() ? \"1\" : \"0\";\r\n diagnostic_msgs.KeyValue newKV =\r\n connectedNode.getTopicMessageFactory()\r\n .newFromType(diagnostic_msgs.KeyValue._TYPE);\r\n newKV.setKey(k);\r\n newKV.setValue(v);\r\n digitalOutKVs.add(newKV);\r\n }\r\n digitalMsg.setValues(digitalOutKVs);\r\n\r\n outputPublisher.publish(digitalMsg);\r\n }\r\n }\r\n\r\n if (mNewPWMOutData) {\r\n // Make a local copy\r\n Map<Integer, Double> pwmOutCopy;\r\n\r\n synchronized(mPWMOutLock) {\r\n pwmOutCopy = new HashMap<>();\r\n pwmOutCopy.putAll(mPWMOutValues);\r\n mPWMOutValues.clear();\r\n mNewPWMOutData = false;\r\n }\r\n\r\n // Send it out\r\n if (pwmOutCopy != null) {\r\n diagnostic_msgs.DiagnosticStatus pwmMsg = outputPublisher.newMessage();\r\n pwmMsg.setName(\"pwmOut\");\r\n List<diagnostic_msgs.KeyValue> pwmOutKVs = new ArrayList<>();\r\n for (Entry<Integer, Double> valueEntry : pwmOutCopy.entrySet()) {\r\n String k = valueEntry.getKey().toString();\r\n String v = valueEntry.getValue().toString();\r\n diagnostic_msgs.KeyValue newKV =\r\n connectedNode.getTopicMessageFactory()\r\n .newFromType(diagnostic_msgs.KeyValue._TYPE);\r\n newKV.setKey(k);\r\n newKV.setValue(v);\r\n pwmOutKVs.add(newKV);\r\n }\r\n pwmMsg.setValues(pwmOutKVs);\r\n\r\n outputPublisher.publish(pwmMsg);\r\n }\r\n }\r\n\r\n Thread.sleep(10);\r\n }\r\n });\r\n }",
"public void inputChangeEvent( float time, int dstPin, boolean v ) {\n\tErrors.fatal( \"Input should never change: \" + toString() );\n }",
"public void teleopPeriodic() {\n\n \t//NetworkCommAssembly.updateValues();\n \t\n\t\t// both buttons pressed simultaneously, time to cal to ground\n\t\tif (gamepad.getRawButton(FRONT_ARM_GROUND_CAL_BUTTON1) && gamepad.getRawButton(FRONT_ARM_GROUND_CAL_BUTTON2)) {\n\t\t\tprocessGroundCal();\n\t\t}\n\n\t\t// PID CONTROL ONLY\n\t\tdouble armDeltaPos = gamepad.getRawAxis(1);\n\t\tif (Math.abs(armDeltaPos) < ARM_DEADZONE) {\n\t\t\tarmDeltaPos = 0.0f;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tarmDeltaPos *= ARM_POS_MULTIPLIER;\n\t\t\tdouble currPos = testMotor.getPosition();\n\t\t\t\n\t\t\tif (((currPos > SOFT_ENCODER_LIMIT_MAX) && armDeltaPos > 0.0) || ((currPos < SOFT_ENCODER_LIMIT_FLOOR) && armDeltaPos < 0.0)) {\n\t\t\t\tSystem.out.println(\"SOFT ARM LIMIT HIT! Setting armDeltaPos to zero\");\n\t\t\t\tarmDeltaPos = 0.0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tdouble newPos = currPos + armDeltaPos;\n\t\t\ttestMotor.set(newPos);\n\t\t\tSystem.out.println(\"Setting new front arm pos = \" + newPos);\t\n\t\t}\t\t\n\n \t/*\n\t\tdouble newArmPos = gamepad.getRawAxis(1);\n\t\tif(Math.abs(newArmPos) <= ARM_DEADZONE) {\n\t\t\tnewArmPos = 0.0;\n\t\t}\n\t\tdouble newMotorPos = (newArmPos * ARM_SPEED_MULTIPLIER) + testMotor.getPosition();\n\t\tpositionMoveByCount(newMotorPos);\n\t\tSystem.out.println(\"input = \" + newArmPos + \" target pos = \" + newMotorPos + \" enc pos = \" + testMotor.getPosition());\n \t*/\n \t\n\t\t// PercentVbus test ONLY!!\n \t/*\n\t\tdouble armSpeed = gamepad.getRawAxis(1);\n\t\tif (Math.abs(armSpeed) < ARM_DEADZONE) {\n\t\t\tarmSpeed = 0.0f;\n\t\t}\t\n\t\tarmSpeed *= ARM_MULTIPLIER;\n\t\t\n\t\tdouble pos= testMotor.getPosition();\n\t\tif (((pos > SOFT_ENCODER_LIMIT_1) && armSpeed < 0.0) || ((pos < SOFT_ENCODER_LIMIT_2) && armSpeed > 0.0))\n\t\t\tarmSpeed = 0.0;\n\t\ttestMotor.set(armSpeed);\n\t\t\n\t\tSystem.out.println(\"armSpeed = \" + armSpeed + \" enc pos = \" + testMotor.getPosition());\n\t\t */ \n }",
"TimerStatus onTimer();",
"public void onRoundOver(PuyoBoardManager manager) {}",
"@Override\n public void onPinChange(int pinLength, String intermediatePin) {\n }",
"@Override\n public void run() {\n if (gpioPort == null) {\n return;\n }\n try {\n listner.portCallback(gpioPort);\n Log.d(\"Inside runnable\", \"this is the value inside runnable\");\n\n //Schedule another event after delay.\n mHandler.postDelayed(mCallBackRunnable, CALLBACK_INTERVAL);\n } catch (IOException e) {\n Log.d(\"Inside runnable Error\", \"this is the value inside runnable\");\n }\n }",
"public OpenToLANConfig() {\n this.port = 0;\n this.delayBetweenPings = Duration.of(1500, TimeUnit.MILLISECOND);\n this.delayBetweenEvent = Duration.of(30, TimeUnit.SECOND);\n }",
"public void notifyControllerStart(int port);",
"public interface OnOpenPortListener {\n void onOpenPort(boolean openSuccess);\n}",
"public void setPinValueForNotification(int pinValue, long eventTime, boolean isSensorTime, boolean notify);",
"public void teleopPeriodic() {\n joystick1X = leftStick.getAxis(Joystick.AxisType.kX);\n joystick1Y = leftStick.getAxis(Joystick.AxisType.kY);\n joystick2X = rightStick.getAxis(Joystick.AxisType.kX);\n joystick2Y = rightStick.getAxis(Joystick.AxisType.kY);\n \n mapped1Y = joystick1Y/2 + 0.5;\n mapped1X = joystick1X/2 + 0.5;\n mapped2X = joystick2X/2 + 0.5;\n mapped2Y = joystick2Y/2 + 0.5;\n \n X1testServo.set(mapped1X);\n Y1testServo.set(mapped1Y);\n X2testServo.set(mapped2X);\n Y2testServo.set(mapped2Y);\n }",
"public void setPortMonoflop(char port, short selectionMask, short valueMask, long time) throws TimeoutException, NotConnectedException {\n\t\tbyte options = 0;\n\t\tboolean isResponseExpected = getResponseExpected(FUNCTION_SET_PORT_MONOFLOP);\n\t\tif(isResponseExpected) {\n\t\t\toptions = 8;\n\t\t}\n\t\tByteBuffer bb = ipcon.createRequestBuffer(uid, (byte)15, FUNCTION_SET_PORT_MONOFLOP, options, (byte)(0));\n\t\tbb.put((byte)port);\n\t\tbb.put((byte)selectionMask);\n\t\tbb.put((byte)valueMask);\n\t\tbb.putInt((int)time);\n\n\t\tif(isResponseExpected) {\n\t\t\tbyte[] response = sendRequestExpectResponse(bb.array(), FUNCTION_SET_PORT_MONOFLOP);\n\n\t\t\tbb = ByteBuffer.wrap(response, 8, response.length - 8);\n\t\t\tbb.order(ByteOrder.LITTLE_ENDIAN);\n\t\t} else {\n\t\t\tsendRequestNoResponse(bb.array());\n\t\t}\n\t}",
"@Override\n public void onValueChange(NumberPicker picker, int oldVal, int newVal) {\n TimeValue = NumP.getValue() * 5;\n }",
"public interface IPinListener\n{\n /**\n * Invoked by a Pin when its value changes. The argument \n * is the component to which the Pin belongs.\n * @param c\n * parent component for the Pin invoking this method\n */\n public void update(IComponent c);\n}",
"abstract protected int PortToRunOn();",
"@Override\n\tpublic void switchPortChanged(Long switchId) \n\t{\n\n\t}",
"@Override\n public void onArrivedWayPoint(int arg0) {\n\n }",
"public void stateChanged(SensorPort arg0, int arg1, int arg2) {\n\t\t\n\t}",
"@Override\n\tpublic void onReceivePressure(int val, int pos) {\n\n\t}",
"@Override\n public void periodic() {\n\n colorCalibrationEnabled = ntColorCalibrationEnabled.getBoolean(false);\n\n /* NON-OPERATIONAL SENSOR\n colorMatchResult = colorMatcher.matchClosestColor(colorSensor.getColor());\n */\n\n if(colorMatchResult.color == kRedTarget)\n {\n colorIsRed = true;\n colorIsGreen = false;\n colorIsBlue = false;\n colorIsYellow = false;\n }\n else if(colorMatchResult.color == kGreenTarget)\n {\n colorIsRed = false;\n colorIsGreen = true;\n colorIsBlue = false;\n colorIsYellow = false;\n }\n else if(colorMatchResult.color == kBlueTarget)\n {\n colorIsRed = false;\n colorIsGreen = false;\n colorIsBlue = true;\n colorIsYellow = false;\n }\n else if(colorMatchResult.color == kYellowTarget)\n {\n colorIsRed = false;\n colorIsGreen = false;\n colorIsBlue = false;\n colorIsYellow = true;\n }\n\n ntColorIsRed.setBoolean(colorIsRed);\n ntColorIsGreen.setBoolean(colorIsGreen);\n ntColorIsBlue.setBoolean(colorIsBlue);\n ntColorIsYellow.setBoolean(colorIsYellow);\n\n colorCalibration();\n\n numberOfTurnsToRotate = ntScdNumberOfTurnsToRotate.getDouble(69.0);\n ntStsNumberOfTurnsToRotate.forceSetDouble(numberOfTurnsToRotate);\n }",
"public void DoPulseCnt(int pin, int ms) { // (simple pulse count turn-on)\r\n int info;\r\n if (GotFirmVersion == 0){\r\n info = GetFirmwareRev();\r\n }\r\n if (GotFirmVersion < 18 * 0x10000){\r\n return; // >: HardAta is installed\r\n }\r\n CountingPulses = ms;\r\n ProPulsePin = pin;\r\n pinMode(pin, Arduino.PULSECOUNT);\r\n }",
"void enablePWM(double initialDutyCycle);",
"public void teleopPeriodic() {\r\n }",
"@Override\n\t\tpublic void onReceivePressure(int val, int pos) {\n\n\t\t}",
"void disablePWM();",
"@Override\n\t\t\tpublic void handleGpioPinDigitalStateChangeEvent(GpioPinDigitalStateChangeEvent theEvent)\n\t\t\t{\n\t\t\t\tif (isMotionDetected() && (System.currentTimeMillis() - myLastTime) > kDelay)\n\t\t\t\t{\n\t\t\t\t\tmyLastTime = System.currentTimeMillis();\n\t\t\t\t\tmyLogger.warning(\"Motion detected!\");\n\t\t\t\t\tgetController().getStatusService().resetOpenTime();\n\t\t\t\t}\n\t\t\t}",
"@Override\n public void teleopPeriodic() {\n Scheduler.getInstance().run();\n SmartDashboard.putNumber(\"right encoder\", drive.getRightEncoder());\n SmartDashboard.putNumber(\"left encoder\", drive.getLeftEncoder());\n \n PixyCamBlock centerBlock = PixyCam2.GetCentermostBlock();\n boolean targetInRange = false ;\n \n if(centerBlock == null)\n {\n targetInRange = false;\n SmartDashboard.putString(\"center block data \", \"null\"); \n }\n else if(centerBlock.yCenter < 200)\n {\n targetInRange = true;\n String out = \"Center Block, X: \"+centerBlock.xCenter + \" Y: \"+centerBlock.yCenter;\n SmartDashboard.putString(\"center block data \", out); \n }\n\n String targetValue = Boolean.toString(targetInRange);\n SmartDashboard.putString(\"target good?\", targetValue);\n \n \n SmartDashboard.putBoolean(\"isFlipped\", flipped);\n }",
"public abstract void logLap(int currentLap);",
"@Override\n public void ptt(int value, int timestamp) {\n }",
"public void ResetPort() {\n\n // Step 4. Remove handler events on close.\n mHandler.removeCallbacks(mCallBackRunnable);\n\n // It is important to setthe listners to null after its use to not use unwanted resources\n this.listner = null;\n // gpioPort Close the resource.\n if (gpioPort != null) {\n try {\n //Close the ports\n gpioPort.close();\n } catch (IOException e) {\n Log.e(\"Reset port\", \"Error on PeripheralIO API\", e);\n }\n }\n }",
"int getHealSnPort();",
"protected abstract void onReceiveBatteryFrame(int[] value);",
"public SoilMoistureSensor() {\r\n\t\tthis.cancel = false;\r\n\t\tthis.soilMoisture = 0;\r\n\t\tthis.updateInterval = 90; //Sensor update interval is 90 seconds.\r\n\t}",
"@Override\n public void teleopPeriodic() {\n }",
"@Override\n public void teleopPeriodic() {\n }",
"private void onPingingTimerTick()\r\n {\r\n EneterTrace aTrace = EneterTrace.entering();\r\n try\r\n {\r\n try\r\n {\r\n myConnectionManipulatorLock.lock();\r\n try\r\n {\r\n // Send the ping message.\r\n myUnderlyingOutputChannel.sendMessage(myPreserializedPingMessage);\r\n\r\n // Schedule the next ping.\r\n myPingingTimer.change(myPingFrequency);\r\n }\r\n finally\r\n {\r\n myConnectionManipulatorLock.unlock();\r\n }\r\n }\r\n catch (Exception err)\r\n {\r\n // The sending of the ping message failed - the connection is broken.\r\n cleanAfterConnection(true, true);\r\n }\r\n }\r\n finally\r\n {\r\n EneterTrace.leaving(aTrace);\r\n }\r\n }",
"public void teleopPeriodic() {\n \t//driveTrain.setInputSpeed(xbox.getAxisLeftY(), xbox.getAxisRightY());\n \t\n \tdriveTrain.print();\n \t\n \t// funcao PID\n \tif (xbox.getButtonX()) {\n\t\t\tbotaoapertado = true;\n\t\t} else if (xbox.getButtonY()) {\n\t\t\tbotaoapertado = false;\n\t\t\tdriveTrain.start();\n\t\t\tdriveTrain.setSetPoint(0, 0);\n\t\t}\n \tif (botaoapertado) {\n \t\tdriveTrain.setSetPoint(100, 100);\n\t\t}\n \t\n }",
"public void turnLightsOn()\n {\n set(Relay.Value.kForward);\n }",
"@Override\r\n\tpublic void onArrivedWayPoint(int arg0) {\n\r\n\t}",
"@Input(\"onOn\")\n synchronized public void onOn() {\n try {\n _switchJMXSource.setValue(true);\n } catch (PropertyVetoException e) {}\n }",
"@Override\n public void loop() { \n\n double forward = gamepad1.left_stick_y;\n double turn = gamepad1.right_stick_x;\n double collect = gamepad2.left_trigger - gamepad2.right_trigger;\n double wristPower = gamepad1.left_trigger - gamepad1.right_trigger;\n\n if (forward > 0)\n forward = Math.pow(forward, 2);\n else if (forward < 0)\n forward = -Math.pow(forward, 2);\n\n if (turn > 0)\n turn = Math.pow(turn, 2);\n else if (turn < 0)\n turn = -Math.pow(turn, 2);\n//\n// else if(turn < 0)\n// turn = -Math.pow(turn, 2);\n telemetry.addData(\"Forward Power\", forward);\n telemetry.addData(\"Turn Power\", turn);\n left.setPower(Range.clip(forward - turn, -1, 1));\n right.setPower(Range.clip(forward + turn, -1, 1));\n collection.setPower(0.8 * (Range.clip(collect, -1.0, 1.0)));\n wrist.setPower((Range.clip(wristPower, -1, 1)));\n\n //regular servo code\n// if(gamepad1.x && !wristUp) //wrist up\n// {\n// wrist.setPosition(.9);\n// wristUp = true;\n// }\n// else if(gamepad1.x && wristUp) //wrist down\n// { wrist.setPosition(-.9);\n// wristUp = false;\n// }\n// else if(gamepad1.left_trigger > 0 && wrist.getPosition() <= .95)\n// {\n// wrist.setPosition(wrist.getPosition() + 0.005);\n// }\n// else if(gamepad1.right_trigger > 0 && wrist.getPosition() >= -.95)\n// {\n// wrist.setPosition(wrist.getPosition() - 0.005);\n// }\n\n if (lift.getCurrentPosition() >= 0 || lift.getCurrentPosition() <= 3200 || liftOverride){\n if (gamepad2.left_stick_y > 0.2)\n lift.setPower(-1);\n else if (gamepad2.left_stick_y < -0.2)\n lift.setPower(1);\n else\n lift.setPower(0);\n }\n if(gamepad2.right_bumper && gamepad2.y)\n {\n liftOverride = true;\n }\n else if(liftOverride == true)\n {\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n liftOverride = false;\n }\n telemetry.addData(\"bucket posiition\", bucket.getPosition());\n telemetry.update();\n\n if (gamepad2.a) //bucket dump\n {\n bucket.setPosition(0.75);\n } else if (gamepad2.b) //bucket down\n {\n bucket.setPosition(0);\n } else if (gamepad2.x) //endgame\n bucket.setPosition(0.4);\n if (gamepad2.dpad_up && bucket.getPosition() <= 0.9975)\n bucket.setPosition(bucket.getPosition() + .0025);\n else if (gamepad2.dpad_down && bucket.getPosition() >= -0.9975)\n bucket.setPosition(bucket.getPosition() - .0025);\n\n\n //Press to keep bucket up for endgame\n //NOTE: D-Pad will not work unless gamepad2 B is pressed to end the override\n// if(gamepad2.a && bucketOverride == false) {\n// bucket.setPower(-.4);\n// bucketOverride = true;\n// }\n// else if (gamepad2.a && bucketOverride == true)\n// {\n// bucket.setPower(0);\n// bucketOverride = false;\n// }\n\n if (gamepad1.right_bumper) {\n extension.setPower(1);\n } else if (gamepad1.left_bumper) {\n extension.setPower(-1);\n } else extension.setPower(0);\n\n telemetry.update();\n }",
"public void on() {\n // Sets the LED pin state to 1 (high)\n ledPin.high();\n }",
"public void setPort(int param){\r\n \r\n // setting primitive attribute tracker to true\r\n localPortTracker =\r\n param != java.lang.Integer.MIN_VALUE;\r\n \r\n this.localPort=param;\r\n \r\n\r\n }",
"public void setPort(int param){\r\n \r\n // setting primitive attribute tracker to true\r\n localPortTracker =\r\n param != java.lang.Integer.MIN_VALUE;\r\n \r\n this.localPort=param;\r\n \r\n\r\n }",
"@Override\n\tpublic void onArrivedWayPoint(int arg0) {\n\n\t}",
"@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\n\t\tif (oi.getRightTrig()) {\n\t\t\tshifter.set(Value.kForward);\n\t\t} else if (oi.getLeftTrig()) {\n\t\t\tshifter.set(Value.kReverse);\n\t\t}\n\t\tSystem.out.println(shifter.get());\n\t\t\t\n\t\tif(oi.getClimber()){\n\t\t\tclimber.set(1.0);\n\t\t\tSystem.out.println(\"climber running\");\n\t\t}else {\n\t\t\tclimber.set(0);\n\t\t\tSystem.out.println(\"climber not running\");\n\t\t}\n\t}",
"private void initSensor() {\n if ((status == PedoListener.RUNNING) || (status == PedoListener.STARTING)\n && status != PedoListener.PAUSED) {\n return;\n }\n\n Database db = Database.getInstance(getActivity());\n\n todayOffset = db.getSteps(Util.getToday());\n\n SharedPreferences prefs = getActivity().getSharedPreferences(\"pedometer\", Context.MODE_PRIVATE);\n\n goal = prefs.getInt(PedoListener.GOAL_PREF_INT, PedoListener.DEFAULT_GOAL);\n since_boot = db.getCurrentSteps();\n int pauseDifference = since_boot - prefs.getInt(\"pauseCount\", since_boot);\n\n Log.i(TAG, \"PedoListener initSensor todayOffset=\"+todayOffset+\" since_boot=\"+since_boot+\" pauseDifference=\"+pauseDifference);\n\n // register a sensor listener to live update the UI if a step is taken\n sensorManager = (SensorManager) getActivity().getSystemService(Context.SENSOR_SERVICE);\n sensor = sensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER);\n if (sensor == null) {\n new AlertDialog.Builder(getActivity()).setTitle(\"R.string.no_sensor\")\n .setMessage(\"R.string.no_sensor_explain\")\n .setOnDismissListener(new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(final DialogInterface dialogInterface) {\n getActivity().finish();\n }\n }).setNeutralButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(final DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n }\n }).create().show();\n } else {\n sensorManager.registerListener(this, sensor, SensorManager.SENSOR_DELAY_UI, 0);\n }\n\n since_boot -= pauseDifference; \n\n total_start = db.getTotalWithoutToday();\n total_days = db.getDays();\n\n Log.i(TAG, \"PedoListener initSensor since_boot=\"+since_boot+ \" total_start=\"+total_start+\" total_days=\"+total_days);\n\t\n \tstatus = PedoListener.STARTING;\n\t\n\t db.setConfig(\"status_service\", \"start\");\n \n db.close();\n\n updateUI();\n }",
"public void teleopPeriodic() \n {\n // NIVision.Rect rect = new NIVision.Rect(10, 10, 100, 100);\n /*\n NIVision.IMAQdxGrab(session, frame, 1);\n //NIVision.imaqDrawShapeOnImage(frame, frame, rect,\n // DrawMode.DRAW_VALUE, ShapeMode.SHAPE_OVAL, 0.0f);\n */\n \n //cam.getImage(frame);\n //camServer.setImage(frame);\n \n //CameraServer.getInstance().setImage(frame);\n \n if(verticalLift.limitSwitchHit())\n verticalLift.resetEnc();\n \n Scheduler.getInstance().run();\n }",
"public void teleopPeriodic() {\n Scheduler.getInstance().run();\n// if (oi.driveStick.getRawButton(4)) {\n// System.out.println(\"Left Encoder Distance: \" + RobotMap.leftDriveEncoder.getDistance());\n// System.out.println(\"RightEncoder Distance: \" + RobotMap.rightDriveEncoder.getDistance());\n// }\n\n }",
"public MhZ19Pwm(String pin) throws IOException {\n PeripheralManagerService pioService = new PeripheralManagerService();\n mGpio = pioService.openGpio(pin);\n\n try {\n mGpio.setDirection(Gpio.DIRECTION_IN);\n mGpio.setEdgeTriggerType(Gpio.EDGE_BOTH);\n\n } catch (IOException|RuntimeException e) {\n try {\n close();\n } catch (IOException|RuntimeException ignored) {\n }\n throw e;\n }\n\n mThread = new PulseMesThread();\n mThread.start();\n Log.i(TAG,\"Start port read thread\");\n }",
"@Override\n public void robotPeriodic() {\n\n boolean c = mGPM.haveCargo();\n \n // Need signal due to distance for assurance that cargo is obtained/\n if (c) {\n CargoLight.set(Value.kOn);\n } else{\n CargoLight.set(Value.kOff);\n }\n }",
"public void turnLightsOff()\n {\n set(Relay.Value.kOff);\n }",
"@Override\n\tpublic void teleopPeriodic() {\n\t}",
"public void incrementShieldOnFor(int minutes, IServerCallback callback) {\n try {\n JSONObject data = new JSONObject();\n data.put(Parameter.minutes.name(), minutes);\n\n ServerCall sc = new ServerCall(ServiceName.matchMaking, ServiceOperation.INCREMENT_SHIELD_ON_FOR, data, callback);\n _client.sendRequest(sc);\n } catch (JSONException ignored) {\n }\n }",
"int getInPort();",
"int getInPort();",
"protected abstract void off(ACATimer handle_);",
"@Override\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\tint value = (int) event.values[0];\n\t\tif(0 == value) {\n\t\t\tnearFlag = true;\n\t\t} else if (1 <= value) {\n\t\t\tfarFlag = true;\n\t\t\tvalue = 1;\n\t\t} else {\n\t\t\t// Something is wrong\n\t\t}\n\t\ttip.setText(\"距离值 : \" + event.values[0]);\n\t\tif(nearFlag && farFlag && !pass) {\n\t\t\tpass = true;\n\t\t\t((AutoMMI)getApplication()).recordResult(PSensorTest.TAG, \"\", \"1\");\n\t\t}\n\t}",
"@Override\n public void loop() {\n telemetry.addData(\"Status\", \"Running\"); //inform the driver\n\n //Calculate the power to set to each motor\n\n //left side you subtract right_stick_x\n double FrontLeftVal = (gamepad1.left_stick_y - gamepad1.left_stick_x - gamepad1.right_stick_x) * Power; //front subtract left_stick_x\n double BackLeftVal = (gamepad1.left_stick_y + gamepad1.left_stick_x - gamepad1.right_stick_x) * Power; //back subtract left_stick_x\n\n //right side you add right_stick_x\n double FrontRightVal = (gamepad1.left_stick_y + gamepad1.left_stick_x + gamepad1.right_stick_x) * Power; //front add left_stick_x\n double BackRightVal = (gamepad1.left_stick_y - gamepad1.left_stick_x + gamepad1.right_stick_x) * Power; //back subtract left_stick_x\n\n FLM.setPower(FrontLeftVal); //set the power to the motor\n FRM.setPower(FrontRightVal);\n BLM.setPower(BackLeftVal);\n BRM.setPower(BackRightVal);\n\n if (gamepad1.y) {\n if (!YPressed1) {\n YPressed1 = true;\n if (DragArm.getPosition() < DragArmDownPosition) {\n DragArm.setPosition(DragArmDownPosition);\n } else {\n DragArm.setPosition(DragArmRestPosition);\n }\n }\n } else if (YPressed1) YPressed1 = false;\n\n if (gamepad2.a) {\n SetLiftPosition(Position1Inches);\n } else if (gamepad2.b) {\n SetLiftPosition(Position2Inches);\n } else if (gamepad2.y) {\n SetLiftPosition(Position3Inches);\n } else if (gamepad2.left_bumper) {\n if (UpLift.getCurrentPosition() >= Position1Inches * UpInchesToTicks) {\n SetLiftPosition(UpLift.getCurrentPosition() - 756);\n } else {\n SetLiftPosition(Position0Inches);\n }\n } else {\n UpLift.setPower(0);\n }\n\n if (gamepad2.left_trigger == 1) {\n if (!LeftTrigger2) {\n LeftTrigger2= true;\n if (LiftGrab.getPosition() != LiftGrabGrabPosition)\n LiftGrab.setPosition(LiftGrabGrabPosition);\n else LiftGrab.setPosition(LiftGrabRestPosition);\n }\n } else if (LeftTrigger2) LeftTrigger2= false;\n\n if (gamepad2.right_trigger == 1) {\n if (!RightTrigger2) {\n RightTrigger2 = true;\n if (UpLift.getCurrentPosition() > Position2Inches) {\n if (LiftSwivel.getPosition() != LiftSwivelRestPosition)\n LiftSwivel.setPosition(LiftSwivelRestPosition);\n else LiftSwivel.setPosition(LiftSwivelOutPosition);\n }\n }\n } else if (RightTrigger2) RightTrigger2 = false;\n\n if (gamepad1.b) {\n if (!BPressed1) {\n BPressed1 = true;\n if (BigSuck.getPower() == BigSuckPower) {\n SmallSuck.setPower(0);\n BigSuck.setPower(0);\n\n DragArm.setPosition(DragArmRestPosition);\n } else {\n BigSuck.setPower(BigSuckPower);\n SmallSuck.setPower(SmallSuckPower);\n DragArm.setPosition(DragArmUpPosition);\n }\n }\n } else if (BPressed1) BPressed1 = false;\n\n if (gamepad1.x) {\n if (!XPressed1) {\n XPressed1 = true;\n if (BigSuck.getPower() == -BigSuckPower) {\n BigSuck.setPower(0);\n SmallSuck.setPower(0);\n } else {\n BigSuck.setPower(-BigSuckPower);\n SmallSuck.setPower(-SmallSuckPower);\n }\n }\n } else if (XPressed1) XPressed1 = false;\n\n if (gamepad1.a) {\n if (!A1) {\n A1 = true;\n if (Push.getPosition() == PushRestPosition) {\n Push.setPosition(PushPushPosition);\n } else {\n Push.setPosition(PushRestPosition);\n }\n }\n } else if (A1) A1 = false;\n\n telemetry.addData(\"Up Position\", UpLift.getCurrentPosition());\n telemetry.update(); //update the telemetry\n }",
"@Override\r\n\tpublic void visit(SimplePin pin) {\n\t\tboolean pinMod;\r\n\t\tif (isForward()) {\r\n\t\t\tpinMod = pin.propagateValuesForward();\r\n\t\t} else {\r\n\t\t\tpinMod = pin.propagateValuesBackward();\r\n\t\t}\r\n\t\tmodified |= pinMod;\r\n\t}",
"public abstract int pulse();",
"@Override\n public void onSensorChanged(SensorEvent event) {\n if (Minutes*60+Seconds==time){\n switch(event.sensor.getType()) {\n case Sensor.TYPE_STEP_DETECTOR:\n values[0]++;\n break;\n case Sensor.TYPE_ACCELEROMETER:\n values[1]+=(Math.sqrt(\n event.values[0]*event.values[0]+\n event.values[1]*event.values[1]+\n event.values[2]*event.values[2])\n );\n values[1]/=2;\n break;\n case Sensor.TYPE_GYROSCOPE:\n values[2]+=(Math.sqrt(\n event.values[0]*event.values[0]+\n event.values[1]*event.values[1]+\n event.values[2]*event.values[2])\n );\n values[2]/=2;\n break;\n }\n }\n else{\n if(values[0]==0||values[1]==0||values[2]==0){\n prediction.setText(\"00:00:00\");\n }\n else{\n predictionValue = Math.round(doInference(values));\n prediction.setText(\"00:\" + String.valueOf(predictionValue/60) + \":\" + String.valueOf(predictionValue%60));\n if(predictionValue>1.1*Double.parseDouble(target.getText().toString())){ //too slow\n pace.setBackgroundColor(Color.GREEN);\n pace.setText(\"SPEED UP!\");\n }\n else if(predictionValue<0.9*Double.parseDouble(target.getText().toString())){ //too fast\n pace.setBackgroundColor(Color.RED);\n pace.setText(\"SLOW DOWN!\");\n }\n else{\n pace.setBackgroundColor(Color.YELLOW);\n pace.setText(\"GOOD JOB!\");\n }\n }\n switch(event.sensor.getType()) {\n case Sensor.TYPE_STEP_DETECTOR:\n values[0]=1;\n values[1]=0;\n values[2]=0;\n break;\n case Sensor.TYPE_ACCELEROMETER:\n values[0]=0;\n values[1]=(Math.sqrt(\n event.values[0]*event.values[0]+\n event.values[1]*event.values[1]+\n event.values[2]*event.values[2])\n );\n values[2]=0;\n break;\n case Sensor.TYPE_GYROSCOPE:\n values[0]=0;\n values[1]=0;\n values[2]=(Math.sqrt(\n event.values[0]*event.values[0]+\n event.values[1]*event.values[1]+\n event.values[2]*event.values[2])\n );\n break;\n }\n time = Minutes*60+Seconds;\n }\n\n }",
"private SpeedSliderListener()\n {\n }",
"void watchListenerData(int port, ListenerWatcher watcher) {\n }",
"public GPIOPortOutputConfigService(String gpioPortName){\n super();\n this.gpioPortName = gpioPortName;\n this.direction = RaspberyPiPortsConstants.GPIO_DIRECTION_OUT_INITIALLY_LOW;\n\n this.listner = null;\n mHandler = new Handler();\n }",
"@Override\n\tpublic void testPeriodic() {\n\t\tif (testJoystick.getRawButton(3)) {\n\t\t\tsparkMotor1.set(1.0);\n\t\t\tsparkMotor0.set(1.0);\n\t\t\ttestTalon.set(1.0);\n\t\t\t\n\t\t\ttalonMotor10.set(ControlMode.PercentOutput, 1.0);\n\t\t\ttalonMotor11.set(ControlMode.PercentOutput, 1.0);\n\t\t\ttalonMotor12.set(ControlMode.PercentOutput, 1.0);\n\t\t\ttalonMotor13.set(ControlMode.PercentOutput, 1.0);\n\t\t\ttalonMotor14.set(ControlMode.PercentOutput, 1.0);\n\t\t\ttalonMotor15.set(ControlMode.PercentOutput, 1.0);\n\t\t}\n\t\telse if (testJoystick.getRawButton(2)) {\n\t\t\tsparkMotor0.set(-1.0);\n\t\t\tsparkMotor1.set(-1.0);\n\t\t\ttestTalon.set(-1.0);\n\t\t\t\n\t\t\ttalonMotor10.set(ControlMode.PercentOutput, -1.0);\n\t\t\ttalonMotor11.set(ControlMode.PercentOutput, -1.0);\n\t\t\ttalonMotor12.set(ControlMode.PercentOutput, -1.0);\n\t\t\ttalonMotor13.set(ControlMode.PercentOutput, -1.0);\n\t\t\ttalonMotor14.set(ControlMode.PercentOutput, -1.0);\n\t\t\ttalonMotor15.set(ControlMode.PercentOutput, -1.0);\n\t\t}\n\t\telse {\n//\t\t\tsparkMotor0.set(0);\n\t\t\tsparkMotor1.set(0);\n\t\t\ttestTalon.set(0);\n\t\t\t\n\t\t\ttalonMotor10.set(ControlMode.PercentOutput, 0);\n\t\t\ttalonMotor11.set(ControlMode.PercentOutput, 0);\n\t\t\ttalonMotor12.set(ControlMode.PercentOutput, 0);\n\t\t\ttalonMotor13.set(ControlMode.PercentOutput, 0);\n\t\t\ttalonMotor14.set(ControlMode.PercentOutput, 0);\n\t\t\ttalonMotor15.set(ControlMode.PercentOutput, 0);\n\t\t\t\n\t\t\ttestSel.set(Value.kForward);\n\t\t}\n\t\t\n\t\tif (testJoystick.getRawButton(7)) {\n\t\t\ttestSel.set(Value.kForward);\n\t\t\tSystem.out.println(compressor.getCompressorCurrent());\n\t\t}\n\t}",
"void addListener(RosZeroconfListener listener);",
"public void listen()\n\t{\n\t GpioInterrupt.addListener(new GpioInterruptListener() {\n\t @Override\n\t public void pinStateChange(GpioInterruptEvent event) {\n\t \tif (event.getState() == true)\n\t \t{\n\t \t\tString out = passwordLogic.BtnPushed(event.getPin());\n\t \t\tif(out.contains(\"--toggle led--\"))\n\t \t\t\tled.toggleLED();\n\t \t\tif(out.contains(\"--buzzer activated\"))\n\t \t\t\tbuzzer.ActivateBuzzer();\n\t \t\t\t\n\t \t}\n\t }\n\t });\n\t // Start Button \n\t setGpioPin(25);\n\t // Button 1\n\t setGpioPin(4);\n\t // Button 2\n\t setGpioPin(5);\n\t // Button 3\n\t setGpioPin(6);\n\t // Button 4\n\t setGpioPin(26);\n\t // Button 5\n\t setGpioPin(27);\t \n\t}",
"@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tisAutonomous = false;\n\t\tisTeleoperated = true;\n\t\tisEnabled = true;\n\t\tupdateLedState();\n\t\t//SmartDashboard.putNumber(\"Gyro\", Robot.drivebase.driveGyro.getAngle());\n\t\tSmartDashboard.putNumber(\"Climber Current Motor 1\", Robot.climber.climberTalon.getOutputCurrent());\n\t\tSmartDashboard.putNumber(\"Climber Current motor 2\", Robot.climber.climberTalon2.getOutputCurrent());\n\t\t//visionNetworkTable.getGearData();\n\t//\tvisionNetworkTable.showGearData();\n\t\tSmartDashboard.putNumber(\"GM ACTUAL POSITION\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\n\t\tif(Robot.debugging){\t\t\t\n\t\t\tSmartDashboard.putNumber(\"Shooter1RPM Setpoint\", shooter.shooter1.getSetpoint());\n\t \tSmartDashboard.putNumber(\"Intake Pivot Encoder Position\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\t\n\t\t\tSmartDashboard.putNumber(\"Gear Manipulator Setpoint\", gearManipulator.gearManipulatorPivot.getSetpoint());\n\t\t}\n\t\t//\tvisionNetworkTable.getGearData();\n\t\t//visionNetworkTable.getHighData();\n\t}",
"private void setInPort(int value) {\n \n inPort_ = value;\n }",
"private void setInPort(int value) {\n \n inPort_ = value;\n }",
"@Override\n public void onReset() {\n Log.i(TAG, \"PedoListener onReset\");\n /*\n if (this.status == PedoListener.RUNNING) {\n this.stop();\n }\n */\n }",
"public void setPin(int pin);",
"public void blink234() {\n printMessage(\"Entering method blink234\\n\");\r\n // Set pin 7 to be output.\r\n if (pin2Out == null) {\r\n pin2Out = new OutPin(2, DEBUGGING, PRINTTRACE);\r\n }\r\n \r\n if (pin3Out == null) {\r\n pin3Out = new OutPin(3, DEBUGGING, PRINTTRACE);\r\n }\r\n \r\n if (pin4Out == null) {\r\n pin4Out = new OutPin(4, DEBUGGING, PRINTTRACE);\r\n }\r\n \r\n pin2Out.setValue(true);\r\n delayMilliSec(5000);\r\n pin2Out.setValue(false);\r\n pin3Out.setValue(true);\r\n delayMilliSec(5000);\r\n pin3Out.setValue(false);\r\n pin4Out.setValue(true);\r\n delayMilliSec(5000);\r\n pin4Out.setValue(false);\r\n \r\n for (int j = 0; j < 120; j++) {\r\n pin2Out.setValue(true);\r\n pin3Out.setValue(true);\r\n pin4Out.setValue(true);\r\n delayMilliSec(250);\r\n pin2Out.setValue(false);\r\n pin3Out.setValue(false);\r\n pin4Out.setValue(false);\r\n delayMilliSec(250);\r\n }\r\n \r\n printMessage(\"End of method blink234\");\r\n }",
"protected abstract ACATimer receiveAt(Port p_, Object evt_, double time_);",
"public void teleopPeriodic() {\n \tteleop.teleopPeriodic();\n }",
"void simulationSpeedChange(int value);",
"@Override\n public void teleopPeriodic() {\n CommandScheduler.getInstance().run();\n OI.getInstance().getPilot().run();\n SmartDashboard.putNumber(\"gyro\", getRobotContainer().getTecbotSensors().getYaw());\n SmartDashboard.putBoolean(\"isSpeed\", getRobotContainer().getDriveTrain().getTransmissionMode() == DriveTrain.TransmissionMode.speed);\n SmartDashboard.putString(\"DT_MODE\", getRobotContainer().getDriveTrain().getCurrentDrivingMode().toString());\n SmartDashboard.putNumber(\"x_count\", getRobotContainer().getClimber().getxWhenPressedCount());\n\n }",
"@Override\r\n public void teleopPeriodic() {\n if (m_stick.getRawButton(12)){\r\n TestCompressor.setClosedLoopControl(true);\r\n System.out.println(\"??\");\r\n } \r\n if (m_stick.getRawButton(11)) {\r\n TestCompressor.setClosedLoopControl(false);\r\n }\r\n //// fireCannon(Solenoid_1, m_stick, 8);\r\n //// fireCannon(Solenoid_2, m_stick, 10);\r\n //// fireCannon(Solenoid_3, m_stick, 12);\r\n //// fireCannon(Solenoid_4, m_stick, 7);\r\n //// fireCannon(Solenoid_5, m_stick, 9);\r\n //// fireCannon(Solenoid_6, m_stick, 11);\r\n\r\n // Logic to control trigering is inside\r\n // DO: Move the logic out here, makes more sense. \r\n fireTrio(topSolonoids, m_stick, 5);\r\n fireTrio(bottomSolonoids, m_stick, 6);\r\n\r\n // Make robit go\r\n double[] movementList = adjustJoystickInput(-m_stick.getY(), m_stick.getX(), m_stick.getThrottle());\r\n m_myRobot.arcadeDrive(movementList[0], movementList[1]);\r\n //System.out.println(m_gyro.getAngle());\r\n }",
"public static void periodic() {\n a2 = limelightTable.getEntry(\"ty\").getDouble(0); //Sets a2, the y position of the target\n d = Math.round((h2-h1) / Math.tan(Math.toRadians(a1+a2))); //Calculates distance using a tangent\n\n if(m_gamepad.getStartButtonReleased()) { //Reset errorSum to 0 when start is released\n errorSum = 0;\n }\n\n shooting(); //Determine when we should be shooting\n reportStatistics(); //Report telemetry to the Driver Station\n }",
"public void searchLights() {\n\t\n\t\t// try to limit searching\n\t\tif(ports.contains(motors)) ports.remove(motors);\n\t\tif(state.get(State.values.serialport) != null) \n\t\t\tports.remove(state.get(State.values.serialport));\n\t\t\t\n\t\tUtil.debug(\"discovery for lights starting on ports: \" + ports.size(), this);\n\t\t\n\t\tfor (int i = ports.size() - 1; i >= 0; i--) {\n\t\t\tif (state.get(State.values.lightport)!=null) { break; } // stop if find it\n\t\t\t//if (connect(ports.get(i), BAUD_RATES[0])) {\t\n\t\t\tif (connect(ports.get(i), 57600)) {\n\t\t\t\tUtil.delay(TIMEOUT*2);\n\t\t\t\tif (serialPort != null) { close(); }\n\t\t\t}\n\t\t}\n\t}",
"public void onWrite(int value) {\n \t\t\tboolean newLatch = (value & 1) != 0;\n \t\t\tif (newLatch != joyLatch) {\n \t\t\t\tcurButton = 0;\n \t\t\t}\n \t\t\tjoyLatch = newLatch;\n \t\t}",
"@Override\n\t\t\tpublic void onReceivePoi(BDLocation arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void teleopPeriodic() {\n\t\t/* xbox processing */\n\t\tdouble leftYstick = xbox.getY(Hand.kLeft);\n\t\tboolean buttonA = xbox.getAButton();\n boolean buttonB = xbox.getBButton();\n boolean buttonX = xbox.getXButton();\n boolean buttonY = xbox.getYButton();\n\n\t\t/* Get Talon/Victor's current output percentage */\n\t\tdouble motorOutput = elevator.getMotorOutputPercent();\n\n\t\t/* Deadband gamepad */\n\t\tif (Math.abs(leftYstick) < 0.10) {\n\t\t\t/* Within 10% of zero */\n\t\t\tleftYstick = 0;\n }\n\n\t\t/* Prepare line to print */\n\t\t_sb.append(\"\\tout:\"); _sb.append((int) (motorOutput * 100)); _sb.append(\"%\"); // Percent\n\t\t_sb.append(\"\\tpos:\"); _sb.append(elevator.getSelectedSensorPosition(0)); _sb.append(\"u\"); // Native units\n\n\t\t/**\n\t\t * When button 1 is pressed, perform Position Closed Loop to selected position,\n\t\t * indicated by Joystick position x10, [-10, 10] rotations\n\t\t */\n\t\t//if (!_lastButton1 && buttonA) {\n if (buttonB) {\n\t\t\t/* Position Closed Loop */\n\t\t\t/* 10 Rotations * 4096 u/rev in either direction */\n\t\t\ttargetPositionRotations = 5000; // 2* 4096; //leftYstick * 10.0 * 4096;\n\t\t\televator.set(ControlMode.Position, targetPositionRotations);\n\t\t}\n if (buttonX) {\n\t\t\t/* Position Closed Loop */\n\t\t\t/* 10 Rotations * 4096 u/rev in either direction */\n\t\t\ttargetPositionRotations = 3000; //2* 4096; //leftYstick * 10.0 * 4096;\n\t\t\televator.set(ControlMode.Position, -targetPositionRotations);\n\t\t}\n\n\t\t/* When button 2 is held, just straight drive */\n\t\tif (buttonA) {\n /* Percent Output */\n\t\t elevator.set(ControlMode.PercentOutput, leftYstick);\n }\n \n if (buttonY) {\n elevator.setSelectedSensorPosition(0); // reset to zero\n elevator.getSensorCollection().setQuadraturePosition(0, 10);\n elevator.set(ControlMode.PercentOutput, 0);\n }\n// else{\n //}\n\n\t\t/* If Talon is in position closed-loop, print some more info */\n\t\tif (elevator.getControlMode() == ControlMode.Position) {\n /* Append more signals to print when in speed mode. */\n\t\t\t_sb.append(\"\\terr:\"); _sb.append(elevator.getClosedLoopError(0)); _sb.append(\"u\");\t// Native Units\n\t\t\t_sb.append(\"\\ttrg:\"); _sb.append(targetPositionRotations); _sb.append(\"u\");\t// Native Units\n\t\t}\n\n\t\t/**\n\t\t * Print every ten loops, printing too much too fast is generally bad\n\t\t * for performance.\n\t\t */\n\t\tif (++_loops >= 10) {\n\t\t\t_loops = 0;\n\t\t\tSystem.out.println(_sb.toString());\n\t\t}\n\n\t\t/* Reset built string for next loop */\n\t\t_sb.setLength(0);\n\t\t\n\t\t/* Save button state for on press detect */\n\t\t//_lastButton1 = buttonA;\n }",
"@Override\n public void onPourMilkRaised() {\n }",
"public void scanFrame() {\n\n //Scanner inaktiv, så scanTimeren kan blive angivet i millisekunder.\n if (scannerInactive) {\n scanTimer = millis();\n }\n\n //Scanner bliver sat til aktiv, når timeren har nået den værdi angivet i timeBetweenScan.\n if (!scannerInactive) {\n /*\n if (scanTimer % timeBetweenScan > timeBetweenScan-100 && millis() > 10000) {\n scanTimer = timeBetweenScan-99;\n scannerInactive = false;*/\n \n //Minx og maxX biver sat alt efter hvilken zone der skal scannes, baseret på et timeslot.\n minX = scanAreaW/4*time.getCurrentTimeSlotInt()+scanAreaX+1;\n maxX = scanAreaW/4*(time.getCurrentTimeSlotInt()+1)+scanAreaX-2;\n\n //Checker først om scanneren har ikke overskredet både X og Y-grænsen.\n //En pille blev\n if (y >= maxY && x >= maxX) {\n //Ingen piller blev i scanningsloopet.\n //Her resettes scannerens X og Y til standard, og vi sender en OSC-besked til enheden, at der ingen piller er.\n x = minX;\n y = minY;\n \n timeslotBools[time.getCurrentTimeSlotInt()] = true;\n\n //oscBesked\n msg = new OscMessage(\"/pill\");\n msg.add(false);\n oscP5.send(msg, unitAddress);\n\n } else { //Ingen af koordinaterne har ramt deres max.\n\n if (y >= maxY) {\n //Hvis Y-koordinaten har ramt kanten af boksen, resetter vi dens værdi, og begynde på næste række, X.\n x += 5;\n y = minY;\n } else {\n //Ingen af checks'ne var succesfulde, så det antages at ingen maks-grænse er noget, og den næste Y-koordinat kan læses.\n y += 5;\n }\n\n }\n \n //Pixels'ne indenfor scannings-regionen bliver tjekket imod pillerne i XML-filen.\n loadPixels();\n println(\"currentscan @frame: \" + x + \" \" + y + \" : currentcolor: \" + pixels[y*width+x]);\n for (int i = 0; i < xmlHandler.children.length-1; ++i) {\n xmlHandler.load(i+1);\n if(pixels[y*width+x] > xmlHandler.outputMinRange && pixels[y*width+x] < xmlHandler.outputMaxRange) {\n //Pille er blevet genkendet.\n //uielement.informationDialog(\"pille ramt: \" + pillTimeSlot(x));\n timeslotBools[time.getCurrentTimeSlotInt()] = false;\n x = minX;\n y = minY;\n //oscBesked\n msg = new OscMessage(\"/pill\");\n msg.add(true);\n oscP5.send(msg, unitAddress);\n }\n }\n\n //Tegner en boks om den pixel der bliver scannet.\n rectMode(RADIUS);\n noFill();\n stroke(scannerColor);\n rect(x, y, 10, 10);\n \n }\n\n }",
"private static native void triggerRepeatedHapticPulse(long pointer,\n long controllerHandle,\n int targetPad,\n int durationMicroSec,\n int offMicroSec,\n int repeat,\n int flags);",
"@Override\n public void run(boolean on, Telemetry telemetry) {\n if (on) {\n dcMotor.setTargetPosition(onLocation);\n dcMotor.setPower(maxSpeed);\n } else {\n dcMotor.setTargetPosition(offLocation);\n dcMotor.setPower(maxSpeed);\n }\n telemetry.addData(\"Target position\", dcMotor.getTargetPosition());\n telemetry.addData(\"Encoder\", dcMotor.getCurrentPosition());\n }",
"@Override\n public void teleopPeriodic() {\n Scheduler.getInstance().run();\n // ros_string = workingSerialCom.read();\n // yavuz = workingSerialCom.StringConverter(ros_string, 2);\n // Inverse.Inverse(yavuz);\n\n // JoystickDrive.execute();\n\n\n\n // ros_string = workingSerialCom.read();\n // alt_yurur = workingSerialCom.StringConverter(ros_string, 1);\n // robot_kol = workingSerialCom.StringConverter(ros_string, 2);\n Full.Full(yavuz);\n \n }",
"@Override\n\t\tpublic void onReceivePoi(BDLocation arg0) {\n\n\t\t}",
"public void Interrupt_on_Changes(int pins) throws IOException {\n int value = (int)mDevice.readRegByte( INTCON );\n value &= ~pins;\n mDevice.writeRegByte( INTCON, (byte)value );\n value = (int)mDevice.readRegByte( GPINTEN );\n value |= pins;\n mDevice.writeRegByte( GPINTEN, (byte)value );\n }",
"private static native void triggerHapticPulse(long pointer,\n long controllerHandle,\n int targetPad,\n int durationMicroSec);",
"private void updateLightSensorValues()\n {\n sendMessage((byte)Constants.LIGHTSENSVAL,(byte)Constants.REQ);\n try {\n Thread.sleep(4000);\n } catch(InterruptedException ex) {\n Thread.currentThread().interrupt();\n }\n sendMessage((byte)Constants.POTVAL, (byte)Constants.REQ);\n if(progPotToggleButton.isChecked())\n {\n int x =0;\n try {\n x = Integer.parseInt(progValueEditText.getText().toString());\n if(x>=0 && x<256)\n sendMessage((byte)Constants.PROGVAL,(byte)x);\n try {\n Thread.sleep(4000);\n } catch(InterruptedException ex) {\n Thread.currentThread().interrupt();\n }\n sendMessage((byte)Constants.USEPOT,(byte)Constants.NO);\n } catch (NumberFormatException e) {\n messageView.append(\"int för helvete\");\n }\n }else\n sendMessage((byte)Constants.USEPOT,(byte)Constants.YES);\n\n }"
] |
[
"0.5837286",
"0.5670546",
"0.5388289",
"0.5336166",
"0.53064746",
"0.5203822",
"0.51602024",
"0.514947",
"0.51153076",
"0.5110758",
"0.5074158",
"0.50644493",
"0.50640404",
"0.5036732",
"0.5019734",
"0.50188744",
"0.49866346",
"0.4980432",
"0.49641916",
"0.49573112",
"0.49533018",
"0.49491084",
"0.4948566",
"0.4939211",
"0.49219662",
"0.49141854",
"0.4907068",
"0.4887538",
"0.48737964",
"0.48630112",
"0.48544654",
"0.48480153",
"0.4847723",
"0.48470607",
"0.48432204",
"0.48365596",
"0.48336685",
"0.4819679",
"0.4815963",
"0.48041102",
"0.48039582",
"0.48039582",
"0.4799701",
"0.47959214",
"0.47941014",
"0.4791899",
"0.47888067",
"0.47868094",
"0.47847474",
"0.47813678",
"0.47813678",
"0.47738525",
"0.4772764",
"0.47616917",
"0.47402838",
"0.47383386",
"0.4737147",
"0.47088522",
"0.47062582",
"0.46943435",
"0.4683565",
"0.467784",
"0.467784",
"0.46737474",
"0.4668619",
"0.4664167",
"0.46554762",
"0.46399954",
"0.4636807",
"0.46299934",
"0.46299395",
"0.46266028",
"0.46224412",
"0.46165997",
"0.460889",
"0.46083283",
"0.46009788",
"0.46009788",
"0.46006736",
"0.45990437",
"0.4597603",
"0.45954457",
"0.4594622",
"0.45907518",
"0.45871985",
"0.4580961",
"0.45805088",
"0.45793474",
"0.45779368",
"0.4573903",
"0.45726734",
"0.45713565",
"0.45704788",
"0.45650357",
"0.4564503",
"0.45476243",
"0.45432872",
"0.45401827",
"0.45288435",
"0.45284775"
] |
0.59919757
|
0
|
Creates an object with the unique device ID \c uid. and adds it to the IP Connection \c ipcon.
|
public BrickletIO16(String uid, IPConnection ipcon) {
super(uid, ipcon);
apiVersion[0] = 2;
apiVersion[1] = 0;
apiVersion[2] = 0;
responseExpected[IPConnection.unsignedByte(FUNCTION_SET_PORT)] = RESPONSE_EXPECTED_FLAG_FALSE;
responseExpected[IPConnection.unsignedByte(FUNCTION_GET_PORT)] = RESPONSE_EXPECTED_FLAG_ALWAYS_TRUE;
responseExpected[IPConnection.unsignedByte(FUNCTION_SET_PORT_CONFIGURATION)] = RESPONSE_EXPECTED_FLAG_FALSE;
responseExpected[IPConnection.unsignedByte(FUNCTION_GET_PORT_CONFIGURATION)] = RESPONSE_EXPECTED_FLAG_ALWAYS_TRUE;
responseExpected[IPConnection.unsignedByte(FUNCTION_SET_DEBOUNCE_PERIOD)] = RESPONSE_EXPECTED_FLAG_TRUE;
responseExpected[IPConnection.unsignedByte(FUNCTION_GET_DEBOUNCE_PERIOD)] = RESPONSE_EXPECTED_FLAG_ALWAYS_TRUE;
responseExpected[IPConnection.unsignedByte(FUNCTION_SET_PORT_INTERRUPT)] = RESPONSE_EXPECTED_FLAG_TRUE;
responseExpected[IPConnection.unsignedByte(FUNCTION_GET_PORT_INTERRUPT)] = RESPONSE_EXPECTED_FLAG_ALWAYS_TRUE;
responseExpected[IPConnection.unsignedByte(FUNCTION_SET_PORT_MONOFLOP)] = RESPONSE_EXPECTED_FLAG_FALSE;
responseExpected[IPConnection.unsignedByte(FUNCTION_GET_PORT_MONOFLOP)] = RESPONSE_EXPECTED_FLAG_ALWAYS_TRUE;
responseExpected[IPConnection.unsignedByte(FUNCTION_SET_SELECTED_VALUES)] = RESPONSE_EXPECTED_FLAG_FALSE;
responseExpected[IPConnection.unsignedByte(FUNCTION_GET_IDENTITY)] = RESPONSE_EXPECTED_FLAG_ALWAYS_TRUE;
responseExpected[IPConnection.unsignedByte(CALLBACK_INTERRUPT)] = RESPONSE_EXPECTED_FLAG_ALWAYS_FALSE;
responseExpected[IPConnection.unsignedByte(CALLBACK_MONOFLOP_DONE)] = RESPONSE_EXPECTED_FLAG_ALWAYS_FALSE;
callbacks[CALLBACK_INTERRUPT] = new CallbackListener() {
public void callback(byte[] data) {
ByteBuffer bb = ByteBuffer.wrap(data, 8, data.length - 8);
bb.order(ByteOrder.LITTLE_ENDIAN);
char port = (char)(bb.get());
short interruptMask = IPConnection.unsignedByte(bb.get());
short valueMask = IPConnection.unsignedByte(bb.get());
for(InterruptListener listener: listenerInterrupt) {
listener.interrupt(port, interruptMask, valueMask);
}
}
};
callbacks[CALLBACK_MONOFLOP_DONE] = new CallbackListener() {
public void callback(byte[] data) {
ByteBuffer bb = ByteBuffer.wrap(data, 8, data.length - 8);
bb.order(ByteOrder.LITTLE_ENDIAN);
char port = (char)(bb.get());
short selectionMask = IPConnection.unsignedByte(bb.get());
short valueMask = IPConnection.unsignedByte(bb.get());
for(MonoflopDoneListener listener: listenerMonoflopDone) {
listener.monoflopDone(port, selectionMask, valueMask);
}
}
};
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void createSession(int uid);",
"public void setUid(Integer uid) {\n this.uid = uid;\n }",
"public void setUid(Integer uid) {\n this.uid = uid;\n }",
"public void setUid(Integer uid) {\n this.uid = uid;\n }",
"public void setUid(Integer uid) {\n this.uid = uid;\n }",
"public void setUid(Integer uid) {\n this.uid = uid;\n }",
"public void setUid(Integer uid) {\n this.uid = uid;\n }",
"public void setUid(Integer uid) {\n this.uid = uid;\n }",
"public void setUid(Integer uid) {\r\n this.uid = uid;\r\n }",
"public void setUid(Integer uid) {\r\n this.uid = uid;\r\n }",
"public void setUid(Integer uid) {\r\n this.uid = uid;\r\n }",
"public void setUid(Integer uid) {\r\n this.uid = uid;\r\n }",
"public void setUid(Integer uid) {\r\n this.uid = uid;\r\n }",
"public void setUid(Integer uid) {\r\n this.uid = uid;\r\n }",
"PeerUid(int uid) {\n this.uid = uid;\n }",
"public void setUid(String uid) {\n this.uid = uid;\n }",
"public void setUid(String uid) {\n this.uid = uid;\n }",
"public void setId(String uid){\n this.uid = uid;\n }",
"public User(String uid) {\n this.uid = uid;\n }",
"public void setUid(Long uid) {\r\n this.uid = uid;\r\n }",
"public void setUid(Long uid) {\n this.uid = uid;\n }",
"public void setUid(Long uid) {\n this.uid = uid;\n }",
"public void setUid(Long uid) {\n this.uid = uid;\n }",
"public static void requestNewAccount(String uid){\n accountManager.requestNewAccount(uid);\n }",
"@Override\n\tpublic void setUid(UID uid) {\n\t\t\n\t}",
"public UdpEndpoint( UdpKernel kernel, long id, SocketAddress address, DatagramSocket socket )\n {\n this.id = id;\n this.address = address;\n this.socket = socket;\n this.kernel = kernel;\n }",
"void addPC(PCDevice pc);",
"@Override\n public ID createItem(@NotNull String uid) {\n final long startNs = myStats != null ? System.nanoTime() : 0;\n final ID result = createItemImpl(uid);\n if (myStats != null) {\n myStats.incrementCounter(StatsCounters.itemsCreationDurationNs, System.nanoTime() - startNs);\n }\n return result;\n }",
"public void createClient() {\n client = new UdpClient(Util.semIp, Util.semPort, this);\n\n // Le paso true porque quiero que lo haga en un hilo nuevo\n client.connect(true);\n }",
"void addDevice(String userid,String username,String devicename,String deviceaddre,Long addtime,\n IDevicesListener iDevicesListener);",
"public void setUID(String UID) {\n this.UID = UID;\n }",
"public void createSocket() \n { \n try \n { \n socket = new DatagramSocket(); \n } \n catch (Exception ex) \n { \n System.out.println(\"UDPPinger Exception: \" + ex); \n } \n }",
"@Override\n\tpublic void create(UserServer obj) {\n\t\tcreateClient(obj);// INSERE USUARIO NA ENTIDADE CLIENT\n\t\ttry {\n\t\t\tfinal ResultSet result = stat.getGeneratedKeys();\n\t\t\twhile (result.next()) {\n\t\t\t\tobj.setId(result.getInt(\"idclient\"));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcreatePhone(obj);// INSERE PHONE INFORMADO PELO CLIENT CADASTRADO\n\t\tcreateEmail(obj);// INSERE EMAIL INFORMADO PELO CLIENT CADASTRADO\n\t\tencerrarConexao();\n\t}",
"public abstract void addDevice(Context context, NADevice device);",
"PCDevice getPC(UUID uID);",
"public void setUID(int value) {\n this.uid = value;\n }",
"@Override\n\tpublic void setUid(Integer uid) {\n\t\tthis.elemId = uid;\n\t}",
"public void setUid(int value) {\n this.uid = value;\n }",
"void agregarConexion(String id, String direccion, String ip) {\n this.s.agregarConexion(id, direccion, ip);\n }",
"On_Device_Resource createOn_Device_Resource();",
"@Override\n public void newASdu(ASdu ObjASDU) {\n\t\t\n \t // Inizializza nome thread\n \t Thread.currentThread().setName(\"Receiver\");\n \t\n \t// Variabili locali\n \tint IntIOA;\n \tboolean BolIOA;\n \tList<WireRecord> ObjWireRecords;\n \tInformationObject[] ObjInformationObjects;\t\n \tMap<String, TypedValue<?>> ObjWireValues;\n \tMap<String, TypedValue<?>> ObjCommonValues;\n \t\n\t // Esegue logging\n \tlogger.info(\"Received ASDU [tcp://\"+this.actualConfiguration.Host+\":\"+this.actualConfiguration.Port+\"]\");\n \t \t\n \t// Acquisisce puntatore agli information object\n \tObjInformationObjects = ObjASDU.getInformationObjects();\n \t\n \t// Se l'ASDU non contiene oggetti genera warning ed esce\n \tif ((ObjInformationObjects==null)||(ObjInformationObjects.length==0)) { \t\t\n \t notifyAlert(Event.WARNING_EVENT,\"Received ASDU cannot be decoded. Reason: empty\");\n return;\n \t}\n\t\t\n \t// Prepara le proprietÓ di testata dell'ASDU condivise da tutti gli information objects\n \tObjCommonValues = new HashMap<>();\t\n \t\n \tObjCommonValues.put(\"id\", TypedValues.newStringValue(this.actualConfiguration.DeviceId));\n \tObjCommonValues.put(\"host\", TypedValues.newStringValue(this.actualConfiguration.Host));\n \tObjCommonValues.put(\"port\", TypedValues.newIntegerValue(this.actualConfiguration.Port));\n \tObjCommonValues.put(\"eventId\", TypedValues.newIntegerValue(Event.DATA_EVENT.id));\n \tObjCommonValues.put(\"event\", TypedValues.newStringValue(Event.DATA_EVENT.description));\n\t\t\n \tObjCommonValues.put(\"type\", TypedValues.newStringValue(ObjASDU.getTypeIdentification().name()));\n \tObjCommonValues.put(\"test\", TypedValues.newStringValue(ObjASDU.isTestFrame()?(\"y\"):(\"n\")));\n \tObjCommonValues.put(\"cot\", TypedValues.newStringValue(ObjASDU.getCauseOfTransmission().name()));\n \tObjCommonValues.put(\"oa\", TypedValues.newIntegerValue(ObjASDU.getOriginatorAddress()));\n \tObjCommonValues.put(\"ca\", TypedValues.newIntegerValue(ObjASDU.getCommonAddress()));\n\t\t\n\t\t// Crea un wirerecord per ciascun oggetto\n\t\tObjWireRecords = new ArrayList<>();\n \t\n\t\t// Ciclo di scansione di tutti gli information object\n\t\tfor (InformationObject ObjInformationObject : ObjInformationObjects) {\n\n\t\t\t// Aggiorna lo IOA condiviso da tutti gli information element\n\t\t\tIntIOA = ObjInformationObject.getInformationObjectAddress();\n\t\t\t\n\t\t\t// Verifica se lo IOA Ŕ matchato da una regola di enrichment\n BolIOA = this.actualConfiguration.MatchingEnrichment.containsKey(IntIOA);\n \n // Se l'IOA non matcha ed Ŕ attivo il filtro sull'enrichment esegue, altrimenti procede \n if (!BolIOA&&this.actualConfiguration.Filtering) {\n \t \n \t// Esegue logging\n \tlogger.debug(\"Discarded ASDU [tcp://\"+this.actualConfiguration.Host+\":\"+this.actualConfiguration.Port+\"/IOA=\"+String.valueOf(IntIOA)+\"]\");\n \n } else {\n\t \t\n\t\t\t\t// Inizializza un nuovo wirerecord con le proprietÓ comuni\n\t\t\t\tObjWireValues = new HashMap<>();\n\t\t\t\tObjWireValues.putAll(ObjCommonValues);\n\t\t\t\t\n\t\t\t\tObjWireValues.put(\"ioa\", TypedValues.newIntegerValue(IntIOA));\n\t\t\t\t\n\t\t\t\t// Se l'IOA matcha con regola di enrichment aggiunge metriche, altrimenti aggiunge quelle di default\n\t\t\t\tif (BolIOA) {\n\t\t\t\t\tObjWireValues.putAll(this.actualConfiguration.MatchingEnrichment.get(IntIOA));\t\n\t\t\t\t} else if (this.actualConfiguration.DefaultEnrichment.size()>0) {\n\t\t\t\t\tObjWireValues.putAll(this.actualConfiguration.DefaultEnrichment);\n\t\t\t\t}\n\t\n\t\t\t\t// Ciclo di scansione di tutti gli information element\n\t\t\t\tfor (InformationElement[] ObjInformationElementSet : ObjInformationObject.getInformationElements()) {\n\t \n\t\t\t\t\t// Decodifica l'information element in base al tipo di ASDU e aggiunge record alla lista\n\t\t\t\t\ttry {\n\t\t\t\t\t Iec104Decoder.decode(ObjASDU.getTypeIdentification(), ObjInformationElementSet, ObjWireValues);\n\t\t\t\t\t ObjWireRecords.add(new WireRecord(ObjWireValues)); \n\t\t\t\t\t} \n\t\t\t\t\tcatch (Exception e) {\t\t\t\t\t\n\t\t\t\t\t\tnotifyAlert(Event.WARNING_EVENT,\"Received ASDU cannot be decoded. Reason: \"+e.getMessage());\n\t\t\t\t\t}\t\t\t\t\n\t }\t\n }\n\t\t}\n\t\t\n\t\t// Se ci sono record da trasmettere procede\n\t\tif (ObjWireRecords.size()>0) {\n\t\t this.wireSupport.emit(ObjWireRecords);\n\t\t}\n }",
"public void setUid(int value) {\n this.uid = value;\n }",
"public void setUid(int value) {\n this.uid = value;\n }",
"public void setUid(int value) {\n this.uid = value;\n }",
"public void setUid(int value) {\n this.uid = value;\n }",
"public void setUid(int value) {\n this.uid = value;\n }",
"public void setUid(int value) {\n this.uid = value;\n }",
"public void setUid(int value) {\n this.uid = value;\n }",
"public native static int MFCL_Connect(long hr,byte tagType,byte[]uid/* 4 bytes */,Long ht);",
"public RegisterIn_S(QuadRR rr) {\n\t\n\tsuper(rr);\n\t \n\t //System.out.println(\"select wid from quadroo where sid = \" + W);\n\t try {\n\t\t // connect with mongodb server, get uid pwd matched stat\n\t\t \n\t\t \n\t\t\t \n\t\t\t//\tMongo mongo = new Mongo(\"localhost\", 27017);\n\t\t\t//\tString epwd = CryptWithMD5.cryptWithMD5(pwd);\n\t\t\t\t\n\t\t\t\tDB db = mongo.getDB(\"users\");\n\t\t\t\tDBCollection collection = db.getCollection(\"users\");\n\t\t\t\tBasicDBObject query = new BasicDBObject();\n\t\t\t\t \n\t\t\t\tquery.put(\"name\", U);\n\t\t\t//\tquery.put(\"password\", epwd);\n\t\t\t\t \n\t\t\t\tSystem.out.println(\"user to insert\" + U)\t;\t\t\n\t\t\t\tDBCursor cursor = collection.find(query);\n\n\t\t\t\tif (cursor.hasNext()) {\n\t\t\t\t replystatus=\"already registered\"; rid = 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//insert new record\n\t\t\t\t\t \n\t\t\t\t\tString epwd = CryptWithMD5.cryptWithMD5(pwd);\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t collection = db.getCollection(\"users\");\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\tquery.put(\"name\", U);\n\t\t\t\t\tquery.put(\"password\", epwd);\n\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t\t\tcollection.insert(query);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\treplystatus=\"success\"; rid = 0; }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t}\n\t\t\t\t \n\t \n\t\t\t\t\n\t \t\t\n\t\t\t\n\t catch (Exception e) {\n\t e.printStackTrace();\n\t replystatus = \"exception error\"+ e.getMessage();\n\t rid= -1;\n\t \n\t \t\t}\n\t System.out.println(\"regis:\" + replystatus);\n\t \n}",
"public Upcall(ORBInstance orbInstance, UpcallReturn upcallReturn,\n org.apache.yoko.orb.OCI.ProfileInfo profileInfo,\n org.apache.yoko.orb.OCI.TransportInfo transportInfo, int requestId,\n String op, org.apache.yoko.orb.CORBA.InputStream in,\n org.omg.IOP.ServiceContext[] requestSCL) {\n orbInstance_ = orbInstance;\n upcallReturn_ = upcallReturn;\n profileInfo_ = profileInfo;\n transportInfo_ = transportInfo;\n reqId_ = requestId;\n op_ = op;\n in_ = in;\n requestSCL_ = requestSCL;\n servant_ = null;\n poa_ = null;\n postinvokeCalled_ = false;\n\n userEx_ = false; // Java only\n\n logger.fine(\"Creating upcall request for operation \" + op + \" and request id \" + requestId); \n in._OB_ORBInstance(orbInstance_);\n }",
"public @NonNull NetworkCapabilities setSingleUid(int uid) {\n final ArraySet<UidRange> identity = new ArraySet<>(1);\n identity.add(new UidRange(uid, uid));\n setUids(identity);\n return this;\n }",
"public MHLMobileIOClient(BandAccelerometerAppActivity a, String ip, int port, String id){\n this.parentActivity = a;\n this.sensorReadingQueue = new MHLBlockingSensorReadingQueue();\n this.ip = ip;\n this.port = port;\n this.userID = id;\n this.startClient();\n }",
"public void setUuid(String Uuid) {\n this.Uuid = Uuid;\n }",
"UADev createNewUADev(String id,String name,String title,String desc)\r\n\t{\r\n\t\tUADev ret = new UADev() ;\r\n\t\tret.id = id ;\r\n\t\treturn updateUADev(ret,name,title,desc);\r\n\t}",
"@Override\n public void onClick(View v) {\n\n String Id = FCMdatabase.push().getKey();\n residentUser user = new residentUser(Id.toString(), txtusername.getText().toString(), txtpassword.getText().toString(), \"\");\n FCMdatabase.child(Id).setValue(user);\n Toast.makeText(getContext(), \"user added successfully\", Toast.LENGTH_SHORT).show();\n }",
"public Packet(final long unique) {\r\n\t\ttype = EvidenceType.NONE;\r\n\t\tcommand = EvidenceBuilder.LOG_CREATE;\r\n\t\tid = unique;\r\n\t\tdata = null;\r\n\t}",
"Device createDevice();",
"@Override\n\tpublic void setUid(Integer uid) {\n\t\tthis.siacRBilElemTipoClassTipElemCode = uid;\n\t}",
"@Override\n\tpublic void setUid(Integer uid) {\n\t\tthis.ordAmmId = uid;\n\t}",
"public NCDGroupDB(ConnectionInf db)\n {\n theConnectionInf = db;\n dbObj = new NCDGroup();\n initConfig();\n }",
"public Device(Device source) {\n if (source.IP != null) {\n this.IP = new String(source.IP);\n }\n if (source.Mac != null) {\n this.Mac = new String(source.Mac);\n }\n if (source.TokenId != null) {\n this.TokenId = new String(source.TokenId);\n }\n if (source.DeviceId != null) {\n this.DeviceId = new String(source.DeviceId);\n }\n if (source.IMEI != null) {\n this.IMEI = new String(source.IMEI);\n }\n if (source.IDFA != null) {\n this.IDFA = new String(source.IDFA);\n }\n if (source.IDFV != null) {\n this.IDFV = new String(source.IDFV);\n }\n }",
"public void setUID(java.lang.String UID) {\r\n this.UID = UID;\r\n }",
"public void newConnection(NIOSocket nioSocket)\n {\n System.out.println(\"New user connected from \" + nioSocket.getIp() + \".\");\n m_users.add(new User(this, nioSocket));\n }",
"public Builder byUser(String uid) {\n this.uid = uid;\n return this;\n }",
"public Mono<String> createTapkeyUser(String userId) {\n \tUriBuilder uriBuilder = uriBuilderFactory.builder()\n \t\t\t.replacePath(\"api\")\n .pathSegment(\"v1\")\n .pathSegment(\"Owners\")\n .pathSegment(\"{ownerAccountId}\")\n .pathSegment(\"IdentityProviders\")\n .pathSegment(\"{ipId}\")\n .pathSegment(\"Users\");\n\n return webClient\n .put()\n .uri(uriBuilder.build(ownerAccountId, identityProviderId))\n .attributes(clientRegistrationId(\"tapkey\"))\n .contentType(MediaType.APPLICATION_JSON)\n .body(Mono.just(new IpUserDto(identityProviderId, userId)), IpUserDto.class)\n .retrieve()\n .bodyToMono(IpUserDto.class)\n .log()\n .map(IpUserDto::getId);\n }",
"public void registerObject(NetObject object);",
"public void setDeviceIP(String argIp){\n\t deviceIP=argIp;\n }",
"public Connection addConnection(String jabberID, String userid) {\n\t\t\tif (!keyToConn.containsKey(jabberID)) {\n\t\t\t\tConnection conn = new Connection();\n\t\t\t\tconn.user = userid;\n\t\t\t\tconn.xmpp = jabberID;\n\t\t\t\tkeyToConn.put(jabberID, conn);\n\t\t\t\treturn conn;\n\t\t\t} else {\n\t\t\t\treturn keyToConn.get(jabberID);\n\t\t\t}\n\t\t}",
"public int getUid() {\n return uid;\n }",
"public int getUid() {\n return uid;\n }",
"public int getUid() {\n return uid;\n }",
"public int getUid() {\n return uid;\n }",
"public int getUid() {\n return uid;\n }",
"public int getUid() {\n return uid;\n }",
"public int getUid() {\n return uid;\n }",
"@Path(\"adduc\")\n @GET\n @Produces(MediaType.TEXT_PLAIN)\n public String insertUserContact(@QueryParam(\"userid\") int uid, @QueryParam(\"city\") String ct, @QueryParam(\"phone\") int tel, @QueryParam(\"jsonpcallback\") String jsonpcallback) {\n // public String insertUserContact(@QueryParam(\"usercontact\") UserContact uc, @QueryParam(\"jsonpcallback\") String jsonpcallback) {\n String val = \"Error! Check Constraints\";\n UserContact uc = new UserContact();\n uc.setUserid(uid);\n uc.setCity(ct);\n uc.setPhone(tel);\n boolean status = ucs.insertUserContact(uc);\n if (status == true) {\n val = \"Added!!\";\n }\n return jsonpcallback + \"(\\\"\" + val + \"\\\")\";\n }",
"public void setCusUid(Integer cusUid) {\r\n this.cusUid = cusUid;\r\n }",
"public User(String name, int id, double x, double y, Card card){\r\n\t\tthis.name = name;\r\n\t\tthis.id = id;\r\n\t\tthis.position = new double[]{x,y};\r\n\t\tthis.card = card;\r\n\t\tthis.bicycle = null;\r\n\t\tthis.last_routine = null;\r\n\t}",
"public void createCon(){\n\t\ttry {\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\t\tcon=DriverManager.getConnection(\"jdbc:oracle:thin:@172.26.132.40:1521:ORCLILP\", \"a63d\", \"a63d\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\n\t}",
"public User(Socket socket) {\r\n\t\t\t//test for a null value and add to it if it's null\r\n\t\t\tthis.socket = socket;\r\n\t\t}",
"public Device(Hub h) {\n uuid = UUID.randomUUID();\n status = Status.NORMAL;\n hub = h;\n }",
"public void setUid(String uid) {\n\t\tthis.uid = uid == null ? null : uid.trim();\n\t}",
"public void start() {\n\t\trmiUtils.startRMI(IRMI_Defs.CLASS_SERVER_PORT_CLIENT);\n\n\t\ttry {\n\t\t\tview.setRemoteHost(rmiUtils.getLocalAddress()); //TODO Is this stored somewhere?\n\t\t\tuser = new User(\"default\", rmiUtils.getLocalAddress(), this);\n\t\t\tview.append(\"Create User \" + user.getName() + \"\\n\");\n\n\t\t\tregistry = rmiUtils.getLocalRegistry();\n\t\t\tIUser stub = (IUser) UnicastRemoteObject.exportObject(user, IUser.BOUND_PORT);\n\t\t\tview.append(\"Found registry: \" + registry + \"\\n\");\n\n\t\t\tregistry.rebind(IUser.BOUND_NAME, stub);\n\t\t\tview.append(\"IUser bound to \" + IUser.BOUND_NAME + \"\\n\");\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error getting local address: \" + e);\n\t\t}\n\t}",
"public UsertestRecord(Byte uid, String userinfomessage) {\n super(Usertest.USERTEST);\n\n set(0, uid);\n set(1, userinfomessage);\n }",
"public int uid() { return uid; }",
"public int getUID() {\n return uid;\n }",
"public User(String uid, String nom, String prenom, String email) {\n this.uid = uid;\n mNom = nom;\n mPrenom = prenom;\n mEmail = email;\n }",
"public abstract Incidencia2 registrarIncidencia(Incidencia2 obj);",
"private native void CreateJNIObj(String device);",
"public void addVMinterfPair(String intrfcLabel, String ipAddress) {\n\r\n this.intrfces.add(new VMinterface(intrfcLabel, ipAddress));\r\n }",
"public int getUid() {\n return uid;\n }",
"private void connectToServer() {\n\t\ttry {\n\n\t\t\tSystem.out.println(\"Attempting connection to server at port: 5555\");\n\t\t\tsocket = new Socket(\"localhost\", 5554);\n\t\t\tSystem.out.println(\"Connected to server at port: 5555\");\n\n\t\t\tobjectOutputStream = new ObjectOutputStream(socket.getOutputStream());\n\t\t\tobjectInputStream = new ObjectInputStream(socket.getInputStream());\n\t\t\t\n\t\t\t// sending client object to server\n\t\t\tobjectOutputStream.writeInt(Main.getUser().getUserId());\n\t\t\tobjectOutputStream.flush();\n\t\t} catch (UnknownHostException e) {\n\t\t\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t}",
"private void createPersonFromUser(String fullname){\n String useruid=\"\";\n String useremail=\"\";\n\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n if (user != null) {\n // Name, email address, and profile photo Url\n String username = user.getDisplayName();\n useremail = user.getEmail();\n Uri photoUrl = user.getPhotoUrl();\n\n // The user's ID, unique to the Firebase project. Do NOT use this value to\n // authenticate with your backend server, if you have one. Use\n // FirebaseUser.getToken() instead.\n useruid = user.getUid();\n }\n\n Person person =new Person();\n person.setName(fullname);\n person.setEmail(useremail);\n person.setUid(useruid);\n person.setTime_to_stop(\"0\");\n\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference myRef= database.getReference(\"Person\");\n myRef.child(useruid).setValue(person);\n\n }",
"protected ObjectModel createObjectModel(String uid, String xml) {\r\n throw new IllegalStateException(\"You must register the same object model on all sites.\");\r\n }",
"Device_Resource createDevice_Resource();",
"public void setUid(int value) {\n this.uid = value;\n }",
"@PrePersist\n public void assignUUID() {\n this.uid = UUID.randomUUID();\n }",
"public UserSetingRecord(UInteger id, UByte notify, UInteger userId) {\n super(UserSeting.USER_SETING);\n\n set(0, id);\n set(1, notify);\n set(2, userId);\n }",
"public void setCreateUid(Integer createUid) {\n this.createUid = createUid;\n }"
] |
[
"0.5518329",
"0.54913366",
"0.54913366",
"0.54913366",
"0.54913366",
"0.54913366",
"0.54913366",
"0.54913366",
"0.54887325",
"0.54887325",
"0.54887325",
"0.54887325",
"0.54887325",
"0.54887325",
"0.546662",
"0.53950447",
"0.53950447",
"0.5259626",
"0.5225037",
"0.5218293",
"0.52063715",
"0.52063715",
"0.52063715",
"0.51333463",
"0.5133118",
"0.51187277",
"0.5105305",
"0.5091014",
"0.5022687",
"0.49975443",
"0.4976025",
"0.49741346",
"0.49739957",
"0.49604374",
"0.4957011",
"0.49257717",
"0.4911451",
"0.49018323",
"0.48896122",
"0.48848864",
"0.4874184",
"0.48661843",
"0.48661843",
"0.48661843",
"0.48661843",
"0.48661843",
"0.48661843",
"0.48661843",
"0.48599035",
"0.4859662",
"0.48509562",
"0.48477912",
"0.4833153",
"0.48305246",
"0.4814856",
"0.48011097",
"0.48000368",
"0.47883892",
"0.47677356",
"0.47540125",
"0.47450972",
"0.47364312",
"0.47170252",
"0.47148865",
"0.4708967",
"0.46872827",
"0.46853587",
"0.46806636",
"0.46785343",
"0.46538782",
"0.46538782",
"0.46538782",
"0.46538782",
"0.46538782",
"0.46538782",
"0.46538782",
"0.46345973",
"0.4633925",
"0.4630982",
"0.46305853",
"0.46226454",
"0.46224377",
"0.4617287",
"0.46022573",
"0.4602107",
"0.46003532",
"0.45931536",
"0.45924035",
"0.45923805",
"0.4587707",
"0.45870325",
"0.45866096",
"0.45829162",
"0.4580775",
"0.4578311",
"0.45700502",
"0.45621207",
"0.45578706",
"0.45573235",
"0.45445165"
] |
0.5451801
|
15
|
Returns a bitmask of the values that are currently measured on the specified port. This function works if the pin is configured to input as well as if it is configured to output.
|
public short getPort(char port) throws TimeoutException, NotConnectedException {
byte options = 0;
boolean isResponseExpected = getResponseExpected(FUNCTION_GET_PORT);
if(isResponseExpected) {
options = 8;
}
ByteBuffer bb = ipcon.createRequestBuffer(uid, (byte)9, FUNCTION_GET_PORT, options, (byte)(0));
bb.put((byte)port);
byte[] response = sendRequestExpectResponse(bb.array(), FUNCTION_GET_PORT);
bb = ByteBuffer.wrap(response, 8, response.length - 8);
bb.order(ByteOrder.LITTLE_ENDIAN);
short valueMask = IPConnection.unsignedByte(bb.get());
return valueMask;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"int getInPort();",
"int getInPort();",
"public boolean hasPort() {\n return fieldSetFlags()[6];\n }",
"public Range getAudioPortsRange();",
"public BitSet getMask() {\r\n return mask;\r\n }",
"String getPortRange();",
"protected boolean[] getMask() {\n\t\treturn this.mask;\n\t}",
"boolean hasPort();",
"boolean hasPort();",
"public int digitalRead(int pin) { // (unsupported in HardAta.ino)\r\n int info = digitalInputData[(pin >> 3) & MDB_msk], aBit = (info >> (pin & 7)) & 1;\r\n if (SpeakEasy){\r\n System.out.println(\"F%%F/digiRead #\" + pin + \" = \" + aBit + \"/\" + info);\r\n }\r\n return aBit;\r\n }",
"boolean hasQueryPort();",
"public BitSet getBitSetMask() {\r\n return newMask;\r\n }",
"public boolean getPinValue() {\n boolean ret = false;\n for (Boolean val : sourceBlocks.values())\n ret = ret | val;\n \n return ret;\n }",
"public int bitsOfFilter() {\n return config().getM();\n }",
"public int getAnalysisBits();",
"public boolean hasPort() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public long getMask() {\r\n\t\treturn this.mask;\r\n\t}",
"public static int computeViewMaskFromConfig(OwXMLUtil configNode_p, String strNodeName_p, int iMaskBit_p)\r\n {\r\n // delegate to same method with default value 'false'\r\n return computeViewMaskFromConfig(configNode_p, strNodeName_p, iMaskBit_p, false);\r\n }",
"public int anySetBit()\n \t{\n \t\tint numbytes = getLengthInBytes();\n \t\tint bitpos;\n \n \t\tfor (int i = 0; i < numbytes-1; i++)\n \t\t{\n \t\t\tif (value[i] != 0)\n \t\t\t{\n \t\t\t\tfor (int j = 0; j < 8; j++)\n \t\t\t\t{\n \t\t\t\t\tbitpos = 7-j;\n \t\t\t\t\tif (((1 << bitpos) & value[i]) != 0)\n \t\t\t\t\t\treturn ((i*8)+j);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \n \t\t// only the top part of the last byte is relevant\n \t\tbyte mask = (byte)(0xFF << (8-bitsInLastByte));\n \t\tif ((value[numbytes-1] & mask) != 0)\n \t\t{\n \t\t\tfor (int j = 0; j < bitsInLastByte; j++)\n \t\t\t{\n \t\t\t\tbitpos = 7-j;\n \t\t\t\tif (((1 << bitpos) & value[numbytes-1]) != 0)\n \t\t\t\t\treturn ((numbytes-1)*8)+j;\n \t\t\t}\n \t\t}\n \n \t\treturn -1;\n \t}",
"public boolean hasPort() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"protected int getMaskValue(int i, int j, int band) {\r\n\t\treturn 1;\r\n\t}",
"public final ArrayList<Boolean> getItensityValues() {\r\n return this.passIntensityThreshold;\r\n }",
"public int getOutputPortOpenCount(int portNumber) { throw new RuntimeException(\"Stub!\"); }",
"public Range getVideoPortsRange();",
"@Override\n\tpublic boolean isInputPort() {\n\t\tif (getFlexoPort() != null) {\n\t\t\treturn getFlexoPort().isInPort();\n\t\t}\n\t\treturn false;\n\t}",
"Long getResultMaskBoundary();",
"public boolean isClockPort(EdifSingleBitPort port) {\n return XilinxTools.isClockPort(port);\n }",
"private final TupleSet portToBits(TupleFactory factory, String port, int bits) {\n\t\tfinal TupleSet s = factory.noneOf(2);\n\t\tfor (int i = 0, max = 32 - Integer.numberOfLeadingZeros(bits); i < max; i++) {\n\t\t\tif ((bits & (1 << i)) != 0)\n\t\t\t\ts.add(factory.tuple(port, Integer.valueOf(1 << i)));\n\t\t}\n\t\treturn s;\n\t}",
"public boolean containsPort(int port) {\r\n synchronized (lockRoutingTable) {\r\n boolean contains = false;\r\n for (HashMap.Entry<RoutingTableKey, RoutingTableInfo> entry : routingEntries.entrySet()) {\r\n\r\n if (entry.getValue().port == port) {\r\n contains = true;\r\n }\r\n }\r\n\r\n return contains;\r\n }\r\n }",
"public boolean hasPort() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"Set<OFPortConfig> retrievePortMods(DatapathId dpid, OFPort port) throws PortModException;",
"public boolean hasPort() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"int getIntegPort();",
"Set<Interface> getInterfacesByPort(ConnectPoint port);",
"private long getSleepMask()\n {\n return sleepMask;\n }",
"int getPort();",
"int getPort();",
"int getPort();",
"int getPort();",
"int getPort();",
"int getPort();",
"int getPort();",
"int getPort();",
"int getPort();",
"int getPort();",
"int getPort();",
"int getPort();",
"int getPort();",
"public Builder setQueryPort(int value) {\n bitField0_ |= 0x00000020;\n queryPort_ = value;\n onChanged();\n return this;\n }",
"public static int getBitMask(int[] x) {\n int rc = 0;\n for(int xVal : x) {\n rc |= getBitMask(xVal);\n }\n\n return rc;\n }",
"public boolean isInputPortOpen(int portNumber) { throw new RuntimeException(\"Stub!\"); }",
"public Boolean isDataEnabled() {\n return (mask / 4) > 0;\n }",
"public int getInPort() {\n return inPort_;\n }",
"public int getInPort() {\n return inPort_;\n }",
"public int getAudioPort();",
"public boolean hasQueryPort() {\n return ((bitField0_ & 0x00000020) == 0x00000020);\n }",
"public boolean hasQueryPort() {\n return ((bitField0_ & 0x00000020) == 0x00000020);\n }",
"public ConnectionMonitorSource withPort(Integer port) {\n this.port = port;\n return this;\n }",
"int getHealSnPort();",
"public native int cGPIOWrite(int pin, boolean value);",
"public long getSourceMask()\r\n { return srcmask; }",
"public DataStructure getPorts() {\r\n\t\treturn ports == null ? EmptyStructures.EMPTY_STRUCTURE : new ArrayList(ports.values());\r\n\t}",
"int getSnPort();",
"int getSnPort();",
"IntExpression implicitMask(Expression p) {\n\t\treturn p.join(mask).sum();\n\t}",
"public List<Mask> getMasks() {\n return Collections.unmodifiableList(masks);\n }",
"public Builder setInPort(int value) {\n copyOnWrite();\n instance.setInPort(value);\n return this;\n }",
"public Builder setInPort(int value) {\n copyOnWrite();\n instance.setInPort(value);\n return this;\n }",
"public int getTurnCode(){\n return mask;\n }",
"public int zwrocWolnyPort()\n {\n int port = 0;\n boolean czyWyjsc = false; \n while(entries.hasNext() && !czyWyjsc)\n {\n Map.Entry<Integer, Boolean> entry = entries.next();\n System.out.println(\"Klucz w kontenerze \" +entry.getKey());\n \n if(Boolean.valueOf(entry.getValue().toString()) == false)\n {\n port = Integer.parseInt(entry.getKey().toString());\n System.out.println(\"Port wyslany to:\" + port);\n entry.setValue(true);\n czyWyjsc = true;\n break;\n }\n \n }\n return port;\n }",
"int[][]\n getVerticalMask();",
"public byte getIOPortByte(int portAddress)\n {\n byte returnValue = 0; // Data returned from requested port\n\n // Ensure the correct ports are used for colour/monochrome mode\n if ((portAddress >= 0x3B0) && (portAddress <= 0x3BF) && (videocard.miscOutputRegister.ioAddressSelect != 0))\n {\n // Adapter is in colour mode, but addressing monochrome mode ports, so return default value\n return (byte) (0xFF);\n }\n if ((portAddress >= 0x3D0) && (portAddress <= 0x3DF) && (videocard.miscOutputRegister.ioAddressSelect == 0))\n {\n // Adapter is in monochrome mode, but addressing colour mode ports, so return default value\n return (byte) (0xFF);\n }\n\n switch (portAddress)\n {\n case 0x3BA: // Input Status 1 (monochrome)\n case 0x3CA: // Feature Control\n // TODO: According to specs, all bits of the FC are reserved, just return???\n case 0x3DA: // Input Status 1 (colour)\n \n long microSeconds;\n short vertResolution;\n \n // Reset flip-flop to address mode when reading these ports\n videocard.attributeController.dataAddressFlipFlop = false;\n\n \n // Reset displayDisabled, only done here\n videocard.displayDisabled = 0;\n\n // Determine the current internal 'time', in microseconds.\n // This can be inferred from total instructions executed divided by the instructions executed per second (approx.) \n// microSeconds = (long) (( ((double)cpu.getCurrentInstructionNumber()/cpu.getIPS())) * 1000000);\n\n // Determine vertical display size from verticalSyncPol and horizontalSyncPol\n // This is needed to calculate the vertical retrace period\n switch ((videocard.miscOutputRegister.verticalSyncPol << 1) | videocard.miscOutputRegister.horizontalSyncPol)\n {\n case 0:\n vertResolution = 200;\n break;\n case 1:\n vertResolution = 400;\n break;\n case 2:\n vertResolution = 350;\n break;\n default:\n vertResolution = 480;\n break;\n }\n \n // Check if a horizontal (colour) or vertical (mono) retrace is in progress; if so, also set displayDisabled\n // Similar to Bochs, use a 72 Hz vertical frequency. This means a retrace happens\n// if ((microSeconds % 13888) < 70)\n// {\n// videocard.vertRetrace = 1;\n// videocard.displayDisabled = 1;\n// }\n// else\n {\n videocard.vertRetrace = 0;\n }\n// if ((microSeconds % (13888 / vertResolution)) == 0)\n// {\n// videocard.horizRetrace = 1;\n// videocard.displayDisabled = 1;\n// }\n// else\n {\n videocard.horizRetrace = 0;\n }\n\n return (byte) (videocard.vertRetrace << 3 | videocard.displayDisabled);\n\n case 0x3C0: // Attribute Controller Attribute Address Register (only read when the flipflop is in address mode)\n // Check flipflop state\n if (!videocard.attributeController.dataAddressFlipFlop)\n {\n return (byte) ((videocard.attributeController.paletteAddressSource << 5) | videocard.attributeController.index);\n }\n else\n {\n logger.log(Level.SEVERE, \"[\" + MODULE_TYPE + \"]\" + \" Port [0x3C0] read, but flipflop not set to address mode\");\n return 0;\n }\n\n case 0x3C1: // Attribute Controller Data Read Register, uses index to determine register to read\n switch (videocard.attributeController.index)\n {\n // Palette registers\n case 0x00:\n case 0x01:\n case 0x02:\n case 0x03:\n case 0x04:\n case 0x05:\n case 0x06:\n case 0x07:\n case 0x08:\n case 0x09:\n case 0x0A:\n case 0x0B:\n case 0x0C:\n case 0x0D:\n case 0x0E:\n case 0x0F:\n returnValue = videocard.attributeController.paletteRegister[videocard.attributeController.index];\n return (returnValue);\n\n case 0x10: // Mode control register\n return ((byte) ((videocard.attributeController.modeControlReg.graphicsEnable << 0) | \n (videocard.attributeController.modeControlReg.monoColourEmu << 1) | \n (videocard.attributeController.modeControlReg.lineGraphicsEnable << 2) | \n (videocard.attributeController.modeControlReg.blinkIntensity << 3) |\n (videocard.attributeController.modeControlReg.pixelPanningMode << 5) | \n (videocard.attributeController.modeControlReg.colour8Bit << 6) | \n (videocard.attributeController.modeControlReg.paletteBitsSelect << 7)));\n\n case 0x11: // Overscan colour\n return (videocard.attributeController.overscanColour);\n\n case 0x12: // Colour plane enable\n return (videocard.attributeController.colourPlaneEnable);\n\n case 0x13: // Horizontal pixel panning\n return (videocard.attributeController.horizPixelPanning);\n\n case 0x14: // Colour select\n return (videocard.attributeController.colourSelect);\n\n default:\n logger.log(Level.SEVERE, \"[\" + MODULE_TYPE + \"]\" + \" Port [0x3C1] reads unknown register 0x\" + Integer.toHexString(videocard.attributeController.index).toUpperCase());\n return 0;\n }\n\n case 0x3C2: // Input Status 0\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" Port [0x3C1] reads Input Status #0; ignored\");\n return 0;\n\n case 0x3C3: // VGA Enable Register\n return (videocard.vgaEnabled) ? (byte) 1 : 0;\n\n case 0x3C4: // Sequencer Index\n return (videocard.sequencer.index);\n\n case 0x3C5: // Sequencer Registers 0-4, based on index\n switch (videocard.sequencer.index)\n {\n case 0: // Asynch and synch reset\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" Port [0x3C5] reads sequencer reset\");\n return (byte) (videocard.sequencer.aSynchReset | (videocard.sequencer.synchReset << 1));\n\n case 1: // Clocking mode\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" Port [0x3C5] reads sequencer clocking mode\");\n return (videocard.sequencer.clockingMode);\n\n case 2: // Map mask register\n return (videocard.sequencer.mapMask);\n\n case 3: // Character map select register\n return (videocard.sequencer.characterMapSelect);\n\n case 4: // Memory mode register */\n return ((byte) ((videocard.sequencer.extendedMemory << 1) | \n (videocard.sequencer.oddEvenDisable << 2) | \n (videocard.sequencer.chainFourEnable << 3)));\n\n default:\n logger.log(Level.SEVERE, \"[\" + MODULE_TYPE + \"]\" + \" Port [0x3C5] reads unknown register 0x\" + Integer.toHexString(videocard.sequencer.index).toUpperCase());\n return 0;\n }\n\n case 0x3C6: // Pixel mask register\n return (videocard.colourRegister.pixelMask);\n\n case 0x3C7: // DAC state register\n return (videocard.colourRegister.dacState);\n\n case 0x3C8: // DAC write index\n return (videocard.colourRegister.dacWriteAddress);\n\n case 0x3C9: // DAC Data Register; read colour values in sets of three. Automatically increment counter and address\n // Ensure DAC read state is enabled\n if (videocard.colourRegister.dacState == 0x03)\n {\n switch (videocard.colourRegister.dacReadCounter)\n {\n // Cast dacReadAddress to integer as it will be used as index\n case 0:\n returnValue = videocard.pixels[((int) videocard.colourRegister.dacReadAddress) & 0xFF].red;\n break;\n case 1:\n returnValue = videocard.pixels[((int) videocard.colourRegister.dacReadAddress) & 0xFF].green;\n break;\n case 2:\n returnValue = videocard.pixels[((int) videocard.colourRegister.dacReadAddress) & 0xFF].blue;\n break;\n default:\n // Shouldn't get to here...\n returnValue = 0;\n }\n // Automatically increment counter\n videocard.colourRegister.dacReadCounter++;\n \n // Set of 3 read; reset counter and increment address\n if (videocard.colourRegister.dacReadCounter >= 3)\n {\n videocard.colourRegister.dacReadCounter = 0;\n videocard.colourRegister.dacReadAddress++;\n }\n }\n else\n { // DAC read state not enabled, return ones\n returnValue = 0x3F;\n }\n return (returnValue);\n\n case 0x3CC: // Miscellaneous Output\n return ((byte) (((videocard.miscOutputRegister.ioAddressSelect & 0x01) << 0) | \n ((videocard.miscOutputRegister.ramEnable & 0x01) << 1) | \n ((videocard.miscOutputRegister.clockSelect & 0x03) << 2) | \n ((videocard.miscOutputRegister.lowHighPage & 0x01) << 5) | \n ((videocard.miscOutputRegister.horizontalSyncPol & 0x01) << 6) | \n ((videocard.miscOutputRegister.verticalSyncPol & 0x01) << 7)));\n\n case 0x3CD: // GDC segment select ???\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" Port [0x3CD] read; unknown register, returned 0x00\");\n return 0x00;\n\n case 0x3CE: // Graphics Controller index\n return (byte) (videocard.graphicsController.index);\n\n case 0x3CF: // Graphics Controller Registers 0-8, based on index\n switch (videocard.graphicsController.index)\n {\n case 0: // Set/Reset\n return (videocard.graphicsController.setReset);\n\n case 1: // Enable Set/Reset\n return (videocard.graphicsController.enableSetReset);\n\n case 2: // Colour Compare\n return (videocard.graphicsController.colourCompare);\n\n case 3: // Data Rotate\n return ((byte) (((videocard.graphicsController.dataOperation & 0x03) << 3) |\n ((videocard.graphicsController.dataRotate & 0x07) << 0)));\n\n case 4: // Read Map Select\n return (videocard.graphicsController.readMapSelect);\n\n case 5: // Graphics Mode\n returnValue = (byte) (((videocard.graphicsController.shift256Reg & 0x03) << 5) |\n ((videocard.graphicsController.hostOddEvenEnable & 0x01) << 4) |\n ((videocard.graphicsController.readMode & 0x01) << 3) |\n ((videocard.graphicsController.writeMode & 0x03) << 0));\n\n if (videocard.graphicsController.hostOddEvenEnable != 0 || videocard.graphicsController.shift256Reg != 0)\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" io read 0x3cf: reg 05 = \" + returnValue);\n return (returnValue);\n\n case 6: // Miscellaneous Graphics\n return ((byte) (((videocard.graphicsController.memoryMapSelect & 0x03) << 2) |\n ((videocard.graphicsController.hostOddEvenEnable & 0x01) << 1) |\n ((videocard.graphicsController.alphaNumDisable & 0x01) << 0)));\n \n case 7: // Colour Don't Care\n return (videocard.graphicsController.colourDontCare);\n\n case 8: // Bit Mask\n return (videocard.graphicsController.bitMask);\n\n default:\n logger.log(Level.SEVERE, \"[\" + MODULE_TYPE + \"]\" + \" Port [0x3CF] reads unknown register 0x\" + Integer.toHexString(videocard.graphicsController.index).toUpperCase());\n return (0);\n }\n\n case 0x3D4: // CRTC Index Register\n return (videocard.crtControllerRegister.index);\n\n case 0x3B5: // CRTC Registers (monochrome emulation modes)\n case 0x3D5: // CRTC Registers (colour emulation modes)\n if (videocard.crtControllerRegister.index > 0x18)\n {\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" Port [0x\" + Integer.toHexString(portAddress).toUpperCase() +\"] reads unknown register 0x\" + Integer.toHexString(videocard.crtControllerRegister.index).toUpperCase());\n return (0);\n }\n return videocard.crtControllerRegister.regArray[videocard.crtControllerRegister.index];\n\n case 0x3B4: // CRTC Index Register (monochrome emulation modes)\n // TODO: return crt index register here, same as 0x3D4???\n case 0x3CB: // GDC segment select register 2 ???\n default:\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" Port [0x\" + Integer.toHexString(portAddress).toUpperCase() +\"] read; unknown register, returned 0x00\");\n return 0;\n }\n\n }",
"public Set<Pt> getPorts() {\n return ports;\n }",
"boolean hasUpdateMask();",
"boolean hasUpdateMask();",
"boolean hasUpdateMask();",
"boolean hasUpdateMask();",
"public int rangeBitwiseAnd(int m, int n) {\n\t \tint ans = 0;\n\t for (int i = 0; i < 32; ++ i) {\n \t\tif (1 == ((m >> i) & 1)) {\n \t\t\tif (((m & ~0 << (i + 1)) | (~0 >>> (31 - i))) >= n) {\n \t\t\t\tans |= 1 << i;\n \t\t\t}\n \t\t}\n\t }\n\t System.out.println(ans);\n\t return ans;\n\t }",
"long getFlags();",
"private static int aidl2api_AudioChannelLayoutBitMask_AudioFormatChannelMask(\n int aidlBitMask, boolean isInput) {\n int apiMask = 0;\n for (int bit = 1 << 31; bit != 0; bit >>>= 1) {\n if ((aidlBitMask & bit) == bit) {\n int apiBit = aidl2api_AudioChannelLayoutBit_AudioFormatChannel(bit, isInput);\n if (apiBit != AudioFormat.CHANNEL_INVALID) {\n apiMask |= apiBit;\n aidlBitMask &= ~bit;\n if (aidlBitMask == 0) {\n return apiMask;\n }\n } else {\n break;\n }\n }\n }\n return AudioFormat.CHANNEL_INVALID;\n }",
"private void setInPort(int value) {\n \n inPort_ = value;\n }",
"private void setInPort(int value) {\n \n inPort_ = value;\n }",
"public static int collectDefaults()\n/* */ {\n/* 131 */ int flags = 0;\n/* 132 */ for (Feature f : values()) {\n/* 133 */ if (f.enabledByDefault()) flags |= f.getMask();\n/* */ }\n/* 135 */ return flags;\n/* */ }",
"public boolean isSetIControlPort() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ICONTROLPORT_ISSET_ID);\n }",
"public boolean getHasPort() {\n return this.hasPort;\n }",
"Integer getPortRangeStart();",
"public Range getTextPortsRange();",
"public long getBitboard() {\r\n return bitboard;\r\n }",
"public boolean getBit(Point2D.Double p) {\n// System.out.println(\"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\");\n// System.out.println(\"Getting Point x=\"+p.x+ \", y=\"+p.y);\n// System.out.println(\"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\");\n return get((int) ((int)x * ((int)p.y - 1) + (int)p.y));\n \n }",
"BitSet valueLeafFlags();",
"BitSet valueLeafFlags();",
"public Point[] getPorts() {\r\n return new Point[] { new Point((int) ports[0].getCenterX(), (int) ports[0].getCenterY()),\r\n new Point((int) ports[1].getCenterX(), (int) ports[1].getCenterY()),\r\n new Point((int) ports[2].getCenterX(), (int) ports[2].getCenterY()),\r\n new Point((int) ports[3].getCenterX(), (int) ports[3].getCenterY()) };\r\n }",
"public static int getBitMask(int x) {\n return (0x01 << x);\n }",
"public Set<PortDTO> getRootProcessGroupInputPorts(){\n Set<PortDTO> ports = new HashSet<>();\n String rootProcessGroupId = this.getRootProcessGroup().getId();\n Optional<ProcessGroupDTO> root = restClient.getNiFiRestClient().processGroups().findById(rootProcessGroupId,false,true);\n if(root.isPresent() && root.get().getContents() != null){\n Set<PortDTO> set = root.get().getContents().getInputPorts();\n if(set != null) {\n ports.addAll(set);\n }\n }\n return ports;\n }",
"com.google.protobuf.ByteString\n getPortBytes();",
"public int analogRead(int pin) { // (unsupported in HardAta.ino)\r\n int info = analogInputData[pin & MDB_msk];\r\n if (SpeakEasy){\r\n System.out.println(\"F%%F/analoRead #\" + pin + \" = \" + info);\r\n }\r\n return info;\r\n }",
"com.google.protobuf.FieldMask getUpdateMask();",
"com.google.protobuf.FieldMask getUpdateMask();",
"com.google.protobuf.FieldMask getUpdateMask();",
"com.google.protobuf.FieldMask getUpdateMask();"
] |
[
"0.52929246",
"0.52929246",
"0.4886912",
"0.48040777",
"0.47801617",
"0.4740683",
"0.4641266",
"0.46153998",
"0.46153998",
"0.45719498",
"0.45530543",
"0.4550364",
"0.4520429",
"0.4515343",
"0.44570878",
"0.44544896",
"0.44408843",
"0.4440368",
"0.44386747",
"0.44349265",
"0.44321215",
"0.44147936",
"0.4413474",
"0.44070008",
"0.4404063",
"0.43780974",
"0.43701333",
"0.4347236",
"0.43446654",
"0.43414012",
"0.433916",
"0.433405",
"0.42991382",
"0.42955416",
"0.42942432",
"0.42895544",
"0.42895544",
"0.42895544",
"0.42895544",
"0.42895544",
"0.42895544",
"0.42895544",
"0.42895544",
"0.42895544",
"0.42895544",
"0.42895544",
"0.42895544",
"0.42895544",
"0.42839548",
"0.4269755",
"0.42692894",
"0.42624825",
"0.42615923",
"0.42615923",
"0.4253962",
"0.42493132",
"0.42454758",
"0.42281017",
"0.42240947",
"0.4223357",
"0.4211085",
"0.4208196",
"0.42081317",
"0.42081317",
"0.4204679",
"0.41809145",
"0.41754147",
"0.41754147",
"0.41730636",
"0.4173",
"0.4157998",
"0.4133492",
"0.4131558",
"0.41311225",
"0.41311225",
"0.41311225",
"0.41311225",
"0.41218948",
"0.4120463",
"0.41193983",
"0.41174224",
"0.41174224",
"0.4117208",
"0.41161537",
"0.41106784",
"0.41094774",
"0.41005787",
"0.410028",
"0.40974757",
"0.40894613",
"0.40894613",
"0.40885162",
"0.40820715",
"0.40784627",
"0.40733445",
"0.4070072",
"0.4061296",
"0.4061296",
"0.4061296",
"0.4061296"
] |
0.4918802
|
2
|
Configures the value and direction of a specified port. Possible directions are "i" and "o" for input and output. If the direction is configured as output, the value is either high or low (set as true or false). If the direction is configured as input, the value is either pullup or default (set as true or false). For example: ("a", 0xFF, 'i', true) will set all pins of port a as input pullup. ("a", 128, 'i', false) will set pin 7 of port a as input default (floating if nothing is connected). ("b", 3, 'o', false) will set pins 0 and 1 of port b as output low. ("b", 4, 'o', true) will set pin 2 of port b as output high.
|
public void setPortConfiguration(char port, short selectionMask, char direction, boolean value) throws TimeoutException, NotConnectedException {
byte options = 0;
boolean isResponseExpected = getResponseExpected(FUNCTION_SET_PORT_CONFIGURATION);
if(isResponseExpected) {
options = 8;
}
ByteBuffer bb = ipcon.createRequestBuffer(uid, (byte)12, FUNCTION_SET_PORT_CONFIGURATION, options, (byte)(0));
bb.put((byte)port);
bb.put((byte)selectionMask);
bb.put((byte)direction);
bb.put((byte)(value ? 1 : 0));
if(isResponseExpected) {
byte[] response = sendRequestExpectResponse(bb.array(), FUNCTION_SET_PORT_CONFIGURATION);
bb = ByteBuffer.wrap(response, 8, response.length - 8);
bb.order(ByteOrder.LITTLE_ENDIAN);
} else {
sendRequestNoResponse(bb.array());
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void ConfigurePort() {\n\n final String TAG = \"Configure Port Output\";\n try {\n gpioPort = super.service.openGpio(this.gpioPortName);\n // Step 2. Configure as an output.\n gpioPort.setDirection(this.direction);\n\n mHandler.post(mCallBackRunnable);\n } catch (IOException e) {\n Log.e(TAG, \"Error on PeripheralIO API\", e);\n }\n }",
"protected void configurePorts() {\n \t\tremoveInputs();\n \t\tremoveOutputs();\n \n \t\t// FIXME: Replace with your input and output port definitions\n \n \t\t// Hard coded input port, expecting a single String\n \t\t//File name for the Input tables\n \t\taddInput(IN_FIRST_INPUT_TABLE, 0, true, null, String.class);\n \t\taddInput(IN_FORMAT_INPUT_TABLE, 0, true, null, String.class);\n \t\taddInput(IN_FORMAT_OUTPUT_TABLE, 0, true, null, String.class);\n \t\taddInput(IN_FILTER, 0, true, null, String.class);\n \t\t\n \t\t\n \t\tif(configBean.getTypeOfInput().compareTo(\"File\")==0){\n \t\t\taddInput(IN_OUTPUT_TABLE_NAME, 0, true, null, String.class);\n \t\t}\n \t\t\n \n \t\t// Optional ports depending on configuration\n \t\t//if (configBean.getExampleString().equals(\"specialCase\")) {\n \t\t//\t// depth 1, ie. list of binary byte[] arrays\n \t\t//\taddInput(IN_EXTRA_DATA, 1, true, null, byte[].class);\n \t\t//\taddOutput(OUT_REPORT, 0);\n \t\t//}\n \t\t\n \t\t// Single value output port (depth 0)\n \t\taddOutput(OUT_SIMPLE_OUTPUT, 0);\n \t\t// Single value output port (depth 0)\n \t\taddOutput(OUT_REPORT, 0);\n \n \t}",
"protected void configurePorts() {\n\t\tremoveInputs();\n\t\tremoveOutputs();\n\n\t\t// FIXME: Replace with your input and output port definitions\n\n\t\t// Hard coded input port, expecting a single String\n\t\t//File name for the Input tables\n\t\taddInput(FIRST_INPUT, 0, true, null, String.class);\n\n\t\t\t\t\n\t\t// Single value output port (depth 0)\n\t\taddOutput(OUT_STD_OUTPUT, 0);\n\t\t// Single value output port (depth 0)\n\t\taddOutput(OUT_ERROR, 0);\n\t\taddOutput(VO_TABLE, 0);\n\n\t}",
"private void setInPort(int value) {\n \n inPort_ = value;\n }",
"private void setInPort(int value) {\n \n inPort_ = value;\n }",
"public void setDirection(int value) {\n this.direction = value;\n }",
"public void initPin(PIN_DIRECTION direction, ARTIK_PINS pin) throws IOException {\n System.out.println(\"init pin:\" + pin);\n assertPinNotExported(pin);\n echoToPath(BASE_PIN_EXPORT_PATH, getPinNumber(pin));\n changePinDirection(pin, direction);\n //setting direction by writing to /sys/class/gpio/PIN_NUMBER/direction {in,out}\n\n }",
"public void setDirection(int value) {\n this.direction = value;\n }",
"public abstract void setDirection(int dir);",
"public Builder setDirection(int value) {\n bitField0_ |= 0x00000020;\n direction_ = value;\n onChanged();\n return this;\n }",
"public GPIOPortOutputConfigService(String gpioPortName){\n super();\n this.gpioPortName = gpioPortName;\n this.direction = RaspberyPiPortsConstants.GPIO_DIRECTION_OUT_INITIALLY_LOW;\n\n this.listner = null;\n mHandler = new Handler();\n }",
"@Override\r\n public void setPort2(int portValue) {\r\n checkServoCommandThread();\r\n ServoCommand cmd=new ServoCommand();\r\n cmd.bytes=new byte[2];\r\n cmd.bytes[0]=CMD_SET_PORT2;\r\n cmd.bytes[1]=(byte)(0xff&portValue);\r\n submitCommand(cmd);\r\n }",
"public Builder setDestinationPort(int value) {\n \n destinationPort_ = value;\n onChanged();\n return this;\n }",
"public native int cGPIOWrite(int pin, boolean value);",
"public void SetOutputPins(int pins ) throws IOException {\n byte value = mDevice.readRegByte( IODIR );\n mDevice.writeRegByte( IODIR, (byte)(value & (~pins)));\n }",
"public void setDirection(double direction) {\n\t\tif (direction <= MAX_DIRECTION && direction >= MIN_DIRECTION) {\n\t\t\tthis.direction = direction;\n\t\t} else if (direction > MAX_DIRECTION) { \n\t\t\t//this.direction = MIN_DIRECTION + (MAX_DIRECTION - direction);\n\t\t\tthis.direction %= MIN_DIRECTION ;\n\t\t\tif (Double.isNaN(this.direction)) {\n\t\t\t\tthis.direction = MIN_DIRECTION;\n\t\t\t}\n\t\t} else if (direction < MIN_DIRECTION) {\n\t\t\t//this.direction = MAX_DIRECTION - (MIN_DIRECTION + direction);\n\t\t\tthis.direction %= MAX_DIRECTION;\n\t\t\tif (Double.isNaN(this.direction)) {\n\t\t\t\tthis.direction = MAX_DIRECTION;\n\t\t\t}\n\t\t} //else if (direction)\n\t\t\n\t}",
"public Builder setInPort(int value) {\n copyOnWrite();\n instance.setInPort(value);\n return this;\n }",
"public Builder setInPort(int value) {\n copyOnWrite();\n instance.setInPort(value);\n return this;\n }",
"public void SetInputPins(int pins) throws IOException {\n byte value = mDevice.readRegByte( IODIR );\n mDevice.writeRegByte( IODIR, (byte)(value | pins));\n }",
"public void setGPIO(String name, Boolean value) {\n\n Gpio_Set_Request request = Gpio_Set_Request.newBuilder().setName(name).setRequestedState(value).build();\n\n Gpio_Set_Reply response;\n \n try {\n \tresponse = blockingStub.gpioSet(request);\n } catch (StatusRuntimeException e) {\n logger.log(Level.WARNING, \"RPC failed \" + e.getStatus().getDescription() + \" \" + e.getMessage());\n\n // Get the description\n JsonParser parser = new JsonParser();\n JsonObject jsonDescription = parser.parse(e.getStatus().getDescription()).getAsJsonObject();\n \n //Convert to int and string\n int errorCode = jsonDescription.get(\"errorCode\").getAsInt();\n String errorMessage = jsonDescription.get(\"errorMessage\").getAsString();\n \n System.out.println(Integer.toString(errorCode) + \" : \" + errorMessage);\n return;\n }\n }",
"public void setPortMode(String mode){\r\n\t\tthis.portMode=mode;\r\n\t\tif(!portMode.equals(\"floating\")){\r\n\t\t\tthis.currentPort=(new Integer(portMode)).intValue();\r\n\t\t}\r\n\t}",
"private void setDirection() {\r\n\t\tif (destinationFloor > initialFloor){\r\n\t\t\tdirection = 1;\r\n\t\t} else {\r\n\t\t\tdirection = -1;\r\n\t\t}\r\n\t}",
"public Builder setPort(int value) {\n bitField0_ |= 0x00000002;\n port_ = value;\n onChanged();\n return this;\n }",
"public void setDirectionOfTravel(typekey.DirectionOfTravelPEL value);",
"public abstract void setInput(boolean value);",
"public void getUserInput(int direction) { this.direction = direction; }",
"private void setPort(int value) {\n \n port_ = value;\n }",
"private void setPort(int value) {\n \n port_ = value;\n }",
"public void setDirection(byte value) \n\t{\n\t\tdirection = value;\n\t}",
"public void setPort(int param){\r\n \r\n // setting primitive attribute tracker to true\r\n localPortTracker =\r\n param != java.lang.Integer.MIN_VALUE;\r\n \r\n this.localPort=param;\r\n \r\n\r\n }",
"public void setPort(int param){\r\n \r\n // setting primitive attribute tracker to true\r\n localPortTracker =\r\n param != java.lang.Integer.MIN_VALUE;\r\n \r\n this.localPort=param;\r\n \r\n\r\n }",
"public Builder setPort(int value) {\n bitField0_ |= 0x00000004;\n port_ = value;\n onChanged();\n return this;\n }",
"void setDirections(Directions dir){\n this.dir = dir;\n }",
"public Builder setPort(int value) {\n\n port_ = value;\n onChanged();\n return this;\n }",
"public Builder setPort(int value) {\n\n port_ = value;\n onChanged();\n return this;\n }",
"public void setDirection(int dir) {\n if((dir % 10) == 0 && dir <=350 && dir >=0) {\n this.directionDegree = dir; \n } else {\n throw new IllegalArgumentException(\"Direction \" + dir +\" is not valid. Directions must be between 0/350 in multiples of 10\"); \n }\n }",
"public void setDirectionMove(double direction);",
"public void setPort(int value) {\n this.port = value;\n }",
"@Test\r\n\tpublic void testSetDirection()\r\n\t{\r\n\t\tIDirectionController directionController = new RadianDirectionControlAdapter(new RadianDirectionControl());\r\n\t\tdirectionController.setCurrentDirection(90.0);\r\n\t\tassertEquals(90.0, directionController.getCurrentDirection(), 0.0);\r\n\t\tdirectionController.setCurrentDirection(390.0);\r\n\t\tassertEquals(30.0, directionController.getCurrentDirection(), 0.0);\r\n\t\tdirectionController.setCurrentDirection(-90.0);\r\n\t\tassertEquals(270.0, directionController.getCurrentDirection(), 0.0);\r\n\t}",
"public void setDirection(float directionDegree);",
"public void set(ControlMode controlMode, double value)\n {\n switch (controlMode)\n {\n case Throttle:\n super.set(value);\n// System.out.printf(\"Port: %d value %f\\n\", port, value);\n break;\n case Position:\n super.getPIDController().setReference(value, ControlType.kPosition);\n break;\n case Velocity:\n super.getPIDController().setReference(value, ControlType.kVelocity);\n break;\n }\n }",
"abstract void setDirection(double x, double y, double z);",
"public void digitalWrite(int pin, byte value) { // pack this bit into..\r\n int portNumber = (pin >> 3) & 0x0F; // ..8-bit port & send to Ardu\r\n int digiData = digitalOutputData[portNumber & MDB_msk];\r\n if (SpeakEasy){\r\n System.out.println(\"F%%F/digiWrite #\" + pin + \" = \" + value);\r\n }\r\n if ((int) value == 0){\r\n digiData = digiData & ~(1 << (pin & 7));\r\n } else {\r\n digiData = digiData | (1 << (pin & 7));\r\n }\r\n digitalOutputData[portNumber & MDB_msk] = digiData;\r\n Send3bytes(DIGITAL_MESSAGE | portNumber, digiData, -1);\r\n }",
"public void changerDirection(int d)\n {\n directionInput = d;\n }",
"public Builder setPort(int value) {\n \n port_ = value;\n onChanged();\n return this;\n }",
"public Builder setPort(int value) {\n \n port_ = value;\n onChanged();\n return this;\n }",
"public void setDirection(int dir)\r\n\t{\r\n\t\tdirection = dir;\r\n\t}",
"public void setDirPort(Integer dirPort) {\n Integer oDirPort = getDirPort();\n this.dirPort = dirPort;\n firePropertyChange(PROPNAME_DIRPORT, oDirPort, this.dirPort);\n }",
"void changeDirection();",
"public void setDirection() {\n frontLeft.setDirection(DcMotorSimple.Direction.REVERSE);\n backLeft.setDirection(DcMotorSimple.Direction.REVERSE);\n frontRight.setDirection(DcMotorSimple.Direction.FORWARD);\n backRight.setDirection(DcMotorSimple.Direction.FORWARD);\n }",
"InputPort createInputPort();",
"@Generated\n @Selector(\"setDirection:\")\n public native void setDirection(@ByValue CGVector value);",
"@Override\n public void setDirection(Direction direction) {\n\n }",
"private static void setPort(Integer portNumber){\r\n RS232.portNumber=portNumber;\r\n }",
"public static void setDirection(String direction) {\n if (direction.equals(\"up\")) {\n pacManDirection = up;\n } else if (direction.equals(\"down\")) {\n pacManDirection = down;\n } else if (direction.equals(\"left\")) {\n pacManDirection = left;\n } else {\n pacManDirection = right;\n }\n }",
"public void setOutput(int mode) {\n\t\tswitch(mode) {\n\t\tcase UP:\n\t\t\tup = true;\n\t\t\tdown = false;\n\t\t\tleft = false;\n\t\t\tright = false;\n\t\t\tbreak;\n\t\tcase DOWN:\n\t\t\tup = false;\n\t\t\tdown = true;\n\t\t\tleft = false;\n\t\t\tright = false;\n\t\t\tbreak;\n\t\tcase LEFT:\n\t\t\tup = false;\n\t\t\tdown = false;\n\t\t\tleft = true;\n\t\t\tright = false;\n\t\t\tbreak;\n\t\tcase RIGHT:\n\t\t\tup = false;\n\t\t\tdown = false;\n\t\t\tleft = false;\n\t\t\tright = true;\n\t\t\tbreak;\n\t\t}\n\t}",
"public Builder setPort(int value) {\n copyOnWrite();\n instance.setPort(value);\n return this;\n }",
"public Builder setPort(int value) {\n copyOnWrite();\n instance.setPort(value);\n return this;\n }",
"public void setIOPortByte(int portAddress, byte data)\n {\n// \tSystem.out.println(\"setIOPortByte : \"+ portAddress +\" : \"+ data);\n// \tSystem.out.printf(\"setIOPortByte : %x : %x\\n\", portAddress, data);\n boolean needUpdate = false; // Determine if a screen refresh is needed \n\n // Check if correct ports are addressed while in monochrome / colour mode; if not, ignore OUT\n if ((videocard.miscOutputRegister.ioAddressSelect != 0) && (portAddress >= 0x3B0) && (portAddress <= 0x03BF))\n return;\n if ((videocard.miscOutputRegister.ioAddressSelect == 0) && (portAddress >= 0x03D0) && (portAddress <= 0x03DF))\n return;\n\n switch (portAddress)\n {\n case 0x3BA: // Ext. reg: Feature Control Register (Monochrome)\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" I/O write port 0x3BA (Feature Control Register, monochrome): reserved\");\n break;\n\n case 0x3C0: // Attribute controller: Address register\n // Determine whether in address/data mode\n if (videocard.attributeController.dataAddressFlipFlop)\n {\n // Data mode\n switch (videocard.attributeController.index)\n {\n case 0x00: // Internal Palette Index\n case 0x01:\n case 0x02:\n case 0x03:\n case 0x04:\n case 0x05:\n case 0x06:\n case 0x07:\n case 0x08:\n case 0x09:\n case 0x0A:\n case 0x0B:\n case 0x0C:\n case 0x0D:\n case 0x0E:\n case 0x0F:\n if (data != videocard.attributeController.paletteRegister[videocard.attributeController.index])\n {\n videocard.attributeController.paletteRegister[videocard.attributeController.index] = data;\n needUpdate = true;\n }\n break;\n \n case 0x10: // Mode control register\n // Store previous values for check\n byte oldLineGraphics = videocard.attributeController.modeControlReg.lineGraphicsEnable;\n byte oldPaletteBitsSelect = videocard.attributeController.modeControlReg.paletteBitsSelect;\n \n videocard.attributeController.modeControlReg.graphicsEnable = (byte) ((data >> 0) & 0x01);\n videocard.attributeController.modeControlReg.monoColourEmu = (byte) ((data >> 1) & 0x01);\n videocard.attributeController.modeControlReg.lineGraphicsEnable = (byte) ((data >> 2) & 0x01);\n videocard.attributeController.modeControlReg.blinkIntensity = (byte) ((data >> 3) & 0x01);\n videocard.attributeController.modeControlReg.pixelPanningMode = (byte) ((data >> 5) & 0x01);\n videocard.attributeController.modeControlReg.colour8Bit = (byte) ((data >> 6) & 0x01);\n videocard.attributeController.modeControlReg.paletteBitsSelect = (byte) ((data >> 7) & 0x01);\n \n // Check if updates are necessary\n if (videocard.attributeController.modeControlReg.lineGraphicsEnable != oldLineGraphics)\n {\n screen.updateCodePage(0x20000 + videocard.sequencer.charMapAddress);\n videocard.vgaMemReqUpdate = true;\n }\n if (videocard.attributeController.modeControlReg.paletteBitsSelect != oldPaletteBitsSelect)\n {\n needUpdate = true;\n }\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3C0: Mode control: \" + data);\n break;\n \n case 0x11: // Overscan Colour Register\n videocard.attributeController.overscanColour = (byte) (data & 0x3f);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3C0: Overscan colour = \" + data);\n break;\n \n case 0x12: // Colour Plane Enable Register\n videocard.attributeController.colourPlaneEnable = (byte) (data & 0x0f);\n needUpdate = true;\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3C0: Colour plane enable = \" + data);\n break;\n \n case 0x13: // Horizontal Pixel Panning Register\n videocard.attributeController.horizPixelPanning = (byte) (data & 0x0f);\n needUpdate = true;\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3C0: Horiz. pixel panning = \" + data);\n break;\n \n case 0x14: // Colour Select Register\n videocard.attributeController.colourSelect = (byte) (data & 0x0f);\n needUpdate = true;\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3C0: Colour select = \" + videocard.attributeController.colourSelect);\n break;\n \n default:\n logger.log(Level.WARNING, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3C0: Data mode (unknown register) \" + videocard.attributeController.index);\n } \n \n \n }\n else\n {\n // Address mode\n int oldPaletteAddressSource = videocard.attributeController.paletteAddressSource;\n\n videocard.attributeController.paletteAddressSource = (byte) ((data >> 5) & 0x01);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3C0: address mode = \" + videocard.attributeController.paletteAddressSource);\n\n if (videocard.attributeController.paletteAddressSource == 0)\n screen.clearScreen();\n else if (!(oldPaletteAddressSource != 0))\n {\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"found enable transition\");\n needUpdate = true;\n }\n \n data &= 0x1F; // Attribute Address bits\n \n videocard.attributeController.index = data;\n switch (data)\n {\n case 0x00:\n case 0x01:\n case 0x02:\n case 0x03:\n case 0x04:\n case 0x05:\n case 0x06:\n case 0x07:\n case 0x08:\n case 0x09:\n case 0x0A:\n case 0x0B:\n case 0x0C:\n case 0x0D:\n case 0x0E:\n case 0x0F:\n break;\n\n default:\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3C0: Address mode reg = \" + data);\n }\n }\n \n // Flip the flip-flop\n videocard.attributeController.dataAddressFlipFlop = !videocard.attributeController.dataAddressFlipFlop;\n break;\n\n case 0x3C2: // Miscellaneous Output Register\n videocard.miscOutputRegister.ioAddressSelect = (byte) ((data >> 0) & 0x01);\n videocard.miscOutputRegister.ramEnable = (byte) ((data >> 1) & 0x01);\n videocard.miscOutputRegister.clockSelect = (byte) ((data >> 2) & 0x03);\n videocard.miscOutputRegister.lowHighPage = (byte) ((data >> 5) & 0x01);\n videocard.miscOutputRegister.horizontalSyncPol = (byte) ((data >> 6) & 0x01);\n videocard.miscOutputRegister.verticalSyncPol = (byte) ((data >> 7) & 0x01);\n\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" I/O write port 0x3C2:\");\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" I/O Address select = \" + videocard.miscOutputRegister.ioAddressSelect);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" Ram Enable = \" + videocard.miscOutputRegister.ramEnable);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" Clock Select = \" + videocard.miscOutputRegister.clockSelect);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" Low/High Page = \" + videocard.miscOutputRegister.lowHighPage);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" Horiz Sync Polarity = \" + videocard.miscOutputRegister.horizontalSyncPol);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" Vert Sync Polarity = \" + videocard.miscOutputRegister.verticalSyncPol);\n break;\n\n case 0x3C3: // Video Subsystem Enable; currently only uses bit 0 to check if enabled/disabled\n videocard.vgaEnabled = (data & 0x01) == 1 ? true : false;\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" set I/O port 0x3C3: VGA Enabled = \" + videocard.vgaEnabled);\n break;\n\n case 0x3C4: // Sequencer Index Register\n if (data > 4)\n {\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" I/O write port 0x3C4: index > 4\");\n }\n videocard.sequencer.index = data;\n break;\n\n case 0x3C5: // Sequencer Data Registers\n // Determine register to write to\n switch (videocard.sequencer.index)\n {\n case 0: // Reset register\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" I/O write 0x3C5: Sequencer reset: \" + data);\n if ((videocard.sequencer.aSynchReset != 0) && ((data & 0x01) == 0))\n {\n videocard.sequencer.characterMapSelect = 0;\n videocard.sequencer.charMapAddress = 0;\n screen.updateCodePage(0x20000 + videocard.sequencer.charMapAddress);\n videocard.vgaMemReqUpdate = true;\n }\n videocard.sequencer.aSynchReset = (byte) ((data >> 0) & 0x01);\n videocard.sequencer.synchReset = (byte) ((data >> 1) & 0x01);\n break;\n \n case 1: // Clocking mode register\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3C5 (clocking mode): \" + data);\n videocard.sequencer.clockingMode = (byte) (data & 0x3D);\n videocard.sequencer.dotClockRate = ((data & 0x08) > 0) ? (byte) 1 : 0;\n break;\n \n case 2: // Map Mask register\n videocard.sequencer.mapMask = (byte) (data & 0x0F);\n for (int i = 0; i < 4; i++)\n videocard.sequencer.mapMaskArray[i] = (byte) ((data >> i) & 0x01);\n break;\n \n case 3: // Character Map select register\n videocard.sequencer.characterMapSelect = (byte) (data & 0x3F);\n \n byte charSetA = (byte) (data & 0x13); // Text mode font used when attribute byte bit 3 == 1\n if (charSetA > 3)\n charSetA = (byte) ((charSetA & 3) + 4);\n \n byte charSetB = (byte) ((data & 0x2C) >> 2); // Text mode font used when attribute byte bit 3 == 0\n if (charSetB > 3)\n charSetB = (byte) ((charSetB & 3) + 4);\n \n // Select font from font table\n // FIXME: Ensure this check is correct\n if (videocard.crtControllerRegister.regArray[0x09] != 0)\n {\n videocard.sequencer.charMapAddress = SequencerRegister.charMapOffset[charSetA];\n screen.updateCodePage(0x20000 + videocard.sequencer.charMapAddress);\n videocard.vgaMemReqUpdate = true;\n }\n \n // Different fonts not supported at this time\n if (charSetB != charSetA)\n logger.log(Level.WARNING, \"[\" + MODULE_TYPE + \"]\" + \"Character map select: map #2 in block \" + charSetB + \" unused\");\n break;\n \n case 4: // Memory Mode register\n videocard.sequencer.extendedMemory = (byte) ((data >> 1) & 0x01);\n videocard.sequencer.oddEvenDisable = (byte) ((data >> 2) & 0x01);\n videocard.sequencer.chainFourEnable = (byte) ((data >> 3) & 0x01);\n\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" I/O write port 0x3C5 (memory mode):\");\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" Extended Memory = \" + videocard.sequencer.extendedMemory);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" Odd/Even disable = \" + videocard.sequencer.oddEvenDisable);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" Chain 4 enable = \" + videocard.sequencer.chainFourEnable);\n break;\n \n default:\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3C5: index \" + videocard.sequencer.index + \" unhandled\");\n }\n break;\n\n case 0x3C6: // Pixel mask\n videocard.colourRegister.pixelMask = data;\n if (videocard.colourRegister.pixelMask != (byte) 0xFF)\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" I/O write port 0x3C6: Pixel mask= \" + data + \" != 0xFF\");\n break;\n\n case 0x3C7: // DAC Address Read Mode register\n videocard.colourRegister.dacReadAddress = data;\n videocard.colourRegister.dacReadCounter = 0;\n videocard.colourRegister.dacState = 0x03;\n break;\n\n case 0x3C8: // DAC Address Write Mode register\n videocard.colourRegister.dacWriteAddress = data;\n videocard.colourRegister.dacWriteCounter = 0;\n videocard.colourRegister.dacState = 0x00;\n break;\n\n case 0x3C9: // DAC Data Register\n // Determine sub-colour to be written \n switch (videocard.colourRegister.dacWriteCounter)\n {\n case 0:\n videocard.pixels[(((int) videocard.colourRegister.dacWriteAddress) & 0xFF)].red = data;\n break;\n case 1:\n videocard.pixels[(((int) videocard.colourRegister.dacWriteAddress) & 0xFF)].green = data;\n break;\n case 2:\n videocard.pixels[(((int) videocard.colourRegister.dacWriteAddress) & 0xFF)] .blue = data;\n\n needUpdate |= screen.setPaletteColour(videocard.colourRegister.dacWriteAddress, (videocard.pixels[(((int) videocard.colourRegister.dacWriteAddress) & 0xFF)].red) << 2,\n (videocard.pixels[(((int) videocard.colourRegister.dacWriteAddress) & 0xFF)].green) << 2,\n (videocard.pixels[(((int) videocard.colourRegister.dacWriteAddress) & 0xFF)].blue) << 2);\n break;\n }\n\n videocard.colourRegister.dacWriteCounter++;\n\n // Reset counter when 3 values are written and automatically update the address\n if (videocard.colourRegister.dacWriteCounter >= 3)\n {\n videocard.colourRegister.dacWriteCounter = 0;\n videocard.colourRegister.dacWriteAddress++;\n }\n break;\n\n case 0x3CA: // Feature Control Register\n // Read only (write at 0x3BA mono, 0x3DA colour)\n break;\n\n case 0x3CC: // Miscellaneous Output Register\n // Read only (write at 0x3C2\n break;\n\n case 0x3CD: // Unknown\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" I/O write to unknown port 0x3CD = \" + data);\n break;\n\n case 0x3CE: // Graphics Controller Address Register\n // Only 9 register accessible\n if (data > 0x08)\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" /O write port 0x3CE: index > 8\");\n videocard.graphicsController.index = data;\n break;\n\n case 0x3CF: // Graphics Controller Data Register\n switch (videocard.graphicsController.index)\n {\n case 0: // Set/Reset\n videocard.graphicsController.setReset = (byte) (data & 0x0F);\n break;\n \n case 1: // Enable Set/Reset\n videocard.graphicsController.enableSetReset = (byte) (data & 0x0F);\n break;\n \n case 2: // Colour Compare\n videocard.graphicsController.colourCompare = (byte) (data & 0x0F);\n break;\n \n case 3: // Data Rotate\n videocard.graphicsController.dataRotate = (byte) (data & 0x07);\n videocard.graphicsController.dataOperation = (byte) ((data >> 3) & 0x03);\n break;\n \n case 4: // Read Map Select\n videocard.graphicsController.readMapSelect = (byte) (data & 0x03);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3CF (Read Map Select): \" + data);\n break;\n \n case 5: // Graphics Mode\n videocard.graphicsController.writeMode = (byte) (data & 0x03);\n videocard.graphicsController.readMode = (byte) ((data >> 3) & 0x01);\n videocard.graphicsController.hostOddEvenEnable = (byte) ((data >> 4) & 0x01);\n videocard.graphicsController.shift256Reg = (byte) ((data >> 5) & 0x03);\n\n if (videocard.graphicsController.hostOddEvenEnable != 0)\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3CF (graphics mode): value = \" + data);\n if (videocard.graphicsController.shift256Reg != 0)\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3CF (graphics mode): value = \" + data);\n break;\n \n case 6: // Miscellaneous\n // Store old values for check later\n byte oldAlphaNumDisable = videocard.graphicsController.alphaNumDisable;\n byte oldMemoryMapSelect = videocard.graphicsController.memoryMapSelect;\n\n videocard.graphicsController.alphaNumDisable = (byte) (data & 0x01);\n videocard.graphicsController.chainOddEvenEnable = (byte) ((data >> 1) & 0x01);\n videocard.graphicsController.memoryMapSelect = (byte) ((data >> 2) & 0x03);\n\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" I/O write port 0x3CF (Miscellaneous): \" + data);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" Alpha Num Disable: \" + videocard.graphicsController.alphaNumDisable);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" Memory map select: \" + videocard.graphicsController.memoryMapSelect);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" Odd/Even enable : \" + videocard.graphicsController.hostOddEvenEnable);\n \n\n if (oldMemoryMapSelect != videocard.graphicsController.memoryMapSelect)\n needUpdate = true;\n if (oldAlphaNumDisable != videocard.graphicsController.alphaNumDisable)\n {\n needUpdate = true;\n oldScreenHeight = 0;\n }\n break;\n \n case 7: // Colour Don't Care\n videocard.graphicsController.colourDontCare = (byte) (data & 0x0F);\n break;\n \n case 8: // Bit Mask\n videocard.graphicsController.bitMask = data;\n break;\n \n default:\n // Unknown index addressed\n logger.log(Level.WARNING, \"[\" + MODULE_TYPE + \"]\" + \" I/O write port 0x3CF: index \" + videocard.graphicsController.index + \" unhandled\");\n }\n break;\n\n case 0x3B4: // CRT Controller Address Register (monochrome)\n case 0x3D4: // CRT Controller Address Register (colour)\n // Set index to be accessed in CRTC Data Register cycle\n videocard.crtControllerRegister.index = (byte) (data & 0x7F);\n if (videocard.crtControllerRegister.index > 0x18)\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" I/O write port 0x3(B|D)4: invalid CRTC register \" + videocard.crtControllerRegister.index + \" selected\");\n break;\n\n case 0x3B5: // CRTC Data Register (monochrome)\n case 0x3D5: // CRTC Data Register (colour)\n if (videocard.crtControllerRegister.index > 0x18)\n {\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" I/O write port 0x3(B|D)5: invalid CRTC Register (\" + videocard.crtControllerRegister.index + \"); ignored\");\n return;\n }\n // Check if writing is allowed for registers 0x00 - 0x07\n if ((videocard.crtControllerRegister.protectEnable) && (videocard.crtControllerRegister.index < 0x08))\n {\n // Only write exception in protectEnable is lineCompare of Overflow register (0x07)\n if (videocard.crtControllerRegister.index == 0x07)\n {\n // Reset variables before ORing\n videocard.crtControllerRegister.regArray[videocard.crtControllerRegister.index] &= ~0x10;\n videocard.lineCompare &= 0x2ff;\n \n // Bit 4 specifies lineCompare bit 8 \n videocard.crtControllerRegister.regArray[videocard.crtControllerRegister.index] |= (data & 0x10);\n if ((videocard.crtControllerRegister.regArray[0x07] & 0x10) != 0)\n videocard.lineCompare |= 0x100;\n needUpdate = true;\n break;\n }\n else\n {\n return;\n }\n }\n if (data != videocard.crtControllerRegister.regArray[videocard.crtControllerRegister.index])\n {\n videocard.crtControllerRegister.regArray[videocard.crtControllerRegister.index] = data;\n switch (videocard.crtControllerRegister.index)\n {\n case 0x07:\n // Overflow register; specifies bit 8, 9 for several fields\n \n // Reset variables before ORing\n videocard.verticalDisplayEnd &= 0xFF;\n videocard.lineCompare &= 0x2FF;\n\n // Bit 1 specifies verticalDisplayEnd bit 8 \n if ((videocard.crtControllerRegister.regArray[0x07] & 0x02) != 0)\n videocard.verticalDisplayEnd |= 0x100;\n // Bit 6 specifies verticalDisplayEnd bit 9\n if ((videocard.crtControllerRegister.regArray[0x07] & 0x40) != 0)\n videocard.verticalDisplayEnd |= 0x200;\n // Bit 4 specifies lineCompare bit 8\n if ((videocard.crtControllerRegister.regArray[0x07] & 0x10) != 0)\n videocard.lineCompare |= 0x100;\n needUpdate = true;\n break;\n \n case 0x08:\n // Preset row scan; bits 5-6 allow 15/31/35 pixel shift without change in start address, \n // bits 0-4 specify number of scanlines to scroll up (more precise than start address)\n needUpdate = true;\n break;\n \n case 0x09:\n // Maximum scan line; for text mode, value should be char. height - 1, \n // for graphic mode a non-zero value causes repeat of scanline by MSL+1 \n\n // Bit 7 sets scan doubling:\n // FIXME: Why is this ANDed with 0x9F if bit 7 is required?\n videocard.crtControllerRegister.scanDoubling = ((data & 0x9F) > 0) ? (byte) 1 : 0;\n\n // Reset variables before ORing\n videocard.lineCompare &= 0x1FF;\n\n // Bit 6 specifies bit 9 of line_compare\n if ((videocard.crtControllerRegister.regArray[0x09] & 0x40) != 0)\n videocard.lineCompare |= 0x200;\n needUpdate = true;\n break;\n \n case 0x0A:\n case 0x0B:\n case 0x0E:\n case 0x0F:\n // Cursor start & end / cursor location; specifies the scanlines \n // at which the cursor should start and end, and the location of the cursor\n videocard.vgaMemReqUpdate = true;\n break;\n \n case 0x0C:\n case 0x0D:\n // Start address; specifies the display memory address of the upper left pixel/character\n if (videocard.graphicsController.alphaNumDisable != 0)\n {\n needUpdate = true;\n }\n else\n {\n videocard.vgaMemReqUpdate = true;\n }\n break;\n \n case 0x11:\n // Change vertical retrace end\n videocard.crtControllerRegister.protectEnable = ((videocard.crtControllerRegister.regArray[0x11] & 0x80) > 0) ? true : false;\n break;\n \n case 0x12:\n // Change vertical display end\n videocard.verticalDisplayEnd &= 0x300;\n videocard.verticalDisplayEnd |= (((int) videocard.crtControllerRegister.regArray[0x12]) & 0xFF);\n break;\n \n case 0x13:\n case 0x14:\n case 0x17:\n // Line offset; specifies address difference between consecutive scanlines/character lines \n videocard.lineOffset = videocard.crtControllerRegister.regArray[0x13] << 1;\n if ((videocard.crtControllerRegister.regArray[0x14] & 0x40) != 0)\n {\n videocard.lineOffset <<= 2;\n }\n else if ((videocard.crtControllerRegister.regArray[0x17] & 0x40) == 0)\n {\n videocard.lineOffset <<= 1;\n }\n needUpdate = true;\n break;\n\n case 0x18:\n // Line compare; indicates scan line where horiz. division can occur. No division when set to 0x3FF\n videocard.lineCompare &= 0x300;\n videocard.lineCompare |= (((short) videocard.crtControllerRegister.regArray[0x18]) & 0xFF); // Cast from byte to short\n needUpdate = true;\n break;\n }\n\n }\n break;\n\n case 0x3Da: // Feature Control (colour)\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" I/O write port 0x3DA (Feature Control Register, colour): reserved\");\n break;\n\n case 0x03C1: // Attribute Data Read Register\n // Read only\n break;\n \n default:\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" unsupported I/O write to port \" + portAddress + \", data =\" + data);\n\n }\n\n if (needUpdate)\n {\n // Mark all video as updated so the changes will go through\n setAreaForUpdate(0, 0, oldScreenWidth, oldScreenHeight);\n }\n return;\n }",
"public void setPortDOutRegisters(byte p1, byte p2){\r\n checkServoCommandThread();\r\n ServoCommand cmd=new ServoCommand();\r\n cmd.bytes=new byte[3];\r\n cmd.bytes[0]=CMD_SET_PORT_DOUT;\r\n cmd.bytes[1]=(byte)(0x0f&p1);\r\n cmd.bytes[2]=(byte)(0xff&p2);\r\n submitCommand(cmd);\r\n\r\n }",
"public void led(int x, int y, int value) {\n\t\ttry {\n\t\t\toutput.write((value == 1 ? 3 : 4) | 0x80);\n\t\t\toutput.write(((x << 4) | y) & 0xff);\n\t\t} catch (IOException e) { e.printStackTrace(); }\n\t}",
"public final void setDevicePort(String port){\n peripheralPort = port;\n }",
"private void setS1Port(int value) {\n \n s1Port_ = value;\n }",
"public void setDirection(float direction)\r\n {\r\n this.direction = direction;\r\n }",
"public void setDirection(int direction) {\r\n\t\tthis.direction = direction;\r\n\t}",
"public static void setDIO(String name, int port) {\n mapDIO.put(name, port);\n }",
"public void setForward(boolean fwdVal) {\n\t\tRelay.Value currentValue = this.get(),\n\t\t\t\t newValue = currentValue;\n\t\t\n\t\tif(currentValue == Relay.Value.kForward) {\n\t\t\tif(!fwdVal)\n\t\t\t\tnewValue = Relay.Value.kOff;\n\t\t} else if(currentValue == Relay.Value.kOff) {\n\t\t\tif(fwdVal)\n\t\t\t\tnewValue = Relay.Value.kForward;\n\t\t} else if(currentValue == Relay.Value.kOn) {\n\t\t\tif(!fwdVal)\n\t\t\t\tnewValue = Relay.Value.kReverse;\n\t\t} else if(currentValue == Relay.Value.kReverse) {\n\t\t\tif(fwdVal)\n\t\t\t\tnewValue = Relay.Value.kOn;\n\t\t}\n\t\t\n\t\tthis.set(newValue);\n\t}",
"public void setPort(int port);",
"public void setPort(int port);",
"private void setGpioPin(int pin) \n\t{\n\t\tGpioUtil.setEdgeDetection(pin, GpioUtil.EDGE_RISING);\n\t\tGpio.pinMode(pin, Gpio.INPUT);\n\t\tGpio.pullUpDnControl(pin, Gpio.PUD_DOWN); \n\t\tGpioInterrupt.enablePinStateChangeCallback(pin);\n\t}",
"@JsonSetter(\"direction\")\n public void setDirection (String value) { \n this.direction = value;\n }",
"public void SetInputPolarity(byte values) throws IOException {\n mDevice.writeRegByte( IPOL, values );\n }",
"private void set_inputs(Map<String, String> arg_values) {\n\n if ( arg_values.get(\"ip\") != null )\n ip = arg_values.get(\"ip\");\n else\n ip = \"127.0.0.1\";\n\n if ( arg_values.get(\"port\") != null )\n port = Integer.parseInt(arg_values.get(\"port\"));\n else\n port = 2000;\n\n if ( arg_values.get(\"-v\") != null )\n verbose = true;\n\n if ( arg_values.get(\"-h\") != null )\n help = true;\n }",
"public void setDirection(int direction) {\r\n\t\tsuper.setDirection(direction);\r\n\t\trobotImage.setImage(Constant.ROBOTIMAGEPATHS[direction]);\r\n\t}",
"public OpenToLANConfig() {\n this.port = 0;\n this.delayBetweenPings = Duration.of(1500, TimeUnit.MILLISECOND);\n this.delayBetweenEvent = Duration.of(30, TimeUnit.SECOND);\n }",
"public DrivingInputMode() {\n super(\"Driving Mode\", F_FORWARD, F_MAIN_BRAKE, F_PARKING_BRAKE, F_RESET,\n F_RETURN, F_REVERSE, F_START_ENGINE, F_TURN_LEFT, F_TURN_RIGHT);\n\n assign((FunctionId function, InputState inputState, double tpf) -> {\n if (inputState == InputState.Positive) {\n accelerating = true;\n } else {\n accelerating = false;\n }\n }, F_FORWARD);\n\n assign((FunctionId function, InputState inputState, double tpf) -> {\n if (inputState == InputState.Positive) {\n mainBrake = true;\n } else {\n mainBrake = false;\n }\n }, F_MAIN_BRAKE);\n\n assign((FunctionId function, InputState inputState, double tpf) -> {\n if (inputState == InputState.Positive) {\n parkingBrake = true;\n } else {\n parkingBrake = false;\n }\n }, F_PARKING_BRAKE);\n\n assign((FunctionId function, InputState inputState, double tpf) -> {\n if (inputState == InputState.Positive) {\n resetVehicle();\n }\n }, F_RESET);\n\n assign((FunctionId function, InputState inputState, double tpf) -> {\n if (inputState == InputState.Positive) {\n returnToMainMenu();\n }\n }, F_RETURN);\n\n assign((FunctionId function, InputState inputState, double tpf) -> {\n GearBox gearBox = MavDemo1.getVehicle().getGearBox();\n if (inputState == InputState.Positive) {\n boolean isInReverse = gearBox.isInReverse();\n gearBox.setReversing(!isInReverse);\n }\n }, F_REVERSE);\n\n assign((FunctionId function, InputState inputState, double tpf) -> {\n if (inputState == InputState.Positive) {\n getState(DriverHud.class).toggleEngineStarted();\n }\n }, F_START_ENGINE);\n\n assign((FunctionId function, InputState inputState, double tpf) -> {\n if (inputState == InputState.Positive) {\n turningLeft = true;\n } else {\n turningLeft = false;\n }\n }, F_TURN_LEFT);\n\n assign((FunctionId function, InputState inputState, double tpf) -> {\n if (inputState == InputState.Positive) {\n turningRight = true;\n } else {\n turningRight = false;\n }\n }, F_TURN_RIGHT);\n }",
"public static void setDirectionJoystick(float x, float y) {\n setDirection(x, y);\r\n isTouched = x != 0 || y != 0;\r\n }",
"public void setPort(int port) {\n this.port = port;\n prefs.putInt(\"AEUnicastOutput.port\", port);\n }",
"private void MotorInit()\n {\n intake_up.configFactoryDefault();\n intake_down.configFactoryDefault();\n intake_up.configOpenloopRamp(Constants.kMotorRampRate);\n intake_down.configOpenloopRamp(Constants.kMotorRampRate);\n intake_up.setInverted(PortReversed.intake_up_reversed.value);\n intake_down.setInverted(PortReversed.intake_down_reversed.value);\n intake_up.setNeutralMode(NeutralMode.Brake);\n intake_down.setNeutralMode(NeutralMode.Brake);\n }",
"public void setDirection(Directions direction) {\n\t\tlogic.setDirection(direction);\n\t}",
"public void setDirection(Vector direction){\n\t\t_direction = direction;\n\t}",
"public void setDirection() {\n\t\tdouble randomDirection = randGen.nextDouble();\n\t\tif (randomDirection < .25) {\n\t\t\tthis.xDirection = 1;\n\t\t\tthis.yDirection = -1;\n\t\t} else if (randomDirection < .5) {\n\t\t\tthis.xDirection = -1;\n\t\t\tthis.yDirection = -1;\n\t\t} else if (randomDirection < .75) {\n\t\t\tthis.xDirection = -1;\n\t\t\tthis.yDirection = 1;\n\t\t} else {\n\t\t\tthis.xDirection = 1;\n\t\t\tthis.yDirection = 1;\n\t\t}\n\t}",
"@Override\n \t\tpublic void onWrite(int value) {\n \t\t\tboolean temp = (value & 0x80) == 0x80;\n \t\t\tif (temp != CPU.NMIEnable) {\n \t\t\t\tCPU.NMIEnable = temp;\n \t\t\t\tif (!Settings.isTrue(Settings.CPU_ALT_DEBUG)) {\n \t\t\t\t\tif(CPU.NMIEnable)\n \t\t\t\t\t\tLog.debug(\"Enabling NMI interrupts\");\n \t\t\t\t\telse\n \t\t\t\t\t\tLog.debug(\"Disabling NMI interrupts\");\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t// IRQEnable\n \t\t\tCPU.irqEnable = (value >> 4) & 0x03;\n \t\t\tLog.debug(\"IRQ Enable set to \" + CPU.irqEnable);\n \t\t\t\n \t\t\t// Standard Controller Enable\n \t\t\tCPU.standardControllerRead = (value & 0x01) != 0;\n \t\t\tif (!Settings.isTrue(Settings.CPU_ALT_DEBUG)) {\n \t\t\t\tif(CPU.standardControllerRead)\n \t\t\t\t\tLog.debug(\"Enabling automatic reading of standard controller\");\n \t\t\t\telse\n \t\t\t\t\tLog.debug(\"Disabling automatic reading of standard controller\");\n \t\t\t}\n \t\t}",
"public void setTurning(java.lang.Boolean value);",
"public void setPin(int pin);",
"void setDebugPort(Integer debugPort);",
"public boolean setDirection(Direction dir)\n {\n this.dir = dir;\n return true;\n }",
"public void setPortNumber(int value) {\n this.portNumber = value;\n }",
"public void turnLightsOn()\n {\n set(Relay.Value.kForward);\n }",
"private void turnToDesiredDirection() {\n\n\t\tdouble dir = sens.getDirection();\n\n\t\tif (dir < desiredDirection) {\n\t\t\tif (Math.abs(dir - desiredDirection) < 180) {\n\t\t\t\tdir += TURNSPEED;\n\t\t\t} else {\n\t\t\t\tdir -= TURNSPEED;\n\t\t\t}\n\t\t} else {\n\t\t\tif (Math.abs(dir - desiredDirection) < 180) {\n\t\t\t\tdir -= TURNSPEED;\n\t\t\t} else {\n\t\t\t\tdir += TURNSPEED;\n\t\t\t}\n\t\t}\n\t\t\n\t\tsens.setDirection(dir);\n\t\t\n\t}",
"Future<OFPortMod> createPortModAsync(DatapathId dpid, OFPort port, OFPortConfig config, boolean enable);",
"public void setPort(final int p) {\n this.port = p;\n }",
"OutputPort createOutputPort();",
"public Builder setPort(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n port_ = value;\n onChanged();\n return this;\n }",
"public void setiPort(int iPort) {\n\t\tthis.iPort = iPort;\n\t}",
"public void updateOn(boolean on) {\r\n\t\toutString = \"O\" + on + \"\\n\";\r\n\t\tmyPort.write(outString);\r\n\t\tSystem.out.println(outString);\r\n\t}",
"public void setPort(final int p) {\n this.port = p;\n }",
"public void onWrite(int value) {\n \t\t\tboolean newLatch = (value & 1) != 0;\n \t\t\tif (newLatch != joyLatch) {\n \t\t\t\tcurButton = 0;\n \t\t\t}\n \t\t\tjoyLatch = newLatch;\n \t\t}",
"public void set(int value) {\n\t\ttem = value;\n\t\tSystem.out.println(\"\\tAir conditioner is set to \" + tem +\" degrees\");\n\t}",
"public void setDirection(){\n\n if (gameStatus != demoPlay)\n client_sb.i_Button = direct;\n\n TankMoveDelay++;\n StarGun_GSR loc=(StarGun_GSR)client_sb.getGameStateRecord();\n\n if (TankMoveDelay >= 1 &&\n loc.getPlayerX() < StarGun_SB.PLAYER_RIGHT_BORDER &&\n\t loc.getPlayerX() > 0) {\n TankMoveDelay = 0;\n switch (direct) {\n\tcase StarGun_SB.DIRECT_LEFT:\n\t if (TankPos==0)TankPos=iTankAmount-1;\n\t else TankPos--;\n\t\t\t\t break;\n case StarGun_SB.DIRECT_RIGHT:\n\t if (TankPos==iTankAmount-1)TankPos=0;\n\t else TankPos++;\n\t\t\t\t break;\n }\n }\n }"
] |
[
"0.66860646",
"0.6004125",
"0.59527206",
"0.5879825",
"0.5879825",
"0.5628138",
"0.5587098",
"0.5581289",
"0.5577526",
"0.55643433",
"0.5564217",
"0.55575895",
"0.5503604",
"0.54876333",
"0.5467605",
"0.54387355",
"0.5418575",
"0.5418575",
"0.541281",
"0.53922087",
"0.52609706",
"0.5258255",
"0.52305794",
"0.5201986",
"0.51901335",
"0.5184984",
"0.517812",
"0.517812",
"0.51765853",
"0.5164297",
"0.5164297",
"0.51497054",
"0.51228553",
"0.5094813",
"0.5094813",
"0.50918025",
"0.507221",
"0.5052347",
"0.5045908",
"0.50418127",
"0.49992743",
"0.49957123",
"0.49805564",
"0.49777922",
"0.4956024",
"0.4956024",
"0.49496204",
"0.49456957",
"0.49110264",
"0.4894726",
"0.48904726",
"0.4885497",
"0.4873094",
"0.4847611",
"0.48387238",
"0.48316535",
"0.48309058",
"0.48309058",
"0.48242742",
"0.48125634",
"0.48108068",
"0.48052394",
"0.47774655",
"0.47689575",
"0.4725634",
"0.4710049",
"0.4700449",
"0.46899226",
"0.46899226",
"0.46799505",
"0.46709597",
"0.46668905",
"0.46538925",
"0.46530747",
"0.46526608",
"0.4637917",
"0.46304518",
"0.46169236",
"0.46137175",
"0.46084297",
"0.46036184",
"0.4601982",
"0.45796677",
"0.45780528",
"0.45728746",
"0.45699582",
"0.4567459",
"0.45542398",
"0.4553038",
"0.4543148",
"0.45364794",
"0.45337054",
"0.45306295",
"0.45302993",
"0.4527361",
"0.4518403",
"0.45155776",
"0.45125148",
"0.45123523",
"0.45094612"
] |
0.63632965
|
1
|
Returns a direction bitmask and a value bitmask for the specified port. For example: A return value of 0b00001111 and 0b00110011 for direction and value means that: pins 0 and 1 are configured as input pullup, pins 2 and 3 are configured as input default, pins 4 and 5 are configured as output high and pins 6 and 7 are configured as output low.
|
public PortConfiguration getPortConfiguration(char port) throws TimeoutException, NotConnectedException {
byte options = 0;
boolean isResponseExpected = getResponseExpected(FUNCTION_GET_PORT_CONFIGURATION);
if(isResponseExpected) {
options = 8;
}
ByteBuffer bb = ipcon.createRequestBuffer(uid, (byte)9, FUNCTION_GET_PORT_CONFIGURATION, options, (byte)(0));
bb.put((byte)port);
byte[] response = sendRequestExpectResponse(bb.array(), FUNCTION_GET_PORT_CONFIGURATION);
bb = ByteBuffer.wrap(response, 8, response.length - 8);
bb.order(ByteOrder.LITTLE_ENDIAN);
PortConfiguration obj = new PortConfiguration();
obj.directionMask = IPConnection.unsignedByte(bb.get());
obj.valueMask = IPConnection.unsignedByte(bb.get());
return obj;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static PortType get(int value)\n {\n switch (value)\n {\n case INPUT_EN_VALUE: return INPUT_EN;\n case INPUT_RU_VALUE: return INPUT_RU;\n case OUTPUT_EN_VALUE: return OUTPUT_EN;\n case OUTPUT_RU_VALUE: return OUTPUT_RU;\n }\n return null;\n }",
"public void setPortConfiguration(char port, short selectionMask, char direction, boolean value) throws TimeoutException, NotConnectedException {\n\t\tbyte options = 0;\n\t\tboolean isResponseExpected = getResponseExpected(FUNCTION_SET_PORT_CONFIGURATION);\n\t\tif(isResponseExpected) {\n\t\t\toptions = 8;\n\t\t}\n\t\tByteBuffer bb = ipcon.createRequestBuffer(uid, (byte)12, FUNCTION_SET_PORT_CONFIGURATION, options, (byte)(0));\n\t\tbb.put((byte)port);\n\t\tbb.put((byte)selectionMask);\n\t\tbb.put((byte)direction);\n\t\tbb.put((byte)(value ? 1 : 0));\n\n\t\tif(isResponseExpected) {\n\t\t\tbyte[] response = sendRequestExpectResponse(bb.array(), FUNCTION_SET_PORT_CONFIGURATION);\n\n\t\t\tbb = ByteBuffer.wrap(response, 8, response.length - 8);\n\t\t\tbb.order(ByteOrder.LITTLE_ENDIAN);\n\t\t} else {\n\t\t\tsendRequestNoResponse(bb.array());\n\t\t}\n\t}",
"public short getPort(char port) throws TimeoutException, NotConnectedException {\n\t\tbyte options = 0;\n\t\tboolean isResponseExpected = getResponseExpected(FUNCTION_GET_PORT);\n\t\tif(isResponseExpected) {\n\t\t\toptions = 8;\n\t\t}\n\t\tByteBuffer bb = ipcon.createRequestBuffer(uid, (byte)9, FUNCTION_GET_PORT, options, (byte)(0));\n\t\tbb.put((byte)port);\n\n\t\tbyte[] response = sendRequestExpectResponse(bb.array(), FUNCTION_GET_PORT);\n\n\t\tbb = ByteBuffer.wrap(response, 8, response.length - 8);\n\t\tbb.order(ByteOrder.LITTLE_ENDIAN);\n\n\t\tshort valueMask = IPConnection.unsignedByte(bb.get());\n\n\t\treturn valueMask;\n\t}",
"int getInPort();",
"int getInPort();",
"Set<OFPortConfig> retrievePortMods(DatapathId dpid, OFPort port) throws PortModException;",
"public byte getIOPortByte(int portAddress)\n {\n byte returnValue = 0; // Data returned from requested port\n\n // Ensure the correct ports are used for colour/monochrome mode\n if ((portAddress >= 0x3B0) && (portAddress <= 0x3BF) && (videocard.miscOutputRegister.ioAddressSelect != 0))\n {\n // Adapter is in colour mode, but addressing monochrome mode ports, so return default value\n return (byte) (0xFF);\n }\n if ((portAddress >= 0x3D0) && (portAddress <= 0x3DF) && (videocard.miscOutputRegister.ioAddressSelect == 0))\n {\n // Adapter is in monochrome mode, but addressing colour mode ports, so return default value\n return (byte) (0xFF);\n }\n\n switch (portAddress)\n {\n case 0x3BA: // Input Status 1 (monochrome)\n case 0x3CA: // Feature Control\n // TODO: According to specs, all bits of the FC are reserved, just return???\n case 0x3DA: // Input Status 1 (colour)\n \n long microSeconds;\n short vertResolution;\n \n // Reset flip-flop to address mode when reading these ports\n videocard.attributeController.dataAddressFlipFlop = false;\n\n \n // Reset displayDisabled, only done here\n videocard.displayDisabled = 0;\n\n // Determine the current internal 'time', in microseconds.\n // This can be inferred from total instructions executed divided by the instructions executed per second (approx.) \n// microSeconds = (long) (( ((double)cpu.getCurrentInstructionNumber()/cpu.getIPS())) * 1000000);\n\n // Determine vertical display size from verticalSyncPol and horizontalSyncPol\n // This is needed to calculate the vertical retrace period\n switch ((videocard.miscOutputRegister.verticalSyncPol << 1) | videocard.miscOutputRegister.horizontalSyncPol)\n {\n case 0:\n vertResolution = 200;\n break;\n case 1:\n vertResolution = 400;\n break;\n case 2:\n vertResolution = 350;\n break;\n default:\n vertResolution = 480;\n break;\n }\n \n // Check if a horizontal (colour) or vertical (mono) retrace is in progress; if so, also set displayDisabled\n // Similar to Bochs, use a 72 Hz vertical frequency. This means a retrace happens\n// if ((microSeconds % 13888) < 70)\n// {\n// videocard.vertRetrace = 1;\n// videocard.displayDisabled = 1;\n// }\n// else\n {\n videocard.vertRetrace = 0;\n }\n// if ((microSeconds % (13888 / vertResolution)) == 0)\n// {\n// videocard.horizRetrace = 1;\n// videocard.displayDisabled = 1;\n// }\n// else\n {\n videocard.horizRetrace = 0;\n }\n\n return (byte) (videocard.vertRetrace << 3 | videocard.displayDisabled);\n\n case 0x3C0: // Attribute Controller Attribute Address Register (only read when the flipflop is in address mode)\n // Check flipflop state\n if (!videocard.attributeController.dataAddressFlipFlop)\n {\n return (byte) ((videocard.attributeController.paletteAddressSource << 5) | videocard.attributeController.index);\n }\n else\n {\n logger.log(Level.SEVERE, \"[\" + MODULE_TYPE + \"]\" + \" Port [0x3C0] read, but flipflop not set to address mode\");\n return 0;\n }\n\n case 0x3C1: // Attribute Controller Data Read Register, uses index to determine register to read\n switch (videocard.attributeController.index)\n {\n // Palette registers\n case 0x00:\n case 0x01:\n case 0x02:\n case 0x03:\n case 0x04:\n case 0x05:\n case 0x06:\n case 0x07:\n case 0x08:\n case 0x09:\n case 0x0A:\n case 0x0B:\n case 0x0C:\n case 0x0D:\n case 0x0E:\n case 0x0F:\n returnValue = videocard.attributeController.paletteRegister[videocard.attributeController.index];\n return (returnValue);\n\n case 0x10: // Mode control register\n return ((byte) ((videocard.attributeController.modeControlReg.graphicsEnable << 0) | \n (videocard.attributeController.modeControlReg.monoColourEmu << 1) | \n (videocard.attributeController.modeControlReg.lineGraphicsEnable << 2) | \n (videocard.attributeController.modeControlReg.blinkIntensity << 3) |\n (videocard.attributeController.modeControlReg.pixelPanningMode << 5) | \n (videocard.attributeController.modeControlReg.colour8Bit << 6) | \n (videocard.attributeController.modeControlReg.paletteBitsSelect << 7)));\n\n case 0x11: // Overscan colour\n return (videocard.attributeController.overscanColour);\n\n case 0x12: // Colour plane enable\n return (videocard.attributeController.colourPlaneEnable);\n\n case 0x13: // Horizontal pixel panning\n return (videocard.attributeController.horizPixelPanning);\n\n case 0x14: // Colour select\n return (videocard.attributeController.colourSelect);\n\n default:\n logger.log(Level.SEVERE, \"[\" + MODULE_TYPE + \"]\" + \" Port [0x3C1] reads unknown register 0x\" + Integer.toHexString(videocard.attributeController.index).toUpperCase());\n return 0;\n }\n\n case 0x3C2: // Input Status 0\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" Port [0x3C1] reads Input Status #0; ignored\");\n return 0;\n\n case 0x3C3: // VGA Enable Register\n return (videocard.vgaEnabled) ? (byte) 1 : 0;\n\n case 0x3C4: // Sequencer Index\n return (videocard.sequencer.index);\n\n case 0x3C5: // Sequencer Registers 0-4, based on index\n switch (videocard.sequencer.index)\n {\n case 0: // Asynch and synch reset\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" Port [0x3C5] reads sequencer reset\");\n return (byte) (videocard.sequencer.aSynchReset | (videocard.sequencer.synchReset << 1));\n\n case 1: // Clocking mode\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" Port [0x3C5] reads sequencer clocking mode\");\n return (videocard.sequencer.clockingMode);\n\n case 2: // Map mask register\n return (videocard.sequencer.mapMask);\n\n case 3: // Character map select register\n return (videocard.sequencer.characterMapSelect);\n\n case 4: // Memory mode register */\n return ((byte) ((videocard.sequencer.extendedMemory << 1) | \n (videocard.sequencer.oddEvenDisable << 2) | \n (videocard.sequencer.chainFourEnable << 3)));\n\n default:\n logger.log(Level.SEVERE, \"[\" + MODULE_TYPE + \"]\" + \" Port [0x3C5] reads unknown register 0x\" + Integer.toHexString(videocard.sequencer.index).toUpperCase());\n return 0;\n }\n\n case 0x3C6: // Pixel mask register\n return (videocard.colourRegister.pixelMask);\n\n case 0x3C7: // DAC state register\n return (videocard.colourRegister.dacState);\n\n case 0x3C8: // DAC write index\n return (videocard.colourRegister.dacWriteAddress);\n\n case 0x3C9: // DAC Data Register; read colour values in sets of three. Automatically increment counter and address\n // Ensure DAC read state is enabled\n if (videocard.colourRegister.dacState == 0x03)\n {\n switch (videocard.colourRegister.dacReadCounter)\n {\n // Cast dacReadAddress to integer as it will be used as index\n case 0:\n returnValue = videocard.pixels[((int) videocard.colourRegister.dacReadAddress) & 0xFF].red;\n break;\n case 1:\n returnValue = videocard.pixels[((int) videocard.colourRegister.dacReadAddress) & 0xFF].green;\n break;\n case 2:\n returnValue = videocard.pixels[((int) videocard.colourRegister.dacReadAddress) & 0xFF].blue;\n break;\n default:\n // Shouldn't get to here...\n returnValue = 0;\n }\n // Automatically increment counter\n videocard.colourRegister.dacReadCounter++;\n \n // Set of 3 read; reset counter and increment address\n if (videocard.colourRegister.dacReadCounter >= 3)\n {\n videocard.colourRegister.dacReadCounter = 0;\n videocard.colourRegister.dacReadAddress++;\n }\n }\n else\n { // DAC read state not enabled, return ones\n returnValue = 0x3F;\n }\n return (returnValue);\n\n case 0x3CC: // Miscellaneous Output\n return ((byte) (((videocard.miscOutputRegister.ioAddressSelect & 0x01) << 0) | \n ((videocard.miscOutputRegister.ramEnable & 0x01) << 1) | \n ((videocard.miscOutputRegister.clockSelect & 0x03) << 2) | \n ((videocard.miscOutputRegister.lowHighPage & 0x01) << 5) | \n ((videocard.miscOutputRegister.horizontalSyncPol & 0x01) << 6) | \n ((videocard.miscOutputRegister.verticalSyncPol & 0x01) << 7)));\n\n case 0x3CD: // GDC segment select ???\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" Port [0x3CD] read; unknown register, returned 0x00\");\n return 0x00;\n\n case 0x3CE: // Graphics Controller index\n return (byte) (videocard.graphicsController.index);\n\n case 0x3CF: // Graphics Controller Registers 0-8, based on index\n switch (videocard.graphicsController.index)\n {\n case 0: // Set/Reset\n return (videocard.graphicsController.setReset);\n\n case 1: // Enable Set/Reset\n return (videocard.graphicsController.enableSetReset);\n\n case 2: // Colour Compare\n return (videocard.graphicsController.colourCompare);\n\n case 3: // Data Rotate\n return ((byte) (((videocard.graphicsController.dataOperation & 0x03) << 3) |\n ((videocard.graphicsController.dataRotate & 0x07) << 0)));\n\n case 4: // Read Map Select\n return (videocard.graphicsController.readMapSelect);\n\n case 5: // Graphics Mode\n returnValue = (byte) (((videocard.graphicsController.shift256Reg & 0x03) << 5) |\n ((videocard.graphicsController.hostOddEvenEnable & 0x01) << 4) |\n ((videocard.graphicsController.readMode & 0x01) << 3) |\n ((videocard.graphicsController.writeMode & 0x03) << 0));\n\n if (videocard.graphicsController.hostOddEvenEnable != 0 || videocard.graphicsController.shift256Reg != 0)\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" io read 0x3cf: reg 05 = \" + returnValue);\n return (returnValue);\n\n case 6: // Miscellaneous Graphics\n return ((byte) (((videocard.graphicsController.memoryMapSelect & 0x03) << 2) |\n ((videocard.graphicsController.hostOddEvenEnable & 0x01) << 1) |\n ((videocard.graphicsController.alphaNumDisable & 0x01) << 0)));\n \n case 7: // Colour Don't Care\n return (videocard.graphicsController.colourDontCare);\n\n case 8: // Bit Mask\n return (videocard.graphicsController.bitMask);\n\n default:\n logger.log(Level.SEVERE, \"[\" + MODULE_TYPE + \"]\" + \" Port [0x3CF] reads unknown register 0x\" + Integer.toHexString(videocard.graphicsController.index).toUpperCase());\n return (0);\n }\n\n case 0x3D4: // CRTC Index Register\n return (videocard.crtControllerRegister.index);\n\n case 0x3B5: // CRTC Registers (monochrome emulation modes)\n case 0x3D5: // CRTC Registers (colour emulation modes)\n if (videocard.crtControllerRegister.index > 0x18)\n {\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" Port [0x\" + Integer.toHexString(portAddress).toUpperCase() +\"] reads unknown register 0x\" + Integer.toHexString(videocard.crtControllerRegister.index).toUpperCase());\n return (0);\n }\n return videocard.crtControllerRegister.regArray[videocard.crtControllerRegister.index];\n\n case 0x3B4: // CRTC Index Register (monochrome emulation modes)\n // TODO: return crt index register here, same as 0x3D4???\n case 0x3CB: // GDC segment select register 2 ???\n default:\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" Port [0x\" + Integer.toHexString(portAddress).toUpperCase() +\"] read; unknown register, returned 0x00\");\n return 0;\n }\n\n }",
"@Override\r\n public void setPort2(int portValue) {\r\n checkServoCommandThread();\r\n ServoCommand cmd=new ServoCommand();\r\n cmd.bytes=new byte[2];\r\n cmd.bytes[0]=CMD_SET_PORT2;\r\n cmd.bytes[1]=(byte)(0xff&portValue);\r\n submitCommand(cmd);\r\n }",
"private int getBit(int value, int k) {\r\n\t\treturn (value >> k) & 1;\r\n\t}",
"private final TupleSet portToBits(TupleFactory factory, String port, int bits) {\n\t\tfinal TupleSet s = factory.noneOf(2);\n\t\tfor (int i = 0, max = 32 - Integer.numberOfLeadingZeros(bits); i < max; i++) {\n\t\t\tif ((bits & (1 << i)) != 0)\n\t\t\t\ts.add(factory.tuple(port, Integer.valueOf(1 << i)));\n\t\t}\n\t\treturn s;\n\t}",
"public Builder setDirection(int value) {\n bitField0_ |= 0x00000020;\n direction_ = value;\n onChanged();\n return this;\n }",
"String getPortRange();",
"Port getPort2();",
"public void ConfigurePort() {\n\n final String TAG = \"Configure Port Output\";\n try {\n gpioPort = super.service.openGpio(this.gpioPortName);\n // Step 2. Configure as an output.\n gpioPort.setDirection(this.direction);\n\n mHandler.post(mCallBackRunnable);\n } catch (IOException e) {\n Log.e(TAG, \"Error on PeripheralIO API\", e);\n }\n }",
"public interface BitField {\n\n /**\n * @return the size of the field\n */\n int size();\n\n /**\n * set all values of the BitField with the rightmost value being index 0 (LSB).\n * example set(0,0,0,1) would set bit0 == 1 and bit3 == 0\n *\n * @param values the values to set the BitField (only 0 and 1 are accepted)\n * @return the BitField\n */\n void setBits(int... values);\n\n /**\n * set a given bit in the field\n *\n * @param index\n * @param value true == 1, false == 0\n * @throws IndexOutOfBoundsException if you try to set a bit greater than the size of the field\n */\n void setBit(int index, boolean value);\n\n /**\n * set a given bit in the field\n *\n * @param index\n * @param value (only 0 and 1 are accepted)\n * @throws IndexOutOfBoundsException if you try to set a bit greater than the size of the field\n */\n void setBit(int index, int value);\n\n /**\n * replace all values of the bitfield with this integer value\n *\n * @param val\n * @return\n */\n void setToValue(int val);\n\n /**\n * invert all the bits\n */\n void invertAllBits();\n\n /**\n * get a given bit as a boolean\n *\n * @param index\n * @return a boolean for the bit (true == 1, false == 0)\n * @throws IndexOutOfBoundsException if you ask for a bit our of range\n */\n boolean getBit(int index);\n\n /**\n * get a given bit as a 0 or 1\n *\n * @param index\n * @return a value for the bit (1 == 1, 0 == 0)\n * @throws IndexOutOfBoundsException if you ask for a bit our of range\n */\n int getBitAsInt(int index);\n\n /**\n * get the field as an integer\n *\n * @return the int value of the bitfield\n */\n int intValue();\n\n /**\n * return a nice string representation of the field\n *\n * @return\n */\n String asString();\n\n /**\n * get the LSBs of the BitField (if possible)\n *\n * @param digits the number of LSBs to return\n * @return a new BitField of the LSBs\n */\n BitField getLSBs(int digits);\n\n /**\n * get the MSBs of the BitField (if possible)\n *\n * @param digits the number of MSBs to return\n * @return a new BitField of the MSBs\n */\n BitField getMSBs(int digits);\n\n /**\n * return a new BitField. Inclusive\n *\n * @param from index of the from (0==LSB)\n * @param to index of the to (max is the size-1 of the field)\n * @return a new BitField of the chosen bits\n * @throws IndexOutOfBoundsException if you ask for a bit our of range\n */\n BitField getSubField(int from, int to);\n\n /**\n * return a new BitField. Inclusive\n *\n * @param from index of the from (0==LSB)\n * @param to index of the to (if > size then we pad with 0's)\n * @return a new BitField of the chosen bits\n * @throws IndexOutOfBoundsException if you ask for a bit our of range\n */\n BitField getSubFieldWithPadding(int from, int to);\n\n /**\n * a convenience method to add to the LS Bits of the BitField.\n * this will resize the BitField, shift everything to the left and insert\n * the new BitField\n *\n * @param fieldToAddToTheRight\n */\n void shiftAndAddToRight(BitField fieldToAddToTheRight);\n\n /**\n * shift to the left and pad the new LSBs with 0's\n *\n * @param numberToShift the number of bits to shift\n */\n void shiftLeft(int numberToShift);\n\n /**\n * shift to the right and have the LSBs dissapear\n *\n * @param numberToShift the number of bits to shift\n */\n void shiftRight(int numberToShift);\n\n /**\n * resize, but trimming/adding to the MSB side\n * <p>\n * if newSize > currentSize, we pad with 0's on the MSBs\n * if newSize < currentSize, we simply drop the bits on the left\n *\n * @param newSize the new size of the BitField\n */\n void resize(int newSize);\n\n /**\n * copy the BitField\n *\n * @return a copy of the bitField\n */\n BitField copy();\n\n /**\n * convert the bit field and return as a collection of bytes made up from the BitField from the LSB to the MSB. Padding in the MSB if needed\n * (byte == 8 bits).\n * <p>\n * For example:\n * 00001000 would return a list with a single byte value of 8\n * 1000001000 would return a list with the first value being a byte with a value of 8, then one with a value of 2\n *\n * @return a collection with the LSB in position 0 and the MSB as the last value\n */\n List<Byte> getAsBytes();\n\n}",
"public static int bigEndian16ToLittleEndian(int port) {\n // 20480 = 0x5000 should be 0x0050 = 80\n // 47873 = 0xBB01 should be 0x01BB = 443\n return port >> 8 & 0xff | port << 8 & 0xff00;\n }",
"public native int cGPIOWrite(int pin, boolean value);",
"public static native int getDirection(int pin) throws RuntimeException;",
"public DataStructure getPorts() {\r\n\t\treturn ports == null ? EmptyStructures.EMPTY_STRUCTURE : new ArrayList(ports.values());\r\n\t}",
"Port getPort1();",
"public Builder setPort(int value) {\n bitField0_ |= 0x00000002;\n port_ = value;\n onChanged();\n return this;\n }",
"public static int getBit(boolean value) {\n return value ? Constants.BIT_TRUE : Constants.BIT_FALSE;\n }",
"public int getBit(int pos) {\r\n\t\treturn flagBits[pos];\r\n\t\t\r\n\t}",
"public void digitalWrite(int pin, byte value) { // pack this bit into..\r\n int portNumber = (pin >> 3) & 0x0F; // ..8-bit port & send to Ardu\r\n int digiData = digitalOutputData[portNumber & MDB_msk];\r\n if (SpeakEasy){\r\n System.out.println(\"F%%F/digiWrite #\" + pin + \" = \" + value);\r\n }\r\n if ((int) value == 0){\r\n digiData = digiData & ~(1 << (pin & 7));\r\n } else {\r\n digiData = digiData | (1 << (pin & 7));\r\n }\r\n digitalOutputData[portNumber & MDB_msk] = digiData;\r\n Send3bytes(DIGITAL_MESSAGE | portNumber, digiData, -1);\r\n }",
"BitField getLSBs(int digits);",
"public Builder setPort(int value) {\n bitField0_ |= 0x00000004;\n port_ = value;\n onChanged();\n return this;\n }",
"com.google.protobuf.ByteString\n getPortBytes();",
"public static byte getMybit(byte val, int pos){\n return (byte) ((val >> pos) & 1);\n }",
"com.google.protobuf.ByteString\n getPortBytes();",
"public static int getBit(byte input,int position){\n return (input >> position) & 1;\n }",
"int getPort();",
"int getPort();",
"int getPort();",
"int getPort();",
"int getPort();",
"int getPort();",
"int getPort();",
"int getPort();",
"int getPort();",
"int getPort();",
"int getPort();",
"int getPort();",
"int getPort();",
"int getIntegPort();",
"public Range getVideoPortsRange();",
"public static Integer getBit(byte input, int position){\n return ((input >> position) & 1);\n }",
"public Builder setInPort(int value) {\n copyOnWrite();\n instance.setInPort(value);\n return this;\n }",
"public Builder setInPort(int value) {\n copyOnWrite();\n instance.setInPort(value);\n return this;\n }",
"@Override\r\n\tpublic boolean pushValuesForward() {\r\n\t\tboolean isModified = false;\r\n\t\tfor (Port port : getPorts()) {\r\n\t\t\tif (port == getClockPort() || port == getResetPort()\r\n\t\t\t\t\t|| port == getGoPort() && port.getValue() == null) {\r\n\t\t\t\t/*\r\n\t\t\t\t * Do nothing for clock or reset, since they are not passed out\r\n\t\t\t\t * of the OutBuf's module. Also do nothing if the go is not\r\n\t\t\t\t * being fed with a value.\r\n\t\t\t\t */\r\n\t\t\t} else {\r\n\t\t\t\tfinal Value pushedValue = port.getValue();\r\n\t\t\t\tif (pushedValue == null) {\r\n\t\t\t\t\tthrow new NullPointerException(\r\n\t\t\t\t\t\t\t\"Null pointer on pushedValue: \"\r\n\t\t\t\t\t\t\t\t\t+ port.getPeer().showIDLogical()\r\n\t\t\t\t\t\t\t\t\t+ \" Owner: \"\r\n\t\t\t\t\t\t\t\t\t+ this.getOwner().getIDGlobalType()\r\n\t\t\t\t\t\t\t\t\t+ \" Line: \"\r\n\t\t\t\t\t\t\t\t\t+ this.getOwner().getIDSourceInfo()\r\n\t\t\t\t\t\t\t\t\t\t\t.getSourceLine());\r\n\t\t\t\t}\r\n\t\t\t\t/*\r\n\t\t\t\t * If the Bus doesn't have a Value yet, create one.\r\n\t\t\t\t */\r\n\t\t\t\tValue peerValue = port.getPeer().getValue();\r\n\t\t\t\tif (peerValue == null) {\r\n\t\t\t\t\tport.getPeer().setSize(pushedValue.getSize(),\r\n\t\t\t\t\t\t\tpushedValue.isSigned());\r\n\t\t\t\t\tpeerValue = port.getPeer().getValue();\r\n\t\t\t\t\tisModified = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * Rather than depending on the behavior of\r\n\t\t\t\t * Bus.pushValueForward(Value), we need to be more precise here,\r\n\t\t\t\t * since an OutBuf is part Module and part Component. Compare\r\n\t\t\t\t * each pair of Bits.\r\n\t\t\t\t */\r\n\t\t\t\tfor (int i = 0; i < pushedValue.getSize(); i++) {\r\n\t\t\t\t\tfinal Bit pushedBit = pushedValue.getBit(i);\r\n\t\t\t\t\tfinal Bit peerBit = peerValue.getBit(i);\r\n\r\n\t\t\t\t\tif (!pushedValue.bitEquals(i, peerValue, i)\r\n\t\t\t\t\t\t\t&& peerBit.isCare()) {\r\n\t\t\t\t\t\tif (getOwner().isOpaque()) {\r\n\t\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t\t * If this OutBuf lives in an opaque Module, then we\r\n\t\t\t\t\t\t\t * have to avoid pushing through internal non-global\r\n\t\t\t\t\t\t\t * Bits. Since we don't push don't-cares, that only\r\n\t\t\t\t\t\t\t * leaves constants as viable propagatees.\r\n\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\tif (pushedBit.isConstant()) {\r\n\t\t\t\t\t\t\t\tpeerValue.setBit(i, pushedBit);\r\n\t\t\t\t\t\t\t\tisModified = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (pushedBit.isConstant()\r\n\t\t\t\t\t\t\t\t|| !pushedBit.isGlobal()) {\r\n\t\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t\t * Otherwise, this OutBuf lives in a transparent\r\n\t\t\t\t\t\t\t * Module, and we can push through both constant and\r\n\t\t\t\t\t\t\t * internal Bus Bits.\r\n\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\tpeerValue.setBit(i, pushedBit);\r\n\t\t\t\t\t\t\tisModified = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (pushedValue.getCompactedSize() != peerValue\r\n\t\t\t\t\t\t.getCompactedSize()) {\r\n\t\t\t\t\tfinal Bit msb = peerValue.getBit(pushedValue\r\n\t\t\t\t\t\t\t.getCompactedSize() - 1);\r\n\t\t\t\t\tfor (int i = pushedValue.getCompactedSize(); i < peerValue\r\n\t\t\t\t\t\t\t.getSize(); i++) {\r\n\t\t\t\t\t\tpeerValue.setBit(i, msb);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn isModified;\r\n\t}",
"protected void configurePorts() {\n \t\tremoveInputs();\n \t\tremoveOutputs();\n \n \t\t// FIXME: Replace with your input and output port definitions\n \n \t\t// Hard coded input port, expecting a single String\n \t\t//File name for the Input tables\n \t\taddInput(IN_FIRST_INPUT_TABLE, 0, true, null, String.class);\n \t\taddInput(IN_FORMAT_INPUT_TABLE, 0, true, null, String.class);\n \t\taddInput(IN_FORMAT_OUTPUT_TABLE, 0, true, null, String.class);\n \t\taddInput(IN_FILTER, 0, true, null, String.class);\n \t\t\n \t\t\n \t\tif(configBean.getTypeOfInput().compareTo(\"File\")==0){\n \t\t\taddInput(IN_OUTPUT_TABLE_NAME, 0, true, null, String.class);\n \t\t}\n \t\t\n \n \t\t// Optional ports depending on configuration\n \t\t//if (configBean.getExampleString().equals(\"specialCase\")) {\n \t\t//\t// depth 1, ie. list of binary byte[] arrays\n \t\t//\taddInput(IN_EXTRA_DATA, 1, true, null, byte[].class);\n \t\t//\taddOutput(OUT_REPORT, 0);\n \t\t//}\n \t\t\n \t\t// Single value output port (depth 0)\n \t\taddOutput(OUT_SIMPLE_OUTPUT, 0);\n \t\t// Single value output port (depth 0)\n \t\taddOutput(OUT_REPORT, 0);\n \n \t}",
"public <V extends Number> FluentExp<V> bitOr (V value)\n {\n return new BitOr<V>(this, value);\n }",
"private int mappingTOArduinoRange(double value) {\n int x = (int) (value * 10); // 0~10 will be 0~100\n double a = 0;\n double b = 100;\n\n double c = 0;\n double d = 200; // actually, is 80. But I want a more smooth throttle\n int mapped = (int) ((x-a)/(b-a) * (d-c) + c);\n\n if(mapped > ARDUINO_PWM_LIMIT){\n // TODO: trigger tilt alert\n mapped = ARDUINO_PWM_LIMIT;\n }\n\n return mapped;\n }",
"Integer getPortRangeStart();",
"public int getBit(int columnIndex) {\n BitVector vector = (BitVector) table.getVector(columnIndex);\n return vector.get(rowNumber);\n }",
"int getDestinationPort();",
"int getDestinationPort();",
"private List<Permission> convertPermission(int value) {\n\n List<Permission> permissions = new ArrayList<Permission>();\n\n final int CHMOD = 1;\n final int WRITE = 2;\n final int READ = 4;\n final int ALL = 7;\n\n if (value == ALL) {\n permissions.add(Permission.READ);\n permissions.add(Permission.WRITE);\n permissions.add(Permission.CHANGE_PERMISSION);\n return permissions;\n }\n\n if ((value & CHMOD) == CHMOD) {\n permissions.add(Permission.CHANGE_PERMISSION);\n }\n if ((value & READ) == READ) {\n permissions.add(Permission.READ);\n }\n if ((value & WRITE) == WRITE) {\n permissions.add(Permission.WRITE);\n }\n\n return permissions;\n }",
"public Builder setQueryPort(int value) {\n bitField0_ |= 0x00000020;\n queryPort_ = value;\n onChanged();\n return this;\n }",
"int getDirection();",
"public Builder setPort(int value) {\n\n port_ = value;\n onChanged();\n return this;\n }",
"public Builder setPort(int value) {\n\n port_ = value;\n onChanged();\n return this;\n }",
"public Range getTextPortsRange();",
"public void binToDec(){\n\t\tthis.inputBin();\n\t\tif(checkValue()==true){\n\t\t\tthis.toDec();\n\t\t\tthis.outDec();\n\t\t}\n\t}",
"Integer destinationPort();",
"Future<OFPortMod> createPortModAsync(DatapathId dpid, OFPort port, OFPortConfig config, boolean enable);",
"public Builder setDestinationPort(int value) {\n \n destinationPort_ = value;\n onChanged();\n return this;\n }",
"boolean getBit(int index);",
"public int getDirection();",
"public Builder setPort(int value) {\n \n port_ = value;\n onChanged();\n return this;\n }",
"public Builder setPort(int value) {\n \n port_ = value;\n onChanged();\n return this;\n }",
"Integer getPortRangeEnd();",
"int getSnPort();",
"int getSnPort();",
"int getResponsePort();",
"private void commandMotor(int channel, int maskValue){\n\t\tbyte workingByte = (byte)((CMDBIT_GO | maskValue) & 0xff);\n\n\t\tif (motorParams[MOTPARAM_REGULATE][channel] == MOTPARAM_OP_TRUE) workingByte |= CMDBIT_SPEED_MODE;\n\t\tif (motorParams[MOTPARAM_RAMPING][channel] == MOTPARAM_OP_TRUE) workingByte |= CMDBIT_RAMP;\n\t\t// send the message.\n\t\tsendData(REGISTER_MAP[REG_IDX_COMMAND][channel], workingByte);\n\t}",
"public void setSelectedValues(char port, short selectionMask, short valueMask) throws TimeoutException, NotConnectedException {\n\t\tbyte options = 0;\n\t\tboolean isResponseExpected = getResponseExpected(FUNCTION_SET_SELECTED_VALUES);\n\t\tif(isResponseExpected) {\n\t\t\toptions = 8;\n\t\t}\n\t\tByteBuffer bb = ipcon.createRequestBuffer(uid, (byte)11, FUNCTION_SET_SELECTED_VALUES, options, (byte)(0));\n\t\tbb.put((byte)port);\n\t\tbb.put((byte)selectionMask);\n\t\tbb.put((byte)valueMask);\n\n\t\tif(isResponseExpected) {\n\t\t\tbyte[] response = sendRequestExpectResponse(bb.array(), FUNCTION_SET_SELECTED_VALUES);\n\n\t\t\tbb = ByteBuffer.wrap(response, 8, response.length - 8);\n\t\t\tbb.order(ByteOrder.LITTLE_ENDIAN);\n\t\t} else {\n\t\t\tsendRequestNoResponse(bb.array());\n\t\t}\n\t}",
"com.google.protobuf.ByteString\n\t\t\tgetPortBytes();",
"private void setInPort(int value) {\n \n inPort_ = value;\n }",
"private void setInPort(int value) {\n \n inPort_ = value;\n }",
"public void setPortMonoflop(char port, short selectionMask, short valueMask, long time) throws TimeoutException, NotConnectedException {\n\t\tbyte options = 0;\n\t\tboolean isResponseExpected = getResponseExpected(FUNCTION_SET_PORT_MONOFLOP);\n\t\tif(isResponseExpected) {\n\t\t\toptions = 8;\n\t\t}\n\t\tByteBuffer bb = ipcon.createRequestBuffer(uid, (byte)15, FUNCTION_SET_PORT_MONOFLOP, options, (byte)(0));\n\t\tbb.put((byte)port);\n\t\tbb.put((byte)selectionMask);\n\t\tbb.put((byte)valueMask);\n\t\tbb.putInt((int)time);\n\n\t\tif(isResponseExpected) {\n\t\t\tbyte[] response = sendRequestExpectResponse(bb.array(), FUNCTION_SET_PORT_MONOFLOP);\n\n\t\t\tbb = ByteBuffer.wrap(response, 8, response.length - 8);\n\t\t\tbb.order(ByteOrder.LITTLE_ENDIAN);\n\t\t} else {\n\t\t\tsendRequestNoResponse(bb.array());\n\t\t}\n\t}",
"public PeerBuilder ports(int port) {\n\t\tthis.udpPort = port;\n\t\tthis.tcpPort = port;\n\t\treturn this;\n\t}",
"List<PortEntity> getPorts(Map<String, Object> condition);",
"public int portNumb() {\r\n return Integer.parseInt(JOptionPane.showInputDialog(\r\n frame,\r\n \"Enter Port Number\",\r\n \"Port\",\r\n JOptionPane.QUESTION_MESSAGE));\r\n }",
"public byte[] getIOPortWord(int portAddress)\n {\n return null;\n }",
"public void setDirection(byte value) \n\t{\n\t\tdirection = value;\n\t}",
"protected void configurePorts() {\n\t\tremoveInputs();\n\t\tremoveOutputs();\n\n\t\t// FIXME: Replace with your input and output port definitions\n\n\t\t// Hard coded input port, expecting a single String\n\t\t//File name for the Input tables\n\t\taddInput(FIRST_INPUT, 0, true, null, String.class);\n\n\t\t\t\t\n\t\t// Single value output port (depth 0)\n\t\taddOutput(OUT_STD_OUTPUT, 0);\n\t\t// Single value output port (depth 0)\n\t\taddOutput(OUT_ERROR, 0);\n\t\taddOutput(VO_TABLE, 0);\n\n\t}",
"public int getTurnCode(){\n return mask;\n }",
"public void setGPIO(String name, Boolean value) {\n\n Gpio_Set_Request request = Gpio_Set_Request.newBuilder().setName(name).setRequestedState(value).build();\n\n Gpio_Set_Reply response;\n \n try {\n \tresponse = blockingStub.gpioSet(request);\n } catch (StatusRuntimeException e) {\n logger.log(Level.WARNING, \"RPC failed \" + e.getStatus().getDescription() + \" \" + e.getMessage());\n\n // Get the description\n JsonParser parser = new JsonParser();\n JsonObject jsonDescription = parser.parse(e.getStatus().getDescription()).getAsJsonObject();\n \n //Convert to int and string\n int errorCode = jsonDescription.get(\"errorCode\").getAsInt();\n String errorMessage = jsonDescription.get(\"errorMessage\").getAsString();\n \n System.out.println(Integer.toString(errorCode) + \" : \" + errorMessage);\n return;\n }\n }",
"public void led(int x, int y, int value) {\n\t\ttry {\n\t\t\toutput.write((value == 1 ? 3 : 4) | 0x80);\n\t\t\toutput.write(((x << 4) | y) & 0xff);\n\t\t} catch (IOException e) { e.printStackTrace(); }\n\t}",
"public int getPort();",
"public int getPort();",
"public int getPort();",
"public final flipsParser.turnCommandValue_return turnCommandValue() throws RecognitionException {\n flipsParser.turnCommandValue_return retval = new flipsParser.turnCommandValue_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n flipsParser.direction_return direction122 = null;\n\n\n\n try {\n // flips.g:272:2: ( direction )\n // flips.g:272:4: direction\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_direction_in_turnCommandValue1308);\n direction122=direction();\n\n state._fsp--;\n\n adaptor.addChild(root_0, direction122.getTree());\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }",
"public Range getAudioPortsRange();",
"public BitModes getBitMode() throws FTD2XXException {\n ByteByReference byt = new ByteByReference();\n ensureFTStatus(ftd2xx.FT_GetBitMode(ftHandle, byt));\n return BitModes.parse(byt.getValue());\n }",
"public boolean getPinValue() {\n boolean ret = false;\n for (Boolean val : sourceBlocks.values())\n ret = ret | val;\n \n return ret;\n }",
"public int getBit() {\r\n return _bit;\r\n }",
"public int getOutputPortOpenCount(int portNumber) { throw new RuntimeException(\"Stub!\"); }",
"String getPort();",
"native byte[] _readSerialPort(int port);"
] |
[
"0.5501223",
"0.5393062",
"0.51635337",
"0.49046707",
"0.49046707",
"0.48685345",
"0.48006836",
"0.47961414",
"0.47437638",
"0.47435957",
"0.46838188",
"0.46458152",
"0.4608848",
"0.46069178",
"0.45899218",
"0.458459",
"0.45735234",
"0.45620647",
"0.45415205",
"0.4511998",
"0.4496351",
"0.4469379",
"0.44635573",
"0.44602948",
"0.4452867",
"0.4433498",
"0.44116226",
"0.43977866",
"0.4393505",
"0.43889543",
"0.4357543",
"0.4357543",
"0.4357543",
"0.4357543",
"0.4357543",
"0.4357543",
"0.4357543",
"0.4357543",
"0.4357543",
"0.4357543",
"0.4357543",
"0.4357543",
"0.4357543",
"0.4346037",
"0.43295226",
"0.43229663",
"0.42909804",
"0.42909804",
"0.42817363",
"0.42802703",
"0.42646042",
"0.42481732",
"0.42254612",
"0.42113736",
"0.4211171",
"0.4211171",
"0.4209794",
"0.41976717",
"0.41898295",
"0.4179273",
"0.4179273",
"0.41727117",
"0.41653162",
"0.41597793",
"0.41572297",
"0.41537246",
"0.4152159",
"0.41224506",
"0.41207156",
"0.41207156",
"0.41177472",
"0.40934032",
"0.40934032",
"0.40929297",
"0.40922183",
"0.4091593",
"0.40872934",
"0.4086579",
"0.4086579",
"0.40856975",
"0.40795958",
"0.4069745",
"0.40647084",
"0.40642112",
"0.40578958",
"0.4055534",
"0.40538412",
"0.40533403",
"0.40516442",
"0.40497652",
"0.40497652",
"0.40497652",
"0.40382773",
"0.4036117",
"0.40341946",
"0.40340668",
"0.40308917",
"0.4025873",
"0.40150815",
"0.40137807"
] |
0.47774255
|
8
|
Configures a monoflop of the pins specified by the second parameter as 8 bit long bitmask. The specified pins must be configured for output. Nonoutput pins will be ignored. The third parameter is a bitmask with the desired value of the specified output pins (true means high and false means low). The forth parameter indicates the time (in ms) that the pins should hold the value. If this function is called with the parameters ('a', (1 << 0) | (1 << 3), (1 << 0), 1500): Pin 0 will get high and pin 3 will get low on port 'a'. In 1.5s pin 0 will get low and pin 3 will get high again. A monoflop can be used as a failsafe mechanism. For example: Lets assume you have a RS485 bus and an IO16 Bricklet connected to one of the slave stacks. You can now call this function every second, with a time parameter of two seconds and pin 0 set to high. Pin 0 will be high all the time. If now the RS485 connection is lost, then pin 0 will get low in at most two seconds. .. versionadded:: 1.1.2~(Plugin)
|
public void setPortMonoflop(char port, short selectionMask, short valueMask, long time) throws TimeoutException, NotConnectedException {
byte options = 0;
boolean isResponseExpected = getResponseExpected(FUNCTION_SET_PORT_MONOFLOP);
if(isResponseExpected) {
options = 8;
}
ByteBuffer bb = ipcon.createRequestBuffer(uid, (byte)15, FUNCTION_SET_PORT_MONOFLOP, options, (byte)(0));
bb.put((byte)port);
bb.put((byte)selectionMask);
bb.put((byte)valueMask);
bb.putInt((int)time);
if(isResponseExpected) {
byte[] response = sendRequestExpectResponse(bb.array(), FUNCTION_SET_PORT_MONOFLOP);
bb = ByteBuffer.wrap(response, 8, response.length - 8);
bb.order(ByteOrder.LITTLE_ENDIAN);
} else {
sendRequestNoResponse(bb.array());
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void SetOutputPins(int pins ) throws IOException {\n byte value = mDevice.readRegByte( IODIR );\n mDevice.writeRegByte( IODIR, (byte)(value & (~pins)));\n }",
"public void setPin(int pin);",
"private void convert(int pinNum) {\n\t\tgpio = GpioFactory.getInstance();\n\t\tif (pins[pinNum] == null) {\n\t\t\tswitch (pinNum) {\n\t\t\t// Pins for pi1\n\t\t\tcase 0:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_00, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_01, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_02, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_03, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_04, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_05, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_06, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_07, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_08, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_09, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_10, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_11, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_12, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_13, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 14:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_14, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 15:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_15, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_16, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\n\t\t\t// Pins for pi2, will not through exeption for pi1\n\t\t\tcase 17:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_17, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 18:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_18, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 19:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_19, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 20:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_20, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 21:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_21, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 22:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_22, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 23:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_23, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 24:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_24, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 25:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_25, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 26:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_26, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 27:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_27, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 28:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_28, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 29:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_29, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\n\t\t\t// Null if pin dosent exist\n\t\t\tdefault:\n\t\t\t\tpins[pinNum] = null;\n\t\t\t}\n\t\t}\n\t}",
"public void SetInputPins(int pins) throws IOException {\n byte value = mDevice.readRegByte( IODIR );\n mDevice.writeRegByte( IODIR, (byte)(value | pins));\n }",
"void enablePWM(double initialDutyCycle);",
"public native int cGPIOWrite(int pin, boolean value);",
"public MhZ19Pwm(String pin) throws IOException {\n PeripheralManagerService pioService = new PeripheralManagerService();\n mGpio = pioService.openGpio(pin);\n\n try {\n mGpio.setDirection(Gpio.DIRECTION_IN);\n mGpio.setEdgeTriggerType(Gpio.EDGE_BOTH);\n\n } catch (IOException|RuntimeException e) {\n try {\n close();\n } catch (IOException|RuntimeException ignored) {\n }\n throw e;\n }\n\n mThread = new PulseMesThread();\n mThread.start();\n Log.i(TAG,\"Start port read thread\");\n }",
"public void DoPulseCnt(int pin, int ms) { // (simple pulse count turn-on)\r\n int info;\r\n if (GotFirmVersion == 0){\r\n info = GetFirmwareRev();\r\n }\r\n if (GotFirmVersion < 18 * 0x10000){\r\n return; // >: HardAta is installed\r\n }\r\n CountingPulses = ms;\r\n ProPulsePin = pin;\r\n pinMode(pin, Arduino.PULSECOUNT);\r\n }",
"void disablePWM();",
"private void OpenPinInput(int pin, int mode) { // = 0xE0.. // = 0x90..\r\n int whom = (((mode & 0x10) << 1) + 0x20) ^ mode; // -> ANALOG_/DIGITAL_MESSAGE\r\n Timer trix = EatOften;\r\n if (SpeakEasy){\r\n System.out.println(\"F%%F/OpPinInp #\" + pin + \" = \" + mode);\r\n }\r\n if(mode == Arduino.REPORT_VERSION){\r\n whom = mode; // = 0xF9\r\n } else if (mode == Arduino.PULSECOUNT){\r\n whom = mode; // = 7\r\n } else if (mode != Arduino.REPORT_DIGITAL){ // = 0xD0\r\n if (mode != Arduino.REPORT_ANALOG) {\r\n whom = 0; // = 0xC0\r\n }\r\n }\r\n if (whom > 0){\r\n ArduPiModes[pin & 15] = whom;\r\n } else {\r\n trix = null;\r\n }\r\n if (trix == null){ // log any failure..\r\n System.out.println(\" (F%%F/OpPinIn) failed: \" + whom + \"/\" + mode);\r\n return;\r\n } else if (trix.getDelay() == 0) { // start up input thread..\r\n trix.setDelay(1);\r\n trix.start();\r\n if (SpeakEasy){\r\n System.out.println(\" (F%%F/OpPinIn) Timer start OK\");\r\n }\r\n }\r\n Send3bytes(mode | pin & 15, 1, 0);\r\n }",
"public void blink234() {\n printMessage(\"Entering method blink234\\n\");\r\n // Set pin 7 to be output.\r\n if (pin2Out == null) {\r\n pin2Out = new OutPin(2, DEBUGGING, PRINTTRACE);\r\n }\r\n \r\n if (pin3Out == null) {\r\n pin3Out = new OutPin(3, DEBUGGING, PRINTTRACE);\r\n }\r\n \r\n if (pin4Out == null) {\r\n pin4Out = new OutPin(4, DEBUGGING, PRINTTRACE);\r\n }\r\n \r\n pin2Out.setValue(true);\r\n delayMilliSec(5000);\r\n pin2Out.setValue(false);\r\n pin3Out.setValue(true);\r\n delayMilliSec(5000);\r\n pin3Out.setValue(false);\r\n pin4Out.setValue(true);\r\n delayMilliSec(5000);\r\n pin4Out.setValue(false);\r\n \r\n for (int j = 0; j < 120; j++) {\r\n pin2Out.setValue(true);\r\n pin3Out.setValue(true);\r\n pin4Out.setValue(true);\r\n delayMilliSec(250);\r\n pin2Out.setValue(false);\r\n pin3Out.setValue(false);\r\n pin4Out.setValue(false);\r\n delayMilliSec(250);\r\n }\r\n \r\n printMessage(\"End of method blink234\");\r\n }",
"public LED()\n {\n this(defaultPin);\n }",
"public void GPIOWrite(int pin, int data)\n\t{\n\t\tint gpioMask = 1 << 4;\n\t\tint meta = gpioMask | (pin);\n\t\twrite(meta);\n\t\twrite(data);\n\t}",
"private void setGpioPin(int pin) \n\t{\n\t\tGpioUtil.setEdgeDetection(pin, GpioUtil.EDGE_RISING);\n\t\tGpio.pinMode(pin, Gpio.INPUT);\n\t\tGpio.pullUpDnControl(pin, Gpio.PUD_DOWN); \n\t\tGpioInterrupt.enablePinStateChangeCallback(pin);\n\t}",
"public void setPinValueForNotification(int pinValue, long eventTime, boolean isSensorTime, boolean notify);",
"public LED(int pin)\n {\n // Pin allocation is handled by a GpioController. So first we have to get that from the Factory.\n GpioController gpio = GpioFactory.getInstance();\n \n // Now we need to ask the Controller to allocate (provision) the pin for us as a Digital Output pin. \n // The parameter PinState.LOW means that initially, we want to set this pin to LOW (off).\n ledPin = gpio.provisionDigitalOutputPin(pinMap[pin], PinState.LOW);\n }",
"public void setCustomLimit(int rpmForPin1, int rpmForPin2, int rpmForPin3,\n\t\t\tint rpmForBlinking) {\n\t\tthis.rpmForPin1 = rpmForPin1;\n\t\tthis.rpmForPin2 = rpmForPin2;\n\t\tthis.rpmForPin3 = rpmForPin3;\n\t\tthis.rpmForBlinking = rpmForBlinking;\n\t}",
"void setPWMRate(double rate);",
"public void pin();",
"public void pin();",
"OnOffSwitch alarmSwitch();",
"public abstract boolean sjekkPIN(int pin);",
"public static void main(String[] args) throws Exception\n\t{\n\t\t\t\n\t\tint temp = GPIOUtil.in(LED_PIN);\n\t\n\t\tif( temp == ON ) {\n\t\t\tGPIOUtil.out(LED_PIN, OFF);\n\t\t} else {\n\t\t\tfor (int i = 0; i < 50; i++) {\n\t\t\t\tGPIOUtil.out(LED_PIN,ON,50);\n\t\t\t\tGPIOUtil.out(LED_PIN,OFF,50);\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\t\t\t\n\t\tGPIOUtil.out(LED_PIN, OFF);\n\n\t\t/** DON'T FORGET TO SET THE PINS BACK TO ORIGINAL VALUES **/\n\t}",
"public void pinMode(int pin, byte mode) { // in {FF} Arduino\r\n int whom = ((int) mode) & 255;\r\n if (SpeakEasy){\r\n System.out.println(\"F%%F/pinMode #\" + pin + \" = \" + whom);\r\n }\r\n if ((whom & -8) != 0){\r\n return; // not a valid pin mode\r\n }\r\n if ((pin & -16) != 0){\r\n return; // not a valid pin\r\n }\r\n if (IOSettings.useServos) {\r\n /* Old version: */\r\n if (ArduPiModes[pin & 15] != whom){\r\n while (true) {\r\n if (whom == Arduino.INPUT){\r\n whom = Arduino.REPORT_DIGITAL; // = 0xD0 (208)\r\n } else if (whom == Arduino.ANALOG) {\r\n whom = Arduino.REPORT_ANALOG; // = 0xC0 (192)\r\n } else if (whom != Arduino.REPORT_VERSION && whom != Arduino.PULSECOUNT){\r\n break; // = 7\r\n }\r\n OpenPinInput(pin, whom);\r\n break;\r\n } //~while\r\n }\r\n /* New Version: */\r\n } else {\r\n if (ArduPiModes[pin & 15] != whom && whom == Arduino.REPORT_VERSION && whom == Arduino.PULSECOUNT) {\r\n if (whom == Arduino.INPUT) {\r\n whom = Arduino.REPORT_DIGITAL;\r\n } else if (whom == Arduino.ANALOG) {\r\n whom = Arduino.REPORT_ANALOG;\r\n }\r\n OpenPinInput(pin, whom);\r\n }\r\n }\r\n Send3bytes(SET_PIN_MODE, pin, mode);\r\n }",
"@Override\r\n\tpublic void visit(SimplePin pin) {\n\t\tboolean pinMod;\r\n\t\tif (isForward()) {\r\n\t\t\tpinMod = pin.propagateValuesForward();\r\n\t\t} else {\r\n\t\t\tpinMod = pin.propagateValuesBackward();\r\n\t\t}\r\n\t\tmodified |= pinMod;\r\n\t}",
"public int\n setBitRate(int bitRate);",
"public ControlBoard(ModReciever md) {\n\t\tthis.md = md;\n\t\t// PIN Diagram\n\t\t// 0 - MIDI Reset\n\t\t// 1 DoHarm\n\t\t// 2 DoInvert\n\t\t// 3 DoHarmDiatonically\n\t\t// 4 Set Tonic\n\t\t// 5 Set Harm Interval\n\t\t// 6 Set ScaleType\n\t\t// 7 C/Octave Major\n\t\t// 8 C#/m2 Minor\n\t\t// 9 D/M2 Harmonic Minor\n\t\t// 10 D#/m3 Melodic Minor A\n\t\t// 11 E/M3 Melodic Minor B\n\t\t// 12 F/P4 Dorian\n\t\t// 13 F#/TT Phrygian\n\t\t// 14 G/P5 Lydian\n\t\t// 15 G#/m6 Mixolydian\n\t\t// 16 A/M6 Locrian\n\t\t// 17 A#/m7\n\t\t// 18 B/M7\n\t\t// 19 DOHARM LED\n\t\t// 20 DOHARMDIATONIC LED\n\t\t// 21 DOINVERT LED\n\t\t// 22 SETHARMINT LED\n\t\t// 23 SETTONIC LED\n\t\t// 24 RUNNING LED\n\t\t// 25 SETSCALE LED\n\t\t// POWER LED OFF 5v\n\n\t\t// Set Up Input Pins\n\t\tmidiReset = gp.provisionDigitalInputPin(RaspiPin.GPIO_00, PinPullResistance.PULL_DOWN);\n\t\tmidiReset.addListener(this);\n\t\tmidiReset.setName(\"RESET\");\n\t\tdoHarmonize = gp.provisionDigitalInputPin(RaspiPin.GPIO_01, PinPullResistance.PULL_DOWN);\n\t\tdoHarmonize.addListener(this);\n\t\tdoHarmonize.setName(\"doHarmonize\");\n\t\tdoInvert = gp.provisionDigitalInputPin(RaspiPin.GPIO_02, PinPullResistance.PULL_DOWN);\n\t\tdoInvert.addListener(this);\n\t\tdoInvert.setName(\"doInvert\");\n\t\tdoHarmonizeDiatonically = gp.provisionDigitalInputPin(RaspiPin.GPIO_03, PinPullResistance.PULL_DOWN);\n\t\tdoHarmonizeDiatonically.addListener(this);\n\t\tdoHarmonizeDiatonically.setName(\"doHarmonizeDiatonically\");\n\t\tsetTonic = gp.provisionDigitalInputPin(RaspiPin.GPIO_04, PinPullResistance.PULL_DOWN);\n\t\tsetTonic.addListener(this);\n\t\tsetTonic.setName(\"setTonic\");\n\t\tsetHarmonicInterval = gp.provisionDigitalInputPin(RaspiPin.GPIO_05, PinPullResistance.PULL_DOWN);\n\t\tsetHarmonicInterval.addListener(this);\n\t\tsetHarmonicInterval.setName(\"setHarmonicInterval\");\n\t\tsetScaleType = gp.provisionDigitalInputPin(RaspiPin.GPIO_06, PinPullResistance.PULL_DOWN);\n\t\tsetScaleType.addListener(this);\n\t\tsetScaleType.setName(\"setScaleType\");\n\t\ttonicC = gp.provisionDigitalInputPin(RaspiPin.GPIO_07, PinPullResistance.PULL_DOWN);\n\t\ttonicC.addListener(this);\n\t\ttonicC.setName(\"tonicC\");\n\t\ttonicCS = gp.provisionDigitalInputPin(RaspiPin.GPIO_08, PinPullResistance.PULL_DOWN);\n\t\ttonicCS.addListener(this);\n\t\ttonicCS.setName(\"tonicCS\");\n\t\ttonicD = gp.provisionDigitalInputPin(RaspiPin.GPIO_09, PinPullResistance.PULL_DOWN);\n\t\ttonicD.addListener(this);\n\t\ttonicD.setName(\"tonicD\");\n\t\ttonicDS = gp.provisionDigitalInputPin(RaspiPin.GPIO_10, PinPullResistance.PULL_DOWN);\n\t\ttonicDS.addListener(this);\n\t\ttonicDS.setName(\"tonicDS\");\n\t\ttonicE = gp.provisionDigitalInputPin(RaspiPin.GPIO_11, PinPullResistance.PULL_DOWN);\n\t\ttonicE.addListener(this);\n\t\ttonicE.setName(\"tonicE\");\n\t\ttonicF = gp.provisionDigitalInputPin(RaspiPin.GPIO_12, PinPullResistance.PULL_DOWN);\n\t\ttonicF.addListener(this);\n\t\ttonicF.setName(\"tonicF\");\n\t\ttonicFS = gp.provisionDigitalInputPin(RaspiPin.GPIO_13, PinPullResistance.PULL_DOWN);\n\t\ttonicFS.addListener(this);\n\t\ttonicFS.setName(\"tonicFS\");\n\t\ttonicG = gp.provisionDigitalInputPin(RaspiPin.GPIO_14, PinPullResistance.PULL_DOWN);\n\t\ttonicG.addListener(this);\n\t\ttonicG.setName(\"tonicG\");\n\t\ttonicGS = gp.provisionDigitalInputPin(RaspiPin.GPIO_15, PinPullResistance.PULL_DOWN);\n\t\ttonicGS.addListener(this);\n\t\ttonicGS.setName(\"tonicGS\");\n\t\ttonicA = gp.provisionDigitalInputPin(RaspiPin.GPIO_16, PinPullResistance.PULL_DOWN);\n\t\ttonicA.addListener(this);\n\t\ttonicA.setName(\"tonicA\");\n\t\ttonicAS = gp.provisionDigitalInputPin(RaspiPin.GPIO_17, PinPullResistance.PULL_DOWN);\n\t\ttonicAS.addListener(this);\n\t\ttonicAS.setName(\"tonicAS\");\n\t\ttonicB = gp.provisionDigitalInputPin(RaspiPin.GPIO_18, PinPullResistance.PULL_DOWN);\n\t\ttonicB.addListener(this);\n\t\ttonicB.setName(\"tonicB\");\n\n\t\t// Set LED Pins\n\t\tdoHarmLed = gp.provisionDigitalOutputPin(RaspiPin.GPIO_19);\n\t\tdoHarmDiatonicLed = gp.provisionDigitalOutputPin(RaspiPin.GPIO_20);\n\t\tdoInvertLed = gp.provisionDigitalOutputPin(RaspiPin.GPIO_21);\n\t\tsetHarmIntLed = gp.provisionDigitalOutputPin(RaspiPin.GPIO_22);\n\t\tsetTonicLed = gp.provisionDigitalOutputPin(RaspiPin.GPIO_23);\n\t\tisRunningLed = gp.provisionDigitalOutputPin(RaspiPin.GPIO_24);\n\t\tsetScaleLed = gp.provisionDigitalOutputPin(RaspiPin.GPIO_25);\n\n\t\t// Test LEDS\n\t\tdoHarmLed.high();\n\t\t_wait();\n\t\tdoHarmLed.low();\n\t\tdoHarmDiatonicLed.high();\n\t\t_wait();\n\t\tdoHarmDiatonicLed.low();\n\t\tdoInvertLed.high();\n\t\t_wait();\n\t\tdoInvertLed.low();\n\t\tsetHarmIntLed.high();\n\t\t_wait();\n\t\tsetHarmIntLed.low();\n\t\tsetTonicLed.high();\n\t\t_wait();\n\t\tsetTonicLed.low();\n\t\tisRunningLed.high();\n\t\t_wait();\n\t\tisRunningLed.low();\n\t\tsetScaleLed.high();\n\t\t_wait();\n\t\tsetScaleLed.low();\n\n\t\t// Set Pin defaults\n\t\tdoHarmLed.high();\n\t\tdoHarmDiatonicLed.low();\n\t\tdoInvertLed.low();\n\t\tsetHarmIntLed.low();\n\t\tsetTonicLed.low();\n\t\tisRunningLed.high();\n\t\tsetScaleLed.low();\n\n\t\t// Add shutdown hook to ensure all LEDs are powered OFF on shutdown\n\t\tRuntime.getRuntime().addShutdownHook(new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\tdoHarmLed.low();\n\t\t\t\tdoHarmDiatonicLed.low();\n\t\t\t\tdoInvertLed.low();\n\t\t\t\tsetHarmIntLed.low();\n\t\t\t\tsetTonicLed.low();\n\t\t\t\tisRunningLed.low();\n\t\t\t\tsetScaleLed.low();\n\t\t\t}\n\t\t});\n\t}",
"public void analogWrite(int pin, int data)\n\t{\n\t\tint analogMask = 1 << 5;\n\t\tint meta = analogMask | (pin);\n\t\twrite(meta);\n\t\twrite(data);\n\t}",
"public OpenToLANConfig() {\n this.port = 0;\n this.delayBetweenPings = Duration.of(1500, TimeUnit.MILLISECOND);\n this.delayBetweenEvent = Duration.of(30, TimeUnit.SECOND);\n }",
"public void digitalWrite(int pin, byte value) { // pack this bit into..\r\n int portNumber = (pin >> 3) & 0x0F; // ..8-bit port & send to Ardu\r\n int digiData = digitalOutputData[portNumber & MDB_msk];\r\n if (SpeakEasy){\r\n System.out.println(\"F%%F/digiWrite #\" + pin + \" = \" + value);\r\n }\r\n if ((int) value == 0){\r\n digiData = digiData & ~(1 << (pin & 7));\r\n } else {\r\n digiData = digiData | (1 << (pin & 7));\r\n }\r\n digitalOutputData[portNumber & MDB_msk] = digiData;\r\n Send3bytes(DIGITAL_MESSAGE | portNumber, digiData, -1);\r\n }",
"public void ConfigurePort() {\n\n final String TAG = \"Configure Port Output\";\n try {\n gpioPort = super.service.openGpio(this.gpioPortName);\n // Step 2. Configure as an output.\n gpioPort.setDirection(this.direction);\n\n mHandler.post(mCallBackRunnable);\n } catch (IOException e) {\n Log.e(TAG, \"Error on PeripheralIO API\", e);\n }\n }",
"public void run() {\n\t\tfinal GpioController gpio = GpioFactory.getInstance();\n\t\tfinal GpioPinDigitalOutput fOn = gpio.provisionDigitalOutputPin(\n\t\t\t\tRaspiPin.GPIO_01, \"FrontOn\", PinState.HIGH);\n\t\tfinal GpioPinDigitalOutput IOback = gpio.provisionDigitalOutputPin(\n\t\t\t\tRaspiPin.GPIO_15, \"Back\", PinState.LOW);\n\t\tfinal GpioPinDigitalOutput IOfront = gpio.provisionDigitalOutputPin(\n\t\t\t\tRaspiPin.GPIO_16, \"Front\", PinState.LOW);\n\n\t\t// pin 6 on. 10 left, 11 right.\n\t\tfinal GpioPinDigitalOutput tOn = gpio.provisionDigitalOutputPin(\n\t\t\t\tRaspiPin.GPIO_06, \"turnOn\", PinState.HIGH);\n\t\tfinal GpioPinDigitalOutput IOleft = gpio.provisionDigitalOutputPin(\n\t\t\t\tRaspiPin.GPIO_10, \"Left\", PinState.LOW);\n\t\tfinal GpioPinDigitalOutput IOright = gpio.provisionDigitalOutputPin(\n\t\t\t\tRaspiPin.GPIO_11, \"Right\", PinState.LOW);\n\t\tSystem.out.println(\"initilised GPIO pins\");\n\t\t\n\t\twhile (keepgoing) {\n\t\t\tswitch (front) {\n\t\t\tcase 0:\n\t\t\t\tIOfront.setState(PinState.HIGH);\n\t\t\t\tIOback.setState(PinState.LOW);\n\t\t\t\t//sets pins for not moving\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tIOfront.setState(PinState.LOW);\n\t\t\t\tIOback.setState(PinState.LOW);\n\t\t\t\t//sets pins for \n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tIOfront.setState(PinState.LOW);\n\t\t\t\tIOback.setState(PinState.HIGH);\n\t\t\t\t//sets pins for backwards\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tswitch (side) {\n\t\t\tcase 0:\n\t\t\t\tIOleft.setState(PinState.HIGH);\n\t\t\t\tIOright.setState(PinState.LOW);\n\t\t\t\t//sets pins for left\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tIOleft.setState(PinState.LOW);\n\t\t\t\tIOright.setState(PinState.LOW);\n\t\t\t\t//sets pins for not turning\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tIOleft.setState(PinState.LOW);\n\t\t\t\tIOright.setState(PinState.HIGH);\n\t\t\t\t//sets pins for right\n\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\tgpio.shutdown();\n\n\t}",
"public void enableMic(boolean enable);",
"public void addBasedOnPacketIn(IOFSwitch sw, OFPacketIn pin, FloodlightContext cntx, OFPort outPort) {\n }",
"public Pin(int pin) {\r\n if (is4Digit(pin))\r\n this.pin = pin;\r\n }",
"public void turnLightsOn()\n {\n set(Relay.Value.kForward);\n }",
"public void simpleAdd(IOFSwitch sw, OFPacketIn pin, FloodlightContext cntx, OFPort outPort) {\n\n\n \t\n //TODO: Create OFFlowMod.Builder\n \tOFFlowMod.Builder fmb = sw.getOFFactory().buildFlowAdd();\n\n //TODO: Create Match\n \tMatch.Builder mb = sw.getOFFactory().buildMatch();\n \tmb.setExact(MatchField.IN_PORT, pin.getMatch().get(MatchField.IN_PORT));\n \tMatch m = mb.build();\n\n //TODO: Create Actions\n \tOFActionOutput.Builder aob = sw.getOFFactory().actions().buildOutput();\n \tList<OFAction> actions = new ArrayList<OFAction>();\n \taob.setPort(outPort);\n \taob.setMaxLen(Integer.MAX_VALUE);\n \tactions.add(aob.build());\n\n //TODO: Bind match and actions with OFFlowMod.Builder\n \tfmb.setMatch(m).setBufferId(pin.getBufferId()).setOutPort(outPort).setPriority(FLOWMOD_DEFAULT_PRIORITY);\n \tfmb.setActions(actions);\n\n //TODO: Send FlowMod message to switch\n \ttry {\n \t\tsw.write(fmb.build());\n \t\tlogger.info(\"Flow from port {} forwarded to port {}); match: {}\",\n \t\t\t\tnew Object [] {pin.getMatch().get(MatchField.IN_PORT).getPortNumber(), outPort.getPortNumber(), m.toString()});\n \t\t} catch(Exception e) {\n \t\t\tlogger.error(\"error {}\", e);\n \t\t}\n }",
"@Override\n public void onPinChange(int pinLength, String intermediatePin) {\n }",
"public void DisableInterrupt(int pins) throws IOException {\n int value = (int)mDevice.readRegByte( GPINTEN );\n value &= ~pins;\n mDevice.writeRegByte( GPINTEN, (byte)value );\n }",
"public void Interrupt_on_Changes(int pins) throws IOException {\n int value = (int)mDevice.readRegByte( INTCON );\n value &= ~pins;\n mDevice.writeRegByte( INTCON, (byte)value );\n value = (int)mDevice.readRegByte( GPINTEN );\n value |= pins;\n mDevice.writeRegByte( GPINTEN, (byte)value );\n }",
"InputPin getSecond();",
"AnalogPin createAnalogPin();",
"void powerOn();",
"void roll(int pins);",
"void enableAnalog(double minPressurePSI, double maxPressurePSI);",
"public void turnShieldOnFor(int minutes, IServerCallback callback) {\n try {\n JSONObject data = new JSONObject();\n data.put(Parameter.minutes.name(), minutes);\n\n ServerCall sc = new ServerCall(ServiceName.matchMaking, ServiceOperation.SHIELD_ON_FOR, data, callback);\n _client.sendRequest(sc);\n } catch (JSONException ignored) {\n }\n }",
"public void turnLightsOff()\n {\n set(Relay.Value.kOff);\n }",
"void setBits(int... values);",
"public static void main(String[] args) {\n\t\tint m = 12345;\n\t\tint n = 123;\n\t\tString mBin = \"11000000111001\";\n\t\tString nBin = \"1111011\";\n\t\tSystem.out.println(updateBits(mBin, nBin, 2, 8));\n\t\t//myUpdateBits(412, 14, 4, 7);\n\t}",
"public void setLaMinutes(int laMinutes) {\n this.laMinutes = laMinutes;\n }",
"public void led(int x, int y, int value) {\n\t\ttry {\n\t\t\toutput.write((value == 1 ? 3 : 4) | 0x80);\n\t\t\toutput.write(((x << 4) | y) & 0xff);\n\t\t} catch (IOException e) { e.printStackTrace(); }\n\t}",
"private static BitSet makeBitSet( int... args ) {\n\tBitSet result = new BitSet( MAX_OPCODE + 1 ) ;\n\tfor (int value : args )\n\t result.set( value ) ;\n\treturn result ;\n }",
"public void changingLights(int[][] lightsOnOff) {\n if(this.command.equals(\"turn on\")) {\n for(int i = this.startCoord[0]; i <= this.endCoord[0]; i++) {\n for(int j = this.startCoord[1]; j <= this.endCoord[1]; j++) {\n lightsOnOff[i][j] = 1;\n }\n }\n }\n /* if the command is \"turn off\", the range of\n * lights are made to have value of 0 */\n if(this.command.equals(\"turn off\")) {\n for(int i = this.startCoord[0]; i <= this.endCoord[0]; i++) {\n for(int j = this.startCoord[1]; j <= this.endCoord[1]; j++) {\n lightsOnOff[i][j] = 0;\n }\n }\n }\n /* if the command is \"toggle all\", the range of\n * lights are made to have value of 1 if they\n * were 0 before and 0 if they were 1 before */\n if(this.command.equals(\"toggle all\")) {\n for(int i = this.startCoord[0]; i <= this.endCoord[0]; i++) {\n for(int j = this.startCoord[1]; j <= this.endCoord[1]; j++) {\n lightsOnOff[i][j] = 1 - lightsOnOff[i][j];\n }\n }\n }\n }",
"void setShutterLEDState(boolean on);",
"public void inputChangeEvent( float time, int dstPin, boolean v ) {\n\tvalue = !v;\n\t Simulator.schedule(\n\t new Simulator.Event( time\n\t\t + (delay * 0.95f)\n\t\t + PRNG.randomFloat( delay * 0.1f ) ) {\n\t\t void trigger() {\n\t\t\t outputChangeEvent( this.time );\n\t\t }\n\t\t}\n\t );\n }",
"public static native void OpenMM_AmoebaMultipoleForce_setMutualInducedMaxIterations(PointerByReference target, int inputMutualInducedMaxIterations);",
"public void setPIN (String PIN);",
"public void turnLED(int sec){\n final GpioPinDigitalOutput pin = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_01, \"PinLED\", PinState.HIGH);\n System.out.println(\"light is: ON\");\n \n // wait sec seconds\n try {\n\t\t\tThread.sleep(sec *1000);\n\t\t\tpin.low();\n\t\t\tSystem.out.println(\"light is: OFF\");\n\t\t\tpin.blink(3);\n\t\t\tgpio.shutdown();\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void Perform_LPM_I()\n {\n int zindex = get_z();\n int wordlocation = zindex >> 1;\n try\n {\n if (Utils.bit0(zindex))\n set_reg(0,(program_memory[wordlocation] & 0xff00) >> 8);\n else\n set_reg(0,program_memory[wordlocation] & 0x00ff);\n }\n catch (RuntimeException e) { } \n clockTick();\n clockTick();\n return;\n }",
"public static void main(String[] args) throws InterruptedException {\n\n System.out.println(\"<--Pi4J--> Non-Privileged GPIO Example ... started.\");\n\n // we can use this utility method to pre-check to determine if\n // privileged access is required on the running system\n if(GpioUtil.isPrivilegedAccessRequired()){\n System.err.println(\"*****************************************************************\");\n System.err.println(\"Privileged access is required on this system to access GPIO pins!\");\n System.err.println(\"*****************************************************************\");\n return;\n }\n\n // ----------------------\n // ATTENTION\n // ----------------------\n // YOU CANNOT USE ANY HARDWARE PWM OR CLOCK FUNCTIONS WHILE ACCESSING NON-PRIVILEGED GPIO.\n // THIS METHOD MUST BE INVOKED BEFORE CREATING A GPIO CONTROLLER INSTANCE.\n GpioUtil.enableNonPrivilegedAccess();\n\n // create gpio controller\n final GpioController gpio = GpioFactory.getInstance();\n\n // ------------\n // OUTPUT PIN\n // ------------\n\n // provision gpio pin #01 as an output pin and blink it\n final GpioPinDigitalOutput output = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_07);\n\n // set shutdown state for the output pin (and un-export the pin)\n output.setShutdownOptions(true, PinState.LOW);\n\n // blink output pin every one second\n output.blink(1000);\n\n // display info to user\n System.out.println(\"Pin [\" + output.getName() + \"] should be blinking/toggling every 1 second.\");\n\n // ------------\n // INPUT PIN\n // ------------\n\n // provision gpio pin #02 as an input pin with its internal pull down resistor enabled\n final GpioPinDigitalInput input = gpio.provisionDigitalInputPin(RaspiPin.GPIO_17, PinPullResistance.PULL_DOWN);\n\n // set shutdown state for the input pin (and un-export the pin)\n input.setShutdownOptions(true);\n\n // create and register gpio pin listener\n input.addListener(new GpioPinListenerDigital() {\n @Override\n public void handleGpioPinDigitalStateChangeEvent(GpioPinDigitalStateChangeEvent event) {\n // display pin state on console\n System.out.println(\" --> GPIO PIN STATE CHANGE: \" + event.getPin() + \" = \" + event.getState());\n }\n });\n\n // display info to user\n System.out.println(\"You can connect pin [\" + input.getName() + \"] to +3VDC to capture input state changes.\");\n\n // ----------------\n // WAIT & SHUTDOWN\n // ----------------\n\n // sleep for 1 minute, then shutdown\n Thread.sleep(60000);\n\n // shutdown all GPIO activity/threads by shutting down the GPIO controller\n // (this method will forcefully shutdown all GPIO monitoring threads and scheduled tasks)\n gpio.shutdown();\n\n System.out.println(\"Exiting NonPrivilegedGpioExample\");\n }",
"public static void main(String[] args) \n\t{\n\t\t\tif(getPin()==pin)\n\t\t\t\t{\n\t\t\t\t\twhile (true)\n\t\t\t\t\t{\n\t\t\t\t\t\tgetOptions();\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tincorrectPin();\n\t\t\t}\n\t}",
"public void setMaximumNumberOfLightsToTurnOn(int maximumNumberOfLightsToTurnOn) {\n\t\tthis.maxLightsToTurnOnPerRoom = maximumNumberOfLightsToTurnOn;\n\t}",
"public void setGPIO(String name, Boolean value) {\n\n Gpio_Set_Request request = Gpio_Set_Request.newBuilder().setName(name).setRequestedState(value).build();\n\n Gpio_Set_Reply response;\n \n try {\n \tresponse = blockingStub.gpioSet(request);\n } catch (StatusRuntimeException e) {\n logger.log(Level.WARNING, \"RPC failed \" + e.getStatus().getDescription() + \" \" + e.getMessage());\n\n // Get the description\n JsonParser parser = new JsonParser();\n JsonObject jsonDescription = parser.parse(e.getStatus().getDescription()).getAsJsonObject();\n \n //Convert to int and string\n int errorCode = jsonDescription.get(\"errorCode\").getAsInt();\n String errorMessage = jsonDescription.get(\"errorMessage\").getAsString();\n \n System.out.println(Integer.toString(errorCode) + \" : \" + errorMessage);\n return;\n }\n }",
"public void on() {\n // Sets the LED pin state to 1 (high)\n ledPin.high();\n }",
"public void setLatencyParameters(int input, int output){\n\t\tif (input < 10000){Ts = (double)input/500000;}\n\t\tif (input >= 10000 && input <= 50000 ){Ts = (double)input/700000;}\n\t\tif (input > 50000){Ts = (double)input/900000;}\n\t\t\n\t\tif(output < 10000){Tr = (double)output/500000;}\n\t\tif (output >= 10000 && output <= 50000 ){Tr = (double)output/700000;}\n\t\tif (output > 50000){Tr = (double)output/900000;}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*for(int i = 0; i < nSN; i++ ){\n\t\t\tlatencyRemote[i][mthMD] = (Ts + Tp + Tr);\n\t\t\t}*/\n\t\t}",
"void enableHybrid(double minPressurePSI, double maxPressurePSI);",
"public interface ProfilePINEnable\n {\n /**\n * no need input pin\n */\n String NEEDLESS_INPUT = \"0\";\n\n /**\n * need input pin\n */\n String NEED_INPUT = \"1\";\n }",
"public void enableLime(LimeState val);",
"public void setLoMinutes(int loMinutes) {\n this.loMinutes = loMinutes;\n }",
"public void blink7() {\n printMessage(\"Entering method blink7\\n\");\r\n\r\n // Set pin 7 to be output.\r\n if (pin7Out == null) {\r\n pin7Out = new OutPin(7, DEBUGGING, PRINTTRACE);\r\n }\r\n\r\n // Loop through this 3 times, change the \"3\" in \"i<3\" to \r\n // the number of times you want it to loop.\r\n for (int i = 0; i < 3; i++) {\r\n // Print out a message with the loop number.\r\n printMessage(\"Entering loop, iteration: \" + i);\r\n\r\n\r\n // Turn on pin 7.\r\n pin7Out.setValue(true);\r\n\r\n // Delay for number of milliseconds in parentheses.\r\n // this leaves LED on for a time period.\r\n delayMilliSec(500 * (i + 1));\r\n\r\n // turn off gpio pin 7\r\n pin7Out.setValue(false);\r\n\r\n // Delay for number of milliseconds in parentheses.\r\n // This leaves LED off for a time period.\r\n delayMilliSec(500 * (i + 1));\r\n }\r\n\r\n // Print \"End of method blink7\" to the screen\r\n printMessage(\"End of method blink7\");\r\n }",
"public OwnerPIN(byte tryLimit, byte maxPINSize) throws PINException{\n \n if ((tryLimit<1) || (maxPINSize<1)) PINException.throwIt( PINException.ILLEGAL_VALUE );\n pinValue = new byte[maxPINSize]; //default value 0\n this.pinSize = maxPINSize; //default\n this.maxPINSize = maxPINSize;\n this.tryLimit = tryLimit;\n triesLeft = new byte[1];\n resetTriesRemaining();\n }",
"public void setIntakeLights(){\n \tintakeLights.set(true);\n }",
"public arm a(int paramInt1, int paramInt2)\r\n/* 18: */ {\r\n/* 19:32 */ return this.b[(paramInt1 & 0xF | (paramInt2 & 0xF) << 4)];\r\n/* 20: */ }",
"void setCollideBits (long bits);",
"public static void main(String[] args) {\n\n\t\tint bitmask = 0xF0F0;\n\t\tint value = 0x0000;\n\t\tSystem.out.println(bitmask ^ value); // Prints 0xF0F0 = 61680\n\n\t\tbitmask = 0xF0F0;\n\t\tvalue = 0x0F0F;\n\t\tSystem.out.println(bitmask ^ value); // Prints 0xFFFF = 65535\n\n\t\tbitmask = 0xF0F0;\n\t\tvalue = 0xF0F0;\n\t\tSystem.out.println(bitmask ^ value); // Prints 0\n\t}",
"new LED();",
"private void rumble(boolean on) {\n // Set the time point, so we know when to start or stop rumbling\n timePoint = Timer.getFPGATimestamp();\n\n // Set the state\n state = on ? RUMBLE : BREAK;\n\n // If rumble is on, full power. Otherwise, no power.\n double rumbleIntensity = (on ? intensity : 0.0);\n\n // Rumble the appropriate joysticks\n if (controllerToRumble == JoystickSelection.DRIVER_JOYSTICK || controllerToRumble == JoystickSelection.BOTH_JOYSTICKS) {\n driver.setRumble(RumbleType.kRightRumble, rumbleIntensity);\n driver.setRumble(RumbleType.kLeftRumble, rumbleIntensity);\n }\n\n if (controllerToRumble == JoystickSelection.OPERATOR_JOYSTICK || controllerToRumble == JoystickSelection.BOTH_JOYSTICKS) {\n operator.setRumble(RumbleType.kRightRumble, rumbleIntensity);\n operator.setRumble(RumbleType.kLeftRumble, rumbleIntensity);\n }\n }",
"void writeBits(long bits, int numBits) throws IOException;",
"public void setEight(boolean eight);",
"private static void writeNibbleParallel(boolean rs, int data) {\n if(rs) HAL.writeBits(NIBBLE_MASK_SIZE,0x10);\n else HAL.writeBits(NIBBLE_MASK_SIZE,0);\n HAL.writeBits(0x20,0x20);\n HAL.writeBits(NIBBLE_MASK,data);\n HAL.writeBits(0x20,0);\n }",
"public MultiClockPipe() {\n this(32, ClockDomain.GLOBAL.getClockPin(), ClockDomain.GLOBAL.getClockPin());\n }",
"@Override\n\tpublic net.floodlightcontroller.core.IListener.Command receive(\n\t\t\tIOFSwitch sw, OFMessage msg, FloodlightContext cntx) {\n\t\tSystem.out.println(\"receive in myswitch\");\n\t\tEthernet eth =\n IFloodlightProviderService.bcStore.get(cntx,\n IFloodlightProviderService.CONTEXT_PI_PAYLOAD);\n OFPacketIn pi=(OFPacketIn)msg;\n Map<String, Object> getentry = new HashMap<String, Object>();\n \n \tif(eth.getEtherType() == EthType.ARP) {\n \t/* We got an ARP packet; get the payload from Ethernet */\n ARP arp = (ARP) eth.getPayload();\n System.out.println(\"*****Parsing ARP packet*******\");\n /* Various getters and setters are exposed in ARP */\n// boolean gratuitous = arp.isGratuitous();\n logger.info(\"ARP \");\n //starting to write into the switch\n \n a=b;//control parameters to check if it finds the MAC:port information of the destination host\n\t\t\t\n getentry=addToPortMap(eth.getSourceMACAddress(),pi.getMatch().get(MatchField.IN_PORT));\n //DisplayMap(getentry);\n \n SearchPort(getentry,eth.getDestinationMACAddress());\n \n //if(OutPort!=null) //if it has found a port for the destination address\n if(a!=b)\n { System.out.println(\"Unicasting the packet\");\n\t\t\t\t//every flow constitutes of match and Actions...based on a particular match and an action is taken..both are used to modify a flow \n \tMatch.Builder mb = sw.getOFFactory().buildMatch();\n\t\t\t\t//Source and destination MAC address along with the source port is set in the match\n \tmb.setExact(MatchField.IN_PORT, pi.getMatch().get(MatchField.IN_PORT))\n \t.setExact(MatchField.ETH_SRC, eth.getSourceMACAddress())\n \t.setExact(MatchField.ETH_DST, eth.getDestinationMACAddress());\n \t\n\t\t\t\t//build a packet to send to the switch in mininet\n \tOFPacketOut.Builder pob = sw.getOFFactory().buildPacketOut();\n List<OFAction> actions = new ArrayList<OFAction>();\n actions.add(sw.getOFFactory().actions().buildOutput().setPort(OutPort).setMaxLen(0xffFFffFF).build());\n pob.setActions(actions);\n if (sw.getBuffers() == 0) {\n \t\t\t// We set the PI buffer id here so we don't have to check again below\n \t\t\t pi = pi.createBuilder().setBufferId(OFBufferId.NO_BUFFER).build();\n \t\t\t pob.setBufferId(OFBufferId.NO_BUFFER);\n \t\t } else {\n \t\t\t pob.setBufferId(pi.getBufferId());\n \t\t }\n\n \t\t pob.setInPort(pi.getMatch().get(MatchField.IN_PORT));\n\n\t\t\t\t// If the buffer id is none or the switch doesn's support buffering\n\t\t\t\t// we send the data with the packet out...this is conditional\n \t\t if (pi.getBufferId() == OFBufferId.NO_BUFFER) {\n \t\t\t byte[] packetData = pi.getData();\n \t\t\t pob.setData(packetData);\n \t\t\t System.out.println(\"writing into the packet\");\n \t\t }\n \t\t //sw.write(pob.build()); //the reason to comment out the packet write to the switch is...we can either write a packet_out to the switch or\n\t\t\t\t //we can just send a flow mod command to switch not both....\n \t\t\n \t\t//As we have written the payload to the switch, now we will write the\n \t\t//flowmod command to the switch\n \t\t//Create a Flow Mod Builder\n \t\t System.out.println(\"Check In\"+pi.getMatch().get(MatchField.IN_PORT).toString()+\"Out\"+OutPort.toString());\n\t\t\t//here i used the port numbers to block the communication between host h2 and h3\n \t\t if((pi.getMatch().get(MatchField.IN_PORT).toString().equals(\"2\") \n \t\t \t\t&& OutPort.toString().equals(\"3\")) || (pi.getMatch().get(MatchField.IN_PORT).toString().equals(\"3\") \n \t \t\t \t\t&& OutPort.toString().equals(\"2\")))\n \t\t { \n \t\t \t System.out.println(\"Deleting the flow\");\n \t\t \t this.writeFlowMod(sw, OFFlowModCommand.DELETE, OFBufferId.NO_BUFFER, mb.build(), OutPort);\n \t\t }\n \t\t else\n \t\t {\n \t\t \n \t\t this.writeFlowMod(sw, OFFlowModCommand.ADD, OFBufferId.NO_BUFFER, mb.build(), OutPort);\n \t\t if (LEARNING_SWITCH_REVERSE_FLOW) {\n \t\t\t\tMatch.Builder mb_rev = sw.getOFFactory().buildMatch();\n \t\t\t\tmb_rev.setExact(MatchField.ETH_SRC, mb.get(MatchField.ETH_DST)) \n \t\t\t\t.setExact(MatchField.ETH_DST, mb.get(MatchField.ETH_SRC)) \n \t\t\t\t.setExact(MatchField.IN_PORT, OutPort);\n \t\t\t\t\n\n \t\t\t\tthis.writeFlowMod(sw, OFFlowModCommand.ADD, OFBufferId.NO_BUFFER, mb_rev.build(), pi.getMatch().get(MatchField.IN_PORT));\n \t\t\t}\n \t\t }\n }\n else{\n \t//System.out.println(\"Flooding the packet\");\n \tOFPort port = OFPort.FLOOD;\n \tOFPacketOut.Builder pkout = sw.getOFFactory().buildPacketOut();\n \t\t\tpkout.setBufferId(pi.getBufferId());\n \t\t\tpkout.setXid(pi.getXid());\n \t\t\tList<OFAction> actions = new ArrayList<OFAction>();\n actions.add(sw.getOFFactory().actions().buildOutput().setPort(port).setMaxLen(0xffFFffFF).build());\n pkout.setActions(actions);\n \t\t\t\n \t\t\tif (pi.getBufferId() == OFBufferId.NO_BUFFER) {\n \t\t\t\tpkout.setData(pi.getData());\n \t\t\t}\n\n \t\t\tsw.write(pkout.build()); \t\n } \n } \n return Command.CONTINUE;\n\t}",
"private void switchOnFlag(int flag) {\r\n\t\tsim40.memory[Simulator.STATUS_ADDRESS]|= (1<<flag);\r\n\t}",
"@SuppressLint(\"NewApi\")\n\tprivate void wpsConnection(String option, String bssid, String pin) {\n\t\tif (this.wifiManager == null)\n\t\t\treturn;\n\t\t// Setup WpsInfo\n\t\tWpsInfo wpsInfo = new WpsInfo();\n\t\tif (option.equals(\"PBC\")) {\n\t\t\twpsInfo.setup = WpsInfo.PBC;\n\t\t\tthis.wpsEditText.setText(\"\");\n\t\t\tthis.wpsEditText.setText(\"PBC\");\n\t\t\tthis.pinEditText.setText(\"\");\n\t\t} else if (option.equals(\"PIN\")) {\n\t\t\twpsInfo.setup = WpsInfo.DISPLAY;\n\t\t\tthis.wpsEditText.setText(\"\");\n\t\t\tthis.wpsEditText.setText(\"PIN Entry\");\n\t\t} else if (option.equals(\"PINKeyPad\")) {\n\t\t\tLog.i(TAG, \"Key Pad Mode.\");\n\t\t\twpsInfo.setup = WpsInfo.KEYPAD;\n\t\t\twpsInfo.pin = pin;\n\t\t\tField bssidField;\n\t\t\ttry {\n\t\t\t\tbssidField = wpsInfo.getClass().getField(\"BSSID\");\n\t\t\t\tbssidField.set(wpsInfo, bssid);\n\t\t\t} catch (NoSuchFieldException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else\n\t\t\treturn;\n\t\t// Start WPS Connection\n\t\ttry {\n\t\t\tfinal Class<?> wifiManagerCls = Class\n\t\t\t\t\t.forName(ANDROID_NET_WIFI_WIFIMANAGER_PKG);\n\t\t\tClass<?> wpsListenerCls = Class.forName(WPS_LISTENER);\n\t\t\tfinal Method onStartSuccess = wpsListenerCls.getMethod(\n\t\t\t\t\t\"onStartSuccess\", String.class);\n\t\t\tfinal Method onCompletion = wpsListenerCls\n\t\t\t\t\t.getMethod(\"onCompletion\");\n\t\t\tfinal Method onFailure = wpsListenerCls.getMethod(\"onFailure\",\n\t\t\t\t\tint.class);\n\t\t\tthis.timer = new Timer(false);\n\t\t\tif (this.timerTask != null) {\n\t\t\t\tthis.timerTask.cancel();\n\t\t\t}\n\t\t\tthis.timerTask = new TimerTask() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\thandler.post(new Runnable() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tprogressBar.incrementProgressBy(1);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\t\t\tthis.progressBar.setMax(WPS_TIMEOUT_S);\n\t\t\tthis.progressBar.setProgress(0);\n\t\t\tthis.progressBar.setVisibility(View.VISIBLE);\n\t\t\tthis.timer.purge();\n\t\t\tthis.timer.schedule(this.timerTask, 1000, 1000);\n\t\t\tObject wpsListener = Proxy.newProxyInstance(\n\t\t\t\t\twpsListenerCls.getClassLoader(),\n\t\t\t\t\tnew Class<?>[] { wpsListenerCls }, new InvocationHandler() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic Object invoke(Object arg0, Method method,\n\t\t\t\t\t\t\t\tfinal Object[] arg2) throws Throwable {\n\t\t\t\t\t\t\tif (method.equals(onStartSuccess)) {\n\t\t\t\t\t\t\t\tif (arg2[0] != null) {\n\t\t\t\t\t\t\t\t\tLog.i(TAG, ((String) arg2[0]).toString());\n\t\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\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\tpinEditText.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\tpinEditText\n\t\t\t\t\t\t\t\t\t\t\t\t\t.setText((CharSequence) arg2[0]);\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\tString pin = (String)arg2[0];\n\t\t\t\t\t\t\t\t\t//bw.write(pin);\n\t\t\t\t\t\t\t\t\t//bw.flush();\n\t\t\t\t\t\t\t\t\tfw = new FileWriter(pinFile, false);\n\t\t\t\t\t\t\t\t\tfw.write(pin);\n\t\t\t\t\t\t\t\t\tfw.flush();\n\t\t\t\t\t\t\t\t\tfw.close();\n\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\tWifiWPSConnectActivity.this,\n\t\t\t\t\t\t\t\t\t\t\t\"PIN Entry: \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ (CharSequence) arg2[0],\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\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\tpinEditText.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\tpinEditText.setText(\"No PIN Code\");\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\tToast.makeText(WifiWPSConnectActivity.this,\n\t\t\t\t\t\t\t\t\t\t\t\"WPS Start.\", Toast.LENGTH_LONG)\n\t\t\t\t\t\t\t\t\t\t\t.show();\n\t\t\t\t\t\t\t\t\tfw = new FileWriter(pinFile, false);\n\t\t\t\t\t\t\t\t\tfw.write(\"PBC\");\n\t\t\t\t\t\t\t\t\tfw.flush();\n\t\t\t\t\t\t\t\t\tfw.close();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (method.equals(onCompletion)) {\n\t\t\t\t\t\t\t\ttimer.cancel();\n\t\t\t\t\t\t\t\tprogressBar.setProgress(0);\n\t\t\t\t\t\t\t\tLog.i(TAG, \"WPS Connection Completed.\");\n\t\t\t\t\t\t\t\tToast.makeText(WifiWPSConnectActivity.this,\n\t\t\t\t\t\t\t\t\t\t\"WPS Connection Completed.\",\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (method.equals(onFailure)) {\n\t\t\t\t\t\t\t\ttimer.cancel();\n\t\t\t\t\t\t\t\tprogressBar.setProgress(0);\n\t\t\t\t\t\t\t\tint code = (Integer) arg2[0];\n\t\t\t\t\t\t\t\t/* Code 0 */\n\t\t\t\t\t\t\t\tField wpsError = wifiManagerCls\n\t\t\t\t\t\t\t\t\t\t.getField(\"ERROR\");\n\t\t\t\t\t\t\t\t/* Code 1 */\n\t\t\t\t\t\t\t\tField wpsInProgress = wifiManagerCls\n\t\t\t\t\t\t\t\t\t\t.getField(\"IN_PROGRESS\");\n\t\t\t\t\t\t\t\t/* Code 2 */\n\t\t\t\t\t\t\t\tField wpsBusy = wifiManagerCls.getField(\"BUSY\");\n\t\t\t\t\t\t\t\t/* Code 3 */\n\t\t\t\t\t\t\t\tField wpsOverlapError = wifiManagerCls\n\t\t\t\t\t\t\t\t\t\t.getField(\"WPS_OVERLAP_ERROR\");\n\t\t\t\t\t\t\t\t/* Code 4 */\n\t\t\t\t\t\t\t\tField wpsWepProhibitError = wifiManagerCls\n\t\t\t\t\t\t\t\t\t\t.getField(\"WPS_WEP_PROHIBITED\");\n\t\t\t\t\t\t\t\t/* Code 5 */\n\t\t\t\t\t\t\t\tField wpsTkipOnlyProhibitError = wifiManagerCls\n\t\t\t\t\t\t\t\t\t\t.getField(\"WPS_TKIP_ONLY_PROHIBITED\");\n\t\t\t\t\t\t\t\t/* Code 6 */\n\t\t\t\t\t\t\t\tField wpsAuthFailError = wifiManagerCls\n\t\t\t\t\t\t\t\t\t\t.getField(\"WPS_AUTH_FAILURE\");\n\t\t\t\t\t\t\t\t/* Code 7 */\n\t\t\t\t\t\t\t\tField wpsTimedOutError = wifiManagerCls\n\t\t\t\t\t\t\t\t\t\t.getField(\"WPS_TIMED_OUT\");\n\t\t\t\t\t\t\t\tif (code == wpsError.getInt(null)) {\n\t\t\t\t\t\t\t\t\tLog.i(TAG, \"Code 0: Internal Error.\");\n\t\t\t\t\t\t\t\t\tToast.makeText(WifiWPSConnectActivity.this,\n\t\t\t\t\t\t\t\t\t\t\t\"Code 0: Internal Error.\",\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t} else if (code == wpsInProgress.getInt(null)) {\n\t\t\t\t\t\t\t\t\tLog.i(TAG,\n\t\t\t\t\t\t\t\t\t\t\t\"Code 1: WPS is already in progress.\");\n\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\tWifiWPSConnectActivity.this,\n\t\t\t\t\t\t\t\t\t\t\t\"Code 1: WPS is already in progress.\",\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t} else if (code == wpsBusy.getInt(null)) {\n\t\t\t\t\t\t\t\t\tLog.i(TAG, \"Code 2: WPS Busy.\");\n\t\t\t\t\t\t\t\t\tToast.makeText(WifiWPSConnectActivity.this,\n\t\t\t\t\t\t\t\t\t\t\t\"Code 2: WPS Busy.\",\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t} else if (code == wpsOverlapError.getInt(null)) {\n\t\t\t\t\t\t\t\t\tLog.i(TAG, \"Code 3: WPS Overlap Error.\");\n\t\t\t\t\t\t\t\t\tToast.makeText(WifiWPSConnectActivity.this,\n\t\t\t\t\t\t\t\t\t\t\t\"Code 3: WPS Overlap Error.\",\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Error of WPS_WEP_PROHIBITED\n\t\t\t\t\t\t\t\telse if (code == wpsWepProhibitError\n\t\t\t\t\t\t\t\t\t\t.getInt(null)) {\n\t\t\t\t\t\t\t\t\tLog.i(TAG,\n\t\t\t\t\t\t\t\t\t\t\t\"Code 4: WPS Wep Prohibited Error.\");\n\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\tWifiWPSConnectActivity.this,\n\t\t\t\t\t\t\t\t\t\t\t\"Code 4: WPS Wep Prohibited Error.\",\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Error of WPS_TKIP_ONLY_PROHIBITED\n\t\t\t\t\t\t\t\telse if (code == wpsTkipOnlyProhibitError\n\t\t\t\t\t\t\t\t\t\t.getInt(null)) {\n\t\t\t\t\t\t\t\t\tLog.i(TAG,\n\t\t\t\t\t\t\t\t\t\t\t\"Code 5: WPS TKIP only prohibited Error.\");\n\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\tWifiWPSConnectActivity.this,\n\t\t\t\t\t\t\t\t\t\t\t\"Code 5: WPS TKIP only prohibited Error.\",\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Error of WPS_AUTH_FAILURE\n\t\t\t\t\t\t\t\telse if (code == wpsAuthFailError.getInt(null)) {\n\t\t\t\t\t\t\t\t\tLog.i(TAG,\n\t\t\t\t\t\t\t\t\t\t\t\"Code 6: WPS Auth Failure Error.\");\n\t\t\t\t\t\t\t\t\tToast.makeText(WifiWPSConnectActivity.this,\n\t\t\t\t\t\t\t\t\t\t\t\"Code 6: WPS Auth Failure Error.\",\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Error of WPS_TIMED_OUT\n\t\t\t\t\t\t\t\telse if (code == wpsTimedOutError.getInt(null)) {\n\t\t\t\t\t\t\t\t\tLog.i(TAG, \"Code 7: WPS Time out Error.\");\n\t\t\t\t\t\t\t\t\tToast.makeText(WifiWPSConnectActivity.this,\n\t\t\t\t\t\t\t\t\t\t\t\"Code 7: WPS Time out Error.\",\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\tWifiWPSConnectActivity.this,\n\t\t\t\t\t\t\t\t\t\t\t\"WPS Connection Failed: Unknow Error\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ code, Toast.LENGTH_SHORT)\n\t\t\t\t\t\t\t\t\t\t\t.show();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\n\t\t\tfw = new FileWriter(pinFile, false);\n\t\t\tfw.write(\"NONE\");\n\t\t\tfw.flush();\n\t\t\tfw.close();\n\t\t\tMethod startWpsMethod = wifiManagerCls.getMethod(START_WPS_METHOD,\n\t\t\t\t\tandroid.net.wifi.WpsInfo.class, wpsListenerCls);\n\t\t\tstartWpsMethod.invoke(this.wifiManager, wpsInfo, wpsListener);\n\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (NoSuchMethodException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalAccessException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalArgumentException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvocationTargetException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"void onNewPulse(int pulse, int spo2 );",
"public abstract void inputChangeEvent( float time, int dstPin, boolean v );",
"@RequestMapping(\"/light\")\n public ResponseEntity light() {\n if (lightPin == null) {\n GpioController gpio = GpioFactory.getInstance();\n lightPin = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_00, \"MyLights\");\n }\n\n lightPin.high();\n lightPin.low();\n try {\n Thread.sleep(250);\n } catch(InterruptedException ex) {\n Thread.currentThread().interrupt();\n return new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR);\n }\n lightPin.high();\n\n return new ResponseEntity(HttpStatus.OK);\n }",
"public void setLimitSwitchesSwapped(boolean swapped)\n {\n final String funcName = \"setLimitSwitchesSwapped\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"swapped=%s\", swapped);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n limitSwitchesSwapped = swapped;\n }",
"private void markBitmap(int frameNo){\n int bit = frameNo/32;\n int mask = frameNo%32;\n bitMap[bit] = bitMap[bit]|MASK[mask];\n }",
"public RgbLed(int redPin, int greenPin, int bluePin) {\n HelpFunctions.checkDigitalPin(\"Red RGB pin\", redPin);\n HelpFunctions.checkDigitalPin(\"Green RGB pin\", greenPin);\n HelpFunctions.checkDigitalPin(\"Blue RGB pin\", bluePin);\n\n this.redLed = new PWM(redPin, 0);\n this.greenLed = new PWM(greenPin, 0);\n this.blueLed = new PWM(bluePin, 0);\n\n this.status = false;\n\n this.redValue = 0;\n this.greenValue = 0;\n this.blueValue = 0;\n }",
"public int handler(int offset) {\n return (portA_out & ddrA) | (portA_in & ~ddrA);\n }",
"private void Perform_LPM_II()\n {\n int zindex = get_z();\n int d = Utils.GetOperand_XXXXXXX11111XXXX(mMBR);\n int wordlocation = zindex >> 1;\n\n try\n {\n if (Utils.bit0(zindex))\n set_reg(d,(program_memory[wordlocation] & 0xff00) >> 8);\n else\n set_reg(d,program_memory[wordlocation] & 0x00ff);\n }\n catch (RuntimeException e) { } \n clockTick();\n clockTick();\n return;\n }",
"Pin createPin();",
"static void OPL_STATUSMASK_SET(FM_OPL OPL, int flag) {\n OPL.statusmask = flag;\n /* IRQ handling check */\n OPL_STATUS_SET(OPL, 0);\n OPL_STATUS_RESET(OPL, 0);\n }",
"public Builder setTimeSpoutBoltA(long value) {\n bitField0_ |= 0x00200000;\n timeSpoutBoltA_ = value;\n \n return this;\n }",
"@Override\r\n public void ProcessControlPIN(PinDataControl ControlData) {\n }",
"public void start(String[] args)\n {\n // display welcome screen\n displayWelcome();\n\n // attempt to read command line arguments\n for (String arg : args) {\n if (arg.startsWith(LONGITUDE_KEY)) {\n try {\n longitude = Double.parseDouble(arg.substring(LONGITUDE_KEY.length()));\n System.out.println(\"LONGITUDE = \" + longitude);\n }\n catch (Exception ex) {}\n } else if (arg.startsWith(LATITUDE_KEY)) {\n try {\n latitude = Double.parseDouble(arg.substring(LATITUDE_KEY.length()));\n System.out.println(\"LATITUDE = \" + latitude);\n }\n catch (Exception ex) {}\n } else if (arg.startsWith(OFF_KEY)) {\n try {\n off = arg.substring(OFF_KEY.length());\n System.out.println(\"off = \" + off);\n }\n catch(Exception ex){}\n }\n }\n\n // prompt user for latitude if needed\n if(latitude == null)\n promptForLatitude();\n\n // prompt user for longitude if needed\n if(longitude == null)\n promptForLongitude();\n\n // display welcome user options menu\n displayMenuOptions();\n\n // create timer, GPIO controller, and sunrise/sunset calculator\n timer = new Timer();\n gpio = GpioFactory.getInstance();\n ss = new SunriseSunset();\n\n // provision GPIO pins :\n // GPIO PIN #0 == OVERRIDE SWITCH\n // GPIO PIN #1 == POWER CONTROLLER\n overrideSwitch = gpio.provisionDigitalInputPin(RaspiPin.GPIO_00, \"OverrideSwitch\", PinPullResistance.PULL_DOWN);\n powerController = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_01, \"PowerController\");\n\n // force power controller to OFF if the program is shutdown\n powerController.setShutdownOptions(true,PinState.LOW);\n\n // create a gpio toggle trigger on the override switch input pin;\n // when the input is detected, toggle the power controller state\n overrideSwitch.addTrigger(new GpioToggleStateTrigger(PinState.HIGH, powerController));\n\n // create a listener for the override switch\n overrideSwitch.addListener(new OverrideSwitchListener());\n\n // schedule starting event; apply initial power controller state\n switch(scheduleNextEvent()) {\n case SunriseToday:\n {\n // if the next event is sunrise, then turn power ON\n powerController.high();\n break;\n }\n case SunsetToday:\n {\n // if the next event is sunset, then turn power OFF\n powerController.low();\n break;\n }\n case SunriseTomorrow:\n {\n // if the next event is sunrise, then turn power ON\n powerController.high();\n break;\n }\n case OffToday:\n {\n // if the next event is sunset, then turn power OFF\n powerController.low();\n break;\n }\n }\n\n // main program loop;\n // process user input or wait for user to abort with CTRL-C\n for(;;)\n {\n String command = System.console().readLine();\n if (command.equalsIgnoreCase(\"on\")) {\n // turn ON power\n powerController.high();\n\n System.out.println(\"---------------------------------\");\n System.out.println(\"[OVERRIDE] POWER STATE ON\");\n System.out.println(\"---------------------------------\");\n\n } else if (command.equalsIgnoreCase(\"off\")) {\n // turn OFF power\n powerController.low();\n\n System.out.println(\"---------------------------------\");\n System.out.println(\"[OVERRIDE] POWER STATE OFF\");\n System.out.println(\"---------------------------------\");\n } else if (command.equalsIgnoreCase(\"status\")) {\n System.out.println(\"---------------------------------\");\n // determine and display current power controller state\n if (powerController.isHigh()) {\n System.out.println(\"[STATUS] POWER STATE IS : ON\");\n } else {\n System.out.println(\"[STATUS] POWER STATE IS : OFF\");\n }\n System.out.println(\"---------------------------------\");\n } else if (command.equalsIgnoreCase(\"time\")) {\n // display current date/time\n System.out.println(\"---------------------------------\");\n System.out.println(\"[CURRENT TIME] \");\n System.out.println(new Date());\n System.out.println(\"---------------------------------\");\n } else if (command.equalsIgnoreCase(\"sunrise\")) {\n // display sunrise date/time\n System.out.println(\"---------------------------------\");\n System.out.println(\"[NEXT SUNRISE] \");\n System.out.println(\" @ \" + nextSunriseDate);\n System.out.println(\"---------------------------------\");\n } else if (command.equalsIgnoreCase(\"sunset\")) {\n // display sunset date/time\n System.out.println(\"---------------------------------\");\n System.out.println(\"[NEXT SUNSET] \");\n System.out.println(\" @ \" + nextSunsetDate);\n System.out.println(\"---------------------------------\");\n } else if (command.equalsIgnoreCase(\"coord\")) {\n System.out.println(\"---------------------------------\");\n System.out.println(\"[LONGITUDE] = \" + longitude);\n System.out.println(\"[LATITUDE] = \" + latitude);\n System.out.println(\"---------------------------------\");\n } else if(command.equalsIgnoreCase(\"next\")) {\n System.out.println(\"-----------------------------------\");\n // display next scheduled event\n switch (nextEvent) {\n case SunriseToday: {\n System.out.println(\"[NEXT EVENT] SUNRISE TODAY \");\n System.out.println(\" @ \" + nextSunriseDate);\n break;\n }\n case SunsetToday: {\n System.out.println(\"[NEXT EVENT] SUNSET TODAY\");\n System.out.println(\" @ \" + nextSunsetDate);\n break;\n }\n case SunriseTomorrow: {\n System.out.println(\"[NEXT EVENT] SUNRISE TOMORROW\");\n System.out.println(\" @ \" + nextSunriseDate);\n break;\n }\n case OffToday: {\n System.out.println(\"[NEXT EVENT] OFF TODAY\");\n System.out.println(\" @ \" + nextOffDate);\n break;\n }\n }\n System.out.println(\"-----------------------------------\");\n } else if (command.equalsIgnoreCase(\"help\")) {\n // display user options menu\n displayMenuOptions();\n } else {\n // un-handled command\n System.out.println(\"---------------------------------\");\n System.out.println(\"[INVALID COMMAND ENTRY]\");\n System.out.println(\"---------------------------------\");\n }\n }\n }",
"void setBit(int index, int value);",
"public LightRing(int portNum) {\n this.relay = new Relay(portNum, Relay.Direction.kForward); // only allows you to turn on one side/direction\n }",
"public void setPortDOutRegisters(byte p1, byte p2){\r\n checkServoCommandThread();\r\n ServoCommand cmd=new ServoCommand();\r\n cmd.bytes=new byte[3];\r\n cmd.bytes[0]=CMD_SET_PORT_DOUT;\r\n cmd.bytes[1]=(byte)(0x0f&p1);\r\n cmd.bytes[2]=(byte)(0xff&p2);\r\n submitCommand(cmd);\r\n\r\n }"
] |
[
"0.5300298",
"0.50580114",
"0.50550956",
"0.49585283",
"0.49008662",
"0.48950335",
"0.48243716",
"0.4718407",
"0.46694207",
"0.46323973",
"0.4616772",
"0.46026203",
"0.4587474",
"0.45673266",
"0.45663863",
"0.45002663",
"0.4439905",
"0.442182",
"0.4408537",
"0.4408537",
"0.43878692",
"0.43350667",
"0.43325213",
"0.4318894",
"0.4311146",
"0.4307637",
"0.42869473",
"0.4279931",
"0.42295876",
"0.42203507",
"0.41951397",
"0.4190598",
"0.4190074",
"0.41752738",
"0.4153982",
"0.41479322",
"0.4146693",
"0.41321382",
"0.41298464",
"0.41133565",
"0.4112063",
"0.41113445",
"0.40969205",
"0.408029",
"0.40631935",
"0.40579438",
"0.4057442",
"0.4053229",
"0.40452597",
"0.40380126",
"0.40225005",
"0.4020039",
"0.40037915",
"0.3998096",
"0.39806435",
"0.3972069",
"0.3958454",
"0.39494604",
"0.39464295",
"0.39443776",
"0.3942125",
"0.3941757",
"0.3939166",
"0.39330047",
"0.3930514",
"0.3916852",
"0.3906741",
"0.39060348",
"0.39015487",
"0.38925916",
"0.3888761",
"0.38843513",
"0.38749206",
"0.38743085",
"0.38743082",
"0.38609228",
"0.3859502",
"0.3859422",
"0.38589776",
"0.38537937",
"0.38490888",
"0.38430586",
"0.38424647",
"0.38401216",
"0.38302046",
"0.38098538",
"0.38063535",
"0.38027522",
"0.38017976",
"0.3795884",
"0.37925026",
"0.37910646",
"0.37855303",
"0.3785402",
"0.37796706",
"0.37665677",
"0.37653074",
"0.37584552",
"0.37543586",
"0.3753558"
] |
0.48919767
|
6
|
Sets the output value (high or low) for a port ("a" or "b" with a bitmask, according to the selction mask. The bitmask is 4 bit long, true refers to high and false refers to low. For example: The values 0b11000000, 0b10000000 will turn pin 7 high and pin 6 low, pins 06 will remain untouched. \note This function does nothing for pins that are configured as input. Pullup resistors can be switched on with :func:`SetConfiguration`. .. versionadded:: 2.0.0~(Plugin)
|
public void setSelectedValues(char port, short selectionMask, short valueMask) throws TimeoutException, NotConnectedException {
byte options = 0;
boolean isResponseExpected = getResponseExpected(FUNCTION_SET_SELECTED_VALUES);
if(isResponseExpected) {
options = 8;
}
ByteBuffer bb = ipcon.createRequestBuffer(uid, (byte)11, FUNCTION_SET_SELECTED_VALUES, options, (byte)(0));
bb.put((byte)port);
bb.put((byte)selectionMask);
bb.put((byte)valueMask);
if(isResponseExpected) {
byte[] response = sendRequestExpectResponse(bb.array(), FUNCTION_SET_SELECTED_VALUES);
bb = ByteBuffer.wrap(response, 8, response.length - 8);
bb.order(ByteOrder.LITTLE_ENDIAN);
} else {
sendRequestNoResponse(bb.array());
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void ConfigurePort() {\n\n final String TAG = \"Configure Port Output\";\n try {\n gpioPort = super.service.openGpio(this.gpioPortName);\n // Step 2. Configure as an output.\n gpioPort.setDirection(this.direction);\n\n mHandler.post(mCallBackRunnable);\n } catch (IOException e) {\n Log.e(TAG, \"Error on PeripheralIO API\", e);\n }\n }",
"public void setPortConfiguration(char port, short selectionMask, char direction, boolean value) throws TimeoutException, NotConnectedException {\n\t\tbyte options = 0;\n\t\tboolean isResponseExpected = getResponseExpected(FUNCTION_SET_PORT_CONFIGURATION);\n\t\tif(isResponseExpected) {\n\t\t\toptions = 8;\n\t\t}\n\t\tByteBuffer bb = ipcon.createRequestBuffer(uid, (byte)12, FUNCTION_SET_PORT_CONFIGURATION, options, (byte)(0));\n\t\tbb.put((byte)port);\n\t\tbb.put((byte)selectionMask);\n\t\tbb.put((byte)direction);\n\t\tbb.put((byte)(value ? 1 : 0));\n\n\t\tif(isResponseExpected) {\n\t\t\tbyte[] response = sendRequestExpectResponse(bb.array(), FUNCTION_SET_PORT_CONFIGURATION);\n\n\t\t\tbb = ByteBuffer.wrap(response, 8, response.length - 8);\n\t\t\tbb.order(ByteOrder.LITTLE_ENDIAN);\n\t\t} else {\n\t\t\tsendRequestNoResponse(bb.array());\n\t\t}\n\t}",
"public void SetOutputPins(int pins ) throws IOException {\n byte value = mDevice.readRegByte( IODIR );\n mDevice.writeRegByte( IODIR, (byte)(value & (~pins)));\n }",
"public void setPortMonoflop(char port, short selectionMask, short valueMask, long time) throws TimeoutException, NotConnectedException {\n\t\tbyte options = 0;\n\t\tboolean isResponseExpected = getResponseExpected(FUNCTION_SET_PORT_MONOFLOP);\n\t\tif(isResponseExpected) {\n\t\t\toptions = 8;\n\t\t}\n\t\tByteBuffer bb = ipcon.createRequestBuffer(uid, (byte)15, FUNCTION_SET_PORT_MONOFLOP, options, (byte)(0));\n\t\tbb.put((byte)port);\n\t\tbb.put((byte)selectionMask);\n\t\tbb.put((byte)valueMask);\n\t\tbb.putInt((int)time);\n\n\t\tif(isResponseExpected) {\n\t\t\tbyte[] response = sendRequestExpectResponse(bb.array(), FUNCTION_SET_PORT_MONOFLOP);\n\n\t\t\tbb = ByteBuffer.wrap(response, 8, response.length - 8);\n\t\t\tbb.order(ByteOrder.LITTLE_ENDIAN);\n\t\t} else {\n\t\t\tsendRequestNoResponse(bb.array());\n\t\t}\n\t}",
"public native int cGPIOWrite(int pin, boolean value);",
"@Override\r\n public void setPort2(int portValue) {\r\n checkServoCommandThread();\r\n ServoCommand cmd=new ServoCommand();\r\n cmd.bytes=new byte[2];\r\n cmd.bytes[0]=CMD_SET_PORT2;\r\n cmd.bytes[1]=(byte)(0xff&portValue);\r\n submitCommand(cmd);\r\n }",
"private void setInPort(int value) {\n \n inPort_ = value;\n }",
"private void setInPort(int value) {\n \n inPort_ = value;\n }",
"public abstract Builder setOutputCategoryMask(boolean value);",
"@Override\n \t\tpublic void onWrite(int value) {\n \t\t\tboolean temp = (value & 0x80) == 0x80;\n \t\t\tif (temp != CPU.NMIEnable) {\n \t\t\t\tCPU.NMIEnable = temp;\n \t\t\t\tif (!Settings.isTrue(Settings.CPU_ALT_DEBUG)) {\n \t\t\t\t\tif(CPU.NMIEnable)\n \t\t\t\t\t\tLog.debug(\"Enabling NMI interrupts\");\n \t\t\t\t\telse\n \t\t\t\t\t\tLog.debug(\"Disabling NMI interrupts\");\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t// IRQEnable\n \t\t\tCPU.irqEnable = (value >> 4) & 0x03;\n \t\t\tLog.debug(\"IRQ Enable set to \" + CPU.irqEnable);\n \t\t\t\n \t\t\t// Standard Controller Enable\n \t\t\tCPU.standardControllerRead = (value & 0x01) != 0;\n \t\t\tif (!Settings.isTrue(Settings.CPU_ALT_DEBUG)) {\n \t\t\t\tif(CPU.standardControllerRead)\n \t\t\t\t\tLog.debug(\"Enabling automatic reading of standard controller\");\n \t\t\t\telse\n \t\t\t\t\tLog.debug(\"Disabling automatic reading of standard controller\");\n \t\t\t}\n \t\t}",
"public void digitalWrite(int pin, byte value) { // pack this bit into..\r\n int portNumber = (pin >> 3) & 0x0F; // ..8-bit port & send to Ardu\r\n int digiData = digitalOutputData[portNumber & MDB_msk];\r\n if (SpeakEasy){\r\n System.out.println(\"F%%F/digiWrite #\" + pin + \" = \" + value);\r\n }\r\n if ((int) value == 0){\r\n digiData = digiData & ~(1 << (pin & 7));\r\n } else {\r\n digiData = digiData | (1 << (pin & 7));\r\n }\r\n digitalOutputData[portNumber & MDB_msk] = digiData;\r\n Send3bytes(DIGITAL_MESSAGE | portNumber, digiData, -1);\r\n }",
"public void onWrite(int value) {\n \t\t\tboolean newLatch = (value & 1) != 0;\n \t\t\tif (newLatch != joyLatch) {\n \t\t\t\tcurButton = 0;\n \t\t\t}\n \t\t\tjoyLatch = newLatch;\n \t\t}",
"@Override\n public void writeOut(Circuit circuit, boolean state, int index) {\n outputPins[index].setState(state);\n for (ChipListener l : listeners) l.outputChanged(Chip.this, index, state);\n }",
"public Builder setPort(int value) {\n bitField0_ |= 0x00000002;\n port_ = value;\n onChanged();\n return this;\n }",
"public void setGPIO(String name, Boolean value) {\n\n Gpio_Set_Request request = Gpio_Set_Request.newBuilder().setName(name).setRequestedState(value).build();\n\n Gpio_Set_Reply response;\n \n try {\n \tresponse = blockingStub.gpioSet(request);\n } catch (StatusRuntimeException e) {\n logger.log(Level.WARNING, \"RPC failed \" + e.getStatus().getDescription() + \" \" + e.getMessage());\n\n // Get the description\n JsonParser parser = new JsonParser();\n JsonObject jsonDescription = parser.parse(e.getStatus().getDescription()).getAsJsonObject();\n \n //Convert to int and string\n int errorCode = jsonDescription.get(\"errorCode\").getAsInt();\n String errorMessage = jsonDescription.get(\"errorMessage\").getAsString();\n \n System.out.println(Integer.toString(errorCode) + \" : \" + errorMessage);\n return;\n }\n }",
"public Builder setInPort(int value) {\n copyOnWrite();\n instance.setInPort(value);\n return this;\n }",
"public Builder setInPort(int value) {\n copyOnWrite();\n instance.setInPort(value);\n return this;\n }",
"public void setIOPortByte(int portAddress, byte data)\n {\n// \tSystem.out.println(\"setIOPortByte : \"+ portAddress +\" : \"+ data);\n// \tSystem.out.printf(\"setIOPortByte : %x : %x\\n\", portAddress, data);\n boolean needUpdate = false; // Determine if a screen refresh is needed \n\n // Check if correct ports are addressed while in monochrome / colour mode; if not, ignore OUT\n if ((videocard.miscOutputRegister.ioAddressSelect != 0) && (portAddress >= 0x3B0) && (portAddress <= 0x03BF))\n return;\n if ((videocard.miscOutputRegister.ioAddressSelect == 0) && (portAddress >= 0x03D0) && (portAddress <= 0x03DF))\n return;\n\n switch (portAddress)\n {\n case 0x3BA: // Ext. reg: Feature Control Register (Monochrome)\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" I/O write port 0x3BA (Feature Control Register, monochrome): reserved\");\n break;\n\n case 0x3C0: // Attribute controller: Address register\n // Determine whether in address/data mode\n if (videocard.attributeController.dataAddressFlipFlop)\n {\n // Data mode\n switch (videocard.attributeController.index)\n {\n case 0x00: // Internal Palette Index\n case 0x01:\n case 0x02:\n case 0x03:\n case 0x04:\n case 0x05:\n case 0x06:\n case 0x07:\n case 0x08:\n case 0x09:\n case 0x0A:\n case 0x0B:\n case 0x0C:\n case 0x0D:\n case 0x0E:\n case 0x0F:\n if (data != videocard.attributeController.paletteRegister[videocard.attributeController.index])\n {\n videocard.attributeController.paletteRegister[videocard.attributeController.index] = data;\n needUpdate = true;\n }\n break;\n \n case 0x10: // Mode control register\n // Store previous values for check\n byte oldLineGraphics = videocard.attributeController.modeControlReg.lineGraphicsEnable;\n byte oldPaletteBitsSelect = videocard.attributeController.modeControlReg.paletteBitsSelect;\n \n videocard.attributeController.modeControlReg.graphicsEnable = (byte) ((data >> 0) & 0x01);\n videocard.attributeController.modeControlReg.monoColourEmu = (byte) ((data >> 1) & 0x01);\n videocard.attributeController.modeControlReg.lineGraphicsEnable = (byte) ((data >> 2) & 0x01);\n videocard.attributeController.modeControlReg.blinkIntensity = (byte) ((data >> 3) & 0x01);\n videocard.attributeController.modeControlReg.pixelPanningMode = (byte) ((data >> 5) & 0x01);\n videocard.attributeController.modeControlReg.colour8Bit = (byte) ((data >> 6) & 0x01);\n videocard.attributeController.modeControlReg.paletteBitsSelect = (byte) ((data >> 7) & 0x01);\n \n // Check if updates are necessary\n if (videocard.attributeController.modeControlReg.lineGraphicsEnable != oldLineGraphics)\n {\n screen.updateCodePage(0x20000 + videocard.sequencer.charMapAddress);\n videocard.vgaMemReqUpdate = true;\n }\n if (videocard.attributeController.modeControlReg.paletteBitsSelect != oldPaletteBitsSelect)\n {\n needUpdate = true;\n }\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3C0: Mode control: \" + data);\n break;\n \n case 0x11: // Overscan Colour Register\n videocard.attributeController.overscanColour = (byte) (data & 0x3f);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3C0: Overscan colour = \" + data);\n break;\n \n case 0x12: // Colour Plane Enable Register\n videocard.attributeController.colourPlaneEnable = (byte) (data & 0x0f);\n needUpdate = true;\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3C0: Colour plane enable = \" + data);\n break;\n \n case 0x13: // Horizontal Pixel Panning Register\n videocard.attributeController.horizPixelPanning = (byte) (data & 0x0f);\n needUpdate = true;\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3C0: Horiz. pixel panning = \" + data);\n break;\n \n case 0x14: // Colour Select Register\n videocard.attributeController.colourSelect = (byte) (data & 0x0f);\n needUpdate = true;\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3C0: Colour select = \" + videocard.attributeController.colourSelect);\n break;\n \n default:\n logger.log(Level.WARNING, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3C0: Data mode (unknown register) \" + videocard.attributeController.index);\n } \n \n \n }\n else\n {\n // Address mode\n int oldPaletteAddressSource = videocard.attributeController.paletteAddressSource;\n\n videocard.attributeController.paletteAddressSource = (byte) ((data >> 5) & 0x01);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3C0: address mode = \" + videocard.attributeController.paletteAddressSource);\n\n if (videocard.attributeController.paletteAddressSource == 0)\n screen.clearScreen();\n else if (!(oldPaletteAddressSource != 0))\n {\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"found enable transition\");\n needUpdate = true;\n }\n \n data &= 0x1F; // Attribute Address bits\n \n videocard.attributeController.index = data;\n switch (data)\n {\n case 0x00:\n case 0x01:\n case 0x02:\n case 0x03:\n case 0x04:\n case 0x05:\n case 0x06:\n case 0x07:\n case 0x08:\n case 0x09:\n case 0x0A:\n case 0x0B:\n case 0x0C:\n case 0x0D:\n case 0x0E:\n case 0x0F:\n break;\n\n default:\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3C0: Address mode reg = \" + data);\n }\n }\n \n // Flip the flip-flop\n videocard.attributeController.dataAddressFlipFlop = !videocard.attributeController.dataAddressFlipFlop;\n break;\n\n case 0x3C2: // Miscellaneous Output Register\n videocard.miscOutputRegister.ioAddressSelect = (byte) ((data >> 0) & 0x01);\n videocard.miscOutputRegister.ramEnable = (byte) ((data >> 1) & 0x01);\n videocard.miscOutputRegister.clockSelect = (byte) ((data >> 2) & 0x03);\n videocard.miscOutputRegister.lowHighPage = (byte) ((data >> 5) & 0x01);\n videocard.miscOutputRegister.horizontalSyncPol = (byte) ((data >> 6) & 0x01);\n videocard.miscOutputRegister.verticalSyncPol = (byte) ((data >> 7) & 0x01);\n\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" I/O write port 0x3C2:\");\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" I/O Address select = \" + videocard.miscOutputRegister.ioAddressSelect);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" Ram Enable = \" + videocard.miscOutputRegister.ramEnable);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" Clock Select = \" + videocard.miscOutputRegister.clockSelect);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" Low/High Page = \" + videocard.miscOutputRegister.lowHighPage);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" Horiz Sync Polarity = \" + videocard.miscOutputRegister.horizontalSyncPol);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" Vert Sync Polarity = \" + videocard.miscOutputRegister.verticalSyncPol);\n break;\n\n case 0x3C3: // Video Subsystem Enable; currently only uses bit 0 to check if enabled/disabled\n videocard.vgaEnabled = (data & 0x01) == 1 ? true : false;\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" set I/O port 0x3C3: VGA Enabled = \" + videocard.vgaEnabled);\n break;\n\n case 0x3C4: // Sequencer Index Register\n if (data > 4)\n {\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" I/O write port 0x3C4: index > 4\");\n }\n videocard.sequencer.index = data;\n break;\n\n case 0x3C5: // Sequencer Data Registers\n // Determine register to write to\n switch (videocard.sequencer.index)\n {\n case 0: // Reset register\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" I/O write 0x3C5: Sequencer reset: \" + data);\n if ((videocard.sequencer.aSynchReset != 0) && ((data & 0x01) == 0))\n {\n videocard.sequencer.characterMapSelect = 0;\n videocard.sequencer.charMapAddress = 0;\n screen.updateCodePage(0x20000 + videocard.sequencer.charMapAddress);\n videocard.vgaMemReqUpdate = true;\n }\n videocard.sequencer.aSynchReset = (byte) ((data >> 0) & 0x01);\n videocard.sequencer.synchReset = (byte) ((data >> 1) & 0x01);\n break;\n \n case 1: // Clocking mode register\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3C5 (clocking mode): \" + data);\n videocard.sequencer.clockingMode = (byte) (data & 0x3D);\n videocard.sequencer.dotClockRate = ((data & 0x08) > 0) ? (byte) 1 : 0;\n break;\n \n case 2: // Map Mask register\n videocard.sequencer.mapMask = (byte) (data & 0x0F);\n for (int i = 0; i < 4; i++)\n videocard.sequencer.mapMaskArray[i] = (byte) ((data >> i) & 0x01);\n break;\n \n case 3: // Character Map select register\n videocard.sequencer.characterMapSelect = (byte) (data & 0x3F);\n \n byte charSetA = (byte) (data & 0x13); // Text mode font used when attribute byte bit 3 == 1\n if (charSetA > 3)\n charSetA = (byte) ((charSetA & 3) + 4);\n \n byte charSetB = (byte) ((data & 0x2C) >> 2); // Text mode font used when attribute byte bit 3 == 0\n if (charSetB > 3)\n charSetB = (byte) ((charSetB & 3) + 4);\n \n // Select font from font table\n // FIXME: Ensure this check is correct\n if (videocard.crtControllerRegister.regArray[0x09] != 0)\n {\n videocard.sequencer.charMapAddress = SequencerRegister.charMapOffset[charSetA];\n screen.updateCodePage(0x20000 + videocard.sequencer.charMapAddress);\n videocard.vgaMemReqUpdate = true;\n }\n \n // Different fonts not supported at this time\n if (charSetB != charSetA)\n logger.log(Level.WARNING, \"[\" + MODULE_TYPE + \"]\" + \"Character map select: map #2 in block \" + charSetB + \" unused\");\n break;\n \n case 4: // Memory Mode register\n videocard.sequencer.extendedMemory = (byte) ((data >> 1) & 0x01);\n videocard.sequencer.oddEvenDisable = (byte) ((data >> 2) & 0x01);\n videocard.sequencer.chainFourEnable = (byte) ((data >> 3) & 0x01);\n\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" I/O write port 0x3C5 (memory mode):\");\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" Extended Memory = \" + videocard.sequencer.extendedMemory);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" Odd/Even disable = \" + videocard.sequencer.oddEvenDisable);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" Chain 4 enable = \" + videocard.sequencer.chainFourEnable);\n break;\n \n default:\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3C5: index \" + videocard.sequencer.index + \" unhandled\");\n }\n break;\n\n case 0x3C6: // Pixel mask\n videocard.colourRegister.pixelMask = data;\n if (videocard.colourRegister.pixelMask != (byte) 0xFF)\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" I/O write port 0x3C6: Pixel mask= \" + data + \" != 0xFF\");\n break;\n\n case 0x3C7: // DAC Address Read Mode register\n videocard.colourRegister.dacReadAddress = data;\n videocard.colourRegister.dacReadCounter = 0;\n videocard.colourRegister.dacState = 0x03;\n break;\n\n case 0x3C8: // DAC Address Write Mode register\n videocard.colourRegister.dacWriteAddress = data;\n videocard.colourRegister.dacWriteCounter = 0;\n videocard.colourRegister.dacState = 0x00;\n break;\n\n case 0x3C9: // DAC Data Register\n // Determine sub-colour to be written \n switch (videocard.colourRegister.dacWriteCounter)\n {\n case 0:\n videocard.pixels[(((int) videocard.colourRegister.dacWriteAddress) & 0xFF)].red = data;\n break;\n case 1:\n videocard.pixels[(((int) videocard.colourRegister.dacWriteAddress) & 0xFF)].green = data;\n break;\n case 2:\n videocard.pixels[(((int) videocard.colourRegister.dacWriteAddress) & 0xFF)] .blue = data;\n\n needUpdate |= screen.setPaletteColour(videocard.colourRegister.dacWriteAddress, (videocard.pixels[(((int) videocard.colourRegister.dacWriteAddress) & 0xFF)].red) << 2,\n (videocard.pixels[(((int) videocard.colourRegister.dacWriteAddress) & 0xFF)].green) << 2,\n (videocard.pixels[(((int) videocard.colourRegister.dacWriteAddress) & 0xFF)].blue) << 2);\n break;\n }\n\n videocard.colourRegister.dacWriteCounter++;\n\n // Reset counter when 3 values are written and automatically update the address\n if (videocard.colourRegister.dacWriteCounter >= 3)\n {\n videocard.colourRegister.dacWriteCounter = 0;\n videocard.colourRegister.dacWriteAddress++;\n }\n break;\n\n case 0x3CA: // Feature Control Register\n // Read only (write at 0x3BA mono, 0x3DA colour)\n break;\n\n case 0x3CC: // Miscellaneous Output Register\n // Read only (write at 0x3C2\n break;\n\n case 0x3CD: // Unknown\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" I/O write to unknown port 0x3CD = \" + data);\n break;\n\n case 0x3CE: // Graphics Controller Address Register\n // Only 9 register accessible\n if (data > 0x08)\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" /O write port 0x3CE: index > 8\");\n videocard.graphicsController.index = data;\n break;\n\n case 0x3CF: // Graphics Controller Data Register\n switch (videocard.graphicsController.index)\n {\n case 0: // Set/Reset\n videocard.graphicsController.setReset = (byte) (data & 0x0F);\n break;\n \n case 1: // Enable Set/Reset\n videocard.graphicsController.enableSetReset = (byte) (data & 0x0F);\n break;\n \n case 2: // Colour Compare\n videocard.graphicsController.colourCompare = (byte) (data & 0x0F);\n break;\n \n case 3: // Data Rotate\n videocard.graphicsController.dataRotate = (byte) (data & 0x07);\n videocard.graphicsController.dataOperation = (byte) ((data >> 3) & 0x03);\n break;\n \n case 4: // Read Map Select\n videocard.graphicsController.readMapSelect = (byte) (data & 0x03);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3CF (Read Map Select): \" + data);\n break;\n \n case 5: // Graphics Mode\n videocard.graphicsController.writeMode = (byte) (data & 0x03);\n videocard.graphicsController.readMode = (byte) ((data >> 3) & 0x01);\n videocard.graphicsController.hostOddEvenEnable = (byte) ((data >> 4) & 0x01);\n videocard.graphicsController.shift256Reg = (byte) ((data >> 5) & 0x03);\n\n if (videocard.graphicsController.hostOddEvenEnable != 0)\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3CF (graphics mode): value = \" + data);\n if (videocard.graphicsController.shift256Reg != 0)\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \"I/O write port 0x3CF (graphics mode): value = \" + data);\n break;\n \n case 6: // Miscellaneous\n // Store old values for check later\n byte oldAlphaNumDisable = videocard.graphicsController.alphaNumDisable;\n byte oldMemoryMapSelect = videocard.graphicsController.memoryMapSelect;\n\n videocard.graphicsController.alphaNumDisable = (byte) (data & 0x01);\n videocard.graphicsController.chainOddEvenEnable = (byte) ((data >> 1) & 0x01);\n videocard.graphicsController.memoryMapSelect = (byte) ((data >> 2) & 0x03);\n\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" I/O write port 0x3CF (Miscellaneous): \" + data);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" Alpha Num Disable: \" + videocard.graphicsController.alphaNumDisable);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" Memory map select: \" + videocard.graphicsController.memoryMapSelect);\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" Odd/Even enable : \" + videocard.graphicsController.hostOddEvenEnable);\n \n\n if (oldMemoryMapSelect != videocard.graphicsController.memoryMapSelect)\n needUpdate = true;\n if (oldAlphaNumDisable != videocard.graphicsController.alphaNumDisable)\n {\n needUpdate = true;\n oldScreenHeight = 0;\n }\n break;\n \n case 7: // Colour Don't Care\n videocard.graphicsController.colourDontCare = (byte) (data & 0x0F);\n break;\n \n case 8: // Bit Mask\n videocard.graphicsController.bitMask = data;\n break;\n \n default:\n // Unknown index addressed\n logger.log(Level.WARNING, \"[\" + MODULE_TYPE + \"]\" + \" I/O write port 0x3CF: index \" + videocard.graphicsController.index + \" unhandled\");\n }\n break;\n\n case 0x3B4: // CRT Controller Address Register (monochrome)\n case 0x3D4: // CRT Controller Address Register (colour)\n // Set index to be accessed in CRTC Data Register cycle\n videocard.crtControllerRegister.index = (byte) (data & 0x7F);\n if (videocard.crtControllerRegister.index > 0x18)\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" I/O write port 0x3(B|D)4: invalid CRTC register \" + videocard.crtControllerRegister.index + \" selected\");\n break;\n\n case 0x3B5: // CRTC Data Register (monochrome)\n case 0x3D5: // CRTC Data Register (colour)\n if (videocard.crtControllerRegister.index > 0x18)\n {\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" I/O write port 0x3(B|D)5: invalid CRTC Register (\" + videocard.crtControllerRegister.index + \"); ignored\");\n return;\n }\n // Check if writing is allowed for registers 0x00 - 0x07\n if ((videocard.crtControllerRegister.protectEnable) && (videocard.crtControllerRegister.index < 0x08))\n {\n // Only write exception in protectEnable is lineCompare of Overflow register (0x07)\n if (videocard.crtControllerRegister.index == 0x07)\n {\n // Reset variables before ORing\n videocard.crtControllerRegister.regArray[videocard.crtControllerRegister.index] &= ~0x10;\n videocard.lineCompare &= 0x2ff;\n \n // Bit 4 specifies lineCompare bit 8 \n videocard.crtControllerRegister.regArray[videocard.crtControllerRegister.index] |= (data & 0x10);\n if ((videocard.crtControllerRegister.regArray[0x07] & 0x10) != 0)\n videocard.lineCompare |= 0x100;\n needUpdate = true;\n break;\n }\n else\n {\n return;\n }\n }\n if (data != videocard.crtControllerRegister.regArray[videocard.crtControllerRegister.index])\n {\n videocard.crtControllerRegister.regArray[videocard.crtControllerRegister.index] = data;\n switch (videocard.crtControllerRegister.index)\n {\n case 0x07:\n // Overflow register; specifies bit 8, 9 for several fields\n \n // Reset variables before ORing\n videocard.verticalDisplayEnd &= 0xFF;\n videocard.lineCompare &= 0x2FF;\n\n // Bit 1 specifies verticalDisplayEnd bit 8 \n if ((videocard.crtControllerRegister.regArray[0x07] & 0x02) != 0)\n videocard.verticalDisplayEnd |= 0x100;\n // Bit 6 specifies verticalDisplayEnd bit 9\n if ((videocard.crtControllerRegister.regArray[0x07] & 0x40) != 0)\n videocard.verticalDisplayEnd |= 0x200;\n // Bit 4 specifies lineCompare bit 8\n if ((videocard.crtControllerRegister.regArray[0x07] & 0x10) != 0)\n videocard.lineCompare |= 0x100;\n needUpdate = true;\n break;\n \n case 0x08:\n // Preset row scan; bits 5-6 allow 15/31/35 pixel shift without change in start address, \n // bits 0-4 specify number of scanlines to scroll up (more precise than start address)\n needUpdate = true;\n break;\n \n case 0x09:\n // Maximum scan line; for text mode, value should be char. height - 1, \n // for graphic mode a non-zero value causes repeat of scanline by MSL+1 \n\n // Bit 7 sets scan doubling:\n // FIXME: Why is this ANDed with 0x9F if bit 7 is required?\n videocard.crtControllerRegister.scanDoubling = ((data & 0x9F) > 0) ? (byte) 1 : 0;\n\n // Reset variables before ORing\n videocard.lineCompare &= 0x1FF;\n\n // Bit 6 specifies bit 9 of line_compare\n if ((videocard.crtControllerRegister.regArray[0x09] & 0x40) != 0)\n videocard.lineCompare |= 0x200;\n needUpdate = true;\n break;\n \n case 0x0A:\n case 0x0B:\n case 0x0E:\n case 0x0F:\n // Cursor start & end / cursor location; specifies the scanlines \n // at which the cursor should start and end, and the location of the cursor\n videocard.vgaMemReqUpdate = true;\n break;\n \n case 0x0C:\n case 0x0D:\n // Start address; specifies the display memory address of the upper left pixel/character\n if (videocard.graphicsController.alphaNumDisable != 0)\n {\n needUpdate = true;\n }\n else\n {\n videocard.vgaMemReqUpdate = true;\n }\n break;\n \n case 0x11:\n // Change vertical retrace end\n videocard.crtControllerRegister.protectEnable = ((videocard.crtControllerRegister.regArray[0x11] & 0x80) > 0) ? true : false;\n break;\n \n case 0x12:\n // Change vertical display end\n videocard.verticalDisplayEnd &= 0x300;\n videocard.verticalDisplayEnd |= (((int) videocard.crtControllerRegister.regArray[0x12]) & 0xFF);\n break;\n \n case 0x13:\n case 0x14:\n case 0x17:\n // Line offset; specifies address difference between consecutive scanlines/character lines \n videocard.lineOffset = videocard.crtControllerRegister.regArray[0x13] << 1;\n if ((videocard.crtControllerRegister.regArray[0x14] & 0x40) != 0)\n {\n videocard.lineOffset <<= 2;\n }\n else if ((videocard.crtControllerRegister.regArray[0x17] & 0x40) == 0)\n {\n videocard.lineOffset <<= 1;\n }\n needUpdate = true;\n break;\n\n case 0x18:\n // Line compare; indicates scan line where horiz. division can occur. No division when set to 0x3FF\n videocard.lineCompare &= 0x300;\n videocard.lineCompare |= (((short) videocard.crtControllerRegister.regArray[0x18]) & 0xFF); // Cast from byte to short\n needUpdate = true;\n break;\n }\n\n }\n break;\n\n case 0x3Da: // Feature Control (colour)\n logger.log(Level.CONFIG, \"[\" + MODULE_TYPE + \"]\" + \" I/O write port 0x3DA (Feature Control Register, colour): reserved\");\n break;\n\n case 0x03C1: // Attribute Data Read Register\n // Read only\n break;\n \n default:\n logger.log(Level.INFO, \"[\" + MODULE_TYPE + \"]\" + \" unsupported I/O write to port \" + portAddress + \", data =\" + data);\n\n }\n\n if (needUpdate)\n {\n // Mark all video as updated so the changes will go through\n setAreaForUpdate(0, 0, oldScreenWidth, oldScreenHeight);\n }\n return;\n }",
"public Builder setPort(int value) {\n bitField0_ |= 0x00000004;\n port_ = value;\n onChanged();\n return this;\n }",
"public GPIOPortOutputConfigService(String gpioPortName){\n super();\n this.gpioPortName = gpioPortName;\n this.direction = RaspberyPiPortsConstants.GPIO_DIRECTION_OUT_INITIALLY_LOW;\n\n this.listner = null;\n mHandler = new Handler();\n }",
"void setBit(int index, int value);",
"public void SetInputPins(int pins) throws IOException {\n byte value = mDevice.readRegByte( IODIR );\n mDevice.writeRegByte( IODIR, (byte)(value | pins));\n }",
"public abstract Builder setOutputConfidenceMasks(boolean value);",
"public static void setCAN(String name, int port) {\n mapCAN.put(name, port);\n }",
"public Builder setResponsePort(int value) {\n bitField0_ |= 0x00000040;\n responsePort_ = value;\n onChanged();\n return this;\n }",
"public void handler(int offset, int data) {\n portA_out = (char) (data & 0xFF);\n }",
"public static int OPLWrite(FM_OPL OPL, int a, int v) {\n if ((a & 1) == 0) {\n /* address port */\n\n OPL.address = v & 0xff;\n } else {\n /* data port */\n\n if (OPL.UpdateHandler != null) {\n OPL.UpdateHandler.handler(OPL.UpdateParam, 0);\n }\n OPLWriteReg(OPL, OPL.address, v);\n }\n return (OPL.status >> 7) & 0xFF; //status is uint8\n\n }",
"public Builder setPort(int value) {\n\n port_ = value;\n onChanged();\n return this;\n }",
"public Builder setPort(int value) {\n\n port_ = value;\n onChanged();\n return this;\n }",
"public void setPin(int pin);",
"public void setRadioDAC(int ant, int band, int val) throws IOException\n {\n logger.debug(\"Setting DAC (\"+ant+\",\"+band+\") to \"+val);\n int ich = (ant << 2) | band;\n int cmd = dacMap[ich];\n writeVirtualAddress(cmd+1, val & 0xff);\n writeVirtualAddress(cmd, (val >> 8) & 0xff);\n }",
"public void setPort(int port) {\n this.port = port;\n prefs.putInt(\"AEUnicastOutput.port\", port);\n }",
"public void led(int x, int y, int value) {\n\t\ttry {\n\t\t\toutput.write((value == 1 ? 3 : 4) | 0x80);\n\t\t\toutput.write(((x << 4) | y) & 0xff);\n\t\t} catch (IOException e) { e.printStackTrace(); }\n\t}",
"public void updateOn(boolean on) {\r\n\t\toutString = \"O\" + on + \"\\n\";\r\n\t\tmyPort.write(outString);\r\n\t\tSystem.out.println(outString);\r\n\t}",
"public Builder setDestinationPort(int value) {\n \n destinationPort_ = value;\n onChanged();\n return this;\n }",
"private void setPort(int value) {\n \n port_ = value;\n }",
"private void setPort(int value) {\n \n port_ = value;\n }",
"OutputPort createOutputPort();",
"public void SetInputPolarity(byte values) throws IOException {\n mDevice.writeRegByte( IPOL, values );\n }",
"public static byte setBit(byte input, int position, boolean val){\n return val? (byte) (input | (1 << position)):(byte) (input & ~(1 << position));\n }",
"public void WriteOutputs(byte values) throws IOException {\n mDevice.writeRegByte( GPIO, values );\n }",
"public void setResolution(byte resolution) throws IOException {\n byte userRegister = read_user_register(); //Go get the current register state\n userRegister &= 0b01111110; //Turn off the resolution bits\n resolution &= 0b10000001; //Turn off all other bits but resolution bits\n userRegister |= resolution; //Mask in the requested resolution bits\n\n HTU21D.WRITE_USER_REG.write(device, userRegister);\n\n }",
"public Builder setPort(int value) {\n \n port_ = value;\n onChanged();\n return this;\n }",
"public Builder setPort(int value) {\n \n port_ = value;\n onChanged();\n return this;\n }",
"public void setPortDOutRegisters(byte p1, byte p2){\r\n checkServoCommandThread();\r\n ServoCommand cmd=new ServoCommand();\r\n cmd.bytes=new byte[3];\r\n cmd.bytes[0]=CMD_SET_PORT_DOUT;\r\n cmd.bytes[1]=(byte)(0x0f&p1);\r\n cmd.bytes[2]=(byte)(0xff&p2);\r\n submitCommand(cmd);\r\n\r\n }",
"public Builder setPort(int value) {\n copyOnWrite();\n instance.setPort(value);\n return this;\n }",
"public Builder setPort(int value) {\n copyOnWrite();\n instance.setPort(value);\n return this;\n }",
"private static void setPort(Integer portNumber){\r\n RS232.portNumber=portNumber;\r\n }",
"void setBit(int index, boolean value);",
"public void setAudioPortRange(int minPort, int maxPort);",
"public abstract void setInput(boolean value);",
"@Override\n\tpublic void setIsPort(boolean isPort) {\n\t\t_scienceApp.setIsPort(isPort);\n\t}",
"public void setPortMode(String mode){\r\n\t\tthis.portMode=mode;\r\n\t\tif(!portMode.equals(\"floating\")){\r\n\t\t\tthis.currentPort=(new Integer(portMode)).intValue();\r\n\t\t}\r\n\t}",
"private void convert(int pinNum) {\n\t\tgpio = GpioFactory.getInstance();\n\t\tif (pins[pinNum] == null) {\n\t\t\tswitch (pinNum) {\n\t\t\t// Pins for pi1\n\t\t\tcase 0:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_00, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_01, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_02, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_03, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_04, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_05, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_06, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_07, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_08, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_09, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_10, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_11, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_12, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_13, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 14:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_14, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 15:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_15, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_16, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\n\t\t\t// Pins for pi2, will not through exeption for pi1\n\t\t\tcase 17:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_17, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 18:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_18, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 19:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_19, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 20:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_20, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 21:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_21, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 22:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_22, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 23:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_23, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 24:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_24, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 25:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_25, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 26:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_26, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 27:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_27, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 28:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_28, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\t\t\tcase 29:\n\t\t\t\tpins[pinNum] = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_29, \"MyPin\", PinState.LOW);\n\t\t\t\tpins[pinNum].setShutdownOptions(true, PinState.LOW);\n\t\t\t\tbreak;\n\n\t\t\t// Null if pin dosent exist\n\t\t\tdefault:\n\t\t\t\tpins[pinNum] = null;\n\t\t\t}\n\t\t}\n\t}",
"public void setPort(int param){\r\n \r\n // setting primitive attribute tracker to true\r\n localPortTracker =\r\n param != java.lang.Integer.MIN_VALUE;\r\n \r\n this.localPort=param;\r\n \r\n\r\n }",
"public void setPort(int param){\r\n \r\n // setting primitive attribute tracker to true\r\n localPortTracker =\r\n param != java.lang.Integer.MIN_VALUE;\r\n \r\n this.localPort=param;\r\n \r\n\r\n }",
"public void setPort(int value) {\n this.port = value;\n }",
"public void set(int address, byte val) {\n try {\n direct_write(address, val);\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new AddressOutOfBoundsException(address);\n }\n }",
"public void setOutput8BitGray(boolean output8BitGray) {\n/* 158 */ this.output8BitGray = output8BitGray;\n/* */ }",
"public void setRegisterWriteControl() {\r\n // registers.setRegWrite();\r\n //this.registerWrite.setData(1);\r\n //registers.setRegWriteControl(this.registerWrite);\r\n }",
"Future<OFPortMod> createPortModAsync(DatapathId dpid, OFPort port, OFPortConfig config, boolean enable);",
"public void setSelPort(int d, int index) {\n \tsetSelPort(d, index, true);\n }",
"public int handler(int offset) {\n return (portA_out & ddrA) | (portA_in & ~ddrA);\n }",
"public void setArmTalon(double outputval) {\n\t\tarmMotor.set(outputval);\n\t}",
"public void setOut(boolean out) {\n this.out = out;\n }",
"public final void rule__AstOutputPattern__Group_0__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14824:1: ( ( ( rule__AstOutputPattern__PortAssignment_0_0 ) ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14825:1: ( ( rule__AstOutputPattern__PortAssignment_0_0 ) )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14825:1: ( ( rule__AstOutputPattern__PortAssignment_0_0 ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14826:1: ( rule__AstOutputPattern__PortAssignment_0_0 )\n {\n before(grammarAccess.getAstOutputPatternAccess().getPortAssignment_0_0()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14827:1: ( rule__AstOutputPattern__PortAssignment_0_0 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14827:2: rule__AstOutputPattern__PortAssignment_0_0\n {\n pushFollow(FOLLOW_rule__AstOutputPattern__PortAssignment_0_0_in_rule__AstOutputPattern__Group_0__0__Impl29954);\n rule__AstOutputPattern__PortAssignment_0_0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getAstOutputPatternAccess().getPortAssignment_0_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"private void setSubscriberPort(int value) {\n\t\tthis.subscriberPort = value;\n\t}",
"public static void writeBit(int[][] matrix, int col, int row, boolean bit, int mask) {\n matrix[col][row] = maskColor(col, row, bit, mask);\n }",
"public void setOutPortCount(int outPortCount) {\n\t\tthis.rightPortCount = outPortCount;\n\t\tthis.properties.put(\"outPortCount\", String.valueOf(outPortCount));\n\t}",
"public void setDefaultOutputsEnabled( boolean enabled );",
"public Builder setSnPort(int value) {\n \n snPort_ = value;\n onChanged();\n return this;\n }",
"public Builder setSnPort(int value) {\n \n snPort_ = value;\n onChanged();\n return this;\n }",
"public void setBlueBit(int bit, boolean value) {\n\t this.blue[bit] = value;\n\t this.color = computeColor();\n\t }",
"public Builder setHealSnPort(int value) {\n \n healSnPort_ = value;\n onChanged();\n return this;\n }",
"public void inputChangeEvent( float time, int dstPin, boolean v ) {\n\tvalue = !v;\n\t Simulator.schedule(\n\t new Simulator.Event( time\n\t\t + (delay * 0.95f)\n\t\t + PRNG.randomFloat( delay * 0.1f ) ) {\n\t\t void trigger() {\n\t\t\t outputChangeEvent( this.time );\n\t\t }\n\t\t}\n\t );\n }",
"private void setS1Port(int value) {\n \n s1Port_ = value;\n }",
"void writeBit(int bit) throws IOException;",
"public synchronized void setOutputRange(double minOutput, double maxOutput)\n {\n final String funcName = \"setOutputRange\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"min=%f,max=%f\", minOutput, maxOutput);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n if (maxOutput <= minOutput)\n {\n throw new IllegalArgumentException(\"maxOutput must be greater than minOutput\");\n }\n\n if (Math.abs(minOutput) == Math.abs(maxOutput))\n {\n outputLimit = maxOutput;\n }\n\n this.minOutput = minOutput;\n this.maxOutput = maxOutput;\n }",
"public void setOutput(int mode) {\n\t\tswitch(mode) {\n\t\tcase UP:\n\t\t\tup = true;\n\t\t\tdown = false;\n\t\t\tleft = false;\n\t\t\tright = false;\n\t\t\tbreak;\n\t\tcase DOWN:\n\t\t\tup = false;\n\t\t\tdown = true;\n\t\t\tleft = false;\n\t\t\tright = false;\n\t\t\tbreak;\n\t\tcase LEFT:\n\t\t\tup = false;\n\t\t\tdown = false;\n\t\t\tleft = true;\n\t\t\tright = false;\n\t\t\tbreak;\n\t\tcase RIGHT:\n\t\t\tup = false;\n\t\t\tdown = false;\n\t\t\tleft = false;\n\t\t\tright = true;\n\t\t\tbreak;\n\t\t}\n\t}",
"public int\n setBitRate(int bitRate);",
"protected void configurePorts() {\n \t\tremoveInputs();\n \t\tremoveOutputs();\n \n \t\t// FIXME: Replace with your input and output port definitions\n \n \t\t// Hard coded input port, expecting a single String\n \t\t//File name for the Input tables\n \t\taddInput(IN_FIRST_INPUT_TABLE, 0, true, null, String.class);\n \t\taddInput(IN_FORMAT_INPUT_TABLE, 0, true, null, String.class);\n \t\taddInput(IN_FORMAT_OUTPUT_TABLE, 0, true, null, String.class);\n \t\taddInput(IN_FILTER, 0, true, null, String.class);\n \t\t\n \t\t\n \t\tif(configBean.getTypeOfInput().compareTo(\"File\")==0){\n \t\t\taddInput(IN_OUTPUT_TABLE_NAME, 0, true, null, String.class);\n \t\t}\n \t\t\n \n \t\t// Optional ports depending on configuration\n \t\t//if (configBean.getExampleString().equals(\"specialCase\")) {\n \t\t//\t// depth 1, ie. list of binary byte[] arrays\n \t\t//\taddInput(IN_EXTRA_DATA, 1, true, null, byte[].class);\n \t\t//\taddOutput(OUT_REPORT, 0);\n \t\t//}\n \t\t\n \t\t// Single value output port (depth 0)\n \t\taddOutput(OUT_SIMPLE_OUTPUT, 0);\n \t\t// Single value output port (depth 0)\n \t\taddOutput(OUT_REPORT, 0);\n \n \t}",
"public interface BitOutput {\n\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\t/**\n\t * Writes a 1-bit boolean value. This method writes {@code 0b1} for {@code true}\n\t * and {@code 0b0} for {@code false}.\n\t *\n\t * @param value the value to write.\n\t * @throws IOException if an I/O error occurs\n\t */\n\tvoid writeBoolean( boolean value ) throws IOException;\n\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\t/**\n\t * Writes a {@code byte} value.\n\t *\n\t * @param unsigned a flag for indicating unsigned value; {@code true} for\n\t * unsigned, {@code false} for signed.\n\t * @param size the number of bits for value; between {@code 1} and\n\t * {@code 7 + (unsigned ? 0 : 1)}, both inclusive.\n\t * @param value the value to write\n\t * @throws IOException if an I/O error occurs.\n\t */\n\tvoid writeByte( boolean unsigned, int size, byte value ) throws IOException;\n\n\t/**\n\t * Writes a {@code short} value.\n\t *\n\t * @param unsigned a flag for indicating unsigned value; {@code true} for\n\t * unsigned, {@code false} for signed.\n\t * @param size the number of bits for value; between {@code 1} and\n\t * {@code 15 + (unsigned ? 0 : 1)}, both inclusive.\n\t * @param value the value to write\n\t * @throws IOException if an I/O error occurs.\n\t */\n\tvoid writeShort( boolean unsigned, int size, short value ) throws IOException;\n\n\t/**\n\t * Writes an {@code int} value. Only the lower specified number of bits are\n\t * written.\n\t *\n\t * @param unsigned a flag for indicating unsigned value; {@code true} for\n\t * unsigned, {@code false} for signed.\n\t * @param size the number of bits for value; between {@code 1} and\n\t * {@code 31 + (unsigned ? 0 : 1)}, both inclusive.\n\t * @param value the value to write\n\t * @throws IOException if an I/O error occurs.\n\t */\n\tvoid writeInt( boolean unsigned, int size, int value ) throws IOException;\n\n\t/**\n\t * Writes a {@code long} value. Only the lower specified number of bits are\n\t * written.\n\t *\n\t * @param unsigned a flag for indicating unsigned value; {@code true} for\n\t * unsigned, {@code false} for signed.\n\t * @param size the number of valid bits for value; between {@code 1} and\n\t * {@code 63 + (unsigned ? 0 : 1)}, both inclusive.\n\t * @param value the value to write\n\t * @throws IOException if an I/O error occurs.\n\t */\n\tvoid writeLong( boolean unsigned, int size, long value ) throws IOException;\n\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\t/**\n\t * Writes a {@code char} value.\n\t *\n\t * @param size the number of bits for value; between {@code 1} and {@code 16},\n\t * both inclusive.\n\t * @param value the value to write\n\t * @throws IOException if an I/O error occurs.\n\t */\n\tvoid writeChar( int size, char value ) throws IOException;\n\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\t/**\n\t * Aligns to specified number of bytes by padding zero bits.\n\t *\n\t * @param bytes the number of bytes to align; must be positive.\n\t * @return the number of zero bits padded while aligning.\n\t * @throws IllegalArgumentException if {@code bytes} is less than or equals to\n\t * {@code 0}.\n\t * @throws IOException if an I/O error occurs.\n\t */\n\tlong align( int bytes ) throws IOException;\n}",
"public void setOutput(int output) {\n Output = output;\n }",
"public void setVideoPortRange(int minPort, int maxPort);",
"public static void setDIO(String name, int port) {\n mapDIO.put(name, port);\n }",
"public void completeOutputPortSettings(int newPortCount) {\n\t\tchangeOutPortCount(newPortCount);\n\t\tfor (int i = 0; i < (newPortCount); i++) {\n\t\t\tPort outPort = new Port(Constants.OUTPUT_SOCKET_TYPE + (i), Constants.OUTPUT_SOCKET_TYPE\n\t\t\t\t\t+ (i), this, newPortCount, PortTypeEnum.OUT, (i), isAllowMultipleLinksForPort(\"out0\"), \n\t\t\t\t\tisLinkMandatoryForPort(\"out0\"), PortAlignmentEnum.RIGHT);\n\t\t\tports.put(Constants.OUTPUT_SOCKET_TYPE + (i), outPort);\n\t\t\tfirePropertyChange(\"Component:add\", null, outPort);\n\t\t}\n\t}",
"public void setTextPortRange(int minPort, int maxPort);",
"public void set(ControlMode controlMode, double value)\n {\n switch (controlMode)\n {\n case Throttle:\n super.set(value);\n// System.out.printf(\"Port: %d value %f\\n\", port, value);\n break;\n case Position:\n super.getPIDController().setReference(value, ControlType.kPosition);\n break;\n case Velocity:\n super.getPIDController().setReference(value, ControlType.kVelocity);\n break;\n }\n }",
"public int updateBit(int i,int j, boolean set){\n int value=(set)?1:0;\n int mask=~(1<<j);\n int clear=mask&i;\n return clear|(1<<value);\n\n}",
"@Override\n\tpublic void write(int value) {\n\t\tint lowByte = getFirstArg();\n\t\tint highByte = getSecondArg();\n\t\tint address = highByte;\n\t\taddress = address << 8;\n\t\taddress |= lowByte;\n\t\tCpuMem.getInstance().writeMem(address, value);\n\t}",
"void setNetworkMask(byte[] networkMask);",
"public void write(int address, int value){\n\r\n switch (address){\r\n case CONTROL_REGISTER_1:{ // 0\r\n //logger.info(\"Write \" + Integer.toHexString(value) + \" to \" + Integer.toHexString(address));\r\n registers_w[CONTROL_REGISTER_1] = value & 0xFF;\r\n if ((value & CR1_SPRITE_SIZE) != 0){\r\n doubleSizeSprites = true;\r\n }\r\n else {\r\n doubleSizeSprites = false;\r\n }\r\n /**\r\n * creates a 0-3 index into the name table address array\r\n * by setting which way we go horizontally and vertically\r\n */\r\n int oldH = horizontalNameLatch;\r\n int oldV = verticalNameLatch;\r\n horizontalNameLatch = value & 0x1;\r\n if (shouldLog && oldH != horizontalNameLatch){\r\n logger.info(\"Set H to \" + horizontalNameLatch);\r\n }\r\n verticalNameLatch = (value & 0x2) >> 1;\r\n if (shouldLog && oldV != verticalNameLatch){\r\n logger.info(\"Set V to \" + verticalNameLatch);\r\n }\r\n playfieldSelector = (value & CR1_SCREEN_PATTERN_ADDRESS) >> 4;\r\n break;\r\n }\r\n case CONTROL_REGISTER_2:{ // 1\r\n // logger.info(\"CR2: \" + Integer.toHexString(value));\r\n registers_w[CONTROL_REGISTER_2] = value & 0xFF;\r\n displayEnabled = (registers_w[CONTROL_REGISTER_2] & CR2_SCREEN_SWITCH) != 0;\r\n spritesEnabled = (registers_w[CONTROL_REGISTER_2] & CR2_SPRITE_SWITCH) != 0;\r\n\r\n \r\n break;\r\n }\r\n case 2: {\r\n break;\r\n }\r\n case SPRITE_MEMORY_ADDRESS:{ // 3\r\n setSpriteMemoryAddress(value);\r\n break;\r\n }\r\n case SPRITE_MEMORY_DATA:{ // 4\r\n writeToSpriteMemory(value);\r\n break;\r\n }\r\n case SCROLL_OFFSET:{ // 5\r\n if (shouldLog)\r\n logger.info(\"Wrote to scroll offset: \" + value);\r\n registers_w[SCROLL_OFFSET] = value;\r\n if (isFirstWriteToScroll){\r\n horizontalTileLatch = (value & 0xF8) >> 3;\r\n fineHorizontalCounter = value & 0x7; // immediate effect... but what's it used for?\r\n isFirstWriteToScroll = false;\r\n }\r\n else {\r\n verticalTileLatch = (value & 0xF8) >> 3;\r\n fineVerticalLatch = value & 0x7;\r\n isFirstWriteToScroll = true;\r\n }\r\n break;\r\n }\r\n case PPU_MEMORY_ADDRESS:{ /** 6 - write high byte, then low byte */\r\n if (lastPPUAddressWasHigh){\r\n lastPPUAddressWasHigh = false;\r\n\r\n\r\n // System.out.println(\"Scanline = \" + scanLine);\r\n horizontalTileLatch = value & 0x1F;\r\n verticalTileLatch |= ((value & 0xE0) >> 5); // gets top 2 bits from first write\r\n\r\n loadAddressFromLatches();\r\n // System.out.println(\"PPU Address: \" + Integer.toHexString(ppuMemoryAddress));\r\n // ppuMemoryAddress = ((registers_w[address] & 0xFF) << 8) | (value & 0xFF);\r\n // System.out.println(\"PPU Address after real load: \" + Integer.toHexString(ppuMemoryAddress));\r\n\r\n\r\n }\r\n else { // this is the 1st write\r\n verticalTileLatch = (value & 0x3) << 3; // the upper 2 bits of latch\r\n horizontalNameLatch = (value & 0x4) >> 2;\r\n verticalNameLatch = (value & 0x8) >> 3;\r\n fineVerticalLatch = (value & 0x30) >> 4;\r\n lastPPUAddressWasHigh = true;\r\n }\r\n registers_w[address] = value & 0xFF;\r\n break;\r\n }\r\n case PPU_MEMORY_DATA: { // 7\r\n // System.out.println(\"PPU MEMORY WRITE: \" + Integer.toHexString(ppuMemoryAddress) + \",\" + Integer.toHexString(value));\r\n //memory.write(ppuMemoryAddress, value & 0xFF);\r\n\t\t\tint writeAddress = horizontalTileCounter \r\n | (verticalTileCounter << 5)\r\n | (horizontalNameCounter << 10)\r\n | (verticalNameCounter << 11)\r\n | ((fineVerticalCounter & 0x3) << 12);\r\n\t\t\tif (writeAddress == 0x3F10 ||\r\n\t\t\t\t\twriteAddress == 0x3F14 ||\r\n\t\t\t\t\twriteAddress == 0x3F18 ||\r\n\t\t\t\t\twriteAddress == 0x3F1C) {\r\n\t\t\t\twriteAddress = writeAddress & 0x3F0F;\r\n\t\t\t}\r\n memory.write(writeAddress, value & 0xFF);\r\n /*\r\n if (ppuMemoryAddress < 0x3F00){\r\n memory.write(ppuMemoryAddress, value & 0xFF);\r\n }\r\n else {\r\n memory.write(ppuMemoryAddress - 0x3F00, value & 0xFF);\r\n }\r\n */\r\n incrementCounters();\r\n /*\r\n if ((registers_w[CONTROL_REGISTER_1] & CR1_VERTICAL_WRITE) == 0){\r\n ppuMemoryAddress++;\r\n }\r\n else {\r\n ppuMemoryAddress += 32;\r\n }\r\n */\r\n // if (ppuMemoryAddress >= ram.size()) { ppuMemoryAddress = 0; }\r\n break;\r\n }\r\n\r\n default: throw new RuntimeException(\"Invalid write attempt: \" + Integer.toHexString(address));\r\n }\r\n }",
"void setToValue(int val);",
"private void setS2BRelay(\n PToP.S2BRelay.Builder builderForValue) {\n rsp_ = builderForValue.build();\n rspCase_ = 24;\n }",
"abstract protected int PortToRunOn();",
"@Override\r\n\tpublic void writeROM(int address, byte value) {\r\n\t\taddress &= 0xFFFF;\r\n\t\t// RAM enabling ?\r\n\t\tif (address < 0x2000) {\r\n\t\t\tm_ramEnabled = ((value & 0x0F) == 0x0A);\r\n\t\t}\r\n\t\t// ROM bank selection (lower 5 bits) ?\r\n\t\telse if (address < 0x4000) {\r\n\t\t\tm_romBankIndex = ((m_romBankIndex & 0b11100000) | (value & 0b00011111));\r\n\t\t\tif (m_romBankIndex == 0) m_romBankIndex++;\r\n\t\t\tif (m_romBankIndex >= getCartidge().getRomBanks() && Cartidge.TRACE) {\r\n\t\t\t\tSystem.out.println(\"Warning : selecting a ROM bank out of range : \" + m_romBankIndex + \" >= \" + getCartidge().getRomBanks());\r\n\t\t\t}\r\n\t\t}\r\n\t\t// ROM bank selection (upper 3 bits) or RAM bank\r\n\t\telse if (address < 0x6000) {\r\n\t\t\tif (m_modeSelect == ModeSelect.ROM) {\r\n\t\t\t\tm_romBankIndex = ((m_romBankIndex & 0b00011111) | (value & 0b11100000));\r\n\t\t\t\tif (m_romBankIndex >= getCartidge().getRomBanks() &&Cartidge.TRACE) {\r\n\t\t\t\t\tSystem.out.println(\"Warning : selecting a ROM bank out of range : \" + m_romBankIndex + \" >= \" + getCartidge().getRomBanks());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tm_ramBankIndex = value & 0x03;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// RAM/ROM mode select\r\n\t\telse if (address < 0x8000) {\r\n\t\t\tm_modeSelect = BitUtils.isSet(value, 0) ? ModeSelect.RAM : ModeSelect.ROM;\r\n\t\t\tif (m_modeSelect == ModeSelect.RAM && !m_hasRam && Cartidge.TRACE) {\r\n\t\t\t\tSystem.out.println(\"Warning : trying to select RAM mode is a cartidge without RAM\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse \r\n\t\t\tthrow new IllegalArgumentException(\"ROM write address out of range : \" + Instruction.toHexShort(address));\r\n\t}",
"void setShutterLEDState(boolean on);",
"public void GPIOWrite(int pin, int data)\n\t{\n\t\tint gpioMask = 1 << 4;\n\t\tint meta = gpioMask | (pin);\n\t\twrite(meta);\n\t\twrite(data);\n\t}",
"public final void setDevicePort(String port){\n peripheralPort = port;\n }",
"public com.example.DNSLog.Builder setPort(int value) {\n validate(fields()[6], value);\n this.port = value;\n fieldSetFlags()[6] = true;\n return this;\n }"
] |
[
"0.6079098",
"0.5848249",
"0.5738519",
"0.572119",
"0.55822843",
"0.53492",
"0.5293312",
"0.5293312",
"0.5253517",
"0.5178062",
"0.5099544",
"0.5091656",
"0.5072483",
"0.5058131",
"0.5054156",
"0.5046618",
"0.5046618",
"0.5008588",
"0.49502134",
"0.48934937",
"0.484409",
"0.48168647",
"0.4802752",
"0.4795654",
"0.47622862",
"0.4762247",
"0.47589672",
"0.47445917",
"0.47445917",
"0.47043195",
"0.46599367",
"0.4656012",
"0.46433416",
"0.4639721",
"0.46316928",
"0.46288022",
"0.46288022",
"0.4621991",
"0.4593249",
"0.45840126",
"0.45767787",
"0.45761105",
"0.45687416",
"0.45687416",
"0.45646006",
"0.4564013",
"0.4564013",
"0.45639652",
"0.4563692",
"0.45559567",
"0.45473307",
"0.45413774",
"0.45294246",
"0.4526776",
"0.45012623",
"0.45012623",
"0.45001698",
"0.448373",
"0.44834673",
"0.4483294",
"0.44724444",
"0.44698477",
"0.44664577",
"0.446601",
"0.44477335",
"0.44342744",
"0.44180986",
"0.44050613",
"0.4399295",
"0.43888262",
"0.43877333",
"0.43877333",
"0.43713683",
"0.43683183",
"0.4363136",
"0.436007",
"0.43592185",
"0.43515313",
"0.4350036",
"0.4342226",
"0.43419862",
"0.4330135",
"0.4328518",
"0.43271235",
"0.43208283",
"0.43160808",
"0.4311621",
"0.4308825",
"0.42736596",
"0.42682564",
"0.4262208",
"0.4259031",
"0.4257787",
"0.4257083",
"0.42549077",
"0.42509043",
"0.42385158",
"0.42217815",
"0.42200732",
"0.42193896"
] |
0.4939526
|
19
|
Returns the UID, the UID where the Bricklet is connected to, the position, the hardware and firmware version as well as the device identifier. The position can be 'a', 'b', 'c' or 'd'. The device identifiers can be found :ref:`here `. .. versionadded:: 2.0.0~(Plugin)
|
public Identity getIdentity() throws TimeoutException, NotConnectedException {
byte options = 0;
boolean isResponseExpected = getResponseExpected(FUNCTION_GET_IDENTITY);
if(isResponseExpected) {
options = 8;
}
ByteBuffer bb = ipcon.createRequestBuffer(uid, (byte)8, FUNCTION_GET_IDENTITY, options, (byte)(0));
byte[] response = sendRequestExpectResponse(bb.array(), FUNCTION_GET_IDENTITY);
bb = ByteBuffer.wrap(response, 8, response.length - 8);
bb.order(ByteOrder.LITTLE_ENDIAN);
Identity obj = new Identity();
obj.uid = IPConnection.string(bb, 8);
obj.connectedUid = IPConnection.string(bb, 8);
obj.position = (char)(bb.get());
for(int i = 0; i < 3; i++) {
obj.hardwareVersion[i] = IPConnection.unsignedByte(bb.get());
}
for(int i = 0; i < 3; i++) {
obj.firmwareVersion[i] = IPConnection.unsignedByte(bb.get());
}
obj.deviceIdentifier = IPConnection.unsignedShort(bb.getShort());
return obj;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static String getDeviceUUID(){\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\n String uuid = adapter.getAddress();\n return uuid;\n }",
"private static String pseudoUniqueId() {\n\t\t// decimal\n\t\tfinal Integer DECIMAL = 10;\n\n\t\t// return the android device some common info(board, brand, CPU type +\n\t\t// ABI convention, device, display, host, id, manufacturer, model,\n\t\t// product, tags, type and user) combined string\n\t\treturn new StringBuilder().append(Build.BOARD.length() % DECIMAL)\n\t\t\t\t.append(Build.BRAND.length() % DECIMAL)\n\t\t\t\t.append(Build.CPU_ABI.length() % DECIMAL)\n\t\t\t\t.append(Build.DEVICE.length() % DECIMAL)\n\t\t\t\t.append(Build.DISPLAY.length() % DECIMAL)\n\t\t\t\t.append(Build.HOST.length() % DECIMAL)\n\t\t\t\t.append(Build.ID.length() % DECIMAL)\n\t\t\t\t.append(Build.MANUFACTURER.length() % DECIMAL)\n\t\t\t\t.append(Build.MODEL.length() % DECIMAL)\n\t\t\t\t.append(Build.PRODUCT.length() % DECIMAL)\n\t\t\t\t.append(Build.TAGS.length() % DECIMAL)\n\t\t\t\t.append(Build.TYPE.length() % DECIMAL)\n\t\t\t\t.append(Build.USER.length() % DECIMAL).toString();\n\t}",
"public UUID getComponentId();",
"public static String getPseudoDeviceID() {\n final String ID = \"42\";\n return ID +\n Build.BOARD.length() % 10 + Build.BRAND.length() % 10 +\n Build.CPU_ABI.length() % 10 + Build.DEVICE.length() % 10 +\n Build.DISPLAY.length() % 10 + Build.HOST.length() % 10 +\n Build.ID.length() % 10 + Build.MANUFACTURER.length() % 10 +\n Build.MODEL.length() % 10 + Build.PRODUCT.length() % 10 +\n Build.TAGS.length() % 10 + Build.TYPE.length() % 10 +\n Build.USER.length() % 10;\n }",
"String getBusi_id();",
"UUID getDeviceId();",
"long getRfIdentifier();",
"long getUID();",
"public UUID getDeviceUuid() {\n return uuid;\n }",
"@Array({16}) \n\t@Field(1) \n\tpublic Pointer<Byte > UserID() {\n\t\treturn this.io.getPointerField(this, 1);\n\t}",
"String getUid();",
"org.hl7.fhir.String getDeviceIdentifier();",
"public String uuid(){\n\t\t String device_unique_id = Secure.getString(activity.getContentResolver(),\n\t\t Secure.ANDROID_ID);\n\t\t return device_unique_id;\n\t\t}",
"public String toString() {\n return this.UID;\n }",
"public String getUID() {\n return UID;\n }",
"public final int getDevice()\n\t{\n\t\treturn address & 0xFF;\n\t}",
"public int getUID() {\n return uid;\n }",
"@Nullable\n @Generated\n @Selector(\"identifierForVendor\")\n public native NSUUID identifierForVendor();",
"public String getChunleiUid() {\n String info = null;\n try {\n Uri queryurl = Uri.parse(REGINFO_URL + CHUNLEI_ID);\n ContentResolver resolver = mContext.getContentResolver();\n info = resolver.getType(queryurl);\n } catch (Exception e) {\n System.out.println(\"in or out strean exception\");\n }\n return info;\n }",
"@Override\n public int getCommandId() {\n return serialUid;\n }",
"public String getRingerDevice();",
"int getUid();",
"int getUid();",
"String getUuid();",
"public java.lang.String getUID() {\r\n return UID;\r\n }",
"public static synchronized String getUID() throws UnknownHostException, SocketException {\r\n \r\n // Initialized MAC address if necessary.\r\n if (!initialized) {\r\n initialized = true;\r\n macAddress = UMROMACAddress.getMACAddress();\r\n macAddress = Math.abs(macAddress);\r\n }\r\n \r\n // Use standard class to get unique values.\r\n String guidText = new UID().toString();\r\n \r\n StringTokenizer st = new StringTokenizer(guidText, \":\");\r\n \r\n int unique = Math.abs(Integer.valueOf(st.nextToken(), 16).intValue());\r\n long time = Math.abs(Long.valueOf(st.nextToken(), 16).longValue());\r\n // why add 0x8000 ? because usually starts at -8000, which wastes 4 digits\r\n int count = Math\r\n .abs(Short.valueOf(st.nextToken(), 16).shortValue() + 0x8000);\r\n \r\n // concatenate values to make it into a DICOM GUID.\r\n String guid = UMRO_ROOT_GUID + macAddress + \".\" + unique + \".\" + time\r\n + \".\" + count;\r\n \r\n return guid;\r\n }",
"long getUid();",
"long getUid();",
"public int getUID() {\n return 0;\n }",
"public String getDeviceUDID() {\r\n\t\tTelephonyManager telephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);\r\n\t\treturn telephonyManager.getDeviceId();\r\n\t}",
"public final int getDeviceID() {\n return device.getDeviceID();\n }",
"public String readDeviceSN(){\r\n return mFactoryBurnUtil.readDeviceSN();\r\n }",
"public final String getVendorId(){\n return peripheralVendorId;\n }",
"java.lang.String getUid();",
"java.lang.String getUid();",
"public String getId(){\n return uid;\n }",
"public String getMyDeviceName() {\n return bluetoothName;\n }",
"public BluetoothDevice getDevice(int position) {\n return mLeDevices.get(position);\n }",
"public static String getUUID(BundleContext bc) {\n synchronized (\"org.osgi.framework.uuid\") {\n String uuid = bc.getProperty(\"org.osgi.framework.uuid\");\n if (uuid == null) {\n uuid = UUID.randomUUID().toString();\n System.setProperty(\"org.osgi.framework.uuid\", uuid);\n }\n return uuid;\n }\n }",
"@SuppressLint(\"HardwareIds\")\n String getDeviceID() {\n return Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n }",
"public int uid() { return uid; }",
"@Override\n public UUID getUuid() {\n return GATT_UUID;\n }",
"@Deprecated\r\n\tpublic String readDeviceID(){\r\n\t\treturn mFactoryBurnUtil.readDeviceID();\r\n\t}",
"public short getBcdDevice() {\r\n\t\treturn bcdDevice;\r\n\t}",
"Reference getDevice();",
"Integer getDeviceId();",
"public DeviceLocator getDeviceLocator();",
"PCDevice getPC(UUID uID);",
"public String getDeviceid() {\n return deviceid;\n }",
"public static long getSerialversionuid() {\n return serialVersionUID;\n }",
"public java.lang.String getUUID() {\n java.lang.Object ref = uUID_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n uUID_ = s;\n }\n return s;\n }\n }",
"public abstract String getUuid();",
"public java.lang.String getUUID() {\n java.lang.Object ref = uUID_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n uUID_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"java.lang.String getDeviceId();",
"String getDeviceName();",
"public java.lang.String getResultDeviceGuid() {\n return resultDeviceGuid;\n }",
"public long getUuid_() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readInt64(__io__address + 0);\n\t\t} else {\n\t\t\treturn __io__block.readInt64(__io__address + 0);\n\t\t}\n\t}",
"private String getDeviceID() {\n try {\n TelephonyManager telephonyManager;\n\n telephonyManager =\n (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);\n\n /*\n * getDeviceId() function Returns the unique device ID.\n * for example,the IMEI for GSM and the MEID or ESN for CDMA phones.\n */\n return telephonyManager.getDeviceId();\n }catch(SecurityException e){\n return null;\n }\n }",
"public static List<String> getDeviceList() {\n\t\tList<String> str = CommandRunner.exec(CMD_GET_DEVICE_ID);\n\t\tList<String> ids = new ArrayList<String>();\n\t\tfor (int i = 1; i < str.size(); i++) {\n\t\t\tString id = str.get(i).split(\" |\\t\")[0].trim();\n\t\t\tif (!id.isEmpty()) {\n\t\t\t\tids.add(id);\n\t\t\t}\n\t\t}\n\t\treturn ids;\n\t}",
"@Override\n\tpublic DeviceBean getDeviceDisplayInfo(String uuid, int major, int minor) {\n\t\treturn dao.getDeviceDisplayInfo(uuid,major,minor);\n\t}",
"public String getDevice_id() {\r\n\t\treturn device_id;\r\n\t}",
"String getSerial();",
"@Override\r\n public final String toString() {\r\n return \"\\nDevice ID: [\" + getId() + \"]\\n\"\r\n + \"Device Name: [\" + getName() + \"]\\n\"\r\n + \"Device Size: [\" + getSize() + \"]\\n\"\r\n + \"Device Position: [\" + getPosition() + \"]\\n\"\r\n + \"Device Resolution: [\" + getResolution() + \"\\n\"\r\n + \"Device Refresh Rate: [\" + getRefreshRate() + \"\\n\"\r\n + \"Device Bits Per Pixel: [\" + getBpp() + \"\\n\"\r\n + \"Supported Display Modes: [\" + getSupportedDisplaySettings().size() + \"]\\n\";\r\n }",
"java.lang.String getUUID();",
"public static String getOldUdid(Context context) {\n TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);\n String udid = telephonyManager.getDeviceId();\n\n if (isValidImei(udid)) {\n return udid;\n }\n\n udid = Secure.getString(context.getContentResolver(), Secure.ANDROID_ID);\n if (!TextUtils.isEmpty(udid) && !INVALID_ANDROIDID.equals(udid.toLowerCase(Locale.getDefault()))) {\n return udid;\n }\n\n String macAddress = getWifiMacAddress(context);\n if (!TextUtils.isEmpty(macAddress)) {\n udid = toMD5(macAddress + Build.MODEL + Build.MANUFACTURER + Build.ID + Build.DEVICE);\n return udid;\n }\n String name = String.valueOf(System.currentTimeMillis());\n udid = UUID.nameUUIDFromBytes(name.getBytes()).toString();\n \n return udid;\n }",
"@Override\r\n\tpublic String getUid() {\n\t\treturn uid;\r\n\t}",
"public String toString() {\n\t\treturn \"Charging Pod. UID: \"+UID+ \". Power units per tick: \" + POWER_UNITS_PER_TICK + \". Assigned robot UID: \" + assignedRobotUID ;\n\t}",
"public String getProductID() {\n final byte[] data = new byte[12];\n mem.getBytes(16, data, 0, data.length);\n return new String(data).trim();\n }",
"public String getDeviceId() {\n String info = \"\";\n try {\n Uri queryurl = Uri.parse(REGINFO_URL + CHUNLEI_ID);\n ContentResolver resolver = mContext.getContentResolver();\n info = resolver.getType(queryurl);\n if (null == info && null != mContext) {\n info = getIMEI();\n }\n if (null == info) {\n info = \"\";\n }\n } catch (Exception e) {\n System.out.println(\"in or out strean exception\");\n }\n return info;\n }",
"public String getDeviceNameGetPoint() {\n\t\treturn deviceNameGetPoint;\n\t}",
"@Array({11}) \n\t@Field(0) \n\tpublic Pointer<Byte > BrokerID() {\n\t\treturn this.io.getPointerField(this, 0);\n\t}",
"private String getUserCommand(ArrayList<String> parameters) {\n return parameters.get(POSITION_PARAM_COMMAND);\n }",
"public String getId(){\n\t\treturn uuid;\n\t}",
"public String getUUID () \n\t{\n\t\treturn (String)get_Value(COLUMNNAME_UUID);\n\t}",
"final int getDeviceNum() {\n return device.getDeviceNum();\n }",
"static String getVendor() {return glVendor;}",
"int getUid() {\n return uid;\n }",
"@AutoEscape\n\tpublic String getAsuid();",
"public int getUid() {\n return uid;\n }",
"public String getSoftwareDriverId();",
"@Override\n\tpublic String getUserUuid();",
"@Override\n\tpublic String getUserUuid();",
"public int getUid() {\n return uid;\n }",
"public String getUuid() {\n return this.Uuid;\n }",
"public String getUniqueID(Context ctx)\n {\n String m_szDevIDShort = \"\";\n String m_szAndroidID = \"\";\n String m_szWLANMAC = \"\";\n\n try {\n m_szDevIDShort = \"35\" + // we make this look like a valid IMEI\n Build.BOARD.length() % 10 + Build.BRAND.length() % 10 +\n Build.CPU_ABI.length() % 10 + Build.DEVICE.length() % 10 +\n Build.DISPLAY.length() % 10 + Build.HOST.length() % 10 +\n Build.ID.length() % 10 + Build.MANUFACTURER.length() % 10 +\n Build.MODEL.length() % 10 + Build.PRODUCT.length() % 10 +\n Build.TAGS.length() % 10 + Build.TYPE.length() % 10 +\n Build.USER.length() % 10;\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n try {\n m_szAndroidID = Settings.Secure.getString(ctx.getContentResolver(), Settings.Secure.ANDROID_ID);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n try {\n WifiManager wm = (WifiManager) ctx.getSystemService(Context.WIFI_SERVICE);\n m_szWLANMAC = wm.getConnectionInfo().getMacAddress();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n String m_szLongID = m_szWLANMAC + m_szDevIDShort + m_szAndroidID;\n\n MessageDigest m = null;\n try {\n m = MessageDigest.getInstance(\"MD5\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n m.update(m_szLongID.getBytes(), 0, m_szLongID.length());\n byte p_md5Data[] = m.digest();\n\n //noinspection RedundantStringConstructorCall\n String m_szUniqueID = new String();\n for (int i = 0; i < p_md5Data.length; i++) {\n int b = (0xFF & p_md5Data[i]);\n // if it is a single digit, make sure it have 0 in front (proper\n // padding)\n if (b <= 0xF)\n m_szUniqueID += \"0\";\n // add number to string\n m_szUniqueID += Integer.toHexString(b);\n }\n\n return m_szUniqueID;\n }",
"java.lang.String getSerial();",
"public String getUid() {\n Object ref = uid_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n uid_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"com.google.protobuf.ByteString getUidBytes();",
"public java.lang.CharSequence getUid() {\n return uid;\n }",
"public abstract String getOsID();",
"UUID getUUID();",
"public static String getDeviceInformation(Context context) {\n String details = \"SDK\\t: \" + Build.VERSION.SDK_INT\n +\"\\nBRD\\t: \" + Build.BRAND\n +\"\\nH/W\\t: \" + Build.HARDWARE\n +\"\\nHST\\t: \" + Build.HOST\n +\"\\nID \\t: \" + Build.ID\n +\"\\nMFR\\t: \" + Build.MANUFACTURER\n +\"\\nMDL\\t: \" + Build.MODEL\n +\"\\nPRD\\t: \" + Build.PRODUCT\n +\"\\nDEV\\t: \" + Build.DEVICE\n +\"\\nAPP\\t: \" + context.getResources().getString(R.string.software_version)\n +\"\\n\\n\\n\";\n Log.d(MainActivity.APP_TAG, \"Device Details: \" + details);\n return details;\n }",
"public Long getUid() {\r\n return uid;\r\n }",
"public Long getUid() {\n return uid;\n }",
"public Long getUid() {\n return uid;\n }",
"public Long getUid() {\n return uid;\n }",
"public String getDevicePickupId() {\n return this.devicePickupId;\n }",
"public String getUid() {\n return uid;\n }",
"public String getUid() {\n return uid;\n }",
"public String getUid() {\n return uid;\n }",
"com.google.protobuf.ByteString\n getUidBytes();"
] |
[
"0.6170328",
"0.5644081",
"0.558844",
"0.5576964",
"0.5478881",
"0.547588",
"0.54389715",
"0.54341495",
"0.541373",
"0.53955185",
"0.5385013",
"0.5376099",
"0.5364611",
"0.5356562",
"0.53546774",
"0.5354511",
"0.53530204",
"0.5308536",
"0.53082323",
"0.5306266",
"0.53057957",
"0.52832437",
"0.52832437",
"0.5274498",
"0.52605426",
"0.52604574",
"0.5260258",
"0.5260258",
"0.5259993",
"0.5254082",
"0.5249633",
"0.52334744",
"0.52274865",
"0.5225195",
"0.5225195",
"0.51995933",
"0.51899195",
"0.5175528",
"0.5161168",
"0.51561475",
"0.51554155",
"0.51541746",
"0.51421016",
"0.5121543",
"0.5111844",
"0.5097156",
"0.5096944",
"0.50870085",
"0.5086341",
"0.5083865",
"0.5081198",
"0.5081111",
"0.5079433",
"0.50773203",
"0.5074468",
"0.5067899",
"0.5064979",
"0.5060923",
"0.50572354",
"0.50494665",
"0.5041376",
"0.5038162",
"0.50323194",
"0.5025779",
"0.50245816",
"0.50233376",
"0.5016526",
"0.5014753",
"0.5011446",
"0.50112164",
"0.5009084",
"0.5005045",
"0.5002268",
"0.5000681",
"0.4999904",
"0.49989665",
"0.49979493",
"0.499587",
"0.49953115",
"0.4992808",
"0.4989902",
"0.4989902",
"0.4987834",
"0.4986405",
"0.49812168",
"0.49791119",
"0.49719018",
"0.49716032",
"0.49699515",
"0.4967855",
"0.49670777",
"0.4964562",
"0.49616507",
"0.4959448",
"0.4959448",
"0.4959448",
"0.49591553",
"0.4958524",
"0.4958524",
"0.4958524",
"0.4955771"
] |
0.0
|
-1
|
Adds a Interrupt listener.
|
public void addInterruptListener(InterruptListener listener) {
listenerInterrupt.add(listener);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"InterruptResource createInterruptResource();",
"public interface IPullInterruptListener {\n /**\n * This getScreenWidth is to interrupt the running task of HeaderView.\n */\n public void onInterruptHeaderRefreshing();\n\n /**\n * This getScreenWidth is to interrupt the running task of FooterView.\n */\n public void onInterruptFooterRefreshing();\n }",
"public void addListener(\n IListener listener\n )\n {listeners.add(listener);}",
"public synchronized void addListener(IIpcEventListener listener) {\n\t\tlisteners.add(listener);\n\t}",
"public interface InterruptibleListener {\r\n void interrupt(PubNub pubnub);\r\n}",
"public void addEnumerateCallback(OctaveReference listener) {\n\t\tlistenerEnumerate.add(listener);\n\t}",
"public interface IEvenListener {\n}",
"public void registerListener(IMountServiceListener listener) throws RemoteException;",
"public void addIdListener(CardListener listener){\n\t//\tiDListen = listener;\n\t}",
"@Override\r\n\tpublic void onInterrupt() {\n\t\t\r\n\t}",
"@Override\n public void onInterrupt() {\n }",
"public void addListener(IEpzillaEventListner listener)\n\t\t\tthrows RemoteException;",
"void addTagListener(final TagListener tagListener);",
"public void addListener(EventListener listener);",
"public void registerListener(IMountServiceListener listener) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeStrongBinder((listener != null ? listener.asBinder() : null));\n mRemote.transact(Stub.TRANSACTION_registerListener, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }",
"protected abstract void HandleInterrupts();",
"public interface IRQChangeListener {\n\n /**\n reageer op een IRQChangeEvent\n \n @param evt het IRQChangeEvent waarop gereageerd wordt\n */\n public void IRQChange(IRQChangeEvent evt);\n}",
"void setListener(Listener listener);",
"@Override\n\tpublic void addListener() {\n\t\t\n\t}",
"Move listen(IListener ll);",
"protected void registerListener() {\r\n\t\t// do nothing\r\n\t}",
"public void registerInterest(IObserver IObserver) {\n observers.add(IObserver);\n }",
"void addListener(IEventChannelListener<K, V> listener);",
"public interface Listener {}",
"void addActionListener(IActionListener actionListener);",
"public void interrupt();",
"void registerListeners();",
"@Override\n\tpublic void registListener(IListener listener) throws RemoteException {\n\t\tremoteCallbackList.register(listener);\n\t}",
"public void add(InputChangedListener listener)\r\n\t{\r\n\r\n\t}",
"public void add(InputChangedListener listener)\r\n {\r\n\r\n }",
"abstract public void addListener(Listener listener);",
"@Override\n public void addListener(ResourceListener listener) {\n }",
"void addListener(RiakFutureListener<V,T> listener);",
"public void addVMinterfPair(String intrfcLabel, String ipAddress) {\n\r\n this.intrfces.add(new VMinterface(intrfcLabel, ipAddress));\r\n }",
"public void addListener(ClickListener listener);",
"@Override\n\t\tpublic void interrupt() {\n\t\t\t\n\t\t\t///why is this method not called?????\n\t\t\tSystem.out.println(\"here\");\n\t\t\tsuper.interrupt();\n\t\t}",
"public void removeInterruptListener(InterruptListener listener) {\n\t\tlistenerInterrupt.remove(listener);\n\t}",
"void addListener(RosZeroconfListener listener);",
"public void addListener(ChipListener l) {\n if (!listeners.contains(l)) listeners.add(l);\n }",
"protected abstract void doExternalInterrupt(int number);",
"public void addIndicationListener(TransportAddress localAddr, MessageEventHandler indicationListener) {\n addMessageListener(localAddr, new IndicationEventHandler(indicationListener));\n }",
"default void addListener(Runnable listener) {\n\t\tthis.getItemListeners().add(listener);\n\t}",
"public abstract void addServiceListener(PhiDiscoverListener listener);",
"@Override\r\n\tpublic void doAttentionInterrupt() {\r\n\t\t// irrelevant for tape\r\n\t}",
"@Override\n public void addHandlerListener(IHandlerListener handlerListener) {\n\n }",
"public void registerListener(InstitutionListener listener) {\n this.listener = listener;\n }",
"public synchronized void addExceptionListener(ActionListener l) {\n if (Trace.isTracing(Trace.MASK_APPLICATION))\n {\n Trace.record(Trace.MASK_APPLICATION, BEANNAME, \"addExceptionListener registered\");\n }\n exceptionListeners.addElement(l); //add listeners\n }",
"private Interrupt(Object semaphore, String interrupt_key) {\n this.semaphore = semaphore;\n this.interrupt_key = interrupt_key;\n }",
"public void addBeforeInstructionExecutionListener(\n Class<? extends Instruction> instructionClass, BiConsumer<Instruction, JvmThread> biConsumer\n ) {\n if(!beforeInstructionExecutionListeners.containsKey(instructionClass)) {\n beforeInstructionExecutionListeners.put(instructionClass, new ArrayList<>());\n }\n beforeInstructionExecutionListeners\n .get(instructionClass)\n .add(\n biConsumer\n );\n }",
"public abstract void registerListeners();",
"public void addHitTestListener(HitTestListener l) {\n hitTestListenerList.add(HitTestListener.class, l);\n }",
"@Override\n\tpublic void addHandlerListener(IHandlerListener handlerListener) {\n\n\t}",
"@Override\n\tpublic void listenerInterrupted(ConnectionListenerEvent evt) {\n\t\t\n\t}",
"public static void registerListener(AltResource resource, Object listener){\n Set<Object> resourceListeners;\n if(listeners.containsKey(resource))\n resourceListeners = listeners.get(resource);\n else\n resourceListeners = new HashSet<>();\n resourceListeners.add(listener);\n listeners.put(resource, resourceListeners);\n }",
"public interface Listener {\n}",
"public interface Listener {\n}",
"private void addEventListener(IEventListener<T> listener) {\n\t\t\tevent.addEventListener(listener);\n\t\t}",
"public Client addListener(ClientListener listener);",
"public OldIndicationEventHandler(MessageEventHandler indicationListener) {\n super((char) 0x0110, indicationListener);\n }",
"@Override\r\n public void AddListener(IController controller) {\r\n this.controller = controller;\r\n }",
"public void addListener(ServiceRequest req, NamingService.Listener l) {\n namingService.addListener(req, l);\n }",
"public void addListener(PrimitiveId primitiveId, SessionListener sessionListener) {\n Set<SessionListener> sessionListeners = listeners.computeIfAbsent(primitiveId, k -> new CopyOnWriteArraySet<>());\n sessionListeners.add(sessionListener);\n }",
"public void addNPTListener(NPTListener l){}",
"public void interrupt() {\r\n ServerLogger.log(this.myID + \" interrupt()\");\r\n this.run = false;\r\n //super.interrupt(); //To change body of overridden methods use File | Settings | File Templates.\r\n }",
"private void setListener() {\n\t}",
"public void addTuioListener(TuioListener listener)\n\t{\n\t\tlistenerList.addElement(listener);\n\t}",
"@Override\n\t\t\tpublic void onAdd(String url, Boolean isInterrupt)\n\t\t\t{\n\t\t\t\tsuper.onAdd(url, isInterrupt);\n\t\t\t\tinitNotification();\n\t\t\t}",
"public abstract void interrupt();",
"void addHitListener(HitListener hl);",
"void addHitListener(HitListener hl);",
"void addHitListener(HitListener hl);",
"void addHitListener(HitListener hl);",
"public void startListening(String iface) {\n mIface = iface;\n\n Message messageStart = mERDHandler.obtainMessage(ERDConstants.START_CMD.value());\n mERDHandler.sendMessage(messageStart);\n\n mGuard.open(\"dispose\");\n }",
"public void setRequestListener(IRequestListener requestListener) {\n this.requestListener = requestListener;\n }",
"public void addListener(UIEventListener uel) {\n this.listeners.add(uel);\n }",
"public IUndo addListener(IListener listener) {\n return listeners.add(listener);\n }",
"void addRefreshListener(RefreshListener listener) throws RemoteException;",
"void registerFilterListener(FilterListener listener);",
"public synchronized void addEventListener(IEventListener listener){\r\n\t\twhile (isBlocked) {\r\n\t\t\tThread.yield();\r\n\t\t}\r\n\t\tif (!listeners.contains(listener))\r\n\t\t\tlisteners.add(listener);\r\n\t}",
"public interface IBaseListener {\n}",
"public void addInterface(String interf) {\n m_classBuilder.addInterface(interf);\n }",
"public void addListener(ILabelProviderListener listener) {\n\t}",
"void RegisterGattListener( @NonNull BleGattListener gattListener );",
"public void addJSDIEventListener(IJSDIEventListener listener, EventRequest request) {\n\t\tEventDispatcher dispatcher = ((JSDIDebugTarget) getDebugTarget()).getEventDispatcher();\n\t\tif (dispatcher != null) {\n\t\t\tdispatcher.addJSDIEventListener(listener, request);\n\t\t}\n\t}",
"protected void installListeners() {\n\n\t}",
"protected void installListeners() {\n }",
"protected void installListeners() {\n }",
"private void addActionCellListener(ActionCellListener listener) {\n\t\tactionCellListeners.add(listener);\n\t}",
"public void addConnectionListener(ConnectionListener listener);",
"public void addListener(Listener l) {\n\t\tmListenerSet.add(l);\n\t}",
"public void addListener( JoystickInputListener listener ) {\n if ( listeners == null ) {\n listeners = new ArrayList<JoystickInputListener>();\n }\n\n listeners.add( listener );\n }",
"public void initGpioInterrupt() throws InterruptedException {\n\n //System.out.println(\"<--Pi4J--> GPIO interrupt test program\");\n\n // setup wiringPi\n if (Gpio.wiringPiSetup() == -1) {\n //System.out.println(\" ==>> GPIO SETUP FAILED\");\n return;\n }\n\n // configure pins as input pins\n Gpio.pinMode(0, Gpio.INPUT) ;\n\n // configure pins with pull down resistance\n Gpio.pullUpDnControl(0, Gpio.PUD_UP);\n\n // here is another approach using a custom callback class/instance instead of an anonymous method\n InterruptCallback risingCallbackInstance = new InterruptCallback(\"RISING\");\n\n // setup a pin interrupt callbacks for pin 2\n Gpio.wiringPiISR(0, Gpio.INT_EDGE_FALLING, risingCallbackInstance);\n //Gpio.wiringPiISR(0, Gpio.INT_EDGE_BOTH, risingCallbackInstance);\n\n // wait for user to exit program\n //System.console().readLine(\"Press <ENTER> to exit program.\\r\\n\");\n }",
"private void checkForIOInterrupt() {\r\n\t\t// If there is no interrupt to process, do nothing\r\n\t\tif (m_IC.isEmpty()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t// Retreive the interrupt data\r\n\t\tint[] intData = m_IC.getData();\r\n\t\t\r\n\t\t// Report the data if in verbose mode\r\n\t\tif (m_verbose) {\r\n\t\t\tSystem.out.println(\"CPU received interrupt: type=\" + intData[0]\r\n\t\t\t\t\t+ \" dev=\" + intData[1] + \" addr=\" + intData[2] + \" data=\"\r\n\t\t\t\t\t+ intData[3]);\r\n\t\t}\r\n\t\t\r\n\t\t// Dispatch the interrupt to the OS\r\n\t\tswitch (intData[0]) {\r\n\t\t\tcase InterruptController.INT_READ_DONE:\r\n\t\t\t\tm_TH.interruptIOReadComplete(intData[1], intData[2], intData[3]);\r\n\t\t\t\tbreak;\r\n\t\t\tcase InterruptController.INT_WRITE_DONE:\r\n\t\t\t\tm_TH.interruptIOWriteComplete(intData[1], intData[2]);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.out.println(\"CPU ERROR: Illegal Interrupt Received.\");\r\n\t\t\t\tSystem.exit(-1);\r\n\t\t\t\tbreak;\r\n\t\t}// switch\r\n\t\t\r\n\t}",
"@Override\n public <T extends EventListener> void addListener(T t) {\n\n }",
"public abstract void addObserver(IObserver anIObserver);",
"protected void addListenerTo(BioResource BioResource) {\n\t\t\tBioResource.addListener(this);\n\t\t}",
"public void addScanListener(Listener l) {\n listeners.add(l);\n }",
"public interface AidTouchListener {\n public void start();\n}",
"public InterruptClimb() {\n super();\n requires(Drivetrain.getInstance());\n requires(Climber.getInstance());\n requires(Collector.getInstance());\n requires(Elevator.getInstance());\n \n }",
"public void add(ConnectionListener connectionListener) throws ServerException;"
] |
[
"0.59050995",
"0.5904046",
"0.5631003",
"0.5524854",
"0.55190516",
"0.54314804",
"0.5376996",
"0.53150547",
"0.53021944",
"0.526183",
"0.5258637",
"0.5230243",
"0.51714647",
"0.51686716",
"0.5161648",
"0.5151875",
"0.51329255",
"0.5096797",
"0.5075429",
"0.5056975",
"0.5051946",
"0.5036013",
"0.50188094",
"0.5003146",
"0.49953035",
"0.49900976",
"0.49736038",
"0.49625978",
"0.49070585",
"0.48982394",
"0.48884535",
"0.487221",
"0.4850799",
"0.48435727",
"0.48384842",
"0.483328",
"0.48319718",
"0.48251972",
"0.48142523",
"0.48112556",
"0.4804728",
"0.47968253",
"0.47854638",
"0.47772405",
"0.47729033",
"0.47712222",
"0.4763154",
"0.47567323",
"0.47385827",
"0.4738203",
"0.4737704",
"0.4724136",
"0.47211123",
"0.47189656",
"0.47132954",
"0.47132954",
"0.47034976",
"0.47030103",
"0.47025466",
"0.4701861",
"0.4696143",
"0.46910095",
"0.46888506",
"0.4686507",
"0.4676775",
"0.46766466",
"0.4666668",
"0.46612355",
"0.4645857",
"0.4645857",
"0.4645857",
"0.4645857",
"0.46357155",
"0.46300283",
"0.46297613",
"0.46285927",
"0.4628029",
"0.4627313",
"0.46243516",
"0.4623593",
"0.46189523",
"0.46147695",
"0.46123642",
"0.4602098",
"0.45979792",
"0.45950076",
"0.45950076",
"0.45883366",
"0.45814896",
"0.4580859",
"0.45758912",
"0.45732814",
"0.45699012",
"0.45635948",
"0.45613098",
"0.45593286",
"0.45560592",
"0.4555762",
"0.45478427",
"0.45478255"
] |
0.7853838
|
0
|
Removes a Interrupt listener.
|
public void removeInterruptListener(InterruptListener listener) {
listenerInterrupt.remove(listener);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void removeListener() {\n this.mListener = null;\n }",
"public void unregisterListener() {\n\t\tthis.listener = null;\n\t}",
"public synchronized void removeListener(IIpcEventListener listener) {\n\t\tlisteners.remove(listener);\n\t}",
"public void removeListener(T listener);",
"void removeListener(IEventChannelListener<K, V> listener);",
"private void removeEventListener(IEventListener<T> listener) {\n\t\t\tevent.removeEventListener(listener);\n\t\t}",
"public synchronized void removeEventListener(IEventListener listener){\r\n\t\twhile (isBlocked) {\r\n\t\t\tThread.yield();\r\n\t\t}\r\n\t\tlisteners.remove(listener);\r\n\t}",
"public synchronized void removeEventListener(InputListener listener) {\n\t\tlisteners.remove(listener);\n\t}",
"@Override\n\tpublic void unregistListener(IListener listener) throws RemoteException {\n\t\tremoteCallbackList.unregister(listener);\n\t}",
"public void removeListener(IEpzillaEventListner listener)\n\t\t\tthrows RemoteException;",
"void removeListener(RosZeroconfListener listener);",
"public void removeEnumerateCallback(OctaveReference listener) {\n\t\tlistenerEnumerate.remove(listener);\n\t}",
"public void removeListener(GrillEventListener listener);",
"private void unregisterListener() {\n mSensorManager.unregisterListener(this);\n }",
"public void removeTuioListener(TuioListener listener)\n\t{\n\t\tlistenerList.removeElement(listener);\t\n\t}",
"void removeListener(RiakFutureListener<V,T> listener);",
"private void unregisterListener() {\n\t\tif (!mHasStarted || mSensorManager == null) {\n\t\t\treturn;\n\t\t}\n\t\tmHasStarted = false;\n\t\tmSensorManager.unregisterListener(mAccListener);\n\t}",
"public void removeListener(Listener l) {\n\t\tmListenerSet.remove(l);\n\t}",
"public void removeListener(TransferListener listener) {\n listeners.remove(listener);\n }",
"void removeListener(BotListener l);",
"public void removeListener( JoystickInputListener listener ) {\n if ( listeners != null ) {\n listeners.remove( listener );\n }\n }",
"public void removeListener(int index) {\n IApplication listener = this.listeners.get(index);\n if (listener == null) {\n return;\n }\n this.app.removeListener(listener);\n this.listeners.set(index, null); // don't remove because that would shift the indexes\n }",
"public void removeListener(final IModuleListener listener) {\n m_listeners.removeListener(listener);\n }",
"public void removeConnectionListener(ConnectionListener listener);",
"public ConnectionListener remove(String listenerID);",
"public void unsubscribe(IMouseListener l)\n {\n // ADD new listener to the listeners list:\n _listeners.remove(l);\n }",
"public void removeNPTListener(NPTListener l) {}",
"public void removeListener(INotifyChangedListener notifyChangedListener)\n {\n changeNotifier.removeListener(notifyChangedListener);\n }",
"public void unregister(IMessageListener listener) {\r\n registry.unregister(listener);\r\n }",
"public void removeCompletionListener(Runnable listener) {\n\t\tcompletionListeners.remove(listener);\n\t}",
"public void removeDisconnectedCallback(OctaveReference listener) {\n\t\tlistenerDisconnected.remove(listener);\n\t}",
"@Override\r\n\tpublic synchronized void unregisterListener(EventListener<T> listener) {\n\t\tlisteners.removeElement(listener);\r\n\t}",
"void unsubscribe(LogListener listener);",
"@Override\n public void removeListener(StreamListener listener) {\n streamListeners.remove(listener);\n }",
"void removeListener( ConfigurationListener listener );",
"private void removeListener(final @NonNull Consumer<E> listener) {\n eventListeners.remove(listener);\n\n if (eventListeners.isEmpty()) {\n HandlerList.unregisterAll(this);\n LISTENERS_GROUPS.remove(configuration);\n }\n }",
"public void removeListener(final IMemoryViewerSynchronizerListener listener) {\n m_listeners.removeListener(listener);\n }",
"public void removePeripheralEventListener(PeripheralHardwareDriverInterface l);",
"@Override\n public void removeListener(ResourceListener listener) {\n }",
"public void unregisterListener(PPGListener listener){\n listeners.remove(listener);\n }",
"@Override\n public void removeHandlerListener(IHandlerListener handlerListener) {\n\n }",
"@Override\r\n public void unregister(L listener) {\r\n synchronized (listeners) {\r\n listeners.remove(listener);\r\n weak.remove(listener);\r\n }\r\n }",
"public void removeDeviceListener(DeviceDriverListener device);",
"@Override\r\n\tpublic void removeHandlerListener(IHandlerListener handlerListener) {\n\r\n\t}",
"public void removeReachabilityListener(Consumer<ReachabilityEvent> reachabilityListener) {\r\n reachabilityListeners.remove(reachabilityListener);\r\n }",
"void removeListener( AvailabilityListener listener );",
"public void removeInteractionsListener(InteractionsListener l) {\n _listeners.remove(l);\n }",
"public void removeListener(DCCSessionListener listener) {\n while(this.chatListeners.remove(listener)) {\n // just keep removing the listener until we no longer have any more of that type left\n }\n }",
"public void removeListener(final T listener) {\n if (listener == null)\n throw new IllegalArgumentException(\"Parameter 'listener' must not be null!\");\n for (Iterator<T> it = _elements.iterator(); it.hasNext(); ) {\n if (it.next().equals(listener)) {\n it.remove();\n break;\n }\n }\n }",
"public void removeScanListener(Listener l) {\n listeners.remove(l);\n }",
"void removeListener(\n ReaderSettingsListenerType l);",
"public void removeListener(ICdtVariableChangeListener listener){\n\t\tfListeners.remove(listener);\n\t}",
"@Override\n\tpublic void unregisterEventListener(IHFModuleEventListener li) {\n\t\tLog.d(\"HFModuleManager\", \"unregisterEventListener\");\n\t\tthis.eventListenerList.remove(li);\n\t}",
"public void unregisterListener() {\n mPhone.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE);\n /* SPRD: Bug 697839 add For VOLTE and VoWiFi icon. @{ */\n try {\n if (mIsImsListenerRegistered) {\n mIsImsListenerRegistered = false;\n if (mIImsServiceEx != null) {\n mIImsServiceEx.unregisterforImsRegisterStateChanged(mImsUtListenerExBinder);\n }\n }\n /* SPRD: modify for bug723743 @{ */\n if (mIsImsReceiverRegistered) {\n mContext.unregisterReceiver(mImsIntentReceiver);\n mIsImsReceiverRegistered = false;\n }\n if (mIsModemReciverRegistered) {\n mContext.unregisterReceiver(mModemStateChangeReciver);\n mIsModemReciverRegistered = false;\n }\n /* @} */\n } catch (RemoteException e) {\n Log.e(mTag, \"RemoteException: \" + e);\n }\n /* @} */\n mContext.getContentResolver().unregisterContentObserver(mObserver);\n /* SPRD: Dual volte signalStrength display for bug 666045. @{ */\n if (mDualVoLTEListener != null) {\n mPhone.listen(mDualVoLTEListener, PhoneStateListener.LISTEN_NONE);\n }\n mContext.unregisterReceiver(mReceiver);\n /* @} */\n }",
"default void removeListener(Runnable listener) {\n\t\tthis.getItemListeners().remove(listener);\n\t}",
"public void removeHitTestListener(HitTestListener l) {\n hitTestListenerList.remove(HitTestListener.class, l);\n }",
"public void removeKernelEventListener( KernelEventListener listener )\n {\n m_state.removeKernelEventListener( listener );\n }",
"public void removeListener(IMXEventListener listener) {\n if (isAlive() && (null != listener)) {\n synchronized (mMxEventDispatcher) {\n mMxEventDispatcher.removeListener(listener);\n }\n }\n }",
"public void unregisterListeners(){\n listeners.clear();\n }",
"public void removeEventListener(EventListener listener){\n try {\n listenerList.remove(EventListener.class, listener);\n } catch (Exception e) {\n System.out.println(\"[analizadorClient.removeEventListener]\" + e.getMessage());\n }\n \n \n }",
"void removeHitListener(HitListener hl);",
"void removeHitListener(HitListener hl);",
"void removeHitListener(HitListener hl);",
"void removeHitListener(HitListener hl);",
"public void removeInvalidationListener(Runnable listener)\n {\n myInvalidationChangeSupport.removeListener(listener);\n }",
"void removeExecutionListener(ExecutionListener listener);",
"public void\t\tremoveUCallbackListener(String\t\ttag);",
"public void removeInternalListener(InternalListener listener) {\r\n getManager().removeInternalListener(listener);\r\n }",
"public void removeListener(ILabelProviderListener listener) {\n\t}",
"public void removeFactListener(GenericFactListener<Fact> listener);",
"public boolean removeListener(\n IListener listener\n )\n {return listeners.remove(listener);}",
"public void removeListener(ValueChangedListener listener) {\n\t\t_listenerManager.removeListener(listener);\n\t}",
"public void removeListener(ILabelProviderListener listener) {\n \t\t\r\n \t}",
"public void removeListener(LineListener listener) {\n\t\tplayer.removeListeners(listener);\n\t}",
"public void removeRequestListener(RequestListener listener) {\n removeMessageListener(new RequestListenerMessageEventHandler(listener));\n }",
"public void removeEventListener(OneToOneChatListener listener) throws RcsServiceException {\n\t\tif (api != null) {\n\t\t\ttry {\n\t\t\t\tapi.removeEventListener2(listener);\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RcsServiceException(e.getMessage());\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new RcsServiceNotAvailableException();\n\t\t}\n\t}",
"public void removeListener(PrimitiveId primitiveId, SessionListener sessionListener) {\n Set<SessionListener> sessionListeners = listeners.get(primitiveId);\n if (sessionListeners != null) {\n sessionListeners.remove(sessionListener);\n if (sessionListeners.isEmpty()) {\n listeners.remove(primitiveId);\n }\n }\n }",
"synchronized public void removeClientListener(ClientListener l)\n {\n \t\tif (listeners == null)\n \t\t\tlisteners = new ArrayList<ClientListener>();\n \t\tlisteners.remove(l);\n }",
"void removeListener(@Nonnull final ServletRequestAttributeListenerInfo info)\n {\n final ServletRequestAttributeListener service = this.requestAttributeListeners\n .remove(info.getServiceReference());\n if (service != null)\n {\n info.ungetService(bundle, service);\n }\n }",
"public synchronized void removeWindowListener(WindowListener l) {\n windowListener = AWTEventMulticaster.remove(windowListener, l);\n }",
"public void removeConnectedCallback(OctaveReference listener) {\n\t\tlistenerConnected.remove(listener);\n\t}",
"public void removeListener(INotifyChangedListener notifyChangedListener) {\r\n\t\tchangeNotifier.removeListener(notifyChangedListener);\r\n\t}",
"public void removeListener(INotifyChangedListener notifyChangedListener) {\r\n\t\tchangeNotifier.removeListener(notifyChangedListener);\r\n\t}",
"public void removeListener(INotifyChangedListener notifyChangedListener) {\r\n\t\tchangeNotifier.removeListener(notifyChangedListener);\r\n\t}",
"public void removeListener(INotifyChangedListener notifyChangedListener) {\r\n\t\tchangeNotifier.removeListener(notifyChangedListener);\r\n\t}",
"public void removeListener(StatisticsListener listener)\r\n\t{\r\n\t\tlisteners.remove(listener);\r\n\t}",
"public void removeListener(INotifyChangedListener notifyChangedListener) {\n\t\tchangeNotifier.removeListener(notifyChangedListener);\n\t}",
"public void removeListener(INotifyChangedListener notifyChangedListener) {\n\t\tchangeNotifier.removeListener(notifyChangedListener);\n\t}",
"public void removeListener(INotifyChangedListener notifyChangedListener) {\n\t\tchangeNotifier.removeListener(notifyChangedListener);\n\t}",
"public void removeListener(INotifyChangedListener notifyChangedListener) {\n\t\tchangeNotifier.removeListener(notifyChangedListener);\n\t}",
"public void removeListener(INotifyChangedListener notifyChangedListener) {\n\t\tchangeNotifier.removeListener(notifyChangedListener);\n\t}",
"public void removeListener(INotifyChangedListener notifyChangedListener) {\n\t\tchangeNotifier.removeListener(notifyChangedListener);\n\t}",
"public void removeListener(INotifyChangedListener notifyChangedListener) {\n\t\tchangeNotifier.removeListener(notifyChangedListener);\n\t}",
"public void removeListener(INotifyChangedListener notifyChangedListener) {\n\t\tchangeNotifier.removeListener(notifyChangedListener);\n\t}",
"public void removeListener(INotifyChangedListener notifyChangedListener) {\n\t\tchangeNotifier.removeListener(notifyChangedListener);\n\t}",
"public void removeListener(INotifyChangedListener notifyChangedListener) {\n\t\tchangeNotifier.removeListener(notifyChangedListener);\n\t}",
"public void removeListener(INotifyChangedListener notifyChangedListener) {\n\t\tchangeNotifier.removeListener(notifyChangedListener);\n\t}",
"public void removeListener(INotifyChangedListener notifyChangedListener) {\n\t\tchangeNotifier.removeListener(notifyChangedListener);\n\t}",
"public void removeListener(INotifyChangedListener notifyChangedListener) {\n\t\tchangeNotifier.removeListener(notifyChangedListener);\n\t}",
"public void removeONDEXListener(ONDEXListener l) {\n listeners.remove(l);\n }"
] |
[
"0.7202174",
"0.7038897",
"0.70287436",
"0.7004235",
"0.67777133",
"0.67204404",
"0.6649486",
"0.6634337",
"0.66329503",
"0.66177994",
"0.6599542",
"0.6559052",
"0.6521289",
"0.6487958",
"0.6476629",
"0.644864",
"0.64412373",
"0.64300495",
"0.6403386",
"0.63889706",
"0.6376799",
"0.63707244",
"0.63650674",
"0.6358702",
"0.63498574",
"0.63400394",
"0.63377345",
"0.6331197",
"0.6319969",
"0.63196987",
"0.630325",
"0.6284255",
"0.6282129",
"0.6264715",
"0.62643605",
"0.62628603",
"0.62484884",
"0.62471807",
"0.6239594",
"0.6220194",
"0.62081385",
"0.62019396",
"0.61945575",
"0.61857927",
"0.6185724",
"0.6182887",
"0.61717755",
"0.61581045",
"0.6157735",
"0.6137374",
"0.6114132",
"0.61096543",
"0.61086524",
"0.60843706",
"0.6068547",
"0.60548115",
"0.6047851",
"0.60470897",
"0.60369104",
"0.60338366",
"0.6021308",
"0.6021308",
"0.6021308",
"0.6021308",
"0.60192454",
"0.6016524",
"0.5989352",
"0.598039",
"0.59721607",
"0.5971681",
"0.59697837",
"0.5964415",
"0.5963785",
"0.59604764",
"0.5960128",
"0.59436727",
"0.5941345",
"0.594059",
"0.59403557",
"0.59309936",
"0.5922098",
"0.5915317",
"0.5915317",
"0.5915317",
"0.5915317",
"0.5914774",
"0.5909691",
"0.5909691",
"0.5909691",
"0.5909691",
"0.5909691",
"0.5909691",
"0.5909691",
"0.5909691",
"0.5909691",
"0.5909691",
"0.5909691",
"0.5909691",
"0.5909691",
"0.590884"
] |
0.8065883
|
0
|
Adds a MonoflopDone listener.
|
public void addMonoflopDoneListener(MonoflopDoneListener listener) {
listenerMonoflopDone.add(listener);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public interface MonoflopDoneListener {\n\t\tpublic void monoflopDone(char port, short selectionMask, short valueMask);\n\t}",
"public void removeMonoflopDoneListener(MonoflopDoneListener listener) {\n\t\tlistenerMonoflopDone.remove(listener);\n\t}",
"public void addFinishedListener(Consumer<List<S>> listener) {\n finishedListeners.add(listener);\n }",
"public interface DoneListener {\n public void done();\n}",
"public void addCompletionListener(Runnable listener) {\n\t\tcompletionListeners.add(listener);\n\t\tif(isDone() || isCancelled()) {\n\t\t\tlistener.run();\n\t\t}\t\t\n\t}",
"public void addOnStopped(FXPlatformRunnable stopped)\n {\n onStopped.add(stopped);\n }",
"public void addPluginManagerListener( PluginManagerListener listener )\n {\n pluginManagerListeners.add( listener );\n if ( isExecuted() )\n {\n firePluginsMonitored(listener);\n }\n }",
"public void afterDone() {\n }",
"public void afterDone() {\n }",
"public void addFinishListener(ActionListener f)\n\t{\n\t\tfinish.addActionListener(f);\n\t}",
"void addCompletedEventListener(IGameStateListener listener);",
"public void addListener(ZipListener listener) {\n synchronized (listeners) {\n listeners.add(new WeakReference<ZipListener>(listener));\n }\n }",
"public void addDoneTarget(int id, Integer myTarget)\n\t\t{\n\t\t\ttargetsDone.add(myTarget);\n\t\t}",
"void addDoneTask(Task task);",
"public void addNPTListener(NPTListener l){}",
"public void addListener( RemoteFileIOListener passedListener ) {\n if(passedListener != null){\n\n synchronized(theTaskListeners){\n if(!theTaskListeners.contains(passedListener)){\n theTaskListeners.add(passedListener);\n }\n }\n }\n }",
"@Override\n\tpublic void onLeaveLobbyDone(LobbyEvent arg0) {\n\t\tMain.log(getClass(), \"onLeaveLobbyDone\");\n\t}",
"@Override\n\tpublic void onSubscribeLobbyDone(LobbyEvent arg0) {\n\t\tMain.log(getClass(), \"onSubscribeLobbyDone\");\n\t}",
"public interface Listener {\n \tpublic void notifyDone(LookupTypeQuery q, boolean complete, Type.Promise type);\n }",
"public void addConnectedCallback(OctaveReference listener) {\n\t\tlistenerConnected.add(listener);\n\t}",
"public void addDisconnectedCallback(OctaveReference listener) {\n\t\tlistenerDisconnected.add(listener);\n\t}",
"void ifDoneFinish() {\r\n\t\t\t\t\t\tif (wip.decrementAndGet() == 0) {\r\n\t\t\t\t\t\t\tobserver.finish();\r\n\t\t\t\t\t\t\tclose();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}",
"public synchronized void addCompletionListener(ActionListener l) {\n if (Trace.isTracing(Trace.MASK_APPLICATION))\n {\n Trace.record(Trace.MASK_APPLICATION, BEANNAME, \"addCompletionListener registered\");\n }\n completionListeners.addElement(l); //add listeners\n }",
"public void markAsDone() {\n this.done = true;\n }",
"ProcessTaskFactory<T> addCompletionListener(Function<ProcessTaskWrapper<?>, Void> function);",
"@Override\n\t\t\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\t\t\tif (onFinishListen!=null) {\n\t\t\t\t\t\t\tonFinishListen.onFinish();\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"public void markAsDone(){\n isDone = true;\n }",
"public int addOnFinishEvent(final Runnable runnable) {\n\t\tif (runnable == null)\n\t\t\tthrow new IllegalArgumentException(\"Given paramter is null\");\n\t\tonFinishRunnables.add(runnable);\n\t\treturn onFinishRunnables.indexOf(runnable);\n\t}",
"void subscribeDoneTrigger()\r\n\t{\r\n\t\tsubscribeTrigger( TriggerQueue.DONE_TRIGGER_TEXT,\r\n\t\t\tfTriggerQueue\r\n\t\t\t);\r\n\t}",
"synchronized public void jobDone(){ // l'action a été réalisée\n\t\tdone = true; // changement d'état\n\t\tthis.notifyAll(); // on notifie tout le monde\n\t}",
"public void addListener(IEpzillaEventListner listener)\n\t\t\tthrows RemoteException;",
"public void markAsDone() {\n isDone = true;\n }",
"public void markAsDone() {\n isDone = true;\n }",
"public void markAsDone() {\n isDone = true;\n }",
"@Override\n\tpublic void onJoinLobbyDone(LobbyEvent arg0) {\n\t\tMain.log(getClass(), \"onJoinLobbyDone\");\n\t}",
"public void addEndListener(Consumer<JvmThread> consumer) {\n endListeners.add(consumer);\n }",
"public void addFinishedListener(ActionListener listener)\n {\n VerifyButton.addActionListener(listener); \n }",
"void onCloseBleComplete();",
"public void attachOnMoveListener(OnMoveMadeListener listener) {\n moveListeners.add(listener);\n }",
"public interface OnFinishedListener<T> {\n\n void onFinished(T result);\n}",
"public void addListener(GrillEventListener listener);",
"public interface OnStepFinishListener {\n void onStepFinish(BindStep step, boolean finish);\n}",
"public interface TaskListener {\n void onFinished(boolean result);\n }",
"public interface PuzzleGatherListener {\n\n void onGathered();\n\n}",
"public void addProgressListener(ProgressListener pl);",
"public void addListener(\n IListener listener\n )\n {listeners.add(listener);}",
"void onPlaybackPaused(Consumer<Void> listener) {\n playbackPausedListeners.add(listener);\n }",
"public interface CompletionListener {\n\n /** Notifies the completion of \"ConnectDevice\" command. */\n void onConnectDeviceComplete();\n\n /** Notifies the completion of \"SendMessage\" echo command. */\n void onSendMessageComplete(String message);\n\n /** Notifies that the device is ready to receive Wi-Fi network credentials. */\n void onNetworkCredentialsRequested();\n\n /** Notifies that the device is ready to receive operational credentials. */\n void onOperationalCredentialsRequested(byte[] csr);\n\n /** Notifies the pairing status. */\n void onStatusUpdate(int status);\n\n /** Notifies the completion of pairing. */\n void onPairingComplete(int errorCode);\n\n /** Notifies the deletion of pairing session. */\n void onPairingDeleted(int errorCode);\n\n /** Notifies that the Chip connection has been closed. */\n void onNotifyChipConnectionClosed();\n\n /** Notifies the completion of the \"close BLE connection\" command. */\n void onCloseBleComplete();\n\n /** Notifies the listener of the error. */\n void onError(Throwable error);\n }",
"public void addTabClosingListener(FTabClosingListener listener) {\n\t\tif (! closingListeners.contains(listener))\n\t\t\tclosingListeners.add(listener);\n\t}",
"public abstract void addServiceListener(PhiDiscoverListener listener);",
"public void addAfterInstructionExecutionListener(\n Class<? extends Instruction> instructionClass, BiConsumer<Instruction, JvmThread> biConsumer\n ) {\n if(!afterInstructionExecutionListeners.containsKey(instructionClass)) {\n afterInstructionExecutionListeners.put(instructionClass, new ArrayList<>());\n }\n afterInstructionExecutionListeners\n .get(instructionClass)\n .add(\n biConsumer\n );\n }",
"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 }",
"public void onFinish() {\n\n\t}",
"public void addTuioListener(TuioListener listener)\n\t{\n\t\tlistenerList.addElement(listener);\n\t}",
"@Override\n\tpublic void registListener(IListener listener) throws RemoteException {\n\t\tremoteCallbackList.register(listener);\n\t}",
"public void markAsDone() {\n // TODO consider adding assertion here\n isDone = true;\n }",
"@Override\n public void agregarObsevadorFinDeJuego(ObservadorDeFinJuego observador)\n {\n this.observadoresFinJuegos.add(observador);\n }",
"void onListeningFinished();",
"public void done() {\n done = true;\n }",
"public void setProgressListener(GeoGitPy4JProgressListener listener) {\n this.listener = listener;\n }",
"public void addAfterInstructionExecutionListener(\n Class<? extends Instruction> instructionClass, Consumer<JvmThread> consumer\n ) {\n if(!afterInstructionExecutionListeners.containsKey(instructionClass)) {\n afterInstructionExecutionListeners.put(instructionClass, new ArrayList<>());\n }\n afterInstructionExecutionListeners\n .get(instructionClass)\n .add(\n (instruction, jvmThread) -> consumer.accept(jvmThread)\n );\n }",
"public interface ZipListener {\n /**\n * notify that zip task with given token that status has changed.\n * \n * @param token used to differentiate zip task.\n * @param status status of zip task.\n */\n void onZipStatusChange(String token, ZipStatus status);\n\n /**\n * notify that zip task with given token that progress has changed.\n * \n * @param token used to differentiate zip task.\n * @param percent percent of current progress.\n */\n void onZipProgressChange(String token, int percent);\n\n }",
"@Override\r\n\tpublic void done() {\n\t\tSystem.out.println(\"done\");\r\n\t}",
"protected void listener(Listener listener) {\n Bukkit.getServer().getPluginManager().registerEvents(listener, RedPractice.getInstance());\n }",
"public void markAsDone() {\n this.isDone = true;\n\n }",
"protected void markAsDone() {\n isDone = true;\n }",
"public static interface OnToolListener {\n\n\t\t/**\n\t\t * On tool completed.\n\t\t */\n\t\tvoid onToolCompleted();\n\t}",
"public void markAsDone() {\r\n this.isDone = true;\r\n }",
"public void done() {\n\t\t}",
"public void onFinish(){\n\n mMovieStaff.onFinish();\n mRefreshStaff.onFinish();\n mKeeperStaff.onFinish();\n mMaidStaff.onFinish();\n\n mDB.close();\n }",
"public void markAsDone() {\n this.isDone = true;\n }",
"public void markAsDone() {\n this.isDone = true;\n }",
"public void markAsDone() {\n this.isDone = true;\n }",
"void addListener(PromiseListener promiseListener);",
"private void onCompletion(MediaPlayer mp) {\n for (AudioEventListener handler : eventHandlerList) {\n handler.onCompletion(mp);\n }\n }",
"public void done() {\n isDone = true;\n }",
"void notifyTextProcessStatusFinish(TextProcessFinishEvent evt) {\n\n\t\tfor (TextProcessStatusListener l : listeners\n\t\t\t\t.getListeners(TextProcessStatusListener.class)) {\n\n\t\t\tl.finish(evt);\n\t\t}\n\t}",
"public void onFinished();",
"void done(W worker);",
"public void addTaskListener(TaskListener l) {\r\n\t\ttaskListeners.add(l);\r\n\t}",
"public void registerStopListener(PropertyChangeListener listener) {\n\t\toyenteFinalizacion.addPropertyChangeListener(listener);\n\t}",
"public void onCompletion(MediaPlayer mp) {\n mHandler.sendEmptyMessage(TRACK_ENDED);\n }",
"public void onFinish(int id, Object obj);",
"public void addFactListener(GenericFactListener<Fact> listener);",
"public void addONDEXListener(ONDEXListener l) {\n listeners.add(l);\n }",
"public void addTargetListener(TargetListener l) {\n listenerList.add(TargetListener.class,l);\n }",
"public void markDone() {\n isDone = true;\n }",
"public void addNoteListener(final AutomataNoteListener listener) {\n\t\tnoteListeners.add(listener);\n\t}",
"public interface OnActionFinishedListener<TResult> {\n /* will be called for each Action (which in a Task action chain by continuation) finished its execution\n */\n void Finished(Task task, Action<TResult> lastFinishedAction);\n}",
"public void setOnCompletionListener(IMediaPlayer.OnCompletionListener l) {\n mOnCompletionListener = l;\n }",
"public void addListener(EventListener listener);",
"public void registerListener(PPGListener listener){\n listeners.add(listener);\n }",
"public void onFinish(ISuite suite) {\n\n\t}",
"public void done() {\n \t\t\t\t\t\t}",
"public void onLast() {\r\n\t\t\t\t\tif (wip.decrementAndGet() == 0) {\r\n\t\t\t\t\t\tobserver.finish();\r\n\t\t\t\t\t\tclose();\r\n\t\t\t\t\t}\r\n\t\t\t\t}",
"public interface EventActorListener {\n\n public void onFinished(ActorDet actor);\n}",
"public void addOffsetListener(IOffsetListener listener) {\r\n\t\toffsetListeners.add(listener);\r\n\t}",
"void Finished(Task task, Action<TResult> lastFinishedAction);",
"public void addAnswerListener(AnswerListener anw){\n\t\tlisteners.add(anw);\n\t}",
"void addListener(BotListener l);"
] |
[
"0.71211874",
"0.67575705",
"0.6335806",
"0.60077906",
"0.5632851",
"0.554009",
"0.5510251",
"0.5440378",
"0.5440378",
"0.54231614",
"0.5405458",
"0.53149176",
"0.5309909",
"0.5234604",
"0.51543945",
"0.5143277",
"0.5130018",
"0.5128788",
"0.5121398",
"0.5092691",
"0.50811553",
"0.50580597",
"0.50500876",
"0.504987",
"0.5045193",
"0.50321215",
"0.49879816",
"0.49832553",
"0.4971426",
"0.49685344",
"0.49639183",
"0.4962908",
"0.4962908",
"0.4962908",
"0.49592614",
"0.49487814",
"0.4941879",
"0.4933309",
"0.49185577",
"0.49177465",
"0.4913172",
"0.49019232",
"0.48739552",
"0.4870715",
"0.48657054",
"0.48629868",
"0.48624843",
"0.48603797",
"0.48586392",
"0.48552176",
"0.48497596",
"0.48472923",
"0.4846605",
"0.48443496",
"0.48415172",
"0.48362473",
"0.4834095",
"0.48314032",
"0.48309067",
"0.48201746",
"0.48145992",
"0.4814454",
"0.48031092",
"0.48020282",
"0.48016027",
"0.47990203",
"0.47934812",
"0.47805566",
"0.47791272",
"0.47787094",
"0.47769108",
"0.47769108",
"0.47769108",
"0.47749165",
"0.47660872",
"0.47515956",
"0.47429156",
"0.47428384",
"0.47414967",
"0.4734343",
"0.47305837",
"0.47266993",
"0.4725376",
"0.47242224",
"0.47210923",
"0.47153485",
"0.47079933",
"0.47045848",
"0.4690326",
"0.46814546",
"0.46800634",
"0.46785283",
"0.4677736",
"0.4676135",
"0.4673255",
"0.46705464",
"0.46666914",
"0.4654437",
"0.46526596",
"0.46472427"
] |
0.8535216
|
0
|
Removes a MonoflopDone listener.
|
public void removeMonoflopDoneListener(MonoflopDoneListener listener) {
listenerMonoflopDone.remove(listener);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void addMonoflopDoneListener(MonoflopDoneListener listener) {\n\t\tlistenerMonoflopDone.add(listener);\n\t}",
"public void removeListener(GrillEventListener listener);",
"@Override\n public void removeListener() {\n this.mListener = null;\n }",
"void removeListener(BotListener l);",
"public void removeNPTListener(NPTListener l) {}",
"public void removeListener(T listener);",
"public void removeTuioListener(TuioListener listener)\n\t{\n\t\tlistenerList.removeElement(listener);\t\n\t}",
"public void cleanUp() { listener = null; }",
"void removeCompletedEventListener(IGameStateListener listener);",
"public void removeConnectedCallback(OctaveReference listener) {\n\t\tlistenerConnected.remove(listener);\n\t}",
"public void removeDisconnectedCallback(OctaveReference listener) {\n\t\tlistenerDisconnected.remove(listener);\n\t}",
"public void removeCompletionListener(Runnable listener) {\n\t\tcompletionListeners.remove(listener);\n\t}",
"public void unregisterListener() {\n\t\tthis.listener = null;\n\t}",
"public synchronized void removeListener(IIpcEventListener listener) {\n\t\tlisteners.remove(listener);\n\t}",
"void removeListener(RiakFutureListener<V,T> listener);",
"@Override\n\tpublic void unregistListener(IListener listener) throws RemoteException {\n\t\tremoteCallbackList.unregister(listener);\n\t}",
"public void removeListener(IEpzillaEventListner listener)\n\t\t\tthrows RemoteException;",
"public void removeFactListener(GenericFactListener<Fact> listener);",
"public void removeListener(Listener l) {\n\t\tmListenerSet.remove(l);\n\t}",
"public synchronized void removeEventListener(InputListener listener) {\n\t\tlisteners.remove(listener);\n\t}",
"default void removeListener(Runnable listener) {\n\t\tthis.getItemListeners().remove(listener);\n\t}",
"public void removePluginManagerListener( PluginManagerListener listener )\n {\n pluginManagerListeners.remove( listener );\n }",
"public void removeListener(TransferListener listener) {\n listeners.remove(listener);\n }",
"@Override\n public void removeListener(StreamListener listener) {\n streamListeners.remove(listener);\n }",
"@Override\n\tpublic void removeToolListener(ToolListener listener) {\n\t\t//do nothing\n\t}",
"void removeListener(RosZeroconfListener listener);",
"public synchronized void removeCompletionListener(ActionListener l) {\n completionListeners.removeElement(l); //remove listeners\n }",
"public void remove(Object listener) {\n if (!type.isInstance(listener)) {\n return;\n }\n if (listener.equals(logger.getDelegate())) {\n logger = noOpLogger;\n }\n handlers.remove(listener);\n }",
"@Override\r\n public void unregister(L listener) {\r\n synchronized (listeners) {\r\n listeners.remove(listener);\r\n weak.remove(listener);\r\n }\r\n }",
"private void cleanup() {\n\t\tif (myListener!=null)\n\t\t\t_prb.removeListener(myListener);\n\t}",
"public void removeListener(LineListener listener) {\n\t\tplayer.removeListeners(listener);\n\t}",
"void removeListener(\n ReaderSettingsListenerType l);",
"public void removeListener(final IMemoryViewerSynchronizerListener listener) {\n m_listeners.removeListener(listener);\n }",
"void removeExecutionListener(ExecutionListener listener);",
"@Override\r\n\tpublic synchronized void unregisterListener(EventListener<T> listener) {\n\t\tlisteners.removeElement(listener);\r\n\t}",
"public void removeListener(JuraMqttListener listener) {\n\t\tif (juraMqttClient != null)\n\t\t\tjuraMqttClient.removeListener(listener);\n\t}",
"public void unregisterListener(PPGListener listener){\n listeners.remove(listener);\n }",
"public void removeEnumerateCallback(OctaveReference listener) {\n\t\tlistenerEnumerate.remove(listener);\n\t}",
"public void\t\tremoveUCallbackListener(String\t\ttag);",
"private void removeListener(final @NonNull Consumer<E> listener) {\n eventListeners.remove(listener);\n\n if (eventListeners.isEmpty()) {\n HandlerList.unregisterAll(this);\n LISTENERS_GROUPS.remove(configuration);\n }\n }",
"public abstract void removeServiceListener(PhiDiscoverListener listener);",
"public void detachListener()\n {\n m_localInstance.detachListener();\n }",
"public void removeProgressListener(ProgressListener pol);",
"void removeListener( ConfigurationListener listener );",
"@Override\n\tpublic void unregisterEventListener(IHFModuleEventListener li) {\n\t\tLog.d(\"HFModuleManager\", \"unregisterEventListener\");\n\t\tthis.eventListenerList.remove(li);\n\t}",
"public void removeONDEXListener(ONDEXListener l) {\n listeners.remove(l);\n }",
"public void removeAnswerListener(AnswerListener anw){\n\t\tlisteners.remove(anw);\n\t}",
"public void removeTargetListener(TargetListener l) {\n listenerList.remove(TargetListener.class,l);\n }",
"void removeListener(GraphListener listener);",
"public synchronized void removeEventListener(IEventListener listener){\r\n\t\twhile (isBlocked) {\r\n\t\t\tThread.yield();\r\n\t\t}\r\n\t\tlisteners.remove(listener);\r\n\t}",
"private void removeEventListener(IEventListener<T> listener) {\n\t\t\tevent.removeEventListener(listener);\n\t\t}",
"public void removeListenerForType(GrillEventListener listener, Class<? extends GrillEvent> eventType);",
"@Override\n\tpublic void removeTrigger() {\n\t\tplayer.removeListener(this.listener, EventNameType.SOUL_FIGHT);\n\t}",
"public void removeAmplitudeListener(IDualAmplitudeListener listener)\r\n {\r\n amplitudeListeners.remove(listener);\r\n }",
"public interface MonoflopDoneListener {\n\t\tpublic void monoflopDone(char port, short selectionMask, short valueMask);\n\t}",
"public void removeToolListener(ToolListener listener, String toolEvent) {\n\t\t//do nothing\n\t}",
"@Override\n\tpublic void delObserver(ObserverListener ob) {\n\t\tvector.remove(ob);\n\t}",
"public synchronized void removeJsimListener (JsimListener t)\n {\n jsimListeners.remove (t);\n\n }",
"public void removeBugReportProgressListener() {\n mBugReportProgressListener = null;\n }",
"public void removeAllListener() {\r\n listeners.clear();\r\n }",
"public void removeListener( JoystickInputListener listener ) {\n if ( listeners != null ) {\n listeners.remove( listener );\n }\n }",
"public void removeFlickListener(FlickListener l) {\r\n\t\tif (listeners.contains(l)) {\r\n\t\t\tlisteners.remove(l);\r\n\t\t}\r\n\t}",
"public void\t\tremoveUCallbackListener(String tag)\n\t{\n\t\ttab.remove(tag);\n\t}",
"public synchronized void removePermanentHandler(Listener listener) {\n permanentEventMethodCache.remove(listener);\n }",
"public void removePartListener(IPartListener2 l) {\n removeListenerObject(l);\n }",
"public void removeListener(IMXEventListener listener) {\n if (isAlive() && (null != listener)) {\n synchronized (mMxEventDispatcher) {\n mMxEventDispatcher.removeListener(listener);\n }\n }\n }",
"public void removeNoteListener(final AutomataNoteListener listener) {\n\t\tnoteListeners.remove(listener);\n\t}",
"public void removeScanListener(Listener l) {\n listeners.remove(l);\n }",
"public void removeListener(ILabelProviderListener listener) {\n\t}",
"public void removeMinesButtonListener(MinesButtonListener l) {\r\n\t\tlisteners.remove(l);\r\n\t}",
"public void removeInteractionsListener(InteractionsListener l) {\n _listeners.remove(l);\n }",
"private void removeMessageListener(MessageTypeEventHandler<?> messageListener) {\n messageListeners.remove(messageListener);\n }",
"public synchronized void removeButtonListener(ButtonListener l) {\r\n listeners.removeElement(l);\r\n }",
"public void removeListener(ILabelProviderListener listener) {\n \t\t\r\n \t}",
"void removeListener(IEventChannelListener<K, V> listener);",
"public void removeTrackerListener(IXArchRelativePathTrackerListener listener) {\n listeners.remove(listener);\n }",
"public synchronized void removeWindowListener(WindowListener l) {\n windowListener = AWTEventMulticaster.remove(windowListener, l);\n }",
"@Override\n public void unpin(IObserver observer) {\n listeners.remove(observer);\n }",
"@Override\n public void removeListener(DisplayEventListener listener) {\n listenerList.remove(DisplayEventListener.class, listener);\n }",
"public void removeListener(final T listener) {\n if (listener == null)\n throw new IllegalArgumentException(\"Parameter 'listener' must not be null!\");\n for (Iterator<T> it = _elements.iterator(); it.hasNext(); ) {\n if (it.next().equals(listener)) {\n it.remove();\n break;\n }\n }\n }",
"public void removeEventListener(EventListener listener){\n try {\n listenerList.remove(EventListener.class, listener);\n } catch (Exception e) {\n System.out.println(\"[analizadorClient.removeEventListener]\" + e.getMessage());\n }\n \n \n }",
"public void removeAllListeners() {\n die();\n }",
"public void removeListener(final IModuleListener listener) {\n m_listeners.removeListener(listener);\n }",
"public void unregisterListeners(){\n listeners.clear();\n }",
"public void unregister(IMessageListener listener) {\r\n registry.unregister(listener);\r\n }",
"protected void removeListeners() {\n }",
"public void removeChangeListener(ChangeListener listener) { _changeListeners.remove(listener); }",
"public void removeChangeListener(ChangeListener l) {\n\t\t//do nothing\n\t}",
"public void removeListener(AudioEventListener handler) {\n if (eventHandlerList.contains(handler)) {\n eventHandlerList.remove(handler);\n }\n }",
"public void removeHitTestListener(HitTestListener l) {\n hitTestListenerList.remove(HitTestListener.class, l);\n }",
"public void removeListener(AlgorithmInterface obj) {\r\n objectList.removeElement(obj);\r\n }",
"public void removeListener(ICdtVariableChangeListener listener){\n\t\tfListeners.remove(listener);\n\t}",
"@Override\n\tpublic void removeConsoleOutputListener(IEventHandler listener) {\n\t\t\n\t}",
"public void removeMessageListener(MessageListener listener)\n {\n messageListeners.remove(listener);\n }",
"public void removeListener(LogListener listener) {\n\t\tthis.eventListeners.remove(listener);\n\t}",
"public void removeDeviceListener(DeviceDriverListener device);",
"public synchronized void removeProgressListener (ProgressListener lsnr) {\n if (listeners == null) {\n return;\n }\n listeners.removeElement(lsnr);\n }",
"public void removeConnectionListener(ConnectionListener listener);",
"public void removeProgressListener() {\n this.listener = new SilentProgressListener();\n }",
"void removeListener(MapDelegateEventListener<K, V> listener);"
] |
[
"0.69052696",
"0.677119",
"0.6736512",
"0.67031914",
"0.6690381",
"0.66044486",
"0.65414995",
"0.645959",
"0.6397336",
"0.634013",
"0.6331897",
"0.631975",
"0.63157475",
"0.6271758",
"0.62701416",
"0.6265009",
"0.62512136",
"0.62119883",
"0.6183716",
"0.6178127",
"0.61599934",
"0.61520034",
"0.61221725",
"0.6118495",
"0.61103404",
"0.60680324",
"0.6066591",
"0.6064278",
"0.6064244",
"0.6051047",
"0.6044585",
"0.60354036",
"0.6029716",
"0.6023281",
"0.6017669",
"0.60104203",
"0.6002586",
"0.60016197",
"0.59923816",
"0.5982083",
"0.59810275",
"0.59463805",
"0.5943342",
"0.5932083",
"0.5927723",
"0.59225917",
"0.592121",
"0.59116673",
"0.58895534",
"0.58816093",
"0.5878082",
"0.5877677",
"0.58718526",
"0.5869976",
"0.5869526",
"0.58437353",
"0.58295584",
"0.5818306",
"0.5812499",
"0.5811677",
"0.58030623",
"0.58010626",
"0.57894546",
"0.57816976",
"0.57767767",
"0.57644254",
"0.5753384",
"0.57513213",
"0.5746001",
"0.57414174",
"0.57401747",
"0.57382804",
"0.57263833",
"0.5724724",
"0.571256",
"0.57107896",
"0.57074773",
"0.5705394",
"0.570464",
"0.57045287",
"0.5700322",
"0.5697778",
"0.56950223",
"0.56891054",
"0.5688224",
"0.56764424",
"0.5670235",
"0.5668166",
"0.5666107",
"0.5665523",
"0.5663323",
"0.5662813",
"0.5658773",
"0.5649848",
"0.56478995",
"0.5643216",
"0.56425947",
"0.56410116",
"0.5634707",
"0.56341285"
] |
0.862327
|
0
|
/ find the smallest element of the remaining and swap them
|
public static int[] sort(int[] data, int n) {
for (int i = 0; i < n; i++) {
int min = i;
for (int j = i + 1; j < n; j++) {
if (data[j] <= data[min]) {
min = j;
}
}
Util.swap(data, i, min);
}
return data;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void minHeapify(int i) {\n\n\t\tint l = 2*i + 1;\n\t\tint r = 2*i + 2;\n\t\tint smallest = i;\n \n\t\tif(l < size && arr[l].element < arr[smallest].element)\n\t\t\tsmallest = l;\n\n\t\tif(r < size && arr[r].element < arr[smallest].element)\n\t\t\tsmallest = r;\n\n\t\tif(smallest != i) {\n\t\t\t// call method exchange to change \n\t\t\texchange(arr,i,smallest);\n\t\t\tminHeapify(smallest);\n\t\t}\n\t}",
"static int minimumSwaps(int[] arr) {\r\n int result = 0;\r\n \r\n // Gets the length of the input array\r\n int size = arr.length;\r\n \r\n // Cycles through the input array\r\n for (int i = 0; i < size; i++) {\r\n // Checks if the element is in the right position\r\n if (arr[i] != i+1) {\r\n result += 1; // The element ISN'T in the right position. A new swap is needed!\r\n \r\n // Cycles through the remaining input array\r\n for (int j = i+1; j < size; j++) {\r\n if (arr[j] == i+1) { // Gets the element that should be in the place of arr[i] and swaps it!\r\n int swap = arr[j];\r\n arr[j] = arr[i];\r\n arr[i] = swap;\r\n break;\r\n }\r\n } \r\n }\r\n }\r\n \r\n return result;\r\n}",
"public static void SwapLargestSmallest(int[] array) {\n\n }",
"public void selectionSort(int[] x)\n {\n for (int i = 0; i < x.length-1; i++) {\n int minIndex = i;\n for (int j = i+1; j < x.length; j++) {\n if (x[minIndex] > x[j]) {\n minIndex = j;\n }\n }\n int temp = x[i];\n x[i] = x[minIndex];\n x[minIndex] = temp;\n }\n \n public void replaceFirst(int oldVal, int newVal)\n {\n \n }\n}",
"public void sortIncreasing()\n {\n int min;\n \n for (int i = 0; i < list.length - 1; i++)\n {\n min = i; \n for(int j = i+1; j < list.length; j++)\n {\n if(list[j] < list[min])\n min = j; \n }\n if(i != min && list[min] < list.length)\n {\n int temp = list[min];\n list[min] = list[i];\n list[i] = temp; \n }\n }\n }",
"@Override\r\n\tpublic void sort() {\r\n\t\tint minpos;\r\n\t\tfor (int i = 0; i < elements.length-1; i++) {\r\n\t\t\tminpos=AuxMethods.minPos(elements, i);\r\n\t\t\telements=AuxMethods.swapElements(elements, i, minpos);\r\n\t\t\t\r\n\t\t}\r\n\t}",
"int getMin() \n\t{ \n\t\tint x = min.pop(); \n\t\tmin.push(x); \n\t\treturn x; \n\t}",
"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 void sort(){\n startTime = System.nanoTime();\n int smallest = array[0]; \n int smallestIndex = 0;\n\n for (int i = 0; i < array.length - 1; i++){\n smallest = array[i];\n smallestIndex = i;\n //find smallest number \n for (int j = i; j < array.length; j++){\n if (array[j] < smallest) {\n smallest = array[j];\n smallestIndex = j;\n }\n }\n //swap smallest to the front\n swap(array, i, smallestIndex);\n }\n endTime = System.nanoTime();\n }",
"private static int leftBump(int[] a) {\n for (int i = 2; i <= a.length; i++) {\n if (a[i] < a[i - 1]) {\n return i - 1;\n }\n }\n return -1;\n }",
"private static int searchSmallest(List<Integer> input) {\n\t\tint left = 0;\n\t\tint right = input.size()-1;\n\t\t\n\t\twhile(left < right) {\n\t\t\tint mid = left + (right-left)/2 + 1; System.out.println(\"mid=\" + mid);\n\t\t\t\n\t\t\tif(input.get(left) > input.get(mid)) {//smallest in left half\n\t\t\t\tright = mid-1;\n\t\t\t}else {\n\t\t\t\tleft = mid+1;\n\t\t\t}\n\t\t}\n\t\treturn left;//left=right now\n\t}",
"public void order_moves() {\n\t\tfor (int i = 0; i < future_moves.size(); i += 1) {\n\t\t\tArrayList<Integer> curr_smallest = future_moves.get(i);\n\t\t\tint smallest = i;\n\t\t\t\n\t\t\tfor (int j = i; j < future_moves.size(); j += 1) {\n\t\t\t\tArrayList<Integer> curr_checking = future_moves.get(j);\n\t\t\t\t\n\t\t\t\tif (curr_checking.get(1) < curr_smallest.get(1)) {\n\t\t\t\t\tcurr_smallest = curr_checking;\n\t\t\t\t\tsmallest = j;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//Swap the current and the smallest\n\t\t\tfuture_moves.set(smallest, future_moves.get(i));\n\t\t\tfuture_moves.set(i, curr_smallest);\n\t\t}\n\t\t\n\t}",
"public E removeMin() {\n // TODO: YOUR CODE HERE\n E min = getElement(1);\n swap(1, size());\n setElement(size(), null);\n bubbleDown(1);\n size -= 1;\n return min;\n }",
"public final void min() {\n\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tif (secondTopMostValue > topMostValue) {\n\t\t\t\tpush(topMostValue);\n\t\t\t} else {\n\t\t\t\tpush(secondTopMostValue);\n\t\t\t}\n\t\t}\n\t}",
"private static void sort2(int[] a) {\n for(int i=0; i<a.length; i++){\n //find smallest from i to end \n int minIndex=i;\n for(int j=i ; j<a.length; j++)\n if(a[j]<a[minIndex])\n minIndex=j;\n //swap\n int t = a[i];\n a[i] = a[minIndex];\n a[minIndex] = t;\n }\n }",
"static void minimumBribes(int[] q) {\n int swaps = 0;\n for (int i = 0; i < q.length; i++) {\n if ((q[i] - (i+1)) > 2) {\n System.out.println(\"Too chaotic\");\n return;\n }\n for (int j = i + 1; j < q.length; j++) {\n if (q[i] > q[j]) {\n int t = q[j];\n q[j] = q[i];\n q[i] = t;\n swaps++;\n }\n }\n }\n\n System.out.println(swaps);\n }",
"public int minimumSwaps(int[] arr){\n\t\t/*\n\t\t * for each element check it's ideal position then swap with ideal position, if swap needed swap and increment swap count.\n\t\t */\n\t\tint swapCount = 0;\n\t\tif(arr==null || arr.length <2){\n\t\t\treturn swapCount;\n\t\t}\n\t\tfor(int i=0; i<arr.length; i++){\n\t\t\tint element = arr[i];\n\t\t\tint idealIndex = element-1;\n\t\t\tif(i!=idealIndex) {\n\t\t\t\tint temp = arr[i];\n\t\t\t\tarr[i] = arr[idealIndex];\n\t\t\t\tarr[idealIndex] = temp;\n\t\t\t\tswapCount++;\n\t\t\t}\n\t\t}\n\t\treturn swapCount;\n\t}",
"protected void trickleDown(int i) {\n\n int left = this.leftChild(i);\n int right = this.rightChild(i);\n T element = this.elements[i];\n\n if (left < currentSize && right < currentSize) {\n int min = this.minPosition(right, left);\n\n if ( element.compareTo(this.elements[min]) > 0)\n this.swapTrickleDown(i, min);\n\n } else if (left < currentSize && element.compareTo(this.elements[left]) > 0)\n this.swapTrickleDown(i, left);\n\n }",
"void percolateDown(int index) {\n int l = leftChild(index);\n int r = rightChild(index);\n int smallest = index;\n if (l < size && compare(pq[l], pq[index]) == -1) {\n smallest = l;\n }\n if (r < size && compare(pq[r], pq[smallest]) == -1) {\n smallest = r;\n }\n if (index != smallest) {\n Comparable temp = pq[smallest];\n pq[smallest] = pq[index];\n pq[index] = temp;\n percolateDown(smallest);\n }\n }",
"private void shift(){\n if (queue.length < 1){\n throw new Error(\"Table self destruction!\");\n }\n if (size <= 0){\n return;\n }\n\n if (queue[0] == null){\n E best = null;\n int bestAT = -1;\n for (int x = 0 ; x < queue.length; x++){\n E cur = (E)queue[x];\n if (cur == null){\n continue;\n }\n if (best == null || cur.compareTo(best) > 0){\n best = cur;\n bestAT = x;\n }\n }\n // Not put best at front;\n queue[bestAT] = null;\n queue[0] = best;\n }\n\n }",
"private void trickleDown(int index) {\n Map.Entry<String, Double> smallest;\n Map.Entry<String, Double> top = this.get(index);\n int currentSize = this.size();\n\n while (index < currentSize / 2) { // while node has at leat one child\n Map.Entry<String, Double> left = LEFT(this.get(index));\n Map.Entry<String, Double> right = RIGHT(this.get(index));\n\n // find smaller child\n // if right child exists\n if (right != null && left.getValue().compareTo(right.getValue()) > 0) {\n smallest = right;\n } else {\n smallest = left;\n }\n\n // top <= smallest ?\n if (top.getValue().compareTo(smallest.getValue()) <= 0) {\n break;\n }\n\n // shift child up\n int smallestIndex = this.indexOf(smallest);\n Collections.swap(this, index, smallestIndex);\n index = smallestIndex;\n } // end while\n }",
"public static void selectionSort(int[] a) {\r\n int temp; // catalyst variable for Integer swapping\r\n int spot; //location in array where minimum will be inserted\r\n int minimum; //location of minimum value in remainder\r\n\r\n for (spot = 0; spot < a.length - 1; spot++) {\r\n minimum = spot; //\r\n for (int i = spot + 1; i < a.length; i++) {\r\n if (a[i] < a[minimum]) {\r\n minimum = i; //if i is less than minimum, i is new minimum\r\n }\r\n }//end for i\r\n\r\n //swap a[spot] and a[minimum]\r\n temp = a[minimum];\r\n a[minimum] = a[spot];\r\n a[spot] = temp;\r\n }//end for spot\r\n }",
"k value.\nFor 2nd tallest group (and the rest), insert each one of them into (S) by k value. So on and so forth.\n\npublic class Solution {\n public int[][] reconstructQueue(int[][] people) {\n Arrays.sort(people,new Comparator<int[]>() {\n @Override\n public int compare(int[] o1, int[] o2){\n return o1[0] != o2[0]? -o1[0] + o2[0]: o1[1] - o2[1];\n }\n });\n\n List<int[]> res = new ArrayList<>();\n for (int[] cur : people) {\n res.add(cur[1], cur); \n }\n return res.toArray(new int[people.length][]);\n }",
"public int Delete_Min()\n {\n \tthis.array[0]=this.array[this.getSize()-1];\n \tthis.size--; \n \tthis.array[0].setPos(0);\n \tint numOfCompares = heapifyDown(this, 0);\n \treturn numOfCompares;\n }",
"void minHeapify(int i)\n {\n int lt=MyHeap.left(i);\n int rt=MyHeap.right(i);\n int smallest=i;\n if(lt<size && arr[lt]<arr[i])\n smallest=lt;\n if(rt<size && arr[rt]<arr[smallest])\n smallest=rt;\n if(smallest!=i)\n {\n swap(i,smallest);\n minHeapify(smallest);\n }\n }",
"void minDecrease(int i,int x)\n {\n arr[i]=x;\n while(i!=0 && arr[MyHeap.parent(i)]>arr[i])\n {\n swap(MyHeap.parent(i),i);\n i=MyHeap.parent(i);\n }\n }",
"public static IntList selectionSort1(IntList input) {\n\t\tIntList output = new SimpleIntList();\n\t\twhile (!input.isEmpty()) {\n\t\t\tIntListEntry min = input.getFirst();\n\t\t\tfor (IntListEntry e = input.getFirst(); e != null; e = e.getNext())\n\t\t\t\tif (e.getItem()<min.getItem())\n\t\t\t\t\tmin = e;\n\t\t\tinput.delete(min);\n\t\t\toutput.append(min);\n\t\t}\n\t\treturn output;\n\t}",
"public int minSwap(int[] A, int[] B) {\n int n = A.length;\n int[] swap = new int[n];\n int[] no_swap = new int[n];\n swap[0] = 1;\n for (int i = 1; i < n; ++i) {\n swap[i] = n;\n no_swap[i] = n;\n /**\n * A[i-1]<A[i] && B[i-1]<B[i]\n * 1. swap at i and i-1\n * 2. do not swap at i and i-1\n */\n if (A[i-1]<A[i] && B[i-1]<B[i]) {\n // swap\n swap[i] = swap[i-1] + 1;\n no_swap[i] = no_swap[i-1];\n }\n /**\n * A[i-1]<B[i] && B[i-1]<A[i]\n * 1. swap at i-1 and do not swap at i\n * 2. do not swap at i-1 and swap at i\n */\n if (A[i-1]<B[i] && B[i-1]<A[i]) {\n // swap at i-1 and do not swap at i\n no_swap[i] = Math.min(no_swap[i], swap[i-1]);\n // do not swap at i-1 and swap at i\n swap[i] = Math.min(swap[i], no_swap[i-1]+1);\n }\n // else whether swap or do not swap, it can't guarantee both A and B increasing.\n }\n return Math.min(swap[n-1], no_swap[n-1]);\n }",
"public int findSmallest(){\n\tint smallest = 0;\n\tint smallestVal = 0;\n\tint place = 0;\n\tif (size > 0){\n\t place = head+1;\n\t if (place == nums.length){\n\t\tplace = 0;\n\t }\n\t smallest = place;\n\t smallestVal = nums[place];\n\t if (place <= tail){\n\t\twhile (place <= tail){\n\t\t if (place == nums.length){\n\t\t\tplace = 0;\n\t\t }\n\t\t if (nums[place] < smallestVal){\n\t\t\tsmallest = place;\n\t\t\tsmallestVal = nums[place];\n\t\t }\n\t\t place++;\n\t\t}\n\t }else{\n\t\twhile(place >= tail){\n\t\t if (place == nums.length){\n\t\t\tplace = 0;\n\t\t\tbreak;\n\t\t }\n\t\t if (nums[place] < smallestVal){\n\t\t\tsmallest = place;\n\t\t\tsmallestVal = nums[place];\n\t\t }\n\t\t place++;\n\t\t}\n\t\twhile (place <= tail){\n\t\t if (place == nums.length){\n\t\t\tplace = 0;\n\t\t }\n\t\t if (nums[place] < smallestVal){\n\t\t\tsmallest = place;\n\t\t\tsmallestVal = nums[place];\n\t\t }\n\t\t place++;\n\t\t}\n\t }\n\t}\n return smallest;\n }",
"public void nextPermutation(int[] nums) {\n // if only 1 num or less, no need to do anything.\n if (nums == null || nums.length <= 1) {\n return;\n }\n // inverse index, start with 2nd lastNum.\n int inverseIndex = nums.length - 2;\n // search for ip. Found / dir where leftNum < rightNum.\n while (inverseIndex >= 0 && nums[inverseIndex] >= nums[inverseIndex + 1]) {\n inverseIndex--;\n }\n // if found inversePoint, now find smallest # > IP# on right subarr.\n if (inverseIndex >= 0) {\n int minLargerIndex = inverseIndex + 1;\n for (int i = minLargerIndex; i < nums.length; i++) {\n // num > IP#, <= curMin. if == curMin, we want the rightmost smallest.\n if (nums[i] <= nums[minLargerIndex] && nums[i] > nums[inverseIndex]) {\n minLargerIndex = i;\n }\n }\n // swap Ip with smallest # > ip.\n int temp = nums[inverseIndex];\n nums[inverseIndex] = nums[minLargerIndex];\n nums[minLargerIndex] = temp;\n // reverse the right side to become smallest possible right subarr.\n // Ex: 2,(4,3,1) -> 2,1,3,4;\n reverse(nums, inverseIndex + 1, nums.length - 1);\n } else {\n // if no inversePoint, index= -1, Reverse all elms to return the smallest.\n reverse(nums, 0, nums.length - 1);\n }\n }",
"public void wiggleSortSubOptimal(int[] nums) {\n Arrays.sort(nums);\n \n for (int i = 1; i < nums.length - 1; i += 2)\n swap(nums, i, i + 1);\n }",
"public final void swap() {\n\t\tif (size > 1) {\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tpush(topMostValue);\n\t\t\tpush(secondTopMostValue);\n\t\t}\n\t}",
"private void heapify() {\n\t\tint currIndex = 0;\n\t\twhile (currIndex < heapSize) {\n\t\t\tT val = lstEle.get(currIndex);\n\t\t\tint leftSubtreeIndex = getLeftSubtree(currIndex);\n\t\t\tint rightSubtreeIndex = getRightSubtree(currIndex);\n\t\t\tT leftChildVal = leftSubtreeIndex < heapSize ? lstEle.get(leftSubtreeIndex) : null;\n\t\t\tT rightChildVal = rightSubtreeIndex < heapSize ? lstEle.get(rightSubtreeIndex) : null;\n\t\t\t\n\t\t\tT minVal = null;\n\t\t\tint minValIndex = -1;\n\t\t\tif(leftChildVal != null && rightChildVal != null){\n\t\t\t\tint compVal = leftChildVal.compareTo(rightChildVal); \n\t\t\t\tif(compVal < 0){\n\t\t\t\t\tminVal = leftChildVal;\n\t\t\t\t\tminValIndex = leftSubtreeIndex;\n\t\t\t\t}else {\n\t\t\t\t\tminVal = rightChildVal;\n\t\t\t\t\tminValIndex = rightSubtreeIndex;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(leftChildVal != null && leftChildVal.compareTo(val) < 0){\n\t\t\t\t\tminValIndex = leftSubtreeIndex;\n\t\t\t\t\tminVal = leftChildVal;\n\t\t\t\t}else if (rightChildVal != null && rightChildVal.compareTo(val) < 0 ){\n\t\t\t\t\tminValIndex = rightSubtreeIndex;\n\t\t\t\t\tminVal = rightChildVal;\n\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"\\tMin Val : \" +minVal +\" --> \" +minValIndex);\n\t\t\t\n\t\t\tlstEle.set(currIndex, minVal);\n\t\t\tcurrIndex = minValIndex;\n\t\t\tlstEle.set(minValIndex, val);\n\t\t\t\n\t\t}\n\n\t}",
"public static void selectionSort (int array[])\n {\n for (int i = 0; i < (array.length -1); i++)\n {\n for (int j = i + 1; j < (array.length); j++)\n {\n if(array[i] > array[j])\n //the new found smallest element is swapped\n swap(array, j, i);\n }\n }\n }",
"public void selectionSort() {\n int nextMin;\n\n for (int i = 0; i < IntList.length - 1; i++) {\n nextMin = i;\n for (int j = i + 1; j < IntList.length; j++) {\n if (IntList[j] < IntList[nextMin])\n nextMin = j;\n }\n if (nextMin != i)\n swapSelection(IntList, i, nextMin);\n }\n }",
"public T deleteMin()\n\t{\t\n\t\t//declating variables\n\t\tint minIndex = 0;\n\t\tboolean flag = false;\n\t\tboolean flag2 = false;\n\t\t//if size == 0; returns null\n\t\tif(size == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\t//if checks size and deletes accordingly.\n\t\tif(size == 1)\n\t\t{\n\t\t\tT tempo = array[0];\n\t\t\tarray[0] = null;\n\t\t\tsize--;\n\t\t\treturn tempo;\n\n\t\t}\n\n\t\tif(size == 2)\n\t\t{\n\t\t\tT temp = array[0];\n\t\t\tarray[0] = array[1];\n\t\t\tarray[1] = null;\n\t\t\tsize--;\n\t\t\treturn temp;\n\n\t\t}\n\t\tif(size == 3)\n\t\t{\n\t\t\tT tempo = array[0];\n\t\t\tint small = grandChildMin(1, 2);\n\t\t\tarray[0] = array[small];\n\t\t\tif(small == 2)\n\t\t\t{\n\t\t\t\tarray[small] = null;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tarray[1] = array[2];\n\t\t\t\tarray[2] = null;\n\t\t\t}\n\n\t\t\tsize--;\n\t\t\treturn tempo;\n\t\t}\n\n\t\t//if size > 3 does sophisticated deleting\n\t\tT temp = array[0];\n\t\tarray[0] = array[size-1];\n\t\tarray[size-1] = null;\n\t\tsize--;\n\t\tint index = 0;\n\n\t\t//gets the smallest of the children & grandchildren\n\t\tint smallest = min(index).get(0);\n\t\t//while it has grandchildren, keeps going\n\t\twhile(smallest != 0)\n\t\t{\n\t\t\t//doesn't switch if im less than the smallest grandchild\n\t\t\t//& breaks\n\t\t\tif(object.compare(array[index], array[smallest]) <= 0 )\n\t\t\t{\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//special case when i could switch with child or grandchild\n\t\t\tif( min(index).size() > 1)\n\t\t\t{\n\t\t\t\tflag2 = true;\n\t\t\t}\n\n\t\t\t//switches the locations and updates index\n\t\t\tT lemp = array[index];\n\t\t\tarray[index] = array[smallest];\n\t\t\tarray[smallest] = lemp;\n\t\t\tindex = smallest;\n\t\t\tsmallest = min(smallest).get(0);\n\n\t\t}\n\t\t//if i dont switch, i check if i have to switch then percolate back up\n\t\tif(flag == true)\n\t\t{\n\t\t\tif(object.compare(array[index], array[grandChildMin(2*index+1, 2*index+2)]) > 0)\n\t\t\t{\n\t\t\t\tint mIndex = grandChildMin(2*index+1, 2*index+2);\n\t\t\t\tT k = array[mIndex];\n\t\t\t\tarray[mIndex] = array[index];\n\t\t\t\tarray[index] = k;\n\n\t\t\t\tint y = mIndex;\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT f = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = f;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(object.compare(array[index], array[(index-1)/2]) > 0)\n\t\t\t{\n\t\t\t\tT m = array[(index-1)/2];\n\t\t\t\tarray[(index-1)/2] = array[index];\n\t\t\t\tarray[index] = m;\n\t\t\t\tint y = (index-1)/2;\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT k = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = k;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\telse if(flag2 == true)\n\t\t{\n\t\t\tint y = index;\n\n\t\t\tif(getLevel(y+1) % 2 == 1)\n\t\t\t{\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT k = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = k;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse{\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) < 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT k = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = k;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\n\t\telse if(object.compare(array[index], array[grandChildMin(2*index +1, 2*index+2)]) > 0 && grandChildMin(2*index +1, 2*index+2) != 0)\n\t\t{\n\t\t\tminIndex = grandChildMin(2*index+1, 2*index+2);\n\t\t\tT wemp = array[index];\n\t\t\tarray[index] = array[minIndex];\n\t\t\tarray[minIndex] = wemp;\n\n\t\t\tint y = minIndex;\n\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t{\n\t\t\t\tT demp = array[(y-3)/4];\n\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\tarray[y] = demp;\n\t\t\t\ty = (y-3)/4;\n\t\t\t}\n\t\t}\n\n\t\telse if (object.compare(array[index], array[(index-1)/2]) > 0) \n\t\t{\n\n\t\t\tT femp = array[(index-1)/2];\n\t\t\tarray[(index-1)/2] = array[index];\n\t\t\tarray[index] = femp;\n\n\t\t\tint y = (index-1)/2;\n\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t{\n\t\t\t\tT demp = array[(y-3)/4];\n\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\tarray[y] = demp;\n\t\t\t\ty = (y-3)/4;\n\t\t\t}\n\t\t}\n\n\t\t\n\t\treturn temp;\n\t}",
"static int minSwap (int arr[], int n, int k) {\n int c=0;\n for(int i=0;i<n;i++)\n {\n if(arr[i]<=k)\n ++c;\n }\n int c1=0;\n int start=0,end=c;\n for(int j=0;j<end;j++)\n {\n if(arr[j]>k)\n ++c1;\n }\n int minans=c1;\n while(end<n)\n {\n if(arr[start]>k)\n --c1;\n if(arr[end]>k){\n ++c1;\n }\n minans=Math.min(minans,c1);\n start++;\n end++;\n }\n return minans;\n //Complete the function\n }",
"static void selection(int arr[]){\n for (int i =0; i < arr.length -1 ; i++){\n for (int j = i +1; j < arr.length; j++){\n if (arr[j] < arr[i]){\n int temp = arr[i];\n arr[i] = arr[j];\n arr[j] = temp;\n }\n }\n }\n }",
"static int minimumSwaps(int[] arr) {\n int length = arr.length;\n int swaps = 0;\n int ind = 0;\n int temp = 0;\n int count = 0;\n for(int i=0;i<length;i++)\n {\n if(i+1 != arr[i])\n {\n count++;\n ind = index(arr,i+1,i);\n if(ind != -1){\n temp = arr[i];\n arr[i] = arr[ind];\n arr[ind] = temp;\n }\n }\n }\n\n return count;\n }",
"static void minimumBribes(int[] q) {\r\n int bribes = 0;\r\n boolean valid = true;\r\n int index = 1;\r\n \r\n // We get the length of the input array\r\n int size = q.length; \r\n \r\n // We cycle through the input array\r\n for (int i = 0; i < size; i++) {\r\n int actual = q[i];\r\n \r\n // We check if the current person has surely swapped position more than two times since it appears before they are supposed to\r\n if (actual > index) {\r\n int difference = actual - index;\r\n if (difference > 2) {\r\n valid = false;\r\n break;\r\n }\r\n }\r\n \r\n // We check the number of bribes by counting how many persons with bigger IDs have already swapped place with the current one\r\n // NOTE: We can safely begin to check from position (actual-2) since higher numbers of swaps would have been caught by the previous if condition\r\n for (int j = actual-2; j < index; j++) {\r\n if (j < 0) {\r\n continue;\r\n }\r\n if (actual < q[j]) {\r\n bribes += 1;\r\n }\r\n }\r\n \r\n index += 1;\r\n }\r\n \r\n // Checks if the result is valid, and if so, it prints it\r\n if (valid == false) {\r\n System.out.println(\"Too chaotic\");\r\n }\r\n else {\r\n System.out.println(bribes);\r\n }\r\n}",
"private void swim(int index)\r\n\t{\n\t\twhile (index > 1)\r\n\t\t{\r\n\t\t\tint parentIndex = index / 2;\r\n\t\t\t\r\n\t\t\tif (data[index].compareTo(data[parentIndex]) < 0)\r\n\t\t\t{\r\n\t\t\t\tswap(index, parentIndex);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = parentIndex;\r\n\t\t}\r\n\t}",
"private void minHeapify(int i) {\n int l, r, smallest, temp;\n\n l = leftchild(i);\n r = rightchild(i);\n\n if (r <= heapsize) {\n if (array[l] < array[r]) {\n smallest = l;\n } else {\n smallest = r;\n }\n if (array[i] > array[smallest]) {\n temp = array[i];\n array[i] = array[smallest];\n array[smallest] = temp;\n\n minHeapify(smallest);\n }\n else if ((l == heapsize) && (array[i] > array[l])) {\n temp = array[i];\n array[i] = array[l];\n array[l] = temp;\n\n }\n }\n }",
"public T deleteMin()\n {\n // to handle empty excpetion\n if(size == 0)\n {\n throw new MyException(\"Heap is empty.\");\n }\n\n // create int hole, set to 0\n int hole = 0;\n // create return value as the item at index hole\n T returnValue = arr[hole];\n // create item to be last item of heap\n T item = arr[size-1];\n // decrement size\n size--;\n // call newHole() method to get newhole\n int newhole = newHole(hole, item);\n while(newhole != -1)\n {\n // set value of arr[newhole] to be arr[hole]\n arr[hole] = arr[newhole];\n // hole is now whatever newhole was\n hole = newhole;\n // update newhole by calling newHole()\n newhole = newHole(hole, item);\n }\n // put item where the hole is in the heap\n arr[hole] = item;\n return returnValue;\n }",
"public static void selectionSort (int[] elts) {\r\n\t\tint minPosition;\r\n\t\tint length = elts.length;\r\n\t\tfor (int i = 0; i < length-1; i++) {\r\n\t\t\tminPosition = findMinPositionSegment (elts, i, length-i);\r\n\t\t\tif (minPosition != i)\r\n\t\t\t\tswap (elts, i, minPosition);\r\n\t\t}\r\n\t}",
"public static void selectionSort (int[] elts) {\r\n\t\tint minPosition;\r\n\t\tint length = elts.length;\r\n\t\tfor (int i = 0; i < length-1; i++) {\r\n\t\t\tminPosition = findMinPositionSegment (elts, i, length-i);\r\n\t\t\tif (minPosition != i)\r\n\t\t\t\tswap (elts, i, minPosition);\r\n\t\t}\r\n\t}",
"public void f6(List<Book> a) {\r\n double min = a.get(0).getPrice();\r\n for (Book o : a) {\r\n if (o.getPrice() < min) {\r\n min = o.getPrice();\r\n }\r\n }\r\n int acc = a.size();\r\n for (int i = acc-1; i > 0; i--) {\r\n a.remove(i);\r\n break;\r\n }\r\n }",
"private static int partition(int[] a, int p, int r) {\n int i = p;\n int pivot = a[r];\n // put the larger number front, put the smaller number behind.\n\n for (int j = p; j < r; j++) {\n if (a[j] < pivot) {\n int tmp = a[i];\n a[i] = a[j];\n a[j] = tmp;\n i++;\n }\n }\n\n // exchange a[i] and a[r].\n int tmp = a[i];\n\n a[i] = a[r];\n a[r] = tmp;\n System.out.println(i);\n return i;\n }",
"public static void selection(double[] list){\n \n double currentMin = 0;\n int currentMinIndex = 0;\n \n // searches overall array\n for(int i = 0; i < list.length - 1; i++){\n currentMin = list[i];\n currentMinIndex = i;\n \n // This is where the array will be sorted\n for(int j = i + 1; j < list.length; j++){\n // will comapre current numbers to next\n if(currentMin < list[j]){\n currentMin = list[j];\n currentMinIndex = j;\n }\n }\n \n // This is where the values are swaped\n if(currentMinIndex != i){\n list[currentMinIndex] = list[i];\n list[i] = currentMin;\n }\n } \n }",
"@Override\n public int pullNextComplementaryEdgeId(int smallest) {\n if (edgeId >= smallest) {\n return ++edgeId;\n } else {\n return pullNextComplementaryEdgeIdAdviser(smallest);\n }\n }",
"static int minimumSwaps2(int[] arr) {\n Map<Integer, Integer> backward = new HashMap<>();\n Map<Integer, Integer> forward = new HashMap<>();\n for (int i = 0; i < arr.length; i++) {\n int move = i + 1 - arr[i];\n if (move > 0)\n forward.put(arr[i], move);\n else if (move < 0)\n backward.put(arr[i], move);\n }\n\n //count swap in pairs\n int pairs = 0;\n for (Integer bk : backward.keySet()) {\n for (Integer fk : forward.keySet()) {\n if (backward.get(bk) * (-1) == forward.get(fk)) {\n pairs = pairs + 1;\n continue;\n }\n }\n }\n //count swap others\n int swapCount = forward.size() + backward.size() - (2 * pairs);\n if (swapCount > 0) swapCount = swapCount - 1;\n\n System.out.println(String.format(\n \"forward(%d):%s\\nbackeward(%d):%s\\neach: %d, swap: %d\"\n , forward.size(), forward, backward.size(), backward,\n pairs, swapCount\n ));\n\n return swapCount + pairs;\n }",
"protected void siftUp() {\r\n\t\tint child = theHeap.size() - 1, parent;\r\n\r\n\t\twhile (child > 0) {\r\n\t\t\tparent = (child - 1) >> 1;\t// >> 1 is slightly faster than / 2\r\n\t\t\t\t\t\t\t\t\t\t// => parent = (child - 1) / 2\r\n\t\t\tif (compare(theHeap.get(child), theHeap.get(parent)) >= 0)\r\n\t\t\t\tbreak;\r\n\t\t\tswap(parent, child);\r\n\t\t\tchild = parent;\r\n\t\t}\r\n\t}",
"private Node findSmallest(Node curr) {\n Node prev = null;\n while(curr != null && !curr.isNull) {\n prev = curr;\n curr = curr.left;\n }\n return prev != null ? prev : curr;\n }",
"public static void selectionSort(int[] array) {\n int iOfTempMin;\n\n for (int i = 0; i < array.length - 1; i++) {\n iOfTempMin = i; // 1 - FIND INDEX OF MIN\n \n for (int index = i + 1; index < array.length; index++) {\n \n if (array[index] < array[iOfTempMin])\n iOfTempMin = index; \n }\n swap(array, i, iOfTempMin); // 2 - SWAP\n }\n }",
"public Node removeMin() {\n \t\t// TODO Complete this method!\n \t\tif (indexOfLeastPriority == 2) {\n \t\t\tNode toReturn = getNode(1);\n \t\t\tsetNode(1, null);\n \t\t\treturn toReturn;\n \t\t}\n \t\tint indexOfReplacement = indexOfLeastPriority - 1;\n \t\tNode nodeOfReplacement = getNode(indexOfReplacement);\n \t\tNode toRemove = getNode(1);\n \t\tsetNode(indexOfReplacement, null);\n \t\tsetNode(1, nodeOfReplacement);\n \t\tbubbleDown(1);\n \t\t//decrement IoLP\n \t\tindexOfLeastPriority--;\n \t\treturn toRemove;\n \t}",
"private void minHeapify(int v, int heapSize){\n\t\tint smallest;\n\t\tint left = leftChild(v);\n\t\tint right = rightChild(v);\n\t\tif (left<heapSize && _a[left].getWeight()<_a[v].getWeight()){\n\t\t\tsmallest = left;\n\t\t}\n\t\telse{\n\t\t\tsmallest = v;\n\t\t}\n\t\tif (right<heapSize && _a[right].getWeight()<_a[smallest].getWeight()){\n\t\t\tsmallest = right;\n\t\t}\n\t\tif (smallest!=v){\n\t\t\texchange(v, smallest);\n\t\t\tminHeapify(smallest, heapSize);\n\t\t}\t\t\n\t}",
"static void SelectionSort(int[] arr){\n int minIndex;\n for(int i = 0; i<arr.length-1; i++){\n minIndex = i;\n for(int j = i+1; j<arr.length;j++){\n if(arr[minIndex]>arr[j]){\n minIndex = j;\n }\n }\n if(minIndex>i){\n Swap(arr,i,minIndex);\n }\n }\n }",
"public void nextPermutation(int[] nums) {\n int pos = -1;\n for (int i = nums.length - 2; i >= 0; i--) {\n if (nums[i] < nums[i + 1]) {\n pos = i;\n break;\n }\n }\n\n if (pos == -1) {\n reverse(nums, 0, nums.length - 1);\n } else {\n // find the smallest element greater than a[pos] in a[pos + 1.. size - 1]\n int ind = binarySearch(nums, nums[pos], pos + 1, nums.length - 1);\n // swap\n swap(nums, ind, pos);\n // reverse\n reverse(nums, pos + 1, nums.length - 1);\n }\n }",
"public static void selectionSort(int input[]) {\n\t\tfor(int i = 0;i<input.length-1;i++) {\n\t\t\tint min = input[i];\n\t\t\tint minindex = i;\n\t\t\tfor(int j = i+1 ;j<input.length;j++) {\n\t\t\t\tif(min > input[j] ) {\n\t\t\t\t\tmin = input[j];\n\t\t\t\t\tminindex = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(minindex!=i) {\n\t\t\tinput[minindex] = input[i];\n\t\t\t input[i]= min;\n\t\t\t}\n\t\t}\n\t}",
"public static void selectionSort(int[] a) \n {\n for (int i = 0; i < a.length; i++) \n {\n int minPos = minimumPosition(a, i);\n swap(a, minPos, i);\n }\n }",
"public void simpleSelectionSort(int start, int end, int[] array) {\n\t\tfor (int i = start; i <= end - 1; i++) {\n\t\t\tint minIndex = i;\n\t\t\tfor (int k = i + 1; k <= end; k++) {\n\t\t\t\tif (array[k] < array[minIndex]) {\n\t\t\t\t\tminIndex = k;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Yes, find smaller element\n\t\t\tif (minIndex != i) {\n\t\t\t\tCommUtil.swap(i, minIndex, array);\n\t\t\t}\n\t\t}\n\t}",
"public void minHeapify(int i) {\n\t\t\tint l = left(i);\n\t\t\tint r = right(i);\n\t\t\tint smallest = i;\n\n\t\t\tif (l < heap_size && harr[l] < harr[smallest]) {\n\t\t\t\tsmallest = l;\n\t\t\t}\n\t\t\tif (r < heap_size && harr[r] < harr[smallest]) {\n\t\t\t\tsmallest = r;\n\t\t\t}\n\t\t\tif (smallest != i) {\n\t\t\t\tswap(i, smallest);\n\t\t\t\tminHeapify(smallest);\n\t\t\t}\n\t\t}",
"public void swapAdjacentElements(int[] values)\n {\n // your work here\n\n\n\n\n }",
"public AnyType deleteMin() throws NoSuchElementException {\n\t\t\n\t\t// if the heap is empty, throw a NoSuchElementException\n\t\tif(this.size() == 0){\n\t\t\tthrow new NoSuchElementException();\n\t\t}\n\n\t\t// store the minimum item so that it may be returned at the end\n\t\tAnyType minValue = this.findMin();\n\n\t\t// replace the item at minIndex with the last item in the tree\n\t\tAnyType lastValue = this.array[this.size()-1];\n\t\tthis.array[0] = lastValue;\n\t\tthis.array[this.size() - 1] = null;\n\t\t\n\t\t// update size\n\t\tthis.currentSize--;\n\n\t\t// percolate the item at minIndex down the tree until heap order is restored\n\t\t// It is STRONGLY recommended that you write a percolateDown helper method!\n\t\tthis.percolateDown(0);\n\t\t\n\t\t// return the minimum item that was stored\n\t\treturn minValue;\n\t}",
"private Node removeMin(Node node){\n if(node == null)\n return null;\n else if(node.left == null) {//use right child to replace this node (min value node)\n if(node.count!=0){ //multiple value in same node\n node.count--;\n return node;\n }\n else{\n decDepth(node.right); //maintain depth when chain in right tree\n return node.right;\n }\n }\n\n //walk through left branch\n node.left = removeMin(node.left);\n if(node!=null) node.size--; // the min value must be removed\n return node;\n }",
"public static void selectionSort2(IntList l) {\n\t\tIntListEntry input = l.getFirst();\n\t\tIntListEntry output = null;\n\t\twhile (input != null) {\n\t\t\tIntListEntry min = input;\n\t\t\tfor (IntListEntry e = input; e != null; e = e.getNext())\n\t\t\t\tif (e.getItem()<min.getItem())\n\t\t\t\t\tmin = e;\n\t\t\tif (min != input) {\n\t\t\t\tl.delete(min);\n\t\t\t\tif (output == null)\n\t\t\t\t\tl.prepend(min);\n\t\t\t\telse\n\t\t\t\t\tl.insertAfter(min,output);\n\t\t\t}\n\t\t\toutput = min;\n\t\t\tinput = min.getNext();\n\t\t}\n\t}",
"public void minHeapify(int i) {\n\t\tint smallest;\n\t\tint l = left(i);\n\t\tint r = right(i);\n\t\tif (l < heapSize && General.pointYCompare(heapArr[l], heapArr[i]) < 0)\n\t\t\tsmallest = l;\n\t\telse\n\t\t\tsmallest = i;\n\t\tif (r < heapSize && General.pointYCompare(heapArr[r], heapArr[smallest]) < 0)\n\t\t\tsmallest = r;\n\t\tif (smallest != i) {\n\t\t\tpointSwap(i, smallest);\n\t\t\tminHeapify(smallest);\n\t\t}\n\t}",
"public static void selectionSort(int[] list) {\n for (int i = 0; i < list.length - 1; i++) {\n int currentMin = list[i];\n int currentMinIndex = i;\n \n for (int j = i + 1; j < list.length; j++) {\n if (currentMin < list[j]) {\n currentMin = list[j];\n currentMinIndex = j;\n }\n }\n \n // swap list[i] with list[currentMinIndex] if necessary\n if (currentMinIndex != i) {\n list[currentMinIndex] = list[i];\n list[i] = currentMin;\n }\n }\n }",
"private void minHeapify(int location) {\r\n\t\tint l = left(location);\r\n\t\tint r = right(location);\r\n\t\tint smallest;\r\n\t\tif (l < this.size && this.costHeap[l] < this.costHeap[location]) {\r\n\t\t\tsmallest = l;\r\n\t\t} else {\r\n\t\t\tsmallest = location;\r\n\t\t}\r\n\t\tif (r < this.size && this.costHeap[r] < this.costHeap[smallest]) {\r\n\t\t\tsmallest = r;\r\n\t\t}\r\n\t\tif (smallest != location) {\r\n\t\t\t// exchange i with smallest\r\n\t\t\tE tempE = objectHeap[location];\r\n\t\t\tdouble tempC = this.costHeap[location];\r\n\t\t\tthis.objectHeap[location] = this.objectHeap[smallest];\r\n\t\t\tthis.costHeap[location] = this.costHeap[smallest];\r\n\t\t\tthis.locations.put(this.objectHeap[location], location);\r\n\t\t\tthis.objectHeap[smallest] = tempE;\r\n\t\t\tthis.costHeap[smallest] = tempC;\r\n\t\t\tthis.locations.put(tempE, smallest);\r\n\t\t\tminHeapify(smallest);\r\n\t\t}\r\n\t}",
"public ListNode partition(ListNode head, int x) {\n ListNode cur = new ListNode(0);\n cur.next = head;\n head = cur;\n \n ListNode small=cur, big=cur;\n while(small.next!=null && small.next.val<x)\n small = small.next;\n big = small.next;\n \n if(big!=null){\n while((cur=big.next)!=null){\n if(cur.val>=x){\n big = cur;\n }else{\n big.next = cur.next;\n cur.next = small.next;\n small.next = cur;\n small = small.next;\n }\n }\n }\n return head.next;\n}",
"void MinInsert(int x)\n {\n if (size == capacity) {\n return;\n }\n size++;\n arr[size - 1] = x;\n for (int i = size - 1; i != 0 && arr[MyHeap.parent(i)] > arr[i]; )\n {\n swap(i,MyHeap.parent(i));\n i = MyHeap.parent(i);\n }\n }",
"public static ArrayList<Integer> nearestSmallerToRight(int[] arr) {\n Stack<Integer> st = new Stack<>();\n\n // auxiliary array to store the result\n ArrayList<Integer> result = new ArrayList<>();\n\n // traverse through the array in reverse as we\n // want the stack to be in same traverse order as \n // array\n for (int i = arr.length - 1; i >= 0; i--) {\n // if there are elements in the stack then check if\n // top of the stack is greater than current element\n // if yes, then it is not desirable so pop it as we\n // want only smaller element on the top\n if (!st.empty() && st.peek() >= arr[i])\n st.pop();\n\n // if the stack is becomes empty or is still empty the\n // there is no smaller element to the left\n if (st.empty())\n result.add(-1);\n\n else\n\n // else top is the smallest to the left\n result.add(st.peek());\n\n // if not conditions are met then simply push the array\n // element to the stack\n st.push(arr[i]);\n }\n\n return result;\n }",
"private Node getMinimumOld() {\n Node tmp = null;\n\n // TODO: optimize by putting in 1 list and\n // provide 'starting offset' for remaining nodes to find mimimum\n // note: see new getMinimum method above\n\n if (null != nodeA) {\n tmp = nodeA;\n if (null != nodeB && tmp.data > nodeB.data) {\n tmp = nodeB;\n }\n if (null != nodeC && tmp.data > nodeC.data) {\n tmp = nodeC;\n }\n } else if (null != nodeB) {\n tmp = nodeB;\n if (null != nodeC && tmp.data > nodeC.data) {\n tmp = nodeC;\n }\n } else if (null != nodeC) {\n tmp = nodeC;\n }\n\n // System.out.println(tmp);\n\n if (null == tmp ) {\n // terminating condition\n return null;\n }\n\n if (tmp.equals(nodeA)) {\n nodeA = nodeA.next;\n }\n if (tmp.equals(nodeB)) {\n nodeB = nodeB.next;\n }\n if (tmp.equals(nodeC)) {\n nodeC = nodeC.next;\n }\n\n System.out.println(tmp.data);\n\n return tmp;\n }",
"public void balanceHeaps(){\n \n //If max heap size is greater than min heap then pop the first element and put int min heap\n if(maxHeap.size() > minHeap.size())\n minHeap.add(maxHeap.pollFirst());\n\n }",
"private Node smallest(Node p){\n if(p == null){\n return null;\n }\n Node smallest = p;\n while(smallest.left!=null){\n smallest = smallest.left;\n }\n return smallest;\n }",
"public void sort() {\n\n // Fill in the blank here.\n\tfor(int i = 0; i < size; i++){\n\t\tint currentLowest, cLIndex, temp;\n\t\tcurrentLowest = elements[i];\n\t\tcLIndex = i; \n\t\tfor(int c = i+1; c < size; c++){\n\t\t\tif(currentLowest > elements[c]){\n\t\t\t\tcurrentLowest = elements[c];\n\t\t\t\tcLIndex = c;\n\t\t\t} \n\t\t}\n\t\ttemp = elements[i];\n\t\telements[i] = elements[cLIndex];\n\t\telements[cLIndex] = temp;\n\t\t\n\t}\n System.out.println(\"Sorting...\");\n }",
"public static int[] partialSort(int[] a) {\n for (int i = 0; i < 2; i++) {\n for (int j = 0; j < 2 - i; j++) {\n if (a[j] > a[j+1]) {\n int temp = a[j+1];\n a[j+1] = a[j];\n a[j] = temp;\n }\n }\n }\n return a;\n}",
"private void minHeapify(Vertex[] queue, int index, int size) {\r\n\t\tint l = left(index);\r\n\t\tint r = right(index);\r\n\t\tint smallest;\r\n\t\tif (l < size && queue[l].dist < queue[index].dist)\r\n\t\t\tsmallest = l;\r\n\t\telse\r\n\t\t\tsmallest = index;\r\n\t\tif (r < size && queue[r].dist < queue[smallest].dist)\r\n\t\t\tsmallest = r;\r\n\t\tif (smallest != index) {\r\n\t\t\tVertex temp = queue[index];\r\n\t\t\tqueue[index] = queue[smallest];\r\n\t\t\tqueue[index].setHandle(index);\r\n\t\t\ttemp.setHandle(smallest);\r\n\t\t\tqueue[smallest] = temp;\r\n\t\t\tminHeapify(queue, smallest, size);\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t\t\tint numbers[] = { 14, 56, 37, 0, 23, 9, 2, 80, 67 };\n\t\t\t//\t\t\t\t\t0 1 2 3 4 5 6 7 8\n\t\t\tint min =0, temp =0, indexOfMin=0;\n\t\t\t\t\t//i points to the num position\n\t\t\tfor (int i =0; i<numbers.length-1; i++) { // this FOR loop maintain the index position only\n\t\t\t\n\t\t\tmin = numbers[i];\n\t\t\tfor (int j=i; j<numbers.length;j++) { // find the min num\n\t\t\t\tif (numbers[j]<min) {\n\t\t\t\t\tmin = numbers[j];\n\t\t\t\t\tindexOfMin=j;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// swapping of 2 nums : numbers{indexOfMin} and numbers[i]\n\t\t\ttemp = numbers[indexOfMin];\n\t\t\tnumbers[indexOfMin] = numbers[i];\n\t\t\tnumbers[i]=temp;\n\t\t\t}\n\t\t\tfor (int i=0; i<numbers.length; i++) {\n\t\t\tSystem.out.println(numbers[i]);\n\t\t}\t}",
"public double getLeft(double min) {\n return min - this.size; \n }",
"static int min(int a, int b) { return a < b ? a : b; }",
"public static int[] selectionSort(int[] array) {\n\n if(array.length== 0) {\n return new int[] {};\n }\n\n int[] arraySorted = new int[array.length];\n int[] arrayWaitToSorted = new int[array.length];\n\n\n\n int startIndex = 0;\n while ( startIndex < array.length ) {\n int swapMinIndex = startIndex;\n\n\n\n\n\n for (int j = startIndex+1; j < array.length ; j++) {\n\n\n if (array[j] < array[swapMinIndex] ) {\n swapMinIndex = j;\n }\n\n }\n\n int temp = array[swapMinIndex];\n array[swapMinIndex] = array[startIndex];\n array[startIndex] = temp;\n\n startIndex++;\n\n\n\n// int temp = array[swapMinIndex];\n// arraySorted[i] = array[swapMinIndex];\n// array[swapMinIndex]= array[i];\n }\n\n\n\n\n// return arraySorted;\n return array;\n }",
"protected int swim(int ind) {\n if (ind == 1) return ind;\n\n int curVal = heap[ind];\n int parentInd = ind / 2;\n int parentVal = heap[parentInd];\n \n if (parentVal < curVal) {\n // move up\n swap(ind, parentInd);\n return swim(parentInd);\n } else {\n return ind;\n }\n }",
"protected void siftUp(int start) {\r\n\t\tint child = start, parent;\r\n\r\n\t\twhile (child > 0) {\r\n\t\t\tparent = (child - 1) >> 1; // >> 1 is slightly faster than / 2\r\n\t\t\t\t\t\t\t\t\t\t// => parent = (child - 1) / 2\r\n\t\t\tif (compare(theHeap.get(child), theHeap.get(parent)) >= 0)\r\n\t\t\t\tbreak;\r\n\t\t\tswap(parent, child);\r\n\t\t\tchild = parent;\r\n\t\t}\r\n\t}",
"public void selectionSort()\r\n {\r\n for(int x = 0; x < numItems; x++)\r\n {\r\n int smallestLoc = x;\r\n for(int y = x+1; y<numItems; y++)\r\n {\r\n if(mArray[y]< mArray[smallestLoc])\r\n {\r\n smallestLoc = y;\r\n }\r\n }\r\n int temp = mArray[x];\r\n mArray[x] = mArray[smallestLoc];\r\n mArray[smallestLoc] = temp;\r\n }\r\n }",
"public static void selectionSort(int[] data){\n\n\tfor(int i = 0; i < data.length; i++){\n\t int min = data[i];\n\t int indexToReplace = i;\n\n\t for(int k = i; k < data.length; k++){\n\t\tif(data[k] < min){\n\t\t indexToReplace = k;\n\t\t min = data[k];\n\t\t}\n\t }\n\n\t int old = data[i];\n\t data[i] = min;\n\t data[indexToReplace] = old;\n\t}\n }",
"public static void main(String[] args) {\n int[] array = {3, 1, 5, 99, 3, 12};\n System.out.println(\"Smallest: \" + smallest(array));\n System.out.println(\"Index of the smallest number: \" + indexOfSmallest(array));\n System.out.println(\"Index of smallest from: \" + indexOfSmallestFrom(array, 0));\n System.out.println(\"Index of smallest from: \" + indexOfSmallestFrom(array, 2));\n System.out.println(\"Index of smallest from: \" + indexOfSmallestFrom(array, 4));\n\n// swap(array, 0, 2);\n// System.out.println(Arrays.toString(array));\n sort(array);\n \n }",
"public void lowerHalf() {\n\t\t// TODO: Implement\n\t\tint sumOfSlotCounts = getSumOfSlotCount()-1;\n\t\tif(sumOfSlotCounts < 0) return;\n\t\t//if(getSlotCount() == 1 && getSumOfSlotCount() == 1) return;\n\t\tint slot = getSlotCount()-1;\n\t\tint beanNumber = getSlotBeanCount(slot)-1;\n\t\tint deleted=0;\n\t\t//System.out.println(\"sumOfCounts: \" + sumOfSlotCounts);\n\t\twhile(deleted < Math.floor(sumOfSlotCounts / 2) ){\n\t\t\t/*if (slotBean.get(slot).isEmpty()) {\n\t\t\t\tslot++;\n\t\t\t\tbeanNumber = 0;\n\t\t\t\tSystem.out.println(\"slot empty: slot: \" + slot + \" beanN: \" + beanNumber);\n\t\t\t}*/\n\t\t\t\n\t\t\t//System.out.println(\"i: \" + deleted + \" count: \" + getSlotBeanCount(slot)+\" beanNumber: \" + beanNumber);\n\t\t\tif(beanNumber < getSlotBeanCount(slot) && beanNumber >= 0 && getSlotBeanCount(slot) > 0 ) {\n\t\t\t\t//System.out.println(\"slot not empty: slot: \" + slot + \" beanN: \" + beanNumber);\n\t\t\t\tslotBean.get(slot).remove(beanNumber--);\n\t\t\t\tdeleted++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//System.out.println(\"slot empty: slot: \" + slot + \" beanN: \" + beanNumber);\n\t\t\t\tif(slot >= 0) slot--;\n\t\t\t\tif(getSlotBeanCount(slot) > 0) beanNumber = getSlotBeanCount(slot)-1;\n\t\t\t\telse beanNumber = 0;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"public long removeLeft() {\n long temporary = Array[start++];\n if ( start == max ) {\n start = 0;\n }\n nItems--;\n return temporary;\n }",
"private void swapElement ( int p1, int p2 )\n\t{\n\t}",
"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 }",
"public Node deleteMin() {\n\t\t// if the heap is empty\n\t\t// return MAXINT as output\n\t\tNode min = new Node(Integer.MAX_VALUE);\n\t\tif(this.head == null)\n\t\t\treturn min;\n\t\t\n\t\t\n\t\tNode prevMin = null;\n\t\tNode curr = this.head;\n\t\tNode prev = null;\n\t\t\n\t\t// find the smallest node\n\t\t// keep track of node who points to this minimum node\n\t\twhile(curr!=null) {\n\t\t\tif(curr.key<min.key) {\n\t\t\t\tmin = curr;\n\t\t\t\tprevMin = prev;\n\t\t\t}\n\t\t\tprev = curr;\n\t\t\tcurr = curr.rightSibling;\n\t\t}\n\t\t\n\t\t// if its the head then move one pointer ahead\n\t\tif(prevMin == null)\n\t\t\tthis.head = min.rightSibling;\n\t\telse {\n\t\t\t// else attach the previous node to the rightSibling of min\n\t\t\tprevMin.rightSibling = min.rightSibling;\n\t\t}\n\t\tmin.rightSibling = null;\n\t\t\n\t\t//return min node\n\t\treturn min;\n\t}",
"public ListNode partition(ListNode pHead, int x) {\n if(pHead == null || pHead.next == null){\n return pHead;\n }\n ListNode small = new ListNode(-1);\n ListNode s = small;\n ListNode big = new ListNode(1);\n ListNode b = big;\n while(pHead != null){\n if(pHead.val < x){\n s.next = pHead;\n s = pHead;\n }else{\n b.next = pHead;\n b = pHead;\n }\n pHead = pHead.next;\n }\n b.next = null;\n s.next = big.next;\n return small.next;\n }",
"int pop() {\n\t\tif (stack.size() > 0) {\n\t\t\tif (minEle > stack.peek()) {\n\t\t\t\t// We have to update the min\n\t\t\t\t// peek = 2*newmin-oldmin\n\t\t\t\t// oldmin = 2*newmin-peek\n\t\t\t\t// updating min element\n\t\t\t\tint ctop = stack.pop();\n\t\t\t\tint oldmin = minEle;\n\t\t\t\tminEle = 2 * minEle - ctop;\n\t\t\t\treturn oldmin;\n\t\t\t} else {\n\t\t\t\treturn stack.pop();\n\t\t\t}\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}",
"public static void sort(Comparable[] a) {\n for (int i = 0 ; i < a.length ; i++) { // each position scan\n int min = i;\n for (int j = i+1; j < a.length; j++) { // each time we have to scan through remaining entry\n if (HelperFunctions.less(a[j], a[min])) {\n min = j ;\n }\n HelperFunctions.exch(a, i, min);\n }\n }\n }",
"public static void main(String args[])\n {\n int n,min= Integer.MAX_VALUE;\n Scanner sc = new Scanner(System.in);\n n = sc.nextInt();\n \n int a[] = new int[n];\n for(int i=0;i<n;i++){\n a[i] = sc.nextInt();\n }\n \n for(int i=0;i<n-1;i++){\n min = i;\n for(int j=i+1;j<n;j++){\n \tif(a[j]<a[min]){\n min=j;\n \n }\n \n }\n if(i!=min){\n int tt = a[i];\n a[i] = a[min];\n a[min] = tt;\n }\n }\n \n for(int i=0;i<n;i++)\n System.out.print(a[i] + \" \");\n }",
"public int extractMinimum() {\n if (size == 0) {\n return Integer.MIN_VALUE;\n }\n if (size == 1) {\n size--;\n return arr[0];\n }\n\n MathUtil.swap(arr, 0, size - 1);\n size--;\n minHeapify(0);\n return arr[size];\n }",
"private boolean findAndReplaceSmallest(List<TupleReaderBinary> buffers, List<Tuple> sortStage) {\n\t\t// assert(buffers.size() == sortStage.size()) && buffers.size() ==\n\t\t// numInputBuffers);\n\t\tTuple smallest = null;\n\t\tint smallestIndex = 0;\n\t\tfor (int i = 0; i < numInputBuffers; i++) {\n\t\t\tif (theComparator.compare(smallest, sortStage.get(i)) > 0) {\n\t\t\t\tsmallest = sortStage.get(i);\n\t\t\t\tsmallestIndex = i;\n\t\t\t}\n\t\t}\n\t\tif (smallest != null) {\n\t\t\tplaceInOutput(smallest);\n\t\t} else {\n\t\t\tif (readerBucketID < prevTotalBuckets) {\n\t\t\t\tcurrentGroup++;\n\t\t\t\tfor (int i = 0; i < numInputBuffers; i++) {\n\t\t\t\t\tassignBuffer(buffers, i);\n\t\t\t\t\tsortStage.add(null);\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < numInputBuffers; i++) {\n\t\t\t\t\tsortStage.set(i, readFromBuffer(buffers, i));\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t// kill switch - NO MORE TUPLES TO SORT!\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tsortStage.set(smallestIndex, readFromBuffer(buffers, smallestIndex));\n\t\treturn true;\n\t}",
"public T removeMin ();",
"public static int[] selectionSort(int[] array)\r\n {\n for (int i = 0; i < array.length-1; i++)\r\n {\r\n // This variable will keep track of the index of the smallest\r\n // element found during this pass of the unsorted portion of the\r\n // array. Since we start at i, that will be the smallest as we\r\n // start each iteration of the outer loop.\r\n int minIndex = i;\r\n \r\n // this inner for loop starts at i+1 and searches through the entire\r\n // remaining unsorted array to see if it can find an item that is\r\n // less than what is currently at array[minIndex]\r\n for (int j = i+1; j < array.length; j++)\r\n {\r\n // during each iteration of this inner loop, check to see if the\r\n // item we are currently looking at is less than the item at\r\n // array[minIndex]. If it is less, we need to change our\r\n // minIndex to be set to the current index we are looking at, in\r\n // this case j.\r\n if (array[j] < array[minIndex])\r\n {\r\n minIndex = j;\r\n }\r\n }\r\n \r\n // once we have found the smallest element in the unsorted portion\r\n // of the array, we need to swap it with the item at index i. But we\r\n // don't want to do this if they are the same index, so if minIndex\r\n // equals i, then do nothing, otherwise we need to perform the swap.\r\n if (minIndex != i)\r\n {\r\n int temp = array[i];\r\n array[i] = array[minIndex];\r\n array[minIndex] = temp;\r\n }\r\n }\r\n \r\n return array;\r\n }",
"public ListNode partition(ListNode head, int x) {\n ListNode smallHead = new ListNode(0);\n ListNode largeHead = new ListNode(0);\n ListNode small = smallHead;\n ListNode large = largeHead;\n while(head != null){\n if(head.val < x){\n small.next = head;\n small = small.next;\n } else {\n large.next = head;\n large = large.next;\n }\n head = head.next;\n }\n large.next = null;\n small.next = largeHead.next;\n return smallHead.next;\n }",
"public static void balanceHeaps()\n {\n // add your code here\n if(Math.abs(s.size()-g.size()) > 1){\n if(s.size() > g.size()){\n g.add(s.poll());\n }\n else {\n s.add(g.poll());\n }\n }\n }"
] |
[
"0.6577429",
"0.65545905",
"0.6510174",
"0.64325404",
"0.63900954",
"0.63865894",
"0.63767856",
"0.63315904",
"0.63294435",
"0.6292685",
"0.62576336",
"0.6216579",
"0.61898017",
"0.61695224",
"0.6162402",
"0.60956675",
"0.60820115",
"0.6074916",
"0.6058075",
"0.60360366",
"0.60346013",
"0.6000703",
"0.6000128",
"0.5980919",
"0.5970069",
"0.5947372",
"0.59077",
"0.5882322",
"0.5876438",
"0.58745855",
"0.58583826",
"0.5858124",
"0.5851931",
"0.5836681",
"0.583327",
"0.5826694",
"0.5817527",
"0.5813336",
"0.58019274",
"0.5800301",
"0.57911485",
"0.57808685",
"0.5773721",
"0.57601553",
"0.57601553",
"0.5758713",
"0.5749953",
"0.5749348",
"0.5732592",
"0.57255155",
"0.5717678",
"0.5713806",
"0.5713486",
"0.5710714",
"0.5706037",
"0.5705115",
"0.57022005",
"0.56922436",
"0.56918025",
"0.56894535",
"0.56865937",
"0.56818676",
"0.567614",
"0.56703997",
"0.56682116",
"0.5654845",
"0.5652357",
"0.56484574",
"0.5646707",
"0.56426924",
"0.56425554",
"0.5627614",
"0.56242657",
"0.56241786",
"0.5620097",
"0.56154907",
"0.5608558",
"0.56058943",
"0.56020564",
"0.5600819",
"0.5599651",
"0.55987906",
"0.5598741",
"0.5598382",
"0.5588908",
"0.5587293",
"0.55828387",
"0.5580434",
"0.5577421",
"0.55745757",
"0.556509",
"0.5558038",
"0.5553836",
"0.5552839",
"0.55510587",
"0.5550698",
"0.5549795",
"0.5549261",
"0.55490446",
"0.5546891",
"0.55430895"
] |
0.0
|
-1
|
Interface used to get specific attributes of a PGEN text drawable object
|
public interface IText extends ISinglePoint {
/**
* Defines whether the text rotation is relative to the screen or geographic
* north
*
* @author sgilbert
*
*/
public static enum TextRotation {
SCREEN_RELATIVE, NORTH_RELATIVE
}
/**
* Defines the text justification options
*
* @author sgilbert
*
*/
public static enum TextJustification {
LEFT_JUSTIFY, CENTER, RIGHT_JUSTIFY
}
/**
* Defines available font styles
*
* @author sgilbert
*
*/
public static enum FontStyle {
REGULAR, BOLD, ITALIC, BOLD_ITALIC
}
public static enum DisplayType {
NORMAL, BOX, UNDERLINE, OVERLINE
}
/**
* Gets the text to draw
*
* @return Array of text strings
*/
public String[] getString();
/**
* Gets the name of the font to use
*
* @return font name
*/
public String getFontName();
/**
* Gets the size of the font
*
* @return font size
*/
public float getFontSize();
/**
* Gets the font style to use
*
* @return font style
*/
public FontStyle getStyle();
/**
* Gets the lat/lon refernce position for the text display
*
* @return lat/lon coordinate
*/
public Coordinate getPosition();
/**
* Gets the color to use for the text
*
* @return text color
*/
public Color getTextColor();
/**
* Gets the specified justification
*
* @return the text justification
*/
public TextJustification getJustification();
/**
* Gets the rotation angle to use
*
* @return rotation angle
*/
public double getRotation();
/**
* Gets how the rotation angle is applied
*
* @return the rotation relativity
*/
public TextRotation getRotationRelativity();
/**
* Determines whether the text should be displayed with an outline box
*
* @return true, if outline box should be displayed
*/
public DisplayType getDisplayType();
/**
* Determines whether text background should be masked out.
*
* @return true, if background is to be masked
*/
public Boolean maskText();
/**
* Gets the offset in the x direction for the text location. The offset is
* specified in half-characters.
*
* @return The x direction offset
*/
public int getXOffset();
/**
* Gets the offset in the y direction for the text location. The offset is
* specified in half-characters.
*
* @return The y direction offset
*/
public int getYOffset();
public Boolean getHide();
public Boolean getAuto();
public int getIthw();
public int getIwidth();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"Attributes getAttributes();",
"IAttributes getAttributes();",
"BalloonAttributes getAttributes();",
"Map<String, String> getAttributes();",
"public Map<String, Object> getAttrs();",
"public Attribute[] getAvailableAttributes(){\n Attribute attributes[] = {\n TextAttribute.FAMILY,\n TextAttribute.WEIGHT,\n TextAttribute.POSTURE,\n TextAttribute.SIZE,\n\t TextAttribute.TRANSFORM,\n TextAttribute.SUPERSCRIPT,\n TextAttribute.WIDTH,\n };\n\n return attributes;\n }",
"public abstract Map<String, Object> getAttributes();",
"public abstract Map getAttributes();",
"Map<String, Object> getAttributes();",
"Map<String, Object> getAttributes();",
"Map<String, Object> getAttributes();",
"public Map<String, String> getAttributes();",
"private void getCustomAttributes(AttributeSet attrs)\r\n {\r\n String labelText;\r\n TypedArray a = getContext().obtainStyledAttributes( attrs, R.styleable.Label );\r\n labelText = a.getString(R.styleable.Label_label_text);\r\n labelSize = a.getInt(R.styleable.Label_label_size, 10);\r\n a.recycle(); \r\n \r\n if (labelText != null) setLabel(labelText);\r\n else setLabel(\"\");\r\n \r\n }",
"public Map<String, Object> getAttributes();",
"public Map<String, Object> getAttributes();",
"public interface C2277a {\n String getNameType();\n\n @DrawableRes\n int getStatusIcon();\n\n @Nullable\n String getTagName();\n}",
"public List<TLAttribute> getAttributes();",
"public java.util.Collection getAttributes();",
"public String getattribut() \n\t{\n\t\treturn attribut;\n\t}",
"protected StringBuffer getAttributes()\r\n\t{\r\n\t\t// Output buffer\r\n\t\tStringBuffer transformBuff\t= new StringBuffer();\r\n\t\t// The various transformation buffers.\r\n\t\tStringBuffer rotateBuff\t\t= new StringBuffer();\r\n\t\tStringBuffer translateBuff\t= new StringBuffer();\r\n\t\tStringBuffer scaleBuff \t\t= new StringBuffer();\r\n\r\n\t\t\r\n\t\t// now let's calculate our transformation information if any.\r\n\t\t////////////////// Rotate the object ////////////\r\n\t\t// you may want to play with this if it doesn't work\r\n\t\t// Transformation a followed by tranformation b is not the\r\n\t\t// same as transformation b followed by transformation a.\r\n\t\t// Page 65 SVG Essentials, J. David Eisenberg, O'Reilly Press.\r\n\t\tif (Rotation != 0.0)\r\n\t\t{\r\n\t\t\trotateBuff.append(\"rotate(\");\r\n\t\t\trotateBuff.append(Rotation + \" \");\r\n\t\t\t// Blocks are rotated around their insertion point.\r\n\t\t\trotateBuff.append(Anchor.toTransformCoordinate());\r\n\t\t\trotateBuff.append(\") \");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\r\n\r\n\t\t///////////////// Scale the object //////////////\r\n\t\tif ((xScale != 1.0) || (yScale != 1.0))\r\n\t\t{\r\n\t\t\tscaleBuff.append(\" scale(\"+xScale);\r\n\t\t\tif (xScale != yScale)\r\n\t\t\t\tscaleBuff.append(\",\"+yScale);\r\n\t\t\tscaleBuff.append(\")\");\r\n\t\t\t\r\n\t\t\t// Now we have to compensate for any scaling in the y axis \r\n\t\t\t// because Dxf scales objects from the lower left corner of\r\n\t\t\t// the drawing and SVG scales from the top left.\r\n\t\t\t//\r\n\t\t\t// This requires a little explanation as it took some time \r\n\t\t\t// to work out exactly what is going on between DXF and SVG.\r\n\t\t\t//\r\n\t\t\t// Blocks in AutoCAD have their own space. When you choose \r\n\t\t\t// an insertion point for a block you are telling the block\r\n\t\t\t// that it's new origin is the insert point, not the drawing's\r\n\t\t\t// origin.\r\n\t\t\t//\r\n\t\t\t// Dxf2Svg reads the blocks section of the DXF and interprets the\r\n\t\t\t// entities within a block literally and converts them into \r\n\t\t\t// XML entities with the insert point as their origin.\r\n\t\t\t// \r\n\t\t\t// Now DXF's drawing origin is in the bottom lefthand corner of the page.\r\n\t\t\t// SVG's origin is the top left hand corner. That means that all blocks \r\n\t\t\t// are drawn in reference to the lower left corner. We have already converted\r\n\t\t\t// the blocks entities to assume that the origin is SVG style (top left)\r\n\t\t\t// so when we try to specify an insert point in SVG, we have a problem. The\r\n\t\t\t// references are from different corners of the page.\r\n\t\t\t//\r\n\t\t\t// To compensate blocks have two points; an Anchor like all other graphic \r\n\t\t\t// objects and a Virtual DXF Coordinate (VDC). The VDC is basically\r\n\t\t\t// the x, and y values from the DXF file, converted to USR_UNITS.\r\n\t\t\t// That's all. It is not converted to SVG space. \r\n\t\t\t// \r\n\t\t\t// First you \r\n\t\t\t// must imagine that you are overlaying SVG space (0,0 top left) on top\r\n\t\t\t// of DXF space (0,0 bottom left). To get objects to appear in the same\r\n\t\t\t// location as they did in the DXF you must move that insertion point\r\n\t\t\t// up above the SVG y = 0 line (so y becomes negative in SVG).\r\n\t\t\t// This requires knowing the height of \r\n\t\t\t// the drawing which SvgUtil.java can provide. Once you know the height\r\n\t\t\t// you find out how subtract the anchor's y coordinate from the height\r\n\t\t\t// thus in effect you are flipping between the two drawing spaces.\r\n\t\t\t//\r\n\t\t\t// Inserting an object is easy now; just use the VDC as the anchor and \r\n\t\t\t// reference the block within a <g> tag. If you want to scale\r\n\t\t\t// that object, things get a little more complicated. The y\r\n\t\t\t// value is in the negative 'y' range of the SVG space. Any scaling of\r\n\t\t\t// that object will be in reference to that point.\r\n\t\t\t//\r\n\t\t\t// So to get the object to appear in it's original position we must move\r\n\t\t\t// it further up into negative y SVG space by the distance it would \r\n\t\t\t// have grown during transformation. I.e. if the object grew by 25% or\r\n\t\t\t// 1.25 in AutoCAD, and the object is 1 inch in height then the growth\r\n\t\t\t// through scaling is 1 * (1.25 -1) or 1 * 0.25 or 0.25 inches.\r\n\t\t\t//\r\n\t\t\t// Now we need to now the distance of the VDC from the SVG object's\r\n\t\t\t// origin. That should be the height of the drawing, but to be sure \r\n\t\t\t// add the absolute value of the distance from SVG y = 0 to the object's\r\n\t\t\t// origin in negative y SVG space, and add it to the distance from \r\n\t\t\t// SVG y = 0 to the VDC y coordinate. Now if you multiply that distance\r\n\t\t\t// by the above 0.25, and subtract that from the SVG origin point\r\n\t\t\t// in negative SVG y space you will have compensated for the shift of \r\n\t\t\t// due to scaling.\r\n\t\t\t//\r\n\t\t\t// We don't need to do anything with the x value because it is \r\n\t\t\t// just the VDC x value, which has a one-to-one relationship to\r\n\t\t\t// SVG space except that it is not in SVG space, but in DXF space.\r\n\t\t\t//\r\n\t\t\t// I'm sorry this would have benifited from a picture so perhaps you\r\n\t\t\t// should browse through the paper documentation as there is a diagram\r\n\t\t\t// that I used to formulate the algorithm.\r\n\t\t\t\r\n\t\t\t//double VDCx = virtualDxfPoint.getX();\r\n\t\t\tdouble VDCy = virtualDxfPoint.getY();\r\n\t\t\t//double Ax\t= Anchor.getX();\r\n\t\t\tdouble Ay\t= Anchor.getY();\r\n\t\t\t\r\n\t\t\t////////////////////////////////\r\n\t\t\t//VDCx = VDCx;\r\n\t\t\tVDCy = VDCy - ((Ay + Math.abs(VDCy))*(yScale -1));\r\n\t\t\t////////////////////////////////\r\n\r\n\t\t\t// We do not need to set the x value for this point. I don't know why.\r\n\t\t\t//virtualDxfPoint.setXUU(VDCx);\r\n\t\t\tvirtualDxfPoint.setYUU(VDCy);\r\n\t\t}\r\n\t\t\r\n\t\t// We do this last because we might have adjusted the virtualDxfPoint's y \r\n\t\t// value, but the transformation is best done after the rotation and it seems\r\n\t\t// before the scale. \r\n\t\ttranslateBuff.append(\"translate(\");\r\n\t\ttranslateBuff.append(virtualDxfPoint.toTransformCoordinate());\r\n\t\ttranslateBuff.append(\")\");\r\n\t\t\r\n\t\t\r\n\t\t// Put all three parts together now.\r\n\t\ttransformBuff.append(\" transform=\\\"\");\r\n\t\t// Can only do this with Java 1.4\r\n\t\t// The transformation ordering can be changed here.\r\n\t\ttransformBuff.append(rotateBuff);\r\n\t\ttransformBuff.append(translateBuff);\r\n\t\ttransformBuff.append(scaleBuff);\t// this may be an empty buffer.\r\n\t\t// closing quote on the transformation string.\r\n\t\ttransformBuff.append(\"\\\"\");\r\n\t\ttransformBuff.append(getAdditionalAttributes());\r\n\t\t\r\n\t\treturn transformBuff;\r\n\t}",
"ArrayList getAttributes();",
"String getAttribute();",
"public abstract ImportAttributes getAttributes();",
"public ShapeAttributes getAttributes()\n {\n return this.normalAttrs;\n }",
"Map getGenAttributes();",
"DataMap getCustomAnnotations();",
"Attribute getAttribute();",
"public Drawable getTextDrawable() {\n if (this.textDrawable != null) {\n if (this.textDrawable.isLive())\n return null;\n //textDrawable.resetTimeLimit();\n //return textDrawable;\n }\n\n if (this.isConnectedToGame) {\n this.textDrawable = new TextDrawable(this.fullPlayerName, getDrawable(), this.wotCharacter.getColor(), 13.0f, \"Lucida Blackletter\", ImageLibRef.TEXT_PRIORITY, 5000);\n } else {\n this.textDrawable = new TextDrawable(this.fullPlayerName + \" (away)\", getDrawable(), this.wotCharacter.getColor(), 13.0f, \"Lucida Blackletter\", ImageLibRef.TEXT_PRIORITY, 5000);\n }\n return this.textDrawable;\n }",
"org.chromium.components.paint_preview.common.proto.PaintPreview.MetadataProto getMetadata();",
"public IfcCharacterStyleSelect getTextCharacterAppearance() {\n return textCharacterAppearance;\n }",
"java.lang.String getAttribute();",
"public String getStringAttribute();",
"BalloonAttributes getHighlightAttributes();",
"public interface Drawable {\r\n List<Shape> getGUI();\r\n}",
"public HashMap<String, String> GetRawAttributes();",
"public String[] getRelevantAttributes();",
"public Attributes getAttributes() { return this.attributes; }",
"public org.python.Object __getattribute__(java.lang.String name);",
"private Attributes getAttributes()\r\n\t{\r\n\t return attributes;\r\n\t}",
"public org.omg.uml.foundation.core.Attribute getAttribute();",
"public String getAttributes() {\n\t\treturn getProperty(\"attributes\");\n\t}",
"@Override\n\tpublic String getText(Object object) {\n\t\tShape labelValue = ((Line)object).getShape();\n\t\tString label = labelValue == null ? null : labelValue.toString();\n\t\treturn label == null || label.length() == 0 ?\n\t\t\tgetString(\"_UI_Line_type\") :\n\t\t\tgetString(\"_UI_Line_type\") + \" \" + label;\n\t}",
"Appearance getAppearance();",
"tendermint.abci.EventAttribute getAttributes(int index);",
"public String[] getElementAnnotation(int index, String attr);",
"private Map getFontAttributes(String fontname, int size, boolean bold, boolean italic) {\n Map<TextAttribute, Object> map = new Hashtable<TextAttribute, Object>();\r\n map.put(TextAttribute.FAMILY, fontname);\r\n map.put(TextAttribute.SIZE, size);\r\n map.put(TextAttribute.KERNING, TextAttribute.KERNING_ON);\r\n map.put(TextAttribute.WIDTH, TextAttribute.WIDTH_CONDENSED);\r\n \r\n if (bold) {\r\n map.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD);\r\n }\r\n\r\n if (italic) {\r\n map.put(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE);\r\n }\r\n \r\n return map;\r\n }",
"public String getAnnotation();",
"public ShapeAttributes getHighlightAttributes()\n {\n return highlightAttrs;\n }",
"String getAttributeStringValue(Object attr);",
"public abstract Font getFont();",
"public interface IAttributes {\n\n\t/***\n\t * Integer index of the attribute. Should be used with defined public static final int values.\n\t * Chosen because of better extensibility (an enum cannot extend another enum).\n\t * More specific object attribute definitions should extend the ObjectAttributesBase class in order\n\t * to have access to all derived attributes.\n\t * \n\t * @param attribute integer index of attribute\n\t * @return\n\t */\n\tObject getAttribute(int attribute);\n\t\n\tvoid setAttribute(int attribute, Object value);\n}",
"@Override\r\n\tpublic Map<String, String> getAttributes() {\r\n\t\treturn this.attributes;\r\n\t}",
"@Override\n\tpublic String getText(Object object) {\n\t\tString label = ((EntityAttribute)object).getName();\n\t\treturn label == null || label.length() == 0 ?\n\t\t\tgetString(\"_UI_EntityAttribute_type\") :\n\t\t\tgetString(\"_UI_EntityAttribute_type\") + \" \" + label;\n\t}",
"public StructuredData getStructuredDataAttribute();",
"public String getValue(int i) {\n/* 151 */ return ((Attr)this.m_attrs.item(i)).getValue();\n/* */ }",
"public String toString(){\n return (\"TextShape \"+x+\" \"+y+\" \"+col.getRed()+\" \"+col.getGreen()+\" \"+col.getBlue()+\" \"+str);\n }",
"private Hashtable getRequestedAttributes() {\n\tif (fRequestedAttributes == null) {\n\t fRequestedAttributes = new Hashtable(7, (float)0.9);\n fRequestedAttributes.put(TextAttribute.TRANSFORM,\n\t\t\t\t IDENT_TX_ATTRIBUTE);\n fRequestedAttributes.put(TextAttribute.FAMILY, name);\n fRequestedAttributes.put(TextAttribute.SIZE, new Float(size));\n\t fRequestedAttributes.put(TextAttribute.WEIGHT,\n\t\t\t\t (style & BOLD) != 0 ? \n\t\t\t\t TextAttribute.WEIGHT_BOLD :\n\t\t\t\t TextAttribute.WEIGHT_REGULAR);\n\t fRequestedAttributes.put(TextAttribute.POSTURE,\n\t\t\t\t (style & ITALIC) != 0 ? \n\t\t\t\t TextAttribute.POSTURE_OBLIQUE :\n\t\t\t\t TextAttribute.POSTURE_REGULAR);\n fRequestedAttributes.put(TextAttribute.SUPERSCRIPT,\n new Integer(superscript));\n fRequestedAttributes.put(TextAttribute.WIDTH,\n new Float(width));\n\t}\n\treturn fRequestedAttributes;\n }",
"public MapeadorAtributos getMapeadorAtributos();",
"public native String getImageAttribute(String key) throws MagickException;",
"public abstract String getLabelText();",
"Object getAttribute(int attribute);",
"@Override\r\n\tpublic String toString() {\r\n\t\tString text = getElement();\r\n\t\tif (mainAttr!=null) {\r\n\t\t\ttext += \" \" + mainAttr;\r\n\t\t}\r\n\t\treturn text;\r\n\t}",
"protected abstract void useStyleAttributes(TypedArray attrs);",
"Pair<String, String> getAdditionalAttribute();",
"public abstract String getStyle();",
"java.util.Map<java.lang.String, java.lang.String> getAttributesMap();",
"public AttribInfo(){\n m_deprecated = false;\n m_hidden = false;\n m_multipleSelection = false;\n m_attributeValues = null;\n m_attributeValueMap = null;\n m_description = null;\n m_labelName = null;\n m_defaultValue = null;\n m_propertyMapKeyName = null;\n m_mapComponentClassName = null;\n m_preferredType = null;\n }",
"public Info getInfo() {\n super.fillInfo(shape);\n return this.shape;\n }",
"Atributo createAtributo();",
"public Drawable getDrawable() {\n return this.wotCharacter.getDrawable(this);\n }",
"public abstract ArrayList<DrawingComponent> getAnnotationList();",
"int getTextStrokeWidth();",
"@Override\n\tpublic Attributes getAttributes() {\n\t\treturn (Attributes)map.get(ATTRIBUTES);\n\t}",
"public RichText getDescr();",
"abstract Font getFont();",
"public abstract String getDecoratorInfo();",
"public void processProperties(org.appcelerator.kroll.KrollDict r17) {\n /*\n r16 = this;\n super.processProperties(r17)\n android.view.View r9 = r16.getNativeView()\n android.widget.TextView r9 = (android.widget.TextView) r9\n r6 = 0\n r7 = 0\n r4 = 0\n java.lang.String r12 = \"attributedString\"\n r0 = r17\n boolean r12 = r0.containsKey(r12)\n if (r12 == 0) goto L_0x002d\n r4 = 1\n java.lang.String r12 = \"attributedString\"\n r0 = r17\n java.lang.Object r1 = r0.get(r12)\n boolean r12 = r1 instanceof p006ti.modules.titanium.p007ui.AttributedStringProxy\n if (r12 == 0) goto L_0x002d\n ti.modules.titanium.ui.AttributedStringProxy r1 = (p006ti.modules.titanium.p007ui.AttributedStringProxy) r1\n android.app.Activity r12 = org.appcelerator.titanium.TiApplication.getAppCurrentActivity()\n android.text.Spannable r7 = p006ti.modules.titanium.p007ui.AttributedStringProxy.toSpannable(r1, r12)\n L_0x002d:\n if (r7 != 0) goto L_0x0048\n java.lang.String r12 = \"html\"\n r0 = r17\n boolean r12 = r0.containsKey(r12)\n if (r12 == 0) goto L_0x0048\n r4 = 1\n java.lang.String r12 = \"html\"\n r0 = r17\n java.lang.String r5 = org.appcelerator.titanium.util.TiConvert.toString(r0, r12)\n if (r5 == 0) goto L_0x0048\n android.text.Spanned r7 = android.text.Html.fromHtml(r5)\n L_0x0048:\n if (r7 != 0) goto L_0x0061\n java.lang.String r12 = \"text\"\n r0 = r17\n boolean r12 = r0.containsKey(r12)\n if (r12 == 0) goto L_0x0061\n r4 = 1\n java.lang.String r12 = \"text\"\n r0 = r17\n java.lang.Object r12 = r0.get(r12)\n java.lang.String r7 = org.appcelerator.titanium.util.TiConvert.toString(r12)\n L_0x0061:\n if (r7 != 0) goto L_0x007a\n java.lang.String r12 = \"title\"\n r0 = r17\n boolean r12 = r0.containsKey(r12)\n if (r12 == 0) goto L_0x007a\n r4 = 1\n java.lang.String r12 = \"title\"\n r0 = r17\n java.lang.Object r12 = r0.get(r12)\n java.lang.String r7 = org.appcelerator.titanium.util.TiConvert.toString(r12)\n L_0x007a:\n if (r4 == 0) goto L_0x008e\n if (r7 != 0) goto L_0x0080\n java.lang.String r7 = \"\"\n L_0x0080:\n r0 = r16\n java.lang.CharSequence r12 = r0.originalText\n boolean r12 = r7.equals(r12)\n if (r12 != 0) goto L_0x008e\n r0 = r16\n r0.originalText = r7\n L_0x008e:\n java.lang.String r12 = \"includeFontPadding\"\n r0 = r17\n boolean r12 = r0.containsKey(r12)\n if (r12 == 0) goto L_0x00a4\n java.lang.String r12 = \"includeFontPadding\"\n r13 = 1\n r0 = r17\n boolean r12 = org.appcelerator.titanium.util.TiConvert.toBoolean(r0, r12, r13)\n r9.setIncludeFontPadding(r12)\n L_0x00a4:\n java.lang.String r12 = \"minimumFontSize\"\n r0 = r17\n boolean r12 = r0.containsKey(r12)\n if (r12 == 0) goto L_0x00bb\n java.lang.String r12 = \"minimumFontSize\"\n r0 = r17\n java.lang.String r12 = org.appcelerator.titanium.util.TiConvert.toString(r0, r12)\n r0 = r16\n r0.setMinimumFontSize(r12)\n L_0x00bb:\n java.lang.String r12 = \"lines\"\n r0 = r17\n boolean r12 = r0.containsKey(r12)\n if (r12 == 0) goto L_0x00d6\n java.lang.String r12 = \"lines\"\n r0 = r17\n java.lang.Object r12 = r0.get(r12)\n r13 = 0\n int r12 = org.appcelerator.titanium.util.TiConvert.toInt(r12, r13)\n r0 = r16\n r0.viewHeightInLines = r12\n L_0x00d6:\n java.lang.String r12 = \"wordWrap\"\n r0 = r17\n boolean r12 = r0.containsKey(r12)\n if (r12 == 0) goto L_0x00ed\n java.lang.String r12 = \"wordWrap\"\n r13 = 1\n r0 = r17\n boolean r12 = org.appcelerator.titanium.util.TiConvert.toBoolean(r0, r12, r13)\n r0 = r16\n r0.wordWrap = r12\n L_0x00ed:\n java.lang.String r12 = \"maxLines\"\n r0 = r17\n boolean r12 = r0.containsKey(r12)\n if (r12 == 0) goto L_0x0110\n java.lang.String r12 = \"maxLines\"\n r0 = r17\n java.lang.Object r12 = r0.get(r12)\n r13 = 2147483647(0x7fffffff, float:NaN)\n int r10 = org.appcelerator.titanium.util.TiConvert.toInt(r12, r13)\n r12 = 1\n if (r10 >= r12) goto L_0x010c\n r10 = 2147483647(0x7fffffff, float:NaN)\n L_0x010c:\n r0 = r16\n r0.maxLines = r10\n L_0x0110:\n java.lang.String r12 = \"lineSpacing\"\n r0 = r17\n boolean r12 = r0.containsKey(r12)\n if (r12 == 0) goto L_0x0142\n java.lang.String r12 = \"lineSpacing\"\n r0 = r17\n java.lang.Object r10 = r0.get(r12)\n boolean r12 = r10 instanceof java.util.HashMap\n if (r12 == 0) goto L_0x0142\n r3 = r10\n java.util.HashMap r3 = (java.util.HashMap) r3\n java.lang.String r12 = \"add\"\n java.lang.Object r12 = r3.get(r12)\n r13 = 0\n float r12 = org.appcelerator.titanium.util.TiConvert.toFloat(r12, r13)\n java.lang.String r13 = \"multiply\"\n java.lang.Object r13 = r3.get(r13)\n r14 = 0\n float r13 = org.appcelerator.titanium.util.TiConvert.toFloat(r13, r14)\n r9.setLineSpacing(r12, r13)\n L_0x0142:\n java.lang.String r12 = \"color\"\n r0 = r17\n boolean r12 = r0.containsKey(r12)\n if (r12 == 0) goto L_0x015d\n java.lang.String r12 = \"color\"\n r0 = r17\n java.lang.Object r2 = r0.get(r12)\n if (r2 != 0) goto L_0x0283\n r0 = r16\n int r12 = r0.defaultColor\n r9.setTextColor(r12)\n L_0x015d:\n java.lang.String r12 = \"highlightedColor\"\n r0 = r17\n boolean r12 = r0.containsKey(r12)\n if (r12 == 0) goto L_0x0172\n java.lang.String r12 = \"highlightedColor\"\n r0 = r17\n int r12 = org.appcelerator.titanium.util.TiConvert.toColor(r0, r12)\n r9.setHighlightColor(r12)\n L_0x0172:\n java.lang.String r12 = \"font\"\n r0 = r17\n boolean r12 = r0.containsKey(r12)\n if (r12 == 0) goto L_0x018f\n java.lang.String r12 = \"font\"\n r0 = r17\n org.appcelerator.kroll.KrollDict r12 = r0.getKrollDict(r12)\n org.appcelerator.titanium.util.TiUIHelper.styleText(r9, r12)\n float r12 = r9.getTextSize()\n r0 = r16\n r0.unscaledFontSizeInPixels = r12\n L_0x018f:\n java.lang.String r12 = \"textAlign\"\n r0 = r17\n boolean r12 = r0.containsKey(r12)\n if (r12 != 0) goto L_0x01a3\n java.lang.String r12 = \"verticalAlign\"\n r0 = r17\n boolean r12 = r0.containsKey(r12)\n if (r12 == 0) goto L_0x01ba\n L_0x01a3:\n java.lang.String r12 = \"textAlign\"\n java.lang.String r13 = \"left\"\n r0 = r17\n java.lang.String r8 = r0.optString(r12, r13)\n java.lang.String r12 = \"verticalAlign\"\n java.lang.String r13 = \"middle\"\n r0 = r17\n java.lang.String r11 = r0.optString(r12, r13)\n org.appcelerator.titanium.util.TiUIHelper.setAlignment(r9, r8, r11)\n L_0x01ba:\n java.lang.String r12 = \"ellipsize\"\n r0 = r17\n boolean r12 = r0.containsKey(r12)\n if (r12 == 0) goto L_0x01de\n java.lang.String r12 = \"ellipsize\"\n r0 = r17\n java.lang.Object r10 = r0.get(r12)\n boolean r12 = r10 instanceof java.lang.Boolean\n if (r12 == 0) goto L_0x0293\n java.lang.Boolean r10 = (java.lang.Boolean) r10\n boolean r12 = r10.booleanValue()\n if (r12 == 0) goto L_0x0290\n android.text.TextUtils$TruncateAt r12 = android.text.TextUtils.TruncateAt.END\n L_0x01da:\n r0 = r16\n r0.ellipsize = r12\n L_0x01de:\n java.lang.String r12 = \"autoLink\"\n r0 = r17\n boolean r12 = r0.containsKey(r12)\n if (r12 == 0) goto L_0x01fb\n java.lang.String r12 = \"autoLink\"\n r0 = r17\n java.lang.Object r12 = r0.get(r12)\n r13 = 0\n int r12 = org.appcelerator.titanium.util.TiConvert.toInt(r12, r13)\n r12 = r12 & 15\n r0 = r16\n r0.autoLinkFlags = r12\n L_0x01fb:\n java.lang.String r12 = \"shadowOffset\"\n r0 = r17\n boolean r12 = r0.containsKey(r12)\n if (r12 == 0) goto L_0x0233\n java.lang.String r12 = \"shadowOffset\"\n r0 = r17\n java.lang.Object r10 = r0.get(r12)\n boolean r12 = r10 instanceof java.util.HashMap\n if (r12 == 0) goto L_0x0233\n r6 = 1\n r3 = r10\n java.util.HashMap r3 = (java.util.HashMap) r3\n java.lang.String r12 = \"x\"\n java.lang.Object r12 = r3.get(r12)\n r13 = 0\n float r12 = org.appcelerator.titanium.util.TiConvert.toFloat(r12, r13)\n r0 = r16\n r0.shadowX = r12\n java.lang.String r12 = \"y\"\n java.lang.Object r12 = r3.get(r12)\n r13 = 0\n float r12 = org.appcelerator.titanium.util.TiConvert.toFloat(r12, r13)\n r0 = r16\n r0.shadowY = r12\n L_0x0233:\n java.lang.String r12 = \"shadowRadius\"\n r0 = r17\n boolean r12 = r0.containsKey(r12)\n if (r12 == 0) goto L_0x0250\n r6 = 1\n java.lang.String r12 = \"shadowRadius\"\n r0 = r17\n java.lang.Object r12 = r0.get(r12)\n r13 = 1065353216(0x3f800000, float:1.0)\n float r12 = org.appcelerator.titanium.util.TiConvert.toFloat(r12, r13)\n r0 = r16\n r0.shadowRadius = r12\n L_0x0250:\n java.lang.String r12 = \"shadowColor\"\n r0 = r17\n boolean r12 = r0.containsKey(r12)\n if (r12 == 0) goto L_0x0267\n r6 = 1\n java.lang.String r12 = \"shadowColor\"\n r0 = r17\n int r12 = org.appcelerator.titanium.util.TiConvert.toColor(r0, r12)\n r0 = r16\n r0.shadowColor = r12\n L_0x0267:\n if (r6 == 0) goto L_0x027c\n r0 = r16\n float r12 = r0.shadowRadius\n r0 = r16\n float r13 = r0.shadowX\n r0 = r16\n float r14 = r0.shadowY\n r0 = r16\n int r15 = r0.shadowColor\n r9.setShadowLayer(r12, r13, r14, r15)\n L_0x027c:\n r16.updateLabelText()\n r9.invalidate()\n return\n L_0x0283:\n java.lang.String r12 = \"color\"\n r0 = r17\n int r12 = org.appcelerator.titanium.util.TiConvert.toColor(r0, r12)\n r9.setTextColor(r12)\n goto L_0x015d\n L_0x0290:\n r12 = 0\n goto L_0x01da\n L_0x0293:\n boolean r12 = r10 instanceof java.lang.Integer\n if (r12 == 0) goto L_0x01de\n java.lang.Integer r10 = (java.lang.Integer) r10\n int r12 = r10.intValue()\n switch(r12) {\n case 0: goto L_0x02a7;\n case 1: goto L_0x02af;\n case 2: goto L_0x02b7;\n case 3: goto L_0x02bf;\n default: goto L_0x02a0;\n }\n L_0x02a0:\n r12 = 0\n r0 = r16\n r0.ellipsize = r12\n goto L_0x01de\n L_0x02a7:\n android.text.TextUtils$TruncateAt r12 = android.text.TextUtils.TruncateAt.START\n r0 = r16\n r0.ellipsize = r12\n goto L_0x01de\n L_0x02af:\n android.text.TextUtils$TruncateAt r12 = android.text.TextUtils.TruncateAt.MIDDLE\n r0 = r16\n r0.ellipsize = r12\n goto L_0x01de\n L_0x02b7:\n android.text.TextUtils$TruncateAt r12 = android.text.TextUtils.TruncateAt.END\n r0 = r16\n r0.ellipsize = r12\n goto L_0x01de\n L_0x02bf:\n android.text.TextUtils$TruncateAt r12 = android.text.TextUtils.TruncateAt.MARQUEE\n r0 = r16\n r0.ellipsize = r12\n goto L_0x01de\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p006ti.modules.titanium.p007ui.widget.TiUILabel.processProperties(org.appcelerator.kroll.KrollDict):void\");\n }",
"public void showAttributes() {\r\n\t\tSystem.out.println(\"Name : \"+getName());\r\n\t\tSystem.out.println(\"ID : \"+getId());\r\n\t\tSystem.out.println(\"Percentage : \"+getPercentage());\r\n\t\tSystem.out.println(\"Skills : \");\r\n\t\tfor(String skill:getSkills()) {\r\n\t\t\tSystem.out.print(skill+\" \");\r\n\t\t}\r\n\t\t\r\n\t}",
"@SuppressLint({\"NewApi\"})\n /* renamed from: a */\n public void mo7202a(AttributeSet attrs, int defStyleAttr) {\n AttributeSet attributeSet = attrs;\n int i = defStyleAttr;\n Context context = this.f2970a.getContext();\n C1096p drawableManager = C1096p.m5420a();\n C1112sb a = C1112sb.m5456a(context, attributeSet, C0793R.styleable.AppCompatTextHelper, i, 0);\n int ap = a.mo8659g(C0793R.styleable.AppCompatTextHelper_android_textAppearance, -1);\n if (a.mo8660g(C0793R.styleable.AppCompatTextHelper_android_drawableLeft)) {\n this.f2971b = m4445a(context, drawableManager, a.mo8659g(C0793R.styleable.AppCompatTextHelper_android_drawableLeft, 0));\n }\n if (a.mo8660g(C0793R.styleable.AppCompatTextHelper_android_drawableTop)) {\n this.f2972c = m4445a(context, drawableManager, a.mo8659g(C0793R.styleable.AppCompatTextHelper_android_drawableTop, 0));\n }\n if (a.mo8660g(C0793R.styleable.AppCompatTextHelper_android_drawableRight)) {\n this.f2973d = m4445a(context, drawableManager, a.mo8659g(C0793R.styleable.AppCompatTextHelper_android_drawableRight, 0));\n }\n if (a.mo8660g(C0793R.styleable.AppCompatTextHelper_android_drawableBottom)) {\n this.f2974e = m4445a(context, drawableManager, a.mo8659g(C0793R.styleable.AppCompatTextHelper_android_drawableBottom, 0));\n }\n a.mo8647a();\n boolean hasPwdTm = this.f2970a.getTransformationMethod() instanceof PasswordTransformationMethod;\n boolean allCaps = false;\n boolean allCapsSet = false;\n ColorStateList textColor = null;\n ColorStateList textColorHint = null;\n ColorStateList textColorLink = null;\n if (ap != -1) {\n C1112sb a2 = C1112sb.m5454a(context, ap, C0793R.styleable.TextAppearance);\n if (!hasPwdTm && a2.mo8660g(C0793R.styleable.TextAppearance_textAllCaps)) {\n allCaps = a2.mo8648a(C0793R.styleable.TextAppearance_textAllCaps, false);\n allCapsSet = true;\n }\n m4446a(context, a2);\n if (VERSION.SDK_INT < 23) {\n if (a2.mo8660g(C0793R.styleable.TextAppearance_android_textColor)) {\n textColor = a2.mo8645a(C0793R.styleable.TextAppearance_android_textColor);\n }\n if (a2.mo8660g(C0793R.styleable.TextAppearance_android_textColorHint)) {\n textColorHint = a2.mo8645a(C0793R.styleable.TextAppearance_android_textColorHint);\n }\n if (a2.mo8660g(C0793R.styleable.TextAppearance_android_textColorLink)) {\n textColorLink = a2.mo8645a(C0793R.styleable.TextAppearance_android_textColorLink);\n }\n }\n a2.mo8647a();\n }\n C1112sb a3 = C1112sb.m5456a(context, attributeSet, C0793R.styleable.TextAppearance, i, 0);\n if (!hasPwdTm && a3.mo8660g(C0793R.styleable.TextAppearance_textAllCaps)) {\n allCapsSet = true;\n allCaps = a3.mo8648a(C0793R.styleable.TextAppearance_textAllCaps, false);\n }\n if (VERSION.SDK_INT < 23) {\n if (a3.mo8660g(C0793R.styleable.TextAppearance_android_textColor)) {\n textColor = a3.mo8645a(C0793R.styleable.TextAppearance_android_textColor);\n }\n if (a3.mo8660g(C0793R.styleable.TextAppearance_android_textColorHint)) {\n textColorHint = a3.mo8645a(C0793R.styleable.TextAppearance_android_textColorHint);\n }\n if (a3.mo8660g(C0793R.styleable.TextAppearance_android_textColorLink)) {\n textColorLink = a3.mo8645a(C0793R.styleable.TextAppearance_android_textColorLink);\n }\n }\n m4446a(context, a3);\n a3.mo8647a();\n if (textColor != null) {\n this.f2970a.setTextColor(textColor);\n }\n if (textColorHint != null) {\n this.f2970a.setHintTextColor(textColorHint);\n }\n if (textColorLink != null) {\n this.f2970a.setLinkTextColor(textColorLink);\n }\n if (!hasPwdTm && allCapsSet) {\n mo7203a(allCaps);\n }\n Typeface typeface = this.f2977h;\n if (typeface != null) {\n this.f2970a.setTypeface(typeface, this.f2976g);\n }\n this.f2975f.mo7329a(attributeSet, i);\n if (!C0687b.f2011a) {\n } else if (this.f2975f.mo7335f() != 0) {\n int[] autoSizeTextSizesInPx = this.f2975f.mo7334e();\n if (autoSizeTextSizesInPx.length <= 0) {\n } else if (((float) this.f2970a.getAutoSizeStepGranularity()) != -1.0f) {\n Context context2 = context;\n this.f2970a.setAutoSizeTextTypeUniformWithConfiguration(this.f2975f.mo7332c(), this.f2975f.mo7331b(), this.f2975f.mo7333d(), 0);\n } else {\n this.f2970a.setAutoSizeTextTypeUniformWithPresetSizes(autoSizeTextSizesInPx, 0);\n }\n }\n }",
"@Override\n public String getAttributesToString() {\n StringBuilder attributes = new StringBuilder();\n attributes.append(\"1 - Nominal Power: \" + nominalPower + \"\\n\");\n attributes.append(\"2 - Number of Bottles: \" + numberOfBottles + \"\\n\");\n attributes.append(\"3 - Annual Energy Consumption: \" + annualEnergyConsumption + \"\\n\");\n\n return attributes.toString();\n }",
"public String getInfoText();",
"public String toString() {\n String name = null;\n if (font != null)\n name = font.getName();\n return super.getPObjectReference() + \" FONTDESCRIPTOR= \" + entries.toString() + \" - \" + name;\n }",
"String getShapeLabel();",
"public View getGraphic(AppFile anItem) { return anItem.getGraphic(); }",
"void draw(Annotation annotation, GC gc, StyledText textWidget, int offset, int length, Color color);",
"protected abstract void setGUIAttributesHelper();",
"public String getAttributes() {\n return attributes;\n }",
"public String getAttributes() {\n return attributes;\n }",
"TextView getIconTipsView();",
"@Override\n\tprotected TextAttribute createTextAttribute(String[] stylePrefs) {\n\t\tint fontModifier = SWT.NORMAL;\n\t\tif (Boolean.valueOf(stylePrefs[2]).booleanValue()) { // bold\n\t\t\tfontModifier |= SWT.BOLD;\n\t\t}\n\t\tif (Boolean.valueOf(stylePrefs[3]).booleanValue()) { // italic\n\t\t\tfontModifier |= SWT.ITALIC;\n\t\t}\n\t\tif (Boolean.valueOf(stylePrefs[4]).booleanValue()) { // strikethrough\n\t\t\tfontModifier |= TextAttribute.STRIKETHROUGH;\n\t\t}\n\t\tif (Boolean.valueOf(stylePrefs[5]).booleanValue()) { // underline\n\t\t\tfontModifier |= TextAttribute.UNDERLINE;\n\t\t}\n\t\treturn new TextAttribute(EditorUtility.getColor(ColorHelper.toRGB(stylePrefs[0])),\n\t\t\t\tEditorUtility.getColor(ColorHelper.toRGB(stylePrefs[1])), fontModifier);\n\t}",
"public FontStyle getStyle();",
"public interface Attributable extends Serializable {\n\n Map<String, Object> getAttrs();\n\n default void setAttrs(Map<String, Object> attrs) {\n if (attrs != null && attrs.size() > 0) {\n getAttrs().putAll(attrs);\n }\n }\n\n default <V> V getOrDefault(String key, V defaultValue) {\n V v = defaultValue;\n if (containsKey(key)) {\n v = getAttr(key);\n }\n return v;\n }\n\n @SuppressWarnings(\"unchecked\")\n default <V> V getAttr(String key) {\n return (V) getAttrs().get(key);\n }\n\n\n default void setAttr(String key, Object value) {\n getAttrs().put(key, value);\n }\n\n default void remove(String key) {\n getAttrs().remove(key);\n }\n\n default boolean containsKey(String key) {\n return getAttrs().containsKey(key);\n }\n\n default boolean containsValue(Object value) {\n return getAttrs().containsValue(value);\n }\n}",
"@Override\n\t\t\t\t\tpublic Drawable getDrawable() {\n\t\t\t\t\t\treturn getWeightDrawable(id,width,height);\n\t\t\t\t\t}",
"private void m10388a(Context context, AttributeSet attributeSet) {\n inflate(context, C1373R.layout.layout_slope_bottom_item, this);\n TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, R$styleable.SlopeBottomItemView);\n this.f9064a = obtainStyledAttributes.getString(0);\n this.f9065b = obtainStyledAttributes.getColor(1, -16711936);\n this.f9066c = findViewById(C1373R.id.view_slope_bottom_item_color);\n this.f9067d = (TextView) findViewById(C1373R.id.textView_slope_bottom_item_desc);\n this.f9068e = (TextView) findViewById(C1373R.id.textView_slope_bottom_item_percent);\n this.f9069f = (TextView) findViewById(C1373R.id.textView_slope_bottom_item_average_speed);\n ((GradientDrawable) this.f9066c.getBackground()).setColor(this.f9065b);\n this.f9067d.setText(this.f9064a == null ? \"\" : this.f9064a);\n }",
"public ArrayList<AttributDescribe> getAttributs(){\r\n \treturn this.attributs;\r\n }",
"public String printAttributes() {\n checkNotUnknown();\n StringBuilder b = new StringBuilder();\n if (hasDontDelete()) {\n b.append(\"(DontDelete\");\n if (isMaybeDontDelete())\n b.append(\"+\");\n if (isMaybeNotDontDelete())\n b.append(\"-\");\n b.append(\")\");\n }\n if (hasDontEnum()) {\n b.append(\"(DontEnum\");\n if (isMaybeDontEnum())\n b.append(\"+\");\n if (isMaybeNotDontEnum())\n b.append(\"-\");\n b.append(\")\");\n }\n if (hasReadOnly()) {\n b.append(\"(ReadOnly\");\n if (isMaybeReadOnly())\n b.append(\"+\");\n if (isMaybeNotReadOnly())\n b.append(\"-\");\n b.append(\")\");\n }\n return b.toString();\n }",
"public abstract String getFeeling();",
"@Override\n\tpublic String shape() {\n\t\treturn \"Text\";\n\t}",
"public String getItalics() {\n return italics.getText(); /*FAULT:: return \"y\"; */\n }",
"RakudoObject get_attribute_with_hint(ThreadContext tc, RakudoObject object, RakudoObject classHandle, String name, int hint);"
] |
[
"0.6814909",
"0.6717008",
"0.65715474",
"0.6234773",
"0.62190247",
"0.621802",
"0.6184882",
"0.6178568",
"0.616927",
"0.616927",
"0.616927",
"0.60615754",
"0.6046943",
"0.60443306",
"0.60443306",
"0.59639764",
"0.59115875",
"0.5891681",
"0.58390605",
"0.5822769",
"0.5809287",
"0.5794706",
"0.57876587",
"0.57521623",
"0.5735927",
"0.5717501",
"0.5707346",
"0.5686837",
"0.5663879",
"0.56604326",
"0.56583744",
"0.5646308",
"0.56356686",
"0.5633716",
"0.5628553",
"0.56247795",
"0.55930537",
"0.5575813",
"0.55557317",
"0.55428547",
"0.5534331",
"0.54968035",
"0.54767036",
"0.5467481",
"0.5467391",
"0.54498076",
"0.5444305",
"0.5434337",
"0.54336226",
"0.5431902",
"0.54274535",
"0.5421286",
"0.54202557",
"0.54201263",
"0.54170424",
"0.54156375",
"0.5410416",
"0.5402173",
"0.5400749",
"0.53833836",
"0.53740865",
"0.5372486",
"0.53713685",
"0.53659815",
"0.5364856",
"0.5347149",
"0.534659",
"0.5341422",
"0.5340731",
"0.5328889",
"0.53225434",
"0.53132045",
"0.53118277",
"0.5309723",
"0.53048986",
"0.5294672",
"0.52892905",
"0.52884024",
"0.52838117",
"0.52814263",
"0.52802646",
"0.5277147",
"0.52677536",
"0.52674216",
"0.52659947",
"0.5255471",
"0.5253838",
"0.5253838",
"0.5250191",
"0.5249895",
"0.5246775",
"0.52377194",
"0.52364796",
"0.5236277",
"0.5227155",
"0.5223714",
"0.52104545",
"0.52101463",
"0.5207832",
"0.5207778"
] |
0.5326672
|
70
|
Gets the text to draw
|
public String[] getString();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void draw_text() {\n\t\tcopy_text_into_buffer();\n\t\tVoteVisApp.instance().image(text_buffer_, frame_height_ / 2,\n\t\t\t-text_graphics_.height / 2);\n\t}",
"public Drawable getTextDrawable() {\n if (this.textDrawable != null) {\n if (this.textDrawable.isLive())\n return null;\n //textDrawable.resetTimeLimit();\n //return textDrawable;\n }\n\n if (this.isConnectedToGame) {\n this.textDrawable = new TextDrawable(this.fullPlayerName, getDrawable(), this.wotCharacter.getColor(), 13.0f, \"Lucida Blackletter\", ImageLibRef.TEXT_PRIORITY, 5000);\n } else {\n this.textDrawable = new TextDrawable(this.fullPlayerName + \" (away)\", getDrawable(), this.wotCharacter.getColor(), 13.0f, \"Lucida Blackletter\", ImageLibRef.TEXT_PRIORITY, 5000);\n }\n return this.textDrawable;\n }",
"protected Text getText() {\n \t\treturn text;\n \t}",
"protected Text getText()\r\n\t{\r\n\t\treturn text;\r\n\t}",
"public CanvasFont getFont() {\n return this.textFont;\n }",
"public CharSequence obtainTextToMeasure() {\n return this.textView.getText();\n }",
"public String getText() {\n return text.getText();\n }",
"public P getText() {\n return this.slp.getProduction(text);\n }",
"public String getText() {\n StringBuffer textBuffer = new StringBuffer();\n Object obj;\n int segment;\n for (segment = 0; segment < this.TOTALSEGMENTS; segment++) {\n obj = null;\n Method getter = this.getTextGetter(segment);\n try {\n obj = getter.invoke(this, new Object[] {});\n } catch (IllegalAccessException e) {\n throw new RuntimeException(\"That segment doesn't exist.\");\n } catch (InvocationTargetException e) { \n throw new RuntimeException(\"Unable to invoke that method..\");\n }\n \n if (obj != null ) {\n String stringToAppend = (String) obj;\n textBuffer.append (stringToAppend);\n // logger.debug (\"Appending a string of length \" + stringToAppend.length());\n }\n }\n // logger.debug(\"getText returned \" + textBuffer.length() + \"chars.\" );\n return textBuffer.toString();\n }",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"private void drawText(Graphics2D g2, String text, String fontName) {\n\n int fontSize = Math.round(getHeight() * factor);\n\n Font baseFont = new Font(fontName, Font.PLAIN, fontSize);\n Font font = baseFont.deriveFont(attr);\n\n GlyphVector gv = font.createGlyphVector(frc, text);\n Rectangle pixelBounds = gv.getPixelBounds(frc, 0, 0);\n\n int centerX = getWidth() / 2;\n int centerY = getHeight() / 2;\n\n float offsetX = pixelBounds.x + (pixelBounds.width / 2);\n float offsetY = pixelBounds.y + (pixelBounds.height / 2);\n\n AffineTransform at = new AffineTransform();\n at.translate(centerX - offsetX, centerY - offsetY);\n Shape outline = gv.getOutline();\n outline = at.createTransformedShape(outline);\n g2.fill(outline);\n }",
"@Override\r\n\t\t\tpublic String getText() {\n\t\t\t\treturn text;\r\n\t\t\t}",
"String getToText();",
"public String getText() {\n if (!this.a_text.isEnabled())\n return null;\n\n return this.a_text.getText();\n }",
"public abstract double drawString(AEColor clr, double font_size, String str, double mid_x, double mid_y);",
"public String getText() {\n\t\t\treturn text.get();\n\t\t}",
"Text createText();",
"public Text getText() {\n return this.melding;\n }",
"String getText();",
"String getText();",
"String getText();",
"String getText();",
"String getText();",
"String getText();",
"String getText();",
"public String getText() {\n if (text == null) {\n return \"NO TEXT IN MEMORY.\";\n }\n return text.getTextPart();\n }",
"public String getTextAsString () {\n\t\tString val = null;\n\t\tif(text!=null) {\n\t\t\tText t = text.getText();\n\t\t\tTextLine[] lines = t.getLines();\n\t\t\t\n\t\t\tif(lines.length >0) {\n\t\t\t\tint endline = lines.length - 1;\n\t\t\t\tTextLine lastline = lines[endline];\n\t\t\t\tif(lastline!= null) {\n\t\t\t\t\tint endOffset = lastline.getLength();\n\t\t\t\t\tTextRange tr = new TextRange(new TextLocation(0,0), new TextLocation(endline,endOffset));\n\t\t\t\t\tval = t.getText(tr);\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t\treturn val;\n\t}",
"@Override\n public String getTextBaseline() {\n return graphicsEnvironmentImpl.getTextBaseline(canvas);\n }",
"public java.lang.String getText() {\n \t\treturn text;\n \t}",
"String getDisplayText();",
"@Override\n public String getFont() {\n return graphicsEnvironmentImpl.getFont(canvas);\n }",
"String getTransformedText();",
"public String getText()\n\t{\n\t\treturn text;\n\t}",
"public String getText()\n\t{\n\t\treturn text;\n\t}",
"public String getText()\n\t{\n\t\treturn text;\n\t}",
"public String toString(){\n return (\"TextShape \"+x+\" \"+y+\" \"+col.getRed()+\" \"+col.getGreen()+\" \"+col.getBlue()+\" \"+str);\n }",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn text.toString();\r\n\t}",
"public String getText(){\r\n\t\treturn text;\r\n\t}",
"private float drawText(Graphics2D g2d) {\n float yOffset = 0; // 1\" top margin\r\n for (TextLayout tl : textLayouts) {\r\n yOffset += tl.getAscent();\r\n tl.draw(g2d, 0, yOffset);\r\n yOffset += tl.getDescent();\r\n yOffset += tl.getLeading();\r\n }\r\n return yOffset;\r\n }",
"protected Shape getTextShape(Graphics2D g2) {\n String txt = value > 999 ? \"1K\" : Objects.toString(value);\n AffineTransform at = txt.length() < 3 ? null : AffineTransform.getScaleInstance(.66, 1d);\n return new TextLayout(txt, g2.getFont(), g2.getFontRenderContext()).getOutline(at);\n }",
"public void displayText() {\n\n // Draws the border on the slideshow aswell as the text\n image(border, slideshowPosX - borderDisplace, textPosY - textMargin - borderDisplace);\n\n // color of text background\n fill(textBackground);\n\n //background for text\n rect(textPosX - textMargin, textPosY - textMargin, textSizeWidth + textMargin * 2, textSizeHeight + textMargin * 2);\n\n //draw text\n image(texts[scene], textPosX, textPosY, textSizeWidth, textSizeHeight, 0, 0 + scrolled, texts[scene].width, textSizeHeight + scrolled);\n }",
"private void drawXYZText() {\n\t\t//Draw text X - red\n\t\tgl.glColor3f(1.0f, 0.0f, 0.0f);\n\t\tgl.glRasterPos3f(1,0,0);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"X\");\n\t\tgl.glEnd();\n\t\t//Draw text -X - red\n\t\tgl.glColor3f(1.0f, 0.0f, 0.0f);\n\t\tgl.glRasterPos3f(-1,0,0);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"-X\");\n\t\tgl.glEnd();\n\t\t\n\t\t//Draw text Y - Green\n\t\tgl.glColor3f(0.0f, 1.0f, 0.0f);\n\t\tgl.glRasterPos3f(0,1,0);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"Y\");\n\t\tgl.glEnd();\n\t\t//Draw text -Y - Green\n\t\tgl.glColor3f(0.0f, 1.0f, 0.0f);\n\t\tgl.glRasterPos3f(0,-1,0);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"-Y\");\n\t\tgl.glEnd();\n\t\t\n\t\t//Draw text Z - Blue\n\t\tgl.glColor3f(0.0f, 0.0f, 1.0f);\n\t\tgl.glRasterPos3f(0,0,1);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"Z\");\n\t\tgl.glEnd();\n\t\t//Draw text -Z - Blue\n\t\tgl.glColor3f(0.0f, 0.0f, 1.0f);\n\t\tgl.glRasterPos3f(0,0,-1);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"-Z\");\n\t\tgl.glEnd();\n\t}",
"public String draw() {\n\t\treturn null;\r\n\t}",
"void draw_text(int x, int y, char[][] _display, String txt) {\n for (int i = 0; i < txt.length(); i++)\n {\n draw_char(x + i, y, _display, txt.charAt(i));\n }\n }",
"public String getText();",
"public String getText();",
"public String getText();",
"public String getText();",
"public String getText() {\n return mTextContainer.getText();\n }",
"public void strokeString(float x, float y, String text);",
"public final String getText() {\n\t\treturn text;\n\t}",
"public String getText() {\r\n return text;\r\n }",
"public String getText()\n {\n return (this.text);\n }",
"public void renderText(float x ,float y ){\n ttf.drawString(x, y, text);\n }",
"public CharSequence getText();",
"public String getText() {\r\n return text;\r\n }",
"public String getText() {\r\n return text;\r\n }",
"public final String getText() {\n return text;\n }",
"public void drawCenteredText(String text, int x, int y);",
"protected String getTextWithKeyStroke(String text) {\r\n if (this.keyStrokeText == null) {\r\n return text;\r\n } else {\r\n return text + \" (\" + this.keyStrokeText + \")\";\r\n }\r\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\r\n\t\treturn text;\r\n\t}",
"public String getText() {\r\n\t\treturn text;\r\n\t}",
"public String getLabelText();",
"public String text() { return text; }",
"public String getTextOnPage()\n {\n return mainText.getText();\n }",
"public GLGraphics drawText(String text, float x, float y, float w, float h) {\n\t\treturn drawText(text, x, y, w, h, VAlign.LEFT);\n\t}",
"public void draw(SpriteBatch batch, String text, float x, float y, GameContainer c, StyledText style);",
"public java.lang.String getText() {\n return text_;\n }",
"public String getText() {\n\t\treturn text;\n\t}",
"public String getText() {\n\t\treturn text;\n\t}",
"public String getText() {\n\t\treturn text;\n\t}",
"public String getText() {\n\t\treturn text;\n\t}",
"public String getText() {\n\t\treturn text;\n\t}",
"public String getText() {\n\t\treturn text;\n\t}",
"private void drawText(Graphics2D g2)\n\t{\n\t\tfinal int PADDING = 5;\n\t\tfinal Rectangle bounds = getBounds();\n\t\tfinal String[] texts = getText().split(\"\\\\ \");\n\n\t\tfinal Font effectiveFont = font.deriveFont(font.getSize() * parent.getZoom());\n\n\t\tfinal FontMetrics metrics = g2.getFontMetrics(effectiveFont);\n\n\t\tfinal int hgt = metrics.getHeight();\n\t\tint adv, offsetY = bounds.y + PADDING + hgt, offsetX = PADDING;\n\t\tg2.setFont(effectiveFont);\n\n\t\tfor (final String text2 : texts)\n\t\t{\n\t\t\tfinal String currentText = text2 + \" \";\n\t\t\tadv = metrics.stringWidth(currentText);\n\n\t\t\tif (offsetX + adv > bounds.width - PADDING * 2)\n\t\t\t{\n\t\t\t\toffsetY += hgt; // new line\n\t\t\t\toffsetX = PADDING;\n\t\t\t}\n\n\t\t\tg2.drawString(currentText, bounds.x + offsetX, offsetY);\n\t\t\toffsetX += adv;\n\t\t}\n\t}",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"private float drawText ( \r\n\t String text,\r\n\t Graphics2D g2\r\n\t )\r\n\t{\n\t\tif ( ( text == null ) || text.equals ( \"\" ) )\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tif ( horizontalLocationOfRelation <= 0 )\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tTextLayout tl = new TextLayout( text, SYMBOL_FONT, FONT_RENDER_CTXT );\r\n\t\tRectangle2D.Float bound = ( Rectangle2D.Float ) tl.getBounds ( );\r\n\r\n\t\t//Util.info(\"bound = \" + bound);\r\n\t\tfloat xAdjustment = bound.width / 2.0f;\r\n\r\n\t\t//int yAdjustment = ( int ) ( bound.height / 2.0f );\r\n\t\ttl.draw ( \r\n\t\t g2,\r\n\t\t horizontalLocationOfRelation + xAdjustment,\r\n\t\t vertLocationOfLine - WORM_LINE_THICKNESS - 1 - SYMBOL_LINE_LENGTH\r\n\t\t );\r\n\r\n\t\t//tl.draw(g2, 100.0f, 100.0f);\r\n\t\t//return bound.height;\r\n\t\ttl = new TextLayout( text, NUMBER_FONT, FONT_RENDER_CTXT );\r\n\t\tbound = ( Rectangle2D.Float ) tl.getBounds ( );\r\n\r\n\t\t//Util.info(\"bound = \" + bound);\r\n\t\treturn bound.width;\r\n\t}"
] |
[
"0.72571266",
"0.69866306",
"0.67877746",
"0.6777457",
"0.67747664",
"0.66635543",
"0.6637481",
"0.6615606",
"0.660096",
"0.65685415",
"0.65685415",
"0.65685415",
"0.65685415",
"0.65685415",
"0.65685415",
"0.65685415",
"0.65685415",
"0.65575767",
"0.65570027",
"0.65190834",
"0.65116835",
"0.6502346",
"0.649527",
"0.64918244",
"0.64837325",
"0.64807653",
"0.64807653",
"0.64807653",
"0.64807653",
"0.64807653",
"0.64807653",
"0.64807653",
"0.6471356",
"0.64705384",
"0.6462742",
"0.6447339",
"0.64217997",
"0.64068884",
"0.64035743",
"0.64032304",
"0.64032304",
"0.64032304",
"0.63945323",
"0.6382302",
"0.6367626",
"0.6356213",
"0.6355924",
"0.6346251",
"0.63420266",
"0.63288593",
"0.63277364",
"0.6305213",
"0.6305213",
"0.6305213",
"0.6305213",
"0.6293849",
"0.62828165",
"0.62824345",
"0.6277155",
"0.62731045",
"0.6264226",
"0.62546575",
"0.6254276",
"0.6254276",
"0.62523496",
"0.625128",
"0.62474215",
"0.62399614",
"0.62399614",
"0.62399614",
"0.62399614",
"0.62399614",
"0.62291807",
"0.62291807",
"0.622905",
"0.6225974",
"0.6225021",
"0.6224214",
"0.622335",
"0.6208838",
"0.62049276",
"0.62049276",
"0.62049276",
"0.62049276",
"0.62049276",
"0.62049276",
"0.6203325",
"0.62028605",
"0.62028605",
"0.62028605",
"0.62028605",
"0.62028605",
"0.62028605",
"0.62028605",
"0.62028605",
"0.62028605",
"0.62028605",
"0.62028605",
"0.62028605",
"0.62028605",
"0.6200592"
] |
0.0
|
-1
|
Gets the name of the font to use
|
public String getFontName();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String getName() {\n return fontName;\n }",
"public String fontName() {\n\t\treturn fontName;\n\t}",
"public String getFontName()\n {\n return font.getFontName();\n }",
"public String getFontName() {\n Object value = library.getObject(entries, FONT_NAME);\n if (value instanceof Name) {\n return ((Name) value).getName();\n }\n return FONT_NAME;\n }",
"public String getFont()\n {\n return (String) getStateHelper().eval(PropertyKeys.font, null);\n }",
"public Font getFont() {\n return GraphicsEnvironment.getLocalGraphicsEnvironment()\n .getAllFonts()[0];\n }",
"@Override\n public String getFont() {\n return graphicsEnvironmentImpl.getFont(canvas);\n }",
"public String getFontFamily() {\n Object value = library.getObject(entries, FONT_FAMILY);\n if (value instanceof StringObject) {\n StringObject familyName = (StringObject) value;\n return familyName.getDecryptedLiteralString(library.getSecurityManager());\n }\n return FONT_NAME;\n }",
"public String getFontName() {\n\t\treturn this.fontName;\n\t}",
"public String getFont() {\n return font;\n }",
"public Font GetFont(String name) { return FontList.get(name); }",
"public String getFontName() {\n return getFontName(Locale.getDefault());\n }",
"public Font getFont() {\r\n if (font==null)\r\n return getDesktop().getDefaultFont();\r\n else\r\n return font;\r\n }",
"public String getFontNameText()\r\n\t{\r\n\t\treturn fontNameTextField.getText(); // return the text in the Font Name text field\r\n\t}",
"public Font getFont(\n )\n {return font;}",
"public static Font getFont() {\n return getFont(12);\n }",
"public static String getFontName() {\n return \"Comic Sans MS\";\n }",
"public FontFinder getFontFinder() {\n return NameFont;\n }",
"public RMFont getFont()\n {\n return getStyle().getFont();\n }",
"COSName getFontName()\r\n\t{\r\n\t\tint setFontOperatorIndex = appearanceTokens.indexOf(Operator.getOperator(\"Tf\"));\r\n\t\treturn (COSName) appearanceTokens.get(setFontOperatorIndex - 2);\r\n\t}",
"abstract Font getFont();",
"public Font getFont()\r\n\t{\r\n\t\treturn _g2.getFont();\r\n\t}",
"public Font getLabelFont();",
"public String getMatchFontName();",
"public static Font getFont(String name) {\r\n\t\treturn (Font) getInstance().addResource(name);\r\n\t}",
"public String getSelectedFontName()\r\n\t{\r\n\t\treturn fontNamesList.getSelectedValue(); // return the currently selected font name\r\n\t}",
"public String getFontName(Locale l) {\n if (l == null) {\n throw new NullPointerException(\"null locale doesn't mean default\");\n }\n\treturn getFont2D().getFontName(l);\n }",
"public String getMyFont() {\n return myFont.font; /*Fault:: return \"xx\"; */\n }",
"Font createFont();",
"public native Font getFont() /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\tvar obj = jso.font;\n\t\treturn @com.emitrom.ti4j.mobile.client.ui.style.Font::new(Lcom/google/gwt/core/client/JavaScriptObject;)(obj);\n }-*/;",
"public Font getFont() {\n\t\treturn f;\n\t}",
"private Typeface getFont() {\n Typeface fontText = Typeface.createFromAsset(SnapziApplication.getContext().getAssets(), \"fonts/GothamHTF-Book.ttf\");\n return fontText;\n }",
"public Font getFont() {\r\n return font;\r\n }",
"public Font getFont() {\r\n return font;\r\n }",
"public final String getFontFamily() {\n return fontFamily;\n }",
"public abstract Font getFont();",
"public Font getFont() {\n\treturn font;\n }",
"public Font getFont() {\n\treturn font;\n }",
"public Font getFont() {\n return font;\n }",
"public FontType getFontType() {\n\t\treturn font;\n\t}",
"public Font getFont() {\n return this.font;\n }",
"public native final String fontFamily() /*-{\n\t\treturn this.fontFamily;\n\t}-*/;",
"public void setFontName(String name) {\n\t\tthis.fontName = name;\n\t}",
"public Font font() {\n return font;\n }",
"private Font getScreenFont() {\n Font scoreFont = null;\n try {\n scoreFont = Font.createFont(Font.TRUETYPE_FONT,\n getClass().getResource(\"\\\\assets\\\\font\\\\game_over.ttf\").openStream());\n } catch (FontFormatException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return scoreFont;\n }",
"public String getFont(String id)\n\t{\n\t\tString font = fontElementMap.get(id);\n\t\tif (font == null)\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn font;\n\t\t}\n\t}",
"public IsFont getFont() {\n\t\treturn getOriginalFont();\n\t}",
"public static Font getFont(String nm) {\n\treturn getFont(nm, null);\n }",
"public String getEmbeddedFontName() throws PDFNetException {\n/* 795 */ return GetEmbeddedFontName(this.a);\n/* */ }",
"public MinecraftFontRenderer getFont() {\n return fontRenderer;\n }",
"protected String createFontReference(Font font)\n {\n String fontName = font.getName();\n\n StringBuffer psFontName = new StringBuffer();\n for (int i = 0; i < fontName.length(); i++)\n {\n char c = fontName.charAt(i);\n if (!Character.isWhitespace(c))\n {\n psFontName.append(c);\n }\n }\n\n boolean hyphen = false;\n if (font.isBold())\n {\n hyphen = true;\n psFontName.append(\"-Bold\");\n }\n if (font.isItalic())\n {\n psFontName.append((hyphen ? \"\" : \"-\") + \"Italic\");\n }\n\n fontName = psFontName.toString();\n fontName = psFontNames.getProperty(fontName, fontName);\n return fontName;\n }",
"private String getFontFile(){\n\t\tif (fontFile == null){\n\t\t\tfontFile = escapeForVideoFilter(ResourcesManager.getResourcesManager().getOpenSansResource().location);\n\t\t}\n\t\treturn fontFile;\n\t}",
"public org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont getFont()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont)get_store().find_element_user(FONT$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public Font getStandardFont(DiagramContext context) {\n\t\treturn context.getResources().getSystemFont();\n\t}",
"public CanvasFont getFont() {\n return this.textFont;\n }",
"public void setFontName(String name)\n {\n font.setFontName(name);\n }",
"public static String getSelectedDefaultFontName() {\n return nativeGetSelectedDefaultFontName();\n }",
"private FontInfo getFont(FontFormat format, String postScriptName) {\n/* 461 */ if (postScriptName.contains(\"+\"))\n/* */ {\n/* 463 */ postScriptName = postScriptName.substring(postScriptName.indexOf('+') + 1);\n/* */ }\n/* */ \n/* */ \n/* 467 */ FontInfo info = this.fontInfoByName.get(postScriptName);\n/* 468 */ if (info != null && info.getFormat() == format)\n/* */ {\n/* 470 */ return info;\n/* */ }\n/* 472 */ return null;\n/* */ }",
"public static Font getDefaultFont() {\r\n return defaultFont;\r\n }",
"public String getFontFace() {\n\t\treturn _fontFace;\n\t}",
"public String getDefaultFontFamily() {\n return this.defaultFontFamily;\n }",
"FONT createFONT();",
"public RMFont getFont() { return getParent()!=null? getParent().getFont() : null; }",
"private String getFontTag()\n\t{\n\t\treturn \"<\" + getFontName() + \" \" + getFontValue() + \">\";\n\t}",
"public String getSoundFont() {\n\t\treturn soundFont;\n\t}",
"public static Font getFont(String nm, Font font) {\n\tString str = null;\n\ttry {\n\t str =System.getProperty(nm);\n\t} catch(SecurityException e) {\n\t}\n\tif (str == null) {\n\t return font;\n\t}\n\treturn decode ( str );\n }",
"public String toString() {\n String name = null;\n if (font != null)\n name = font.getName();\n return super.getPObjectReference() + \" FONTDESCRIPTOR= \" + entries.toString() + \" - \" + name;\n }",
"private String getFallbackFontName(PDFontDescriptor fontDescriptor) {\n/* */ String fontName;\n/* 235 */ if (fontDescriptor != null) {\n/* */ \n/* */ \n/* 238 */ boolean isBold = false;\n/* 239 */ String name = fontDescriptor.getFontName();\n/* 240 */ if (name != null) {\n/* */ \n/* 242 */ String lower = fontDescriptor.getFontName().toLowerCase();\n/* */ \n/* */ \n/* 245 */ isBold = (lower.contains(\"bold\") || lower.contains(\"black\") || lower.contains(\"heavy\"));\n/* */ } \n/* */ \n/* */ \n/* 249 */ if (fontDescriptor.isFixedPitch()) {\n/* */ \n/* 251 */ fontName = \"Courier\";\n/* 252 */ if (isBold && fontDescriptor.isItalic())\n/* */ {\n/* 254 */ fontName = fontName + \"-BoldOblique\";\n/* */ }\n/* 256 */ else if (isBold)\n/* */ {\n/* 258 */ fontName = fontName + \"-Bold\";\n/* */ }\n/* 260 */ else if (fontDescriptor.isItalic())\n/* */ {\n/* 262 */ fontName = fontName + \"-Oblique\";\n/* */ }\n/* */ \n/* 265 */ } else if (fontDescriptor.isSerif()) {\n/* */ \n/* 267 */ fontName = \"Times\";\n/* 268 */ if (isBold && fontDescriptor.isItalic())\n/* */ {\n/* 270 */ fontName = fontName + \"-BoldItalic\";\n/* */ }\n/* 272 */ else if (isBold)\n/* */ {\n/* 274 */ fontName = fontName + \"-Bold\";\n/* */ }\n/* 276 */ else if (fontDescriptor.isItalic())\n/* */ {\n/* 278 */ fontName = fontName + \"-Italic\";\n/* */ }\n/* */ else\n/* */ {\n/* 282 */ fontName = fontName + \"-Roman\";\n/* */ }\n/* */ \n/* */ } else {\n/* */ \n/* 287 */ fontName = \"Helvetica\";\n/* 288 */ if (isBold && fontDescriptor.isItalic())\n/* */ {\n/* 290 */ fontName = fontName + \"-BoldOblique\";\n/* */ }\n/* 292 */ else if (isBold)\n/* */ {\n/* 294 */ fontName = fontName + \"-Bold\";\n/* */ }\n/* 296 */ else if (fontDescriptor.isItalic())\n/* */ {\n/* 298 */ fontName = fontName + \"-Oblique\";\n/* */ }\n/* */ \n/* */ }\n/* */ \n/* */ } else {\n/* */ \n/* 305 */ fontName = \"Times-Roman\";\n/* */ } \n/* 307 */ return fontName;\n/* */ }",
"private FontBoxFont findFont(FontFormat format, String postScriptName) {\n/* 403 */ if (postScriptName == null)\n/* */ {\n/* 405 */ return null;\n/* */ }\n/* */ \n/* */ \n/* 409 */ if (this.fontProvider == null)\n/* */ {\n/* 411 */ getProvider();\n/* */ }\n/* */ \n/* */ \n/* 415 */ FontInfo info = getFont(format, postScriptName);\n/* 416 */ if (info != null)\n/* */ {\n/* 418 */ return info.getFont();\n/* */ }\n/* */ \n/* */ \n/* 422 */ info = getFont(format, postScriptName.replaceAll(\"-\", \"\"));\n/* 423 */ if (info != null)\n/* */ {\n/* 425 */ return info.getFont();\n/* */ }\n/* */ \n/* */ \n/* 429 */ for (String substituteName : getSubstitutes(postScriptName)) {\n/* */ \n/* 431 */ info = getFont(format, substituteName);\n/* 432 */ if (info != null)\n/* */ {\n/* 434 */ return info.getFont();\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* 439 */ info = getFont(format, postScriptName.replaceAll(\",\", \"-\"));\n/* 440 */ if (info != null)\n/* */ {\n/* 442 */ return info.getFont();\n/* */ }\n/* */ \n/* */ \n/* 446 */ info = getFont(format, postScriptName + \"-Regular\");\n/* 447 */ if (info != null)\n/* */ {\n/* 449 */ return info.getFont();\n/* */ }\n/* */ \n/* 452 */ return null;\n/* */ }",
"public Font createFont() {\n\t\treturn null;\n\t}",
"public BitmapFont getFont(int style) {\r\n\t\treturn new BitmapFont(this, style);\r\n\t}",
"@Deprecated\r\n public String getFont()\r\n {\r\n return this.font;\r\n }",
"public void GetFont (){\n fontBol = false;\n fontBolS = true;\n fontBolA = true;\n fontBolW = true;\n }",
"public static String getFamily(String family){\n\t\tfor(String f : fontFamilies)\n\t\t\tif(f.equalsIgnoreCase(family))\n\t\t\t\treturn f;\n\t\treturn \"Dialog\";\n\t}",
"private static native Font createFont(String name, GFontPeer peer, int gdkfont);",
"public FontProps getFontProps() {\n\t\treturn mFont;\n\t}",
"public IconBuilder fontName(String font) {\n\t\tthis.fontName = font;\n\t\treturn this;\n\t}",
"public Font getTextFont() {\r\n\t\treturn getJTextField().getFont();\r\n\t}",
"public FontStyle getStyle();",
"public static Font getFont(String familyName, int style, int size){\n\t\tFont font = new Font(familyName, style, size);\n\t\tif(familyName.equalsIgnoreCase(font.getFamily()))\n\t\t\treturn font;\n\t\treturn null;\n\t}",
"public static BitmapFont getDefault() {\r\n\t\treturn defaultFont;\r\n\t}",
"private void setFont() {\n\t}",
"public void setFont(Font value) {\r\n this.font = value;\r\n }",
"private FontBoxFont findFontBoxFont(String postScriptName) {\n/* 374 */ Type1Font t1 = (Type1Font)findFont(FontFormat.PFB, postScriptName);\n/* 375 */ if (t1 != null)\n/* */ {\n/* 377 */ return (FontBoxFont)t1;\n/* */ }\n/* */ \n/* 380 */ TrueTypeFont ttf = (TrueTypeFont)findFont(FontFormat.TTF, postScriptName);\n/* 381 */ if (ttf != null)\n/* */ {\n/* 383 */ return (FontBoxFont)ttf;\n/* */ }\n/* */ \n/* 386 */ OpenTypeFont otf = (OpenTypeFont)findFont(FontFormat.OTF, postScriptName);\n/* 387 */ if (otf != null)\n/* */ {\n/* 389 */ return (FontBoxFont)otf;\n/* */ }\n/* */ \n/* 392 */ return null;\n/* */ }",
"public static Font getFont(int size) {\n if (size <= 0) {\n return getFont();\n }\n return new Font(\"Comic Sans MS\", Font.PLAIN, size);\n }",
"public FontUIResource getControlTextFont() { return fControlFont;}",
"public String getName() {\r\n\t\treturn GDAssemblerUI.getText(UI_TEXT);\r\n\t}",
"public Font getJavaFont() {\n return javaFont;\n }",
"Font getFont(int style) {\n\tswitch (style) {\n\t\tcase SWT.BOLD:\n\t\t\tif (boldFont != null) return boldFont;\n\t\t\treturn boldFont = new Font(device, getFontData(style));\n\t\tcase SWT.ITALIC:\n\t\t\tif (italicFont != null) return italicFont;\n\t\t\treturn italicFont = new Font(device, getFontData(style));\n\t\tcase SWT.BOLD | SWT.ITALIC:\n\t\t\tif (boldItalicFont != null) return boldItalicFont;\n\t\t\treturn boldItalicFont = new Font(device, getFontData(style));\n\t\tdefault:\n\t\t\treturn regularFont;\n\t}\n}",
"private void setFont() {\n try {\n setFont(Font.loadFont(new FileInputStream(FONT_PATH), 23));\n } catch (FileNotFoundException e) {\n setFont(Font.font(\"Verdana\", 23));\n }\n }",
"Font getFont (StyleRange styleRange) {\n\tif (styleRange.font != null) return styleRange.font;\n\treturn getFont(styleRange.fontStyle);\n}",
"public FontRenderer getFontRenderer()\n {\n return this.textRenderer;\n }",
"public Set<String> getFonts() {\n return generators.keySet();\n }",
"private Font getTitleFont() {\n\t\tFont f = lblTitle.getFont();\n\t\tf = f.deriveFont(Font.BOLD, PosUIManager.getTitleFontSize());\n\t\treturn f;\n\t}",
"public Typeface getTypeface() {\n return mTextContainer.getTypeface();\n }",
"public FontFile getEmbeddedFont() {\n return font;\n }",
"public static FontData getFontData() {\n IPreferenceStore store = HexEditorPlugin.getDefault()\n .getPreferenceStore();\n String name = store.getString(Preferences.FONT_NAME);\n int style = store.getInt(Preferences.FONT_STYLE);\n int size = store.getInt(Preferences.FONT_SIZE);\n FontData fontData = null;\n if (name != null && !name.isEmpty() && size > 0) {\n fontData = new FontData(name, size, style);\n } else {\n fontData = Preferences.getDefaultFontData();\n }\n\n return fontData;\n }",
"public Font getFont(String key) {\n\t\tFont defaultValue = (Font) getDefault(key);\n\t\tString sp = internal.getProperty(key);\n\t\tif (sp == null) {\n\t\t\treturn defaultValue;\n\t\t}\n\t\ttry {\n\t\t\tint size, type;\n\t\t\tString name;\n\t\t\tString token;\n\t\t\tStringTokenizer st = new StringTokenizer(sp, \" \", false);\n\t\t\tif (!st.hasMoreTokens()) {\n\t\t\t\t// the value is not correctly formated => remove it\n\t\t\t\tinternal.remove(key);\n\t\t\t\treturn defaultValue;\n\t\t\t}\n\t\t\tname = st.nextToken();\n\t\t\tif (!st.hasMoreTokens()) {\n\t\t\t\tinternal.remove(key);\n\t\t\t\treturn defaultValue;\n\t\t\t}\n\t\t\ttoken = st.nextToken();\n\t\t\tsize = Integer.parseInt(token);\n\t\t\tif (!st.hasMoreTokens()) {\n\t\t\t\tinternal.remove(key);\n\t\t\t\treturn defaultValue;\n\t\t\t}\n\t\t\ttoken = st.nextToken();\n\t\t\ttype = Integer.parseInt(token);\n\t\t\treturn new Font(name, type, size);\n\t\t} catch (NumberFormatException e) {\n\t\t\tinternal.remove(key);\n\t\t\treturn defaultValue;\n\t\t}\n\n\t}"
] |
[
"0.85867965",
"0.8344995",
"0.8320724",
"0.8267196",
"0.8044436",
"0.7865418",
"0.78463495",
"0.7836193",
"0.78340745",
"0.777313",
"0.77636737",
"0.77523875",
"0.7711009",
"0.7707352",
"0.7692596",
"0.76860535",
"0.7624074",
"0.75051725",
"0.7470386",
"0.73723555",
"0.72970873",
"0.7290278",
"0.7269622",
"0.7263639",
"0.72377163",
"0.71871954",
"0.7153282",
"0.71269965",
"0.70908743",
"0.70648354",
"0.7024397",
"0.7008393",
"0.7005438",
"0.7005438",
"0.69972426",
"0.698601",
"0.6978985",
"0.6978985",
"0.6972035",
"0.6968301",
"0.6965589",
"0.69285923",
"0.6909875",
"0.6899536",
"0.6874548",
"0.6867651",
"0.67977995",
"0.67705375",
"0.67610025",
"0.6757816",
"0.6734328",
"0.6723996",
"0.6713739",
"0.6694058",
"0.66707",
"0.66558254",
"0.66376054",
"0.6631928",
"0.6626643",
"0.66188306",
"0.66167927",
"0.6608674",
"0.6587025",
"0.6580223",
"0.6556949",
"0.6556306",
"0.6506332",
"0.64997953",
"0.6485692",
"0.6471632",
"0.6467169",
"0.6428395",
"0.6404467",
"0.6379903",
"0.6374119",
"0.63696086",
"0.63657826",
"0.63441366",
"0.62908894",
"0.62886727",
"0.6286559",
"0.62467486",
"0.62441117",
"0.621921",
"0.62023735",
"0.6202194",
"0.61922383",
"0.6174879",
"0.6163002",
"0.6146786",
"0.6144771",
"0.61379445",
"0.6131767",
"0.6125327",
"0.61067057",
"0.6102042",
"0.609222",
"0.6088582"
] |
0.8033679
|
7
|
Gets the size of the font
|
public float getFontSize();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public int getFontSize();",
"public short getFontHeight()\n {\n return font.getFontHeight();\n }",
"public double getFontSize(\n )\n {return fontSize;}",
"public final int getFontSize() {\n return fontSize;\n }",
"public int getMyFontSize() {\n return myFont.size; /*Fault:: return 5; */\n }",
"public float getTextSizePx() {\n return mPaint.getTextSize();\n }",
"public String getFontSizeText()\r\n\t{\r\n\t\treturn fontSizeTextField.getText(); // return the text in the Font Size text field\r\n\t}",
"public String getFontSize () {\n\t\treturn fontSizeTextField.getText();\n\t}",
"public short getFontHeight() {\n\t\treturn this.fontHeight;\n\t}",
"public float getFontSize() {\n return fontSize;\n }",
"public int getFontSize()\n \t{\n \t\treturn 13;\n \t}",
"public int getFontSize()\r\n {\r\n return myFontSize;\r\n }",
"private int getFontSize(LabelGeometry geom)\r\n {\r\n float fontSize = AWTUtilities.getFontSize(geom.getRenderProperties().getFont());\r\n\r\n // Scale based on the view\r\n Function<Kilometers, Float> scaleFunction = geom.getRenderProperties().getScaleFunction();\r\n if (scaleFunction != null)\r\n {\r\n float viewScale = scaleFunction.apply(myViewAltitudeSupplier.get()).floatValue();\r\n fontSize *= viewScale;\r\n }\r\n\r\n return Math.round(fontSize);\r\n }",
"public short getFontHeightInPoints() {\n\t\treturn fontHeightInPoints;\n\t}",
"public int fontSize() {\n\t\treturn fixedFontSize;\n\t}",
"public short getFontHeightInPoints()\n {\n return ( short ) (font.getFontHeight() / 20);\n }",
"public float getTextSize() {\n return mTextSize;\n }",
"float getFontSize()\r\n\t{\r\n\t\tif (!appearanceTokens.isEmpty())\r\n\t\t{\r\n\t\t\t// daString looks like \"BMC /Helv 3.4 Tf EMC\"\r\n\t\t\t// use the fontsize of the default existing apperance stream\r\n\t\t\tint fontIndex = appearanceTokens.indexOf(Operator.getOperator(\"Tf\"));\r\n\t\t\tif (fontIndex != -1)\r\n\t\t\t{\r\n\t\t\t\treturn ((COSNumber) appearanceTokens.get(fontIndex - 1)).floatValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn 0f;\r\n\t}",
"public float getTextSize() {\n return mTextContainer.getTextSize();\n }",
"public float getFontHeight(float fontSize) {\n Font f = getNormalFont(fontSize);\n FontMetrics fm = svgGenerator.getFontMetrics(f);\n return fm.getHeight();\n }",
"public String getFont()\n {\n return (String) getStateHelper().eval(PropertyKeys.font, null);\n }",
"public int getHeight() {\r\n if ( fontMetrics != null ) {\r\n return fontMetrics.getHeight() + 6;\r\n } else {\r\n return 6;\r\n }\r\n }",
"public native final String fontSize() /*-{\n\t\treturn this.fontSize;\n\t}-*/;",
"private float getFontHeight(Paint paint) {\n Rect rect = new Rect();\n paint.getTextBounds(\"1\", 0, 1, rect);\n return rect.height();\n }",
"public int getTitleFontSize() {\n\t\treturn this.title_fontsize;\n\t}",
"public int getTextLabelFontSize() {\n\t\treturn mTextLabelFontSize;\n\t}",
"public int getSelectedFontSize()\r\n\t{\r\n\t\treturn fontSizeList.getSelectedValue(); // return the currently selected font size\r\n\t}",
"public static float textHeight(BitmapFont fntIn, String sIn){\n return new GlyphLayout(fntIn,sIn).height;\n }",
"public static Font getFont() {\n return getFont(12);\n }",
"public RMFont getFont()\n {\n return getStyle().getFont();\n }",
"public Font getFont(\n )\n {return font;}",
"public int getMediumFontSize() {\n\t\treturn 10;\n\t}",
"public String getFont() {\n return font;\n }",
"public float getHeight() {\n\t\t\n\t\tfloat height = 0;\n\t\tfor(int i = 0; i < text.length(); i++) {\n\t\t\tFontChar c = font.getChar(text.charAt(i));\n\t\t\tfloat h = (c.T_HEIGHT + c.Y_OFFSET) * size;\n\t\t\t\n\t\t\tif(h > height)\n\t\t\t\theight = h;\n\t\t}\n\t\t\n\t\treturn height;\n\t}",
"public Font getFont() {\r\n if (font==null)\r\n return getDesktop().getDefaultFont();\r\n else\r\n return font;\r\n }",
"public Font getFont() {\n return this.font;\n }",
"public CanvasFont getFont() {\n return this.textFont;\n }",
"@Override\n public String getFont() {\n return graphicsEnvironmentImpl.getFont(canvas);\n }",
"public short getNumberOfFonts() {\n\t\treturn 0;\n\t}",
"public Float getHightlightedTextSize() {\n if (mHightlightedTextSize != null)\n return mHightlightedTextSize;\n return getTextSize();\n }",
"public int getLabelTextSize(){\n return labelTextSize;\n }",
"public Font getTextFont() {\r\n\t\treturn getJTextField().getFont();\r\n\t}",
"public int getSubtitleFontSize() {\n\t\treturn this.subtitle_fontsize;\n\t}",
"public int getPreferredHeight() \n { \n Font font = Font.getDefault().derive( Font.BOLD, FONT_SIZE );\n return font.getHeight() + VMARGIN;\n }",
"public Font getFont() {\n return font;\n }",
"public int getWidth() {\r\n if ( fontMetrics != null && lbl != null ) {\r\n return fontMetrics.stringWidth(lbl) + 12; \r\n } else {\r\n return 10;\r\n }\r\n }",
"public String getCharacterSize() {\n\t\tString result = null;\n\t\tRaces dropDownText = (Races) race.getSelectedItem();\n\n\t\tif (dropDownText.equals(Races.DWARF)) {\n\t\t\tresult = Races.DWARF.getSize();\n\t\t} else if (dropDownText.equals(Races.ELF)) {\n\t\t\tresult = Races.ELF.getSize();\n\t\t} else if (dropDownText.equals(Races.GNOME)) {\n\t\t\tresult = Races.GNOME.getSize();\n\t\t} else if (dropDownText.equals(Races.HALFELF)) {\n\t\t\tresult = Races.HALFELF.getSize();\n\t\t} else if (dropDownText.equals(Races.HALFORC)) {\n\t\t\tresult = Races.HALFORC.getSize();\n\t\t} else if (dropDownText.equals(Races.HALFLING)) {\n\t\t\tresult = Races.HALFLING.getSize();\n\t\t} else if (dropDownText.equals(Races.HUMAN)) {\n\t\t\tresult = Races.HUMAN.getSize();\n\t\t}\n\n\t\treturn result;\n\t}",
"public Font getFont() {\r\n return font;\r\n }",
"public Font getFont() {\r\n return font;\r\n }",
"public Font getFont()\r\n\t{\r\n\t\treturn _g2.getFont();\r\n\t}",
"public FontProps getFontProps() {\n\t\treturn mFont;\n\t}",
"public static float textWidth(BitmapFont fntIn, String sIn){\n return new GlyphLayout(fntIn,sIn).width;\n }",
"double getFontSizeAdjustment() {\n return fontSizeAdjustment;\n }",
"abstract Font getFont();",
"public IsFont getFont() {\n\t\treturn getOriginalFont();\n\t}",
"@Override\r\n\tpublic int getFontSize() {\n\t\treturn 0;\r\n\t}",
"public Font getFont() {\n\treturn font;\n }",
"public Font getFont() {\n\treturn font;\n }",
"public Font getFont() {\n\t\treturn f;\n\t}",
"public void setTextSize(float textSize){\n Context context = getContext();\n Resources res;\n\n if(context == null){\n res = Resources.getSystem();\n }else{\n res = context.getResources();\n }\n\n setTextSizePx(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, textSize, res.getDisplayMetrics()));\n }",
"public static int getAreaButtonTextSize(Context context, Typeface typeface) {\n DisplayMetrics displayMetrics = context.getResources()\n .getDisplayMetrics();\n // int deviceWidth = displayMetrics.widthPixels;\n int deviceWidth = displayMetrics.widthPixels;\n\n return determineTextSize(typeface, (int) (0.23f * (.14f * deviceWidth)));\n\n }",
"public int getLength ()\r\n {\r\n return glyph.getBounds().width;\r\n }",
"public String getSizeLabel() {\n return (String)getAttributeInternal(SIZELABEL);\n }",
"private int calculateFontSize(ImageProcessor processor, double ratioHeightForLabel) {\n // Converts sumSizes into the average size in each dimension\n sumSizes.scale(1.0 / labels.size());\n FontSizeCalculator calculator = new FontSizeCalculator(processor, labels.stream());\n return calculator.calculateOptimalFontSize(sumSizes, ratioHeightForLabel);\n }",
"public Font font() {\n return font;\n }",
"public String getSizeTextField(){\n\t\treturn textField.getText();\n\t}",
"public FontMetrics getFontMetrics(Font f)\r\n\t{\r\n\t\treturn _g2.getFontMetrics();\r\n\t}",
"public Set<Integer> getFontSizes(String name) {\n return getBitmapFonts(name).keySet();\n }",
"public Font getFont() {\n return GraphicsEnvironment.getLocalGraphicsEnvironment()\n .getAllFonts()[0];\n }",
"public static float getFontCharHeight(Paint paint, String text) {\r\n Rect bounds = new Rect();\r\n paint.getTextBounds(text, 0, text.length(), bounds);\r\n\r\n return 1.0f * bounds.height();\r\n }",
"private void calculateCharSize() {\n int charMaxAscent;\n int charLeading;\n FontMetrics fm = getFontMetrics(getFont());\n charWidth = -1; // !!! Does not seem to work: fm.getMaxAdvance();\n charHeight = fm.getHeight() + lineSpaceDelta;\n charMaxAscent = fm.getMaxAscent();\n fm.getMaxDescent();\n charLeading = fm.getLeading();\n baselineIndex = charMaxAscent + charLeading - 1;\n\n if (charWidth == -1) {\n int widths[] = fm.getWidths();\n for (int i=32; i<127; i++) {\n if (widths[i] > charWidth) {\n charWidth = widths[i];\n }\n }\n }\n }",
"public int getPreferredWidth() \n {\n Font font = Font.getDefault().derive( Font.BOLD, FONT_SIZE );\n return font.getAdvance( m_text ) + HMARGIN;\n }",
"public final String getSizeAttribute() {\n return getAttributeValue(\"size\");\n }",
"public Font getLabelFont();",
"public native Font getFont() /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\tvar obj = jso.font;\n\t\treturn @com.emitrom.ti4j.mobile.client.ui.style.Font::new(Lcom/google/gwt/core/client/JavaScriptObject;)(obj);\n }-*/;",
"public abstract Font getFont();",
"public float getWidth() {\n\t\t\n\t\tfloat width= 0;\n\t\tfor(int i = 0; i < text.length(); i++) {\n\t\t\twidth += font.getChar(text.charAt(i)).X_ADVANCE * size;\n\t\t}\n\t\t\n\t\treturn width;\n\t}",
"public double getSize() {\n return getElement().getSize();\n }",
"private int getTextHeight() {\n return lineHeight * (textBuffer.getMaxLine() - 1);\n }",
"public String getSize() {\r\n return size;\r\n }",
"public static float getSize() {\n return STAFF_LEN + FLAG_DEL_Y;\n }",
"public String getSize() {\n return size;\n }",
"public String getSize() {\n return size;\n }",
"public int getButtonTextSize(){\n return buttonTextSize;\n }",
"public float getSize() {\n\t\treturn size;\n\t}",
"public FontData deriveFont(float size) {\n return deriveFont(size, javaFont.getStyle());\n }",
"public double strLen(String str, double size) {\n return mcFont().getStringWidth(str) * size / mcFont().FONT_HEIGHT;\n }",
"public static Font getFont(int size) {\n if (size <= 0) {\n return getFont();\n }\n return new Font(\"Comic Sans MS\", Font.PLAIN, size);\n }",
"private int computeFontSize (double dependencyCount, double maxDependencyCount)\n {\n return (int) (MIN_FONT_SIZE + (dependencyCount / maxDependencyCount) * (MAX_FONT_SIZE - MIN_FONT_SIZE));\n }",
"public float getExampleDimension() {\n return mTextSize;\n }",
"public int getNumGlyphs() {\n\treturn getFont2D().getNumGlyphs();\n }",
"public void setFontSize(int font) {\n\t\tthis.font = font;\n\t}",
"private Bounds textWidth(double size, SensorValue sensorValue)\r\n\t{\n\t\t\r\n\t\tString showValue = sensorValue.getCurrentValue() + \" \" + sensorValue.getMeasurementUnit();\r\n\t\t\r\n\t\tif(fontBase == null)\r\n\t\t\tfontBase = new Font(\"Verdana\", 12);\r\n\t\tText text = new Text(showValue);\r\n\t\tFont font = Font.font(fontBase.getFamily(), size);\r\n text.setFont(font);\r\n return text.getBoundsInLocal();\r\n\t}",
"public float getSize() {\n return size;\n }",
"double width () {\n Text text = new Text(this.getText());\n text.setStyle(this.getStyle());\n return text.getBoundsInLocal().getWidth() * 1.5;\n }",
"public Dimension getPreferredSize() {\n\t\tif (getFont() != null) {\n\t\t\tFontMetrics fm = getFontMetrics(getFont());\n\n\t\t\treturn new Dimension(fm.stringWidth(label), fm.getHeight() + 10);\n\t\t} else\n\n\t\t\treturn new Dimension(10, 10); //no font\n\t}",
"@Test\n public void Test_FontList_Size() throws Exception {\n int actual_value = 0;\n int expected_value = 2;\n\n PdfResource resrc = new PdfResource();\n resrc.addFont(new PdfFont(PdfFont.HELVETICA, false, false));\n resrc.addFont(new PdfFont(PdfFont.COURIER, true, true));\n\n actual_value = resrc.getFontList().size();\n\n assertThat(actual_value, equalTo(expected_value));\n }",
"@Override\n public int height()\n {\n return textCent.height();\n }",
"private void getFontSizeShared() {\n\t\t // get shared preference\n\t\t SharedPreferences readeShared = getSharedPreferences(\"fontSize\" , MODE_PRIVATE);\n\n\t\t if ( readeShared != null ) {\n\t\t\t String size = readeShared.getString(\"size\" , null);\n\t\t\t if ( size != null && size.length() > 0 ) {\n\t\t\t\t\tif ( size.equals(\"s\") ) {\n\n\t\t\t\t\t\t setFontSize(18);\n\n\t\t\t\t\t} else if ( size.equals(\"m\") ) {\n\n\t\t\t\t\t\t setFontSize(20);\n\n\t\t\t\t\t} else if ( size.equals(\"l\") ) {\n\n\t\t\t\t\t\t setFontSize(24);\n\t\t\t\t\t}\n\t\t\t }\n\t\t }\n\t }",
"public float getSize()\n {\n return size;\n }"
] |
[
"0.80867785",
"0.7964281",
"0.79374766",
"0.78201574",
"0.7673951",
"0.76548845",
"0.76544845",
"0.7651206",
"0.7640846",
"0.76378244",
"0.7545898",
"0.750959",
"0.7390141",
"0.7379126",
"0.73371965",
"0.7288122",
"0.72866166",
"0.72135913",
"0.7186914",
"0.7136355",
"0.70424575",
"0.7020598",
"0.70014334",
"0.6989958",
"0.69847655",
"0.69166625",
"0.6904055",
"0.6851592",
"0.6788898",
"0.675834",
"0.6674181",
"0.6629474",
"0.6625507",
"0.6577379",
"0.6555634",
"0.65303606",
"0.65115756",
"0.65104187",
"0.6508623",
"0.6486355",
"0.64625406",
"0.6425463",
"0.6422045",
"0.63951504",
"0.6387754",
"0.63782203",
"0.6374237",
"0.6367829",
"0.6367829",
"0.6357115",
"0.63527",
"0.63390064",
"0.63336647",
"0.63296443",
"0.6300022",
"0.6272982",
"0.6266053",
"0.6266053",
"0.6250198",
"0.62490183",
"0.62462336",
"0.6224381",
"0.62210596",
"0.62175006",
"0.61846906",
"0.6174977",
"0.6173463",
"0.61726207",
"0.6164035",
"0.6152319",
"0.6148162",
"0.61377054",
"0.6120078",
"0.61066467",
"0.6101979",
"0.6098213",
"0.60769314",
"0.6071702",
"0.60571975",
"0.6051035",
"0.60460514",
"0.60366225",
"0.60366225",
"0.60356414",
"0.6030991",
"0.6027096",
"0.6025069",
"0.60077804",
"0.60026085",
"0.6000692",
"0.5997218",
"0.5995173",
"0.5986536",
"0.5978097",
"0.59721917",
"0.59538144",
"0.59528327",
"0.59520245",
"0.5944867",
"0.59336734"
] |
0.80613685
|
1
|
Gets the font style to use
|
public FontStyle getStyle();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public RMFont getFont()\n {\n return getStyle().getFont();\n }",
"public TextStyle getStyle(\n )\n {return style;}",
"public String getFont()\n {\n return (String) getStateHelper().eval(PropertyKeys.font, null);\n }",
"Font getFont(int style) {\n\tswitch (style) {\n\t\tcase SWT.BOLD:\n\t\t\tif (boldFont != null) return boldFont;\n\t\t\treturn boldFont = new Font(device, getFontData(style));\n\t\tcase SWT.ITALIC:\n\t\t\tif (italicFont != null) return italicFont;\n\t\t\treturn italicFont = new Font(device, getFontData(style));\n\t\tcase SWT.BOLD | SWT.ITALIC:\n\t\t\tif (boldItalicFont != null) return boldItalicFont;\n\t\t\treturn boldItalicFont = new Font(device, getFontData(style));\n\t\tdefault:\n\t\t\treturn regularFont;\n\t}\n}",
"public Font getFont(\n )\n {return font;}",
"public BitmapFont getFont(int style) {\r\n\t\treturn new BitmapFont(this, style);\r\n\t}",
"public static Font getFont() {\n return getFont(12);\n }",
"Font getFont (StyleRange styleRange) {\n\tif (styleRange.font != null) return styleRange.font;\n\treturn getFont(styleRange.fontStyle);\n}",
"public RMTextStyle getStyle()\n {\n return new RMTextStyle(_style);\n }",
"public String getFont() {\n return font;\n }",
"public Font getFont() {\r\n if (font==null)\r\n return getDesktop().getDefaultFont();\r\n else\r\n return font;\r\n }",
"public mxStyleSheet getTextStyle()\n\t{\n\t\treturn textStyle;\n\t}",
"public Font getFont()\r\n\t{\r\n\t\treturn _g2.getFont();\r\n\t}",
"abstract Font getFont();",
"@Override\n public String getFont() {\n return graphicsEnvironmentImpl.getFont(canvas);\n }",
"protected Font getStyledFont(Control pControl, int pStyle) {\n\t\tFontData[] fd = pControl.getFont().getFontData();\n\t\tfor(int i = 0; i < fd.length; i++) {\n\t\t\tfd[i].setStyle(pStyle);\n\t\t}\n\t\tFont result = new Font(pControl.getDisplay(), fd);\n\t\treturn result;\n\t}",
"public Font getFont() {\n return GraphicsEnvironment.getLocalGraphicsEnvironment()\n .getAllFonts()[0];\n }",
"public TextStyle getTextStyle() {\n return this.textStyle;\n }",
"public Font getFont() {\n\t\treturn f;\n\t}",
"public Font getFont() {\n return this.font;\n }",
"public String getStyle() {\r\n return style;\r\n }",
"public String getStyle() {\n return style;\n }",
"public String getStyle() {\n return style;\n }",
"public String getStyle() {\n return style;\n }",
"public String getStyle() {\n return style;\n }",
"public org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont getFont()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont)get_store().find_element_user(FONT$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public String getStyle() {\n\t\treturn style;\n\t}",
"public Font getFont() {\r\n return font;\r\n }",
"public Font getFont() {\r\n return font;\r\n }",
"public native Font getFont() /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\tvar obj = jso.font;\n\t\treturn @com.emitrom.ti4j.mobile.client.ui.style.Font::new(Lcom/google/gwt/core/client/JavaScriptObject;)(obj);\n }-*/;",
"public Font getFont() {\n return font;\n }",
"public abstract Font getFont();",
"public Font getFont() {\n\treturn font;\n }",
"public Font getFont() {\n\treturn font;\n }",
"public IsFont getFont() {\n\t\treturn getOriginalFont();\n\t}",
"static Font getFont(int style, int size) {\n\t\treturn new Font(\"Monospaced\", style, size);\n\t}",
"public FontProps getFontProps() {\n\t\treturn mFont;\n\t}",
"public Font deriveFont(int style){\n\tHashtable newAttributes = (Hashtable)getRequestedAttributes().clone();\n\tapplyStyle(style, newAttributes);\n return new Font(newAttributes, createdFont, font2DHandle);\n }",
"public Font GetFont(String name) { return FontList.get(name); }",
"public Font font() {\n return font;\n }",
"public String getFontFamily() {\n Object value = library.getObject(entries, FONT_FAMILY);\n if (value instanceof StringObject) {\n StringObject familyName = (StringObject) value;\n return familyName.getDecryptedLiteralString(library.getSecurityManager());\n }\n return FONT_NAME;\n }",
"public String getStyle() {\r\n if (style != null) {\r\n return style;\r\n }\r\n ValueBinding vb = getValueBinding(\"style\");\r\n return vb != null ? (String) vb.getValue(getFacesContext()) : null;\r\n }",
"Style getStyle();",
"public abstract String getStyle();",
"public CanvasFont getFont() {\n return this.textFont;\n }",
"public FontType getFontType() {\n\t\treturn font;\n\t}",
"public String getFontName()\n {\n return font.getFontName();\n }",
"public Font getTextFont() {\r\n\t\treturn getJTextField().getFont();\r\n\t}",
"public static Font getFont(String familyName, int style, int size){\n\t\tFont font = new Font(familyName, style, size);\n\t\tif(familyName.equalsIgnoreCase(font.getFamily()))\n\t\t\treturn font;\n\t\treturn null;\n\t}",
"public String getFontName();",
"public String getFontName();",
"public String getFontName();",
"public String getMyFont() {\n return myFont.font; /*Fault:: return \"xx\"; */\n }",
"public static String guessStyle(String fontName) {\n if (fontName != null) {\n for (String word : ITALIC_WORDS) {\n if (fontName.indexOf(word) != -1) {\n return Font.STYLE_ITALIC;\n }\n }\n }\n return Font.STYLE_NORMAL;\n }",
"public static String getFontName() {\n return \"Comic Sans MS\";\n }",
"public final String getStyleAttribute() {\n return getAttributeValue(\"style\");\n }",
"Font createFont();",
"public int getStyle() {\r\n\t\treturn style;\r\n\t}",
"public String getStyleName() {\r\n return getAttributeAsString(\"styleName\");\r\n }",
"public static Font getFont(int size) {\n if (size <= 0) {\n return getFont();\n }\n return new Font(\"Comic Sans MS\", Font.PLAIN, size);\n }",
"public RMFont getFont() { return getParent()!=null? getParent().getFont() : null; }",
"private Font getScreenFont() {\n Font scoreFont = null;\n try {\n scoreFont = Font.createFont(Font.TRUETYPE_FONT,\n getClass().getResource(\"\\\\assets\\\\font\\\\game_over.ttf\").openStream());\n } catch (FontFormatException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return scoreFont;\n }",
"private Typeface getFont() {\n Typeface fontText = Typeface.createFromAsset(SnapziApplication.getContext().getAssets(), \"fonts/GothamHTF-Book.ttf\");\n return fontText;\n }",
"FONT createFONT();",
"public final Color getFontColour() {\n return fontColour;\n }",
"public final String getFontColor() {\n\t\treturn fontColor;\n\t}",
"public int getStyle() {\n\treturn style;\n }",
"public Font getLabelFont();",
"public String getFontName() {\n Object value = library.getObject(entries, FONT_NAME);\n if (value instanceof Name) {\n return ((Name) value).getName();\n }\n return FONT_NAME;\n }",
"public Font getStandardFont(DiagramContext context) {\n\t\treturn context.getResources().getSystemFont();\n\t}",
"public FontRenderer getFontRenderer()\n {\n return this.textRenderer;\n }",
"public String getFontName() {\n return getFontName(Locale.getDefault());\n }",
"public String getButtonFontStyle() {\r\n\t\tif (_saveButton == null)\r\n\t\t\treturn null;\r\n\t\telse\r\n\t\t\treturn _saveButton.getButtonFontStyle();\r\n\t}",
"private static String getStyleSheet() {\n\t\tif (fgStyleSheet == null)\n\t\t\tfgStyleSheet= loadStyleSheet();\n\t\tString css= fgStyleSheet;\n\t\tif (css != null) {\n\t\t\tFontData fontData= JFaceResources.getFontRegistry().getFontData(PreferenceConstants.APPEARANCE_JAVADOC_FONT)[0];\n\t\t\tcss= HTMLPrinter.convertTopLevelFont(css, fontData);\n\t\t}\n\n\t\treturn css;\n\t}",
"public Font createFont() {\n\t\treturn null;\n\t}",
"public int getStyle() {\r\n\t\treturn this.style;\r\n\t}",
"public Font getFont(final String family, final int style, final int size) {\n collectGarbageInCache();\n\n String key = family + \"-\" + style + \"-\" + size;\n\n Reference cr = (Reference)fontCache.get(key);\n Font font = null;\n if (cr != null) {\n font = (Font)cr.get();\n }\n\n if (font == null) {\n font = new Font(family, style, size);\n fontCache.put(key, new CacheReference(key, font, queue));\n }\n\n return font;\n }",
"public void GetFont (){\n fontBol = false;\n fontBolS = true;\n fontBolA = true;\n fontBolW = true;\n }",
"public MinecraftFontRenderer getFont() {\n return fontRenderer;\n }",
"private Font getFont(String fontColor, float fontSize, int fotStyle) {\n Font cellPaymentReciptFont = FontFactory.getFont(\"Arial\", 10f);\n if (null != fontColor && fontColor.equalsIgnoreCase(RED_COLOR)) {\n cellPaymentReciptFont.setColor(BaseColor.RED);\n } else if (null != fontColor && fontColor.equalsIgnoreCase(GREEN_COLOR)) {\n cellPaymentReciptFont.setColor(BaseColor.GREEN);\n } else {\n cellPaymentReciptFont.setColor(BaseColor.BLACK);\n }\n cellPaymentReciptFont.setSize(fontSize);\n cellPaymentReciptFont.setStyle(fotStyle);\n return cellPaymentReciptFont;\n }",
"public final String getFontFamily() {\n return fontFamily;\n }",
"public Font deriveFont(int style, float size){\n\tHashtable newAttributes = (Hashtable)getRequestedAttributes().clone();\n\tapplyStyle(style, newAttributes);\n\tapplySize(size, newAttributes);\n return new Font(newAttributes, createdFont, font2DHandle);\n }",
"public Font getFont(String property) {\r\n return calendarTable.getFont(property);\r\n }",
"public Typeface getTypeface() {\n return mTextContainer.getTypeface();\n }",
"public FontUIResource getControlTextFont() { return fControlFont;}",
"public String fontName() {\n\t\treturn fontName;\n\t}",
"public String getName() {\n return fontName;\n }",
"public static Font getFont(String nm) {\n\treturn getFont(nm, null);\n }",
"public static Font getDefaultFont() {\r\n return defaultFont;\r\n }",
"public String getCurrentStyle() {\n modifyStyleIfRequested();\n return currentStyle;\n }",
"public FontRenderer getFontRenderer()\r\n\t{\n\t\treturn this.fontRenderer;\r\n\t}",
"public String getFontFace() {\n\t\treturn _fontFace;\n\t}",
"COSName getFontName()\r\n\t{\r\n\t\tint setFontOperatorIndex = appearanceTokens.indexOf(Operator.getOperator(\"Tf\"));\r\n\t\treturn (COSName) appearanceTokens.get(setFontOperatorIndex - 2);\r\n\t}",
"public void GetFontS (){\n fontBolS = false;\n fontBol = true;\n fontBolA = true;\n fontBolW = true;\n }",
"public Font getFont(String family, int style, float size, float dpi)\n\t{\n\t\tfloat scale = dpi/72.0f;\n\t\treturn FontUtil.newFont(family, style, scale*size);\n\t}",
"public Font getFont(String key) {\n\t\tFont defaultValue = (Font) getDefault(key);\n\t\tString sp = internal.getProperty(key);\n\t\tif (sp == null) {\n\t\t\treturn defaultValue;\n\t\t}\n\t\ttry {\n\t\t\tint size, type;\n\t\t\tString name;\n\t\t\tString token;\n\t\t\tStringTokenizer st = new StringTokenizer(sp, \" \", false);\n\t\t\tif (!st.hasMoreTokens()) {\n\t\t\t\t// the value is not correctly formated => remove it\n\t\t\t\tinternal.remove(key);\n\t\t\t\treturn defaultValue;\n\t\t\t}\n\t\t\tname = st.nextToken();\n\t\t\tif (!st.hasMoreTokens()) {\n\t\t\t\tinternal.remove(key);\n\t\t\t\treturn defaultValue;\n\t\t\t}\n\t\t\ttoken = st.nextToken();\n\t\t\tsize = Integer.parseInt(token);\n\t\t\tif (!st.hasMoreTokens()) {\n\t\t\t\tinternal.remove(key);\n\t\t\t\treturn defaultValue;\n\t\t\t}\n\t\t\ttoken = st.nextToken();\n\t\t\ttype = Integer.parseInt(token);\n\t\t\treturn new Font(name, type, size);\n\t\t} catch (NumberFormatException e) {\n\t\t\tinternal.remove(key);\n\t\t\treturn defaultValue;\n\t\t}\n\n\t}",
"public String getFontName() {\n\t\treturn this.fontName;\n\t}",
"public String getColorStyle() {\n return colorStyle;\n }",
"public PatchTextStyleProperties font(String font) {\n this.font = font;\n return this;\n }",
"public String getSoundFont() {\n\t\treturn soundFont;\n\t}"
] |
[
"0.8009468",
"0.8001604",
"0.7649698",
"0.75962937",
"0.7569376",
"0.7567632",
"0.75333625",
"0.74614793",
"0.7417685",
"0.73587924",
"0.73548007",
"0.7250604",
"0.7213431",
"0.72057897",
"0.7201238",
"0.71731985",
"0.7120901",
"0.7098013",
"0.702672",
"0.70185274",
"0.7011285",
"0.6988547",
"0.6988547",
"0.6988547",
"0.6988547",
"0.698433",
"0.6976373",
"0.69570297",
"0.69570297",
"0.69334775",
"0.69294393",
"0.6924586",
"0.69231963",
"0.69231963",
"0.6919842",
"0.6892021",
"0.68630284",
"0.68342906",
"0.6819273",
"0.6812721",
"0.6768822",
"0.67380315",
"0.6737458",
"0.6714598",
"0.67127186",
"0.6688387",
"0.6683251",
"0.6682618",
"0.6682343",
"0.667458",
"0.667458",
"0.667458",
"0.6672126",
"0.667005",
"0.66652936",
"0.6606069",
"0.6583673",
"0.6581466",
"0.65754414",
"0.65449077",
"0.65347904",
"0.6517033",
"0.6515304",
"0.65104914",
"0.6508779",
"0.649977",
"0.6485741",
"0.6475616",
"0.64747393",
"0.647309",
"0.64612657",
"0.6457139",
"0.6453514",
"0.64497566",
"0.64488894",
"0.64116955",
"0.63858014",
"0.6379723",
"0.63371736",
"0.63349414",
"0.63322943",
"0.63089335",
"0.6280041",
"0.62793094",
"0.6243065",
"0.6242203",
"0.62247354",
"0.6222464",
"0.6218652",
"0.62096745",
"0.61910355",
"0.6190494",
"0.6186738",
"0.61847115",
"0.61846685",
"0.6180832",
"0.6136186",
"0.61106414",
"0.6089604",
"0.6080747"
] |
0.87364334
|
0
|
Gets the lat/lon refernce position for the text display
|
public Coordinate getPosition();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"RealLocalizable getPosition();",
"public void displayCoordsInDegrees() {\n DecimalFormat formatter = new DecimalFormat(\"0.000\");\n\n String latFormat = formatter.format(posMarker.getPosition().latitude);\n String lonFormat = formatter.format(posMarker.getPosition().longitude);\n\n TextView latitude = (TextView) findViewById(R.id.image_latitude);\n TextView longitude = (TextView) findViewById(R.id.image_longitude);\n\n latitude.setText(latFormat); //Use posMarker location as field actually reflects marker position\n longitude.setText(lonFormat); //Use posMarker location as field actually reflects marker position\n }",
"public Point getLabelPosition();",
"public Position getTextPosition()\n {\n int hpos = getComponent().getHorizontalTextPosition();\n int vpos = getComponent().getVerticalTextPosition();\n return Position.get(hpos, vpos);\n }",
"public Point2D.Double getTextCenter() {\n\t\treturn new Point2D.Double(_parent.getTxtLocPinX(), _parent.getTxtLocPinY());\n\t}",
"public String getLocationString() {\n return getCenter().toString();\n }",
"public String getLocation() {\n\t\treturn \"-12.9990189,-38.5140298\";\n\t}",
"double a_marker_position ()\n {\n double l_return = 0.0;\n\n if (marker != null)\n {\n l_return = marker.getPosition ();\n }\n\n return l_return;\n\n }",
"public LatLng getPosition() { return new LatLng(latitude, longitude); }",
"@Override\n\tpublic Point getLocation() {\n\t\treturn position;\n\t}",
"public int getLon();",
"public int getTextPosition() {\r\n return TextPosition;\r\n }",
"org.mojolang.mojo.lang.Position getStartPosition();",
"public int getLat();",
"public Point getLocation();",
"String getLocationLabel();",
"public Point getLocalPosition() {\n return getLocalLowerLeft();\n }",
"public TextPosition getPosition ( ) { return _cursorPosition; }",
"public String getGVCoordsForPosition() {\n return \"\\\"\" + coords[0] + \",\" + coords[1] + \"!\\\"\";\n }",
"public Point getAbsPosition() {\n return Game.getMap().TFMapCoordinateToMapCenter(position);\n }",
"String getLocation();",
"String getLocation();",
"String getLocation();",
"@Override\n public void onLocationChanged(Location location) {\nString x=\"Latitude is--> \"+location.getLatitude();\nString y=\"Longtitude is--> \"+location.getLongitude();\n Toast.makeText(this.context,\"LATITUDE=\"+x+\" LONGTITUDE=\"+y, Toast.LENGTH_LONG).show();\n txtview.setText(x+\"\\n\"+y);\n\n }",
"Position getPosition();",
"Position getPosition();",
"public Point getNameFieldLoc() {\r\n\t\treturn nameField.getLocationOnScreen();\r\n\t}",
"String getLawnPosition();",
"public void getCoord(MouseEvent me){\n if(mapImage.getImage()!=null) {\n double xPos = me.getX();\n double yPos = me.getY();\n Main.ps.setTitle(xPos + \" \" + yPos);\n }\n }",
"public String getCoordsForLP() {\n String x = coords[0] < 0 ? \"neg\" + Math.abs(coords[0]) :\n Integer.toString(Math.abs(coords[0]));\n String y = coords[1] < 0 ? \"neg\" + Math.abs(coords[1]) :\n Integer.toString(Math.abs(coords[1]));\n return x + \"_\" + y;\n }",
"private Point2D computeLayoutOrigin() {\r\n\r\n\t\tDimension size = getSize();\r\n\r\n\t\tPoint2D.Float origin = new Point2D.Float();\r\n\r\n\t\torigin.x = (float) (size.width - textLayout.getAdvance()) / 2;\r\n\t\torigin.y = (float) (size.height - textLayout.getDescent() + textLayout\r\n\t\t\t\t.getAscent()) / 2;\r\n\r\n\t\treturn origin;\r\n\t}",
"@JsOverlay\n\tpublic final String getPosition() {\n\t\treturn this.position;\n\t}",
"public static Position getTextPosition(final Tree tree) {\n \treturn new Position(tree.getLine(), tree.getCharPositionInLine());\n }",
"public Point getPosition();",
"IntPoint getLocation();",
"int getStartPosition();",
"int getStartPosition();",
"public String getLocationString(){\n return \"(\" + x + \", \" + y + \")\";\n }",
"public Point getLocation() { return loc; }",
"public String getLocationString() {\r\n\t\treturn \"Location = (\" + Math.round(getLocationX() * 10) / 10.0 + \", \" + Math.round(getLocationY() * 10) / 10.0 + \")\";\r\n\t}",
"default String getPos() {\n return meta(\"nlpcraft:nlp:pos\");\n }",
"@Override\n\t\t\tpublic Vector getPosition() {\n\t\t\t\treturn new Vector(-2709.487, -4281.02, 3861.564); //-4409.0, 2102.0, -4651.0);\n\t\t\t}",
"Point getPosition();",
"Point getPosition();",
"public Coordinate getLocation();",
"public Point getCarLocation() {\r\n\r\n SQLiteQueryBuilder builder = new SQLiteQueryBuilder();\r\n builder.setTables(FTS_VIRTUAL_TABLE_CAR);\r\n builder.setProjectionMap(mColumnMapCar);\r\n\r\n Cursor cursor = builder.query(mDatabaseOpenHelper.getReadableDatabase(),\r\n null, null, null, null, null, null);\r\n\r\n if (cursor == null) {\r\n return null;\r\n } else if (!cursor.moveToFirst()) {\r\n cursor.close();\r\n return null;\r\n }\r\n\r\n String point_str = cursor.getString(1);\r\n\r\n point_str = point_str.trim();\r\n String[] coordinates = point_str.split(\",\");\r\n String lon = coordinates[0];\r\n String lat = coordinates[1];\r\n\r\n double flon = Float.valueOf(lon);\r\n double flat = Float.valueOf(lat);\r\n\r\n return (new Point(flon, flat));\r\n }",
"public void plotCoordinatesFromText(String text){\n String[] coords = text.split(\",\");\r\n float lat = Float.parseFloat(coords[1]);\r\n float lng = Float.parseFloat(coords[0]);\r\n float ticks = Float.parseFloat(coords[2]);\r\n\r\n double total = (4400.0 - 0.1707*ticks)/44.00;//computers battery life\r\n int total_ = (int)(total + 0.5);\r\n\r\n VariablesSingleton.getInstance().setBATTERY(Double.toString(total_));\r\n TextView t = (TextView)findViewById(R.id.textView2);\r\n t.setText(VariablesSingleton.getInstance().getBATTERY()+\"%\");//displays battery life\r\n\r\n LatLng pos = new LatLng(lat,lng);//\r\n points.add(pos);//adds the point on the google maps\r\n //BikePath = mMap.addPolyline(new PolylineOptions());\r\n BikePath.setPoints(points);//adds the line connecting the markers\r\n\r\n mMap.addMarker(new MarkerOptions()//displays the marker on google map\r\n .title(\"Position\")\r\n .position(pos)\r\n );\r\n Log.d(TAG,coords[0]);\r\n Log.d(TAG,coords[1]);\r\n }",
"String getPosY();",
"public String location()\n {\n return String.format(\"(%d,%d)\", line, column);\n }",
"public Point getLocation() {\r\n\t\treturn this.center;\r\n\t}",
"public Point getLocation() {\n return pos;\n }",
"protected int getMarkerPosition() {\n\t\treturn valueToMarkerPosition(getValue());\n\t}",
"public geo_location getLocation() {\n return _pos;\n }",
"private String getLocationForPrint(double latitude, double longitude) {\n int latDegree = (new Double(Math.floor(latitude))).intValue();\n int longDegree = (new Double(Math.floor(longitude))).intValue();\n String latEnd = getString(R.string.latitude_south);\n String longEnd = getString(R.string.longitude_west);\n if (latDegree > 0) {\n latEnd = getString(R.string.latitude_north);\n\n }\n if (longDegree > 0) {\n longEnd = getString(R.string.longitude_east);\n }\n double latSecond = (latitude - latDegree) * 100;\n double latMinDouble = (latSecond * 3d / 5d);\n int latMinute = new Double(Math.floor(latMinDouble)).intValue();\n\n double longSecond = (longitude - longDegree) * 100;\n double longMinDouble = (longSecond * 3d / 5d);\n int longMinute = new Double(Math.floor(longMinDouble)).intValue();\n// return String.format(getString(R.string.geo_location_info), latDegree,\n// latMinute, latEnd, longDegree, longMinute, longEnd);\n return getString(R.string.geo_location_info);\n\n }",
"public abstract String getPos();",
"public java.lang.String getListLatLon()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(LISTLATLON$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"int getLongitude();",
"java.lang.String getLocation();",
"@Override\n public Location getDisplayedLocation() {\n this.displayedLocation = new Location((int)pane.getHvalue(), (int)pane.getVvalue(), curFloor, \"Unknown\");\n return displayedLocation;\n }",
"public Point getLocation() {\r\n return layout.location;\r\n }",
"public void displayMyCoords(TextView txtCoord, MarkerOptions markerOptions, DecimalFormat formater, double myLatitude, double myLongitude) {\n txtCoord.setText(\"Your Coordinates: \" + formater.format(myLatitude) + \"° N\" + \", \" + formater.format(myLongitude) + \"° W\");\n LatLng userCoords = new LatLng(myLatitude, myLongitude);\n gMap.addMarker(new MarkerOptions()\n .position(userCoords)\n .title(\"Your Coordinates: \" + formater.format(myLatitude) + \"° N\" + \", \" + formater.format(myLongitude) + \"° W\"));\n gMap.animateCamera(CameraUpdateFactory.newLatLngZoom(userCoords, 15));\n }",
"public GeoPoint position(){\n return position;\n }",
"public long getPosition();",
"public Position getPosition();",
"public Position getPosition();",
"public Position getPosition();",
"private String getCords() {\n return current.getLocString();\n\n }",
"public PVector getLoc() {\n return location;\n }",
"public PVector getLoc() {\n return location;\n }",
"Object getPosition();",
"@Override\n\tpublic void getCoordinates() {\n\t\tSystem.out.println(\"Your Coordinates: 18.1124° N, 79.0193° E \");\n\t}",
"@Override\n\tpublic Point getLocation() {\n\t\treturn new Point(x,y);\n\t}",
"private Point2D getCenterLatLon(){\n Point2D.Double result = new Point2D.Double();\n Point2D.Double screenCenter = new Point2D.Double();\n screenCenter.x = getWidth()/2; //contentpane width/height\n screenCenter.y = getHeight()/2;\n try{\n transform.inverseTransform(screenCenter,result); //transform to lat/lon using the current transform\n } catch (NoninvertibleTransformException e) {\n throw new RuntimeException(e);\n }\n return result;\n }",
"long getCoordinates();",
"long getCoordinates();",
"public Point getLocation() {\r\n return new Point((int)x,(int)y);\r\n }",
"@Override\n public String getLon() {\n return lon;\n }",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"public String get_loc_and_direc() {\n try {\n Object obj = JsonUtil.getInstance().getParser().parse(this.text);\n JSONObject jsonObject = (JSONObject) obj;\n String location = (String) jsonObject.get(\"location\");\n String direction = (String) jsonObject.get(\"direction\");\n return location + \"-\" + direction;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }",
"public Rectangle2D.Double getTextBounds() {\n\t\t\n\t\tdouble txtPinX = _parent.getTxtPinX();\n\t\tdouble txtPinY = _parent.getTxtPinY();\n\t\t\n\t\tdouble txtLocPinX = _parent.getTxtLocPinX();\n\t\tdouble txtLocPinY = _parent.getTxtLocPinY();\n\t\t\n\t\tdouble txtWidth = _parent.getTxtWidth();\n\t\tdouble txtHeight = _parent.getTxtHeight();\n\t\t\n\t\tdouble x = txtPinX - txtLocPinX;\n\t\tdouble y = txtPinY - txtLocPinY;\n\t\t\n\t\treturn new Rectangle2D.Double(x, y, txtWidth, txtHeight);\n\t}",
"public int PositionGet();",
"public int getLocation()\r\n {\n }",
"private void displayWorldCoordinates() {\n int n = trackerPanel == null ? 0 : trackerPanel.getFrameNumber();\n OffsetOriginStep step = (OffsetOriginStep) getStep(n);\n if (step == null) {\n xField.setText(null);\n yField.setText(null);\n } else {\n xField.setValue(step.worldX);\n yField.setValue(step.worldY);\n }\n }",
"public abstract String getDisplayLocation();",
"public Point getCharacterPosition() {\n\t\treturn this.characterPosition;\n\t}",
"@Override\n public PosDeg getPosition() {\n return tracker.getPosition();\n }",
"public String getGVCoordsForLabel() {\n StringBuilder coordsBuilder = new StringBuilder();\n\n coordsBuilder.append(\"X\");\n\n if (coords[0] < 0) {\n coordsBuilder.append(\"neg\");\n }\n\n coordsBuilder.append(Math.abs(coords[0])).append(\"Y\");\n\n if (coords[1] < 0) {\n coordsBuilder.append(\"neg\");\n }\n\n coordsBuilder.append(Math.abs(coords[1]));\n\n return coordsBuilder.toString();\n }",
"@Override\n\tpublic Vector3d getPosition() {\n\t\tVector3f pos = this.getChild(NON_LINES_NAME).getLocalTranslation();\n\t\treturn new Vector3d(pos.x, pos.y, pos.z);\n\t}",
"gov.nih.nlm.ncbi.www.CodeBreakDocument.CodeBreak.Loc getLoc();",
"public PointF get_position() { return _position; }",
"public GeoPoint getPosition() {\n\t\treturn position;\n\t}",
"private PointF getLandmarkPosition(Face face, int landmarkId) {\n for (Landmark landmark : face.getLandmarks()) {\n if (landmark.getType() == landmarkId) {\n return landmark.getPosition();\n }\n }\n\n PointF prop = mPreviousProportions.get(landmarkId);\n if (prop == null) {\n return null;\n }\n\n float x = face.getPosition().x + (prop.x * face.getWidth());\n float y = face.getPosition().y + (prop.y * face.getHeight());\n return new PointF(x, y);\n }",
"private PointF getLandmarkPosition(Face face, int landmarkId) {\n for (Landmark landmark : face.getLandmarks()) {\n if (landmark.getType() == landmarkId) {\n return landmark.getPosition();\n }\n }\n\n PointF prop = mPreviousProportions.get(landmarkId);\n if (prop == null) {\n return null;\n }\n\n float x = face.getPosition().x + (prop.x * face.getWidth());\n float y = face.getPosition().y + (prop.y * face.getHeight());\n return new PointF(x, y);\n }"
] |
[
"0.69245255",
"0.69089663",
"0.67988867",
"0.6742318",
"0.66466683",
"0.64436096",
"0.6391441",
"0.6380539",
"0.621291",
"0.62125957",
"0.62066984",
"0.6202395",
"0.6194169",
"0.6147968",
"0.61137193",
"0.6106452",
"0.6090806",
"0.60880375",
"0.60829884",
"0.60828274",
"0.6017675",
"0.6017675",
"0.6017675",
"0.6009306",
"0.60045284",
"0.60045284",
"0.6004097",
"0.60017073",
"0.5990762",
"0.5989294",
"0.5988484",
"0.5983104",
"0.5979083",
"0.5964343",
"0.5954919",
"0.59548897",
"0.59548897",
"0.5949061",
"0.59361124",
"0.59324527",
"0.5882585",
"0.58823526",
"0.5876196",
"0.5876196",
"0.5833804",
"0.58335435",
"0.5828871",
"0.5824324",
"0.5817198",
"0.5816763",
"0.58123165",
"0.58051515",
"0.5799949",
"0.579777",
"0.5795846",
"0.57913774",
"0.5785171",
"0.5782904",
"0.57799315",
"0.57666266",
"0.5765011",
"0.5759522",
"0.575736",
"0.5755124",
"0.5755124",
"0.5755124",
"0.5752072",
"0.5749409",
"0.5749409",
"0.5744369",
"0.5744224",
"0.5730485",
"0.5722766",
"0.57137847",
"0.57137847",
"0.5711554",
"0.5707775",
"0.5702048",
"0.5702048",
"0.5702048",
"0.5702048",
"0.5702048",
"0.5702048",
"0.5702048",
"0.5702048",
"0.57009876",
"0.5700522",
"0.5691266",
"0.56885463",
"0.5678348",
"0.5677547",
"0.5676179",
"0.5663259",
"0.566023",
"0.5644148",
"0.5636766",
"0.56319964",
"0.5631835",
"0.56302917",
"0.56302917"
] |
0.5966511
|
33
|
Gets the color to use for the text
|
public Color getTextColor();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"Integer getTxtColor();",
"public int textColor() {\n\t\treturn textColor;\n\t}",
"public String getTextColor();",
"public int getTextColor() {\n return mTextColor;\n }",
"public Color getTextColor() {\r\n return textColor;\r\n }",
"@AutoEscape\n\tpublic String getTextColor();",
"public @ColorInt int getTextColor() {\n return mTextContainer.getTextColor();\n }",
"public RMColor getTextColor() { return RMColor.black; }",
"public Color getTextColor(){\r\n return textColor;\r\n }",
"public final String getFontColor() {\n\t\treturn fontColor;\n\t}",
"public String getColor()\n {\n return color;\n }",
"public String getColor()\n {\n return color;\n }",
"String getTextStrokeColorAsString();",
"String getColor();",
"public String getColor() {\r\n return color;\r\n }",
"public native final String fontColor() /*-{\n\t\treturn this.fontColor;\n\t}-*/;",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\r\n\t\treturn color;\r\n\t}",
"public String getColor() {\n\t\treturn color;\n\t}",
"public String getColor() {\n\t\treturn color;\n\t}",
"public String getColor()\n {\n return this.color;\n }",
"public String getColorString();",
"public String getColor() {\n return this.color;\n }",
"public String getColor(){\n\t\treturn color;\n\t}",
"public int getTextLabelForegroundColor() {\n\t\treturn mTextLabelForegroundColor;\n\t}",
"public String getColor() { \n return color; \n }",
"public static Color getTextHighlightColor() {\n return TEXT_HIGHLIGHT;\n }",
"public short getColor()\n {\n return font.getColorPaletteIndex();\n }",
"public String obtenColor() {\r\n return color;\r\n }",
"@Override\n public String getColor() {\n return this.color;\n }",
"public String getColor() {\n return (String)getAttributeInternal(COLOR);\n }",
"public Color color() {\n\t\tswitch (this) {\n\t\tcase FATAL: {\n\t\t\tColor c = UIManager.getColor(\"nb.errorForeground\"); // NOI18N\n\t\t\tif (c == null) {\n\t\t\t\tc = Color.RED.darker();\n\t\t\t}\n\t\t\treturn c;\n\t\t}\n\t\tcase WARNING:\n\t\t\treturn Color.BLUE.darker();\n\t\tcase INFO:\n\t\t\treturn UIManager.getColor(\"textText\");\n\t\tdefault:\n\t\t\tthrow new AssertionError();\n\t\t}\n\t}",
"@Override\n public String getColor() {\n return this.color.name();\n }",
"public static Color getTextColorLight() {\n return TEXTCOLOR_LIGHT;\n }",
"public final Color getFontColour() {\n return fontColour;\n }",
"public String getColorAsString() {\n\t\treturn getValue(CommonProperty.COLOR, AbstractLabels.DEFAULT_COLOR);\n\t}",
"public String getColor(){\r\n return color;\r\n }",
"public Integer getHightlightedTextColor() {\n if (mHightlightedTextColor != null)\n return mHightlightedTextColor;\n return getTextColor();\n }",
"public String getColor(){\n return this._color;\n }",
"public Colour getForegroundColor() {\n return colour == null ? null : colour.getForeground();\n }",
"Color getColor();",
"Color getColor();",
"Color getColor();",
"Color getColor();",
"Color getColor();",
"String getColour();",
"public String get() {\n\n\t\treturn Tools.parseColors(message, false);\n\t}",
"public RMColor getColor()\n {\n return getStyle().getColor();\n }",
"public Color getStringColor() {\n return this.getConfiguredColor(PreferencesConstants.COLOR_STRING);\n }",
"public int getExampleColor() {\n return mTextColor;\n }",
"public String getColor() {\n\t\treturn null;\n\t}",
"public String getColor(){\n return this.color;\n }",
"public String getLabelColor()\n {\n return myLabelColor;\n }",
"public Color[] getTextColorsArray() {\n\t\treturn this.textColor;\n\t}",
"@NoProxy\n @NoWrap\n @NoDump\n public String getColor() {\n return color;\n }",
"public static Color getColor() { return lblColor.getBackground(); }",
"public int mo27005e() {\n TextView textView = this.f24573m;\n if (textView != null) {\n return textView.getCurrentTextColor();\n }\n return -1;\n }",
"public Integer getColor() {\n\t\treturn color;\n\t}",
"public int mo27008h() {\n TextView textView = this.f24577q;\n if (textView != null) {\n return textView.getCurrentTextColor();\n }\n return -1;\n }",
"public Color getColor() \n\t{\n\t\treturn color;\n\t}",
"public String getColor() {\n\t\treturn \"Elcolor del vehiculo es: \"+color; \n\t }",
"public int getColor() {\n \t\treturn color;\n \t}",
"public Color getColor() {\n \t\treturn color;\n \t}",
"public Color getColor() {\n\t\treturn this.color;\n\t}",
"public String getColor() {\r\n\t\treturn \"Color = [\"+ ColorUtil.red(color) + \", \"+ ColorUtil.green(color) + \", \"+ ColorUtil.blue(color) + \"]\";\r\n\t}",
"public static Color getTextColorDark() {\n return TEXTCOLOR_DARK;\n }",
"public Color getColor() {\n return Color.YELLOW;\n }",
"public int getColor() {\n return color;\n }",
"public Color getColor() {\r\n\t\treturn color;\r\n\t}",
"public Color getColor() {\r\n\t\treturn color;\r\n\t}",
"public Color getColor() {\n\t\treturn color;\n\t}",
"public Color getColor() {\n\t\treturn color;\n\t}",
"public Color getColor() {\n\t\treturn color;\n\t}",
"public Color getColor() {\n\t\treturn color;\n\t}",
"public String getColor() {\n return colorID;\n }",
"public int getColor(){\n\t\treturn color;\n\t}",
"public int getColor(){\n\t\treturn color;\n\t}",
"public char getColor();",
"public Color getColor() {\n return color;\r\n }",
"public int getColor() {\n return this.color;\n }",
"public Color getColor() {\n return this.color;\n }",
"public Color getColor() {\n return this.color;\n }",
"public Color getColor() {\n return this.color;\n }",
"public Color getColor() {\n\t\treturn Color.RED;\n\t}",
"public int getColor(){\r\n\t\treturn color;\r\n\t}",
"public final Color getColor() {\n return color;\n }",
"public void colorText() {\r\n String theColor = textShape.getText();\r\n if (theColor.contains(\"blue\")) {\r\n textShape.setForegroundColor(Color.BLUE);\r\n }\r\n else if (theColor.contains(\"red\")) {\r\n textShape.setForegroundColor(Color.RED);\r\n }\r\n else {\r\n textShape.setForegroundColor(Color.BLACK);\r\n }\r\n }",
"@Override\r\n\tpublic String Color() {\n\t\treturn Color;\r\n\t}",
"public Color getColor() {\n return color;\n }",
"public Color getColor() {\r\n return this.color;\r\n }",
"public final Color getColor() {\n\t\treturn color;\n\t}",
"public Color getColor() {\n return color;\n }",
"public Color getColor() {\n return color;\n }"
] |
[
"0.83124715",
"0.8273082",
"0.8265077",
"0.79557645",
"0.7947729",
"0.79080075",
"0.786945",
"0.76238805",
"0.74900186",
"0.74693024",
"0.7406208",
"0.7406208",
"0.7385437",
"0.7381842",
"0.7377598",
"0.7373379",
"0.7372691",
"0.7372691",
"0.7372691",
"0.7372691",
"0.7372691",
"0.7372691",
"0.7372691",
"0.7372691",
"0.73680544",
"0.73530585",
"0.73530585",
"0.73445934",
"0.7313486",
"0.72743237",
"0.7269798",
"0.72657603",
"0.7229111",
"0.72124225",
"0.72022414",
"0.7166801",
"0.71615535",
"0.7124927",
"0.7121782",
"0.71025634",
"0.7076151",
"0.7068722",
"0.70682377",
"0.70667464",
"0.7050628",
"0.7034777",
"0.7010036",
"0.6955579",
"0.6955579",
"0.6955579",
"0.6955579",
"0.6955579",
"0.69440746",
"0.6934568",
"0.6933273",
"0.6919128",
"0.6918962",
"0.6916854",
"0.6906392",
"0.68897444",
"0.6868121",
"0.68396664",
"0.6826371",
"0.6811323",
"0.6789185",
"0.67856884",
"0.67642236",
"0.6756037",
"0.6749036",
"0.67463046",
"0.67408854",
"0.6736723",
"0.6725804",
"0.67205715",
"0.6716433",
"0.66888183",
"0.66888183",
"0.66886216",
"0.66886216",
"0.66886216",
"0.66886216",
"0.66811174",
"0.66810936",
"0.66810936",
"0.6678914",
"0.66709876",
"0.66611916",
"0.66608626",
"0.66608626",
"0.66608626",
"0.6660446",
"0.6659357",
"0.6654387",
"0.6644911",
"0.6643631",
"0.6638636",
"0.6633301",
"0.6625865",
"0.6624672",
"0.6624672"
] |
0.8085784
|
3
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.