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
int32 oneof_2994 = 2994;
public int getOneof2994() { if (hugeOneofCase_ == 2994) { return (java.lang.Integer) hugeOneof_; } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long mo107678c(Integer num);", "int mo27483b();", "long mo133613a();", "long mo25074b();", "long mo1685a(C2369e c2369e);", "void mo107677b(Integer num);", "long mo25071a(long j);", "long mo117970a();", "public int mo3361f() {\n return 1;\n }", "C5537g mo4096b(int i);", "C3197iu mo3028...
[ "0.64596975", "0.6410737", "0.6326318", "0.6272971", "0.6262584", "0.62412184", "0.6220133", "0.6132924", "0.60854274", "0.60684514", "0.60517323", "0.6000663", "0.5939653", "0.59385324", "0.59290856", "0.5908882", "0.5907681", "0.5895257", "0.5876983", "0.58755314", "0.58660...
0.0
-1
int32 oneof_2994 = 2994;
public Builder setOneof2994(int value) { hugeOneofCase_ = 2994; hugeOneof_ = value; onChanged(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long mo107678c(Integer num);", "int mo27483b();", "long mo133613a();", "long mo25074b();", "long mo1685a(C2369e c2369e);", "void mo107677b(Integer num);", "long mo25071a(long j);", "long mo117970a();", "public int mo3361f() {\n return 1;\n }", "C5537g mo4096b(int i);", "C3197iu mo3028...
[ "0.64594346", "0.64111733", "0.6326621", "0.62727743", "0.62618285", "0.62414926", "0.6220356", "0.61335075", "0.60861486", "0.60687226", "0.60511446", "0.60012144", "0.59407026", "0.59381545", "0.59290564", "0.5908805", "0.5908253", "0.5895182", "0.58765507", "0.5875685", "0...
0.0
-1
int32 oneof_2994 = 2994;
public Builder clearOneof2994() { if (hugeOneofCase_ == 2994) { hugeOneofCase_ = 0; hugeOneof_ = null; onChanged(); } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long mo107678c(Integer num);", "int mo27483b();", "long mo133613a();", "long mo25074b();", "long mo1685a(C2369e c2369e);", "void mo107677b(Integer num);", "long mo25071a(long j);", "long mo117970a();", "public int mo3361f() {\n return 1;\n }", "C5537g mo4096b(int i);", "C3197iu mo3028...
[ "0.64594346", "0.64111733", "0.6326621", "0.62727743", "0.62618285", "0.62414926", "0.6220356", "0.61335075", "0.60861486", "0.60687226", "0.60511446", "0.60012144", "0.59407026", "0.59381545", "0.59290564", "0.5908805", "0.5908253", "0.5895182", "0.58765507", "0.5875685", "0...
0.0
-1
int32 oneof_2995 = 2995;
public int getOneof2995() { if (hugeOneofCase_ == 2995) { return (java.lang.Integer) hugeOneof_; } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long mo107678c(Integer num);", "void mo107677b(Integer num);", "int mo27483b();", "long mo133613a();", "long mo25074b();", "C5537g mo4096b(int i);", "public int mo3361f() {\n return 1;\n }", "boolean mo25266c(int i);", "long mo25071a(long j);", "long mo1685a(C2369e c2369e);", "public ...
[ "0.64046884", "0.6349864", "0.62507004", "0.60916984", "0.6076441", "0.60672665", "0.6062126", "0.60517573", "0.6042143", "0.6001746", "0.591021", "0.58885646", "0.58777165", "0.5831153", "0.58131117", "0.57954586", "0.57904124", "0.5771864", "0.5750871", "0.5732238", "0.5729...
0.0
-1
int32 oneof_2995 = 2995;
public Builder setOneof2995(int value) { hugeOneofCase_ = 2995; hugeOneof_ = value; onChanged(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long mo107678c(Integer num);", "void mo107677b(Integer num);", "int mo27483b();", "long mo133613a();", "long mo25074b();", "C5537g mo4096b(int i);", "public int mo3361f() {\n return 1;\n }", "boolean mo25266c(int i);", "long mo25071a(long j);", "long mo1685a(C2369e c2369e);", "public ...
[ "0.6401954", "0.6348529", "0.62504005", "0.60895365", "0.6075952", "0.6068268", "0.606082", "0.605112", "0.60397357", "0.6000226", "0.5908892", "0.58865076", "0.58760357", "0.58301014", "0.581267", "0.5794051", "0.579016", "0.5770606", "0.5751181", "0.57311136", "0.57289416",...
0.0
-1
int32 oneof_2995 = 2995;
public Builder clearOneof2995() { if (hugeOneofCase_ == 2995) { hugeOneofCase_ = 0; hugeOneof_ = null; onChanged(); } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long mo107678c(Integer num);", "void mo107677b(Integer num);", "int mo27483b();", "long mo133613a();", "long mo25074b();", "C5537g mo4096b(int i);", "public int mo3361f() {\n return 1;\n }", "boolean mo25266c(int i);", "long mo25071a(long j);", "long mo1685a(C2369e c2369e);", "public ...
[ "0.6402824", "0.6348513", "0.6249786", "0.6090025", "0.607523", "0.6067416", "0.60605794", "0.6051743", "0.6040483", "0.6000815", "0.59092265", "0.5886512", "0.58756745", "0.5829507", "0.5811985", "0.57942414", "0.5790702", "0.5771006", "0.57508665", "0.57316375", "0.5728378"...
0.0
-1
int32 oneof_2996 = 2996;
public int getOneof2996() { if (hugeOneofCase_ == 2996) { return (java.lang.Integer) hugeOneof_; } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int mo27483b();", "long mo107678c(Integer num);", "public int mo3361f() {\n return 1;\n }", "long mo1685a(C2369e c2369e);", "long mo133613a();", "long mo25074b();", "long mo25071a(long j);", "boolean mo25266c(int i);", "boolean mo4831a(C0153fp fpVar);", "void mo107677b(Integer num);", ...
[ "0.6224928", "0.6181843", "0.616154", "0.6138883", "0.6078414", "0.607833", "0.60668343", "0.605897", "0.6000205", "0.5978911", "0.59182304", "0.59112084", "0.58883584", "0.5887207", "0.5866853", "0.5864054", "0.58195204", "0.58065856", "0.5776142", "0.57638294", "0.57551795"...
0.0
-1
int32 oneof_2996 = 2996;
public Builder setOneof2996(int value) { hugeOneofCase_ = 2996; hugeOneof_ = value; onChanged(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int mo27483b();", "long mo107678c(Integer num);", "public int mo3361f() {\n return 1;\n }", "long mo1685a(C2369e c2369e);", "long mo25074b();", "long mo133613a();", "long mo25071a(long j);", "boolean mo25266c(int i);", "boolean mo4831a(C0153fp fpVar);", "void mo107677b(Integer num);", ...
[ "0.6225822", "0.61808145", "0.61623716", "0.61395735", "0.6078415", "0.6077808", "0.6066106", "0.60586435", "0.60008717", "0.5977966", "0.59191287", "0.5911141", "0.58887476", "0.58870405", "0.5867747", "0.586481", "0.58205515", "0.58065146", "0.5776413", "0.57644284", "0.575...
0.0
-1
int32 oneof_2996 = 2996;
public Builder clearOneof2996() { if (hugeOneofCase_ == 2996) { hugeOneofCase_ = 0; hugeOneof_ = null; onChanged(); } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int mo27483b();", "long mo107678c(Integer num);", "public int mo3361f() {\n return 1;\n }", "long mo1685a(C2369e c2369e);", "long mo25074b();", "long mo133613a();", "long mo25071a(long j);", "boolean mo25266c(int i);", "boolean mo4831a(C0153fp fpVar);", "void mo107677b(Integer num);", ...
[ "0.622468", "0.6180767", "0.6161059", "0.6138097", "0.6077522", "0.6077293", "0.606558", "0.6058363", "0.60004336", "0.59782916", "0.5917532", "0.59101707", "0.5887445", "0.5886515", "0.58669436", "0.5863402", "0.58190495", "0.5806153", "0.57757586", "0.5763918", "0.5754094",...
0.0
-1
int32 oneof_2997 = 2997;
public int getOneof2997() { if (hugeOneofCase_ == 2997) { return (java.lang.Integer) hugeOneof_; } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long mo107678c(Integer num);", "long mo133613a();", "long mo25074b();", "long mo117970a();", "long mo25071a(long j);", "void mo107677b(Integer num);", "int mo27483b();", "long mo49a();", "C5537g mo4096b(int i);", "public int mo3361f() {\n return 1;\n }", "Long mo20729a();", "long mo...
[ "0.63797385", "0.63779753", "0.6290291", "0.6287001", "0.6284338", "0.6158166", "0.6131846", "0.6083875", "0.60231924", "0.6022506", "0.5993752", "0.5950675", "0.5935787", "0.59035945", "0.5890139", "0.5881994", "0.5881766", "0.586496", "0.5827943", "0.57885003", "0.57815474"...
0.0
-1
int32 oneof_2997 = 2997;
public Builder setOneof2997(int value) { hugeOneofCase_ = 2997; hugeOneof_ = value; onChanged(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long mo107678c(Integer num);", "long mo133613a();", "long mo25074b();", "long mo117970a();", "long mo25071a(long j);", "void mo107677b(Integer num);", "int mo27483b();", "long mo49a();", "C5537g mo4096b(int i);", "public int mo3361f() {\n return 1;\n }", "Long mo20729a();", "long mo...
[ "0.63797385", "0.63779753", "0.6290291", "0.6287001", "0.6284338", "0.6158166", "0.6131846", "0.6083875", "0.60231924", "0.6022506", "0.5993752", "0.5950675", "0.5935787", "0.59035945", "0.5890139", "0.5881994", "0.5881766", "0.586496", "0.5827943", "0.57885003", "0.57815474"...
0.0
-1
int32 oneof_2997 = 2997;
public Builder clearOneof2997() { if (hugeOneofCase_ == 2997) { hugeOneofCase_ = 0; hugeOneof_ = null; onChanged(); } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long mo107678c(Integer num);", "long mo133613a();", "long mo25074b();", "long mo117970a();", "long mo25071a(long j);", "void mo107677b(Integer num);", "int mo27483b();", "long mo49a();", "public int mo3361f() {\n return 1;\n }", "C5537g mo4096b(int i);", "Long mo20729a();", "long mo...
[ "0.6378965", "0.63758343", "0.6288407", "0.62846094", "0.62828135", "0.6157616", "0.6129683", "0.6081852", "0.60206836", "0.6020572", "0.599163", "0.5948413", "0.59333616", "0.5901485", "0.58874905", "0.5880484", "0.58802", "0.58648086", "0.5827738", "0.5786146", "0.5780944",...
0.0
-1
int32 oneof_2998 = 2998;
public int getOneof2998() { if (hugeOneofCase_ == 2998) { return (java.lang.Integer) hugeOneof_; } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int mo27483b();", "long mo107678c(Integer num);", "void mo107677b(Integer num);", "long mo1685a(C2369e c2369e);", "boolean mo25266c(int i);", "long mo25074b();", "boolean mo4831a(C0153fp fpVar);", "long mo25071a(long j);", "C5537g mo4096b(int i);", "long mo133613a();", "C3197iu mo30281b(long j)...
[ "0.6132898", "0.6099623", "0.6050127", "0.60039496", "0.5978218", "0.5948398", "0.5871819", "0.58600456", "0.58515465", "0.57815886", "0.57805324", "0.57651275", "0.57386047", "0.5734478", "0.5694283", "0.565923", "0.5635118", "0.5625483", "0.5624919", "0.5611518", "0.5609812...
0.5369991
70
int32 oneof_2998 = 2998;
public Builder setOneof2998(int value) { hugeOneofCase_ = 2998; hugeOneof_ = value; onChanged(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int mo27483b();", "long mo107678c(Integer num);", "void mo107677b(Integer num);", "long mo1685a(C2369e c2369e);", "boolean mo25266c(int i);", "long mo25074b();", "boolean mo4831a(C0153fp fpVar);", "long mo25071a(long j);", "C5537g mo4096b(int i);", "long mo133613a();", "C3197iu mo30281b(long j)...
[ "0.6133067", "0.6100801", "0.60509413", "0.6003768", "0.59780633", "0.5948379", "0.58708596", "0.5860171", "0.58514893", "0.5781505", "0.578132", "0.5764395", "0.57371205", "0.5734335", "0.56951344", "0.56592584", "0.5634849", "0.56248516", "0.56245315", "0.5610793", "0.56100...
0.0
-1
int32 oneof_2998 = 2998;
public Builder clearOneof2998() { if (hugeOneofCase_ == 2998) { hugeOneofCase_ = 0; hugeOneof_ = null; onChanged(); } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int mo27483b();", "long mo107678c(Integer num);", "void mo107677b(Integer num);", "long mo1685a(C2369e c2369e);", "boolean mo25266c(int i);", "long mo25074b();", "boolean mo4831a(C0153fp fpVar);", "long mo25071a(long j);", "C5537g mo4096b(int i);", "long mo133613a();", "C3197iu mo30281b(long j)...
[ "0.6133067", "0.6100801", "0.60509413", "0.6003768", "0.59780633", "0.5948379", "0.58708596", "0.5860171", "0.58514893", "0.5781505", "0.578132", "0.5764395", "0.57371205", "0.5734335", "0.56951344", "0.56592584", "0.5634849", "0.56248516", "0.56245315", "0.5610793", "0.56100...
0.0
-1
int32 oneof_2999 = 2999;
public int getOneof2999() { if (hugeOneofCase_ == 2999) { return (java.lang.Integer) hugeOneof_; } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo107677b(Integer num);", "long mo107678c(Integer num);", "@Test\n void readabilityOfBigIntegers() {\n int x = 1_000_000;\n\n // However, these are not semantically checked:\n int y = 1_00;\n }", "int intOf();", "public static int BIASED_ONE_OR_ZERO()\n\t{\n\t}", "long mo2...
[ "0.65590847", "0.65466166", "0.6199879", "0.6182069", "0.61451626", "0.6092599", "0.6075362", "0.60359013", "0.5821813", "0.5818082", "0.58087397", "0.5749653", "0.5749521", "0.5727399", "0.57000387", "0.5692872", "0.56904006", "0.5671063", "0.5663466", "0.5660387", "0.565785...
0.5162209
94
int32 oneof_2999 = 2999;
public Builder setOneof2999(int value) { hugeOneofCase_ = 2999; hugeOneof_ = value; onChanged(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo107677b(Integer num);", "long mo107678c(Integer num);", "@Test\n void readabilityOfBigIntegers() {\n int x = 1_000_000;\n\n // However, these are not semantically checked:\n int y = 1_00;\n }", "int intOf();", "public static int BIASED_ONE_OR_ZERO()\n\t{\n\t}", "long mo2...
[ "0.65602213", "0.65463233", "0.6198464", "0.6181996", "0.61453545", "0.6092663", "0.6076151", "0.60357976", "0.58225197", "0.58184963", "0.5809264", "0.57492137", "0.5749084", "0.57280576", "0.5701183", "0.5693839", "0.56913424", "0.5671139", "0.5664034", "0.56616694", "0.565...
0.0
-1
int32 oneof_2999 = 2999;
public Builder clearOneof2999() { if (hugeOneofCase_ == 2999) { hugeOneofCase_ = 0; hugeOneof_ = null; onChanged(); } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo107677b(Integer num);", "long mo107678c(Integer num);", "@Test\n void readabilityOfBigIntegers() {\n int x = 1_000_000;\n\n // However, these are not semantically checked:\n int y = 1_00;\n }", "int intOf();", "public static int BIASED_ONE_OR_ZERO()\n\t{\n\t}", "long mo2...
[ "0.6559776", "0.6545934", "0.61981416", "0.6181736", "0.61459714", "0.6091995", "0.6075563", "0.60355014", "0.5822387", "0.58186", "0.5808837", "0.5749924", "0.57489204", "0.57279605", "0.5700715", "0.56937957", "0.56918013", "0.5670778", "0.56633407", "0.5661553", "0.5657908...
0.0
-1
URL dtdFile = getClass().getResource("/enml2.dtd"); logger.info("Validating note from " + dtdFile);
public String fromEvernoteToLocal(String evernoteNoteContent) throws UserErrorException { String replaced = evernoteNoteContent; try { Document doc = builder.parse(new ByteArrayInputStream(replaced.getBytes())); return parseElement(doc.getDocumentElement()); } catch (SAXException e) { throw new UserErrorException("Evernote note format error. Can't parse.", e); } catch (IOException e) { throw new UserErrorException("Can't read note.", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testParseRelativeReference() throws Exception {\n final boolean pass[] = {false};\n\n try {\n URL url = getClass().getResource(\"data/RelativeTest.dtd\");\n InputSource input = new InputSource(url.toExternalForm());\n XMLReader peer = XMLReaderFactory.crea...
[ "0.5509344", "0.5498436", "0.5312681", "0.5266171", "0.5239075", "0.5234603", "0.5207571", "0.5205731", "0.5157613", "0.5096155", "0.5081772", "0.5081007", "0.5079667", "0.5038831", "0.5014988", "0.501405", "0.50110143", "0.50064886", "0.4972728", "0.49712396", "0.49627966", ...
0.0
-1
Called when the activity is first created.
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.mathscreen); Intent intent = new Intent(MathScreen.this, SoundService.class); startService(intent); if(!resumed) { initButtonsAndStuff(); // print equation on the screen tv_mathProb.setText(equation); if (once == false) { displayNotification("Alarm!"); once = true; } Toast.makeText(getApplicationContext(), "Answer: " + answer, Toast.LENGTH_LONG).show(); //if user inputs the matching answer after hitting the confirm button, then exit snooze.setOnClickListener(new Button.OnClickListener() { public void onClick(View v) { try { userInput = mathInputBox.getText().toString(); if (Integer.parseInt(userInput) == answer) { manager.cancel(1234); Intent intent = new Intent(MathScreen.this, SoundService.class); stopService(intent); intent = new Intent(MathScreen.this, SnoozeDismiss.class); startActivity(intent); } // Toast.makeText(getApplicationContext(), "STOP ALARM!~", Toast.LENGTH_LONG).show(); } catch (NumberFormatException e) { // in case it is empty Toast.makeText(getApplicationContext(), "enter number please ", Toast.LENGTH_LONG).show(); } } }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "@Override\n\tpublic void onActivit...
[ "0.79173684", "0.7726369", "0.7692746", "0.7692746", "0.7692746", "0.7692746", "0.7692746", "0.7692746", "0.7636681", "0.7636681", "0.763111", "0.76181364", "0.76181364", "0.7543469", "0.7539785", "0.7539785", "0.7538629", "0.7527225", "0.75151294", "0.7508903", "0.7500434", ...
0.0
-1
Constructor an infix op with a left and right subtree
public OpTree(String theOp, OpTree l, OpTree r) { me = ++total; if (DEBUG) System.out.println("OpTree with left and right " + me); op = theOp; dval = null; left = l; right = r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TreeNode(TreeNode left, TreeNode right, char operand){\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t\tthis.operand = operand;\n\t\tthis.type = \"op\";\n\n\t}", "JannotTreeJCBinary(InfixExpression n) \n{\n super(n);\n}", "public OpTree(String theOp)\n\t{\n\t\tme = ++total;\n\t\tif (DEBUG) System....
[ "0.6781538", "0.6760125", "0.65653837", "0.64629453", "0.64285356", "0.6224338", "0.61743176", "0.61229783", "0.61094874", "0.60985845", "0.6052243", "0.604893", "0.60279024", "0.60232854", "0.60147965", "0.5988423", "0.5985841", "0.59278727", "0.5896838", "0.58616036", "0.58...
0.63855296
5
Constructor A terminal Op
public OpTree(String theOp) { me = ++total; if (DEBUG) System.out.println("Terminal Op " + me); op = theOp; dval = null; left = null; right = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public OpDesc() {\n\n }", "public Operation() {\n super();\n }", "public Operation() {\n /* empty */\n }", "public Operation() {\n\t}", "public Operation(){\n\t}", "public ChainOperator(){\n\n }", "public Unary() {\n }", "public Terminal() {\n initComponents();\n ...
[ "0.6922762", "0.68739825", "0.6734115", "0.6651863", "0.6572887", "0.651841", "0.62274486", "0.6203695", "0.6150438", "0.6146822", "0.6134239", "0.6038843", "0.6006667", "0.6006667", "0.59184384", "0.5873201", "0.5836948", "0.5825346", "0.58164185", "0.5800664", "0.5799018", ...
0.6778623
2
Constructor A Terminal Double
public OpTree(Double d) { me = ++total; if (DEBUG) System.out.println("Terminal Double " + me); op = null; dval = d; left = null; right = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DoubleFormatter() {\n this(2, 0.0);\n }", "public MyDouble() {\n this.setValue(0);\n }", "public MutableDouble() {\n\t\tsuper();\n mDouble = 0;\n\t}", "public DoubleNode(){\r\n this( null, '\\0', null );\r\n }", "public BasicDouble(double value) {\r\n\t\tsuper.value = ...
[ "0.71764314", "0.6726765", "0.6623739", "0.6619388", "0.65509915", "0.6533067", "0.6492003", "0.64424115", "0.6423709", "0.63707656", "0.63517785", "0.6323709", "0.63236207", "0.6300984", "0.6260441", "0.62224114", "0.6213938", "0.619052", "0.6188429", "0.6134844", "0.6114824...
0.63110656
13
does node represent an empty tree
public boolean isEmpty() { return (op == null && dval == null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean empty() {\n if(root==EXT_NODE) {\r\n \treturn true;\r\n }\r\n return false;\r\n }", "public boolean empty() {\r\n\t\t return(this.root == null);\r\n\t }", "@Override\n public boolean isEmpty() {\n return (that.rootNode == null);\n }", "@Override\n public boolean isEmpty() ...
[ "0.7910843", "0.7870767", "0.78645134", "0.7802079", "0.7793312", "0.7792734", "0.7778994", "0.7725571", "0.770911", "0.76664823", "0.7662945", "0.7659555", "0.7659254", "0.7656165", "0.76259863", "0.76259863", "0.7611706", "0.7593382", "0.7570097", "0.756626", "0.756626", ...
0.0
-1
postOrder printing of this tree
private ArrayList<String> postOrder() { ArrayList<String> rlist = new ArrayList<String>(); postOrder(this,rlist); return rlist; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void postOrderPrint() {\n\t\tpostOrderPrint(root);\n\t\tSystem.out.println();\n\t}", "void printPostorder() { \n\t\tprintPostorder(root);\n\t}", "public void printPostorder() {\n System.out.print(\"postorder:\");\n printPostorder(overallRoot);\n System.out.println();\n }", "pub...
[ "0.8692579", "0.8580903", "0.83271116", "0.8119068", "0.8074419", "0.80272216", "0.78541183", "0.7837643", "0.7781967", "0.7767723", "0.7670231", "0.7593549", "0.75839925", "0.7558509", "0.7540257", "0.7525027", "0.75186735", "0.7502752", "0.74996597", "0.7491678", "0.7480778...
0.0
-1
postOrder printing of tree t, recursive helper
private void postOrder(OpTree t, ArrayList<String> rlist) { if (t == null) return; postOrder(t.left, rlist); postOrder(t.right, rlist); rlist.add(rlist.size(),(t.op != null? t.op : t.dval.toString())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void printPostorder() { \n\t\tprintPostorder(root);\n\t}", "static void postorderPrint(TreeNode node) {\n if (node == null)\n return;\n\n Iterator iter = node.getChildren().iterator();\n while (iter.hasNext()) {\n postorderPrint((TreeNode) iter.next());\n }\n ...
[ "0.7925465", "0.78981537", "0.7854186", "0.7756947", "0.76954955", "0.76756626", "0.76376045", "0.76337427", "0.76305884", "0.7609634", "0.7603954", "0.75257915", "0.75061554", "0.7472818", "0.7449954", "0.7443154", "0.73844874", "0.736599", "0.73532724", "0.73411226", "0.733...
0.0
-1
convert the postOrder visit to a string
public String toString() { return postOrder().toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String postorder() {\n \tresult = \"\";\n \ttraversal(root);\n return result;\n }", "public String postorderTraverse(){\r\n\t\t\r\n\t\t//the recursive call to the private method\r\n\t\t//StringBuffer is used because it is passed by reference\r\n\t\t//StringBuffer can be changed in recursiv...
[ "0.6222143", "0.5831731", "0.5682321", "0.5419452", "0.5244364", "0.52355134", "0.51684475", "0.50938505", "0.5007152", "0.50057423", "0.49976754", "0.49976692", "0.4997625", "0.4994628", "0.49871978", "0.49855366", "0.49756607", "0.49596092", "0.49293533", "0.49236682", "0.4...
0.70034117
0
muss dringend dynamisch gemacht werden
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_launcher); initialise(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void ro...
[ "0.6455239", "0.6243351", "0.6165148", "0.61274", "0.6059461", "0.6051911", "0.6031359", "0.600203", "0.59752077", "0.59488857", "0.5928519", "0.58950275", "0.58928823", "0.5860437", "0.58365047", "0.5830418", "0.5830418", "0.5830418", "0.5830418", "0.5830418", "0.5830418", ...
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.launcher, 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.7246451", "0.7201833", "0.7195169", "0.7176824", "0.71071094", "0.7039687", "0.70379424", "0.7011622", "0.70095545", "0.69799995", "0.6945173", "0.69389343", "0.6933555", "0.69172555", "0.69172555", "0.68906796", "0.688355", "0.687496", "0.6874772", "0.68613136", "0.686131...
0.0
-1
just for the toolbar at the top
public void moveMenuInOut() { LayoutParams temp = sideMenuContent.getLayoutParams(); if (menu_expanded) { ResizeAnimation animation = new ResizeAnimation(sideMenuContent, (temp.width), (temp.height), CentralStyleGenerator.getMenuWidthHidden(this), (temp.height)); sideMenuContent.startAnimation(animation); menu_expanded = false; } else { ResizeAnimation animation = new ResizeAnimation(sideMenuContent, (temp.width), (temp.height), CentralStyleGenerator.getMenuWidthExpanded(this), (temp.height)); sideMenuContent.startAnimation(animation); menu_expanded = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private BrowserToolbar() {\n\t\tinitComponents();\n\t}", "@Override\n public void setToolbar(MToolBar arg0)\n {\n \n }", "private void setToolBar() {\r\n toolbar.setTitle(R.string.photo_details);\r\n ActionBar ab = getSupportActionBar();\r\n if (ab != null) {\r\n ...
[ "0.79699624", "0.7676014", "0.7640079", "0.75793546", "0.75136125", "0.7454214", "0.7431273", "0.741361", "0.73967826", "0.7379622", "0.7355619", "0.7345482", "0.7333603", "0.72601527", "0.7248458", "0.7231823", "0.72229487", "0.7221621", "0.72170043", "0.72031254", "0.720096...
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View v) { }
{ "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
SQL temporaire > Remplace findAll Etapes
public Long trouverLesTrueEtFalse(int idProjet){ try { Query sql = em.createNativeQuery("SELECT COUNT(e.checkEtape) FROM Etapes e WHERE e.checkEtape=true AND e.idProjet='" + idProjet + "'"); Long nbrVrai = (Long) sql.getSingleResult(); return nbrVrai; }catch(NullPointerException e){ return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<T> findAll() ;", "List<ItemPedido> findAll();", "List<E> findAll();", "List<E> findAll();", "List<E> findAll();", "public List<E> findAll() ;", "public List<E> findAll();", "List<T> findAll();", "List<T> findAll();", "List<T> findAll();", "public java.util.List<PlanoSaude> findAll();", "...
[ "0.71111125", "0.7006701", "0.694108", "0.694108", "0.694108", "0.68262225", "0.67957777", "0.6791004", "0.6791004", "0.6791004", "0.6697471", "0.6667389", "0.6588488", "0.65567255", "0.6531624", "0.65237707", "0.6520895", "0.6494178", "0.6488299", "0.6481149", "0.64735556", ...
0.0
-1
Manipulates the map once available. This callback is triggered when the map is ready to be used. This is where we can add markers or lines, add listeners or move the camera. In this case, we just add a marker near Sydney, Australia. If Google Play services is not installed on the device, the user will be prompted to install it inside the SupportMapFragment. This method will only be triggered once the user has installed Google Play services and returned to the app.
@Override public void onMapReady(GoogleMap googleMap) { mMap = googleMap; mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL); //Initialize Google Play Services if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) { buildGoogleApiClient(); mMap.setMyLocationEnabled(true); } } else { buildGoogleApiClient(); mMap.setMyLocationEnabled(true); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onMapReady(GoogleMap googleMap) {\n Geocoder geoCoder = new Geocoder(getActivity(), Locale.getDefault());\n double lat, lng;\n try {\n List<Address> addresses = geoCoder.getFromLocationName(\"Western Sydney Paramatta, NSW\", 5);\n ...
[ "0.8188485", "0.8043431", "0.8036918", "0.80331457", "0.7997925", "0.7977045", "0.7958509", "0.79579484", "0.7954296", "0.794246", "0.7937103", "0.7930505", "0.7915571", "0.7905397", "0.78891397", "0.7885535", "0.7885535", "0.7885535", "0.7885535", "0.78778905", "0.7845226", ...
0.7567787
58
Change the map type based on the user's selection.
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.normal_map: mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL); return true; case R.id.hybrid_map: mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID); return true; case R.id.terrain_map: mMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN); return true; case R.id.satellite_map: mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE); return true; case R.id.new_mark: writeMarkName(); getNewMark(); return true; default: return super.onOptionsItemSelected(item); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changeType(View view){\n if(mMap.getMapType() == GoogleMap.MAP_TYPE_NORMAL){\n mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);\n }else{\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem ...
[ "0.73276865", "0.6965869", "0.67244405", "0.66874707", "0.64394474", "0.6241567", "0.6223474", "0.6157646", "0.614282", "0.6115991", "0.61069745", "0.6032492", "0.5929185", "0.58491766", "0.5846485", "0.57798976", "0.5775739", "0.5770912", "0.5762583", "0.5702611", "0.5673601...
0.6495608
4
Overrides toString method to convert object to JSON String. This method is useful to debug or show value of each properties of the object.
public String toString() { Field[] fields = this.getClass().getDeclaredFields(); int i, max = fields.length; String fieldName = ""; String fieldType = ""; String ret = ""; String value = ""; boolean skip = false; int j = 0; for(i = 0; i < max; i++) { fieldName = fields[i].getName().toString(); fieldType = fields[i].getType().toString(); if(i == 0) { ret += "{"; } if(fieldType.equals("int") || fieldType.equals("long") || fieldType.equals("float") || fieldType.equals("double") || fieldType.equals("boolean")) { try { value = fields[i].get(this).toString(); } catch (Exception e) { value = "0"; } skip = false; } else if(fieldType.contains("String")) { try { value = "\""+Utility.escapeJSON((String) fields[i].get(this))+"\""; } catch (Exception e) { value = "\""+"\""; } skip = false; } else { value = "\""+"\""; skip = true; } if(!skip) { if(j > 0) { ret += ","; } j++; ret += "\r\n\t\""+fieldName+"\":"+value; } if(i == max-1) { ret += "\r\n}"; } } return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String toString() {\n return JsonSerializer.SerializeObject(this);\n }", "@Override\n public String toString() {\n return JsonSerializer.SerializeObject(this);\n }", "@Override\n public String toString() {\n return JsonSerializer.SerializeObject(this);\n ...
[ "0.8151526", "0.8151526", "0.8151526", "0.81501764", "0.8121589", "0.80611944", "0.79781705", "0.78058314", "0.78056836", "0.77892566", "0.77558005", "0.7733548", "0.7635621", "0.7635621", "0.7572627", "0.7557845", "0.7492395", "0.7359389", "0.7291851", "0.7277566", "0.726899...
0.70924175
40
Opens a FileChooser that lets the user pick an XML file on the file system.
@Override public Map loadMap() { try { return XMLDeserialiser.loadMap(); } catch (XMLException e) { Popup.showInformation("Le fichier choisi n'est pas un plan valide."); return null; } catch (NoFileChosenException e) { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void selectXmlFile() {\n\t\t JFileChooser chooser = new JFileChooser();\n\t\t // ask for a file to open\n\t\t int option = chooser.showSaveDialog(this);\n\t\t if (option == JFileChooser.APPROVE_OPTION) {\n\t\t\t // get pathname and stick it in the field\n\t\t\t xmlfileField.setText(\n ...
[ "0.763174", "0.6877232", "0.68439287", "0.67638624", "0.6560612", "0.64823085", "0.64336765", "0.63989884", "0.6386646", "0.6332285", "0.62397027", "0.6232797", "0.61741006", "0.6166859", "0.61657506", "0.61427605", "0.6129946", "0.6122468", "0.61027336", "0.60784614", "0.604...
0.0
-1
Returns null, one cannot load a deliveryQuery before loading a Map
@Override public DeliveryQuery loadDeliveryQuery() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic RouteHelper computeDelivery(Map map, DeliveryQuery delivery) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Map loadMap() {\n\t\ttry {\n\t\t\treturn XMLDeserialiser.loadMap();\n\t\t} catch (XMLException e) {\n\t\t\tPopup.showInformation(\"Le fichier choisi n'est pas un plan valide.\");\n\t\t...
[ "0.6083299", "0.5743879", "0.55851686", "0.54556733", "0.542036", "0.5372563", "0.5352863", "0.5334691", "0.530963", "0.5249302", "0.52136916", "0.52016866", "0.5191883", "0.5188456", "0.51819074", "0.51806605", "0.51672715", "0.514174", "0.5135606", "0.5076708", "0.50642395"...
0.6986221
0
Returns null. It shouldn't be called in the InitState
@Override public RouteHelper computeDelivery(Map map, DeliveryQuery delivery) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void init() {}", "@Override\r\n\tprotected void processInit() {\n\t\t\r\n\t}", "@Override\n protected void init() {\n }", "@Override\n public void initState() {\n \n\t//TODO: Complete Method\n\n }", "@Override\n public void init() {}", "@Override\r\n\t\tpublic ...
[ "0.68945307", "0.68776196", "0.68732005", "0.6859234", "0.6807622", "0.680333", "0.67851", "0.6776168", "0.6719203", "0.6719203", "0.6719203", "0.6716717", "0.67130834", "0.67067844", "0.6693822", "0.6671124", "0.6668261", "0.66551507", "0.6653354", "0.6642921", "0.66239715",...
0.0
-1
In the loadMap state, the map isn't present. Therefore this method doesn't draw anything
@Override public void DrawMap(Graphics g, float scale, Map m, DeliveryQuery delivery, RouteHelper routeHelper) { // No action }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void loadMap() {\n\t\tchests.clear();\r\n\t\t// Load the chests for the map\r\n\t\tchestsLoaded = false;\r\n\t\t// Load data asynchronously\r\n\t\tg.p.getServer().getScheduler().runTaskAsynchronously(g.p, new AsyncLoad());\r\n\t}", "@Override\n public void onMapLoaded() {\n mMapStatus = new MapS...
[ "0.71086425", "0.7045485", "0.703113", "0.70310074", "0.690854", "0.6859269", "0.68531454", "0.68434453", "0.67880607", "0.6754656", "0.67531586", "0.6694667", "0.66498744", "0.66422766", "0.66140884", "0.6569453", "0.651449", "0.65015614", "0.6495162", "0.64942294", "0.64828...
0.64144385
28
this only makes sense for boundary events: ignore
public void setCancelActivity(Boolean value) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BoundaryEvent createBoundaryEvent();", "@Override\r\n\tprotected void processIsNotDefinedEvent(InNotDefinedEvent arg0) {\n\t\t\r\n\t}", "@Override\n\tpublic boolean beforeHandle(BaseEvent event) {\n\t\treturn false;\n\t}", "@Override\n\tpublic void processEvent(Event e) {\n\n\t}", "@Override\n public vo...
[ "0.6859755", "0.6271407", "0.6265695", "0.6090588", "0.6033053", "0.59846294", "0.5964646", "0.5884453", "0.58768785", "0.5870365", "0.5844863", "0.5844863", "0.58248234", "0.57361907", "0.57361907", "0.5692438", "0.5668839", "0.56573874", "0.5653886", "0.56534415", "0.565220...
0.0
-1
Creates new service implementation.
public AdmActFilterImpl(ActivationID activationID, MarshalledObject marshalledObject) { activationAdapter = new ActivationAdapter(activationID, marshalledObject); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Service newService();", "Implementation createImplementation();", "SourceBuilder createService();", "public ServiceFactoryImpl() {\n\t\tsuper();\n\t}", "public interface Provider {\n Service newService();\n }", "public abstract ServiceLocator create(String name);", "IServiceContext createServ...
[ "0.7408632", "0.7065486", "0.69760835", "0.69605863", "0.6709286", "0.66826457", "0.6672998", "0.6660397", "0.6635411", "0.6614363", "0.6614363", "0.66067344", "0.6585315", "0.6558718", "0.6557323", "0.6551048", "0.65500414", "0.6542952", "0.6491596", "0.6482176", "0.6475951"...
0.0
-1
Gets the activation adapter.
public ActivationAdapter getActivationAdapter() { return activationAdapter; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Adapter getAdapter() {\n\t\treturn mAdapter;\n\t}", "public String getAdapter() {\n return adapter;\n }", "public ResourceAdapter getResourceAdapter() {\n log.finest(\"getResourceAdapter()\");\n return ra;\n }", "public DbAdapter getAdapter() {\n return adapter;\n }", "pub...
[ "0.63036805", "0.6108875", "0.6090005", "0.58743787", "0.5734241", "0.55713195", "0.5564254", "0.5537853", "0.55093557", "0.5508087", "0.54803437", "0.5458815", "0.54412025", "0.5411562", "0.53782946", "0.5370904", "0.5365312", "0.5357216", "0.53379345", "0.53270775", "0.5258...
0.8306332
0
Sets the activatable factory.
public void setActivatableFactory(ActivatableFactory activatableFactory) { this.activatableFactory = activatableFactory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setFactoryBean( FactoryBean factory );", "public void setFeatureFactory(FeatureFactory featureFactory) {\n factory = featureFactory;\n }", "public static synchronized void setFactory(final ANSSRegionsFactory factory) {\n if (SINGLETON != null) {\n SINGLETON.shutdown();\n ...
[ "0.6577757", "0.61476535", "0.6010666", "0.6008728", "0.5860684", "0.58564544", "0.5797863", "0.5744537", "0.57387906", "0.5621901", "0.56198174", "0.5579512", "0.5534648", "0.5524818", "0.55170184", "0.54505706", "0.5414433", "0.5358609", "0.5339411", "0.5323765", "0.5310005...
0.82890165
0
Destroys this service implementation.
public void destroy() throws RemoteException { Thread thread = new Thread() { public void run() { //System.setProperty("terminatingHello", "true"); //System.err.println("Shutting down service"); //System.err.println("Terminating - checking activation ID"); try { AdmActFilterImpl.super.destroy(); activatableFactory.unregister(activationAdapter.getActivationID()); System.out.println("destroyed!"); /* while (!Activatable.inactive(id)) { Thread.yield(); } ActivationSystem activationSystem = ActivationGroup.getSystem(); ActivationDesc activationDesc = activationSystem.getActivationDesc(id); ActivationGroupID gid = activationDesc.getGroupID(); activationSystem.unregisterGroup(gid); */ } catch(Exception e) { e.printStackTrace(); } } }; thread.setDaemon(false); thread.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onDestroy() {\n\t\tLog.i(TAG, \"service on destory\");\n\t\tsuper.onDestroy();\n\t}", "@Override\n public void onDestroy() {\n stopService();\n }", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\t\n\t\ttry {\n\t\t\tstopService(mServiceIntent);\n\t\t...
[ "0.7359326", "0.7355452", "0.733736", "0.73234063", "0.73002434", "0.7245019", "0.71612847", "0.7086226", "0.7060323", "0.6968762", "0.69485915", "0.68954086", "0.68904793", "0.6866727", "0.68327314", "0.67942494", "0.67685086", "0.67459935", "0.6743321", "0.67386127", "0.671...
0.0
-1
System.setProperty("terminatingHello", "true"); System.err.println("Shutting down service"); System.err.println("Terminating checking activation ID");
public void run() { try { AdmActFilterImpl.super.destroy(); activatableFactory.unregister(activationAdapter.getActivationID()); System.out.println("destroyed!"); /* while (!Activatable.inactive(id)) { Thread.yield(); } ActivationSystem activationSystem = ActivationGroup.getSystem(); ActivationDesc activationDesc = activationSystem.getActivationDesc(id); ActivationGroupID gid = activationDesc.getGroupID(); activationSystem.unregisterGroup(gid); */ } catch(Exception e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void quitService() {\n output.println(\"Quit command\");\n output.println(\"End session\");\n }", "public void abnormalShutDown() {\n\t}", "public void shutdown(){\n \tSystem.out.println(\"SHUTTING DOWN..\");\n \tSystem.exit(0);\n }", "public void destroy() throws RemoteExce...
[ "0.6414874", "0.6178868", "0.6119463", "0.61119664", "0.61026126", "0.6002817", "0.5999605", "0.5987725", "0.5901536", "0.58738625", "0.58122534", "0.5754515", "0.57129604", "0.56772345", "0.562865", "0.56144387", "0.5609274", "0.5589788", "0.5524632", "0.552316", "0.5519601"...
0.0
-1
Returns a new chunk provider which generates chunks for this world
public IChunkProvider createChunkGenerator() { return new ChunkProviderXirk(this.worldObj, this.worldObj.getSeed(), false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public IChunkProvider createChunkGenerator() {\n\t\treturn new ChunkProviderEnd(this.worldObj, this.worldObj.getSeed());\n\t}", "@Override\n\tpublic IChunkProvider createChunkGenerator()\n\t{\n\t\treturn new ChunkProviderHeaven(worldObj, worldObj.getSeed(), true);\n\t}", "public IChunkProvider getChunkProvider...
[ "0.8048801", "0.7722068", "0.7505888", "0.707784", "0.6786806", "0.6710602", "0.6632231", "0.6135642", "0.61233115", "0.61139864", "0.6098649", "0.5922811", "0.59134763", "0.5874584", "0.5865816", "0.57533956", "0.57490426", "0.5629667", "0.55543584", "0.54502404", "0.5420026...
0.8059592
0
Returns 'true' if in the "main surface world", but 'false' if in the Nether or End dimensions.
public boolean isSurfaceWorld() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isSurfaceWorld() {\n\t\treturn false;\n\t}", "private final boolean isInsideWorld() {\n\t\t// Check it is inside the world\n\t\tif (x<=0 || y<=0 || x+width>=_world.getWidth() || y+height>=_world.getHeight()) {\n\t\t\tif (_mass == 0 && alive && x == 0 && y == 0)\n\t\t\t\tdie(this);\n\t\t\t// Adjust...
[ "0.7427343", "0.6778134", "0.65980434", "0.6570593", "0.64822423", "0.6473109", "0.6473109", "0.6432754", "0.62925434", "0.61767566", "0.6086545", "0.6043409", "0.6012423", "0.60010666", "0.5994442", "0.59809166", "0.59713393", "0.59657806", "0.59602964", "0.59513533", "0.594...
0.719197
1
Will check if the x, z position specified is alright to be set as the map spawn point
public boolean canCoordinateBeSpawn(int par1, int par2) { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isGoodLocation(World world, int x, int y, int z);", "public boolean canCoordinateBeSpawn(int par1, int par2) {\n\t\tint var3 = this.worldObj.getFirstUncoveredBlock(par1, par2);\n\t\treturn var3 == 0 ? false : Block.blocksList[var3].blockMaterial.blocksMovement();\n\t}", "@Override\n\tpublic boolean can...
[ "0.71072644", "0.69230056", "0.66852754", "0.66142344", "0.6498464", "0.6492493", "0.645123", "0.64429027", "0.63707095", "0.6366291", "0.636114", "0.6353445", "0.6314626", "0.63062716", "0.62973946", "0.6264909", "0.6264817", "0.6260617", "0.6260617", "0.6260617", "0.6251020...
0.72894025
0
Calculates the angle of sun and moon in the sky relative to a specified time (usually worldTime)
public float calculateCelestialAngle(long par1, float par3) { return 0.5F; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private float angleFromSunToZenith(float solarTime, float solarDeclination, float latitude) {\r\n\t return (float)(\r\n \t\tMath.PI / 2 - \r\n \t\tMath.asin(\r\n\t\t\t\tMath.sin(latitude) * Math.sin(solarDeclination) - \r\n\t\t\t\tMath.cos(latitude) * Math.cos(solarDeclination) * Math.cos(Math.PI * solarT...
[ "0.6674583", "0.6504533", "0.61567855", "0.58163786", "0.56228626", "0.55237275", "0.5481457", "0.5403072", "0.53819203", "0.53523993", "0.52821463", "0.52516764", "0.52445966", "0.52373445", "0.5216615", "0.52077806", "0.52044785", "0.51956826", "0.5184696", "0.51828575", "0...
0.51818025
20
True if the player can respawn in this dimension (true = overworld, false = nether).
public boolean canRespawnHere() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean canRespawnHere() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean canRespawnHere()\n\t{\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean canRespawnHere() {\n\t\treturn true;\n\t}", "private boolean getValidRespawnPosition(int x, int y, int imageW, int imageH) {\n\t\tRectangle iRe...
[ "0.72135967", "0.7026403", "0.7001057", "0.6688729", "0.65982646", "0.65223753", "0.64828306", "0.6452856", "0.6337443", "0.62194794", "0.6195202", "0.6139196", "0.61226225", "0.61041635", "0.6083275", "0.60031223", "0.5995779", "0.59512204", "0.59448093", "0.59235597", "0.58...
0.71926177
1
Constructor which allows specifying custom cursors.
public MousePointerManager(int enabledCursor, int disabledCursor, int waitCursor) { this.enabledCursor = Cursor.getPredefinedCursor(enabledCursor); this.disabledCursor = Cursor.getPredefinedCursor(disabledCursor); this.waitCursor = Cursor.getPredefinedCursor(waitCursor); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Cursor buildCursor();", "public MyCursorWrapper(Cursor cursor) {\n super(cursor);\n }", "public BorrowerCursor(Cursor cursor) {\n super(cursor);\n }", "@Override\n public void setCursorName(String unused) throws SQLException {\n throw new SQLException(\"tinySQL does no...
[ "0.6990464", "0.67420197", "0.66033083", "0.6465734", "0.6395115", "0.6221607", "0.61290836", "0.6078993", "0.60398453", "0.60188425", "0.5987035", "0.5921062", "0.5891309", "0.5847896", "0.58032405", "0.57791066", "0.574735", "0.57259357", "0.5707685", "0.57050914", "0.56891...
0.5419666
35
Constructor which allows specifying custom cursors.
public MousePointerManager(Cursor enabledCursor, Cursor disabledCursor, Cursor waitCursor) { this.enabledCursor = enabledCursor; this.disabledCursor = disabledCursor; this.waitCursor = waitCursor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Cursor buildCursor();", "public MyCursorWrapper(Cursor cursor) {\n super(cursor);\n }", "public BorrowerCursor(Cursor cursor) {\n super(cursor);\n }", "@Override\n public void setCursorName(String unused) throws SQLException {\n throw new SQLException(\"tinySQL does no...
[ "0.69918895", "0.6742293", "0.66037476", "0.6466891", "0.6396032", "0.6222142", "0.61305887", "0.6080984", "0.6039936", "0.60205257", "0.59879977", "0.59224963", "0.58917755", "0.5847563", "0.58043975", "0.5779394", "0.5747699", "0.57255363", "0.57080543", "0.570712", "0.5689...
0.528214
50
Sets the cursor for the status Enabled.
public void setEnabledCursor(Cursor enabledCursor) { this.enabledCursor = enabledCursor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDisabledCursor(Cursor disabledCursor) {\r\n this.disabledCursor = disabledCursor;\r\n }", "public Cursor getEnabledCursor() {\r\n return enabledCursor;\r\n }", "private void setBusyCursor(){\r\n\t\tlensdiagram.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\r\n\t}"...
[ "0.7425441", "0.67366517", "0.6735869", "0.6395061", "0.62629724", "0.6204675", "0.61486363", "0.6143616", "0.6106916", "0.6097468", "0.6096279", "0.60879666", "0.60504586", "0.6018932", "0.59996897", "0.59692794", "0.5968761", "0.5965765", "0.5951073", "0.58939296", "0.58812...
0.80246663
0
Sets the cursor for the status Disabled.
public void setDisabledCursor(Cursor disabledCursor) { this.disabledCursor = disabledCursor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Cursor getDisabledCursor() {\r\n return disabledCursor;\r\n }", "public void cursorOff();", "public void setEnabledCursor(Cursor enabledCursor) {\r\n this.enabledCursor = enabledCursor;\r\n }", "private void setBusyCursor(){\r\n\t\tlensdiagram.setCursor(Cursor.getPredefinedCursor(C...
[ "0.74401987", "0.72242063", "0.70126444", "0.6556496", "0.64765877", "0.644537", "0.6393874", "0.63920337", "0.6365723", "0.6357092", "0.63194144", "0.6260659", "0.6242104", "0.6242104", "0.6226268", "0.6149802", "0.61446023", "0.61441666", "0.6113256", "0.6093318", "0.608760...
0.8222318
0
Sets the cursor for the status Wait.
public void setWaitCursor(Cursor waitCursor) { this.waitCursor = waitCursor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setBusyCursor(){\r\n\t\tlensdiagram.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\r\n\t}", "public Cursor getWaitCursor() {\r\n return waitCursor;\r\n }", "public void setCursorEspera() {\r\n\t\tshell.setCursor(new Cursor(display, SWT.CURSOR_WAIT));\r\n\t}", "public void s...
[ "0.7306761", "0.67134464", "0.6556609", "0.6467774", "0.6419507", "0.63883644", "0.6303463", "0.6254595", "0.60435015", "0.59225947", "0.5900686", "0.5874966", "0.58675253", "0.58092487", "0.5807817", "0.57843566", "0.5771431", "0.5755728", "0.5745115", "0.573599", "0.5715558...
0.8364403
0
Returns the cursor for the status Enabled.
public Cursor getEnabledCursor() { return enabledCursor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Cursor getDisabledCursor() {\r\n return disabledCursor;\r\n }", "public Cursor getCursor() {\n Cursor cursor = super.getCursor();\n\n\t\tif ( cursor == Cursor.getPredefinedCursor( Cursor.DEFAULT_CURSOR) && isEnabled()) {\n\t\t\tcursor = Cursor.getPredefinedCursor( Cursor.HAND_CURSOR);\n\t...
[ "0.7103085", "0.6373315", "0.6310582", "0.6126242", "0.5935138", "0.59026754", "0.58123857", "0.580085", "0.57551366", "0.57450074", "0.57209224", "0.57119685", "0.56991535", "0.56984115", "0.56690073", "0.5637475", "0.56363153", "0.5618877", "0.5470202", "0.54517543", "0.542...
0.7829211
0
Returns the cursor for the status Disabled.
public Cursor getDisabledCursor() { return disabledCursor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Cursor getEnabledCursor() {\r\n return enabledCursor;\r\n }", "public void setDisabledCursor(Cursor disabledCursor) {\r\n this.disabledCursor = disabledCursor;\r\n }", "public Cursor getCursor() {\n Cursor cursor = super.getCursor();\n\n\t\tif ( cursor == Cursor.getPredefinedC...
[ "0.7111528", "0.67562664", "0.6187403", "0.61244124", "0.58419317", "0.58368486", "0.56876564", "0.56558865", "0.5592599", "0.5584929", "0.55810636", "0.55587894", "0.5537337", "0.55045223", "0.550446", "0.54913884", "0.5460229", "0.5436493", "0.54269314", "0.54257363", "0.54...
0.81941855
0
Returns the cursor for the status Wait.
public Cursor getWaitCursor() { return waitCursor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setWaitCursor(Cursor waitCursor) {\r\n this.waitCursor = waitCursor;\r\n }", "public int getCursor() { return curs; }", "public abstract long getCursor();", "public java.lang.String getCursor() {\n return cursor_;\n }", "public com.google.protobuf.ByteString\n getCursorBytes(...
[ "0.6515736", "0.622805", "0.6099075", "0.60037816", "0.5995614", "0.5857297", "0.5842597", "0.578931", "0.5779793", "0.5645446", "0.5638956", "0.5633529", "0.5622065", "0.5571335", "0.5551133", "0.5532759", "0.55294615", "0.5499181", "0.5489042", "0.5480665", "0.54706687", ...
0.8114472
0
Adds a component to the ones managed by this MousePointerManager. Does not do anything is the component is already managed by this MousePointerManager.
public void add(JComponent comp) { if (listeners.containsKey(comp)) return; if (comp.isEnabled()) { comp.setCursor(enabledCursor); } PropertyChangeListener listener = (PropertyChangeEvent evt) -> { JComponent src = (JComponent) evt.getSource(); if (src.isEnabled()) { src.setCursor(enabledCursor); } else { src.setCursor(disabledCursor); } }; listeners.put(comp, listener); comp.addPropertyChangeListener("enabled", listener); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addComponent(Component c);", "void addComponent(Component component);", "public void addComponent(Component component){\n components.add(component);\n }", "@Override\n\tpublic Component add(Component comp) {\n\t\tcomp.addMouseListener(mouseListener);\n\t\treturn super.add(comp);\n\t}", ...
[ "0.71255225", "0.70725155", "0.6833615", "0.6767638", "0.6748303", "0.66917837", "0.6527575", "0.65142184", "0.6478355", "0.64759696", "0.63094497", "0.63002306", "0.62150556", "0.6189177", "0.6183674", "0.6183468", "0.6171145", "0.60753965", "0.6072396", "0.6001771", "0.5966...
0.64086515
10
Removes a component from this MousePointerManager.
public void remove(JComponent comp) { PropertyChangeListener listener = listeners.get(comp); if (listener == null) return; comp.removePropertyChangeListener("enabled", listener); listeners.remove(comp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeComponent(Component c);", "public void removeComponent(DrawingComponent component) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void removeLayoutComponent(Component component) { }", "public X removeMouseMotionListener(MouseMotionListener listener) {\n component.remo...
[ "0.6844012", "0.68398017", "0.6750312", "0.6677113", "0.6614219", "0.6511271", "0.6511271", "0.6438631", "0.63879794", "0.6328168", "0.6315098", "0.62465197", "0.6233955", "0.621189", "0.61973375", "0.6188949", "0.60287476", "0.60190296", "0.60141706", "0.5976783", "0.5957182...
0.600035
19
Migrates all component currently manager by this MousePointerManager to another MousePointerManager.
public void migrate(MousePointerManager mpm) { listeners.keySet().forEach(comp -> { remove(comp); mpm.add(comp); }); listeners.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void moveComponentsFrom(ComponentContainer source);", "@Override\n\tpublic void mouseReleased(MouseEvent e)\n\t{\n\t\tif (!potentialDrag) return;\n\n\t\tswappedComponent = null;\n\t\tswappedComponentPreviousLocation = null;\n\t\tsource.removeMouseMotionListener( this );\n\t\tpotentialDrag = false;\n\n\t\t...
[ "0.54086477", "0.5196031", "0.5119884", "0.5062097", "0.49915257", "0.47707796", "0.4760942", "0.47559783", "0.4746242", "0.47398883", "0.4738184", "0.47201493", "0.47063035", "0.46979356", "0.46904618", "0.46728185", "0.4658019", "0.46502537", "0.46289602", "0.46289602", "0....
0.6643182
0
Refreshes the pointer for the given component, based on ints current status (enabled / disabled).
public void refresh(JComponent comp) { if (comp.isEnabled()) { comp.setCursor(enabledCursor); } else { comp.setCursor(disabledCursor); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setComponentStatus() {}", "@Override\n public void refresh() {\n if (isReinitOnRefresh()) {\n initPages();\n }\n if (currentIndex >= pages.size()) {\n currentIndex = 0;\n }\n try {\n if (!getCurrentComponent().equals(pages.get(cu...
[ "0.6014034", "0.539644", "0.5288827", "0.5266934", "0.5232675", "0.52257174", "0.51953584", "0.51542985", "0.51298696", "0.5074906", "0.5051948", "0.5035822", "0.49348006", "0.49267405", "0.4914273", "0.48989475", "0.48839423", "0.48790973", "0.48786628", "0.4851108", "0.4844...
0.6118518
0
Starts the given thread, wait for its completion and in the meantime sets the wait cursor for the supplied component. The original mouse pointer is restored when the thread completes its execution.
public void waitCursorForAction(JComponent comp, Thread thr) { waitCursorForAction(comp, thr, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void waitCursorForAction(JComponent comp, Thread thr, boolean disable) {\r\n Cursor orig = comp.getCursor();\r\n boolean status = comp.isEnabled();\r\n if (disable) comp.setEnabled(false);\r\n comp.setCursor(waitCursor);\r\n thr.start();\r\n try {\r\n thr...
[ "0.6705782", "0.57275873", "0.56866366", "0.524492", "0.5230543", "0.5218358", "0.51849693", "0.5041156", "0.5039059", "0.50208175", "0.5012513", "0.5006319", "0.4996373", "0.49942663", "0.49816492", "0.49686155", "0.4959792", "0.49582285", "0.49424034", "0.493256", "0.490493...
0.6578246
1
Starts the given thread, wait for its completion and in the meantime sets the wait cursor for the supplied component. The original mouse pointer is restored when the thread completes its execution. It is also possible to disabled the component while the action is performed.
public void waitCursorForAction(JComponent comp, Thread thr, boolean disable) { Cursor orig = comp.getCursor(); boolean status = comp.isEnabled(); if (disable) comp.setEnabled(false); comp.setCursor(waitCursor); thr.start(); try { thr.join(); } catch (InterruptedException ex) { Logger.getLogger(MousePointerManager.class.getName()).log(Level.SEVERE, null, ex); } if (disable) comp.setEnabled(status); comp.setCursor(orig); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void waitCursorForAction(JComponent comp, Thread thr) {\r\n waitCursorForAction(comp, thr, false);\r\n }", "private void setBusyCursor(){\r\n\t\tlensdiagram.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\r\n\t}", "public MousePointerManager(Cursor enabledCursor, Cursor disabledCurs...
[ "0.6869755", "0.5623966", "0.5463431", "0.5401782", "0.53554016", "0.522144", "0.5187868", "0.517529", "0.5145582", "0.50620633", "0.5020098", "0.50085044", "0.5000449", "0.4985618", "0.49806216", "0.49699816", "0.4957334", "0.49528152", "0.49454674", "0.49422532", "0.4930822...
0.7199446
0
Creates or finds a RestoreDetailsName from its string representation.
@JsonCreator public static RestoreDetailsName fromString(String name) { return fromString(name, RestoreDetailsName.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@JsonCreator\n public static CreateMode fromString(String name) {\n return fromString(name, CreateMode.class);\n }", "@JsonCreator\n public static RoleDefinitionType fromString(String name) {\n return fromString(name, RoleDefinitionType.class);\n }", "private String extarctStudentName...
[ "0.4559129", "0.45071015", "0.44756737", "0.441925", "0.4384792", "0.43632028", "0.43429446", "0.43379337", "0.432347", "0.4303341", "0.42889336", "0.42246926", "0.42170492", "0.42160437", "0.41695505", "0.4132893", "0.41311187", "0.41305277", "0.41279364", "0.4093857", "0.40...
0.7331853
0
Gets known RestoreDetailsName values.
public static Collection<RestoreDetailsName> values() { return values(RestoreDetailsName.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] getDetails() {\n\t\treturn details;\n\t}", "java.lang.String getDetails();", "public String[] getDetailsAboutThisMachine() throws StoreFactoryException;", "public String[] getNameAndDescription(){\n return roleDescriptions.get(getRole());\n }", "public String[] getSaveDetails(){\n...
[ "0.58274734", "0.56218475", "0.5525019", "0.54472244", "0.53540355", "0.51788735", "0.51788735", "0.5173919", "0.5173919", "0.5152658", "0.5118764", "0.51185167", "0.51038057", "0.5097458", "0.50514734", "0.50486135", "0.5048246", "0.5048067", "0.5042319", "0.5023137", "0.501...
0.786334
0
Created by Michael on 30. 7. 2015. Useless now.
public interface IModuleContextTabletActivity extends IModuleContext { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r...
[ "0.604355", "0.6036747", "0.5894834", "0.58379817", "0.58321863", "0.5811219", "0.5763857", "0.5755277", "0.57498187", "0.57071704", "0.57062864", "0.56905615", "0.56905615", "0.5643659", "0.56349427", "0.5634496", "0.56160563", "0.56127465", "0.56005514", "0.5591839", "0.558...
0.0
-1
String[], on an existing ComboBox: Iterates through all items. Get the strings and return them as an array. Lindhauer; 06.05.2006 08:34:25
public String[] getStringAll(){ String[] saReturn = null; main:{ JComboBox objCombo = this.getJComboBox(); check:{ if(objCombo==null) break main; if(objCombo.getItemCount()==0) break main; }//END check: saReturn = new String[objCombo.getItemCount()]; for(int icount=0; icount < objCombo.getItemCount(); icount++){ saReturn[icount] = (String) objCombo.getItemAt(icount); } }//END main: return saReturn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String[] processComboBox(String sql)\n {\n Connection con = null;\n PreparedStatement pstmt = null;\n ResultSet rset = null;\n String user = \"ua305\";\n String pass = \"UApass11\";\n String url = \"jdbc:db2://data.cis.uafs.edu:55000/DATAWH\";\n \n ...
[ "0.6567247", "0.6487617", "0.62920415", "0.6213632", "0.6208329", "0.6150631", "0.61503863", "0.61257815", "0.6071", "0.60708314", "0.6054973", "0.60376537", "0.5998043", "0.5886218", "0.5878781", "0.5877934", "0.58419436", "0.58063847", "0.575381", "0.56977355", "0.5666308",...
0.8089425
0
This function add the headers to the table
public void addHeaders() { TableLayout tl = findViewById(R.id.table); TableRow tr = new TableRow(this); tr.setLayoutParams(getLayoutParams()); if (!haverford) { tr.addView(getTextView(0, "Leave Bryn Mawr", Color.WHITE, Typeface.BOLD, Color.BLUE)); tr.addView(getTextView(0, "Arrive Haverford", Color.WHITE, Typeface.BOLD, Color.BLUE)); } else { tr.addView(getTextView(0, "Leave Haverford", Color.WHITE, Typeface.BOLD, Color.BLUE)); tr.addView(getTextView(0, "Arrive Bryn Mawr", Color.WHITE, Typeface.BOLD, Color.BLUE)); } tl.addView(tr, getTblLayoutParams()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addHeaders(){\n\n /** Create a TableRow dynamically **/\n tr = new TableRow(this);\n tr.setLayoutParams(new TableRow.LayoutParams(\n TableRow.LayoutParams.MATCH_PARENT,\n TableRow.LayoutParams.WRAP_CONTENT));\n\n /** Creating a TextView to add ...
[ "0.7766717", "0.76947117", "0.7375795", "0.73414534", "0.7152265", "0.70496863", "0.69540757", "0.68838865", "0.6849233", "0.6829309", "0.6744926", "0.6733538", "0.6726569", "0.67247146", "0.6710972", "0.66644573", "0.6660721", "0.6597715", "0.6577051", "0.65719885", "0.65718...
0.8130265
0
This function add the data to the table
public void addData() { if (daySchedule == null) { return; } int numTimes = daySchedule.size(); TableLayout tl = findViewById(R.id.table); int chosenTime = MainActivity.hour * 60 + MainActivity.minute; if(chosenTime == 0) { Calendar now = Calendar.getInstance(); chosenTime = now.get(Calendar.HOUR_OF_DAY) * 60 + now.get(Calendar.MINUTE);; } for (int i = 0; i < numTimes; i++) { TableRow tr = new TableRow(this); tr.setLayoutParams(getLayoutParams()); Time t = daySchedule.get(i); if (!haverford) { if (Time.toMinutes(t.leaveBrynMawr()) > chosenTime) { Log.d("brynmawrtime", String.valueOf(Time.toMinutes(t.leaveBrynMawr()))); tr.addView(getTextView(i + 1, t.leaveBrynMawr(), Color.WHITE, Typeface.NORMAL, ContextCompat.getColor(this, R.color.colorAccent))); tr.addView(getTextView(i + numTimes, t.arriveHaverford(), Color.WHITE, Typeface.NORMAL, ContextCompat.getColor(this, R.color.colorAccent))); } } else { if (Time.toMinutes(t.leaveHaverford()) > chosenTime) { tr.addView(getTextView(i + 1, t.leaveHaverford(), Color.WHITE, Typeface.NORMAL, ContextCompat.getColor(this, R.color.colorAccent))); tr.addView(getTextView(i + numTimes, t.arriveBrynMawr(), Color.WHITE, Typeface.NORMAL, ContextCompat.getColor(this, R.color.colorAccent))); } } tl.addView(tr, getTblLayoutParams()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addTabularData(TabularData data);", "private void addRows() {\n this.SaleList.forEach(Factura -> {\n this.modelo.addRow(new Object[]{\n Factura.getId_Factura(),\n Factura.getPersona().getNombre(),\n Factura.getFecha().getTimestamp(),\n ...
[ "0.7472956", "0.7187233", "0.7122373", "0.7067609", "0.70024806", "0.6931267", "0.6905055", "0.6890517", "0.68802625", "0.685132", "0.681787", "0.68018156", "0.6780961", "0.6773017", "0.67540735", "0.67117447", "0.66742486", "0.66262054", "0.6595733", "0.6594803", "0.6560045"...
0.0
-1
starts at position 0,
public static void helpermethod(int numberofsteps){ ways(numberofsteps, 0, "["); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startPosition();", "@Override\n\tpublic int getPosition() {\n\t\treturn 0;\n\t}", "public void setPosition(){\r\n currentPosition = 0; \r\n }", "@Override\n\tpublic int getStartOffset() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int getPos() {\n\t\treturn 0;\n\t}", ...
[ "0.71940005", "0.7057453", "0.7002745", "0.69083345", "0.68740886", "0.67125213", "0.66852087", "0.66742355", "0.6649662", "0.6620427", "0.6609623", "0.65829945", "0.6573397", "0.65239215", "0.65222114", "0.6514179", "0.64887834", "0.64741", "0.6452659", "0.632656", "0.626801...
0.0
-1
TODO: 05.02.2017 Add automate check.
@Test public void getImageForLessonNumber() throws Exception { for (int i = 0; i < 10; i++) { int imageForLessonNumber = CardViewFactory.getImageResourceForLessonNumber(i); System.out.println(i + " - " + imageForLessonNumber); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void check() {\n\t\t\n\t}", "@Override\n\tpublic void check() {\n\t\t\n\t}", "public abstract String check() throws Exception;", "@Override\n\tpublic void check() throws Exception {\n\t}", "void check();", "void check();", "public void checkData2019() {\n\n }", "void checkValid...
[ "0.6520076", "0.6520076", "0.59893215", "0.59323347", "0.5879223", "0.5879223", "0.5810768", "0.5792349", "0.57040113", "0.5702053", "0.57008404", "0.56905174", "0.56385374", "0.5618167", "0.55806404", "0.5579444", "0.5572597", "0.5553118", "0.5543263", "0.5540915", "0.553524...
0.0
-1
Accepts incoming join requests. Function either pairs the connection with a pending player, or pushes it to the pending players queue. Requests are handled in parallel, no synchronization is necessary.
public static WebSocket<JsonNode> join() { return new WebSocket<JsonNode>() { @Override public void onReady(In<JsonNode> in, Out<JsonNode> out) { ConnectedPlayer lowerPlayer = new ConnectedPlayer(in, out); log.trace("Incoming {}.", lowerPlayer); // Tell the player that we are trying to find a pair. new WaitingForOpponent(lowerPlayer.getId()).write(out); // Try to pair the incoming player with another player. ConnectedPlayer upperPlayer = pendingPlayers.poll(); if (upperPlayer != null) { Game game = new Game( upperPlayer, lowerPlayer, new Game.ShutdownListener() { @Override public void onGameShutdown(String gameId) { Application.onGameShutdown(gameId); } }); game.start(); games.put(game.getId(), game); log.trace("Started {} with {} and {}.", game, upperPlayer, lowerPlayer); } // Else, queue the player into the waiting list. else { pendingPlayers.add(lowerPlayer); log.trace("Queued {}.", lowerPlayer); } } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "GameJoinResult join(Player player);", "public void sendJoiningPlayer() {\r\n Player p = nui.getPlayerOne();\r\n XferJoinPlayer xfer = new XferJoinPlayer(p);\r\n nui.notifyJoinConnected();\r\n networkPlayer.sendOutput(xfer);\r\n }", "@Override\n\tpublic void playerJoining(String playerID) ...
[ "0.6285038", "0.61463267", "0.6121682", "0.58949274", "0.5815191", "0.575076", "0.5708103", "0.57062835", "0.56999743", "0.5696369", "0.5684618", "0.5669008", "0.5651125", "0.56438303", "0.55521446", "0.550375", "0.5499226", "0.54961044", "0.5489539", "0.54310536", "0.5419547...
0.6703895
0
Closes player connections and cleans up data structures.
public static void onGameShutdown(String gameId) { Game game = games.remove(gameId); for (ConnectedPlayer player : game.getPlayers()) player.getOutputSocket().close(); log.trace("Closed {}.", game); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n @SuppressWarnings(\"empty-statement\")\r\n public void close()\r\n {\r\n curDb_ = null;\r\n curConnection_ = null;\r\n try\r\n {\r\n for(Map.Entry<Db_db, Connection> entry: connections_.entrySet())\r\n {\r\n entry.getValue().cl...
[ "0.65572315", "0.6553491", "0.6504625", "0.64653987", "0.6432687", "0.640479", "0.6385244", "0.63454545", "0.63454545", "0.6322022", "0.63107216", "0.628634", "0.62769145", "0.62763053", "0.6275914", "0.6264455", "0.62601376", "0.6253073", "0.6249087", "0.6248698", "0.6205829...
0.0
-1
Called when the activity is first created.
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_backuplist); // OK BUTTON : Start temporary Backup on phone, if "OK" Button is // pressed Button okButton = (Button) findViewById(R.id.BackUpList_ButtonOK); okButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Intent i = getIntent(); final CheckBox contactCheckBox = (CheckBox) findViewById(R.id.BackUpList_CheckboxContact); if (contactCheckBox.isChecked()) { if (GlobalData.T.getRequest_Code() == 0) { GlobalData.T.setU_Contact(1); } if (GlobalData.T.getRequest_Code() == 1) { GlobalData.T.setD_Contact(1); } // // ************Syncing Contacts********** // try { // Sync.contactSync(x); // } catch (JSONException e) { // // TODO Auto-generated catch block // e.printStackTrace(); // Toast.makeText( // getApplicationContext(), // "Could not sync contacts: JSONException " // + e.getLocalizedMessage(), // Toast.LENGTH_LONG).show(); // return; // } catch (IOException e) { // // TODO Auto-generated catch block // e.printStackTrace(); // Toast.makeText( // getApplicationContext(), // "Could not sync contacts: IOException " // + e.getLocalizedMessage(), // Toast.LENGTH_LONG).show(); // return; // } catch (Exception e) { // e.printStackTrace(); // Toast.makeText( // getApplicationContext(), // "Could not sync contacts: Exception " // + e.getLocalizedMessage(), // Toast.LENGTH_LONG).show(); // return; // } // // Toast.makeText(getApplicationContext(), // "ContactsSynced!", // Toast.LENGTH_LONG).show(); } final CheckBox smsCheckBox = (CheckBox) findViewById(R.id.BackUpList_CheckboxSMS); if (smsCheckBox.isChecked()) { if (GlobalData.T.getRequest_Code() == 0) { GlobalData.T.setU_SMS(1); } if (GlobalData.T.getRequest_Code() == 1) { GlobalData.T.setD_SMS(1); } // // *********Syncing SMS************* // // try { // Sync.smsSync(x); // } catch (JSONException e) { // // TODO Auto-generated catch block // e.printStackTrace(); // Toast.makeText( // getApplicationContext(), // "Could not sync SMSs: JSONException " // + e.getLocalizedMessage(), // Toast.LENGTH_LONG).show(); // return; // } catch (IOException e) { // // TODO Auto-generated catch block // e.printStackTrace(); // Toast.makeText( // getApplicationContext(), // "Could not sync SMSs: IOException " // + e.getLocalizedMessage(), // Toast.LENGTH_LONG).show(); // return; // } catch (Exception e) { // e.printStackTrace(); // Toast.makeText( // getApplicationContext(), // "Could not sync SMSs: Exception " // + e.getLocalizedMessage(), // Toast.LENGTH_LONG).show(); // return; // } // // Toast.makeText(getApplicationContext(), "SMSsSynced!", // Toast.LENGTH_LONG).show(); } final CheckBox photoCheckBox = (CheckBox) findViewById(R.id.BackUpList_CheckboxPhotos); if (photoCheckBox.isChecked()) { // Write Code for Syncing Photos } final CheckBox textfileCheckBox = (CheckBox) findViewById(R.id.BackUpList_Checkbox_Textfiles); if (textfileCheckBox.isChecked()) { // Write Code for Syncing Photos } setResult(RESULT_OK, i); finish(); } }); // CANCEL BUTTON : go to previous screen, if "Cancel" Button is pressed Button cancelButton = (Button) findViewById(R.id.BackUpList_ButtonCancel); cancelButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); finish(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "@Override\n\tpublic void onActivit...
[ "0.791686", "0.77270156", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7637394", "0.7637394", "0.7629958", "0.76189965", "0.76189965", "0.7543775", "0.7540053", "0.7540053", "0.7539505", "0.75269467", "0.75147736", "0.7509639", "0.7500879",...
0.0
-1
This variable contains the list of allowable characters for the pass phrase. Note that the number 0 and the letter 'O' have been removed to avoid confusion between the two. The same is true of 'I', 1, and 'l'.
public static String generatePassPhrase(int length) { LOG.debug("generate new random passphrase with length: " + length); final char[] allowableCharacters = new char[]{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '2', '3', '4', '5', '6', '7', '8', '9'}; StringBuilder pass = new StringBuilder(); for (int i = 0; i < length; i++) { pass.append(allowableCharacters[RandomUtils.nextInt(0, allowableCharacters.length)]); } return pass.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final char[] validChars() {\n\t\t\treturn VALID_ALPHABET;\n\t\t}", "private char[] alphanumeric(){\n StringBuffer buf=new StringBuffer(128);\n for(int i=48; i<= 57;i++)buf.append((char)i); // 0-9\n for(int i=65; i<= 90;i++)buf.append((char)i); // A-Z\n for(int i=97; i<=122;i++)buf.append((char...
[ "0.67000586", "0.60965765", "0.6084119", "0.5906693", "0.5895661", "0.58862114", "0.58548766", "0.58217", "0.5728925", "0.57106376", "0.56297886", "0.5627805", "0.5607805", "0.56002915", "0.55877745", "0.5561333", "0.5485702", "0.54773897", "0.545311", "0.54413205", "0.543180...
0.5258085
42
Open an XML file and process the contents.
public static void processCustomerMgmt() throws IOException, XMLStreamException, ParseException { futureNullDate = formatter.parse("2999-12-31"); deleteDatabase(); XMLInputFactory xmlif = XMLInputFactory.newInstance(); xmlif.setEventAllocator(new XMLEventAllocatorImpl()); allocator = xmlif.getEventAllocator(); XMLStreamReader xmlr = xmlif.createXMLStreamReader(filename, new FileInputStream(filename)); int eventType = xmlr.getEventType(); while (xmlr.hasNext()) { eventType = xmlr.next(); if (eventType == XMLStreamConstants.START_ELEMENT && xmlr.getLocalName().equals("Action") && mode == Mode.NULL) { StartElement event = getXMLEvent(xmlr).asStartElement(); Attribute attr = event.getAttributeByName(new QName("ActionType")); // System.out.println ("Action: " + attr.getValue()); switch (attr.getValue()) { case "NEW": System.out.println("Start NEW"); mode = Mode.NEW; break; case "ADDACCT": System.out.println("Start ADDACCT"); mode = Mode.ADDACCT; break; case "UPDCUST": System.out.println("Start UPDCUST"); mode = Mode.UPDCUST; break; case "UPDACCT": System.out.println("Start UPDACCT"); mode = Mode.UPDACCT; break; case "CLOSEACCT": System.out.println("Start CLOSEACCT"); mode = Mode.CLOSEACCT; break; case "INACT": System.out.println("Start INACT"); mode = Mode.INACT; break; default: throw new IllegalArgumentException("Invalid attribute: [" + attr.getValue() + "]"); } attr = event.getAttributeByName(new QName("ActionTS")); actionTimestamp = timeStamp.parse(attr.getValue()); } if (eventType == XMLStreamConstants.END_ELEMENT && xmlr.getLocalName().equals("Action") && mode != Mode.NULL) { mode = Mode.NULL; actionTimestamp = null; } if (eventType == XMLStreamConstants.START_ELEMENT && xmlr.getLocalName().equals("Customer") && mode != Mode.NULL) { StartElement event = getXMLEvent(xmlr).asStartElement(); accounts = new ArrayList<DimAccount>(); String customerID; Attribute attr = event.getAttributeByName(new QName("C_ID")); customerID = attr.getValue(); System.out.println(" Customer ID = [" + customerID + "]"); if (mode == Mode.NEW || mode == Mode.UPDCUST || mode == Mode.INACT) { dimCustomer = new DimCustomer(); dimCustomer.setCustomerID(Long.parseLong(attr.getValue())); // I think this gets moved into logic below... //////// // Kimballian Type 2 (New Customer Record) dimCustomer.setIsCurrent(true); dimCustomer.setEffectiveDate(actionTimestamp); dimCustomer.setEndDate(futureNullDate); } if (mode == Mode.ADDACCT || mode == Mode.UPDACCT || mode == Mode.CLOSEACCT) { dimCustomer = DimCustomer.find.where().eq("customer_id", customerID).eq("is_current", "1").findUnique(); } // Copy the original row before making any changes... if (mode == Mode.UPDCUST || mode == Mode.INACT) { DimCustomer dimCustomerOld = DimCustomer.find.where().eq("customer_id", customerID).eq("is_current", "1").findUnique(); DimCustomer.copyData(dimCustomerOld, dimCustomer); //////// // Kimballian Type 2 (Old Customer Record) dimCustomerOld.setIsCurrent(false); dimCustomerOld.setEndDate(actionTimestamp); dimCustomerOld.save(); dimCustomerOld = null; System.out.println(" Copy old customer record"); } if (mode == Mode.NEW) { dimCustomer.setStatus("Active"); } if (mode == Mode.INACT) { dimCustomer.setStatus("Inactive"); } attr = event.getAttributeByName(new QName("C_TAX_ID")); if (attr != null) { dimCustomer.setTaxID(attr.getValue()); } attr = event.getAttributeByName(new QName("C_GNDR")); if (attr != null) { dimCustomer.setGender(attr.getValue()); } attr = event.getAttributeByName(new QName("C_TIER")); if (attr != null) { if (!attr.getValue().trim().isEmpty()) { dimCustomer.setTier(Integer.parseInt(attr.getValue())); } else { dimCustomer.setTier(null); } } attr = event.getAttributeByName(new QName("C_DOB")); if (attr != null) { dimCustomer.setDob(formatter.parse(attr.getValue())); } } // START_ELEMENT "Customer" if (eventType == XMLStreamConstants.END_ELEMENT && xmlr.getLocalName().equals("Customer") && mode != Mode.NULL) { if (mode == Mode.NEW || mode == Mode.UPDCUST || mode == Mode.INACT) { dimCustomer.save(); System.out.println(" Save customer UID = [" + dimCustomer.getsK_CustomerID() + "] Customer ID = [" + dimCustomer.getCustomerID() + "]"); } // Iterate over accounts for (DimAccount account : accounts) { account.setsK_CustomerId(dimCustomer.getsK_CustomerID()); account.save(); System.out.println(" Save account UID = [" + account.getsK_AccountId() + "] Account ID = [" + account.getAccountID() + "]"); } //for (DimAccount account : accounts) { // I'm going for an explicit delete... just in case GC can't sort it out. // accounts.remove(account); //} accounts = null; dimCustomer = null; } // END_ELEMENT "Customer" if (eventType == XMLStreamConstants.START_ELEMENT && xmlr.getLocalName().equals("Account") && mode != Mode.NULL) { StartElement event = getXMLEvent(xmlr).asStartElement(); Attribute attr = event.getAttributeByName(new QName("CA_ID")); String accountID = attr.getValue(); System.out.println(" Account ID = [" + accountID + "]"); // If we're here, we will always create a new account... dimAccount = new DimAccount(); dimAccount.setAccountID(accountID); //////// // Kimballian Type 2 (New Account Record) dimAccount.setIsCurrent(true); dimAccount.setEffectiveDate(actionTimestamp); dimAccount.setEndDate(futureNullDate); if (mode == Mode.UPDACCT || mode == Mode.CLOSEACCT) { DimAccount dimAccountOld = DimAccount.find.where().eq("account_id", accountID).eq("is_current", "1").findUnique(); DimAccount.copyData(dimAccountOld, dimAccount); //////// // Kimballian Type 2 (Old Account Record) dimAccountOld.setIsCurrent(false); dimAccountOld.setEndDate(actionTimestamp); dimAccountOld.save(); dimAccountOld = null; System.out.println(" Copy old account record"); } if (mode == Mode.NEW || mode == Mode.ADDACCT) { dimAccount.setStatus("Active"); } if (mode == Mode.CLOSEACCT) { dimAccount.setStatus("Inactive"); } attr = event.getAttributeByName(new QName("CA_TAX_ST")); if (attr != null) { dimAccount.setTaxStatus(attr.getValue()); } } // START_ELEMENT "Account" if (eventType == XMLStreamConstants.END_ELEMENT && xmlr.getLocalName().equals("Account") && mode != Mode.NULL) { accounts.add(dimAccount); dimAccount = null; } if (eventType == XMLStreamConstants.CHARACTERS) { tagContent = xmlr.getText().trim(); } else if (eventType == XMLStreamConstants.END_ELEMENT && xmlr.getLocalName().equals("C_L_NAME") && mode != Mode.NULL) { dimCustomer.setLastName(tagContent); } else if (eventType == XMLStreamConstants.END_ELEMENT && xmlr.getLocalName().equals("C_F_NAME") && mode != Mode.NULL) { dimCustomer.setFirstName(tagContent); } else if (eventType == XMLStreamConstants.END_ELEMENT && xmlr.getLocalName().equals("C_M_NAME") && mode != Mode.NULL) { dimCustomer.setMiddleInitial(tagContent); } else if (eventType == XMLStreamConstants.END_ELEMENT && xmlr.getLocalName().equals("C_ADLINE1") && mode != Mode.NULL) { dimCustomer.setAddressLine1(tagContent); } else if (eventType == XMLStreamConstants.END_ELEMENT && xmlr.getLocalName().equals("C_ADLINE2") && mode != Mode.NULL) { dimCustomer.setAddressLine2(tagContent); } else if (eventType == XMLStreamConstants.END_ELEMENT && xmlr.getLocalName().equals("C_ZIPCODE") && mode != Mode.NULL) { dimCustomer.setPostalCode(tagContent); } else if (eventType == XMLStreamConstants.END_ELEMENT && xmlr.getLocalName().equals("C_CITY") && mode != Mode.NULL) { dimCustomer.setCity(tagContent); } else if (eventType == XMLStreamConstants.END_ELEMENT && xmlr.getLocalName().equals("C_STATE_PROV") && mode != Mode.NULL) { dimCustomer.setStateProv(tagContent); } else if (eventType == XMLStreamConstants.END_ELEMENT && xmlr.getLocalName().equals("C_CTRY") && mode != Mode.NULL) { dimCustomer.setCountry(tagContent); } else if (eventType == XMLStreamConstants.END_ELEMENT && xmlr.getLocalName().equals("C_PRIM_EMAIL") && mode != Mode.NULL) { dimCustomer.seteMail1(tagContent); } else if (eventType == XMLStreamConstants.END_ELEMENT && xmlr.getLocalName().equals("C_ALT_EMAIL") && mode != Mode.NULL) { dimCustomer.seteMail2(tagContent); } else if (eventType == XMLStreamConstants.END_ELEMENT && xmlr.getLocalName().equals("CA_B_ID") && mode != Mode.NULL) { dimAccount.setBrokerId(tagContent); } else if (eventType == XMLStreamConstants.END_ELEMENT && xmlr.getLocalName().equals("CA_NAME") && mode != Mode.NULL) { dimAccount.setAccountDesc(tagContent); } else if (eventType == XMLStreamConstants.START_ELEMENT && xmlr.getLocalName().equals("C_PHONE_1") && mode != Mode.NULL) { phone = ""; } else if (eventType == XMLStreamConstants.START_ELEMENT && xmlr.getLocalName().equals("C_PHONE_2") && mode != Mode.NULL) { phone = ""; } else if (eventType == XMLStreamConstants.START_ELEMENT && xmlr.getLocalName().equals("C_PHONE_3") && mode != Mode.NULL) { phone = ""; } else if (eventType == XMLStreamConstants.END_ELEMENT && xmlr.getLocalName().equals("C_CTRY_CODE") && mode != Mode.NULL) { if (!tagContent.trim().isEmpty()) { phone += "+" + tagContent; } } else if (eventType == XMLStreamConstants.END_ELEMENT && xmlr.getLocalName().equals("C_AREA_CODE") && mode != Mode.NULL) { if (!tagContent.trim().isEmpty()) { phone += " (" + tagContent + ")"; } } else if (eventType == XMLStreamConstants.END_ELEMENT && xmlr.getLocalName().equals("C_LOCAL") && mode != Mode.NULL) { if (!tagContent.trim().isEmpty()) { phone += " " + tagContent; } } else if (eventType == XMLStreamConstants.END_ELEMENT && xmlr.getLocalName().equals("C_EXT") && mode != Mode.NULL) { if (!tagContent.trim().isEmpty()) { phone += " x" + tagContent; } } else if (eventType == XMLStreamConstants.END_ELEMENT && xmlr.getLocalName().equals("C_PHONE_1") && mode != Mode.NULL) { dimCustomer.setPhone1(phone.trim()); phone = ""; } else if (eventType == XMLStreamConstants.END_ELEMENT && xmlr.getLocalName().equals("C_PHONE_2") && mode != Mode.NULL) { dimCustomer.setPhone2(phone.trim()); phone = ""; } else if (eventType == XMLStreamConstants.END_ELEMENT && xmlr.getLocalName().equals("C_PHONE_3") && mode != Mode.NULL) { dimCustomer.setPhone3(phone.trim()); phone = ""; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void open(){\n\t\ttry {\n\t\t\tdocFactory = DocumentBuilderFactory.newInstance();\n\t\t\tdocBuilder = docFactory.newDocumentBuilder();\n\t\t\tdoc = docBuilder.parse(ManipXML.class.getResourceAsStream(path));\n\t\t\t\n\t\t} catch (ParserConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SA...
[ "0.6806504", "0.6792095", "0.65369827", "0.6300038", "0.62912214", "0.62846583", "0.62654805", "0.62166876", "0.6169154", "0.6158694", "0.6151268", "0.61291397", "0.61195624", "0.61088014", "0.6059367", "0.6021589", "0.5973338", "0.5914026", "0.5900171", "0.5886645", "0.58843...
0.0
-1
Load the agent into the running JVM process.
public static void someApplicationBootupMethod() { if (!AgentLoader.loadAgentFromClasspath("avaje-ebeanorm-agent", "debug=1;packages=model.**")) { System.out.println("avaje-ebeanorm-agent not found in classpath - not dynamically loaded"); } System.out.println("avaje-ebeanorm-agent loaded"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void environmentStart(EnvironmentClassLoader loader)\n {\n }", "public void startAgent(String agName);", "public static void helloAgent(){\n\t\tHelloAgent agent = new HelloAgent();\r\n\t\r\n\t}", "void initAgents() {\n Runtime rt = Runtime.instance();\n\n //Create a container to host...
[ "0.57340276", "0.57158464", "0.5683927", "0.56835103", "0.5647222", "0.55472183", "0.55049616", "0.5455856", "0.5402823", "0.5366648", "0.5330151", "0.53182054", "0.5308416", "0.5300737", "0.5202992", "0.5196261", "0.51435995", "0.5139336", "0.5138315", "0.51261324", "0.51208...
0.53266156
11
TODO Autogenerated method stub
public static void main(String[] args) throws Exception { Counter c=new Counter(); Thread t1=new Thread(new Runnable() { public void run() { for(int i=1;i<=5;i++) { c.increment(); } } }); Thread t2=new Thread(new Runnable() { public void run() { for(int i=1;i<=5;i++) { c.increment(); } } }); t1.start(); t2.start(); t1.join(); t2.join(); System.out.println("count"+c.count); }
{ "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
Gets the number of frames in the loaded c3d file.
public int getNumFrames() { if ( dofs == null ) return 0; return dofs.length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getFramesCount();", "int getNumberFrames();", "public native int getNumFrames() throws MagickException;", "public int getTotalFrames() {\n int frame = 0;\n for (MOFPartPolyAnimEntry entry : getEntryList().getEntries())\n frame += entry.getDuration();\n return frame;\n }...
[ "0.7238729", "0.7183309", "0.7122714", "0.66950506", "0.6614768", "0.65027034", "0.63908666", "0.63709307", "0.6364133", "0.63162833", "0.62666184", "0.62403864", "0.61768085", "0.61440206", "0.61360925", "0.60685146", "0.6056693", "0.60150754", "0.60136384", "0.6008394", "0....
0.7179027
2
Gets the number of markers in the loaded c3d file.
public int getNumMarkers() { if ( dofs == null ) return 0; return dofs[0].length/3; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getSize() {\n\t\treturn point3D.size();\r\n\t}", "int getChunksLocationCount();", "int getBlockLocationsCount();", "public int getMountainCount() {\n\t\tcounter = 0;\n\t\tfor (int row = 0; row < battlefield.length; row++) {\n\t\t\tfor (int column = 0; column < battlefield[row].length; column++) {\...
[ "0.6750115", "0.6505694", "0.62560403", "0.6159054", "0.61343956", "0.60418", "0.6034996", "0.6011466", "0.60056174", "0.60056174", "0.60042876", "0.6003271", "0.5992581", "0.59796625", "0.59578663", "0.595542", "0.58825463", "0.58704007", "0.58619225", "0.5848483", "0.584621...
0.77142245
0
Loads c3d marker data from a file generated by matlab. The matrix loaded from the java binary file has one row for each frame and 3n columns where n is the number of markers. The order of the individual x y z marker coordinates may vary from file to file. Use the swapXZ option to control how the data is interpreted to bring it into the correct frame.
public void load( String fileName ) { System.out.println( "Loading: " + fileName ); this.name = fileName; Object obj = null; try { FileInputStream fis = new FileInputStream(fileName); ObjectInputStream oos = new ObjectInputStream( fis ); obj = oos.readObject(); dofs = (double[][]) obj; oos.close(); fis.close(); } catch ( Exception e ) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loadJava(byte[] encodedData, int offset, int len, String file){\n try{\n PngReader reader = new PngReader();\n pixels = reader.read(new ByteArrayInputStream(encodedData, offset, len));\n width = reader.width;\n height = reader.height;\n han...
[ "0.53595257", "0.515731", "0.5130711", "0.5065891", "0.5060534", "0.5038668", "0.49655184", "0.48868075", "0.48750964", "0.4838259", "0.48345894", "0.48148105", "0.47806403", "0.47622463", "0.47588852", "0.47562134", "0.4741054", "0.46879458", "0.4687752", "0.46841022", "0.46...
0.0
-1
Gets the specified marker for the given frame number. Units are typically mm. Coordinate order and sign is altered based on
public void getMarker( int frame, int marker, Tuple3d p ) { switch ( coordinateOrder ) { case XnZY: p.x = dofs[frame][marker*3]; p.z = -dofs[frame][marker*3+1]; p.y = dofs[frame][marker*3+2]; break; case ZXY: p.z = dofs[frame][marker*3]; p.x = dofs[frame][marker*3+1]; p.y = dofs[frame][marker*3+2]; break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Marker getMarker();", "public int getMarker() {\r\n\t\treturn this.marker;\r\n\t}", "public String getMarker() {\n return this.marker;\n }", "public String getMarker() {\n return marker;\n }", "public String getMarker() {\n return marker;\n }", "double a_marker_position ()\n...
[ "0.6081766", "0.6076402", "0.5880049", "0.5856812", "0.5856812", "0.5667681", "0.5649654", "0.5389154", "0.51691467", "0.51657796", "0.5141446", "0.5089037", "0.50827646", "0.50613695", "0.5022694", "0.4988259", "0.49704254", "0.49627087", "0.49236095", "0.49025127", "0.48606...
0.5829873
5
clicking on change password
public void click_changepwd() { driver.findElement(change_password).click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void changePassword(){\n\t\tif (changeCancelButton.getText().equals(\"Anuluj\")){\n\t\t\thidePassword();\n\t\t\tchangeCancelButton.setText(\"Zmień hasło\");\n\t\t\tchangePassword = false;\n\t\t}\t\n\t\telse {\n\t\t\tif (usersTable.getSelectionModel().getSelectedIndex() > -1) {\n\t\t\t\tchangePassword = tru...
[ "0.7954845", "0.7921737", "0.77676094", "0.77010304", "0.76839924", "0.7670181", "0.7661945", "0.75475377", "0.74507797", "0.7396332", "0.73590916", "0.73065346", "0.72432894", "0.72180146", "0.71993405", "0.719587", "0.7193816", "0.71911615", "0.7168179", "0.7161719", "0.716...
0.86850524
0
REVERSE STRING USING COLLECTIONS AND ARRAYS
public static void main(String[] args) { String s = "the sky is blue"; String[] s2 = s.split(" "); for (String string : s2) { System.out.print(string + " "); } List<String> s3 = Arrays.asList(s2); Collections.reverse(s3); System.out.println("\n"); for (String string : s3) { System.out.print(string + " "); } // REVERSE STRING NOT USING COLLECTIONS AND ARRAYS String s4 = "the sky is blue"; String[] s5 = s.split(" "); System.out.println("\n"); for (String string : s5) { System.out.print(string + " "); } int totalLength = s5.length; for (int i = 0; i < totalLength / 2; i++) { String actual = s5[i]; String opposite = s5[totalLength - 1 - i]; s5[i] = opposite; s5[totalLength - 1 - i] = actual; } System.out.println("\n"); for (String string : s5) { System.out.print(string + " "); } // REVERSE STRING WITHOUT ALLOCATING EXTRA SPACE /* * 1- convertir a array de char * 2- revertir las letrs de las palabras pero dejŠndolas en su sitio * 3- revertir todo el array de char con actual/opuesto */ String cadena = "the sky is blue"; char[] s6 = cadena.toCharArray(); int i = 0; for (int j = 0; j < s6.length; j++) { if (s6[j] == ' ') { reverse(s6, i, j - 1); i = j + 1; } } reverse(s6, i, s6.length - 1); reverse(s6, 0, s6.length - 1); System.out.print("\n\nREVERSE STRING WITHOUT ALLOCATING EXTRA SPACE: "); for(int k = 0; k<s6.length; k++) { System.out.print(s6[k]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public IDnaStrand reverse();", "public void reverse() {\n ArrayList<Character> newSeq = new ArrayList<Character>();\n for (int i = 0; i < seq.size(); i++) {\n newSeq.add(seq.get(seq.size() - 1 - i));\n }\n seq = newSeq;\n }", "private static void reverseWithSplitArray(...
[ "0.6061939", "0.6021695", "0.59171474", "0.5876604", "0.58517486", "0.57912654", "0.5784745", "0.5782137", "0.5766351", "0.5737135", "0.5735896", "0.5735896", "0.5703611", "0.5699197", "0.56878823", "0.5654923", "0.56250316", "0.561512", "0.56031793", "0.5598457", "0.5595001"...
0.57114124
12
save upload data to file
private void saveFile(Socket socket) throws Exception { File file = new File("fileupload.txt"); file.createNewFile(); PrintWriter fw = new PrintWriter(file); BufferedReader lnr = new BufferedReader(new InputStreamReader(socket.getInputStream())); String line = null; while ((line = lnr.readLine()) != null) { System.out.println("line:" + line); fw.println(line); } fw.close(); // response result to client PrintWriter pw = new PrintWriter(socket.getOutputStream(), true); pw.println("上传成功"); // release resource System.out.println("server close socket: " + socket.hashCode()); socket.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void save() {\n UTILS.write(FILE.getAbsolutePath(), data);\n }", "public void save() {\n Path root = Paths.get(storagePath);\n try {\n Files.copy(file.getInputStream(), root.resolve(file.getOriginalFilename()),\n StandardCopyOption.REPLACE_EXISTING);\n...
[ "0.722254", "0.68705976", "0.67530966", "0.66358125", "0.6610337", "0.65560764", "0.6505715", "0.6464196", "0.6455363", "0.64375675", "0.64374965", "0.6406243", "0.6393695", "0.63813776", "0.63233095", "0.63130474", "0.6290467", "0.6287799", "0.6284348", "0.6281925", "0.62784...
0.6408433
11
Stores options associated with an ballot.
private void createOptions(final List<Option> options, final long ballotId) { LOG.debug("Storing options {}", options); // Sanity check. if (options == null || options.isEmpty()) { LOG.debug("No option to store for the ballot associated with the {} identifier", ballotId); return; } for (final Option option : options) { option.setBallotId(ballotId); this.optionDAO.create(option); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void storeGraphicOptions() {\n\t\ttheGraphicOptions.store(theConfiguration);\n\t}", "public static void saveOptions() {\r\n\t\tMain.bagValue = GameOptions.bagValue.getSelectedItem();\r\n\t\tMain.nilValue = GameOptions.nilValueTextField.getText();\r\n\t\tMain.doubleNilValue = GameOptions.doubleNilValueText...
[ "0.66709006", "0.6424014", "0.55504745", "0.55213505", "0.5419236", "0.5358292", "0.5309944", "0.5254152", "0.51867837", "0.51221246", "0.50683784", "0.50333494", "0.5021715", "0.50173664", "0.49962822", "0.49878016", "0.49559823", "0.492688", "0.4922703", "0.49066713", "0.48...
0.6127755
2
Loads the options associated with the given identifier.
@Override public Option getOption(final long identifier) { LOG.debug("Obtaining the options associated with {} identifier", identifier); return this.optionDAO.getOption(identifier); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Optional<M> loadOpt(K id);", "@RequestMapping(value = \"/loadOptionDetails\", method = RequestMethod.POST)\r\n\tpublic @ResponseBody Options loadOptionDetails(@RequestParam String optionId) {\r\n\t\tOptions options = new Options();\r\n\t\tif (null != optionId && !optionId.equalsIgnoreCase(\"\")) {\r\n\t\t...
[ "0.59953517", "0.5599075", "0.53302044", "0.49174032", "0.48204577", "0.48058188", "0.47694305", "0.47623548", "0.47510397", "0.47427738", "0.47415668", "0.4731196", "0.4731196", "0.47248414", "0.47248414", "0.47248414", "0.47238845", "0.47238845", "0.47145322", "0.46926218", ...
0.64009845
0
Atualiza o raio da classe, com o raio recebido como argumento.
public void setRaio(double raio) { this.raio = raio; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void recreo() {\n\n\t}", "Oracion createOracion();", "@Override\n public void crearReloj() {\n Manecilla seg;\n seg = new Manecilla(40,60,0,1,null);\n cronometro = new Reloj(seg);\n }", "public FiltroRaEncerramentoComando() {\r\n }", "@Override\r\n\tpublic ...
[ "0.6199492", "0.59981126", "0.5841893", "0.57287526", "0.565776", "0.5646291", "0.5608027", "0.55973774", "0.5575256", "0.5553245", "0.5473268", "0.54488564", "0.54471475", "0.5437009", "0.5435198", "0.54227746", "0.5411648", "0.5397206", "0.5394628", "0.5380501", "0.5372653"...
0.0
-1
Atualiza o booleano da classe, para o valore recebido como argumento.
public void setLivre(boolean livre) { this.livre = livre; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private CheckBoolean() {\n\t}", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "public BooleanValue(boolean bool) {\r\n this.val = bool;\r\n }", "public Boolean() {\n\t\tsuper(false);\n\t}", "...
[ "0.6887914", "0.67373013", "0.67373013", "0.67373013", "0.67373013", "0.67243797", "0.6690543", "0.6526821", "0.648763", "0.64742506", "0.646715", "0.646715", "0.6424347", "0.6420383", "0.63992006", "0.6377293", "0.6370264", "0.63640726", "0.6341814", "0.6341814", "0.63311577...
0.0
-1
Atualiza a classificEncVol com os valores recebidos na estrutura do argumento.
public void setClassificEncVol(Map<String, Integer> classificEnc) { this.classificEncVol = new TreeMap<>(); for(Map.Entry<String,Integer> e : classificEnc.entrySet()) this.classificEncVol.put(e.getKey(),e.getValue()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void updateEncuestaConExito() {\n\n\t}", "@Override\n\tpublic void encender() {\n\t\tSystem.out.println(\"Encendiendo Computadora\");\n\t\t\n\t}", "public cvt(cwk paramcwk)\r\n/* 24: */ {\r\n/* 25: 29 */ this.f = paramcwk;\r\n/* 26: */ }", "public void abrir(String name, ...
[ "0.5356285", "0.5197097", "0.5016536", "0.49972144", "0.4996127", "0.49617398", "0.49608374", "0.49205223", "0.4911872", "0.4905018", "0.49034974", "0.48989683", "0.48799422", "0.48764357", "0.48733816", "0.4866904", "0.4854251", "0.48495698", "0.48386955", "0.48113352", "0.4...
0.4850373
17
Atualiza o booleano da classe, para o valor recebido como argumento.
public void setCertificado(boolean certificado) { this.certificado = certificado; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private CheckBoolean() {\n\t}", "public BooleanValue(boolean bool) {\r\n this.val = bool;\r\n }", "public Boolean() {\n\t\tsuper(false);\n\t}", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "...
[ "0.6860431", "0.6778627", "0.6741151", "0.6724663", "0.6724663", "0.6724663", "0.6724663", "0.66058606", "0.65974677", "0.65974677", "0.653439", "0.6507845", "0.64781314", "0.6477418", "0.6460395", "0.6460395", "0.64369607", "0.64291614", "0.6404771", "0.6403581", "0.6361339"...
0.0
-1
escolher vizinho para responder a pedido
public static void chooseNeighbour() { clique.handler(ConnectReq.class, (i, req) -> { int randomIndex = new Random().nextInt(connections.size()); connections.get(randomIndex).send(req); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void hacerPedido(){\n this.sucursal.procesarPedido(this.pedido, this.id);\n this.pedido = new Integer[5];\n contadorPedido = 0;\n }", "@Override\r\n\tpublic void alterar(Telefone vo) throws Exception {\n\t\t\r\n\t}", "public synchronized void abilitarAbordaje() {\n abordar = true;\r\n ...
[ "0.6740069", "0.6336183", "0.6223113", "0.6148407", "0.6142623", "0.6102758", "0.61021173", "0.6081107", "0.60289186", "0.60252035", "0.6018899", "0.59689975", "0.5930921", "0.5930059", "0.59291315", "0.59222794", "0.58660555", "0.5860478", "0.58476305", "0.58458364", "0.5843...
0.0
-1
Autocalled by FXMLLoader. Initializes listView.
@FXML public void initialize() { addItem.setOnAction(e -> { String desc = description.getText(); if (!desc.isEmpty()) { itemList.getItems().add(new TodoItemModel(desc)); description.clear(); } }); itemList.setCellFactory(CheckBoxListCell.forListView(TodoItemModel::completedProperty, new StringConverter<TodoItemModel>() { @Override public String toString(TodoItemModel object) { return object.descriptionProperty().get(); } @Override public TodoItemModel fromString(String string) { return null; } })); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void inicializaListView(){\n }", "private void initListView() {\n\t\trefreshListItems();\n\n\t\t/* Add Context-Menu listener to the ListView. */\n\t\tlv.setOnCreateContextMenuListener(new OnCreateContextMenuListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onCreateContextMenu(ContextMenu menu, View v...
[ "0.7984225", "0.74694026", "0.72923607", "0.7190729", "0.7189829", "0.70928174", "0.69672966", "0.69137037", "0.682607", "0.6824788", "0.6816171", "0.6782079", "0.6768541", "0.67633224", "0.676102", "0.6751757", "0.6727778", "0.6720505", "0.6692289", "0.66728675", "0.66379046...
0.7337524
2
Get updated InstanceID token.
@Override public void onTokenRefresh() { String refreshedToken = FirebaseInstanceId.getInstance().getToken(); if (refreshedToken != null) { Log.d(TAG, "Refreshed token: " + refreshedToken); // If you want to send messages to this application instance or // manage this apps subscriptions on the server side, send the // Instance ID token to your app server. sendTokenToServer(refreshedToken); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void getToken(Context context) {\n FirebaseInstanceId.getInstance().getInstanceId()\r\n .addOnCompleteListener(new OnCompleteListener<InstanceIdResult>() {\r\n @Override\r\n public void onComplete(@NonNull Task<InstanceIdResult> task) {\r\n ...
[ "0.69042253", "0.6321658", "0.6290561", "0.6277683", "0.6258297", "0.623015", "0.62250173", "0.61978453", "0.61943346", "0.61494344", "0.61494344", "0.61494344", "0.6118907", "0.6052661", "0.602451", "0.5982666", "0.5975711", "0.59701246", "0.59191245", "0.5893152", "0.588771...
0.5523018
70
API call to send token to Server
public void sendTokenToServer(final String strToken) { FirebaseDatabase database = FirebaseDatabase.getInstance(); final DatabaseReference usersRef = database.getReference("users"); usersRef.addListenerForSingleValueEvent(new com.google.firebase.database.ValueEventListener() { @Override public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) { for (com.google.firebase.database.DataSnapshot userSnapshot : dataSnapshot.getChildren()) { //Getting the data from snapshot FirebaseUserModel firebaseUserModel = userSnapshot.getValue(FirebaseUserModel.class); if (strToken != null && firebaseUserModel.getDeviceId().equals(user.deviceId) && !strToken.equals(firebaseUserModel.getDeviceToken())) { user.deviceToken = strToken; usersRef.child(userSnapshot.getKey()).child("deviceToken").setValue(strToken, new Firebase.CompletionListener() { @Override public void onComplete(FirebaseError firebaseError, Firebase firebase) { if (firebaseError != null) { Log.i(TAG, firebaseError.toString()); } else { System.out.println("Refreshed Token Updated"); } } }); } } } @Override public void onCancelled(DatabaseError databaseError) { System.out.println("The read failed: " + databaseError.getMessage()); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sendTokenToRemote() { }", "private void requestToken(){\n APIAuth auth = new APIAuth(this.prefs.getString(\"email\", \"\"), this.prefs.getString(\"password\", \"\"), this.prefs.getString(\"fname\", \"\") + \" \" +this.prefs.getString(\"lname\", \"\"), this.prefs, null);\n auth.authentic...
[ "0.77223265", "0.7387447", "0.72657555", "0.72401345", "0.71740353", "0.7168388", "0.7168388", "0.7168388", "0.7168388", "0.7046685", "0.68603724", "0.6815657", "0.673291", "0.6681819", "0.66528374", "0.6574875", "0.6574875", "0.65570736", "0.65036184", "0.6478938", "0.646541...
0.0
-1
Check if we have write permission
public static boolean verifyStoragePermissions(Activity activity) { int permission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE); if (permission != PackageManager.PERMISSION_GRANTED) { // We don't have permission so prompt the user ActivityCompat.requestPermissions( activity, PERMISSIONS_STORAGE, REQUEST_EXTERNAL_STORAGE ); return false; } else{ return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isWritePermissionGranted();", "boolean isWriteAccess();", "boolean canWrite();", "int getPermissionWrite();", "public boolean isWriteable();", "private boolean isWriteStorageAllowed() {\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n ...
[ "0.9099552", "0.8837813", "0.80663157", "0.80243504", "0.7774986", "0.77436954", "0.75657046", "0.7548023", "0.7270176", "0.72674453", "0.7215455", "0.7176124", "0.7007981", "0.6935691", "0.68866736", "0.68647003", "0.68148607", "0.6806817", "0.6791676", "0.6703497", "0.66883...
0.0
-1
Created by wuzhenxiong on 2017/9/26.
public interface TagDataReader { WritableMap getTagMap(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n protected void initialize() {\n\n \n }", "@Over...
[ "0.6328991", "0.6251201", "0.5934686", "0.5934686", "0.5927364", "0.59175724", "0.5915165", "0.5913164", "0.58655965", "0.58635706", "0.5841121", "0.5815911", "0.5807247", "0.5784296", "0.5784296", "0.5784296", "0.5784296", "0.5784296", "0.5784296", "0.57663494", "0.5763017",...
0.0
-1
Checks if the player holding this personality card has won the game. It also prints a message on stdout to indicate this.
public boolean hasWon(int numberOfPlayers, Player player, Game game) { boolean hasPlayerWon = winningConditionChecker.apply(numberOfPlayers, player, game); if (hasPlayerWon) { System.out.println(player.getName() + " has won the game with " + name()); } return hasPlayerWon; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void checkWinCondition() {\n\t\twin = false;\n\t\tif (curPlayer == 1 && arrContains(2, 4))\n\t\t\twin = true;\n\t\telse if (curPlayer == 2 && arrContains(1, 3))\n\t\t\twin = true;\n\t\tif (curPlayer == 2 && !gameLogic.Logic.arrContains(2, 4))\n\t\t\tP2P.gameLost = true;\n\t\telse if (gameLogic.Logic....
[ "0.6900857", "0.685", "0.6846641", "0.68267405", "0.6739933", "0.6717278", "0.6711206", "0.6679845", "0.66592944", "0.66340566", "0.6581216", "0.65779346", "0.65528196", "0.6550448", "0.6503852", "0.64689934", "0.6426126", "0.6425811", "0.64199364", "0.64056104", "0.64012355"...
0.61386615
61
the boolean method "equals" is created to take in two integer arrays
public static boolean equals(int[] array1, int[] array2) { boolean equal = true; //the boolean variable equal is set to the value true for(int j = 0; j<array1.length; j++) { if(array1[j]!=array2[j]) { //each value in array1 is compared to array2 equal = false; //if any of the values in the two arrays do not match, the method returns false } } return equal; //if the arrays are equal, then the method will return true }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean equals(int[] array1, int[] array2) {\n if(array1.length != array2.length)\n return false;\n \n Arrays.sort(array1);\n Arrays.sort(array2);\n \n int i = 0;\n for(; i < array1.length; ++i) {\n if(array1[i] != array2[i])\n ...
[ "0.8231664", "0.8177195", "0.7952211", "0.7856246", "0.7832555", "0.7803839", "0.7765547", "0.7517657", "0.73385364", "0.73263204", "0.72730243", "0.7237493", "0.71126115", "0.70489573", "0.7004581", "0.6997938", "0.6942122", "0.6931093", "0.69198686", "0.6900124", "0.6867575...
0.78644395
3