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
TODO Autogenerated method stub
@Override public void onConnectionFailed(ConnectionResult arg0) { }
{ "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
Test import operation which replaces existing content
public void testImportReplace() throws IOException, JsonException { final String testPath = TEST_BASE_PATH; Map<String, String> props = new HashMap<String, String>(); String testNode = testClient.createNode(HTTP_BASE_URL + testPath, props); urlsToDelete.add(testNode); //add node that will get replaced props.put("propTest", "propTestValue"); String importedNodeUrl = testClient.createNode(HTTP_BASE_URL + testPath + "/nodeName", props); //import with the replace option to replace the existing node. props.clear(); props.put(SlingPostConstants.RP_OPERATION, SlingPostConstants.OPERATION_IMPORT); testFile = getTestFile(getClass().getResourceAsStream("/integration-test/servlets/post/testimport2.json")); props.put(SlingPostConstants.RP_CONTENT_TYPE, "json"); props.put(SlingPostConstants.RP_REDIRECT_TO, SERVLET_CONTEXT + testPath + "/*"); props.put(SlingPostConstants.RP_REPLACE, "true"); String importedNodeUrl2 = testClient.createNode(HTTP_BASE_URL + testPath, new NameValuePairList(props), null, true, testFile, SlingPostConstants.RP_CONTENT_FILE, null); //the new node should have the same path as the replaced node assertEquals(importedNodeUrl, importedNodeUrl2); // assert content at new location String content = getContent(importedNodeUrl2 + ".3.json", CONTENT_TYPE_JSON); JsonObject jsonObj = JsonUtil.parseObject(content); assertNotNull(jsonObj); assertNull(jsonObj.get("propTest")); //test property should be gone. //assert the imported content is there. String expectedJsonContent = getStreamAsString(getClass().getResourceAsStream("/integration-test/servlets/post/importresults.json")); assertExpectedJSON(JsonUtil.parseObject(expectedJsonContent), jsonObj); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testImportReplaceProperties() throws IOException, JsonException {\n final String testPath = TEST_BASE_PATH;\n Map<String, String> props = new HashMap<String, String>();\n String testNode = testClient.createNode(HTTP_BASE_URL + testPath, props);\n urlsToDelete.add(testNode);\...
[ "0.71163106", "0.7055886", "0.69419944", "0.6787718", "0.6753073", "0.66311026", "0.6543585", "0.65413314", "0.6533087", "0.65275806", "0.6482498", "0.64030063", "0.6380825", "0.6368752", "0.6367327", "0.6288238", "0.6265825", "0.62566775", "0.62077194", "0.6066659", "0.60345...
0.7368587
0
SLING1627: test import of content over existing content with the ':replaceProperties" parameter set and the ":replace" property not set.
public void testImportReplaceProperties() throws IOException, JsonException { final String testPath = TEST_BASE_PATH; Map<String, String> props = new HashMap<String, String>(); String testNode = testClient.createNode(HTTP_BASE_URL + testPath, props); urlsToDelete.add(testNode); //1. First import some initial content props.clear(); props.put(SlingPostConstants.RP_OPERATION, SlingPostConstants.OPERATION_IMPORT); String testNodeName = "testNode_" + String.valueOf(random.nextInt()); props.put(SlingPostConstants.RP_NODE_NAME_HINT, testNodeName); String jsonContent = getStreamAsString(getClass().getResourceAsStream("/integration-test/servlets/post/testimport.json")); props.put(SlingPostConstants.RP_CONTENT, jsonContent); props.put(SlingPostConstants.RP_CONTENT_TYPE, "json"); props.put(SlingPostConstants.RP_REDIRECT_TO, SERVLET_CONTEXT + testPath + "/*"); String importedNodeUrl = testClient.createNode(HTTP_BASE_URL + testPath, props); // assert content at new location String content = getContent(importedNodeUrl + ".3.json", CONTENT_TYPE_JSON); JsonObject jsonObj = JsonUtil.parseObject(content); assertNotNull(jsonObj); //assert the imported content is there. String expectedJsonContent = getStreamAsString(getClass().getResourceAsStream("/integration-test/servlets/post/importresults.json")); assertExpectedJSON(JsonUtil.parseObject(expectedJsonContent), jsonObj); //2. Second, import on top of the node from #1 to replace some properties. props.clear(); props.put(SlingPostConstants.RP_OPERATION, SlingPostConstants.OPERATION_IMPORT); String jsonContent2 = getStreamAsString(getClass().getResourceAsStream("/integration-test/servlets/post/testimport_replaceProps.json")); props.put(SlingPostConstants.RP_CONTENT, jsonContent2); props.put(SlingPostConstants.RP_CONTENT_TYPE, "json"); props.put(SlingPostConstants.RP_REPLACE, "false"); props.put(SlingPostConstants.RP_REPLACE_PROPERTIES, "true"); testClient.createNode(importedNodeUrl, props); // assert content at new location String content2 = getContent(importedNodeUrl + ".3.json", CONTENT_TYPE_JSON); JsonObject jsonObj2 = JsonUtil.parseObject(content2); assertNotNull(jsonObj2); //assert the imported content is there. String expectedJsonContent2 = getStreamAsString(getClass().getResourceAsStream("/integration-test/servlets/post/testimport_replaceProps.json")); assertExpectedJSON(JsonUtil.parseObject(expectedJsonContent2), jsonObj2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testImportReplace() throws IOException, JsonException {\n final String testPath = TEST_BASE_PATH;\n Map<String, String> props = new HashMap<String, String>();\n String testNode = testClient.createNode(HTTP_BASE_URL + testPath, props);\n urlsToDelete.add(testNode);\n\n ...
[ "0.71075565", "0.6514288", "0.6084665", "0.56957185", "0.5582917", "0.5505563", "0.54118216", "0.54024446", "0.5329665", "0.5275604", "0.52662903", "0.5260046", "0.5252661", "0.52462333", "0.5229044", "0.52256334", "0.51916844", "0.5190311", "0.5182232", "0.5168393", "0.51631...
0.76431704
0
Test import operation which checks in versionable nodes.
public void testImportCheckinNodes() throws IOException, JsonException { final String testPath = TEST_BASE_PATH; Map<String, String> props = new HashMap<String, String>(); String testNode = testClient.createNode(HTTP_BASE_URL + testPath, props); urlsToDelete.add(testNode); props.clear(); props.put(SlingPostConstants.RP_OPERATION, SlingPostConstants.OPERATION_IMPORT); String testNodeName = "testNode_" + String.valueOf(random.nextInt()); props.put(SlingPostConstants.RP_NODE_NAME_HINT, testNodeName); testFile = getTestFile(getClass().getResourceAsStream("/integration-test/servlets/post/testimport3.json")); props.put(SlingPostConstants.RP_CONTENT_TYPE, "json"); props.put(SlingPostConstants.RP_REDIRECT_TO, SERVLET_CONTEXT + testPath + "/*"); props.put(SlingPostConstants.RP_CHECKIN, "true"); String importedNodeUrl = testClient.createNode(HTTP_BASE_URL + testPath, new NameValuePairList(props), null, true, testFile, SlingPostConstants.RP_CONTENT_FILE, null); // assert content at new location String content = getContent(importedNodeUrl + ".json", CONTENT_TYPE_JSON); JsonObject jsonObj = JsonUtil.parseObject(content); assertNotNull(jsonObj); //assert that the versionable node is checked in. assertFalse(jsonObj.getBoolean("jcr:isCheckedOut")); //now try with the checkin value set to false testFile.delete(); props.clear(); props.put(SlingPostConstants.RP_OPERATION, SlingPostConstants.OPERATION_IMPORT); String testNodeName2 = "testNode_" + String.valueOf(random.nextInt()); props.put(SlingPostConstants.RP_NODE_NAME_HINT, testNodeName2); testFile = getTestFile(getClass().getResourceAsStream("/integration-test/servlets/post/testimport3.json")); props.put(SlingPostConstants.RP_CONTENT_TYPE, "json"); props.put(SlingPostConstants.RP_REDIRECT_TO, SERVLET_CONTEXT + testPath + "/*"); props.put(SlingPostConstants.RP_CHECKIN, "false"); String importedNodeUrl2 = testClient.createNode(HTTP_BASE_URL + testPath, new NameValuePairList(props), null, true, testFile, SlingPostConstants.RP_CONTENT_FILE, null); // assert content at new location String content2 = getContent(importedNodeUrl2 + ".json", CONTENT_TYPE_JSON); JsonObject jsonObj2 = JsonUtil.parseObject(content2); assertNotNull(jsonObj2); //assert that the versionable node is checked in. assertTrue(jsonObj2.getBoolean("jcr:isCheckedOut")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testVersionConstrainedDynamicImport() throws Exception {\n\t\tdoTest(\";version=\\\"[1,1.5)\\\"\" , TEST_IMPORT_SYM_NAME + \"_1.1.0\");\n\t}", "public void testDynamicImport() throws Exception {\n\t\tdoTest(\";version=\\\"[1,2)\\\"\", TEST_ALT_IMPORT_SYM_NAME + \"_1.0.0\");\n\t}", "@Test\n\tpublic ...
[ "0.71778476", "0.67106014", "0.659557", "0.64175266", "0.63783985", "0.63655716", "0.6224889", "0.6194736", "0.6174976", "0.61251056", "0.60974234", "0.605358", "0.60072994", "0.5860036", "0.5831646", "0.58225954", "0.5821496", "0.57505524", "0.56633216", "0.5646292", "0.5637...
0.69282395
1
SLING2108 Test import operation which auto checks out versionable nodes.
public void testImportAutoCheckoutNodes() throws IOException, JsonException { final String testPath = TEST_BASE_PATH; Map<String, String> props = new HashMap<String, String>(); String testNode = testClient.createNode(HTTP_BASE_URL + testPath, props); urlsToDelete.add(testNode); //1. first create some content to update. props.clear(); props.put(SlingPostConstants.RP_OPERATION, SlingPostConstants.OPERATION_IMPORT); String testNodeName = "testNode_" + String.valueOf(random.nextInt()); props.put(SlingPostConstants.RP_NODE_NAME_HINT, testNodeName); testFile = getTestFile(getClass().getResourceAsStream("/integration-test/servlets/post/testimport3.json")); props.put(SlingPostConstants.RP_CONTENT_TYPE, "json"); props.put(SlingPostConstants.RP_REDIRECT_TO, SERVLET_CONTEXT + testPath + "/*"); props.put(SlingPostConstants.RP_CHECKIN, "true"); String importedNodeUrl = testClient.createNode(HTTP_BASE_URL + testPath, new NameValuePairList(props), null, true, testFile, SlingPostConstants.RP_CONTENT_FILE, null); // assert content at new location String content = getContent(importedNodeUrl + ".json", CONTENT_TYPE_JSON); JsonObject jsonObj = JsonUtil.parseObject(content); assertNotNull(jsonObj); //assert that the versionable node is checked in. assertFalse(jsonObj.getBoolean("jcr:isCheckedOut")); //2. try an update with the :autoCheckout value set to false List<NameValuePair> postParams = new ArrayList<NameValuePair>(); postParams.add(new NameValuePair(SlingPostConstants.RP_OPERATION, SlingPostConstants.OPERATION_IMPORT)); postParams.add(new NameValuePair(SlingPostConstants.RP_CONTENT_TYPE, "json")); postParams.add(new NameValuePair(SlingPostConstants.RP_CHECKIN, "true")); postParams.add(new NameValuePair(SlingPostConstants.RP_REPLACE_PROPERTIES, "true")); postParams.add(new NameValuePair(SlingPostConstants.RP_AUTO_CHECKOUT, "false")); postParams.add(new NameValuePair(SlingPostConstants.RP_CONTENT, "{ \"abc\": \"def2\" }")); assertPostStatus(importedNodeUrl, HttpServletResponse.SC_CONFLICT, postParams, "Expected error from VersionException"); //3. now try an update with the :autoCheckout value set to true postParams.clear(); postParams.add(new NameValuePair(SlingPostConstants.RP_OPERATION, SlingPostConstants.OPERATION_IMPORT)); postParams.add(new NameValuePair(SlingPostConstants.RP_CONTENT_TYPE, "json")); postParams.add(new NameValuePair(SlingPostConstants.RP_CHECKIN, "true")); postParams.add(new NameValuePair(SlingPostConstants.RP_REPLACE_PROPERTIES, "true")); postParams.add(new NameValuePair(SlingPostConstants.RP_AUTO_CHECKOUT, "true")); postParams.add(new NameValuePair(SlingPostConstants.RP_CONTENT, "{ \"abc\": \"def2\" }")); postParams.add(new NameValuePair(":http-equiv-accept", "application/json,*/*;q=0.9")); HttpMethod post = assertPostStatus(importedNodeUrl, HttpServletResponse.SC_CREATED, postParams, "Expected 201 status"); String responseBodyAsString = post.getResponseBodyAsString(); JsonObject responseJSON = JsonUtil.parseObject(responseBodyAsString); JsonArray changes = responseJSON.getJsonArray("changes"); JsonObject checkoutChange = changes.getJsonObject(0); assertEquals("checkout", checkoutChange.getString("type")); // assert content at new location String content2 = getContent(importedNodeUrl + ".json", CONTENT_TYPE_JSON); JsonObject jsonObj2 = JsonUtil.parseObject(content2); assertNotNull(jsonObj2); //make sure it was really updated assertEquals("def2", jsonObj2.getString("abc")); //assert that the versionable node is checked back in. assertFalse(jsonObj.getBoolean("jcr:isCheckedOut")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testImportCheckinNodes() throws IOException, JsonException {\n final String testPath = TEST_BASE_PATH;\n Map<String, String> props = new HashMap<String, String>();\n String testNode = testClient.createNode(HTTP_BASE_URL + testPath, props);\n urlsToDelete.add(testNode);\n\n ...
[ "0.7063248", "0.70259356", "0.66762525", "0.6481045", "0.6022874", "0.5983117", "0.5938169", "0.58057064", "0.5797695", "0.5770629", "0.5746181", "0.5703008", "0.56598556", "0.56300884", "0.5621112", "0.5543593", "0.55324537", "0.54194075", "0.5348719", "0.5338387", "0.530921...
0.68501925
2
Test import operation for a posted json file
public void testImportJSONFromFile() throws IOException, JsonException { final String testPath = TEST_BASE_PATH; Map<String, String> props = new HashMap<String, String>(); String testNode = testClient.createNode(HTTP_BASE_URL + testPath, props); urlsToDelete.add(testNode); props.clear(); props.put(SlingPostConstants.RP_OPERATION, SlingPostConstants.OPERATION_IMPORT); String testNodeName = "testNode_" + String.valueOf(random.nextInt()); props.put(SlingPostConstants.RP_NODE_NAME_HINT, testNodeName); testFile = getTestFile(getClass().getResourceAsStream("/integration-test/servlets/post/testimport.json")); props.put(SlingPostConstants.RP_CONTENT_TYPE, "json"); props.put(SlingPostConstants.RP_REDIRECT_TO, SERVLET_CONTEXT + testPath + "/*"); String importedNodeUrl = testClient.createNode(HTTP_BASE_URL + testPath, new NameValuePairList(props), null, true, testFile, SlingPostConstants.RP_CONTENT_FILE, null); // assert content at new location String content = getContent(importedNodeUrl + ".3.json", CONTENT_TYPE_JSON); JsonObject jsonObj = JsonUtil.parseObject(content); assertNotNull(jsonObj); //assert the imported content is there. String expectedJsonContent = getStreamAsString(getClass().getResourceAsStream("/integration-test/servlets/post/importresults.json")); assertExpectedJSON(JsonUtil.parseObject(expectedJsonContent), jsonObj); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testImportJSONFromRequestParam() throws IOException, JsonException {\n final String testPath = TEST_BASE_PATH;\n Map<String, String> props = new HashMap<String, String>();\n String testNode = testClient.createNode(HTTP_BASE_URL + testPath, props);\n urlsToDelete.add(testNode...
[ "0.8021651", "0.78634226", "0.7821703", "0.7092354", "0.6706649", "0.6370005", "0.63032347", "0.62573993", "0.62488717", "0.6188736", "0.6179521", "0.6161457", "0.60817295", "0.5962294", "0.5943835", "0.5926464", "0.59199905", "0.59071213", "0.58682567", "0.5804547", "0.58035...
0.80746204
0
Test import operation for a posted json file without the optional name
public void testImportJSONFromFileWithoutOptionalName() throws IOException, JsonException { final String testPath = TEST_BASE_PATH; Map<String, String> props = new HashMap<String, String>(); String testNode = testClient.createNode(HTTP_BASE_URL + testPath, props); urlsToDelete.add(testNode); props.clear(); props.put(SlingPostConstants.RP_OPERATION, SlingPostConstants.OPERATION_IMPORT); testFile = getTestFile(getClass().getResourceAsStream("/integration-test/servlets/post/testimport2.json")); props.put(SlingPostConstants.RP_CONTENT_TYPE, "json"); props.put(SlingPostConstants.RP_REDIRECT_TO, SERVLET_CONTEXT + testPath + "/*"); String importedNodeUrl = testClient.createNode(HTTP_BASE_URL + testPath, new NameValuePairList(props), null, true, testFile, SlingPostConstants.RP_CONTENT_FILE, null); //make sure the name is what was inside the file. assertTrue(importedNodeUrl.endsWith("/nodeName")); // assert content at new location String content = getContent(importedNodeUrl + ".3.json", CONTENT_TYPE_JSON); JsonObject jsonObj = JsonUtil.parseObject(content); assertNotNull(jsonObj); //assert the imported content is there. String expectedJsonContent = getStreamAsString(getClass().getResourceAsStream("/integration-test/servlets/post/importresults.json")); assertExpectedJSON(JsonUtil.parseObject(expectedJsonContent), jsonObj); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testImportJSONFromRequestParamWithoutOptionalName() throws IOException, JsonException {\n final String testPath = TEST_BASE_PATH;\n Map<String, String> props = new HashMap<String, String>();\n String testNode = testClient.createNode(HTTP_BASE_URL + testPath, props);\n urlsTo...
[ "0.817324", "0.75779366", "0.73826754", "0.64789015", "0.6401333", "0.63389057", "0.6270249", "0.59359515", "0.59337574", "0.5922027", "0.5770966", "0.57196677", "0.5681845", "0.56794393", "0.5629347", "0.5628023", "0.5589339", "0.5540339", "0.5505287", "0.5475786", "0.547573...
0.8081239
1
Test import operation for a posted json string
public void testImportJSONFromRequestParam() throws IOException, JsonException { final String testPath = TEST_BASE_PATH; Map<String, String> props = new HashMap<String, String>(); String testNode = testClient.createNode(HTTP_BASE_URL + testPath, props); urlsToDelete.add(testNode); props.clear(); props.put(SlingPostConstants.RP_OPERATION, SlingPostConstants.OPERATION_IMPORT); String testNodeName = "testNode_" + String.valueOf(random.nextInt()); props.put(SlingPostConstants.RP_NODE_NAME_HINT, testNodeName); String jsonContent = getStreamAsString(getClass().getResourceAsStream("/integration-test/servlets/post/testimport.json")); props.put(SlingPostConstants.RP_CONTENT, jsonContent); props.put(SlingPostConstants.RP_CONTENT_TYPE, "json"); props.put(SlingPostConstants.RP_REDIRECT_TO, SERVLET_CONTEXT + testPath + "/*"); String importedNodeUrl = testClient.createNode(HTTP_BASE_URL + testPath, props); // assert content at new location String content = getContent(importedNodeUrl + ".3.json", CONTENT_TYPE_JSON); JsonObject jsonObj = JsonUtil.parseObject(content); assertNotNull(jsonObj); //assert the imported content is there. String expectedJsonContent = getStreamAsString(getClass().getResourceAsStream("/integration-test/servlets/post/importresults.json")); assertExpectedJSON(JsonUtil.parseObject(expectedJsonContent), jsonObj); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testImportJSONFromRequestParamWithoutOptionalName() throws IOException, JsonException {\n final String testPath = TEST_BASE_PATH;\n Map<String, String> props = new HashMap<String, String>();\n String testNode = testClient.createNode(HTTP_BASE_URL + testPath, props);\n urlsTo...
[ "0.7327717", "0.7127753", "0.6971596", "0.6667941", "0.64388347", "0.60521215", "0.600303", "0.6000944", "0.5975893", "0.58363616", "0.5835519", "0.5799695", "0.57816505", "0.5715348", "0.5709536", "0.5707342", "0.5692844", "0.5678691", "0.56248426", "0.56131846", "0.56107664...
0.75999504
0
Test import operation for a posted json string without the optional name
public void testImportJSONFromRequestParamWithoutOptionalName() throws IOException, JsonException { final String testPath = TEST_BASE_PATH; Map<String, String> props = new HashMap<String, String>(); String testNode = testClient.createNode(HTTP_BASE_URL + testPath, props); urlsToDelete.add(testNode); props.clear(); props.put(SlingPostConstants.RP_OPERATION, SlingPostConstants.OPERATION_IMPORT); String jsonContent = getStreamAsString(getClass().getResourceAsStream("/integration-test/servlets/post/testimport2.json")); props.put(SlingPostConstants.RP_CONTENT, jsonContent); props.put(SlingPostConstants.RP_CONTENT_TYPE, "json"); props.put(SlingPostConstants.RP_REDIRECT_TO, SERVLET_CONTEXT + testPath + "/*"); String importedNodeUrl = testClient.createNode(HTTP_BASE_URL + testPath, props); //make sure the name is what was inside the file. assertTrue(importedNodeUrl.endsWith("/nodeName")); // assert content at new location String content = getContent(importedNodeUrl + ".3.json", CONTENT_TYPE_JSON); JsonObject jsonObj = JsonUtil.parseObject(content); assertNotNull(jsonObj); //assert the imported content is there. String expectedJsonContent = getStreamAsString(getClass().getResourceAsStream("/integration-test/servlets/post/importresults.json")); assertExpectedJSON(JsonUtil.parseObject(expectedJsonContent), jsonObj); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testImportJSONFromFileWithoutOptionalName() throws IOException, JsonException {\n final String testPath = TEST_BASE_PATH;\n Map<String, String> props = new HashMap<String, String>();\n String testNode = testClient.createNode(HTTP_BASE_URL + testPath, props);\n urlsToDelete.a...
[ "0.7064488", "0.6973899", "0.6410496", "0.6266228", "0.62649816", "0.58523256", "0.5817155", "0.5521091", "0.5497443", "0.5495843", "0.5483745", "0.54363453", "0.53574634", "0.53459376", "0.53307706", "0.5329093", "0.5326382", "0.5293636", "0.52739596", "0.52726966", "0.52432...
0.75816995
0
SLING1091: test create node with an exact node name (no filtering)
public void testImportNodeWithExactName() throws IOException, JsonException { importNodeWithExactName("exactNodeName"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testImportNodeWithAlreadyUsedExactName() throws IOException, JsonException {\n \tString testNodeName = \"alreadyUsedExactNodeName\";\n \tString location = importNodeWithExactName(testNodeName);\n\n\n //try to create the same node again, since same name siblings are not allowed an error sho...
[ "0.69859964", "0.68116856", "0.64741206", "0.64652467", "0.6372317", "0.63400686", "0.63259125", "0.62709653", "0.6220158", "0.6211376", "0.6179637", "0.60104614", "0.5913129", "0.587507", "0.5862839", "0.58213794", "0.5816592", "0.58092004", "0.58005035", "0.57780224", "0.57...
0.6579755
2
SLING1091: test error reporting when attempting to create a node with an invalid exact node name.
public void testImportNodeWithInvalidExactName() throws IOException { final String testPath = TEST_BASE_PATH; Map<String, String> props = new HashMap<String, String>(); String testNode = testClient.createNode(HTTP_BASE_URL + testPath, props); urlsToDelete.add(testNode); List<NameValuePair> postParams = new ArrayList<NameValuePair>(); postParams.add(new NameValuePair(SlingPostConstants.RP_OPERATION, SlingPostConstants.OPERATION_IMPORT)); postParams.add(new NameValuePair(SlingPostConstants.RP_NODE_NAME, "exactNodeName*")); String jsonContent = getStreamAsString(getClass().getResourceAsStream("/integration-test/servlets/post/testimport.json")); postParams.add(new NameValuePair(SlingPostConstants.RP_CONTENT, jsonContent)); postParams.add(new NameValuePair(SlingPostConstants.RP_CONTENT_TYPE, "json")); postParams.add(new NameValuePair(SlingPostConstants.RP_REDIRECT_TO, SERVLET_CONTEXT + testPath + "/*")); //expect a 409 status since the name is invalid String location = HTTP_BASE_URL + testPath; assertPostStatus(location, HttpServletResponse.SC_CONFLICT, postParams, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createNodeFailure(String path) {\n LOG.warn(\"failed to create task node\" + path);\n setDone(path, FAILURE);\n }", "public void testImportNodeWithAlreadyUsedExactName() throws IOException, JsonException {\n \tString testNodeName = \"alreadyUsedExactNodeName\";\n \tString location = imp...
[ "0.7053123", "0.69069177", "0.6586068", "0.6491883", "0.64541954", "0.64340246", "0.63514256", "0.6349474", "0.6177975", "0.61701626", "0.61401063", "0.6132497", "0.6128822", "0.61035603", "0.60691416", "0.60601234", "0.60262686", "0.60244274", "0.6019635", "0.6013747", "0.60...
0.7095532
0
SLING1091: test error reporting when attempting to import a node with an already used node name.
public void testImportNodeWithAlreadyUsedExactName() throws IOException, JsonException { String testNodeName = "alreadyUsedExactNodeName"; String location = importNodeWithExactName(testNodeName); //try to create the same node again, since same name siblings are not allowed an error should be // thrown List<NameValuePair> postParams = new ArrayList<NameValuePair>(); postParams.add(new NameValuePair(SlingPostConstants.RP_NODE_NAME, testNodeName)); //expect a 500 status since the name is not unique String postUrl = location.substring(0, location.lastIndexOf('/')); assertPostStatus(postUrl + SlingPostConstants.DEFAULT_CREATE_SUFFIX, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, postParams, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testImportNodeWithInvalidExactName() throws IOException {\n final String testPath = TEST_BASE_PATH;\n Map<String, String> props = new HashMap<String, String>();\n String testNode = testClient.createNode(HTTP_BASE_URL + testPath, props);\n urlsToDelete.add(testNode);\n\n\t\tL...
[ "0.69782466", "0.6928347", "0.6335857", "0.6110147", "0.6011817", "0.5974817", "0.5870275", "0.5818895", "0.57847905", "0.5734818", "0.57245326", "0.57206714", "0.571601", "0.5704657", "0.5700127", "0.5689246", "0.5677822", "0.5668922", "0.5659131", "0.56510866", "0.5640768",...
0.7406289
0
SLING2143: test import where json is in a UTF8 charset
public void testImportJSONWithUTF8Content() throws IOException, JsonException { final String testPath = TEST_BASE_PATH; Map<String, String> props = new HashMap<String, String>(); String testNode = testClient.createNode(HTTP_BASE_URL + testPath, props); urlsToDelete.add(testNode); props.clear(); props.put(SlingPostConstants.RP_OPERATION, SlingPostConstants.OPERATION_IMPORT); String testNodeName = "testNode_" + String.valueOf(random.nextInt()); props.put(SlingPostConstants.RP_NODE_NAME_HINT, testNodeName); final String jsonContent = getStreamAsString(getClass().getResourceAsStream("/integration-test/servlets/post/testimport_utf8.json"), "UTF-8"); props.put(SlingPostConstants.RP_CONTENT, jsonContent); props.put(SlingPostConstants.RP_CONTENT_TYPE, "json"); props.put(SlingPostConstants.RP_REDIRECT_TO, SERVLET_CONTEXT + testPath + "/*"); String importedNodeUrl = testClient.createNode(HTTP_BASE_URL + testPath, props); // assert content at new location String content = getContent(importedNodeUrl + ".json", CONTENT_TYPE_JSON); JsonObject jsonObj = JsonUtil.parseObject(content); assertNotNull(jsonObj); //assert the imported content is there. assertExpectedJSON(JsonUtil.parseObject(jsonContent), jsonObj); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testunicode32() {\n assertEquals(\"\\uD834\\uDD1E\", JsonReader.read(\"\\\"\\\\uD834\\\\uDD1E\\\"\"));\n }", "@Test\n\tpublic void testJsonEncoding() throws IOException {\n\t\tvalidateEncodingHandling(\"UTF16BE.json\", Charsets.UTF_16BE, \"The\\uD801\\uDC37 Na\\uD834\\uDD1Em\\uD8...
[ "0.7486911", "0.7386665", "0.67895156", "0.65700275", "0.6566495", "0.651101", "0.60945183", "0.5929418", "0.58873904", "0.58867097", "0.57858956", "0.5725658", "0.5715918", "0.5690174", "0.56702256", "0.56679773", "0.56560457", "0.56363064", "0.5630292", "0.55858195", "0.558...
0.69872576
2
This method creates AppiumDriverLocalServices instance to start appium driver
public static AppiumDriverLocalService AppiumServerStart(){ System.out.println("Into driver setup"); AppiumDriverLocalService service; AppiumServiceBuilder serviceBuilder = new AppiumServiceBuilder(); serviceBuilder.usingAnyFreePort(); // /usr/local/bin/node serviceBuilder.usingDriverExecutable(new File("/usr/local/bin/node")); // /usr/local/bin/appium serviceBuilder.withAppiumJS(new File("/usr/local/bin/appium")); serviceBuilder.withArgument(GeneralServerFlag.RELAXED_SECURITY); serviceBuilder.withArgument(GeneralServerFlag.SHELL); HashMap<String, String> environment = new HashMap(); environment.put("PATH", "/usr/local/bin:" + System.getenv("PATH")); service = AppiumDriverLocalService.buildService(serviceBuilder); service.start(); return service; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AppiumDriverLocalService StartServer()\n\t{\n\t\tservice = AppiumDriverLocalService.buildDefaultService();\n\t\tservice.start();\n\t\treturn service;\n\t}", "private void intializeAppiumDriver() {\n File app = new File(\"src/main/resources\", CommonUtils.getCentralData(\"App\"));\n\n Desired...
[ "0.743169", "0.6564624", "0.62972707", "0.6028346", "0.5985221", "0.5975093", "0.593061", "0.58624136", "0.5837893", "0.5771783", "0.5749691", "0.572159", "0.570123", "0.56529117", "0.56212676", "0.56110615", "0.5578812", "0.5571885", "0.5528072", "0.5526488", "0.5518936", ...
0.7727441
0
This method creates required Appium driver object and return with capabilites from global.properties
public static AppiumDriver getDriver(String platformtype, AppiumDriverLocalService service) throws IOException, TimeoutException, URISyntaxException { AppiumDriver driver; /* List<InterceptedMessage> messages = new ArrayList<InterceptedMessage>(); MitmproxyJava proxy = new MitmproxyJava("/usr/local/bin/mitmdump", (InterceptedMessage m) -> { System.out.println("intercepted request for " + m.requestURL.toString()); messages.add(m); return m; }); //System.out.println("Hello World"); proxy.start();*/ if (platformtype== "Android") { DesiredCapabilities options = new DesiredCapabilities(); options.setCapability("deviceName", propertyManager.getInstance().getdevicename()); //Pixel_XL_API_29 options.setCapability("udid",propertyManager.getInstance().getdeviceUDID()); //options.setCapability("avd","Pixel_XL_API_29"); options.setCapability("platformName", propertyManager.getInstance().getplatformName()); options.setCapability("platformVersion", propertyManager.getInstance().getplatformVersion()); //emulator: 10.0.0 options.setCapability("automationName", "UiAutomator2"); options.setCapability("autoGrantPermissions","true"); options.setCapability("noReset","true"); options.setCapability("autoAcceptAlerts","true"); options.setCapability("app",propertyManager.getInstance().getAndroidapp()); options.setCapability("uiautomator2ServerInstallTimeout", "60000"); options.setCapability("abdExecTimeout", "60000"); options.setCapability("ACCEPT_SSL_CERTS",true); options.setCapability("clearDeviceLogsOnStart","true"); //options.setCapability("--set ssl_version_client","all"); //options.setCapability("--proxy-server","localhost:8080"); //options.setCapability("appWaitPackage", "com.clearchannel.iheartradio.controller.debug"); //options.setCapability("appWaitActivity", "com.clearchannel.iheartradio.controller.activities.NavDrawerActivity"); //options.setCapability("appPackage", "com.clearchannel.iheartradio.controller.debug"); //options.setCapability("appActivity", "com.clearchannel.iheartradio.controller.activities.NavDrawerActivity"); driver = new AndroidDriver<MobileElement>(service, options); return driver; } else if(platformtype== "iOS"){ DesiredCapabilities options = new DesiredCapabilities(); options.setCapability("platformName", "iOS"); options.setCapability("platformVersion", propertyManager.getInstance().getiOSplatformVersion()); options.setCapability("deviceName", propertyManager.getInstance().getiOSdevicename()); options.setCapability("udid",propertyManager.getInstance().getiOSUDID()); //options.setCapability(CapabilityType.BROWSER_NAME,"safari"); //options.setCapability("automationName", "XCUITest"); options.setCapability("bundleId","com.clearchannel.iheartradio.enterprise"); options.setCapability("startIWDP","true"); options.setCapability("noReset","true"); options.setCapability("useNewWDA","false"); //options.setCapability("showIOSLog","true"); //options.setCapability("app","/Users/Shruti/Desktop/untitled folder/iHRiOSAppCenter/iHeartRadio.ipa"); // /Users/Shruti/Downloads/iHeartRadio.ipa options.setCapability("xcodeOrgId","BCN32U332R"); options.setCapability("xcodeSigningId","iPhone Developer"); options.setCapability("autoAcceptAlerts","true"); options.setCapability("SHOW_XCODE_LOG","true"); //options.setCapability("updatedWDABundleId","com.Shruti7505.WebDriverAgentRunner"); driver = new IOSDriver<MobileElement>(service,options); return driver; } return driver=null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(groups={\"ut\"})\r\n\tpublic void testCreateCapabilitiesWithUserDefined() {\r\n\t\tSeleniumTestsContext context = new SeleniumTestsContext(SeleniumTestsContextManager.getThreadContext());\r\n\t\tcontext.setBrowser(BrowserType.CHROME.toString());\r\n\t\tcontext.setMobilePlatformVersion(\"8.0\");\r\n\t\tcontex...
[ "0.72187406", "0.70854056", "0.68531567", "0.68451166", "0.680676", "0.66300267", "0.6559353", "0.65555346", "0.65031374", "0.64911443", "0.64676356", "0.6455608", "0.64138985", "0.63953894", "0.6381098", "0.63738793", "0.632276", "0.62580115", "0.62543744", "0.625262", "0.62...
0.618659
23
Only grab random elements between head and tail so that we don't grab a null value
private int randomIndex() { return StdRandom.uniform(head, tail); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void copyRandom(RandomListNode head) {\n while (head != null) {\n // if (head.random.next != null) {\n if (head.next.random != null) { // test case; -1-> null, [null]\n head.next.random = head.random.next;\n }\n head = head.next.next;\n }\n }", "public Item sample() {\n...
[ "0.65738606", "0.6569662", "0.6468886", "0.63312876", "0.62019455", "0.61892205", "0.6170004", "0.60879886", "0.5954056", "0.5918982", "0.58867943", "0.5866079", "0.5832024", "0.5734099", "0.57222784", "0.56670326", "0.5659064", "0.5653068", "0.5651746", "0.5632177", "0.56312...
0.61394435
7
Shuffle slice of array from head to tail. Modifies in place, doesn't make a copy. This is OK because we dequeue() in random order anyway, so order doesn't need to be preserved for noniterator operations.
public Iterator<Item> iterator() { StdRandom.shuffle(array, head, tail); return new RandomizedQueueIterator(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void shuffle() {\n for (int i = size - 1; i > 0; i--) {\n swap(i, (int)(Math.random() * (i + 1)));\n }\n }", "public static void shuffle( int[] a ) {\n int N = a.length;\n \n for ( int i = 0; i < N; i++ ) {\n int r = i + uniform( N - i ); // between i and N-...
[ "0.6026914", "0.585908", "0.584611", "0.584611", "0.5833675", "0.5830347", "0.5813521", "0.57949454", "0.5792256", "0.5781759", "0.5762644", "0.57617664", "0.57572675", "0.5724063", "0.5703212", "0.56947744", "0.5693153", "0.5673125", "0.5655229", "0.56410086", "0.5612017", ...
0.0
-1
Creates new form CircularLayoutComponent
public CircularLayoutComponent() { initComponents(); setOpaque(true); setDoubleBuffered(true); segmentSizeSpinner.addChangeListener(this); targetMarginSpinner.addChangeListener(this); sourceMarginSpinner.addChangeListener(this); segmentMarginSpinner.addChangeListener(this); segmentAngleSpinner.addChangeListener(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@AutoGenerated\n\tprivate FormLayout buildFormLayout() {\n\t\tformLayout = new FormLayout();\n\t\tformLayout.setImmediate(false);\n\t\tformLayout.setWidth(\"400px\");\n\t\tformLayout.setHeight(\"-1px\");\n\t\tformLayout.setMargin(false);\n\t\tformLayout.setSpacing(true);\n\t\t\n\t\t// fieldArtist\n\t\tfieldArtist ...
[ "0.6006565", "0.59670186", "0.59670186", "0.58771694", "0.58585715", "0.57712865", "0.5765611", "0.5731388", "0.5725393", "0.5718747", "0.5699509", "0.5652738", "0.5607065", "0.56011105", "0.5590571", "0.5559948", "0.5535268", "0.5533942", "0.553154", "0.55300844", "0.5524826...
0.71740603
0
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jToolBar1 = new javax.swing.JToolBar(); filler9 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 32767)); jButton1 = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 32767)); segmentSizeSpinner = new javax.swing.JSpinner(); filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 32767)); jLabel4 = new javax.swing.JLabel(); filler6 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 32767)); segmentMarginSpinner = new javax.swing.JSpinner(); filler10 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 32767)); jLabel5 = new javax.swing.JLabel(); filler11 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 32767)); segmentAngleSpinner = new javax.swing.JSpinner(); jSeparator1 = new javax.swing.JToolBar.Separator(); filler4 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 32767)); jLabel3 = new javax.swing.JLabel(); filler7 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 32767)); sourceMarginSpinner = new javax.swing.JSpinner(); filler8 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 32767)); jLabel2 = new javax.swing.JLabel(); filler3 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 32767)); targetMarginSpinner = new javax.swing.JSpinner(); filler5 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 32767)); jCheckBox1 = new javax.swing.JCheckBox(); filler12 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 32767)); filler13 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 32767)); setLayout(new java.awt.BorderLayout()); jToolBar1.setRollover(true); jToolBar1.add(filler9); jButton1.setText("To SVG"); jButton1.setFocusable(false); jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButton1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jToolBar1.add(jButton1); jLabel1.setText("Segment Size"); jToolBar1.add(jLabel1); jToolBar1.add(filler2); segmentSizeSpinner.setValue(getSegmentSize()); jToolBar1.add(segmentSizeSpinner); jToolBar1.add(filler1); jLabel4.setText("Segment Margin"); jToolBar1.add(jLabel4); jToolBar1.add(filler6); segmentMarginSpinner.setModel(new javax.swing.SpinnerNumberModel(0.05d, 0.0d, 1.0d, 0.01d)); jToolBar1.add(segmentMarginSpinner); segmentMarginSpinner.setValue(getSegmentMargin()); jToolBar1.add(filler10); jLabel5.setText("Segment Angle"); jToolBar1.add(jLabel5); jToolBar1.add(filler11); segmentAngleSpinner.setModel(new javax.swing.SpinnerNumberModel(0.0d, 0.0d, 1.0d, 0.01d)); jToolBar1.add(segmentAngleSpinner); jToolBar1.add(jSeparator1); jToolBar1.add(filler4); jLabel3.setText("Source Margin"); jToolBar1.add(jLabel3); jToolBar1.add(filler7); jToolBar1.add(sourceMarginSpinner); sourceMarginSpinner.setValue(getSourceMargin()); jToolBar1.add(filler8); jLabel2.setText("Target Margin"); jToolBar1.add(jLabel2); jToolBar1.add(filler3); targetMarginSpinner.setValue(getTargetMargin()); jToolBar1.add(targetMarginSpinner); jToolBar1.add(filler5); jCheckBox1.setText("Animate"); jCheckBox1.setFocusable(false); jCheckBox1.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING); jCheckBox1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jCheckBox1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCheckBox1ActionPerformed(evt); } }); jToolBar1.add(jCheckBox1); jToolBar1.add(filler12); jToolBar1.add(filler13); add(jToolBar1, java.awt.BorderLayout.PAGE_START); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.7318948", "0.7290426", "0.7290426", "0.7290426", "0.7284922", "0.7247965", "0.7213206", "0.72080696", "0.7195916", "0.7189941", "0.71835536", "0.71579427", "0.7147217", "0.70927703", "0.7080282", "0.7055882", "0.6987108", "0.69770193", "0.6954159", "0.69529283", "0.6944756...
0.0
-1
End of variables declaration//GENEND:variables
@Override public void stateChanged(ChangeEvent ce) { if (ce.getSource().equals(segmentSizeSpinner)) { setSegmentSize(Double.parseDouble(segmentSizeSpinner.getValue().toString())); } else if (ce.getSource().equals(targetMarginSpinner)) { setTargetMargin(Double.parseDouble(targetMarginSpinner.getValue().toString())); } else if (ce.getSource().equals(sourceMarginSpinner)) { setSourceMargin(Double.parseDouble(sourceMarginSpinner.getValue().toString())); } else if (ce.getSource().equals(segmentMarginSpinner)) { setSegmentMargin(Double.parseDouble(segmentMarginSpinner.getValue().toString())); } else if (ce.getSource().equals(segmentAngleSpinner)) { setSegmentAngle(Double.parseDouble(segmentAngleSpinner.getValue().toString())); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private void assignment() {\n\n\t\t\t}", "private void kk12() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n pu...
[ "0.6359434", "0.6280371", "0.61868024", "0.6094568", "0.60925734", "0.6071678", "0.6052686", "0.60522056", "0.6003249", "0.59887564", "0.59705925", "0.59680873", "0.5967989", "0.5965816", "0.5962006", "0.5942372", "0.5909877", "0.5896588", "0.5891321", "0.5882983", "0.5881482...
0.0
-1
Initializes the controller class.
@Override public void initialize(URL url, ResourceBundle rb) { try{ /* als de server niet werkt kan het een paar seconden duren voordat het venster getoond wordt wanneer je terugkomt van een ander scherm dit weg doen in toekomst? */ if(ConnectionManager.getConnection().isValid(0)){ lblStatus.setText("Connected"); } }catch(Exception e){ // NOG AAN TE PASSEN } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initialize() {\n\t\tcontroller = Controller.getInstance();\n\t}", "public MainController() {\n\t\tcontroller = new Controller(this);\n\t}", "public abstract void initController();", "public Controller() {\n super();\n }", "public Controller() {\n super();\n }", "public Co...
[ "0.8125658", "0.78537387", "0.78320265", "0.776199", "0.776199", "0.76010174", "0.74497247", "0.7437837", "0.7430714", "0.742303", "0.74057597", "0.7341963", "0.7327749", "0.72634363", "0.72230434", "0.7102504", "0.70575505", "0.69873077", "0.69721675", "0.6944077", "0.691256...
0.0
-1
Referentie naar mainApp (start) instellen
public void setMainApp(VIVESbook mainApp) { this.mainApp = mainApp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startApp()\r\n\t{\n\t}", "void launchApp();", "private void launchMain() {\n\t\tfinal Intent i = new Intent(this, MainActivity.class);\n\t\tstartActivity(i);\n\t}", "public void setMainApp(MainApp mainApp);", "public void startApp() {\r\n\t\ttry {\r\n\t\t\tFXMLLoader loader;\r\n\t\t\t// load th...
[ "0.80655545", "0.75351477", "0.7441478", "0.73958427", "0.7149784", "0.70520645", "0.70314455", "0.7016129", "0.70075583", "0.69849133", "0.69341767", "0.6930495", "0.69120955", "0.6903907", "0.68796057", "0.68248147", "0.6817633", "0.68143153", "0.67994744", "0.6773035", "0....
0.0
-1
Class objectClass = EagerSingleton.class; Constructor constructor = objectClass.getDeclaredConstructor(); constructor.setAccessible(true); EagerSingleton singleton1 = EagerSingleton.getInstance(); EagerSingleton singleton2 = (EagerSingleton) constructor.newInstance(); System.out.println(singleton1 == singleton2); Class objectClass = StaticInnerClassSingleton.class; Constructor constructor = objectClass.getDeclaredConstructor(); constructor.setAccessible(true); StaticInnerClassSingleton singleton1 = StaticInnerClassSingleton.getInstance(); StaticInnerClassSingleton singleton2 = (StaticInnerClassSingleton) constructor.newInstance(); System.out.println(singleton1 == singleton2); Class objectClass = LazySingleton.class; Constructor constructor = objectClass.getDeclaredConstructor(); constructor.setAccessible(true); LazySingleton singleton1 = LazySingleton.getInstance(); LazySingleton singleton2 = (LazySingleton) constructor.newInstance(); LazySingleton singleton2 = (LazySingleton) constructor.newInstance(); LazySingleton singleton1 = LazySingleton.getInstance(); System.out.println(singleton1 == singleton2); EnumSingleton singleton = EnumSingleton.getInstance(); singleton.setData(new Object()); ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("singleton_file")); oos.writeObject(singleton); File file = new File("singleton_file"); ObjectInputStream ois = new ObjectInputStream(new FileInputStream(file)); EnumSingleton newSingleton = (EnumSingleton) ois.readObject(); System.out.println(singleton.getData() == newSingleton.getData()); Class objectClass = EnumSingleton.class; Constructor constructor = objectClass.getDeclaredConstructor(String.class, int.class); constructor.setAccessible(true); EnumSingleton singleton1 = EnumSingleton.getInstance(); EnumSingleton singleton2 = (EnumSingleton) constructor.newInstance("qyh", 666); System.out.println(singleton1 == singleton2); Singleton singleton = Singleton.getInstance(); System.out.println(singleton == Singleton.getInstance());
public static void main(String[] args) throws IOException, ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) throws IOException, ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n\n Class objectClass = LazyMethodSingleton.class;\n\n Constructor constructor = objectClass.getDeclaredConstructor();\...
[ "0.7992801", "0.7520662", "0.75193214", "0.6856569", "0.67940307", "0.6680828", "0.6627211", "0.6487173", "0.64132977", "0.6383947", "0.62773085", "0.62573016", "0.6229971", "0.6213709", "0.6213709", "0.61915326", "0.6182987", "0.6177039", "0.60926193", "0.6062202", "0.603907...
0.0
-1
List address book contacts. DEFAULT ATTRS: No limit and without full data
public Result<List<Contact>> listContacts(Long addressBookId) { return listContacts(addressBookId, false, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Contact> getAllContacts();", "public void viewAllContacts(AddressBookDict addressBook) {\n\t\tlog.info(\"Enter the address book name of whose contact list you want to see\");\n\t\tString addressBookName = obj.next();\n\t\tList<PersonInfo> ContactList = addressBook.getContactList(addressBookName);\n\t...
[ "0.75220484", "0.74017805", "0.6862841", "0.6825935", "0.67991465", "0.6793699", "0.67777777", "0.67777777", "0.67777777", "0.67777777", "0.6776938", "0.67056006", "0.6661511", "0.6645808", "0.6643696", "0.66397053", "0.66397053", "0.66397053", "0.66397053", "0.6626762", "0.6...
0.70815015
2
Gets a list of contacts who have unsubscribed since a given date from a given address book. No limit
public Result<List<SuppressedContact>> listUnsubscribedContacts(Long addressBookId, Date since) { return listUnsubscribedContacts(addressBookId, since, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Result<List<SuppressedContact>> listUnsubscribedContacts(Long addressBookId, Date since, int limit) {\n String path = pathWithIdAndParam(DefaultEndpoints.ADDRESS_BOOK_CONTACTS_UNSUBSCRIBED_SINCE_DATE.getPath(), addressBookId, new DateTime(since).toString(DM_DATE_FORMAT));\n\n if (limit > 0) {\...
[ "0.7505403", "0.5733844", "0.5296022", "0.515957", "0.5064275", "0.5053461", "0.49299735", "0.48890898", "0.4814227", "0.47972953", "0.47439742", "0.47437835", "0.472309", "0.47139224", "0.47047386", "0.46808425", "0.46435222", "0.46073726", "0.46044058", "0.46016872", "0.453...
0.78349006
0
Gets a list of contacts who have unsubscribed since a given date from a given address book
public Result<List<SuppressedContact>> listUnsubscribedContacts(Long addressBookId, Date since, int limit) { String path = pathWithIdAndParam(DefaultEndpoints.ADDRESS_BOOK_CONTACTS_UNSUBSCRIBED_SINCE_DATE.getPath(), addressBookId, new DateTime(since).toString(DM_DATE_FORMAT)); if (limit > 0) { int maxSelect = limit >= DEFAULT_MAX_SELECT ? DEFAULT_MAX_SELECT : limit; return sendAndGetFullList(path, new TypeToken<List<SuppressedContact>>() { }, maxSelect, limit); } return sendAndGetFullList(path, new TypeToken<List<SuppressedContact>>() {}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Result<List<SuppressedContact>> listUnsubscribedContacts(Long addressBookId, Date since) {\n return listUnsubscribedContacts(addressBookId, since, 0);\n }", "private void removeExpiredContacts() {\n int numContactsExpired = 0;\n Date dateToday = new Date();\n for (Iterator<U...
[ "0.7871754", "0.5583036", "0.5232841", "0.5152166", "0.5132452", "0.50759524", "0.48993236", "0.47978985", "0.46971595", "0.4691244", "0.46628743", "0.4661402", "0.46333647", "0.45639455", "0.4534066", "0.45285746", "0.45169458", "0.44908172", "0.44835547", "0.4479609", "0.44...
0.72378933
1
This is a very powerful method that allows you to create a list of personalized contacts by deserializing the dataFields map (key, value) returned by DotMailer for each contact. To be able to do this, you have to create a details class for your contact, a JsonDeserializer object where your build the object of the class mentioned before and a type token that wraps all this structure, used for type inference. Please check github repo's wiki for more info on how to use this amazing method!
public <T> Result<List<PersonalisedContact<T>>> listPersonalizedContacts(Long addressBookId, Class<T> clazz, JsonDeserializer<T> jsonDeserializer, TypeToken<List<PersonalisedContact<T>>> typeToken, Boolean withFullData, int limit) { String initialPath = addAttrAndValueToPath(DefaultEndpoints.ADDRESS_BOOK_CONTACTS.getPath(), WITH_FULL_DATA_ATTR, BooleanUtils.toString(withFullData, "true", "false", "false")); String path = pathWithId(initialPath, addressBookId); int maxSelect = limit <= 0 || limit >= DEFAULT_MAX_SELECT ? DEFAULT_MAX_SELECT : limit; return sendAndGetFullList(path, clazz, jsonDeserializer, typeToken, maxSelect, limit); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public <T> Result<List<PersonalisedContact<T>>> listPersonalizedContacts(Long addressBookId, Class<T> clazz, JsonDeserializer<T> jsonDeserializer, TypeToken<List<PersonalisedContact<T>>> typeToken) {\n return listPersonalizedContacts(addressBookId, clazz, jsonDeserializer, typeToken, true, 0);\n }", "p...
[ "0.63548565", "0.59549016", "0.59106666", "0.58880246", "0.57602525", "0.5738472", "0.5707415", "0.56884915", "0.56772614", "0.56589615", "0.56474954", "0.56284535", "0.5617017", "0.5603676", "0.5603047", "0.5598561", "0.55856824", "0.55775034", "0.55592555", "0.55516976", "0...
0.6016614
1
This is a very powerful method that allows you to create a list of personalized contacts by deserializing the dataFields map (key, value) returned by DotMailer for each contact. To be able to do this, you have to create a details class for your contact, a JsonDeserializer object where your build the object of the class mentioned before and a type token that wraps all this structure, used for type inference. Please check github repo's wiki for more info on how to use this amazing method! DEFAULT ATTRS: This request has no limit set.
public <T> Result<List<PersonalisedContact<T>>> listPersonalizedContacts(Long addressBookId, Class<T> clazz, JsonDeserializer<T> jsonDeserializer, TypeToken<List<PersonalisedContact<T>>> typeToken, Boolean withFullData) { return listPersonalizedContacts(addressBookId, clazz, jsonDeserializer, typeToken, withFullData, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public <T> Result<List<PersonalisedContact<T>>> listPersonalizedContacts(Long addressBookId, Class<T> clazz, JsonDeserializer<T> jsonDeserializer, TypeToken<List<PersonalisedContact<T>>> typeToken) {\n return listPersonalizedContacts(addressBookId, clazz, jsonDeserializer, typeToken, true, 0);\n }", "p...
[ "0.64498043", "0.644903", "0.6024994", "0.59795046", "0.5935352", "0.57898253", "0.577147", "0.57710916", "0.57710916", "0.57710916", "0.57710916", "0.5757131", "0.5727984", "0.5709556", "0.5705635", "0.5705635", "0.5705635", "0.5705635", "0.569548", "0.56929237", "0.5680512"...
0.6131358
2
This is a very powerful method that allows you to create a list of personalized contacts by deserializing the dataFields map (key, value) returned by DotMailer for each contact. To be able to do this, you have to create a details class for your contact, a JsonDeserializer object where your build the object of the class mentioned before and a type token that wraps all this structure, used for type inference. Please check github repo's wiki for more info on how to use this amazing method! DEFAULT ATTRS: This will automatically return with full data and has no limit set.
public <T> Result<List<PersonalisedContact<T>>> listPersonalizedContacts(Long addressBookId, Class<T> clazz, JsonDeserializer<T> jsonDeserializer, TypeToken<List<PersonalisedContact<T>>> typeToken) { return listPersonalizedContacts(addressBookId, clazz, jsonDeserializer, typeToken, true, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public <T> Result<List<PersonalisedContact<T>>> listPersonalizedContacts(Long addressBookId, Class<T> clazz, JsonDeserializer<T> jsonDeserializer, TypeToken<List<PersonalisedContact<T>>> typeToken,\n Boolean withFullData, int limit) {\n\n String initialPath = addAttrAndValueToPath(DefaultEndpoint...
[ "0.6541915", "0.6238689", "0.61019814", "0.6037288", "0.5884245", "0.58737856", "0.5777834", "0.57519567", "0.57519567", "0.57519567", "0.57519567", "0.5747642", "0.5743457", "0.5719943", "0.5712414", "0.5709458", "0.5709458", "0.5709458", "0.5709458", "0.5704299", "0.5665427...
0.64932364
1
This is a very powerful method that allows you to process a list of personalized contacts by deserializing the dataFields map (key, value) returned by DotMailer for each contact and apply a processFunction (callback) for each bulk list of contacts. To be able to do this, you have to create a details class for your contact, a JsonDeserializer object where your build the object of the class mentioned before, a type token that wraps all this structure, used for type inference and provide a process function (callback method) that will be called for each personalized contact Please check github repo's wiki for more info on how to use this amazing method! DEFAULT ATTRS: This will automatically process contacts with full data and has no limit set.
public <T> void processFullList(Long addressBookId, Class<T> clazz, JsonDeserializer<T> jsonDeserializer, TypeToken<List<PersonalisedContact<T>>> typeToken, PersonalizedContactsProcessFunction<T> processFunction) { processFullList(addressBookId, clazz, jsonDeserializer, typeToken, true, 0, processFunction); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public <T> Result processFullList(Long addressBookId, Class<T> clazz, JsonDeserializer<T> jsonDeserializer, TypeToken<List<PersonalisedContact<T>>> typeToken, boolean withFullData, int limit,\n PersonalizedContactsProcessFunction<T> processFunction) {\n\n Result<AddressBook> addressBookResult = g...
[ "0.6959207", "0.6431768", "0.62598497", "0.6165038", "0.5422286", "0.53681", "0.53679824", "0.53679824", "0.53679824", "0.53679824", "0.5302359", "0.52914524", "0.52732706", "0.52703595", "0.5232463", "0.5202098", "0.5187498", "0.51855403", "0.5183509", "0.5183509", "0.518350...
0.70868987
0
This is a very powerful method that allows you to process a list of personalized contacts by deserializing the dataFields map (key, value) returned by DotMailer for each contact and apply a processFunction (callback) for each bulk list of contacts. To be able to do this, you have to create a details class for your contact, a JsonDeserializer object where your build the object of the class mentioned before, a type token that wraps all this structure, used for type inference and provide a process function (callback method) that will be called for each personalized contact Please check github repo's wiki for more info on how to use this amazing method!
public <T> Result processFullList(Long addressBookId, Class<T> clazz, JsonDeserializer<T> jsonDeserializer, TypeToken<List<PersonalisedContact<T>>> typeToken, boolean withFullData, int limit, PersonalizedContactsProcessFunction<T> processFunction) { Result<AddressBook> addressBookResult = get(addressBookId); if(!addressBookResult.isSuccessAndNotNull()){ return ResultBuilder.of(addressBookResult).buildAndIgnoreData(); } AddressBook addressBook = addressBookResult.getData(); int nrOfContacts = addressBook.getContacts(); log.info("STARTING TO PROCESS A TOTAL OF {} CONTACTS", nrOfContacts); String initialPath = addAttrAndValueToPath(DefaultEndpoints.ADDRESS_BOOK_CONTACTS.getPath(), WITH_FULL_DATA_ATTR, BooleanUtils.toStringTrueFalse(withFullData)); String path = pathWithId(initialPath, addressBookId); int maxSelect = limit <= 0 || limit >= DEFAULT_MAX_SELECT ? DEFAULT_MAX_SELECT : limit; int skip = 0; do { Result<List<PersonalisedContact<T>>> contacts = sendAndGetFullList(path, clazz, jsonDeserializer, typeToken, maxSelect, MAX_CONTACTS_TO_PROCESS_PER_STEP, skip); contacts.ifSuccessAndNotNull(processFunction); skip += MAX_CONTACTS_TO_PROCESS_PER_STEP; } while (nrOfContacts > skip); return ResultBuilder.successfulWithoutData("Success"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public <T> void processFullList(Long addressBookId, Class<T> clazz, JsonDeserializer<T> jsonDeserializer, TypeToken<List<PersonalisedContact<T>>> typeToken, PersonalizedContactsProcessFunction<T> processFunction) {\n processFullList(addressBookId, clazz, jsonDeserializer, typeToken, true, 0, processFunction...
[ "0.69778556", "0.63608474", "0.6007834", "0.59204745", "0.54834646", "0.54493403", "0.544506", "0.54447097", "0.5429032", "0.5408474", "0.5381669", "0.5319421", "0.5311216", "0.5308554", "0.52670354", "0.5260534", "0.5252083", "0.5252083", "0.5252083", "0.5252083", "0.5228848...
0.6578016
1
Bulk creates, or bulk updates, contacts.
public <T> Result<JobStatus> importList(Long addressBookId, List<T> customContactObjects) { Result<String> csvFilePath = CsvUtil.writeCsv(customContactObjects); if (!csvFilePath.isSuccessAndNotNull()) { return ResultBuilder.of(csvFilePath).buildAndIgnoreData(); } return postFileAndGet(pathWithId(DefaultEndpoints.ADDRESS_BOOK_CONTACTS_IMPORT.getPath(), addressBookId), csvFilePath.getData(), JobStatus.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void createCompaniesContacts() {\n\n log.info(\"CompaniesContactsBean => method : createCompaniesContacts()\");\n\n EntityManager em = EMF.getEM();\n EntityTransaction tx = null;\n\n try {\n tx = em.getTransaction();\n tx.begin();\n for (Compan...
[ "0.6709018", "0.6447301", "0.61449605", "0.580595", "0.56722736", "0.56705844", "0.5576029", "0.5479141", "0.5446574", "0.54336244", "0.541256", "0.53317225", "0.53222454", "0.5310726", "0.52572495", "0.5249219", "0.52339685", "0.52328223", "0.52290434", "0.52172536", "0.5198...
0.0
-1
TODO: Autogenerated Javadoc A factory for creating Pool objects.
public interface PoolFactory<T> { /** * Creates the. * * @return the t */ public T create(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void createPool();", "public abstract T create() throws PoolException;", "public interface Pool {\n public PooledConnection getConnection();\n\n public void createConnection(int ocunt);\n}", "public ObjectPool(PoolObjectFactory factory, String poolName) {\n setObjectFactory(fa...
[ "0.82489586", "0.73832387", "0.7038596", "0.69158477", "0.6906005", "0.6895503", "0.68167114", "0.6814326", "0.67660165", "0.67120385", "0.67024577", "0.6663911", "0.6565613", "0.65240216", "0.647887", "0.63987166", "0.63426965", "0.6325677", "0.6320115", "0.62492424", "0.623...
0.75426173
1
returns barycentric position on line
public static float intersectRayOnLine(PointF rayPos, PointF rayDir, PointF line0, PointF line1){ PointF v1 = Vec2D.subtract(rayPos, line0); PointF v2 = Vec2D.subtract(line1, line0); PointF v3 = Vec2D.perpendicular(rayDir); return Vec2D.dot(v1, v3) / Vec2D.dot(v2, v3); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getPointLine(float yPos){\n int r = (int)yPos / getLineHeight();\n return r < 0 ? 0 : r;\n }", "public double lineLenght() {\n\t\tdouble xdif = p1.getX() - p2.getX();\n\t\tdouble ydif = p1.getY() - p2.getY();\n\t\treturn Math.sqrt(xdif*xdif+ydif*ydif);\t\n\t\t\t\n\t}", "public int g...
[ "0.6377577", "0.6145749", "0.60859764", "0.6074675", "0.6047219", "0.59576416", "0.5916354", "0.5856134", "0.58535725", "0.5723705", "0.5723239", "0.5721935", "0.5718646", "0.57132775", "0.57011914", "0.56727415", "0.56703734", "0.5638782", "0.5621873", "0.55940443", "0.55932...
0.0
-1
cull hits on the back side of the ray
public static float intersectRayLine(PointF rayPos, PointF rayDir, PointF line0, PointF line1){ float fPosOnRay = intersectRayOnLine(line0, Vec2D.subtract(line1, line0), rayPos, Vec2D.add(rayPos, rayDir) ); if(fPosOnRay < 0) return Float.NEGATIVE_INFINITY; return intersectRayOnLine(rayPos, rayDir, line0, line1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Color ray_trace(Ray ray) {\r\n int index = -1;\r\n float t = Float.MAX_VALUE;\r\n \r\n for(int i = 0; i < spheres.size(); i++) {\r\n float xd, yd, zd, xo, yo, zo, xc, yc, zc, rc, A, B, C, disc, t0, t1;\r\n \r\n xd = ray.getDirection().getX();\r\n ...
[ "0.58919513", "0.5844354", "0.58160156", "0.54097795", "0.53465056", "0.5330447", "0.5277157", "0.5277157", "0.5245051", "0.5243509", "0.5211122", "0.52109504", "0.5206338", "0.518948", "0.51792324", "0.50964326", "0.5079879", "0.50720483", "0.5047696", "0.5028837", "0.502687...
0.0
-1
geometry as line segments (two per line segment)
public static Result traceRecursion(PointF vLaserSource, PointF vLaserDir, float fRefractionMultiplier, PointF[] geometry, float[] afRefractiveIndices, float fIntensity, int iRecursionDepth, float fFlightLength){ Result res = new Result(); //init return lists res.lineSegments = new ArrayList<>(); res.intensities = new ArrayList<>(); res.lightLengths = new ArrayList<>(); res.hitIntensities = new ArrayList<>(); res.hitSegments = new ArrayList<>(); //important for angle calculation Vec2D.normalize(vLaserDir); //recursion limiter if(fIntensity < 0.05f || iRecursionDepth > 20) return res; //populate output structure res.lineSegments.add(vLaserSource); res.intensities.add(fIntensity); res.lightLengths.add(fFlightLength); //initialize to infinity float fNearestHit = Float.MAX_VALUE; int iHitIndex = -1; //check each geometry line against this ray for (int iLine = 0; iLine < geometry.length/2; iLine++) { //check if source on right side PointF line0 = geometry[iLine*2]; PointF line1 = geometry[iLine*2 + 1]; //calculate intersection with geometry line float fIntersection = intersectRayLine(vLaserSource, vLaserDir, line0, line1); if(fIntersection > 0.0f && fIntersection < 1.0f){ //stuff intersects //calculate intersection PointF PointF vIntersection = Vec2D.add(line0, Vec2D.mul(fIntersection, Vec2D.subtract(line1, line0)) ); //calculate distance to source float fHitDistance = Vec2D.subtract(vLaserSource, vIntersection).length(); if(Vec2D.subtract(vLaserSource, vIntersection).length() < fNearestHit && fHitDistance > 0.001f) { //new minimum distance fNearestHit = fHitDistance; iHitIndex = iLine; } } } //check if we hit if(iHitIndex == -1) { //bigger than screen final float fInfLength = 3.0f; res.lineSegments.add(Vec2D.add(vLaserSource, Vec2D.mul(fInfLength, vLaserDir)) ); res.lightLengths.add(fFlightLength + fInfLength); } else { //there was a hit somewhere //first re-evaluate PointF line0 = geometry[iHitIndex*2]; PointF line1 = geometry[iHitIndex*2 + 1]; res.hitSegments.add(iHitIndex); res.hitIntensities.add(fIntensity); //calculate point of impact float fIntersection = intersectRayLine(vLaserSource, vLaserDir, line0, line1); PointF vIntersection = Vec2D.add(line0, Vec2D.mul(fIntersection, Vec2D.subtract(line1, line0)) ); //spam line end res.lineSegments.add(vIntersection); float fNextLength = fFlightLength + fNearestHit; res.lightLengths.add(fNextLength); if(afRefractiveIndices[iHitIndex] < 0.0f) return res; //calculate normalized surface normal PointF vLine = Vec2D.subtract(line1, line0); PointF vSurfaceNormal = Vec2D.flip(Vec2D.perpendicular(vLine)); Vec2D.normalize(vSurfaceNormal); //calculate direction of reflection PointF vReflected = Vec2D.add(Vec2D.mul(-2.0f, Vec2D.mul(Vec2D.dot(vSurfaceNormal, vLaserDir), vSurfaceNormal)), vLaserDir); double fImpactAngle = Math.acos(Vec2D.dot(vSurfaceNormal, Vec2D.flip(vLaserDir))); double fRefractionAngle = 0.0f; float fRefracted = 0.0f; boolean bTotalReflection = false; if(afRefractiveIndices[iHitIndex] < 5.0f) { //calculate which side of the object we're on if (Vec2D.dot(vSurfaceNormal, Vec2D.subtract(vLaserSource, line0)) < 0) { //from medium to air //angle will become bigger double fSinAngle = Math.sin(fImpactAngle) * (afRefractiveIndices[iHitIndex] * fRefractionMultiplier); if (fSinAngle > 1.0f || fSinAngle < -1.0f) //refraction would be back into object bTotalReflection = true; else { //calculate refraction fRefractionAngle = Math.asin(fSinAngle); float fFlippedImpactAngle = (float) Math.asin(Math.sin(fImpactAngle)); fRefracted = (float) (2.0f * Math.sin(fFlippedImpactAngle) * Math.cos(fRefractionAngle) / Math.sin(fFlippedImpactAngle + fRefractionAngle)); //set refraction angle for direction calculation fRefractionAngle = Math.PI - fRefractionAngle; } } else { //from air to medium //angle will become smaller fRefractionAngle = Math.asin(Math.sin(fImpactAngle) / (afRefractiveIndices[iHitIndex] * fRefractionMultiplier)); fRefracted = (float) (2.0f * Math.sin(fRefractionAngle) * Math.cos(fImpactAngle) / Math.sin(fImpactAngle + fRefractionAngle)); } } else bTotalReflection = true; //give the refraction angle a sign if(Vec2D.dot(vLine, vLaserDir) < 0) fRefractionAngle = -fRefractionAngle; //calculate direction of refraction double fInvertedSurfaceAngle = Math.atan2(-vSurfaceNormal.y, -vSurfaceNormal.x); PointF vRefracted = new PointF((float)Math.cos(fInvertedSurfaceAngle - fRefractionAngle), (float)Math.sin(fInvertedSurfaceAngle - fRefractionAngle)); //calculate amount of light reflected float fReflected = 1.0f - fRefracted; //continue with recursion, reflection Result resReflection = traceRecursion(vIntersection, vReflected, fRefractionMultiplier, geometry, afRefractiveIndices, fReflected * fIntensity, iRecursionDepth+1, fNextLength); //merge results res.lineSegments.addAll(resReflection.lineSegments); res.intensities.addAll(resReflection.intensities); res.lightLengths.addAll(resReflection.lightLengths); res.hitSegments.addAll(resReflection.hitSegments); res.hitIntensities.addAll(resReflection.hitIntensities); //continue with recursion, refraction if(!bTotalReflection) { Result resRefraction = traceRecursion(vIntersection, vRefracted, fRefractionMultiplier, geometry, afRefractiveIndices, fRefracted * fIntensity, iRecursionDepth+1, fNextLength); //merge results res.lineSegments.addAll(resRefraction.lineSegments); res.intensities.addAll(resRefraction.intensities); res.lightLengths.addAll(resRefraction.lightLengths); res.hitSegments.addAll(resRefraction.hitSegments); res.hitIntensities.addAll(resRefraction.hitIntensities); } } return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public UBA<Line> _toLineSegments()\n {\n UBA<Line> output = new UBA<Line>();\n\n int len = _points.size();\n for(int i = 0; i < len - 1; i++)\n {\n Line line = new Line(i, i + 1, _points);\n output.push(line);\n }\n\n // Add the last point.\n ...
[ "0.7118659", "0.64264995", "0.6318571", "0.62670135", "0.6195472", "0.6039127", "0.59868413", "0.5958927", "0.5957951", "0.5939861", "0.59041", "0.5900083", "0.58810055", "0.58470774", "0.5841988", "0.58378816", "0.58192044", "0.57975686", "0.5782513", "0.57766485", "0.576163...
0.0
-1
method for outside callers occludes iteration setup
public static Result traceRecursion(PointF vLaserSource, PointF vLaserDir, float fRefractionMultiplier, PointF[] geometry, float[] afRefractiveIndices, float fIntensity){ return traceRecursion(vLaserSource, vLaserDir, fRefractionMultiplier, geometry, afRefractiveIndices, fIntensity, 0, 0.0f); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void runBeforeIteration() {}", "private static void iterator() {\n\t\t\r\n\t}", "protected void runBeforeIterations() {}", "protected void runAfterIteration() {}", "@Override\n protected void runOneIteration() throws Exception {\n }", "protected void runAfterIterations() {}", "public ab...
[ "0.77164274", "0.7408061", "0.7131026", "0.7014419", "0.6801779", "0.67360145", "0.6373697", "0.6172142", "0.61302257", "0.6108503", "0.6078568", "0.606362", "0.60496235", "0.60488963", "0.6008975", "0.6008607", "0.594165", "0.5924136", "0.5919837", "0.5839833", "0.5809021", ...
0.0
-1
Called when the activity is first created.
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //setContentView(R.layout.activity_talk); setTitle("Client"); mDeviceID = "sly12"; /*((TextView) findViewById(R.id.target_text)).setText(mDeviceID); final Button startButton = ((Button) findViewById(R.id.start_button)); final Button stopButton = ((Button) findViewById(R.id.stop_button)); startButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Editor editor = getSharedPreferences(PushService.TAG, MODE_PRIVATE).edit(); editor.putString(PushService.PREF_DEVICE_ID, mDeviceID); editor.commit(); PushService.actionStart(getApplicationContext()); startButton.setEnabled(false); stopButton.setEnabled(true); } }); stopButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { PushService.actionStop(getApplicationContext()); startButton.setEnabled(true); stopButton.setEnabled(false); } });*/ }
{ "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
get all CD in database (SELECT ALL) > return List CD
public List<CD> getCDFromDB() { List<CD> lst = new ArrayList<>(); try (Connection conn = db.connect()) { Statement statement = (Statement) conn.createStatement(); String sql = "SELECT * FROM cd"; ResultSet resultSet = statement.executeQuery(sql); while (resultSet.next()) { CD obj = new CD(); obj.setId(resultSet.getInt("id")); obj.setName(resultSet.getString("name")); obj.setNumOfSong(resultSet.getInt("numbersongs")); obj.setSinger(resultSet.getString("singer")); obj.setPrice(resultSet.getDouble("price")); lst.add(obj); } conn.close(); } catch (SQLException | ClassNotFoundException ex) { System.out.println("Error: " + ex.getMessage()); } return lst; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Dormitory> selectAll();", "@Override\n\tpublic List<DvdCd> getAll() {\n\t\tlogger.info(\"Listando todos os DVDs/CDs\");\n\t\treturn itemRepository.findAll(UserServiceImpl.authenticated().getId());\n\t}", "public List selectAll() {\n\t\tList values = new ArrayList();\n\t\topen();\n\t\tCursor c = queryDB();...
[ "0.738077", "0.73614806", "0.7172475", "0.7105211", "0.7067766", "0.7062721", "0.7051319", "0.7007269", "0.70031625", "0.6923508", "0.6916874", "0.6893894", "0.68758965", "0.6865955", "0.6858478", "0.6857005", "0.6853022", "0.68516934", "0.68187845", "0.6781999", "0.67704004"...
0.7706039
0
add CD to file CD.xml with parameter CD c
public static void addToXML(CD c) throws TransformerException, FileNotFoundException, SAXException, IOException { try { DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = docFactory.newDocumentBuilder(); // root elements Document doc = docBuilder.newDocument(); Element rootElement; String filePath = "src/Part2_Ex3/CD.xml"; File xmlFile = new File(filePath); if (xmlFile.isFile()) { doc = docBuilder.parse(new FileInputStream(xmlFile)); doc.getDocumentElement().normalize(); rootElement = doc.getDocumentElement(); } else { rootElement = doc.createElement("CDs"); doc.appendChild(rootElement); } Element cd = doc.createElement("CD"); rootElement.appendChild(cd); // id element Element id = doc.createElement("id"); id.appendChild(doc.createTextNode(Integer.toString(c.getId()))); cd.appendChild(id); // name Element name = doc.createElement("name"); name.appendChild(doc.createTextNode(c.getName())); cd.appendChild(name); //singer Element singer = doc.createElement("singer"); singer.appendChild((doc.createTextNode(c.getSinger()))); cd.appendChild(singer); // number songs Element numbersongs = doc.createElement("numbersongs"); numbersongs.appendChild(doc.createTextNode(Integer.toString(c.getNumOfSong()))); cd.appendChild(numbersongs); // price Element price = doc.createElement("price"); price.appendChild(doc.createTextNode(Double.toString(c.getPrice()))); cd.appendChild(price); // write the content into xml file TransformerFactory transformerFactory = TransformerFactory.newInstance(); Transformer transformer = transformerFactory.newTransformer(); DOMSource source = new DOMSource(doc); StreamResult result = new StreamResult(xmlFile); transformer.transform(source, result); System.out.println("Add completed !"); } catch (ParserConfigurationException pce) { System.out.println("Cannot insert new CD. Error: " + pce.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void writeXMLFile(List<CD> lst)\n\t\t\tthrows TransformerException, FileNotFoundException, SAXException, IOException {\n\t\ttry {\n\t\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\n\t\t\t// root elem...
[ "0.60344994", "0.5905428", "0.58450675", "0.5511398", "0.53289014", "0.52572644", "0.521743", "0.5212595", "0.5144334", "0.5141718", "0.5096633", "0.50932854", "0.50731474", "0.5070189", "0.5051355", "0.5020039", "0.5015405", "0.49602365", "0.4957971", "0.49344608", "0.491536...
0.8057957
0
get CD from node > return Object CD
private static CD getCD(Node node) { CD cd = new CD(); if (node.getNodeType() == Node.ELEMENT_NODE) { Element element = (Element) node; cd.setId(Integer.parseInt(element.getElementsByTagName("id").item(0).getChildNodes().item(0).getNodeValue())); cd.setName(element.getElementsByTagName("name").item(0).getChildNodes().item(0).getNodeValue()); cd.setSinger(element.getElementsByTagName("singer").item(0).getChildNodes().item(0).getNodeValue()); cd.setNumOfSong(Integer.parseInt(element.getElementsByTagName("numbersongs").item(0).getChildNodes().item(0).getNodeValue())); cd.setPrice(Double.parseDouble(element.getElementsByTagName("price").item(0).getChildNodes().item(0).getNodeValue())); } return cd; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Node getChildById(String identifier)\r\n {\r\n Node result = null;\r\n\r\n result = convertNode(cmisSession.getObject(identifier));\r\n\r\n return result;\r\n }", "Object get(Node node);", "public CatalogNode getNode(String node);", "Object getDocumentNode(Object contextNod...
[ "0.61203617", "0.59989136", "0.5890401", "0.5765919", "0.5747466", "0.56846726", "0.5663884", "0.56595063", "0.55706084", "0.55611986", "0.5553196", "0.5534578", "0.5512795", "0.55052984", "0.547829", "0.5476781", "0.54702705", "0.5466366", "0.54373276", "0.53948146", "0.5391...
0.80067134
0
get all CD from xml file > return list CD
public static List<CD> getCDFromXML() throws SAXException, IOException, ParserConfigurationException { String filePath = "src/Part2_Ex3/CD.xml"; File xmlFile = new File(filePath); DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dBuilder; dBuilder = dbFactory.newDocumentBuilder(); Document doc = dBuilder.parse(xmlFile); doc.getDocumentElement().normalize(); List<CD> lst = new ArrayList<>(); NodeList nodeList = doc.getElementsByTagName("CD"); for (int i = 0; i < nodeList.getLength(); i++) { lst.add(getCD(nodeList.item(i))); } return lst; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static NodeList readXML(String filename, String id)\r\n\t{\r\n\t\t\r\n\t\tNode child = readXML(filename);\r\n\t // Lista di tutti gli elementi\r\n\t NodeList list = ((Element)child).getElementsByTagName(id);\r\n\t \r\n\t\t \r\n\t\treturn list;\r\n\t}", "public void readXML() {\n\t try {\n\n...
[ "0.6299804", "0.609905", "0.60554135", "0.6054425", "0.5873121", "0.5757557", "0.5691581", "0.56884724", "0.5688165", "0.567226", "0.5666035", "0.56635857", "0.55750126", "0.5512344", "0.54917526", "0.54890615", "0.548335", "0.5453948", "0.5449539", "0.5442062", "0.5439911", ...
0.8035951
0
write list to xml file
public static void writeXMLFile(List<CD> lst) throws TransformerException, FileNotFoundException, SAXException, IOException { try { DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = docFactory.newDocumentBuilder(); // root elements Document doc = docBuilder.newDocument(); Element rootElement = doc.createElement("CDs"); doc.appendChild(rootElement); String filePath = "src/Part2_Ex3/CD.xml"; File xmlFile = new File(filePath); for (CD c : lst) { Element cd = doc.createElement("CD"); rootElement.appendChild(cd); // id element Element id = doc.createElement("id"); id.appendChild(doc.createTextNode(Integer.toString(c.getId()))); cd.appendChild(id); // name Element name = doc.createElement("name"); name.appendChild(doc.createTextNode(c.getName())); cd.appendChild(name); //singer Element singer = doc.createElement("singer"); singer.appendChild((doc.createTextNode(c.getSinger()))); cd.appendChild(singer); // number songs Element numbersongs = doc.createElement("numbersongs"); numbersongs.appendChild(doc.createTextNode(Integer.toString(c.getNumOfSong()))); cd.appendChild(numbersongs); // price Element price = doc.createElement("price"); price.appendChild(doc.createTextNode(Double.toString(c.getPrice()))); cd.appendChild(price); // write the content into xml file Transformer transformer = TransformerFactory.newInstance().newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty(OutputKeys.METHOD, "xml"); transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "5"); DOMSource source = new DOMSource(doc); StreamResult result = new StreamResult(new File(filePath)); transformer.transform(source, result); } } catch (ParserConfigurationException pce) { System.out.println("Cannot insert new contact. Error: " + pce.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeListtoFile(String path)\n\t\t\tthrows ParserConfigurationException, TransformerException, SAXException, IOException {\n\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\t\tDocument doc = docBuilder.new...
[ "0.7440129", "0.7091236", "0.70179427", "0.6881368", "0.67749035", "0.6618443", "0.6534009", "0.65048313", "0.6425958", "0.6424454", "0.6418634", "0.63613605", "0.6335643", "0.6300192", "0.62879574", "0.6275225", "0.6259729", "0.62353665", "0.6230444", "0.6158329", "0.6147136...
0.7602032
0
This factory sets focus on the window that had focus set when the given page object was created.
public interface FocusablePageObjectFactory extends PageObjectFactory { /** * Sets focus on the page object window. * * @param pageObject the page object to set focus on its window * @param <T> the type of the page object * @return the page object given as an argument */ @Nonnull <T> T focus(@Nonnull T pageObject); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Nonnull\n <T> T focus(@Nonnull T pageObject);", "public PageObject getFocus() throws FileSystemException {\n\t\tlogger.info(\"Obtaining focus for \" + this.getClass().getSimpleName());\n\t\tWebDriver wd = Connection.getDriver();\n\t\twd.switchTo().window(windowHandle);\n\t\treturn this;\n\t}", "private voi...
[ "0.65021694", "0.60025644", "0.5732401", "0.5683621", "0.5593096", "0.55706555", "0.5530547", "0.551588", "0.551588", "0.551588", "0.54997236", "0.5482424", "0.5465953", "0.54278", "0.5426482", "0.5351883", "0.53304964", "0.5298863", "0.5298863", "0.52827114", "0.5243855", ...
0.67590314
0
Sets focus on the page object window.
@Nonnull <T> T focus(@Nonnull T pageObject);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "public void setFocus() {\n \t\tviewer.getControl().setFocus();\n \t}", "public void setFocus() {\...
[ "0.71007854", "0.71007854", "0.71007854", "0.7088403", "0.7083176", "0.68545514", "0.679586", "0.6777755", "0.676854", "0.67003864", "0.66803604", "0.6612763", "0.6565439", "0.6502602", "0.646447", "0.64575464", "0.64341253", "0.6402593", "0.6374012", "0.6366441", "0.6345881"...
0.6762442
9
/ Would be nice to have power as a function of components but that would increase complexity Getters =================================================================
public String getMake() { return make; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Double getMultiplier();", "public int getPower();", "Sum getMultiplier();", "float getPower();", "public double getPower() {\r\n return power;\r\n }", "public float getPowerMultiplier() { return 0.5F; }", "public double getPower()\n {\n return this.power;\n }", "public double g...
[ "0.7176282", "0.7140862", "0.7027175", "0.70066947", "0.68543077", "0.67914706", "0.67883074", "0.6782192", "0.67661536", "0.66847986", "0.6662631", "0.6615479", "0.6599782", "0.6576178", "0.6567083", "0.65311164", "0.65302944", "0.65243155", "0.65071017", "0.6503922", "0.649...
0.0
-1
Setters ================================================================= / Make and model will not change, but other fields could change if components are changed
public void setClockRate(double clockRate) { CompUtils.checkLessThanEqZero(clockRate); this.clockRate = clockRate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void setModel() {\n\t}", "void set(Model model);", "@Override\n\tprotected void setValueOnUi() {\n\n\t}", "private void setModelToChanged() {\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t}", "@Override\r\n\tpublic void setModel() {\n\t\tnew UpUI(context).execute();\r\n\t}", "vo...
[ "0.7093298", "0.65767133", "0.63687545", "0.62544996", "0.62433773", "0.62189364", "0.6218436", "0.6209409", "0.6167389", "0.6163228", "0.61322165", "0.61028963", "0.6093984", "0.60723364", "0.6058639", "0.6033658", "0.6018341", "0.5994595", "0.5983037", "0.59779453", "0.5890...
0.0
-1
Overloaded for custombuilt computers (no make/model)
public BasicComputer(double clockRate, double memory, int storage, int power) { this.make = "N/A"; this.model = "N/A"; this.setClockRate(clockRate); this.setMemory(memory); this.setMemory(storage); this.setPower(power); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Computer build() {\n return computer;\n }", "public static void main(String[] args) {\n Computer computer = new Computer.Builder()\n .withCase(\"Tower\")\n .withCPU(\"Intel i5\")\n .withMotherboard(\"MSI B360M-MORTAR\")\n ...
[ "0.613131", "0.6107665", "0.6001406", "0.5981666", "0.5978812", "0.5971663", "0.59673935", "0.58808875", "0.57289183", "0.5720164", "0.5634898", "0.56035125", "0.5562453", "0.55453056", "0.5516837", "0.55064064", "0.5503139", "0.5470627", "0.545338", "0.5441161", "0.54297835"...
0.541854
21
Methods ================================================================= Checks whether an object has the same field values as this instance of BasicComputer
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } BasicComputer that = (BasicComputer) obj; return Double.compare(that.clockRate, clockRate) == 0 && Double.compare(that.memory, memory) == 0 && storage == that.storage && power == that.power && make.equals(that.make) && model.equals(that.model); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean equals(Object object1) {\n if (object1 != null && object1.getClass() != this.getClass())\n {\n return false;\n }\n else\n {\n Computer c1 = (Computer) object1;\n return (this.brand.equals(c1.brand) && this.model.equals(c1.model) && ...
[ "0.6304393", "0.61928797", "0.61633646", "0.61099017", "0.6077999", "0.60764897", "0.6005965", "0.59911686", "0.59869057", "0.5974115", "0.5970246", "0.5964675", "0.59568614", "0.5946906", "0.5931324", "0.59281975", "0.5912106", "0.5911329", "0.59089416", "0.5908218", "0.5899...
0.6629017
0
/ Complete the timeConversion function below.
static String timeConversion(String s) { if(s.indexOf('P') >= 0 && s.substring(0, 2).equals("12")){ } else if(s.indexOf('P') >= 0){ Integer n = Integer.parseInt(s.substring(0, 2)); s = removeHour(s); n += 12; String hour = Integer.toString(n); s = hour + s; } else if (s.indexOf('A') >= 0 && s.substring(0, 2).equals("12")){ s = "00" + s.substring(2); } return removeHourFormat(s); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String TimeConversion() {\n\n int hours, minutes, seconds, dayOfWeek, date, month, year;\n\n seconds = ((raw[27] & 0xF0) >> 4) + ((raw[28] & 0x03) << 4);\n minutes = ((raw[28] & 0xFC) >> 2);\n hours = (raw[29] & 0x1F);\n dayOfWeek = ((raw[29] & 0xE0) >> 5);\n date ...
[ "0.72024155", "0.67538023", "0.67258596", "0.6702843", "0.6562888", "0.6441442", "0.63837034", "0.63185495", "0.621965", "0.60767555", "0.6061392", "0.60245377", "0.60231", "0.59476256", "0.5860755", "0.5828806", "0.5783142", "0.5779144", "0.57752883", "0.5763532", "0.5742500...
0.60683644
10
should auto redirect to login page when not logged in
@Test public void userCanNotAccessHomePageWhenNotLoggedIn() { TestUtils.getHomePage(driver, appUrl); assertTrue(driver.getCurrentUrl().contains(LoginPage.LOGIN_PATH)); LoginPage loginPage = new LoginPage(driver); assertTrue(loginPage.pageLoaded()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void redirectToLogin();", "private void redirectToLandingPage(){\n\t\tappInjector.getAppService().getLoggedInUser(new SimpleAsyncCallback<UserDo>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(UserDo loggedInUser) {\n\t\t\t\tAppClientFactory.setLoggedInUser(loggedInUser);\n\t\t\t\tUcCBundle.INSTANCE.css().ens...
[ "0.7719871", "0.74093664", "0.74079794", "0.7276935", "0.72560096", "0.72341573", "0.70614624", "0.7045819", "0.704118", "0.70291215", "0.7006826", "0.6993185", "0.6987856", "0.68715477", "0.68666804", "0.6824871", "0.67767704", "0.6755746", "0.6743143", "0.67173046", "0.6716...
0.6137767
91
Gets a list of all players on a Minecraft server. This list should not be modified!
public List<ServerPlayerEntity> getPlayerList() { return this.players; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<String> getAllPlayers() throws ServerProblem {\r\n\ttry (Connection connTDB = ConnectionManager.getInstance().getConnection()) {\r\n\t LOGGER.debug(\"Getting all players\");\r\n\t List<String> results = engine.getAllPlayers(connTDB);\r\n\t LOGGER.debug(\"Players found in the database: \" + res...
[ "0.83144784", "0.76740485", "0.7668961", "0.7656342", "0.76182365", "0.7596373", "0.7571537", "0.7570599", "0.74666524", "0.74626607", "0.7439761", "0.7411613", "0.7408712", "0.7379499", "0.73793", "0.73764527", "0.73744917", "0.73744917", "0.73323375", "0.722344", "0.7220978...
0.76907593
1
This class was generated by the JAXWS RI. JAXWS RI 2.2.9b130926.1035 Generated source version: 2.2
@WebService(name = "BilesikKutukSorgulaKimlikNoServis", targetNamespace = "http://kps.nvi.gov.tr/2017/08/01") @XmlSeeAlso({ ObjectFactory.class }) public interface BilesikKutukSorgulaKimlikNoServis { /** * * @param kriterListesi * @return * returns services.kps.bilesikkutuk.BilesikKutukBilgileriSonucu */ @WebMethod(operationName = "Sorgula", action = "http://kps.nvi.gov.tr/2017/08/01/BilesikKutukSorgulaKimlikNoServis/Sorgula") @WebResult(name = "SorgulaResult", targetNamespace = "http://kps.nvi.gov.tr/2017/08/01") @RequestWrapper(localName = "Sorgula", targetNamespace = "http://kps.nvi.gov.tr/2017/08/01", className = "services.kps.bilesikkutuk.Sorgula") @ResponseWrapper(localName = "SorgulaResponse", targetNamespace = "http://kps.nvi.gov.tr/2017/08/01", className = "services.kps.bilesikkutuk.SorgulaResponse") public BilesikKutukBilgileriSonucu sorgula( @WebParam(name = "kriterListesi", targetNamespace = "http://kps.nvi.gov.tr/2017/08/01") ArrayOfBilesikKutukSorgulaKimlikNoSorguKriteri kriterListesi); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@WebService(name = \"ZWSVUR_UPDSTATUS\", targetNamespace = \"urn:sap-com:document:sap:rfc:functions\")\r\npublic interface ZWSVURUPDSTATUS {\r\n\r\n\r\n /**\r\n * \r\n * @param iNROLIQ\r\n * @param eRETURN\r\n * @param iESTADO\r\n * @param eMESSAGE\r\n */\r\n @WebMethod(operationName ...
[ "0.6379345", "0.631505", "0.6138126", "0.60747355", "0.6074252", "0.6069382", "0.6067046", "0.6049422", "0.60210645", "0.6013054", "0.59982747", "0.59978837", "0.5993776", "0.59932923", "0.59836394", "0.59835434", "0.5977407", "0.5968101", "0.59638673", "0.5961336", "0.594413...
0.59351355
21
TODO Autogenerated method stub
@Override public void visitTerminal(TerminalNode node) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void visitErrorNode(ErrorNode node) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void enterEveryRule(ParserRuleContext ctx) { }
{ "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
A > B (BImpl) > C > A D > E (EImpl) > F (FProvider.get()) > D
@Before public void setup() { Bootstraps.inject(this); A.reset(); BImpl.reset(); C.reset(); analysisContext = analysisContextFactory.buildContext(); analysisContext.getInjectionNodeBuilders().putType(B.class, variableInjectionBuilderFactory.buildVariableInjectionNodeBuilder(astClassFactory.getType(BImpl.class))); analysisContext.getInjectionNodeBuilders().putType(F.class, variableInjectionBuilderFactory.buildProviderInjectionNodeBuilder(astClassFactory.getType(FProvider.class))); analysisContext.getInjectionNodeBuilders().putType(E.class, variableInjectionBuilderFactory.buildVariableInjectionNodeBuilder(astClassFactory.getType(EImpl.class))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Provider {\n Animal produce();\n}", "public void main()\n {\n ContextImplementation context = new ContextImplementation(new StrategyAImplementation());\n context.doSomething();\n\n context.setStrategy(new StrategyBImplementation());\n context.doSomething();\n\n ...
[ "0.5717155", "0.5632845", "0.5623787", "0.54440016", "0.5246085", "0.5192537", "0.5142341", "0.5119522", "0.51155496", "0.5097003", "0.50821245", "0.5074185", "0.506633", "0.50552875", "0.50482714", "0.5018711", "0.5008278", "0.50073564", "0.50015974", "0.49892172", "0.496872...
0.4705587
74
user follow list and liked dishes list
@GET("follow-liked") Call<FollowLikedList> getFollowLikedList(@Header("Authorization") String authToken);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<User> getFollowersForUser(User user);", "Data<List<User>> getFollowers();", "List<User> getFollowingForUser(User user);", "@Override\n\tprotected void getUserList(boolean isRefresh) {\n\t\tsuper.getUserList(isRefresh);\n\n\t\tDamiInfo.getFollowerList(mLogin.uid, searchHolder.getPage(), searchHolder.sear...
[ "0.70210034", "0.67768157", "0.64377666", "0.63943434", "0.6387714", "0.63673496", "0.6351201", "0.62924767", "0.62022483", "0.61626923", "0.613595", "0.6104216", "0.60694724", "0.6041299", "0.6034005", "0.6028123", "0.60071325", "0.5967982", "0.59653324", "0.5959676", "0.595...
0.6595754
2
public PaymentResult unBind(PaymentInfo paymentInfo); public PaymentResult unBindByToken(PaymentInfo paymentInfo);
public PaymentResult addErrorCardBindOrder(PaymentInfo paymentInfo, String type);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void unsetPaymentDelay();", "void unsetCryptProvider();", "void unsetAmount();", "public void sendUnbindRequest(Pdu packet);", "RepaymentPlanInfoUn selectByPrimaryKey(String repaymentId);", "private void clearPayment() { payment_ = null;\n bitField0_ = (bitField0_ & ~0x00000001);\n }", "Bindin...
[ "0.56974196", "0.5626892", "0.55699515", "0.5556164", "0.5547171", "0.55356777", "0.55084395", "0.54451054", "0.539945", "0.53863925", "0.53823847", "0.5341311", "0.5288633", "0.5251385", "0.5251385", "0.5238801", "0.5234626", "0.51999277", "0.51984864", "0.5170976", "0.51662...
0.0
-1
TODO Autogenerated method stub
@Override public void play() { System.out.println("We played Snokker today"); }
{ "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
end of play method
@Override public void work() { // TODO Auto-generated method stub System.out.println("We work in TestYantra software solution"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void play() {\n\t\t\n\t}", "@Override\n\tpublic void play() {\n\n\t}", "public void play(){\n\t\t\n\t}", "public void play() {\n\t\t\r\n\t}", "public static play() {\n\t\t\n\t}", "@Override\n public void playEnd() {\n }", "protected abstract void internalPlay();", "@...
[ "0.82106775", "0.81726336", "0.8061351", "0.804178", "0.7846391", "0.78111774", "0.7774213", "0.777399", "0.76451546", "0.7515986", "0.74396837", "0.7377131", "0.73746777", "0.73480564", "0.73480564", "0.7318913", "0.7270163", "0.7101867", "0.70949763", "0.7087194", "0.706771...
0.0
-1
Note : This is a generic interface for AssignmentStrategy Algorithms.
public interface AssignmentStrategy { public Map<Integer, Integer> assign(DoubleMatrix matrix); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void getAssignment() {\n \n }", "public abstract void createAssignment(int p);", "private void assignment() {\n\n\t\t\t}", "Assignment createAssignment();", "Assignment createAssignment();", "abstract void assignOne();", "@FunctionalInterface\n\tpublic interface Assignment<V> {\n\t\tV ...
[ "0.69353753", "0.6804203", "0.6719786", "0.67023677", "0.67023677", "0.64796644", "0.64162934", "0.6403653", "0.6267847", "0.6134598", "0.6126836", "0.61011225", "0.6096512", "0.6033618", "0.60107845", "0.5939649", "0.59075886", "0.589263", "0.5810372", "0.577727", "0.576584"...
0.7710699
0
super.onNewIntent(intent); String cardid = readICCardNo(intent); NFCIdCard(cardid);
@Override protected void onNewIntent(Intent intent) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void onNewIntent(Intent intent) {\n super.onNewIntent(intent);\n if (NfcAdapter.ACTION_TAG_DISCOVERED.equals(intent.getAction())) {\n myTag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);\n }\n if(isWriting){\n attemptWriteToTag();\n ...
[ "0.70364547", "0.70190436", "0.7011825", "0.69498074", "0.68687415", "0.6682161", "0.6591518", "0.6549418", "0.65477186", "0.6515728", "0.65027326", "0.6474392", "0.6462582", "0.63645655", "0.6351717", "0.6294688", "0.6280716", "0.6254437", "0.624984", "0.62483805", "0.622069...
0.6549777
7
A callback interface that all activities containing this fragment must implement. This mechanism allows activities to be notified of item selections.
public interface Callbacks { /** * Callback for when an item has been selected. */ public void onItemSelected(String id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Parcelable selectedItem);\n }", "public interface Callbacks {\n // Through this method is the activity notified of a selected list item\n void onAnimalSelected(Animal animal);\n }", "public interface Callba...
[ "0.7656191", "0.7616643", "0.7484814", "0.7480515", "0.7441871", "0.7376271", "0.7375894", "0.7361898", "0.73455995", "0.73434824", "0.73384863", "0.7319894", "0.73065203", "0.73065203", "0.72745275", "0.7230043", "0.7209098", "0.71829444", "0.71743494", "0.71703744", "0.7117...
0.7127069
20
Callback for when an item has been selected.
public void onItemSelected(String id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onItemSelected(int index, T item) throws RemoteException;", "public void itemSelected(boolean selected);", "void onItemSelected();", "void onItemSelected();", "void onItemSelected(Bundle args);", "public void onItemSelected(int id);", "public void onItemSelected(Long id);", "public void selectio...
[ "0.7789563", "0.7490137", "0.74395955", "0.74395955", "0.7421139", "0.74109167", "0.73493445", "0.7347984", "0.7323096", "0.7321585", "0.7265096", "0.72242296", "0.72242296", "0.72223955", "0.72223955", "0.7207608", "0.7202577", "0.71826327", "0.7126335", "0.71019566", "0.707...
0.73323333
11
Mandatory empty constructor for the fragment manager to instantiate the fragment (e.g. upon screen orientation changes).
public SpeciesItemListFragment() { Log.d("SILF.LC", "SpeciesItemListFragment"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FragmentMy() {\n }", "public RickAndMortyFragment() {\n }", "public MainActivityFragment() {\n }", "public MainActivityFragment() {\n }", "public RegisterFragment() {\n // Required empty public constructor\n }", "public VehicleFragment() {\r\n }", "public EmployeeFragmen...
[ "0.8031511", "0.76991963", "0.7676922", "0.7676922", "0.7538628", "0.7534647", "0.75326765", "0.75220966", "0.75071454", "0.74123853", "0.7406797", "0.737607", "0.73755896", "0.736607", "0.73266673", "0.73027587", "0.73027587", "0.72954965", "0.7287682", "0.728533", "0.728096...
0.0
-1
Turns on activateonclick mode. When this mode is on, list items will be given the 'activated' state when touched.
public void setActivateOnItemClick(boolean activateOnItemClick) { // When setting CHOICE_MODE_SINGLE, ListView will automatically // give items the 'activated' state when touched. getListView().setChoiceMode( activateOnItemClick ? ListView.CHOICE_MODE_SINGLE : ListView.CHOICE_MODE_NONE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setActivateOnItemClick(boolean activateOnItemClick) {\n // When setting CHOICE_MODE_SINGLE, ListView will automatically\n // give items the 'activated' state when touched.\n getListView().setChoiceMode(\n activateOnItemClick ? ListView.CHOICE_MODE_SINGLE\n ...
[ "0.7372731", "0.7357259", "0.7357259", "0.7357259", "0.7353235", "0.731185", "0.6662019", "0.6508874", "0.643441", "0.6128476", "0.61167306", "0.60830355", "0.60786074", "0.6043659", "0.60426885", "0.6032246", "0.60264903", "0.6017198", "0.6013425", "0.6011779", "0.6011779", ...
0.7375985
2
Create and store a password hash given a password.
public void setPassword(String password) { this.passwordHash = passwordHash; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String hashPassword(String salt, String password);", "String hashPassword(String password);", "public String createHash(String password)\n throws NoSuchAlgorithmException, InvalidKeySpecException\n {\n return createHash(password.toCharArray());\n }", "String generateHashFromPassword(Stri...
[ "0.73768204", "0.7324449", "0.7314846", "0.73054075", "0.7063436", "0.6967932", "0.6965787", "0.692446", "0.68927485", "0.6887954", "0.68404984", "0.6837652", "0.6732466", "0.668295", "0.6681211", "0.6667419", "0.665543", "0.6623398", "0.66173446", "0.6615712", "0.6551098", ...
0.6540966
21
Set complete Set Due Date
@Query("SELECT * FROM goal WHERE _id IS :id") Goal findById(int id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDueDate(Date d){dueDate = d;}", "public void setDueDate(String dueDate) {\n }", "public void setDue(LocalDate due) {\n this.due = due;\n }", "public void setDueDate(Date dueDate) {\r\n\t\tthis.dueDate = dueDate;\r\n\t}", "public void setCompletedDate(Date value) {\n t...
[ "0.8045632", "0.7662821", "0.745249", "0.7311953", "0.72893405", "0.72869307", "0.7158441", "0.7158441", "0.71309674", "0.7108414", "0.7104669", "0.7017488", "0.7009374", "0.7009374", "0.7009374", "0.7009374", "0.7008475", "0.69833845", "0.6927111", "0.6790549", "0.67084795",...
0.0
-1
Gather info and set parameter
@Test public void sessionConnectionTest() { Session session = new Session(1215426); // Set comparison int testAbonneeID = 1215426; // Test Assert.assertTrue(session.getAbonneeID()==(1215426)); System.out.println("Test completed succesfully. 2/2"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setParameter(String name, String value);", "void setParameters() {\n\t\t\n\t}", "public void setParameter(String parName, Object parVal) throws HibException ;", "void setParameter(String name, Object value);", "protected void setupParameters() {\n \n \n\n }", "private void sensorInform...
[ "0.7107757", "0.6935031", "0.6904325", "0.6877459", "0.682046", "0.6647234", "0.6618562", "0.6618562", "0.6618562", "0.6618562", "0.6469622", "0.64551127", "0.6283795", "0.6258658", "0.6217083", "0.6211959", "0.61957896", "0.61920935", "0.61831987", "0.6156964", "0.6152451", ...
0.0
-1
Override so we can disable the ok button
@Override public void create() { super.create(); super.getOKButton().setEnabled(false); super.setTitle(Messages.MoveUnitsWizardPage1_Topolog__2); super.setMessage(Messages.MoveUnitsWizardPage1_Select_a_name_source_folder_and_a_); super.getShell().setText(Messages.MoveUnitsWizardPage1_Topolog__2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void disableOkButton() {\n okButton.setEnabled(false);\n }", "protected abstract boolean onOkClicked();", "public void enableOkButton() {\n okButton.setEnabled(true);\n }", "protected abstract void pressedOKButton( );", "@Override\r\n\tprotected void onOkSelection(SelectionEvent ...
[ "0.83552366", "0.7719115", "0.76317483", "0.7248594", "0.7221805", "0.72110295", "0.71995836", "0.70922995", "0.7079377", "0.69225633", "0.6903934", "0.68881863", "0.68688387", "0.68661517", "0.6843204", "0.68143594", "0.6768215", "0.66683465", "0.6628572", "0.6611547", "0.65...
0.0
-1
/ Given a number n, find if it is a happy number or not. A number is called happy if a sequence of steps leads to 1 where in each sequence of step the number is replaced by sum of square of its digit, i.e., if we start with Happy Number and keep replacing it with digits square sum, we reach 1. Input Format Line 1 : An integer n. Output Format true, if number is a happy number, otherwise false. Input Constraints 1 <= n <= 10^4 Sample Input 1: 13 Sample Output 1: true Sample Output 1 explanation 1^2 + 3^2 = 10 1^2 + 0^2 = 1 Since we reached 1, 13 is happy number Sample Input 2: 14 Sample Output 2: false
public static void main(String[] args) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean happyNumber(int n) {\n\t\tif (n <= 0) {\n\t\t\treturn false;\n\t\t}\n\t\tint sum = 0;\n\t\tHashSet<Integer> set = new HashSet<>();\n\t\tset.add(n);\n\t\twhile (sum != 1) {\n\t\t\tsum = 0;\n\t\t\twhile (n != 0) {\n\t\t\t\tsum += Math.pow(n % 10, 2);\n\t\t\t\tn /= 10;\n\t\t\t}\n\t\t\tif (set.contains(...
[ "0.8794267", "0.8561744", "0.84155416", "0.8029819", "0.7647535", "0.687593", "0.67814416", "0.658748", "0.6455953", "0.6279488", "0.62187463", "0.60912216", "0.60564595", "0.6004536", "0.60001576", "0.59611195", "0.58945435", "0.58650506", "0.5830793", "0.58254886", "0.57963...
0.0
-1
Private constructor to support singleton pattern
private FeedRegistry() { // no-op for singleton pattern }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Singleton()\n\t\t{\n\t\t}", "private Singleton(){}", "private Singleton() {\n\t}", "private Singleton() { }", "private SingletonObject() {\n\n\t}", "private Singleton(){\n }", "private Instantiation(){}", "private SingletonSigar(){}", "private LazySingleton(){}", "private SingletonSamp...
[ "0.83134407", "0.8293567", "0.82741654", "0.82232356", "0.8150225", "0.797878", "0.7841171", "0.7799282", "0.7789394", "0.7740066", "0.7593277", "0.7586033", "0.7585787", "0.75416875", "0.7471776", "0.7440403", "0.74313056", "0.7401361", "0.7351606", "0.7336434", "0.73280144"...
0.68147606
63
Spring injected registry of data feeds
public void setRegistry(Set<DataFeed> registry) { this.registry = registry; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface FactFeedService {\n\n /**\n * Fetches the fact feeds from appropriate location.\n */\n void fetchFactFeeds();\n}", "public interface RssFetcherService {\n\n /**\n * Returns a list of SyndFeed generated by an array of feed urls.\n *\n * @param feedUrls set of rss feed urls\n ...
[ "0.61891407", "0.6085385", "0.5782839", "0.5687247", "0.56698453", "0.5638093", "0.5558378", "0.551775", "0.5487324", "0.54693866", "0.5419599", "0.5349537", "0.5331783", "0.53279257", "0.53259903", "0.53041184", "0.5271384", "0.52621776", "0.52556217", "0.52478", "0.5224947"...
0.6329788
0
Runs data feeds to augment a ProfileBean. The bean must have the userID set
public void augmentProfileWithFeeds(final ProfileBean profileBean) { logger.info("Augmenting profile data for " + profileBean.getUserID() + " using " + registry.size() + " live data feed(s)"); for (DataFeed feed:registry) { if (feed.isEnabled()) { feed.contributeToProfile(profileBean); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void loadProfileUserData() {\n mProfilePresenter.loadProfileUserData();\n }", "@Override\n public void checkProfileUserData() {\n mProfilePresenter.checkProfileUserData();\n }", "public void startProfiles() {\n int currentUserId = getCurrentUserId();\n ...
[ "0.64177555", "0.59786284", "0.57921046", "0.5718846", "0.5716648", "0.5627799", "0.5593666", "0.5579876", "0.5565918", "0.55634964", "0.55076504", "0.5491067", "0.5449539", "0.54304165", "0.54188615", "0.54185915", "0.5401914", "0.53871167", "0.53744113", "0.53376174", "0.53...
0.7176623
0
Gets the singleton instance
public static FeedRegistry getInstance() { if (instance == null) { instance = new FeedRegistry(); } return instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Singleton getInstance( ) {\n return singleton;\n }", "public static Singleton getInstance( ) {\n return singleton;\n }", "public static Singleton getInstance() {\n return mSing;\n }", "public static Singleton getInstance() {\n return SingletonHolder.SINGLETON_I...
[ "0.86795795", "0.86092967", "0.82619864", "0.8211681", "0.8179437", "0.8173437", "0.8124751", "0.81182086", "0.80802053", "0.8071765", "0.8051269", "0.804098", "0.8038184", "0.80278236", "0.8015594", "0.7954346", "0.7940185", "0.7932474", "0.78778154", "0.7853796", "0.7785353...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { shan shany = new shan(); shany.mao(); shany.jiao(); shany.eat(); shany.maoz(); System.out.println(shany.name); }
{ "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
/ We may be called on any slave type so check that we should be in here.
@Override public void preLaunch(Computer c, TaskListener taskListener) throws IOException, InterruptedException { if (!(c.getNode() instanceof VirtualMachineSlave)) { return; } VirtualMachineLauncher vmL = (VirtualMachineLauncher) ((SlaveComputer) c).getLauncher(); Hypervisor vmC = vmL.findOurHypervisorInstance(); if (!vmC.markVMOnline(c.getDisplayName(), vmL.getVirtualMachineName())) throw new AbortException("Capacity threshold (" + vmC.getMaxOnlineSlaves() + ") reached at hypervisor \"" + vmC.getHypervisorDescription() + "\", slave commissioning delayed."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setSlaveMode();", "public void setSlaveId(int slaveId)\n {\n this.slaveId = slaveId;\n }", "public void setSlaveid(String slaveid) {\n this.slaveid = slaveid;\n }", "@Override\r\n\tprotected boolean postMaster(Object curMaster) {\n\t\treturn true;\r\n\t}", "public int getSlaveId...
[ "0.6258309", "0.6129149", "0.59132254", "0.5780041", "0.5747837", "0.5529863", "0.5496808", "0.5457646", "0.5421742", "0.53977996", "0.53977996", "0.53977996", "0.5391951", "0.53842825", "0.53842825", "0.53842825", "0.53595954", "0.5347623", "0.53406835", "0.5331069", "0.5330...
0.0
-1
Instantiates a new main. It just creates a InitScreen and pushes it
public Main() { super(); InitScreen screen = new InitScreen(); pushScreen(screen); UiApplication.getUiApplication().repaint(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void launchMainScreen() {\n\t\tmainWindow = new MainGameScreen(this);\n\t}", "public MainScreen() {\n initComponents();\n \n }", "public MainScreen()\n {\n initComponents();\n \n //Load the tables of the application with data from database\n loadClientTabl...
[ "0.7605422", "0.75287783", "0.7085379", "0.7063532", "0.7045298", "0.6903934", "0.68282384", "0.6770891", "0.6671249", "0.6660183", "0.6541409", "0.64751786", "0.63749", "0.63714355", "0.63714355", "0.63521904", "0.63456315", "0.6341566", "0.6340414", "0.63381785", "0.6334599...
0.8335988
0
Dialog. It shows a dialog, trying it to be executed synchronized with the event dispatcher
public static void dialog(final String texto) { final UiApplication uiApplication = UiApplication.getUiApplication(); uiApplication.invokeAndWait(new Runnable() { public void run() { Dialog screen = new Dialog(Dialog.D_OK, texto, Dialog.OK, Bitmap.getPredefinedBitmap(Bitmap.EXCLAMATION), Dialog.VERTICAL_SCROLL); uiApplication.pushGlobalScreen(screen, UiApplication.GLOBAL_MODAL, UiApplication.GLOBAL_SHOW_LOWER); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showDialog() {\n if (!pDialog.isShowing())\n pDialog.show();\n }", "DialogResult show();", "public void show() {\n listenerHandler.onShow(dialog);\n dialog.show();\n }", "public static void showDialog() {\n\t\tdialog.setLocationRelativeTo(Cytoscape.getDesktop());\n\t\...
[ "0.7515898", "0.7425857", "0.7366702", "0.7318471", "0.71988463", "0.71773326", "0.707725", "0.69979066", "0.67340577", "0.6720448", "0.66905606", "0.6666612", "0.666136", "0.6651003", "0.6634351", "0.66174704", "0.66164213", "0.6603713", "0.6593349", "0.6585147", "0.6581096"...
0.0
-1
Convenient method to set date hours without using deprecated method
public static Date setDateHours(Date date, int hours, TimeZone timeZone, Locale locale) { Calendar cal = getCalendar(null, locale); cal.setTime(date); if (timeZone != null) cal.setTimeZone(timeZone); cal.set(Calendar.HOUR_OF_DAY, hours); return cal.getTime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public boolean setHours(int hours) {\r\n if(hours<0||hours>23)\r\n {\r\n return false;\r\n }\r\n calendar.set(Calendar.HOUR_OF_DAY, hours);\r\n return true;\r\n }", "public final native double setHours(int hours) /*-{\n this.setHours(hours);\n ...
[ "0.69528764", "0.6760713", "0.660834", "0.66008586", "0.6543684", "0.6518732", "0.6430174", "0.6409502", "0.63785934", "0.63763463", "0.63645166", "0.6355923", "0.6312905", "0.62972087", "0.62904644", "0.6221382", "0.6201938", "0.6172247", "0.61227554", "0.61075914", "0.61025...
0.61894095
17
The class holding records for this type
@Override public java.lang.Class<models.tables.records.UserRecord> getRecordType() { return models.tables.records.UserRecord.class; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RecordRecord() {\n\t\tsuper(org.jooq.examples.cubrid.demodb.tables.Record.RECORD);\n\t}", "public Class<?> getRecordClass() \n\t{\n\t return recordClass ;\n\t}", "public DataRecord() {\n super(DataTable.DATA);\n }", "@Override\n public Class<Record> getRecordType() {\n return Re...
[ "0.68004626", "0.66954035", "0.64103794", "0.6398801", "0.6398801", "0.6398801", "0.6398801", "0.6393993", "0.6354873", "0.6192012", "0.61258304", "0.61258304", "0.61258304", "0.6104736", "0.60470754", "0.60470754", "0.60470754", "0.6040716", "0.6029211", "0.6020949", "0.6008...
0.0
-1
Create a User table reference
public User() { super("User", models.DefaultSchema.DEFAULT_SCHEMA); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createTableUser(){\r\n Statement stmt;\r\n try {\r\n stmt = this.getConn().createStatement();\r\n ///////////////*********remember to retrieve*************/////////////\r\n //stmt.executeUpdate(\"create table user(username VARCHAR(40),email VARCHAR(40), pa...
[ "0.7236813", "0.7201425", "0.7018259", "0.6973019", "0.6833866", "0.68227", "0.679188", "0.67301667", "0.6701508", "0.666481", "0.6661209", "0.6630551", "0.66073096", "0.65412414", "0.64496773", "0.6390236", "0.6390204", "0.63350683", "0.6305592", "0.63000077", "0.62796324", ...
0.62656206
24
Create an aliased User table reference
public User(java.lang.String alias) { super(alias, models.DefaultSchema.DEFAULT_SCHEMA, models.tables.User.USER); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String asTableDbName() {\n return \"user\";\n }", "@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}", "private String getCreateUserSQL(String targetSchemaName) {\n\t\treturn \"CREATE USER \" + targetSchemaName + \";\";\n\t}", "TableOrAlias createTableOrAl...
[ "0.59631664", "0.58985597", "0.58178085", "0.5762962", "0.5526539", "0.5485133", "0.5453287", "0.54277617", "0.5387349", "0.5256236", "0.5129195", "0.512687", "0.50610465", "0.5057342", "0.49921727", "0.499027", "0.49740517", "0.4943994", "0.4930481", "0.49108893", "0.4910524...
0.5757533
4
Test method for 'uk.co.demon.ursus.cif.CIFComment.writeHTML(Writer)'
@Test public void testWriteHTML() { CIFComment comment = new CIFComment(COMMENT); StringWriter w = new StringWriter(); try { comment.writeHTML(w); w.close(); } catch (Exception e) { CIFUtil.BUG(e); } Assert.assertEquals("html", "<span class='comment'>"+COMMENT+"</span>\n", w.toString()); // strings comment = new CIFComment(COMMENTS); w = new StringWriter(); try { comment.writeHTML(w); w.close(); } catch (Exception e) { CIFUtil.BUG(e); } Assert.assertEquals("html", "<span class='comment'>"+COMMENTS[0]+"</span>\n" + "<span class='comment'>"+COMMENTS[1]+"</span>\n" + "<span class='comment'>"+COMMENTS[2]+"</span>\n" + "", w.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void commentGetHtmlEnd() {\n // White-Box! Temporär mit NotNull-Test ersetzt\n // assertEquals(\"</i></font><br />\", comment.htmlEnd());\n assertNotNull(comment.htmlStart());\n }", "public PrintWriter getTestCommentWriter() {\n return sections[0].getMessageWriter...
[ "0.62045944", "0.58862936", "0.586745", "0.58617747", "0.5758424", "0.57487804", "0.5711789", "0.55782664", "0.55654156", "0.5543611", "0.55292237", "0.5497937", "0.549667", "0.5484563", "0.54611605", "0.54564244", "0.54419357", "0.53805554", "0.53591365", "0.5344113", "0.533...
0.8509134
0
Test method for 'uk.co.demon.ursus.cif.CIFComment.toCIFString()'
@Test public void testToCIFString() { CIFComment comment = new CIFComment(COMMENT); String s = comment.toCIFString(); Assert.assertEquals("cif comment", "#"+COMMENT+"\n", s); // strings comment = new CIFComment(COMMENTS); s = comment.toCIFString(); Assert.assertEquals("cif comment", "#"+COMMENTS[0]+"\n" + "#"+COMMENTS[1]+"\n" + "#"+COMMENTS[2]+"\n" + "", s); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testCIFCommentString() {\r\n CIFComment comment = new CIFComment(COMMENT);\r\n String s = comment.toCIFString();\r\n Assert.assertEquals(\"cif comment\", \"#\"+COMMENT+\"\\n\", s);\r\n }", "@Test\r\n public void testCIFComment() {\r\n CIFComment comment ...
[ "0.8878504", "0.88695997", "0.7905098", "0.6469016", "0.6427246", "0.6204751", "0.6204751", "0.60499483", "0.5956218", "0.5939139", "0.5933024", "0.59243715", "0.59227353", "0.59134567", "0.5913436", "0.5833578", "0.5825638", "0.5806842", "0.5806717", "0.57994676", "0.5794818...
0.87992114
2
Test method for 'uk.co.demon.ursus.cif.CIFComment.CIFComment()'
@Test public void testCIFComment() { CIFComment comment = new CIFComment(); String s = comment.toCIFString(); Assert.assertEquals("cif comment", "#\n", s); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testCIFCommentString() {\r\n CIFComment comment = new CIFComment(COMMENT);\r\n String s = comment.toCIFString();\r\n Assert.assertEquals(\"cif comment\", \"#\"+COMMENT+\"\\n\", s);\r\n }", "@Test\r\n public void testToCIFString() {\r\n CIFComment comment...
[ "0.8125896", "0.7577359", "0.72682", "0.7073974", "0.6904601", "0.6866618", "0.67380387", "0.6720152", "0.6667074", "0.66611856", "0.66611856", "0.6644838", "0.65923446", "0.6531419", "0.6518541", "0.65115917", "0.65115917", "0.65115917", "0.65115917", "0.65115917", "0.651159...
0.8495495
0
Test method for 'uk.co.demon.ursus.cif.CIFComment.CIFComment(String)'
@Test public void testCIFCommentString() { CIFComment comment = new CIFComment(COMMENT); String s = comment.toCIFString(); Assert.assertEquals("cif comment", "#"+COMMENT+"\n", s); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testCIFComment() {\r\n CIFComment comment = new CIFComment();\r\n String s = comment.toCIFString();\r\n Assert.assertEquals(\"cif comment\", \"#\\n\", s);\r\n }", "@Test\r\n public void testToCIFString() {\r\n CIFComment comment = new CIFComment(COMMENT)...
[ "0.85059464", "0.77669764", "0.749611", "0.7076487", "0.6911856", "0.6911856", "0.6882236", "0.6846127", "0.68355805", "0.6757859", "0.6731151", "0.67265224", "0.6645838", "0.6645838", "0.6645838", "0.6645838", "0.6645838", "0.6645838", "0.6589295", "0.65464664", "0.65464664"...
0.8470765
1
Test method for 'uk.co.demon.ursus.cif.CIFComment.CIFComment(String[])'
@Test public void testCIFCommentStringArray() { CIFComment comment = new CIFComment(COMMENTS); String s = comment.toCIFString(); Assert.assertEquals( "cif comment", "#comment 1\n" + "#comment 2\n" + "#comment 3" + "\n", s); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testCIFCommentString() {\r\n CIFComment comment = new CIFComment(COMMENT);\r\n String s = comment.toCIFString();\r\n Assert.assertEquals(\"cif comment\", \"#\"+COMMENT+\"\\n\", s);\r\n }", "@Test\r\n public void testCIFComment() {\r\n CIFComment comment ...
[ "0.67981035", "0.6790047", "0.6737303", "0.6223831", "0.59845906", "0.59641427", "0.5931945", "0.5920731", "0.58021474", "0.5753483", "0.57187766", "0.5548565", "0.55393744", "0.5502858", "0.5494394", "0.54814154", "0.5479246", "0.5473131", "0.5468977", "0.54486203", "0.54343...
0.8382267
0
Test method for 'uk.co.demon.ursus.cif.CIFComment.setValue(String)'
@Test public void testSetValue() { CIFComment comment = new CIFComment(COMMENT); String s = comment.toCIFString(); Assert.assertEquals("cif comment", "#"+COMMENT+"\n", s); comment.setValue(COMMENT1); s = comment.toCIFString(); Assert.assertEquals("cif comment", "#"+COMMENT1+"\n", s); comment = new CIFComment(COMMENTS); s = comment.toCIFString(); Assert.assertEquals("cif comment", "#comment 1\n" + "#comment 2\n" + "#comment 3\n" + "", s); comment.setValue(COMMENT1); s = comment.toCIFString(); Assert.assertEquals("cif comment", "#"+COMMENT1+"\n", s); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void test_TCM__OrgJdomAttribute_setValue_String() {\n \tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n \tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n\n \tassertTrue(\"incorrect value before set\", attribute....
[ "0.66797507", "0.6656044", "0.6629957", "0.6544738", "0.6323165", "0.63219535", "0.6287861", "0.6287861", "0.6165973", "0.612897", "0.612897", "0.6088925", "0.6085969", "0.6085969", "0.6084232", "0.6054133", "0.6052174", "0.59893864", "0.5988277", "0.59867036", "0.5983178", ...
0.8335367
0
Creating object of outer class:
public static void main(String []args){ Outer o1 = new Outer(); o1.Method1Out(); //Creating object of inner class: //Object creation method 1: (For using this method first we have to create the object of outer class) Outer.Inner i1 = o1.new Inner(); i1.MethodIn(); //Object creation method 2: Outer.Inner i2 = new Outer().new Inner(); i2.MethodIn(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void makeInnerObject()\n\t{\n\t\tInnerClass_firstInnerClass objCreationInnerByMethod1=new InnerClass_firstInnerClass();\n\t\tobjCreationInnerByMethod1.accessOuterClassFields();\n\t}", "public InnerAnimal createInnerClass() {\n\t\tInnerAnimal ianimal = new InnerAnimal();\n\t\treturn ianimal;\n\t}", "Clas...
[ "0.7433883", "0.6815964", "0.66988856", "0.6674552", "0.648836", "0.6427028", "0.63575816", "0.6207569", "0.615121", "0.6133985", "0.60640067", "0.59953505", "0.5959239", "0.59087145", "0.58985114", "0.58642006", "0.585476", "0.58534753", "0.5841758", "0.5828173", "0.578696",...
0.63102794
7
just updating the data as no button was pressed yet
@Override public void onClick(DialogInterface dialog, int which) { if (which >= 0) { data.putString(DialogConts.KEY_VALUE, values[which]); } else { data.putBoolean(DialogConts.KEY_BUTTON_POSITIVE, which == DialogInterface.BUTTON_POSITIVE); listener.onDialogResult(data); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setSendDataButton() {\n\t\tsetDataInDB();\n\t\tif (!alreadyPushed)\n\t\t\tsendDataToServer();\n\t\treturnOnWorkoutList();\n\t}", "public updatedata() {\n initComponents();\n }", "@Override\r\n\tprotected ActionListener updateBtnAction() {\n\t\treturn null;\r\n\t}", "public void actionP...
[ "0.65258", "0.64168125", "0.6400568", "0.6329231", "0.62839574", "0.6281588", "0.6250738", "0.62248594", "0.6224256", "0.6195886", "0.61795056", "0.61693984", "0.6143905", "0.61268365", "0.6110004", "0.60815907", "0.6072335", "0.6060925", "0.60365707", "0.60357124", "0.602605...
0.0
-1
StatusFrameLayout Created by RockQ on 2017/3/6.
public interface OnRetryListener { void onRetry(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void $$$setupUI$$$() {\n statusPanel = new JPanel();\n statusPanel.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));\n statusLabel = new JLabel();\n statusLabel.setText(\"Status Label\");\n statusPanel.add(statusLabel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANC...
[ "0.6551227", "0.63638294", "0.63606036", "0.6323671", "0.6097183", "0.60954577", "0.60867715", "0.5963282", "0.59335345", "0.58943677", "0.58864594", "0.58826834", "0.587108", "0.58557683", "0.58462965", "0.58455575", "0.5843587", "0.5835832", "0.58337593", "0.58111113", "0.5...
0.0
-1
Returns true if the trigger was already triggered and should not be triggered again, false otherwise.
boolean isAlreadyTriggered();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean triggersNow()\n\t{\n\t\tif(!this.canTrigger())\n\t\t\treturn false;\n\n\t\tfor(GameObject object: this.game.actualState.stack())\n\t\t\tif(object instanceof StateTriggeredAbility)\n\t\t\t\tif(((StateTriggeredAbility)object).printedVersionID == this.ID)\n\t\t\t\t\treturn false;\n\n\t\tIdentified sour...
[ "0.7493772", "0.7219162", "0.71821153", "0.7086763", "0.6951099", "0.67261755", "0.66630393", "0.66349316", "0.6605165", "0.6569033", "0.6550764", "0.655017", "0.65235263", "0.6496609", "0.648572", "0.64300144", "0.6358901", "0.63536054", "0.6247399", "0.6206522", "0.61978894...
0.79688907
0
TODO: isAlreadyTriggered could be changed to shouldBeTriggered() so Triggers implement whether they should be called or not based on some stuff, also use world and entity. Triggers the Trigger with its owner Entity.
void trigger(Entity e);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void trigger(List<Entity> _trigger){\n\t\tif(event!=null){\n\t\t\tevent.activate(System.currentTimeMillis(), _trigger);\n\t\t}\n\t}", "public void executeTrigger(Object object);", "public boolean triggersNow()\n\t{\n\t\tif(!this.canTrigger())\n\t\t\treturn false;\n\n\t\tfor(GameObject object: this.game....
[ "0.66826504", "0.6583098", "0.653898", "0.64852476", "0.6477727", "0.64634615", "0.63810813", "0.63188535", "0.6307329", "0.61134404", "0.60689485", "0.5989065", "0.5963029", "0.5942912", "0.5875023", "0.5855305", "0.57996583", "0.57688254", "0.5758538", "0.5727735", "0.57049...
0.7040749
0
TODO Autogenerated method stub
public static void main(String[] args) { if(primeCheck(7)) { System.out.println("7은 소수임"); } if(primeCheck(8)) { }else { System.out.println("8은 소수가 아님"); } if(primeCheck(8)==false) { System.out.println("8은 소수가 아님"); } // not ptimeCheck(8) if(!primeCheck(8)) { System.out.println("8은 소수가 아님"); } }
{ "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
/ compiled from: RefreshInternal / renamed from: qy
public interface qy extends rh { @RestrictTo({Scope.LIBRARY, Scope.LIBRARY_GROUP, Scope.SUBCLASSES}) int a(@NonNull ra raVar, boolean z); @RestrictTo({Scope.LIBRARY, Scope.LIBRARY_GROUP, Scope.SUBCLASSES}) void a(float f, int i, int i2); @RestrictTo({Scope.LIBRARY, Scope.LIBRARY_GROUP, Scope.SUBCLASSES}) void a(@NonNull qz qzVar, int i, int i2); @RestrictTo({Scope.LIBRARY, Scope.LIBRARY_GROUP, Scope.SUBCLASSES}) void a(@NonNull ra raVar, int i, int i2); @RestrictTo({Scope.LIBRARY, Scope.LIBRARY_GROUP, Scope.SUBCLASSES}) void a(boolean z, float f, int i, int i2, int i3); boolean a(); @RestrictTo({Scope.LIBRARY, Scope.LIBRARY_GROUP, Scope.SUBCLASSES}) void b(@NonNull ra raVar, int i, int i2); @NonNull SpinnerStyle getSpinnerStyle(); @NonNull View getView(); @RestrictTo({Scope.LIBRARY, Scope.LIBRARY_GROUP, Scope.SUBCLASSES}) void setPrimaryColors(@ColorInt int... iArr); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void refresh() {\n\t\t\n\t}", "@Override\n\tpublic void refresh() {\n\t\t\n\t}", "@Override\n\tpublic void refresh() {\n\n\t}", "@Override\n public void refresh() {\n }", "public abstract void refreshing();", "abstract void refresh();", "protected void refresh() {\n\t}", "pu...
[ "0.6630682", "0.6630682", "0.6543045", "0.65291166", "0.6508247", "0.64525485", "0.6394269", "0.63908124", "0.6310067", "0.6310067", "0.6310067", "0.62307423", "0.62282896", "0.622694", "0.62221736", "0.618912", "0.618912", "0.61324763", "0.61324763", "0.61324763", "0.6132476...
0.0
-1
Here query db for this user object.
public User getUser(User user){ Session session = (Session) em.getDelegate(); List<User> userList = session.createCriteria(User.class) .add(Restrictions.eq("username", user.getUsername())) .add(Restrictions.eq("password", user.getPassword())) .list(); if(userList.isEmpty()){ return null; } else { return userList.get(0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic User queryById(int uid) {\n\t\treturn userDao.queryById(uid);\r\n\t}", "public User QueryUser(User user){\n\t\t\treturn user;\n\t\t}", "@Override\r\n\tpublic List<TUsers> queryByCon(QueryUser query) {\n\t\treturn dao.queryByCon(query);\r\n\t}", "@Override\r\n\tpublic User getAllUser() {...
[ "0.6345025", "0.63064873", "0.62915814", "0.62451696", "0.621746", "0.61595505", "0.61266", "0.61179465", "0.6057536", "0.60183567", "0.59877664", "0.5969526", "0.59657913", "0.5953922", "0.59500676", "0.5941289", "0.5940864", "0.59364426", "0.5930838", "0.5921729", "0.591309...
0.0
-1
TODO Autogenerated method stub
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HttpSession mySession = request.getSession(); User_Profile myUser = (User_Profile)mySession.getAttribute("user_profile"); String mAcc = request.getParameter("mortAccn"); String cAcc = request.getParameter("checkAcc"); String amm = request.getParameter("payAmmount"); if(new Double(amm).doubleValue() > -1) { Transaction check = checkFunds(new Double(amm).doubleValue()*-1,myUser.getAccounts().get(new Integer(cAcc).intValue())); if(check != null){ Transaction result = checkFunds(new Double(amm).doubleValue()*1,myUser.getAccounts().get(new Integer(mAcc).intValue())); int newCheck = dao.InsertData.insertTransaction(check); int newMort = dao.InsertData.insertTransaction(result); dao.InsertData.makeTransaction(check); dao.InsertData.makeTransaction(result); if(newMort == -1 || newCheck == -1){ mySession.setAttribute("error", "There was a problem inserting into the DB"); } mySession.setAttribute("returnMes", "The Money has been transfered."); } } myUser = dao.GetData.getProfileFromId(myUser.getUserId()); mySession.setAttribute("user_profile", myUser); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/homescreen_unlocked.jsp"); dispatcher.forward(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1