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.selectedI... | [
"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.667... | 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 retu... | [
"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.63094... | 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... | [
"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.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 ite... | [
"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.625948... | 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 ... | [
"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.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 getExr... | [
"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.608016... | 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 getExr... | [
"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.608016... | 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... | [
"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.60213... | 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(\"^\\... | [
"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.515... | 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.s... | [
"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.62961... | 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 =... | [
"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.... | 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: ... | [
"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.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... | [
"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.5329... | 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 ... | [
"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.... | 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... | [
"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.71079... | 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 = n... | [
"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.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 }",... | [
"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.627907... | 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... | [
"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.5534... | 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.toJSONObjectForWe... | [
"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... | 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).getCurr... | [
"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.566623... | 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.... | [
"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.57160... | 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 ... | [
"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.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.... | [
"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.61487... | 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.... | [
"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.59434... | 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(... | [
"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.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 definate... | [
"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.54... | 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().getSessio... | [
"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.6951... | 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 ... | [
"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.68425... | 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 (immortalityTim... | [
"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.520020... | 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 ... | [
"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.574785... | 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... | [
"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.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 currentSpaci... | [
"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.51... | 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)... | [
"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.5... | 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 ... | [
"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.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: JuggernautGa... | [
"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.53... | 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.... | [
"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.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(EnumPar... | [
"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.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\... | [
"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.572163... | 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 ... | [
"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.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}",
... | [
"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.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 getExr... | [
"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.608016... | 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 getExr... | [
"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.608016... | 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... | [
"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.560021... | 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 = (DBDe... | [
"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.5442... | 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 ... | [
"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.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 getExr... | [
"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.608016... | 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 getExr... | [
"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.608016... | 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 getExr... | [
"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.608016... | 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 getExr... | [
"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.608016... | 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 getExr... | [
"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.608016... | 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 getExr... | [
"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.608016... | 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 cons... | [
"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... | 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 getAccountNumbe... | [
"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.685051... | 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 ... | [
"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.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 prin... | [
"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.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) {... | [
"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.68636... | 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 getExr... | [
"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.608016... | 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\tpub... | [
"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.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();",
... | [
"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.583060... | 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... | [
"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.632982... | 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... | [
"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.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.con... | [
"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.623405... | 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 getExr... | [
"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.608016... | 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 voi... | [
"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.633... | 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 = getM... | [
"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.5832... | 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 ... | [
"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.496... | 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.... | [
"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.5081... | 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 - \" + t... | [
"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.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 // fro... | [
"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.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 ... | [
"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... | 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 ... | [
"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.48... | 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}",
... | [
"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.56019... | 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 ... | [
"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.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 Stri... | [
"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.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... | [
"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.5953... | 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\... | [
"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.... | 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.ha... | [
"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.65796... | 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; }",
"@Ove... | [
"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.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.... | [
"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.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\t... | [
"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.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.... | [
"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.49533... | 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 ... | [
"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... | 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}",
"b... | [
"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.... | 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... | [
"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.5260970... | 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 setPortConfigu... | [
"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... | 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]... | [
"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.43... | 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... | [
"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... | 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 devic... | [
"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.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 th... | [
"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.505194... | 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);"... | [
"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.637679... | 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)... | [
"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.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);",
"pu... | [
"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.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 excha... | [
"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.... | 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 ... | [
"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.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... | [
"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.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 (val... | [
"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.729708... | 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; /*Fa... | [
"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.70424... | 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 ... | [
"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.701128... | 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 T... | [
"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.601... | 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();",
"pub... | [
"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.8085784 | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.